/[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 1043127 - (hide annotations) (download)
Fri Jul 22 14:54:05 2016 UTC (7 years, 8 months ago) by luigiwalser
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 6307 byte(s)
SILENT: fix typo
1 shlomif 152774 Name: sudo
2 luigiwalser 1043126 Version: 1.8.17p1
3     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     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 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     --enable-log-host \
66     --with-pam \
67     --with-pam-login \
68     --with-env-editor \
69     --with-noexec=no \
70     --with-linux-audit \
71 blino 17466 --with-ignore-dot \
72     --with-tty-tickets \
73 shlomif 152774 --with-ldap \
74 luigiwalser 907732 --with-ldap-conf-file=%{_sysconfdir}/nslcd.conf \
75     --with-ldap-secret-file=%{_sysconfdir}/nslcd.conf \
76 shlomif 152774 --with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \
77 pterjan 340151 --with-passprompt="[sudo] password for %p: " \
78     --with-plugindir=%{_libdir}/sudo
79 blino 17466
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 luigiwalser 1043127 install -d %{buildroot}%{_var}/db/sudo/lectured
89 blino 17466 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 boklm 74479 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
97 blino 17466
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 shlomif 152774 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 blino 17466 EOF
115    
116     cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
117     #%PAM-1.0
118 shlomif 152774 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 blino 17466 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 oden 814841 # 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 blino 882305 # already install in _bindir
141     rm -f %{buildroot}%{_docdir}/%{name}/sudoers2ldif
142     # too big
143     rm -f %{buildroot}%{_docdir}/%{name}/ChangeLog
144 oden 814841
145     find %{buildroot} -type f -name "*.la" | xargs rm
146    
147 luigiwalser 275808 %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 fwang 160282 %check
154     make check
155    
156 blino 17466 %post
157     /bin/chmod 0440 %{_sysconfdir}/sudoers || :
158     %create_ghostfile %{_logdir}/sudo.log root root 600
159    
160 luigiwalser 275808 %files -f sudo_all.lang
161 blino 882305 %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 luigiwalser 900136 %{_docdir}/%{name}/examples/*.conf
174     %{_docdir}/%{name}/examples/sudoers
175 blino 17466 %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 luigiwalser 900114 %{_bindir}/sudoedit
183 blino 17466 %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 luigiwalser 1043126 %attr(0700,root,root) %dir %{_var}/db/sudo/lectured
189 blino 17466 %attr(0750,root,root) %dir %{_logdir}/sudo-io
190 oden 814841 %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 luigiwalser 900114 %{_libdir}/libsudo_util.so.0
194 luigiwalser 900117 %attr(0755,root,root) %{_libdir}/libsudo_util.so.*.*
195 luigiwalser 900113 %{_tmpfilesdir}/sudo.conf
196 blino 17466
197 luigiwalser 275808 %files devel
198 luigiwalser 451036 %doc plugins/{group_file,sample}
199 boklm 74479 %{_includedir}/sudo_plugin.h
200 luigiwalser 275808 %{_mandir}/man8/sudo_plugin.8*
201 oden 814841 %{_libdir}/libsudo_util.so

  ViewVC Help
Powered by ViewVC 1.1.30