forked from pool/util-linux
Accepting request 177950 from home:bernhard-voelker:branches:Base:System
- util-linux.spec: work around su(1) PAM problems based on su(1) being provided by both the coreutils and the util-linux package. Fix macro typo in %post and %verifyscript sections related to su(1): s/sysvinit_tools/enable_su/ OBS-URL: https://build.opensuse.org/request/show/177950 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=167
This commit is contained in:
parent
78ca94ad29
commit
c0a307014c
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 7 00:13:25 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
- util-linux.spec: work around su(1) PAM problems based on su(1)
|
||||
being provided by both the coreutils and the util-linux package.
|
||||
Fix macro typo in %post and %verifyscript sections related to su(1):
|
||||
s/sysvinit_tools/enable_su/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 08:27:43 UTC 2013 - werner@suse.de
|
||||
|
||||
|
@ -26,6 +26,16 @@
|
||||
%bcond_without enable_su
|
||||
%bcond_without enable_eject
|
||||
|
||||
# === MOVING SU TRICKERY (0/3) START ===
|
||||
# Work around su(1) PAM problems based on su(1) being provided by both the
|
||||
# coreutils and the util-linux package. In the case the former is installed
|
||||
# first, the latter will save the config files as ".rpmnew". When the new
|
||||
# su(1)-less coreutils package is then installed, the `trickery (tm)` symlinks
|
||||
# of the config files would then remain as dangling.
|
||||
# This "MOVING SU TRICKERY" consists of 3 parts: 1/3, 2/3 and 3/3.
|
||||
# This hack can go away when the new su-less coreutils package is out.
|
||||
# === MOVING SU TRICKERY (0/3) END ===
|
||||
|
||||
Name: util-linux
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: binutils-devel
|
||||
@ -311,6 +321,13 @@ install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su
|
||||
# === MOVING SU TRICKERY (1/3) START ===
|
||||
# Install a copy of the su(1) config files with .ul suffix.
|
||||
# This hack can go away when the new su-less coreutils package is out.
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su.ul
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l.ul
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su.ul
|
||||
# === MOVING SU TRICKERY (1/3) END ===
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
pushd ../klogconsole
|
||||
@ -458,7 +475,7 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd
|
||||
%run_permissions
|
||||
%else
|
||||
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
||||
%if %{with sysvinit_tools}
|
||||
%if %{with enable_su}
|
||||
%set_permissions %{_bindir}/su
|
||||
%endif
|
||||
%if %{with enable_eject}
|
||||
@ -471,13 +488,30 @@ if [ -f etc/fstab ]; then
|
||||
sed -i 's:code=:codepage=:' etc/fstab
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
%if "%{with enable_su}"
|
||||
# === MOVING SU TRICKERY (2/3) START ===
|
||||
# If su(1)'s PAM config files are symbolic links, then they have been installed
|
||||
# by the coreutils package (because su-enabled coreutils has been installed
|
||||
# before util-linux). Remove the symlinks and install a copy of our .ul files
|
||||
# in their correct places.
|
||||
# This hack can go away when the new su-less coreutils package is out.
|
||||
for f in pam.d/su pam.d/su-l default/su ; do
|
||||
if [ -L %{_sysconfdir}/$f -a -e %{_sysconfdir}/$f.ul ]; then
|
||||
rm -v %{_sysconfdir}/$f
|
||||
cp -av %{_sysconfdir}/$f.ul %{_sysconfdir}/$f
|
||||
fi
|
||||
done
|
||||
# === MOVING SU TRICKERY (2/3) END ===
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz
|
||||
%{insserv_cleanup}
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
|
||||
%if %{with sysvinit_tools}
|
||||
%if %{with enable_su}
|
||||
%verify_permissions -e %{_bindir}/su
|
||||
%endif
|
||||
%if %{with enable_eject}
|
||||
@ -548,6 +582,13 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su-l
|
||||
%config(noreplace) %{_sysconfdir}/default/su
|
||||
# === MOVING SU TRICKERY (3/3) START ===
|
||||
# Package su(1) config files with .ul suffix needed in posttrans above.
|
||||
# This hack can go away when the new su-less coreutils package is out.
|
||||
%config %{_sysconfdir}/pam.d/su.ul
|
||||
%config %{_sysconfdir}/pam.d/su-l.ul
|
||||
%config %{_sysconfdir}/default/su.ul
|
||||
# === MOVING SU TRICKERY (3/3) END ===
|
||||
%endif
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
|
Loading…
Reference in New Issue
Block a user