also apply stashed changes :P

This commit is contained in:
Paul Wouters 2022-03-07 21:37:40 -05:00
parent 620dc687b7
commit 6d9868a4c6
No known key found for this signature in database
GPG Key ID: DB48D2E5122468BF

View File

@ -4,14 +4,14 @@
Summary: A password-checking library
Name: cracklib
Version: 2.9.6
Version: 2.9.7
Release: 28%{?dist}
Source0: https://github.com/cracklib/cracklib/releases/download/cracklib-%{version}/cracklib-%{version}.tar.gz
Source1: https://github.com/cracklib/cracklib/releases/download/cracklib-%{version}/cracklib-words-%{version}.gz
Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.gz
Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz
# For man pages.
Source2: http://ftp.us.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.8.19-1.debian.tar.gz
Source40: http://ftp.us.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.8.19-1.dsc
Source2: http://archive.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.9.2-1.debian.tar.xz
Source40: http://archive.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.9.2-1.dsc
# From attachment to https://bugzilla.redhat.com/show_bug.cgi?id=627449
Source3: cracklib.default.zh_CN.po
@ -26,7 +26,7 @@ Patch6: cracklib-2.9.7-simplistic.patch
Patch7: cracklib-2.9.7-translation-updates.patch
Patch9: cracklib-2.9.6-coverity.patch
Patch10: cracklib-2.9.6-lookup.patch
URL: http://sourceforge.net/projects/cracklib/
URL: https://github.com/cracklib/cracklib
License: LGPLv2+
BuildRequires: gcc
BuildRequires: words, gettext
@ -56,7 +56,7 @@ CrackLib, you will also want to install the cracklib-dicts package.
%package devel
Summary: Development files needed for building applications which use cracklib
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The cracklib-devel package contains the header files and libraries needed
@ -66,6 +66,7 @@ for compiling applications which use cracklib.
Summary: The standard CrackLib dictionaries
BuildRequires: words >= 2-13
BuildRequires: make
BuildArch: noarch
Requires: cracklib = %{version}-%{release}
%description dicts
@ -80,7 +81,6 @@ If you are installing CrackLib, you should also install cracklib-dicts.
%setup -q -a 2
# Replace zn_CN.po with one that wasn't mis-transcoded at some point.
grep '????????????????' po/zh_CN.po
install -p -m 644 %{SOURCE3} po/zh_CN.po
%patch1 -p1 -b .inttypes
@ -108,41 +108,40 @@ make -C po update-gmo
make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%make_install 'pythondir=${pyexecdir}'
./util/cracklib-format cracklib-dicts/* | \
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
rm -f $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
./util/cracklib-packer $RPM_BUILD_ROOT%{dictpath}
./util/cracklib-format $RPM_BUILD_ROOT%{dictdir}/cracklib-small | \
./util/cracklib-packer $RPM_BUILD_ROOT%{dictdir}/cracklib-small
rm -f $RPM_BUILD_ROOT%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT%{_includedir}/crack.h
ln -s cracklib-format $RPM_BUILD_ROOT%{_sbindir}/mkdict
# packer link removed as it clashes with hashicorp's packer binary.
#ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
touch $RPM_BUILD_ROOT/top
toprelpath=..
touch $RPM_BUILD_ROOT/top
while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do
while ! test -f $RPM_BUILD_ROOT%{_libdir}/$toprelpath/top ; do
toprelpath=../$toprelpath
done
rm -f $RPM_BUILD_ROOT/top
if test %{dictpath} != %{_libdir}/cracklib_dict ; then
ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.pwi
fi
rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/_cracklib*.*a
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/_cracklib*.*a
rm -f $RPM_BUILD_ROOT%{_libdir}/libcrack.la
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{3,8}
install -p -m644 debian/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
install -p -m644 debian/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
if ! test -s $RPM_BUILD_ROOT/%{_mandir}/man8/cracklib-packer.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT/%{_mandir}/man8/cracklib-packer.8
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{3,8}
install -p -m644 debian/*.3 $RPM_BUILD_ROOT%{_mandir}/man3/
install -p -m644 debian/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
if ! test -s $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-packer.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-packer.8
fi
if ! test -s $RPM_BUILD_ROOT/%{_mandir}/man8/cracklib-unpacker.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT/%{_mandir}/man8/cracklib-unpacker.8
if ! test -s $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-unpacker.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-unpacker.8
fi
%find_lang %{name}
@ -154,7 +153,6 @@ make test DESTDIR=$RPM_BUILD_ROOT
%files -f %{name}.lang
%doc README README-WORDS NEWS README-LICENSE AUTHORS
%{!?_licensedir:%global license %%doc}
%license COPYING.LIB
%{_libdir}/libcrack.so.*
%dir %{_datadir}/cracklib