/[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 689578 - (show annotations) (download)
Tue Sep 16 20:55:25 2014 UTC (9 years, 7 months ago) by umeabot
Original Path: cauldron/sudo/current/SPECS/sudo.spec
File size: 5314 byte(s)
Mageia 5 Mass Rebuild
1 # use fakeroot -ba sudo.spec to build!
2
3 Name: sudo
4 Version: 1.8.10p3
5 Release: %mkrel 2
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 Patch4: sudo-1.8.5-pipelist.patch
18 BuildRequires: audit-devel
19 BuildRequires: bison
20 BuildRequires: groff-for-man
21 BuildRequires: libcap-devel
22 BuildRequires: openldap-devel
23 BuildRequires: pam-devel
24 Requires(pre): openldap
25
26 %description
27 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
36 %package devel
37 Summary: Development files for sudo plugins
38 Group: Development/C
39 Requires: %{name} = %{epoch}:%{version}-%{release}
40
41 %description devel
42 Development files for compiling sudo plugins.
43
44 %prep
45 %setup -q -n %{name}-%{version}%{?pre}
46 %patch1 -p1 -b .strip
47 %patch2 -p1 -b .envdebug
48 #patch4 -p1 -b .pipelist
49
50 # fix attribs
51 find -name "Makefile.*" | xargs perl -pi -e "s|-m 0444|-m 0644|g"
52
53
54 %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 --without-rpath \
65 --with-logging=both \
66 --with-logfac=authpriv \
67 --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 --with-ignore-dot \
76 --with-tty-tickets \
77 --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 --with-passprompt="[sudo] password for %p: " \
81 --with-plugindir=%{_libdir}/sudo
82
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 install -m0755 plugins/sudoers/sudoers2ldif %{buildroot}%{_bindir}
99
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 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 EOF
117
118 cat > %{buildroot}%{_sysconfdir}/pam.d/sudo-i << EOF
119 #%PAM-1.0
120 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 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 %find_lang sudo
135 %find_lang sudoers
136
137 cat sudo.lang sudoers.lang > sudo_all.lang
138 rm sudo.lang sudoers.lang
139
140 %check
141 make check
142
143 %post
144 /bin/chmod 0440 %{_sysconfdir}/sudoers || :
145 %create_ghostfile %{_logdir}/sudo.log root root 600
146
147 %files -f sudo_all.lang
148 %doc doc/HISTORY README README.LDAP
149 %doc doc/TROUBLESHOOTING doc/UPGRADE doc/sample.* doc/schema.*
150 %attr(0440,root,root) %config(noreplace) %{_sysconfdir}/sudoers
151 %attr(0750,root,root) %dir %{_sysconfdir}/sudoers.d/
152 %config(noreplace) %{_sysconfdir}/logrotate.d/sudo
153 %config(noreplace) %{_sysconfdir}/pam.d/sudo
154 %config(noreplace) %{_sysconfdir}/pam.d/sudo-i
155 %attr(0755,root,root) %{_bindir}/sudoers2ldif
156 %attr(4111,root,root) %{_bindir}/sudo
157 %attr(4111,root,root) %{_bindir}/sudoedit
158 %attr(0111,root,root) %{_bindir}/sudoreplay
159 %attr(0755,root,root) %{_sbindir}/visudo
160 %ghost %{_logdir}/sudo.log
161 %{_mandir}/*/*
162 %attr(0700,root,root) %dir %{_var}/db/sudo
163 %attr(0750,root,root) %dir %{_logdir}/sudo-io
164 %{_libdir}/sudo/group_file.so
165 %{_libdir}/sudo/sudoers.so
166 %{_libdir}/sudo/system_group.so
167
168 %files devel
169 %doc plugins/{group_file,sample}
170 %{_includedir}/sudo_plugin.h
171 %{_mandir}/man8/sudo_plugin.8*

  ViewVC Help
Powered by ViewVC 1.1.30