%bcond_without audit # don't build audit log plugin
%bcond_without ldap # build without LDAP support
%bcond_without selinux # build without SELinux support
+%bcond_without xcrypt # crypt() from libxcrypt
%bcond_with bioapi # with BioAPI support in passwd
%bcond_with gnutls # use GnuTLS instead of OpenSSL
-#
+
Summary: Utilities to manage the passwd and shadow user information
Summary(pl.UTF-8): Narzędzia do zarządzania informacjami o użytkownikach z passwd i shadow
Name: pwdutils
Version: 3.2.19
-Release: 1
+Release: 8
License: GPL v2
Group: Base
-#Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/%{name}-%{version}.tar.bz2
-Source0: http://www.linux-nis.org/download/pwdutils/%{name}-%{version}.tar.bz2
+#Source0: https://www.kernel.org/pub/linux/utils/net/NIS/%{name}-%{version}.tar.bz2
+#Source0: http://www.linux-nis.org/download/pwdutils/%{name}-%{version}.tar.bz2
+Source0: %{name}-%{version}.tar.bz2
# Source0-md5: 25a77a0ab376eacf24ad5eab7af4cdce
Source1: %{name}.useradd
Source2: %{name}.rpasswdd.init
Patch2: %{name}-silent_crontab.patch
Patch3: %{name}-pl.po-update.patch
Patch4: %{name}-selinux.patch
-URL: http://www.thkukuk.de/pam/pwdutils/
+Patch5: %{name}-am.patch
+Patch6: %{name}-libc-lock.patch
+Patch7: %{name}-format-security.patch
+Patch8: dlsym.patch
+Patch9: build.patch
+Patch10: %{name}-no-nisplus.patch
%{?with_audit:BuildRequires: audit-libs-devel}
BuildRequires: autoconf
BuildRequires: automake >= 1:1.9
%{?with_bioapi:BuildRequires: bioapi-devel}
BuildRequires: gcc >= 5:3.2
-BuildRequires: gettext-devel
+BuildRequires: gettext-tools
%{?with_gnutls:BuildRequires: gnutls-devel >= 1.0.0}
BuildRequires: libnscd-devel
%{?with_selinux:BuildRequires: libselinux-devel}
+BuildRequires: libtirpc-devel
BuildRequires: libtool
-BuildRequires: libxcrypt-devel
-%{?with_ldap:BuildRequires: openldap-devel >= 2.4.6}
+%{?with_xcrypt:BuildRequires: libxcrypt-devel}
+%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
BuildRequires: openslp-devel
%{!?with_gnutls:BuildRequires: openssl-devel >= 0.9.7d}
BuildRequires: pam-devel
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
Requires: pam >= 0.99.7.1
+Suggests: make
Provides: shadow = 2:%{version}-%{release}
Provides: shadow-extras = 2:%{version}-%{release}
Obsoletes: shadow
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%{__rm} po/stamp-po
%{__autoheader}
%{__automake}
%configure \
- %{?with_bioapi:CPPFLAGS="-I/usr/include/bioapi"} \
+ CPPFLAGS="%{rpmcppflags} %{?with_bioapi:-I/usr/include/bioapi}" \
%{!?with_bioapi:ac_cv_header_bioapi_h=no ac_cv_lib_bioapi100_BioAPI_Init=no} \
%{?with_audit:--enable-audit-plugin} \
%{!?with_gnutls:--disable-gnutls} \
- --%{?with_ldap:en}%{!?with_ldap:dis}able-ldap \
+ --enable-ldap%{!?with_ldap:=no} \
--enable-nls \
--enable-pam_rpasswd \
- --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
+ --enable-selinux%{!?with_selinux:=no} \
--enable-slp \
--disable-rpath
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,security,skel/{etc,tmp}}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,security,skel/tmp}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-mv -f $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
+%{__mv} $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpasswdd
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/login.defs
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chfn.allow
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chsh.allow
-%dir /etc/skel
-%dir %config(missingok) %attr(750,root,root) /etc/skel/etc
%dir %config(missingok) %attr(700,root,root) /etc/skel/tmp
%attr(755,root,root) %{_bindir}/chage
%attr(4755,root,root) %{_bindir}/chfn