From 4772b5af3aaa909bb052ecf3bdad440f1b45b65c Mon Sep 17 00:00:00 2001 From: "Martin, Chen" Date: Sat, 5 Jan 2019 22:51:47 +0800 Subject: [PATCH] rebase systemd patch to CentOS 7.6 version Test: Build pass with build pkgs and build iso, and then build rpms for installer, update installer and rebuild iso again. And deploy multi-node test pass. Depends-On: https://review.openstack.org/628732/ Story: 2004522 Task: 28439 Change-Id: I58affb58f08254dc82695bc524c964f01bf10c69 Signed-off-by: Martin, Chen --- base/systemd-config/centos/systemd-config.spec | 2 +- ...ons-of-systemd-post-from-running-on-pat.patch | 16 ++++++++-------- .../fix-build-error-for-unused-variable.patch | 4 ++-- .../spec-millisec-in-syslog-date.patch | 10 ++++------ ...pdate-package-versioning-for-TIS-format.patch | 6 ++---- .../0701-inject-millisec-in-syslog-date.patch | 2 +- ...702-fix-build-error-for-unused-variable.patch | 2 +- base/systemd/centos/srpm_path | 2 +- 8 files changed, 20 insertions(+), 24 deletions(-) diff --git a/base/systemd-config/centos/systemd-config.spec b/base/systemd-config/centos/systemd-config.spec index 7f5d2bdc2..0a4d999fa 100644 --- a/base/systemd-config/centos/systemd-config.spec +++ b/base/systemd-config/centos/systemd-config.spec @@ -9,7 +9,7 @@ URL: unknown Source: %name-%version.tar.gz BuildArch: noarch -BuildRequires: systemd = 219-57.el7 +BuildRequires: systemd = 219-62.el7 Requires: systemd %define debug_package %{nil} diff --git a/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch b/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch index ad017c539..31bfcf071 100644 --- a/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch +++ b/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch @@ -12,36 +12,36 @@ diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 6e1d7e1..6a04c16 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec -@@ -1159,6 +1159,7 @@ fi +@@ -1213,6 +1213,7 @@ fi rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || : rm -f /etc/sysconfig/keyboard >/dev/null 2>&1 || : - + +if [ $1 -eq 1 ]; then # Migrate HOSTNAME= from /etc/sysconfig/network if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then unset HOSTNAME -@@ -1166,6 +1167,7 @@ if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then +@@ -1220,6 +1221,7 @@ if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then [ -n "$HOSTNAME" ] && echo $HOSTNAME > /etc/hostname 2>&1 || : fi sed -i '/^HOSTNAME=/d' /etc/sysconfig/network >/dev/null 2>&1 || : +fi - + # Migrate the old systemd-setup-keyboard X11 configuration fragment if [ ! -e /etc/X11/xorg.conf.d/00-keyboard.conf ] ; then -@@ -1174,6 +1176,7 @@ else +@@ -1228,6 +1230,7 @@ else rm -f /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf >/dev/null 2>&1 || : fi - + +if [ 1 -eq 0 ] ; then # TIS: Skip this. We don't want myhostname in nsswitch.conf # sed-fu to add myhostname to the hosts line of /etc/nsswitch.conf # Only do that when installing, not when updating. if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then -@@ -1183,6 +1186,7 @@ if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then +@@ -1237,6 +1240,7 @@ if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then s/[[:blank:]]*$/ myhostname/ ' /etc/nsswitch.conf >/dev/null 2>&1 || : fi +fi - + %posttrans # Convert old /etc/sysconfig/desktop settings -- diff --git a/base/systemd/centos/meta_patches/fix-build-error-for-unused-variable.patch b/base/systemd/centos/meta_patches/fix-build-error-for-unused-variable.patch index 0bbf2bb87..6bfa730ed 100644 --- a/base/systemd/centos/meta_patches/fix-build-error-for-unused-variable.patch +++ b/base/systemd/centos/meta_patches/fix-build-error-for-unused-variable.patch @@ -12,8 +12,8 @@ diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index ffd0770..3f7cc10 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec -@@ -655,6 +655,7 @@ Patch0613: 0613-sd-journal-when-picking-up-a-new-file-compare-inode-.patch - +@@ -706,6 +706,7 @@ Patch0664: 0664-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch + #WRS Patches Patch0701: 0701-inject-millisec-in-syslog-date.patch +Patch0702: 0702-fix-build-error-for-unused-variable.patch diff --git a/base/systemd/centos/meta_patches/spec-millisec-in-syslog-date.patch b/base/systemd/centos/meta_patches/spec-millisec-in-syslog-date.patch index 816ec84fe..f7557a689 100644 --- a/base/systemd/centos/meta_patches/spec-millisec-in-syslog-date.patch +++ b/base/systemd/centos/meta_patches/spec-millisec-in-syslog-date.patch @@ -3,8 +3,6 @@ From: Scott Little Date: Mon, 2 Oct 2017 17:53:00 -0400 Subject: [PATCH] WRS: 0005-spec-millisec-in-syslog-date.patch -Conflicts: - SPECS/systemd.spec --- SPECS/systemd.spec | 3 +++ 1 file changed, 3 insertions(+) @@ -13,10 +11,10 @@ diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 6a04c16..845d1dd 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec -@@ -653,6 +653,9 @@ Patch0611: 0611-sd-journal-make-sure-it-s-safe-to-call-sd_journal_pr.patch - Patch0612: 0612-journalctl-Periodically-call-sd_journal_process-in-j.patch - Patch0613: 0613-sd-journal-when-picking-up-a-new-file-compare-inode-.patch - +@@ -704,6 +704,9 @@ Patch0662: 0662-cryptsetup-generator-don-t-return-error-if-target-di.patch + Patch0663: 0663-cryptsetup-generator-allow-whitespace-characters-in-.patch + Patch0664: 0664-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch + +#WRS Patches +Patch0701: 0701-inject-millisec-in-syslog-date.patch + diff --git a/base/systemd/centos/meta_patches/update-package-versioning-for-TIS-format.patch b/base/systemd/centos/meta_patches/update-package-versioning-for-TIS-format.patch index 840b70600..76e89c68f 100644 --- a/base/systemd/centos/meta_patches/update-package-versioning-for-TIS-format.patch +++ b/base/systemd/centos/meta_patches/update-package-versioning-for-TIS-format.patch @@ -3,8 +3,6 @@ From: Scott Little Date: Mon, 2 Oct 2017 17:53:00 -0400 Subject: [PATCH] WRS: 0001-update-package-versioning-for-TIS-format.patch -Conflicts: - SPECS/systemd.spec --- SPECS/systemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -17,8 +15,8 @@ index 6bdbb74..3b2aa7f 100644 Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 219 --Release: 57%{?dist} -+Release: 57.el7%{?_tis_dist}.%{tis_patch_ver} +-Release: 62%{?dist} ++Release: 62.el7%{?_tis_dist}.%{tis_patch_ver} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager diff --git a/base/systemd/centos/patches/0701-inject-millisec-in-syslog-date.patch b/base/systemd/centos/patches/0701-inject-millisec-in-syslog-date.patch index 5ac344023..5eee0f141 100644 --- a/base/systemd/centos/patches/0701-inject-millisec-in-syslog-date.patch +++ b/base/systemd/centos/patches/0701-inject-millisec-in-syslog-date.patch @@ -56,7 +56,7 @@ index 4e118aa..85cdeb9 100644 static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, const struct ucred *ucred, const struct timeval *tv) { static const union sockaddr_union sa = { -@@ -143,13 +181,11 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons +@@ -145,13 +183,11 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons xsprintf(header_priority, "<%i>", priority); IOVEC_SET_STRING(iovec[n++], header_priority); diff --git a/base/systemd/centos/patches/0702-fix-build-error-for-unused-variable.patch b/base/systemd/centos/patches/0702-fix-build-error-for-unused-variable.patch index 302f299b9..8d31d8946 100644 --- a/base/systemd/centos/patches/0702-fix-build-error-for-unused-variable.patch +++ b/base/systemd/centos/patches/0702-fix-build-error-for-unused-variable.patch @@ -12,7 +12,7 @@ diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c index 33062ea..fd4e070 100644 --- a/src/journal/journald-syslog.c +++ b/src/journal/journald-syslog.c -@@ -165,8 +165,6 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons +@@ -167,8 +167,6 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons char header_priority[DECIMAL_STR_MAX(priority) + 3], header_time[64], header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t) + 1]; int n = 0; diff --git a/base/systemd/centos/srpm_path b/base/systemd/centos/srpm_path index 712c49fb3..bc2313e45 100644 --- a/base/systemd/centos/srpm_path +++ b/base/systemd/centos/srpm_path @@ -1 +1 @@ -mirror:Source/systemd-219-57.el7.src.rpm +mirror:Source/systemd-219-62.el7.src.rpm