Magellan Linux

Contents of /smage/trunk/core/sudo/sudo-1.9.1-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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