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