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, 14 Sep 2020 07:35:32
Message-Id: 1600068919.1d7645a12b16a08ad45b1c82971d30e99e8ab589.zmedico@gentoo
1 commit: 1d7645a12b16a08ad45b1c82971d30e99e8ab589
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 14 07:01:26 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 14 07:35:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d7645a1
7
8 sys-apps/portage: Bump to version 3.0.7
9
10 #737470 egencache: add --external-cache-only option
11 #741474 get_mirror_url: urlquote only for ftp, http, and https
12 #742446 support riscv ilp32 and ilp32d ABIs
13
14 Bug: https://bugs.gentoo.org/739718
15 Bug: https://bugs.gentoo.org/737470
16 Bug: https://bugs.gentoo.org/741474
17 Bug: https://bugs.gentoo.org/742446
18 Package-Manager: Portage-3.0.7, Repoman-3.0.1
19 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
20
21 sys-apps/portage/Manifest | 1 +
22 sys-apps/portage/portage-3.0.7.ebuild | 267 ++++++++++++++++++++++++++++++++++
23 2 files changed, 268 insertions(+)
24
25 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
26 index c8b01b3aa9f..4d26a9eaab1 100644
27 --- a/sys-apps/portage/Manifest
28 +++ b/sys-apps/portage/Manifest
29 @@ -4,3 +4,4 @@ DIST portage-2.3.99.tar.bz2 1051210 BLAKE2B dd3f990dbc87e655a767ce01e1ee3f0b1d52
30 DIST portage-3.0.4.tar.bz2 1042654 BLAKE2B 6f869b2eb24f9e590bf8e01172050105a1bd9ea88657db5893133b4620231a0ddcda871d6fcc10623f7f2ef809116310c76355263819be6c3734b0ca184d5fc0 SHA512 7a0c39cd4ed65aebd84ff8bbadba29760b3aa392a0d606c5b29a1112fd0845c42f74eebb0728a069b2b097a6eb7eec2d18af615fd9edcc38f1018ae6ff686812
31 DIST portage-3.0.6-selinux-utf8-bug-741194.patch 2721 BLAKE2B 6f743fd32f72e18a029827ecbaf168d67cf5056a60ba89d00dd1ff7225f4a4ffa63dbb14310cf590553d47d4ac52d0899c5b48ebb799bed6dd76fc74a762e134 SHA512 108dd63d029bf296a26723e35f8c05ae9c5c81fd1b1f5398bbc310dd832b1af452865893e0c434b857cca12bd458dc1963dab689fab629ab7d48678472d9bc47
32 DIST portage-3.0.6.tar.bz2 1045033 BLAKE2B 3c31252215069619bde15191fade18198e777f892e910ec6f5a9ebbc8569a56d219943ccbaf18517eae51f74d8c53047d4e0ef5675166b09e28766f940ad7391 SHA512 0ec6ca0470060d6a441fa48728f542afc97e49f93c8f2bd66ab51dda946f65a4bcc52e1f7b2afe19c040b4dcf05d4a2d8578cea2ab3526c7b8fa630670e8a98a
33 +DIST portage-3.0.7.tar.bz2 1045185 BLAKE2B 1fe5e13bbbfaecd1b850b29b17908fb2c2756d559b0583174833672b68a67cfc7e7080334729ee5295b646423ca3925284f42eeace0c0b79d02305a170aed5d9 SHA512 701f6bddb9255d5ac86ed6e73f869124925bafd09f7c2e458376b54aebf030fa7f0d80beda1626350755cc1e8a2b9c2636b3fde1105787f2d2a0f742a73cf5e8
34
35 diff --git a/sys-apps/portage/portage-3.0.7.ebuild b/sys-apps/portage/portage-3.0.7.ebuild
36 new file mode 100644
37 index 00000000000..28cd3d04cca
38 --- /dev/null
39 +++ b/sys-apps/portage/portage-3.0.7.ebuild
40 @@ -0,0 +1,267 @@
41 +# Copyright 1999-2020 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +DISTUTILS_USE_SETUPTOOLS=no
47 +PYTHON_COMPAT=( pypy3 python3_{6..9} )
48 +PYTHON_REQ_USE='bzip2(+),threads(+)'
49 +
50 +inherit distutils-r1 linux-info tmpfiles prefix
51 +
52 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
53 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
54 +
55 +LICENSE="GPL-2"
56 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
57 +SLOT="0"
58 +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr"
59 +RESTRICT="!test? ( test )"
60 +
61 +BDEPEND="test? ( dev-vcs/git )"
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 whirlpool hash, require python[ssl] (bug #425046).
73 +# For compgen, require bash[readline] (bug #445576).
74 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
75 +# the executable.
76 +RDEPEND="
77 + app-arch/zstd
78 + >=app-arch/tar-1.27
79 + dev-lang/python-exec:2
80 + >=sys-apps/findutils-4.4
81 + !build? (
82 + >=sys-apps/sed-4.0.5
83 + app-shells/bash:0[readline]
84 + >=app-admin/eselect-1.2
85 + rsync-verify? (
86 + >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
87 + >=app-crypt/openpgp-keys-gentoo-release-20180706
88 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
89 + )
90 + )
91 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
92 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
93 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
94 + kernel_linux? ( sys-apps/util-linux )
95 + >=app-misc/pax-utils-0.1.17
96 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
97 + xattr? ( kernel_linux? (
98 + >=sys-apps/install-xattr-0.3
99 + ) )
100 + !<app-admin/logrotate-3.8.0
101 + !<app-portage/gentoolkit-0.4.6
102 + !<app-portage/repoman-2.3.10
103 + !~app-portage/repoman-3.0.0"
104 +PDEPEND="
105 + !build? (
106 + >=net-misc/rsync-2.6.4
107 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
108 + )"
109 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
110 +# NOTE: FEATURES=installsources requires debugedit and rsync
111 +
112 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
113 +
114 +prefix_src_archives() {
115 + local x y
116 + for x in ${@}; do
117 + for y in ${SRC_ARCHIVES}; do
118 + echo ${y}/${x}
119 + done
120 + done
121 +}
122 +
123 +TARBALL_PV=${PV}
124 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
125 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
126 +
127 +pkg_pretend() {
128 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
129 +
130 + check_extra_config
131 +}
132 +
133 +python_prepare_all() {
134 + distutils-r1_python_prepare_all
135 +
136 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
137 +
138 + if use gentoo-dev; then
139 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
140 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
141 + -i lib/_emerge/create_depgraph_params.py || \
142 + die "failed to patch create_depgraph_params.py"
143 +
144 + einfo "Enabling additional FEATURES for gentoo-dev..."
145 + echo 'FEATURES="${FEATURES} strict-keepdir"' \
146 + >> cnf/make.globals || die
147 + fi
148 +
149 + if use native-extensions; then
150 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
151 + setup.cfg || die
152 + fi
153 +
154 + if ! use ipc ; then
155 + einfo "Disabling ipc..."
156 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
157 + -i lib/_emerge/AbstractEbuildProcess.py || \
158 + die "failed to patch AbstractEbuildProcess.py"
159 + fi
160 +
161 + if use xattr && use kernel_linux ; then
162 + einfo "Adding FEATURES=xattr to make.globals ..."
163 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
164 + || die "failed to append to make.globals"
165 + fi
166 +
167 + if use build || ! use rsync-verify; then
168 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
169 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
170 + -i cnf/repos.conf || die "sed failed"
171 + fi
172 +
173 + if [[ -n ${EPREFIX} ]] ; then
174 + einfo "Setting portage.const.EPREFIX ..."
175 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
176 + -w "/_BINARY/" lib/portage/const.py
177 +
178 + einfo "Prefixing shebangs ..."
179 + while read -r -d $'\0' ; do
180 + local shebang=$(head -n1 "$REPLY")
181 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
182 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
183 + die "sed failed"
184 + fi
185 + done < <(find . -type f ! -name etc-update -print0)
186 +
187 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
188 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
189 +
190 + if use prefix-guest ; then
191 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
192 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
193 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
194 + -i cnf/repos.conf || die "sed failed"
195 + fi
196 +
197 + einfo "Adding FEATURES=force-prefix to make.globals ..."
198 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
199 + || die "failed to append to make.globals"
200 + fi
201 +
202 + cd "${S}/cnf" || die
203 + if [ -f "make.conf.example.${ARCH}".diff ]; then
204 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
205 + die "Failed to patch make.conf.example"
206 + else
207 + eerror ""
208 + eerror "Portage does not have an arch-specific configuration for this arch."
209 + eerror "Please notify the arch maintainer about this issue. Using generic."
210 + eerror ""
211 + fi
212 +}
213 +
214 +python_compile_all() {
215 + local targets=()
216 + use doc && targets+=( docbook )
217 + use apidoc && targets+=( apidoc )
218 +
219 + if [[ ${targets[@]} ]]; then
220 + esetup.py "${targets[@]}"
221 + fi
222 +}
223 +
224 +python_test() {
225 + esetup.py test
226 +}
227 +
228 +python_install() {
229 + # Install sbin scripts to bindir for python-exec linking
230 + # they will be relocated in pkg_preinst()
231 + distutils-r1_python_install \
232 + --system-prefix="${EPREFIX}/usr" \
233 + --bindir="$(python_get_scriptdir)" \
234 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
235 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
236 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
237 + --sbindir="$(python_get_scriptdir)" \
238 + --sysconfdir="${EPREFIX}/etc" \
239 + "${@}"
240 +}
241 +
242 +python_install_all() {
243 + distutils-r1_python_install_all
244 +
245 + local targets=()
246 + use doc && targets+=(
247 + install_docbook
248 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
249 + )
250 + use apidoc && targets+=(
251 + install_apidoc
252 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
253 + )
254 +
255 + # install docs
256 + if [[ ${targets[@]} ]]; then
257 + esetup.py "${targets[@]}"
258 + fi
259 +
260 + dotmpfiles "${FILESDIR}"/portage-ccache.conf
261 +
262 + # Due to distutils/python-exec limitations
263 + # these must be installed to /usr/bin.
264 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
265 + einfo "Moving admin scripts to the correct directory"
266 + dodir /usr/sbin
267 + for target in ${sbin_relocations}; do
268 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
269 + mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!"
270 + done
271 +}
272 +
273 +pkg_preinst() {
274 + python_setup
275 + local sitedir=$(python_get_sitedir)
276 + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory"
277 + env -u DISTDIR \
278 + -u PORTAGE_OVERRIDE_EPREFIX \
279 + -u PORTAGE_REPOSITORIES \
280 + -u PORTDIR \
281 + -u PORTDIR_OVERLAY \
282 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
283 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
284 +
285 + env -u BINPKG_COMPRESS \
286 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
287 + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
288 +
289 + # elog dir must exist to avoid logrotate error for bug #415911.
290 + # This code runs in preinst in order to bypass the mapping of
291 + # portage:portage to root:root which happens after src_install.
292 + keepdir /var/log/portage/elog
293 + # This is allowed to fail if the user/group are invalid for prefix users.
294 + if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then
295 + chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog}
296 + fi
297 +
298 + if has_version "<${CATEGORY}/${PN}-2.3.77"; then
299 + elog "The emerge --autounmask option is now disabled by default, except for"
300 + elog "portions of behavior which are controlled by the --autounmask-use and"
301 + elog "--autounmask-license options. For backward compatibility, previous"
302 + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved."
303 + elog "Users can get the old behavior simply by adding --autounmask to the"
304 + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this"
305 + elog "change, see https://bugs.gentoo.org/658648."
306 + fi
307 +}