From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3746A13825B for ; Mon, 16 May 2016 00:41:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0EB61421B; Mon, 16 May 2016 00:41:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17E2D1421B for ; Mon, 16 May 2016 00:41:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E36B0340C39 for ; Mon, 16 May 2016 00:41:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57FCA929 for ; Mon, 16 May 2016 00:41:43 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1463359181.1e10a2f00bc3c063f6cf1e6244790bb9cd20d7f9.dolsen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/portage/Manifest sys-apps/portage/portage-2.3.0_rc1.ebuild sys-apps/portage/portage-9999.ebuild X-VCS-Directories: sys-apps/portage/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 1e10a2f00bc3c063f6cf1e6244790bb9cd20d7f9 X-VCS-Branch: master Date: Mon, 16 May 2016 00:41:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 32d1947a-010d-4d30-af6a-e6f7ea19b98f X-Archives-Hash: 70c1c3adc1b87caec990a91860b25337 commit: 1e10a2f00bc3c063f6cf1e6244790bb9cd20d7f9 Author: Brian Dolbec gentoo org> AuthorDate: Sun May 15 23:43:57 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon May 16 00:39:41 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e10a2f0 sys-apps/portage: Version bump, new split portage/repoman releases Update 9999 with updated einfo about teh split releases. Package-Manager: portage-2.3.0_rc1 sys-apps/portage/Manifest | 1 + ...ortage-9999.ebuild => portage-2.3.0_rc1.ebuild} | 172 +++++++++++++++++---- sys-apps/portage/portage-9999.ebuild | 27 +--- 3 files changed, 151 insertions(+), 49 deletions(-) diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index ae961fa..67e147f 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -4,3 +4,4 @@ DIST portage-2.2.26.tar.bz2 977277 SHA256 7f57aa704c58ea47f031f177203dc7b335e01e DIST portage-2.2.27.tar.bz2 977125 SHA256 3126b59456d2f0a1c9b2c03df15154b2fb29e462abbbe1b8898fa7bc291421af SHA512 8f16a7c9ce33bd34d60f0b06d3e4e0bd4e2c27e6bdc0756e6d3b59108b5438e92f5ca9e981bbfe4ebe9b64f1afe9442d72c52c02fe456e0d36daffae6f77d694 WHIRLPOOL e467c6d9e4e1c177667389a4ce134fabc8676ff5baf9403d73de241086c7d5bab4d11bfe84be749cf9f9781cadc1dd8d173e03e9fba4c926e24131c261a28d1e DIST portage-2.2.28.tar.bz2 969138 SHA256 da8148a1a9275c87f535679e41b1bb3a1380ba0f903b80510017517e4c5229d0 SHA512 d21bf7e7dcc0a779a13df6a959e5d4291492fce2a5525b67e9a4705888021f9c08b8d78cd32b2eb930ac5428c40383e4e46da5a7b1ed5c9c9c42314c0f1c6a0b WHIRLPOOL 1b9584b0243b46c70d0778aad57df2d3ea99e19f243280e542c29e6fed0634b72de6b203a3c296c2977d1a6e5e5250b910574176c692d2c7c27c0938528bb43d DIST portage-2.2.8.tar.bz2 874672 SHA256 c1074e01173df5384e003598dbc5f64f09e92f83fd26faab2f88f9f0bc64aa7e SHA512 acc47d94ff8c08e5a7bf2d4c4e600863430dd1e7d0bb8b4254d6477a498933cae663db84debf9487d2243c2cba689629ef8e8b6cf108e10d40e89e8e8d7e1257 WHIRLPOOL d54290ede8d3d85e5211cda7e86ed740178121ef2f47cf0858c27941d8679d29c11445befff962986d40a47ded50d0d4654de19e7d4aef3fdf2546655a0d6fe2 +DIST portage-2.3.0_rc1.tar.bz2 910204 SHA256 52cf0837975c4b2a8e1d3d18e3334a735b14e4ebdbdca8992548b86c1d5bebd1 SHA512 d7a5ce8800668606a2e3549621686bb8bb30bd2f5d7a57b106efc1c58d34b95cef4605f5067824db0beb6f870c9e81cb3fdb5c074e9e64bef40a9df6f524ad13 WHIRLPOOL c4c86fe20606e93ecf4d125f436077ec4d15cb453c98e83894a8383f1654a9b294107c9c04bb3019f66a643ff42c333060319d59dda47c323e9711723c3b9cfe diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-2.3.0_rc1.ebuild similarity index 60% copy from sys-apps/portage/portage-9999.ebuild copy to sys-apps/portage/portage-2.3.0_rc1.ebuild index 7ef56c9..d76342d 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-2.3.0_rc1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -11,13 +11,13 @@ PYTHON_COMPAT=( ) PYTHON_REQ_USE='bzip2(+)' -inherit distutils-r1 git-r3 multilib +inherit distutils-r1 multilib DESCRIPTION="Portage is the package management and distribution system for Gentoo" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" LICENSE="GPL-2" -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" SLOT="0" IUSE="build doc epydoc +ipc linguas_ru selinux xattr" @@ -74,8 +74,9 @@ prefix_src_archives() { done } -EGIT_REPO_URI="git://anongit.gentoo.org/proj/portage.git - https://github.com/gentoo/portage.git" +TARBALL_PV=${PV} +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)" pkg_setup() { use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 ) @@ -187,7 +188,7 @@ python_install_all() { fi # Due to distutils/python-exec limitations - # they must be installed to /usr/bin. + # 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 @@ -217,30 +218,147 @@ pkg_preinst() { 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.1.13" || \ + { + has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \ + has_version "<${CATEGORY}/${PN}-2.2.0_alpha189" + } ; then + USERPRIV_UPGRADE=true + USERSYNC_UPGRADE=true + REPOS_CONF_UPGRADE=true + REPOS_CONF_SYNC= + type -P portageq >/dev/null 2>&1 && \ + REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC) + else + USERPRIV_UPGRADE=false + USERSYNC_UPGRADE=false + REPOS_CONF_UPGRADE=false + fi +} + +get_ownership() { + case ${USERLAND} in + BSD) + stat -f '%Su:%Sg' "${1}" + ;; + *) + stat -c '%U:%G' "${1}" + ;; + esac +} + +new_config_protect() { + # Generate a ._cfg file even if the target file + # does not exist, ensuring that the user will + # notice the config change. + local basename=${1##*/} + local dirname=${1%/*} + local i=0 + while true ; do + local filename=$( + echo -n "${dirname}/._cfg" + printf "%04d" ${i} + echo -n "_${basename}" + ) + [[ -e ${filename} ]] || break + (( i++ )) + done + echo "${filename}" } pkg_postinst() { - einfo "This version of portage now has the new plugin-sync system" - einfo "An additional 'auto-sync = yes' setting is needed for each repo" - einfo "you wish 'emerge --sync' to sync" - einfo "The default setting is 'no'" - einfo "The primary sync action is now controlled via the emaint command" - einfo "The emaint sync module is more flexible in its capabilities" - einfo "It is similar to layman's -s and -S options" - einfo "" - einfo " 'emerge --sync' is now equivalent to 'emaint sync -a'" - einfo "" - einfo "run 'emaint sync --auto' to sync all auto-sync enabled repos" - einfo " options are:" - einfo " -A, --allrepos Sync all repos that have a sync-url defined" - einfo " -a, --auto Sync auto-sync enabled repos only" - einfo " -r REPO, --repo REPO Sync the specified repo" - einfo " even if 'auto-sync = no' is set" - einfo "" - einfo "Currently installed sync-type modules include:" - einfo " rsync, git, cvs, svn, websync" - einfo " the websync module currently runs emerge-webrsync for you" + + if ${REPOS_CONF_UPGRADE} ; then + einfo "Generating repos.conf" + local repo_name= + [[ -f ${PORTDIR}/profiles/repo_name ]] && \ + repo_name=$(< "${PORTDIR}/profiles/repo_name") + if [[ -z ${REPOS_CONF_SYNC} ]] ; then + REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf") + REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* } + fi + local sync_type= + [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git + + if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then + sync_type=cvs + REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://} + fi + + cat <<-EOF > "${T}/repos.conf" + [DEFAULT] + main-repo = ${repo_name:-gentoo} + + [${repo_name:-gentoo}] + location = ${PORTDIR:-${EPREFIX}/usr/portage} + sync-type = ${sync_type:-rsync} + sync-uri = ${REPOS_CONF_SYNC} + EOF + + [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf" + + local dest=${EROOT:-${ROOT}}etc/portage/repos.conf + if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then + dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf + fi + # Don't install the config update if the desired repos.conf directory + # and config file exist, since users may accept it blindly and break + # their config (bug #478726). + [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \ + mv "${T}/repos.conf" "$(new_config_protect "${dest}")" + + if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then + einfo "Generating make.conf PORTDIR setting for backward compatibility" + for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do + [[ -e ${dest} ]] && break + done + [[ -d ${dest} ]] && dest=${dest}/portdir.conf + rm -rf "${T}/make.conf" + [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf" + cat <<-EOF >> "${T}/make.conf" + + # Set PORTDIR for backward compatibility with various tools: + # gentoo-bashcomp - bug #478444 + # euse - bug #474574 + # euses and ufed - bug #478318 + PORTDIR="${EPREFIX}/usr/portage" + EOF + mkdir -p "${dest%/*}" + mv "${T}/make.conf" "$(new_config_protect "${dest}")" + fi + fi + + local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}} + + if ${USERSYNC_UPGRADE} && \ + [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then + local ownership=$(get_ownership "${PORTDIR}") + if [[ -n ${ownership} ]] ; then + einfo "Adjusting PORTDIR permissions for usersync" + find "${PORTDIR}" -path "${distdir%/}" -prune -o \ + ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \ + -exec chown "${ownership}" {} + + fi + fi + + # Do this last, since it could take a long time if there + # are lots of live sources, and the user may be tempted + # to kill emerge while it is running. + if ${USERPRIV_UPGRADE} && \ + [[ -d ${distdir} && -w ${distdir} ]] ; then + local ownership=$(get_ownership "${distdir}") + if [[ ${ownership#*:} == portage ]] ; then + einfo "Adjusting DISTDIR permissions for userpriv" + find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \ + -exec chown -R portage:portage {} + + fi + fi + einfo "" - einfo "For sync module specifications: https://wiki.gentoo.org/wiki/Project:Portage/Sync" + einfo "This release of portage NO LONGER contains the repoman code base." + einfo "Repoman has it's own ebuild and release package." + einfo "For repoman functionality please emerge app-portage/repoman" + einfo "Please report any bugs you may encounter." einfo "" } diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index 7ef56c9..8bb66c5 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -220,27 +220,10 @@ pkg_preinst() { } pkg_postinst() { - einfo "This version of portage now has the new plugin-sync system" - einfo "An additional 'auto-sync = yes' setting is needed for each repo" - einfo "you wish 'emerge --sync' to sync" - einfo "The default setting is 'no'" - einfo "The primary sync action is now controlled via the emaint command" - einfo "The emaint sync module is more flexible in its capabilities" - einfo "It is similar to layman's -s and -S options" einfo "" - einfo " 'emerge --sync' is now equivalent to 'emaint sync -a'" - einfo "" - einfo "run 'emaint sync --auto' to sync all auto-sync enabled repos" - einfo " options are:" - einfo " -A, --allrepos Sync all repos that have a sync-url defined" - einfo " -a, --auto Sync auto-sync enabled repos only" - einfo " -r REPO, --repo REPO Sync the specified repo" - einfo " even if 'auto-sync = no' is set" - einfo "" - einfo "Currently installed sync-type modules include:" - einfo " rsync, git, cvs, svn, websync" - einfo " the websync module currently runs emerge-webrsync for you" - einfo "" - einfo "For sync module specifications: https://wiki.gentoo.org/wiki/Project:Portage/Sync" + einfo "This release of portage NO LONGER contains the repoman code base." + einfo "Repoman now has it's own ebuild and release package." + einfo "For repoman functionality please emerge app-portage/repoman" + einfo "Please report any bugs you may encounter." einfo "" }