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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30