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