Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/
Date: Sat, 20 Apr 2019 23:27:52
Message-Id: 1555649217.0c25fce6a579216092e321b33ca7d529df59eb56.zmedico@gentoo
1 commit: 0c25fce6a579216092e321b33ca7d529df59eb56
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 19 04:43:12 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 19 04:46:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c25fce6
7
8 sys-apps/portage: version bump to 2.3.64
9
10 Bug 378603 - New (council approved) default locations for the Gentoo
11 repository, distfiles, and binary packages (does not apply to installed
12 systems using the old defaults):
13
14 /usr/portage -> /var/db/repos/gentoo
15 /usr/portage/distfiles -> /var/cache/distfiles
16 /usr/portage/packages -> /var/cache/binpkgs
17
18 Bug: https://bugs.gentoo.org/378603
19 Bug: https://bugs.gentoo.org/683434
20 Package-Manager: Portage-2.3.64, Repoman-2.3.12
21 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
22
23 sys-apps/portage/Manifest | 1 +
24 sys-apps/portage/portage-2.3.64.ebuild | 258 +++++++++++++++++++++++++++++++++
25 2 files changed, 259 insertions(+)
26
27 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
28 index 12caa2c57d3..9230aecfddd 100644
29 --- a/sys-apps/portage/Manifest
30 +++ b/sys-apps/portage/Manifest
31 @@ -1,2 +1,3 @@
32 DIST portage-2.3.62.tar.bz2 1021442 BLAKE2B 37d5dab0e678ced78e0ff4dc9907af3d20370a4b0f52cea9118be3d06bb14e24fe6597d86c9bbd9d3ed2fc51f9e031d4e9ba84f354b945f7a399da3cbb95d74a SHA512 d4eca7e70573aae07a0522b4bf361191fded00fa02c5e6d8f70cf72c19c4dcfa9be7169a267afdc58cdd0a8ee333774a7779ac08dee3490aa8e8a1ebd39deb49
33 DIST portage-2.3.63.tar.bz2 1021603 BLAKE2B 8a9fe026e92880c2fe42ddd8441c3436d940c918fdd89a7d6e46c0bf4f3ec1a6f948d9821ba6de092d289230c6395dee5e37526d157d8e7cbd9d43ce2b27acf6 SHA512 27fbd09b586bb9743700e90d41ce94ed22aaf64b465755978c8d6489417ff3ab88d2ee400944c983f095f2aaff9490910006af9d2645d259ac0d3fc89bc00a19
34 +DIST portage-2.3.64.tar.bz2 1021942 BLAKE2B 592146bf3fc39cf2a4de72d55c59fe6fb0f557bd2dd63d662925753d16435719255f682b2c1fbd294ba54f1935a44a5f4bc0ef8a8bc00980791dc1dc7046af5d SHA512 847d558dc33960f3989b6676a2569bc8c600864f5024b82db77fd45e31215700c25759168d7aa46bd14773c37bd363c349ee8b95250f1db3630d70e7fbff5da7
35
36 diff --git a/sys-apps/portage/portage-2.3.64.ebuild b/sys-apps/portage/portage-2.3.64.ebuild
37 new file mode 100644
38 index 00000000000..a2c63d7c6ef
39 --- /dev/null
40 +++ b/sys-apps/portage/portage-2.3.64.ebuild
41 @@ -0,0 +1,258 @@
42 +# Copyright 1999-2019 Gentoo Authors
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=5
46 +
47 +PYTHON_COMPAT=(
48 + pypy
49 + python3_4 python3_5 python3_6 python3_7
50 + python2_7
51 +)
52 +PYTHON_REQ_USE='bzip2(+),threads(+)'
53 +
54 +inherit distutils-r1 epatch linux-info systemd prefix
55 +
56 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
57 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
58 +
59 +LICENSE="GPL-2"
60 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd"
61 +SLOT="0"
62 +IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
63 +
64 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
65 + >=app-arch/tar-1.27
66 + dev-lang/python-exec:2
67 + >=sys-apps/sed-4.0.5 sys-devel/patch
68 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
69 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
70 +# Require sandbox-2.2 for bug #288863.
71 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
72 +# quite slow, so it's not considered in the dependencies as an alternative to
73 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
74 +# for now, don't pull in xattr deps for other kernels.
75 +# For whirlpool hash, require python[ssl] (bug #425046).
76 +# For compgen, require bash[readline] (bug #445576).
77 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
78 +# the executable.
79 +RDEPEND="
80 + >=app-arch/tar-1.27
81 + dev-lang/python-exec:2
82 + !build? (
83 + >=sys-apps/sed-4.0.5
84 + app-shells/bash:0[readline]
85 + >=app-admin/eselect-1.2
86 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
87 + python{2_7,3_4,3_5} pypy)
88 + rsync-verify? (
89 + >=app-portage/gemato-14[${PYTHON_USEDEP}]
90 + >=app-crypt/openpgp-keys-gentoo-release-20180706
91 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
92 + )
93 + )
94 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
95 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
96 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
97 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
98 + kernel_linux? ( sys-apps/util-linux )
99 + >=app-misc/pax-utils-0.1.17
100 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
101 + xattr? ( kernel_linux? (
102 + >=sys-apps/install-xattr-0.3
103 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
104 + python2_7 pypy)
105 + ) )
106 + !<app-admin/logrotate-3.8.0
107 + !<app-portage/repoman-2.3.10"
108 +PDEPEND="
109 + !build? (
110 + >=net-misc/rsync-2.6.4
111 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
112 + )"
113 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
114 +# NOTE: FEATURES=installsources requires debugedit and rsync
115 +
116 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
117 +
118 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
119 +
120 +prefix_src_archives() {
121 + local x y
122 + for x in ${@}; do
123 + for y in ${SRC_ARCHIVES}; do
124 + echo ${y}/${x}
125 + done
126 + done
127 +}
128 +
129 +TARBALL_PV=${PV}
130 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
131 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
132 +
133 +pkg_pretend() {
134 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS"
135 +
136 + check_extra_config
137 +}
138 +
139 +pkg_setup() {
140 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
141 +}
142 +
143 +python_prepare_all() {
144 + distutils-r1_python_prepare_all
145 +
146 + if use gentoo-dev; then
147 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
148 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
149 + -i lib/_emerge/create_depgraph_params.py || \
150 + die "failed to patch create_depgraph_params.py"
151 +
152 + einfo "Enabling additional FEATURES for gentoo-dev..."
153 + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \
154 + >> cnf/make.globals || die
155 + fi
156 +
157 + if use native-extensions; then
158 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
159 + setup.cfg || die
160 + fi
161 +
162 + if ! use ipc ; then
163 + einfo "Disabling ipc..."
164 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
165 + -i lib/_emerge/AbstractEbuildProcess.py || \
166 + die "failed to patch AbstractEbuildProcess.py"
167 + fi
168 +
169 + if use xattr && use kernel_linux ; then
170 + einfo "Adding FEATURES=xattr to make.globals ..."
171 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
172 + || die "failed to append to make.globals"
173 + fi
174 +
175 + if use build || ! use rsync-verify; then
176 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
177 + -i cnf/repos.conf || die "sed failed"
178 + fi
179 +
180 + if [[ -n ${EPREFIX} ]] ; then
181 + einfo "Setting portage.const.EPREFIX ..."
182 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
183 + -w "/_BINARY/" lib/portage/const.py
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 "Adjusting make.globals, repos.conf and etc-update ..."
195 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
196 +
197 + if use prefix-guest ; then
198 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
199 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
200 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
201 + -i cnf/repos.conf || die "sed failed"
202 + fi
203 +
204 + einfo "Adding FEATURES=force-prefix to make.globals ..."
205 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
206 + || die "failed to append to make.globals"
207 + fi
208 +
209 + cd "${S}/cnf" || die
210 + if [ -f "make.conf.example.${ARCH}".diff ]; then
211 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
212 + die "Failed to patch make.conf.example"
213 + else
214 + eerror ""
215 + eerror "Portage does not have an arch-specific configuration for this arch."
216 + eerror "Please notify the arch maintainer about this issue. Using generic."
217 + eerror ""
218 + fi
219 +}
220 +
221 +python_compile_all() {
222 + local targets=()
223 + use doc && targets+=( docbook )
224 + use epydoc && targets+=( epydoc )
225 +
226 + if [[ ${targets[@]} ]]; then
227 + esetup.py "${targets[@]}"
228 + fi
229 +}
230 +
231 +python_test() {
232 + esetup.py test
233 +}
234 +
235 +python_install() {
236 + # Install sbin scripts to bindir for python-exec linking
237 + # they will be relocated in pkg_preinst()
238 + distutils-r1_python_install \
239 + --system-prefix="${EPREFIX}/usr" \
240 + --bindir="$(python_get_scriptdir)" \
241 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
242 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
243 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
244 + --sbindir="$(python_get_scriptdir)" \
245 + --sysconfdir="${EPREFIX}/etc" \
246 + "${@}"
247 +}
248 +
249 +python_install_all() {
250 + distutils-r1_python_install_all
251 +
252 + local targets=()
253 + use doc && targets+=(
254 + install_docbook
255 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
256 + )
257 + use epydoc && targets+=(
258 + install_epydoc
259 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
260 + )
261 +
262 + # install docs
263 + if [[ ${targets[@]} ]]; then
264 + esetup.py "${targets[@]}"
265 + fi
266 +
267 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
268 +
269 + # Due to distutils/python-exec limitations
270 + # these must be installed to /usr/bin.
271 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
272 + einfo "Moving admin scripts to the correct directory"
273 + dodir /usr/sbin
274 + for target in ${sbin_relocations}; do
275 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
276 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
277 + done
278 +}
279 +
280 +pkg_preinst() {
281 + python_setup
282 + python_export PYTHON_SITEDIR
283 + env -u DISTDIR \
284 + -u PORTAGE_OVERRIDE_EPREFIX \
285 + -u PORTAGE_REPOSITORIES \
286 + -u PORTDIR \
287 + -u PORTDIR_OVERLAY \
288 + PYTHONPATH="${ED%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \
289 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
290 +
291 + # elog dir must exist to avoid logrotate error for bug #415911.
292 + # This code runs in preinst in order to bypass the mapping of
293 + # portage:portage to root:root which happens after src_install.
294 + keepdir /var/log/portage/elog
295 + # This is allowed to fail if the user/group are invalid for prefix users.
296 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
297 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
298 + fi
299 +}