1e6600
Summary: A library for password generation and password quality checking
1e6600
Name: libpwquality
1e6600
Version: 1.2.3
1e6600
Release: 5%{?dist}
1e6600
# The package is BSD licensed with option to relicense as GPLv2+
1e6600
# - this option is redundant as the BSD license allows that anyway.
1e6600
License: BSD or GPLv2+
1e6600
Group: System Environment/Base
1e6600
Source0: https://github.com/libpwquality/libpwquality/releases/download/libpwquality-%{version}/libpwquality-%{version}.tar.bz2
1e6600
Patch1: libpwquality-1.2.3-translation-updates.patch
1e6600
Patch2: libpwquality-1.2.3-generate-buf.patch
1e6600
Patch3: libpwquality-1.2.3-settings.patch
1e6600
1e6600
%global _pwqlibdir %{_libdir}
1e6600
%global _moduledir %{_libdir}/security
1e6600
%global _secconfdir %{_sysconfdir}/security
1e6600
1e6600
Requires: cracklib-dicts >= 2.8
1e6600
Requires: pam%{?_isa}
1e6600
BuildRequires: cracklib-devel
1e6600
BuildRequires: gettext
1e6600
BuildRequires: pam-devel
1e6600
BuildRequires: python2-devel
1e6600
1e6600
URL: https://github.com/libpwquality/libpwquality/
1e6600
1e6600
# we don't want to provide private python extension libs
1e6600
%define __provides_exclude_from ^%{python_sitearch}/.*\.so$.
1e6600
1e6600
%description
1e6600
This is a library for password quality checks and generation
1e6600
of random passwords that pass the checks.
1e6600
This library uses the cracklib and cracklib dictionaries
1e6600
to perform some of the checks.
1e6600
1e6600
%package devel
1e6600
Group: Development/Libraries
1e6600
Summary: Support for development of applications using the libpwquality library
1e6600
Requires: libpwquality%{?_isa} = %{version}-%{release}
1e6600
Requires: pkgconfig
1e6600
1e6600
%description devel
1e6600
Files needed for development of applications using the libpwquality
1e6600
library.
1e6600
See the pwquality.h header file for the API.
1e6600
1e6600
%package -n python-pwquality
1e6600
Group: Development/Libraries
1e6600
Summary: Python bindings for the libpwquality library
1e6600
Requires: libpwquality%{?_isa} = %{version}-%{release}
1e6600
1e6600
%description -n python-pwquality
1e6600
This is pwquality Python module that provides Python bindings
1e6600
for the libpwquality library. These bindings can be used
1e6600
for easy password quality checking and generation of random
1e6600
pronounceable passwords from Python applications.
1e6600
1e6600
%prep
1e6600
%setup -q
1e6600
%patch1 -p2 -b .translations
1e6600
%patch2 -p1 -b .generate-buf
1e6600
%patch3 -p1 -b .settings
1e6600
1e6600
%build
1e6600
%configure \
1e6600
	--with-securedir=%{_moduledir} \
1e6600
	--with-pythonsitedir=%{python_sitearch} \
1e6600
	--disable-static
1e6600
1e6600
make -C po update-gmo
1e6600
make %{?_smp_mflags}
1e6600
1e6600
%install
1e6600
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
1e6600
1e6600
%if "%{_pwqlibdir}" != "%{_libdir}"
1e6600
pushd $RPM_BUILD_ROOT%{_libdir}
1e6600
mv libpwquality.so.* $RPM_BUILD_ROOT%{_pwqlibdir}
1e6600
ln -sf %{_pwqlibdir}/libpwquality.so.*.* libpwquality.so
1e6600
popd
1e6600
%endif
1e6600
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
1e6600
rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
1e6600
1e6600
%find_lang libpwquality
1e6600
1e6600
%check
1e6600
# Nothing yet
1e6600
1e6600
%post -p /sbin/ldconfig
1e6600
1e6600
%postun -p /sbin/ldconfig
1e6600
1e6600
%files -f libpwquality.lang
1e6600
%defattr(-,root,root,-)
1e6600
%doc COPYING README NEWS AUTHORS
1e6600
%{_bindir}/pwmake
1e6600
%{_bindir}/pwscore
1e6600
%{_moduledir}/pam_pwquality.so
1e6600
%{_pwqlibdir}/libpwquality.so.*
1e6600
%config(noreplace) %{_secconfdir}/pwquality.conf
1e6600
%{_mandir}/man1/*
1e6600
%{_mandir}/man5/*
1e6600
%{_mandir}/man8/*
1e6600
1e6600
%files devel
1e6600
%defattr(-,root,root,-)
1e6600
%{_includedir}/pwquality.h
1e6600
%{_libdir}/libpwquality.so
1e6600
%{_libdir}/pkgconfig/*.pc
1e6600
1e6600
%files -n python-pwquality
1e6600
%defattr(-,root,root,-)
1e6600
%{python_sitearch}/pwquality.so
1e6600
1e6600
%changelog
1e6600
* Wed Nov 15 2017 Tomáš Mráz <tmraz@redhat.com> 1.2.3-5
1e6600
- fix brittle configuration settings (#1259633)
1e6600
- fix abort when generating large passwords on some architectures
1e6600
1e6600
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.2.3-4
1e6600
- Mass rebuild 2014-01-24
1e6600
1e6600
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.2.3-3
1e6600
- Mass rebuild 2013-12-27
1e6600
1e6600
* Fri Nov 29 2013 Tomáš Mráz <tmraz@redhat.com> 1.2.3-2
1e6600
- translation updates
1e6600
1e6600
* Thu Sep 12 2013 Tomáš Mráz <tmraz@redhat.com> 1.2.3-1
1e6600
- fix problem with parsing the pam_pwquality options
1e6600
  patch by Vladimir Sorokin.
1e6600
- updated translations from Transifex
1e6600
- treat empty user or password as NULL
1e6600
- move the library to /usr
1e6600
1e6600
* Wed Jun 19 2013 Tomas Mraz <tmraz@redhat.com> 1.2.2-1
1e6600
- manual page fixes
1e6600
- make it possible to set the maxsequence configuration value
1e6600
- updated translations from Transifex
1e6600
1e6600
* Thu Dec 20 2012 Tomas Mraz <tmraz@redhat.com> 1.2.1-1
1e6600
- properly free pwquality settings
1e6600
- add extern "C" to public header
1e6600
- updated translations from Transifex
1e6600
1e6600
* Thu Aug 16 2012 Tomas Mraz <tmraz@redhat.com> 1.2.0-1
1e6600
- add maxsequence check for too long monotonic character sequence.
1e6600
- clarified alternative licensing to GPLv2+.
1e6600
- add local_users_only option to skip the pwquality checks for
1e6600
  non-locals. (thanks to Stef Walter)
1e6600
1e6600
* Wed Jun 13 2012 Tomas Mraz <tmraz@redhat.com> 1.1.1-1
1e6600
- use rpm built-in filtering of provides (rhbz#830153)
1e6600
- remove strain debug fprintf() (rhbz#831567)
1e6600
1e6600
* Thu May 24 2012 Tomas Mraz <tmraz@redhat.com> 1.1.0-1
1e6600
- fix leak when throwing PWQError exception
1e6600
- added pkgconfig file
1e6600
- call the simplicity checks before the cracklib check
1e6600
- add enforce_for_root option to the PAM module
1e6600
- updated translations from Transifex
1e6600
1e6600
* Thu Dec  8 2011 Tomas Mraz <tmraz@redhat.com> 1.0.0-1
1e6600
- added a few additional password quality checks
1e6600
- bugfix in configuration file parsing
1e6600
1e6600
* Fri Nov 11 2011 Tomas Mraz <tmraz@redhat.com> 0.9.9-1
1e6600
- added python bindings and documentation
1e6600
1e6600
* Mon Oct 10 2011 Tomas Mraz <tmraz@redhat.com> 0.9-2
1e6600
- fixes for problems found in review (missing BR on pam-devel,
1e6600
  License field, Source URL, Require pam, other cleanups)
1e6600
1e6600
* Mon Oct  3 2011 Tomas Mraz <tmraz@redhat.com> 0.9-1
1e6600
- first spec file for libpwquality