diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index 5223ffdd1f..33388b943f 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -40,6 +40,9 @@ BOOTSTRAP_USE="${BOOTSTRAP_USE} minimal" # Add `ssl` USE flag to make libcurl capable of fetching from https URLs. BOOTSTRAP_USE="${BOOTSTRAP_USE} curl_ssl_openssl ssl" +# Add `xml` USE flag to avoid build failures from sys-apps/portage 3.0.28 +BOOTSTRAP_USE="${BOOTSTRAP_USE} xml" + # Set SELinux policy POLICY_TYPES="targeted mcs mls" diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest index 2b1ad98362..05b0f92a64 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest @@ -1,4 +1,2 @@ -DIST portage-2.3.89-bug-718578.patch 1325 BLAKE2B 7a3bc520274617736eac2e3d078e90d151bdb5d8615f6217a499c0f5d4c80813f2c753e7902cf34482df0725ad0b43a38707764c8be14aae9f7ca34f0bd8721f SHA512 6f1c5d7b42beb8078c45cccbad2bd65374b69af92521d9be3beb6784477ca5bcdd75d8e762b239e44e3121e6fe5e3a040c92c9b61521e4a9b1d6bafee10d4c88 -DIST portage-2.3.99.tar.bz2 1051210 BLAKE2B dd3f990dbc87e655a767ce01e1ee3f0b1d5226fa818949408e54b81a2f96e50a4215a79af42b00dc795792858c4f86453b238b14baef4f0793c937b5617534b8 SHA512 176842318a4134ce54c5aa6485fef296f5a14edd2a72421c2011973a0f1a6af39bc5398f1e9eb3b8666d5fc307589c5b91ab93c219bdedb2d307357d8ddefbf5 -DIST portage-3.0.4.tar.bz2 1042654 BLAKE2B 6f869b2eb24f9e590bf8e01172050105a1bd9ea88657db5893133b4620231a0ddcda871d6fcc10623f7f2ef809116310c76355263819be6c3734b0ca184d5fc0 SHA512 7a0c39cd4ed65aebd84ff8bbadba29760b3aa392a0d606c5b29a1112fd0845c42f74eebb0728a069b2b097a6eb7eec2d18af615fd9edcc38f1018ae6ff686812 -DIST portage-3.0.8.tar.bz2 1046968 BLAKE2B 662147c37a9e7b81030fadb4d6438b734ee57a9eb9bfcee80991d137a017aa3541565961282ebf8736db71aeb05532ffa139ff3a34a84bc9064cf74427acb666 SHA512 5f97870a11ecca30ffe8f463f87cd16a1edb52b44832c6eaba15cadcfde2b4f7edf963749e45c8043b45b38e53ee210dc913aa2d2432a2bd3928cc27c8765a85 +DIST portage-3.0.28-setuptools-install-depr.patch 1191 BLAKE2B 1601b8943be27fbebea8bfc5e927e9ba6c5e18b6b76a89f8b2b8525595f4693fe014d0bfd936b513a5d03524aba64797ef1bb1e85b0965426a6f36b6c9e9e07c SHA512 bb06c3f705e4a3e6fcc170fe36aa522184c573ef6e05dea3678ff9158472722d1b68fc480b89f4656786e024be6c5f6f656c386aeda467744bf8e9acdb6ffef5 +DIST portage-3.0.28.tar.bz2 1153994 BLAKE2B 8d9e3af04acd9bb5fdb3cff5b928abbf707db13f6c25afdac4399ea47adb67b2621ebb733927b4f9386e3f285fa7daac0423ae3fb0509a9df747b41c82865313 SHA512 148484b0384672116f2f2187eaddb56f646548324cd5f6c8e187a02bc965fb2bea6632214aed9b40c615acb89eb6124ab831ad85c59bac9a416b02a07506669b diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/README.md b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/README.md index 42daefdbed..66fc2ca13e 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/README.md +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/README.md @@ -3,8 +3,6 @@ following changes: - Apply some patches that weren't yet merged by upstream. -- Remove mentions of python version we haven't yet packaged. - - Disable rsync_verify USE flag to avoid pulling more dependencies. - Overwrite the `cnf/repos.conf` file, so we do not use the gentoo diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml index 062dafe624..58ed367a28 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml @@ -1,5 +1,5 @@ - + mailto:dev-portage@gentoo.org diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.8-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild similarity index 83% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.8-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild index c3b536d7fd..f78e9c9a7c 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.8-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild @@ -1,36 +1,42 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Flatcar: Based on portage-3.0.8.ebuild from commit -# be7749525a3958edbcecee314d0e1c294222f87f in Gentoo repo (see -# https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-apps/portage/portage-3.0.8.ebuild?id=be7749525a3958edbcecee314d0e1c294222f87f). +# Flatcar: Based on portage-3.0.28-r1.ebuild from commit +# dd2855193d31d04b6dc25d7fddf381c6d61c0080 in Gentoo repo (see +# https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-apps/portage/portage-3.0.28-r1.ebuild?id=dd2855193d31d04b6dc25d7fddf381c6d61c0080). EAPI=7 -DISTUTILS_USE_SETUPTOOLS=no -PYTHON_COMPAT=( pypy3 python3_{6..10} ) +PYTHON_COMPAT=( pypy3 python3_{8..10} ) PYTHON_REQ_USE='bzip2(+),threads(+)' +TMPFILES_OPTIONAL=1 inherit distutils-r1 linux-info tmpfiles prefix -DESCRIPTION="Portage is the package management and distribution system for Gentoo" +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 + https://gitweb.gentoo.org/proj/portage.git/patch/?id=c309328c4e1f6254251d31149ee47b4266d4d70f + -> ${P}-setuptools-install-depr.patch" LICENSE="GPL-2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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="test? ( dev-vcs/git )" +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 - dev-python/sphinx-epytext + 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). @@ -38,13 +44,14 @@ DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) # 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:0[readline] + >=app-shells/bash-5.0:0[readline] >=app-admin/eselect-1.2 rsync-verify? ( >=app-portage/gemato-14.5[${PYTHON_USEDEP}] @@ -73,21 +80,6 @@ PDEPEND=" # coreutils-6.4 rdep is for date format in emerge-webrsync #164532 # NOTE: FEATURES=installsources requires debugedit and rsync -SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" - -prefix_src_archives() { - local x y - for x in ${@}; do - for y in ${SRC_ARCHIVES}; do - echo ${y}/${x} - done - done -} - -TARBALL_PV=${PV} -SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 - $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)" - PATCHES=( "${FILESDIR}/0001-portage-repository-config.py-add-disabled-attribute-.patch" "${FILESDIR}/0002-environment-Filter-EROOT-for-all-EAPIs.patch" @@ -101,6 +93,10 @@ pkg_pretend() { } python_prepare_all() { + local PATCHES=( + "${DISTDIR}"/${P}-setuptools-install-depr.patch + ) + distutils-r1_python_prepare_all echo "# no defaults, configuration is in /etc" > cnf/repos.conf @@ -114,12 +110,12 @@ python_prepare_all() { die "failed to patch create_depgraph_params.py" einfo "Enabling additional FEATURES for gentoo-dev..." - echo 'FEATURES="${FEATURES} strict-keepdir"' \ + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ >> cnf/make.globals || die fi if use native-extensions; then - printf "[build_ext]\nportage-ext-modules=true\n" >> \ + printf "[build_ext]\nportage_ext_modules=true\n" >> \ setup.cfg || die fi @@ -148,13 +144,17 @@ python_prepare_all() { -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 - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ - die "sed failed" + echo "${REPLY}" >> "${T}/shebangs" || die fi - done < <(find . -type f ! -name etc-update -print0) + 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 @@ -254,10 +254,14 @@ pkg_preinst() { PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ "${PYTHON}" -m portage._compat_upgrade.default_locations || die - env -u BINPKG_COMPRESS \ + 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 + # 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.