From 4cf5ee11d59f4e82294a121d565a43a004ca914ed932302db7cbd4bfc1c14550 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 4 Jan 2023 12:02:37 +0000 Subject: [PATCH] Accepting request 1048760 from home:schubi2:pam_usr_etc - Migration of PAM settings to /usr/lib/pam.d. OBS-URL: https://build.opensuse.org/request/show/1048760 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=239 --- tigervnc.changes | 5 +++++ tigervnc.spec | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tigervnc.changes b/tigervnc.changes index f5dd609..3d10539 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 4 09:32:50 UTC 2023 - Stefan Schubert + +- Migration of PAM settings to /usr/lib/pam.d. + ------------------------------------------------------------------- Mon Nov 7 14:58:46 UTC 2022 - Stefan Dirsch diff --git a/tigervnc.spec b/tigervnc.spec index ab6bd41..88f68f4 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -1,7 +1,7 @@ # # spec file for package tigervnc # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -331,6 +331,9 @@ install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2. cp %{SOURCE7} . install -D -m 755 %{SOURCE8} %{buildroot}%{_bindir}/vncpasswd.arg install -D -m 644 %{SOURCE9} %{buildroot}%{_pam_vendordir}/vnc +%if 0%{?suse_version} >= 1550 +mv %{buildroot}%{_sysconfdir}/pam.d/tigervnc %{buildroot}%{_pam_vendordir} +%endif install -D -m 644 %{SOURCE11} %{buildroot}%{_datadir}/vnc/classes %if 0%{?suse_version} >= 1315 ln -s -f %{_sysconfdir}/alternatives/vncviewer %{buildroot}%{_bindir}/vncviewer @@ -376,6 +379,18 @@ fi %pre -n xorg-x11-Xvnc -f xorg-x11-Xvnc.pre %service_add_pre xvnc.socket +%if 0%{?suse_version} >= 1550 +# Prepare for migration to /usr/lib; save any old .rpmsave +for i in pam.d/vnc pam.d/tigervnc ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: +done + +%posttrans -n xorg-x11-Xvnc +# Migration to /usr/lib, restore just created .rpmsave +for i in pam.d/vnc pam.d/tigervnc ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif %post -n xorg-x11-Xvnc %service_add_post xvnc.socket @@ -480,7 +495,6 @@ fi %{_sbindir}/rcxvnc %dir %{_sysconfdir}/tigervnc -%config(noreplace) %{_sysconfdir}/pam.d/tigervnc %config(noreplace) %{_sysconfdir}/tigervnc/vncserver* %exclude %{_sharedstatedir}/xkb/compiled/README.compiled @@ -497,8 +511,10 @@ fi %if 0%{?suse_version} < 1550 %config %{_sysconfdir}/pam.d/vnc +%config(noreplace) %{_sysconfdir}/pam.d/tigervnc %else %{_pam_vendordir}/vnc +%{_pam_vendordir}/tigervnc %endif %dir %attr(0755,%{vncuser},%{vncuser}) %{_sysconfdir}/vnc