- Add libpwquality-fix-python-install.patch: Fix installation of
python bindings after moving to setuptools. Without splitting root from prefix, setuptools installs all the files into the .egg directory, which in turn makes python not find the files it looks for: > python3 -c "import pwquality" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'pwquality' > rpm -ql python3-pwquality /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/PKG-INFO /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/SOURCES.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/dependency_links.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/native_libs.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/not-zip-safe /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/EGG-INFO/top_level.txt /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/__pycache__ /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/__pycache__/pwquality.cpython-311.pyc /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/pwquality.cpython-311-x86_64-linux-gnu.so /usr/lib64/python3.11/site-packages/pwquality-1.4.5-py3.11-linux-x86_64.egg/pwquality.py OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libpwquality?expand=0&rev=48
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
6
baselibs.conf
Normal file
6
baselibs.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
pam_pwquality
|
||||
requires "pam-<targettype>"
|
||||
prereq "pam-config"
|
||||
supplements "packageand(pam_pwquality:pam-<targettype>)"
|
||||
post "%{_sbindir}/pam-config -a --pwquality || :"
|
||||
libpwquality1
|
BIN
libpwquality-1.4.5.tar.bz2
(Stored with Git LFS)
Normal file
BIN
libpwquality-1.4.5.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
26
libpwquality-fix-python-install.patch
Normal file
26
libpwquality-fix-python-install.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
Index: libpwquality-1.4.5/python/Makefile.am
|
||||
===================================================================
|
||||
--- libpwquality-1.4.5.orig/python/Makefile.am
|
||||
+++ libpwquality-1.4.5/python/Makefile.am
|
||||
@@ -14,7 +14,7 @@ all-local:
|
||||
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
|
||||
|
||||
install-exec-local:
|
||||
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
|
||||
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
|
||||
|
||||
clean-local:
|
||||
rm -rf py$(PYTHONREV)
|
||||
Index: libpwquality-1.4.5/python/Makefile.in
|
||||
===================================================================
|
||||
--- libpwquality-1.4.5.orig/python/Makefile.in
|
||||
+++ libpwquality-1.4.5/python/Makefile.in
|
||||
@@ -483,7 +483,7 @@ all-local:
|
||||
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
|
||||
|
||||
install-exec-local:
|
||||
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
|
||||
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
|
||||
|
||||
clean-local:
|
||||
rm -rf py$(PYTHONREV)
|
199
libpwquality.changes
Normal file
199
libpwquality.changes
Normal file
@@ -0,0 +1,199 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 10 10:52:20 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Add libpwquality-fix-python-install.patch: Fix installation of
|
||||
python bindings after moving to setuptools.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 22 08:58:19 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- Drop python 2.x support (it's been 4 years).
|
||||
- Add python3-setuptools BuildRequires which is needed for
|
||||
distutils.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 20 19:23:49 UTC 2023 - Giacomo Comes <gcomes.obs@gmail.com>
|
||||
|
||||
- add: prereq "pam-config" in baselibs.conf
|
||||
* post scriptlet in pam_pwquality-32bit runs: pam-config
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 26 10:03:04 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to version 1.4.5:
|
||||
+ Minor bug fixes and documentation enhancements.
|
||||
+ Updated translations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 17 21:16:26 UTC 2022 - Michael Gorse <mgorse@suse.com>
|
||||
|
||||
- Add python-rpm-macros to BuildRequires (boo#1194757).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 28 13:41:10 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Use %_pam_moduledir instead of hardcoding %{_lib}/security
|
||||
(boo#1191042).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 5 16:27:27 UTC 2021 - Josef Möllers <josef.moellers@suse.com>
|
||||
|
||||
- Do not use macro %make_build pre SLE-15
|
||||
Use "make -O %{?_smp_mflags}" instead
|
||||
[libpwquality.spec]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 16 14:23:28 UTC 2020 - Danny Sauer <dsauer@suse.com>
|
||||
|
||||
- update to 1.4.4
|
||||
* e11f2bd Fix regression with enabling cracklib check
|
||||
* 02e6728 Use make macros in rpm spec file
|
||||
* xxxxxxx Translated using Weblate (Polish, Turkish, Ukrainian)
|
||||
- update to 1.4.3
|
||||
* 1213d33 Update translation files
|
||||
* a951fbe Add --disable-cracklib-check configure parameter
|
||||
* 6a8845b fixup static compilation
|
||||
* 92c6066 python: Add missing getters/setters for newly added settings
|
||||
* bfef79d Add usersubstr check
|
||||
* 09a2e65 pam_pwquality: Add debug message for the local_users_only option
|
||||
* a6f7705 Fix some gcc warnings
|
||||
* 8c8a260 pwmake: Properly validate the bits parameter.
|
||||
* 7be4797 we use Fedora Weblate now
|
||||
* xxxxxxx Translated using Weblate (Azerbaijani, Bulgarian,
|
||||
Chinese (Simplified), Czech, French, Friulian, Hungarian, Italian,
|
||||
Japanese, Norwegian Bokmål, Persian, Russian, Spanish, Turkish)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 20 21:51:29 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update to 1.4.2:
|
||||
* Fix regression in handling retry, enforce_for_root, and
|
||||
local_users_only options introduced with the previous
|
||||
release.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- Add baselibs.conf
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 19 15:08:08 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Update to version 1.4.1:
|
||||
+ Minor bugfix update of the library.
|
||||
- Drop libpwquality-pythons.patch: Fixed upstream. Following this,
|
||||
drop autoconf, automake and libtool BuildRequires and autoreconf
|
||||
call.
|
||||
- Use modern macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 19 12:12:04 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
|
||||
|
||||
- Do not recommend lang package. The lang package already has a
|
||||
supplements.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 28 16:36:04 UTC 2018 - dimstar@opensuse.org
|
||||
|
||||
- Modernize spec-file by calling spec-cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 8 18:54:44 UTC 2018 - jengelh@inai.de
|
||||
|
||||
- Update RPM groups and summaries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Build python3 version of bindings as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 15 21:51:14 UTC 2016 - mgorse@suse.com
|
||||
|
||||
- Update to GNOME 3.20 Fate#318572
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 25 13:48:55 UTC 2015 - zaitor@opensuse.org
|
||||
|
||||
- Update to version 1.3.0:
|
||||
+ Change the defaults for credits, difok, and minlen.
|
||||
+ Make the cracklib check optional but on by default.
|
||||
+ Add implicit support for parsing <cfgfile>.d/*.conf files.
|
||||
+ Add libpwquality API manual page.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 23 13:01:30 UTC 2014 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 1.2.4:
|
||||
+ Add Python3 module subpackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 15 11:26:45 UTC 2014 - mlin@suse.com
|
||||
|
||||
- Avoid conflict in installation-images-openSUSE with cryptsetup:
|
||||
+ Only recommend, insted of Require cracklib-dict-full.
|
||||
+ Require cracklib-dict.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 18:42:45 UTC 2013 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 1.2.3:
|
||||
+ Fix problem with parsing the pam_pwquality options.
|
||||
+ Treat empty user or password as NULL.
|
||||
+ Updated translations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 21 18:10:57 UTC 2013 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 1.2.2:
|
||||
+ Manual page fixes.
|
||||
+ Make it possible to set the maxsequence configuration value.
|
||||
+ Updated translations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 23 09:38:10 UTC 2012 - zaitor@opensuse.org
|
||||
|
||||
- Update to version 1.2.1:
|
||||
+ Properly free pwquality settings.
|
||||
+ Add extern "C" to public header.
|
||||
+ Updated translations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 7 21:31:36 UTC 2012 - vuntz@opensuse.org
|
||||
|
||||
- Cleanup for inclusion in Factory.
|
||||
- Update to version 1.2.0:
|
||||
+ Add maxsequence check for too long monotonic character
|
||||
sequence.
|
||||
+ Clarified alternative licensing to GPLv2+.
|
||||
+ Add local_users_only option to skip the pwquality checks for
|
||||
non-locals.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 7 17:02:52 UTC 2012 - badshah400@gmail.com
|
||||
|
||||
- Initial build (version 1.1.0).
|
||||
|
168
libpwquality.spec
Normal file
168
libpwquality.spec
Normal file
@@ -0,0 +1,168 @@
|
||||
#
|
||||
# spec file for package libpwquality
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define _secconfdir %{_sysconfdir}/security
|
||||
%define libname libpwquality1
|
||||
|
||||
Name: libpwquality
|
||||
Version: 1.4.5
|
||||
Release: 0
|
||||
Summary: Library for password quality checking and generating random passwords
|
||||
License: BSD-3-Clause OR GPL-2.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/libpwquality/libpwquality
|
||||
Source: %{url}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM - Fix installation of python bindings using setuptools. loosely based on commit 7b5e0f00
|
||||
Patch0: libpwquality-fix-python-install.patch
|
||||
|
||||
BuildRequires: cracklib-devel
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: pkgconfig(python3)
|
||||
|
||||
%description
|
||||
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
|
||||
Requires: cracklib-dict >= 2.8
|
||||
Recommends: cracklib-dict-full >= 2.8
|
||||
# To make lang package installable
|
||||
Provides: %{name}
|
||||
|
||||
%description -n %{libname}
|
||||
libpwquality is a library for password quality checks and generation
|
||||
of random passwords that pass the checks.
|
||||
|
||||
%package tools
|
||||
Summary: Tools from libpequality, a library for password quality checking
|
||||
Group: Productivity/Security
|
||||
|
||||
%description tools
|
||||
libpwquality is a library for password quality checks and generation
|
||||
of random passwords that pass the checks.
|
||||
|
||||
This package contains simple tools that use libpwquality.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for libpwquality, a library for password quality checking
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libname} = %{version}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
libpwquality is a library for password quality checks and generation
|
||||
of random passwords that pass the checks.
|
||||
|
||||
This package provides files needed for development of applications
|
||||
using the libpwquality library.
|
||||
|
||||
%package -n pam_pwquality
|
||||
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
|
||||
disallow weak new passwords when user's login password is changed.
|
||||
|
||||
%package -n python3-pwquality
|
||||
Summary: Python 3 bindings for libpwquality
|
||||
Group: Development/Libraries/Python
|
||||
Provides: python-pwquality = %{version}-%{release}
|
||||
Obsoletes: python-pwquality < %{version}-%{release}
|
||||
|
||||
%description -n python3-pwquality
|
||||
libpwquality is a library for password quality checks and generation
|
||||
of random passwords that pass the checks.
|
||||
|
||||
This package provides Python 3 bindings for the libpwquality library.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--disable-static \
|
||||
--with-securedir=%{_pam_moduledir} \
|
||||
--with-python-binary=%{_bindir}/python3 \
|
||||
--with-pythonsitedir=%{python3_sitearch} \
|
||||
%{nil}
|
||||
%if 0%{?suse_version} < 1500
|
||||
make -O %{?_smp_mflags}
|
||||
%else
|
||||
%make_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
|
||||
%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
|
||||
%{_libdir}/libpwquality.so.*
|
||||
%config(noreplace) %{_secconfdir}/pwquality.conf
|
||||
%{_mandir}/man3/pwquality.3%{?ext_man}
|
||||
%{_mandir}/man5/pwquality.conf.5%{?ext_man}
|
||||
|
||||
%files tools
|
||||
%{_bindir}/pwmake
|
||||
%{_bindir}/pwscore
|
||||
%{_mandir}/man1/pwmake.1%{?ext_man}
|
||||
%{_mandir}/man1/pwscore.1%{?ext_man}
|
||||
|
||||
%files devel
|
||||
%{_includedir}/pwquality.h
|
||||
%{_libdir}/libpwquality.so
|
||||
%{_libdir}/pkgconfig/pwquality.pc
|
||||
|
||||
%files -n pam_pwquality
|
||||
%{_pam_moduledir}/pam_pwquality.so
|
||||
%{_mandir}/man8/pam_pwquality.8%{?ext_man}
|
||||
|
||||
%files -n python3-pwquality
|
||||
%{python3_sitearch}/pwquality*
|
||||
|
||||
%files lang -f libpwquality.lang
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user