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