Magellan Linux

Contents of /smage/trunk/core/sudo/sudo-1.8.9p4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5396 - (show annotations) (download)
Thu Jan 16 10:53:29 2014 UTC (10 years, 4 months ago) by niro
File size: 2300 byte(s)
auto added: ver bump to 1.8.9p4-r1
1 # $Id$
2
3 PNAME="sudo"
4 PVER="1.8.9p4"
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.7-preserve-magellan-env-proxy.patch
26 mirror://${PNAME}/${PNAME}-1.8.5p2-disable-from-ssh-login.patch
27 )
28
29 UP2DATE="updatecmd http://www.sudo.ws/${PNAME}/dist | grep ${PNAME}- | lasttarball gz"
30
31 src_prepare()
32 {
33 munpack ${SRCFILE} || die
34 cd ${SRCDIR}
35
36 # allow the group wheel to run all commands
37 mpatch ${PNAME}-1.8.0-allow-wheel.patch || die
38
39 # preserve some important magellan environment variables
40 mpatch ${PNAME}-1.8.5p2-preserve-magellan-env.patch || die
41
42 # preserve proxy variables too
43 mpatch ${PNAME}-1.8.7-preserve-magellan-env-proxy.patch || die
44
45 # disable sudo run from ssh logon for security reasons
46 mpatch ${PNAME}-1.8.5p2-disable-from-ssh-login.patch || die
47 }
48
49 src_compile()
50 {
51 cd ${SRCDIR}
52
53 mconfigure \
54 --libexecdir=/usr/$(mlibdir)/sudo \
55 --with-all-insults \
56 --disable-path-info \
57 --with-env-editor \
58 --without-pam \
59 || die
60
61 mmake || die
62 }
63
64 alx_generic_src_install()
65 {
66 cd ${SRCDIR}
67 mmake DESTDIR=${BINDIR} install || die
68
69 # fix permissions - /var and /var/db get 0700 and this breaks the system!
70 mchmod 0755 /var || die
71 mchmod 0755 /var/db || die
72
73 # docs
74 minstalldocs BUGS CHANGES HISTORY LICENSE PORTING \
75 README RUNSON TODO TROUBLESHOOTING UPGRADE \
76 || die
77
78 # alx-specific
79 # include configs from /etc/sudoers.d
80 minstalldir /etc/sudoers.d || die
81 # must be 0755!!
82 mchmod 0755 /etc/sudoers.d || die
83 mcinjectfile users_reboot.sudo /etc/sudoers.d/10_users_reboot || die
84 mchmod 0440 /etc/sudoers.d/10_users_reboot || die
85 # fix tty regression with alx
86 sed -i 's:^Defaults requiretty:#&:' ${BINDIR}/etc/sudoers || die
87 }
88
89 preinstall()
90 {
91 add_conf_prot_mask /etc/sudoers /etc/sudoers.d
92 }