1 |
commit: 899eedd6e815e5b867bb9445594d2e2f895cbf70 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 3 19:04:41 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 3 19:04:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=899eedd6 |
7 |
|
8 |
sys-apps/portage-3.0.30.1-r1: revbump for py310, sync |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
sys-apps/portage/portage-3.0.30.1-r1.ebuild | 305 ++++++++++++++++++++++++++++ |
14 |
1 file changed, 305 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/portage/portage-3.0.30.1-r1.ebuild b/sys-apps/portage/portage-3.0.30.1-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000000..f3986eb874 |
19 |
--- /dev/null |
20 |
+++ b/sys-apps/portage/portage-3.0.30.1-r1.ebuild |
21 |
@@ -0,0 +1,305 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( pypy3 python3_{8..11} ) |
28 |
+PYTHON_REQ_USE='bzip2(+),threads(+)' |
29 |
+TMPFILES_OPTIONAL=1 |
30 |
+ |
31 |
+inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix |
32 |
+ |
33 |
+DESCRIPTION="Portage package manager used in Gentoo Prefix" |
34 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
35 |
+SRC_URI="https://dev.gentoo.org/~grobian/distfiles/prefix-${P}.tar.bz2" |
36 |
+ |
37 |
+LICENSE="GPL-2" |
38 |
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
39 |
+SLOT="0" |
40 |
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions rsync-verify selinux test xattr" |
41 |
+RESTRICT="!test? ( test )" |
42 |
+ |
43 |
+BDEPEND=" |
44 |
+ app-arch/xz-utils |
45 |
+ test? ( dev-vcs/git )" |
46 |
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) |
47 |
+ >=app-arch/tar-1.27 |
48 |
+ dev-lang/python-exec:2 |
49 |
+ >=sys-apps/sed-4.0.5 sys-devel/patch |
50 |
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
51 |
+ apidoc? ( |
52 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
53 |
+ dev-python/sphinx-epytext[${PYTHON_USEDEP}] |
54 |
+ )" |
55 |
+# Require sandbox-2.2 for bug #288863. |
56 |
+# For whirlpool hash, require python[ssl] (bug #425046). |
57 |
+# For compgen, require bash[readline] (bug #445576). |
58 |
+# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
59 |
+# the executable. |
60 |
+RDEPEND=" |
61 |
+ !prefix? ( acct-user/portage ) |
62 |
+ app-arch/zstd |
63 |
+ >=app-arch/tar-1.27 |
64 |
+ dev-lang/python-exec:2 |
65 |
+ >=sys-apps/findutils-4.4 |
66 |
+ !build? ( |
67 |
+ >=sys-apps/sed-4.0.5 |
68 |
+ >=app-shells/bash-5.0:0[readline] |
69 |
+ >=app-admin/eselect-1.2 |
70 |
+ rsync-verify? ( |
71 |
+ >=app-portage/gemato-14.5[${PYTHON_USEDEP}] |
72 |
+ >=sec-keys/openpgp-keys-gentoo-release-20180706 |
73 |
+ >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
74 |
+ ) |
75 |
+ ) |
76 |
+ elibc_glibc? ( !prefix? ( >=sys-apps/sandbox-2.2 ) ) |
77 |
+ elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
78 |
+ kernel_linux? ( sys-apps/util-linux ) |
79 |
+ >=app-misc/pax-utils-0.1.18 |
80 |
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
81 |
+ xattr? ( kernel_linux? ( |
82 |
+ >=sys-apps/install-xattr-0.3 |
83 |
+ ) ) |
84 |
+ !<app-admin/logrotate-3.8.0 |
85 |
+ !<app-portage/gentoolkit-0.4.6 |
86 |
+ !<app-portage/repoman-2.3.10 |
87 |
+ !~app-portage/repoman-3.0.0" |
88 |
+PDEPEND=" |
89 |
+ !build? ( |
90 |
+ >=net-misc/rsync-2.6.4 |
91 |
+ >=sys-apps/file-5.41 |
92 |
+ >=sys-apps/coreutils-6.4 |
93 |
+ )" |
94 |
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
95 |
+# NOTE: FEATURES=installsources requires debugedit and rsync |
96 |
+ |
97 |
+S="${WORKDIR}"/prefix-${P} |
98 |
+ |
99 |
+pkg_pretend() { |
100 |
+ local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" |
101 |
+ |
102 |
+ if use native-extensions && tc-is-cross-compiler; then |
103 |
+ einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)" |
104 |
+ fi |
105 |
+ |
106 |
+ check_extra_config |
107 |
+} |
108 |
+ |
109 |
+python_prepare_all() { |
110 |
+ local PATCHES=( |
111 |
+ "${FILESDIR}"/${PN}-3.0.30-prefix-stack.patch # 658572 |
112 |
+ "${FILESDIR}"/${PN}-3.0.30-ebuildshell.patch # 155161 |
113 |
+ "${FILESDIR}"/${PN}-3.0.30-interrevisions.patch # 832062 |
114 |
+ ) |
115 |
+ |
116 |
+ distutils-r1_python_prepare_all |
117 |
+ |
118 |
+ sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die |
119 |
+ |
120 |
+ if use gentoo-dev; then |
121 |
+ einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
122 |
+ sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
123 |
+ -i lib/_emerge/create_depgraph_params.py || \ |
124 |
+ die "failed to patch create_depgraph_params.py" |
125 |
+ |
126 |
+ einfo "Enabling additional FEATURES for gentoo-dev..." |
127 |
+ echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ |
128 |
+ >> cnf/make.globals || die |
129 |
+ fi |
130 |
+ |
131 |
+ if use native-extensions && ! tc-is-cross-compiler; then |
132 |
+ printf "[build_ext]\nportage_ext_modules=true\n" >> \ |
133 |
+ setup.cfg || die |
134 |
+ fi |
135 |
+ |
136 |
+ if ! use ipc ; then |
137 |
+ einfo "Disabling ipc..." |
138 |
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
139 |
+ -i lib/_emerge/AbstractEbuildProcess.py || \ |
140 |
+ die "failed to patch AbstractEbuildProcess.py" |
141 |
+ fi |
142 |
+ |
143 |
+ if use xattr && use kernel_linux ; then |
144 |
+ einfo "Adding FEATURES=xattr to make.globals ..." |
145 |
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
146 |
+ || die "failed to append to make.globals" |
147 |
+ fi |
148 |
+ |
149 |
+ if use build || ! use rsync-verify; then |
150 |
+ sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
151 |
+ -e '/^sync-webrsync-verify-signature/s|yes|no|' \ |
152 |
+ -i cnf/repos.conf || die "sed failed" |
153 |
+ fi |
154 |
+ |
155 |
+ if [[ -n ${EPREFIX} ]] ; then |
156 |
+ # PREFIX LOCAL: only hack const_autotool |
157 |
+ local extrapath="/usr/sbin:/usr/bin:/sbin:/bin" |
158 |
+ # ok, we can't rely on PORTAGE_ROOT_USER being there yet, as people |
159 |
+ # tend not to update that often, as long as we are a separate ebuild |
160 |
+ # we can assume when unset, it's time for some older trick |
161 |
+ if [[ -z ${PORTAGE_ROOT_USER} ]] ; then |
162 |
+ PORTAGE_ROOT_USER=$(python -c 'from portage.const import rootuser; print rootuser') |
163 |
+ fi |
164 |
+ # We need to probe for bash in the Prefix, because it may not |
165 |
+ # exist, in which case we fall back to the currently in use |
166 |
+ # bash. This logic is necessary in particular during bootstrap, |
167 |
+ # where we pull ourselves out of a temporary place with tools |
168 |
+ local bash="${EPREFIX}/bin/bash" |
169 |
+ [[ ! -x ${bash} ]] && bash=${BASH} |
170 |
+ |
171 |
+ einfo "Adjusting sources for ${EPREFIX}" |
172 |
+ find . -type f -exec \ |
173 |
+ sed -e "s|@PORTAGE_EPREFIX@|${EPREFIX}|" \ |
174 |
+ -e "s|@PORTAGE_MV@|$(type -P mv)|" \ |
175 |
+ -e "s|@PORTAGE_BASH@|${bash}|" \ |
176 |
+ -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|" \ |
177 |
+ -e "s|@EXTRA_PATH@|${extrapath}|" \ |
178 |
+ -e "s|@portagegroup@|${PORTAGE_GROUP:-portage}|" \ |
179 |
+ -e "s|@portageuser@|${PORTAGE_USER:-portage}|" \ |
180 |
+ -e "s|@rootuser@|${PORTAGE_ROOT_USER:-root}|" \ |
181 |
+ -e "s|@rootuid@|$(id -u ${PORTAGE_ROOT_USER:-root})|" \ |
182 |
+ -e "s|@rootgid@|$(id -g ${PORTAGE_ROOT_USER:-root})|" \ |
183 |
+ -e "s|@sysconfdir@|${EPREFIX}/etc|" \ |
184 |
+ -i '{}' + || \ |
185 |
+ die "Failed to patch sources" |
186 |
+ # We don't need the below, since setup.py deals with this (and |
187 |
+ # more) so we don't have to make this correct |
188 |
+ # -e "s|@PORTAGE_BASE@|${EPREFIX}/usr/lib/portage/${EPYTHON}|" \ |
189 |
+ |
190 |
+ # remove Makefiles, or else they will get installed |
191 |
+ find . -name "Makefile.*" -delete |
192 |
+ |
193 |
+ einfo "Prefixing shebangs ..." |
194 |
+ while read -r -d $'\0' ; do |
195 |
+ local shebang=$(head -n1 "$REPLY") |
196 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
197 |
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
198 |
+ die "sed failed" |
199 |
+ fi |
200 |
+ done < <(find . -type f ! -name etc-update -print0) |
201 |
+ |
202 |
+ einfo "Setting gentoo_prefix as reponame for emerge-webrsync" |
203 |
+ sed -i -e 's/repo_name=gentoo/repo_name=gentoo_prefix/' \ |
204 |
+ bin/emerge-webrsync || die |
205 |
+ |
206 |
+ einfo "Making absent gemato non-fatal" |
207 |
+ sed -i -e '/exitcode = 127/d' \ |
208 |
+ lib/portage/sync/modules/rsync/rsync.py || die |
209 |
+ # END PREFIX LOCAL |
210 |
+ fi |
211 |
+ |
212 |
+ # PREFIX LOCAL: make.conf is written by bootstrap-prefix.sh |
213 |
+ if use !prefix ; then |
214 |
+ cd "${S}/cnf" || die |
215 |
+ if [ -f "make.conf.example.${ARCH}".diff ]; then |
216 |
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
217 |
+ die "Failed to patch make.conf.example" |
218 |
+ else |
219 |
+ eerror "" |
220 |
+ eerror "Portage does not have an arch-specific configuration for this arch." |
221 |
+ eerror "Please notify the arch maintainer about this issue. Using generic." |
222 |
+ eerror "" |
223 |
+ fi |
224 |
+ fi |
225 |
+} |
226 |
+ |
227 |
+python_compile_all() { |
228 |
+ local targets=() |
229 |
+ use doc && targets+=( docbook ) |
230 |
+ use apidoc && targets+=( apidoc ) |
231 |
+ |
232 |
+ if [[ ${targets[@]} ]]; then |
233 |
+ esetup.py "${targets[@]}" |
234 |
+ fi |
235 |
+} |
236 |
+ |
237 |
+python_test() { |
238 |
+ esetup.py test |
239 |
+} |
240 |
+ |
241 |
+python_install() { |
242 |
+ # Install sbin scripts to bindir for python-exec linking |
243 |
+ # they will be relocated in pkg_preinst() |
244 |
+ distutils-r1_python_install \ |
245 |
+ --system-prefix="${EPREFIX}/usr" \ |
246 |
+ --bindir="$(python_get_scriptdir)" \ |
247 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
248 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
249 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
250 |
+ --sbindir="$(python_get_scriptdir)" \ |
251 |
+ --sysconfdir="${EPREFIX}/etc" \ |
252 |
+ "${@}" |
253 |
+} |
254 |
+ |
255 |
+python_install_all() { |
256 |
+ distutils-r1_python_install_all |
257 |
+ |
258 |
+ local targets=() |
259 |
+ use doc && targets+=( |
260 |
+ install_docbook |
261 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
262 |
+ ) |
263 |
+ use apidoc && targets+=( |
264 |
+ install_apidoc |
265 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
266 |
+ ) |
267 |
+ |
268 |
+ # install docs |
269 |
+ if [[ ${targets[@]} ]]; then |
270 |
+ esetup.py "${targets[@]}" |
271 |
+ fi |
272 |
+ |
273 |
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf |
274 |
+ |
275 |
+ # Due to distutils/python-exec limitations |
276 |
+ # these must be installed to /usr/bin. |
277 |
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
278 |
+ einfo "Moving admin scripts to the correct directory" |
279 |
+ dodir /usr/sbin |
280 |
+ for target in ${sbin_relocations}; do |
281 |
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
282 |
+ mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" |
283 |
+ done |
284 |
+} |
285 |
+ |
286 |
+pkg_preinst() { |
287 |
+ if ! use build; then |
288 |
+ python_setup |
289 |
+ local sitedir=$(python_get_sitedir) |
290 |
+ [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" |
291 |
+ env -u DISTDIR \ |
292 |
+ -u PORTAGE_OVERRIDE_EPREFIX \ |
293 |
+ -u PORTAGE_REPOSITORIES \ |
294 |
+ -u PORTDIR \ |
295 |
+ -u PORTDIR_OVERLAY \ |
296 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
297 |
+ "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
298 |
+ |
299 |
+ env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ |
300 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
301 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die |
302 |
+ |
303 |
+ env -u FEATURES -u PORTAGE_REPOSITORIES \ |
304 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
305 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die |
306 |
+ fi |
307 |
+ |
308 |
+ # elog dir must exist to avoid logrotate error for bug #415911. |
309 |
+ # This code runs in preinst in order to bypass the mapping of |
310 |
+ # portage:portage to root:root which happens after src_install. |
311 |
+ keepdir /var/log/portage/elog |
312 |
+ # This is allowed to fail if the user/group are invalid for prefix users. |
313 |
+ if chown ${PORTAGE_USER}:${PORTAGE_GROUP} "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then |
314 |
+ chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} |
315 |
+ fi |
316 |
+ |
317 |
+ if has_version "<${CATEGORY}/${PN}-2.3.77"; then |
318 |
+ elog "The emerge --autounmask option is now disabled by default, except for" |
319 |
+ elog "portions of behavior which are controlled by the --autounmask-use and" |
320 |
+ elog "--autounmask-license options. For backward compatibility, previous" |
321 |
+ elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." |
322 |
+ elog "Users can get the old behavior simply by adding --autounmask to the" |
323 |
+ elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" |
324 |
+ elog "change, see https://bugs.gentoo.org/658648." |
325 |
+ fi |
326 |
+} |