Refactor patches for dhcp package.
Use dhcp-config package to package config files for dhcp package. Rename files folder to patches Removed site.h which is not used Deployment test and ping test between VMs pass config and script files check pass. Story: 2003768 Task: 27582 Change-Id: Ib7fd3c0ed6d706f89d08890e90ccee42673b3679 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
parent
6a6ea416e1
commit
ffe029ef99
2
base/dhcp-config/centos/build_srpm.data
Normal file
2
base/dhcp-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=1
|
36
base/dhcp-config/centos/dhcp-config.spec
Normal file
36
base/dhcp-config/centos/dhcp-config.spec
Normal file
@ -0,0 +1,36 @@
|
||||
# Where dhcp configuration files are stored
|
||||
%global dhcpconfdir %{_sysconfdir}/dhcp
|
||||
|
||||
Summary: dhcp-config
|
||||
Name: dhcp-config
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
License: Apache-2.0
|
||||
Group: base
|
||||
Packager: StarlingX
|
||||
URL: unknown
|
||||
BuildArch: noarch
|
||||
Source: %name-%version.tar.gz
|
||||
|
||||
Requires: dhclient
|
||||
Summary: package StarlingX configuration files of dhcp to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of dhcp to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}%{dhcpconfdir}
|
||||
%{__install} -p -m 0755 dhclient-enter-hooks %{buildroot}%{dhcpconfdir}/dhclient-enter-hooks
|
||||
%{__install} -p -m 0644 dhclient.conf %{buildroot}%{dhcpconfdir}/dhclient.conf
|
||||
|
||||
%post
|
||||
|
||||
%files
|
||||
%config(noreplace) %{dhcpconfdir}/dhclient.conf
|
||||
%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
@ -1,2 +1 @@
|
||||
COPY_LIST="$FILES_BASE/*"
|
||||
TIS_PATCH_VER=8
|
||||
TIS_PATCH_VER=9
|
||||
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* define config file location in ${S}/includes/site.h
|
||||
* still need to take care of installation path (${sysconfdir}/dhcpd.conf)
|
||||
*
|
||||
* 7/22/2010 - qhe
|
||||
*/
|
||||
|
||||
/* Define this if you want DNS update functionality to be available. */
|
||||
|
||||
/* Enabling the DNS update functionality results in the creation of
|
||||
two UDP sockets with random high port numbers, but these numbers
|
||||
appear to ignore the configured net.ipv4.ip_local_port_range values.
|
||||
As a result, there's potential for collision with ports reserved
|
||||
for platform services.
|
||||
Given that this functionality is not being used, disable it from
|
||||
the build. */
|
||||
#undef NSUPDATE
|
||||
|
||||
/* Define this if you aren't debugging and you want to save memory
|
||||
(potentially a _lot_ of memory) by allocating leases in chunks rather
|
||||
than one at a time. */
|
||||
|
||||
#define COMPACT_LEASES
|
||||
|
||||
|
||||
/* local */
|
||||
#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
||||
#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
@ -1,7 +1,4 @@
|
||||
spec-include-TiS-patches.patch
|
||||
spec-dhcp-enter-hooks.patch
|
||||
remove-unecessary-dhcp-exit-hooks-file.patch
|
||||
dhclient-dhcp6-set-hostname.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
mark-dhclient.conf-as-config.patch
|
||||
dhclient-disable-NSUPDATE.patch
|
||||
|
@ -11,7 +11,7 @@ diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
|
||||
index fc17edb..b0a385e 100644
|
||||
--- a/SPECS/dhcp.spec
|
||||
+++ b/SPECS/dhcp.spec
|
||||
@@ -122,6 +122,7 @@ Patch103: dhclient-ipv6-bind-to-interface.patch
|
||||
@@ -118,6 +118,7 @@ Patch103: dhclient-ipv6-bind-to-interface.patch
|
||||
Patch104: dhclient-ipv6-conditionally-set-hostname.patch
|
||||
Patch105: dhclient-handle-wrs-install-uuid.patch
|
||||
Patch106: dhclient-dhcp6-wrs-install-uuid.patch
|
||||
@ -19,7 +19,7 @@ index fc17edb..b0a385e 100644
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@@ -458,6 +459,7 @@ rm -rf includes/isc-dhcp
|
||||
@@ -454,6 +455,7 @@ rm -rf includes/isc-dhcp
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
@ -27,7 +27,7 @@ index fc17edb..b0a385e 100644
|
||||
|
||||
# Update paths in all man pages
|
||||
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
||||
@@ -479,6 +481,7 @@ done
|
||||
@@ -475,6 +477,7 @@ done
|
||||
#libtoolize --copy --force
|
||||
autoreconf --verbose --force --install
|
||||
|
||||
@ -35,7 +35,7 @@ index fc17edb..b0a385e 100644
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
%configure \
|
||||
--with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \
|
||||
@@ -493,6 +496,7 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
@@ -489,6 +492,7 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
--with-ldap \
|
||||
--with-ldapcrypto \
|
||||
--with-libbind=%{_includedir} --with-libbind-libs=%{_libdir} \
|
||||
|
@ -1,25 +0,0 @@
|
||||
From fd8de766f09dd6cb836b7f9823eaa0ad17eaf2d3 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 15:25:05 -0400
|
||||
Subject: WRS: mark-dhclient.conf-as-config.patch
|
||||
|
||||
---
|
||||
SPECS/dhcp.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
|
||||
index 70c7a6d..fc17edb 100644
|
||||
--- a/SPECS/dhcp.spec
|
||||
+++ b/SPECS/dhcp.spec
|
||||
@@ -722,7 +722,7 @@ done
|
||||
%attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz
|
||||
|
||||
# WRS
|
||||
-%{dhcpconfdir}/dhclient.conf
|
||||
+%config(noreplace) %{dhcpconfdir}/dhclient.conf
|
||||
%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
||||
%files common
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 238c53632f948d293cbcfb4c92fba29096808080 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 15:25:05 -0400
|
||||
Subject: WRS: remove-unecessary-dhcp-exit-hooks-file.patch
|
||||
|
||||
---
|
||||
SPECS/dhcp.spec | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
|
||||
index fd66dc4..42409f6 100644
|
||||
--- a/SPECS/dhcp.spec
|
||||
+++ b/SPECS/dhcp.spec
|
||||
@@ -40,10 +40,10 @@ Source9: azure-cloud.sh
|
||||
Source10: README.scripts
|
||||
|
||||
# WRS
|
||||
-Source20: dhclient-exit-hooks
|
||||
Source21: dhclient.conf
|
||||
Source22: dhclient-enter-hooks
|
||||
|
||||
+
|
||||
Patch0: dhcp-4.2.0-errwarn-message.patch
|
||||
Patch1: dhcp-4.2.4-dhclient-options.patch
|
||||
Patch2: dhcp-4.2.0-release-by-ifup.patch
|
||||
@@ -603,7 +603,6 @@ EOF
|
||||
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
||||
|
||||
# WRS: Overwrite with our config
|
||||
-%{__install} -p -m 0755 %{SOURCE20} %{buildroot}%{dhcpconfdir}/dhclient-exit-hooks
|
||||
%{__install} -p -m 0644 %{SOURCE21} %{buildroot}%{dhcpconfdir}/dhclient.conf
|
||||
%{__install} -p -m 0755 %{SOURCE22} %{buildroot}%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
||||
@@ -723,7 +722,6 @@ done
|
||||
%attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz
|
||||
|
||||
# WRS
|
||||
-%{dhcpconfdir}/dhclient-exit-hooks
|
||||
%{dhcpconfdir}/dhclient.conf
|
||||
%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 79b8e2f34a5746e43e64e375c4fbf236de064c63 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 15:25:05 -0400
|
||||
Subject: WRS: spec-dhcp-enter-hooks.patch
|
||||
|
||||
---
|
||||
SPECS/dhcp.spec | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
|
||||
index 904e3ad..fd66dc4 100644
|
||||
--- a/SPECS/dhcp.spec
|
||||
+++ b/SPECS/dhcp.spec
|
||||
@@ -42,7 +42,7 @@ Source10: README.scripts
|
||||
# WRS
|
||||
Source20: dhclient-exit-hooks
|
||||
Source21: dhclient.conf
|
||||
-
|
||||
+Source22: dhclient-enter-hooks
|
||||
|
||||
Patch0: dhcp-4.2.0-errwarn-message.patch
|
||||
Patch1: dhcp-4.2.4-dhclient-options.patch
|
||||
@@ -605,6 +605,7 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
||||
# WRS: Overwrite with our config
|
||||
%{__install} -p -m 0755 %{SOURCE20} %{buildroot}%{dhcpconfdir}/dhclient-exit-hooks
|
||||
%{__install} -p -m 0644 %{SOURCE21} %{buildroot}%{dhcpconfdir}/dhclient.conf
|
||||
+%{__install} -p -m 0755 %{SOURCE22} %{buildroot}%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
||||
%pre
|
||||
# /usr/share/doc/setup/uidgid
|
||||
@@ -724,6 +725,7 @@ done
|
||||
# WRS
|
||||
%{dhcpconfdir}/dhclient-exit-hooks
|
||||
%{dhcpconfdir}/dhclient.conf
|
||||
+%{dhcpconfdir}/dhclient-enter-hooks
|
||||
|
||||
%files common
|
||||
%doc LICENSE README RELNOTES doc/References.txt
|
||||
--
|
||||
2.7.4
|
||||
|
@ -11,17 +11,6 @@ diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec
|
||||
index 14da097..904e3ad 100644
|
||||
--- a/SPECS/dhcp.spec
|
||||
+++ b/SPECS/dhcp.spec
|
||||
@@ -39,6 +39,10 @@ Source8: dhcrelay.service
|
||||
Source9: azure-cloud.sh
|
||||
Source10: README.scripts
|
||||
|
||||
+# WRS
|
||||
+Source20: dhclient-exit-hooks
|
||||
+Source21: dhclient.conf
|
||||
+
|
||||
|
||||
Patch0: dhcp-4.2.0-errwarn-message.patch
|
||||
Patch1: dhcp-4.2.4-dhclient-options.patch
|
||||
@@ -111,6 +115,14 @@ Patch70: dhcp-4.2.5-reference_count_overflow.patch
|
||||
Patch71: dhcp-4.2.5-centos-branding.patch
|
||||
|
||||
@ -52,28 +41,6 @@ index 14da097..904e3ad 100644
|
||||
# Update paths in all man pages
|
||||
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
||||
client/dhclient-script.8 client/dhclient.8 ; do
|
||||
@@ -582,6 +602,10 @@ EOF
|
||||
# Don't package libtool *.la files
|
||||
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
||||
|
||||
+# WRS: Overwrite with our config
|
||||
+%{__install} -p -m 0755 %{SOURCE20} %{buildroot}%{dhcpconfdir}/dhclient-exit-hooks
|
||||
+%{__install} -p -m 0644 %{SOURCE21} %{buildroot}%{dhcpconfdir}/dhclient.conf
|
||||
+
|
||||
%pre
|
||||
# /usr/share/doc/setup/uidgid
|
||||
%global gid_uid 177
|
||||
@@ -697,6 +721,10 @@ done
|
||||
%attr(0644,root,root) %{_mandir}/man8/dhclient.8.gz
|
||||
%attr(0644,root,root) %{_mandir}/man8/dhclient-script.8.gz
|
||||
|
||||
+# WRS
|
||||
+%{dhcpconfdir}/dhclient-exit-hooks
|
||||
+%{dhcpconfdir}/dhclient.conf
|
||||
+
|
||||
%files common
|
||||
%doc LICENSE README RELNOTES doc/References.txt
|
||||
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
@ -181,6 +181,7 @@ nfs-utils
|
||||
# dhcp
|
||||
dhcp
|
||||
dhclient
|
||||
dhcp-config
|
||||
|
||||
# openssh
|
||||
openssh
|
||||
|
@ -7,6 +7,7 @@ ldap/nss-pam-ldapd
|
||||
base/centos-release
|
||||
filesystem/nfs-utils
|
||||
base/dhcp
|
||||
base/dhcp-config
|
||||
base/openssh
|
||||
config/facter
|
||||
virt/qemu
|
||||
|
Loading…
Reference in New Issue
Block a user