Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/portage/
Date: Thu, 28 Feb 2019 12:50:22
Message-Id: 1551358207.80f77b5c973849c2e0599bcde99b5af203e68b68.grobian@gentoo
1 commit: 80f77b5c973849c2e0599bcde99b5af203e68b68
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 28 12:50:07 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 28 12:50:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=80f77b5c
7
8 sys-apps/portage: version bump
9
10 Package-Manager: Portage-2.3.62-prefix, Repoman-2.3.12
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 sys-apps/portage/Manifest | 1 +
14 sys-apps/portage/portage-2.3.62.ebuild | 272 +++++++++++++++++++++++++++++++++
15 2 files changed, 273 insertions(+)
16
17 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
18 index e314960b4d..3fa7fc897d 100644
19 --- a/sys-apps/portage/Manifest
20 +++ b/sys-apps/portage/Manifest
21 @@ -1,2 +1,3 @@
22 DIST prefix-portage-2.3.52.2.tar.bz2 1258301 BLAKE2B 1334532e50df0c35a4694242f091395721ff8c6c5cd525c32d0b26cf11b207b17f42198ded88a49d7f2599fa3ad34feef0de2ac4219efe806e24913cb061a236 SHA512 d5f199b6c7545f49a8faa3ccdfcdecdb4bc3723513dad2c683db9d3a89a662c474aea0c95fead521f7dc8db71dd38cc55ac0cac9973710364032d8fc7877fbc2
23 DIST prefix-portage-2.3.55.1.tar.bz2 1240409 BLAKE2B db6d62768382f93fbe933ba1dcbe8ac203529d3fcbe3e53063bdd9e5b67ec7ab10e99fcd8a2ad0d83494fa838b8b2e17f16ad16f45cc9dc4cf9801793babffe7 SHA512 11a6c80edd9e4a22e2996ad02ea7d9c5e88f074526d0350d0944d70c31087db11a1357026b2e2987e40e6f9d155524e5cae63aff7348a5692c5e7dcf16ac7a1b
24 +DIST prefix-portage-2.3.62.tar.bz2 1274936 BLAKE2B e6e9af5626b1d75b5ff56cbd33324eae2f3d8bbc0aa9c1fe8a7b622b85770234b73d8394aa26af90f96bd9ff0906edb97814effdc6263b3d1f9c1e7ad8241b3c SHA512 ebc6ccd07daed60a620cd7fe68227d7ac9d48c65dafed5e4285f30c5c25ce43e8c5683ffa87cbf863a2fcfb547cd9cd34b1fe1aec875a6416cad7f19a135ef20
25
26 diff --git a/sys-apps/portage/portage-2.3.62.ebuild b/sys-apps/portage/portage-2.3.62.ebuild
27 new file mode 100644
28 index 0000000000..9528084055
29 --- /dev/null
30 +++ b/sys-apps/portage/portage-2.3.62.ebuild
31 @@ -0,0 +1,272 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=5
36 +
37 +PYTHON_COMPAT=(
38 + pypy
39 + python3_4 python3_5 python3_6 python3_7
40 + python2_7
41 +)
42 +PYTHON_REQ_USE='bzip2(+),threads(+)'
43 +
44 +inherit eutils distutils-r1 multilib
45 +
46 +DESCRIPTION="Portage package manager used in Gentoo Prefix"
47 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
48 +LICENSE="GPL-2"
49 +KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
50 +SLOT="0"
51 +IUSE="build doc epydoc +ipc +native-extensions selinux xattr prefix-chaining"
52 +
53 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
54 + >=app-arch/tar-1.27
55 + dev-lang/python-exec:2
56 + >=sys-apps/sed-4.0.5 sys-devel/patch
57 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
58 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
59 +# Require sandbox-2.2 for bug #288863.
60 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
61 +# quite slow, so it's not considered in the dependencies as an alternative to
62 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
63 +# for now, don't pull in xattr deps for other kernels.
64 +# For whirlpool hash, require python[ssl] (bug #425046).
65 +# For compgen, require bash[readline] (bug #445576).
66 +RDEPEND="
67 + >=app-arch/tar-1.27
68 + dev-lang/python-exec:2
69 + !build? (
70 + >=sys-apps/sed-4.0.5
71 + app-shells/bash:0[readline]
72 + >=app-admin/eselect-1.2
73 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
74 + python{2_7,3_4,3_5} pypy)
75 + )
76 + elibc_FreeBSD? ( !prefix? ( sys-freebsd/freebsd-bin ) )
77 + elibc_glibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
78 + elibc_uclibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) )
79 + kernel_linux? ( >=app-misc/pax-utils-0.1.17 )
80 + kernel_SunOS? ( >=app-misc/pax-utils-0.1.17 )
81 + kernel_FreeBSD? ( >=app-misc/pax-utils-0.1.17 )
82 + kernel_Darwin? ( >=app-misc/pax-utils-0.1.18 )
83 + kernel_AIX? ( >=sys-apps/aix-miscutils-0.1.1634 )
84 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
85 + xattr? ( kernel_linux? (
86 + >=sys-apps/install-xattr-0.3
87 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
88 + python2_7 pypy)
89 + ) )
90 + !<app-admin/logrotate-3.8.0"
91 +PDEPEND="
92 + !build? (
93 + >=net-misc/rsync-2.6.4
94 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
95 + )"
96 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
97 +# NOTE: FEATURES=installsources requires debugedit and rsync
98 +
99 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
100 +
101 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives https://dev.gentoo.org/~grobian/distfiles"
102 +
103 +prefix_src_archives() {
104 + local x y
105 + for x in ${@}; do
106 + for y in ${SRC_ARCHIVES}; do
107 + echo ${y}/${x}
108 + done
109 + done
110 +}
111 +
112 +TARBALL_PV=${PV}
113 +SRC_URI="mirror://gentoo/prefix-${PN}-${TARBALL_PV}.tar.bz2
114 + $(prefix_src_archives prefix-${PN}-${TARBALL_PV}.tar.bz2)"
115 +
116 +S="${WORKDIR}"/prefix-${PN}-${TARBALL_PV}
117 +
118 +pkg_setup() {
119 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
120 +}
121 +
122 +python_prepare_all() {
123 + distutils-r1_python_prepare_all
124 +
125 + epatch "${FILESDIR}"/${PN}-2.3.45-ebuildshell.patch # 155161
126 + use prefix-chaining && # maybe useful even with stacked-prefix
127 + epatch "${FILESDIR}"/${PN}-2.3.40-prefix-chaining.patch
128 +
129 + if use native-extensions; then
130 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
131 + setup.cfg || die
132 + fi
133 +
134 + if ! use ipc ; then
135 + einfo "Disabling ipc..."
136 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
137 + -i lib/_emerge/AbstractEbuildProcess.py || \
138 + die "failed to patch AbstractEbuildProcess.py"
139 + fi
140 +
141 + if use xattr && use kernel_linux ; then
142 + einfo "Adding FEATURES=xattr to make.globals ..."
143 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
144 + || die "failed to append to make.globals"
145 + fi
146 +
147 + if [[ -n ${EPREFIX} ]] ; then
148 + # PREFIX LOCAL: only hack const_autotool
149 + local extrapath="/usr/sbin:/usr/bin:/sbin:/bin"
150 + # ok, we can't rely on PORTAGE_ROOT_USER being there yet, as people
151 + # tend not to update that often, as long as we are a separate ebuild
152 + # we can assume when unset, it's time for some older trick
153 + if [[ -z ${PORTAGE_ROOT_USER} ]] ; then
154 + PORTAGE_ROOT_USER=$(python -c 'from portage.const import rootuser; print rootuser')
155 + fi
156 + # We need to probe for bash in the Prefix, because it may not
157 + # exist, in which case we fall back to the currently in use
158 + # bash. This logic is necessary in particular during bootstrap,
159 + # where we pull ourselves out of a temporary place with tools
160 + local bash="${EPREFIX}/bin/bash"
161 + [[ ! -x ${bash} ]] && bash=${BASH}
162 +
163 + einfo "Adjusting sources for ${EPREFIX}"
164 + find . -type f -exec \
165 + sed -e "s|@PORTAGE_EPREFIX@|${EPREFIX}|" \
166 + -e "s|@PORTAGE_MV@|$(type -P mv)|" \
167 + -e "s|@PORTAGE_BASH@|${bash}|" \
168 + -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|" \
169 + -e "s|@EXTRA_PATH@|${extrapath}|" \
170 + -e "s|@portagegroup@|${PORTAGE_GROUP:-portage}|" \
171 + -e "s|@portageuser@|${PORTAGE_USER:-portage}|" \
172 + -e "s|@rootuser@|${PORTAGE_ROOT_USER:-root}|" \
173 + -e "s|@rootuid@|$(id -u ${PORTAGE_ROOT_USER:-root})|" \
174 + -e "s|@rootgid@|$(id -g ${PORTAGE_ROOT_USER:-root})|" \
175 + -e "s|@sysconfdir@|${EPREFIX}/etc|" \
176 + -i '{}' + || \
177 + die "Failed to patch sources"
178 + # We don't need the below, since setup.py deals with this (and
179 + # more) so we don't have to make this correct
180 + # -e "s|@PORTAGE_BASE@|${EPREFIX}/usr/lib/portage/${EPYTHON}|" \
181 +
182 + # remove Makefiles, or else they will get installed
183 + find . -name "Makefile.*" -delete
184 +
185 + einfo "Prefixing shebangs ..."
186 + while read -r -d $'\0' ; do
187 + local shebang=$(head -n1 "$REPLY")
188 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
189 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
190 + die "sed failed"
191 + fi
192 + done < <(find . -type f -print0)
193 +
194 + einfo "Setting gentoo_prefix as reponame for emerge-webrsync"
195 + sed -i -e 's/repo_name=gentoo/repo_name=gentoo_prefix/' \
196 + bin/emerge-webrsync || die
197 +
198 + einfo "Making absent gemato non-fatal"
199 + sed -i -e '/exitcode = 127/d' \
200 + lib/portage/sync/modules/rsync/rsync.py || die
201 +
202 + if [[ ${CHOST} == powerpc*-darwin* ]] ; then
203 + # asyncio triggers some python bug, not worth fixing on
204 + # ppc-macos, bug #656830
205 + sed -i -e '/^_asyncio_enabled/s/=.*$/= False/' \
206 + lib/portage/util/_eventloop/global_event_loop.py || die
207 + fi
208 + # END PREFIX LOCAL
209 + fi
210 +
211 + # PREFIX LOCAL: make.conf is written by bootstrap-prefix.sh
212 + if use !prefix ; then
213 + cd "${S}/cnf" || die
214 + if [ -f "make.conf.example.${ARCH}".diff ]; then
215 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
216 + die "Failed to patch make.conf.example"
217 + else
218 + eerror ""
219 + eerror "Portage does not have an arch-specific configuration for this arch."
220 + eerror "Please notify the arch maintainer about this issue. Using generic."
221 + eerror ""
222 + fi
223 + fi
224 +}
225 +
226 +python_compile_all() {
227 + local targets=()
228 + use doc && targets+=( docbook )
229 + use epydoc && targets+=( epydoc )
230 +
231 + if [[ ${targets[@]} ]]; then
232 + esetup.py "${targets[@]}"
233 + fi
234 +}
235 +
236 +python_test() {
237 + esetup.py test
238 +}
239 +
240 +python_install() {
241 + # Install sbin scripts to bindir for python-exec linking
242 + # they will be relocated in pkg_preinst()
243 + distutils-r1_python_install \
244 + --system-prefix="${EPREFIX}/usr" \
245 + --bindir="$(python_get_scriptdir)" \
246 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
247 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
248 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
249 + --sbindir="$(python_get_scriptdir)" \
250 + --sysconfdir="${EPREFIX}/etc" \
251 + "${@}"
252 +}
253 +
254 +python_install_all() {
255 + distutils-r1_python_install_all
256 +
257 + local targets=()
258 + use doc && targets+=(
259 + install_docbook
260 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
261 + )
262 + use epydoc && targets+=(
263 + install_epydoc
264 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
265 + )
266 +
267 + # install docs
268 + if [[ ${targets[@]} ]]; then
269 + esetup.py "${targets[@]}"
270 + fi
271 +
272 + # Due to distutils/python-exec limitations
273 + # these must be installed to /usr/bin.
274 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
275 + einfo "Moving admin scripts to the correct directory"
276 + dodir /usr/sbin
277 + for target in ${sbin_relocations}; do
278 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
279 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
280 + done
281 +}
282 +
283 +pkg_preinst() {
284 + # comment out sanity test until it is fixed to work
285 + # with the new PORTAGE_PYM_PATH
286 + #if [[ $ROOT == / ]] ; then
287 + ## Run some minimal tests as a sanity check.
288 + #local test_runner=$(find "${ED}" -name runTests)
289 + #if [[ -n $test_runner && -x $test_runner ]] ; then
290 + #einfo "Running preinst sanity tests..."
291 + #"$test_runner" || die "preinst sanity tests failed"
292 + #fi
293 + #fi
294 +
295 + # elog dir must exist to avoid logrotate error for bug #415911.
296 + # This code runs in preinst in order to bypass the mapping of
297 + # portage:portage to root:root which happens after src_install.
298 + keepdir /var/log/portage/elog
299 + # This is allowed to fail if the user/group are invalid for prefix users.
300 + if chown ${PORTAGE_USER}:${PORTAGE_GROUP} "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
301 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
302 + fi
303 +}