Refactor patches for util-linux package
Use util-linux-config package to package config files for util-linux. Remove util-linux package folder and use RPM instead of SRPM for util-linux. Deployment test and ping test between VMs pass Config file check pass. Story: 2003768 Task: 27595 Depends-on: https://review.openstack.org/#/c/618943/ Change-Id: If90ed6df4a875a576c7ac709589ac221bb0fa2e3 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
parent
6c3c37a3db
commit
3406431fc5
@ -1,2 +0,0 @@
|
||||
COPY_LIST="files/pam.d/su"
|
||||
TIS_PATCH_VER=4
|
@ -1,27 +0,0 @@
|
||||
From 9ca3c8b4c62532cfbcdf5b9bf1c24a5a53e4f619 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 14:55:36 -0400
|
||||
Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
Conflicts:
|
||||
SPECS/util-linux.spec
|
||||
---
|
||||
SPECS/util-linux.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/util-linux.spec b/SPECS/util-linux.spec
|
||||
index 537a03c..3897c16 100644
|
||||
--- a/SPECS/util-linux.spec
|
||||
+++ b/SPECS/util-linux.spec
|
||||
@@ -2,7 +2,7 @@
|
||||
Summary: A collection of basic system utilities
|
||||
Name: util-linux
|
||||
Version: 2.23.2
|
||||
-Release: 52%{?dist}
|
||||
+Release: 52.el7%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||
Group: System Environment/Base
|
||||
URL: http://en.wikipedia.org/wiki/Util-linux
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 3db968a14a7a93d08d9d801e79d96d05dc100519 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 14:55:36 -0400
|
||||
Subject: WRS: 0003-util-linux-login-pamd.patch
|
||||
|
||||
---
|
||||
SOURCES/util-linux-login.pamd | 1 +
|
||||
SPECS/util-linux.spec | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SOURCES/util-linux-login.pamd b/SOURCES/util-linux-login.pamd
|
||||
index 3c03927..9c57d31 100644
|
||||
--- a/SOURCES/util-linux-login.pamd
|
||||
+++ b/SOURCES/util-linux-login.pamd
|
||||
@@ -7,6 +7,7 @@ account include system-auth
|
||||
password include system-auth
|
||||
# pam_selinux.so close should be the first session rule
|
||||
session required pam_selinux.so close
|
||||
+session required pam_mkhomedir.so skel=/etc/skel umask=0022
|
||||
session required pam_loginuid.so
|
||||
session optional pam_console.so
|
||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||
diff --git a/SPECS/util-linux.spec b/SPECS/util-linux.spec
|
||||
index 4b045fd..537a03c 100644
|
||||
--- a/SPECS/util-linux.spec
|
||||
+++ b/SPECS/util-linux.spec
|
||||
@@ -738,7 +738,7 @@ fi
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/chfn
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/chsh
|
||||
-%config(noreplace) %{_sysconfdir}/pam.d/login
|
||||
+%config %{_sysconfdir}/pam.d/login
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/remote
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su-l
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,3 +0,0 @@
|
||||
spec-use-su-file-from-shadow.patch
|
||||
0003-util-linux-login-pamd.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
@ -1,33 +0,0 @@
|
||||
From 1b4403d3c5b9fc0f73e1af70e34deb2d54a9c686 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 14:55:36 -0400
|
||||
Subject: WRS: spec-use-su-file-from-shadow.patch
|
||||
|
||||
---
|
||||
SPECS/util-linux.spec | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/util-linux.spec b/SPECS/util-linux.spec
|
||||
index 48100e4..4b045fd 100644
|
||||
--- a/SPECS/util-linux.spec
|
||||
+++ b/SPECS/util-linux.spec
|
||||
@@ -41,6 +41,7 @@ Source12: util-linux-su.pamd
|
||||
Source13: util-linux-su-l.pamd
|
||||
Source14: util-linux-runuser.pamd
|
||||
Source15: util-linux-runuser-l.pamd
|
||||
+Source16: su
|
||||
|
||||
### Obsoletes & Conflicts & Provides
|
||||
Conflicts: bash-completion < 1:2.1-1
|
||||
@@ -612,7 +613,7 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/sunhostid
|
||||
install -m 644 %{SOURCE2} ./remote
|
||||
install -m 644 %{SOURCE3} ./chsh
|
||||
install -m 644 %{SOURCE3} ./chfn
|
||||
- install -m 644 %{SOURCE12} ./su
|
||||
+ install -m 644 %{SOURCE16} ./su
|
||||
install -m 644 %{SOURCE13} ./su-l
|
||||
install -m 644 %{SOURCE14} ./runuser
|
||||
install -m 644 %{SOURCE15} ./runuser-l
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1 +0,0 @@
|
||||
mirror:Source/util-linux-2.23.2-52.el7.src.rpm
|
@ -334,3 +334,6 @@ update-motd
|
||||
|
||||
# python2-ruamel-yaml
|
||||
python2-ruamel-yaml
|
||||
|
||||
# util-linux-config
|
||||
util-linux-config
|
||||
|
@ -1,7 +1,6 @@
|
||||
tools/vm-topology
|
||||
base/initscripts
|
||||
base/initscripts-config
|
||||
base/util-linux
|
||||
base/setup
|
||||
utilities/namespace-utils
|
||||
ldap/nss-pam-ldapd
|
||||
@ -113,6 +112,7 @@ config-files/ntp-config
|
||||
config-files/syslog-ng-config
|
||||
config-files/rsync-config
|
||||
config-files/pam-config
|
||||
config-files/util-linux-config
|
||||
tools/collector
|
||||
grub/grubby
|
||||
utilities/platform-util
|
||||
|
2
config-files/util-linux-config/centos/build_srpm.data
Normal file
2
config-files/util-linux-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=0
|
42
config-files/util-linux-config/centos/util-linux-config.spec
Normal file
42
config-files/util-linux-config/centos/util-linux-config.spec
Normal file
@ -0,0 +1,42 @@
|
||||
Summary: util-linux-config
|
||||
Name: util-linux-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: util-linux
|
||||
Summary: package StarlingX configuration files of util-linux to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of util-linux to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
%{__install} -d 644 %{buildroot}%{_datadir}/starlingx/
|
||||
%{__install} -m 644 stx.su %{buildroot}%{_datadir}/starlingx/stx.su
|
||||
%{__install} -m 644 stx.login %{buildroot}%{_datadir}/starlingx/stx.login
|
||||
|
||||
%post
|
||||
%define _pamconfdir %{_sysconfdir}/pam.d
|
||||
if [ $1 -eq 1 ] ; then
|
||||
cp -f %{_datadir}/starlingx/stx.su %{_pamconfdir}/su
|
||||
cp -f %{_datadir}/starlingx/stx.login %{_pamconfdir}/login
|
||||
fi
|
||||
|
||||
%preun
|
||||
|
||||
%postun
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/starlingx/stx.su
|
||||
%{_datadir}/starlingx/stx.login
|
19
config-files/util-linux-config/files/stx.login
Normal file
19
config-files/util-linux-config/files/stx.login
Normal file
@ -0,0 +1,19 @@
|
||||
#%PA-1.0
|
||||
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
|
||||
auth substack system-auth
|
||||
auth include postlogin
|
||||
account required pam_nologin.so
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
# pam_selinux.so close should be the first session rule
|
||||
session required pam_selinux.so close
|
||||
session required pam_mkhomedir.so skel=/etc/skel umask=0022
|
||||
session required pam_loginuid.so
|
||||
session optional pam_console.so
|
||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||
session required pam_selinux.so open
|
||||
session required pam_namespace.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include system-auth
|
||||
session include postlogin
|
||||
-session optional pam_ck_connector.so
|
@ -31,13 +31,13 @@ auth sufficient pam_rootok.so
|
||||
# This module parses environment configuration file(s)
|
||||
# and also allows you to use an extended config
|
||||
# file /etc/security/pam_env.conf.
|
||||
#
|
||||
#
|
||||
# parsing /etc/environment needs "readenv=1"
|
||||
session required pam_env.so readenv=1
|
||||
|
||||
# Defines the MAIL environment variable
|
||||
# However, userdel also needs MAIL_DIR and MAIL_FILE variables
|
||||
# in /etc/login.defs to make sure that removing a user
|
||||
# in /etc/login.defs to make sure that removing a user
|
||||
# also removes the user's mail spool file.
|
||||
# See comments in /etc/login.defs
|
||||
#
|
Loading…
Reference in New Issue
Block a user