From d90f30f862aa5db224a77a043b03f07dd6f4515c8fdb307edb9678561234d626 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 2 Aug 2017 09:11:37 +0000 Subject: [PATCH] Add scriptlets for pam-config OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/pam_kwallet?expand=0&rev=34 --- baselibs.conf | 2 +- pam_kwallet.spec | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index c229a20..1f9893a 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,4 @@ pam_kwallet requires "pam_kwallet = " supplements "packageand(pam_kwallet:pam-)" - + post "%{_sbindir}/pam-config -a --kwallet5 || :" diff --git a/pam_kwallet.spec b/pam_kwallet.spec index a63bdc6..00b3647 100644 --- a/pam_kwallet.spec +++ b/pam_kwallet.spec @@ -32,6 +32,7 @@ BuildRequires: pam-devel BuildRequires: socat BuildRequires: xz Requires: %{name}-common = %{version} +Requires(postun): coreutils pam pam-config %description This PAM module allows you to automatically open your kwallet @@ -57,6 +58,16 @@ module. %install %kf5_makeinstall -C build +# Due to boo#728586 it is necessary to duplicate this in the 32bit variant. +# So you need to edit baselibs.conf if you change this. +%post + %{_sbindir}/pam-config -a --kwallet5 || : + +%postun + if [ "$1" = "0" ]; then + %{_sbindir}/pam-config -d --kwallet5 || : + fi + %files %defattr(-,root,root) %doc COPYING*