]> git.pld-linux.org Git - packages/pwdutils.git/blob - pwdutils.spec
- groupadd -f exits with 0 status when group already exists
[packages/pwdutils.git] / pwdutils.spec
1 #
2 # Conditional build:
3 %bcond_without  ldap    # build without LDAP support
4 #
5 Summary:        Utilities to manage the passwd and shadow user information
6 Summary(pl):    Narzêdzia do zarz±dzania informacjami o u¿ytkownikach z passwd i shadow
7 Name:           pwdutils
8 Version:        2.6.4
9 Release:        2
10 License:        GPL
11 Group:          Applications/System
12 Source0:        ftp://ftp.kernel.org/pub/linux/utils/net/NIS/%{name}-%{version}.tar.bz2
13 # Source0-md5:  d2f4313ed1e8f40f47f336f6340eef54
14 Source1:        %{name}.useradd
15 Source2:        %{name}.rpasswdd.init
16 Source3:        %{name}.login.defs
17 Source4:        chage.pamd
18 Source5:        chfn.pamd
19 Source6:        chsh.pamd
20 Source7:        passwd.pamd
21 Source8:        useradd.pamd
22 Source9:        userdb.pamd
23 Patch0:         %{name}-f-option.patch
24 URL:            http://www.thkukuk.de/pam/pwdutils/
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  gcc >= 5:3.2
28 BuildRequires:  gettext-devel
29 BuildRequires:  libselinux-devel
30 %{?with_ldap:BuildRequires:     openldap-devel}
31 BuildRequires:  openssl-devel >= 0.9.7d
32 BuildRequires:  openslp-devel
33 BuildRequires:  pam-devel
34 BuildRequires:  sed >= 4.0
35 Provides:       shadow = 2:%{version}-%{release}
36 Provides:       shadow-extras = 2:%{version}-%{release}
37 Obsoletes:      shadow
38 Obsoletes:      shadow-extras
39 Conflicts:      util-linux < 2.12-10
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 # for pam module in /%{_lib}/security
43 %define         _libdir         /%{_lib}
44
45 %description
46 pwdutils is a collection of utilities to manage the passwd and shadow
47 user information. The difference to the shadow suite is that these
48 utilities can also modify the information stored in NIS, NIS+, or
49 LDAP. PAM is used for user authentication and changing the pasword. It
50 contains passwd, chage, chfn, chsh, and a daemon for changing the
51 password on a remote machine over a secure SSL connection. The daemon
52 also uses PAM so that it can change passwords independent of where
53 they are stored.
54
55 %description -l pl
56 pwdutils to zestaw narzêdzi do zarz±dzania informacjami o
57 u¿ytkownikach z passwd i shadow. Ró¿nica w stosunku do pakietu shadow
58 polega na tym, ¿e te narzêdzia mog± tak¿e modyfikowaæ informacje
59 zapisane w bazie NIS, NIS+ lub LDAP. PAM jest u¿ywany do
60 uwierzytelniania u¿ytkowników i zmiany hase³. Zestaw zawiera passwd,
61 chage, chfn, chsh oraz demona do zmiany has³a na zdalnej maszynie po
62 bezpiecznym po³±czeniu SSL. Demon tak¿e u¿ywa PAM, wiêc mo¿na zmieniaæ
63 has³a niezale¿nie od tego, gdzie s± przechowywane.
64
65 %package -n rpasswdd
66 Summary:        Remote password update daemon
67 Summary(pl):    Demon do zdalnego uaktualniania hase³
68 Group:          Applications/System
69
70 %description -n rpasswdd
71 rpasswdd is a daemon that lets users change their passwords in the
72 presence of a directory service like NIS, NIS+ or LDAP over a secure
73 SSL connection. rpasswdd behaves like the normal passwd(1) program and
74 uses PAM for authentication and changing the password, so it can be
75 configured very flexibel for the local requirements.
76
77 %description -n rpasswdd -l pl
78 rpasswdd to demon pozwalaj±cy u¿ytkownikom zmieniaæ has³a w obecno¶ci
79 us³ug katalogowych takich jak NIS, NIS+ czy LDAP po bezpiecznym
80 po³±czeniu SSL. rpasswdd zachowuje siê tak, jak normalny program
81 passwd(1) i u¿ywam PAM do uwierzytelniania i zmiany hase³, wiêc mo¿e
82 byæ bardzo elastycznie konfigurowany dla lokalnych wymagañ.
83
84 %package -n pam-pam_rpasswd
85 Summary:        pam_rpasswd - PAM module to change remote password
86 Summary(pl):    pam_rpasswd - modu³ PAM do zdalnej zmiany has³a
87 Group:          Base
88 # rpasswd.conf is in base
89 Requires:       %{name} = %{version}-%{release}
90
91 %description -n pam-pam_rpasswd
92 The pam_rpasswd PAM module is for changing the password of user
93 accounts on a remote server over a secure SSL connection. It only
94 provides functionality for one PAM management group: password
95 changing.
96
97 %description -n pam-pam_rpasswd -l pl
98 Modu³ PAM pam_rpasswd s³u¿y do zmiany hase³ dla kont u¿ytkowników na
99 zdalnym serwerze po bezpiecznym po³±czeniu SSL. Udostêpnia
100 funkcjonalno¶æ tylko dla jednej grupy zarz±dzania PAM: zmiany hase³.
101
102 %prep
103 %setup -q
104 %patch0 -p1
105
106 %build
107 sed -i -e 's#EXTRA_CFLAGS=.*#EXTRA_CFLAGS="-W -Wall"#g' configure.in
108 %{__gettextize}
109 %{__aclocal}
110 %{__autoconf}
111 %{__autoheader}
112 %{__automake}
113 %configure \
114         --enable-pam_rpasswd \
115         --enable-selinux \
116         --enable-slp \
117         --enable-ssl \
118         --%{?with_ldap:en}%{!?with_ldap:dis}able-ldap \
119         --enable-nls \
120         --disable-rpath
121 %{__make}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,skel}
126
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT
129
130 mv $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
131 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
132 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpasswdd
133 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
134
135 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/chage
136 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/chfn
137 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/chsh
138 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/passwd
139 install %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/useradd
140 install %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/shadow
141
142 :> $RPM_BUILD_ROOT/etc/shadow
143
144 %find_lang %{name}
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post
150 if [ ! -f /etc/shadow ]; then
151         %{_sbindir}/pwconv
152 fi
153
154 %post -n rpasswdd
155 /sbin/chkconfig --add rpasswdd
156 if [ -f /var/lock/subsys/rpasswdd ]; then
157         /etc/rc.d/init.d/rpasswdd restart 1>&2
158 else
159         echo "Run \"/etc/rc.d/init.d/rpasswdd start\" to start rpasswdd daemon."
160 fi
161
162 %preun -n rpasswdd
163 if [ "$1" = "0" ]; then
164         if [ -f /var/lock/subsys/rpasswdd ]; then
165                 /etc/rc.d/init.d/rpasswdd stop 1>&2
166         fi
167         /sbin/chkconfig --del rpasswdd
168 fi
169
170 %files -f %{name}.lang
171 %defattr(644,root,root,755)
172 %doc ChangeLog NEWS README THANKS TODO
173 %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %ghost %{_sysconfdir}/shadow
174 %attr(750,root,root) %dir %{_sysconfdir}/default
175 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/default/*
176 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
177 %attr(750,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/*.local
178 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/chage
179 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/chfn
180 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/chsh
181 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/passwd
182 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/useradd
183 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/shadow
184 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/login.defs
185 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/rpasswd.conf
186 %dir /etc/skel
187 %attr(755,root,root) %{_bindir}/chage
188 %attr(4755,root,root) %{_bindir}/chfn
189 %attr(4755,root,root) %{_bindir}/chsh
190 %attr(4755,root,root) %{_bindir}/expiry
191 %attr(4755,root,root) %{_bindir}/gpasswd
192 %attr(755,root,root) %{_bindir}/newgrp
193 %attr(4755,root,root) %{_bindir}/passwd
194 %attr(755,root,root) %{_bindir}/rpasswd
195 %attr(755,root,root) %{_bindir}/sg
196 %attr(755,root,root) %{_sbindir}/chpasswd
197 %attr(755,root,root) %{_sbindir}/groupadd
198 %attr(755,root,root) %{_sbindir}/groupdel
199 %attr(755,root,root) %{_sbindir}/groupmod
200 %attr(755,root,root) %{_sbindir}/grpconv
201 %attr(755,root,root) %{_sbindir}/grpck
202 %attr(755,root,root) %{_sbindir}/grpunconv
203 %attr(755,root,root) %{_sbindir}/pwconv
204 %attr(755,root,root) %{_sbindir}/pwck
205 %attr(755,root,root) %{_sbindir}/pwunconv
206 %attr(755,root,root) %{_sbindir}/rpasswdd
207 %attr(755,root,root) %{_sbindir}/useradd
208 %attr(755,root,root) %{_sbindir}/userdel
209 %attr(755,root,root) %{_sbindir}/usermod
210 %attr(755,root,root) %{_sbindir}/vigr
211 %attr(755,root,root) %{_sbindir}/vipw
212 %{_mandir}/man?/*
213 %exclude %{_mandir}/man8/rpasswdd*
214 %exclude %{_mandir}/man8/pam_rpasswd.8*
215
216 %files -n rpasswdd
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_sbindir}/rpasswdd
219 %attr(754,root,root) /etc/rc.d/init.d/rpasswdd
220 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/rpasswd
221 %{_mandir}/man8/rpasswdd*
222
223 %files -n pam-pam_rpasswd
224 %defattr(644,root,root,755)
225 %attr(755,root,root) /%{_lib}/security/pam_rpasswd.so
226 %{_mandir}/man8/pam_rpasswd.8*
This page took 0.061651 seconds and 4 git commands to generate.