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: Mon, 02 Jan 2023 05:31:57
Message-Id: 1672637502.1d78c5d85797399b0dbd0fe885d04b7f50fc3a60.sam@gentoo
1 commit: 1d78c5d85797399b0dbd0fe885d04b7f50fc3a60
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 05:31:32 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 05:31:42 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d78c5d8
7
8 sys-apps/portage: add 3.0.43
9
10 Closes: https://bugs.gentoo.org/888487
11 Closes: https://bugs.gentoo.org/887817
12 Closes: https://bugs.gentoo.org/885909
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 sys-apps/portage/Manifest | 1 +
16 sys-apps/portage/portage-3.0.43.ebuild | 292 +++++++++++++++++++++++++++++++++
17 2 files changed, 293 insertions(+)
18
19 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
20 index 2977e7a9dd29..ae06f1d83f9e 100644
21 --- a/sys-apps/portage/Manifest
22 +++ b/sys-apps/portage/Manifest
23 @@ -1,3 +1,4 @@
24 DIST portage-3.0.38.1.tar.bz2 1116216 BLAKE2B d1cb4cc1924673d07ea7174ad0a84b3af977dd28ca659695d3e4014e4aa83b054acba82a160e7c0a8d3d4fbc3514bea619c3d720e450cb4890818e4b1bc1e43a SHA512 1375565e936276fd6cfd2a4f6f782b91e234e973d6a998f2276a076dd165272bcf12067fd01e77b238f194eac69edf967bbe3ac62edc3701fe9375c693622ab9
25 DIST portage-3.0.41.tar.bz2 1119737 BLAKE2B 6c6d1fa11f16362505e321eb530d233cf73a7e1cc7dab2fc88ad40701c16835e08a7d16a408381e2f717ac5f48d46344e57b9b5296be4eba0a7583540c6a81aa SHA512 046621ee59b2b1b374a63091028ed3462b1212960b337e8e034c739d5c51d5ae1e7b491c88940199e710081409e38778749a5c86576cf5bb6c59b1890dc892b5
26 DIST portage-3.0.42.tar.bz2 1122793 BLAKE2B 9df93e5ebeab415bd3b56e4e1771b628f5e3622d997aa8818e7ce42f77d60ffcb1807093dbc44852c5b359c632c11dcb7db6c026f2e7e224293e7ebb9e64b286 SHA512 f3d2bb5a1adc801c641ff14043b1617831c646a9432b2602e48343d8264850bb410a1666d646b97e224864d56cc7acae0aa044a7476384030063fb77e4323724
27 +DIST portage-3.0.43.tar.bz2 1139615 BLAKE2B e0f2646c3b6d5d49ec23038ad27507f7b9c0c03b848e82aff336896802c07b29344f924c4525d880f8895ba38f8116a7c79ecea51c794a433da9bd146efadc20 SHA512 b5e5339f3b5446f5c8f9b319e86e82d260e004b0606c3d0eadf09f91c95de0279c64c0fc4d7f6251ebd2cf7a65ba1ba37d752ed48b712e72b8c024835e747691
28
29 diff --git a/sys-apps/portage/portage-3.0.43.ebuild b/sys-apps/portage/portage-3.0.43.ebuild
30 new file mode 100644
31 index 000000000000..42a575287431
32 --- /dev/null
33 +++ b/sys-apps/portage/portage-3.0.43.ebuild
34 @@ -0,0 +1,292 @@
35 +# Copyright 1999-2023 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 +"
60 +DEPEND="
61 + !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 +"
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 + acct-user/portage
78 + app-arch/zstd
79 + >=app-arch/tar-1.27
80 + dev-lang/python-exec:2
81 + >=sys-apps/findutils-4.4
82 + !build? (
83 + >=sys-apps/sed-4.0.5
84 + >=app-shells/bash-5.0:0[readline]
85 + >=app-admin/eselect-1.2
86 + rsync-verify? (
87 + >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
88 + >=sec-keys/openpgp-keys-gentoo-release-20220101
89 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
90 + )
91 + )
92 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
93 + elibc_musl? ( >=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 +"
105 +# Weird dep construct for sys-apps/file can be removed once >=file-5.44-r1 stable
106 +PDEPEND="
107 + !build? (
108 + >=net-misc/rsync-2.6.4
109 + || (
110 + >=sys-apps/file-5.44-r1
111 + =sys-apps/file-5.43-r2
112 + )
113 + >=sys-apps/coreutils-6.4
114 + )
115 +"
116 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
117 +# NOTE: FEATURES=installsources requires debugedit and rsync
118 +
119 +pkg_pretend() {
120 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
121 +
122 + if use native-extensions && tc-is-cross-compiler; then
123 + einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)"
124 + fi
125 +
126 + check_extra_config
127 +}
128 +
129 +python_prepare_all() {
130 + local PATCHES=(
131 + )
132 +
133 + distutils-r1_python_prepare_all
134 +
135 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
136 +
137 + if use gentoo-dev; then
138 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
139 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
140 + -i lib/_emerge/create_depgraph_params.py || \
141 + die "failed to patch create_depgraph_params.py"
142 +
143 + einfo "Enabling additional FEATURES for gentoo-dev..."
144 + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \
145 + >> cnf/make.globals || die
146 + fi
147 +
148 + if use native-extensions && ! tc-is-cross-compiler; then
149 + printf "[build_ext]\nportage_ext_modules=true\n" >> \
150 + setup.cfg || die
151 + fi
152 +
153 + if ! use ipc ; then
154 + einfo "Disabling ipc..."
155 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
156 + -i lib/_emerge/AbstractEbuildProcess.py || \
157 + die "failed to patch AbstractEbuildProcess.py"
158 + fi
159 +
160 + if use xattr && use kernel_linux ; then
161 + einfo "Adding FEATURES=xattr to make.globals ..."
162 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
163 + || die "failed to append to make.globals"
164 + fi
165 +
166 + if use build || ! use rsync-verify; then
167 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
168 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
169 + -i cnf/repos.conf || die "sed failed"
170 + fi
171 +
172 + if [[ -n ${EPREFIX} ]] ; then
173 + einfo "Setting portage.const.EPREFIX ..."
174 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
175 + -w "/_BINARY/" lib/portage/const.py
176 +
177 + einfo "Prefixing shebangs ..."
178 + > "${T}/shebangs" || die
179 + while read -r -d $'\0' ; do
180 + local shebang=$(head -n1 "$REPLY")
181 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
182 + echo "${REPLY}" >> "${T}/shebangs" || die
183 + fi
184 + done < <(find . -type f -executable ! -name etc-update -print0)
185 +
186 + if [[ -s ${T}/shebangs ]]; then
187 + xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed"
188 + fi
189 +
190 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
191 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
192 +
193 + if use prefix-guest ; then
194 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
195 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
196 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
197 + -i cnf/repos.conf || die "sed failed"
198 + fi
199 +
200 + einfo "Adding FEATURES=force-prefix to make.globals ..."
201 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
202 + || die "failed to append to make.globals"
203 + fi
204 +
205 + cd "${S}/cnf" || die
206 + if [[ -f "make.conf.example.${ARCH}".diff ]] ; then
207 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
208 + die "Failed to patch make.conf.example"
209 + else
210 + eerror ""
211 + eerror "Portage does not have an arch-specific configuration for this arch."
212 + eerror "Please notify the arch maintainer about this issue. Using generic."
213 + eerror ""
214 + fi
215 +}
216 +
217 +python_compile_all() {
218 + local targets=()
219 + use doc && targets+=( docbook )
220 + use apidoc && targets+=( apidoc )
221 +
222 + if [[ ${targets[@]} ]]; then
223 + esetup.py "${targets[@]}"
224 + fi
225 +}
226 +
227 +python_test() {
228 + esetup.py test
229 +}
230 +
231 +python_install() {
232 + # Install sbin scripts to bindir for python-exec linking
233 + # they will be relocated in pkg_preinst()
234 + distutils-r1_python_install \
235 + --system-prefix="${EPREFIX}/usr" \
236 + --bindir="$(python_get_scriptdir)" \
237 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
238 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
239 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
240 + --sbindir="$(python_get_scriptdir)" \
241 + --sysconfdir="${EPREFIX}/etc" \
242 + "${@}"
243 +}
244 +
245 +python_install_all() {
246 + distutils-r1_python_install_all
247 +
248 + local targets=()
249 + use doc && targets+=(
250 + install_docbook
251 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
252 + )
253 + use apidoc && targets+=(
254 + install_apidoc
255 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
256 + )
257 +
258 + # install docs
259 + if [[ ${targets[@]} ]]; then
260 + esetup.py "${targets[@]}"
261 + fi
262 +
263 + dotmpfiles "${FILESDIR}"/portage-{ccache,tmpdir}.conf
264 +
265 + # Due to distutils/python-exec limitations
266 + # these must be installed to /usr/bin.
267 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
268 + einfo "Moving admin scripts to the correct directory"
269 + dodir /usr/sbin
270 + for target in ${sbin_relocations}; do
271 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
272 + mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!"
273 + done
274 +}
275 +
276 +pkg_preinst() {
277 + if ! use build; then
278 + python_setup
279 + local sitedir=$(python_get_sitedir)
280 + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory"
281 + env -u DISTDIR \
282 + -u PORTAGE_OVERRIDE_EPREFIX \
283 + -u PORTAGE_REPOSITORIES \
284 + -u PORTDIR \
285 + -u PORTDIR_OVERLAY \
286 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
287 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
288 +
289 + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \
290 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
291 + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die
292 +
293 + env -u FEATURES -u PORTAGE_REPOSITORIES \
294 + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \
295 + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die
296 + fi
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 +}
317 +
318 +pkg_postinst() {
319 + # Warn about obsolete "enotice" script, bug #867010
320 + local bashrc=${EROOT}/etc/portage/profile/profile.bashrc
321 + if [[ -e ${bashrc} ]] && grep -q enotice "${bashrc}"; then
322 + eerror "Obsolete 'enotice' script detected!"
323 + eerror "Please remove this from ${bashrc} to avoid problems."
324 + eerror "See bug 867010 for more details."
325 + fi
326 +}