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