1 |
commit: 5a478cdd868b226c8352600fe5a64cc93cf8373e |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 16 21:09:04 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 16 21:09:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a478cdd |
7 |
|
8 |
app-admin/sudo: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-admin/sudo/sudo-1.8.26.ebuild | 242 -------------------------------------- |
14 |
1 file changed, 242 deletions(-) |
15 |
|
16 |
diff --git a/app-admin/sudo/sudo-1.8.26.ebuild b/app-admin/sudo/sudo-1.8.26.ebuild |
17 |
deleted file mode 100644 |
18 |
index 0420116ccdf..00000000000 |
19 |
--- a/app-admin/sudo/sudo-1.8.26.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,242 +0,0 @@ |
22 |
-# Copyright 1999-2018 Gentoo Authors |
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 sssd" |
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 |
- sssd? ( sys-auth/sssd[sudo] ) |
69 |
-" |
70 |
-RDEPEND=" |
71 |
- ${CDEPEND} |
72 |
- >=app-misc/editor-wrapper-3 |
73 |
- virtual/editor |
74 |
- ldap? ( dev-lang/perl ) |
75 |
- pam? ( sys-auth/pambase ) |
76 |
- selinux? ( sec-policy/selinux-sudo ) |
77 |
- sendmail? ( virtual/mta ) |
78 |
-" |
79 |
-DEPEND=" |
80 |
- ${CDEPEND} |
81 |
- sys-devel/bison |
82 |
-" |
83 |
- |
84 |
-S="${WORKDIR}/${MY_P}" |
85 |
- |
86 |
-REQUIRED_USE=" |
87 |
- pam? ( !skey ) |
88 |
- skey? ( !pam ) |
89 |
- ?? ( gcrypt openssl ) |
90 |
-" |
91 |
- |
92 |
-MAKEOPTS+=" SAMPLES=" |
93 |
- |
94 |
-src_prepare() { |
95 |
- default |
96 |
- elibtoolize |
97 |
-} |
98 |
- |
99 |
-set_secure_path() { |
100 |
- # FIXME: secure_path is a compile time setting. using PATH or |
101 |
- # ROOTPATH is not perfect, env-update may invalidate this, but until it |
102 |
- # is available as a sudoers setting this will have to do. |
103 |
- einfo "Setting secure_path ..." |
104 |
- |
105 |
- # first extract the default ROOTPATH from build env |
106 |
- SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; |
107 |
- echo "${ROOTPATH}") |
108 |
- case "${SECURE_PATH}" in |
109 |
- */usr/sbin*) ;; |
110 |
- *) SECURE_PATH=$(unset PATH; |
111 |
- . "${EPREFIX}"/etc/profile.env; echo "${PATH}") |
112 |
- ;; |
113 |
- esac |
114 |
- if [[ -z ${SECURE_PATH} ]] ; then |
115 |
- ewarn " Failed to detect SECURE_PATH, please report this" |
116 |
- fi |
117 |
- |
118 |
- # then remove duplicate path entries |
119 |
- cleanpath() { |
120 |
- local newpath thisp IFS=: |
121 |
- for thisp in $1 ; do |
122 |
- if [[ :${newpath}: != *:${thisp}:* ]] ; then |
123 |
- newpath+=:$thisp |
124 |
- else |
125 |
- einfo " Duplicate entry ${thisp} removed..." |
126 |
- fi |
127 |
- done |
128 |
- SECURE_PATH=${newpath#:} |
129 |
- } |
130 |
- cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} |
131 |
- |
132 |
- # finally, strip gcc paths #136027 |
133 |
- rmpath() { |
134 |
- local e newpath thisp IFS=: |
135 |
- for thisp in ${SECURE_PATH} ; do |
136 |
- for e ; do [[ $thisp == $e ]] && continue 2 ; done |
137 |
- newpath+=:$thisp |
138 |
- done |
139 |
- SECURE_PATH=${newpath#:} |
140 |
- } |
141 |
- rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' |
142 |
- |
143 |
- einfo "... done" |
144 |
-} |
145 |
- |
146 |
-src_configure() { |
147 |
- local SECURE_PATH |
148 |
- set_secure_path |
149 |
- |
150 |
- # audit: somebody got to explain me how I can test this before I |
151 |
- # enable it.. - Diego |
152 |
- # plugindir: autoconf code is crappy and does not delay evaluation |
153 |
- # until `make` time, so we have to use a full path here rather than |
154 |
- # basing off other values. |
155 |
- myeconfargs=( |
156 |
- --enable-zlib=system |
157 |
- --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d |
158 |
- --with-editor="${EPREFIX}"/usr/libexec/editor |
159 |
- --with-env-editor |
160 |
- --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo |
161 |
- --with-rundir="${EPREFIX}"/run/sudo |
162 |
- --with-secure-path="${SECURE_PATH}" |
163 |
- --with-vardir="${EPREFIX}"/var/db/sudo |
164 |
- --without-linux-audit |
165 |
- --without-opie |
166 |
- $(use_enable gcrypt) |
167 |
- $(use_enable nls) |
168 |
- $(use_enable openssl) |
169 |
- $(use_enable sasl) |
170 |
- $(use_with offensive insults) |
171 |
- $(use_with offensive all-insults) |
172 |
- $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) |
173 |
- $(use_with ldap) |
174 |
- $(use_with pam) |
175 |
- $(use_with skey) |
176 |
- $(use_with sssd) |
177 |
- $(use_with selinux) |
178 |
- $(use_with sendmail) |
179 |
- ) |
180 |
- econf "${myeconfargs[@]}" |
181 |
-} |
182 |
- |
183 |
-src_install() { |
184 |
- default |
185 |
- |
186 |
- if use ldap ; then |
187 |
- dodoc README.LDAP |
188 |
- |
189 |
- cat <<-EOF > "${T}"/ldap.conf.sudo |
190 |
- # See ldap.conf(5) and README.LDAP for details |
191 |
- # This file should only be readable by root |
192 |
- |
193 |
- # supported directives: host, port, ssl, ldap_version |
194 |
- # uri, binddn, bindpw, sudoers_base, sudoers_debug |
195 |
- # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} |
196 |
- EOF |
197 |
- |
198 |
- insinto /etc |
199 |
- doins "${T}"/ldap.conf.sudo |
200 |
- fperms 0440 /etc/ldap.conf.sudo |
201 |
- |
202 |
- insinto /etc/openldap/schema |
203 |
- newins doc/schema.OpenLDAP sudo.schema |
204 |
- fi |
205 |
- |
206 |
- pamd_mimic system-auth sudo auth account session |
207 |
- |
208 |
- keepdir /var/db/sudo/lectured |
209 |
- fperms 0700 /var/db/sudo/lectured |
210 |
- fperms 0711 /var/db/sudo #652958 |
211 |
- |
212 |
- # Don't install into /run as that is a tmpfs most of the time |
213 |
- # (bug #504854) |
214 |
- rm -rf "${ED%/}"/run |
215 |
-} |
216 |
- |
217 |
-pkg_postinst() { |
218 |
- tmpfiles_process sudo.conf |
219 |
- |
220 |
- #652958 |
221 |
- local sudo_db="${EROOT}/var/db/sudo" |
222 |
- if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then |
223 |
- chmod 711 "${sudo_db}" || die |
224 |
- fi |
225 |
- |
226 |
- if use ldap ; then |
227 |
- ewarn |
228 |
- ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." |
229 |
- ewarn |
230 |
- if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then |
231 |
- ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" |
232 |
- ewarn "configured in /etc/nsswitch.conf." |
233 |
- ewarn |
234 |
- ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" |
235 |
- ewarn " sudoers: ldap files" |
236 |
- ewarn |
237 |
- fi |
238 |
- fi |
239 |
- if use prefix ; then |
240 |
- ewarn |
241 |
- ewarn "To use sudo, you need to change file ownership and permissions" |
242 |
- ewarn "with root privileges, as follows:" |
243 |
- ewarn |
244 |
- ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" |
245 |
- ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" |
246 |
- ewarn " # chown root:root ${EPREFIX}/etc/sudoers" |
247 |
- ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" |
248 |
- ewarn " # chown root:root ${EPREFIX}/var/db/sudo" |
249 |
- ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" |
250 |
- ewarn |
251 |
- fi |
252 |
- |
253 |
- elog "To use the -A (askpass) option, you need to install a compatible" |
254 |
- elog "password program from the following list. Starred packages will" |
255 |
- elog "automatically register for the use with sudo (but will not force" |
256 |
- elog "the -A option):" |
257 |
- elog "" |
258 |
- elog " [*] net-misc/ssh-askpass-fullscreen" |
259 |
- elog " net-misc/x11-ssh-askpass" |
260 |
- elog "" |
261 |
- elog "You can override the choice by setting the SUDO_ASKPASS environmnent" |
262 |
- elog "variable to the program you want to use." |
263 |
-} |