Gentoo Archives: gentoo-commits

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