From a63b92f9ff5254ae822dee9bf69aa2a6187a7d789f0e2dfc2917d0a94845fd3c Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 20 May 2020 10:36:51 +0000 Subject: [PATCH] Accepting request 807113 from home:favogt:branches:Virtualization:Appliances:Images:openSUSE-Tumbleweed - Register with pam-config in %post(un) OBS-URL: https://build.opensuse.org/request/show/807113 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libpwquality?expand=0&rev=30 --- baselibs.conf | 2 ++ libpwquality.changes | 5 +++++ libpwquality.spec | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index 4c06533..7ed330c 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,5 @@ pam_pwquality + requires "pam-" supplements "packageand(pam_pwquality:pam-)" + post "%{_sbindir}/pam-config -a --pwquality || :" libpwquality1 diff --git a/libpwquality.changes b/libpwquality.changes index 0cbc0f9..b8a2e5a 100644 --- a/libpwquality.changes +++ b/libpwquality.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 11:20:41 UTC 2020 - Fabian Vogt + +- Register with pam-config in %post(un) + ------------------------------------------------------------------- Fri May 1 20:28:41 UTC 2020 - Thorsten Kukuk diff --git a/libpwquality.spec b/libpwquality.spec index ef66422..86df31b 100644 --- a/libpwquality.spec +++ b/libpwquality.spec @@ -36,7 +36,6 @@ BuildRequires: gettext-devel BuildRequires: pam-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(python3) -%lang_package %if %{with python2} BuildRequires: pkgconfig(python2) %endif @@ -45,6 +44,8 @@ BuildRequires: pkgconfig(python2) libpwquality is a library for password quality checks and generation of random passwords that pass the checks. +%lang_package + %package -n %{libname} Summary: Library for password quality checking and generating random passwords Group: System/Libraries @@ -84,6 +85,8 @@ using the libpwquality library. Summary: PAM module to disallow weak new passwords Group: System/Libraries Requires: pam +Requires(post): pam-config +Requires(postun): pam-config %description -n pam_pwquality The pam_pwquality PAM module can be used instead of pam_cracklib to @@ -144,6 +147,16 @@ find %{buildroot} -type f -name "*.la" -delete -print %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig +%post -n pam_pwquality +# 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. +%{_sbindir}/pam-config -a --pwquality || : + +%postun -n pam_pwquality +if [ "$1" = "0" ]; then + %{_sbindir}/pam-config -d --pwquality || : +fi + %files -n %{libname} %license COPYING %doc AUTHORS NEWS README