From 838c52fa6b82f300e1b733c48e7a3210861bf0f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 18 May 2019 10:45:23 +0200 Subject: [PATCH] sys-apps/portage-mgorny: Remove last-rited pkg MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/683744 Signed-off-by: Michał Górny --- profiles/base/package.use.force | 1 - profiles/default/bsd/fbsd/package.use.mask | 3 +- profiles/features/hardened/package.use.force | 3 +- profiles/features/selinux/package.use.mask | 3 +- profiles/hardened/linux/package.use.force | 3 +- profiles/package.mask | 8 - profiles/prefix/package.use.mask | 3 +- sys-apps/portage-mgorny/Manifest | 1 - sys-apps/portage-mgorny/metadata.xml | 25 --- .../portage-mgorny-2.3.51.1.ebuild | 198 ----------------- .../portage-mgorny/portage-mgorny-9999.ebuild | 199 ------------------ 11 files changed, 5 insertions(+), 442 deletions(-) delete mode 100644 sys-apps/portage-mgorny/Manifest delete mode 100644 sys-apps/portage-mgorny/metadata.xml delete mode 100644 sys-apps/portage-mgorny/portage-mgorny-2.3.51.1.ebuild delete mode 100644 sys-apps/portage-mgorny/portage-mgorny-9999.ebuild diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force index 04fc8f63c525..02cab1459945 100644 --- a/profiles/base/package.use.force +++ b/profiles/base/package.use.force @@ -81,7 +81,6 @@ dev-lang/python-exec python_targets_pypy3 # bug #315615, and makes subshell die support more robust # (so that repoman's ebuild.nesteddie check is irrelevant). sys-apps/portage ipc -sys-apps/portage-mgorny ipc # Arfrever Frehtes Taifersar Arahesis # Python should use wide Unicode implementation by default. diff --git a/profiles/default/bsd/fbsd/package.use.mask b/profiles/default/bsd/fbsd/package.use.mask index 2a37504795be..2b1cdf985b06 100644 --- a/profiles/default/bsd/fbsd/package.use.mask +++ b/profiles/default/bsd/fbsd/package.use.mask @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Michał Górny (06 Apr 2018) @@ -112,4 +112,3 @@ sys-apps/hwloc numa # Naohiro Aota (07 Jul 2014) # xattr support is not available on BSD #501534 sys-apps/portage xattr -sys-apps/portage-mgorny xattr diff --git a/profiles/features/hardened/package.use.force b/profiles/features/hardened/package.use.force index 9b56509d22fc..28c4aed893e2 100644 --- a/profiles/features/hardened/package.use.force +++ b/profiles/features/hardened/package.use.force @@ -1,8 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Needed for XATTR_PAX flags app-arch/tar xattr sys-apps/coreutils xattr sys-apps/portage xattr -sys-apps/portage-mgorny xattr diff --git a/profiles/features/selinux/package.use.mask b/profiles/features/selinux/package.use.mask index c143824e7072..71af7dd6cd4d 100644 --- a/profiles/features/selinux/package.use.mask +++ b/profiles/features/selinux/package.use.mask @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Jeroen Roovers (23 Feb 2019) @@ -8,7 +8,6 @@ net-analyzer/wireshark sdjournal # Brian Dolbec (17 Sep 2014) # mask pypy for several utilities due to incompatibility with libselinux sys-apps/portage python_targets_pypy python_targets_pypy3 -sys-apps/portage-mgorny python_targets_pypy python_targets_pypy3 app-portage/gentoolkit python_targets_pypy python_targets_pypy3 app-portage/layman python_targets_pypy python_targets_pypy3 app-admin/webapp-config python_targets_pypy python_targets_pypy3 diff --git a/profiles/hardened/linux/package.use.force b/profiles/hardened/linux/package.use.force index 9b56509d22fc..28c4aed893e2 100644 --- a/profiles/hardened/linux/package.use.force +++ b/profiles/hardened/linux/package.use.force @@ -1,8 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Needed for XATTR_PAX flags app-arch/tar xattr sys-apps/coreutils xattr sys-apps/portage xattr -sys-apps/portage-mgorny xattr diff --git a/profiles/package.mask b/profiles/package.mask index 84551a624820..66039068dafd 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -459,14 +459,6 @@ dev-cpp/gccxml dev-python/pygccxml dev-python/pyplusplus -# Michał Górny (18 Apr 2019) -# Diverged too far from upstream Portage, and I don't have time anymore -# to update or rebase it. The most significant features were merged -# back upstream, some more are waiting, the rest is customization -# and some aggressive QA bits. Use sys-apps/portage instead. -# Removal in 30 days. Bug #683744. -sys-apps/portage-mgorny - # Michał Górny (18 Apr 2019) # All current versions of SystemRescueCD contain vulnerable packages. # Bug #683724. diff --git a/profiles/prefix/package.use.mask b/profiles/prefix/package.use.mask index 49a1219196b1..454722cd311c 100644 --- a/profiles/prefix/package.use.mask +++ b/profiles/prefix/package.use.mask @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Michael Haubenwallner (02 May 2019) @@ -24,7 +24,6 @@ dev-vcs/git mediawiki mediawiki-experimental # very bad with, that really causes way more issues than it is worth to # have some boundary bugs solved and more robust subshell die support sys-apps/portage ipc -sys-apps/portage-mgorny ipc # Michael Haubenwallner (17 Sep 2010) # sys-apps/keyutils is a linux only package diff --git a/sys-apps/portage-mgorny/Manifest b/sys-apps/portage-mgorny/Manifest deleted file mode 100644 index ff04afe9e6e7..000000000000 --- a/sys-apps/portage-mgorny/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST portage-mgorny-2.3.51.1.tar.gz 1257484 BLAKE2B 85761b1fb5b44e4457173f8820166643fb3afb3115e9eab1436f16ee3a10f4fe1c8ab62b3e70239b4f2b00977d8421bc24a441d4a60d122c450185ff56e1e531 SHA512 8d2bd540a82f0d4aa5b089032d41c72a3d33b88041240e480ffa7d924eea0197e674b29241eb30ef13f154052514419e038d98aa72e89a5e1977dfcb6a86fa83 diff --git a/sys-apps/portage-mgorny/metadata.xml b/sys-apps/portage-mgorny/metadata.xml deleted file mode 100644 index 1d50aed841d4..000000000000 --- a/sys-apps/portage-mgorny/metadata.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - mgorny@gentoo.org - Michał Górny - - - - Use inter-process communication between Portage and running - ebuilds. - - - Compiles native "C" extensions (speedups, instead of using - Python backup code). Currently includes libc-locales. This - should only be temporarily disabled for some bootstrapping - operations. Cross-compilation is not supported. - - - Preserve extended attributes (filesystem-stored metadata) - when installing files. Usually only required for hardened - systems. - - - diff --git a/sys-apps/portage-mgorny/portage-mgorny-2.3.51.1.ebuild b/sys-apps/portage-mgorny/portage-mgorny-2.3.51.1.ebuild deleted file mode 100644 index 7c190529617e..000000000000 --- a/sys-apps/portage-mgorny/portage-mgorny-2.3.51.1.ebuild +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_{5,6,7}} pypy ) -PYTHON_REQ_USE='bzip2(+),threads(+)' - -inherit distutils-r1 - -DESCRIPTION="Fork of Portage focused on cleaning up and useful features" -HOMEPAGE="https://github.com/mgorny/portage-mgorny" -SRC_URI="https://github.com/mgorny/portage-mgorny/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" -SLOT="0" -IUSE="build +ipc +native-extensions selinux xattr kernel_linux" - -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) - >=app-arch/tar-1.27 - >=sys-apps/sed-4.0.5 - sys-devel/patch" -RDEPEND=" - >=app-arch/tar-1.27 - !build? ( - >=app-admin/eselect-1.2 - app-crypt/openpgp-keys-gentoo-release - >=app-crypt/gnupg-2.2.4-r2[ssl(-)] - >=app-portage/gemato-10[${PYTHON_USEDEP}] - app-shells/bash:0[readline] - $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \ - python{2_7,3_5} pypy) - >=dev-python/lxml-3.6.0[${PYTHON_USEDEP}] - >=sys-apps/sed-4.0.5 - ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-2.2 ) - elibc_musl? ( >=sys-apps/sandbox-2.2 ) - elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) - >=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 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ - python2_7 pypy) - ) ) - !app-portage/repoman - !sys-apps/portage" -PDEPEND=" - !build? ( - >=net-misc/rsync-2.6.4 - )" -# NOTE: FEATURES=installsources requires debugedit and rsync - -pkg_pretend() { - if [[ -f ${EROOT%/}/etc/make.conf ]]; then - eerror "You seem to be using /etc/make.conf. Please migrate to the new" - eerror "/etc/portage/make.conf location before upgrading." - if [[ ! -f ${EROOT%/}/etc/portage/make.conf ]]; then - eerror - eerror " mv ${EROOT%/}/etc/make.conf ${EROOT%/}/etc/portage/make.conf" - else - ewarn - ewarn "WARNING: You seem to have make.conf in both locations. Please take" - ewarn "care not to accientally overwrite one with the other." - fi - die "${EROOT%/}/etc/make.conf present" - fi - - if [[ -f ${EROOT%/}/etc/portage/package.keywords ]]; then - eerror "You seem to be using /etc/portage/package.keywords. Please migrate" - eerror "to the new /etc/portage/package.accept_keywords location before" - eerror "upgrading." - eerror - if [[ -d ${EROOT%/}/etc/portage/package.accept_keywords ]]; then - eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords/99old" - else - if [[ -f ${EROOT%/}/etc/portage/package.accept_keywords ]]; then - eerror " cat ${EROOT%/}/etc/portage/package.accept_keywords >> ${EROOT%/}/etc/portage/package.keywords" - fi - eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords" - fi - die "${EROOT%/}/etc/portage/package.keywords present" - fi - - if has_version sys-apps/portage; then - ewarn "If you are migrating from sys-apps/portage to sys-apps/portage-mgorny," - ewarn "please note that Portage will abort upon having to unmerge itself." - ewarn "However, sys-apps/portage-mgorny will already be installed at this" - ewarn "point, so you simply have to restart emerge and it will successfully" - ewarn "clean the old package afterwards." - ewarn - ewarn "If you did not use '--dynamic-deps n' in Portage, your VDB dependency" - ewarn "graph is probably broken. You may need to use '--changed-deps y'" - ewarn "for your first @world upgrade to resolve the conflicts. Afterwards," - ewarn "--changed-deps should no longer be necessary and any conflicts" - ewarn "introduced afterwards should be reported to bugs.gentoo.org." - fi -} - -python_prepare_all() { - distutils-r1_python_prepare_all - - 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 [[ -n ${EPREFIX} ]] ; then - einfo "Setting portage.const.EPREFIX ..." - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ - -i lib/portage/const.py || - die "Failed to patch portage.const.EPREFIX" - - einfo "Prefixing shebangs ..." - while read -r -d $'\0' ; do - local shebang=$(head -n1 "${REPLY}") - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${REPLY}" || - die "sed failed" - fi - done < <(find . -type f -print0) - - einfo "Adjusting make.globals ..." - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ - -i cnf/make.globals || die "sed failed" - - einfo "Adjusting repos.conf ..." - sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \ - -i cnf/repos.conf || die "sed failed" - if 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_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - portage-ext-modules=$(usex native-extensions true false) - EOF -} - -python_test() { - esetup.py test -} - -python_install() { - distutils-r1_python_install \ - --system-prefix="${EPREFIX}/usr" \ - --bindir="$(python_get_scriptdir)" \ - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ - --sysconfdir="${EPREFIX}/etc" \ - "${@}" - - keepdir /var/log/portage/elog -} - -pkg_preinst() { - # 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 -} diff --git a/sys-apps/portage-mgorny/portage-mgorny-9999.ebuild b/sys-apps/portage-mgorny/portage-mgorny-9999.ebuild deleted file mode 100644 index 6c03fc1f54ec..000000000000 --- a/sys-apps/portage-mgorny/portage-mgorny-9999.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_{5,6,7}} pypy ) -PYTHON_REQ_USE='bzip2(+),threads(+)' - -inherit distutils-r1 git-r3 - -DESCRIPTION="Fork of Portage focused on cleaning up and useful features" -HOMEPAGE="https://github.com/mgorny/portage-mgorny" -SRC_URI="" -EGIT_REPO_URI="https://github.com/mgorny/portage-mgorny.git" - -LICENSE="GPL-2" -KEYWORDS="" -SLOT="0" -IUSE="build +ipc +native-extensions selinux xattr kernel_linux" - -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) - >=app-arch/tar-1.27 - >=sys-apps/sed-4.0.5 - sys-devel/patch" -RDEPEND=" - >=app-arch/tar-1.27 - !build? ( - >=app-admin/eselect-1.2 - app-crypt/openpgp-keys-gentoo-release - >=app-crypt/gnupg-2.2.4-r2[ssl(-)] - >=app-portage/gemato-10[${PYTHON_USEDEP}] - app-shells/bash:0[readline] - $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \ - python{2_7,3_5} pypy) - >=dev-python/lxml-3.6.0[${PYTHON_USEDEP}] - >=sys-apps/sed-4.0.5 - ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-2.2 ) - elibc_musl? ( >=sys-apps/sandbox-2.2 ) - elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) - >=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 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ - python2_7 pypy) - ) ) - !app-portage/repoman - !sys-apps/portage" -PDEPEND=" - !build? ( - >=net-misc/rsync-2.6.4 - )" -# NOTE: FEATURES=installsources requires debugedit and rsync - -pkg_pretend() { - if [[ -f ${EROOT%/}/etc/make.conf ]]; then - eerror "You seem to be using /etc/make.conf. Please migrate to the new" - eerror "/etc/portage/make.conf location before upgrading." - if [[ ! -f ${EROOT%/}/etc/portage/make.conf ]]; then - eerror - eerror " mv ${EROOT%/}/etc/make.conf ${EROOT%/}/etc/portage/make.conf" - else - ewarn - ewarn "WARNING: You seem to have make.conf in both locations. Please take" - ewarn "care not to accientally overwrite one with the other." - fi - die "${EROOT%/}/etc/make.conf present" - fi - - if [[ -f ${EROOT%/}/etc/portage/package.keywords ]]; then - eerror "You seem to be using /etc/portage/package.keywords. Please migrate" - eerror "to the new /etc/portage/package.accept_keywords location before" - eerror "upgrading." - eerror - if [[ -d ${EROOT%/}/etc/portage/package.accept_keywords ]]; then - eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords/99old" - else - if [[ -f ${EROOT%/}/etc/portage/package.accept_keywords ]]; then - eerror " cat ${EROOT%/}/etc/portage/package.accept_keywords >> ${EROOT%/}/etc/portage/package.keywords" - fi - eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords" - fi - die "${EROOT%/}/etc/portage/package.keywords present" - fi - - if has_version sys-apps/portage; then - ewarn "If you are migrating from sys-apps/portage to sys-apps/portage-mgorny," - ewarn "please note that Portage will abort upon having to unmerge itself." - ewarn "However, sys-apps/portage-mgorny will already be installed at this" - ewarn "point, so you simply have to restart emerge and it will successfully" - ewarn "clean the old package afterwards." - ewarn - ewarn "If you did not use '--dynamic-deps n' in Portage, your VDB dependency" - ewarn "graph is probably broken. You may need to use '--changed-deps y'" - ewarn "for your first @world upgrade to resolve the conflicts. Afterwards," - ewarn "--changed-deps should no longer be necessary and any conflicts" - ewarn "introduced afterwards should be reported to bugs.gentoo.org." - fi -} - -python_prepare_all() { - distutils-r1_python_prepare_all - - 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 [[ -n ${EPREFIX} ]] ; then - einfo "Setting portage.const.EPREFIX ..." - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ - -i lib/portage/const.py || - die "Failed to patch portage.const.EPREFIX" - - einfo "Prefixing shebangs ..." - while read -r -d $'\0' ; do - local shebang=$(head -n1 "${REPLY}") - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${REPLY}" || - die "sed failed" - fi - done < <(find . -type f -print0) - - einfo "Adjusting make.globals ..." - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ - -i cnf/make.globals || die "sed failed" - - einfo "Adjusting repos.conf ..." - sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ - -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \ - -i cnf/repos.conf || die "sed failed" - if 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_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - portage-ext-modules=$(usex native-extensions true false) - EOF -} - -python_test() { - esetup.py test -} - -python_install() { - distutils-r1_python_install \ - --system-prefix="${EPREFIX}/usr" \ - --bindir="$(python_get_scriptdir)" \ - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ - --sysconfdir="${EPREFIX}/etc" \ - "${@}" - - keepdir /var/log/portage/elog -} - -pkg_preinst() { - # 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 -} -- 2.26.2