shadow-utils-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. %define WITH_SELINUX 0
  2. Summary: Utilities for managing accounts and shadow password files.
  3. Summary(ja): シャドウパスワードファイルとアカウントを管理するユーティリティ
  4. Name: shadow-utils
  5. Version: 4.1.5.1
  6. Release: 1%{?_dist_release}
  7. Epoch: 2
  8. URL: http://pkg-shadow.alioth.debian.org/
  9. License: BSD
  10. Group: System Environment/Base
  11. Source0: http://pkg-shadow.alioth.debian.org/shadow-%{version}.tar.bz2
  12. Source1: shadow-4.0.17-login.defs
  13. Source2: shadow-utils.useradd
  14. Patch0: shadow-4.1.5-redhat.patch
  15. Patch1: shadow-4.1.5.1-goodname.patch
  16. Patch2: shadow-4.1.5.1-info-parent-dir.patch
  17. Patch3: shadow-4.1.5-uflg.patch
  18. Patch6: shadow-4.1.5.1-selinux.patch
  19. Patch7: shadow-4.1.5-2ndskip.patch
  20. Patch8: shadow-4.1.5.1-backup-mode.patch
  21. Patch9: shadow-4.1.5.1-merge-group.patch
  22. Patch10: shadow-4.1.5.1-orig-context.patch
  23. Patch11: shadow-4.1.5.1-logmsg.patch
  24. Patch12: shadow-4.1.5.1-errmsg.patch
  25. Patch13: shadow-4.1.5.1-audit-owner.patch
  26. Patch14: shadow-4.1.5.1-default-range.patch
  27. Patch15: shadow-4.1.5.1-manfix.patch
  28. Patch16: shadow-4.1.5.1-crypt-null.patch
  29. Patch17: shadow-4.1.5.1-userdel-helpfix.patch
  30. Patch18: shadow-4.1.5.1-group-alloc.patch
  31. Buildroot: %{_tmppath}/%{name}-%{version}-root
  32. #BuildRequires: autoconf, automake, libtool, gettext
  33. Obsoletes: adduser
  34. %description
  35. The shadow-utils package includes the necessary programs for
  36. converting UNIX password files to the shadow password format, plus
  37. programs for managing user and group accounts. The pwconv command
  38. converts passwords to the shadow password format. The pwunconv command
  39. unconverts shadow passwords and generates an npasswd file (a standard
  40. UNIX password file). The pwck command checks the integrity of password
  41. and shadow files. The lastlog command prints out the last login times
  42. for all users. The useradd, userdel, and usermod commands are used for
  43. managing user accounts. The groupadd, groupdel, and groupmod commands
  44. are used for managing group accounts.
  45. %description -l ja
  46. shadow-utilsパッケージはUNIXパスワードファイルをシャドウパスワー
  47. ドフォーマットに変換するのに必要なプログラムとユーザやグループア
  48. カウントを管理するプログラムを含みます。
  49. pwconvコマンドはパスワードをシャドウパスワードフォーマットに変換
  50. します。pwunconvコマンドはシャドウパスワードを逆変換し、npasswd
  51. ファイル(標準のUNIXパスワードファイル)を生成します。pwckコマンド
  52. はパスワードファイルとシャドウパスワードファイルの完全性をチェッ
  53. クします。lastlogコマンドは全ユーザの最後にログインした時間を出
  54. 力します。useradd、userdelやusermodコマンドはユーザーアカウント
  55. を管理するのに使用されます。groupadd、groupdelやgroupmodコマンド
  56. はグループアカウントを管理するのに使用されます。
  57. %prep
  58. %setup -q -n shadow-%{version}
  59. %patch0 -p1 -b .redhat
  60. %patch1 -p1 -b .goodname
  61. %patch2 -p1 -b .info-parent-dir
  62. %patch3 -p1 -b .uflg
  63. %if %{WITH_SELINUX}
  64. %patch6 -p1 -b .selinux
  65. %endif
  66. %patch7 -p1 -b .2ndskip
  67. %patch8 -p1 -b .backup-mode
  68. %patch9 -p1 -b .merge-group
  69. %patch10 -p1 -b .orig-context
  70. %patch11 -p1 -b .logmsg
  71. %patch12 -p1 -b .errmsg
  72. %patch13 -p1 -b .audit-owner
  73. %patch14 -p1 -b .default-range
  74. %patch15 -p1 -b .manfix
  75. %patch16 -p1 -b .crypt-null
  76. %patch17 -p1 -b .userdel
  77. %patch18 -p1 -b .group-alloc
  78. #autoreconf -f -i
  79. %build
  80. export CFLAGS="$RPM_OPT_FLAGS -fpie"
  81. export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
  82. %configure \
  83. --enable-shadowgrp \
  84. --without-libcrack \
  85. --with-sha-crypt \
  86. %if %{WITH_SELINUX}
  87. --with-selinux \
  88. %else
  89. --without-selinux \
  90. %endif
  91. --without-libpam \
  92. --disable-shared \
  93. --with-group-name-max-length=32
  94. make
  95. %install
  96. rm -rf $RPM_BUILD_ROOT
  97. make install DESTDIR=$RPM_BUILD_ROOT gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs
  98. install -d -m 755 $RPM_BUILD_ROOT/etc/default
  99. install -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/etc/login.defs
  100. install -c -m 0600 %{SOURCE2} $RPM_BUILD_ROOT/etc/default/useradd
  101. ln -s useradd $RPM_BUILD_ROOT%{_sbindir}/adduser
  102. ln -s useradd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/adduser.8
  103. for subdir in $RPM_BUILD_ROOT/%{_mandir}/{??,??_??,??_??.*}/man* ; do
  104. test -d $subdir && test -e $subdir/useradd.8 && echo ".so man8/useradd.8" > $subdir/adduser.8
  105. done
  106. # Remove binaries we don't use.
  107. rm $RPM_BUILD_ROOT/%{_bindir}/chfn
  108. rm $RPM_BUILD_ROOT/%{_bindir}/chsh
  109. rm $RPM_BUILD_ROOT/%{_bindir}/expiry
  110. rm $RPM_BUILD_ROOT/%{_bindir}/groups
  111. rm $RPM_BUILD_ROOT/%{_bindir}/login
  112. rm $RPM_BUILD_ROOT/%{_bindir}/passwd
  113. rm $RPM_BUILD_ROOT/%{_bindir}/su
  114. rm $RPM_BUILD_ROOT/%{_sysconfdir}/login.access
  115. rm $RPM_BUILD_ROOT/%{_sysconfdir}/limits
  116. rm $RPM_BUILD_ROOT/%{_sbindir}/logoutd
  117. rm $RPM_BUILD_ROOT/%{_sbindir}/nologin
  118. rm $RPM_BUILD_ROOT/%{_sbindir}/chgpasswd
  119. rm $RPM_BUILD_ROOT/%{_mandir}/man1/chfn.*
  120. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/chfn.*
  121. rm $RPM_BUILD_ROOT/%{_mandir}/man1/chsh.*
  122. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/chsh.*
  123. rm $RPM_BUILD_ROOT/%{_mandir}/man1/expiry.*
  124. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/expiry.*
  125. rm $RPM_BUILD_ROOT/%{_mandir}/man1/groups.*
  126. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/groups.*
  127. rm $RPM_BUILD_ROOT/%{_mandir}/man1/login.*
  128. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/login.*
  129. rm $RPM_BUILD_ROOT/%{_mandir}/man1/passwd.*
  130. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/passwd.*
  131. rm $RPM_BUILD_ROOT/%{_mandir}/man1/su.*
  132. rm $RPM_BUILD_ROOT/%{_mandir}/*/man1/su.*
  133. rm $RPM_BUILD_ROOT/%{_mandir}/man5/limits.*
  134. rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/limits.*
  135. rm $RPM_BUILD_ROOT/%{_mandir}/man5/login.access.*
  136. rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/login.access.*
  137. rm $RPM_BUILD_ROOT/%{_mandir}/man5/passwd.*
  138. rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/passwd.*
  139. rm $RPM_BUILD_ROOT/%{_mandir}/man5/porttime.*
  140. rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/porttime.*
  141. rm $RPM_BUILD_ROOT/%{_mandir}/man5/suauth.*
  142. rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/suauth.*
  143. rm $RPM_BUILD_ROOT/%{_mandir}/man8/logoutd.*
  144. rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/logoutd.*
  145. rm $RPM_BUILD_ROOT/%{_mandir}/man8/nologin.*
  146. rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/nologin.*
  147. rm $RPM_BUILD_ROOT/%{_mandir}/man8/chgpasswd.*
  148. rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/chgpasswd.*
  149. %find_lang shadow
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT
  152. %files -f shadow.lang
  153. %defattr(-,root,root)
  154. %doc NEWS doc/HOWTO README
  155. %dir /etc/default
  156. %attr(0644,root,root) %config /etc/login.defs
  157. %attr(0600,root,root) %config /etc/default/useradd
  158. %{_bindir}/sg
  159. %{_bindir}/chage
  160. %{_bindir}/faillog
  161. %{_bindir}/gpasswd
  162. %{_bindir}/lastlog
  163. %{_bindir}/newgrp
  164. %{_sbindir}/adduser
  165. %{_sbindir}/user*
  166. %{_sbindir}/group*
  167. %{_sbindir}/grpck
  168. %{_sbindir}/pwck
  169. %{_sbindir}/*conv
  170. %{_sbindir}/chpasswd
  171. %{_sbindir}/newusers
  172. %{_sbindir}/vipw
  173. %{_sbindir}/vigr
  174. %{_mandir}/man1/chage.1*
  175. %{_mandir}/*/man1/chage.1*
  176. %{_mandir}/man1/gpasswd.1*
  177. %{_mandir}/*/man1/gpasswd.1*
  178. %{_mandir}/man1/sg.1*
  179. %{_mandir}/*/man1/sg.1*
  180. %{_mandir}/man1/newgrp.1*
  181. %{_mandir}/*/man1/newgrp.1*
  182. %{_mandir}/man3/shadow.3*
  183. %{_mandir}/*/man3/shadow.3*
  184. %{_mandir}/man3/getspnam.3*
  185. %{_mandir}/*/man3/getspnam.3*
  186. %{_mandir}/man5/shadow.5*
  187. %{_mandir}/*/man5/shadow.5*
  188. %{_mandir}/man5/login.defs.5*
  189. %{_mandir}/*/man5/login.defs.5*
  190. %{_mandir}/man5/gshadow.5*
  191. %{_mandir}/*/man5/gshadow.5*
  192. %{_mandir}/man5/faillog.5*
  193. %{_mandir}/*/man5/faillog.5*
  194. %{_mandir}/man8/adduser.8*
  195. %{_mandir}/*/man8/adduser.8*
  196. %{_mandir}/man8/group*.8*
  197. %{_mandir}/*/man8/group*.8*
  198. %{_mandir}/man8/user*.8*
  199. %{_mandir}/*/man8/user*.8*
  200. %{_mandir}/man8/pwck.8*
  201. %{_mandir}/*/man8/pwck.8*
  202. %{_mandir}/man8/grpck.8*
  203. %{_mandir}/*/man8/grpck.8*
  204. %{_mandir}/man8/chpasswd.8*
  205. %{_mandir}/*/man8/chpasswd.8*
  206. %{_mandir}/man8/newusers.8*
  207. %{_mandir}/*/man8/newusers.8*
  208. %{_mandir}/man8/*conv.8*
  209. %{_mandir}/*/man8/*conv.8*
  210. %{_mandir}/man8/lastlog.8*
  211. %{_mandir}/*/man8/lastlog.8*
  212. %{_mandir}/man8/faillog.8*
  213. %{_mandir}/*/man8/faillog.8*
  214. %{_mandir}/man8/vipw.8*
  215. %{_mandir}/*/man8/vipw.8*
  216. %{_mandir}/man8/vigr.8*
  217. %{_mandir}/*/man8/vigr.8*
  218. %changelog
  219. * Wed Jul 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2:4.1.5.1-1
  220. - update to 4.1.5.1
  221. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 2:4.1.4.2-2
  222. - rebuilt with rpm-4.8.1-3
  223. * Mon Apr 12 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.1.4.2-1
  224. - new upstream release
  225. - add vipw/vigr (moved from util-linux-ng)
  226. - max group name length set to 32 characters
  227. - update Patch0
  228. - increase threshold for uid/gid reservations to 200
  229. - import Patch1,2,3 from fedora
  230. - disable autoreconf
  231. * Mon Jun 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.1.4.1-1
  232. - new upstream release
  233. - NEW UPSTREAM: http://pkg-shadow.alioth.debian.org/
  234. - update URL:, SOURCES: to new upstream
  235. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 2:4.0.16-1vl5
  236. - applied new versioning policy, spec in utf-8
  237. * Tue Aug 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.0.16-0vl3
  238. - update Patch0 to fix <BTS:0499>
  239. - select smaller gid value for system account
  240. * Tue Aug 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.0.16-0vl2
  241. - update ja.po from debian-doc (committed in upstream)
  242. * Mon Jun 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.0.16-0vl1
  243. - new upstream release
  244. - add Japanese Summary and descriptions from spec file translation project.
  245. - convert Japanese man pages to EUC-JP from UTF-8
  246. - import changes from FC pacakge.
  247. * Mon Jan 31 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1:4.0.3-35vl2
  248. - rebuild for VineSeed
  249. * Sun Jan 09 2005 IKEDA Katsumi <ikeda@webmasters.gr.jp> 2:4.0.3-35vl1.1
  250. - added a security patch (shadow-4.0.3-can-2004-1001.patch) for CAN-2004-1001.
  251. * Mon Oct 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2:4.0.3-35vl1
  252. - import Patch1[3-7] from fedora development.
  253. - fixed username/groupname limits. (vine-users:54797)
  254. * Sat Apr 10 2004 <tkoba@vinelinux.org> 4.0.3-21vl1
  255. - sync to fedora
  256. * Fri Jun 08 2001 <sagami@vinelinux.org>
  257. - 20000902-1vl1: added ja.po from 19990827-10vl2
  258. - disable patch9 (creating mailspool in /var/mail)
  259. * Tue May 22 2001 Bernhard Rosenkraenzer <bero@redhat.com> 20000902-1
  260. - Create an empty mailspool when creating a user so non-setuid/non-setgid
  261. MDAs (postfix+procmail) can deliver mail (#41811)
  262. - 20000902
  263. - adapt patches
  264. * Fri Mar 9 2001 Nalin Dahyabhai <nalin@redhat.com>
  265. - don't overwrite user dot files in useradd (#19982)
  266. - truncate new files when moving overwriting files with the contents of other
  267. files while moving directories (keeps files from looking weird later on)
  268. - configure using %%{_prefix} as the prefix
  269. * Fri Feb 23 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
  270. - langify
  271. * Wed Aug 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  272. - Fix up chage behavior (Bug #15883)
  273. * Wed Aug 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  274. - 20000826
  275. - Fix up useradd man page (Bug #17036)
  276. * Tue Aug 8 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  277. - check for vipw lock before adding or deleting users (Bug #6489)
  278. * Mon Aug 7 2000 Nalin Dahyabhai <nalin@redhat.com>
  279. - take LOG_CONS out of the openlog() call so that we don't litter the
  280. screen during text-mode upgrades
  281. * Tue Jul 18 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  282. - Remove a fixed-size buffer that caused problems when adding a huge number
  283. of users to a group (>8192 bytes) (Bugs #3809, #11930)
  284. * Tue Jul 18 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  285. - remove dependency on util-linux because it causes prereq loops
  286. * Tue Jul 18 2000 Nalin Dahyabhai <nalin@redhat.com>
  287. - change symlinked man pages to includers
  288. - require /usr/bin/newgrp (util-linux) so that /usr/bin/sg isn't left dangling
  289. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  290. - automatic rebuild
  291. * Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
  292. - use mandir for FHS
  293. - added patches in src/ and po/ to honor DESTDIR
  294. - use make install DESTDIR=$RPM_BUILD_ROOT
  295. * Wed Feb 16 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  296. - Fix up usermod's symlink behavior (Bug #5458)
  297. * Fri Feb 11 2000 Cristian Gafton <gafton@redhat.com>
  298. - get rid of mkpasswd
  299. * Mon Feb 7 2000 Nalin Dahyabhai <nalin@redhat.com>
  300. - fix usermod patch to check for shadow before doing any shadow-specific stuff
  301. and merge it into the pwlock patch
  302. * Sat Feb 5 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  303. - fix man symlinks
  304. * Wed Feb 2 2000 Nalin Dahyabhai <gafton@redhat.com>
  305. - make -p only change shadow password (bug #8923)
  306. * Mon Jan 31 2000 Cristian Gafton <gafton@redhat.com>
  307. - rebuild to fix dependeencies
  308. - man pages are compressed
  309. * Wed Jan 19 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  310. - Fix a security bug (adduser could overwrite previously existing
  311. groups, Bug #8609)
  312. * Sun Jan 9 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  313. - unset LINGUAS before building
  314. - Fix typo in newusers manpage (Bug #8258)
  315. - libtoolize
  316. * Wed Sep 22 1999 Cristian Gafton <gafton@redhat.com>
  317. - fix segfault for userdel when the primary group for the user is not
  318. defined
  319. * Tue Sep 21 1999 Cristian Gafton <gafton@redhat.com>
  320. - Serial: 1 because now we are using 19990827 (why the heck can't they have
  321. a normal version just like everybody else?!)
  322. - ported all patches to the new code base
  323. * Thu Apr 15 1999 Bill Nottingham <notting@redhat.com>
  324. - SIGHUP nscd from usermod, too
  325. * Fri Apr 09 1999 Michael K. Johnson <johnsonm@redhat.com>
  326. - added usermod password locking from Chris Adams <cadams@ro.com>
  327. * Thu Apr 08 1999 Bill Nottingham <notting@redhat.com>
  328. - have things that modify users/groups SIGHUP nscd on exit
  329. * Wed Mar 31 1999 Michael K. Johnson <johnsonm@redhat.com>
  330. - have userdel remove user private groups when it is safe to do so
  331. - allow -f to force user removal even when user appears busy in utmp
  332. * Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
  333. - edit out unused CHFN fields from login.defs.
  334. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  335. - auto rebuild in the new build environment (release 7)
  336. * Wed Jan 13 1999 Bill Nottingham <notting@redhat.com>
  337. - configure fix for arm
  338. * Wed Dec 30 1998 Cristian Gafton <gafton@redhat.com>
  339. - build against glibc 2.1
  340. * Fri Aug 21 1998 Jeff Johnson <jbj@redhat.com>
  341. - Note that /usr/sbin/mkpasswd conflicts with /usr/bin/mkpasswd;
  342. one of these (I think /usr/sbin/mkpasswd but other opinions are valid)
  343. should probably be renamed. In any case, mkpasswd.8 from this package
  344. needs to be installed. (problem #823)
  345. * Fri May 08 1998 Prospector System <bugs@redhat.com>
  346. - translations modified for de, fr, tr
  347. * Tue Apr 21 1998 Cristian Gafton <gafton@redhat.com>
  348. - updated to 980403
  349. - redid the patches
  350. * Tue Dec 30 1997 Cristian Gafton <gafton@redhat.com>
  351. - updated the spec file
  352. - updated the patch so that new accounts created on shadowed system won't
  353. confuse pam_pwdb anymore ('!!' default password instead on '!')
  354. - fixed a bug that made useradd -G segfault
  355. - the check for the ut_user is now patched into configure
  356. * Thu Nov 13 1997 Erik Troan <ewt@redhat.com>
  357. - added patch for XOPEN oddities in glibc headers
  358. - check for ut_user before checking for ut_name -- this works around some
  359. confusion on glibc 2.1 due to the utmpx header not defining the ut_name
  360. compatibility stuff. I used a gross sed hack here because I couldn't make
  361. automake work properly on the sparc (this could be a glibc 2.0.99 problem
  362. though). The utuser patch works fine, but I don't apply it.
  363. - sleep after running autoconf
  364. * Thu Nov 06 1997 Cristian Gafton <gafton@redhat.com>
  365. - added forgot lastlog command to the spec file
  366. * Mon Oct 26 1997 Cristian Gafton <gafton@redhat.com>
  367. - obsoletes adduser
  368. * Thu Oct 23 1997 Cristian Gafton <gafton@redhat.com>
  369. - modified groupadd; updated the patch
  370. * Fri Sep 12 1997 Cristian Gafton <gafton@redhat.com>
  371. - updated to 970616
  372. - changed useradd to meet RH specs
  373. - fixed some bugs
  374. * Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
  375. - built against glibc