From: Zac Medico Date: Sun, 24 Jul 2011 08:53:59 +0000 (+0000) Subject: 2.2.0_alpha47 version bump. This fixes bug #326685 (improved handling for X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=156e935cbdcf3b922c458159c1c8d5c77a18a4eb;p=gentoo.git 2.2.0_alpha47 version bump. This fixes bug #326685 (improved handling for ebuilds that replace a directory with a symlink), bug #338959 (@installed pulls in unwanted new slots), and bug #375835 (SELinux support for fetching from binhost). This also includes memory and performance optimizations for preserve-libs and @preserved-rebuild. Bug #210077 tracks all bugs fixed since portage-2.1.x. Package-Manager: portage-2.2.0_alpha47/cvs/Linux i686 --- diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog index 27d14960b990..36d0abe42510 100644 --- a/sys-apps/portage/ChangeLog +++ b/sys-apps/portage/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-apps/portage # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.853 2011/07/19 22:11:44 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.854 2011/07/24 08:53:59 zmedico Exp $ + +*portage-2.2.0_alpha47 (24 Jul 2011) + + 24 Jul 2011; Zac Medico +portage-2.2.0_alpha47.ebuild: + 2.2.0_alpha47 version bump. This fixes bug #326685 (improved handling for + ebuilds that replace a directory with a symlink), bug #338959 (@installed + pulls in unwanted new slots), and bug #375835 (SELinux support for fetching + from binhost). This also includes memory and performance optimizations for + preserve-libs and @preserved-rebuild. Bug #210077 tracks all bugs fixed + since portage-2.1.x. *portage-2.2.0_alpha46 (19 Jul 2011) diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index b7148be57035..1a18bd942bb3 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -12,6 +12,7 @@ DIST portage-2.1.9.42.tar.bz2 764537 RMD160 7bfef7fb167c986e36532416a0ed4b914f0a DIST portage-2.2.0_alpha44.tar.bz2 841322 RMD160 790768b467dd3ce32ee96a493a6f61012905c3f0 SHA1 c9ffb23efd85b02e096ddbd02fb22c29ced017f7 SHA256 124467ec22be483bf4a08ba91f44c92cf886906739ce7f08b131defe6b5959be DIST portage-2.2.0_alpha45.patch.bz2 2686 RMD160 bd36c8a979db4de7f8c436695b9fc84b711b5563 SHA1 13d134f5d3a550c5670ca49e16839ddf576232ad SHA256 32d5b116483cffda724cdb9bed0dc0e031aef92e24fe623a1d91c1b7de4cd556 DIST portage-2.2.0_alpha46.tar.bz2 843597 RMD160 c3237e669e53ddf50d190d675387bc74aa851652 SHA1 410c0395615a45478c2d273a70b601f5606abb57 SHA256 bf6821fce777c34472e66b2946a1cf19d173eb8ef9604af93448a0c9f9d5a84a +DIST portage-2.2.0_alpha47.patch.bz2 7392 RMD160 0036988f33032bb30e40733baeab4c1c2a80f5e5 SHA1 eaeb7e5093dee59b9007a0637200164ed598af4e SHA256 6b6399617693ede80a8d7a8be321d5effc889518cf87df439213dd756ff34780 DIST portage-man-pl-2.1.2.tar.bz2 53893 RMD160 46c3656b40bf4ad2530ab2b5fbc563708b86748c SHA1 c3151e0b330c589625830e54053fbc676b2c64de SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f EBUILD portage-2.1.10.3.ebuild 10221 RMD160 97396fdbcb6aff7705c2636f0fc829a83c1aa074 SHA1 eca88bafd3733c621473f03426558cf5a09ec176 SHA256 0a258d57a64921dbf2c9e21965a45212738d1758adf670b23670416d41f55888 EBUILD portage-2.1.10.6.ebuild 11147 RMD160 1e7abcbb5daf7f62391327687667e0e63186d491 SHA1 92cb2414958c312f13c83100c8d136dedb29276c SHA256 f286bd5b721898c5de35b55d6ab7b561d804b59bdbd3b32ac9f0f4bc9e38c9d1 @@ -21,13 +22,14 @@ EBUILD portage-2.1.6.7.ebuild 8689 RMD160 a04a6f87a6ded5b3c20413c79cc5d854f40835 EBUILD portage-2.1.9.42.ebuild 10283 RMD160 60ac7fd535e83626095d2ef11466da8e8aa9b209 SHA1 b204bf62ad13b3c3d116fff53bc7a482eb89b7d8 SHA256 1b7968c34b0fc83aa1b388540a155340fdeb93df19de4515826af205fbcb9a3e EBUILD portage-2.2.0_alpha45.ebuild 12909 RMD160 ffe77f94fa1e918821b52d8c5204a6e787addfe7 SHA1 82dc68a81e9f5e50aaa9bdb4584dc479fc1b26c3 SHA256 28577ef1f2a74fd3dd793a0226bca513ed99048a9bf57ee5f0ab88a58ec64056 EBUILD portage-2.2.0_alpha46.ebuild 12909 RMD160 568633d30e5054931feb4d9ae104ae335dd86cd4 SHA1 62513da600cd90d4f8e48f6c02f0459e70ec83a9 SHA256 9e359eaba74fdbb4addc23deb96a89344da2f1b79674e106de20c045a61d732a +EBUILD portage-2.2.0_alpha47.ebuild 12909 RMD160 62c95aae89b6d6c3742445b1227fb6671c54218f SHA1 6f0bfef55ce7cdf3dbef0addf3cffd01d3a0a9fe SHA256 68d5b318a9ec5682684fd794833175bedfc8e4513271d0281a7d872da54a85db EBUILD portage-9999.ebuild 12185 RMD160 ac77329fa0b742acf3ed1fcaf2ae156199a51bc7 SHA1 6aba286edcbe55dfb9fb956ec5a6253a3abfd071 SHA256 8e6e6717de6ab09b5379837985231558096b57771616ce2e30835b50fd71b6a1 -MISC ChangeLog 39816 RMD160 93acd117a3e37dfd7b71da5156c24b4ed701e868 SHA1 ee0f13040f30b947b7b867902d6806c3159c82ca SHA256 0355a5bea8d63d8ddb926803ad699264207bbd98c676531ca49d3871b7ae64ce +MISC ChangeLog 40337 RMD160 46a9cf4cd6ffb21faaab3fc7d138a77ec967a33d SHA1 1d5263557721fb3e78e7de06a3096c6172ffd2e1 SHA256 5d092ae66606c00e9248e3c6993cadf551e2f85aeba3eda79b8022fc6eae98cd MISC metadata.xml 806 RMD160 511095d817e35ffce10ea738cc401176c9346caa SHA1 d25de76c2eaaab4a4b84191e7f33893bee81370d SHA256 cc5f451325114cd24263899ca84010c02700de03e21fe413661178a9431962d9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk4mARUACgkQ/ejvha5XGaNVPACfftfYTfpjs91DL+K74daapyC5 -msEAoPMV5dpTNHDSm83K4wZgfZxI/zGg -=cjir +iEYEARECAAYFAk4r3a0ACgkQ/ejvha5XGaMZggCgsLfltCycIbhkfvLcC0ahDXj1 +epsAnRiWl0afij99OxyHQQIFVckl/N2Y +=6o2E -----END PGP SIGNATURE----- diff --git a/sys-apps/portage/portage-2.2.0_alpha47.ebuild b/sys-apps/portage/portage-2.2.0_alpha47.ebuild new file mode 100644 index 000000000000..ea63209e10a1 --- /dev/null +++ b/sys-apps/portage/portage-2.2.0_alpha47.ebuild @@ -0,0 +1,403 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha47.ebuild,v 1.1 2011/07/24 08:53:59 zmedico Exp $ + +# Require EAPI 2 since we now require at least python-2.6 (for python 3 +# syntax support) which also requires EAPI 2. +EAPI=2 +inherit eutils multilib python + +DESCRIPTION="Portage is the package management and distribution system for Gentoo" +HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" +LICENSE="GPL-2" +KEYWORDS="~sparc-fbsd ~x86-fbsd" +SLOT="0" +IUSE="build doc epydoc +ipc +less linguas_pl python2 python3 selinux" + +# Import of the io module in python-2.6 raises ImportError for the +# thread module if threading is disabled. +python_dep="python3? ( =dev-lang/python-3* ) + !python2? ( !python3? ( + build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) + !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] >=dev-lang/python-3 ) ) + ) ) + python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) )" + +# The pysqlite blocker is for bug #282760. +DEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 ) + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" +# Require sandbox-2.2 for bug #288863. +RDEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 + >=app-shells/bash-3.2_p17 + >=app-admin/eselect-1.2 ) + elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) + elibc_glibc? ( >=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] = 0x2060000 and "good" or "bad")') = good ]] +} + +pkg_setup() { + # Bug #359731 - Die early if get_libdir fails. + [[ -z $(get_libdir) ]] && \ + die "get_libdir returned an empty string" + + if use python2 && use python3 ; then + ewarn "Both python2 and python3 USE flags are enabled, but only one" + ewarn "can be in the shebangs. Using python3." + fi + if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then + ewarn "Attempting to select a compatible default python interpreter" + local x success=0 + for x in /usr/bin/python2.* ; do + x=${x#/usr/bin/python2.} + if [[ $x -ge 6 ]] 2>/dev/null ; then + eselect python set python2.$x + if compatible_python_is_selected ; then + elog "Default python interpreter is now set to python-2.$x" + success=1 + break + fi + fi + done + if [ $success != 1 ] ; then + eerror "Unable to select a compatible default python interpreter!" + die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." + fi + fi + + if use python3; then + python_set_active_version 3 + elif use python2; then + python_set_active_version 2 + fi +} + +src_prepare() { + if [ -n "${PATCHVER}" ] ; then + if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then + rm "$S/bin/ebuild-helpers/portageq" \ + || die "failed to remove portageq helper symlink" + fi + epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" + fi + einfo "Setting portage.VERSION to ${PVR} ..." + sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ + die "Failed to patch portage.VERSION" + sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ + die "Failed to patch VERSION in doc/fragment/version" + sed -e "1s/VERSION/${PVR}/" -i man/* || \ + die "Failed to patch VERSION in man page headers" + + if ! use ipc ; then + einfo "Disabling ipc..." + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ + -i pym/_emerge/AbstractEbuildProcess.py || \ + die "failed to patch AbstractEbuildProcess.py" + fi + + if use python3; then + einfo "Converting shebangs for python3..." + python_convert_shebangs -r 3 . + elif use python2; then + einfo "Converting shebangs for python2..." + python_convert_shebangs -r 2 . + fi +} + +src_compile() { + if use doc; then + cd "${S}"/doc + touch fragment/date + make xhtml xhtml-nochunks || die "failed to make docs" + fi + + if use epydoc; then + einfo "Generating api docs" + mkdir "${WORKDIR}"/api + local my_modules epydoc_opts="" + my_modules="$(find "${S}/pym" -name "*.py" \ + | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ + -e 's:/:.:g' | sort)" || die "error listing modules" + # workaround for bug 282760 + > "$S/pym/pysqlite2.py" + PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ + epydoc -o "${WORKDIR}"/api \ + -qqqqq --no-frames --show-imports $epydoc_opts \ + --name "${PN}" --url "${HOMEPAGE}" \ + ${my_modules} || die "epydoc failed" + rm "$S/pym/pysqlite2.py" + fi +} + +src_test() { + # make files executable, in case they were created by patch + find bin -type f | xargs chmod +x + ./pym/portage/tests/runTests || die "test(s) failed" +} + +src_install() { + local libdir=$(get_libdir) + local portage_base="/usr/${libdir}/portage" + local portage_share_config=/usr/share/portage/config + + cd "${S}"/cnf + insinto /etc + doins etc-update.conf dispatch-conf.conf || die + + insinto "$portage_share_config/sets" + doins "$S"/cnf/sets/*.conf || die + insinto "$portage_share_config" + doins "$S/cnf/make.globals" || die + if [ -f "make.conf.${ARCH}".diff ]; then + patch make.conf "make.conf.${ARCH}".diff || \ + die "Failed to patch make.conf.example" + newins make.conf make.conf.example || die + 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 "" + newins make.conf make.conf.example || die + fi + + dosym ..${portage_share_config}/make.globals /etc/make.globals + + insinto /etc/logrotate.d + doins "${S}"/cnf/logrotate.d/elog-save-summary || die + + # BSD and OSX need a sed wrapper so that find/xargs work properly + if use userland_GNU; then + rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" + fi + + local x symlinks files + + cd "$S" || die "cd failed" + for x in $(find bin -type d) ; do + exeinto $portage_base/$x || die "exeinto failed" + cd "$S"/$x || die "cd failed" + files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l) + if [ -n "$files" ] ; then + doexe $files || die "doexe failed" + fi + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + cd "$S" || die "cd failed" + for x in $(find pym/* -type d ! -path "pym/portage/tests*") ; do + insinto $portage_base/$x || die "insinto failed" + cd "$S"/$x || die "cd failed" + # __pycache__ directories contain no py files + [[ "*.py" != $(echo *.py) ]] || continue + doins *.py || die "doins failed" + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + # We install some minimal tests for use as a preinst sanity check. + # These tests must be able to run without a full source tree and + # without relying on a previous portage instance being installed. + cd "$S" || die "cd failed" + exeinto $portage_base/pym/portage/tests || die + doexe pym/portage/tests/runTests || die + insinto $portage_base/pym/portage/tests || die + doins pym/portage/tests/*.py || die + insinto $portage_base/pym/portage/tests/lint || die + doins pym/portage/tests/lint/*.py || die + doins pym/portage/tests/lint/__test__ || die + + # Symlinks to directories cause up/downgrade issues and the use of these + # modules outside of portage is probably negligible. + for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do + [ ! -L "${x}" ] && continue + die "symlink to directory will cause upgrade/downgrade issues: '${x}'" + done + + doman "${S}"/man/*.[0-9] + if use linguas_pl; then + doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] + doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] + fi + + dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} + use doc && dohtml -r "${S}"/doc/* + use epydoc && dohtml -r "${WORKDIR}"/api + + dodir /usr/bin + for x in ebuild egencache emerge portageq quickpkg repoman ; do + dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} + done + + dodir /usr/sbin + local my_syms="archive-conf + dispatch-conf + emaint + emerge-webrsync + env-update + etc-update + fixpackages + regenworld" + local x + for x in ${my_syms}; do + dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} + done + dosym env-update /usr/sbin/update-env + dosym etc-update /usr/sbin/update-etc + + dodir /etc/portage + keepdir /etc/portage +} + +pkg_preinst() { + if [[ $ROOT == / ]] ; then + # Run some minimal tests as a sanity check. + local test_runner=$(find "$D" -name runTests) + if [[ -n $test_runner && -x $test_runner ]] ; then + einfo "Running preinst sanity tests..." + "$test_runner" || die "preinst sanity tests failed" + fi + fi + + if ! use build && ! has_version dev-python/pycrypto && \ + ! has_version '>=dev-lang/python-2.6[ssl]' ; then + ewarn "If you are an ebuild developer and you plan to commit ebuilds" + ewarn "with this system then please install dev-python/pycrypto or" + ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" + ewarn "to enable RMD160 hash support." + ewarn "See bug #198398 for more information." + fi + if [ -f "${ROOT}/etc/make.globals" ]; then + rm "${ROOT}/etc/make.globals" + fi + + has_version "<${CATEGORY}/${PN}-2.2_alpha" + MINOR_UPGRADE=$? + + has_version "<=${CATEGORY}/${PN}-2.2_pre5" + WORLD_MIGRATION_UPGRADE=$? + + # If portage-2.1.6 is installed and the preserved_libs_registry exists, + # assume that the NEEDED.ELF.2 files have already been generated. + has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ + ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \ + has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) + NEEDED_REBUILD_UPGRADE=$? + + [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" + REPO_LAYOUT_CONF_WARN=$? +} + +pkg_postinst() { + # Compile all source files recursively. Any orphans + # will be identified and removed in postrm. + python_mod_optimize /usr/$(get_libdir)/portage/pym + + if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then + einfo "moving set references from the worldfile into world_sets" + cd "${ROOT}/var/lib/portage/" + grep "^@" world >> world_sets + sed -i -e '/^@/d' world + fi + + if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then + einfo "rebuilding NEEDED.ELF.2 files" + for cpv in "${ROOT}/var/db/pkg"/*/*; do + if [ -f "${cpv}/NEEDED" ]; then + rm -f "${cpv}/NEEDED.ELF.2" + while read line; do + filename=${line% *} + needed=${line#* } + needed=${needed//+/++} + needed=${needed//#/##} + needed=${needed//%/%%} + newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) + newline=${newline// - } + echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" + done < "${cpv}/NEEDED" + fi + done + fi + + if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then + ewarn + echo "If you want overlay eclasses to override eclasses from" \ + "other repos then see the portage(5) man page" \ + "for information about the new layout.conf and repos.conf" \ + "configuration files." \ + | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done + ewarn + fi + + einfo + einfo "For help with using portage please consult the Gentoo Handbook" + einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" + einfo + + if [ $MINOR_UPGRADE = 0 ] ; then + elog "If you're upgrading from a pre-2.2 version of portage you might" + elog "want to remerge world (emerge -e world) to take full advantage" + elog "of some of the new features in 2.2." + elog "This is not required however for portage to function properly." + elog + fi + + if [ -z "${PV/*_alpha*}" ]; then + elog "If you always want to use the latest development version of portage" + elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml" + elog + fi +} + +pkg_postrm() { + python_mod_cleanup /usr/$(get_libdir)/portage/pym +}