c6c7b34
Summary: A library for password generation and password quality checking
c6c7b34
Name: libpwquality
6489112
Version: 1.4.0
c47ea3f
Release: 6%{?dist}
748e09a
# The package is BSD licensed with option to relicense as GPLv2+
c6c7b34
# - this option is redundant as the BSD license allows that anyway.
748e09a
License: BSD or GPLv2+
c6c7b34
Group: System Environment/Base
b7e5b94
Source0: https://github.com/libpwquality/libpwquality/releases/download/libpwquality-%{version}/libpwquality-%{version}.tar.bz2
c6c7b34
8b6126a
%global _pwqlibdir %{_libdir}
8b6126a
%global _moduledir %{_libdir}/security
c6c7b34
%global _secconfdir %{_sysconfdir}/security
c6c7b34
f55b31e
Recommends: cracklib-dicts >= 2.8
c6c7b34
Requires: pam%{?_isa}
b7e5b94
BuildRequires: gcc
c6c7b34
BuildRequires: cracklib-devel
c6c7b34
BuildRequires: gettext
c6c7b34
BuildRequires: pam-devel
acdbf25
BuildRequires: python2-devel
c57e81f
BuildRequires: python3-devel
c6c7b34
b7e5b94
URL: https://github.com/libpwquality/libpwquality/
c6c7b34
acdbf25
# we don't want to provide private python extension libs
c57e81f
%define __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\.so$.
acdbf25
c6c7b34
%description
c6c7b34
This is a library for password quality checks and generation
c6c7b34
of random passwords that pass the checks.
c6c7b34
This library uses the cracklib and cracklib dictionaries
c6c7b34
to perform some of the checks.
c6c7b34
c6c7b34
%package devel
c6c7b34
Group: Development/Libraries
37dd7f7
Summary: Support for development of applications using the libpwquality library
c6c7b34
Requires: libpwquality%{?_isa} = %{version}-%{release}
1daf1d9
Requires: pkgconfig
c6c7b34
c6c7b34
%description devel
c6c7b34
Files needed for development of applications using the libpwquality
c6c7b34
library.
c6c7b34
See the pwquality.h header file for the API.
c6c7b34
c9a7411
%package -n python2-pwquality
c9a7411
%{?python_provide:%python_provide python2-pwquality}
acdbf25
Group: Development/Libraries
acdbf25
Summary: Python bindings for the libpwquality library
acdbf25
Requires: libpwquality%{?_isa} = %{version}-%{release}
acdbf25
c9a7411
%description -n python2-pwquality
acdbf25
This is pwquality Python module that provides Python bindings
acdbf25
for the libpwquality library. These bindings can be used
acdbf25
for easy password quality checking and generation of random
acdbf25
pronounceable passwords from Python applications.
acdbf25
c57e81f
%package -n python3-pwquality
c57e81f
Group: Development/Libraries
c57e81f
Summary: Python bindings for the libpwquality library
c57e81f
Requires: libpwquality%{?_isa} = %{version}-%{release}
c57e81f
c57e81f
%description -n python3-pwquality
c57e81f
This is pwquality Python module that provides Python bindings
c57e81f
for the libpwquality library. These bindings can be used
c57e81f
for easy password quality checking and generation of random
c57e81f
pronounceable passwords from Python applications.
c57e81f
c6c7b34
%prep
c6c7b34
%setup -q
c57e81f
c57e81f
rm -rf %{py3dir}
c57e81f
cp -a . %{py3dir}
c6c7b34
c6c7b34
%build
c6c7b34
%configure \
8b6126a
	--with-securedir=%{_moduledir} \
acdbf25
	--with-pythonsitedir=%{python_sitearch} \
c57e81f
	--with-python-binary=%{__python2} \
c6c7b34
	--disable-static
c6c7b34
c6c7b34
make %{?_smp_mflags}
c6c7b34
c57e81f
pushd %{py3dir}
c57e81f
%configure \
c57e81f
	--with-securedir=%{_moduledir} \
c57e81f
	--with-pythonsitedir=%{python3_sitearch} \
c57e81f
	--with-python-binary=%{__python3} \
c57e81f
	--disable-static
c57e81f
c57e81f
make %{?_smp_mflags}
c57e81f
popd
c57e81f
c6c7b34
%install
c6c7b34
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
c6c7b34
c57e81f
pushd %{py3dir}
c57e81f
make -C python install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
c57e81f
popd
c57e81f
8b6126a
%if "%{_pwqlibdir}" != "%{_libdir}"
c6c7b34
pushd $RPM_BUILD_ROOT%{_libdir}
8b6126a
mv libpwquality.so.* $RPM_BUILD_ROOT%{_pwqlibdir}
8b6126a
ln -sf %{_pwqlibdir}/libpwquality.so.*.* libpwquality.so
c6c7b34
popd
8b6126a
%endif
1daf1d9
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
c6c7b34
rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
c6c7b34
c68f90a
mkdir $RPM_BUILD_ROOT%{_secconfdir}/pwquality.conf.d
c68f90a
c6c7b34
%find_lang libpwquality
c6c7b34
c6c7b34
%check
c6c7b34
# Nothing yet
c6c7b34
8d74463
%ldconfig_scriptlets
c6c7b34
c6c7b34
%files -f libpwquality.lang
c6c7b34
%defattr(-,root,root,-)
054b8f1
%{!?_licensedir:%global license %%doc}
054b8f1
%license COPYING
054b8f1
%doc README NEWS AUTHORS
c6c7b34
%{_bindir}/pwmake
c6c7b34
%{_bindir}/pwscore
c6c7b34
%{_moduledir}/pam_pwquality.so
8b6126a
%{_pwqlibdir}/libpwquality.so.*
c6c7b34
%config(noreplace) %{_secconfdir}/pwquality.conf
c68f90a
%{_secconfdir}/pwquality.conf.d
acdbf25
%{_mandir}/man1/*
acdbf25
%{_mandir}/man5/*
acdbf25
%{_mandir}/man8/*
c6c7b34
c6c7b34
%files devel
c6c7b34
%defattr(-,root,root,-)
c6c7b34
%{_includedir}/pwquality.h
c6c7b34
%{_libdir}/libpwquality.so
1daf1d9
%{_libdir}/pkgconfig/*.pc
c68f90a
%{_mandir}/man3/*
c6c7b34
c9a7411
%files -n python2-pwquality
acdbf25
%defattr(-,root,root,-)
acdbf25
%{python_sitearch}/pwquality.so
c57e81f
%{python_sitearch}/*.egg-info
acdbf25
c57e81f
%files -n python3-pwquality
c57e81f
%defattr(-,root,root,-)
c57e81f
%{python3_sitearch}/*.so
c57e81f
%{python3_sitearch}/*.egg-info
343349a
c57e81f
%changelog
c47ea3f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-6
c47ea3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c47ea3f
8d74463
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.0-5
8d74463
- Switch to %%ldconfig_scriptlets
8d74463
c9a7411
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4.0-4
c9a7411
- Python 2 binary package renamed to python2-pwquality
c9a7411
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
c9a7411
cc5cdd8
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-3
cc5cdd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
cc5cdd8
5ee9c2e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
5ee9c2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5ee9c2e
6489112
* Fri May 26 2017 Tomáš Mráz <tmraz@redhat.com> 1.4.0-1
6489112
- Do not try to check presence of too short username in password
6489112
- Make the user name check optional (via usercheck option)
6489112
- Add an 'enforcing' option to make the checks to be warning-only
6489112
  in PAM
6489112
- The difok = 0 setting will disable all old password similarity
6489112
  checks except new and old passwords being identical
6489112
- Updated translations from Zanata
Robert Kuska d6dfbb7
c7f967c
* Mon Aug 24 2015 Tomáš Mráz <tmraz@redhat.com> 1.3.0-2
c7f967c
- Fix possible stack overflow in the generate function (#1255935)
c7f967c
c68f90a
* Thu Jul 23 2015 Tomáš Mráz <tmraz@redhat.com> 1.3.0-1
c68f90a
- Change the defaults for credits, difok, and minlen
c68f90a
- Make the cracklib check optional but on by default
c68f90a
- Add implicit support for parsing  <cfgfile>.d/*.conf files
c68f90a
- Add libpwquality API manual page
690b027
c57e81f
* Wed Aug  6 2014 Tomáš Mráz <tmraz@redhat.com> 1.2.4-1
c57e81f
- fix license handling (by Tom Callaway)
c57e81f
- add Python3 module subpackage
9ea1360
c50b07f
* Thu Sep 12 2013 Tomáš Mráz <tmraz@redhat.com> 1.2.3-1
c50b07f
- fix problem with parsing the pam_pwquality options
c50b07f
  patch by Vladimir Sorokin.
c50b07f
- updated translations from Transifex
c50b07f
- treat empty user or password as NULL
c50b07f
- move the library to /usr
e8f014f
37dd7f7
* Wed Jun 19 2013 Tomas Mraz <tmraz@redhat.com> 1.2.2-1
37dd7f7
- manual page fixes
37dd7f7
- make it possible to set the maxsequence configuration value
37dd7f7
- updated translations from Transifex
a0e4a7a
8e9193c
* Thu Dec 20 2012 Tomas Mraz <tmraz@redhat.com> 1.2.1-1
8e9193c
- properly free pwquality settings
8e9193c
- add extern "C" to public header
8e9193c
- updated translations from Transifex
8e9193c
748e09a
* Thu Aug 16 2012 Tomas Mraz <tmraz@redhat.com> 1.2.0-1
748e09a
- add maxsequence check for too long monotonic character sequence.
748e09a
- clarified alternative licensing to GPLv2+.
748e09a
- add local_users_only option to skip the pwquality checks for
748e09a
  non-locals. (thanks to Stef Walter)
c11275f
0657c14
* Wed Jun 13 2012 Tomas Mraz <tmraz@redhat.com> 1.1.1-1
0657c14
- use rpm built-in filtering of provides (rhbz#830153)
0657c14
- remove strain debug fprintf() (rhbz#831567)
3d5ef64
1daf1d9
* Thu May 24 2012 Tomas Mraz <tmraz@redhat.com> 1.1.0-1
1daf1d9
- fix leak when throwing PWQError exception
1daf1d9
- added pkgconfig file
1daf1d9
- call the simplicity checks before the cracklib check
1daf1d9
- add enforce_for_root option to the PAM module
1daf1d9
- updated translations from Transifex
b3ae634
24e9c55
* Thu Dec  8 2011 Tomas Mraz <tmraz@redhat.com> 1.0.0-1
24e9c55
- added a few additional password quality checks
24e9c55
- bugfix in configuration file parsing
24e9c55
acdbf25
* Fri Nov 11 2011 Tomas Mraz <tmraz@redhat.com> 0.9.9-1
acdbf25
- added python bindings and documentation
acdbf25
c6c7b34
* Mon Oct 10 2011 Tomas Mraz <tmraz@redhat.com> 0.9-2
c6c7b34
- fixes for problems found in review (missing BR on pam-devel,
c6c7b34
  License field, Source URL, Require pam, other cleanups)
c6c7b34
c6c7b34
* Mon Oct  3 2011 Tomas Mraz <tmraz@redhat.com> 0.9-1
c6c7b34
- first spec file for libpwquality