/[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 1043127 - (show annotations) (download)
Fri Jul 22 14:54:05 2016 UTC (7 years, 9 months ago) by luigiwalser
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 6307 byte(s)
SILENT: fix typo
1 Name: sudo
2 Version: 1.8.17p1
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: sudo-1.7.2p2-sudoers
13 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
23 %description
24 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
33 %package devel
34 Summary: Development files for sudo plugins
35 Group: Development/C
36 Requires: %{name} = %{epoch}:%{version}-%{release}
37
38 %description devel
39 Development files for compiling sudo plugins.
40
41 %prep
42 %setup -q -n %{name}-%{version}%{?pre}
43 %patch1 -p1 -b .strip
44 %patch2 -p1 -b .envdebug
45
46 # fix attribs
47 find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g"
48
49
50 %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 --without-rpath \
61 --with-logging=both \
62 --with-logfac=authpriv \
63 --with-logpath=%{_logdir}/sudo.log \
64 --with-editor=/bin/vi \
65 --enable-log-host \
66 --with-pam \
67 --with-pam-login \
68 --with-env-editor \
69 --with-noexec=no \
70 --with-linux-audit \
71 --with-ignore-dot \
72 --with-tty-tickets \
73 --with-ldap \
74 --with-ldap-conf-file=%{_sysconfdir}/nslcd.conf \
75 --with-ldap-secret-file=%{_sysconfdir}/nslcd.conf \
76 --with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \
77 --with-passprompt="[sudo] password for %p: " \
78 --with-plugindir=%{_libdir}/sudo
79
80 %make
81
82 %install
83 install -d %{buildroot}/usr
84 install -d %{buildroot}%{_sysconfdir}/logrotate.d
85 install -d %{buildroot}%{_sysconfdir}/sudoers.d
86 install -d %{buildroot}%{_sysconfdir}/pam.d
87 install -d %{buildroot}%{_var}/db/sudo
88 install -d %{buildroot}%{_var}/db/sudo/lectured
89 install -d %{buildroot}%{_logdir}/sudo
90 install -d %{buildroot}%{_logdir}/sudo-io
91
92 %makeinstall_std install_uid=$UID install_gid=$(id -g) sudoers=uid=$UID sudoers_gid=$(id -g)
93
94 install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sudo
95 install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers
96 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
97
98 # Installing logrotated file
99 cat <<END >%{buildroot}%{_sysconfdir}/logrotate.d/sudo
100 %{_logdir}/sudo.log {
101 missingok
102 monthly
103 compress
104 }
105 END
106
107 cat > %{buildroot}%{_sysconfdir}/pam.d/sudo << EOF
108 #%PAM-1.0
109 auth include system-auth
110 account include system-auth
111 password include system-auth
112 session optional pam_keyinit.so revoke
113 session required pam_limits.so
114 EOF
115
116 cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
117 #%PAM-1.0
118 auth include sudo
119 account include sudo
120 password include sudo
121 session optional pam_keyinit.so force revoke
122 session required pam_limits.so
123 EOF
124
125 # so that strip can touch it...
126 chmod 755 %{buildroot}%{_bindir}/*
127 chmod 755 %{buildroot}%{_sbindir}/*
128
129 # (tpg) create the missing log file
130 touch %{buildroot}%{_logdir}/sudo.log
131
132 # move the lib to a common place
133 mv %{buildroot}%{_libexecdir}/sudo/* %{buildroot}%{_libdir}/
134 rm -rf %{buildroot}%{_libexecdir}/sudo
135
136 # cleanup
137 rm -rf %{buildroot}%{_datadir}/examples samples
138 cp -rp examples samples
139 rm -f samples/Makefile*
140 # already install in _bindir
141 rm -f %{buildroot}%{_docdir}/%{name}/sudoers2ldif
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}/examples/*.conf
174 %{_docdir}/%{name}/examples/sudoers
175 %attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers
176 %attr(0750,root,root) %dir %{_sysconfdir}/sudoers.d/
177 %config(noreplace) %{_sysconfdir}/logrotate.d/sudo
178 %config(noreplace) %{_sysconfdir}/pam.d/sudo
179 %config(noreplace) %{_sysconfdir}/pam.d/sudo-i
180 %attr(0755,root,root) %{_bindir}/sudoers2ldif
181 %attr(4111,root,root) %{_bindir}/sudo
182 %{_bindir}/sudoedit
183 %attr(0111,root,root) %{_bindir}/sudoreplay
184 %attr(0755,root,root) %{_sbindir}/visudo
185 %ghost %{_logdir}/sudo.log
186 %{_mandir}/*/*
187 %attr(0700,root,root) %dir %{_var}/db/sudo
188 %attr(0700,root,root) %dir %{_var}/db/sudo/lectured
189 %attr(0750,root,root) %dir %{_logdir}/sudo-io
190 %attr(0755,root,root) %{_libdir}/sudo/group_file.so
191 %attr(0755,root,root) %{_libdir}/sudo/sudoers.so
192 %attr(0755,root,root) %{_libdir}/sudo/system_group.so
193 %{_libdir}/libsudo_util.so.0
194 %attr(0755,root,root) %{_libdir}/libsudo_util.so.*.*
195 %{_tmpfilesdir}/sudo.conf
196
197 %files devel
198 %doc plugins/{group_file,sample}
199 %{_includedir}/sudo_plugin.h
200 %{_mandir}/man8/sudo_plugin.8*
201 %{_libdir}/libsudo_util.so

  ViewVC Help
Powered by ViewVC 1.1.30