Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/
Date: Mon, 21 Sep 2015 23:36:00
Message-Id: 1442878499.61de333386140e055a58496c3c2fb1ab99d0513b.dolsen@gentoo
1 commit: 61de333386140e055a58496c3c2fb1ab99d0513b
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 21 23:33:37 2015 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 21 23:34:59 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61de3333
7
8 sys-apps/portage: New version: 2.2.21
9
10 Fixes bugs 550006, 550324, 550898, 550906, 552340, 554084, 554108,
11 554578, 554928, 556172, 556464, 555698, 556764, 557426, 557962,
12 558322, 557192, 559044, 296085, 559122, 560466.
13
14 Package-Manager: portage-2.2.21
15
16 sys-apps/portage/Manifest | 1 +
17 sys-apps/portage/portage-2.2.21.ebuild | 365 +++++++++++++++++++++++++++++++++
18 2 files changed, 366 insertions(+)
19
20 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
21 index c456e13..d3a22c4 100644
22 --- a/sys-apps/portage/Manifest
23 +++ b/sys-apps/portage/Manifest
24 @@ -2,4 +2,5 @@ DIST portage-2.2.14.tar.bz2 896674 SHA256 8dd65971e0f1c31dca922b0f7be06e622aabbe
25 DIST portage-2.2.18.tar.bz2 942561 SHA256 e0d54f2fbcdc8b5fce716475183fa6e889b6fa8178c92d65a850df73f1636560 SHA512 be4f95bc04a61cdb371fc66a03d2183961bfd458e9b2b89cf8cab8c9e70bde4119be266177d947e31429627609ed75a75c21abfe4b674ca529632d5728e8e8a6 WHIRLPOOL f334bf5198d2214de557a046ed3217e23d48d8f8d7d64fb0bd2611dd5c8725139eaf7d1e1065f822d8816f3979e86d6a6f8df4d2f4605df0b5c157d6bbf09a6d
26 DIST portage-2.2.20.1.tar.bz2 950298 SHA256 84dd3ed1d9fd0a3336e956d057590c75834a906ae62a450411232fe5a842475c SHA512 5f7373da20d448059e8fdc8a3593eaca780be3184f0494bac66f5eea7c33d00dd61b9e74cbe9a52413f08cef29d426ed8751e20e16be09178468c18d77a6ae2e WHIRLPOOL 99643ce0ab74c5df64fb5239948c6102bc39847ff88eaf210c069c0c9587c1e8bdd1a032a7e61c1225b6113645387861d439e9c4f103df4d0f042b73e1afc328
27 DIST portage-2.2.20.tar.bz2 950293 SHA256 483ce0b20960840f6499452ca4ef7df36fde08f835dcadf3cdd118c1ff7207a4 SHA512 fffb43a4c25a70cae071246fde7e379107535e607b9e8dd9fb513315a10750db92209bb436f532930a44cac06ba43aade06a7c2b0a1d675fd816968ba0fce7ae WHIRLPOOL aa1e560007cdafebd2bf56964d61e55a91fef4be5cd9bc50560891140287f6827ecda9d99e31ceb4e5a64691863fde325b51594cfdcfe88eb260fba47dad5fb9
28 +DIST portage-2.2.21.tar.bz2 962238 SHA256 6dbaedfb677d450f1033650059b658d0e183460e28cd7e91aa2161bfb4e52672 SHA512 2df19d2818e24c0b33f43f3ce12da0cdcc44c8d6cae16ba914dba84f22bab8bdde422dec98a9253d1577fc1438649d6b640a00dfe862e85e10476abe15e8db33 WHIRLPOOL 84a66a8ea8d3ef352f6108edd31790e7513c906ecaba7d54338e73d3ef8d2c7572eb01611d483ad88093ed1c26cd637c7441f4c5bd9f84f41f0478dfd3a96b89
29 DIST portage-2.2.8.tar.bz2 874672 SHA256 c1074e01173df5384e003598dbc5f64f09e92f83fd26faab2f88f9f0bc64aa7e SHA512 acc47d94ff8c08e5a7bf2d4c4e600863430dd1e7d0bb8b4254d6477a498933cae663db84debf9487d2243c2cba689629ef8e8b6cf108e10d40e89e8e8d7e1257 WHIRLPOOL d54290ede8d3d85e5211cda7e86ed740178121ef2f47cf0858c27941d8679d29c11445befff962986d40a47ded50d0d4654de19e7d4aef3fdf2546655a0d6fe2
30
31 diff --git a/sys-apps/portage/portage-2.2.21.ebuild b/sys-apps/portage/portage-2.2.21.ebuild
32 new file mode 100644
33 index 0000000..42e1a4a
34 --- /dev/null
35 +++ b/sys-apps/portage/portage-2.2.21.ebuild
36 @@ -0,0 +1,365 @@
37 +# Copyright 1999-2015 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=5
42 +
43 +PYTHON_COMPAT=(
44 + pypy
45 + python3_3 python3_4
46 + python2_7
47 +)
48 +# Note: substituted below
49 +PYTHON_REQ_USE='bzip2(+)'
50 +
51 +inherit distutils-r1 multilib
52 +
53 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
54 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
55 +
56 +LICENSE="GPL-2"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
58 +SLOT="0"
59 +IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
60 +
61 +DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} )
62 + >=app-arch/tar-1.27
63 + dev-lang/python-exec:2
64 + >=sys-apps/sed-4.0.5 sys-devel/patch
65 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
66 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
67 +# Require sandbox-2.2 for bug #288863.
68 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
69 +# quite slow, so it's not considered in the dependencies as an alternative to
70 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
71 +# for now, don't pull in xattr deps for other kernels.
72 +# For whirlpool hash, require python[ssl] (bug #425046).
73 +# For compgen, require bash[readline] (bug #445576).
74 +RDEPEND="
75 + >=app-arch/tar-1.27
76 + dev-lang/python-exec:2
77 + !build? (
78 + >=sys-apps/sed-4.0.5
79 + app-shells/bash:0[readline]
80 + >=app-admin/eselect-1.2
81 + )
82 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
83 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
84 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
85 + >=app-misc/pax-utils-0.1.17
86 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
87 + xattr? ( kernel_linux? (
88 + >=sys-apps/install-xattr-0.3
89 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
90 + python2_7 pypy)
91 + ) )
92 + !<app-admin/logrotate-3.8.0"
93 +PDEPEND="
94 + !build? (
95 + >=net-misc/rsync-2.6.4
96 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
97 + )"
98 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
99 +# NOTE: FEATURES=installsources requires debugedit and rsync
100 +
101 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
102 +
103 +SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
104 +
105 +prefix_src_archives() {
106 + local x y
107 + for x in ${@}; do
108 + for y in ${SRC_ARCHIVES}; do
109 + echo ${y}/${x}
110 + done
111 + done
112 +}
113 +
114 +TARBALL_PV=${PV}
115 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
116 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
117 +
118 +python_prepare_all() {
119 + distutils-r1_python_prepare_all
120 +
121 + if ! use ipc ; then
122 + einfo "Disabling ipc..."
123 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
124 + -i pym/_emerge/AbstractEbuildProcess.py || \
125 + die "failed to patch AbstractEbuildProcess.py"
126 + fi
127 +
128 + if use xattr && use kernel_linux ; then
129 + einfo "Adding FEATURES=xattr to make.globals ..."
130 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
131 + || die "failed to append to make.globals"
132 + fi
133 +
134 + if [[ -n ${EPREFIX} ]] ; then
135 + einfo "Setting portage.const.EPREFIX ..."
136 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
137 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
138 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
139 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
140 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
141 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
142 + -i pym/portage/const.py || \
143 + die "Failed to patch portage.const.EPREFIX"
144 +
145 + einfo "Prefixing shebangs ..."
146 + while read -r -d $'\0' ; do
147 + local shebang=$(head -n1 "$REPLY")
148 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
149 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
150 + die "sed failed"
151 + fi
152 + done < <(find . -type f -print0)
153 +
154 + einfo "Adjusting make.globals ..."
155 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
156 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
157 + -i cnf/make.globals || die "sed failed"
158 +
159 + einfo "Adjusting repos.conf ..."
160 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
161 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
162 + -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
163 + -e "s|^\(sync-uri = \).*|\\1rsync://prefix.gentooexperimental.org/gentoo-portage-prefix|" \
164 + -i cnf/repos.conf || die "sed failed"
165 +
166 + einfo "Adding FEATURES=force-prefix to make.globals ..."
167 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
168 + || die "failed to append to make.globals"
169 + fi
170 +
171 + cd "${S}/cnf" || die
172 + if [ -f "make.conf.example.${ARCH}".diff ]; then
173 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
174 + die "Failed to patch make.conf.example"
175 + else
176 + eerror ""
177 + eerror "Portage does not have an arch-specific configuration for this arch."
178 + eerror "Please notify the arch maintainer about this issue. Using generic."
179 + eerror ""
180 + fi
181 +}
182 +
183 +python_compile_all() {
184 + local targets=()
185 + use doc && targets+=( docbook )
186 + use epydoc && targets+=( epydoc )
187 +
188 + if [[ ${targets[@]} ]]; then
189 + esetup.py "${targets[@]}"
190 + fi
191 +}
192 +
193 +python_test() {
194 + esetup.py test
195 +}
196 +
197 +python_install() {
198 + # Install sbin scripts to bindir for python-exec linking
199 + # they will be relocated in pkg_preinst()
200 + distutils-r1_python_install \
201 + --system-prefix="${EPREFIX}/usr" \
202 + --bindir="$(python_get_scriptdir)" \
203 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
204 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
205 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
206 + --sbindir="$(python_get_scriptdir)" \
207 + --sysconfdir="${EPREFIX}/etc" \
208 + "${@}"
209 +}
210 +
211 +python_install_all() {
212 + distutils-r1_python_install_all
213 +
214 + local targets=()
215 + use doc && targets+=( install_docbook )
216 + use epydoc && targets+=( install_epydoc )
217 +
218 + # install docs
219 + if [[ ${targets[@]} ]]; then
220 + esetup.py "${targets[@]}"
221 + fi
222 +
223 + # Due to distutils/python-exec limitations
224 + # these must be installed to /usr/bin.
225 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
226 + einfo "Moving admin scripts to the correct directory"
227 + dodir /usr/sbin
228 + for target in ${sbin_relocations}; do
229 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
230 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
231 + done
232 +}
233 +
234 +pkg_preinst() {
235 + # comment out sanity test until it is fixed to work
236 + # with the new PORTAGE_PYM_PATH
237 + #if [[ $ROOT == / ]] ; then
238 + ## Run some minimal tests as a sanity check.
239 + #local test_runner=$(find "${ED}" -name runTests)
240 + #if [[ -n $test_runner && -x $test_runner ]] ; then
241 + #einfo "Running preinst sanity tests..."
242 + #"$test_runner" || die "preinst sanity tests failed"
243 + #fi
244 + #fi
245 +
246 + # elog dir must exist to avoid logrotate error for bug #415911.
247 + # This code runs in preinst in order to bypass the mapping of
248 + # portage:portage to root:root which happens after src_install.
249 + keepdir /var/log/portage/elog
250 + # This is allowed to fail if the user/group are invalid for prefix users.
251 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
252 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
253 + fi
254 +
255 + if has_version "<${CATEGORY}/${PN}-2.1.13" || \
256 + {
257 + has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \
258 + has_version "<${CATEGORY}/${PN}-2.2.0_alpha189"
259 + } ; then
260 + USERPRIV_UPGRADE=true
261 + USERSYNC_UPGRADE=true
262 + REPOS_CONF_UPGRADE=true
263 + REPOS_CONF_SYNC=
264 + type -P portageq >/dev/null 2>&1 && \
265 + REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC)
266 + else
267 + USERPRIV_UPGRADE=false
268 + USERSYNC_UPGRADE=false
269 + REPOS_CONF_UPGRADE=false
270 + fi
271 +}
272 +
273 +get_ownership() {
274 + case ${USERLAND} in
275 + BSD)
276 + stat -f '%Su:%Sg' "${1}"
277 + ;;
278 + *)
279 + stat -c '%U:%G' "${1}"
280 + ;;
281 + esac
282 +}
283 +
284 +new_config_protect() {
285 + # Generate a ._cfg file even if the target file
286 + # does not exist, ensuring that the user will
287 + # notice the config change.
288 + local basename=${1##*/}
289 + local dirname=${1%/*}
290 + local i=0
291 + while true ; do
292 + local filename=$(
293 + echo -n "${dirname}/._cfg"
294 + printf "%04d" ${i}
295 + echo -n "_${basename}"
296 + )
297 + [[ -e ${filename} ]] || break
298 + (( i++ ))
299 + done
300 + echo "${filename}"
301 +}
302 +
303 +pkg_postinst() {
304 +
305 + if ${REPOS_CONF_UPGRADE} ; then
306 + einfo "Generating repos.conf"
307 + local repo_name=
308 + [[ -f ${PORTDIR}/profiles/repo_name ]] && \
309 + repo_name=$(< "${PORTDIR}/profiles/repo_name")
310 + if [[ -z ${REPOS_CONF_SYNC} ]] ; then
311 + REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf")
312 + REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* }
313 + fi
314 + local sync_type=
315 + [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git
316 +
317 + if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then
318 + sync_type=cvs
319 + REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://}
320 + fi
321 +
322 + cat <<-EOF > "${T}/repos.conf"
323 + [DEFAULT]
324 + main-repo = ${repo_name:-gentoo}
325 +
326 + [${repo_name:-gentoo}]
327 + location = ${PORTDIR:-${EPREFIX}/usr/portage}
328 + sync-type = ${sync_type:-rsync}
329 + sync-uri = ${REPOS_CONF_SYNC}
330 + EOF
331 +
332 + [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf"
333 +
334 + local dest=${EROOT:-${ROOT}}etc/portage/repos.conf
335 + if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then
336 + dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf
337 + fi
338 + # Don't install the config update if the desired repos.conf directory
339 + # and config file exist, since users may accept it blindly and break
340 + # their config (bug #478726).
341 + [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \
342 + mv "${T}/repos.conf" "$(new_config_protect "${dest}")"
343 +
344 + if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then
345 + einfo "Generating make.conf PORTDIR setting for backward compatibility"
346 + for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do
347 + [[ -e ${dest} ]] && break
348 + done
349 + [[ -d ${dest} ]] && dest=${dest}/portdir.conf
350 + rm -rf "${T}/make.conf"
351 + [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf"
352 + cat <<-EOF >> "${T}/make.conf"
353 +
354 + # Set PORTDIR for backward compatibility with various tools:
355 + # gentoo-bashcomp - bug #478444
356 + # euse - bug #474574
357 + # euses and ufed - bug #478318
358 + PORTDIR="${EPREFIX}/usr/portage"
359 + EOF
360 + mkdir -p "${dest%/*}"
361 + mv "${T}/make.conf" "$(new_config_protect "${dest}")"
362 + fi
363 + fi
364 +
365 + local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}
366 +
367 + if ${USERSYNC_UPGRADE} && \
368 + [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then
369 + local ownership=$(get_ownership "${PORTDIR}")
370 + if [[ -n ${ownership} ]] ; then
371 + einfo "Adjusting PORTDIR permissions for usersync"
372 + find "${PORTDIR}" -path "${distdir%/}" -prune -o \
373 + ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \
374 + -exec chown "${ownership}" {} +
375 + fi
376 + fi
377 +
378 + # Do this last, since it could take a long time if there
379 + # are lots of live sources, and the user may be tempted
380 + # to kill emerge while it is running.
381 + if ${USERPRIV_UPGRADE} && \
382 + [[ -d ${distdir} && -w ${distdir} ]] ; then
383 + local ownership=$(get_ownership "${distdir}")
384 + if [[ ${ownership#*:} == portage ]] ; then
385 + einfo "Adjusting DISTDIR permissions for userpriv"
386 + find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \
387 + -exec chown -R portage:portage {} +
388 + fi
389 + fi
390 +
391 + einfo ""
392 + einfo "The 'websync' module has now been properly renamed to 'webrsync'"
393 + einfo "Please update your repos.conf/gentoo.conf file if needed."
394 + einfo ""
395 + einfo "This release of portage removed the new squashfs sync module "
396 + einfo "introduced in portage-2.2.19."
397 + einfo "Look for it to be released as an installable portage module soon."
398 + einfo "This will allow it to develop at it's own pace partially independant"
399 + einfo "of portage"
400 + einfo ""
401 +}