forked from pool/screen
Accepting request 1043357 from home:schubi2:pam_usr_etc
- Migration PAM settings to /usr/etc: Saving user changed configuration files in /etc and restoring them while an RPM update. OBS-URL: https://build.opensuse.org/request/show/1043357 OBS-URL: https://build.opensuse.org/package/show/Base:System/screen?expand=0&rev=99
This commit is contained in:
parent
886821aafb
commit
8bb49c9864
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 12 14:28:14 UTC 2022 - Stefan Schubert <schubi@suse.com>
|
||||||
|
|
||||||
|
- Migration PAM settings to /usr/etc: Saving user changed
|
||||||
|
configuration files in /etc and restoring them while an RPM
|
||||||
|
update.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 26 11:08:20 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
Sat Feb 26 11:08:20 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
26
screen.spec
26
screen.spec
@ -88,7 +88,11 @@ rm -f %{buildroot}%{_bindir}/screen
|
|||||||
mv %{buildroot}%{_bindir}/screen-%{version} %{buildroot}%{_bindir}/screen
|
mv %{buildroot}%{_bindir}/screen-%{version} %{buildroot}%{_bindir}/screen
|
||||||
chmod 755 %{buildroot}%{_bindir}/screen
|
chmod 755 %{buildroot}%{_bindir}/screen
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}
|
mkdir -p %{buildroot}%{_sysconfdir}
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
mkdir -p %{buildroot}%{_distconfdir}/pam.d
|
||||||
|
%else
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
||||||
|
%endif
|
||||||
mkdir -p %{buildroot}%{_prefix}/lib
|
mkdir -p %{buildroot}%{_prefix}/lib
|
||||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||||
mkdir -p %{buildroot}%{rundir}/screens
|
mkdir -p %{buildroot}%{rundir}/screens
|
||||||
@ -96,11 +100,19 @@ chmod 755 %{buildroot}%{rundir}/screens
|
|||||||
mkdir -p %{buildroot}%{rundir}/uscreens
|
mkdir -p %{buildroot}%{rundir}/uscreens
|
||||||
install -m 644 screenrc %{buildroot}%{_sysconfdir}/screenrc
|
install -m 644 screenrc %{buildroot}%{_sysconfdir}/screenrc
|
||||||
install -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}
|
install -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
install -m 644 %{SOURCE4} %{buildroot}%{_distconfdir}/pam.d/screen
|
||||||
|
%else
|
||||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/screen
|
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/screen
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%config %{_sysconfdir}/screenrc
|
%config %{_sysconfdir}/screenrc
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%{_distconfdir}/pam.d/screen
|
||||||
|
%else
|
||||||
%config %{_sysconfdir}/pam.d/screen
|
%config %{_sysconfdir}/pam.d/screen
|
||||||
|
%endif
|
||||||
%attr(555,root,root) %{_bindir}/screen
|
%attr(555,root,root) %{_bindir}/screen
|
||||||
%dir %{_datadir}/screen
|
%dir %{_datadir}/screen
|
||||||
%{_tmpfilesdir}/screen.conf
|
%{_tmpfilesdir}/screen.conf
|
||||||
@ -109,6 +121,20 @@ install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/screen
|
|||||||
%{_mandir}/man1/screen.1%{?ext_man}
|
%{_mandir}/man1/screen.1%{?ext_man}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%pre
|
||||||
|
# Prepare for migration to /usr/etc; save any old .rpmsave
|
||||||
|
for i in pam.d/screen ; do
|
||||||
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
||||||
|
done
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
# Migration to /usr/etc, restore just created .rpmsave
|
||||||
|
for i in pam.d/screen ; do
|
||||||
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%tmpfiles_create %{_tmpfilesdir}/screen.conf
|
%tmpfiles_create %{_tmpfilesdir}/screen.conf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user