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

  ViewVC Help
Powered by ViewVC 1.1.30