/[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 383578 - (show annotations) (download)
Mon Jan 14 04:54:21 2013 UTC (11 years, 3 months ago) by umeabot
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 5331 byte(s)
Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
1 # use fakeroot -ba sudo.spec to build!
2
3 Name: sudo
4 Version: 1.8.6p3
5 Release: %mkrel 3
6 Epoch: 1
7 Summary: Allows command execution as root for specified users
8 License: GPLv2+
9 Group: System/Base
10 URL: http://www.sudo.ws/sudo
11 Source0: http://www.sudo.ws/sudo/dist/%name-%version%{?pre}.tar.gz
12 Source1: http://www.sudo.ws/sudo/dist/%name-%version%{?pre}.tar.gz.sig
13 Source2: sudo.pamd
14 Source3: sudo-1.7.2p2-sudoers
15 Patch1: sudo-1.6.7p5-strip.patch
16 Patch2: sudo-1.7.2p1-envdebug.patch
17 Patch3: sudo-1.8.6p1-m4path.patch
18 Patch4: sudo-1.8.5-pipelist.patch
19 BuildRequires: audit-devel
20 BuildRequires: bison
21 BuildRequires: groff-for-man
22 BuildRequires: libcap-devel
23 BuildRequires: openldap-devel
24 BuildRequires: pam-devel
25 Requires(pre): openldap
26
27 %description
28 Sudo (superuser do) allows a system administrator to give certain users (or
29 groups of users) the ability to run some (or all) commands as root while
30 logging all commands and arguments. Sudo operates on a per-command basis.
31 It is not a replacement for the shell. Features include: the ability to
32 restrict what commands a user may run on a per-host basis, copious logging
33 of each command (providing a clear audit trail of who did what), a
34 configurable timeout of the sudo command, and the ability to use the same
35 configuration file (sudoers) on many different machines.
36
37 %package devel
38 Summary: Development files for sudo plugins
39 Group: Development/C
40 Requires: %{name} = %{epoch}:%{version}-%{release}
41
42 %description devel
43 Development files for compiling sudo plugins.
44
45 %prep
46 %setup -q -n %{name}-%{version}%{?pre}
47 %patch1 -p1 -b .strip
48 %patch2 -p1 -b .envdebug
49 %patch3 -p1 -b .m4path
50 %patch4 -p1 -b .pipelist
51
52 # fix attribs
53 find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g"
54
55
56 %build
57 # handle newer autoconf
58 rm -f acsite.m4
59 mv aclocal.m4 acinclude.m4
60 autoreconf -fv --install
61
62 %serverbuild
63 export CFLAGS="%{optflags} -D_GNU_SOURCE"
64
65 %configure2_5x \
66 --without-rpath \
67 --with-logging=both \
68 --with-logfac=authpriv \
69 --with-logpath=%{_logdir}/sudo.log \
70 --with-editor=/bin/vi \
71 --enable-log-host \
72 --with-pam \
73 --with-pam-login \
74 --with-env-editor \
75 --with-noexec=no \
76 --with-linux-audit \
77 --with-ignore-dot \
78 --with-tty-tickets \
79 --with-ldap \
80 --with-ldap-conf-file=%{_sysconfdir}/ldap.conf \
81 --with-secure-path="/sbin:%{_sbindir}:/bin:%{_bindir}:/usr/local/bin:/usr/local/sbin" \
82 --with-passprompt="[sudo] password for %p: " \
83 --with-plugindir=%{_libdir}/sudo
84
85 %make
86
87 %install
88 rm -rf %{buildroot}
89
90 install -d %{buildroot}/usr
91 install -d %{buildroot}%{_sysconfdir}/logrotate.d
92 install -d %{buildroot}%{_sysconfdir}/sudoers.d
93 install -d %{buildroot}%{_sysconfdir}/pam.d
94 install -d %{buildroot}%{_var}/db/sudo
95 install -d %{buildroot}%{_logdir}/sudo
96 install -d %{buildroot}%{_logdir}/sudo-io
97
98 %makeinstall_std install_uid=$UID install_gid=$(id -g) sudoers=uid=$UID sudoers_gid=$(id -g)
99
100 install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sudo
101 install -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers
102 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
103
104 # Installing logrotated file
105 cat <<END >%{buildroot}%{_sysconfdir}/logrotate.d/sudo
106 %{_logdir}/sudo.log {
107 missingok
108 monthly
109 compress
110 }
111 END
112
113 cat > %{buildroot}%{_sysconfdir}/pam.d/sudo << EOF
114 #%PAM-1.0
115 auth include system-auth
116 account include system-auth
117 password include system-auth
118 session optional pam_keyinit.so revoke
119 session required pam_limits.so
120 EOF
121
122 cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
123 #%PAM-1.0
124 auth include sudo
125 account include sudo
126 password include sudo
127 session optional pam_keyinit.so force revoke
128 session required pam_limits.so
129 EOF
130
131 # so that strip can touch it...
132 chmod 755 %{buildroot}%{_bindir}/*
133 chmod 755 %{buildroot}%{_sbindir}/*
134
135 # (tpg) create the missing log file
136 touch %{buildroot}%{_logdir}/sudo.log
137
138 %find_lang sudo
139 %find_lang sudoers
140
141 cat sudo.lang sudoers.lang > sudo_all.lang
142 rm sudo.lang sudoers.lang
143
144 %check
145 make check
146
147 %post
148 /bin/chmod 0440 %{_sysconfdir}/sudoers || :
149 %create_ghostfile %{_logdir}/sudo.log root root 600
150
151 %files -f sudo_all.lang
152 %doc doc/HISTORY README README.LDAP
153 %doc doc/TROUBLESHOOTING doc/UPGRADE doc/sample.* doc/schema.*
154 %attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers
155 %attr(0750,root,root) %dir %{_sysconfdir}/sudoers.d/
156 %config(noreplace) %{_sysconfdir}/logrotate.d/sudo
157 %config(noreplace) %{_sysconfdir}/pam.d/sudo
158 %config(noreplace) %{_sysconfdir}/pam.d/sudo-i
159 %attr(0755,root,root) %{_bindir}/sudoers2ldif
160 %attr(4111,root,root) %{_bindir}/sudo
161 %attr(4111,root,root) %{_bindir}/sudoedit
162 %attr(0111,root,root) %{_bindir}/sudoreplay
163 %attr(0755,root,root) %{_sbindir}/visudo
164 %ghost %{_logdir}/sudo.log
165 %{_mandir}/*/*
166 %attr(0700,root,root) %dir %{_var}/db/sudo
167 %attr(0750,root,root) %dir %{_logdir}/sudo-io
168 %{_libdir}/sudo/sudoers.so
169
170 %files devel
171 %doc plugins/{sample,sample_group}
172 %{_includedir}/sudo_plugin.h
173 %{_mandir}/man8/sudo_plugin.8*

  ViewVC Help
Powered by ViewVC 1.1.30