1 |
commit: 1b26bd2daf48c831bda6eceb48479b4734b93629 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 2 09:16:53 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 09:16:53 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b26bd2d |
7 |
|
8 |
app-admin/sudo: Bump to version 1.8.17 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
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.17.ebuild | 200 ++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 201 insertions(+) |
16 |
|
17 |
diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest |
18 |
index f25a546..ca9a363 100644 |
19 |
--- a/app-admin/sudo/Manifest |
20 |
+++ b/app-admin/sudo/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST sudo-1.8.15.tar.gz 2660128 SHA256 4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308 SHA512 f2bff92104ddc4cbea8c788da446043cbfe02c977cedf18d46b1c82e98d7227432cb5a61233e7a06af84e3637f906edd5e02bb88c03a2ce4a16df410469a5dab WHIRLPOOL 3da64eda51f22d7fc0ea76f0693e9960d511b7c762b5d6237318d17436fd64b58ae90caa9bf4e125ebee70b83eac7cba2c7451fb62fafd8ee3d133c4ae2037b9 |
23 |
DIST sudo-1.8.16.tar.gz 2707358 SHA256 2d83826fc5125bf073acc203dbda1cf2abeee017090ccc9dddb0431a53d5064d SHA512 7cf5399eb65c4b39071213c27c34d35ed2ea9c4578f19f6e8d3777179914fa30a2848c042e9f85e90e3b5d056322b9eb6c79e2d3b9b210a795e9921a1b00200b WHIRLPOOL 747bff26e93475441aab6bb6ff8e51114f8155277d570cbdb28909b7e63a49fcdcf5d65f186a2ec067f1100cac3c0a2e6f3a7611f78d83794f41d6884a8c6fc9 |
24 |
+DIST sudo-1.8.17.tar.gz 2786216 SHA256 62b12c4fa9a3ad4f20f6e7576bc6405b2ec8d76222ea44a1c94830c68cccec8c SHA512 475d8357f2b6b0542f886db544465ff386311893babccb7b6603dac0deb82a9a6c50e82a3d7bee2713de79556e0ec326240fd8766deadbe05569a92a790e62d5 WHIRLPOOL dc81953d266a9fad674bd25688a59013f89aeecd7c61e75f9d246f8671b703542820bc8318bb584c8a1b9ec78af16498f3e0f253e0a83c90e6055fde6f9bc0d1 |
25 |
|
26 |
diff --git a/app-admin/sudo/sudo-1.8.17.ebuild b/app-admin/sudo/sudo-1.8.17.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..66082e6 |
29 |
--- /dev/null |
30 |
+++ b/app-admin/sudo/sudo-1.8.17.ebuild |
31 |
@@ -0,0 +1,200 @@ |
32 |
+# Copyright 1999-2016 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+inherit eutils pam multilib libtool |
39 |
+ |
40 |
+MY_P=${P/_/} |
41 |
+MY_P=${MY_P/beta/b} |
42 |
+ |
43 |
+uri_prefix= |
44 |
+case ${P} in |
45 |
+*_beta*|*_rc*) uri_prefix=beta/ ;; |
46 |
+esac |
47 |
+ |
48 |
+DESCRIPTION="Allows users or groups to run commands as other users" |
49 |
+HOMEPAGE="http://www.sudo.ws/" |
50 |
+SRC_URI="http://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz |
51 |
+ ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" |
52 |
+ |
53 |
+# Basic license is ISC-style as-is, some files are released under |
54 |
+# 3-clause BSD license |
55 |
+LICENSE="ISC BSD" |
56 |
+SLOT="0" |
57 |
+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" |
58 |
+IUSE="ldap nls pam offensive selinux skey +sendmail" |
59 |
+ |
60 |
+DEPEND="pam? ( virtual/pam ) |
61 |
+ skey? ( >=sys-auth/skey-1.1.5-r1 ) |
62 |
+ ldap? ( |
63 |
+ >=net-nds/openldap-2.1.30-r1 |
64 |
+ dev-libs/cyrus-sasl |
65 |
+ ) |
66 |
+ sys-libs/zlib" |
67 |
+RDEPEND="${DEPEND} |
68 |
+ selinux? ( sec-policy/selinux-sudo ) |
69 |
+ ldap? ( dev-lang/perl ) |
70 |
+ pam? ( sys-auth/pambase ) |
71 |
+ >=app-misc/editor-wrapper-3 |
72 |
+ virtual/editor |
73 |
+ sendmail? ( virtual/mta )" |
74 |
+DEPEND="${DEPEND} |
75 |
+ sys-devel/bison" |
76 |
+ |
77 |
+S=${WORKDIR}/${MY_P} |
78 |
+ |
79 |
+REQUIRED_USE="pam? ( !skey ) skey? ( !pam )" |
80 |
+ |
81 |
+MAKEOPTS+=" SAMPLES=" |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
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 |
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 |
+ |
179 |
+ insinto /etc/openldap/schema |
180 |
+ newins doc/schema.OpenLDAP sudo.schema |
181 |
+ fi |
182 |
+ |
183 |
+ pamd_mimic system-auth sudo auth account session |
184 |
+ |
185 |
+ keepdir /var/db/sudo |
186 |
+ fperms 0700 /var/db/sudo |
187 |
+ |
188 |
+ # Don't install into /var/run as that is a tmpfs most of the time |
189 |
+ # (bug #504854) |
190 |
+ rm -rf "${D}"/var/run |
191 |
+} |
192 |
+ |
193 |
+pkg_postinst() { |
194 |
+ if use ldap ; then |
195 |
+ ewarn |
196 |
+ ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." |
197 |
+ ewarn |
198 |
+ if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then |
199 |
+ ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" |
200 |
+ ewarn "configured in /etc/nsswitch.conf." |
201 |
+ ewarn |
202 |
+ ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" |
203 |
+ ewarn " sudoers: ldap files" |
204 |
+ ewarn |
205 |
+ fi |
206 |
+ fi |
207 |
+ if use prefix ; then |
208 |
+ ewarn |
209 |
+ ewarn "To use sudo, you need to change file ownership and permissions" |
210 |
+ ewarn "with root privileges, as follows:" |
211 |
+ ewarn |
212 |
+ ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" |
213 |
+ ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" |
214 |
+ ewarn " # chown root:root ${EPREFIX}/etc/sudoers" |
215 |
+ ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" |
216 |
+ ewarn " # chown root:root ${EPREFIX}/var/db/sudo" |
217 |
+ ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" |
218 |
+ ewarn |
219 |
+ fi |
220 |
+ |
221 |
+ elog "To use the -A (askpass) option, you need to install a compatible" |
222 |
+ elog "password program from the following list. Starred packages will" |
223 |
+ elog "automatically register for the use with sudo (but will not force" |
224 |
+ elog "the -A option):" |
225 |
+ elog "" |
226 |
+ elog " [*] net-misc/ssh-askpass-fullscreen" |
227 |
+ elog " net-misc/x11-ssh-askpass" |
228 |
+ elog "" |
229 |
+ elog "You can override the choice by setting the SUDO_ASKPASS environmnent" |
230 |
+ elog "variable to the program you want to use." |
231 |
+} |