Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/connman: upgrade to 1.31, add init-script

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Tue, 2 Feb 2016 13:40:02 +0200

---
 testing/connman/APKBUILD         | 36 ++++++++++++++++++++++--------------
 testing/connman/connman.initd    | 20 ++++++++++++++++++++
 testing/connman/musl-fixes.patch | 12 ------------
 3 files changed, 42 insertions(+), 26 deletions(-)
 create mode 100644 testing/connman/connman.initd
diff --git a/testing/connman/APKBUILD b/testing/connman/APKBUILD
index 0b070d9..13e8cef 100644
--- a/testing/connman/APKBUILD
+++ b/testing/connman/APKBUILD
_at_@ -1,20 +1,23 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+# Contributor: Valery Kartel <valery.kartel_at_gmail.com>
 pkgname=connman
-pkgver=1.30
+pkgver=1.31
 pkgrel=0
-pkgdesc="An alternative daemon for managing internet connections on Linux"
+pkgdesc="A daemon for managing internet connections"
 url="http://connman.net/"
 arch="all"
 license="GPLv2"
 depends="wpa_supplicant"
 depends_dev=""
-makedepends="$depends_dev glib-dev iptables-dev readline-dev
-	dbus-dev autoconf automake libtool"
+makedepends="$depends_dev autoconf automake libtool
+	glib-dev iptables-dev readline-dev dbus-dev
+	"
 install=""
 subpackages="$pkgname-dev $pkgname-doc"
-source="http://www.kernel.org/pub/linux/network/connman/connman-$pkgver.tar.xz
+source="http://www.kernel.org/pub/linux/network/$pkgname/$pkgname-$pkgver.tar.xz
 	musl-fixes.patch
 	libresolv.patch
+	connman.initd
 	"
 
 _builddir="$srcdir"/connman-$pkgver
_at_@ -48,14 +51,19 @@ build() {
 package() {
 	cd "$_builddir"
 	make DESTDIR="$pkgdir" install || return 1
+	install -Dm644 src/main.conf "$pkgdir"/etc/$pkgname/main.conf
+	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
 }
 
-md5sums="4a3efdbd6796922db9c6f66da57887fa  connman-1.30.tar.xz
-649a12007599e37f250f053e38b197c3  musl-fixes.patch
-7ce81d8578903db13b92aae7479f0624  libresolv.patch"
-sha256sums="5c5e464bacc9c27ed4e7269fb9b5059f07947f5be26433b59212133663ffa991  connman-1.30.tar.xz
-9e4fe373cdffef36e5559581e285c34be2f70f3056b8478a157f0170a192a0a0  musl-fixes.patch
-6a36a7d85d12d5ce927c741ca41ddb40a4eb5351dd0112cebc93134113641edb  libresolv.patch"
-sha512sums="cc51c9d5ea1732e2408c1e1dfbbab8fc31250df1a584b6a16ac890c80dbb81636b6d62490088ea3090919f1bfa37f33532f404310bd0932e93b21af5f330af44  connman-1.30.tar.xz
-5894ca5656bf2643815f1c9efbd6ce5ce413893f82e381da12cbf826d896bbcdced8f051a9a255ca8e3071047a1ac34f072a413cd2f27f1ad413639e16a08c03  musl-fixes.patch
-c258e747e13b86c81ae96ac1743abf0c1461b9053c5b386d594a49f0b1890f10d89bea92610762ff609a4cc5fea04a43fab83894702f552b05af400f01cb011e  libresolv.patch"
+md5sums="cb1c413fcc4f49430294bbd7a92f5f3c  connman-1.31.tar.xz
+3cabe0cec49b0fedc0e2109ecf115060  musl-fixes.patch
+7ce81d8578903db13b92aae7479f0624  libresolv.patch
+d4ff58c635f7864de60714f429108870  connman.initd"
+sha256sums="88fcf0b6df334796b90e2fd2e434d6f5b36cd6f13b886a119b8c90276b72b8e2  connman-1.31.tar.xz
+ec3efdc3dfade4b683730017e6d36862e9617b76c5775c3e30a041c1a21e8844  musl-fixes.patch
+6a36a7d85d12d5ce927c741ca41ddb40a4eb5351dd0112cebc93134113641edb  libresolv.patch
+8abb764e8c0f370df17f81a253acb3905468f419c8dfdc508ffdd0429266608b  connman.initd"
+sha512sums="f9871ead096ead37d3bc524fb143ec8c88125e9c18b5eb1f451581b9a2061719e90361e5b7f3e09901701707d977c42c630457b0ead8e76e04e964a7542c7bbd  connman-1.31.tar.xz
+6bcf633e299b8034efa801d678163c61edf1d35e286f2bf10cc94d85e268f9a6aa5c91bd3c18e90991ccacade00b01fcc72bedae191a2051321649bb3d678f13  musl-fixes.patch
+c258e747e13b86c81ae96ac1743abf0c1461b9053c5b386d594a49f0b1890f10d89bea92610762ff609a4cc5fea04a43fab83894702f552b05af400f01cb011e  libresolv.patch
+42b45d44f5eed966ba003683fcb54ffb4e9a0331599ff1c8e5e64c4c06b42d380c3852b7c73881a1be1eaca887906cac9aede1f5579e8e139fdf90ca8d7adf15  connman.initd"
diff --git a/testing/connman/connman.initd b/testing/connman/connman.initd
new file mode 100644
index 0000000..1728694
--- /dev/null
+++ b/testing/connman/connman.initd
_at_@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+description="Connection Manager"
+cfgfile=/etc/connman/main.conf
+pidfile=/run/connman/connman.pid
+command=/usr/sbin/connmand
+command_args="$command_args -n -c $cfgfile"
+command_background="yes"
+
+depend() {
+	need dbus
+	provide net
+}
+
+start_pre() {
+	ebegin
+	checkpath --directory ${pidfile%/*}
+	ln -sf ${pidfile%/*}/resolv.conf /etc/
+	eend $?
+}
diff --git a/testing/connman/musl-fixes.patch b/testing/connman/musl-fixes.patch
index 38cb147..9f9d9cf 100644
--- a/testing/connman/musl-fixes.patch
+++ b/testing/connman/musl-fixes.patch
_at_@ -94,18 +94,6 @@ diff --exclude '*.*o' -ru connman-1.24.orig/plugins/wifi.c connman-1.24/plugins/
  
  #ifndef IFF_LOWER_UP
  #define IFF_LOWER_UP	0x10000
-diff --exclude '*.*o' -ru connman-1.24.orig/src/ntp.c connman-1.24/src/ntp.c
---- connman-1.24.orig/src/ntp.c	2014-06-07 21:46:22.000000000 -0300
-+++ connman-1.24/src/ntp.c	2014-07-18 20:38:12.144677543 -0300
-_at_@ -180,7 +180,7 @@
- 	msg.xmttime.fraction = htonl(transmit_timeval.tv_usec * 1000);
- 
- 	len = sendto(fd, &msg, sizeof(msg), MSG_DONTWAIT,
--						&addr, sizeof(addr));
-+						(struct sockaddr *) &addr, sizeof(addr));
- 	if (len < 0) {
- 		connman_error("Time request for server %s failed (%d/%s)",
- 			server, errno, strerror(errno));
 diff --exclude '*.*o' -ru connman-1.24.orig/src/tethering.c connman-1.24/src/tethering.c
 --- connman-1.24.orig/src/tethering.c	2014-04-04 15:12:07.000000000 -0300
 +++ connman-1.24/src/tethering.c	2014-07-18 20:39:12.091344804 -0300
-- 
2.7.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Feb 02 2016 - 13:40:02 GMT