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

commit:     b8c29394a688ed4389a6826583a0632eb8fc6328
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 17:39:56 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 17:40:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8c29394

net-misc/dhcpcd: add patch to fix compile issue for bug #579854

Package-Manager: portage-2.2.26

 net-misc/dhcpcd/dhcpcd-6.10.2.ebuild               |  4 ++
 .../dhcpcd/files/dhcpcd-6.10.2-fix-configure.patch | 45 ++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-6.10.2.ebuild b/net-misc/dhcpcd/dhcpcd-6.10.2.ebuild
index 0b616f0..cdd7e07 100644
--- a/net-misc/dhcpcd/dhcpcd-6.10.2.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-6.10.2.ebuild
@@ -27,6 +27,10 @@ COMMON_DEPEND="udev? ( virtual/udev )"
 DEPEND="${COMMON_DEPEND}"
 RDEPEND="${COMMON_DEPEND}"
 
+PATCHES=(
+"${FILESDIR}"/${P}-fix-configure.patch
+)
+
 if [[ ${PV} == "9999" ]]; then
 	DEPEND+=" dev-vcs/fossil"
 

diff --git a/net-misc/dhcpcd/files/dhcpcd-6.10.2-fix-configure.patch b/net-misc/dhcpcd/files/dhcpcd-6.10.2-fix-configure.patch
new file mode 100644
index 0000000..97cc2fa
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-6.10.2-fix-configure.patch
@@ -0,0 +1,45 @@
+Index: configure
+==================================================================
+--- a/configure
++++ b/configure
+@@ -360,19 +360,10 @@
+ 	esac
+ else
+ 	echo "CPPFLAGS+=	-DNDEBUG" >>$CONFIG_MK
+ fi
+ 
+-if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
+-	echo "dhcpcd-definitions.conf will be embedded in dhcpcd itself"
+-	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
+-else
+-	echo "dhcpcd-definitions.conf will be installed to $LIBEXECDIR"
+-	echo "CFLAGS+= -DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK
+-	echo "EMBEDDEDINSTALL=	_embeddedinstall" >>$CONFIG_MK
+-fi
+-
+ if [ -n "$FORK" -a "$FORK" != yes -a "$FORK" != true ]; then
+ 	echo "There is no fork"
+ 	echo "CPPFLAGS+=	-DTHERE_IS_NO_FORK" >>$CONFIG_MK
+ fi
+ 
+@@ -460,10 +451,19 @@
+ 	echo "$CC does not create executables" >&2
+ 	exit 1
+ fi
+ [ "$CC" != cc ] && echo "CC=	$CC" >>$CONFIG_MK
+ $CC --version | $SED -e '1!d'
++
++if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
++	echo "dhcpcd-definitions.conf will be embedded in dhcpcd itself"
++	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
++else
++	echo "dhcpcd-definitions.conf 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
+ #include <linux/nl80211.h>
+


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

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

commit:     be946042b4fe11abaac43300d2165e224215d3c9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May  7 11:19:21 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue May  7 11:19:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be946042

net-misc/dhcpcd: Security bump to version 7.1.1-r3

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

 net-misc/dhcpcd/dhcpcd-7.1.1-r3.ebuild             | 154 +++++++++++++++++++++
 .../files/dhcpcd-7.1.1-v6_read_overflow.patch      | 120 ++++++++++++++++
 2 files changed, 274 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-7.1.1-r3.ebuild b/net-misc/dhcpcd/dhcpcd-7.1.1-r3.ebuild
new file mode 100644
index 00000000000..755eefee08f
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-7.1.1-r3.ebuild
@@ -0,0 +1,154 @@
+# 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}"/${P}-overflows.patch #684430
+	"${FILESDIR}"/${P}-v6_read_overflow.patch #685264
+)
+
+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-v6_read_overflow.patch b/net-misc/dhcpcd/files/dhcpcd-7.1.1-v6_read_overflow.patch
new file mode 100644
index 00000000000..54b559fcd87
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-7.1.1-v6_read_overflow.patch
@@ -0,0 +1,120 @@
+From c1ebeaafeb324bac997984abdcee2d4e8b61a8a8 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Fri, 3 May 2019 14:44:06 +0100
+Subject: DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE
+
+dhcpcd only checks that the prefix length of the exclusion
+matches the prefix length of the ia and equals the length of the
+data in the option.
+This could potentially overrun the in6_addr structure.
+
+This is fixed by enforcing RFC 6603 section 4.2 option limits
+more clearly.
+
+Thanks to Maxime Villard <max@m00nbsd.net> for finding this.
+---
+ src/dhcp6.c | 44 +++++++++++++++++++++-----------------------
+ 1 file changed, 21 insertions(+), 23 deletions(-)
+
+diff --git a/src/dhcp6.c b/src/dhcp6.c
+index dee8d4b6..583f3b3f 100644
+--- a/src/dhcp6.c
++++ b/src/dhcp6.c
+@@ -2166,40 +2166,38 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid,
+ 			state->expire = a->prefix_vltime;
+ 		i++;
+ 
+-		o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, &ol);
+ 		a->prefix_exclude_len = 0;
+ 		memset(&a->prefix_exclude, 0, sizeof(a->prefix_exclude));
+-#if 0
+-		if (ex == NULL) {
+-			struct dhcp6_option *w;
+-			uint8_t *wp;
+-
+-			w = calloc(1, 128);
+-			w->len = htons(2);
+-			wp = D6_OPTION_DATA(w);
+-			*wp++ = 64;
+-			*wp++ = 0x78;
+-			ex = w;
+-		}
+-#endif
++		o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, &ol);
+ 		if (o == NULL)
+ 			continue;
+-		if (ol < 2) {
+-			logerrx("%s: truncated PD Exclude", ifp->name);
++
++		/* RFC 6603 4.2 says option length MUST be between 2 and 17.
++		 * This allows 1 octet for prefix length and 16 for the
++		 * subnet ID. */
++		if (ol < 2 || ol > 17) {
++			logerrx("%s: invalid PD Exclude option", ifp->name);
+ 			continue;
+ 		}
+-		a->prefix_exclude_len = *o++;
+-		ol--;
+-		if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1
+-		    != ol)
+-		{
++
++		/* RFC 6603 4.2 says prefix length MUST be between the
++		 * length of the IAPREFIX prefix length + 1 and 128. */
++		if (*o < a->prefix_len + 1 || *o > 128) {
++			logerrx("%s: invalid PD Exclude length", ifp->name);
++			continue;
++		}
++
++		/* Check option length matches prefix length. */
++		if (((*o - a->prefix_len - 1) / NBBY) + 1 != ol) {
+ 			logerrx("%s: PD Exclude length mismatch", ifp->name);
+-			a->prefix_exclude_len = 0;
+ 			continue;
+ 		}
+-		nb = a->prefix_len % NBBY;
++
++		a->prefix_exclude_len = *o++;
++		ol--;
+ 		memcpy(&a->prefix_exclude, &a->prefix,
+ 		    sizeof(a->prefix_exclude));
++		nb = a->prefix_len % NBBY;
+ 		if (nb)
+ 			ol--;
+ 		pw = a->prefix_exclude.s6_addr +
+-- 
+cgit v1.2.1
+
+From 896ef4a54b0578985e5e1360b141593f1d62837b Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sat, 4 May 2019 10:19:02 +0100
+Subject: DHCPv6: Fix exclude prefix length check.
+
+---
+ src/dhcp6.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dhcp6.c b/src/dhcp6.c
+index 583f3b3f..7f26129f 100644
+--- a/src/dhcp6.c
++++ b/src/dhcp6.c
+@@ -2187,14 +2187,14 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid,
+ 			continue;
+ 		}
+ 
++		ol--;
+ 		/* Check option length matches prefix length. */
+ 		if (((*o - a->prefix_len - 1) / NBBY) + 1 != ol) {
+ 			logerrx("%s: PD Exclude length mismatch", ifp->name);
+ 			continue;
+ 		}
+-
+ 		a->prefix_exclude_len = *o++;
+-		ol--;
++
+ 		memcpy(&a->prefix_exclude, &a->prefix,
+ 		    sizeof(a->prefix_exclude));
+ 		nb = a->prefix_len % NBBY;
+-- 
+cgit v1.2.1
+


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

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

commit:     a83cb17acea4bd588fc7e7da43034a38eee24225
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  4 15:28:04 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Sep  4 15:28:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a83cb17a

net-misc/dhcpcd: Removed old

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

 net-misc/dhcpcd/Manifest                           |   1 -
 net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild             | 148 ---------------------
 .../files/dhcpcd-8.0.2-string_termination.patch    |  80 -----------
 3 files changed, 229 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index e6d6b91215b..3f36cb6af0a 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,4 +1,3 @@
 DIST dhcpcd-7.2.3.tar.xz 213552 BLAKE2B 5f89e11424b85702b05da6207ec346480c029de1416cc8892471de428ca0a4395a8915700e2237bfa2b133648973bc2a7c7d15aa2d0ba492f96fbf3908d7f613 SHA512 271cca422fad10eaf842acfd5b590c0ad537f5f23ee919a3928d8ad98463ab03bde21c0bc08741ea9618ee31095160a7c00066155eae2c74b17c49af65ba566f
-DIST dhcpcd-8.0.2.tar.xz 222408 BLAKE2B fb27a33cd64c7aeedb28e05c885c860618d923ac857895b9fdc7daa608f433587bea1e6630fd9897426b371a45b8a336e1edaa804d76eda6e9fc2adc1411aed2 SHA512 a6e3aa66800adc8b209324bae02a6e373e2623735bf0695ffec4a7c972d65c3498f55e4da62f93df0bc6cddb4bee8ab667b3743b5b25cd5f4cc9da4d1f8e15c4
 DIST dhcpcd-8.0.3.tar.xz 223104 BLAKE2B ca1b35e0fc0f8b345d2a55e380aa4e10b864f18f4b5368659875ef5efc955fac442b0505b0192578d83fa8c3b304942e50aa082d753e98dc3cd44237100f106c SHA512 0a740286181e1b24e7ac5157f60727c2a3abd81080235efc8ba86628bb8e2aa877b8d9348055c16cdae1a819f443afbf452907a25152bb936a6dc72f3a179944
 DIST dhcpcd-8.0.4.tar.xz 224236 BLAKE2B ae1bc71fef58526482d5c0b34f66d68ad4baf84979da2fa90d51ec1831ccdc2a2d77dc1a09b52b8fa58deed42ff7c6af49a165afba50decae0085788bcbb10c2 SHA512 d5ea895b841a1afcabd50013800f567c0a9c077cd409ec18c5442b3da6bac814db5e9ae4a4218076eb5119bd7ccb732d3f58e22dcbba38ede26ee668f9733ec4

diff --git a/net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild b/net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild
deleted file mode 100644
index 1696c38dcf7..00000000000
--- a/net-misc/dhcpcd/dhcpcd-8.0.2-r1.ebuild
+++ /dev/null
@@ -1,148 +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}-string_termination.patch #691426
-)
-
-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.2-string_termination.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.2-string_termination.patch
deleted file mode 100644
index a1bc19ec974..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-8.0.2-string_termination.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-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] 12+ messages in thread

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

commit:     12089270c7adad9ec6cbffb031e27fa66e953383
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  2 20:01:11 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Apr  2 20:01:11 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12089270

net-misc/dhcpcd: Fixed build with USE="-ipv6"

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

 net-misc/dhcpcd/dhcpcd-9.0.0.ebuild                |  2 +
 .../files/dhcpcd-9.0.0-no_ipv6_build_fix.patch     | 92 ++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild
index 9656eabee92..52553bf20cc 100644
--- a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild
@@ -33,6 +33,8 @@ RDEPEND="
 	)
 "
 
+PATCHES=( "${FILESDIR}/${P}-no_ipv6_build_fix.patch" )
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch b/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch
new file mode 100644
index 00000000000..a210982c340
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch
@@ -0,0 +1,92 @@
+From 12ddbee51f0e1cf4372146f8d42ea404dd07dba3 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Thu, 2 Apr 2020 19:54:19 +0000
+Subject: Fix build without INET or INET6
+
+---
+ src/dhcpcd.c       | 2 +-
+ src/if-bsd.c       | 2 ++
+ src/if-options.c   | 6 ++++++
+ src/privsep-root.c | 2 ++
+ 4 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/dhcpcd.c b/src/dhcpcd.c
+index 057a1fd9..9208f37c 100644
+--- a/src/dhcpcd.c
++++ b/src/dhcpcd.c
+@@ -2169,7 +2169,7 @@ printpidfile:
+ 	}
+ #endif
+ 
+-#ifdef BSD
++#if defined(BSD) && defined(INET6)
+ 	/* Disable the kernel RTADV sysctl as early as possible. */
+ 	if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS)
+ 		if_disable_rtadv();
+diff --git a/src/if-bsd.c b/src/if-bsd.c
+index dbe5c359..d6c38903 100644
+--- a/src/if-bsd.c
++++ b/src/if-bsd.c
+@@ -1524,6 +1524,8 @@ if_missfilter0(struct dhcpcd_ctx *ctx, struct interface *ifp,
+ #ifdef INET6
+ 	if (sa->sa_family == AF_INET6)
+ 		ifa_setscope(satosin6(sa), ifp->index);
++#else
++	UNUSED(ifp);
+ #endif
+ 
+ 	cp = ctx->rt_missfilter + ctx->rt_missfilterlen;
+diff --git a/src/if-options.c b/src/if-options.c
+index 7850ff2e..1280cfbd 100644
+--- a/src/if-options.c
++++ b/src/if-options.c
+@@ -573,6 +573,8 @@ set_option_space(struct dhcpcd_ctx *ctx,
+ 		return;
+ 	}
+ #endif
++#else
++	UNUSED(arg);
+ #endif
+ 
+ #ifdef INET
+@@ -1275,6 +1277,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
+ 		memset(ifo->nomask6, 0xff, sizeof(ifo->nomask6));
+ 
+ 		/* Allow the bare minimum through */
++#ifdef INET
+ 		del_option_mask(ifo->nomask, DHO_SUBNETMASK);
+ 		del_option_mask(ifo->nomask, DHO_CSR);
+ 		del_option_mask(ifo->nomask, DHO_ROUTER);
+@@ -1286,11 +1289,14 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
+ 		del_option_mask(ifo->nomask, DHO_RENEWALTIME);
+ 		del_option_mask(ifo->nomask, DHO_REBINDTIME);
+ 		del_option_mask(ifo->nomask, DHO_DNSSEARCH);
++#endif
+ 
++#ifdef INET6
+ 		del_option_mask(ifo->nomask6, D6_OPTION_DNS_SERVERS);
+ 		del_option_mask(ifo->nomask6, D6_OPTION_DOMAIN_LIST);
+ 		del_option_mask(ifo->nomask6, D6_OPTION_SOL_MAX_RT);
+ 		del_option_mask(ifo->nomask6, D6_OPTION_INF_MAX_RT);
++#endif
+ 
+ 		break;
+ #ifdef INET
+diff --git a/src/privsep-root.c b/src/privsep-root.c
+index f88f56dd..0f099bb7 100644
+--- a/src/privsep-root.c
++++ b/src/privsep-root.c
+@@ -435,8 +435,10 @@ ps_root_dispatchcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
+ 	struct dhcpcd_ctx *ctx = arg;
+ 	ssize_t err;
+ 
++#ifdef INET
+ 	err = ps_bpf_dispatch(ctx, psm, msg);
+ 	if (err == -1 && errno == ENOTSUP)
++#endif
+ 		err = ps_inet_dispatch(ctx, psm, msg);
+ 	return err;
+ }
+-- 
+cgit v1.2.3
+


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

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

commit:     384c3678988eeed4fefec250e9945e23eb8e18e0
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 21 10:32:54 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Apr 21 10:33:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=384c3678

net-misc/dhcpcd: Removed old

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

 net-misc/dhcpcd/Manifest                           |   1 -
 net-misc/dhcpcd/dhcpcd-9.0.0.ebuild                | 175 ---------------------
 .../files/dhcpcd-9.0.0-no_ipv6_build_fix.patch     |  92 -----------
 3 files changed, 268 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 07ee06427e7..867c3edcba9 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -3,6 +3,5 @@ DIST dhcpcd-7.2.5.tar.xz 214124 BLAKE2B 7a5f32b66187afcaa2bb4a1cbcc0d704a28a27ff
 DIST dhcpcd-8.0.6.tar.xz 224552 BLAKE2B 5d0fab5977597ce182a2de56c8c4d085d3595a8f1209fc76788b707af0fffd4285a958cebfe7bab6c04ae7a2ba94c466d689dc9c3a71708c1baabd328b2bbf3e SHA512 19a568800a4e510a250de7cc111700b364c68bfe3907f1ac2cda81aacd079cb9ac87731cbabbf8f1e85e055a11c7ba88e419f6c4d7b33f8842dfaeadc7d1e193
 DIST dhcpcd-8.1.6.tar.xz 229224 BLAKE2B ad3d024b5a62feb3c9cb39ada0323d336af831cb9892dc50b93c672e6ae2a5607526122a9a5f63a00915a182ea7e7a0ae6b19bbb965bd1fa9ca58cbcac81cd66 SHA512 f4d7ea5f4c139a2735e795e13be68f6edac89d86d97589c2cdd67f89b890a093675dcc207c681332e2163b1094da8ce75bda2ee614c19bafd01410d9fadf19df
 DIST dhcpcd-8.1.7.tar.xz 230308 BLAKE2B 636daad77885b7f00f34c73413db4a0269bca844c33b630b5302cfcd9f5b2068ed95872dd92f3b8db25e7b2ca0a28a8053e1975a7ee50fd5403f8d58e97dff17 SHA512 ea58ef3db8254d677820c44b2842ef2f3697b2d90fcbd89b2ecfcbac87e705047cac17053bbe076a3f6d2775903c8e75eac38089d25c097e2f24a045c24977e8
-DIST dhcpcd-9.0.0.tar.xz 245336 BLAKE2B e206ba6f8e8c890247e308e5e181abf3eec2f5abc0f4b8fa05b220529018d16c806cb8ae29525b9bf7e39b465377016b55fe1c08b2f0b83d8e7a3432b6ea71b5 SHA512 5b04d9ecb75c45e7f883e29aed4862ae7fc186a6ca161353ed59ffed4dbc266e03596a26d09ae60e87806047659d6ce238b26d264b5a96b21643849343d2da0b
 DIST dhcpcd-9.0.1.tar.xz 244816 BLAKE2B 1cb346f7578dadb237d05056a8f6e39b30da831e253e6629c5c19e6a70f7b6d8ffcb6db37d0f720fda28577e8cb4227cbca8a08fac0c977098f66b2a430d9ffe SHA512 dea153c9a2f4a9d9c983bf50d8c18b544d7dbe1a2972ccc8eb33bbbc8b09178b39bdb9a38cc293db7861024509ccd475e11d84004bc4cd45947786f5e10db0a3
 DIST dhcpcd-9.0.2.tar.xz 244800 BLAKE2B d0c355141aa1e57715c30b2902eed7e2821f2c08fdc97497c9dc271689faf2ca22e3f50f17e6c7ae8fe4434d5c216572a42e1abf789287495e6db44f671d5085 SHA512 2a606bff2e96d1da5d3642ac68341c14b378d9a905cba364ab42eba1285604f8be56b9efeff3eee18d89b71f0f9f3b05cb7b88e8fce568baf1c0d1e5d3becb5f

diff --git a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild
deleted file mode 100644
index 52553bf20cc..00000000000
--- a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild
+++ /dev/null
@@ -1,175 +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}-no_ipv6_build_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' '')
-		$(usex kernel_linux '--rundir=${EPREFIX}/run' '')
-		$(usex privsep '--privsepuser=dhcpcd' '')
-		$(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
-
-	# 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/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch b/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch
deleted file mode 100644
index a210982c340..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 12ddbee51f0e1cf4372146f8d42ea404dd07dba3 Mon Sep 17 00:00:00 2001
-From: Roy Marples <roy@marples.name>
-Date: Thu, 2 Apr 2020 19:54:19 +0000
-Subject: Fix build without INET or INET6
-
----
- src/dhcpcd.c       | 2 +-
- src/if-bsd.c       | 2 ++
- src/if-options.c   | 6 ++++++
- src/privsep-root.c | 2 ++
- 4 files changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/src/dhcpcd.c b/src/dhcpcd.c
-index 057a1fd9..9208f37c 100644
---- a/src/dhcpcd.c
-+++ b/src/dhcpcd.c
-@@ -2169,7 +2169,7 @@ printpidfile:
- 	}
- #endif
- 
--#ifdef BSD
-+#if defined(BSD) && defined(INET6)
- 	/* Disable the kernel RTADV sysctl as early as possible. */
- 	if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS)
- 		if_disable_rtadv();
-diff --git a/src/if-bsd.c b/src/if-bsd.c
-index dbe5c359..d6c38903 100644
---- a/src/if-bsd.c
-+++ b/src/if-bsd.c
-@@ -1524,6 +1524,8 @@ if_missfilter0(struct dhcpcd_ctx *ctx, struct interface *ifp,
- #ifdef INET6
- 	if (sa->sa_family == AF_INET6)
- 		ifa_setscope(satosin6(sa), ifp->index);
-+#else
-+	UNUSED(ifp);
- #endif
- 
- 	cp = ctx->rt_missfilter + ctx->rt_missfilterlen;
-diff --git a/src/if-options.c b/src/if-options.c
-index 7850ff2e..1280cfbd 100644
---- a/src/if-options.c
-+++ b/src/if-options.c
-@@ -573,6 +573,8 @@ set_option_space(struct dhcpcd_ctx *ctx,
- 		return;
- 	}
- #endif
-+#else
-+	UNUSED(arg);
- #endif
- 
- #ifdef INET
-@@ -1275,6 +1277,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
- 		memset(ifo->nomask6, 0xff, sizeof(ifo->nomask6));
- 
- 		/* Allow the bare minimum through */
-+#ifdef INET
- 		del_option_mask(ifo->nomask, DHO_SUBNETMASK);
- 		del_option_mask(ifo->nomask, DHO_CSR);
- 		del_option_mask(ifo->nomask, DHO_ROUTER);
-@@ -1286,11 +1289,14 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
- 		del_option_mask(ifo->nomask, DHO_RENEWALTIME);
- 		del_option_mask(ifo->nomask, DHO_REBINDTIME);
- 		del_option_mask(ifo->nomask, DHO_DNSSEARCH);
-+#endif
- 
-+#ifdef INET6
- 		del_option_mask(ifo->nomask6, D6_OPTION_DNS_SERVERS);
- 		del_option_mask(ifo->nomask6, D6_OPTION_DOMAIN_LIST);
- 		del_option_mask(ifo->nomask6, D6_OPTION_SOL_MAX_RT);
- 		del_option_mask(ifo->nomask6, D6_OPTION_INF_MAX_RT);
-+#endif
- 
- 		break;
- #ifdef INET
-diff --git a/src/privsep-root.c b/src/privsep-root.c
-index f88f56dd..0f099bb7 100644
---- a/src/privsep-root.c
-+++ b/src/privsep-root.c
-@@ -435,8 +435,10 @@ ps_root_dispatchcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg)
- 	struct dhcpcd_ctx *ctx = arg;
- 	ssize_t err;
- 
-+#ifdef INET
- 	err = ps_bpf_dispatch(ctx, psm, msg);
- 	if (err == -1 && errno == ENOTSUP)
-+#endif
- 		err = ps_inet_dispatch(ctx, psm, msg);
- 	return err;
- }
--- 
-cgit v1.2.3
-


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

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/, net-misc/dhcpcd/files/
@ 2020-05-21  2:04 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2020-05-21  2:04 UTC (permalink / raw
  To: gentoo-commits

commit:     35ebb75cbd1bf5df69313ebfd18c63b03c609edf
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu May 21 01:56:33 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu May 21 02:04:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35ebb75c

net-misc/dhcpcd: set rundir=/run/dhcpcd in 9.x

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../{dhcpcd-9.0.2.ebuild => dhcpcd-9.0.2-r1.ebuild}     |  6 +++---
 net-misc/dhcpcd/dhcpcd-9999.ebuild                      |  6 +++---
 net-misc/dhcpcd/files/dhcpcd.initd-r1                   | 17 +++++++++++++++++
 net-misc/dhcpcd/files/dhcpcd.service-r1                 | 15 +++++++++++++++
 4 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
similarity index 96%
rename from net-misc/dhcpcd/dhcpcd-9.0.2.ebuild
rename to net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
index 9656eabee92..ac18c5907ad 100644
--- a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
@@ -45,7 +45,7 @@ src_configure() {
 		$(use_enable ipv6)
 		$(use_enable privsep)
 		$(usex elibc_glibc '--with-hook=yp.conf' '')
-		$(usex kernel_linux '--rundir=${EPREFIX}/run' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
 		$(usex privsep '--privsepuser=dhcpcd' '')
 		$(usex udev '' '--without-dev --without-udev')
 		CC="$(tc-getCC)"
@@ -56,8 +56,8 @@ src_configure() {
 src_install() {
 	default
 	keepdir /var/lib/dhcpcd
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
 }
 
 pkg_postinst() {

diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild
index 9656eabee92..ac18c5907ad 100644
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild
@@ -45,7 +45,7 @@ src_configure() {
 		$(use_enable ipv6)
 		$(use_enable privsep)
 		$(usex elibc_glibc '--with-hook=yp.conf' '')
-		$(usex kernel_linux '--rundir=${EPREFIX}/run' '')
+		--rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
 		$(usex privsep '--privsepuser=dhcpcd' '')
 		$(usex udev '' '--without-dev --without-udev')
 		CC="$(tc-getCC)"
@@ -56,8 +56,8 @@ src_configure() {
 src_install() {
 	default
 	keepdir /var/lib/dhcpcd
-	newinitd "${FILESDIR}"/${PN}.initd ${PN}
-	systemd_dounit "${FILESDIR}"/${PN}.service
+	newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+	systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
 }
 
 pkg_postinst() {

diff --git a/net-misc/dhcpcd/files/dhcpcd.initd-r1 b/net-misc/dhcpcd/files/dhcpcd.initd-r1
new file mode 100644
index 00000000000..5a872351ab9
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.initd-r1
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2007-2008 Roy Marples <roy@marples.name>
+# All rights reserved. Released under the 2-clause BSD license.
+
+command=${RC_PREFIX}/sbin/dhcpcd
+pidfile=${RC_PREFIX}/var/run/dhcpcd/pid
+command_args=-q
+name="DHCP Client Daemon"
+
+depend()
+{
+	provide net
+	need localmount
+	use logger network
+	after bootmisc modules
+	before dns
+}

diff --git a/net-misc/dhcpcd/files/dhcpcd.service-r1 b/net-misc/dhcpcd/files/dhcpcd.service-r1
new file mode 100644
index 00000000000..b4309c39b4c
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=Lightweight DHCP client daemon
+Wants=network.target
+Before=network.target network-online.target
+
+[Service]
+Type=forking
+ExecStart=/sbin/dhcpcd -q
+PIDFile=/run/dhcpcd/pid
+# Avoid duplicate output on stderr/syslog
+StandardOutput=null
+StandardError=null
+
+[Install]
+WantedBy=multi-user.target


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

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

commit:     63f5f9a2207c30b2222e91e2db7c014479de9dce
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  5 10:25:00 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 10:25:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63f5f9a2

net-misc/dhcpcd: Revbump to fix installation of embedded config

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

 ...{dhcpcd-9.1.1.ebuild => dhcpcd-9.1.1-r1.ebuild} |  2 +-
 .../files/dhcpcd-9.1.1-embedded_config.patch       | 43 ++++++++++++++++++++++
 net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch  | 11 ------
 3 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/net-misc/dhcpcd/dhcpcd-9.1.1.ebuild b/net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild
similarity index 99%
rename from net-misc/dhcpcd/dhcpcd-9.1.1.ebuild
rename to net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild
index c4339429d80..0942b0cd043 100644
--- a/net-misc/dhcpcd/dhcpcd-9.1.1.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.1.1-r1.ebuild
@@ -34,7 +34,7 @@ RDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/${P}-typo_fix.patch"
+	"${FILESDIR}/${P}-embedded_config.patch"
 )
 
 src_configure() {

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
new file mode 100644
index 00000000000..10e8520116f
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch
@@ -0,0 +1,43 @@
+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
+

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
deleted file mode 100644
index 0d97b7f8275..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.1.1-typo_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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] 12+ messages in thread

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

commit:     046a48b4df745b144b42508cc19e7ea077406206
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 17 08:14:38 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=046a48b4

net-misc/dhcpcd: Fixed build on sparc with USE="privsep"

Closes: https://bugs.gentoo.org/776178
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/dhcpcd-9.3.4.ebuild                |  4 +++
 .../dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch  | 40 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
index 1fa46b7c246..71dc46831ee 100644
--- a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
@@ -33,6 +33,10 @@ RDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-9.4.0-sparc_privsep.patch" #776178
+)
+
 src_configure() {
 	local myeconfargs=(
 		--dbdir="${EPREFIX}/var/lib/dhcpcd"

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch b/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch
new file mode 100644
index 00000000000..a91db28d08c
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch
@@ -0,0 +1,40 @@
+From dcfd7a23f002793a855156255e81662ef84064d3 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 5 Feb 2021 09:25:12 +0100
+Subject: [PATCH] src/privsep-linux: fix build on sparc (#26)
+
+Fix the following build failure:
+
+privsep-linux.c:203: warning: "AUDIT_ARCH_SPARC64" redefined
+  203 | #    define AUDIT_ARCH_SPARC64
+      |
+In file included from privsep-linux.c:35:
+/srv/storage/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/linux/audit.h:392: note: this is the location of the previous definition
+  392 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
+      |
+In file included from privsep-linux.c:36:
+privsep-linux.c:215:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'?
+  215 |  BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0),
+      |                                      ^~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/privsep-linux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/privsep-linux.c b/src/privsep-linux.c
+index d00894ab..5c80c1b3 100644
+--- a/src/privsep-linux.c
++++ b/src/privsep-linux.c
+@@ -222,9 +222,9 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
+ #  endif
+ #elif defined(__sparc__)
+ #  if defined(__arch64__)
+-#    define AUDIT_ARCH_SPARC64
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC64
+ #  else
+-#    define AUDIT_ARCH_SPARC
++#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC
+ #  endif
+ #elif defined(__xtensa__)
+ #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_XTENSA


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

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

commit:     175d8dc6b2f3d1c8911e59b28187a93b45f4b887
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 31 19:58:46 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 31 19:59:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=175d8dc6

net-misc/dhcpcd: Fixed build with USE="privsep"

Closes: https://bugs.gentoo.org/777600
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/dhcpcd/dhcpcd-9.3.4.ebuild                |  1 +
 .../files/dhcpcd-9.3.4-include_termios.patch       | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
index 90ee346ea29..2b787b26667 100644
--- a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
@@ -35,6 +35,7 @@ RDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-9.4.0-sparc_privsep.patch" #776178
+	"${FILESDIR}/${PN}-9.3.4-include_termios.patch" #777600
 )
 
 src_configure() {

diff --git a/net-misc/dhcpcd/files/dhcpcd-9.3.4-include_termios.patch b/net-misc/dhcpcd/files/dhcpcd-9.3.4-include_termios.patch
new file mode 100644
index 00000000000..58a6a0216b8
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-9.3.4-include_termios.patch
@@ -0,0 +1,22 @@
+From 7c08f3777a69c69e87a149bb35681ce2ed2f0490 Mon Sep 17 00:00:00 2001
+From: Mikhail Efremov <sem@altlinux.org>
+Date: Tue, 8 Dec 2020 16:15:28 +0000
+Subject: [PATCH] Linux: Fix privsep build by including sys/termios.h for all
+ platforms
+
+---
+ src/privsep-linux.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/privsep-linux.c b/src/privsep-linux.c
+index e588ecd7..1fbe97fa 100644
+--- a/src/privsep-linux.c
++++ b/src/privsep-linux.c
+@@ -29,6 +29,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/prctl.h>
+ #include <sys/syscall.h>
++#include <sys/termios.h>	/* For TCGETS */
+ 
+ #include <linux/audit.h>
+ #include <linux/filter.h>


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

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/, net-misc/dhcpcd/files/
@ 2021-05-23 11:48 David Seifert
  0 siblings, 0 replies; 12+ messages in thread
From: David Seifert @ 2021-05-23 11:48 UTC (permalink / raw
  To: gentoo-commits

commit:     3e2f733c915d3831f9c70050ca87c8c98064c127
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun May 23 11:48:08 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun May 23 11:48:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e2f733c

net-misc/dhcpcd: drop 8.1.9-r1, 9.3.4, 9.4.0

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   3 -
 net-misc/dhcpcd/dhcpcd-8.1.9-r1.ebuild             | 150 -------------------
 net-misc/dhcpcd/dhcpcd-9.3.4.ebuild                | 158 ---------------------
 net-misc/dhcpcd/dhcpcd-9.4.0.ebuild                | 153 --------------------
 .../files/dhcpcd-9.3.4-include_termios.patch       |  22 ---
 net-misc/dhcpcd/files/dhcpcd.initd                 |  17 ---
 net-misc/dhcpcd/files/dhcpcd.service               |  15 --
 7 files changed, 518 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 51d79ca53a6..a6997532275 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,4 +1 @@
-DIST dhcpcd-8.1.9-patches-01.tar.xz 3208 BLAKE2B 38f59096c7fbe7beb3df11e492d3ef1d116645eefe0722870dd0ca7b5a9b562c2f8302343f33d22359e37623d66874eb5f9981c9f4e521a80629678edff6d0d8 SHA512 13f10f84d44f5cfbf262d4aeb4134121c99629062a8075247b2b35ad5d1927914139bdc8f897644e501239763b409d5eedb9bc30f86456a4af622ab20fe6ffcb
-DIST dhcpcd-8.1.9.tar.xz 230288 BLAKE2B 5606ddfce37c67ac3d60257104fcf15bd7da65021b2c1261a45958b628cd066ccd9bc6b60bbb42f8280fcbbf9d4b1c7666b993c37f150b27ef2a0527a0fd5b96 SHA512 40ac106ffca60b32362aacdfae0fa3a2993a3eed72bf452322412a912f594aaade1c24b862233455033158a6e453ec75d6d14fa52df6b4c5ae435dd6ceb29f2a
-DIST dhcpcd-9.3.4.tar.xz 255212 BLAKE2B cd64dca55bd8adfcfa8ffb5f75a949c6f8aef9f1bf7925060590f7f5f0325e08de3c766c8ff780736eb2bed40ba3ae7b59c3cf3e03f2ad1bd7ff4c92aafb6370 SHA512 00125cbed9a20ba016cbb383c02ce61a58482dcf6c46144e573ee3759dbaf19b5f470eaf19038197d0ff4249c852773c537294bab30b5bf3f5bae4d754741517
 DIST dhcpcd-9.4.0.tar.xz 256440 BLAKE2B 16d63e957dbdf49647806ebe69487edc96502f43af8b8b6c6e40311994611d2516e2c839fed41863b8509a0953421091577d4cb202ebda3b300f3b1c761c07ce SHA512 e2cff86564062e8d5f9c8f48f245ffa31406494e2fafadedabc1ba9932b534cbda064783ffdd7fb337544459aba2ef7e9b49ad0973120897dc04159747e8635f

diff --git a/net-misc/dhcpcd/dhcpcd-8.1.9-r1.ebuild b/net-misc/dhcpcd/dhcpcd-8.1.9-r1.ebuild
deleted file mode 100644
index 77c0de3e8f7..00000000000
--- a/net-misc/dhcpcd/dhcpcd-8.1.9-r1.ebuild
+++ /dev/null
@@ -1,150 +0,0 @@
-# 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/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
-		https://dev.gentoo.org/~polynomial-c/${P}-patches-01.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="elibc_glibc +embedded ipv6 kernel_linux +udev"
-
-COMMON_DEPEND="udev? ( virtual/udev )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
-
-src_prepare() {
-	default
-	eapply "${WORKDIR}"/patches
-}
-
-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/dhcpcd-9.3.4.ebuild b/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
deleted file mode 100644
index c8db117d1ac..00000000000
--- a/net-misc/dhcpcd/dhcpcd-9.3.4.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# 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}/${PN}-9.4.0-sparc_privsep.patch" #776178
-	"${FILESDIR}/${PN}-9.3.4-include_termios.patch" #777600
-)
-
-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/dhcpcd-9.4.0.ebuild b/net-misc/dhcpcd/dhcpcd-9.4.0.ebuild
deleted file mode 100644
index 092c6e4a1dd..00000000000
--- a/net-misc/dhcpcd/dhcpcd-9.4.0.ebuild
+++ /dev/null
@@ -1,153 +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
-
-	# 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.3.4-include_termios.patch b/net-misc/dhcpcd/files/dhcpcd-9.3.4-include_termios.patch
deleted file mode 100644
index 58a6a0216b8..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.3.4-include_termios.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 7c08f3777a69c69e87a149bb35681ce2ed2f0490 Mon Sep 17 00:00:00 2001
-From: Mikhail Efremov <sem@altlinux.org>
-Date: Tue, 8 Dec 2020 16:15:28 +0000
-Subject: [PATCH] Linux: Fix privsep build by including sys/termios.h for all
- platforms
-
----
- src/privsep-linux.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/privsep-linux.c b/src/privsep-linux.c
-index e588ecd7..1fbe97fa 100644
---- a/src/privsep-linux.c
-+++ b/src/privsep-linux.c
-@@ -29,6 +29,7 @@
- #include <sys/ioctl.h>
- #include <sys/prctl.h>
- #include <sys/syscall.h>
-+#include <sys/termios.h>	/* For TCGETS */
- 
- #include <linux/audit.h>
- #include <linux/filter.h>

diff --git a/net-misc/dhcpcd/files/dhcpcd.initd b/net-misc/dhcpcd/files/dhcpcd.initd
deleted file mode 100644
index b89b785fd23..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd.initd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2007-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-command=/sbin/dhcpcd
-pidfile=/var/run/dhcpcd.pid
-command_args=-q
-name="DHCP Client Daemon"
-
-depend()
-{
-	provide net
-	need localmount
-	use logger network
-	after bootmisc modules
-	before dns
-}

diff --git a/net-misc/dhcpcd/files/dhcpcd.service b/net-misc/dhcpcd/files/dhcpcd.service
deleted file mode 100644
index 8f9ad25e4d0..00000000000
--- a/net-misc/dhcpcd/files/dhcpcd.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Lightweight DHCP client daemon
-Wants=network.target
-Before=network.target network-online.target
-
-[Service]
-Type=forking
-ExecStart=/sbin/dhcpcd -q
-PIDFile=/run/dhcpcd.pid
-# Avoid duplicate output on stderr/syslog
-StandardOutput=null
-StandardError=null
-
-[Install]
-WantedBy=multi-user.target


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

* [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/, net-misc/dhcpcd/files/
@ 2022-06-21  7:51 David Seifert
  0 siblings, 0 replies; 12+ messages in thread
From: David Seifert @ 2022-06-21  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     9c10f8c954825c3e9fadb99b262e84c86ddadf19
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 21 07:50:57 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 07:50:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c10f8c9

net-misc/dhcpcd: drop 9.4.0-r1

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 net-misc/dhcpcd/Manifest                           |   1 -
 net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild             | 160 ---------------------
 .../dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch    |  36 -----
 .../dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch  |  40 ------
 .../dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch  |  55 -------
 5 files changed, 292 deletions(-)

diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 8f429acc35b4..b60aceb199a1 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,2 +1 @@
-DIST dhcpcd-9.4.0.tar.xz 256440 BLAKE2B 16d63e957dbdf49647806ebe69487edc96502f43af8b8b6c6e40311994611d2516e2c839fed41863b8509a0953421091577d4cb202ebda3b300f3b1c761c07ce SHA512 e2cff86564062e8d5f9c8f48f245ffa31406494e2fafadedabc1ba9932b534cbda064783ffdd7fb337544459aba2ef7e9b49ad0973120897dc04159747e8635f
 DIST dhcpcd-9.4.1.tar.xz 257092 BLAKE2B 847c7451918ac89fe384e180ec52ee4624c0f2dc73354ecb4c63b02d8d9cf0a6d164b33e5d083a05d4868079dcf6208a820b4263c80337a12be40a27517ecf87 SHA512 530e6a5bddab4f91bd66f8d47ccd8d6cac4bc2998ddd36da7e257c83270b558016e9e1fc2f815fb99c0d86ed4bbc2a3a1b78788e69fe151fddaf94428a47fa45

diff --git a/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild b/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild
deleted file mode 100644
index a4794b63f7ea..000000000000
--- a/net-misc/dhcpcd/dhcpcd-9.4.0-r1.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2022 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://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://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://github.com/NetworkConfiguration/dhcpcd/
-https://roy.marples.name/projects/dhcpcd/"
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="debug +embedded ipv6 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
deleted file mode 100644
index 61aed69656d3..000000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.4.0-memleak_fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-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-sparc_privsep.patch b/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch
deleted file mode 100644
index a91db28d08c7..000000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.4.0-sparc_privsep.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From dcfd7a23f002793a855156255e81662ef84064d3 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Fri, 5 Feb 2021 09:25:12 +0100
-Subject: [PATCH] src/privsep-linux: fix build on sparc (#26)
-
-Fix the following build failure:
-
-privsep-linux.c:203: warning: "AUDIT_ARCH_SPARC64" redefined
-  203 | #    define AUDIT_ARCH_SPARC64
-      |
-In file included from privsep-linux.c:35:
-/srv/storage/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/linux/audit.h:392: note: this is the location of the previous definition
-  392 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
-      |
-In file included from privsep-linux.c:36:
-privsep-linux.c:215:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'?
-  215 |  BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0),
-      |                                      ^~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- src/privsep-linux.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/privsep-linux.c b/src/privsep-linux.c
-index d00894ab..5c80c1b3 100644
---- a/src/privsep-linux.c
-+++ b/src/privsep-linux.c
-@@ -222,9 +222,9 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
- #  endif
- #elif defined(__sparc__)
- #  if defined(__arch64__)
--#    define AUDIT_ARCH_SPARC64
-+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC64
- #  else
--#    define AUDIT_ARCH_SPARC
-+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC
- #  endif
- #elif defined(__xtensa__)
- #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_XTENSA

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
deleted file mode 100644
index 493e9c342f51..000000000000
--- a/net-misc/dhcpcd/files/dhcpcd-9.4.0-unlink_socket.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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] 12+ messages in thread

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

commit:     df46d37f10f7144857c0d723bced3c79cb0684a6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 17 05:28:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 17 05:28:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df46d37f

net-misc/dhcpcd: backport crash fix ("every 5 days")

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild         | 170 ++++++++++++++++++++++++
 net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch |  46 +++++++
 2 files changed, 216 insertions(+)

diff --git a/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild b/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild
new file mode 100644
index 000000000000..8ccbe2c41a96
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-10.0.6-r2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2024 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
+	"${FILESDIR}"/${PN}-10.0.6-crash.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-crash.patch b/net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch
new file mode 100644
index 000000000000..5b61e3ca37ef
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-10.0.6-crash.patch
@@ -0,0 +1,46 @@
+https://github.com/NetworkConfiguration/dhcpcd/issues/179
+https://github.com/NetworkConfiguration/dhcpcd/issues/283
+https://bugzilla.redhat.com/2262996
+https://github.com/NetworkConfiguration/dhcpcd/commit/727c78f503d456875e2a3cee7609288b537d9d25
+
+From 727c78f503d456875e2a3cee7609288b537d9d25 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
+Date: Fri, 16 Feb 2024 17:15:35 +0100
+Subject: [PATCH] Move dhcp(v4) packet size check earlier (#295)
+
+dhcp_handlebootp handled zero sized packets correctly, but
+dhcp_redirect_dhcp did not have such protection. Move size check before
+both of them. Size when called from dhcp_packet is checked by
+is_packet_udp_bootp call. Only dhcp_recvmsg needs earlier checking to be
+added.
+
+Fixes #283
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -3532,12 +3532,6 @@ dhcp_handlebootp(struct interface *ifp, struct bootp *bootp, size_t len,
+ {
+ 	size_t v;
+ 
+-	if (len < offsetof(struct bootp, vend)) {
+-		logerrx("%s: truncated packet (%zu) from %s",
+-		    ifp->name, len, inet_ntoa(*from));
+-		return;
+-	}
+-
+ 	/* Unlikely, but appeases sanitizers. */
+ 	if (len > FRAMELEN_MAX) {
+ 		logerrx("%s: packet exceeded frame length (%zu) from %s",
+@@ -3670,6 +3664,13 @@ dhcp_recvmsg(struct dhcpcd_ctx *ctx, struct msghdr *msg)
+ 		logerr(__func__);
+ 		return;
+ 	}
++
++	if (iov->iov_len < offsetof(struct bootp, vend)) {
++		logerrx("%s: truncated packet (%zu) from %s",
++		    ifp->name, iov->iov_len, inet_ntoa(from->sin_addr));
++		return;
++	}
++
+ 	state = D_CSTATE(ifp);
+ 	if (state == NULL) {
+ 		/* Try re-directing it to another interface. */


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

end of thread, other threads:[~2024-02-17  5:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21 10:33 [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/, net-misc/dhcpcd/files/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2024-02-17  5:30 Sam James
2022-06-21  7:51 David Seifert
2021-05-23 11:48 David Seifert
2021-03-31 19:59 Lars Wendler
2021-03-17  8:21 Lars Wendler
2020-06-05 10:25 Lars Wendler
2020-05-21  2:04 Mike Gilbert
2020-04-02 20:01 Lars Wendler
2019-09-04 15:28 Lars Wendler
2019-05-07 11:19 Lars Wendler
2016-04-18 17:48 William Hubbs

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