From f8aadb0864981d6eaf28c786a657399fbd85711600ec235390fb300ddead0b2b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 8 Jan 2018 14:34:31 +0000 Subject: [PATCH] Accepting request 562475 from openSUSE:Factory:Staging:O - Switch url to https://github.com/libpwquality/libpwquality/ - Update to release 1.4.0: * Fix possible buffer overflow with data from /dev/urandom in pwquality_generate(). * Do not try to check presence of too short username in password. (thanks to Nikos Mavrogiannopoulos) * Make the user name check optional (via usercheck option). * Add an 'enforcing' option to make the checks to be warning-only in PAM. * The difok = 0 setting will disable all old password similarity checks except new and old passwords being identical. * Updated translations from Zanata. - Add patch libpwquality-pythons.patch to avoid duping pythondir - Make python3 default and enable py2 only when needed OBS-URL: https://build.opensuse.org/request/show/562475 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libpwquality?expand=0&rev=20 --- libpwquality-1.3.0.tar.bz2 | 3 --- libpwquality-1.4.0.tar.bz2 | 3 +++ libpwquality-pythons.patch | 25 +++++++++++++++++ libpwquality.changes | 18 +++++++++++++ libpwquality.spec | 55 +++++++++++++++++++++++++------------- 5 files changed, 82 insertions(+), 22 deletions(-) delete mode 100644 libpwquality-1.3.0.tar.bz2 create mode 100644 libpwquality-1.4.0.tar.bz2 create mode 100644 libpwquality-pythons.patch diff --git a/libpwquality-1.3.0.tar.bz2 b/libpwquality-1.3.0.tar.bz2 deleted file mode 100644 index 8e27fd2..0000000 --- a/libpwquality-1.3.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74d2ea90e103323c1f2d6a6cc9617cdae6877573eddb31aaf31a40f354cc2d2a -size 423910 diff --git a/libpwquality-1.4.0.tar.bz2 b/libpwquality-1.4.0.tar.bz2 new file mode 100644 index 0000000..44e4b85 --- /dev/null +++ b/libpwquality-1.4.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1de6ff046cf2172d265a2cb6f8da439d894f3e4e8157b056c515515232fade6b +size 450384 diff --git a/libpwquality-pythons.patch b/libpwquality-pythons.patch new file mode 100644 index 0000000..dfa3e0e --- /dev/null +++ b/libpwquality-pythons.patch @@ -0,0 +1,25 @@ +From 694445da998ae3c5507df9651876488e91e6dafa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= +Date: Mon, 3 Jul 2017 20:39:14 +0300 +Subject: [PATCH] use separate build tree for python versions + +added python patch to allow multiple python versions build without +duplicating source tree +--- + python/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/python/Makefile.am b/python/Makefile.am +index abc5cd3..fd3a5ea 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -11,7 +11,7 @@ CLEANFILES = *~ constants.c *.so + EXTRA_DIST = pwquality.c setup.py + + all-local: +- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-lib=. ++ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) + + install-exec-local: +- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} ++ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} diff --git a/libpwquality.changes b/libpwquality.changes index 1668481..3ee6de3 100644 --- a/libpwquality.changes +++ b/libpwquality.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Jan 8 10:20:54 UTC 2018 - tchvatal@suse.com + +- Switch url to https://github.com/libpwquality/libpwquality/ +- Update to release 1.4.0: + * Fix possible buffer overflow with data from /dev/urandom + in pwquality_generate(). + * Do not try to check presence of too short username in password. + (thanks to Nikos Mavrogiannopoulos) + * Make the user name check optional (via usercheck option). + * Add an 'enforcing' option to make the checks to be warning-only + in PAM. + * The difok = 0 setting will disable all old password similarity + checks except new and old passwords being identical. + * Updated translations from Zanata. +- Add patch libpwquality-pythons.patch to avoid duping pythondir +- Make python3 default and enable py2 only when needed + ------------------------------------------------------------------- Thu Nov 9 09:34:50 UTC 2017 - mpluskal@suse.com diff --git a/libpwquality.spec b/libpwquality.spec index a55170c..c5866f8 100644 --- a/libpwquality.spec +++ b/libpwquality.spec @@ -1,7 +1,7 @@ # # spec file for package libpwquality # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,28 +18,35 @@ %define _pammoduledir /%{_lib}/security %define _secconfdir %{_sysconfdir}/security +%define libname libpwquality1 +%bcond_without python2 Name: libpwquality -Version: 1.3.0 +Version: 1.4.0 Release: 0 Summary: Library for password quality checking and generating random passwords License: BSD-3-Clause OR GPL-2.0+ Group: System/Libraries -Url: https://fedorahosted.org/libpwquality/ -Source: https://fedorahosted.org/releases/l/i/libpwquality/%{name}-%{version}.tar.bz2 +Url: https://github.com/libpwquality/libpwquality +Source: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 +Patch0: libpwquality-pythons.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: cracklib-devel BuildRequires: gettext-devel +BuildRequires: libtool BuildRequires: pam-devel -# Needed for pkgconfig() Provides BuildRequires: pkgconfig -BuildRequires: python2-devel -BuildRequires: python3-devel +BuildRequires: pkgconfig(python3) %lang_package +%if %{with python2} +BuildRequires: pkgconfig(python2) +%endif %description libpwquality is a library for password quality checks and generation of random passwords that pass the checks. -%package -n libpwquality1 +%package -n %{libname} Summary: Library for password quality checking and generating random passwords Group: System/Libraries Requires: cracklib-dict >= 2.8 @@ -48,7 +55,7 @@ Recommends: cracklib-dict-full >= 2.8 # To make lang package installable Provides: %{name} -%description -n libpwquality1 +%description -n %{libname} libpwquality is a library for password quality checks and generation of random passwords that pass the checks. @@ -65,7 +72,7 @@ This package contains simple tools that use libpwquality. %package devel Summary: Library for password quality checking -- Development Files Group: Development/Libraries/C and C++ -Requires: libpwquality1 = %{version} +Requires: %{libname} = %{version} Requires: pkgconfig %description devel @@ -110,30 +117,38 @@ This package provides Python 3 bindings for the libpwquality library. %prep %setup -q +%patch0 -p1 %build -cp -r python python3 +# needed for patch0 +autoreconf -fvi %configure \ --disable-static \ --with-securedir=%{_pammoduledir} \ - --with-pythonsitedir=%{python_sitearch} + --with-python-binary=%{_bindir}/python3 \ + --with-pythonsitedir=%{python3_sitearch} make %{?_smp_mflags} -pushd python3 -%python3_build +%if %{with python2} +pushd python +%python_build popd +%endif %install %make_install -pushd python3 -%python3_install +%if %{with python2} +pushd python +%python_install popd +%endif + find %{buildroot} -type f -name "*.la" -delete -print %find_lang %{name} %{?no_lang_C} -%post -n libpwquality1 -p /sbin/ldconfig -%postun -n libpwquality1 -p /sbin/ldconfig +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig -%files -n libpwquality1 +%files -n %{libname} %doc AUTHORS COPYING NEWS README %{_libdir}/libpwquality.so.* %config(noreplace) %{_secconfdir}/pwquality.conf @@ -155,8 +170,10 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_pammoduledir}/pam_pwquality.so %{_mandir}/man8/pam_pwquality.8%{?ext_man} +%if %{with python2} %files -n python2-pwquality %{python2_sitearch}/* +%endif %files -n python3-pwquality %{python3_sitearch}/*