1 |
Signed-off-by: WANG Xuerui <xen0n@g.o> |
2 |
--- |
3 |
.../portage/files/3.0.30-loong-abis.patch | 133 +++++++++ |
4 |
sys-apps/portage/portage-3.0.30-r5.ebuild | 277 ++++++++++++++++++ |
5 |
2 files changed, 410 insertions(+) |
6 |
create mode 100644 sys-apps/portage/files/3.0.30-loong-abis.patch |
7 |
create mode 100644 sys-apps/portage/portage-3.0.30-r5.ebuild |
8 |
|
9 |
diff --git a/sys-apps/portage/files/3.0.30-loong-abis.patch b/sys-apps/portage/files/3.0.30-loong-abis.patch |
10 |
new file mode 100644 |
11 |
index 00000000000..7558107570c |
12 |
--- /dev/null |
13 |
+++ b/sys-apps/portage/files/3.0.30-loong-abis.patch |
14 |
@@ -0,0 +1,133 @@ |
15 |
+From f6cdba7689ea423245a232cc13103dd988363845 Mon Sep 17 00:00:00 2001 |
16 |
+From: WANG Xuerui <git@×××××.name> |
17 |
+Date: Mon, 9 Aug 2021 15:31:25 +0800 |
18 |
+Subject: [PATCH] multilib_category.py: recognize LoongArch ABIs |
19 |
+ |
20 |
+Add its ELF machine number constant as well. The Gentoo ARCH is "loong"; |
21 |
+all six ABIs defined in the LoongArch ELF psABI spec [1] are supported. |
22 |
+The upstream binutils port currently implements an earlier version of the |
23 |
+spec [2]; the ILP32 ABIs are never fully implemented so far, and the |
24 |
+value for LP64D is coincidentally the same, so the code here stays |
25 |
+compatible. |
26 |
+ |
27 |
+This is preparatory work towards a port to the LoongArch architecture, |
28 |
+which is the new RISC architecture from Loongson Corporation after |
29 |
+switching away from MIPS. |
30 |
+ |
31 |
+[1]: https://github.com/loongson/LoongArch-Documentation/blob/23d53fe146a4/docs/LoongArch-ELF-ABI-EN.adoc |
32 |
+[2]: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h;h=b4d801ae9bd5a6c4562ca6b1cbae6e6d45d6c704;hb=HEAD |
33 |
+ |
34 |
+Signed-off-by: WANG Xuerui <git@×××××.name> |
35 |
+Closes: https://github.com/gentoo/portage/pull/740 |
36 |
+Signed-off-by: Sam James <sam@g.o> |
37 |
+--- |
38 |
+ lib/portage/dep/soname/multilib_category.py | 26 +++++++++++++++++++++ |
39 |
+ lib/portage/util/elf/constants.py | 9 +++++++ |
40 |
+ 2 files changed, 35 insertions(+) |
41 |
+ |
42 |
+diff --git a/lib/portage/dep/soname/multilib_category.py b/lib/portage/dep/soname/multilib_category.py |
43 |
+index ab855d339..567b1d32e 100644 |
44 |
+--- a/lib/portage/dep/soname/multilib_category.py |
45 |
++++ b/lib/portage/dep/soname/multilib_category.py |
46 |
+@@ -11,6 +11,7 @@ |
47 |
+ # arm_{32,64} |
48 |
+ # hppa_{32,64} |
49 |
+ # ia_{32,64} |
50 |
++# loong_{ilp32s,ilp32f,ilp32d,lp64s,lp64f,lp64d} |
51 |
+ # m68k_{32,64} |
52 |
+ # mips_{eabi32,eabi64,n32,n64,o32,o64} |
53 |
+ # ppc_{32,64} |
54 |
+@@ -37,6 +38,13 @@ from portage.util.elf.constants import ( |
55 |
+ EF_MIPS_ABI2, |
56 |
+ EF_RISCV_FLOAT_ABI_DOUBLE, |
57 |
+ EF_RISCV_RVC, |
58 |
++ EF_LOONGARCH_ABI_LP64_SOFT_FLOAT, |
59 |
++ EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT, |
60 |
++ EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT, |
61 |
++ EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT, |
62 |
++ EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT, |
63 |
++ EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT, |
64 |
++ EF_LOONGARCH_ABI_MASK, |
65 |
+ ELFCLASS32, |
66 |
+ ELFCLASS64, |
67 |
+ EM_386, |
68 |
+@@ -46,6 +54,7 @@ from portage.util.elf.constants import ( |
69 |
+ EM_ARM, |
70 |
+ EM_ALTERA_NIOS2, |
71 |
+ EM_IA_64, |
72 |
++ EM_LOONGARCH, |
73 |
+ EM_MIPS, |
74 |
+ EM_PARISC, |
75 |
+ EM_PPC, |
76 |
+@@ -71,6 +80,7 @@ _machine_prefix_map = { |
77 |
+ EM_ALTERA_NIOS2: "nios2", |
78 |
+ EM_ARM: "arm", |
79 |
+ EM_IA_64: "ia64", |
80 |
++ EM_LOONGARCH: "loong", |
81 |
+ EM_MIPS: "mips", |
82 |
+ EM_PARISC: "hppa", |
83 |
+ EM_PPC: "ppc", |
84 |
+@@ -84,6 +94,15 @@ _machine_prefix_map = { |
85 |
+ EM_X86_64: "x86", |
86 |
+ } |
87 |
+ |
88 |
++_loong_abi_map = { |
89 |
++ EF_LOONGARCH_ABI_LP64_SOFT_FLOAT: "lp64s", |
90 |
++ EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT: "lp64f", |
91 |
++ EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT: "lp64d", |
92 |
++ EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT: "ilp32s", |
93 |
++ EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT: "ilp32f", |
94 |
++ EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT: "ilp32d", |
95 |
++} |
96 |
++ |
97 |
+ _mips_abi_map = { |
98 |
+ E_MIPS_ABI_EABI32: "eabi32", |
99 |
+ E_MIPS_ABI_EABI64: "eabi64", |
100 |
+@@ -92,6 +111,12 @@ _mips_abi_map = { |
101 |
+ } |
102 |
+ |
103 |
+ |
104 |
++def _compute_suffix_loong(elf_header): |
105 |
++ |
106 |
++ loong_abi = elf_header.e_flags & EF_LOONGARCH_ABI_MASK |
107 |
++ return _loong_abi_map.get(loong_abi) |
108 |
++ |
109 |
++ |
110 |
+ def _compute_suffix_mips(elf_header): |
111 |
+ |
112 |
+ name = None |
113 |
+@@ -136,6 +161,7 @@ def _compute_suffix_riscv(elf_header): |
114 |
+ |
115 |
+ |
116 |
+ _specialized_funcs = { |
117 |
++ "loong": _compute_suffix_loong, |
118 |
+ "mips": _compute_suffix_mips, |
119 |
+ "riscv": _compute_suffix_riscv, |
120 |
+ } |
121 |
+diff --git a/lib/portage/util/elf/constants.py b/lib/portage/util/elf/constants.py |
122 |
+index d86b39483..19b72cfa1 100644 |
123 |
+--- a/lib/portage/util/elf/constants.py |
124 |
++++ b/lib/portage/util/elf/constants.py |
125 |
+@@ -36,6 +36,7 @@ EM_X86_64 = 62 |
126 |
+ EM_ALTERA_NIOS2 = 113 |
127 |
+ EM_AARCH64 = 183 |
128 |
+ EM_RISCV = 243 |
129 |
++EM_LOONGARCH = 258 |
130 |
+ EM_ALPHA = 0x9026 |
131 |
+ |
132 |
+ E_ENTRY = 24 |
133 |
+@@ -52,3 +53,11 @@ EF_RISCV_FLOAT_ABI_SOFT = 0x0000 |
134 |
+ EF_RISCV_FLOAT_ABI_SINGLE = 0x0002 |
135 |
+ EF_RISCV_FLOAT_ABI_DOUBLE = 0x0004 |
136 |
+ EF_RISCV_FLOAT_ABI_QUAD = 0x0006 |
137 |
++ |
138 |
++EF_LOONGARCH_ABI_LP64_SOFT_FLOAT = 0b001 |
139 |
++EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT = 0b010 |
140 |
++EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT = 0b011 |
141 |
++EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT = 0b101 |
142 |
++EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT = 0b110 |
143 |
++EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT = 0b111 |
144 |
++EF_LOONGARCH_ABI_MASK = 0x07 |
145 |
+-- |
146 |
+2.35.1 |
147 |
+ |
148 |
diff --git a/sys-apps/portage/portage-3.0.30-r5.ebuild b/sys-apps/portage/portage-3.0.30-r5.ebuild |
149 |
new file mode 100644 |
150 |
index 00000000000..e3b118e5295 |
151 |
--- /dev/null |
152 |
+++ b/sys-apps/portage/portage-3.0.30-r5.ebuild |
153 |
@@ -0,0 +1,277 @@ |
154 |
+# Copyright 1999-2022 Gentoo Authors |
155 |
+# Distributed under the terms of the GNU General Public License v2 |
156 |
+ |
157 |
+EAPI=7 |
158 |
+ |
159 |
+PYTHON_COMPAT=( pypy3 python3_{8..10} ) |
160 |
+PYTHON_REQ_USE='bzip2(+),threads(+)' |
161 |
+TMPFILES_OPTIONAL=1 |
162 |
+ |
163 |
+inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix |
164 |
+ |
165 |
+DESCRIPTION="The package management and distribution system for Gentoo" |
166 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
167 |
+SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" |
168 |
+ |
169 |
+LICENSE="GPL-2" |
170 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
171 |
+SLOT="0" |
172 |
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" |
173 |
+RESTRICT="!test? ( test )" |
174 |
+ |
175 |
+BDEPEND=" |
176 |
+ app-arch/xz-utils |
177 |
+ test? ( dev-vcs/git )" |
178 |
+DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) |
179 |
+ >=app-arch/tar-1.27 |
180 |
+ dev-lang/python-exec:2 |
181 |
+ >=sys-apps/sed-4.0.5 sys-devel/patch |
182 |
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
183 |
+ apidoc? ( |
184 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
185 |
+ dev-python/sphinx-epytext[${PYTHON_USEDEP}] |
186 |
+ )" |
187 |
+# Require sandbox-2.2 for bug #288863. |
188 |
+# For whirlpool hash, require python[ssl] (bug #425046). |
189 |
+# For compgen, require bash[readline] (bug #445576). |
190 |
+# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
191 |
+# the executable. |
192 |
+RDEPEND=" |
193 |
+ acct-user/portage |
194 |
+ app-arch/zstd |
195 |
+ >=app-arch/tar-1.27 |
196 |
+ dev-lang/python-exec:2 |
197 |
+ >=sys-apps/findutils-4.4 |
198 |
+ !build? ( |
199 |
+ >=sys-apps/sed-4.0.5 |
200 |
+ >=app-shells/bash-5.0:0[readline] |
201 |
+ >=app-admin/eselect-1.2 |
202 |
+ rsync-verify? ( |
203 |
+ >=app-portage/gemato-14.5[${PYTHON_USEDEP}] |
204 |
+ >=sec-keys/openpgp-keys-gentoo-release-20180706 |
205 |
+ >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
206 |
+ ) |
207 |
+ ) |
208 |
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
209 |
+ elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
210 |
+ kernel_linux? ( sys-apps/util-linux ) |
211 |
+ >=app-misc/pax-utils-0.1.17 |
212 |
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
213 |
+ xattr? ( kernel_linux? ( |
214 |
+ >=sys-apps/install-xattr-0.3 |
215 |
+ ) ) |
216 |
+ !<app-admin/logrotate-3.8.0 |
217 |
+ !<app-portage/gentoolkit-0.4.6 |
218 |
+ !<app-portage/repoman-2.3.10 |
219 |
+ !~app-portage/repoman-3.0.0" |
220 |
+PDEPEND=" |
221 |
+ !build? ( |
222 |
+ >=net-misc/rsync-2.6.4 |
223 |
+ >=sys-apps/file-5.41 |
224 |
+ >=sys-apps/coreutils-6.4 |
225 |
+ )" |
226 |
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
227 |
+# NOTE: FEATURES=installsources requires debugedit and rsync |
228 |
+ |
229 |
+pkg_pretend() { |
230 |
+ local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" |
231 |
+ |
232 |
+ if use native-extensions && tc-is-cross-compiler; then |
233 |
+ einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)" |
234 |
+ fi |
235 |
+ |
236 |
+ check_extra_config |
237 |
+} |
238 |
+ |
239 |
+python_prepare_all() { |
240 |
+ local PATCHES=( |
241 |
+ "${FILESDIR}/3.0.30-revert-default-enable-soname-dependencies.patch" |
242 |
+ "${FILESDIR}/3.0.30-revert-run-warn.patch" |
243 |
+ "${FILESDIR}/3.0.30-qa-checks.patch" |
244 |
+ "${FILESDIR}/3.0.30-loong-abis.patch" |
245 |
+ ) |
246 |
+ |
247 |
+ distutils-r1_python_prepare_all |
248 |
+ |
249 |
+ sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die |
250 |
+ |
251 |
+ if use gentoo-dev; then |
252 |
+ einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
253 |
+ sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
254 |
+ -i lib/_emerge/create_depgraph_params.py || \ |
255 |
+ die "failed to patch create_depgraph_params.py" |
256 |
+ |
257 |
+ einfo "Enabling additional FEATURES for gentoo-dev..." |
258 |
+ echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ |
259 |
+ >> cnf/make.globals || die |
260 |
+ fi |
261 |
+ |
262 |
+ if use native-extensions && ! tc-is-cross-compiler; then |
263 |
+ printf "[build_ext]\nportage_ext_modules=true\n" >> \ |
264 |
+ setup.cfg || die |
265 |
+ fi |
266 |
+ |
267 |
+ if ! use ipc ; then |
268 |
+ einfo "Disabling ipc..." |
269 |
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
270 |
+ -i lib/_emerge/AbstractEbuildProcess.py || \ |
271 |
+ die "failed to patch AbstractEbuildProcess.py" |
272 |
+ fi |
273 |
+ |
274 |
+ if use xattr && use kernel_linux ; then |
275 |
+ einfo "Adding FEATURES=xattr to make.globals ..." |
276 |
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
277 |
+ || die "failed to append to make.globals" |
278 |
+ fi |
279 |
+ |
280 |
+ if use build || ! use rsync-verify; then |
281 |
+ sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
282 |
+ -e '/^sync-webrsync-verify-signature/s|yes|no|' \ |
283 |
+ -i cnf/repos.conf || die "sed failed" |
284 |
+ fi |
285 |
+ |
286 |
+ if [[ -n ${EPREFIX} ]] ; then |
287 |
+ einfo "Setting portage.const.EPREFIX ..." |
288 |
+ hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
289 |
+ -w "/_BINARY/" lib/portage/const.py |
290 |
+ |
291 |
+ einfo "Prefixing shebangs ..." |
292 |
+ > "${T}/shebangs" || die |
293 |
+ while read -r -d $'\0' ; do |
294 |
+ local shebang=$(head -n1 "$REPLY") |
295 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
296 |
+ echo "${REPLY}" >> "${T}/shebangs" || die |
297 |
+ fi |
298 |
+ done < <(find . -type f -executable ! -name etc-update -print0) |
299 |
+ |
300 |
+ if [[ -s ${T}/shebangs ]]; then |
301 |
+ xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed" |
302 |
+ fi |
303 |
+ |
304 |
+ einfo "Adjusting make.globals, repos.conf and etc-update ..." |
305 |
+ hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
306 |
+ |
307 |
+ if use prefix-guest ; then |
308 |
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
309 |
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
310 |
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
311 |
+ -i cnf/repos.conf || die "sed failed" |
312 |
+ fi |
313 |
+ |
314 |
+ einfo "Adding FEATURES=force-prefix to make.globals ..." |
315 |
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
316 |
+ || die "failed to append to make.globals" |
317 |
+ fi |
318 |
+ |
319 |
+ cd "${S}/cnf" || die |
320 |
+ if [ -f "make.conf.example.${ARCH}".diff ]; then |
321 |
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
322 |
+ die "Failed to patch make.conf.example" |
323 |
+ else |
324 |
+ eerror "" |
325 |
+ eerror "Portage does not have an arch-specific configuration for this arch." |
326 |
+ eerror "Please notify the arch maintainer about this issue. Using generic." |
327 |
+ eerror "" |
328 |
+ fi |
329 |
+} |
330 |
+ |
331 |
+python_compile_all() { |
332 |
+ local targets=() |
333 |
+ use doc && targets+=( docbook ) |
334 |
+ use apidoc && targets+=( apidoc ) |
335 |
+ |
336 |
+ if [[ ${targets[@]} ]]; then |
337 |
+ esetup.py "${targets[@]}" |
338 |
+ fi |
339 |
+} |
340 |
+ |
341 |
+python_test() { |
342 |
+ esetup.py test |
343 |
+} |
344 |
+ |
345 |
+python_install() { |
346 |
+ # Install sbin scripts to bindir for python-exec linking |
347 |
+ # they will be relocated in pkg_preinst() |
348 |
+ distutils-r1_python_install \ |
349 |
+ --system-prefix="${EPREFIX}/usr" \ |
350 |
+ --bindir="$(python_get_scriptdir)" \ |
351 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
352 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
353 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
354 |
+ --sbindir="$(python_get_scriptdir)" \ |
355 |
+ --sysconfdir="${EPREFIX}/etc" \ |
356 |
+ "${@}" |
357 |
+} |
358 |
+ |
359 |
+python_install_all() { |
360 |
+ distutils-r1_python_install_all |
361 |
+ |
362 |
+ local targets=() |
363 |
+ use doc && targets+=( |
364 |
+ install_docbook |
365 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
366 |
+ ) |
367 |
+ use apidoc && targets+=( |
368 |
+ install_apidoc |
369 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
370 |
+ ) |
371 |
+ |
372 |
+ # install docs |
373 |
+ if [[ ${targets[@]} ]]; then |
374 |
+ esetup.py "${targets[@]}" |
375 |
+ fi |
376 |
+ |
377 |
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf |
378 |
+ |
379 |
+ # Due to distutils/python-exec limitations |
380 |
+ # these must be installed to /usr/bin. |
381 |
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
382 |
+ einfo "Moving admin scripts to the correct directory" |
383 |
+ dodir /usr/sbin |
384 |
+ for target in ${sbin_relocations}; do |
385 |
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
386 |
+ mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" |
387 |
+ done |
388 |
+} |
389 |
+ |
390 |
+pkg_preinst() { |
391 |
+ if ! use build; then |
392 |
+ python_setup |
393 |
+ local sitedir=$(python_get_sitedir) |
394 |
+ [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" |
395 |
+ env -u DISTDIR \ |
396 |
+ -u PORTAGE_OVERRIDE_EPREFIX \ |
397 |
+ -u PORTAGE_REPOSITORIES \ |
398 |
+ -u PORTDIR \ |
399 |
+ -u PORTDIR_OVERLAY \ |
400 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
401 |
+ "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
402 |
+ |
403 |
+ env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ |
404 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
405 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die |
406 |
+ |
407 |
+ env -u FEATURES -u PORTAGE_REPOSITORIES \ |
408 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
409 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die |
410 |
+ fi |
411 |
+ |
412 |
+ # elog dir must exist to avoid logrotate error for bug #415911. |
413 |
+ # This code runs in preinst in order to bypass the mapping of |
414 |
+ # portage:portage to root:root which happens after src_install. |
415 |
+ keepdir /var/log/portage/elog |
416 |
+ # This is allowed to fail if the user/group are invalid for prefix users. |
417 |
+ if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then |
418 |
+ chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} |
419 |
+ fi |
420 |
+ |
421 |
+ if has_version "<${CATEGORY}/${PN}-2.3.77"; then |
422 |
+ elog "The emerge --autounmask option is now disabled by default, except for" |
423 |
+ elog "portions of behavior which are controlled by the --autounmask-use and" |
424 |
+ elog "--autounmask-license options. For backward compatibility, previous" |
425 |
+ elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." |
426 |
+ elog "Users can get the old behavior simply by adding --autounmask to the" |
427 |
+ elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" |
428 |
+ elog "change, see https://bugs.gentoo.org/658648." |
429 |
+ fi |
430 |
+} |
431 |
-- |
432 |
2.35.1 |