From 6fb0cd0559d03abd3ffe4564ead728028c318b58 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 10 Oct 2018 01:07:23 +0300 Subject: [PATCH] Fix patch: use sed to change hardcoded paths --- dhcp-patchs.patch | 11 ----------- dhcp.spec | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 dhcp-patchs.patch diff --git a/dhcp-patchs.patch b/dhcp-patchs.patch deleted file mode 100644 index db2905f..0000000 --- a/dhcp-patchs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- includes/dhcpd.h.orig 2018-10-09 23:57:26.022826271 +0300 -+++ includes/dhcpd.h 2018-10-09 23:57:49.108813082 +0300 -@@ -1568,7 +1568,7 @@ - #endif - - #ifndef _PATH_DHCLIENT_SCRIPT --#define _PATH_DHCLIENT_SCRIPT "/sbin/dhclient-script" -+#define _PATH_DHCLIENT_SCRIPT "/usr/sbin/dhclient-script" - #endif - - #ifndef _PATH_DHCLIENT_PID diff --git a/dhcp.spec b/dhcp.spec index 7c9e867..b5aee72 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -36,7 +36,6 @@ Source100: ROSA-NEWS Patch17: dhcp-4.2.0-add_timeout_when_NULL.patch Patch18: dhcp-4.3.0-64_bit_lease_parse.patch Patch19: Arch-0002-iproute2.patch -Patch20: dhcp-patchs.patch # Starting from dhcp 4.x built in Bind libs are used #BuildRequires: bind-devel @@ -168,7 +167,8 @@ pushd bind ; tar -xvf bind.tar.gz >/dev/null ; popd %patch18 -p1 -b .64-bit_lease_parse # change ipconfig to modern ip (from Arch) %patch19 -p1 -%patch20 -p0 +# change hardcoded path /sbin/dhclient-script to /usr/sbin/dhclient-script +sed -i 'includes/dhcpd.h' -e 's,/sbin/dhclient-script,/usr/sbin/dhclient-script,g' || true %build %serverbuild_hardened