1 |
commit: cdc9710d440dc0d4d7c8884a16f2254ef1c7ee03 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 29 14:38:28 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 29 14:38:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=cdc9710d |
7 |
|
8 |
app-admin/sudo: in tree version works |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
app-admin/sudo/Manifest | 1 - |
13 |
app-admin/sudo/metadata.xml | 33 ----- |
14 |
app-admin/sudo/sudo-1.8.22-r2.ebuild | 229 ----------------------------------- |
15 |
3 files changed, 263 deletions(-) |
16 |
|
17 |
diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest |
18 |
deleted file mode 100644 |
19 |
index 87e58ff..0000000 |
20 |
--- a/app-admin/sudo/Manifest |
21 |
+++ /dev/null |
22 |
@@ -1 +0,0 @@ |
23 |
-DIST sudo-1.8.22.tar.gz 3029051 BLAKE2B c77e05b6e9cee738902d6289327fb5d34d19833d96597f983d8af01434d224dd698f9257b0965a0e480e8d19eb38eef0c8216942ca5217c3fe7516cdf397f7b7 SHA512 5ce10a9302d25bb726e347499d26a0b3697446cfcdf0fd9094ee35198db7b023d5250a53fdcb4184d1a09f5fd2a78fc645bc8e80f265666b05a91f62f49b0695 |
24 |
|
25 |
diff --git a/app-admin/sudo/metadata.xml b/app-admin/sudo/metadata.xml |
26 |
deleted file mode 100644 |
27 |
index 1625b90..0000000 |
28 |
--- a/app-admin/sudo/metadata.xml |
29 |
+++ /dev/null |
30 |
@@ -1,33 +0,0 @@ |
31 |
-<?xml version="1.0" encoding="UTF-8"?> |
32 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
33 |
-<pkgmetadata> |
34 |
- <maintainer type="project"> |
35 |
- <email>base-system@g.o</email> |
36 |
- <name>Gentoo Base System</name> |
37 |
- </maintainer> |
38 |
- <longdescription lang="en"> |
39 |
- Sudo (superuser do) allows a system administrator to give certain |
40 |
- users (or groups of users) the ability to run some (or all) |
41 |
- commands as root or another user while logging the commands and |
42 |
- arguments. |
43 |
- </longdescription> |
44 |
- <use> |
45 |
- <flag name="gcrypt"> |
46 |
- Use SHA2 from <pkg>dev-libs/libgcrypt</pkg> |
47 |
- instead of sudo's internal SHA2. |
48 |
- </flag> |
49 |
- <flag name="offensive"> |
50 |
- Let sudo print insults when the user types the wrong password. |
51 |
- </flag> |
52 |
- <flag name="openssl"> |
53 |
- Use SHA2 from <pkg>dev-libs/openssl</pkg> |
54 |
- instead of sudo's internal SHA2. |
55 |
- </flag> |
56 |
- <flag name="sendmail"> |
57 |
- Allow sudo to send emails with sendmail. |
58 |
- </flag> |
59 |
- </use> |
60 |
- <upstream> |
61 |
- <remote-id type="cpe">cpe:/a:todd_miller:sudo</remote-id> |
62 |
- </upstream> |
63 |
-</pkgmetadata> |
64 |
|
65 |
diff --git a/app-admin/sudo/sudo-1.8.22-r2.ebuild b/app-admin/sudo/sudo-1.8.22-r2.ebuild |
66 |
deleted file mode 100644 |
67 |
index 4aa5303..0000000 |
68 |
--- a/app-admin/sudo/sudo-1.8.22-r2.ebuild |
69 |
+++ /dev/null |
70 |
@@ -1,229 +0,0 @@ |
71 |
-# Copyright 1999-2018 Gentoo Foundation |
72 |
-# Distributed under the terms of the GNU General Public License v2 |
73 |
- |
74 |
-EAPI=6 |
75 |
- |
76 |
-inherit eutils pam multilib libtool |
77 |
- |
78 |
-MY_P=${P/_/} |
79 |
-MY_P=${MY_P/beta/b} |
80 |
- |
81 |
-uri_prefix= |
82 |
-case ${P} in |
83 |
- *_beta*|*_rc*) uri_prefix=beta/ ;; |
84 |
-esac |
85 |
- |
86 |
-DESCRIPTION="Allows users or groups to run commands as other users" |
87 |
-HOMEPAGE="https://www.sudo.ws/" |
88 |
-SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz |
89 |
- ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" |
90 |
- |
91 |
-# Basic license is ISC-style as-is, some files are released under |
92 |
-# 3-clause BSD license |
93 |
-LICENSE="ISC BSD" |
94 |
-SLOT="0" |
95 |
-if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then |
96 |
- KEYWORDS="x86" |
97 |
-fi |
98 |
-IUSE="gcrypt ldap nls pam offensive openssl sasl selinux +sendmail skey" |
99 |
- |
100 |
-CDEPEND=" |
101 |
- gcrypt? ( dev-libs/libgcrypt:= ) |
102 |
- openssl? ( dev-libs/openssl:0= ) |
103 |
- pam? ( virtual/pam ) |
104 |
- sasl? ( dev-libs/cyrus-sasl ) |
105 |
- skey? ( >=sys-auth/skey-1.1.5-r1 ) |
106 |
- ldap? ( |
107 |
- >=net-nds/openldap-2.1.30-r1 |
108 |
- dev-libs/cyrus-sasl |
109 |
- ) |
110 |
- sys-libs/zlib |
111 |
-" |
112 |
-RDEPEND=" |
113 |
- ${CDEPEND} |
114 |
- selinux? ( sec-policy/selinux-sudo ) |
115 |
- ldap? ( dev-lang/perl ) |
116 |
- pam? ( sys-auth/pambase ) |
117 |
- >=app-misc/editor-wrapper-3 |
118 |
- virtual/editor |
119 |
- sendmail? ( virtual/mta ) |
120 |
-" |
121 |
-DEPEND=" |
122 |
- ${CDEPEND} |
123 |
- sys-devel/bison |
124 |
-" |
125 |
- |
126 |
-S="${WORKDIR}/${MY_P}" |
127 |
- |
128 |
-REQUIRED_USE=" |
129 |
- pam? ( !skey ) |
130 |
- skey? ( !pam ) |
131 |
- ?? ( gcrypt openssl ) |
132 |
-" |
133 |
- |
134 |
-MAKEOPTS+=" SAMPLES=" |
135 |
- |
136 |
-src_prepare() { |
137 |
- default |
138 |
- elibtoolize |
139 |
-} |
140 |
- |
141 |
-set_rootpath() { |
142 |
- # FIXME: secure_path is a compile time setting. using ROOTPATH |
143 |
- # is not perfect, env-update may invalidate this, but until it |
144 |
- # is available as a sudoers setting this will have to do. |
145 |
- einfo "Setting secure_path ..." |
146 |
- |
147 |
- # first extract the default ROOTPATH from build env |
148 |
- ROOTPATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") |
149 |
- if [[ -z ${ROOTPATH} ]] ; then |
150 |
- ewarn " Failed to find ROOTPATH, please report this" |
151 |
- fi |
152 |
- |
153 |
- # then remove duplicate path entries |
154 |
- cleanpath() { |
155 |
- local newpath thisp IFS=: |
156 |
- for thisp in $1 ; do |
157 |
- if [[ :${newpath}: != *:${thisp}:* ]] ; then |
158 |
- newpath+=:$thisp |
159 |
- else |
160 |
- einfo " Duplicate entry ${thisp} removed..." |
161 |
- fi |
162 |
- done |
163 |
- ROOTPATH=${newpath#:} |
164 |
- } |
165 |
- cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}} |
166 |
- |
167 |
- # finally, strip gcc paths #136027 |
168 |
- rmpath() { |
169 |
- local e newpath thisp IFS=: |
170 |
- for thisp in ${ROOTPATH} ; do |
171 |
- for e ; do [[ $thisp == $e ]] && continue 2 ; done |
172 |
- newpath+=:$thisp |
173 |
- done |
174 |
- ROOTPATH=${newpath#:} |
175 |
- } |
176 |
- rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' |
177 |
- |
178 |
- einfo "... done" |
179 |
-} |
180 |
- |
181 |
-src_configure() { |
182 |
- local ROOTPATH |
183 |
- set_rootpath |
184 |
- |
185 |
- # audit: somebody got to explain me how I can test this before I |
186 |
- # enable it.. - Diego |
187 |
- # plugindir: autoconf code is crappy and does not delay evaluation |
188 |
- # until `make` time, so we have to use a full path here rather than |
189 |
- # basing off other values. |
190 |
- myeconfargs=( |
191 |
- --enable-zlib=system |
192 |
- --with-editor="${EPREFIX}"/usr/libexec/editor |
193 |
- --with-env-editor |
194 |
- --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo |
195 |
- --with-rundir="${EPREFIX}"/var/run/sudo |
196 |
- --with-secure-path="${ROOTPATH}" |
197 |
- --with-vardir="${EPREFIX}"/var/db/sudo |
198 |
- --without-linux-audit |
199 |
- --without-opie |
200 |
- $(use_enable gcrypt) |
201 |
- $(use_enable nls) |
202 |
- $(use_enable openssl) |
203 |
- $(use_enable sasl) |
204 |
- $(use_with offensive insults) |
205 |
- $(use_with offensive all-insults) |
206 |
- $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) |
207 |
- $(use_with ldap) |
208 |
- $(use_with pam) |
209 |
- $(use_with skey) |
210 |
- $(use_with selinux) |
211 |
- $(use_with sendmail) |
212 |
- ) |
213 |
- |
214 |
- if [[ $(tc-arch) == x86 ]]; then |
215 |
- myeconfargs=( --disable-hardening ) |
216 |
- fi |
217 |
- econf "${myeconfargs[@]}" |
218 |
-} |
219 |
- |
220 |
-src_install() { |
221 |
- default |
222 |
- |
223 |
- if use ldap ; then |
224 |
- dodoc README.LDAP |
225 |
- dosbin plugins/sudoers/sudoers2ldif |
226 |
- |
227 |
- cat <<-EOF > "${T}"/ldap.conf.sudo |
228 |
- # See ldap.conf(5) and README.LDAP for details |
229 |
- # This file should only be readable by root |
230 |
- |
231 |
- # supported directives: host, port, ssl, ldap_version |
232 |
- # uri, binddn, bindpw, sudoers_base, sudoers_debug |
233 |
- # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} |
234 |
- EOF |
235 |
- |
236 |
- insinto /etc |
237 |
- doins "${T}"/ldap.conf.sudo |
238 |
- fperms 0440 /etc/ldap.conf.sudo |
239 |
- |
240 |
- insinto /etc/openldap/schema |
241 |
- newins doc/schema.OpenLDAP sudo.schema |
242 |
- fi |
243 |
- |
244 |
- pamd_mimic system-auth sudo auth account session |
245 |
- |
246 |
- keepdir /var/db/sudo/lectured |
247 |
- fperms 0700 /var/db/sudo/lectured |
248 |
- fperms 0711 /var/db/sudo #652958 |
249 |
- |
250 |
- # Don't install into /var/run as that is a tmpfs most of the time |
251 |
- # (bug #504854) |
252 |
- rm -rf "${ED}"/var/run |
253 |
-} |
254 |
- |
255 |
-pkg_postinst() { |
256 |
- #652958 |
257 |
- local sudo_db="${EROOT}/var/db/sudo" |
258 |
- if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then |
259 |
- chmod 711 "${sudo_db}" || die |
260 |
- fi |
261 |
- |
262 |
- if use ldap ; then |
263 |
- ewarn |
264 |
- ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." |
265 |
- ewarn |
266 |
- if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then |
267 |
- ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" |
268 |
- ewarn "configured in /etc/nsswitch.conf." |
269 |
- ewarn |
270 |
- ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" |
271 |
- ewarn " sudoers: ldap files" |
272 |
- ewarn |
273 |
- fi |
274 |
- fi |
275 |
- if use prefix ; then |
276 |
- ewarn |
277 |
- ewarn "To use sudo, you need to change file ownership and permissions" |
278 |
- ewarn "with root privileges, as follows:" |
279 |
- ewarn |
280 |
- ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" |
281 |
- ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" |
282 |
- ewarn " # chown root:root ${EPREFIX}/etc/sudoers" |
283 |
- ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" |
284 |
- ewarn " # chown root:root ${EPREFIX}/var/db/sudo" |
285 |
- ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" |
286 |
- ewarn |
287 |
- fi |
288 |
- |
289 |
- elog "To use the -A (askpass) option, you need to install a compatible" |
290 |
- elog "password program from the following list. Starred packages will" |
291 |
- elog "automatically register for the use with sudo (but will not force" |
292 |
- elog "the -A option):" |
293 |
- elog "" |
294 |
- elog " [*] net-misc/ssh-askpass-fullscreen" |
295 |
- elog " net-misc/x11-ssh-askpass" |
296 |
- elog "" |
297 |
- elog "You can override the choice by setting the SUDO_ASKPASS environmnent" |
298 |
- elog "variable to the program you want to use." |
299 |
-} |