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, 27 Feb 2021 08:18:18
Message-Id: 1614413877.489d9587cb80e56ef7f0a0d49bfaa62db588e873.zmedico@gentoo
1 commit: 489d9587cb80e56ef7f0a0d49bfaa62db588e873
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 27 08:11:57 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 27 08:17:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=489d9587
7
8 sys-apps/portage: Bump to version 3.0.16
9
10 #721680 Add emirrordist shelve dump/restore
11 #749333 PORTAGE_REPOSITORIES: don't override repos with aliases
12 #756778 emirrordist --content-db for content-hash layout support
13 #772785 don't enable binpkg-multi-instance for existing installs
14 #772806 prevent infinite loop after empty os.path.dirname result
15
16 https://bugs.gentoo.org/766117
17 https://bugs.gentoo.org/721680
18 https://bugs.gentoo.org/749333
19 https://bugs.gentoo.org/756778
20 https://bugs.gentoo.org/772785
21 https://bugs.gentoo.org/772806
22 Package-Manager: Portage-3.0.16, Repoman-3.0.2
23 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
24
25 sys-apps/portage/Manifest | 1 +
26 sys-apps/portage/portage-3.0.16.ebuild | 272 +++++++++++++++++++++++++++++++++
27 2 files changed, 273 insertions(+)
28
29 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
30 index aa6d5b187a3..b59f87121ec 100644
31 --- a/sys-apps/portage/Manifest
32 +++ b/sys-apps/portage/Manifest
33 @@ -6,3 +6,4 @@ DIST portage-3.0.14.tar.bz2 1049983 BLAKE2B 174fe1f14bf1cabbe044724bab5eeada6e4d
34 DIST portage-3.0.15-bug-772386-fetch-48226b2df140.patch 1432 BLAKE2B 37fa0521566a15eb6c137cb8c6c877782015a2b9e4999b257a3467d58790dede07496ed94f2c49a76d09bdaf2e80b6344fd3a3229ca9cd31102b26a9a988376e SHA512 65dd8c94edb4320c88d534f9e6bcf3cf553086fb6441ee01a917d2645f564bcb6d1b86ba60e6ac3059c28722dac0391856a223a0c8e03103078e5acbbb895bc1
35 DIST portage-3.0.15-bug-772386-fetch.patch 1283 BLAKE2B e2a3f554e13ab70d0efa376fe9adc3820da08c82aea092bef7571b3c9f3f23640b39a9f3aa6bc0cc2a10eb3c636ce2cf0523ccfcd9d03cb2bac942de5d55044b SHA512 58e4b14441e6093da5cc49c7894173164897938c1445b3fed23f5cc81d1c8601f427e4b8f6a918ffaae06dfdeafc9bc1bb3c71ec846c497630abe9b942b44e12
36 DIST portage-3.0.15.tar.bz2 1052590 BLAKE2B 144a80241300952075f884da570e90736f1a8b40067bcc7aac0740dd3be7b3574f4fb9de4471aca201d99b95ce0eb3202d94bc2489caef8e74e9db73ab229eff SHA512 588e4c0ca2f8155e141faa96fb10155f554ea68dd5bf426aa3c15db333317e7a6535cce4fdea0b273f90b72cbf0bfc9a28fdb776ed57244bbe13da49f46b3491
37 +DIST portage-3.0.16.tar.bz2 1055482 BLAKE2B 84d1ffd0be8855a7fee5b966d72032e59d72184dabab99c97bd829c669ac8eb526470c7b05958c9ea4cce4236bfb4998167db8feed74f8ef879d1e529c3d0eb5 SHA512 ae8ca1d15143bc0b62506d46b042626dc3d8587110c909448cb3735080a4c916d5d6d4bcaa4f189f98a32b0de29f2fc8b643f38642ec26fab58d1448ac50f1c3
38
39 diff --git a/sys-apps/portage/portage-3.0.16.ebuild b/sys-apps/portage/portage-3.0.16.ebuild
40 new file mode 100644
41 index 00000000000..0c20c537626
42 --- /dev/null
43 +++ b/sys-apps/portage/portage-3.0.16.ebuild
44 @@ -0,0 +1,272 @@
45 +# Copyright 1999-2021 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=7
49 +
50 +DISTUTILS_USE_SETUPTOOLS=no
51 +PYTHON_COMPAT=( pypy3 python3_{7..9} )
52 +PYTHON_REQ_USE='bzip2(+),threads(+)'
53 +
54 +inherit distutils-r1 linux-info tmpfiles 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
61 +SLOT="0"
62 +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr"
63 +RESTRICT="!test? ( test )"
64 +
65 +BDEPEND="test? ( dev-vcs/git )"
66 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
67 + >=app-arch/tar-1.27
68 + dev-lang/python-exec:2
69 + >=sys-apps/sed-4.0.5 sys-devel/patch
70 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
71 + apidoc? (
72 + dev-python/sphinx
73 + dev-python/sphinx-epytext
74 + )"
75 +# Require sandbox-2.2 for bug #288863.
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 + acct-user/portage
82 + app-arch/zstd
83 + >=app-arch/tar-1.27
84 + dev-lang/python-exec:2
85 + >=sys-apps/findutils-4.4
86 + !build? (
87 + >=sys-apps/sed-4.0.5
88 + app-shells/bash:0[readline]
89 + >=app-admin/eselect-1.2
90 + rsync-verify? (
91 + >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
92 + >=app-crypt/openpgp-keys-gentoo-release-20180706
93 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
94 + )
95 + )
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 + ) )
105 + !<app-admin/logrotate-3.8.0
106 + !<app-portage/gentoolkit-0.4.6
107 + !<app-portage/repoman-2.3.10
108 + !~app-portage/repoman-3.0.0"
109 +PDEPEND="
110 + !build? (
111 + >=net-misc/rsync-2.6.4
112 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
113 + )"
114 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
115 +# NOTE: FEATURES=installsources requires debugedit and rsync
116 +
117 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
118 +
119 +prefix_src_archives() {
120 + local x y
121 + for x in ${@}; do
122 + for y in ${SRC_ARCHIVES}; do
123 + echo ${y}/${x}
124 + done
125 + done
126 +}
127 +
128 +TARBALL_PV=${PV}
129 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
130 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
131 +
132 +pkg_pretend() {
133 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
134 +
135 + check_extra_config
136 +}
137 +
138 +python_prepare_all() {
139 + distutils-r1_python_prepare_all
140 +
141 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
142 +
143 + if use gentoo-dev; then
144 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
145 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
146 + -i lib/_emerge/create_depgraph_params.py || \
147 + die "failed to patch create_depgraph_params.py"
148 +
149 + einfo "Enabling additional FEATURES for gentoo-dev..."
150 + echo 'FEATURES="${FEATURES} strict-keepdir"' \
151 + >> cnf/make.globals || die
152 + fi
153 +
154 + if use native-extensions; then
155 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
156 + setup.cfg || die
157 + fi
158 +
159 + if ! use ipc ; then
160 + einfo "Disabling ipc..."
161 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
162 + -i lib/_emerge/AbstractEbuildProcess.py || \
163 + die "failed to patch AbstractEbuildProcess.py"
164 + fi
165 +
166 + if use xattr && use kernel_linux ; then
167 + einfo "Adding FEATURES=xattr to make.globals ..."
168 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
169 + || die "failed to append to make.globals"
170 + fi
171 +
172 + if use build || ! use rsync-verify; then
173 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
174 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
175 + -i cnf/repos.conf || die "sed failed"
176 + fi
177 +
178 + if [[ -n ${EPREFIX} ]] ; then
179 + einfo "Setting portage.const.EPREFIX ..."
180 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
181 + -w "/_BINARY/" lib/portage/const.py
182 +
183 + einfo "Prefixing shebangs ..."
184 + while read -r -d $'\0' ; do
185 + local shebang=$(head -n1 "$REPLY")
186 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
187 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
188 + die "sed failed"
189 + fi
190 + done < <(find . -type f ! -name etc-update -print0)
191 +
192 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
193 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
194 +
195 + if use prefix-guest ; then
196 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
197 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
198 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
199 + -i cnf/repos.conf || die "sed failed"
200 + fi
201 +
202 + einfo "Adding FEATURES=force-prefix to make.globals ..."
203 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
204 + || die "failed to append to make.globals"
205 + fi
206 +
207 + cd "${S}/cnf" || die
208 + if [ -f "make.conf.example.${ARCH}".diff ]; then
209 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
210 + die "Failed to patch make.conf.example"
211 + else
212 + eerror ""
213 + eerror "Portage does not have an arch-specific configuration for this arch."
214 + eerror "Please notify the arch maintainer about this issue. Using generic."
215 + eerror ""
216 + fi
217 +}
218 +
219 +python_compile_all() {
220 + local targets=()
221 + use doc && targets+=( docbook )
222 + use apidoc && targets+=( apidoc )
223 +
224 + if [[ ${targets[@]} ]]; then
225 + esetup.py "${targets[@]}"
226 + fi
227 +}
228 +
229 +python_test() {
230 + esetup.py test
231 +}
232 +
233 +python_install() {
234 + # Install sbin scripts to bindir for python-exec linking
235 + # they will be relocated in pkg_preinst()
236 + distutils-r1_python_install \
237 + --system-prefix="${EPREFIX}/usr" \
238 + --bindir="$(python_get_scriptdir)" \
239 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
240 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
241 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
242 + --sbindir="$(python_get_scriptdir)" \
243 + --sysconfdir="${EPREFIX}/etc" \
244 + "${@}"
245 +}
246 +
247 +python_install_all() {
248 + distutils-r1_python_install_all
249 +
250 + local targets=()
251 + use doc && targets+=(
252 + install_docbook
253 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
254 + )
255 + use apidoc && targets+=(
256 + install_apidoc
257 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
258 + )
259 +
260 + # install docs
261 + if [[ ${targets[@]} ]]; then
262 + esetup.py "${targets[@]}"
263 + fi
264 +
265 + dotmpfiles "${FILESDIR}"/portage-ccache.conf
266 +
267 + # Due to distutils/python-exec limitations
268 + # these must be installed to /usr/bin.
269 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
270 + einfo "Moving admin scripts to the correct directory"
271 + dodir /usr/sbin
272 + for target in ${sbin_relocations}; do
273 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
274 + mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!"
275 + done
276 +}
277 +
278 +pkg_preinst() {
279 + python_setup
280 + local sitedir=$(python_get_sitedir)
281 + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory"
282 + env -u DISTDIR \
283 + -u PORTAGE_OVERRIDE_EPREFIX \
284 + -u PORTAGE_REPOSITORIES \
285 + -u PORTDIR \
286 + -u PORTDIR_OVERLAY \
287 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
288 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
289 +
290 + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \
291 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
292 + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
293 +
294 + env -u FEATURES -u PORTAGE_REPOSITORIES \
295 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
296 + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die
297 +
298 + # elog dir must exist to avoid logrotate error for bug #415911.
299 + # This code runs in preinst in order to bypass the mapping of
300 + # portage:portage to root:root which happens after src_install.
301 + keepdir /var/log/portage/elog
302 + # This is allowed to fail if the user/group are invalid for prefix users.
303 + if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then
304 + chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog}
305 + fi
306 +
307 + if has_version "<${CATEGORY}/${PN}-2.3.77"; then
308 + elog "The emerge --autounmask option is now disabled by default, except for"
309 + elog "portions of behavior which are controlled by the --autounmask-use and"
310 + elog "--autounmask-license options. For backward compatibility, previous"
311 + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved."
312 + elog "Users can get the old behavior simply by adding --autounmask to the"
313 + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this"
314 + elog "change, see https://bugs.gentoo.org/658648."
315 + fi
316 +}