CentOS 8: Upgrade sudo to version 1.8.25p1

(1)Release Version Upgrade
(2)Matching code changes with el7 to el8

Story: 2006729
Task: 37664
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Change-Id: I610f8ed39dec779b5ee1859351ea259462d53e86
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
This commit is contained in:
chendongqi 2019-11-20 18:04:40 +08:00
parent 9035cd1be8
commit d2f1d35dff
5 changed files with 33 additions and 25 deletions

View File

@ -1 +1 @@
TIS_PATCH_VER=3
TIS_PATCH_VER=1

View File

@ -3,6 +3,7 @@ From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:50:44 -0400
Subject: [PATCH 1/4] STX: 0001-Update-package-versioning-for-TIS-format.patch
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
---
SPECS/sudo.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@ -14,12 +15,12 @@ index c8d2f64..b6402bb 100644
@@ -1,7 +1,7 @@
Summary: Allows restricted root access for specified users
Name: sudo
Version: 1.8.23
-Release: 4%{?dist}.1
+Release: 4.el7_7.1%{?_tis_dist}.%{tis_patch_ver}
Version: 1.8.25p1
-Release: 4%{?dist}
+Release: 4.el8%{?_tis_dist}.%{tis_patch_ver}
License: ISC
Group: Applications/System
URL: http://www.courtesan.com/sudo/
--
2.7.4
1.8.3.1

View File

@ -3,15 +3,16 @@ From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:50:44 -0400
Subject: [PATCH 2/4] STX: 0002-spec-include-TiS-changes.patch
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
---
SPECS/sudo.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
SPECS/sudo.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/SPECS/sudo.spec b/SPECS/sudo.spec
index b6402bb..acbcb26 100644
--- a/SPECS/sudo.spec
+++ b/SPECS/sudo.spec
@@ -126,7 +126,7 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" SHL
@@ -117,7 +117,7 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
--with-ignore-dot \
--with-tty-tickets \
--with-ldap \
@ -20,24 +21,25 @@ index b6402bb..acbcb26 100644
--with-selinux \
--with-passprompt="[sudo] password for %p: " \
--with-linux-audit \
@@ -153,6 +153,9 @@ install -p -c -m 0440 %{SOURCE1} %{buildroot}%{_sysconfdir}/sudoers
install -p -c -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudo.conf
install -p -c -m 0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudo-ldap.conf
@@ -144,6 +144,9 @@ install -p -c -m 0440 %{SOURCE1} $RPM_BUILD_ROOT/etc/sudoers
install -p -c -m 0640 %{SOURCE3} $RPM_BUILD_ROOT/etc/sudo.conf
install -p -c -m 0640 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/sudo-ldap.conf
+install -d %{buildroot}%{_sysconfdir}/openldap/schema/
+install -m 644 doc/schema.OpenLDAP %{buildroot}%{_sysconfdir}/openldap/schema/sudo.schema
+install -d $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema/
+install -m 644 doc/schema.OpenLDAP $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema/sudo.schema
+
# Remove upstream sudoers file
rm -f %{buildroot}%{_sysconfdir}/sudoers.dist
@@ -225,6 +228,7 @@ rm -rf %{buildroot}
%{_mandir}/man5/sudoers_timestamp.5.gz
%dir %{_docdir}/sudo-%{version}
%{_docdir}/sudo-%{version}/*
# Add sudo to protected packages
install -p -d -m 755 $RPM_BUILD_ROOT/etc/dnf/protected.d/
touch sudo.conf
@@ -234,7 +237,7 @@ rm -rf $RPM_BUILD_ROOT
%{!?_licensedir:%global license %%doc}
%license doc/LICENSE
%exclude %{_pkgdocdir}/ChangeLog
-
+%{_sysconfdir}/openldap/schema/sudo.schema
# Make sure permissions are ok even if we're updating
%post
--
2.7.4
1.8.3.1

View File

@ -1,8 +1,13 @@
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
---
SPECS/sudo.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SPECS/sudo.spec b/SPECS/sudo.spec
index 8c3f395..17531f7 100644
--- a/SPECS/sudo.spec
+++ b/SPECS/sudo.spec
@@ -135,7 +135,8 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" SHL
@@ -127,7 +127,8 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
make
%check
@ -11,7 +16,7 @@ index 8c3f395..17531f7 100644
+# make check
%install
rm -rf %{buildroot}
rm -rf $RPM_BUILD_ROOT
--
2.7.4
1.8.3.1

View File

@ -1 +1 @@
mirror:Source/sudo-1.8.23-4.el7_7.1.src.rpm
mirror:Source/sudo-1.8.25p1-4.el8.src.rpm