/[packages]/updates/8/sudo/current/SPECS/sudo.spec
ViewVC logotype

Annotation of /updates/8/sudo/current/SPECS/sudo.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1105639 - (hide annotations) (download)
Wed May 31 01:38:38 2017 UTC (6 years, 10 months ago) by luigiwalser
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 6388 byte(s)
1.8.20p1 (fixes CVE-2017-1000367)
1 shlomif 152774 Name: sudo
2 luigiwalser 1105639 Version: 1.8.20p1
3 luigiwalser 1058668 Release: %mkrel 1
4 shlomif 152774 Epoch: 1
5     Summary: Allows command execution as root for specified users
6     License: GPLv2+
7     Group: System/Base
8     URL: http://www.sudo.ws/sudo
9 luigiwalser 400679 Source0: http://www.sudo.ws/sudo/dist/%{name}-%{version}%{?pre}.tar.gz
10     Source1: http://www.sudo.ws/sudo/dist/%{name}-%{version}%{?pre}.tar.gz.sig
11 shlomif 152774 Source2: sudo.pamd
12 tv 1052891 Source3: sudoers
13 shlomif 152774 Patch1: sudo-1.6.7p5-strip.patch
14     Patch2: sudo-1.7.2p1-envdebug.patch
15     BuildRequires: audit-devel
16     BuildRequires: bison
17     BuildRequires: groff-for-man
18     BuildRequires: libcap-devel
19     BuildRequires: openldap-devel
20     BuildRequires: pam-devel
21     Requires(pre): openldap
22 blino 17466
23     %description
24 luigiwalser 275808 Sudo (superuser do) allows a system administrator to give certain users (or
25     groups of users) the ability to run some (or all) commands as root while
26     logging all commands and arguments. Sudo operates on a per-command basis.
27     It is not a replacement for the shell. Features include: the ability to
28     restrict what commands a user may run on a per-host basis, copious logging
29     of each command (providing a clear audit trail of who did what), a
30     configurable timeout of the sudo command, and the ability to use the same
31     configuration file (sudoers) on many different machines.
32 blino 17466
33 boklm 74479 %package devel
34 shlomif 152774 Summary: Development files for sudo plugins
35     Group: Development/C
36 luigiwalser 275808 Requires: %{name} = %{epoch}:%{version}-%{release}
37 boklm 74479
38 shlomif 152774 %description devel
39 boklm 74479 Development files for compiling sudo plugins.
40    
41 blino 17466 %prep
42     %setup -q -n %{name}-%{version}%{?pre}
43     %patch1 -p1 -b .strip
44     %patch2 -p1 -b .envdebug
45    
46 luigiwalser 275808 # fix attribs
47     find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g"
48    
49    
50 blino 17466 %build
51     # handle newer autoconf
52     rm -f acsite.m4
53     mv aclocal.m4 acinclude.m4
54     autoreconf -fv --install
55    
56     %serverbuild
57     export CFLAGS="%{optflags} -D_GNU_SOURCE"
58    
59     %configure2_5x \
60 shlomif 152774 --without-rpath \
61     --with-logging=both \
62 blino 17466 --with-logfac=authpriv \
63 shlomif 152774 --with-logpath=%{_logdir}/sudo.log \
64     --with-editor=/bin/vi \
65 luigiwalser 1058668 --disable-root-mailer \
66 shlomif 152774 --enable-log-host \
67     --with-pam \
68     --with-pam-login \
69     --with-env-editor \
70     --with-noexec=no \
71     --with-linux-audit \
72 blino 17466 --with-ignore-dot \
73     --with-tty-tickets \
74 shlomif 152774 --with-ldap \
75 luigiwalser 907732 --with-ldap-conf-file=%{_sysconfdir}/nslcd.conf \
76     --with-ldap-secret-file=%{_sysconfdir}/nslcd.conf \
77 shlomif 152774 --with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \
78 pterjan 340151 --with-passprompt="[sudo] password for %p: " \
79     --with-plugindir=%{_libdir}/sudo
80 blino 17466
81     %make
82    
83     %install
84     install -d %{buildroot}/usr
85     install -d %{buildroot}%{_sysconfdir}/logrotate.d
86     install -d %{buildroot}%{_sysconfdir}/sudoers.d
87     install -d %{buildroot}%{_sysconfdir}/pam.d
88     install -d %{buildroot}%{_var}/db/sudo
89 luigiwalser 1043127 install -d %{buildroot}%{_var}/db/sudo/lectured
90 blino 17466 install -d %{buildroot}%{_logdir}/sudo
91     install -d %{buildroot}%{_logdir}/sudo-io
92    
93     %makeinstall_std install_uid=$UID install_gid=$(id -g) sudoers=uid=$UID sudoers_gid=$(id -g)
94    
95     install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sudo
96     install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers
97 boklm 74479 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
98 blino 17466
99     # Installing logrotated file
100     cat <<END >%{buildroot}%{_sysconfdir}/logrotate.d/sudo
101     %{_logdir}/sudo.log {
102     missingok
103     monthly
104     compress
105     }
106     END
107    
108     cat > %{buildroot}%{_sysconfdir}/pam.d/sudo << EOF
109     #%PAM-1.0
110 shlomif 152774 auth include system-auth
111     account include system-auth
112     password include system-auth
113     session optional pam_keyinit.so revoke
114     session required pam_limits.so
115 blino 17466 EOF
116    
117     cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
118     #%PAM-1.0
119 shlomif 152774 auth include sudo
120     account include sudo
121     password include sudo
122     session optional pam_keyinit.so force revoke
123     session required pam_limits.so
124 blino 17466 EOF
125    
126     # so that strip can touch it...
127     chmod 755 %{buildroot}%{_bindir}/*
128     chmod 755 %{buildroot}%{_sbindir}/*
129    
130     # (tpg) create the missing log file
131     touch %{buildroot}%{_logdir}/sudo.log
132    
133 oden 814841 # move the lib to a common place
134     mv %{buildroot}%{_libexecdir}/sudo/* %{buildroot}%{_libdir}/
135     rm -rf %{buildroot}%{_libexecdir}/sudo
136    
137     # cleanup
138     rm -rf %{buildroot}%{_datadir}/examples samples
139     cp -rp examples samples
140     rm -f samples/Makefile*
141 blino 882305 # already install in _bindir
142     rm -f %{buildroot}%{_docdir}/%{name}/sudoers2ldif
143     # too big
144     rm -f %{buildroot}%{_docdir}/%{name}/ChangeLog
145 oden 814841
146     find %{buildroot} -type f -name "*.la" | xargs rm
147    
148 luigiwalser 275808 %find_lang sudo
149     %find_lang sudoers
150    
151     cat sudo.lang sudoers.lang > sudo_all.lang
152     rm sudo.lang sudoers.lang
153    
154 fwang 160282 %check
155     make check
156    
157 blino 17466 %post
158     /bin/chmod 0440 %{_sysconfdir}/sudoers || :
159     %create_ghostfile %{_logdir}/sudo.log root root 600
160    
161 luigiwalser 275808 %files -f sudo_all.lang
162 blino 882305 %doc samples
163     %{_docdir}/%{name}/CONTRIBUTORS
164     %{_docdir}/%{name}/LICENSE
165     %{_docdir}/%{name}/NEWS
166     %{_docdir}/%{name}/HISTORY
167     %{_docdir}/%{name}/README
168     %{_docdir}/%{name}/README.LDAP
169     %{_docdir}/%{name}/TROUBLESHOOTING
170     %{_docdir}/%{name}/UPGRADE
171     %{_docdir}/%{name}/schema.ActiveDirectory
172     %{_docdir}/%{name}/schema.OpenLDAP
173     %{_docdir}/%{name}/schema.iPlanet
174 luigiwalser 900136 %{_docdir}/%{name}/examples/*.conf
175     %{_docdir}/%{name}/examples/sudoers
176 blino 17466 %attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers
177 luigiwalser 1102283 %attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers.dist
178 blino 17466 %attr(0750,root,root) %dir %{_sysconfdir}/sudoers.d/
179     %config(noreplace) %{_sysconfdir}/logrotate.d/sudo
180     %config(noreplace) %{_sysconfdir}/pam.d/sudo
181     %config(noreplace) %{_sysconfdir}/pam.d/sudo-i
182     %attr(0755,root,root) %{_bindir}/sudoers2ldif
183     %attr(4111,root,root) %{_bindir}/sudo
184 luigiwalser 900114 %{_bindir}/sudoedit
185 blino 17466 %attr(0111,root,root) %{_bindir}/sudoreplay
186     %attr(0755,root,root) %{_sbindir}/visudo
187     %ghost %{_logdir}/sudo.log
188     %{_mandir}/*/*
189     %attr(0700,root,root) %dir %{_var}/db/sudo
190 luigiwalser 1043126 %attr(0700,root,root) %dir %{_var}/db/sudo/lectured
191 blino 17466 %attr(0750,root,root) %dir %{_logdir}/sudo-io
192 oden 814841 %attr(0755,root,root) %{_libdir}/sudo/group_file.so
193     %attr(0755,root,root) %{_libdir}/sudo/sudoers.so
194     %attr(0755,root,root) %{_libdir}/sudo/system_group.so
195 luigiwalser 900114 %{_libdir}/libsudo_util.so.0
196 luigiwalser 900117 %attr(0755,root,root) %{_libdir}/libsudo_util.so.*.*
197 luigiwalser 900113 %{_tmpfilesdir}/sudo.conf
198 blino 17466
199 luigiwalser 275808 %files devel
200 luigiwalser 451036 %doc plugins/{group_file,sample}
201 boklm 74479 %{_includedir}/sudo_plugin.h
202 luigiwalser 275808 %{_mandir}/man8/sudo_plugin.8*
203 oden 814841 %{_libdir}/libsudo_util.so

  ViewVC Help
Powered by ViewVC 1.1.30