sudo-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.8.31
  5. Release: 1%{?_dist_release}
  6. License: ISC-style
  7. Group: Applications/System
  8. URL: http://www.sudo.ws/sudo/
  9. # master is toooooooooooooooo slow.
  10. Source0: http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
  11. #Source0: http://core.ring.gr.jp/archives/misc/sudo/sudo-%{version}.tar.gz
  12. Source1: sudo-sudoers-vine
  13. # don't strip
  14. Patch1: sudo-1.6.7p5-strip.patch
  15. Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
  16. BuildRequires: pam-devel
  17. BuildRequires: groff
  18. BuildRequires: flex
  19. BuildRequires: bison
  20. BuildRequires: openldap-devel
  21. BuildRequires: automake autoconf libtool
  22. BuildRequires: libcap-devel
  23. BuildRequires: zlib-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. rm -rf zlib/
  38. %build
  39. autoreconf -I m4 -fv --install
  40. F_PIE=-fpie
  41. export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
  42. %configure \
  43. --prefix=%{_prefix} \
  44. --sbindir=%{_sbindir} \
  45. --libdir=%{_libdir} \
  46. --sysconfdir=%{_sysconfdir} \
  47. --docdir=%{_datadir}/doc/%{name}-%{version} \
  48. --with-iologdir=/var/log/sudo-io \
  49. --with-pam \
  50. --with-pam-login \
  51. --with-logging=syslog \
  52. --with-logfac=authpriv \
  53. --with-tty-tickets \
  54. --with-ignore-dot \
  55. --with-editor=/bin/vi \
  56. --with-env-editor \
  57. --with-ldap \
  58. --with-passprompt="[sudo] password for %p: " \
  59. --with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin" \
  60. --without-interfaces \
  61. --without-selinux
  62. make %{?_smp_mflags}
  63. %install
  64. rm -rf %{buildroot}
  65. mkdir %{buildroot}
  66. make install DESTDIR="%{buildroot}" install_uid=`id -u` install_gid=`id -g` sudoers_uid=`id -u` sudoers_gid=`id -g`
  67. chmod 755 %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/*
  68. install -p -d -m 700 %{buildroot}/var/run/sudo
  69. install -p -d -m 700 %{buildroot}/var/db/sudo/lectured
  70. install -p -d -m 700 %{buildroot}/var/log/sudo-io
  71. install -p -d -m 750 %{buildroot}/etc/sudoers.d
  72. install -p -c -m 0440 %{SOURCE1} %{buildroot}/etc/sudoers
  73. chmod +x %{buildroot}%{_libexecdir}/sudo/*.so # for stripping, reset in %%files
  74. mv -f %{buildroot}%{_docdir}/sudo-%{version} docdir
  75. mv -f %{buildroot}%{_sysconfdir}/sudoers.dist docdir/
  76. rm -f docdir/LICENSE
  77. #Remove all .la files
  78. find %{buildroot} -name '*.la' -exec rm -f {} ';'
  79. %find_lang sudo
  80. %find_lang sudoers
  81. cat sudo.lang sudoers.lang > sudo_all.lang
  82. rm sudo.lang sudoers.lang
  83. mkdir -p %{buildroot}/etc/pam.d
  84. cat > %{buildroot}/etc/pam.d/sudo << EOF
  85. #%PAM-1.0
  86. auth include system-auth
  87. account include system-auth
  88. password include system-auth
  89. session optional pam_keyinit.so revoke
  90. session required pam_limits.so
  91. session include system-auth
  92. EOF
  93. cat > %{buildroot}/etc/pam.d/sudo-i << EOF
  94. #%PAM-1.0
  95. auth include sudo
  96. account include sudo
  97. password include sudo
  98. session optional pam_keyinit.so force revoke
  99. session include sudo
  100. EOF
  101. %clean
  102. rm -rf %{buildroot}
  103. %files -f sudo_all.lang
  104. %defattr(-,root,root)
  105. %license doc/LICENSE
  106. %doc docdir/*
  107. %doc plugins/sample/sample_plugin.c
  108. %attr(0440,root,root) %config(noreplace) /etc/sudoers
  109. %attr(0750,root,root) %dir /etc/sudoers.d/
  110. %config(noreplace) /etc/pam.d/sudo
  111. %config(noreplace) /etc/pam.d/sudo-i
  112. %dir /var/run/sudo
  113. %dir /var/db/sudo
  114. %dir /var/db/sudo/lectured
  115. %attr(0750,root,root) %dir /var/log/sudo-io
  116. %{_bindir}/cvtsudoers
  117. %attr(4111,root,root) %{_bindir}/sudo
  118. %{_bindir}/sudoedit
  119. %attr(0111,root,root) %{_bindir}/sudoreplay
  120. %attr(0755,root,root) %{_sbindir}/visudo
  121. %dir %{_libexecdir}/sudo
  122. %attr(0644,root,root) %{_libexecdir}/sudo/sudo_noexec.so
  123. %attr(0644,root,root) %{_libexecdir}/sudo/sudoers.so
  124. %attr(0644,root,root) %{_libexecdir}/sudo/group_file.so
  125. %attr(0644,root,root) %{_libexecdir}/sudo/system_group.so
  126. %attr(0644,root,root) %{_libexecdir}/sudo/libsudo_util.so.?.?.?
  127. %{_libexecdir}/sudo/libsudo_util.so.?
  128. %{_libexecdir}/sudo/libsudo_util.so
  129. %{_mandir}/man1/cvtsudoers.1*
  130. %{_mandir}/man5/sudoers*.5*
  131. %{_mandir}/man5/sudo.conf.5*
  132. %{_mandir}/man8/sudo.8*
  133. %{_mandir}/man8/sudoedit.8*
  134. %{_mandir}/man8/sudoreplay.8*
  135. %{_mandir}/man8/visudo.8*
  136. # should be splitted to -devel?
  137. %{_includedir}/sudo_plugin.h
  138. %{_mandir}/man8/sudo_plugin.8*
  139. %post
  140. /bin/chmod 0440 /etc/sudoers || :
  141. %changelog
  142. * Tue Feb 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.31-1
  143. - updated to 1.8.31.
  144. * Wed Jan 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.30-1
  145. - updated to 1.8.30.
  146. * Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.28-1
  147. - updated to 1.8.28.
  148. - dropped Patch2.
  149. * Sat Jul 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.17p1-1
  150. - updated to 1.8.17p1.
  151. - added Patch2.
  152. - dropped Patch4.
  153. * Mon Feb 3 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.8.6p8-1
  154. - update to 1.8.6p8
  155. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-3
  156. - fix permission of sudoreplay
  157. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-2
  158. - add /var/log/sudo-io
  159. - add some comments to default sudoers
  160. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-1
  161. - update to 1.8.6p7
  162. - drop unneeded patches.
  163. * Sat May 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-5
  164. - add patch120 for fix CVE-2012-2337 (netmask match)
  165. * Fri Jun 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p7-4
  166. - update sudoers
  167. - enable "%wheel ALL=(ALL) ALL" by default.
  168. * Thu Feb 10 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-3
  169. - add patch110,111 for fix CVE-2011-0010 ("-g" option)
  170. * Wed Sep 8 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-2
  171. - add Patch100 for fix CVE-2010-2956 (sudo Runas)
  172. - add _smp_mflags flag into make section
  173. - fix doc filelist (no longer exist BUGS, CHANGSE)
  174. * Sun Jun 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-1
  175. - new upstream release with security fix (CVE-2010-1646)
  176. - change specfile name (-vl)
  177. * Sun Apr 25 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p6-1
  178. - new upstream release with security fix (CVE-2010-1163)
  179. - add sudoers.ldap.5 into files section
  180. * Wed Feb 24 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p4-1
  181. - new upstream release with security fix (CVE-2010-0426)
  182. - update Patch3
  183. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  184. - new upstream release
  185. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  186. - new upstream release
  187. - update patches
  188. - disable "Defaults requiretty"
  189. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  190. - rebuilt with openldap-2.4.11
  191. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  192. - new upstream release with security fix (CVE 2009-0034)
  193. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  194. - new upstream release
  195. - merge some changes from fedoraproject
  196. - include [sudo] in password prompt
  197. - compiled with secure path
  198. - also use getgrouplist() to determine group membership
  199. - add sudoers file
  200. - add command aliases, default environment config
  201. - build with openldap
  202. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  203. - applied new versioning policy, spec in utf-8
  204. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  205. - change PAM configuration to use system-auth
  206. - add --with-ignore-dot, --with-editor and --with-env-editor to
  207. configure option.
  208. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  209. - new upstream release (included security fix)
  210. - add patch1 for fix CVE-2006-0151
  211. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  212. - new upstream release
  213. - use macros
  214. - build with pam
  215. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  216. - new upstream release
  217. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  218. - SECURITY FIX: new upstream release
  219. - update rpmnonroot.patch ( Patch0 )
  220. - add new man page: sudoedit(8)
  221. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  222. - new upstream release
  223. - update rpmnonroot.patch ( Patch0 )
  224. - change Copyrigh tag to License tag
  225. - update License
  226. - update URL and Source0: official web site moved.
  227. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  228. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  229. - upstream release
  230. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  231. - fixed changelog
  232. -- don't expand macros in changelog ;P
  233. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  234. - changed to use configure in build section
  235. (can't build on sparc)
  236. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  237. - upstream release
  238. - fix security hole : buffer over flow
  239. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  240. - upstream release
  241. - updated sudo.rpmnonroot.diff
  242. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  243. - upstream release
  244. - added configure script option '--disable-root-mailer'
  245. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  246. - upstream release
  247. - eliminated FAQ from %doc
  248. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  249. - upstream release
  250. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  251. - updated sudo.rpmnonroot.diff
  252. * Wed May 09 2001 <sagami@vinelinux.org>
  253. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  254. * Fri Mar 02 2001 sagami@vinelinux.org
  255. - 1.6.3p7-0vl1
  256. - use better macros
  257. * Thu Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  258. - 1.6.3p6-0vl1
  259. - changed sudo.rpmnonroot.diff for 1.6.3p6
  260. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  261. - 1.6.1-2vl5
  262. - patch -p1 -> patch -p0
  263. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  264. - 1.6.1-2vl4
  265. - fix uid/gid to root.root
  266. - add sudo.rpmnonroot.diff to built by non-root users
  267. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  268. - 1.6.1-2vl3
  269. - fix attr
  270. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  271. - 1.6.1-2vl2
  272. - enable to build by non-root useres
  273. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  274. - 1.6.1-2vl1
  275. - modified %files section to handle compressed man page(s)
  276. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  277. - change group
  278. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  279. - version 1.6.1
  280. - build for Vine Linux 2.0
  281. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  282. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  283. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  284. - Initial Release