summaryrefslogtreecommitdiff
path: root/sys-apps/baselayout
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/baselayout')
-rw-r--r--sys-apps/baselayout/Manifest8
-rw-r--r--sys-apps/baselayout/baselayout-2.2-r1.ebuild263
-rw-r--r--sys-apps/baselayout/baselayout-2.2.ebuild2
3 files changed, 263 insertions, 10 deletions
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 3ec3151d..c2fdff62 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,11 +1,3 @@
-AUX baselayout-1.12.14-iproute.patch 633 SHA256 d30480e75024953ac64a51cf7a3d54f4f975470219da2cec9ad0832b5ff6eff9 SHA512 4c8f177971d6e65b8a0d55c5b8a045f4277637e97b41a07b3a332adca2720c929c4b44ad29a59d2ad4ec521924711c8f82742ec68bc3f0b54791b38a21b2bce4 WHIRLPOOL 695d8720650571a1f49678d38be713f94d9d318f5522609bce09872d587da7b13e89d702e0a4e77072fe9f6a677bc6d8c5e818584876afe57c286c5454fe0781
-AUX baselayout-2.0.1-proc_touch.patch 528 SHA256 5c8108347da5881ba982a4c8831b846393d6c6928d6497f021633e45d6f3ab39 SHA512 c60bb20a2bf93741170d15d62b33d46284b92b2442977fe41db68e874c7f02a466a00c3f65f4e06db57598487dcc5827536afb52375a8d821ef148babb25b247 WHIRLPOOL 04d2980060c7ea1f4a101411b0bcd065009c9fe36261f214bfc52009c36092ad50819fe0b433c04b212699a6b94c7bf57ada9fd743abf35631e11ccae3c301b2
-AUX baselayout-2.0.3-slash-run-dir.patch 273 SHA256 7c797e35a721250a8961c10efeb1495fbdd759358d9b6084504ce4b47d8e4d2b SHA512 f1e01da181faafdbe660b9afc442d2d1f6650064fb15f94340ec43750e45fa3ff1179730cd1b81e591f03a82e8c45d2402bc23ac2310ef0ebb6bc762270d8a0b WHIRLPOOL ef17a9d7a90fd6be7108d316a57265cd38f2f52fd134ec37ba7328119ca1d17ac842ab9065bca4c9b21d4a552768e754c1badd69c8a568221924e0055b3eff24
-AUX baselayout-rogentos-os-release.patch 486 SHA256 5fae994ba07fd294b92c554bc901935f512b6bec99697520d7a961af48d90208 SHA512 ab6ce0ff4c942aa3d60dbab9c2013633a3162ab0707f38d7ad72c4c8d7349cf6d804eca40276ab162f745d206d04ae0eb45bda0a0f29d35aa2f86bc675427081 WHIRLPOOL 6fc230172fb907223d3f2ee297b1c3e4c36dfd7d6a17a947207ad10559475c4c9565cd1afa118c2c775b14f727157892027d78a55441ad2e33ea97bf89fee2a0
DIST baselayout-2.0.3.tar.bz2 39969 SHA256 879308781d845f467eb2b45b9ff006aa799e943f45ddba518f43acae1ec84bdd
DIST baselayout-2.1.tar.bz2 40398 SHA256 2ac6f2156513a2820a0eeeecc2cf7e7c0b5e0c750b324f1e21912d5f3cda4956
DIST baselayout-2.2.tar.bz2 40744 SHA256 11d4a223b06da545c3e59e07c9195570f334b5b1be05d995df0ebc8ea2203e98 SHA512 a5199c42e835d9f2683cc94f3c4c47ecdc392316c24e0932845736e2e90479b0c5c8ad72ead8e0537f097405b7d7548d00b87b7ff8c9e3651486e3c5c0970b36 WHIRLPOOL 60cc4f7f76c5a45c15303e526decffb3bad2b50ac659b1dd072d2ed4b0eb0b31929a1a733ddb03a31ee5882b889a4efb87206f63ffaa2b11e26d36afd0933a95
-EBUILD baselayout-2.0.3-r1.ebuild 8324 SHA256 67512c59427896fa6801f7c410b6948af0fc5368994e78f8dfc3d7515cd41c44 SHA512 d1cef6c0226daf4ffea851b0a5d3e03215cc99d7f5bbe023f61f21dc2fe5ca88d236f75e9ba21c03f94c70ba3f821b1551bea4ee4b5e71dc31d21fddd078c9f6 WHIRLPOOL 4e490c6ba6945a73dc50c5d6f04861cb648f82b5b9bbbd702f4eafed511e44b7322856ed20bf4f3adf83910144d2cd6322bfcd1dc9715daaab8a4695523f62ee
-EBUILD baselayout-2.1.ebuild 8703 SHA256 f3e2bda1c1a7c805f7b0093107abcc3357362627e9110ee1eb9b6804b8e90b31 SHA512 44c3de65a97cd0f9d3cfec4944d88033d7a12d30e79c6d9e7836b3816001acd7703a36dacf75bb6e58a579951b1af80dccca322853d614c1d50274429fb3c4e5 WHIRLPOOL 69f10d3cc403e3d49d9555b855de575d8474aa6b0c1a0c7cd63dd7f5ac7bc84460dfbb3382b315549e8c0e1df79522c2161df9af0429815da129d2ad78e7f58d
-EBUILD baselayout-2.2.ebuild 9132 SHA256 2317988157c8a373747300c0598952dce05eab60d4f85c80e14e268129a4f625 SHA512 9a825db62673c2af8036c650edf893b53af3ba4eab9c409acb24b57dfb0941c1348eaec30d59e3855c7b4b6e81a07d4623a4d866c3ff192c24b99cc7fb2391b0 WHIRLPOOL 902c2b43e2146125838f657023148e9a642c20686f523995d4f879e659cf4e1ae84feeecc6b2b61e22c83eb498ee68ab71ab18b1873b5de2d58bb6cd2e475ebe
-MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
diff --git a/sys-apps/baselayout/baselayout-2.2-r1.ebuild b/sys-apps/baselayout/baselayout-2.2-r1.ebuild
new file mode 100644
index 00000000..695bbf9a
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.2-r1.ebuild
@@ -0,0 +1,263 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.2.ebuild,v 1.2 2012/08/23 21:47:35 vapier Exp $
+
+inherit eutils multilib
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build kernel_linux"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_warn() {
+ local syms=$1 dirs=$2 def_libdir=$3
+
+ [ -z "${syms}${dirs}" ] && return
+
+ ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB}, so that means"
+ if [ -z "${syms}" ] ; then
+ ewarn "you need to have these paths as symlinks to ${def_libdir}:"
+ ewarn "$1"
+ fi
+}
+multilib_layout() {
+ local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
+
+ # figure out which paths should be symlinks and which should be directories
+ local dirs syms exp d
+ for libdir in ${libdirs} ; do
+ exp=( {,usr/,usr/local/}${libdir} )
+ for d in "${exp[@]/#/${ROOT}}" ; do
+ # most things should be dirs
+ if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
+ [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
+ else
+ [ -h "${d}" ] && syms+=" ${d}"
+ fi
+ done
+ done
+ if [ -n "${syms}${dirs}" ] ; then
+ ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
+ ewarn "have these paths configured as follows:"
+ [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
+ [ -n "${syms}" ] && ewarn "directories:${syms}"
+ ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
+ ewarn "If things fail, you will need to manually create/move the directories."
+ echo
+ fi
+
+ # setup symlinks and dirs where we expect them to be; do not migrate
+ # data ... just fall over in that case.
+ local prefix
+ for prefix in "${ROOT}"{,usr/,usr/local/} ; do
+ if [ "${SYMLINK_LIB}" = yes ] ; then
+ # we need to make sure "lib" points to the native libdir
+ if [ -h "${prefix}lib" ] ; then
+ # it's already a symlink! assume it's pointing to right place ...
+ continue
+ elif [ -d "${prefix}lib" ] ; then
+ # "lib" is a dir, so need to convert to a symlink
+ ewarn "Converting ${prefix}lib from a dir to a symlink"
+ rm -f "${prefix}lib"/.keep
+ if rmdir "${prefix}lib" 2>/dev/null ; then
+ ln -s ${def_libdir} "${prefix}lib" || die
+ else
+ die "non-empty dir found where we needed a symlink: ${prefix}lib"
+ fi
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a symlink"
+ mkdir -p "${prefix}" || die
+ rm -f "${prefix}lib" || die
+ ln -s ${def_libdir} "${prefix}lib" || die
+ mkdir -p "${prefix}${def_libdir}" #423571
+ fi
+ else
+ # we need to make sure "lib" is a dir
+ if [ -h "${prefix}lib" ] ; then
+ # "lib" is a symlink, so need to convert to a dir
+ ewarn "Converting ${prefix}lib from a symlink to a dir"
+ rm -f "${prefix}lib" || die
+ if [ -d "${prefix}lib32" ] ; then
+ ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
+ mv "${prefix}lib32" "${prefix}lib" || die
+ else
+ mkdir -p "${prefix}lib" || die
+ fi
+ elif [ -d "${prefix}lib" ] ; then
+ # make sure the old "lib" ABI location does not exist; we
+ # only symlinked the lib dir on systems where we moved it
+ # to "lib32" ...
+ case ${CHOST} in
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [ -d "${prefix}lib32" ] ; then
+ rm -f "${prefix}lib32"/.keep
+ if ! rmdir "${prefix}lib32" 2>/dev/null ; then
+ ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
+ die "non-empty dir found where there should be none: ${prefix}lib32"
+ fi
+ fi
+ ;;
+ esac
+ else
+ # nothing exists, so just set it up sanely
+ ewarn "Initializing ${prefix}lib as a dir"
+ mkdir -p "${prefix}" || die
+ rm -f "${prefix}lib" || die
+ ln -s ${def_libdir} "${prefix}lib" || die
+ fi
+ fi
+ done
+}
+
+pkg_preinst() {
+ # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
+ # the baselayout-1.x ebuild copies all the real configs from the user's
+ # /etc/conf.d into ${D}, it makes them all appear to be the default
+ # versions. In order to protect them from being unmerged after this
+ # upgrade, modify their timestamps.
+ touch "${ROOT}"/etc/conf.d/* 2>/dev/null
+
+ # 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 "${ROOT}"/etc/._cfg????_gentoo-release
+
+ # We need to install directories and maybe some dev nodes when building
+ # stages, but they cannot be in CONTENTS.
+ # Also, we cannot reference $S as binpkg will break so we do this.
+ multilib_layout
+ if use build ; then
+ emake -C "${D}/usr/share/${PN}" DESTDIR="${ROOT}" layout || die
+ fi
+ rm -f "${D}"/usr/share/${PN}/Makefile
+
+ # Sabayon customization, protect /etc/hosts from removal (from older ebuilds)
+ local etc_hosts="${ROOT}/etc/hosts"
+ if [ -e "${etc_hosts}" ]; then
+ cp -p "${etc_hosts}" "${etc_hosts}.baselayout_ebuild_backup" # don't die
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ # We are Sabayon!
+ epatch "${FILESDIR}/${PN}-rogentos-os-release.patch"
+}
+
+src_install() {
+ # Setup /run directory, this is missing from original baselayout
+ dodir /run
+
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${D}" \
+ install || die
+ dodoc ChangeLog.svn
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile || die
+
+ # handle multilib paths. do it here because we want this behavior
+ # regardless of the C library that you're using. we do explicitly
+ # list paths which the native ldconfig searches, but this isn't
+ # problematic as it doesn't change the resulting ld.so.cache or
+ # take longer to generate. similarly, listing both the native
+ # path and the symlinked path doesn't change the resulting cache.
+ local libdir ldpaths
+ for libdir in $(get_all_libdirs) ; do
+ ldpaths+=":/${libdir}:/usr/${libdir}:/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > "${D}"/etc/gentoo-release
+
+ # Sabayon customization, install /etc/hosts separately (to .example)
+ mv "${D}"/etc/hosts "${D}"/etc/hosts.example || die "cannot move /etc/hosts"
+
+}
+
+pkg_postinst() {
+ local x
+
+ # We installed some files to /usr/share/baselayout instead of /etc to stop
+ # (1) overwriting the user's settings
+ # (2) screwing things up when attempting to merge files
+ # (3) accidentally packaging up personal files with quickpkg
+ # If they don't exist then we install them
+ for x in master.passwd passwd shadow group fstab ; do
+ [ -e "${ROOT}etc/${x}" ] && continue
+ [ -e "${ROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${ROOT}usr/share/baselayout/${x}" "${ROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${ROOT}etc/${x}" ] && chmod o-rwx "${ROOT}etc/${x}"
+ done
+
+ # Take care of the etc-update for the user
+ if [ -e "${ROOT}"/etc/._cfg0000_gentoo-release ] ; then
+ mv "${ROOT}"/etc/._cfg0000_gentoo-release "${ROOT}"/etc/gentoo-release
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e ${ROOT}/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${ROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # baselayout leaves behind a lot of .keep files, so let's clean them up
+ find "${ROOT}"/lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${ROOT}"/lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e ${ROOT}/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' /etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # Sabayon customization, copy /etc/hosts back in place if it doesn't exist
+ local etc_hosts="${ROOT}/etc/hosts"
+ if [ -e "${etc_hosts}.baselayout_ebuild_backup" ]; then
+ cp -p "${etc_hosts}.baselayout_ebuild_backup" "${etc_hosts}" # don't die
+ elif [ ! -e "${etc_hosts}" ]; then
+ cp -p "${etc_hosts}.example" "${etc_hosts}" # don't die
+ fi
+ chown root:root "${etc_hosts}" # don't die
+
+ # http://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${ROOT}"/run
+
+ if ! grep -qs "^tmpfs.*/run " "${ROOT}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+ fi
+}
diff --git a/sys-apps/baselayout/baselayout-2.2.ebuild b/sys-apps/baselayout/baselayout-2.2.ebuild
index 1f70a72c..695bbf9a 100644
--- a/sys-apps/baselayout/baselayout-2.2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.2.ebuild
@@ -14,8 +14,6 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
-PDEPEND="sys-apps/openrc"
-
pkg_setup() {
multilib_layout
}