Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/
Date: Fri, 09 Sep 2022 10:56:16
Message-Id: 1662720957.06bf8d495327ebb5718821a27622f1b7eb944943.sam@gentoo
1 commit: 06bf8d495327ebb5718821a27622f1b7eb944943
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 9 10:55:57 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 10:55:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06bf8d49
7
8 sys-apps/portage: add 3.0.36
9
10 Closes: https://bugs.gentoo.org/865905
11 Closes: https://bugs.gentoo.org/864160
12 Closes: https://bugs.gentoo.org/866087
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 sys-apps/portage/Manifest | 1 +
16 sys-apps/portage/portage-3.0.36.ebuild | 273 +++++++++++++++++++++++++++++++++
17 2 files changed, 274 insertions(+)
18
19 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
20 index 6c9f75dbe0ed..3434e32fea7f 100644
21 --- a/sys-apps/portage/Manifest
22 +++ b/sys-apps/portage/Manifest
23 @@ -1,3 +1,4 @@
24 DIST portage-3.0.30.tar.bz2 1157316 BLAKE2B 56939618f4915f77dca6bb85d4a7cf98e50133b524f68a0b192c0a928ca209a0cb944c174dda78f1b5a071c02c190857ea8a7ecd514301c45e897b302542f52e SHA512 accec770f63180b6d5d4cd08ef50f0cd01aa5701104156523f1a735d8ec3313a3b513629a33d8863285736515b6a3d56fc21498404da3a0f89b196655a98db7d
25 DIST portage-3.0.34.tar.bz2 1110794 BLAKE2B 32239a8319448e63fa249296b492c88504039cf5aabe3e1ffcb2423c95fd26a048d9717c8f673d670acf0f9fa290d12dbf194df08a5a0f11311db856e41ba714 SHA512 c3566a6bed5a87b7dc6882eeafe77b2511e5be3e4919159309303477ca97e1b5c1eb134fe5fc0d8a5f5c2880f1eb5c72592b8104a726bad5ed83b4ed2eed5193
26 DIST portage-3.0.35.tar.bz2 1112935 BLAKE2B 1226cc5808628a0d6c3c71aaacf87b7447205a1716beff198627693b22304b1e11b1d91e277c97794235690f17c0e3ae76f9546668d3459916caaa17c04eb9c5 SHA512 975d8e942014c2fb01971292ed0882291aef1d28ceba95250d0b593ed76fa9692adafecbf2326499dadd42d55be3d3f4fb634552b99d5e5392ef723413a2e3dd
27 +DIST portage-3.0.36.tar.bz2 1114026 BLAKE2B a8a535ae309c32955eae6a491cbc97f809fb67111688087aa98ac28df4bc97fcb3d9a4ce7c5dbdfbb7f21891a7524f671ff3e3ccbed425503c66bde591266957 SHA512 94b39718871e895c1170271ad072eaa72c995a7e7a06bda9ee76cde2e3949682da7a996780a83cc33c4647915f942fe9d4a7b9b6dfd9319143eb1453cee3b3de
28
29 diff --git a/sys-apps/portage/portage-3.0.36.ebuild b/sys-apps/portage/portage-3.0.36.ebuild
30 new file mode 100644
31 index 000000000000..26815216586a
32 --- /dev/null
33 +++ b/sys-apps/portage/portage-3.0.36.ebuild
34 @@ -0,0 +1,273 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PYTHON_COMPAT=( pypy3 python3_{8..11} )
41 +PYTHON_REQ_USE='bzip2(+),threads(+)'
42 +TMPFILES_OPTIONAL=1
43 +
44 +inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix
45 +
46 +DESCRIPTION="The package management and distribution system for Gentoo"
47 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
48 +SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2"
49 +
50 +LICENSE="GPL-2"
51 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
52 +SLOT="0"
53 +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr"
54 +RESTRICT="!test? ( test )"
55 +
56 +BDEPEND="
57 + app-arch/xz-utils
58 + test? ( dev-vcs/git )"
59 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
60 + >=app-arch/tar-1.27
61 + dev-lang/python-exec:2
62 + >=sys-apps/sed-4.0.5 sys-devel/patch
63 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
64 + apidoc? (
65 + dev-python/sphinx[${PYTHON_USEDEP}]
66 + dev-python/sphinx-epytext[${PYTHON_USEDEP}]
67 + )"
68 +# Require sandbox-2.2 for bug #288863.
69 +# For whirlpool hash, require python[ssl] (bug #425046).
70 +# For compgen, require bash[readline] (bug #445576).
71 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
72 +# the executable.
73 +RDEPEND="
74 + acct-user/portage
75 + app-arch/zstd
76 + >=app-arch/tar-1.27
77 + dev-lang/python-exec:2
78 + >=sys-apps/findutils-4.4
79 + !build? (
80 + >=sys-apps/sed-4.0.5
81 + >=app-shells/bash-5.0:0[readline]
82 + >=app-admin/eselect-1.2
83 + rsync-verify? (
84 + >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
85 + >=sec-keys/openpgp-keys-gentoo-release-20180706
86 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
87 + )
88 + )
89 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
90 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
91 + kernel_linux? ( sys-apps/util-linux )
92 + >=app-misc/pax-utils-0.1.17
93 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
94 + xattr? ( kernel_linux? (
95 + >=sys-apps/install-xattr-0.3
96 + ) )
97 + !<app-admin/logrotate-3.8.0
98 + !<app-portage/gentoolkit-0.4.6
99 + !<app-portage/repoman-2.3.10
100 + !~app-portage/repoman-3.0.0"
101 +PDEPEND="
102 + !build? (
103 + >=net-misc/rsync-2.6.4
104 + >=sys-apps/file-5.41
105 + >=sys-apps/coreutils-6.4
106 + )"
107 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
108 +# NOTE: FEATURES=installsources requires debugedit and rsync
109 +
110 +pkg_pretend() {
111 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
112 +
113 + if use native-extensions && tc-is-cross-compiler; then
114 + einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)"
115 + fi
116 +
117 + check_extra_config
118 +}
119 +
120 +python_prepare_all() {
121 + local PATCHES=(
122 + )
123 +
124 + distutils-r1_python_prepare_all
125 +
126 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
127 +
128 + if use gentoo-dev; then
129 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
130 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
131 + -i lib/_emerge/create_depgraph_params.py || \
132 + die "failed to patch create_depgraph_params.py"
133 +
134 + einfo "Enabling additional FEATURES for gentoo-dev..."
135 + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \
136 + >> cnf/make.globals || die
137 + fi
138 +
139 + if use native-extensions && ! tc-is-cross-compiler; then
140 + printf "[build_ext]\nportage_ext_modules=true\n" >> \
141 + setup.cfg || die
142 + fi
143 +
144 + if ! use ipc ; then
145 + einfo "Disabling ipc..."
146 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
147 + -i lib/_emerge/AbstractEbuildProcess.py || \
148 + die "failed to patch AbstractEbuildProcess.py"
149 + fi
150 +
151 + if use xattr && use kernel_linux ; then
152 + einfo "Adding FEATURES=xattr to make.globals ..."
153 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
154 + || die "failed to append to make.globals"
155 + fi
156 +
157 + if use build || ! use rsync-verify; then
158 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
159 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
160 + -i cnf/repos.conf || die "sed failed"
161 + fi
162 +
163 + if [[ -n ${EPREFIX} ]] ; then
164 + einfo "Setting portage.const.EPREFIX ..."
165 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
166 + -w "/_BINARY/" lib/portage/const.py
167 +
168 + einfo "Prefixing shebangs ..."
169 + > "${T}/shebangs" || die
170 + while read -r -d $'\0' ; do
171 + local shebang=$(head -n1 "$REPLY")
172 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
173 + echo "${REPLY}" >> "${T}/shebangs" || die
174 + fi
175 + done < <(find . -type f -executable ! -name etc-update -print0)
176 +
177 + if [[ -s ${T}/shebangs ]]; then
178 + xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed"
179 + fi
180 +
181 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
182 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
183 +
184 + if use prefix-guest ; then
185 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
186 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
187 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
188 + -i cnf/repos.conf || die "sed failed"
189 + fi
190 +
191 + einfo "Adding FEATURES=force-prefix to make.globals ..."
192 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
193 + || die "failed to append to make.globals"
194 + fi
195 +
196 + cd "${S}/cnf" || die
197 + if [ -f "make.conf.example.${ARCH}".diff ]; then
198 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
199 + die "Failed to patch make.conf.example"
200 + else
201 + eerror ""
202 + eerror "Portage does not have an arch-specific configuration for this arch."
203 + eerror "Please notify the arch maintainer about this issue. Using generic."
204 + eerror ""
205 + fi
206 +}
207 +
208 +python_compile_all() {
209 + local targets=()
210 + use doc && targets+=( docbook )
211 + use apidoc && targets+=( apidoc )
212 +
213 + if [[ ${targets[@]} ]]; then
214 + esetup.py "${targets[@]}"
215 + fi
216 +}
217 +
218 +python_test() {
219 + esetup.py test
220 +}
221 +
222 +python_install() {
223 + # Install sbin scripts to bindir for python-exec linking
224 + # they will be relocated in pkg_preinst()
225 + distutils-r1_python_install \
226 + --system-prefix="${EPREFIX}/usr" \
227 + --bindir="$(python_get_scriptdir)" \
228 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
229 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
230 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
231 + --sbindir="$(python_get_scriptdir)" \
232 + --sysconfdir="${EPREFIX}/etc" \
233 + "${@}"
234 +}
235 +
236 +python_install_all() {
237 + distutils-r1_python_install_all
238 +
239 + local targets=()
240 + use doc && targets+=(
241 + install_docbook
242 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
243 + )
244 + use apidoc && targets+=(
245 + install_apidoc
246 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
247 + )
248 +
249 + # install docs
250 + if [[ ${targets[@]} ]]; then
251 + esetup.py "${targets[@]}"
252 + fi
253 +
254 + dotmpfiles "${FILESDIR}"/portage-ccache.conf
255 +
256 + # Due to distutils/python-exec limitations
257 + # these must be installed to /usr/bin.
258 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
259 + einfo "Moving admin scripts to the correct directory"
260 + dodir /usr/sbin
261 + for target in ${sbin_relocations}; do
262 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
263 + mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!"
264 + done
265 +}
266 +
267 +pkg_preinst() {
268 + if ! use build; then
269 + python_setup
270 + local sitedir=$(python_get_sitedir)
271 + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory"
272 + env -u DISTDIR \
273 + -u PORTAGE_OVERRIDE_EPREFIX \
274 + -u PORTAGE_REPOSITORIES \
275 + -u PORTDIR \
276 + -u PORTDIR_OVERLAY \
277 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
278 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
279 +
280 + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \
281 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
282 + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
283 +
284 + env -u FEATURES -u PORTAGE_REPOSITORIES \
285 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
286 + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die
287 + fi
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 +}