Contents of /smage/trunk/core/sudo/sudo-1.8.6p8-r1.smage2
Parent Directory | Revision Log
Revision 4757 -
(show annotations)
(download)
Mon Apr 15 13:23:48 2013 UTC (11 years, 5 months ago) by niro
File size: 2135 byte(s)
Mon Apr 15 13:23:48 2013 UTC (11 years, 5 months ago) by niro
File size: 2135 byte(s)
auto added: ver bump to 1.8.6p8-r1
1 | # $Id$ |
2 | |
3 | PNAME="sudo" |
4 | PVER="1.8.6p8" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="app-admin" |
8 | |
9 | DESCRIPTION="sudo allows to give certain users the ability to run some commands as another user while logging the commands." |
10 | HOMEPAGE="http://www.sudo.ws/" |
11 | |
12 | DEPEND=">= virtual/glibc" |
13 | |
14 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
15 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
16 | |
17 | ALX_PKG_KEEP="etc/sudoers etc/sudoers.d usr/bin/sudo usr/$(mlibdir)/sudo/*.so" |
18 | sminclude mtools alx-split |
19 | |
20 | SRC_URI=( |
21 | http://www.sudo.ws/${PNAME}/dist/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-1.8.0-allow-wheel.patch |
24 | mirror://${PNAME}/${PNAME}-1.8.5p2-preserve-magellan-env.patch |
25 | mirror://${PNAME}/${PNAME}-1.8.5p2-disable-from-ssh-login.patch |
26 | ) |
27 | |
28 | UP2DATE="updatecmd http://www.sudo.ws/${PNAME}/dist | grep ${PNAME}- | lasttarball gz" |
29 | |
30 | src_prepare() |
31 | { |
32 | munpack ${SRCFILE} || die |
33 | cd ${SRCDIR} |
34 | |
35 | # allow the group wheel to run all commands |
36 | mpatch ${PNAME}-1.8.0-allow-wheel.patch || die |
37 | |
38 | # preserve some important magellan environment variables |
39 | mpatch ${PNAME}-1.8.5p2-preserve-magellan-env.patch || die |
40 | |
41 | # disable sudo run from ssh logon for security reasons |
42 | mpatch ${PNAME}-1.8.5p2-disable-from-ssh-login.patch || die |
43 | } |
44 | |
45 | src_compile() |
46 | { |
47 | cd ${SRCDIR} |
48 | |
49 | mconfigure \ |
50 | --libexecdir=/usr/$(mlibdir)/sudo \ |
51 | --with-all-insults \ |
52 | --disable-path-info \ |
53 | --with-env-editor \ |
54 | --without-pam \ |
55 | || die |
56 | |
57 | mmake || die |
58 | } |
59 | |
60 | alx_generic_src_install() |
61 | { |
62 | cd ${SRCDIR} |
63 | mmake DESTDIR=${BINDIR} install || die |
64 | |
65 | # fix permissions - /var and /var/db get 0700 and this breaks the system! |
66 | mchmod 0755 /var || die |
67 | mchmod 0755 /var/db || die |
68 | |
69 | # docs |
70 | minstalldocs BUGS CHANGES HISTORY LICENSE PORTING \ |
71 | README RUNSON TODO TROUBLESHOOTING UPGRADE \ |
72 | || die |
73 | |
74 | # alx-specific |
75 | # include configs from /etc/sudoers.d |
76 | minstalldir /etc/sudoers.d || die |
77 | # must be 0755!! |
78 | mchmod 0755 /etc/sudoers.d || die |
79 | mcinjectfile users_reboot.sudo /etc/sudoers.d/10_users_reboot || die |
80 | mchmod 0440 /etc/sudoers.d/10_users_reboot || die |
81 | # fix tty regression with alx |
82 | sed -i 's:^Defaults requiretty:#&:' ${BINDIR}/etc/sudoers || die |
83 | } |
84 | |
85 | preinstall() |
86 | { |
87 | add_conf_prot_mask /etc/sudoers /etc/sudoers.d |
88 | } |