CentOS 8: Upgrade systemd to version 239

(1)Release Version Upgrade
(2)Matching code changes with el7 to el8
(3)Delete patch: "803-Fix-compile-failure-due-to-deprecated-value.patch"
As systemd.239.el8.src.rpm has already merge the patch info
about 803-Fix-compile-failure-due-to-deprecated-value.patch, delete it.

Story: 2006729
Task: 37677
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Change-Id: I8fd38569e585fdd3b61f35d985e0282f82b81364
Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
LongLi 2019-11-25 11:21:08 +08:00 committed by Long Li
parent 9035cd1be8
commit 66cbfeabc7
7 changed files with 50 additions and 145 deletions

View File

@ -7,26 +7,25 @@ Date: Wed, 20 Nov 2019 10:59:45 -0500
Subject: [PATCH 3/3] Add STX patches
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
SPECS/systemd.spec | 5 +++++
1 file changed, 5 insertions(+)
SPECS/systemd.spec | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec
index 4c83150..e1e98bb 100644
index 34d7c59..6885233 100644
--- a/SPECS/systemd.spec
+++ b/SPECS/systemd.spec
@@ -786,6 +786,11 @@ Patch0744: 0744-selinux-don-t-log-SELINUX_INFO-and-SELINUX_WARNING-m.patch
Patch0745: 0745-fix-mis-merge.patch
Patch0746: 0746-fs-util-chase_symlinks-prevent-double-free.patch
@@ -146,6 +146,9 @@ Patch0093: 0093-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch
Patch0094: 0094-sd-bus-if-we-receive-an-invalid-dbus-message-ignore-.patch
Patch0095: 0095-Revert-core-one-step-back-again-for-nspawn-we-actual.patch
+# STX Patches
+Patch0801: 801-inject-millisec-in-syslog-date.patch
+Patch0802: 802-fix-build-error-for-unused-variable.patch
+Patch0803: 803-Fix-compile-failure-due-to-deprecated-value.patch
+
Patch9999: 9999-Update-kernel-install-script-by-backporting-fedora-p.patch
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
%ifarch %{ix86} x86_64 aarch64
%global have_gnu_efi 1
--
1.8.3.1
2.7.4

View File

@ -7,46 +7,31 @@ Date: Mon, 2 Oct 2017 17:53:00 -0400
Subject: [PATCH 2/3] Protect sections of systemd post from running on patch
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
SPECS/systemd.spec | 4 ++++
1 file changed, 4 insertions(+)
SPECS/systemd.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec
index 16262fb..4c83150 100644
index fbb016f..34d7c59 100644
--- a/SPECS/systemd.spec
+++ b/SPECS/systemd.spec
@@ -1297,6 +1297,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
@@ -1304,6 +1305,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
@@ -1312,6 +1314,7 @@ else
rm -f /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf >/dev/null 2>&1 || :
fi
@@ -648,6 +648,7 @@ function mod_nss() {
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
@@ -1321,6 +1324,7 @@ if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then
s/[[:blank:]]*$/ myhostname/
' /etc/nsswitch.conf >/dev/null 2>&1 || :
FILE="$(readlink /etc/nsswitch.conf || echo /etc/nsswitch.conf)"
mod_nss "$FILE"
@@ -658,6 +659,7 @@ else
# possible future authselect configuration
mod_nss "/etc/authselect/user-nsswitch.conf"
fi
+fi
%posttrans
# Convert old /etc/sysconfig/desktop settings
# check if nobody or nfsnobody is defined
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
--
1.8.3.1
2.7.4

View File

@ -5,23 +5,24 @@ Date: Mon, 2 Oct 2017 17:53:00 -0400
Subject: [PATCH 1/3] update package versioning for STX
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
SPECS/systemd.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec
index b1ffe88..16262fb 100644
index cc816d2..fbb016f 100644
--- a/SPECS/systemd.spec
+++ b/SPECS/systemd.spec
@@ -7,7 +7,7 @@
@@ -13,7 +13,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 219
-Release: 67%{?dist}
+Release: 67.el7%{?_tis_dist}.%{tis_patch_ver}
Version: 239
-Release: 13%{?dist}.5
+Release: 13.el8_0.5%{?_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
Summary: System and Service Manager
--
1.8.3.1
2.7.4

View File

@ -5,15 +5,16 @@ Date: Tue, 8 Nov 2016 17:06:01 -0500
Subject: [PATCH 1/3] inject millisec in syslog date
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
src/journal/journald-syslog.c | 48 +++++++++++++++++++++++++++++++++++++------
1 file changed, 42 insertions(+), 6 deletions(-)
src/journal/journald-syslog.c | 47 +++++++++++++++++++++++++++++++++++++------
1 file changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 1a9db59..36288cb 100644
index 97711ac..2149b20 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -35,6 +35,44 @@
@@ -25,6 +25,44 @@
/* Warn once every 30s if we missed syslog message */
#define WARN_FORWARD_SYSLOG_MISSED_USEC (30 * USEC_PER_SEC)
@ -58,11 +59,9 @@ index 1a9db59..36288cb 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 = {
@@ -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);
@@ -133,12 +171,9 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons
iovec[n++] = IOVEC_MAKE_STRING(header_priority);
+
/* Second: timestamp */
- t = tv ? tv->tv_sec : ((time_t) (now(CLOCK_REALTIME) / USEC_PER_SEC));
- tm = localtime(&t);
@ -73,9 +72,9 @@ index 1a9db59..36288cb 100644
+ if (formatSyslogDate(header_time, sizeof(header_time), tv) <=0 )
+ return;
+
IOVEC_SET_STRING(iovec[n++], header_time);
iovec[n++] = IOVEC_MAKE_STRING(header_time);
/* Third: identifier and PID */
--
1.8.3.1
2.7.4

View File

@ -8,23 +8,24 @@ Subject: [PATCH 2/3] fix build error for unused variable
Signed-off-by: slin14 <shuicheng.lin@intel.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Long Li <lilong-neu@neusoft.com>
---
src/journal/journald-syslog.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 36288cb..2e49b4c 100644
index 2149b20..23e66b2 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -167,8 +167,6 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons
@@ -154,8 +154,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];
header_pid[STRLEN("[]: ") + DECIMAL_STR_MAX(pid_t) + 1];
int n = 0;
- time_t t;
- struct tm *tm;
char *ident_buf = NULL;
_cleanup_free_ char *ident_buf = NULL;
assert(s);
--
1.8.3.1
2.7.4

View File

@ -1,80 +0,0 @@
From 339ea8b005c037eaad217dfd3cc10b2b110bdd28 Mon Sep 17 00:00:00 2001
Message-Id: <339ea8b005c037eaad217dfd3cc10b2b110bdd28.1574264572.git.Jim.Somerville@windriver.com>
In-Reply-To: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com>
References: <8b63ddb68a39d48ebb621d76a2b1f07f5ff67ac7.1574264572.git.Jim.Somerville@windriver.com>
From: Shuicheng Lin <shuicheng.lin@intel.com>
Date: Tue, 2 Apr 2019 16:43:03 +0000
Subject: [PATCH 3/3] Fix compile failure due to deprecated value
Issue occur after upgrade build tool chain. Fix it per tool chain's
suggestion.
Error message is like below:
"
Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated,
use MHD_HTTP_PAYLOAD_TOO_LARGE [-Werror]
Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated,
use MHD_HTTP_NOT_ACCEPTABLE [-Werror]
"
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Signed-off-by: Mawrer Ramirez <mawrer.a.ramirez.martinez@intel.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
src/journal-remote/journal-gatewayd.c | 4 ++--
src/journal-remote/journal-remote.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index d1f0ce3..8364044 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -684,7 +684,7 @@ static int request_handler_file(
if (fstat(fd, &st) < 0)
return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
- response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
+ response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0);
if (!response)
return respond_oom(connection);
@@ -824,7 +824,7 @@ static int request_handler(
assert(method);
if (!streq(method, "GET"))
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
"Unsupported method.\n");
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 431e283..476c826 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -526,13 +526,13 @@ static int process_http_upload(
log_warning("Failed to process data for connection %p", connection);
if (r == -ENOBUFS)
return mhd_respondf(connection,
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
"Entry is too large, maximum is %u bytes.\n",
DATA_SIZE_MAX);
else if (r == -E2BIG)
return mhd_respondf(connection,
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
"Entry with more fields than the maximum of %u\n",
ENTRY_FIELD_COUNT_MAX);
@@ -586,7 +586,7 @@ static int request_handler(
*connection_cls);
if (!streq(method, "POST"))
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
"Unsupported method.\n");
if (!streq(url, "/upload"))
--
1.8.3.1

View File

@ -1 +1 @@
mirror:Source/systemd-219-67.el7.src.rpm
mirror:Source/systemd-239-13.el8_0.5.src.rpm