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