diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
commit | feb0daf81d888e9160f9f94502de09b66f2a63fd (patch) | |
tree | b6e5c40ce2abef3da27ed50a023153f475e0ddef /net-misc/dhcpcd/files | |
parent | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff) |
gentoo resync : 21.06.2020
Diffstat (limited to 'net-misc/dhcpcd/files')
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch | 43 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch | 49 |
2 files changed, 49 insertions, 43 deletions
diff --git a/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch b/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch deleted file mode 100644 index 10e8520116f5..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-9.1.1-embedded_config.patch +++ /dev/null @@ -1,43 +0,0 @@ -From fa1cd0004e0d3267a1217ada46e53df38824da2d Mon Sep 17 00:00:00 2001 -From: Roy Marples <roy@marples.name> -Date: Thu, 4 Jun 2020 21:49:37 +0100 -Subject: Fix installing the embedded config as a file. - ---- - src/if-options.c | 4 ++-- - src/privsep-root.c | 4 ++++ - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/if-options.c b/src/if-options.c -index 212e71d8..3dde04bf 100644 ---- a/src/if-options.c -+++ b/src/if-options.c -@@ -2366,8 +2366,8 @@ read_config(struct dhcpcd_ctx *ctx, - return ifo; - } - if (buf[buflen - 1] != '\0') { -- if (buflen < sizeof(buf) - 1) -- bulen++; -+ if ((size_t)buflen < sizeof(buf) - 1) -+ buflen++; - buf[buflen - 1] = '\0'; - } - #else -diff --git a/src/privsep-root.c b/src/privsep-root.c -index fdf43856..512dfcc0 100644 ---- a/src/privsep-root.c -+++ b/src/privsep-root.c -@@ -297,6 +297,10 @@ ps_root_validpath(const struct dhcpcd_ctx *ctx, uint16_t cmd, const char *path) - return false; - - if (cmd == PS_READFILE) { -+#ifdef EMBEDDED_CONFIG -+ if (strcmp(ctx->cffile, EMBEDDED_CONFIG) == 0) -+ return true; -+#endif - if (strcmp(ctx->cffile, path) == 0) - return true; - } --- -cgit v1.2.3 - diff --git a/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch b/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch new file mode 100644 index 000000000000..5401317a2ece --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch @@ -0,0 +1,49 @@ +From 9dc6d4b7c8df8425c9b1e893e86b8463abb2053c Mon Sep 17 00:00:00 2001 +From: Roy Marples <roy@marples.name> +Date: Mon, 15 Jun 2020 22:04:37 +0100 +Subject: configure: Fix fallout with disabling embedded config + +--- + configure | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/configure b/configure +index 8398ad69..a3701726 100755 +--- a/configure ++++ b/configure +@@ -545,15 +545,6 @@ if [ -z "$AUTH" -o "$AUTH" = yes ]; then + echo "SRCS+= auth.c" >>$CONFIG_MK + fi + +-if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then +- echo "$DHCPCD_DEFS will be embedded in dhcpcd itself" +- echo "DHCPCD_SRCS+= dhcpcd-embedded.c" >>$CONFIG_MK +-else +- echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR" +- echo "CPPFLAGS+= -DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK +- echo "EMBEDDEDINSTALL= _embeddedinstall" >>$CONFIG_MK +-fi +- + if [ -z "$PRIVSEP" ]; then + # privilege separation works fine .... except on Solaris + case "$OS" in +@@ -665,6 +656,16 @@ EOF + rm -f _pledge.c _pledge + fi + ++# This block needs to be after the compiler test due to embedded quotes. ++if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then ++ echo "$DHCPCD_DEFS will be embedded in dhcpcd itself" ++ echo "DHCPCD_SRCS+= dhcpcd-embedded.c" >>$CONFIG_MK ++else ++ echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR" ++ echo "CPPFLAGS+= -DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK ++ echo "EMBEDDEDINSTALL= _embeddedinstall" >>$CONFIG_MK ++fi ++ + if [ "$OS" = linux ]; then + printf "Testing for nl80211 ... " + cat <<EOF >_nl80211.c +-- +cgit v1.2.3 + |