aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/dhcpcd/APKBUILD20
-rw-r--r--main/dhcpcd/busybox-logger.patch6
-rw-r--r--main/dhcpcd/dhcpcd.post-upgrade24
-rw-r--r--main/dhcpcd/fix-chrony-conf-location.patch6
4 files changed, 39 insertions, 17 deletions
diff --git a/main/dhcpcd/APKBUILD b/main/dhcpcd/APKBUILD
index cf75c9a92e..0374c8cdaa 100644
--- a/main/dhcpcd/APKBUILD
+++ b/main/dhcpcd/APKBUILD
@@ -2,26 +2,25 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dhcpcd
-pkgver=6.11.5
-pkgrel=2
+pkgver=7.0.2
+pkgrel=0
pkgdesc="RFC2131 compliant DHCP client"
url="https://roy.marples.name/projects/dhcpcd/"
arch="all"
license="BSD-2-Clause"
-depends=""
-depends_dev=""
-makedepends="$depends_dev linux-headers bsd-compat-headers dbus-dev"
-install=""
+makedepends="linux-headers bsd-compat-headers dbus-dev"
+install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-openrc"
source="http://roy.marples.name/downloads/dhcpcd/$pkgname-$pkgver.tar.xz
busybox-logger.patch
fix-chrony-conf-location.patch
dhcpcd.initd
"
+builddir="$srcdir/$pkgname-$pkgver"
-builddir="$srcdir"/$pkgname-$pkgver
build() {
cd "$builddir"
+
CFLAGS="$CFLAGS -D_GNU_SOURCE -DHAVE_PRINTF_M"
./configure \
--build=$CBUILD \
@@ -45,12 +44,13 @@ check() {
package() {
cd "$builddir"
+
make DESTDIR="$pkgdir" install
install -Dm755 "$srcdir"/dhcpcd.initd \
"$pkgdir"/etc/init.d/dhcpcd
}
-sha512sums="a23d5dde66567c4addbc86c8b3fbf2c5d4dba3b463659729778a310306ab0e949be8998154ef15401ac2d289bde2f090d44492bba6a1becd2f01890d4efe7051 dhcpcd-6.11.5.tar.xz
-83dc7bfd36b6b416c931775bb35a0d2951ed04c421195c45bfed80a11a7adbed7c80ade1c1246847c2fb1bf15a7b6e83100f16605ee84f750440d7bc9f7f5ef3 busybox-logger.patch
-4e07c886d89aa4962e683383098d343030a24838e3c3d86ac79c00aad87dcaf41352ac04556a2bf0e00c1b9bad370351e254e83fa76f6e299102fd292b5f6a70 fix-chrony-conf-location.patch
+sha512sums="f5b1407199163fb994519bc1b5a70ad043f00f263e3b254da5d519d1c6b689a4a5a8bcef3bf42401826984e273c2ead38249fcfe99129b87034f90de2fc46ecd dhcpcd-7.0.2.tar.xz
+692b2c8c75166fabd512a7cc69c650f9391e0f682ce9cbe1771bfa44e82dcf09e322c46493c45ca75000f479d3cddde306754ba31d28a798a15e2b79a56045f0 busybox-logger.patch
+1c19eed0f7a008ee96ea392beb327169ff8c83fc27fed20f65f05c9125f60629ebe3474c5e6a7cf4aeeea448fde4264c9b84916efacd67d47ab908c47b1fc3a5 fix-chrony-conf-location.patch
6d3220155f2d9ed3e3a00afd378eeb70d435e19804201f8bb35498f1f7f3dfdaeaa2f4a01a18f5e96b457d9c173bc6a206b3e67ebf6d95da7e7b350dcd153fde dhcpcd.initd"
diff --git a/main/dhcpcd/busybox-logger.patch b/main/dhcpcd/busybox-logger.patch
index b5a3b5d5e9..f1b913931b 100644
--- a/main/dhcpcd/busybox-logger.patch
+++ b/main/dhcpcd/busybox-logger.patch
@@ -1,6 +1,6 @@
---- ./dhcpcd-run-hooks.in.orig
-+++ ./dhcpcd-run-hooks.in
-@@ -193,7 +193,7 @@
+--- a/hooks/dhcpcd-run-hooks.in
++++ b/hooks/dhcpcd-run-hooks.in
+@@ -179,7 +179,7 @@
*) echo "$interface: $*";;
esac
if type logger >/dev/null 2>&1; then
diff --git a/main/dhcpcd/dhcpcd.post-upgrade b/main/dhcpcd/dhcpcd.post-upgrade
new file mode 100644
index 0000000000..f1e7dc9245
--- /dev/null
+++ b/main/dhcpcd/dhcpcd.post-upgrade
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+# Move dhcpcd.duid and dhcpcd.secret to new location when upgrading
+# to dhcpcd 7.x.
+# See https://roy.marples.name/blog/dhcpcd-7-finally-enters-beta.
+if [ "$(apk version -t "$ver_old" '7.0.0-r0')" = '<' ]; then
+ dbdir='/var/lib/dhcpcd'
+ duid_old='/etc/dhcpcd.duid'
+ secret_old='/etc/dhcpcd.secret'
+
+ if [ -f $duid_old ] && [ ! -f $dbdir/duid ]; then
+ echo "* Moving $duid_old to $dbdir/duid" >&2
+ mv $duid_old $dbdir/duid
+ fi
+ if [ -f $secret_old ] && [ ! -f $dbdir/secret ]; then
+ echo "* Moving $secret_old to $dbdir/secret" >&2
+ mv $secret_old $dbdir/secret
+ fi
+fi
+
+exit 0
diff --git a/main/dhcpcd/fix-chrony-conf-location.patch b/main/dhcpcd/fix-chrony-conf-location.patch
index 4fcde0d475..b75df9f379 100644
--- a/main/dhcpcd/fix-chrony-conf-location.patch
+++ b/main/dhcpcd/fix-chrony-conf-location.patch
@@ -1,7 +1,5 @@
-diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf
-index 7480503..94b11bb 100644
---- a/dhcpcd-hooks/50-ntp.conf
-+++ b/dhcpcd-hooks/50-ntp.conf
+--- a/hooks/50-ntp.conf
++++ b/hooks/50-ntp.conf
@@ -17,7 +17,7 @@
# above examples.