Gentoo Archives: gentoo-commits

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