Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/sudo: ChangeLog sudo-1.8.13.ebuild
Date: Sun, 29 Mar 2015 11:01:55
Message-Id: 20150329110151.87F6D14C53@oystercatcher.gentoo.org
1 polynomial-c 15/03/29 11:01:51
2
3 Modified: ChangeLog
4 Added: sudo-1.8.13.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.379 app-admin/sudo/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/sudo/ChangeLog?rev=1.379&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/sudo/ChangeLog?rev=1.379&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/sudo/ChangeLog?r1=1.378&r2=1.379
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v
20 retrieving revision 1.378
21 retrieving revision 1.379
22 diff -u -r1.378 -r1.379
23 --- ChangeLog 10 Feb 2015 08:48:37 -0000 1.378
24 +++ ChangeLog 29 Mar 2015 11:01:51 -0000 1.379
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-admin/sudo
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.378 2015/02/10 08:48:37 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.379 2015/03/29 11:01:51 polynomial-c Exp $
30 +
31 +*sudo-1.8.13 (29 Mar 2015)
32 +
33 + 29 Mar 2015; Lars Wendler <polynomial-c@g.o> +sudo-1.8.13.ebuild:
34 + Version bump.
35
36 *sudo-1.8.12 (10 Feb 2015)
37
38
39
40
41 1.1 app-admin/sudo/sudo-1.8.13.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/sudo/sudo-1.8.13.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/sudo/sudo-1.8.13.ebuild?rev=1.1&content-type=text/plain
45
46 Index: sudo-1.8.13.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.8.13.ebuild,v 1.1 2015/03/29 11:01:51 polynomial-c Exp $
51
52 EAPI=5
53
54 inherit eutils pam multilib libtool
55
56 MY_P=${P/_/}
57 MY_P=${MY_P/beta/b}
58
59 uri_prefix=
60 case ${P} in
61 *_beta*|*_rc*) uri_prefix=beta/ ;;
62 esac
63
64 DESCRIPTION="Allows users or groups to run commands as other users"
65 HOMEPAGE="http://www.sudo.ws/"
66 SRC_URI="http://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
67 ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
68
69 # Basic license is ISC-style as-is, some files are released under
70 # 3-clause BSD license
71 LICENSE="ISC BSD"
72 SLOT="0"
73 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~sparc-solaris"
74 IUSE="ldap nls pam offensive selinux skey +sendmail"
75
76 DEPEND="pam? ( virtual/pam )
77 skey? ( >=sys-auth/skey-1.1.5-r1 )
78 ldap? (
79 >=net-nds/openldap-2.1.30-r1
80 dev-libs/cyrus-sasl
81 )
82 sys-libs/zlib"
83 RDEPEND="${DEPEND}
84 selinux? ( sec-policy/selinux-sudo )
85 ldap? ( dev-lang/perl )
86 pam? ( sys-auth/pambase )
87 >=app-misc/editor-wrapper-3
88 virtual/editor
89 sendmail? ( virtual/mta )"
90 DEPEND="${DEPEND}
91 sys-devel/bison"
92
93 S=${WORKDIR}/${MY_P}
94
95 REQUIRED_USE="pam? ( !skey ) skey? ( !pam )"
96
97 MAKEOPTS+=" SAMPLES="
98
99 src_prepare() {
100 elibtoolize
101 }
102
103 set_rootpath() {
104 # FIXME: secure_path is a compile time setting. using ROOTPATH
105 # is not perfect, env-update may invalidate this, but until it
106 # is available as a sudoers setting this will have to do.
107 einfo "Setting secure_path ..."
108
109 # first extract the default ROOTPATH from build env
110 ROOTPATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}")
111 if [[ -z ${ROOTPATH} ]] ; then
112 ewarn " Failed to find ROOTPATH, please report this"
113 fi
114
115 # then remove duplicate path entries
116 cleanpath() {
117 local newpath thisp IFS=:
118 for thisp in $1 ; do
119 if [[ :${newpath}: != *:${thisp}:* ]] ; then
120 newpath+=:$thisp
121 else
122 einfo " Duplicate entry ${thisp} removed..."
123 fi
124 done
125 ROOTPATH=${newpath#:}
126 }
127 cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}}
128
129 # finally, strip gcc paths #136027
130 rmpath() {
131 local e newpath thisp IFS=:
132 for thisp in ${ROOTPATH} ; do
133 for e ; do [[ $thisp == $e ]] && continue 2 ; done
134 newpath+=:$thisp
135 done
136 ROOTPATH=${newpath#:}
137 }
138 rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
139
140 einfo "... done"
141 }
142
143 src_configure() {
144 local ROOTPATH
145 set_rootpath
146
147 # audit: somebody got to explain me how I can test this before I
148 # enable it.. - Diego
149 # plugindir: autoconf code is crappy and does not delay evaluation
150 # until `make` time, so we have to use a full path here rather than
151 # basing off other values.
152 econf \
153 --enable-zlib=system \
154 --with-secure-path="${ROOTPATH}" \
155 --with-editor="${EPREFIX}"/usr/libexec/editor \
156 --with-env-editor \
157 $(use_with offensive insults) \
158 $(use_with offensive all-insults) \
159 $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) \
160 $(use_with ldap) \
161 $(use_enable nls) \
162 $(use_with pam) \
163 $(use_with skey) \
164 $(use_with selinux) \
165 $(use_with sendmail) \
166 --without-opie \
167 --without-linux-audit \
168 --with-rundir="${EPREFIX}"/var/run/sudo \
169 --with-vardir="${EPREFIX}"/var/db/sudo \
170 --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo \
171 --docdir="${EPREFIX}"/usr/share/doc/${PF}
172 }
173
174 src_install() {
175 default
176
177 if use ldap ; then
178 dodoc README.LDAP doc/schema.OpenLDAP
179 dosbin plugins/sudoers/sudoers2ldif
180
181 cat <<-EOF > "${T}"/ldap.conf.sudo
182 # See ldap.conf(5) and README.LDAP for details
183 # This file should only be readable by root
184
185 # supported directives: host, port, ssl, ldap_version
186 # uri, binddn, bindpw, sudoers_base, sudoers_debug
187 # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key
188 EOF
189
190 insinto /etc
191 doins "${T}"/ldap.conf.sudo
192 fperms 0440 /etc/ldap.conf.sudo
193 fi
194
195 pamd_mimic system-auth sudo auth account session
196
197 keepdir /var/db/sudo
198 fperms 0700 /var/db/sudo
199
200 # Don't install into /var/run as that is a tmpfs most of the time
201 # (bug #504854)
202 rm -rf "${D}"/var/run
203 }
204
205 pkg_postinst() {
206 if use ldap ; then
207 ewarn
208 ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
209 ewarn
210 if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
211 ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
212 ewarn "configured in /etc/nsswitch.conf."
213 ewarn
214 ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
215 ewarn " sudoers: ldap files"
216 ewarn
217 fi
218 fi
219 if use prefix ; then
220 ewarn
221 ewarn "To use sudo, you need to change file ownership and permissions"
222 ewarn "with root privileges, as follows:"
223 ewarn
224 ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
225 ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
226 ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
227 ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
228 ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
229 ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
230 ewarn
231 fi
232
233 elog "To use the -A (askpass) option, you need to install a compatible"
234 elog "password program from the following list. Starred packages will"
235 elog "automatically register for the use with sudo (but will not force"
236 elog "the -A option):"
237 elog ""
238 elog " [*] net-misc/ssh-askpass-fullscreen"
239 elog " net-misc/x11-ssh-askpass"
240 elog ""
241 elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
242 elog "variable to the program you want to use."
243 }