Accepting request 807575 from GNOME:Factory

- Register with pam-config in %post(un) (forwarded request 807113 from favogt)

OBS-URL: https://build.opensuse.org/request/show/807575
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libpwquality?expand=0&rev=17
This commit is contained in:
Yuchen Lin 2020-05-26 15:14:21 +00:00 committed by Git OBS Bridge
commit 6571a17c66
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,5 @@
pam_pwquality
requires "pam-<targettype>"
supplements "packageand(pam_pwquality:pam-<targettype>)"
post "%{_sbindir}/pam-config -a --pwquality || :"
libpwquality1

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 18 11:20:41 UTC 2020 - Fabian Vogt <fvogt@suse.com>
- Register with pam-config in %post(un)
-------------------------------------------------------------------
Fri May 1 20:28:41 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>

View File

@ -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