sudo-vl.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.7.2p1
  5. Release: 1%{?_dist_release}
  6. License: ISC-style
  7. Group: Applications/System
  8. URL: http://www.sudo.ws/
  9. Source0: http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
  10. Source1: sudo-sudoers-vine
  11. Patch1: sudo-1.6.7p5-strip.patch
  12. Patch2: sudo-1.7.2-login.patch
  13. Patch3: sudo-1.7.1-getgrouplist.patch
  14. Patch4: sudo-1.7.1-envdebug.patch
  15. Patch5: sudo-1.7.1-libtool.patch
  16. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  17. BuildRequires: pam-devel
  18. BuildRequires: groff
  19. BuildRequires: flex
  20. BuildRequires: bison
  21. BuildRequires: openldap-devel
  22. BuildRequires: automake autoconf libtool
  23. BuildRequires: libcap-devel
  24. Vendor: Project Vine
  25. Distribution: Vine Linux
  26. %description
  27. Sudo (superuser do) allows a system administrator to give certain users
  28. (or groups of users) the ability to run some (or all) commands as root while
  29. logging all commands and arguments. Sudo operates on a per-command basis,
  30. it is not a replacement for the shell.
  31. %description -l ja
  32. sudo は、特定のユーザや特定のグループに所属するユーザが、スーパーユーザ権限で
  33. いくつかのコマンド操作を行うことを許可するためのプログラムです。
  34. %prep
  35. %setup -q
  36. %patch1 -p1 -b .strip
  37. %patch2 -p1 -b .login
  38. %patch3 -p1 -b .getgrouplist
  39. %patch4 -p1 -b .envdebug
  40. %patch5 -p1 -b .libtool
  41. libtoolize --force && rm acsite.m4 && mv aclocal.m4 acinclude.m4 && autoreconf
  42. %build
  43. %configure \
  44. --prefix=%{_prefix} \
  45. --sbindir=%{_sbindir} \
  46. --libdir=%{_libdir} \
  47. --sysconfdir=%{_sysconfdir} \
  48. --with-pam \
  49. --with-pam-login \
  50. --with-logging=syslog \
  51. --with-logfac=authpriv \
  52. --with-tty-tickets \
  53. --with-ignore-dot \
  54. --with-editor=/bin/vi \
  55. --with-env-editor \
  56. --with-ldap \
  57. --with-passprompt="[sudo] password for %p: " \
  58. --with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin" \
  59. --without-interfaces
  60. make
  61. %install
  62. rm -rf $RPM_BUILD_ROOT
  63. mkdir $RPM_BUILD_ROOT
  64. make install DESTDIR="$RPM_BUILD_ROOT" install_uid=`id -u` install_gid=`id -g` sudoers_uid=`id -u` sudoers_gid=`id -g`
  65. chmod 755 $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_sbindir}/*
  66. install -p -d -m 700 $RPM_BUILD_ROOT/var/run/sudo
  67. install -p -c -m 0440 %{SOURCE1} $RPM_BUILD_ROOT/etc/sudoers
  68. mkdir -p $RPM_BUILD_ROOT/etc/pam.d
  69. cat > $RPM_BUILD_ROOT/etc/pam.d/sudo << EOF
  70. #%PAM-1.0
  71. auth include system-auth
  72. account include system-auth
  73. password include system-auth
  74. session optional pam_keyinit.so revoke
  75. session required pam_limits.so
  76. EOF
  77. cat > $RPM_BUILD_ROOT/etc/pam.d/sudo-i << EOF
  78. #%PAM-1.0
  79. auth include sudo
  80. account include sudo
  81. password include sudo
  82. session optional pam_keyinit.so force revoke
  83. session required pam_limits.so
  84. EOF
  85. %clean
  86. rm -rf $RPM_BUILD_ROOT
  87. %files
  88. %defattr(-,root,root)
  89. %doc BUGS CHANGES HISTORY LICENSE README* TROUBLESHOOTING UPGRADE
  90. %doc *.pod schema.* sudoers2ldif sample.*
  91. %attr(0440,root,root) %config(noreplace) /etc/sudoers
  92. %config(noreplace) /etc/pam.d/sudo
  93. %config(noreplace) /etc/pam.d/sudo-i
  94. %dir /var/run/sudo
  95. %attr(4111,root,root) %{_bindir}/sudo
  96. %attr(4111,root,root) %{_bindir}/sudoedit
  97. %attr(0755,root,root) %{_sbindir}/visudo
  98. %{_libexecdir}/sudo_noexec.*
  99. %{_mandir}/man5/sudoers.5*
  100. %{_mandir}/man8/sudo.8*
  101. %{_mandir}/man8/sudoedit.8*
  102. %{_mandir}/man8/visudo.8*
  103. %post
  104. /bin/chmod 0440 /etc/sudoers || :
  105. %changelog
  106. * Tue Nov 03 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p1-1
  107. - new upstream release
  108. - modified default sudoers
  109. - keep more environment variables:
  110. EDITOR, GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS and EMACS_IME
  111. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  112. - new upstream release
  113. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  114. - new upstream release
  115. - update patches
  116. - disable "Defaults requiretty"
  117. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  118. - rebuilt with openldap-2.4.11
  119. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  120. - new upstream release with security fix (CVE 2009-0034)
  121. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  122. - new upstream release
  123. - merge some changes from fedoraproject
  124. - include [sudo] in password prompt
  125. - compiled with secure path
  126. - also use getgrouplist() to determine group membership
  127. - add sudoers file
  128. - add command aliases, default environment config
  129. - build with openldap
  130. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  131. - applied new versioning policy, spec in utf-8
  132. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  133. - change PAM configuration to use system-auth
  134. - add --with-ignore-dot, --with-editor and --with-env-editor to
  135. configure option.
  136. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  137. - new upstream release (included security fix)
  138. - add patch1 for fix CVE-2006-0151
  139. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  140. - new upstream release
  141. - use macros
  142. - build with pam
  143. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  144. - new upstream release
  145. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  146. - SECURITY FIX: new upstream release
  147. - update rpmnonroot.patch ( Patch0 )
  148. - add new man page: sudoedit(8)
  149. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  150. - new upstream release
  151. - update rpmnonroot.patch ( Patch0 )
  152. - change Copyrigh tag to License tag
  153. - update License
  154. - update URL and Source0: official web site moved.
  155. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  156. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  157. - upstream release
  158. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  159. - fixed changelog
  160. -- don't expand macros in changelog ;P
  161. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  162. - changed to use configure in build section
  163. (can't build on sparc)
  164. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  165. - upstream release
  166. - fix security hole : buffer over flow
  167. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  168. - upstream release
  169. - updated sudo.rpmnonroot.diff
  170. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  171. - upstream release
  172. - added configure script option '--disable-root-mailer'
  173. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  174. - upstream release
  175. - eliminated FAQ from %doc
  176. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  177. - upstream release
  178. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  179. - updated sudo.rpmnonroot.diff
  180. * Wed May 09 2001 <sagami@vinelinux.org>
  181. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  182. * Fri Mar 02 2001 sagami@vinelinux.org
  183. - 1.6.3p7-0vl1
  184. - use better macros
  185. * Tue Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  186. - 1.6.3p6-0vl1
  187. - changed sudo.rpmnonroot.diff for 1.6.3p6
  188. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  189. - 1.6.1-2vl5
  190. - patch -p1 -> patch -p0
  191. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  192. - 1.6.1-2vl4
  193. - fix uid/gid to root.root
  194. - add sudo.rpmnonroot.diff to built by non-root users
  195. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  196. - 1.6.1-2vl3
  197. - fix attr
  198. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  199. - 1.6.1-2vl2
  200. - enable to build by non-root useres
  201. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  202. - 1.6.1-2vl1
  203. - modified %files section to handle compressed man page(s)
  204. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  205. - change group
  206. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  207. - version 1.6.1
  208. - build for Vine Linux 2.0
  209. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  210. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  211. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  212. - Initial Release