]> git.pld-linux.org Git - packages/pwdutils.git/blame - pwdutils.spec
- added no-nisplus patch (disable obsolete NIS+ functionality, requires getsecretkey...
[packages/pwdutils.git] / pwdutils.spec
CommitLineData
2d0a5d72
PS
1#
2# Conditional build:
e0b43f18 3%bcond_without audit # don't build audit log plugin
b439f0c4 4%bcond_without ldap # build without LDAP support
4da5d1c6 5%bcond_without selinux # build without SELinux support
476e0c81 6%bcond_without xcrypt # crypt() from libxcrypt
c8ad241f 7%bcond_with bioapi # with BioAPI support in passwd
27d570ab 8%bcond_with gnutls # use GnuTLS instead of OpenSSL
5fc03eb7 9
6a644dc5 10Summary: Utilities to manage the passwd and shadow user information
a18ac25c 11Summary(pl.UTF-8): Narzędzia do zarządzania informacjami o użytkownikach z passwd i shadow
5fe84642 12Name: pwdutils
b98fb9c9 13Version: 3.2.19
6ffbbdfe 14Release: 7
67de6519 15License: GPL v2
97d6c528 16Group: Base
e64b87d0
JB
17#Source0: https://www.kernel.org/pub/linux/utils/net/NIS/%{name}-%{version}.tar.bz2
18#Source0: http://www.linux-nis.org/download/pwdutils/%{name}-%{version}.tar.bz2
19Source0: %{name}-%{version}.tar.bz2
b98fb9c9 20# Source0-md5: 25a77a0ab376eacf24ad5eab7af4cdce
8ca1fd06 21Source1: %{name}.useradd
2671fa95 22Source2: %{name}.rpasswdd.init
8ca1fd06
AM
23Source3: %{name}.login.defs
24Source4: chage.pamd
25Source5: chfn.pamd
26Source6: chsh.pamd
27Source7: passwd.pamd
28Source8: useradd.pamd
534b5bbd 29Source9: userdb.pamd
badc953f 30Source10: rpasswd.pamd
7cad659a 31Patch0: %{name}-f-option.patch
e0b43f18
JB
32Patch1: %{name}-no_bash.patch
33Patch2: %{name}-silent_crontab.patch
cc9dfdec 34Patch3: %{name}-pl.po-update.patch
b98fb9c9 35Patch4: %{name}-selinux.patch
3fdc98c4 36Patch5: %{name}-am.patch
034d3cb4 37Patch6: %{name}-libc-lock.patch
f82dc29f 38Patch7: %{name}-format-security.patch
fffb81c7 39Patch8: dlsym.patch
6ffbbdfe 40Patch9: build.patch
e64b87d0 41Patch10: %{name}-no-nisplus.patch
e0b43f18 42%{?with_audit:BuildRequires: audit-libs-devel}
5fe84642 43BuildRequires: autoconf
e6eaf09b 44BuildRequires: automake >= 1:1.9
c8ad241f 45%{?with_bioapi:BuildRequires: bioapi-devel}
9ac28af5 46BuildRequires: gcc >= 5:3.2
6766ff62 47BuildRequires: gettext-tools
27d570ab 48%{?with_gnutls:BuildRequires: gnutls-devel >= 1.0.0}
67de6519 49BuildRequires: libnscd-devel
4da5d1c6 50%{?with_selinux:BuildRequires: libselinux-devel}
6ffbbdfe 51BuildRequires: libtirpc-devel
7f892c42 52BuildRequires: libtool
476e0c81 53%{?with_xcrypt:BuildRequires: libxcrypt-devel}
6dd4ff89 54%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
aeacfcd4 55BuildRequires: openslp-devel
37410059 56%{!?with_gnutls:BuildRequires: openssl-devel >= 0.9.7d}
6a644dc5 57BuildRequires: pam-devel
37410059 58BuildRequires: rpmbuild(macros) >= 1.268
f3804003 59BuildRequires: sed >= 4.0
fbc4a361 60Requires: pam >= 0.99.7.1
5fc03eb7 61Suggests: make
c95ca6c9
AM
62Provides: shadow = 2:%{version}-%{release}
63Provides: shadow-extras = 2:%{version}-%{release}
e7523ef5 64Obsoletes: shadow
f3804003 65Obsoletes: shadow-extras
9d62b365 66Obsoletes: shadow-utils
e7523ef5 67Conflicts: util-linux < 2.12-10
5fe84642
AM
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
9feef33b
JB
70# for pam module in /%{_lib}/security
71%define _libdir /%{_lib}
72
5fe84642 73%description
6a644dc5
JB
74pwdutils is a collection of utilities to manage the passwd and shadow
75user information. The difference to the shadow suite is that these
76utilities can also modify the information stored in NIS, NIS+, or
77LDAP. PAM is used for user authentication and changing the pasword. It
78contains passwd, chage, chfn, chsh, and a daemon for changing the
79password on a remote machine over a secure SSL connection. The daemon
80also uses PAM so that it can change passwords independent of where
da114143 81they are stored.
6a644dc5 82
cdfe8b28
JR
83%description -l pl.UTF-8
84pwdutils to zestaw narzędzi do zarządzania informacjami o
85użytkownikach z passwd i shadow. Różnica w stosunku do pakietu shadow
86polega na tym, że te narzędzia mogą także modyfikować informacje
87zapisane w bazie NIS, NIS+ lub LDAP. PAM jest używany do
88uwierzytelniania użytkowników i zmiany haseł. Zestaw zawiera passwd,
89chage, chfn, chsh oraz demona do zmiany hasła na zdalnej maszynie po
90bezpiecznym połączeniu SSL. Demon także używa PAM, więc można zmieniać
91hasła niezależnie od tego, gdzie są przechowywane.
5fe84642 92
e0b43f18
JB
93%package log-audit
94Summary: audit log plugin for pwdutils
a18ac25c 95Summary(pl.UTF-8): Wtyczka logująca audit dla pwdutils
e0b43f18
JB
96Group: Libraries
97Requires: %{name} = %{version}-%{release}
98
99%description log-audit
100audit log plugin for pwdutils.
101
cdfe8b28
JR
102%description log-audit -l pl.UTF-8
103Wtyczka logująca audit dla pwdutils.
e0b43f18 104
48420078
JR
105%package -n rpasswd
106Summary: Remote password update client
a18ac25c 107Summary(pl.UTF-8): Klient do zdalnego uaktualniania haseł
48420078
JR
108Group: Applications/System
109
110%description -n rpasswd
111rpasswd changes passwords for user accounts on a remote server over a
112secure SSL connection. A normal user may only change the password for
113their own account, if the user knows the password of the administrator
8458c410 114account (in the moment this is the root password on the server), he
115may change the password for any account if he calls rpasswd with the
116-a option.
48420078 117
cdfe8b28
JR
118%description -n rpasswd -l pl.UTF-8
119rpasswd pozwala zmieniać hasła użytkowników na zdalnym serwerze przy
120użyciu bezpiecznego połączenia SSL. Zwykły użytkownik może zmienić
121jedynie swoje hasło, a jeśli zna hasło administratora (obecnie jest to
122hasło roota na serwerze), może zmienić hasło dla dowolnego konta
123wywołując rpasswd z opcją -a.
48420078 124
2671fa95
AM
125%package -n rpasswdd
126Summary: Remote password update daemon
a18ac25c 127Summary(pl.UTF-8): Demon do zdalnego uaktualniania haseł
2671fa95 128Group: Applications/System
90b18a39 129Requires(post,preun): /sbin/chkconfig
37410059 130Requires: rc-scripts
2671fa95
AM
131
132%description -n rpasswdd
133rpasswdd is a daemon that lets users change their passwords in the
134presence of a directory service like NIS, NIS+ or LDAP over a secure
135SSL connection. rpasswdd behaves like the normal passwd(1) program and
01eb9107 136uses PAM for authentication and changing the password, so it can be
c02236cd 137configured very flexible for the local requirements.
2671fa95 138
cdfe8b28
JR
139%description -n rpasswdd -l pl.UTF-8
140rpasswdd to demon pozwalający użytkownikom zmieniać hasła w obecności
141usług katalogowych takich jak NIS, NIS+ czy LDAP po bezpiecznym
142połączeniu SSL. rpasswdd zachowuje się tak, jak normalny program
143passwd(1) i używam PAM do uwierzytelniania i zmiany haseł, więc może
144być bardzo elastycznie konfigurowany dla lokalnych wymagań.
01eb9107 145
9feef33b
JB
146%package -n pam-pam_rpasswd
147Summary: pam_rpasswd - PAM module to change remote password
a18ac25c 148Summary(pl.UTF-8): pam_rpasswd - moduł PAM do zdalnej zmiany hasła
9feef33b 149Group: Base
48420078
JR
150# rpasswd.conf is in rpasswd
151Requires: rpasswd = %{version}-%{release}
9feef33b
JB
152
153%description -n pam-pam_rpasswd
154The pam_rpasswd PAM module is for changing the password of user
155accounts on a remote server over a secure SSL connection. It only
156provides functionality for one PAM management group: password
157changing.
158
cdfe8b28
JR
159%description -n pam-pam_rpasswd -l pl.UTF-8
160Moduł PAM pam_rpasswd służy do zmiany haseł dla kont użytkowników na
161zdalnym serwerze po bezpiecznym połączeniu SSL. Udostępnia
162funkcjonalność tylko dla jednej grupy zarządzania PAM: zmiany haseł.
9feef33b 163
5fe84642
AM
164%prep
165%setup -q
7cad659a 166%patch0 -p1
b439f0c4 167%patch1 -p1
db28862c 168%patch2 -p1
cc9dfdec 169%patch3 -p1
b98fb9c9 170%patch4 -p1
3fdc98c4 171%patch5 -p1
034d3cb4 172%patch6 -p1
f82dc29f 173%patch7 -p1
fffb81c7 174%patch8 -p1
6ffbbdfe 175%patch9 -p1
e64b87d0 176%patch10 -p1
cc9dfdec
JB
177
178%{__rm} po/stamp-po
8458c410 179
5c20f24f 180%build
5fe84642 181%{__gettextize}
7c16c049 182%{__libtoolize}
5ba998e4 183%{__aclocal} -I m4
5fe84642 184%{__autoconf}
b869fe96 185%{__autoheader}
5fe84642
AM
186%{__automake}
187%configure \
e64b87d0 188 CPPFLAGS="%{rpmcppflags} %{?with_bioapi:-I/usr/include/bioapi}" \
c8ad241f 189 %{!?with_bioapi:ac_cv_header_bioapi_h=no ac_cv_lib_bioapi100_BioAPI_Init=no} \
e0b43f18 190 %{?with_audit:--enable-audit-plugin} \
27d570ab 191 %{!?with_gnutls:--disable-gnutls} \
e64b87d0 192 --enable-ldap%{!?with_ldap:=no} \
e0b43f18 193 --enable-nls \
aeacfcd4 194 --enable-pam_rpasswd \
e64b87d0 195 --enable-selinux%{!?with_selinux:=no} \
aeacfcd4 196 --enable-slp \
5fe84642
AM
197 --disable-rpath
198%{__make}
199
200%install
201rm -rf $RPM_BUILD_ROOT
f9e68809 202install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,security,skel/tmp}
e64b87d0 203
5fe84642
AM
204%{__make} install \
205 DESTDIR=$RPM_BUILD_ROOT
206
e64b87d0 207%{__mv} $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
2671fa95
AM
208install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
209install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpasswdd
210install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
8ca1fd06
AM
211
212install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/chage
213install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/chfn
214install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/chsh
215install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/passwd
216install %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/useradd
534b5bbd 217install %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/shadow
badc953f 218install %{SOURCE10} $RPM_BUILD_ROOT/etc/pam.d/rpasswd
8ca1fd06 219
57999f04
JB
220%{__rm} $RPM_BUILD_ROOT%{_libdir}/pwdutils/*.{la,a}
221%{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_*.la
222%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/rpasswdd
67de6519 223
b9e495eb
JB
224:> $RPM_BUILD_ROOT%{_sysconfdir}/shadow
225:> $RPM_BUILD_ROOT/etc/security/chfn.allow
226:> $RPM_BUILD_ROOT/etc/security/chsh.allow
801fabc9 227
5fe84642
AM
228%find_lang %{name}
229
230%clean
231rm -rf $RPM_BUILD_ROOT
232
233%post
6118303e 234if [ ! -f %{_sysconfdir}/shadow ]; then
5fe84642
AM
235 %{_sbindir}/pwconv
236fi
237
2671fa95
AM
238%post -n rpasswdd
239/sbin/chkconfig --add rpasswdd
37410059 240%service rpasswdd restart "rpasswdd daemon"
2671fa95
AM
241
242%preun -n rpasswdd
243if [ "$1" = "0" ]; then
37410059 244 %service rpasswdd stop
53d92fc1 245 /sbin/chkconfig --del rpasswdd
2671fa95
AM
246fi
247
5fe84642
AM
248%files -f %{name}.lang
249%defattr(644,root,root,755)
dd06a689 250%doc AUTHORS ChangeLog NEWS README THANKS TODO
5c20f24f 251%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/shadow
5c20f24f 252%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/*
8ca1fd06 253%attr(750,root,root) %dir %{_sysconfdir}/%{name}
5c20f24f 254%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.local
95539a65 255%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/logging
5c20f24f
JB
256%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chage
257%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chfn
258%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chsh
259%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/passwd
260%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/useradd
261%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/shadow
7f892c42 262%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/login.defs
b9e495eb
JB
263%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chfn.allow
264%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chsh.allow
97d6c528 265%dir %config(missingok) %attr(700,root,root) /etc/skel/tmp
8ca1fd06
AM
266%attr(755,root,root) %{_bindir}/chage
267%attr(4755,root,root) %{_bindir}/chfn
268%attr(4755,root,root) %{_bindir}/chsh
269%attr(4755,root,root) %{_bindir}/expiry
b869fe96 270%attr(4755,root,root) %{_bindir}/gpasswd
8a9684a4 271%attr(4755,root,root) %{_bindir}/newgrp
5fe84642 272%attr(4755,root,root) %{_bindir}/passwd
8a9684a4 273%attr(4755,root,root) %{_bindir}/sg
8ca1fd06
AM
274%attr(755,root,root) %{_sbindir}/chpasswd
275%attr(755,root,root) %{_sbindir}/groupadd
276%attr(755,root,root) %{_sbindir}/groupdel
b869fe96 277%attr(755,root,root) %{_sbindir}/groupmod
c5678d54 278%attr(755,root,root) %{_sbindir}/grpconv
c95ca6c9 279%attr(755,root,root) %{_sbindir}/grpck
534b5bbd 280%attr(755,root,root) %{_sbindir}/grpunconv
c5678d54 281%attr(755,root,root) %{_sbindir}/pwconv
c95ca6c9 282%attr(755,root,root) %{_sbindir}/pwck
c5678d54 283%attr(755,root,root) %{_sbindir}/pwunconv
8ca1fd06
AM
284%attr(755,root,root) %{_sbindir}/useradd
285%attr(755,root,root) %{_sbindir}/userdel
b869fe96 286%attr(755,root,root) %{_sbindir}/usermod
ba407186
JB
287%attr(755,root,root) %{_sbindir}/vigr
288%attr(755,root,root) %{_sbindir}/vipw
67de6519
JB
289%dir %{_libdir}/pwdutils
290%attr(755,root,root) %{_libdir}/pwdutils/liblog_syslog.so*
7c16c049
JB
291%{_mandir}/man1/chage.1*
292%{_mandir}/man1/chfn.1*
293%{_mandir}/man1/chsh.1*
294%{_mandir}/man1/expiry.1*
295%{_mandir}/man1/gpasswd.1*
296%{_mandir}/man1/newgrp.1*
297%{_mandir}/man1/passwd.1*
298%{_mandir}/man1/sg.1*
299%{_mandir}/man5/login.defs.5*
300%{_mandir}/man8/chpasswd.8*
301%{_mandir}/man8/groupadd.8*
302%{_mandir}/man8/groupdel.8*
303%{_mandir}/man8/groupmod.8*
304%{_mandir}/man8/grpck.8*
305%{_mandir}/man8/grpconv.8*
306%{_mandir}/man8/grpunconv.8*
307%{_mandir}/man8/pwck.8*
308%{_mandir}/man8/pwconv.8*
309%{_mandir}/man8/pwunconv.8*
310%{_mandir}/man8/useradd.8*
311%{_mandir}/man8/userdel.8*
312%{_mandir}/man8/usermod.8*
313%{_mandir}/man8/vigr.8*
314%{_mandir}/man8/vipw.8*
2671fa95 315
e0b43f18
JB
316%if %{with audit}
317%files log-audit
318%defattr(644,root,root,755)
319%attr(755,root,root) %{_libdir}/pwdutils/liblog_audit.so*
320%endif
321
48420078
JR
322%files -n rpasswd
323%defattr(644,root,root,755)
324%attr(755,root,root) %{_bindir}/rpasswd
6118303e 325%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpasswd.conf
48420078
JR
326%{_mandir}/man1/rpasswd.1*
327%{_mandir}/man5/rpasswd.conf.5*
328
2671fa95
AM
329%files -n rpasswdd
330%defattr(644,root,root,755)
331%attr(755,root,root) %{_sbindir}/rpasswdd
332%attr(754,root,root) /etc/rc.d/init.d/rpasswdd
5c20f24f
JB
333%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/rpasswd
334%{_mandir}/man8/rpasswdd.8*
9feef33b
JB
335
336%files -n pam-pam_rpasswd
337%defattr(644,root,root,755)
cc9dfdec 338%attr(755,root,root) /%{_lib}/security/pam_rpasswd.so
9feef33b 339%{_mandir}/man8/pam_rpasswd.8*
This page took 0.383706 seconds and 4 git commands to generate.