public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2016-01-07 17:38 William Hubbs
  0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2016-01-07 17:38 UTC (permalink / raw
  To: gentoo-commits

commit:     cfc9192ff7c0c7c20bbb375b55d737849101cb0b
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  7 17:36:42 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 17:37:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfc9192f

net-misc/dhcpcd: version bump

 net-misc/dhcpcd/Manifest                         |   1 +
 net-misc/dhcpcd/dhcpcd-6.9.4.ebuild              | 121 +++++++++++++++++++++++
 net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch |  20 ++++
 3 files changed, 142 insertions(+)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 7cf8786..2ce8234 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -2,3 +2,4 @@ DIST dhcpcd-6.9.0.tar.bz2 176736 SHA256 1566a58ef785880c07762ff6c520e974cf42872b
 DIST dhcpcd-6.9.1.tar.xz 175656 SHA256 c03b750e1fe2890b62ac0e7d7092a1698b598adb6f88b67916586a619f7c066f SHA512 87ecd54fc94eb3fbebbf87c4037da4767f31ca60718c5fd8cc3dcff4c3294edf7808627ef909120b668f1b767f0d588dddb7c1920a971c86bdc83f72b64e33a3 WHIRLPOOL d8ef71fef224101a785c838ae48fbe440e7b3ca0f07d435d0a9f7a3fef458e28c094b08966ac88a25ec92fbadcfc06a52d55c39f5772427958f715d665cfe0e9
 DIST dhcpcd-6.9.2.tar.xz 176240 SHA256 e9f82422a35ad1f4f5f888a433a76e98e3cdd4419886c29ccbfb336eecc58a70 SHA512 9eb9dccdd26d9b088cf1bfdcef0ebcb83b8f18f1058a8ce385c3f69ab30682814215c24fbe5903d6a9ee7b4a5fbc93504949513987525515e1f597183e8b6920 WHIRLPOOL 86788c68d92ce774a96806bdcd03ff624ccf632f9bc5627cab218e63824e4da9d997300453de2d0fe299127880dc6d51a1bc9130246bebb425d32e1315f62455
 DIST dhcpcd-6.9.3.tar.xz 176320 SHA256 6089471ed695fa62ac8351466b96b4b6365fd14ec455a120a6524663808eae53 SHA512 0a895f17fa093ac758224bfddad003ee25f81fe96331b1952264c3623018e00048603c9a3c5ba385a93441e987b1ce4cd02ec1f42e1caca2e646a6ac4781c3d9 WHIRLPOOL 6de1622444cf393287abbd469016f3c3cc0a99e6ecc4b781c5b9e0389c899365cfefa46e93d16872e6427517f92ff4750e3a246604562922836ae112dbd4349d
+DIST dhcpcd-6.9.4.tar.xz 178632 SHA256 c3f3ff7473ef158a1e71db9aea7424df2c3477ad064e2b542f27948a5abc9ba0 SHA512 27a185b990c8dec847c7c580aa8da11c88796877c963a3cd44d9ff60d84bad29cad4e60bf1d9487d8af0a556fe415b2f449fac9ae71b3e72991fb5d38a72151f WHIRLPOOL dfdb9f952dcac22e4236a2787b51b7fbd3f59172e731bef84955247850db7142b73fb1fb3845d7f65df457e2c9b6f1c6cbacc971d7afb953319d8280967e7fde

diff --git a/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild
new file mode 100644
index 0000000..17184cf
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]]; then
+	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+if [[ ${PV} == "9999" ]]; then
+	DEPEND+=" dev-vcs/fossil"
+
+	src_unpack()
+	{
+		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+		local repo=${distdir}/fossil/${PN}.fossil
+
+		addwrite "${distdir}"
+
+		if [[ -e "${repo}" ]]; then
+			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
+		else
+			mkdir -p "${distdir}/fossil" || die
+			fossil clone "${FOSSIL_URI}" "${repo}" || die
+		fi
+
+		mkdir -p "${S}" || die
+		cd "${S}" || die
+		fossil open "${repo}" || die
+	}
+fi
+
+src_prepare()
+{
+	epatch "${FILESDIR}"/${P}-no-ipv6.patch
+	epatch_user
+}
+
+src_configure()
+{
+	local dev hooks rundir
+	use udev || dev="--without-dev --without-udev"
+	hooks="--with-hook=ntp.conf"
+	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
+	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+	econf \
+		--prefix="${EPREFIX}" \
+		--libexecdir="${EPREFIX}/lib/dhcpcd" \
+		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
+		--localstatedir="${EPREFIX}/var" \
+		${rundir} \
+		$(use_enable embedded) \
+		$(use_enable ipv6) \
+		${dev} \
+		CC="$(tc-getCC)" \
+		${hooks}
+}
+
+src_install()
+{
+	default
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst()
+{
+	# Upgrade the duid file to the new format if needed
+	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local new_duid="${ROOT}"/etc/dhcpcd.duid
+	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
+		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+	fi
+
+	# Move the duid to /etc, a more sensible location
+	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
+		cp -p "${old_duid}" "${new_duid}"
+	fi
+
+	if [ -z "$REPLACING_VERSIONS" ]; then
+		elog
+	 elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch b/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch
new file mode 100644
index 0000000..d0b73f3
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch
@@ -0,0 +1,20 @@
+Index: dhcp6.h
+==================================================================
+--- dhcp6.h
++++ dhcp6.h
+@@ -252,13 +252,14 @@
+ int dhcp6_dump(struct interface *);
+ #else
+ #define dhcp6_find_delegates(a) {}
+ #define dhcp6_start(a, b) (0)
+ #define dhcp6_reboot(a) {}
++#define dhcp6_renew(a) {}
+ #define dhcp6_env(a, b, c, d, e) {}
+ #define dhcp6_free(a) {}
+ #define dhcp6_dadcompleted(a) (0)
+ #define dhcp6_drop(a, b) {}
+ #define dhcp6_dump(a) (-1)
+ #endif
+ 
+ #endif
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2016-01-09 23:06 William Hubbs
  0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2016-01-09 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b945516b07d8c26cb1cbf42658b49824ee33f3cf
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  9 22:55:31 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 23:04:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b945516b

net-misc/dhcpcd: remove old unstable versions

 net-misc/dhcpcd/Manifest                         |   4 -
 net-misc/dhcpcd/dhcpcd-6.9.1.ebuild              | 120 ----------------------
 net-misc/dhcpcd/dhcpcd-6.9.2.ebuild              | 120 ----------------------
 net-misc/dhcpcd/dhcpcd-6.9.3.ebuild              | 120 ----------------------
 net-misc/dhcpcd/dhcpcd-6.9.4.ebuild              | 121 -----------------------
 net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch |  20 ----
 6 files changed, 505 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 60aaf8a..7dbd724 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,6 +1,2 @@
 DIST dhcpcd-6.10.0.tar.xz 179804 SHA256 ab56af9b2e86913c55a965cb0f835e87749df78318564acf90d5d698f413ad35 SHA512 f31c95beaa7668deb03e3d657660cd32434dbb0ef440e9bc568bb4a672a510bffb5e79e15d139b40fa7730e9a642c3c2167aaa1389fb8c449bfbcd0039ed30f0 WHIRLPOOL 70a18c39f317cb2cf51ec0a44d79d7fba99e381c47ecd2753bef41b68994193e9c846789aa2c1725a6261e82324434bee3231b056b93a8af3e10e9d26815a5b0
 DIST dhcpcd-6.9.0.tar.bz2 176736 SHA256 1566a58ef785880c07762ff6c520e974cf42872be5fbb23b4520f4446b120a68 SHA512 bb02005ff54ad722961208be69f48c61fb72cf56c9ca89348f3e0973e96317b06b4eaf48412ec5e763c9e20bad6f38e06d520048f3412d3bf46716f5dfb671a6 WHIRLPOOL 450b89ff260cfef8e865d1f02b7aa7119d0e37a231d08577545d0091496cee370f5f9c2614e6d5ef2b9a99b412d909d3ed4711c7433b6de085b7dc62df84a4fb
-DIST dhcpcd-6.9.1.tar.xz 175656 SHA256 c03b750e1fe2890b62ac0e7d7092a1698b598adb6f88b67916586a619f7c066f SHA512 87ecd54fc94eb3fbebbf87c4037da4767f31ca60718c5fd8cc3dcff4c3294edf7808627ef909120b668f1b767f0d588dddb7c1920a971c86bdc83f72b64e33a3 WHIRLPOOL d8ef71fef224101a785c838ae48fbe440e7b3ca0f07d435d0a9f7a3fef458e28c094b08966ac88a25ec92fbadcfc06a52d55c39f5772427958f715d665cfe0e9
-DIST dhcpcd-6.9.2.tar.xz 176240 SHA256 e9f82422a35ad1f4f5f888a433a76e98e3cdd4419886c29ccbfb336eecc58a70 SHA512 9eb9dccdd26d9b088cf1bfdcef0ebcb83b8f18f1058a8ce385c3f69ab30682814215c24fbe5903d6a9ee7b4a5fbc93504949513987525515e1f597183e8b6920 WHIRLPOOL 86788c68d92ce774a96806bdcd03ff624ccf632f9bc5627cab218e63824e4da9d997300453de2d0fe299127880dc6d51a1bc9130246bebb425d32e1315f62455
-DIST dhcpcd-6.9.3.tar.xz 176320 SHA256 6089471ed695fa62ac8351466b96b4b6365fd14ec455a120a6524663808eae53 SHA512 0a895f17fa093ac758224bfddad003ee25f81fe96331b1952264c3623018e00048603c9a3c5ba385a93441e987b1ce4cd02ec1f42e1caca2e646a6ac4781c3d9 WHIRLPOOL 6de1622444cf393287abbd469016f3c3cc0a99e6ecc4b781c5b9e0389c899365cfefa46e93d16872e6427517f92ff4750e3a246604562922836ae112dbd4349d
-DIST dhcpcd-6.9.4.tar.xz 178632 SHA256 c3f3ff7473ef158a1e71db9aea7424df2c3477ad064e2b542f27948a5abc9ba0 SHA512 27a185b990c8dec847c7c580aa8da11c88796877c963a3cd44d9ff60d84bad29cad4e60bf1d9487d8af0a556fe415b2f449fac9ae71b3e72991fb5d38a72151f WHIRLPOOL dfdb9f952dcac22e4236a2787b51b7fbd3f59172e731bef84955247850db7142b73fb1fb3845d7f65df457e2c9b6f1c6cbacc971d7afb953319d8280967e7fde

diff --git a/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild
deleted file mode 100644
index 3db5ed5..0000000
--- a/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-if [[ ${PV} == "9999" ]]; then
-	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-inherit eutils systemd toolchain-funcs
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-if [[ ${PV} == "9999" ]]; then
-	DEPEND+=" dev-vcs/fossil"
-
-	src_unpack()
-	{
-		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
-		local repo=${distdir}/fossil/${PN}.fossil
-
-		addwrite "${distdir}"
-
-		if [[ -e "${repo}" ]]; then
-			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
-		else
-			mkdir -p "${distdir}/fossil" || die
-			fossil clone "${FOSSIL_URI}" "${repo}" || die
-		fi
-
-		mkdir -p "${S}" || die
-		cd "${S}" || die
-		fossil open "${repo}" || die
-	}
-fi
-
-src_prepare()
-{
-	epatch_user
-}
-
-src_configure()
-{
-	local dev hooks rundir
-	use udev || dev="--without-dev --without-udev"
-	hooks="--with-hook=ntp.conf"
-	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
-	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
-	econf \
-		--prefix="${EPREFIX}" \
-		--libexecdir="${EPREFIX}/lib/dhcpcd" \
-		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
-		--localstatedir="${EPREFIX}/var" \
-		${rundir} \
-		$(use_enable embedded) \
-		$(use_enable ipv6) \
-		${dev} \
-		CC="$(tc-getCC)" \
-		${hooks}
-}
-
-src_install()
-{
-	default
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst()
-{
-	# Upgrade the duid file to the new format if needed
-	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local new_duid="${ROOT}"/etc/dhcpcd.duid
-	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
-		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
-	fi
-
-	# Move the duid to /etc, a more sensible location
-	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
-		cp -p "${old_duid}" "${new_duid}"
-	fi
-
-	if [ -z "$REPLACING_VERSIONS" ]; then
-		elog
-	 elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/dhcpcd-6.9.2.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.2.ebuild
deleted file mode 100644
index 3db5ed5..0000000
--- a/net-misc/dhcpcd/dhcpcd-6.9.2.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-if [[ ${PV} == "9999" ]]; then
-	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-inherit eutils systemd toolchain-funcs
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-if [[ ${PV} == "9999" ]]; then
-	DEPEND+=" dev-vcs/fossil"
-
-	src_unpack()
-	{
-		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
-		local repo=${distdir}/fossil/${PN}.fossil
-
-		addwrite "${distdir}"
-
-		if [[ -e "${repo}" ]]; then
-			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
-		else
-			mkdir -p "${distdir}/fossil" || die
-			fossil clone "${FOSSIL_URI}" "${repo}" || die
-		fi
-
-		mkdir -p "${S}" || die
-		cd "${S}" || die
-		fossil open "${repo}" || die
-	}
-fi
-
-src_prepare()
-{
-	epatch_user
-}
-
-src_configure()
-{
-	local dev hooks rundir
-	use udev || dev="--without-dev --without-udev"
-	hooks="--with-hook=ntp.conf"
-	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
-	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
-	econf \
-		--prefix="${EPREFIX}" \
-		--libexecdir="${EPREFIX}/lib/dhcpcd" \
-		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
-		--localstatedir="${EPREFIX}/var" \
-		${rundir} \
-		$(use_enable embedded) \
-		$(use_enable ipv6) \
-		${dev} \
-		CC="$(tc-getCC)" \
-		${hooks}
-}
-
-src_install()
-{
-	default
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst()
-{
-	# Upgrade the duid file to the new format if needed
-	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local new_duid="${ROOT}"/etc/dhcpcd.duid
-	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
-		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
-	fi
-
-	# Move the duid to /etc, a more sensible location
-	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
-		cp -p "${old_duid}" "${new_duid}"
-	fi
-
-	if [ -z "$REPLACING_VERSIONS" ]; then
-		elog
-	 elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/dhcpcd-6.9.3.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.3.ebuild
deleted file mode 100644
index 3db5ed5..0000000
--- a/net-misc/dhcpcd/dhcpcd-6.9.3.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-if [[ ${PV} == "9999" ]]; then
-	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-inherit eutils systemd toolchain-funcs
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-if [[ ${PV} == "9999" ]]; then
-	DEPEND+=" dev-vcs/fossil"
-
-	src_unpack()
-	{
-		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
-		local repo=${distdir}/fossil/${PN}.fossil
-
-		addwrite "${distdir}"
-
-		if [[ -e "${repo}" ]]; then
-			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
-		else
-			mkdir -p "${distdir}/fossil" || die
-			fossil clone "${FOSSIL_URI}" "${repo}" || die
-		fi
-
-		mkdir -p "${S}" || die
-		cd "${S}" || die
-		fossil open "${repo}" || die
-	}
-fi
-
-src_prepare()
-{
-	epatch_user
-}
-
-src_configure()
-{
-	local dev hooks rundir
-	use udev || dev="--without-dev --without-udev"
-	hooks="--with-hook=ntp.conf"
-	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
-	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
-	econf \
-		--prefix="${EPREFIX}" \
-		--libexecdir="${EPREFIX}/lib/dhcpcd" \
-		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
-		--localstatedir="${EPREFIX}/var" \
-		${rundir} \
-		$(use_enable embedded) \
-		$(use_enable ipv6) \
-		${dev} \
-		CC="$(tc-getCC)" \
-		${hooks}
-}
-
-src_install()
-{
-	default
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst()
-{
-	# Upgrade the duid file to the new format if needed
-	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local new_duid="${ROOT}"/etc/dhcpcd.duid
-	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
-		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
-	fi
-
-	# Move the duid to /etc, a more sensible location
-	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
-		cp -p "${old_duid}" "${new_duid}"
-	fi
-
-	if [ -z "$REPLACING_VERSIONS" ]; then
-		elog
-	 elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild
deleted file mode 100644
index 17184cf..0000000
--- a/net-misc/dhcpcd/dhcpcd-6.9.4.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-if [[ ${PV} == "9999" ]]; then
-	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-inherit eutils systemd toolchain-funcs
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-if [[ ${PV} == "9999" ]]; then
-	DEPEND+=" dev-vcs/fossil"
-
-	src_unpack()
-	{
-		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
-		local repo=${distdir}/fossil/${PN}.fossil
-
-		addwrite "${distdir}"
-
-		if [[ -e "${repo}" ]]; then
-			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
-		else
-			mkdir -p "${distdir}/fossil" || die
-			fossil clone "${FOSSIL_URI}" "${repo}" || die
-		fi
-
-		mkdir -p "${S}" || die
-		cd "${S}" || die
-		fossil open "${repo}" || die
-	}
-fi
-
-src_prepare()
-{
-	epatch "${FILESDIR}"/${P}-no-ipv6.patch
-	epatch_user
-}
-
-src_configure()
-{
-	local dev hooks rundir
-	use udev || dev="--without-dev --without-udev"
-	hooks="--with-hook=ntp.conf"
-	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
-	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
-	econf \
-		--prefix="${EPREFIX}" \
-		--libexecdir="${EPREFIX}/lib/dhcpcd" \
-		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
-		--localstatedir="${EPREFIX}/var" \
-		${rundir} \
-		$(use_enable embedded) \
-		$(use_enable ipv6) \
-		${dev} \
-		CC="$(tc-getCC)" \
-		${hooks}
-}
-
-src_install()
-{
-	default
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst()
-{
-	# Upgrade the duid file to the new format if needed
-	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local new_duid="${ROOT}"/etc/dhcpcd.duid
-	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
-		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
-	fi
-
-	# Move the duid to /etc, a more sensible location
-	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
-		cp -p "${old_duid}" "${new_duid}"
-	fi
-
-	if [ -z "$REPLACING_VERSIONS" ]; then
-		elog
-	 elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch b/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch
deleted file mode 100644
index d0b73f3..0000000
--- a/net-misc/dhcpcd/files/dhcpcd-6.9.4-no-ipv6.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: dhcp6.h
-==================================================================
---- dhcp6.h
-+++ dhcp6.h
-@@ -252,13 +252,14 @@
- int dhcp6_dump(struct interface *);
- #else
- #define dhcp6_find_delegates(a) {}
- #define dhcp6_start(a, b) (0)
- #define dhcp6_reboot(a) {}
-+#define dhcp6_renew(a) {}
- #define dhcp6_env(a, b, c, d, e) {}
- #define dhcp6_free(a) {}
- #define dhcp6_dadcompleted(a) (0)
- #define dhcp6_drop(a, b) {}
- #define dhcp6_dump(a) (-1)
- #endif
- 
- #endif
-


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2016-07-21 22:40 William Hubbs
  0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2016-07-21 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d06547b64f0aaf17cf35c9245930369879c4181c
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 21 22:37:02 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 22:37:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d06547b6

net-misc/dhcpcd: 6.11.1-r1 bump for #588724

Package-Manager: portage-2.2.28

 net-misc/dhcpcd/dhcpcd-6.11.1-r1.ebuild            | 119 +++++++++++++++++++++
 .../dhcpcd/files/dhcpcd-6.11.1-arp-conflict.patch  |  61 +++++++++++
 2 files changed, 180 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-6.11.1-r1.ebuild b/net-misc/dhcpcd/dhcpcd-6.11.1-r1.ebuild
new file mode 100644
index 0000000..35f6dff
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-6.11.1-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+if [[ ${PV} == "9999" ]]; then
+	FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+if [[ ${PV} == "9999" ]]; then
+	DEPEND+=" dev-vcs/fossil"
+
+	src_unpack()
+	{
+		local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+		local repo=${distdir}/fossil/${PN}.fossil
+
+		addwrite "${distdir}"
+
+		if [[ -e "${repo}" ]]; then
+			fossil pull "${FOSSIL_URI}" -R "${repo}" || die
+		else
+			mkdir -p "${distdir}/fossil" || die
+			fossil clone "${FOSSIL_URI}" "${repo}" || die
+		fi
+
+		mkdir -p "${S}" || die
+		cd "${S}" || die
+		fossil open "${repo}" || die
+	}
+fi
+
+PATCHES=(
+"${FILESDIR}"/${P}-arp-conflict.patch
+)
+
+src_configure()
+{
+	local dev hooks rundir
+	use udev || dev="--without-dev --without-udev"
+	hooks="--with-hook=ntp.conf"
+	use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
+	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+	econf \
+		--prefix="${EPREFIX}" \
+		--libexecdir="${EPREFIX}/lib/dhcpcd" \
+		--dbdir="${EPREFIX}/var/lib/dhcpcd" \
+		--localstatedir="${EPREFIX}/var" \
+		${rundir} \
+		$(use_enable embedded) \
+		$(use_enable ipv6) \
+		${dev} \
+		CC="$(tc-getCC)" \
+		${hooks}
+}
+
+src_install()
+{
+	default
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst()
+{
+	# Upgrade the duid file to the new format if needed
+	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local new_duid="${ROOT}"/etc/dhcpcd.duid
+	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
+		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+	fi
+
+	# Move the duid to /etc, a more sensible location
+	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
+		cp -p "${old_duid}" "${new_duid}"
+	fi
+
+	if [ -z "$REPLACING_VERSIONS" ]; then
+		elog
+	 elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-6.11.1-arp-conflict.patch b/net-misc/dhcpcd/files/dhcpcd-6.11.1-arp-conflict.patch
new file mode 100644
index 0000000..ae7da3f
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-6.11.1-arp-conflict.patch
@@ -0,0 +1,61 @@
+Index: ipv4ll.c
+==================================================================
+--- a/ipv4ll.c
++++ b/ipv4ll.c
+@@ -242,31 +242,33 @@
+ 	assert(astate != NULL);
+ 	assert(astate->iface != NULL);
+ 	ifp = astate->iface;
+ 	state = IPV4LL_STATE(ifp);
+ 	assert(state != NULL);
+-	assert(state->addr != NULL);
+ 
+ 	fail = 0;
+ 	/* RFC 3927 2.2.1, Probe Conflict Detection */
+ 	if (amsg == NULL ||
+ 	    (amsg->sip.s_addr == astate->addr.s_addr ||
+ 	    (amsg->sip.s_addr == 0 && amsg->tip.s_addr == astate->addr.s_addr)))
+ 		fail = astate->addr.s_addr;
+ 
+ 	/* RFC 3927 2.5, Conflict Defense */
+-	if (IN_LINKLOCAL(ntohl(state->addr->addr.s_addr)) &&
++	if (state->addr != NULL &&
++	    IN_LINKLOCAL(ntohl(state->addr->addr.s_addr)) &&
+ 	    amsg && amsg->sip.s_addr == state->addr->addr.s_addr)
+ 		fail = state->addr->addr.s_addr;
+ 
+ 	if (fail == 0)
+ 		return;
+ 
+ 	astate->failed.s_addr = fail;
+ 	arp_report_conflicted(astate, amsg);
+ 
+-	if (astate->failed.s_addr == state->addr->addr.s_addr) {
++	if (state->addr != NULL &&
++	    astate->failed.s_addr == state->addr->addr.s_addr)
++	{
+ 		struct timespec now, defend;
+ 
+ 		/* RFC 3927 Section 2.5 says a defence should
+ 		 * broadcast an ARP announcement.
+ 		 * Because the kernel will also unicast a reply to the
+@@ -378,16 +380,18 @@
+ 	astate->conflicted_cb = ipv4ll_conflicted;
+ 	astate->free_cb = ipv4ll_arpfree;
+ 
+ 	/* Find an existing IPv4LL address and ensure we can work with it. */
+ 	ia = ipv4_iffindlladdr(ifp);
++
+ #ifdef IN_IFF_TENTATIVE
+ 	if (ia != NULL && ia->addr_flags & IN_IFF_DUPLICATED) {
+ 		ipv4_deladdr(ia, 0);
+ 		ia = NULL;
+ 	}
+ #endif
++
+ 	if (ia != NULL) {
+ 		astate->addr = ia->addr;
+ #ifdef IN_IFF_TENTATIVE
+ 		if (ia->addr_flags & (IN_IFF_TENTATIVE | IN_IFF_DETACHED)) {
+ 			logger(ifp->ctx, LOG_INFO,
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2019-02-08 19:17 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2019-02-08 19:17 UTC (permalink / raw
  To: gentoo-commits

commit:     2e6db7aca3449f4e15bbe917a0eacbe1859a8dbb
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  8 19:17:28 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Feb  8 19:17:50 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e6db7ac

net-misc/dhcpcd: Revbump to fix USE="-ipv6" build.

Closes: https://bugs.gentoo.org/677508
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...{dhcpcd-7.1.1.ebuild => dhcpcd-7.1.1-r1.ebuild} |  4 ++++
 .../files/dhcpcd-7.1.1-disable_inet6_fix.patch     | 24 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-7.1.1.ebuild b/net-misc/dhcpcd/dhcpcd-7.1.1-r1.ebuild
similarity index 98%
rename from net-misc/dhcpcd/dhcpcd-7.1.1.ebuild
rename to net-misc/dhcpcd/dhcpcd-7.1.1-r1.ebuild
index 48ba26275d0..c8f7876e781 100644
--- a/net-misc/dhcpcd/dhcpcd-7.1.1.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-7.1.1-r1.ebuild
@@ -27,6 +27,10 @@ COMMON_DEPEND="udev? ( virtual/udev )"
 DEPEND="${COMMON_DEPEND}"
 RDEPEND="${COMMON_DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-disable_inet6_fix.patch #677508
+)
+
 src_configure() {
 	local dev hooks=() rundir
 	use udev || dev="--without-dev --without-udev"

diff --git a/net-misc/dhcpcd/files/dhcpcd-7.1.1-disable_inet6_fix.patch b/net-misc/dhcpcd/files/dhcpcd-7.1.1-disable_inet6_fix.patch
new file mode 100644
index 00000000000..2fd3a17428f
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-7.1.1-disable_inet6_fix.patch
@@ -0,0 +1,24 @@
+From 6db54edd1427823dcb3924be78c042915a825fb1 Mon Sep 17 00:00:00 2001
+From: Chris Clayton <chris2553@googlemail.com>
+Date: Fri, 8 Feb 2019 16:35:36 +0000
+Subject: fix build with --disable-inet6
+
+---
+ src/dhcpcd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/dhcpcd.c b/src/dhcpcd.c
+index a2cd04e..6fe60ea 100644
+--- a/src/dhcpcd.c
++++ b/src/dhcpcd.c
+@@ -54,6 +54,7 @@ const char dhcpcd_copyright[] = "Copyright (c) 2006-2019 Roy Marples";
+ #include "dev.h"
+ #include "dhcp-common.h"
+ #include "dhcpcd.h"
++#include "dhcp.h"
+ #include "dhcp6.h"
+ #include "duid.h"
+ #include "eloop.h"
+-- 
+cgit v1.1
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2019-04-26 15:07 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2019-04-26 15:07 UTC (permalink / raw
  To: gentoo-commits

commit:     e9b5b1738178ec8da65c5371a1a9977d593a459d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 26 15:01:47 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 15:07:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b5b173

net-misc/dhcpcd: Security bump to versions 7.1.1-r2 and 7.2.1

Bug: https://bugs.gentoo.org/684430
Package-Manager: Portage-2.3.65, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   1 +
 net-misc/dhcpcd/dhcpcd-7.1.1-r2.ebuild             | 153 +++++++++++++++
 net-misc/dhcpcd/dhcpcd-7.2.1.ebuild                | 148 ++++++++++++++
 net-misc/dhcpcd/files/dhcpcd-7.1.1-overflows.patch | 213 +++++++++++++++++++++
 4 files changed, 515 insertions(+)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 46dec13be6d..1085dcb6737 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -2,3 +2,4 @@ DIST dhcpcd-7.0.1.tar.xz 207908 BLAKE2B 1a9350a0c4a9eb1eb6f5a7be78beb4a5fecd802e
 DIST dhcpcd-7.0.8.tar.xz 210752 BLAKE2B ad8ba622589cc1c8c4bb332470c59527e03c817729f43a5b55b4f53f8ed60f35faaffbff24416f8596e78df8deb304f0598e27d890e9601d36c81250fda99942 SHA512 82cd845eb35670788b8f31b973945460f4c5f1a0a3025e3a452b79230dc30704e129d97140e6aec6d0281e0c89c333c0ce0af03c4767b2e5e66547ed3e071953
 DIST dhcpcd-7.1.1.tar.xz 211788 BLAKE2B 984ec97ffdcb15883f57f9e2a699a7c8f006b2630e7651ab9d55e7a980045f8891f09d9f7be420969203a59671d097a1ed76621fe4a62ff26a5020fc8becfe69 SHA512 8791e718d65ef8ae23a16b98e82824860fa91914e6eb0a42cdbbca28236c1c38005ada44214bde33aac57152fe675debebdb5d141b67dcfc82012996d8337bb4
 DIST dhcpcd-7.2.0.tar.xz 212532 BLAKE2B c8768df8006d517d0082f08c6ceebfe5a31695485d32d477acc1c4b9bfce8541110388f186c2ef94642e0692c279fc6d89239cbd8ac07d6ed248e67721c07db5 SHA512 2ab7df53ed42cd7a274bbc9cfb9dca43a8615d9044c0e9f460c41f064ad012b436bf2fe2648dd2738e66aaefc72412cad6c59444631b650f942cba168127a79d
+DIST dhcpcd-7.2.1.tar.xz 213652 BLAKE2B cae5a68ecf285825e6376c8b5bef5f3aba3bb8a393ba4298d8e990d665dd948369f24f688cdb85006df535b7f9b412c795d8eb7817a92e8d9992bdc7b7757a1e SHA512 11c3ef6d3ee49e147aa44725aa1ac0cddff70a268908439fe91990e135175d063e3d65ab587e1780e4f6f0739cf33873a58ffea0a3130d1bfb5598f9f11ec5a3

diff --git a/net-misc/dhcpcd/dhcpcd-7.1.1-r2.ebuild b/net-misc/dhcpcd/dhcpcd-7.1.1-r2.ebuild
new file mode 100644
index 00000000000..ff35a7a23d7
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-7.1.1-r2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == "9999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://roy.marples.name/git/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-disable_inet6_fix.patch #677508
+	"${FILESDIR}"/${PN}-7.1.1-overflows.patch
+)
+
+src_configure() {
+	local dev hooks=() rundir
+	use udev || dev="--without-dev --without-udev"
+	hooks=( --with-hook=ntp.conf )
+	use elibc_glibc && hooks+=( --with-hook=yp.conf )
+	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+	local myeconfargs=(
+		--prefix="${EPREFIX}"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		${rundir}
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		${dev}
+		CC="$(tc-getCC)"
+		${hooks[@]}
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT%/}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT%/}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT%/}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT%/}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT%/}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/dhcpcd-7.2.1.ebuild b/net-misc/dhcpcd/dhcpcd-7.2.1.ebuild
new file mode 100644
index 00000000000..48ba26275d0
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-7.2.1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == "9999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://roy.marples.name/git/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+src_configure() {
+	local dev hooks=() rundir
+	use udev || dev="--without-dev --without-udev"
+	hooks=( --with-hook=ntp.conf )
+	use elibc_glibc && hooks+=( --with-hook=yp.conf )
+	use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+	local myeconfargs=(
+		--prefix="${EPREFIX}"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		${rundir}
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		${dev}
+		CC="$(tc-getCC)"
+		${hooks[@]}
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT%/}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT%/}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT%/}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT%/}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT%/}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-7.1.1-overflows.patch b/net-misc/dhcpcd/files/dhcpcd-7.1.1-overflows.patch
new file mode 100644
index 00000000000..6ec780936a8
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-7.1.1-overflows.patch
@@ -0,0 +1,213 @@
+https://roy.marples.name/git/dhcpcd.git/patch/?id=23525884a346ed81c808c1ed90e3c56a8bf0cc68
+
+From 8d11b33f6c60e2db257130fa383ba76b6018bcf6 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 19 Apr 2019 09:45:02 +0100
+Subject: DHCPv6: Fix a potential buffer overflow reading NA/TA addresses
+
+Only copy upto the size of the address option rather than the
+option length.
+
+Found by Maxime Villard <max@m00nbsd.net>
+---
+ src/dhcp6.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dhcp6.c b/src/dhcp6.c
+index 99a452b..8fc4f00 100644
+--- a/src/dhcp6.c
++++ b/src/dhcp6.c
+@@ -2029,12 +2029,12 @@ dhcp6_findna(struct interface *ifp, uint16_t ot, const uint8_t *iaid,
+ 		nd = o + ol;
+ 		l -= (size_t)(nd - d);
+ 		d = nd;
+-		if (ol < 24) {
++		if (ol < sizeof(ia)) {
+ 			errno = EINVAL;
+ 			logerrx("%s: IA Address option truncated", ifp->name);
+ 			continue;
+ 		}
+-		memcpy(&ia, o, ol);
++		memcpy(&ia, o, sizeof(ia));
+ 		ia.pltime = ntohl(ia.pltime);
+ 		ia.vltime = ntohl(ia.vltime);
+ 		/* RFC 3315 22.6 */
+-- 
+cgit v1.1
+
+
+From 4b67f6f1038fd4ad5ca7734eaaeba1b2ec4816b8 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 19 Apr 2019 21:00:19 +0100
+Subject: DHCP: Fix a potential 1 byte read overflow with DHO_OPTSOVERLOADED
+
+This fix basically moves the option length check up and also
+corrects an off by one error with it.
+
+Thanks to Maxime Villard <max@m00nbsd.net>
+---
+ src/dhcp.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/dhcp.c b/src/dhcp.c
+index f7cdefc..e13d1b4 100644
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -215,6 +215,12 @@ get_option(struct dhcpcd_ctx *ctx,
+ 		}
+ 		l = *p++;
+ 
++		/* Check we can read the option data, if present */
++		if (p + l > e) {
++			errno = EINVAL;
++			return NULL;
++		}
++
+ 		if (o == DHO_OPTSOVERLOADED) {
+ 			/* Ensure we only get this option once by setting
+ 			 * the last bit as well as the value.
+@@ -249,10 +255,6 @@ get_option(struct dhcpcd_ctx *ctx,
+ 				bp += ol;
+ 			}
+ 			ol = l;
+-			if (p + ol >= e) {
+-				errno = EINVAL;
+-				return NULL;
+-			}
+ 			op = p;
+ 			bl += ol;
+ 		}
+-- 
+cgit v1.1
+
+
+From 7121040790b611ca3fbc400a1bbcd4364ef57233 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 19 Apr 2019 21:40:14 +0100
+Subject: auth: Use consttime_memequal(3) to compare hashes
+
+This stops any attacker from trying to infer secrets from latency.
+
+Thanks to Maxime Villard <max@m00nbsd.net>
+---
+ src/auth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/auth.c b/src/auth.c
+index 9e24998..ce97051 100644
+--- a/src/auth.c
++++ b/src/auth.c
+@@ -354,7 +354,7 @@ gottoken:
+ 	}
+ 
+ 	free(mm);
+-	if (memcmp(d, &hmac_code, dlen)) {
++	if (!consttime_memequal(d, &hmac_code, dlen)) {
+ 		errno = EPERM;
+ 		return NULL;
+ 	}
+-- 
+cgit v1.1
+
+
+From cfde89ab66cb4e5957b1c4b68ad6a9449e2784da Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 19 Apr 2019 21:42:07 +0100
+Subject: compat: Provide consttime_memequal if not in libc
+
+Public domain version by Matthias Drochner <drochner@netbsd.org>
+---
+ configure | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/configure b/configure
+index 570e65f..4f58f0f 100755
+--- a/configure
++++ b/configure
+@@ -13,6 +13,7 @@ IPV4LL=
+ INET6=
+ ARC4RANDOM=
+ CLOSEFROM=
++CONSTTIME_MEMEQUAL=
+ STRLCPY=
+ UDEV=
+ OS=
+@@ -846,6 +847,27 @@ if [ "$STRTOI" = no ]; then
+ 	echo "#include			\"compat/strtoi.h\"" >>$CONFIG_H
+ fi
+ 
++if [ -z "$CONSTTIME_MEMEQUAL" ]; then
++	printf "Testing for consttime_memequal ... "
++	cat <<EOF >_consttime_memequal.c
++#include <string.h>
++int main(void) {
++	return consttime_memequal("deadbeef", "deadbeef", 8);
++}
++EOF
++	if $XCC _consttime_memequal.c -o _consttime_memequal 2>&3; then
++		CONSTTIME_MEMEQUAL=yes
++	else
++		CONSTTIME_MEMEQUAL=no
++	fi
++	echo "$CONSTTIME_MEMEQUAL"
++	rm -f _consttime_memequal.c _consttime_memequal
++fi
++if [ "$CONSTTIME_MEMEQUAL" = no ]; then
++	echo "#include			\"compat/consttime_memequal.h\"" \
++	    >>$CONFIG_H
++fi
++
+ if [ -z "$DPRINTF" ]; then
+ 	printf "Testing for dprintf ... "
+ 	cat <<EOF >_dprintf.c
+-- 
+cgit v1.1
+
+
+From aee631aadeef4283c8a749c1caf77823304acf5e Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 19 Apr 2019 21:47:37 +0100
+Subject: Really add consttime_memequal
+
+---
+ compat/consttime_memequal.h | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+ create mode 100644 compat/consttime_memequal.h
+
+diff --git a/compat/consttime_memequal.h b/compat/consttime_memequal.h
+new file mode 100644
+index 0000000..9830648
+--- /dev/null
++++ b/compat/consttime_memequal.h
+@@ -0,0 +1,28 @@
++/*
++ * Written by Matthias Drochner <drochner@NetBSD.org>.
++ * Public domain.
++ */
++
++#ifndef CONSTTIME_MEMEQUAL_H
++#define CONSTTIME_MEMEQUAL_H
++inline static int
++consttime_memequal(const void *b1, const void *b2, size_t len)
++{
++	const unsigned char *c1 = b1, *c2 = b2;
++	unsigned int res = 0;
++
++	while (len--)
++		res |= *c1++ ^ *c2++;
++
++	/*
++	 * Map 0 to 1 and [1, 256) to 0 using only constant-time
++	 * arithmetic.
++	 *
++	 * This is not simply `!res' because although many CPUs support
++	 * branchless conditional moves and many compilers will take
++	 * advantage of them, certain compilers generate branches on
++	 * certain CPUs for `!res'.
++	 */
++	return (1 & ((res - 1) >> 8));
++}
++#endif /* CONSTTIME_MEMEQUAL_H */
+-- 
+cgit v1.1
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2019-07-28 12:08 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2019-07-28 12:08 UTC (permalink / raw
  To: gentoo-commits

commit:     6cae10d027eea537089030d23fdfce63c4206952
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 28 12:07:47 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Jul 28 12:07:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cae10d0

net-misc/dhcpcd: Revbump to add two upstream fixes

- script: ensure that tmp files are removed
- configure: Fix test for open_memstream

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...{dhcpcd-8.0.1.ebuild => dhcpcd-8.0.1-r1.ebuild} |  5 ++++
 .../files/dhcpcd-8.0.1-delete_tmpfiles.patch       | 34 ++++++++++++++++++++++
 ...dhcpcd-8.0.1-fix_check_for_open_memstream.patch | 27 +++++++++++++++++
 3 files changed, 66 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-8.0.1.ebuild b/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
similarity index 97%
rename from net-misc/dhcpcd/dhcpcd-8.0.1.ebuild
rename to net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
index 491c778680e..6f8f030328e 100644
--- a/net-misc/dhcpcd/dhcpcd-8.0.1.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
@@ -27,6 +27,11 @@ COMMON_DEPEND="udev? ( virtual/udev )"
 DEPEND="${COMMON_DEPEND}"
 RDEPEND="${COMMON_DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${P}-delete_tmpfiles.patch"
+	"${FILESDIR}/${P}-fix_check_for_open_memstream.patch"
+)
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
new file mode 100644
index 00000000000..0bc625ac11d
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
@@ -0,0 +1,34 @@
+From 79846b358f6ea8d0a6027ee0ba38342a730065b0 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 28 Jul 2019 11:49:17 +0100
+Subject: script: ensure that tmp files are removed
+
+fopen creates a new stream which will use a new fd.
+Why using fdopen, the new stream will use the same fd, so when
+it's closed the tmp file will really unlink.
+---
+ src/script.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/script.c b/src/script.c
+index 1863a661..74aef1b1 100644
+--- a/src/script.c
++++ b/src/script.c
+@@ -213,10 +213,11 @@ make_env(const struct interface *ifp, const char *reason)
+ 	if (tmpfd == -1)
+ 		goto eexit;
+ 	unlink(tmpfile);
+-	fp = fopen(tmpfile, "w+");
+-	close(tmpfd);
+-	if (fp == NULL)
++	fp = fdopen(tmpfd, "w+");
++	if (fp == NULL) {
++		close(tmpfd);
+ 		goto eexit;
++	}
+ #endif
+ 
+ #ifdef INET
+-- 
+cgit v1.2.1
+

diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
new file mode 100644
index 00000000000..89ed2afa987
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
@@ -0,0 +1,27 @@
+From fa7f0d1e0a57bfaca49e1cfdc3d292ef1d68001a Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 28 Jul 2019 12:53:03 +0100
+Subject: configure: Fix test for open_memstream
+
+glibc-2.19 needs the return value testing....
+---
+ configure | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index d25eec56..50058520 100755
+--- a/configure
++++ b/configure
+@@ -747,8 +747,7 @@ if [ -z "$OPEN_MEMSTREAM" ]; then
+ 	cat <<EOF >_open_memstream.c
+ #include <stdio.h>
+ int main(void) {
+-	open_memstream(NULL, NULL);
+-	return 0;
++	return open_memstream(NULL, NULL) != NULL ? 0 : 1;
+ }
+ EOF
+ 	if $XCC _open_memstream.c -o _open_memstream 2>&3; then
+-- 
+cgit v1.2.1
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2019-07-30 19:42 William Hubbs
  0 siblings, 0 replies; 14+ messages in thread
From: William Hubbs @ 2019-07-30 19:42 UTC (permalink / raw
  To: gentoo-commits

commit:     6d085720407f032e08f01c9e4bb3f576dc3d461c
Author:     William Hubbs <william.hubbs <AT> sony <DOT> com>
AuthorDate: Tue Jul 30 19:39:00 2019 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 19:41:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d085720

net-misc/dhcpcd: remove broken 8.0.1 release

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   1 -
 net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild             | 149 ---------------------
 .../files/dhcpcd-8.0.1-delete_tmpfiles.patch       |  34 -----
 ...dhcpcd-8.0.1-fix_check_for_open_memstream.patch |  27 ----
 4 files changed, 211 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index d1db7a60e3a..d2ab3bc59dd 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,3 +1,2 @@
 DIST dhcpcd-7.2.3.tar.xz 213552 BLAKE2B 5f89e11424b85702b05da6207ec346480c029de1416cc8892471de428ca0a4395a8915700e2237bfa2b133648973bc2a7c7d15aa2d0ba492f96fbf3908d7f613 SHA512 271cca422fad10eaf842acfd5b590c0ad537f5f23ee919a3928d8ad98463ab03bde21c0bc08741ea9618ee31095160a7c00066155eae2c74b17c49af65ba566f
-DIST dhcpcd-8.0.1.tar.xz 221716 BLAKE2B 597831ed9a965170d0dc9ffdaa8ab34e209b14fa6183ed7a0b915f545d654db32d0994eb9e6f12953f5b81220abfc186ac72da1cd3e60f8b0cdee21da4be56dd SHA512 2931345fb50b63a49ee97b290dbb236895dd13a19ce17bf40b50797cf93ea959272de698718593f882ba0c35e2f733b5476135759f46bd04a8e8f11e81ba9f3f
 DIST dhcpcd-8.0.2.tar.xz 222408 BLAKE2B fb27a33cd64c7aeedb28e05c885c860618d923ac857895b9fdc7daa608f433587bea1e6630fd9897426b371a45b8a336e1edaa804d76eda6e9fc2adc1411aed2 SHA512 a6e3aa66800adc8b209324bae02a6e373e2623735bf0695ffec4a7c972d65c3498f55e4da62f93df0bc6cddb4bee8ab667b3743b5b25cd5f4cc9da4d1f8e15c4

diff --git a/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild b/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
deleted file mode 100644
index 2c0d5a53ff0..00000000000
--- a/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd toolchain-funcs
-
-if [[ ${PV} == "9999" ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://roy.marples.name/git/dhcpcd.git"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-delete_tmpfiles.patch"
-	"${FILESDIR}/${P}-fix_check_for_open_memstream.patch"
-)
-
-src_configure() {
-	local myeconfargs=(
-		--dbdir="${EPREFIX}/var/lib/dhcpcd"
-		--libexecdir="${EPREFIX}/lib/dhcpcd"
-		--localstatedir="${EPREFIX}/var"
-		--prefix="${EPREFIX}"
-		--with-hook=ntp.conf
-		$(use_enable embedded)
-		$(use_enable ipv6)
-		$(usex elibc_glibc '--with-hook=yp.conf' '')
-		$(usex kernel_linux '--rundir=${EPREFIX}/run' '')
-		$(usex udev '' '--without-dev --without-udev')
-		CC="$(tc-getCC)"
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	keepdir /var/lib/dhcpcd
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
-}
-
-pkg_postinst() {
-	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
-
-	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local old_duid="${EROOT}"/etc/dhcpcd.duid
-	local new_duid="${dbdir}"/duid
-	if [[ -e "${old_old_duid}" ]] ; then
-		# Upgrade the duid file to the new format if needed
-		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
-			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
-		fi
-
-		# Move the duid to /etc, a more sensible location
-		if [[ ! -e "${old_duid}" ]] ; then
-			cp -p "${old_old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_old_duid}" )
-	fi
-
-	# dhcpcd-7 moves the files out of /etc
-	if [[ -e "${old_duid}" ]] ; then
-		if [[ ! -e "${new_duid}" ]] ; then
-			cp -p "${old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_duid}" )
-	fi
-	local old_secret="${EROOT}"/etc/dhcpcd.secret
-	local new_secret="${dbdir}"/secret
-	if [[ -e "${old_secret}" ]] ; then
-		if [[ ! -e "${new_secret}" ]] ; then
-			cp -p "${old_secret}" "${new_secret}"
-		fi
-		old_files+=( "${old_secret}" )
-	fi
-
-	# dhcpcd-7 renames some files in /var/lib/dhcpcd
-	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
-	local new_rdm="${dbdir}"/rdm_monotonic
-	if [[ -e "${old_rdm}" ]] ; then
-		if [[ ! -e "${new_rdm}" ]] ; then
-			cp -p "${old_rdm}" "${new_rdm}"
-		fi
-		old_files+=( "${old_rdm}" )
-	fi
-	local lease=
-	for lease in "${dbdir}"/dhcpcd-*.lease*; do
-		[[ -f "${lease}" ]] || continue
-		old_files+=( "${lease}" )
-		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
-		[[ -e "${dbdir}/${new_lease}" ]] && continue
-		cp "${lease}" "${dbdir}/${new_lease}"
-	done
-
-	# Warn about removing stale files
-	if [[ -n "${old_files[@]}" ]] ; then
-		elog
-		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
-		elog "${EROOT}/etc to ${dbdir}"
-		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
-		elog "prefix dropped."
-		elog
-		elog "You should remove these files if you don't plan on reverting"
-		elog "to an older version:"
-		local old_file=
-		for old_file in ${old_files[@]}; do
-			elog "	${old_file}"
-		done
-	fi
-
-	if [ -z "${REPLACING_VERSIONS}" ]; then
-		elog
-		elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
deleted file mode 100644
index 0bc625ac11d..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 79846b358f6ea8d0a6027ee0ba38342a730065b0 Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Sun, 28 Jul 2019 11:49:17 +0100
-Subject: script: ensure that tmp files are removed
-
-fopen creates a new stream which will use a new fd.
-Why using fdopen, the new stream will use the same fd, so when
-it's closed the tmp file will really unlink.
----
- src/script.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/script.c b/src/script.c
-index 1863a661..74aef1b1 100644
---- a/src/script.c
-+++ b/src/script.c
-@@ -213,10 +213,11 @@ make_env(const struct interface *ifp, const char *reason)
- 	if (tmpfd == -1)
- 		goto eexit;
- 	unlink(tmpfile);
--	fp = fopen(tmpfile, "w+");
--	close(tmpfd);
--	if (fp == NULL)
-+	fp = fdopen(tmpfd, "w+");
-+	if (fp == NULL) {
-+		close(tmpfd);
- 		goto eexit;
-+	}
- #endif
- 
- #ifdef INET
--- 
-cgit v1.2.1
-

diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
deleted file mode 100644
index 89ed2afa987..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From fa7f0d1e0a57bfaca49e1cfdc3d292ef1d68001a Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Sun, 28 Jul 2019 12:53:03 +0100
-Subject: configure: Fix test for open_memstream
-
-glibc-2.19 needs the return value testing....
----
- configure | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index d25eec56..50058520 100755
---- a/configure
-+++ b/configure
-@@ -747,8 +747,7 @@ if [ -z "$OPEN_MEMSTREAM" ]; then
- 	cat <<EOF >_open_memstream.c
- #include <stdio.h>
- int main(void) {
--	open_memstream(NULL, NULL);
--	return 0;
-+	return open_memstream(NULL, NULL) != NULL ? 0 : 1;
- }
- EOF
- 	if $XCC _open_memstream.c -o _open_memstream 2>&3; then
--- 
-cgit v1.2.1
-


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2019-08-09 15:17 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2019-08-09 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     2ce3a8e57adc2ea9389c35301ce081ab89b42931
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  9 15:16:40 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Aug  9 15:17:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ce3a8e5

net-misc/dhcpcd: Revbump to fix incorrect string termination

Bug: https://bugs.gentoo.org/691426
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...{dhcpcd-8.0.2.ebuild => dhcpcd-8.0.2-r1.ebuild} |  4 ++
 .../files/dhcpcd-8.0.2-string_termination.patch    | 80 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-8.0.2.ebuild b/net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild
similarity index 98%
rename from net-misc/dhcpcd/dhcpcd-8.0.2.ebuild
rename to net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild
index d8940210a7b..1696c38dcf7 100644
--- a/net-misc/dhcpcd/dhcpcd-8.0.2.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild
@@ -27,6 +27,10 @@ COMMON_DEPEND="udev? ( virtual/udev )"
 DEPEND="${COMMON_DEPEND}"
 RDEPEND="${COMMON_DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-string_termination.patch #691426
+)
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.2-string_termination.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.2-string_termination.patch
new file mode 100644
index 00000000000..a1bc19ec974
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-8.0.2-string_termination.patch
@@ -0,0 +1,80 @@
+https://bugs.gentoo.org/691426
+
+diff --git a/src/dhcp-common.c b/src/dhcp-common.c
+index 08ab9493..9f556557 100644
+--- a/src/dhcp-common.c
++++ b/src/dhcp-common.c
+@@ -645,14 +645,16 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
+ 	if (fputc('=', fp) == EOF)
+ 		return -1;
+ 	if (dl == 0)
+-		return 1;
++		goto out;
+ 
+ 	if (opt->type & OT_RFC1035) {
+ 		char domain[NS_MAXDNAME];
+ 
+ 		sl = decode_rfc1035(domain, sizeof(domain), data, dl);
+-		if (sl == 0 || sl == -1)
+-			return sl;
++		if (sl == -1)
++			return -1;
++		if (sl == 0)
++			goto out;
+ 		if (valid_domainname(domain, opt->type) == -1)
+ 			return -1;
+ 		return efprintf(fp, "%s", domain);
+@@ -693,9 +695,7 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
+ 					return -1;
+ 			}
+ 		}
+-		if (fputc('\0', fp) == EOF)
+-			return -1;
+-		return 1;
++		goto out;
+ 	}
+ 
+ 	t = data;
+@@ -760,6 +760,7 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
+ 		}
+ 	}
+ 
++out:
+ 	if (fputc('\0', fp) == EOF)
+ 		return -1;
+ 	return 1;
+diff --git a/src/script.c b/src/script.c
+index 74aef1b1..3dee7b08 100644
+--- a/src/script.c
++++ b/src/script.c
+@@ -33,6 +33,7 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
++#include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <signal.h>
+@@ -477,12 +478,21 @@ dumplease:
+ 	fp = NULL;
+ #endif
+ 
++	/* Count the terminated env strings.
++	 * assert that the terminations are correct. */
+ 	nenv = 0;
+ 	endp = buf + buf_pos;
+ 	for (bufp = buf; bufp < endp; bufp++) {
+-		if (*bufp == '\0')
++		if (*bufp == '\0') {
++#ifndef NDEBUG
++			if (bufp + 1 < endp)
++				assert(*(bufp + 1) != '\0');
++#endif
+ 			nenv++;
++		}
+ 	}
++	assert(*--bufp == '\0');
++
+ 	if (ctx->script_envlen < nenv) {
+ 		env = reallocarray(ctx->script_env, nenv + 1, sizeof(*env));
+ 		if (env == NULL)


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2020-06-04 18:30 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2020-06-04 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     34e494731671efa4def6966fe2b79c7fb9ae7f39
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  4 18:22:59 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jun  4 18:30:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e49473

net-misc/dhcpcd: Bump to version 9.1.1

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                          |   1 +
 net-misc/dhcpcd/dhcpcd-9.1.1.ebuild               | 157 ++++++++++++++++++++++
 net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch |  11 ++
 3 files changed, 169 insertions(+)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 85739031ba9..b10a0ca38e3 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -4,3 +4,4 @@ DIST dhcpcd-8.1.7.tar.xz 230308 BLAKE2B 636daad77885b7f00f34c73413db4a0269bca844
 DIST dhcpcd-8.1.9.tar.xz 230288 BLAKE2B 5606ddfce37c67ac3d60257104fcf15bd7da65021b2c1261a45958b628cd066ccd9bc6b60bbb42f8280fcbbf9d4b1c7666b993c37f150b27ef2a0527a0fd5b96 SHA512 40ac106ffca60b32362aacdfae0fa3a2993a3eed72bf452322412a912f594aaade1c24b862233455033158a6e453ec75d6d14fa52df6b4c5ae435dd6ceb29f2a
 DIST dhcpcd-9.0.1.tar.xz 244816 BLAKE2B 1cb346f7578dadb237d05056a8f6e39b30da831e253e6629c5c19e6a70f7b6d8ffcb6db37d0f720fda28577e8cb4227cbca8a08fac0c977098f66b2a430d9ffe SHA512 dea153c9a2f4a9d9c983bf50d8c18b544d7dbe1a2972ccc8eb33bbbc8b09178b39bdb9a38cc293db7861024509ccd475e11d84004bc4cd45947786f5e10db0a3
 DIST dhcpcd-9.0.2.tar.xz 244800 BLAKE2B d0c355141aa1e57715c30b2902eed7e2821f2c08fdc97497c9dc271689faf2ca22e3f50f17e6c7ae8fe4434d5c216572a42e1abf789287495e6db44f671d5085 SHA512 2a606bff2e96d1da5d3642ac68341c14b378d9a905cba364ab42eba1285604f8be56b9efeff3eee18d89b71f0f9f3b05cb7b88e8fce568baf1c0d1e5d3becb5f
+DIST dhcpcd-9.1.1.tar.xz 246084 BLAKE2B 35acaabb32e6a5b227071376e8a0387cadb776ee94a8b7f92c181440ef72bf60e9867e901347a139e4ce036c85913fa85e61d3c401c8a9f57e81dff76465ccab SHA512 7b1eb052293218e9b52f7ff40768eaa9db832979ffa8e4ba4724ce98bac9e9c809505b40aaebd4cf13192d0b30f2e963d34ca3b9c1e05458e86e11d06e1cbed8

diff --git a/net-misc/dhcpcd/dhcpcd-9.1.1.ebuild b/net-misc/dhcpcd/dhcpcd-9.1.1.ebuild
new file mode 100644
index 00000000000..c4339429d80
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-9.1.1.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == "9999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://roy.marples.name/cgit/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="debug elibc_glibc +embedded ipv6 kernel_linux privsep +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="
+	${COMMON_DEPEND}
+	privsep? (
+		acct-group/dhcpcd
+		acct-user/dhcpcd
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-typo_fix.patch"
+)
+
+src_configure() {
+	local myeconfargs=(
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		--prefix="${EPREFIX}"
+		--with-hook=ntp.conf
+		$(use_enable debug)
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		$(use_enable privsep)
+		$(usex elibc_glibc '--with-hook=yp.conf' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
+		$(usex privsep '--privsepuser=dhcpcd' '')
+		$(usex udev '' '--without-dev --without-udev')
+		CC="$(tc-getCC)"
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch b/net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch
new file mode 100644
index 00000000000..0d97b7f8275
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch
@@ -0,0 +1,11 @@
+--- dhcpcd-9.1.1/src/if-options.c
++++ dhcpcd-9.1.1/src/if-options.c
+@@ -2367,7 +2367,7 @@
+ 		}
+ 		if (buf[buflen - 1] != '\0') {
+ 			if (buflen < sizeof(buf) - 1)
+-				bulen++;
++				buflen++;
+ 			buf[buflen - 1] = '\0';
+ 		}
+ #else


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2020-06-15 21:10 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2020-06-15 21:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6b9ec0075f48c4e6e1a89b1ca7420d1147b33aba
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 15 21:09:55 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jun 15 21:10:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b9ec007

net-misc/dhcpcd: Bump to version 9.1.2

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   1 +
 net-misc/dhcpcd/dhcpcd-9.1.2.ebuild                | 157 +++++++++++++++++++++
 .../files/dhcpcd-9.1.2-embedded_config.patch       |  49 +++++++
 3 files changed, 207 insertions(+)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 9e596f87306..ef2bf485eb8 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,3 +1,4 @@
 DIST dhcpcd-8.1.9.tar.xz 230288 BLAKE2B 5606ddfce37c67ac3d60257104fcf15bd7da65021b2c1261a45958b628cd066ccd9bc6b60bbb42f8280fcbbf9d4b1c7666b993c37f150b27ef2a0527a0fd5b96 SHA512 40ac106ffca60b32362aacdfae0fa3a2993a3eed72bf452322412a912f594aaade1c24b862233455033158a6e453ec75d6d14fa52df6b4c5ae435dd6ceb29f2a
 DIST dhcpcd-9.0.2.tar.xz 244800 BLAKE2B d0c355141aa1e57715c30b2902eed7e2821f2c08fdc97497c9dc271689faf2ca22e3f50f17e6c7ae8fe4434d5c216572a42e1abf789287495e6db44f671d5085 SHA512 2a606bff2e96d1da5d3642ac68341c14b378d9a905cba364ab42eba1285604f8be56b9efeff3eee18d89b71f0f9f3b05cb7b88e8fce568baf1c0d1e5d3becb5f
 DIST dhcpcd-9.1.1.tar.xz 246084 BLAKE2B 35acaabb32e6a5b227071376e8a0387cadb776ee94a8b7f92c181440ef72bf60e9867e901347a139e4ce036c85913fa85e61d3c401c8a9f57e81dff76465ccab SHA512 7b1eb052293218e9b52f7ff40768eaa9db832979ffa8e4ba4724ce98bac9e9c809505b40aaebd4cf13192d0b30f2e963d34ca3b9c1e05458e86e11d06e1cbed8
+DIST dhcpcd-9.1.2.tar.xz 248552 BLAKE2B b7330da009bc0b906593b60db6af20a75ad49d21e1852514bad7bc6034246df8080372f2c4ffcdbbb0cd9122b2f48614159a1b0f2629584e8b2d2ed0f366ee2b SHA512 0db9a509dbd8ea8e24bf4a45780433107708d0ea42b28cd63b9828f55e0182670286f5cb678d96d7f626d8a6e404693f7f43e62ac5608d5f61b5e80de4afb965

diff --git a/net-misc/dhcpcd/dhcpcd-9.1.2.ebuild b/net-misc/dhcpcd/dhcpcd-9.1.2.ebuild
new file mode 100644
index 00000000000..0942b0cd043
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-9.1.2.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == "9999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://roy.marples.name/cgit/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="debug elibc_glibc +embedded ipv6 kernel_linux privsep +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="
+	${COMMON_DEPEND}
+	privsep? (
+		acct-group/dhcpcd
+		acct-user/dhcpcd
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-embedded_config.patch"
+)
+
+src_configure() {
+	local myeconfargs=(
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		--prefix="${EPREFIX}"
+		--with-hook=ntp.conf
+		$(use_enable debug)
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		$(use_enable privsep)
+		$(usex elibc_glibc '--with-hook=yp.conf' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
+		$(usex privsep '--privsepuser=dhcpcd' '')
+		$(usex udev '' '--without-dev --without-udev')
+		CC="$(tc-getCC)"
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch b/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch
new file mode 100644
index 00000000000..5401317a2ec
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch
@@ -0,0 +1,49 @@
+From 9dc6d4b7c8df8425c9b1e893e86b8463abb2053c Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Mon, 15 Jun 2020 22:04:37 +0100
+Subject: configure: Fix fallout with disabling embedded config
+
+---
+ configure | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/configure b/configure
+index 8398ad69..a3701726 100755
+--- a/configure
++++ b/configure
+@@ -545,15 +545,6 @@ if [ -z "$AUTH" -o "$AUTH" = yes ]; then
+ 	echo "SRCS+=		auth.c" >>$CONFIG_MK
+ fi
+ 
+-if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
+-	echo "$DHCPCD_DEFS will be embedded in dhcpcd itself"
+-	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
+-else
+-	echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR"
+-	echo "CPPFLAGS+=	-DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK
+-	echo "EMBEDDEDINSTALL=	_embeddedinstall" >>$CONFIG_MK
+-fi
+-
+ if [ -z "$PRIVSEP" ]; then
+ 	# privilege separation works fine .... except on Solaris
+ 	case "$OS" in
+@@ -665,6 +656,16 @@ EOF
+         rm -f _pledge.c _pledge
+ fi
+ 
++# This block needs to be after the compiler test due to embedded quotes.
++if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
++	echo "$DHCPCD_DEFS will be embedded in dhcpcd itself"
++	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
++else
++	echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR"
++	echo "CPPFLAGS+=	-DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK
++	echo "EMBEDDEDINSTALL=	_embeddedinstall" >>$CONFIG_MK
++fi
++
+ if [ "$OS" = linux ]; then
+ 	printf "Testing for nl80211 ... "
+ 	cat <<EOF >_nl80211.c
+-- 
+cgit v1.2.3
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2020-06-18 16:48 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2020-06-18 16:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c128ffebe9592a0781b4699bf4dc730ed9a08732
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 18 16:48:38 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jun 18 16:48:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c128ffeb

net-misc/dhcpcd: Removed old

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   2 -
 net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild             | 173 ---------------------
 net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild             | 157 -------------------
 .../files/dhcpcd-9.1.1-embedded_config.patch       |  43 -----
 4 files changed, 375 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index ef2bf485eb8..af686570e28 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,4 +1,2 @@
 DIST dhcpcd-8.1.9.tar.xz 230288 BLAKE2B 5606ddfce37c67ac3d60257104fcf15bd7da65021b2c1261a45958b628cd066ccd9bc6b60bbb42f8280fcbbf9d4b1c7666b993c37f150b27ef2a0527a0fd5b96 SHA512 40ac106ffca60b32362aacdfae0fa3a2993a3eed72bf452322412a912f594aaade1c24b862233455033158a6e453ec75d6d14fa52df6b4c5ae435dd6ceb29f2a
-DIST dhcpcd-9.0.2.tar.xz 244800 BLAKE2B d0c355141aa1e57715c30b2902eed7e2821f2c08fdc97497c9dc271689faf2ca22e3f50f17e6c7ae8fe4434d5c216572a42e1abf789287495e6db44f671d5085 SHA512 2a606bff2e96d1da5d3642ac68341c14b378d9a905cba364ab42eba1285604f8be56b9efeff3eee18d89b71f0f9f3b05cb7b88e8fce568baf1c0d1e5d3becb5f
-DIST dhcpcd-9.1.1.tar.xz 246084 BLAKE2B 35acaabb32e6a5b227071376e8a0387cadb776ee94a8b7f92c181440ef72bf60e9867e901347a139e4ce036c85913fa85e61d3c401c8a9f57e81dff76465ccab SHA512 7b1eb052293218e9b52f7ff40768eaa9db832979ffa8e4ba4724ce98bac9e9c809505b40aaebd4cf13192d0b30f2e963d34ca3b9c1e05458e86e11d06e1cbed8
 DIST dhcpcd-9.1.2.tar.xz 248552 BLAKE2B b7330da009bc0b906593b60db6af20a75ad49d21e1852514bad7bc6034246df8080372f2c4ffcdbbb0cd9122b2f48614159a1b0f2629584e8b2d2ed0f366ee2b SHA512 0db9a509dbd8ea8e24bf4a45780433107708d0ea42b28cd63b9828f55e0182670286f5cb678d96d7f626d8a6e404693f7f43e62ac5608d5f61b5e80de4afb965

diff --git a/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
deleted file mode 100644
index ac18c5907ad..00000000000
--- a/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd toolchain-funcs
-
-if [[ ${PV} == "9999" ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://roy.marples.name/cgit/dhcpcd.git"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="debug elibc_glibc +embedded ipv6 kernel_linux +privsep +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="
-	${COMMON_DEPEND}
-	privsep? (
-		acct-group/dhcpcd
-		acct-user/dhcpcd
-	)
-"
-
-src_configure() {
-	local myeconfargs=(
-		--dbdir="${EPREFIX}/var/lib/dhcpcd"
-		--libexecdir="${EPREFIX}/lib/dhcpcd"
-		--localstatedir="${EPREFIX}/var"
-		--prefix="${EPREFIX}"
-		--with-hook=ntp.conf
-		$(use_enable debug)
-		$(use_enable embedded)
-		$(use_enable ipv6)
-		$(use_enable privsep)
-		$(usex elibc_glibc '--with-hook=yp.conf' '')
-		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
-		$(usex privsep '--privsepuser=dhcpcd' '')
-		$(usex udev '' '--without-dev --without-udev')
-		CC="$(tc-getCC)"
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	keepdir /var/lib/dhcpcd
-	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
-	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
-}
-
-pkg_postinst() {
-	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
-
-	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local old_duid="${EROOT}"/etc/dhcpcd.duid
-	local new_duid="${dbdir}"/duid
-	if [[ -e "${old_old_duid}" ]] ; then
-		# Upgrade the duid file to the new format if needed
-		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
-			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
-		fi
-
-		# Move the duid to /etc, a more sensible location
-		if [[ ! -e "${old_duid}" ]] ; then
-			cp -p "${old_old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_old_duid}" )
-	fi
-
-	# dhcpcd-7 moves the files out of /etc
-	if [[ -e "${old_duid}" ]] ; then
-		if [[ ! -e "${new_duid}" ]] ; then
-			cp -p "${old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_duid}" )
-	fi
-	local old_secret="${EROOT}"/etc/dhcpcd.secret
-	local new_secret="${dbdir}"/secret
-	if [[ -e "${old_secret}" ]] ; then
-		if [[ ! -e "${new_secret}" ]] ; then
-			cp -p "${old_secret}" "${new_secret}"
-		fi
-		old_files+=( "${old_secret}" )
-	fi
-
-	# dhcpcd-7 renames some files in /var/lib/dhcpcd
-	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
-	local new_rdm="${dbdir}"/rdm_monotonic
-	if [[ -e "${old_rdm}" ]] ; then
-		if [[ ! -e "${new_rdm}" ]] ; then
-			cp -p "${old_rdm}" "${new_rdm}"
-		fi
-		old_files+=( "${old_rdm}" )
-	fi
-	local lease=
-	for lease in "${dbdir}"/dhcpcd-*.lease*; do
-		[[ -f "${lease}" ]] || continue
-		old_files+=( "${lease}" )
-		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
-		[[ -e "${dbdir}/${new_lease}" ]] && continue
-		cp "${lease}" "${dbdir}/${new_lease}"
-	done
-
-	# dhcpcd-9 introduced privesep support in a chroot
-	if use privsep ; then
-		local dhcpcd_libdir="/var/lib/dhcpcd"
-		local chroot_base="${EROOT}/var/chroot/dhcpcd"
-		local chroot_dir="${chroot_base}${dhcpcd_libdir}"
-		local chroot_retval=0
-		# Set up proper chroot.
-		if [[ ! -e "${chroot_dir}" ]] ; then
-			mkdir -p "${chroot_dir}" || chroot_retval=1
-			cp -a "${EROOT}${dhcpcd_libdir}" "${chroot_dir}" || chroot_retval=1
-			chown -R dhcpcd:dhcpcd "${chroot_dir}" || chroot_retval=1
-		elif [[ ! -d "${chroot_dir}" ]] ; then
-			ewarn "${chroot_dir} is not a directory!"
-			ewarn "Did not set up ${PN} chroot!"
-		fi
-		if [[ "${chroot_retval}" -ne 0 ]] ; then
-			ewarn "There were issues setting up ${PN} chroot."
-		fi
-	fi
-
-	# Warn about removing stale files
-	if [[ -n "${old_files[@]}" ]] ; then
-		elog
-		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
-		elog "${EROOT}/etc to ${dbdir}"
-		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
-		elog "prefix dropped."
-		elog
-		elog "You should remove these files if you don't plan on reverting"
-		elog "to an older version:"
-		local old_file=
-		for old_file in ${old_files[@]}; do
-			elog "	${old_file}"
-		done
-	fi
-
-	if [ -z "${REPLACING_VERSIONS}" ]; then
-		elog
-		elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild b/net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild
deleted file mode 100644
index 0942b0cd043..00000000000
--- a/net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd toolchain-funcs
-
-if [[ ${PV} == "9999" ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://roy.marples.name/cgit/dhcpcd.git"
-else
-	MY_P="${P/_alpha/-alpha}"
-	MY_P="${MY_P/_beta/-beta}"
-	MY_P="${MY_P/_rc/-rc}"
-	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
-HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="debug elibc_glibc +embedded ipv6 kernel_linux privsep +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="
-	${COMMON_DEPEND}
-	privsep? (
-		acct-group/dhcpcd
-		acct-user/dhcpcd
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}/${P}-embedded_config.patch"
-)
-
-src_configure() {
-	local myeconfargs=(
-		--dbdir="${EPREFIX}/var/lib/dhcpcd"
-		--libexecdir="${EPREFIX}/lib/dhcpcd"
-		--localstatedir="${EPREFIX}/var"
-		--prefix="${EPREFIX}"
-		--with-hook=ntp.conf
-		$(use_enable debug)
-		$(use_enable embedded)
-		$(use_enable ipv6)
-		$(use_enable privsep)
-		$(usex elibc_glibc '--with-hook=yp.conf' '')
-		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
-		$(usex privsep '--privsepuser=dhcpcd' '')
-		$(usex udev '' '--without-dev --without-udev')
-		CC="$(tc-getCC)"
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	keepdir /var/lib/dhcpcd
-	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
-	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
-}
-
-pkg_postinst() {
-	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
-
-	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local old_duid="${EROOT}"/etc/dhcpcd.duid
-	local new_duid="${dbdir}"/duid
-	if [[ -e "${old_old_duid}" ]] ; then
-		# Upgrade the duid file to the new format if needed
-		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
-			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
-		fi
-
-		# Move the duid to /etc, a more sensible location
-		if [[ ! -e "${old_duid}" ]] ; then
-			cp -p "${old_old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_old_duid}" )
-	fi
-
-	# dhcpcd-7 moves the files out of /etc
-	if [[ -e "${old_duid}" ]] ; then
-		if [[ ! -e "${new_duid}" ]] ; then
-			cp -p "${old_duid}" "${new_duid}"
-		fi
-		old_files+=( "${old_duid}" )
-	fi
-	local old_secret="${EROOT}"/etc/dhcpcd.secret
-	local new_secret="${dbdir}"/secret
-	if [[ -e "${old_secret}" ]] ; then
-		if [[ ! -e "${new_secret}" ]] ; then
-			cp -p "${old_secret}" "${new_secret}"
-		fi
-		old_files+=( "${old_secret}" )
-	fi
-
-	# dhcpcd-7 renames some files in /var/lib/dhcpcd
-	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
-	local new_rdm="${dbdir}"/rdm_monotonic
-	if [[ -e "${old_rdm}" ]] ; then
-		if [[ ! -e "${new_rdm}" ]] ; then
-			cp -p "${old_rdm}" "${new_rdm}"
-		fi
-		old_files+=( "${old_rdm}" )
-	fi
-	local lease=
-	for lease in "${dbdir}"/dhcpcd-*.lease*; do
-		[[ -f "${lease}" ]] || continue
-		old_files+=( "${lease}" )
-		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
-		[[ -e "${dbdir}/${new_lease}" ]] && continue
-		cp "${lease}" "${dbdir}/${new_lease}"
-	done
-
-	# Warn about removing stale files
-	if [[ -n "${old_files[@]}" ]] ; then
-		elog
-		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
-		elog "${EROOT}/etc to ${dbdir}"
-		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
-		elog "prefix dropped."
-		elog
-		elog "You should remove these files if you don't plan on reverting"
-		elog "to an older version:"
-		local old_file=
-		for old_file in ${old_files[@]}; do
-			elog "	${old_file}"
-		done
-	fi
-
-	if [ -z "${REPLACING_VERSIONS}" ]; then
-		elog
-		elog "dhcpcd has zeroconf support active by default."
-		elog "This means it will always obtain an IP address even if no"
-		elog "DHCP server can be contacted, which will break any existing"
-		elog "failover support you may have configured in your net configuration."
-		elog "This behaviour can be controlled with the noipv4ll configuration"
-		elog "file option or the -L command line switch."
-		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
-
-		elog
-		elog "Dhcpcd has duid enabled by default, and this may cause issues"
-		elog "with some dhcp servers. For more information, see"
-		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
-	fi
-
-	if ! has_version net-dns/bind-tools; then
-		elog
-		elog "If you activate the lookup-hostname hook to look up your hostname"
-		elog "using the dns, you need to install net-dns/bind-tools."
-	fi
-}

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch b/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch
deleted file mode 100644
index 10e8520116f..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From fa1cd0004e0d3267a1217ada46e53df38824da2d Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Thu, 4 Jun 2020 21:49:37 +0100
-Subject: Fix installing the embedded config as a file.
-
----
- src/if-options.c   | 4 ++--
- src/privsep-root.c | 4 ++++
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/if-options.c b/src/if-options.c
-index 212e71d8..3dde04bf 100644
---- a/src/if-options.c
-+++ b/src/if-options.c
-@@ -2366,8 +2366,8 @@ read_config(struct dhcpcd_ctx *ctx,
- 			return ifo;
- 		}
- 		if (buf[buflen - 1] != '\0') {
--			if (buflen < sizeof(buf) - 1)
--				bulen++;
-+			if ((size_t)buflen < sizeof(buf) - 1)
-+				buflen++;
- 			buf[buflen - 1] = '\0';
- 		}
- #else
-diff --git a/src/privsep-root.c b/src/privsep-root.c
-index fdf43856..512dfcc0 100644
---- a/src/privsep-root.c
-+++ b/src/privsep-root.c
-@@ -297,6 +297,10 @@ ps_root_validpath(const struct dhcpcd_ctx *ctx, uint16_t cmd, const char *path)
- 		return false;
- 
- 	if (cmd == PS_READFILE) {
-+#ifdef EMBEDDED_CONFIG
-+		if (strcmp(ctx->cffile, EMBEDDED_CONFIG) == 0)
-+			return true;
-+#endif
- 		if (strcmp(ctx->cffile, path) == 0)
- 			return true;
- 	}
--- 
-cgit v1.2.3
-


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2021-03-17  8:21 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2021-03-17  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     8e359c57f050aa5e84fbaba79cf7615209de7292
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 17 08:19:35 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 17 08:21:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e359c57

net-misc/dhcpcd: Revbump to add some fixes from upstream

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild             | 159 +++++++++++++++++++++
 .../dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch    |  36 +++++
 .../dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch  |  55 +++++++
 3 files changed, 250 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild b/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild
new file mode 100644
index 00000000000..51628651f42
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == "9999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://roy.marples.name/cgit/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://roy.marples.name/projects/dhcpcd"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="debug elibc_glibc +embedded ipv6 kernel_linux privsep +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="
+	${COMMON_DEPEND}
+	privsep? (
+		acct-group/dhcpcd
+		acct-user/dhcpcd
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-memleak_fix.patch"
+	"${FILESDIR}/${P}-unlink_socket.patch"
+	"${FILESDIR}/${P}-sparc_privsep.patch" #776178
+)
+
+src_configure() {
+	local myeconfargs=(
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		--prefix="${EPREFIX}"
+		--with-hook=ntp.conf
+		$(use_enable debug)
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		$(use_enable privsep)
+		$(usex elibc_glibc '--with-hook=yp.conf' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
+		$(usex privsep '--privsepuser=dhcpcd' '')
+		$(usex udev '' '--without-dev --without-udev')
+		CC="$(tc-getCC)"
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch b/net-misc/dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch
new file mode 100644
index 00000000000..61aed69656d
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch
@@ -0,0 +1,36 @@
+From ba9f3823ae825c341ea30f45b46d942b4ce5b8d9 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 24 Jan 2021 22:53:20 +0000
+Subject: [PATCH] Linux: fix a memory leak when dhcpcd exits or the log is
+ reopened
+
+---
+ src/logerr.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/logerr.c b/src/logerr.c
+index 21e933b8..35268870 100644
+--- a/src/logerr.c
++++ b/src/logerr.c
+@@ -484,13 +484,14 @@ logclose(void)
+ #endif
+ 
+ 	closelog();
++#if defined(__linux__)
++	free(_logprog);
++	_logprog = NULL;
++#endif
+ #ifndef SMALL
+ 	if (ctx->log_file == NULL)
+ 		return;
+ 	fclose(ctx->log_file);
+ 	ctx->log_file = NULL;
+ #endif
+-#if defined(__linux__)
+-	free(_logprog);
+-#endif
+ }
+-- 
+2.30.0
+
+

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch b/net-misc/dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch
new file mode 100644
index 00000000000..493e9c342f5
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch
@@ -0,0 +1,55 @@
+From d55f8e440389fbf333e14fe9f1a7d7f4da2b5197 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Tue, 26 Jan 2021 17:37:29 +0000
+Subject: [PATCH] control: unlink privileged socket when shutting down
+ without privsep
+
+Otherwise we have a connection refused when dhcpcd starts again
+as it sees the stale socket file.
+---
+ src/control.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/control.c b/src/control.c
+index 71405ed1..a601ad0a 100644
+--- a/src/control.c
++++ b/src/control.c
+@@ -50,7 +50,7 @@
+ 
+ #ifndef SUN_LEN
+ #define SUN_LEN(su) \
+-            (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
++	    (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+ #endif
+ 
+ static void
+@@ -350,12 +350,12 @@ control_start1(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family,
+ 	}
+ #endif
+ 
+-	if ((fmode & S_PRIV) == S_PRIV)
+-		strlcpy(ctx->control_sock, sa.sun_path,
+-		    sizeof(ctx->control_sock));
+-	else
++	if ((fmode & S_UNPRIV) == S_UNPRIV)
+ 		strlcpy(ctx->control_sock_unpriv, sa.sun_path,
+ 		    sizeof(ctx->control_sock_unpriv));
++	else
++		strlcpy(ctx->control_sock, sa.sun_path,
++		    sizeof(ctx->control_sock));
+ 	return fd;
+ }
+ 
+@@ -368,7 +368,8 @@ control_start(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family)
+ 	if (IN_PRIVSEP_SE(ctx)) {
+ 		make_path(ctx->control_sock, sizeof(ctx->control_sock),
+ 		    ifname, family, false);
+-		make_path(ctx->control_sock_unpriv, sizeof(ctx->control_sock),
++		make_path(ctx->control_sock_unpriv,
++		    sizeof(ctx->control_sock_unpriv),
+ 		    ifname, family, true);
+ 		return 0;
+ 	}
+-- 
+2.30.0
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2023-12-28  4:15 Sam James
  0 siblings, 0 replies; 14+ messages in thread
From: Sam James @ 2023-12-28  4:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ae217d6b14343ea5ff772fd149f7b92195e69e99
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 04:14:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 04:14:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae217d6b

net-misc/dhcpcd: backport rebinding fix

Closes: https://bugs.gentoo.org/920652
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/dhcpcd/dhcpcd-10.0.6-r1.ebuild            | 169 +++++++++++++++++++++
 .../dhcpcd/files/dhcpcd-10.0.6-rebinding.patch     |  46 ++++++
 2 files changed, 215 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-10.0.6-r1.ebuild b/net-misc/dhcpcd/dhcpcd-10.0.6-r1.ebuild
new file mode 100644
index 000000000000..b0cf48a7b84b
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-10.0.6-r1.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/NetworkConfiguration/dhcpcd.git"
+else
+	MY_P="${P/_alpha/-alpha}"
+	MY_P="${MY_P/_beta/-beta}"
+	MY_P="${MY_P/_rc/-rc}"
+	SRC_URI="https://github.com/NetworkConfiguration/dhcpcd/releases/download/v${PV}/${MY_P}.tar.xz"
+	S="${WORKDIR}/${MY_P}"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="https://github.com/NetworkConfiguration/dhcpcd/ https://roy.marples.name/projects/dhcpcd/"
+
+LICENSE="BSD-2 BSD ISC MIT"
+SLOT="0"
+IUSE="debug +embedded ipv6 privsep +udev"
+
+DEPEND="udev? ( virtual/udev )"
+RDEPEND="
+	${DEPEND}
+	privsep? (
+		acct-group/dhcpcd
+		acct-user/dhcpcd
+	)
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+	# These don't exist on Linux/glibc (bug #900264)
+	memset_explicit
+	memset_s
+	setproctitle
+	strtoi
+	consttime_memequal
+	SHA256_Init
+	hmac
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.0.6-rebinding.patch
+)
+
+src_configure() {
+	local myeconfargs=(
+		--dbdir="${EPREFIX}/var/lib/dhcpcd"
+		--libexecdir="${EPREFIX}/lib/dhcpcd"
+		--localstatedir="${EPREFIX}/var"
+		--prefix="${EPREFIX}"
+		--with-hook=ntp.conf
+		$(use_enable debug)
+		$(use_enable embedded)
+		$(use_enable ipv6)
+		$(use_enable privsep)
+		$(usex elibc_glibc '--with-hook=yp.conf' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
+		$(usex privsep '--privsepuser=dhcpcd' '')
+		$(usex udev '' '--without-dev --without-udev')
+		CC="$(tc-getCC)"
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	keepdir /var/lib/dhcpcd
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
+}
+
+pkg_postinst() {
+	local dbdir="${EROOT}"/var/lib/dhcpcd old_files=()
+
+	local old_old_duid="${EROOT}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [[ -e "${old_old_duid}" ]] ; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [[ ! -e "${old_duid}" ]] ; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_old_duid}" )
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [[ -e "${old_duid}" ]] ; then
+		if [[ ! -e "${new_duid}" ]] ; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files+=( "${old_duid}" )
+	fi
+	local old_secret="${EROOT}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [[ -e "${old_secret}" ]] ; then
+		if [[ ! -e "${new_secret}" ]] ; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files+=( "${old_secret}" )
+	fi
+
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [[ -e "${old_rdm}" ]] ; then
+		if [[ ! -e "${new_rdm}" ]] ; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files+=( "${old_rdm}" )
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[[ -f "${lease}" ]] || continue
+		old_files+=( "${lease}" )
+		local new_lease=$(basename "${lease}" | sed -e "s/dhcpcd-//")
+		[[ -e "${dbdir}/${new_lease}" ]] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [[ -n "${old_files[@]}" ]] ; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files[@]}; do
+			elog "	${old_file}"
+		done
+	fi
+
+	if [ -z "${REPLACING_VERSIONS}" ]; then
+		elog
+		elog "dhcpcd has zeroconf support active by default."
+		elog "This means it will always obtain an IP address even if no"
+		elog "DHCP server can be contacted, which will break any existing"
+		elog "failover support you may have configured in your net configuration."
+		elog "This behaviour can be controlled with the noipv4ll configuration"
+		elog "file option or the -L command line switch."
+		elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+		elog
+		elog "Dhcpcd has duid enabled by default, and this may cause issues"
+		elog "with some dhcp servers. For more information, see"
+		elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+	fi
+
+	if ! has_version net-dns/bind-tools; then
+		elog
+		elog "If you activate the lookup-hostname hook to look up your hostname"
+		elog "using the dns, you need to install net-dns/bind-tools."
+	fi
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd-10.0.6-rebinding.patch b/net-misc/dhcpcd/files/dhcpcd-10.0.6-rebinding.patch
new file mode 100644
index 000000000000..6457368f1150
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-10.0.6-rebinding.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/920652#c2
+https://github.com/NetworkConfiguration/dhcpcd/commit/8ab7ca1eb4e9bb797d6e6d955c83d8a82f69a663
+
+From 8ab7ca1eb4e9bb797d6e6d955c83d8a82f69a663 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 24 Dec 2023 12:07:25 +0000
+Subject: [PATCH] DHCP: DECLINE address on ARP defend failure
+
+Also, drop the lease.
+This should get us a new address from the DHCP server when we
+re-enter DISCOVER to avoid looping on the same address and fail
+again.
+---
+ src/dhcp.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/dhcp.c b/src/dhcp.c
+index 014ce6cf..a58e1db2 100644
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -1944,7 +1944,11 @@ dhcp_expire(void *arg)
+ static void
+ dhcp_decline(struct interface *ifp)
+ {
++	struct dhcp_state *state = D_STATE(ifp);
+ 
++	// Set the expired state so we send over BPF as this could be
++	// an address defence failure.
++	state->added |= STATE_EXPIRED;
+ 	send_message(ifp, DHCP_DECLINE, NULL);
+ }
+ #endif
+@@ -2098,8 +2102,12 @@ static void
+ dhcp_arp_defend_failed(struct arp_state *astate)
+ {
+ 	struct interface *ifp = astate->iface;
++	struct dhcp_state *state = D_STATE(ifp);
+ 
++	if (!(ifp->options->options & (DHCPCD_INFORM | DHCPCD_STATIC)))
++		dhcp_decline(ifp);
+ 	dhcp_drop(ifp, "EXPIRED");
++	dhcp_unlink(ifp->ctx, state->leasefile);
+ 	dhcp_start1(ifp);
+ }
+ #endif
+


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/
@ 2024-05-17 12:48 Sam James
  0 siblings, 0 replies; 14+ messages in thread
From: Sam James @ 2024-05-17 12:48 UTC (permalink / raw
  To: gentoo-commits

commit:     6eb9def2b3c4ab5289d489f8ddc0168d277393a7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May 17 12:46:14 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 17 12:46:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6eb9def2

net-misc/dhcpcd: add missing app-crypt/libmd dep

While at it, fix the configure check to not care about /usr vs / when
checking for libraries, as we only support separate /usr with an initramfs
these days.

Closes: https://bugs.gentoo.org/932086
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{dhcpcd-9999.ebuild => dhcpcd-10.0.6-r3.ebuild}      | 13 +++++++++++--
 net-misc/dhcpcd/dhcpcd-9999.ebuild                       | 11 +++++++++--
 net-misc/dhcpcd/files/dhcpcd-10.0.6-fix-lib-check.patch  | 16 ++++++++++++++++
 3 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-10.0.6-r3.ebuild
similarity index 95%
copy from net-misc/dhcpcd/dhcpcd-9999.ebuild
copy to net-misc/dhcpcd/dhcpcd-10.0.6-r3.ebuild
index 914373137e7d..3fcb61425cc4 100644
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-10.0.6-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,7 +25,10 @@ LICENSE="BSD-2 BSD ISC MIT"
 SLOT="0"
 IUSE="debug +embedded ipv6 privsep +udev"
 
-DEPEND="udev? ( virtual/udev )"
+DEPEND="
+	app-crypt/libmd
+	udev? ( virtual/udev )
+"
 RDEPEND="
 	${DEPEND}
 	privsep? (
@@ -45,6 +48,12 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 	hmac
 )
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.0.6-rebinding.patch
+	"${FILESDIR}"/${PN}-10.0.6-crash.patch
+	"${FILESDIR}"/${PN}-10.0.6-fix-lib-check.patch
+)
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild
index 914373137e7d..1c3bbc87d456 100644
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,7 +25,10 @@ LICENSE="BSD-2 BSD ISC MIT"
 SLOT="0"
 IUSE="debug +embedded ipv6 privsep +udev"
 
-DEPEND="udev? ( virtual/udev )"
+DEPEND="
+	app-crypt/libmd
+	udev? ( virtual/udev )
+"
 RDEPEND="
 	${DEPEND}
 	privsep? (
@@ -45,6 +48,10 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 	hmac
 )
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.0.6-fix-lib-check.patch
+)
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/files/dhcpcd-10.0.6-fix-lib-check.patch b/net-misc/dhcpcd/files/dhcpcd-10.0.6-fix-lib-check.patch
new file mode 100644
index 000000000000..0d609822aad1
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-10.0.6-fix-lib-check.patch
@@ -0,0 +1,16 @@
+--- a/configure
++++ b/configure
+@@ -361,11 +361,8 @@ if [ -e "$LDELF" ]; then
+ 	echo "LDFLAGS+=	-Wl,-rpath=${LIBDIR}" >>$CONFIG_MK
+ fi
+ 
+-if [ -z "$PREFIX" ] || [ "$PREFIX" = / ]; then
+-	ALLOW_USR_LIBS=false
+-else
+-	ALLOW_USR_LIBS=true
+-fi
++ALLOW_USR_LIBS=true
++
+ case "$OS" in
+ linux*|solaris*|sunos*|kfreebsd*|dragonfly*|freebsd*) ;;
+ *)


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-17 12:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 18:30 [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/files/, net-misc/dhcpcd/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2024-05-17 12:48 Sam James
2023-12-28  4:15 Sam James
2021-03-17  8:21 Lars Wendler
2020-06-18 16:48 Lars Wendler
2020-06-15 21:10 Lars Wendler
2019-08-09 15:17 Lars Wendler
2019-07-30 19:42 William Hubbs
2019-07-28 12:08 Lars Wendler
2019-04-26 15:07 Lars Wendler
2019-02-08 19:17 Lars Wendler
2016-07-21 22:40 William Hubbs
2016-01-09 23:06 William Hubbs
2016-01-07 17:38 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox