summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-07-28 14:07:47 +0200
committerLars Wendler <polynomial-c@gentoo.org>2019-07-28 14:07:47 +0200
commit6cae10d027eea537089030d23fdfce63c4206952 (patch)
tree90da92b155e0403e4ec7b3c2142f9b4fed3b5b69 /net-misc/dhcpcd
parentnet-misc/dhcpcd: Removed old. (diff)
downloadgentoo-6cae10d027eea537089030d23fdfce63c4206952.tar.gz
gentoo-6cae10d027eea537089030d23fdfce63c4206952.tar.bz2
gentoo-6cae10d027eea537089030d23fdfce63c4206952.zip
net-misc/dhcpcd: Revbump to add two upstream fixes
- script: ensure that tmp files are removed - configure: Fix test for open_memstream Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-misc/dhcpcd')
-rw-r--r--net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild (renamed from net-misc/dhcpcd/dhcpcd-8.0.1.ebuild)5
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch34
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch27
3 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/dhcpcd/dhcpcd-8.0.1.ebuild b/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
index 491c778680e3..6f8f030328ef 100644
--- a/net-misc/dhcpcd/dhcpcd-8.0.1.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-8.0.1-r1.ebuild
@@ -27,6 +27,11 @@ COMMON_DEPEND="udev? ( virtual/udev )"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${P}-delete_tmpfiles.patch"
+ "${FILESDIR}/${P}-fix_check_for_open_memstream.patch"
+)
+
src_configure() {
local myeconfargs=(
--dbdir="${EPREFIX}/var/lib/dhcpcd"
diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
new file mode 100644
index 000000000000..0bc625ac11d0
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-8.0.1-delete_tmpfiles.patch
@@ -0,0 +1,34 @@
+From 79846b358f6ea8d0a6027ee0ba38342a730065b0 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 28 Jul 2019 11:49:17 +0100
+Subject: script: ensure that tmp files are removed
+
+fopen creates a new stream which will use a new fd.
+Why using fdopen, the new stream will use the same fd, so when
+it's closed the tmp file will really unlink.
+---
+ src/script.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/script.c b/src/script.c
+index 1863a661..74aef1b1 100644
+--- a/src/script.c
++++ b/src/script.c
+@@ -213,10 +213,11 @@ make_env(const struct interface *ifp, const char *reason)
+ if (tmpfd == -1)
+ goto eexit;
+ unlink(tmpfile);
+- fp = fopen(tmpfile, "w+");
+- close(tmpfd);
+- if (fp == NULL)
++ fp = fdopen(tmpfd, "w+");
++ if (fp == NULL) {
++ close(tmpfd);
+ goto eexit;
++ }
+ #endif
+
+ #ifdef INET
+--
+cgit v1.2.1
+
diff --git a/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch b/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
new file mode 100644
index 000000000000..89ed2afa9871
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-8.0.1-fix_check_for_open_memstream.patch
@@ -0,0 +1,27 @@
+From fa7f0d1e0a57bfaca49e1cfdc3d292ef1d68001a Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Sun, 28 Jul 2019 12:53:03 +0100
+Subject: configure: Fix test for open_memstream
+
+glibc-2.19 needs the return value testing....
+---
+ configure | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index d25eec56..50058520 100755
+--- a/configure
++++ b/configure
+@@ -747,8 +747,7 @@ if [ -z "$OPEN_MEMSTREAM" ]; then
+ cat <<EOF >_open_memstream.c
+ #include <stdio.h>
+ int main(void) {
+- open_memstream(NULL, NULL);
+- return 0;
++ return open_memstream(NULL, NULL) != NULL ? 0 : 1;
+ }
+ EOF
+ if $XCC _open_memstream.c -o _open_memstream 2>&3; then
+--
+cgit v1.2.1
+