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: Tue, 11 Oct 2016 20:39:22
Message-Id: 1476218337.a5a80750f6244aaff0aa01cee7104cb6ad38968c.dolsen@gentoo
1 commit: a5a80750f6244aaff0aa01cee7104cb6ad38968c
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 11 20:38:20 2016 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 11 20:38:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5a80750
7
8 sys-apps/portage: Revert dropping of the 2.2.26 release due to sparc keyword
9
10 Package-Manager: portage-2.3.2
11
12 sys-apps/portage/Manifest | 1 +
13 sys-apps/portage/portage-2.2.26.ebuild | 366 +++++++++++++++++++++++++++++++++
14 2 files changed, 367 insertions(+)
15
16 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
17 index 47bb852..79d06e6 100644
18 --- a/sys-apps/portage/Manifest
19 +++ b/sys-apps/portage/Manifest
20 @@ -1,3 +1,4 @@
21 +DIST portage-2.2.26.tar.bz2 977277 SHA256 7f57aa704c58ea47f031f177203dc7b335e01e7ec1e809437ea9e46e3f9263e5 SHA512 fd1a5e5d028d52ba82bbeb7f87bf331d0c1d8c7f5a3bd450c668dd742e99185b6d2b21944f5d7788fe941c99736744b08157ca30145f0964ea60a7c2c435d601 WHIRLPOOL 0469f4c5609146c57eae4baeb8488b95c04f336a5511460ee44d15746339fd43a7c2d61b58528845d77a6a0b21e46c2afad19a9f05e94ac8dc6180032d71f298
22 DIST portage-2.2.28.tar.bz2 969138 SHA256 da8148a1a9275c87f535679e41b1bb3a1380ba0f903b80510017517e4c5229d0 SHA512 d21bf7e7dcc0a779a13df6a959e5d4291492fce2a5525b67e9a4705888021f9c08b8d78cd32b2eb930ac5428c40383e4e46da5a7b1ed5c9c9c42314c0f1c6a0b WHIRLPOOL 1b9584b0243b46c70d0778aad57df2d3ea99e19f243280e542c29e6fed0634b72de6b203a3c296c2977d1a6e5e5250b910574176c692d2c7c27c0938528bb43d
23 DIST portage-2.3.0.tar.bz2 907500 SHA256 1fbed03f78587c80f5afd36b57d7ac085ed5e5b2cc19fea63fc8a43a477e4067 SHA512 85d15a234e446677dc3458de8dacaa0d91164b190c59f8002ff98dc27a9ad699cba6c4f871ac785ba6116ed53f1f3530ec3ed662ce7f4b3e8c49380b4b206074 WHIRLPOOL 979a7fc61a65dca790a077d4839fbbb22fc8ef31ccbe534b12b87c699a25a1930586dd6ddfb9013d57a71c03ed8d976612ea15e9dc3541aff0b67e3d604a5be2
24 DIST portage-2.3.1.tar.bz2 918411 SHA256 a3c5ee98791c579687ad5ec6a7882a6b6a486a54c14d1bc73ccc9a79b4a507e9 SHA512 75a713cfa077ac271ad7fad0a48bbc923beedd2ec47000602576297fabae2de47ee69e7e6d52e02c87f9ba5d9e5b27c10fa9be7b308f72c6dcc8e7f6c321f2c6 WHIRLPOOL 4ee7942d73e8e5b977d0260b568d31d0b49387787f7ffa2e77d4ec49e00b3e67c54506840be463cb5a6da070683013192f46bb47df1df1a328457de1796d05c0
25
26 diff --git a/sys-apps/portage/portage-2.2.26.ebuild b/sys-apps/portage/portage-2.2.26.ebuild
27 new file mode 100644
28 index 00000000..f979014
29 --- /dev/null
30 +++ b/sys-apps/portage/portage-2.2.26.ebuild
31 @@ -0,0 +1,366 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +
38 +PYTHON_COMPAT=(
39 + pypy
40 + python3_3 python3_4 python3_5
41 + python2_7
42 +)
43 +PYTHON_REQ_USE='bzip2(+)'
44 +
45 +inherit distutils-r1 multilib
46 +
47 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
48 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
49 +
50 +LICENSE="GPL-2"
51 +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
52 +SLOT="0"
53 +IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
54 +
55 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
56 + >=app-arch/tar-1.27
57 + dev-lang/python-exec:2
58 + >=sys-apps/sed-4.0.5 sys-devel/patch
59 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
60 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
61 +# Require sandbox-2.2 for bug #288863.
62 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
63 +# quite slow, so it's not considered in the dependencies as an alternative to
64 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
65 +# for now, don't pull in xattr deps for other kernels.
66 +# For whirlpool hash, require python[ssl] (bug #425046).
67 +# For compgen, require bash[readline] (bug #445576).
68 +RDEPEND="
69 + >=app-arch/tar-1.27
70 + dev-lang/python-exec:2
71 + !build? (
72 + >=sys-apps/sed-4.0.5
73 + app-shells/bash:0[readline]
74 + >=app-admin/eselect-1.2
75 + )
76 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
77 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
78 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
79 + >=app-misc/pax-utils-0.1.17
80 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
81 + xattr? ( kernel_linux? (
82 + >=sys-apps/install-xattr-0.3
83 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
84 + python2_7 pypy)
85 + ) )
86 + !<app-admin/logrotate-3.8.0"
87 +PDEPEND="
88 + !build? (
89 + >=net-misc/rsync-2.6.4
90 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
91 + )"
92 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
93 +# NOTE: FEATURES=installsources requires debugedit and rsync
94 +
95 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
96 +
97 +SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
98 +
99 +prefix_src_archives() {
100 + local x y
101 + for x in ${@}; do
102 + for y in ${SRC_ARCHIVES}; do
103 + echo ${y}/${x}
104 + done
105 + done
106 +}
107 +
108 +TARBALL_PV=${PV}
109 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
110 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
111 +
112 +pkg_setup() {
113 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
114 +}
115 +
116 +python_prepare_all() {
117 + distutils-r1_python_prepare_all
118 +
119 + if ! use ipc ; then
120 + einfo "Disabling ipc..."
121 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
122 + -i pym/_emerge/AbstractEbuildProcess.py || \
123 + die "failed to patch AbstractEbuildProcess.py"
124 + fi
125 +
126 + if use xattr && use kernel_linux ; then
127 + einfo "Adding FEATURES=xattr to make.globals ..."
128 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
129 + || die "failed to append to make.globals"
130 + fi
131 +
132 + if [[ -n ${EPREFIX} ]] ; then
133 + einfo "Setting portage.const.EPREFIX ..."
134 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
135 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
136 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
137 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
138 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
139 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
140 + -i pym/portage/const.py || \
141 + die "Failed to patch portage.const.EPREFIX"
142 +
143 + einfo "Prefixing shebangs ..."
144 + while read -r -d $'\0' ; do
145 + local shebang=$(head -n1 "$REPLY")
146 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
147 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
148 + die "sed failed"
149 + fi
150 + done < <(find . -type f -print0)
151 +
152 + einfo "Adjusting make.globals ..."
153 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
154 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
155 + -i cnf/make.globals || die "sed failed"
156 +
157 + einfo "Adjusting repos.conf ..."
158 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
159 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
160 + -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
161 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
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 + einfo ""
390 + einfo "This release of portage contains the new repoman code base"
391 + einfo "This code base is still being developed. So its API's are"
392 + einfo "not to be considered stable and are subject to change."
393 + einfo "The code released has been tested and considered ready for use."
394 + einfo "This however does not guarantee it to be completely bug free."
395 + einfo "Please report any bugs you may encounter."
396 + einfo ""
397 +}