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