sudo-vl.spec 12 KB

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