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, 07 Mar 2020 23:00:28
Message-Id: 1583621997.3330b6df6278675073b2f25cb1a743005ad7cc98.zmedico@gentoo
1 commit: 3330b6df6278675073b2f25cb1a743005ad7cc98
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 7 22:55:37 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 7 22:59:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3330b6df
7
8 sys-apps/portage: Bump to version 2.3.93
9
10 #711322 schedule exit listeners via call_soon
11 #711688 BinpkgFetcher sync_timestamp KeyError regression
12
13 Bug: https://bugs.gentoo.org/711148
14 Bug: https://bugs.gentoo.org/711322
15 Closes: https://bugs.gentoo.org/711688
16 Package-Manager: Portage-2.3.93, Repoman-2.3.20
17 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
18
19 sys-apps/portage/Manifest | 1 +
20 sys-apps/portage/portage-2.3.93.ebuild | 271 +++++++++++++++++++++++++++++++++
21 2 files changed, 272 insertions(+)
22
23 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
24 index cc120cd80a8..8a28a9b71ad 100644
25 --- a/sys-apps/portage/Manifest
26 +++ b/sys-apps/portage/Manifest
27 @@ -3,3 +3,4 @@ DIST portage-2.3.79.tar.bz2 1038675 BLAKE2B 7a6cff28fa1d4b54607e9416914ab534d250
28 DIST portage-2.3.84.tar.bz2 1043069 BLAKE2B 85ccc209011ef5206e0aaf768ec0276449f5a691f62f8dd65b812b6a285030796180acce89e9f2c8ae05fe4f59505133535f0374bf076846f819477d0a62d231 SHA512 49797ded65091ea7450f3c37e4ca1efb4205bc67e873295b5060ee6d39c1c63313fc1caa8c2f6c7afa6b352cef6d7ef04b8371c66a3ade05ac734b46f807bfd7
29 DIST portage-2.3.89.tar.bz2 1048621 BLAKE2B 1353f0697a977eb395abd857c8cc43c839912f4bd31436c6620d10e3dc29dc32ee9970478ad0f569b02f14989c48a7d956a233c7db22e172897a49a98fd2a94d SHA512 fa453d3134139fc1f435d6388aa7d6271cd680d08ea1736269a917c12500bb463a81afc956ddd0045e98784bcdbb6541c333be6ff0c2a00feeb482b637f08e98
30 DIST portage-2.3.92.tar.bz2 1049616 BLAKE2B fa140be91d7f7bd792b00249deb0d4900ff7f62f7df411ad6dd660d4f6c211426b90be665318d1de2a971669edc509543b0fb88b555e72d02c9d9ead36a7d5e0 SHA512 08e4c1beacb348e751532ac80a4ee13eb6824989a3b1006322180e3db84dc7b91b578295968bdcb601923c9836363c30c68e49f7f8b76960fb5e23234d7f04d0
31 +DIST portage-2.3.93.tar.bz2 1050236 BLAKE2B 08328dd043621ba722594d72856fb8add3bb04f457692bebdb851669068d86bd9e7c921bb798172a64c901032343169dc3796cd1b6cb88fefa157558ea224f43 SHA512 c82974b4b6dceb2adedc8d87a03981ad5643b0e7540da8227553bbd0f2f8935123821cac9357a14b36a113a2cb4a488bf10fcb293f4162944fe210b066875db8
32
33 diff --git a/sys-apps/portage/portage-2.3.93.ebuild b/sys-apps/portage/portage-2.3.93.ebuild
34 new file mode 100644
35 index 00000000000..0188237e0e1
36 --- /dev/null
37 +++ b/sys-apps/portage/portage-2.3.93.ebuild
38 @@ -0,0 +1,271 @@
39 +# Copyright 1999-2020 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=5
43 +
44 +DISTUTILS_USE_SETUPTOOLS=no
45 +PYTHON_COMPAT=(
46 + pypy3
47 + python3_6 python3_7 python3_8
48 + python2_7
49 +)
50 +PYTHON_REQ_USE='bzip2(+),threads(+)'
51 +
52 +inherit distutils-r1 linux-info systemd prefix
53 +
54 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
55 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
56 +
57 +LICENSE="GPL-2"
58 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
59 +SLOT="0"
60 +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
61 +
62 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
63 + >=app-arch/tar-1.27
64 + dev-lang/python-exec:2
65 + >=sys-apps/sed-4.0.5 sys-devel/patch
66 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
67 + apidoc? (
68 + dev-python/sphinx
69 + dev-python/sphinx-epytext
70 + )"
71 +# Require sandbox-2.2 for bug #288863.
72 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
73 +# quite slow, so it's not considered in the dependencies as an alternative to
74 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
75 +# for now, don't pull in xattr deps for other kernels.
76 +# For whirlpool hash, require python[ssl] (bug #425046).
77 +# For compgen, require bash[readline] (bug #445576).
78 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
79 +# the executable.
80 +RDEPEND="
81 + >=app-arch/tar-1.27
82 + dev-lang/python-exec:2
83 + !build? (
84 + >=sys-apps/sed-4.0.5
85 + app-shells/bash:0[readline]
86 + >=app-admin/eselect-1.2
87 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
88 + python{2_7,3_5} pypy)
89 + rsync-verify? (
90 + >=app-portage/gemato-14[${PYTHON_USEDEP}]
91 + >=app-crypt/openpgp-keys-gentoo-release-20180706
92 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
93 + )
94 + )
95 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
96 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
97 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
98 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
99 + kernel_linux? ( sys-apps/util-linux )
100 + >=app-misc/pax-utils-0.1.17
101 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
102 + xattr? ( kernel_linux? (
103 + >=sys-apps/install-xattr-0.3
104 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
105 + python2_7 pypy)
106 + ) )
107 + !<app-admin/logrotate-3.8.0
108 + !<app-portage/gentoolkit-0.4.6
109 + !<app-portage/repoman-2.3.10"
110 +PDEPEND="
111 + !build? (
112 + >=net-misc/rsync-2.6.4
113 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
114 + )"
115 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
116 +# NOTE: FEATURES=installsources requires debugedit and rsync
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 +python_prepare_all() {
140 + distutils-r1_python_prepare_all
141 +
142 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
143 +
144 + if use gentoo-dev; then
145 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
146 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
147 + -i lib/_emerge/create_depgraph_params.py || \
148 + die "failed to patch create_depgraph_params.py"
149 +
150 + einfo "Enabling additional FEATURES for gentoo-dev..."
151 + echo 'FEATURES="${FEATURES} strict-keepdir"' \
152 + >> cnf/make.globals || die
153 + fi
154 +
155 + if use native-extensions; then
156 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
157 + setup.cfg || die
158 + fi
159 +
160 + if ! use ipc ; then
161 + einfo "Disabling ipc..."
162 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
163 + -i lib/_emerge/AbstractEbuildProcess.py || \
164 + die "failed to patch AbstractEbuildProcess.py"
165 + fi
166 +
167 + if use xattr && use kernel_linux ; then
168 + einfo "Adding FEATURES=xattr to make.globals ..."
169 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
170 + || die "failed to append to make.globals"
171 + fi
172 +
173 + if use build || ! use rsync-verify; then
174 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
175 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
176 + -i cnf/repos.conf || die "sed failed"
177 + fi
178 +
179 + if [[ -n ${EPREFIX} ]] ; then
180 + einfo "Setting portage.const.EPREFIX ..."
181 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
182 + -w "/_BINARY/" lib/portage/const.py
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 ! -name etc-update -print0)
192 +
193 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
194 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
195 +
196 + if use prefix-guest ; then
197 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
198 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
199 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
200 + -i cnf/repos.conf || die "sed failed"
201 + fi
202 +
203 + einfo "Adding FEATURES=force-prefix to make.globals ..."
204 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
205 + || die "failed to append to make.globals"
206 + fi
207 +
208 + cd "${S}/cnf" || die
209 + if [ -f "make.conf.example.${ARCH}".diff ]; then
210 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
211 + die "Failed to patch make.conf.example"
212 + else
213 + eerror ""
214 + eerror "Portage does not have an arch-specific configuration for this arch."
215 + eerror "Please notify the arch maintainer about this issue. Using generic."
216 + eerror ""
217 + fi
218 +}
219 +
220 +python_compile_all() {
221 + local targets=()
222 + use doc && targets+=( docbook )
223 + use apidoc && targets+=( apidoc )
224 +
225 + if [[ ${targets[@]} ]]; then
226 + esetup.py "${targets[@]}"
227 + fi
228 +}
229 +
230 +python_test() {
231 + esetup.py test
232 +}
233 +
234 +python_install() {
235 + # Install sbin scripts to bindir for python-exec linking
236 + # they will be relocated in pkg_preinst()
237 + distutils-r1_python_install \
238 + --system-prefix="${EPREFIX}/usr" \
239 + --bindir="$(python_get_scriptdir)" \
240 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
241 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
242 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
243 + --sbindir="$(python_get_scriptdir)" \
244 + --sysconfdir="${EPREFIX}/etc" \
245 + "${@}"
246 +}
247 +
248 +python_install_all() {
249 + distutils-r1_python_install_all
250 +
251 + local targets=()
252 + use doc && targets+=(
253 + install_docbook
254 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
255 + )
256 + use apidoc && targets+=(
257 + install_apidoc
258 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
259 + )
260 +
261 + # install docs
262 + if [[ ${targets[@]} ]]; then
263 + esetup.py "${targets[@]}"
264 + fi
265 +
266 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
267 +
268 + # Due to distutils/python-exec limitations
269 + # these must be installed to /usr/bin.
270 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
271 + einfo "Moving admin scripts to the correct directory"
272 + dodir /usr/sbin
273 + for target in ${sbin_relocations}; do
274 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
275 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
276 + done
277 +}
278 +
279 +pkg_preinst() {
280 + python_setup
281 + python_export PYTHON_SITEDIR
282 + [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No such directory"
283 + env -u DISTDIR \
284 + -u PORTAGE_OVERRIDE_EPREFIX \
285 + -u PORTAGE_REPOSITORIES \
286 + -u PORTDIR \
287 + -u PORTDIR_OVERLAY \
288 + PYTHONPATH="${D%/}${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 +
300 + if has_version "<${CATEGORY}/${PN}-2.3.77"; then
301 + elog "The emerge --autounmask option is now disabled by default, except for"
302 + elog "portions of behavior which are controlled by the --autounmask-use and"
303 + elog "--autounmask-license options. For backward compatibility, previous"
304 + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved."
305 + elog "Users can get the old behavior simply by adding --autounmask to the"
306 + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this"
307 + elog "change, see https://bugs.gentoo.org/658648."
308 + fi
309 +}