diff options
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/Manifest.gz | bin | 49300 -> 49299 bytes | |||
-rw-r--r-- | sys-apps/gnome-disk-utility/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/gnome-disk-utility/gnome-disk-utility-42.0.ebuild | 2 | ||||
-rw-r--r-- | sys-apps/gnome-disk-utility/gnome-disk-utility-43.0.ebuild | 2 | ||||
-rw-r--r-- | sys-apps/portage/Manifest | 5 | ||||
-rw-r--r-- | sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch | 90 | ||||
-rw-r--r-- | sys-apps/portage/portage-3.0.38.1-r3.ebuild (renamed from sys-apps/portage/portage-3.0.38.1-r2.ebuild) | 1 | ||||
-rw-r--r-- | sys-apps/portage/portage-3.0.39.ebuild | 273 |
8 files changed, 372 insertions, 5 deletions
diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz Binary files differindex e7d6bc845baa..77274e3d6633 100644 --- a/sys-apps/Manifest.gz +++ b/sys-apps/Manifest.gz diff --git a/sys-apps/gnome-disk-utility/Manifest b/sys-apps/gnome-disk-utility/Manifest index f45861dfee0b..53713df3eda9 100644 --- a/sys-apps/gnome-disk-utility/Manifest +++ b/sys-apps/gnome-disk-utility/Manifest @@ -1,5 +1,5 @@ DIST gnome-disk-utility-42.0.tar.xz 1740332 BLAKE2B 4d05876364a475d1e16651569862fe3e9bb97549463146e69722c55922c0609069334e198eff91208448dc0baf7fcefe6bab56612e89fd7412fea42ba20549d2 SHA512 c47c37262295ba455b483a7ebe7799e92f94b97d177327817bb088cddcc3ff1f5840c3e270651287ff6a88257ec7cfcd1abe4167bf7454bbf55e145c8f1dc7c9 DIST gnome-disk-utility-43.0.tar.xz 1752240 BLAKE2B 906183e7f61c4e9d2206fe2c99034f06a0aa3869d253587325ae18b336dffc6d8523a2f4d89c4338ed64947e73c5a24de15dfdb15a9d42d77fe51fd2321bf159 SHA512 8cb1b10fba21c90bceec9521103defe092dea9a4c89a39ae44e4d5981dd0d1958649e7a2743535f0135a3c9179cad0e0aced98dfc805e19bdec81651abcecf48 -EBUILD gnome-disk-utility-42.0.ebuild 1420 BLAKE2B f49175cccf7b980232eead9e9d9c8bb88c89c6b1fbd9e80d54f1d1d74505757995c40d50c70e6cf1b70866306ebf8d138f86c9d27aa8d0f630e676a72ca1c8d1 SHA512 07e8d01b90398ec739b4a2d1d421e7b340fde1b437707312e71b0572663c91a2d4881dc7fbd95cbe44819f77d383a1c6a9f6da0d0f56ebb77282680d832cd769 -EBUILD gnome-disk-utility-43.0.ebuild 1418 BLAKE2B fdef9e1423b8fdeb3945dee053d4a4d5585e5dcb753eab2bd0d977f367f81fde6c4bdc49805d19495f80f0c31bdaabd874a41c1a1718e971dcd676b7ea52d794 SHA512 630a612e932a82d7f4d66c2df2bd1b36c9fc9285748bfa3d2dea8da074a66e0d639c43e5151c298cbd242cfb8f036c5bea35bf772aeac261f55e9a3afd1df6a4 +EBUILD gnome-disk-utility-42.0.ebuild 1407 BLAKE2B eef5ba0d244ecdcd3a995c52280934e2136f0851e2ab13cc1f290788bc6c6901722f5cf8e25c8ac1fdfff3a1074aa959c55b3c9bd62ecce75e17ed3eb01cab93 SHA512 85156c76e9eed9e9b1f3f8d1c26fa65ace2785892e999ccc9b0396c5d66648d1a2faf53491e334cde2d46b18b26f8ecf7b0beee5ccccb389f866ef3b56868fba +EBUILD gnome-disk-utility-43.0.ebuild 1405 BLAKE2B 82084e8cd28843cb58815cd95f8ca1964cdb5213a287c2d7ea66a8f8b2292ae6621776a5313d3a6e72fa7dc30e3dcb2acd9be42e4711915eede3f71e63b58049 SHA512 fe775e549a935e1ecc471e1e3cd601d01263bde05f19bd92743c0cd477e0f7dd203df18bf28eb41ac840a983917a362c6757683d1e6ce499e1dd2dbedb287229 MISC metadata.xml 725 BLAKE2B 173521fe25d9d15cc28c6c4abb434b246222a2c6e15392fdf655e4be1006f83026e9fabf7d29f9d41421c5f13f114c6649971defe18bde1ae1c40f7355859902 SHA512 88e461ac9ac3c8d2a321ef3a1ad44d17b8b3e4355f92320857c77b1a5c6d707d3b3613518dda5cfec9fe4e44067f97a9bac9b1b56ac037b7f0d86da82ecc93b3 diff --git a/sys-apps/gnome-disk-utility/gnome-disk-utility-42.0.ebuild b/sys-apps/gnome-disk-utility/gnome-disk-utility-42.0.ebuild index 40d5fcad3ceb..24e660b41759 100644 --- a/sys-apps/gnome-disk-utility/gnome-disk-utility-42.0.ebuild +++ b/sys-apps/gnome-disk-utility/gnome-disk-utility-42.0.ebuild @@ -12,7 +12,7 @@ LICENSE="GPL-2+" SLOT="0" IUSE="fat elogind gnome systemd" REQUIRED_USE="?? ( elogind systemd )" -KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc x86" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~sparc x86" DEPEND=" >=media-libs/libdvdread-4.2.0:0= diff --git a/sys-apps/gnome-disk-utility/gnome-disk-utility-43.0.ebuild b/sys-apps/gnome-disk-utility/gnome-disk-utility-43.0.ebuild index cb1135011494..09c0f1d81bfb 100644 --- a/sys-apps/gnome-disk-utility/gnome-disk-utility-43.0.ebuild +++ b/sys-apps/gnome-disk-utility/gnome-disk-utility-43.0.ebuild @@ -12,7 +12,7 @@ LICENSE="GPL-2+" SLOT="0" IUSE="fat elogind gnome systemd" REQUIRED_USE="?? ( elogind systemd )" -KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" DEPEND=" >=media-libs/libdvdread-4.2.0:0= diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index e048b5c1709d..dda7c73eaa21 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -1,7 +1,10 @@ AUX README.RESCUE 134 BLAKE2B 2cd153e0077388f29e11779670086c50fb1a470b9bb76969a747313021bb85c37b20327ab2feb9b2cc715849245875e7d8a5ae6ceee84b4a33d532996cb793bd SHA512 0df49e479e551648519ea4db0986584463eed498f77b133bd0e517389e71f4ff4069f1a5017c39f349bae62baa2ac32d968048c396261a9045ff00a0e5aa8bf4 +AUX portage-3.0.38.1-xz-32-bit.patch 4263 BLAKE2B 83ee332acc8290a1e96eaafbfff7e42c6a686c4dc34e1fb2e1e935fe04cd98071d14299d76294e8d4178615ee9309985a7f508a7aaad0f9f0efaaeeb89301565 SHA512 6d75e5bdc463ffed264b4db5a953a7bb49971109ea88c4645d1c35dd2d5e8f0a4913a2fc20b858a91921734f6ff906293b14308e24bf591d86150e93af6bbcc8 AUX portage-ccache.conf 60 BLAKE2B b45ac69ba4bf6b221191ab9618aa484948ad8765ae906402e83df4b72fd10e006621523fe5b6d59219318a978e368649047784bb85771cd189b2542a2e19f941 SHA512 36427e57046118ecf982fc3b1a80a3543b5682e3eef7df5dfc8a50b261a5da56f997dd75f63c5194049aceea204c37aee638a3bc383b9f7a0eff8ac9c35f3b1c AUX portage-tmpdir.conf 76 BLAKE2B 79f35df57dbdcd461d94d558212261df7df54253d5205b40a0a0640ce2a7ae553a84d7aa8d8c11a776cac44b7573b842951ec11f8ab393145edb1786d6837e79 SHA512 4810d8ae1f8291d34b756897972841d30d5f50b48597a430cb8ddb102dab07a7f0d78c3901b6fdd6763180e92b5ae90a3cb88ae5a5c1cae845b23b49d03a87fd DIST portage-3.0.38.1.tar.bz2 1116216 BLAKE2B d1cb4cc1924673d07ea7174ad0a84b3af977dd28ca659695d3e4014e4aa83b054acba82a160e7c0a8d3d4fbc3514bea619c3d720e450cb4890818e4b1bc1e43a SHA512 1375565e936276fd6cfd2a4f6f782b91e234e973d6a998f2276a076dd165272bcf12067fd01e77b238f194eac69edf967bbe3ac62edc3701fe9375c693622ab9 -EBUILD portage-3.0.38.1-r2.ebuild 8779 BLAKE2B a8ddc97040cf50ead0242077badd51673e8ddf2e4daf8169858d71985e34eb03e79a2aac8ecb08130e3cb313365c37e1a48f3025c176a06f764ab80405ef6de9 SHA512 1aa325bfb8d92f97400750fba1675507a3a39bfe20bafabb1c9c46f1e27e5328cfa8d1e54af8891754025b50824099c0ef011347de6896df893b8b92dc679321 +DIST portage-3.0.39.tar.bz2 1118397 BLAKE2B bd0105c48741cdf11166208ebf11f524cb87980a027b69ccdcc2a607847dcd79d886b542adf08eefdd2df8a35e78f95f0f79843694ec9c2b1488d7ee1fd187e8 SHA512 e3ef14136b0ffb5f77fed9cb89ce6ee59425dd34acc5254390e75164aee160e954498bca4084f3d71642f285ba040ce8347badf6382dd1369aa52425ce907e39 +EBUILD portage-3.0.38.1-r3.ebuild 8816 BLAKE2B a4b16acb3a8c3e784f8cca4c87e34f764cd7b0c9a6a8986b7d6ae55d7759d800ed63168db30376e94d0cc68a4688ee459eb6f45065109934ce56eae6da842208 SHA512 5d9e7f9a569aad67e0e86ba2980e4904d06c4ae0c98bf962286856f082d163934ea3d9d07b0733c25c2bfe41d93e423e5896ce3033d6966f05313a7f26ab4a92 +EBUILD portage-3.0.39.ebuild 8787 BLAKE2B aa9f190271cf3a6c54bd06bb95c794e00feece7886d51bacec1ae641292dae42d5201218ccbd407e8ff3cf879e43f966ed9a4bf918144c8fe3549e94943f57cd SHA512 3ec8230d35724fe013f78a8bf236ecf8a5fb9c04b0dad27c8b79be50e8880249e7a64a3425c27c48a6a48f91e12ce5857abd24d22de0bafbbf1f797e0c50f254 EBUILD portage-9999.ebuild 8027 BLAKE2B dcca51396bb7f1b4239ef6ac4b9ef5b0dab1f5066311d64e452582c277e93cead914ab454a4ff8eb0673ad031a92a4994f15fa6a5219e611eb07b9d84af2a277 SHA512 ddbb34220d7f62756eace84ebd6b41382218a66ae992748ac99e76128016423342a0c5cfb972513805d204180ba69276434060a29649fd035d7aee1817f70574 MISC metadata.xml 1487 BLAKE2B 5b9833e8bfc2c38e4db95f2368a65d85623aa8dd166e4e09bed4cbe3a7e59d47da69a9dff1e6615fd64f349cc05f57217ee61ebfd23e3e13622a7573ea135659 SHA512 b22f8c1f3a4dce636d0f823f1303f60d32fd570b484e93a64dfbdcbe145534b3472ae94c1ac992a478c9e2930fbc8a5311e0080b4722f9b5dc29dff59ddaa7c8 diff --git a/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch b/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch new file mode 100644 index 000000000000..fa50fbab01fc --- /dev/null +++ b/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch @@ -0,0 +1,90 @@ +https://github.com/gentoo/portage/commit/6a47cc7bcf49b7c17fdca31969b6d6aeff84332c +https://github.com/gentoo/portage/commit/041da67db3a61d19fa5b287db4da9c51794af115 +https://github.com/gentoo/portage/commit/6834e464803b5ac98f8ab1bbca5379970b5bc6d9 + +From 6a47cc7bcf49b7c17fdca31969b6d6aeff84332c Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 17 Oct 2022 19:37:03 +0100 +Subject: [PATCH] xz: add workaround for < xz 5.3.3_alpha 32-bit issue + +With older versions of xz, xz -T0 will on 32-bit systems +try to allocate too much memory and bail out. + +After discussing with upstream, we set --memlimit-compress=50% as a +way to make things work with both older & newer versions. This limiting +is essentially already present with >= 5.3.3_alpha as -T0 includes it. + +Note that we don't need to do this for decompression as it's automatic +there for newer versions and older versions -Tn a no-op. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/bin/ecompress ++++ b/bin/ecompress +@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then + # See: https://bugs.gentoo.org/672916 + # Setting '--rm' will remove the source files after a successful compression. + lz4) PORTAGE_COMPRESS_FLAGS="-m --rm";; +- xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs)";; ++ xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) --memlimit-compress=50%";; + zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";; + esac + fi + +From 041da67db3a61d19fa5b287db4da9c51794af115 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 17 Oct 2022 23:07:58 +0100 +Subject: [PATCH] xz: pass -q to xz + +Avoids noise from memlimit-compress. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/bin/ecompress ++++ b/bin/ecompress +@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then + # See: https://bugs.gentoo.org/672916 + # Setting '--rm' will remove the source files after a successful compression. + lz4) PORTAGE_COMPRESS_FLAGS="-m --rm";; +- xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) --memlimit-compress=50%";; ++ xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) --memlimit-compress=50% -q";; + zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";; + esac + fi + +From 6834e464803b5ac98f8ab1bbca5379970b5bc6d9 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 21 Oct 2022 02:32:17 +0100 +Subject: [PATCH] ecompress: don't set -9 for xz +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From xz(1): +""" +The differences between the presets are more significant than with gzip(1) and bzip2(1). The selected compression settings determine the memory requirements of the decompressor, thus us‐ +ing a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, it's not a good idea to blindly use -9 for everything like it of‐ +ten is with gzip(1) and bzip2(1). +[...] +-7 ... -9 + These are like -6 but with higher compressor and decompressor memory requirements. These are useful only when compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, respectively. +[...] +• DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid using the presets -7 +... -9 when there's no real need for them. At -6 and lower, the amount of memory wasted is usually low enough to not matter. +""" + +Most things that ecompress touches are tiny (<32MB certainly). I made the +mistake the man page warngs about -- don't assume it's a good idea just +because of gzip & bzip2, and that's exactly what I did! + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/bin/ecompress ++++ b/bin/ecompress +@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then + # See: https://bugs.gentoo.org/672916 + # Setting '--rm' will remove the source files after a successful compression. + lz4) PORTAGE_COMPRESS_FLAGS="-m --rm";; +- xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) --memlimit-compress=50% -q";; ++ xz) PORTAGE_COMPRESS_FLAGS="-q -T$(___makeopts_jobs) --memlimit-compress=50%";; + zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";; + esac + fi + diff --git a/sys-apps/portage/portage-3.0.38.1-r2.ebuild b/sys-apps/portage/portage-3.0.38.1-r3.ebuild index f7e3c208d20d..0ba541e800e8 100644 --- a/sys-apps/portage/portage-3.0.38.1-r2.ebuild +++ b/sys-apps/portage/portage-3.0.38.1-r3.ebuild @@ -85,6 +85,7 @@ pkg_pretend() { python_prepare_all() { local PATCHES=( + "${FILESDIR}"/${P}-xz-32-bit.patch ) distutils-r1_python_prepare_all diff --git a/sys-apps/portage/portage-3.0.39.ebuild b/sys-apps/portage/portage-3.0.39.ebuild new file mode 100644 index 000000000000..48ca5c0728ae --- /dev/null +++ b/sys-apps/portage/portage-3.0.39.ebuild @@ -0,0 +1,273 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{8..11} ) +PYTHON_REQ_USE='bzip2(+),threads(+)' +TMPFILES_OPTIONAL=1 + +inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix + +DESCRIPTION="The package management and distribution system for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" +SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +SLOT="0" +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" +RESTRICT="!test? ( test )" + +BDEPEND=" + app-arch/xz-utils + test? ( dev-vcs/git )" +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) + >=app-arch/tar-1.27 + dev-lang/python-exec:2 + >=sys-apps/sed-4.0.5 sys-devel/patch + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + apidoc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-epytext[${PYTHON_USEDEP}] + )" +# Require sandbox-2.2 for bug #288863. +# For whirlpool hash, require python[ssl] (bug #425046). +# For compgen, require bash[readline] (bug #445576). +# app-portage/gemato goes without PYTHON_USEDEP since we're calling +# the executable. +RDEPEND=" + acct-user/portage + app-arch/zstd + >=app-arch/tar-1.27 + dev-lang/python-exec:2 + >=sys-apps/findutils-4.4 + !build? ( + >=sys-apps/sed-4.0.5 + >=app-shells/bash-5.0:0[readline] + >=app-admin/eselect-1.2 + rsync-verify? ( + >=app-portage/gemato-14.5[${PYTHON_USEDEP}] + >=sec-keys/openpgp-keys-gentoo-release-20180706 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)] + ) + ) + elibc_glibc? ( >=sys-apps/sandbox-2.2 ) + elibc_musl? ( >=sys-apps/sandbox-2.2 ) + kernel_linux? ( sys-apps/util-linux ) + >=app-misc/pax-utils-0.1.17 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) + xattr? ( kernel_linux? ( + >=sys-apps/install-xattr-0.3 + ) ) + !<app-admin/logrotate-3.8.0 + !<app-portage/gentoolkit-0.4.6 + !<app-portage/repoman-2.3.10 + !~app-portage/repoman-3.0.0" +PDEPEND=" + !build? ( + >=net-misc/rsync-2.6.4 + >=sys-apps/file-5.41 + >=sys-apps/coreutils-6.4 + )" +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# NOTE: FEATURES=installsources requires debugedit and rsync + +pkg_pretend() { + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" + + if use native-extensions && tc-is-cross-compiler; then + einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)" + fi + + check_extra_config +} + +python_prepare_all() { + local PATCHES=( + ) + + distutils-r1_python_prepare_all + + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die + + if use gentoo-dev; then + einfo "Disabling --dynamic-deps by default for gentoo-dev..." + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ + -i lib/_emerge/create_depgraph_params.py || \ + die "failed to patch create_depgraph_params.py" + + einfo "Enabling additional FEATURES for gentoo-dev..." + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ + >> cnf/make.globals || die + fi + + if use native-extensions && ! tc-is-cross-compiler; then + printf "[build_ext]\nportage_ext_modules=true\n" >> \ + setup.cfg || die + fi + + if ! use ipc ; then + einfo "Disabling ipc..." + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ + -i lib/_emerge/AbstractEbuildProcess.py || \ + die "failed to patch AbstractEbuildProcess.py" + fi + + if use xattr && use kernel_linux ; then + einfo "Adding FEATURES=xattr to make.globals ..." + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ + || die "failed to append to make.globals" + fi + + if use build || ! use rsync-verify; then + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ + -e '/^sync-webrsync-verify-signature/s|yes|no|' \ + -i cnf/repos.conf || die "sed failed" + fi + + if [[ -n ${EPREFIX} ]] ; then + einfo "Setting portage.const.EPREFIX ..." + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ + -w "/_BINARY/" lib/portage/const.py + + einfo "Prefixing shebangs ..." + > "${T}/shebangs" || die + while read -r -d $'\0' ; do + local shebang=$(head -n1 "$REPLY") + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then + echo "${REPLY}" >> "${T}/shebangs" || die + fi + done < <(find . -type f -executable ! -name etc-update -print0) + + if [[ -s ${T}/shebangs ]]; then + xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed" + fi + + einfo "Adjusting make.globals, repos.conf and etc-update ..." + hprefixify cnf/{make.globals,repos.conf} bin/etc-update + + if use prefix-guest ; then + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ + -i cnf/repos.conf || die "sed failed" + fi + + einfo "Adding FEATURES=force-prefix to make.globals ..." + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ + || die "failed to append to make.globals" + fi + + cd "${S}/cnf" || die + if [ -f "make.conf.example.${ARCH}".diff ]; then + patch make.conf.example "make.conf.example.${ARCH}".diff || \ + die "Failed to patch make.conf.example" + else + eerror "" + eerror "Portage does not have an arch-specific configuration for this arch." + eerror "Please notify the arch maintainer about this issue. Using generic." + eerror "" + fi +} + +python_compile_all() { + local targets=() + use doc && targets+=( docbook ) + use apidoc && targets+=( apidoc ) + + if [[ ${targets[@]} ]]; then + esetup.py "${targets[@]}" + fi +} + +python_test() { + esetup.py test +} + +python_install() { + # Install sbin scripts to bindir for python-exec linking + # they will be relocated in pkg_preinst() + distutils-r1_python_install \ + --system-prefix="${EPREFIX}/usr" \ + --bindir="$(python_get_scriptdir)" \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" \ + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ + --sbindir="$(python_get_scriptdir)" \ + --sysconfdir="${EPREFIX}/etc" \ + "${@}" +} + +python_install_all() { + distutils-r1_python_install_all + + local targets=() + use doc && targets+=( + install_docbook + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" + ) + use apidoc && targets+=( + install_apidoc + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" + ) + + # install docs + if [[ ${targets[@]} ]]; then + esetup.py "${targets[@]}" + fi + + dotmpfiles "${FILESDIR}"/portage-{ccache,tmpdir}.conf + + # Due to distutils/python-exec limitations + # these must be installed to /usr/bin. + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' + einfo "Moving admin scripts to the correct directory" + dodir /usr/sbin + for target in ${sbin_relocations}; do + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" + mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" + done +} + +pkg_preinst() { + if ! use build; then + python_setup + local sitedir=$(python_get_sitedir) + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" + env -u DISTDIR \ + -u PORTAGE_OVERRIDE_EPREFIX \ + -u PORTAGE_REPOSITORIES \ + -u PORTDIR \ + -u PORTDIR_OVERLAY \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.default_locations || die + + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die + + env -u FEATURES -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + fi + + # elog dir must exist to avoid logrotate error for bug #415911. + # This code runs in preinst in order to bypass the mapping of + # portage:portage to root:root which happens after src_install. + keepdir /var/log/portage/elog + # This is allowed to fail if the user/group are invalid for prefix users. + if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then + chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} + fi + + if has_version "<${CATEGORY}/${PN}-2.3.77"; then + elog "The emerge --autounmask option is now disabled by default, except for" + elog "portions of behavior which are controlled by the --autounmask-use and" + elog "--autounmask-license options. For backward compatibility, previous" + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." + elog "Users can get the old behavior simply by adding --autounmask to the" + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" + elog "change, see https://bugs.gentoo.org/658648." + fi +} |