From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-apps/baselayout-prefix/Manifest | 6 ++ .../baselayout-prefix-2.2-r5.ebuild | 104 +++++++++++++++++++++ .../files/baselayout-2.2-prefix-chaining.patch | 67 +++++++++++++ sys-apps/baselayout-prefix/metadata.xml | 7 ++ 4 files changed, 184 insertions(+) create mode 100644 sys-apps/baselayout-prefix/Manifest create mode 100644 sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild create mode 100644 sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch create mode 100644 sys-apps/baselayout-prefix/metadata.xml (limited to 'sys-apps/baselayout-prefix') diff --git a/sys-apps/baselayout-prefix/Manifest b/sys-apps/baselayout-prefix/Manifest new file mode 100644 index 000000000000..f3d3313eeef2 --- /dev/null +++ b/sys-apps/baselayout-prefix/Manifest @@ -0,0 +1,6 @@ +AUX baselayout-2.2-prefix-chaining.patch 2060 SHA256 0f42eeb6d7ea700f14d30f0c0f11856caeffd46ae8b9d68a9761237b6251222b SHA512 6ad809a735250efebf2052736a095e6573cdc1650f54c2d636053e05add9e71045d2e14ad1788eadaef5eff76a4bdea9ac58db67ffcb67ba5bf16f1883186aca WHIRLPOOL 5363a11e7ff8661655f319be92caee5a540bccbfac6390b4230ac461adec9b66158ddd8feec25ee37469caa70e991d461a2b4bd4c93e7171e106f31b16850c92 +DIST baselayout-2.2.tar.bz2 40744 SHA256 11d4a223b06da545c3e59e07c9195570f334b5b1be05d995df0ebc8ea2203e98 SHA512 a5199c42e835d9f2683cc94f3c4c47ecdc392316c24e0932845736e2e90479b0c5c8ad72ead8e0537f097405b7d7548d00b87b7ff8c9e3651486e3c5c0970b36 WHIRLPOOL 60cc4f7f76c5a45c15303e526decffb3bad2b50ac659b1dd072d2ed4b0eb0b31929a1a733ddb03a31ee5882b889a4efb87206f63ffaa2b11e26d36afd0933a95 +EBUILD baselayout-prefix-2.2-r5.ebuild 3557 SHA256 457d848d454dcc98dc791e6a4df20e7dc094003fb19b11029ded82e69bca4205 SHA512 9ed29ada5260ad9dd26b83ab55ce73558e31bfe883824a54f8e6526bfb12a8dd3f894b66559cf10762c0ba1bf64b39351c06f72e540eab42fbec10f820d23165 WHIRLPOOL 4e71c1c9e1821c2e209418d8b73903df40f41c4dea030edc459dd218801fc4eddd1cceaeb82f59a888f96cdaa624462400e7efebda9a8ed8c3876d9fc3ede53a +MISC ChangeLog 4492 SHA256 a903762f55c7c89615b4142e192aacc28dbfead257a1aa809eaffc047618120a SHA512 2ffd2b5d606ce1e9ba7943929aa240eff843eadb84d11b7f9cc941ee43f1dd2fc2c260cd06d82952694489b56ed103a28b8bfed80400bdfc0ff493b87540be7c WHIRLPOOL c91eb735a3e704c4ffe28ec714ca2da4ace3b164d2c424f6443ce445f5e35d2dbcc15eb8d3d30053257e439632f63960e658ecb0e21e59f70ac7f637f160b399 +MISC ChangeLog-2015 11812 SHA256 5de6c002b02ad2ee0eeef423408f0a471e212b7a71afb36ae1d066dea783d944 SHA512 16e6a769e3358607354f76b8784c615935feb99bf0c1421070879b67b7a31def196a51685fe2ba4e9ae853787a45ace6a5016607d1b0bf21427089eb4801c303 WHIRLPOOL 4fcf8b04eccead2cdff3a36cdb88f04feef83f35cd9844a31d092a2012d1413bae2dacf8f3a03f5e1cd06cc503293ded0cf995d0323e5117412bf7ffaf4df77f +MISC metadata.xml 218 SHA256 095b5605ce3ed9f39ba42cc3aec76060b662da5402f401d6da98ca2cc115df7e SHA512 5f03bbfedc0f66afc7bc45f1aeeccdfc3c775dd337fb280bb7e80e29f618898ce92a05c66c126e79333e33ce7f422169c5ff1cdeeb30b58475c712e9bdc4e79f WHIRLPOOL c48b1cc98e9fa71f4c4701aed44626b08a7fb1543477d77b04ecb39d0afe86e486cada91da268884f89f12e15b63e502d61d07b5417a38c49d94ee44df85c5b5 diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild new file mode 100644 index 000000000000..9f59ae36b38f --- /dev/null +++ b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils multilib libtool + +MY_P=${P/-prefix/} # just use "upstream" sources +DESCRIPTION="Minimal baselayout for Gentoo Prefix installs" +HOMEPAGE="https://www.gentoo.org/" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2 + https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~arm ~ppc-aix ~x64-cygwin ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +pkg_preinst() { + # This is written in src_install (so it's in CONTENTS), but punt all + # pending updates to avoid user having to do etc-update (and make the + # pkg_postinst logic simpler). + rm -f "${EROOT}"/etc/._cfg????_gentoo-release +} + +src_prepare() { + if use prefix-chain; then + epatch "${FILESDIR}"/baselayout-${PV}-prefix-chaining.patch + + # need to set the PKG_CONFIG_PATH globally for this prefix, when + # chaining is enabled, since pkg-config may not be installed locally, + # but still .pc files should be found for all RDEPENDable prefixes in + # the chain. + echo "PKG_CONFIG_PATH=\"/usr/lib/pkgconfig:/usr/share/pkgconfig\"" >> etc/env.d/00basic + echo "PORTAGE_OVERRIDE_EPREFIX=\"${EPREFIX}\"" >> etc/env.d/00basic + echo "PORTAGE_CONFIGROOT=\"${EPREFIX}\"" >> etc/env.d/00basic + echo "EPREFIX=\"${EPREFIX}\"" >> etc/env.d/00basic + fi + default +} + +src_install() { + # make functions.sh available in /etc/init.d (from gentoo-functions) + # Note: we cannot replace the symlink with a file here, or Portage will + # config-protect it, and etc-update can't handle symlink to file updates + dodir etc/init.d + dosym ../../lib/gentoo/functions.sh /etc/init.d/functions.sh + + dodir etc + sed \ + -e "/PATH=/!s:/\(etc\|usr/bin\|bin\):\"${EPREFIX}\"/\1:g" \ + -e "/PATH=/s|\([:\"]\)/|\1${EPREFIX}/|g" \ + etc/profile > "${ED}"/etc/profile || die + if ! use prefix-chain; then + sed \ + -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \ + -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \ + -i "${ED}"/etc/profile || die + fi + dodir etc/env.d + sed \ + -e "s:/\(etc/env.d\|opt\|usr\):${EPREFIX}/\1:g" \ + -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \ + etc/env.d/00basic > "${ED}"/etc/env.d/00basic || die + dodoc ChangeLog.svn + + # add the host OS MANPATH + if [[ -d "${ROOT}"/usr/share/man ]] ; then + echo 'MANPATH="/usr/share/man"' > "${ED}"/etc/env.d/99basic || die + fi + + # rc-scripts version for testing of features that *should* be present + echo "Gentoo Prefix Base System release ${PV}" > "${ED}"/etc/gentoo-release + + # FHS compatibility symlinks stuff + dosym /var/tmp /usr/tmp + + # add a dummy to avoid Portage shebang errors + dodir sbin + cat > "${ED}"/sbin/runscript <<- EOF + #!/usr/bin/env sh + source "${EPREFIX}/lib/gentoo/functions.sh" + + eerror "runscript/openrc-run not supported by Gentoo Prefix Base System release ${PV}" 1>&2 + exit 1 + EOF + chmod 755 "${ED}"/sbin/runscript || die + cp "${ED}"/sbin/{runscript,openrc-run} || die +} + +pkg_postinst() { + # Take care of the etc-update for the user + if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then + mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release + fi + + # baselayout leaves behind a lot of .keep files, so let's clean them up + find "${EROOT}"/lib/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null + find "${EROOT}"/lib/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null +} diff --git a/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch b/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch new file mode 100644 index 000000000000..98e41b95bb91 --- /dev/null +++ b/sys-apps/baselayout-prefix/files/baselayout-2.2-prefix-chaining.patch @@ -0,0 +1,67 @@ +--- baselayout-2.2/etc/profile.orig 2017-03-23 16:46:29.922123300 +0100 ++++ baselayout-2.2/etc/profile 2017-03-23 16:58:43.578360900 +0100 +@@ -4,6 +4,46 @@ + # environment for login shells. + # + ++# ++# for prefix-chaining, the very first thing to do is to load ++# the profiles for all chained instances above. ++# ++# TODO: is it safe in any case to shell source make.conf? ++# don't do any recursive expansion here. if the parent can ++# use READONLY_EPREFIX's, it has to have the same profile as ++# we have here, and thus it will source parents before ++# evaluating anything from itself. ++# ++if [[ -r /etc/portage/make.conf ]]; then ++ _ro_root=$(. /etc/portage/make.conf && echo $READONLY_EPREFIX) ++elif [[ -r /etc/make.conf ]]; then ++ _ro_root=$(. /etc/make.conf && echo $READONLY_EPREFIX) ++else ++ echo "Failed to read" /etc/portage/make.conf >&2 ++fi ++_ro_deps=${_ro_root#*:} ++_ro_root=${_ro_root%:*} ++if [ -n "${_ro_root}" -a -f "${_ro_root}/"etc/profile ]; then ++ . "${_ro_root}/"etc/profile ++fi ++ ++# ++# With prefix-chaining we want another set of variables that ++# should be retained for all prefixes. for example it is ok ++# to retain PKG_CONFIG_PATH if the parent of the chain can ++# be used to resolve RDEPEND... ++# ++if [[ -n "${_ro_root}" ]]; then ++ _ro_chained_path_vars="PATH MANPATH" ++ ++ [[ ${_ro_deps} == *RDEPEND* ]] && ++ _ro_chained_path_vars="${_ro_chained_path_vars} PKG_CONFIG_PATH" ++ ++ for var in ${_ro_chained_path_vars}; do ++ eval "_ro_backupenv_paths_${var}=\${${var}}" ++ done ++fi ++ + # Load environment settings from profile.env, which is created by + # env-update from the files in /etc/env.d + if [ -e /etc/profile.env ] ; then +@@ -61,3 +101,17 @@ + [ -r "$sh" ] && . "$sh" + done + unset sh ++ ++# ++# finally chain the save variables for previous prefixes in the chain. ++# ++if [[ -n "${_ro_chained_path_vars}" ]]; then ++ for var in ${_ro_chained_path_vars}; do ++ eval "export ${var}=\${${var}}:\${_ro_backupenv_paths_${var}}" ++ eval "unset _ro_backupenv_paths_${var}" ++ done ++fi ++ ++unset _ro_root ++unset _ro_deps ++unset _ro_chained_path_vars diff --git a/sys-apps/baselayout-prefix/metadata.xml b/sys-apps/baselayout-prefix/metadata.xml new file mode 100644 index 000000000000..91e2eccbc46d --- /dev/null +++ b/sys-apps/baselayout-prefix/metadata.xml @@ -0,0 +1,7 @@ + + + + + prefix@gentoo.org + + -- cgit v1.2.3