sudo-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. Summary: Allows command execution as root for specified users
  2. Summary(ja): スーパーユーザ権限でのコマンドの実行
  3. Name: sudo
  4. Version: 1.9.8p2
  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. Source0: http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
  12. Source1: sudo-sudoers-vine
  13. # don't strip
  14. Patch1: sudo-1.9.7-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. %description
  25. Sudo (superuser do) allows a system administrator to give certain users
  26. (or groups of users) the ability to run some (or all) commands as root while
  27. logging all commands and arguments. Sudo operates on a per-command basis,
  28. it is not a replacement for the shell.
  29. %description -l ja
  30. sudo は、特定のユーザや特定のグループに所属するユーザが、スーパーユーザ権限で
  31. いくつかのコマンド操作を行うことを許可するためのプログラムです。
  32. %package logsrvd
  33. Summary: High-performance log server for %{name}
  34. Group: system,servers
  35. Requires: %{name} = %{version}-%{release}
  36. BuildRequires: openssl-devel
  37. %description logsrvd
  38. %{name}-logsrvd is a high-performance log server that accepts event and
  39. I/O logs from sudo.
  40. It can be used to implement centralized logging of sudo logs.
  41. %debug_package
  42. %prep
  43. %setup -q
  44. %patch1 -p1 -b .strip
  45. rm -rf zlib/
  46. %build
  47. autoreconf -I m4 -fv --install
  48. F_PIE=-fpie
  49. export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
  50. %configure \
  51. --prefix=%{_prefix} \
  52. --sbindir=%{_sbindir} \
  53. --libdir=%{_libdir} \
  54. --sysconfdir=%{_sysconfdir} \
  55. --docdir=%{_datadir}/doc/%{name}-%{version} \
  56. --with-iologdir=/var/log/sudo-io \
  57. --with-pam \
  58. --with-pam-login \
  59. --with-logging=syslog \
  60. --with-logfac=authpriv \
  61. --with-tty-tickets \
  62. --with-ignore-dot \
  63. --with-editor=/bin/vi \
  64. --with-env-editor \
  65. --with-ldap \
  66. --with-passprompt="[sudo] password for %p: " \
  67. --with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin" \
  68. --without-interfaces \
  69. --without-selinux
  70. make %{?_smp_mflags}
  71. %install
  72. rm -rf %{buildroot}
  73. mkdir %{buildroot}
  74. %make_install \
  75. install_uid=`id -u` install_gid=`id -g` \
  76. 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_intercept.so
  137. %attr(0644,root,root) %{_libexecdir}/sudo/sudo_noexec.so
  138. %attr(0644,root,root) %{_libexecdir}/sudo/sudoers.so
  139. %attr(0644,root,root) %{_libexecdir}/sudo/group_file.so
  140. %attr(0644,root,root) %{_libexecdir}/sudo/sample_approval.so
  141. %attr(0644,root,root) %{_libexecdir}/sudo/system_group.so
  142. %attr(0644,root,root) %{_libexecdir}/sudo/libsudo_util.so.?.?.?
  143. %{_libexecdir}/sudo/libsudo_util.so.?
  144. %{_libexecdir}/sudo/libsudo_util.so
  145. %{_mandir}/man1/cvtsudoers.1*
  146. %{_mandir}/man5/sudoers*.5*
  147. %{_mandir}/man5/sudo.conf.5*
  148. %{_mandir}/man8/sudo.8*
  149. %{_mandir}/man8/sudoedit.8*
  150. %{_mandir}/man8/sudoreplay.8*
  151. %{_mandir}/man8/visudo.8*
  152. # should be splitted to -devel?
  153. %{_includedir}/sudo_plugin.h
  154. %{_mandir}/man8/sudo_plugin.8*
  155. %files logsrvd
  156. %attr(0640,root,root) %config(noreplace) /etc/sudo_logsrvd.conf
  157. %attr(0755,root,root) %{_sbindir}/sudo_logsrvd
  158. %attr(0755,root,root) %{_sbindir}/sudo_sendlog
  159. %{_mandir}/man5/sudo_logsrv.proto.5.gz
  160. %{_mandir}/man5/sudo_logsrvd.conf.5.gz
  161. %{_mandir}/man8/sudo_logsrvd.8.gz
  162. %{_mandir}/man8/sudo_sendlog.8.gz
  163. %changelog
  164. * Sat Oct 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.8p2-1
  165. - updated to 1.9.8p2.
  166. - built with openssl-3.0.0.
  167. * Tue Jun 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.7-1
  168. - updated to 1.9.7.
  169. - updated Patch1.
  170. * Sat Jan 30 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p2-1
  171. - updated to 1.9.5p2.
  172. * Fri Jan 15 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.5p1-1
  173. - updated to 1.9.5p1.
  174. * Tue Feb 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.31-1
  175. - updated to 1.8.31.
  176. * Wed Jan 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.30-1
  177. - updated to 1.8.30.
  178. * Tue Oct 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.28-1
  179. - updated to 1.8.28.
  180. - dropped Patch2.
  181. * Sat Jul 23 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.17p1-1
  182. - updated to 1.8.17p1.
  183. - added Patch2.
  184. - dropped Patch4.
  185. * Mon Feb 3 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.8.6p8-1
  186. - update to 1.8.6p8
  187. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-3
  188. - fix permission of sudoreplay
  189. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-2
  190. - add /var/log/sudo-io
  191. - add some comments to default sudoers
  192. * Mon Mar 04 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.6p7-1
  193. - update to 1.8.6p7
  194. - drop unneeded patches.
  195. * Sat May 19 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-5
  196. - add patch120 for fix CVE-2012-2337 (netmask match)
  197. * Fri Jun 03 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2p7-4
  198. - update sudoers
  199. - enable "%wheel ALL=(ALL) ALL" by default.
  200. * Thu Feb 10 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-3
  201. - add patch110,111 for fix CVE-2011-0010 ("-g" option)
  202. * Wed Sep 8 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-2
  203. - add Patch100 for fix CVE-2010-2956 (sudo Runas)
  204. - add _smp_mflags flag into make section
  205. - fix doc filelist (no longer exist BUGS, CHANGSE)
  206. * Sun Jun 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p7-1
  207. - new upstream release with security fix (CVE-2010-1646)
  208. - change specfile name (-vl)
  209. * Sun Apr 25 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p6-1
  210. - new upstream release with security fix (CVE-2010-1163)
  211. - add sudoers.ldap.5 into files section
  212. * Wed Feb 24 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.7.2p4-1
  213. - new upstream release with security fix (CVE-2010-0426)
  214. - update Patch3
  215. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.2-1
  216. - new upstream release
  217. * Wed Jun 17 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.7.1-1
  218. - new upstream release
  219. - update patches
  220. - disable "Defaults requiretty"
  221. * Fri Feb 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.9p20-2
  222. - rebuilt with openldap-2.4.11
  223. * Thu Feb 12 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.9p20-1
  224. - new upstream release with security fix (CVE 2009-0034)
  225. * Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.9p17-1
  226. - new upstream release
  227. - merge some changes from fedoraproject
  228. - include [sudo] in password prompt
  229. - compiled with secure path
  230. - also use getgrouplist() to determine group membership
  231. - add sudoers file
  232. - add command aliases, default environment config
  233. - build with openldap
  234. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.8p12-1vl5
  235. - applied new versioning policy, spec in utf-8
  236. * Fri May 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p12-0vl2
  237. - change PAM configuration to use system-auth
  238. - add --with-ignore-dot, --with-editor and --with-env-editor to
  239. configure option.
  240. * Mon Jan 23 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.8p12-0vl1
  241. - new upstream release (included security fix)
  242. - add patch1 for fix CVE-2006-0151
  243. * Mon May 09 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.8p8-0vl1
  244. - new upstream release
  245. - use macros
  246. - build with pam
  247. * Wed Jan 19 2005 IWAI, Masaharu <iwai@alib.jp> 1.6.8p6-0vl1
  248. - new upstream release
  249. * Sun Oct 10 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8p1-0vl1
  250. - SECURITY FIX: new upstream release
  251. - update rpmnonroot.patch ( Patch0 )
  252. - add new man page: sudoedit(8)
  253. * Wed Sep 1 2004 IWAI, Masaharu <iwai@alib.jp> 1.6.8-0vl1
  254. - new upstream release
  255. - update rpmnonroot.patch ( Patch0 )
  256. - change Copyrigh tag to License tag
  257. - update License
  258. - update URL and Source0: official web site moved.
  259. - new files: %%{_bindir}/sudoedit and %%{_libexecdir}/sudo_noexec.*
  260. * Mon Apr 14 2003 IWAI Masaharu <iwai@alib.jp> 1.6.7p3-0vl1
  261. - upstream release
  262. * Wed May 08 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl3
  263. - fixed changelog
  264. -- don't expand macros in changelog ;P
  265. * Wed May 01 2002 Satoshi MACHINO <machino@vinelinux.org> 1.6.6-0vl2
  266. - changed to use configure in build section
  267. (can't build on sparc)
  268. * Fri Apr 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.6-0vl1
  269. - upstream release
  270. - fix security hole : buffer over flow
  271. * Thu Jan 24 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p2-0vl1
  272. - upstream release
  273. - updated sudo.rpmnonroot.diff
  274. * Fri Jan 18 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.5p1-0vl1
  275. - upstream release
  276. - added configure script option '--disable-root-mailer'
  277. * Tue Jan 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4p1-0vl1
  278. - upstream release
  279. - eliminated FAQ from %doc
  280. * Mon Jan 14 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.6.4-0vl1
  281. - upstream release
  282. - added noreplace flag (%{_sysconfdir}/sudoers file is not replaced)
  283. - updated sudo.rpmnonroot.diff
  284. * Wed May 09 2001 <sagami@vinelinux.org>
  285. - 1.6.3p7-0vl2: follow up 1.6.2p6-0.6vl1
  286. * Fri Mar 02 2001 sagami@vinelinux.org
  287. - 1.6.3p7-0vl1
  288. - use better macros
  289. * Thu Mar 1 2001 Kunio Murasawa <murasawa@marineroad.com>
  290. - 1.6.3p6-0vl1
  291. - changed sudo.rpmnonroot.diff for 1.6.3p6
  292. * Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  293. - 1.6.1-2vl5
  294. - patch -p1 -> patch -p0
  295. * Mon Sep 18 2000 MATSUMOTO Shoji <shom@vinelinux.org>
  296. - 1.6.1-2vl4
  297. - fix uid/gid to root.root
  298. - add sudo.rpmnonroot.diff to built by non-root users
  299. * Tue Sep 12 2000 Jun Nishii <jun@vinelinux.org>
  300. - 1.6.1-2vl3
  301. - fix attr
  302. * Sun Sep 10 2000 Jun Nishii <jun@vinelinux.org>
  303. - 1.6.1-2vl2
  304. - enable to build by non-root useres
  305. * Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  306. - 1.6.1-2vl1
  307. - modified %files section to handle compressed man page(s)
  308. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  309. - change group
  310. * Thu Dec 30 1999 Jun Nishii <jun@vinelinux.org>
  311. - version 1.6.1
  312. - build for Vine Linux 2.0
  313. * Fri May 14 1999 Takeda Eiji <keda@flatout.org>
  314. - sudo reads $BuildRoot%{_sysconfdir}/sudoers. Make change to read /etc/sudoers.
  315. * Wed Apr 21 1999 Hiroto Watanabe <watanabe@cij.co.jp>
  316. - Initial Release