2012-10-29 16:15:23 +01:00
|
|
|
#
|
2012-11-13 10:36:56 +01:00
|
|
|
# spec file for package shadow
|
2012-10-29 16:15:23 +01:00
|
|
|
#
|
2016-01-18 12:08:55 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-10-29 16:15:23 +01:00
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Summary: Utilities to Manage User and Group Accounts
|
2012-11-13 10:36:56 +01:00
|
|
|
License: BSD-3-Clause and GPL-2.0+
|
|
|
|
Group: System/Base
|
2012-10-29 16:15:23 +01:00
|
|
|
Name: shadow
|
2016-05-30 12:38:25 +02:00
|
|
|
Version: 4.2.1
|
2012-11-13 10:36:56 +01:00
|
|
|
Release: 0
|
2012-10-29 16:15:23 +01:00
|
|
|
Url: http://pkg-shadow.alioth.debian.org/
|
2016-05-30 12:38:25 +02:00
|
|
|
Source: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.xz
|
2012-11-13 10:36:56 +01:00
|
|
|
Source1: pamd.tar.bz2
|
|
|
|
Source2: README.changes-pwdutils
|
|
|
|
Source3: useradd.local
|
|
|
|
Source4: userdel-pre.local
|
|
|
|
Source5: userdel-post.local
|
2015-07-16 11:52:01 +02:00
|
|
|
Source6: shadow.service
|
|
|
|
Source7: shadow.timer
|
2016-05-30 12:38:25 +02:00
|
|
|
Patch: shadow-login_defs.patch
|
|
|
|
Patch1: userdel-script.patch
|
|
|
|
Patch2: useradd-script.patch
|
|
|
|
Patch3: chkname-regex.patch
|
|
|
|
Patch4: useradd-default.patch
|
|
|
|
Patch5: getdef-new-defs.patch
|
2013-09-17 14:59:36 +02:00
|
|
|
Patch6: shadow-4.1.5.1-manfix.patch
|
|
|
|
Patch7: shadow-4.1.5.1-logmsg.patch
|
|
|
|
Patch8: shadow-4.1.5.1-errmsg.patch
|
|
|
|
Patch9: shadow-4.1.5.1-backup-mode.patch
|
2016-05-30 12:38:25 +02:00
|
|
|
Patch10: encryption_method_nis.patch
|
|
|
|
Patch11: useradd-mkdirs.patch
|
|
|
|
Patch12: shadow-4.1.5.1-audit-owner.patch
|
|
|
|
Patch13: shadow-4.1.5.1-userdel-helpfix.patch
|
|
|
|
Patch14: shadow-4.2.1-defs-chroot.patch
|
|
|
|
Patch15: shadow-4.2.1-merge-group.patch
|
|
|
|
Patch16: Fix-user-busy-errors-at-userdel.patch
|
2012-10-29 16:15:23 +01:00
|
|
|
BuildRequires: audit-devel
|
2012-11-13 10:36:56 +01:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libattr-devel
|
|
|
|
BuildRequires: libselinux-devel
|
2012-10-29 16:15:23 +01:00
|
|
|
BuildRequires: libsemanage-devel
|
2012-11-13 10:36:56 +01:00
|
|
|
BuildRequires: pam-devel
|
2012-10-29 16:15:23 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-11-13 10:36:56 +01:00
|
|
|
PreReq: permissions
|
|
|
|
Provides: pwdutils = 3.2.20
|
|
|
|
Obsoletes: pwdutils <= 3.2.19
|
2012-10-29 16:15:23 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package includes the necessary programs for converting plain
|
|
|
|
password files to the shadow password format and to manage user and
|
|
|
|
group accounts.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -a 1
|
|
|
|
%patch -p0
|
|
|
|
%patch1 -p0
|
|
|
|
%patch2 -p0
|
|
|
|
%patch3 -p0
|
2012-11-13 10:36:56 +01:00
|
|
|
%patch4 -p0
|
2012-11-13 17:35:05 +01:00
|
|
|
%patch5 -p0
|
2016-05-30 12:38:25 +02:00
|
|
|
%patch6 -p0
|
|
|
|
%patch7 -p0
|
2013-09-17 14:59:36 +02:00
|
|
|
%patch8 -p0
|
2016-05-30 12:38:25 +02:00
|
|
|
%patch9 -p0
|
2013-11-12 14:47:56 +01:00
|
|
|
%patch10 -p0
|
2016-05-30 12:38:25 +02:00
|
|
|
%patch11 -p0
|
|
|
|
%patch12 -p0
|
|
|
|
%patch13 -p0
|
|
|
|
%patch14 -p0
|
|
|
|
%patch15 -p0
|
|
|
|
%patch16 -p0
|
2012-10-29 16:15:23 +01:00
|
|
|
|
|
|
|
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
|
|
|
mv -v doc/HOWTO.utf8 doc/HOWTO
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -fpie"
|
|
|
|
export LDFLAGS="-pie"
|
|
|
|
|
|
|
|
%configure \
|
|
|
|
--disable-shadowgrp \
|
|
|
|
--enable-account-tools-setuid \
|
|
|
|
--with-audit \
|
|
|
|
--with-libpam \
|
|
|
|
--with-sha-crypt \
|
|
|
|
--with-acl \
|
|
|
|
--with-attr \
|
|
|
|
--with-nscd \
|
|
|
|
--with-selinux \
|
|
|
|
--without-libcrack \
|
|
|
|
--disable-shared \
|
|
|
|
--with-group-name-max-length=32
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
cp %SOURCE2 .
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs
|
|
|
|
|
|
|
|
# install useradd.local, userdel.local, ...
|
|
|
|
install -m 0755 %SOURCE3 $RPM_BUILD_ROOT/%{_sbindir}/
|
|
|
|
install -m 0755 %SOURCE4 $RPM_BUILD_ROOT/%{_sbindir}/
|
|
|
|
install -m 0755 %SOURCE5 $RPM_BUILD_ROOT/%{_sbindir}/
|
2015-07-16 11:52:01 +02:00
|
|
|
install -Dm644 %{S:6} %{buildroot}%{_unitdir}/shadow.service
|
|
|
|
install -Dm644 %{S:7} %{buildroot}%{_unitdir}/shadow.timer
|
2012-10-29 16:15:23 +01:00
|
|
|
|
|
|
|
# Remove binaries we don't use.
|
|
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/groups
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man1/groups.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/groups.*
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/grpconv
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/grpconv.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/grpconv.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/grpunconv
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/grpunconv.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/grpunconv.*
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/groupmems
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/groupmems.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/groupmems.*
|
|
|
|
rm $RPM_BUILD_ROOT/etc/pam.d/groupmems
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/login
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man1/login.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/login.*
|
|
|
|
rm $RPM_BUILD_ROOT/etc/pam.d/login
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/su
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man1/su.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/su.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man5/suauth.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/suauth.*
|
|
|
|
rm $RPM_BUILD_ROOT/etc/pam.d/su
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/faillog
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man5/faillog.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/faillog.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/faillog.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/faillog.*
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/logoutd
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/logoutd.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/logoutd.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/nologin
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/nologin.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/nologin.*
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_sbindir}/chgpasswd
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man8/chgpasswd.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/chgpasswd.*
|
|
|
|
rm $RPM_BUILD_ROOT/etc/pam.d/chgpasswd
|
|
|
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man3/getspnam.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man3/getspnam.*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man5/gshadow.5*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/gshadow.5*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man5/passwd.5*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/passwd.5*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/man5/shadow.5*
|
|
|
|
rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/shadow.5*
|
|
|
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_mandir}/{??,??_??}
|
|
|
|
|
|
|
|
%find_lang shadow
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2015-07-16 11:52:01 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre shadow.service shadow.timer
|
|
|
|
|
2012-10-29 16:15:23 +01:00
|
|
|
%post
|
|
|
|
%set_permissions /usr/bin/chage
|
|
|
|
%set_permissions /usr/bin/chfn
|
|
|
|
%set_permissions /usr/bin/chsh
|
|
|
|
%set_permissions /usr/bin/expiry
|
|
|
|
%set_permissions /usr/bin/gpasswd
|
|
|
|
%set_permissions /usr/bin/newgrp
|
|
|
|
%set_permissions /usr/bin/passwd
|
2016-05-30 12:38:25 +02:00
|
|
|
%set_permissions /usr/bin/newgidmap
|
|
|
|
%set_permissions /usr/bin/newuidmap
|
2012-10-29 16:15:23 +01:00
|
|
|
|
2016-01-18 12:08:55 +01:00
|
|
|
%service_add_post shadow.service shadow.timer
|
|
|
|
|
2012-10-29 16:15:23 +01:00
|
|
|
%verifyscript
|
|
|
|
%verify_permissions /usr/bin/chage
|
|
|
|
%verify_permissions /usr/bin/chfn
|
|
|
|
%verify_permissions /usr/bin/chsh
|
|
|
|
%verify_permissions /usr/bin/expiry
|
|
|
|
%verify_permissions /usr/bin/gpasswd
|
|
|
|
%verify_permissions /usr/bin/newgrp
|
|
|
|
%verify_permissions /usr/bin/passwd
|
2016-05-30 12:38:25 +02:00
|
|
|
%verify_permissions /usr/bin/newgidmap
|
|
|
|
%verify_permissions /usr/bin/newuidmap
|
2012-10-29 16:15:23 +01:00
|
|
|
|
2015-07-16 11:52:01 +02:00
|
|
|
%preun
|
|
|
|
%service_del_preun shadow.service shadow.timer
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun shadow.service shadow.timer
|
|
|
|
|
2012-10-29 16:15:23 +01:00
|
|
|
%files -f shadow.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc NEWS doc/HOWTO README README.changes-pwdutils
|
|
|
|
%attr(0644,root,root) %config %{_sysconfdir}/login.defs
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/useradd
|
|
|
|
%config /etc/pam.d/chage
|
|
|
|
%config /etc/pam.d/chfn
|
|
|
|
%config /etc/pam.d/chsh
|
|
|
|
%config /etc/pam.d/passwd
|
|
|
|
%config /etc/pam.d/useradd
|
|
|
|
%config /etc/pam.d/chpasswd
|
|
|
|
%config /etc/pam.d/groupadd
|
|
|
|
%config /etc/pam.d/groupdel
|
|
|
|
%config /etc/pam.d/groupmod
|
|
|
|
%config /etc/pam.d/newusers
|
|
|
|
%config /etc/pam.d/useradd
|
|
|
|
%config /etc/pam.d/userdel
|
|
|
|
%config /etc/pam.d/usermod
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/chage
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/chfn
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/chsh
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/expiry
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/gpasswd
|
|
|
|
%{_bindir}/lastlog
|
|
|
|
%attr(4755,root,root) %{_bindir}/newgrp
|
|
|
|
%attr(4755,root,shadow) %{_bindir}/passwd
|
2016-05-30 12:38:25 +02:00
|
|
|
%attr(0755,root,shadow) %{_bindir}/newgidmap
|
|
|
|
%attr(0755,root,shadow) %{_bindir}/newuidmap
|
2012-10-29 16:15:23 +01:00
|
|
|
%{_bindir}/sg
|
|
|
|
%{_sbindir}/groupadd
|
|
|
|
%{_sbindir}/groupdel
|
|
|
|
%{_sbindir}/groupmod
|
|
|
|
%{_sbindir}/grpck
|
|
|
|
%{_sbindir}/pwck
|
|
|
|
%{_sbindir}/useradd
|
|
|
|
%{_sbindir}/userdel
|
|
|
|
%{_sbindir}/usermod
|
|
|
|
%{_sbindir}/pwconv
|
|
|
|
%{_sbindir}/pwunconv
|
|
|
|
%{_sbindir}/chpasswd
|
|
|
|
%{_sbindir}/newusers
|
|
|
|
%{_sbindir}/vipw
|
|
|
|
%{_sbindir}/vigr
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sbindir}/useradd.local
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sbindir}/userdel-pre.local
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sbindir}/userdel-post.local
|
|
|
|
%{_mandir}/man1/chage.1*
|
|
|
|
%{_mandir}/man1/chfn.1*
|
|
|
|
%{_mandir}/man1/chsh.1*
|
|
|
|
%{_mandir}/man1/expiry.1*
|
|
|
|
%{_mandir}/man1/gpasswd.1*
|
|
|
|
%{_mandir}/man1/newgrp.1*
|
|
|
|
%{_mandir}/man1/passwd.1*
|
|
|
|
%{_mandir}/man1/sg.1*
|
|
|
|
%{_mandir}/man3/shadow.3*
|
|
|
|
%{_mandir}/man5/login.defs.5*
|
|
|
|
%{_mandir}/man8/chpasswd.8*
|
|
|
|
%{_mandir}/man8/groupadd.8*
|
|
|
|
%{_mandir}/man8/groupdel.8*
|
|
|
|
%{_mandir}/man8/groupmod.8*
|
|
|
|
%{_mandir}/man8/grpck.8*
|
|
|
|
%{_mandir}/man8/lastlog.8*
|
|
|
|
%{_mandir}/man8/newusers.8*
|
|
|
|
%{_mandir}/man8/pwck.8*
|
|
|
|
%{_mandir}/man8/pwconv.8*
|
|
|
|
%{_mandir}/man8/pwunconv.8*
|
|
|
|
%{_mandir}/man8/useradd.8*
|
|
|
|
%{_mandir}/man8/userdel.8*
|
|
|
|
%{_mandir}/man8/usermod.8*
|
|
|
|
%{_mandir}/man8/vigr.8*
|
|
|
|
%{_mandir}/man8/vipw.8*
|
2016-05-30 12:38:25 +02:00
|
|
|
%{_mandir}/man5/subuid.5*
|
|
|
|
%{_mandir}/man5/subgid.5*
|
|
|
|
%{_mandir}/man1/newgidmap.1*
|
|
|
|
%{_mandir}/man1/newuidmap.1*
|
2012-10-29 16:15:23 +01:00
|
|
|
|
2015-07-16 11:52:01 +02:00
|
|
|
%{_unitdir}/*
|
|
|
|
|
2012-10-29 16:15:23 +01:00
|
|
|
%changelog
|