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