/[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 882306 - (hide annotations) (download)
Tue Sep 22 22:41:47 2015 UTC (8 years, 7 months ago) by blino
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 6167 byte(s)
drop old comment (SILENT)

1 shlomif 152774 Name: sudo
2 oden 814841 Version: 1.8.12
3 blino 882305 Release: %mkrel 3
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 luigiwalser 816279 Patch3: sudo-1.8.12-sudo_util-linking.patch
16     Patch4: sudo-1.8.12-crypt-null.patch
17 shlomif 152774 BuildRequires: audit-devel
18     BuildRequires: bison
19     BuildRequires: groff-for-man
20     BuildRequires: libcap-devel
21     BuildRequires: openldap-devel
22     BuildRequires: pam-devel
23     Requires(pre): openldap
24 blino 17466
25     %description
26 luigiwalser 275808 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 blino 17466
35 boklm 74479 %package devel
36 shlomif 152774 Summary: Development files for sudo plugins
37     Group: Development/C
38 luigiwalser 275808 Requires: %{name} = %{epoch}:%{version}-%{release}
39 boklm 74479
40 shlomif 152774 %description devel
41 boklm 74479 Development files for compiling sudo plugins.
42    
43 blino 17466 %prep
44     %setup -q -n %{name}-%{version}%{?pre}
45     %patch1 -p1 -b .strip
46     %patch2 -p1 -b .envdebug
47 luigiwalser 816279 %patch3 -p1 -b .linking
48     %patch4 -p1 -b .crypt
49 blino 17466
50 luigiwalser 275808 # fix attribs
51     find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g"
52    
53    
54 blino 17466 %build
55     # handle newer autoconf
56     rm -f acsite.m4
57     mv aclocal.m4 acinclude.m4
58     autoreconf -fv --install
59    
60     %serverbuild
61     export CFLAGS="%{optflags} -D_GNU_SOURCE"
62    
63     %configure2_5x \
64 shlomif 152774 --without-rpath \
65     --with-logging=both \
66 blino 17466 --with-logfac=authpriv \
67 shlomif 152774 --with-logpath=%{_logdir}/sudo.log \
68     --with-editor=/bin/vi \
69     --enable-log-host \
70     --with-pam \
71     --with-pam-login \
72     --with-env-editor \
73     --with-noexec=no \
74     --with-linux-audit \
75 blino 17466 --with-ignore-dot \
76     --with-tty-tickets \
77 shlomif 152774 --with-ldap \
78     --with-ldap-conf-file=%{_sysconfdir}/ldap.conf \
79     --with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \
80 pterjan 340151 --with-passprompt="[sudo] password for %p: " \
81     --with-plugindir=%{_libdir}/sudo
82 blino 17466
83     %make
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}%{_logdir}/sudo
92     install -d %{buildroot}%{_logdir}/sudo-io
93    
94     %makeinstall_std install_uid=$UID install_gid=$(id -g) sudoers=uid=$UID sudoers_gid=$(id -g)
95    
96     install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sudo
97     install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers
98 boklm 74479 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
99 blino 17466
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 shlomif 152774 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 blino 17466 EOF
117    
118     cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
119     #%PAM-1.0
120 shlomif 152774 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 blino 17466 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 oden 814841 # 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 blino 882305 # already install in _bindir
143     rm -f %{buildroot}%{_docdir}/%{name}/sudoers2ldif
144     # 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     make check
157    
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 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     %attr(4111,root,root) %{_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(0750,root,root) %dir %{_logdir}/sudo-io
189 oden 814841 %attr(0755,root,root) %{_libdir}/sudo/group_file.so
190     %attr(0755,root,root) %{_libdir}/sudo/sudoers.so
191     %attr(0755,root,root) %{_libdir}/sudo/system_group.so
192     %attr(0755,root,root) %{_libdir}/libsudo_util.so.*
193 blino 17466
194 luigiwalser 275808 %files devel
195 luigiwalser 451036 %doc plugins/{group_file,sample}
196 boklm 74479 %{_includedir}/sudo_plugin.h
197 luigiwalser 275808 %{_mandir}/man8/sudo_plugin.8*
198 oden 814841 %{_libdir}/libsudo_util.so

  ViewVC Help
Powered by ViewVC 1.1.30