* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-09-03 11:06 Michał Górny
0 siblings, 0 replies; 124+ messages in thread
From: Michał Górny @ 2016-09-03 11:06 UTC (permalink / raw
To: gentoo-commits
commit: 5ac6071c931acd281eddd9bae478386df7a1bfc3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 3 10:45:25 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 3 11:05:59 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ac6071c
sys-apps/baselayout: Do not complain about lib+lib32 when it is valid
Remove the error on 'lib' directory with SYMLINK_LIB=no multilib layout
if lib32 is a valid directory as well. This fixes the wrong assert
in the new no-lib-symlink profile while preserving the check on regular
lib+lib64 profile.
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index b4e82d2..d3d1351 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -87,7 +87,7 @@ multilib_layout() {
else
mkdir -p "${prefix}lib" || die
fi
- elif [ -d "${prefix}lib" ] ; then
+ elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; 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" ...
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-11-04 19:54 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2024-11-04 19:54 UTC (permalink / raw
To: gentoo-commits
commit: 48be0183b5be5e28fc67ec9cc49ef810e34b40e6
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 4 19:54:12 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Nov 4 19:54:12 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48be0183
sys-apps/baselayout: update EAPI 7 -> 8
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index b2ffad64281b..8be27c569375 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib prefix
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-11-04 19:52 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2024-11-04 19:52 UTC (permalink / raw
To: gentoo-commits
commit: 7d4cc2a86a0e89c016c5d9e0c105f81089a339e1
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 4 19:50:32 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Nov 4 19:50:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d4cc2a8
sys-apps/baselayout: add 2.17, drop 2.16
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 2 +-
sys-apps/baselayout/{baselayout-2.16.ebuild => baselayout-2.17.ebuild} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 4c828bd5647b..7c4216b9bc96 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1,3 @@
DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
DIST baselayout-2.15.tar.bz2 30214 BLAKE2B 58d81b935c52deddeae60314f040a85767c7df30e38c694090dded4a9d593be8fb3c181e6e9496cc8e0987481b6b13f57a74038f9f21a0b27c76528d066cd5f5 SHA512 3d1a64e2802b53bcc537633fd23224ebea60b79d58f4b692175598cd43015e0d60dfdfb81c03f3541d28fe77f04022298236db726ea7e5119cc217d6bfb74d4b
-DIST baselayout-2.16.tar.bz2 30260 BLAKE2B 19c213d6ad25f0e200ea75bff481ab4aab45742df67e941211888f017f7ecd4054733878f7e4e19ebb242615fcb7f002765668f97a4f554733173251d4f836f5 SHA512 5668d1eb550c9b422f7ab732f25e0cb53d376501d2ba76b8219eab6a3b7aa60c485d9949bef498a394c099ee592553d8c7413266f4610555cb6dc1ccf7d05500
+DIST baselayout-2.17.tar.bz2 30274 BLAKE2B b5016fd8ec8646fe9fcc05d893a5732f2301bff93fc3c4400f6db955cabadd19f517fab8c73f3ee7e8224d7f5e1cff8f4d3afec1d5ebd1bef25b2c9f1812b2ec SHA512 8991f8064b7b1d7ebbd202479b9e12b955b76640cc3f1728551313517f78a40465e3f11f57c7c5827b9a3312b822a37b556399de36190febeb2343ce203b7681
diff --git a/sys-apps/baselayout/baselayout-2.16.ebuild b/sys-apps/baselayout/baselayout-2.17.ebuild
similarity index 100%
rename from sys-apps/baselayout/baselayout-2.16.ebuild
rename to sys-apps/baselayout/baselayout-2.17.ebuild
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-11-03 23:37 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2024-11-03 23:37 UTC (permalink / raw
To: gentoo-commits
commit: c9ce71da010638a2ca33c895674b95b3f231f029
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 3 23:36:59 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Nov 3 23:36:59 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ce71da
sys-apps/baselayout: add 2.16
Closes: https://bugs.gentoo.org/910758
Closes: https://bugs.gentoo.org/937941
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.16.ebuild | 364 +++++++++++++++++++++++++++++
2 files changed, 365 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 5a578fa0cc19..4c828bd5647b 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
DIST baselayout-2.15.tar.bz2 30214 BLAKE2B 58d81b935c52deddeae60314f040a85767c7df30e38c694090dded4a9d593be8fb3c181e6e9496cc8e0987481b6b13f57a74038f9f21a0b27c76528d066cd5f5 SHA512 3d1a64e2802b53bcc537633fd23224ebea60b79d58f4b692175598cd43015e0d60dfdfb81c03f3541d28fe77f04022298236db726ea7e5119cc217d6bfb74d4b
+DIST baselayout-2.16.tar.bz2 30260 BLAKE2B 19c213d6ad25f0e200ea75bff481ab4aab45742df67e941211888f017f7ecd4054733878f7e4e19ebb242615fcb7f002765668f97a4f554733173251d4f836f5 SHA512 5668d1eb550c9b422f7ab732f25e0cb53d376501d2ba76b8219eab6a3b7aa60c485d9949bef498a394c099ee592553d8c7413266f4610555cb6dc1ccf7d05500
diff --git a/sys-apps/baselayout/baselayout-2.16.ebuild b/sys-apps/baselayout/baselayout-2.16.ebuild
new file mode 100644
index 000000000000..a9bf8ec222fb
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.16.ebuild
@@ -0,0 +1,364 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ # for the special case of riscv multilib, we drop the
+ # second part of two-component libdirs, e.g. lib64/lp64
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ if [[ -h "${dir}" ]] ; then
+ if use riscv ; then
+ # with riscv we get now double entries so we
+ # need to ignore already existing symlinks
+ einfo "symlink ${dir} already exists (riscv)"
+ else
+ die "symlink ${dir} already exists"
+ fi
+ else
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ fi
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+pkg_setup() {
+ multilib_layout
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo MANPATH=/usr/share/man >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+pkg_preinst() {
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-04-30 18:52 Arthur Zamarin
0 siblings, 0 replies; 124+ messages in thread
From: Arthur Zamarin @ 2024-04-30 18:52 UTC (permalink / raw
To: gentoo-commits
commit: c9389baad07aeb6b50f8048d6a62b540ae465887
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 18:52:05 2024 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 18:52:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9389baa
sys-apps/baselayout: Stabilize 2.15 ALLARCHES, #930985
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.15.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.15.ebuild b/sys-apps/baselayout/baselayout-2.15.ebuild
index 8dfcf1d42876..0c730c42ecfd 100644
--- a/sys-apps/baselayout/baselayout-2.15.ebuild
+++ b/sys-apps/baselayout/baselayout-2.15.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-03-12 1:43 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2024-03-12 1:43 UTC (permalink / raw
To: gentoo-commits
commit: 71fd183c98543ba45b23b29632be816c0c2f291a
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 12 01:43:12 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 01:43:12 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71fd183c
sys-apps/baselayout: add 2.15
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.15.ebuild | 364 +++++++++++++++++++++++++++++
2 files changed, 365 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 91204109c0f5..5a578fa0cc19 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
+DIST baselayout-2.15.tar.bz2 30214 BLAKE2B 58d81b935c52deddeae60314f040a85767c7df30e38c694090dded4a9d593be8fb3c181e6e9496cc8e0987481b6b13f57a74038f9f21a0b27c76528d066cd5f5 SHA512 3d1a64e2802b53bcc537633fd23224ebea60b79d58f4b692175598cd43015e0d60dfdfb81c03f3541d28fe77f04022298236db726ea7e5119cc217d6bfb74d4b
diff --git a/sys-apps/baselayout/baselayout-2.15.ebuild b/sys-apps/baselayout/baselayout-2.15.ebuild
new file mode 100644
index 000000000000..8dfcf1d42876
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.15.ebuild
@@ -0,0 +1,364 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ # for the special case of riscv multilib, we drop the
+ # second part of two-component libdirs, e.g. lib64/lp64
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ if [[ -h "${dir}" ]] ; then
+ if use riscv ; then
+ # with riscv we get now double entries so we
+ # need to ignore already existing symlinks
+ einfo "symlink ${dir} already exists (riscv)"
+ else
+ die "symlink ${dir} already exists"
+ fi
+ else
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ fi
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+pkg_setup() {
+ multilib_layout
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo MANPATH=/usr/share/man >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+pkg_preinst() {
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-02-15 21:17 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2024-02-15 21:17 UTC (permalink / raw
To: gentoo-commits
commit: 95bd597b9dfba4233b591e27066466704e93236d
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 21:14:38 2024 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 21:15:22 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95bd597b
sys-apps/baselayout: drop 2.14
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.14.ebuild | 350 -----------------------------
1 file changed, 350 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.14.ebuild b/sys-apps/baselayout/baselayout-2.14.ebuild
deleted file mode 100644
index 98121cf026dd..000000000000
--- a/sys-apps/baselayout/baselayout-2.14.ebuild
+++ /dev/null
@@ -1,350 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-pkg_setup() {
- multilib_layout
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-pkg_preinst() {
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-
- # Create symlinks in pkg_preinst to avoid Portage collision check.
- # Create the symlinks in ${ED} via dosym so that we own it.
- # Only create the symlinks if it wont cause a conflict in ${EROOT}.
- if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
- dosym ../run/lock /var/lock
- fi
- if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
- dosym ../run /var/run
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-02-09 12:18 Andreas K. Hüttel
0 siblings, 0 replies; 124+ messages in thread
From: Andreas K. Hüttel @ 2024-02-09 12:18 UTC (permalink / raw
To: gentoo-commits
commit: 652b5e27bb7c15574678d9cd837f6e24639e713b
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 9 12:16:31 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Feb 9 12:16:31 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=652b5e27
sys-apps/baselayout: Add bugfix for riscv multilib stage builds
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
...elayout-9999.ebuild => baselayout-2.14-r3.ebuild} | 20 ++++++++++++++++----
sys-apps/baselayout/baselayout-9999.ebuild | 18 +++++++++++++++---
2 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.14-r3.ebuild
similarity index 95%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.14-r3.ebuild
index 76beeff5aac8..820c4f714c44 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14-r3.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~riscv"
fi
LICENSE="GPL-2"
@@ -67,11 +67,23 @@ multilib_layout() {
continue
fi
if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ # for the special case of riscv multilib, we drop the
+ # second part of two-component libdirs, e.g. lib64/lp64
libdir="${libdir%%/*}"
dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
+ if [[ -h "${dir}" ]] ; then
+ if use riscv ; then
+ # with riscv we get now double entries so we
+ # need to ignore already existing symlinks
+ einfo "symlink ${dir} already exists (riscv)"
+ else
+ die "symlink ${dir} already exists"
+ fi
+ else
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ fi
else
einfo "creating directory ${dir}"
mkdir -p "${dir}" ||
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 76beeff5aac8..8dfcf1d42876 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -67,11 +67,23 @@ multilib_layout() {
continue
fi
if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ # for the special case of riscv multilib, we drop the
+ # second part of two-component libdirs, e.g. lib64/lp64
libdir="${libdir%%/*}"
dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
+ if [[ -h "${dir}" ]] ; then
+ if use riscv ; then
+ # with riscv we get now double entries so we
+ # need to ignore already existing symlinks
+ einfo "symlink ${dir} already exists (riscv)"
+ else
+ die "symlink ${dir} already exists"
+ fi
+ else
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ fi
else
einfo "creating directory ${dir}"
mkdir -p "${dir}" ||
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2024-02-08 17:37 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2024-02-08 17:37 UTC (permalink / raw
To: gentoo-commits
commit: 2334eb2d0b76ee113e0bf438c6e719a90c95b235
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Thu Feb 8 07:39:02 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 17:36:16 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2334eb2d
sys-apps/baselayout: ROOTPATH should have host paths on Prefix
Same as PATH, ROOTPATH should be modified to contain host paths. This
fixes app-shells/zsh not having host paths when EUID=1000 or root user,
because it sets ROOTPATH as PATH in /etc/zsh/zprofile, which make zsh's
behavior align with bash.
Closes: https://bugs.gentoo.org/924032
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35225
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../{baselayout-2.14-r1.ebuild => baselayout-2.14-r2.ebuild} | 3 ++-
sys-apps/baselayout/baselayout-9999.ebuild | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.14-r1.ebuild b/sys-apps/baselayout/baselayout-2.14-r2.ebuild
similarity index 99%
rename from sys-apps/baselayout/baselayout-2.14-r1.ebuild
rename to sys-apps/baselayout/baselayout-2.14-r2.ebuild
index d95e2efe9ff4..72bb2496fd2d 100644
--- a/sys-apps/baselayout/baselayout-2.14-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -209,6 +209,7 @@ src_prepare() {
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
echo MANPATH=/usr/share/man >> etc/env.d/99host
# change branding
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index b1f52aa3baa7..76beeff5aac8 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -209,6 +209,7 @@ src_prepare() {
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
echo MANPATH=/usr/share/man >> etc/env.d/99host
# change branding
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-12-15 7:14 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2023-12-15 7:14 UTC (permalink / raw
To: gentoo-commits
commit: 149c3e87635361615ebc1fe8934252ccecb0c198
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 07:13:24 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 07:13:24 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=149c3e87
sys-apps/baselayout: Stabilize 2.14-r1 ALLARCHES, #919951
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.14-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.14-r1.ebuild b/sys-apps/baselayout/baselayout-2.14-r1.ebuild
index b1f52aa3baa7..d95e2efe9ff4 100644
--- a/sys-apps/baselayout/baselayout-2.14-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14-r1.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-11-12 10:38 Fabian Groffen
0 siblings, 0 replies; 124+ messages in thread
From: Fabian Groffen @ 2023-11-12 10:38 UTC (permalink / raw
To: gentoo-commits
commit: 31d50df80c6df2ec3da32b17c54559a8c1023051
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 12 10:36:32 2023 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Nov 12 10:36:32 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31d50df8
sys-apps/baselayout: ensure MANPATH contains host pages on Prefix
etc/man_db.conf's MANPATH is overriden by env MANPATH, which we set by
default in Gentoo, generated from env.d. In order to make system
manpages available in Prefix, ensure /usr/share/man appears in MANPATH
as last entry.
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.../baselayout/{baselayout-9999.ebuild => baselayout-2.14-r1.ebuild} | 1 +
sys-apps/baselayout/baselayout-9999.ebuild | 1 +
2 files changed, 2 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.14-r1.ebuild
similarity index 99%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.14-r1.ebuild
index 9e5d229d2ea4..b1f52aa3baa7 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14-r1.ebuild
@@ -209,6 +209,7 @@ src_prepare() {
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo MANPATH=/usr/share/man >> etc/env.d/99host
# change branding
sed -i \
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 9e5d229d2ea4..b1f52aa3baa7 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -209,6 +209,7 @@ src_prepare() {
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo MANPATH=/usr/share/man >> etc/env.d/99host
# change branding
sed -i \
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-08-22 16:09 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-08-22 16:09 UTC (permalink / raw
To: gentoo-commits
commit: e0a880ff74077542a5948257e43af4a3251e0abd
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 16:09:49 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 16:09:49 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0a880ff
sys-apps/baselayout: sync live
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index a588c68f51e9..9e5d229d2ea4 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -343,23 +343,6 @@ pkg_postinst() {
ewarn "You should reboot now to get /run mounted with tmpfs!"
fi
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
ewarn "Please migrate your changes."
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-08-22 16:09 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-08-22 16:09 UTC (permalink / raw
To: gentoo-commits
commit: 8f7e0b6ef89d51d7b8b06866d4343765d0bc9f91
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 16:09:49 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 16:09:49 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f7e0b6e
sys-apps/baselayout: remove 2.4 and 2.6 migration code
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.14.ebuild | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.14.ebuild b/sys-apps/baselayout/baselayout-2.14.ebuild
index 8cc92f9d92cc..98121cf026dd 100644
--- a/sys-apps/baselayout/baselayout-2.14.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14.ebuild
@@ -343,23 +343,6 @@ pkg_postinst() {
ewarn "You should reboot now to get /run mounted with tmpfs!"
fi
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
ewarn "Please migrate your changes."
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-08-21 22:47 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-08-21 22:47 UTC (permalink / raw
To: gentoo-commits
commit: 7d0228b796b1322e05ebc29a355d0f51d86edc37
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 21 22:46:48 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Aug 21 22:47:17 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d0228b7
sys-apps/baselayout: drop 2.13-r1
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 367 --------------------------
2 files changed, 368 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 8f24feb7c25e..91204109c0f5 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1 @@
-DIST baselayout-2.13.tar.bz2 29423 BLAKE2B a399e515297d3a936c5821205f1f0d6de844580099936be50e80a463b9fa6239aead52b7b371136680e263e326f7e6a1faea8cd8db0f11462cf0e8166707fc91 SHA512 ff16f20cf2c65258ab6d48c403607113f84fc57ffee6650652202746095f402f8c6a4f22040d0bb9310180945131bed6a0fda3717b39080a987e4f5224339095
DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
deleted file mode 100644
index 8cc92f9d92cc..000000000000
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ /dev/null
@@ -1,367 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-pkg_setup() {
- multilib_layout
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-pkg_preinst() {
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-
- # Create symlinks in pkg_preinst to avoid Portage collision check.
- # Create the symlinks in ${ED} via dosym so that we own it.
- # Only create the symlinks if it wont cause a conflict in ${EROOT}.
- if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
- dosym ../run/lock /var/lock
- fi
- if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
- dosym ../run /var/run
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-08-19 6:23 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2023-08-19 6:23 UTC (permalink / raw
To: gentoo-commits
commit: f707985bc0f9cfe3ee1ecce3a174cb8724b9eec3
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 06:23:20 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 06:23:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f707985b
sys-apps/baselayout: Stabilize 2.14 ALLARCHES, #912566
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.14.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.14.ebuild b/sys-apps/baselayout/baselayout-2.14.ebuild
index a588c68f51e9..8cc92f9d92cc 100644
--- a/sys-apps/baselayout/baselayout-2.14.ebuild
+++ b/sys-apps/baselayout/baselayout-2.14.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-18 22:41 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2023-07-18 22:41 UTC (permalink / raw
To: gentoo-commits
commit: f5bd9a131476d5972a2c4bf8009bdcff9a974750
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 18 22:40:33 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 22:41:24 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5bd9a13
sys-apps/baselayout: add gentoo upstream metadata
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/metadata.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 46609925fe80..035853bc0d4c 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -11,6 +11,7 @@
</maintainer>
<stabilize-allarches/>
<upstream>
+ <remote-id type="gentoo">proj/baselayout</remote-id>
<remote-id type="github">gentoo/baselayout</remote-id>
</upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-18 22:41 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2023-07-18 22:41 UTC (permalink / raw
To: gentoo-commits
commit: d80bbdf6f6c2bd347be27dd05dc601ffc21b2cad
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 18 22:40:14 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 22:41:23 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d80bbdf6
sys-apps/baselayout: add github upstream metadata
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/metadata.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 4bd3a8b6d8f0..46609925fe80 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -9,5 +9,8 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
- <stabilize-allarches/>
+<stabilize-allarches/>
+<upstream>
+ <remote-id type="github">gentoo/baselayout</remote-id>
+</upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-18 22:41 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2023-07-18 22:41 UTC (permalink / raw
To: gentoo-commits
commit: 6d31f9249d8befc9285ed08449c2225455c075dd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 18 22:40:56 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 22:41:25 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d31f924
sys-apps/baselayout: fix metadata indentation
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/metadata.xml | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 035853bc0d4c..6a97f0c772f0 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>williamh@gentoo.org</email>
- <name>William Hubbs</name>
-</maintainer>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<stabilize-allarches/>
-<upstream>
- <remote-id type="gentoo">proj/baselayout</remote-id>
- <remote-id type="github">gentoo/baselayout</remote-id>
-</upstream>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="gentoo">proj/baselayout</remote-id>
+ <remote-id type="github">gentoo/baselayout</remote-id>
+ </upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-09 1:32 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-07-09 1:32 UTC (permalink / raw
To: gentoo-commits
commit: e6a1b3610fba8ef576da75ea19e3b40feaf50f6b
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 9 01:31:52 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 9 01:31:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6a1b361
sys-apps/baselayout: drop 2.9
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.9.ebuild | 370 ------------------------------
2 files changed, 371 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 547771aec137..8f24feb7c25e 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1,2 @@
DIST baselayout-2.13.tar.bz2 29423 BLAKE2B a399e515297d3a936c5821205f1f0d6de844580099936be50e80a463b9fa6239aead52b7b371136680e263e326f7e6a1faea8cd8db0f11462cf0e8166707fc91 SHA512 ff16f20cf2c65258ab6d48c403607113f84fc57ffee6650652202746095f402f8c6a4f22040d0bb9310180945131bed6a0fda3717b39080a987e4f5224339095
DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
-DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.9.ebuild b/sys-apps/baselayout/baselayout-2.9.ebuild
deleted file mode 100644
index 4cf8882d3ef8..000000000000
--- a/sys-apps/baselayout/baselayout-2.9.ebuild
+++ /dev/null
@@ -1,370 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-09 1:32 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-07-09 1:32 UTC (permalink / raw
To: gentoo-commits
commit: d148943deee0e9d74622cff112e680069b324dc6
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 9 01:29:52 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 9 01:29:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d148943d
sys-apps/baselayout: add 2.14
Bug: https://bugs.gentoo.org/909664
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.14.ebuild | 367 +++++++++++++++++++++++++++++
2 files changed, 368 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 294492d1164a..547771aec137 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.13.tar.bz2 29423 BLAKE2B a399e515297d3a936c5821205f1f0d6de844580099936be50e80a463b9fa6239aead52b7b371136680e263e326f7e6a1faea8cd8db0f11462cf0e8166707fc91 SHA512 ff16f20cf2c65258ab6d48c403607113f84fc57ffee6650652202746095f402f8c6a4f22040d0bb9310180945131bed6a0fda3717b39080a987e4f5224339095
+DIST baselayout-2.14.tar.bz2 30182 BLAKE2B c5f67795233e565c2c75c97a55c000aec98e901bb0a25f1aeb52b01b44d7c09bfc6e67813234629ca71ff32d603e82ada8e66e5ab6007fa0664b95367256320d SHA512 bffd118f5e92975b9247d854fc5683a311dbcd03efa37a13dfd05d04e92a6e784858d3a55aa689f782229afc5985e829eb332c08a79eed081bf0a47720ca7e8a
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.14.ebuild b/sys-apps/baselayout/baselayout-2.14.ebuild
new file mode 100644
index 000000000000..a588c68f51e9
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.14.ebuild
@@ -0,0 +1,367 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+pkg_setup() {
+ multilib_layout
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+pkg_preinst() {
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ver_test 2.6 -lt ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}/{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-07-05 0:41 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-07-05 0:41 UTC (permalink / raw
To: gentoo-commits
commit: da8169c96af55704989cc0ccb4176917d97b35d3
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 5 00:39:03 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Jul 5 00:41:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da8169c9
sys-apps/baselayout: move pkg_setup and pkg_preinst
This moves them to the traditional place according to phase execution
order.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 52 +++++++++++++--------------
sys-apps/baselayout/baselayout-9999.ebuild | 52 +++++++++++++--------------
2 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
index 49f04008670b..8cc92f9d92cc 100644
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -21,10 +21,6 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
-pkg_setup() {
- multilib_layout
-}
-
riscv_compat_symlink() {
# Here we apply some special sauce for riscv.
# Two multilib layouts exist for now:
@@ -191,29 +187,8 @@ multilib_layout() {
fi
}
-pkg_preinst() {
- # 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.
+pkg_setup() {
multilib_layout
- if use build ; then
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-
- # Create symlinks in pkg_preinst to avoid Portage collision check.
- # Create the symlinks in ${ED} via dosym so that we own it.
- # Only create the symlinks if it wont cause a conflict in ${EROOT}.
- if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
- dosym ../run/lock /var/lock
- fi
- if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
- dosym ../run /var/run
- fi
}
src_prepare() {
@@ -291,6 +266,31 @@ src_install() {
fi
}
+pkg_preinst() {
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
+}
+
pkg_postinst() {
local x
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 2294e5e84cc3..a588c68f51e9 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -21,10 +21,6 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
-pkg_setup() {
- multilib_layout
-}
-
riscv_compat_symlink() {
# Here we apply some special sauce for riscv.
# Two multilib layouts exist for now:
@@ -191,29 +187,8 @@ multilib_layout() {
fi
}
-pkg_preinst() {
- # 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.
+pkg_setup() {
multilib_layout
- if use build ; then
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-
- # Create symlinks in pkg_preinst to avoid Portage collision check.
- # Create the symlinks in ${ED} via dosym so that we own it.
- # Only create the symlinks if it wont cause a conflict in ${EROOT}.
- if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
- dosym ../run/lock /var/lock
- fi
- if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
- dosym ../run /var/run
- fi
}
src_prepare() {
@@ -291,6 +266,31 @@ src_install() {
fi
}
+pkg_preinst() {
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
+}
+
pkg_postinst() {
local x
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-03-04 5:34 Arthur Zamarin
0 siblings, 0 replies; 124+ messages in thread
From: Arthur Zamarin @ 2023-03-04 5:34 UTC (permalink / raw
To: gentoo-commits
commit: 25cf83415ce660bcdce29a42e9ba3e66528e38e2
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 4 05:34:27 2023 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 4 05:34:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25cf8341
sys-apps/baselayout: Stabilize 2.13-r1 ALLARCHES, #899366
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
index 64d8126ed757..b4cae7e3bf71 100644
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-29 0:10 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-29 0:10 UTC (permalink / raw
To: gentoo-commits
commit: 1b48c31a457d9d0fd39425e30ec1965e1b2923dd
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 29 00:10:05 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 00:10:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b48c31a
sys-apps/baselayout: sync live
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index afc0043d403a..64d8126ed757 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -192,11 +192,6 @@ multilib_layout() {
}
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 || die
-
# 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.
@@ -316,12 +311,6 @@ pkg_postinst() {
chmod o-rwx "${EROOT}/etc/${x}" || die
fi
done
-
- # 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 || die
- fi
-
# whine about users that lack passwords #193541
if [[ -e "${EROOT}"/etc/shadow ]] ; then
local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-29 0:10 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-29 0:10 UTC (permalink / raw
To: gentoo-commits
commit: 8fcbeac51966b91f9695093e654f0c76055fa635
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 29 00:10:05 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 00:10:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fcbeac5
sys-apps/baselayout: handle /etc/gentoo-release with CONFIG_PROTECT_MASK
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
index afc0043d403a..64d8126ed757 100644
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -192,11 +192,6 @@ multilib_layout() {
}
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 || die
-
# 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.
@@ -316,12 +311,6 @@ pkg_postinst() {
chmod o-rwx "${EROOT}/etc/${x}" || die
fi
done
-
- # 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 || die
- fi
-
# whine about users that lack passwords #193541
if [[ -e "${EROOT}"/etc/shadow ]] ; then
local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 22:14 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 22:14 UTC (permalink / raw
To: gentoo-commits
commit: 1cbc36adc37249afbc864623bf2a3f4fb5a9c35d
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 22:13:42 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:13:42 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cbc36ad
sys-apps/baselayout: drop 2.13
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13.ebuild | 376 -----------------------------
1 file changed, 376 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.13.ebuild b/sys-apps/baselayout/baselayout-2.13.ebuild
deleted file mode 100644
index 97ceb30c3290..000000000000
--- a/sys-apps/baselayout/baselayout-2.13.ebuild
+++ /dev/null
@@ -1,376 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-
- # Restore /var/run and /var/lock if we just removed them from 2.11 or 2.12
- if [[ ! -L ${EROOT}/var/run && ! -e ${EROOT}/var/run ]]; then
- ln -s ../run "${EROOT}"/var/run
- fi
- if [[ ! -L ${EROOT}/var/lock && ! -e ${EROOT}/var/lock ]]; then
- ln -s ../run/lock "${EROOT}"/var/lock
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 22:14 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 22:14 UTC (permalink / raw
To: gentoo-commits
commit: 12a58c22e40211eab2fd901279e8f81cb8e588eb
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 22:13:43 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:13:43 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12a58c22
sys-apps/baselayout: sync live
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 3c3f89d714de..afc0043d403a 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -235,7 +235,7 @@ src_prepare() {
if use prefix; then
hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
+ hprefixify etc/shells share/passwd
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 22:06 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 22:06 UTC (permalink / raw
To: gentoo-commits
commit: dab116d7128c9ce1566f2841696765663240ca36
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 22:03:22 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:06:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dab116d7
sys-apps/baselayout: keyword 2.13-r1
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
index 5ef1316a5e6c..afc0043d403a 100644
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 22:06 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 22:06 UTC (permalink / raw
To: gentoo-commits
commit: 81841dc2b3180e9fb30540c6d2d63cda96d9ecf7
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 22:01:57 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:06:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81841dc2
sys-apps/baselayout: fix the passwd file path for prefix
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.13-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.13-r1.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
index 71073b11c747..5ef1316a5e6c 100644
--- a/sys-apps/baselayout/baselayout-2.13-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -235,7 +235,7 @@ src_prepare() {
if use prefix; then
hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
+ hprefixify etc/shells share/passwd
hprefixify -w '/PATH=/' etc/env.d/50baselayout
hprefixify -w 1 etc/env.d/50baselayout
echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 21:00 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-01-28 21:00 UTC (permalink / raw
To: gentoo-commits
commit: 41b18d2299e59710c1d65d37107d763fb85f9af0
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 20:59:11 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 20:59:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41b18d22
sys-apps/baselayout: create ${ED}/var/{run,lock} in pkg_preinst
Bug: https://bugs.gentoo.org/648880
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
...ayout-9999.ebuild => baselayout-2.13-r1.ebuild} | 25 ++++++++++------------
sys-apps/baselayout/baselayout-9999.ebuild | 23 +++++++++-----------
2 files changed, 21 insertions(+), 27 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
similarity index 94%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.13-r1.ebuild
index 845f7f7a8dfb..71073b11c747 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
@@ -21,19 +21,6 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
-pkg_pretend() {
- local stop=
- if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then
- eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
- stop=1
- fi
- if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then
- eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
- stop=1
- fi
- [[ -z ${stop} ]] || die "please fix this before emerging baselayout"
-}
-
pkg_setup() {
multilib_layout
}
@@ -222,6 +209,16 @@ pkg_preinst() {
fi
fi
rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
}
src_prepare() {
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 845f7f7a8dfb..3c3f89d714de 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -21,19 +21,6 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
-pkg_pretend() {
- local stop=
- if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then
- eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
- stop=1
- fi
- if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then
- eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
- stop=1
- fi
- [[ -z ${stop} ]] || die "please fix this before emerging baselayout"
-}
-
pkg_setup() {
multilib_layout
}
@@ -222,6 +209,16 @@ pkg_preinst() {
fi
fi
rm -f "${ED}"/usr/share/${PN}/Makefile || die
+
+ # Create symlinks in pkg_preinst to avoid Portage collision check.
+ # Create the symlinks in ${ED} via dosym so that we own it.
+ # Only create the symlinks if it wont cause a conflict in ${EROOT}.
+ if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then
+ dosym ../run/lock /var/lock
+ fi
+ if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then
+ dosym ../run /var/run
+ fi
}
src_prepare() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 2:17 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-01-28 2:17 UTC (permalink / raw
To: gentoo-commits
commit: 3dcff3b5a60cd6fbead3da67835600db188b6972
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 02:16:54 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 02:17:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dcff3b5
sys-apps/baselayout: add 2.13, drop 2.12
Bug: https://bugs.gentoo.org/648880
Bug: https://bugs.gentoo.org/892267
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 2 +-
...aselayout-2.12.ebuild => baselayout-2.13.ebuild} | 21 ++++++++-------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 97df516f916b..294492d1164a 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,2 @@
-DIST baselayout-2.12.tar.bz2 29275 BLAKE2B 5708137748e484555ed7f91301c5bc079189e744fc14f708d8b95ab82ad9392166690af6424ee486d95c7b0ce85b6f23fcadd7f95c31920a3424e86431d9b41f SHA512 8c4ad7cf459254c07d1a05300b5e9a600aa259a0f38c55e74c0a60a1a1f9da92c9de5de58cfb735738b64deb6955d6f80ae174925cded07c61c3371323dce152
+DIST baselayout-2.13.tar.bz2 29423 BLAKE2B a399e515297d3a936c5821205f1f0d6de844580099936be50e80a463b9fa6239aead52b7b371136680e263e326f7e6a1faea8cd8db0f11462cf0e8166707fc91 SHA512 ff16f20cf2c65258ab6d48c403607113f84fc57ffee6650652202746095f402f8c6a4f22040d0bb9310180945131bed6a0fda3717b39080a987e4f5224339095
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.12.ebuild b/sys-apps/baselayout/baselayout-2.13.ebuild
similarity index 96%
rename from sys-apps/baselayout/baselayout-2.12.ebuild
rename to sys-apps/baselayout/baselayout-2.13.ebuild
index 845f7f7a8dfb..97ceb30c3290 100644
--- a/sys-apps/baselayout/baselayout-2.12.ebuild
+++ b/sys-apps/baselayout/baselayout-2.13.ebuild
@@ -21,19 +21,6 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
-pkg_pretend() {
- local stop=
- if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then
- eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
- stop=1
- fi
- if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then
- eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
- stop=1
- fi
- [[ -z ${stop} ]] || die "please fix this before emerging baselayout"
-}
-
pkg_setup() {
multilib_layout
}
@@ -378,4 +365,12 @@ pkg_postinst() {
ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
ewarn "Please migrate your changes."
fi
+
+ # Restore /var/run and /var/lock if we just removed them from 2.11 or 2.12
+ if [[ ! -L ${EROOT}/var/run && ! -e ${EROOT}/var/run ]]; then
+ ln -s ../run "${EROOT}"/var/run
+ fi
+ if [[ ! -L ${EROOT}/var/lock && ! -e ${EROOT}/var/lock ]]; then
+ ln -s ../run/lock "${EROOT}"/var/lock
+ fi
}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 0:38 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-01-28 0:38 UTC (permalink / raw
To: gentoo-commits
commit: 07d3824141c8893b4e6565ddce1253705834f64b
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 00:36:02 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 00:36:18 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d38241
sys-apps/baselayout: add 2.12, drop 2.11
This reverts the addition of the ACCESSIBILITY_ENABLED and
QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variables.
Bug: https://bugs.gentoo.org/853820
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 2 +-
sys-apps/baselayout/{baselayout-2.11.ebuild => baselayout-2.12.ebuild} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 0e2859f5b9c1..97df516f916b 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,2 @@
-DIST baselayout-2.11.tar.bz2 29103 BLAKE2B 8e7c5023a868dbb21d5a0c84e4d570bc306dc13e7b699bfb336cbd476c232cf124d2b9dbcdbbb76e82b6e0b207fcc67594ff8cbeaf488af071801c65464fe72e SHA512 c540fda753d405b6754113961fd1430bef27b9aaeb970ad0c787b705de3947198e0181831f0c38e1cdd1937332ca1bd41030f8be9348b21c27fde5d319ef760b
+DIST baselayout-2.12.tar.bz2 29275 BLAKE2B 5708137748e484555ed7f91301c5bc079189e744fc14f708d8b95ab82ad9392166690af6424ee486d95c7b0ce85b6f23fcadd7f95c31920a3424e86431d9b41f SHA512 8c4ad7cf459254c07d1a05300b5e9a600aa259a0f38c55e74c0a60a1a1f9da92c9de5de58cfb735738b64deb6955d6f80ae174925cded07c61c3371323dce152
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.11.ebuild b/sys-apps/baselayout/baselayout-2.12.ebuild
similarity index 100%
rename from sys-apps/baselayout/baselayout-2.11.ebuild
rename to sys-apps/baselayout/baselayout-2.12.ebuild
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 0:20 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 0:20 UTC (permalink / raw
To: gentoo-commits
commit: 4a8d092fd621f923e81d0b5d67e3180f781e410f
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 00:19:59 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 00:20:28 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a8d092f
sys-apps/baselayout: sync live
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index a5cb994667ce..845f7f7a8dfb 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -21,6 +21,19 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
+pkg_pretend() {
+ local stop=
+ if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then
+ eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
+ stop=1
+ fi
+ if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then
+ eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
+ stop=1
+ fi
+ [[ -z ${stop} ]] || die "please fix this before emerging baselayout"
+}
+
pkg_setup() {
multilib_layout
}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-28 0:08 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-28 0:08 UTC (permalink / raw
To: gentoo-commits
commit: 0ae2af9e3288d4e8519d42ff7caf5eb621ce2e69
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 00:08:52 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 00:08:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae2af9e
sys-apps/baselayout: typo fix
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.11.ebuild | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.11.ebuild b/sys-apps/baselayout/baselayout-2.11.ebuild
index 481c65c7b9c3..845f7f7a8dfb 100644
--- a/sys-apps/baselayout/baselayout-2.11.ebuild
+++ b/sys-apps/baselayout/baselayout-2.11.ebuild
@@ -23,11 +23,11 @@ RDEPEND="!sys-apps/baselayout-prefix"
pkg_pretend() {
local stop=
- if [[ ! -L ${EROOT}/var/run && -d ${EROOT}/var/run ]]; then
+ if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then
eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
stop=1
fi
- if [[ ! -L ${EROOT}/var/lock && -d ${EROOT}/var/lock ]]; then
+ if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then
eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
stop=1
fi
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-27 22:38 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2023-01-27 22:38 UTC (permalink / raw
To: gentoo-commits
commit: f64897648984946a0aff01d66dceca89adbb194b
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 22:36:57 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 22:37:56 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6489764
sys-apps/baselayout: tweak /var/{run,lock} check
We only need to abort if these exist as a directory.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.11.ebuild | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.11.ebuild b/sys-apps/baselayout/baselayout-2.11.ebuild
index f5fe6bb8aa50..481c65c7b9c3 100644
--- a/sys-apps/baselayout/baselayout-2.11.ebuild
+++ b/sys-apps/baselayout/baselayout-2.11.ebuild
@@ -22,17 +22,16 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
pkg_pretend() {
- local stop
- if [[ ! -L "${EROOT}"/var/run ]]; then
+ local stop=
+ if [[ ! -L ${EROOT}/var/run && -d ${EROOT}/var/run ]]; then
eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
stop=1
fi
- if [[ ! -L "${EROOT}"/var/lock ]]; then
+ if [[ ! -L ${EROOT}/var/lock && -d ${EROOT}/var/lock ]]; then
eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
stop=1
fi
- [[ -n ${stop} ]] &&
- die "please fix this before emerging baselayout"
+ [[ -z ${stop} ]] || die "please fix this before emerging baselayout"
}
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-27 21:47 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-27 21:47 UTC (permalink / raw
To: gentoo-commits
commit: 89e1ff1e114d9b8f2aff054f3d7ddc4e40af1512
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 21:45:26 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 21:47:45 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e1ff1e
sys-apps/baselayout: abort if /var/run or /var/lock need to be migrated
Check to see if /var/run or /var/lock are not symlinks and abort if this
is the case. since this version of baselayout claims ownership of these
symlinks.
Closes: https://bugs.gentoo.org/892267
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.11.ebuild | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.11.ebuild b/sys-apps/baselayout/baselayout-2.11.ebuild
index a5cb994667ce..f5fe6bb8aa50 100644
--- a/sys-apps/baselayout/baselayout-2.11.ebuild
+++ b/sys-apps/baselayout/baselayout-2.11.ebuild
@@ -21,6 +21,20 @@ IUSE="build +split-usr"
RDEPEND="!sys-apps/baselayout-prefix"
+pkg_pretend() {
+ local stop
+ if [[ ! -L "${EROOT}"/var/run ]]; then
+ eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run"
+ stop=1
+ fi
+ if [[ ! -L "${EROOT}"/var/lock ]]; then
+ eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock"
+ stop=1
+ fi
+ [[ -n ${stop} ]] &&
+ die "please fix this before emerging baselayout"
+}
+
pkg_setup() {
multilib_layout
}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-27 18:21 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 632fef9cb500ab043abfe11e1c2e40a31eb326ad
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 18:21:23 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 18:21:23 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=632fef9c
sys-apps/baselayout: drop 2.9-r1, 2.10
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.10.ebuild | 368 --------------------------
sys-apps/baselayout/baselayout-2.9-r1.ebuild | 370 ---------------------------
3 files changed, 739 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 7f2d31a0f657..0e2859f5b9c1 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1,2 @@
-DIST baselayout-2.10.tar.bz2 29013 BLAKE2B aae2973c7564865c1ad6f1e0c7835ff937d437373074dc757768408953f91524447f7757d6b3afcac2315ff6bcdddb5df74f725246a40fec06172016ca09344f SHA512 b80964f6b4142ae2b66e78263c7edabf803e41aa3e6e29913e6e3c3b5948459c77932e3ca3f177bbabee749e7622d7d9434a25767e5757f43ede8033c3159afd
DIST baselayout-2.11.tar.bz2 29103 BLAKE2B 8e7c5023a868dbb21d5a0c84e4d570bc306dc13e7b699bfb336cbd476c232cf124d2b9dbcdbbb76e82b6e0b207fcc67594ff8cbeaf488af071801c65464fe72e SHA512 c540fda753d405b6754113961fd1430bef27b9aaeb970ad0c787b705de3947198e0181831f0c38e1cdd1937332ca1bd41030f8be9348b21c27fde5d319ef760b
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.10.ebuild b/sys-apps/baselayout/baselayout-2.10.ebuild
deleted file mode 100644
index a5cb994667ce..000000000000
--- a/sys-apps/baselayout/baselayout-2.10.ebuild
+++ /dev/null
@@ -1,368 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.9-r1.ebuild b/sys-apps/baselayout/baselayout-2.9-r1.ebuild
deleted file mode 100644
index 198a5ba595b0..000000000000
--- a/sys-apps/baselayout/baselayout-2.9-r1.ebuild
+++ /dev/null
@@ -1,370 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~riscv"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-27 18:19 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-27 18:19 UTC (permalink / raw
To: gentoo-commits
commit: 4a59315b90cd7fddce27d9c8edd4964439b65ca6
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 18:19:17 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 18:19:34 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a59315b
sys-apps/baselayout: add 2.11
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.11.ebuild | 368 +++++++++++++++++++++++++++++
2 files changed, 369 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 1d8e64864daa..7f2d31a0f657 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.10.tar.bz2 29013 BLAKE2B aae2973c7564865c1ad6f1e0c7835ff937d437373074dc757768408953f91524447f7757d6b3afcac2315ff6bcdddb5df74f725246a40fec06172016ca09344f SHA512 b80964f6b4142ae2b66e78263c7edabf803e41aa3e6e29913e6e3c3b5948459c77932e3ca3f177bbabee749e7622d7d9434a25767e5757f43ede8033c3159afd
+DIST baselayout-2.11.tar.bz2 29103 BLAKE2B 8e7c5023a868dbb21d5a0c84e4d570bc306dc13e7b699bfb336cbd476c232cf124d2b9dbcdbbb76e82b6e0b207fcc67594ff8cbeaf488af071801c65464fe72e SHA512 c540fda753d405b6754113961fd1430bef27b9aaeb970ad0c787b705de3947198e0181831f0c38e1cdd1937332ca1bd41030f8be9348b21c27fde5d319ef760b
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.11.ebuild b/sys-apps/baselayout/baselayout-2.11.ebuild
new file mode 100644
index 000000000000..a5cb994667ce
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.11.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+pkg_setup() {
+ multilib_layout
+}
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+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 || die
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share.Linux/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+
+ # 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 || die
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ver_test 2.6 -lt ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}/{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-27 17:30 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-27 17:30 UTC (permalink / raw
To: gentoo-commits
commit: 8922ff37ff381fde642f486cd74922ec060c4a15
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 17:29:04 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 17:29:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8922ff37
sys-apps/baselayout: add 2.10
Closes: https://bugs.gentoo.org/648880
Closes: https://bugs.gentoo.org/853820
Closes: https://bugs.gentoo.org/888807
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.10.ebuild | 368 +++++++++++++++++++++++++++++
2 files changed, 369 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 44609f8f1a9d..1d8e64864daa 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
+DIST baselayout-2.10.tar.bz2 29013 BLAKE2B aae2973c7564865c1ad6f1e0c7835ff937d437373074dc757768408953f91524447f7757d6b3afcac2315ff6bcdddb5df74f725246a40fec06172016ca09344f SHA512 b80964f6b4142ae2b66e78263c7edabf803e41aa3e6e29913e6e3c3b5948459c77932e3ca3f177bbabee749e7622d7d9434a25767e5757f43ede8033c3159afd
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.10.ebuild b/sys-apps/baselayout/baselayout-2.10.ebuild
new file mode 100644
index 000000000000..a5cb994667ce
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.10.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+pkg_setup() {
+ multilib_layout
+}
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+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 || die
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share.Linux/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+
+ # 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 || die
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ver_test 2.6 -lt ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}/{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-26 3:51 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-26 3:51 UTC (permalink / raw
To: gentoo-commits
commit: 29bc54b194f8501e0db6f1192a6b2a42a7eb5d6a
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 26 03:50:58 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 03:51:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29bc54b1
sys-apps/baselayout: move fhs compatibility symlinks to the makefile
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index de1e77f28689..a5cb994667ce 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -259,12 +259,6 @@ src_install() {
DESTDIR="${ED}" \
install
- # FHS compatibility symlinks
- dosym ../proc/self/mounts /etc/mtab
- dosym ../run /var/run
- dosym ../run/lock /var/lock
- dosym ../var/tmp /usr/tmp
-
if [[ ${CHOST} == *-darwin* ]] ; then
# add SDK path which contains development manpages
echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-26 0:13 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-26 0:13 UTC (permalink / raw
To: gentoo-commits
commit: b91cfbd5648d0b1a9d9532e52bc6d701921dc621
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 26 00:11:22 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 00:12:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b91cfbd5
sys-apps/baselayout: create fhs compatible symlinks in the ebuild
This needs to happen so that we own the symlinks.
Bug: https://bugs.gentoo.org/648880
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index a5cb994667ce..de1e77f28689 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -259,6 +259,12 @@ src_install() {
DESTDIR="${ED}" \
install
+ # FHS compatibility symlinks
+ dosym ../proc/self/mounts /etc/mtab
+ dosym ../run /var/run
+ dosym ../run/lock /var/lock
+ dosym ../var/tmp /usr/tmp
+
if [[ ${CHOST} == *-darwin* ]] ; then
# add SDK path which contains development manpages
echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-24 22:58 Andreas K. Hüttel
0 siblings, 0 replies; 124+ messages in thread
From: Andreas K. Hüttel @ 2023-01-24 22:58 UTC (permalink / raw
To: gentoo-commits
commit: c6dce91299dc71c90f302e2d25828f7b2dfff477
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 22:56:50 2023 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 22:56:50 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6dce912
sys-apps/baselayout: Fix merged-usr riscv case
Closes: https://bugs.gentoo.org/796893
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
.../{baselayout-9999.ebuild => baselayout-2.9-r1.ebuild} | 8 +++++---
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.9-r1.ebuild
similarity index 97%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.9-r1.ebuild
index 35af87850d7c..198a5ba595b0 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~riscv"
fi
LICENSE="GPL-2"
@@ -82,7 +82,7 @@ multilib_layout() {
die "Unable to create ${dir} directory"
fi
done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
done
return 0
fi
@@ -164,6 +164,7 @@ multilib_layout() {
# only symlinked the lib dir on systems where we moved it
# to "lib32" ...
case ${CHOST} in
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
rm -f "${prefix}lib32"/.keep || die
@@ -256,6 +257,7 @@ src_prepare() {
src_install() {
emake \
+ OS=Linux \
DESTDIR="${ED}" \
install
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 35af87850d7c..a5cb994667ce 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -82,7 +82,7 @@ multilib_layout() {
die "Unable to create ${dir} directory"
fi
done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ [[ -d "${prefix}${def_libdir}" ]] && riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
done
return 0
fi
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-04 6:37 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-04 6:37 UTC (permalink / raw
To: gentoo-commits
commit: 64d0ddf64fc6ec5cb3168dff14ab5259ae2e9206
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 4 06:35:19 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 06:36:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d0ddf6
sys-apps/baselayout: add back the case statement
We may only need to do this on the specific hosts listed.
More research needs to be done before I can remove the case statement.
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 6a97e21522d9..35af87850d7c 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -163,13 +163,17 @@ multilib_layout() {
# make sure the old "lib" ABI location does not exist; we
# only symlinked the lib dir on systems where we moved it
# to "lib32" ...
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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"
+ case ${CHOST} in
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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
- fi
+ ;;
+ esac
else
# nothing exists, so just set it up sanely
ewarn "Initializing ${prefix}lib as a dir"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2023-01-04 6:21 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2023-01-04 6:21 UTC (permalink / raw
To: gentoo-commits
commit: 49a7344fcfa1b0b75e02afe61fe807771ac71702
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 4 06:20:48 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 06:20:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49a7344f
sys-apps/baselayout: remove bsd specific code
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index b7fc36bdb833..6a97e21522d9 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -163,18 +163,13 @@ multilib_layout() {
# 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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
+ if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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
- ;;
- esac
+ fi
else
# nothing exists, so just set it up sanely
ewarn "Initializing ${prefix}lib as a dir"
@@ -257,7 +252,6 @@ src_prepare() {
src_install() {
emake \
- OS=Linux \
DESTDIR="${ED}" \
install
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-11-14 21:03 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2022-11-14 21:03 UTC (permalink / raw
To: gentoo-commits
commit: 2775c355b884c1e66e15490d63921a4dad336224
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 14 21:01:34 2022 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Nov 14 21:01:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2775c355
sys-apps/baselayout: drop 2.7-r3, 2.8, 2.8-r3
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/baselayout/Manifest | 2 -
sys-apps/baselayout/baselayout-2.7-r3.ebuild | 347 -------------------------
sys-apps/baselayout/baselayout-2.8-r3.ebuild | 370 ---------------------------
sys-apps/baselayout/baselayout-2.8.ebuild | 338 ------------------------
4 files changed, 1057 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 17b0a2be2cb7..44609f8f1a9d 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1 @@
-DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
-DIST baselayout-2.8.tar.bz2 30236 BLAKE2B 0bac62dd5585f1f550da8c99d06a7f8ab6cdd473b0499a8f0ac58a5c43e3883b42adb7f80c172d894fae93a6ddb6fec7a65cad9897f4a2532b481c82065ed96b SHA512 506d7cc8399b530eabc9ba2d16cbb6c024350f9487a2a9168c670cee9876f62e5a716942f698c4883013d6ccc9591c2d7fc2ac9d782f0ce8d724371ca94c739a
DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.7-r3.ebuild b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
deleted file mode 100644
index 3293e119b3c9..000000000000
--- a/sys-apps/baselayout/baselayout-2.7-r3.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
- sed \
- -e 's|/usr/local/sbin:||g' \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- # 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
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README || die
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- # This is needed for https://bugs.gentoo.org/732142
- dodir /usr/lib
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
- dosym ../usr/lib/os-release /etc/os-release
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.8-r3.ebuild b/sys-apps/baselayout/baselayout-2.8-r3.ebuild
deleted file mode 100644
index b7fc36bdb833..000000000000
--- a/sys-apps/baselayout/baselayout-2.8-r3.ebuild
+++ /dev/null
@@ -1,370 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-RDEPEND="!sys-apps/baselayout-prefix"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr && ! use prefix-guest; then
- sed \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/shells share.Linux/passwd
- hprefixify -w '/PATH=/' etc/env.d/50baselayout
- hprefixify -w 1 etc/env.d/50baselayout
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
-
- # change branding
- sed -i \
- -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
- -e '/make_os_release/s/${OS}/Prefix/' \
- Makefile || die
- fi
-
- # 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
- if use split-usr || use prefix-guest; then
- ldpaths+=":${EPREFIX}/${libdir}"
- fi
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # add SDK path which contains development manpages
- echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
- > "${ED}"/etc/env.d/98macos-sdk
- fi
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-
- # bug 858596
- if use prefix-guest ; then
- 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
- fi
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
deleted file mode 100644
index 5767ed31ca80..000000000000
--- a/sys-apps/baselayout/baselayout-2.8.ebuild
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-riscv_compat_symlink() {
- # Here we apply some special sauce for riscv.
- # Two multilib layouts exist for now:
- # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
- # these are chosen by us to closely resemble other arches
- # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
- # this is the glibc/gcc default
- # Unfortunately, the default has only one fallback, which is "lib"
- # for both 32bit and 64bit. So things do not break in 1), we need
- # to provide compatibility symlinks...
-
- # This function has exactly two parameters:
- # - the default libdir, to determine if 1) or 2) applies
- # - the location of the symlink (which points to ".")
-
- # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
- # there never was a ${SYMLINK_LIB} = yes riscv profile.
-
- case ${CHOST} in
- riscv*)
- # are we on a one level libdir profile? is there no symlink yet?
- if [[ ${1} != */* && ! -L ${2} ]] ; then
- ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
- fi
- ;;
- esac
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
- sed \
- -e 's|/usr/local/sbin:||g' \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- # 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
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- dodoc ChangeLog
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-11-14 20:26 Arthur Zamarin
0 siblings, 0 replies; 124+ messages in thread
From: Arthur Zamarin @ 2022-11-14 20:26 UTC (permalink / raw
To: gentoo-commits
commit: 2f7993ea177cf8ca5696ccfd6b76caf4b9be9eac
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 14 20:26:03 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 14 20:26:03 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f7993ea
sys-apps/baselayout: Stabilize 2.9 ALLARCHES, #881299
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.9.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.9.ebuild b/sys-apps/baselayout/baselayout-2.9.ebuild
index b7fc36bdb833..6cb197c3c6fe 100644
--- a/sys-apps/baselayout/baselayout-2.9.ebuild
+++ b/sys-apps/baselayout/baselayout-2.9.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-09-18 21:50 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2022-09-18 21:50 UTC (permalink / raw
To: gentoo-commits
commit: b7f04e012e67a11a111f9fdd8c1f4adc2aebab02
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 21:50:00 2022 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 21:50:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7f04e01
sys-apps/baselayout: add 2.9
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.9.ebuild | 370 ++++++++++++++++++++++++++++++
2 files changed, 371 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index a24c7a1d49bb..17b0a2be2cb7 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
DIST baselayout-2.8.tar.bz2 30236 BLAKE2B 0bac62dd5585f1f550da8c99d06a7f8ab6cdd473b0499a8f0ac58a5c43e3883b42adb7f80c172d894fae93a6ddb6fec7a65cad9897f4a2532b481c82065ed96b SHA512 506d7cc8399b530eabc9ba2d16cbb6c024350f9487a2a9168c670cee9876f62e5a716942f698c4883013d6ccc9591c2d7fc2ac9d782f0ce8d724371ca94c739a
+DIST baselayout-2.9.tar.bz2 30200 BLAKE2B 3a997e847e853a5bcdce7eb06d50fda4727a6c408ca614bdc8dd576bfc9296d3c625c4e8791dbdb078dd5088f818e5ee98eea5d14d737f465ed225554da26180 SHA512 c07726141446c9d9202bac19642baf819b28a838814e1dd3c200d1768af64a913bd9188923029e0b0edf7e420d5aad7bdde278d6c24c4f40029fddbad28d8e02
diff --git a/sys-apps/baselayout/baselayout-2.9.ebuild b/sys-apps/baselayout/baselayout-2.9.ebuild
new file mode 100644
index 000000000000..b7fc36bdb833
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.9.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build +split-usr"
+
+RDEPEND="!sys-apps/baselayout-prefix"
+
+pkg_setup() {
+ multilib_layout
+}
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+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 || die
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+}
+
+src_prepare() {
+ default
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr && ! use prefix-guest; then
+ sed \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share.Linux/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
+ # 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
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ OS=Linux \
+ DESTDIR="${ED}" \
+ install
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+
+ # 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 || die
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ver_test 2.6 -lt ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}/{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-09-18 3:12 Mike Gilbert
0 siblings, 0 replies; 124+ messages in thread
From: Mike Gilbert @ 2022-09-18 3:12 UTC (permalink / raw
To: gentoo-commits
commit: b607b26fff6dd73d886f2dc0afc1cf439510e509
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 03:09:30 2022 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 03:10:02 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b607b26f
sys-apps/baselayout: don't prune /usr/local/sbin from PATH on merged-usr
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../baselayout/{baselayout-2.8-r2.ebuild => baselayout-2.8-r3.ebuild} | 1 -
sys-apps/baselayout/baselayout-9999.ebuild | 1 -
2 files changed, 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.8-r2.ebuild b/sys-apps/baselayout/baselayout-2.8-r3.ebuild
similarity index 99%
rename from sys-apps/baselayout/baselayout-2.8-r2.ebuild
rename to sys-apps/baselayout/baselayout-2.8-r3.ebuild
index c6296f1a6f94..b7fc36bdb833 100644
--- a/sys-apps/baselayout/baselayout-2.8-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8-r3.ebuild
@@ -218,7 +218,6 @@ src_prepare() {
# don't want symlinked directories in PATH on systems with usr-merge
if ! use split-usr && ! use prefix-guest; then
sed \
- -e 's|/usr/local/sbin:||g' \
-e 's|:/usr/sbin:|:|g' \
-e 's|:/sbin:|:|g' \
-e 's|:/bin:|:|g' \
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c6296f1a6f94..b7fc36bdb833 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -218,7 +218,6 @@ src_prepare() {
# don't want symlinked directories in PATH on systems with usr-merge
if ! use split-usr && ! use prefix-guest; then
sed \
- -e 's|/usr/local/sbin:||g' \
-e 's|:/usr/sbin:|:|g' \
-e 's|:/sbin:|:|g' \
-e 's|:/bin:|:|g' \
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-07-17 15:50 Fabian Groffen
0 siblings, 0 replies; 124+ messages in thread
From: Fabian Groffen @ 2022-07-17 15:50 UTC (permalink / raw
To: gentoo-commits
commit: ea3a7d8ebed102d8856e00cc1e7014994d0f503d
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 15:49:34 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 15:50:13 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea3a7d8e
sys-apps/baselayout-2.8-r2: provide runscript for prefix-guest installs
Closes: https://bugs.gentoo.org/858596
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.../{baselayout-2.8-r1.ebuild => baselayout-2.8-r2.ebuild} | 14 ++++++++++++++
sys-apps/baselayout/baselayout-9999.ebuild | 14 ++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.8-r1.ebuild b/sys-apps/baselayout/baselayout-2.8-r2.ebuild
similarity index 96%
rename from sys-apps/baselayout/baselayout-2.8-r1.ebuild
rename to sys-apps/baselayout/baselayout-2.8-r2.ebuild
index c7096be3d978..c6296f1a6f94 100644
--- a/sys-apps/baselayout/baselayout-2.8-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8-r2.ebuild
@@ -273,6 +273,20 @@ src_install() {
doins Makefile
dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
}
pkg_postinst() {
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c7096be3d978..c6296f1a6f94 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -273,6 +273,20 @@ src_install() {
doins Makefile
dodoc ChangeLog
+
+ # bug 858596
+ if use prefix-guest ; then
+ 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
+ fi
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-07-14 19:30 Fabian Groffen
0 siblings, 0 replies; 124+ messages in thread
From: Fabian Groffen @ 2022-07-14 19:30 UTC (permalink / raw
To: gentoo-commits
commit: 7daff7c1239b712c3064f435afd4c8ba80390ebb
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 19:26:43 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 19:29:55 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7daff7c1
sys-apps/baselayout-2.8-r1: add support for prefix-guest + keywords
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
...layout-9999.ebuild => baselayout-2.8-r1.ebuild} | 35 +++++++++++++++++-----
sys-apps/baselayout/baselayout-9999.ebuild | 35 +++++++++++++++++-----
2 files changed, 54 insertions(+), 16 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.8-r1.ebuild
similarity index 92%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.8-r1.ebuild
index 089e43e1cb8c..c7096be3d978 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8-r1.ebuild
@@ -12,13 +12,15 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="build +split-usr"
+RDEPEND="!sys-apps/baselayout-prefix"
+
pkg_setup() {
multilib_layout
}
@@ -212,14 +214,9 @@ pkg_preinst() {
src_prepare() {
default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
# don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
+ if ! use split-usr && ! use prefix-guest; then
sed \
-e 's|/usr/local/sbin:||g' \
-e 's|:/usr/sbin:|:|g' \
@@ -228,6 +225,20 @@ src_prepare() {
-i etc/env.d/50baselayout || die
fi
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share.Linux/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
# 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
@@ -236,7 +247,9 @@ src_prepare() {
# path and the symlinked path doesn't change the resulting cache.
local libdir ldpaths
for libdir in $(get_all_libdirs) ; do
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
ldpaths+=":${EPREFIX}/usr/${libdir}"
ldpaths+=":${EPREFIX}/usr/local/${libdir}"
done
@@ -249,6 +262,12 @@ src_install() {
DESTDIR="${ED}" \
install
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 089e43e1cb8c..c7096be3d978 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -12,13 +12,15 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="build +split-usr"
+RDEPEND="!sys-apps/baselayout-prefix"
+
pkg_setup() {
multilib_layout
}
@@ -212,14 +214,9 @@ pkg_preinst() {
src_prepare() {
default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
# don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
+ if ! use split-usr && ! use prefix-guest; then
sed \
-e 's|/usr/local/sbin:||g' \
-e 's|:/usr/sbin:|:|g' \
@@ -228,6 +225,20 @@ src_prepare() {
-i etc/env.d/50baselayout || die
fi
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/shells share.Linux/passwd
+ hprefixify -w '/PATH=/' etc/env.d/50baselayout
+ hprefixify -w 1 etc/env.d/50baselayout
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+
+ # change branding
+ sed -i \
+ -e '/gentoo-release/s/Gentoo Base/Gentoo Prefix Base/' \
+ -e '/make_os_release/s/${OS}/Prefix/' \
+ Makefile || die
+ fi
+
# 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
@@ -236,7 +247,9 @@ src_prepare() {
# path and the symlinked path doesn't change the resulting cache.
local libdir ldpaths
for libdir in $(get_all_libdirs) ; do
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ if use split-usr || use prefix-guest; then
+ ldpaths+=":${EPREFIX}/${libdir}"
+ fi
ldpaths+=":${EPREFIX}/usr/${libdir}"
ldpaths+=":${EPREFIX}/usr/local/${libdir}"
done
@@ -249,6 +262,12 @@ src_install() {
DESTDIR="${ED}" \
install
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # add SDK path which contains development manpages
+ echo "MANPATH=${EPREFIX}/MacOSX.sdk/usr/share/man" \
+ > "${ED}"/etc/env.d/98macos-sdk
+ fi
+
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-05-28 21:01 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2022-05-28 21:01 UTC (permalink / raw
To: gentoo-commits
commit: 46d93604b6cfaeda6830a7587030e300dff04207
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 21:00:52 2022 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat May 28 21:01:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46d93604
sys-apps/baselayout: drop 2.7, 2.7-r1, 2.7-r2
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7-r1.ebuild | 317 --------------------------
sys-apps/baselayout/baselayout-2.7-r2.ebuild | 318 ---------------------------
sys-apps/baselayout/baselayout-2.7.ebuild | 312 --------------------------
3 files changed, 947 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.7-r1.ebuild b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
deleted file mode 100644
index 69b7db6825d2..000000000000
--- a/sys-apps/baselayout/baselayout-2.7-r1.ebuild
+++ /dev/null
@@ -1,317 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die " Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die " Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
- sed \
- -e 's|/usr/local/sbin:||g' \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- # 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
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README || die
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- # This is needed for https://bugs.gentoo.org/732142
- dodir /usr/lib
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
- dosym ../usr/lib/os-release /etc/os-release
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}etc/${x}" ] ; then
- chmod o-rwx "${EROOT}etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.6 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.7-r2.ebuild b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
deleted file mode 100644
index 3e57665e1bf2..000000000000
--- a/sys-apps/baselayout/baselayout-2.7-r2.ebuild
+++ /dev/null
@@ -1,318 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
- libdir="${libdir%%/*}"
- dir="${prefix}${libdir}"
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die "Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die "Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
- sed \
- -e 's|/usr/local/sbin:||g' \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- # 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
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README || die
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-
- # This is needed for https://bugs.gentoo.org/732142
- dodir /usr/lib
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
- dosym ../usr/lib/os-release /etc/os-release
-}
-
-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 "${EROOT}/etc/${x}" ] && continue
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}/etc/${x}" ] ; then
- chmod o-rwx "${EROOT}/etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"/etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"/etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ver_test 2.4 -lt ${x}; then
- ewarn "After updating ${EROOT}/etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ver_test 2.6 -lt ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}/{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
deleted file mode 100644
index b9c1e7df5282..000000000000
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ /dev/null
@@ -1,312 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- for prefix in "${prefix_lst[@]}"; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die " Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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 || die
- 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep || die
- 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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die " Unable to make ${EROOT}${libdir} symlink"
- fi
- done
- fi
-}
-
-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 || die
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile || die
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # don't want symlinked directories in PATH on systems with usr-merge
- if ! use split-usr; then
- sed \
- -e 's|/usr/local/sbin:||g' \
- -e 's|:/usr/sbin:|:|g' \
- -e 's|:/sbin:|:|g' \
- -e 's|:/bin:|:|g' \
- -i etc/env.d/50baselayout || die
- fi
-
- # 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
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
- ldpaths+=":${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=Linux \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README || die
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- if [ -e "${EROOT}etc/${x}" ] ; then
- chmod o-rwx "${EROOT}etc/${x}" || die
- fi
- done
-
- # 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 || die
- fi
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.6 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr" || die
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-05-28 20:59 Jakov Smolić
0 siblings, 0 replies; 124+ messages in thread
From: Jakov Smolić @ 2022-05-28 20:59 UTC (permalink / raw
To: gentoo-commits
commit: 0bbd02df42c26839706585fa00caffd97ceba557
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 20:59:00 2022 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Sat May 28 20:59:00 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bbd02df
sys-apps/baselayout: Stabilize 2.8 ALLARCHES, #847967
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.8.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
index d237814a2a9d..5767ed31ca80 100644
--- a/sys-apps/baselayout/baselayout-2.8.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-01-04 10:30 David Seifert
0 siblings, 0 replies; 124+ messages in thread
From: David Seifert @ 2022-01-04 10:30 UTC (permalink / raw
To: gentoo-commits
commit: 22de2cf46c8e4e8167a05dcc166586f663261b0d
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 4 10:29:54 2022 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Jan 4 10:29:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22de2cf4
sys-apps/baselayout: remove implicit kernel_linux
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7-r1.ebuild | 2 +-
sys-apps/baselayout/baselayout-2.7-r2.ebuild | 2 +-
sys-apps/baselayout/baselayout-2.7-r3.ebuild | 2 +-
sys-apps/baselayout/baselayout-2.7.ebuild | 2 +-
sys-apps/baselayout/baselayout-2.8.ebuild | 2 +-
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.7-r1.ebuild b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
index 8242b63fa3f5..69b7db6825d2 100644
--- a/sys-apps/baselayout/baselayout-2.7-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
diff --git a/sys-apps/baselayout/baselayout-2.7-r2.ebuild b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
index 9aa9a7262318..3e57665e1bf2 100644
--- a/sys-apps/baselayout/baselayout-2.7-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
diff --git a/sys-apps/baselayout/baselayout-2.7-r3.ebuild b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
index 4a1dd494ea72..3293e119b3c9 100644
--- a/sys-apps/baselayout/baselayout-2.7-r3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index ce51d06cbaa9..b9c1e7df5282 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
index 603fb5026694..089e43e1cb8c 100644
--- a/sys-apps/baselayout/baselayout-2.8.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 603fb5026694..089e43e1cb8c 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux +split-usr"
+IUSE="build +split-usr"
pkg_setup() {
multilib_layout
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2022-01-04 3:29 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2022-01-04 3:29 UTC (permalink / raw
To: gentoo-commits
commit: 39827317e97d0e0d6ddb5a6ecf642c5da27f4192
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 3 15:45:23 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 4 03:28:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39827317
sys-apps/baselayout: remove kernel_FreeBSD
Signed-off-by: David Seifert <soap <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7-r1.ebuild | 6 +++---
sys-apps/baselayout/baselayout-2.7-r2.ebuild | 6 +++---
sys-apps/baselayout/baselayout-2.7-r3.ebuild | 6 +++---
sys-apps/baselayout/baselayout-2.7.ebuild | 6 +++---
sys-apps/baselayout/baselayout-2.8.ebuild | 6 +++---
sys-apps/baselayout/baselayout-9999.ebuild | 6 +++---
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.7-r1.ebuild b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
index 3d5fac97ac66..8242b63fa3f5 100644
--- a/sys-apps/baselayout/baselayout-2.7-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -219,7 +219,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
dodoc ChangeLog
diff --git a/sys-apps/baselayout/baselayout-2.7-r2.ebuild b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
index a37d17f3b8d1..9aa9a7262318 100644
--- a/sys-apps/baselayout/baselayout-2.7-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -220,7 +220,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
dodoc ChangeLog
diff --git a/sys-apps/baselayout/baselayout-2.7-r3.ebuild b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
index a734733f48f8..4a1dd494ea72 100644
--- a/sys-apps/baselayout/baselayout-2.7-r3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -249,7 +249,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
dodoc ChangeLog
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index cb06c4a3e20d..ce51d06cbaa9 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -219,7 +219,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
dodoc ChangeLog
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
index c5f4dbf7dda3..603fb5026694 100644
--- a/sys-apps/baselayout/baselayout-2.8.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -245,7 +245,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c5f4dbf7dda3..603fb5026694 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+IUSE="build kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -245,7 +245,7 @@ src_prepare() {
src_install() {
emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
+ OS=Linux \
DESTDIR="${ED}" \
install
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-11-15 9:27 Jakov Smolić
0 siblings, 0 replies; 124+ messages in thread
From: Jakov Smolić @ 2021-11-15 9:27 UTC (permalink / raw
To: gentoo-commits
commit: 0045b513d361c06720767c3375495caddd7ffea2
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 09:27:15 2021 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 09:27:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0045b513
sys-apps/baselayout: Stabilize 2.7-r3 ALLARCHES, #795393
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7-r3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.7-r3.ebuild b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
index c83d1da82dc4..a734733f48f8 100644
--- a/sys-apps/baselayout/baselayout-2.7-r3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- 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"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-29 0:19 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-29 0:19 UTC (permalink / raw
To: gentoo-commits
commit: 51ccd7f82d83f1926b92e39e5d87ae6a5b45d9ac
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 29 00:19:09 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Sep 29 00:19:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51ccd7f8
sys-apps/baselayout: add keywords to 2.8
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.8.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
index 17df4a83021..c5f4dbf7dda 100644
--- a/sys-apps/baselayout/baselayout-2.8.ebuild
+++ b/sys-apps/baselayout/baselayout-2.8.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
-# 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"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-28 17:59 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-28 17:59 UTC (permalink / raw
To: gentoo-commits
commit: 9a1c976568166ac9236b1e5a9b5aa98ac32887f7
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 28 17:58:50 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Sep 28 17:59:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a1c9765
sys-apps/baselayout: remove extra file
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/x | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/sys-apps/baselayout/x b/sys-apps/baselayout/x
deleted file mode 100644
index a6859d9f723..00000000000
--- a/sys-apps/baselayout/x
+++ /dev/null
@@ -1,11 +0,0 @@
---- baselayout-2.8.ebuild 2021-09-27 16:54:24.631071046 -0500
-+++ baselayout-9999.ebuild 2021-09-27 15:56:09.320772518 -0500
-@@ -12,7 +12,7 @@
- inherit git-r3
- else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
--# 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"
- fi
-
- LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-27 22:09 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-27 22:09 UTC (permalink / raw
To: gentoo-commits
commit: 6569413acb19c0a23e0c6aeea9270f2787762589
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 27 22:09:07 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 27 22:09:33 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6569413a
sys-apps/baselayout: 2.8 bump (no keywords)
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.8.ebuild | 338 ++++++++++++++++++++++++++++++
sys-apps/baselayout/x | 11 +
3 files changed, 350 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 112675aad11..a24c7a1d49b 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
+DIST baselayout-2.8.tar.bz2 30236 BLAKE2B 0bac62dd5585f1f550da8c99d06a7f8ab6cdd473b0499a8f0ac58a5c43e3883b42adb7f80c172d894fae93a6ddb6fec7a65cad9897f4a2532b481c82065ed96b SHA512 506d7cc8399b530eabc9ba2d16cbb6c024350f9487a2a9168c670cee9876f62e5a716942f698c4883013d6ccc9591c2d7fc2ac9d782f0ce8d724371ca94c739a
diff --git a/sys-apps/baselayout/baselayout-2.8.ebuild b/sys-apps/baselayout/baselayout-2.8.ebuild
new file mode 100644
index 00000000000..17df4a83021
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.8.ebuild
@@ -0,0 +1,338 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die "Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die "Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+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 || die
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr; then
+ sed \
+ -e 's|/usr/local/sbin:||g' \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ # 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
+ use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ dodoc ChangeLog
+}
+
+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 "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
+ done
+
+ # 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 || die
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ver_test 2.6 -lt ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}/{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
diff --git a/sys-apps/baselayout/x b/sys-apps/baselayout/x
new file mode 100644
index 00000000000..a6859d9f723
--- /dev/null
+++ b/sys-apps/baselayout/x
@@ -0,0 +1,11 @@
+--- baselayout-2.8.ebuild 2021-09-27 16:54:24.631071046 -0500
++++ baselayout-9999.ebuild 2021-09-27 15:56:09.320772518 -0500
+@@ -12,7 +12,7 @@
+ inherit git-r3
+ else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+-# 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"
+ fi
+
+ LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-27 20:58 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-27 20:58 UTC (permalink / raw
To: gentoo-commits
commit: 422b0fec97ce1c6f80319ca53398e2922b0c6ae2
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 27 20:55:44 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 27 20:57:53 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=422b0fec
sys-apps/baselayout: install os-release via the makefile
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 5df53f3739a..c5f4dbf7dda 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -244,20 +244,16 @@ src_prepare() {
}
src_install() {
- dodir /usr/lib
emake \
OS=$(usex kernel_FreeBSD BSD Linux) \
DESTDIR="${ED}" \
install
- if use kernel_linux; then
- insinto /lib
- doins -r lib.Linux/*
- fi
- dodoc ChangeLog
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
+
+ dodoc ChangeLog
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-27 20:38 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-27 20:38 UTC (permalink / raw
To: gentoo-commits
commit: 9a9deabd0fe4d01d457ef808e6fdaac36bd1ef81
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 27 20:29:10 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 27 20:38:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a9deabd
Revert "sys-apps/baselayout: stop using install target in makefile"
This reverts commit d2c10afa5573e5efaf1f6845cb47e3f8cc226812.
It will be cleaner to use the Makefile where possible.
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 9988d48fbad..5df53f3739a 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -244,27 +244,20 @@ src_prepare() {
}
src_install() {
- local OS="$(usex kernel_linux 'Linux' 'BSD')"
- insinto /etc
- doins -r etc/* etc.${OS}/*
- printf '%s\n' "Gentoo Base System release ${PV}" > "${T}"/gentoo-release
- doins "${T}"/gentoo-release
- dosym ../usr/lib/os-release /etc/os-release
-
+ dodir /usr/lib
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
if use kernel_linux; then
insinto /lib
doins -r lib.Linux/*
fi
- insinto /usr/lib
- ./make_os_release ${OS} ${PV} > "${T}"/os-release
- doins "${T}"/os-release
+ dodoc ChangeLog
- insinto /usr/share/${PN}
- doins -r share.${OS}/*
# need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
doins Makefile
-
- dodoc ChangeLog
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-27 20:10 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-27 20:10 UTC (permalink / raw
To: gentoo-commits
commit: d2c10afa5573e5efaf1f6845cb47e3f8cc226812
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 27 20:05:57 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 27 20:10:26 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2c10afa
sys-apps/baselayout: stop using install target in makefile
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 5df53f3739a..9988d48fbad 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -244,20 +244,27 @@ src_prepare() {
}
src_install() {
- dodir /usr/lib
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
+ local OS="$(usex kernel_linux 'Linux' 'BSD')"
+ insinto /etc
+ doins -r etc/* etc.${OS}/*
+ printf '%s\n' "Gentoo Base System release ${PV}" > "${T}"/gentoo-release
+ doins "${T}"/gentoo-release
+ dosym ../usr/lib/os-release /etc/os-release
+
if use kernel_linux; then
insinto /lib
doins -r lib.Linux/*
fi
- dodoc ChangeLog
+ insinto /usr/lib
+ ./make_os_release ${OS} ${PV} > "${T}"/os-release
+ doins "${T}"/os-release
- # need the makefile in pkg_preinst
insinto /usr/share/${PN}
+ doins -r share.${OS}/*
+ # need the makefile in pkg_preinst
doins Makefile
+
+ dodoc ChangeLog
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-27 18:28 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-27 18:28 UTC (permalink / raw
To: gentoo-commits
commit: e96ccd3d636a4af6bfd4c5b86500c5e4ccd30b8a
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 27 18:25:28 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 27 18:27:30 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e96ccd3d
sys-apps/baselayout: install sysctl.d and modprobe.d in /lib on linux
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index fd82615d04a..5df53f3739a 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -244,10 +244,15 @@ src_prepare() {
}
src_install() {
+ dodir /usr/lib
emake \
OS=$(usex kernel_FreeBSD BSD Linux) \
DESTDIR="${ED}" \
install
+ if use kernel_linux; then
+ insinto /lib
+ doins -r lib.Linux/*
+ fi
dodoc ChangeLog
# need the makefile in pkg_preinst
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-25 22:37 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-25 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 9e8a8faaf012c18fd247706f1051a29cd8edc303
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 25 22:36:31 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Sep 25 22:37:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e8a8faa
sys-apps/baselayout: remove the call to remove /etc/sysctl.d/README
This file is no longer installed by upstream so remove the call to
remove it.
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 1 -
1 file changed, 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 84c0a536ea3..fd82615d04a 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -249,7 +249,6 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README || die
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-24 23:15 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-24 23:15 UTC (permalink / raw
To: gentoo-commits
commit: 4ce50fe689addf7ebc8861af8b290145bb741b6c
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 24 23:14:03 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Sep 24 23:15:11 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ce50fe6
sys-apps/baselayout:
Move handling of the os-release file upstream.
Closes: https://bugs.gentoo.org/788190
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 5 -----
1 file changed, 5 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c5e8cb6d02c..84c0a536ea3 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -254,11 +254,6 @@ src_install() {
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
-
- # This is needed for https://bugs.gentoo.org/732142
- dodir /usr/lib
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
- dosym ../usr/lib/os-release /etc/os-release
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-24 21:16 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-24 21:16 UTC (permalink / raw
To: gentoo-commits
commit: 6adf02a980849788c51b183befebfb34543a58c7
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 24 20:38:40 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Sep 24 21:16:32 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6adf02a9
sys-apps/baselayout: drop creation of etc/gentoo-release
This is now created in the upstream Makefile.
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index dc56d7e0851..c5e8cb6d02c 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -241,9 +241,6 @@ src_prepare() {
ldpaths+=":${EPREFIX}/usr/local/${libdir}"
done
echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
}
src_install() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-09-24 19:11 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-09-24 19:11 UTC (permalink / raw
To: gentoo-commits
commit: 47377989e9b04af58cd7b398ca540df19a8cf441
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 24 19:07:14 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Sep 24 19:10:54 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47377989
sys-apps/baselayout: sync ROOTPATH to PATH
Rootpath hasn't been a thing for quite some time, so remove it.
Everyone uses $PATH these days.
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c83d1da82dc..dc56d7e0851 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -215,8 +215,7 @@ src_prepare() {
if use prefix; then
hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
fi
# don't want symlinked directories in PATH on systems with usr-merge
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-06-12 19:43 Andreas K. Hüttel
0 siblings, 0 replies; 124+ messages in thread
From: Andreas K. Hüttel @ 2021-06-12 19:43 UTC (permalink / raw
To: gentoo-commits
commit: e5779ed450cb40d944b013b1257a385714544d0c
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 12 19:40:39 2021 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jun 12 19:42:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5779ed4
sys-apps/baselayout: Add riscv compat symlink for 1-level libdir
Approved by williamh
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
...layout-9999.ebuild => baselayout-2.7-r3.ebuild} | 41 ++++++++++++++++++++++
sys-apps/baselayout/baselayout-9999.ebuild | 41 ++++++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
similarity index 87%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.7-r3.ebuild
index 9f4a53a1c18..c83d1da82dc 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r3.ebuild
@@ -23,6 +23,34 @@ pkg_setup() {
multilib_layout
}
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
local dir def_libdir libdir libdirs
@@ -52,6 +80,7 @@ multilib_layout() {
die "Unable to create ${dir} directory"
fi
done
+ riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
done
return 0
fi
@@ -282,6 +311,18 @@ pkg_postinst() {
fi
fi
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
for x in ${REPLACING_VERSIONS}; do
if ver_test 2.4 -lt ${x}; then
ewarn "After updating ${EROOT}/etc/profile, please run"
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 9f4a53a1c18..c83d1da82dc 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -23,6 +23,34 @@ pkg_setup() {
multilib_layout
}
+riscv_compat_symlink() {
+ # Here we apply some special sauce for riscv.
+ # Two multilib layouts exist for now:
+ # 1) one level libdirs, (32bit) "lib" and (64bit) "lib64"
+ # these are chosen by us to closely resemble other arches
+ # 2) two level libdirs, "lib64/lp64d" "lib64/lp64" "lib32/ilp32d" ...
+ # this is the glibc/gcc default
+ # Unfortunately, the default has only one fallback, which is "lib"
+ # for both 32bit and 64bit. So things do not break in 1), we need
+ # to provide compatibility symlinks...
+
+ # This function has exactly two parameters:
+ # - the default libdir, to determine if 1) or 2) applies
+ # - the location of the symlink (which points to ".")
+
+ # Note: we call this only in the ${SYMLINK_LIB} = no codepath, since
+ # there never was a ${SYMLINK_LIB} = yes riscv profile.
+
+ case ${CHOST} in
+ riscv*)
+ # are we on a one level libdir profile? is there no symlink yet?
+ if [[ ${1} != */* && ! -L ${2} ]] ; then
+ ln -s . $2 || die "Unable to make $2 riscv compatibility symlink"
+ fi
+ ;;
+ esac
+}
+
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
local dir def_libdir libdir libdirs
@@ -52,6 +80,7 @@ multilib_layout() {
die "Unable to create ${dir} directory"
fi
done
+ riscv_compat_symlink "${def_libdir}" "${prefix}${def_libdir}/${DEFAULT_ABI}"
done
return 0
fi
@@ -282,6 +311,18 @@ pkg_postinst() {
fi
fi
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"/run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"/proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
for x in ${REPLACING_VERSIONS}; do
if ver_test 2.4 -lt ${x}; then
ewarn "After updating ${EROOT}/etc/profile, please run"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-05-12 20:11 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-05-12 20:11 UTC (permalink / raw
To: gentoo-commits
commit: 5e594b78a696a6d00b5f75ffd0d40d7a8a80f348
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue May 11 22:24:33 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed May 12 20:11:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e594b78
sys-apps/baselayout: remove old /run setup
This was needed to create /run on live systems.
There have been several baselayout versions since /run was created, so
it should be safe to remove it.
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index a37d17f3b8d..9f4a53a1c18 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -282,18 +282,6 @@ pkg_postinst() {
fi
fi
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"/run || die
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"/proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
for x in ${REPLACING_VERSIONS}; do
if ver_test 2.4 -lt ${x}; then
ewarn "After updating ${EROOT}/etc/profile, please run"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-04-16 16:38 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-04-16 16:38 UTC (permalink / raw
To: gentoo-commits
commit: 701ffbd641d1867102b5feb98fab4a4df69a0171
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 16 16:36:23 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 16:37:46 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=701ffbd6
sys-apps/baselayout: remove old versions
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 2 -
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 248 ---------------------
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 297 -------------------------
3 files changed, 547 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 293c93ad739..112675aad11 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1 @@
-DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
-DIST baselayout-2.6.tar.bz2 31871 BLAKE2B 4a51d173dc5a2837f78cd1247b5eadd89e7d0b5f2dbc72e75f027b0c23a5db9a386c53e756e80240f36ad4d63e3fe421bf9510c18321d7a31fda140ad47b2860 SHA512 5cad5faf56871ae951120643e29db0c39fea6dc845b4755382bd469eca32639ec6cd0cd046d3c439a7cc607b18770036f9c256260d35beaffb094e23cb13740b
DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
deleted file mode 100644
index c3d6a9fa3dc..00000000000
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="build kernel_linux"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
- find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${v}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update and . /etc/profile"
- break
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
deleted file mode 100644
index 5471a444eb2..00000000000
--- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
+++ /dev/null
@@ -1,297 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local dir def_libdir libdir libdirs
- local prefix prefix_lst
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
-
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- for prefix in ${prefix_lst[@]}; do
- for libdir in ${libdirs}; do
- dir="${prefix}${libdir}"
- if [[ -e "${dir}" ]]; then
- [[ ! -d "${dir}" ]] &&
- die "${dir} exists but is not a directory"
- continue
- fi
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
- einfo "symlinking ${dir} to usr/${libdir}"
- ln -s usr/${libdir} ${dir} ||
- die " Unable to make ${dir} symlink"
- else
- einfo "creating directory ${dir}"
- mkdir -p "${dir}" ||
- die "Unable to create ${dir} directory"
- fi
- done
- done
- return 0
- fi
-
- [ -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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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.
- if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
- fi
- done
- fi
-}
-
-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
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.6 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2021-04-16 16:26 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2021-04-16 16:26 UTC (permalink / raw
To: gentoo-commits
commit: b0ced97b588ac34ba5730ff812248e4e7f2af1cd
Author: David Michael <fedora.dm0 <AT> gmail <DOT> com>
AuthorDate: Mon Mar 29 15:28:36 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 16:25:51 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0ced97b
sys-apps/baselayout: EAPI 7, fix RISC-V UsrMerge, sync live
This fixes the UsrMerge layout on RISC-V with its subdirectory
libdirs so that only lib and lib64 and links.
It also updates the test for bad shells to look in the target root.
Closes: https://bugs.gentoo.org/728674
Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
...layout-9999.ebuild => baselayout-2.7-r2.ebuild} | 74 ++++++++++++----------
sys-apps/baselayout/baselayout-9999.ebuild | 74 ++++++++++++----------
2 files changed, 82 insertions(+), 66 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
similarity index 82%
copy from sys-apps/baselayout/baselayout-9999.ebuild
copy to sys-apps/baselayout/baselayout-2.7-r2.ebuild
index ee4f298e840..a37d17f3b8d 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit multilib versionator prefix
+inherit multilib prefix
DESCRIPTION="Filesystem baselayout and init scripts"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
@@ -29,10 +29,9 @@ multilib_layout() {
local prefix prefix_lst
def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
libdirs=$(get_all_libdirs)
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
for prefix in "${prefix_lst[@]}"; do
for libdir in ${libdirs}; do
dir="${prefix}${libdir}"
@@ -41,10 +40,12 @@ multilib_layout() {
die "${dir} exists but is not a directory"
continue
fi
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
einfo "symlinking ${dir} to usr/${libdir}"
ln -s usr/${libdir} ${dir} ||
- die " Unable to make ${dir} symlink"
+ die "Unable to make ${dir} symlink"
else
einfo "creating directory ${dir}"
mkdir -p "${dir}" ||
@@ -88,9 +89,9 @@ multilib_layout() {
# setup symlinks and dirs where we expect them to be; do not migrate
# data ... just fall over in that case.
if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
fi
for prefix in "${prefix_lst[@]}"; do
if [ "${SYMLINK_LIB}" = yes ] ; then
@@ -101,7 +102,7 @@ multilib_layout() {
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
+ rm -f "${prefix}lib"/.keep || die
if rmdir "${prefix}lib" 2>/dev/null ; then
ln -s ${def_libdir} "${prefix}lib" || die
else
@@ -113,7 +114,7 @@ multilib_layout() {
mkdir -p "${prefix}" || die
rm -f "${prefix}lib" || die
ln -s ${def_libdir} "${prefix}lib" || die
- mkdir -p "${prefix}${def_libdir}" #423571
+ mkdir -p "${prefix}${def_libdir}" || die #423571
fi
else
# we need to make sure "lib" is a dir
@@ -135,7 +136,7 @@ multilib_layout() {
*-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep
+ rm -f "${prefix}lib32"/.keep || die
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"
@@ -154,7 +155,7 @@ multilib_layout() {
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die " Unable to make ${EROOT}${libdir} symlink"
+ die "Unable to make ${EROOT}${libdir} symlink"
fi
done
fi
@@ -164,7 +165,7 @@ 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
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die
# We need to install directories and maybe some dev nodes when building
# stages, but they cannot be in CONTENTS.
@@ -177,7 +178,7 @@ pkg_preinst() {
emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
fi
fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
}
src_prepare() {
@@ -223,11 +224,16 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README
+ rm "${ED}"/etc/sysctl.d/README || die
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
+
+ # This is needed for https://bugs.gentoo.org/732142
+ dodir /usr/lib
+ mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
+ dosym ../usr/lib/os-release /etc/os-release
}
pkg_postinst() {
@@ -239,23 +245,25 @@ pkg_postinst() {
# (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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ [ -e "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
done
# Force shadow permissions to not be world-readable #260993
for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
done
# 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
+ if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release || die
fi
# whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
if [[ -n ${bad_users} ]] ; then
echo
@@ -265,8 +273,8 @@ pkg_postinst() {
fi
# whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
if [[ -n ${bad_shells} ]] ; then
echo
ewarn "The following users have non-existent shells!"
@@ -276,35 +284,35 @@ pkg_postinst() {
# https://bugs.gentoo.org/361349
if use kernel_linux; then
- mkdir -p "${EROOT}"run
+ mkdir -p "${EROOT}"/run || die
local found fstype mountpoint
while read -r _ mountpoint fstype _; do
[[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
+ done < "${ROOT}"/proc/mounts
[[ -z ${found} ]] &&
ewarn "You should reboot now to get /run mounted with tmpfs!"
fi
for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
ewarn "env-update && . /etc/profile"
fi
- if ! version_is_at_least 2.6 ${x}; then
+ if ver_test 2.6 -lt ${x}; then
ewarn "Please run env-update then log out and back in to"
ewarn "update your path."
fi
# clean up after 2.5 typos
# https://bugs.gentoo.org/show_bug.cgi?id=656380
if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
+ rm -fr "${EROOT}/{,usr" || die
fi
done
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
ewarn "Please migrate your changes."
fi
}
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index ee4f298e840..a37d17f3b8d 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit multilib versionator prefix
+inherit multilib prefix
DESCRIPTION="Filesystem baselayout and init scripts"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
@@ -29,10 +29,9 @@ multilib_layout() {
local prefix prefix_lst
def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
libdirs=$(get_all_libdirs)
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
for prefix in "${prefix_lst[@]}"; do
for libdir in ${libdirs}; do
dir="${prefix}${libdir}"
@@ -41,10 +40,12 @@ multilib_layout() {
die "${dir} exists but is not a directory"
continue
fi
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then
+ libdir="${libdir%%/*}"
+ dir="${prefix}${libdir}"
einfo "symlinking ${dir} to usr/${libdir}"
ln -s usr/${libdir} ${dir} ||
- die " Unable to make ${dir} symlink"
+ die "Unable to make ${dir} symlink"
else
einfo "creating directory ${dir}"
mkdir -p "${dir}" ||
@@ -88,9 +89,9 @@ multilib_layout() {
# setup symlinks and dirs where we expect them to be; do not migrate
# data ... just fall over in that case.
if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{,usr/,usr/local/} )
else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ prefix_lst=( "${EROOT}"/{usr/,usr/local/} )
fi
for prefix in "${prefix_lst[@]}"; do
if [ "${SYMLINK_LIB}" = yes ] ; then
@@ -101,7 +102,7 @@ multilib_layout() {
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
+ rm -f "${prefix}lib"/.keep || die
if rmdir "${prefix}lib" 2>/dev/null ; then
ln -s ${def_libdir} "${prefix}lib" || die
else
@@ -113,7 +114,7 @@ multilib_layout() {
mkdir -p "${prefix}" || die
rm -f "${prefix}lib" || die
ln -s ${def_libdir} "${prefix}lib" || die
- mkdir -p "${prefix}${def_libdir}" #423571
+ mkdir -p "${prefix}${def_libdir}" || die #423571
fi
else
# we need to make sure "lib" is a dir
@@ -135,7 +136,7 @@ multilib_layout() {
*-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep
+ rm -f "${prefix}lib32"/.keep || die
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"
@@ -154,7 +155,7 @@ multilib_layout() {
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
- die " Unable to make ${EROOT}${libdir} symlink"
+ die "Unable to make ${EROOT}${libdir} symlink"
fi
done
fi
@@ -164,7 +165,7 @@ 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
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die
# We need to install directories and maybe some dev nodes when building
# stages, but they cannot be in CONTENTS.
@@ -177,7 +178,7 @@ pkg_preinst() {
emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
fi
fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
}
src_prepare() {
@@ -223,11 +224,16 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README
+ rm "${ED}"/etc/sysctl.d/README || die
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
doins Makefile
+
+ # This is needed for https://bugs.gentoo.org/732142
+ dodir /usr/lib
+ mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
+ dosym ../usr/lib/os-release /etc/os-release
}
pkg_postinst() {
@@ -239,23 +245,25 @@ pkg_postinst() {
# (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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ [ -e "${EROOT}/etc/${x}" ] && continue
+ [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die
done
# Force shadow permissions to not be world-readable #260993
for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ if [ -e "${EROOT}/etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}/etc/${x}" || die
+ fi
done
# 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
+ if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then
+ mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release || die
fi
# whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
+ if [[ -e "${EROOT}"/etc/shadow ]] ; then
local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
if [[ -n ${bad_users} ]] ; then
echo
@@ -265,8 +273,8 @@ pkg_postinst() {
fi
# whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -e "${EROOT}"/etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort)
if [[ -n ${bad_shells} ]] ; then
echo
ewarn "The following users have non-existent shells!"
@@ -276,35 +284,35 @@ pkg_postinst() {
# https://bugs.gentoo.org/361349
if use kernel_linux; then
- mkdir -p "${EROOT}"run
+ mkdir -p "${EROOT}"/run || die
local found fstype mountpoint
while read -r _ mountpoint fstype _; do
[[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
+ done < "${ROOT}"/proc/mounts
[[ -z ${found} ]] &&
ewarn "You should reboot now to get /run mounted with tmpfs!"
fi
for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
+ if ver_test 2.4 -lt ${x}; then
+ ewarn "After updating ${EROOT}/etc/profile, please run"
ewarn "env-update && . /etc/profile"
fi
- if ! version_is_at_least 2.6 ${x}; then
+ if ver_test 2.6 -lt ${x}; then
ewarn "Please run env-update then log out and back in to"
ewarn "update your path."
fi
# clean up after 2.5 typos
# https://bugs.gentoo.org/show_bug.cgi?id=656380
if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
+ rm -fr "${EROOT}/{,usr" || die
fi
done
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then
+ ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout"
ewarn "Please migrate your changes."
fi
}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-11-14 17:07 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-11-14 17:07 UTC (permalink / raw
To: gentoo-commits
commit: 892dfe550af8c3d7c033b68408275582edf6504e
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 17:01:45 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 17:07:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=892dfe55
sys-apps/baselayout: 2.7-r1 bump
Closes: https://bugs.gentoo.org/732142
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7-r1.ebuild | 317 +++++++++++++++++++++++++++
1 file changed, 317 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.7-r1.ebuild b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
new file mode 100644
index 00000000000..3d5fac97ac6
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.7-r1.ebuild
@@ -0,0 +1,317 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ for prefix in "${prefix_lst[@]}"; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die " Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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 || die
+ 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}" || die #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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
+ rm -f "${prefix}lib32"/.keep || die
+ 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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die " Unable to make ${EROOT}${libdir} symlink"
+ fi
+ done
+ fi
+}
+
+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 || die
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr; then
+ sed \
+ -e 's|/usr/local/sbin:||g' \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ # 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
+ use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+ rm "${ED}"/etc/sysctl.d/README || die
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+
+ # This is needed for https://bugs.gentoo.org/732142
+ dodir /usr/lib
+ mv "${ED}"/etc/os-release "${ED}"/usr/lib || die
+ dosym ../usr/lib/os-release /etc/os-release
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ if [ -e "${EROOT}etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}etc/${x}" || die
+ fi
+ done
+
+ # 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 || die
+ fi
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run || die
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.6 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr" || die
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-08-30 21:59 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2020-08-30 21:59 UTC (permalink / raw
To: gentoo-commits
commit: 9cfef7e1d0ee1255e3e5fa175993183e65ecbf6a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 30 21:58:54 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 21:58:54 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cfef7e1
sys-apps/baselayout: Stabilize 2.7 ALLARCHES, #737664
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index 25ccf0871bf..1a631d10b93 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- 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"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-08-30 21:51 Sam James
0 siblings, 0 replies; 124+ messages in thread
From: Sam James @ 2020-08-30 21:51 UTC (permalink / raw
To: gentoo-commits
commit: 06ac2d1b2f51097301bbed348abc3805fd8dbe76
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 30 21:51:14 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 21:51:46 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06ac2d1b
sys-apps/baselayout: mark ALLARCHES
Acked-by: William Hubbs <williamh <AT> gentoo.org>
Bug: https://bugs.gentoo.org/737664
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/baselayout/metadata.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 53e04953d60..0b72092a22d 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -9,4 +9,5 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
+ <stabilize-allarches/>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-08-20 15:28 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-08-20 15:28 UTC (permalink / raw
To: gentoo-commits
commit: 28ec90ba6326a46a7b9bd10c6ce9afec37457157
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 20 15:15:43 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 15:27:55 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28ec90ba
sys-apps/baselayout: add missing dies
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7.ebuild | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index ee4f298e840..25ccf0871bf 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -101,7 +101,7 @@ multilib_layout() {
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
+ rm -f "${prefix}lib"/.keep || die
if rmdir "${prefix}lib" 2>/dev/null ; then
ln -s ${def_libdir} "${prefix}lib" || die
else
@@ -113,7 +113,7 @@ multilib_layout() {
mkdir -p "${prefix}" || die
rm -f "${prefix}lib" || die
ln -s ${def_libdir} "${prefix}lib" || die
- mkdir -p "${prefix}${def_libdir}" #423571
+ mkdir -p "${prefix}${def_libdir}" || die #423571
fi
else
# we need to make sure "lib" is a dir
@@ -135,7 +135,7 @@ multilib_layout() {
*-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
- rm -f "${prefix}lib32"/.keep
+ rm -f "${prefix}lib32"/.keep || die
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"
@@ -164,7 +164,7 @@ 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
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die
# We need to install directories and maybe some dev nodes when building
# stages, but they cannot be in CONTENTS.
@@ -177,7 +177,7 @@ pkg_preinst() {
emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
fi
fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
+ rm -f "${ED}"/usr/share/${PN}/Makefile || die
}
src_prepare() {
@@ -223,7 +223,7 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
- rm "${ED}"/etc/sysctl.d/README
+ rm "${ED}"/etc/sysctl.d/README || die
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
@@ -241,17 +241,19 @@ pkg_postinst() {
for x in master.passwd passwd shadow group fstab ; do
[ -e "${EROOT}etc/${x}" ] && continue
[ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die
done
# Force shadow permissions to not be world-readable #260993
for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ if [ -e "${EROOT}etc/${x}" ] ; then
+ chmod o-rwx "${EROOT}etc/${x}" || die
+ fi
done
# 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
+ mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release || die
fi
# whine about users that lack passwords #193541
@@ -276,7 +278,7 @@ pkg_postinst() {
# https://bugs.gentoo.org/361349
if use kernel_linux; then
- mkdir -p "${EROOT}"run
+ mkdir -p "${EROOT}"run || die
local found fstype mountpoint
while read -r _ mountpoint fstype _; do
@@ -299,7 +301,7 @@ pkg_postinst() {
# clean up after 2.5 typos
# https://bugs.gentoo.org/show_bug.cgi?id=656380
if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
+ rm -fr "${EROOT}{,usr" || die
fi
done
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-08-20 14:51 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-08-20 14:51 UTC (permalink / raw
To: gentoo-commits
commit: 410804ae543ad927dc2b75f125cde04baa907a77
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 20 14:50:47 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 14:50:47 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=410804ae
sys-apps/baselayout: sync live
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index a94078654b8..ee4f298e840 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -33,7 +33,7 @@ multilib_layout() {
if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- for prefix in ${prefix_lst[@]}; do
+ for prefix in "${prefix_lst[@]}"; do
for libdir in ${libdirs}; do
dir="${prefix}${libdir}"
if [[ -e "${dir}" ]]; then
@@ -153,7 +153,8 @@ multilib_layout() {
if ! use split-usr ; then
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die " Unable to make ${EROOT}${libdir} symlink"
fi
done
fi
@@ -222,6 +223,7 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
+ rm "${ED}"/etc/sysctl.d/README
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-08-20 14:47 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-08-20 14:47 UTC (permalink / raw
To: gentoo-commits
commit: aca04a15a282ceed47c01eceed3e115594fd14fb
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 20 23:37:33 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 14:46:58 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca04a15
sys-apps/baselayout: fix quoting and add a missing die call
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7.ebuild | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index 104cf105212..ee4f298e840 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -33,7 +33,7 @@ multilib_layout() {
if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- for prefix in ${prefix_lst[@]}; do
+ for prefix in "${prefix_lst[@]}"; do
for libdir in ${libdirs}; do
dir="${prefix}${libdir}"
if [[ -e "${dir}" ]]; then
@@ -153,7 +153,8 @@ multilib_layout() {
if ! use split-usr ; then
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ ln -s usr/"${libdir}" "${EROOT}${libdir}" ||
+ die " Unable to make ${EROOT}${libdir} symlink"
fi
done
fi
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-02-17 2:39 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-02-17 2:39 UTC (permalink / raw
To: gentoo-commits
commit: f748bd9537327ad329a56a794fa54a56df56309a
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 17 02:32:58 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 17 02:38:59 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f748bd95
sys-apps/baselayout: remove README from /etc/sysctl.d for OpenRC collision
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.7.ebuild | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
index a4b8ca535ac..ea29ca415bd 100644
--- a/sys-apps/baselayout/baselayout-2.7.ebuild
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -222,6 +222,7 @@ src_install() {
DESTDIR="${ED}" \
install
dodoc ChangeLog
+ rm "${ED}"/etc/sysctl.d/README
# need the makefile in pkg_preinst
insinto /usr/share/${PN}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-02-10 4:31 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-02-10 4:31 UTC (permalink / raw
To: gentoo-commits
commit: b4e246839d42a3c9a839801759c20f69c27df964
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 10 04:31:09 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 04:31:09 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4e24683
sys-apps/baselayout: Remove symlinked components when USE="-split-usr"
Closes: https://bugs.gentoo.org/708698
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 274767b5eab..a4b8ca535ac 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -188,6 +188,16 @@ src_prepare() {
echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
fi
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr; then
+ sed \
+ -e 's|/usr/local/sbin:||g' \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
# 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
@@ -196,7 +206,8 @@ src_prepare() {
# path and the symlinked path doesn't change the resulting cache.
local libdir ldpaths
for libdir in $(get_all_libdirs) ; do
- ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
ldpaths+=":${EPREFIX}/usr/local/${libdir}"
done
echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-02-10 4:31 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2020-02-10 4:31 UTC (permalink / raw
To: gentoo-commits
commit: 63ef2e4f68dd4b6978641f4fbcd2d04af400d65c
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 10 04:31:31 2020 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 04:31:31 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63ef2e4f
sys-apps/baselayout: 2.7 bump
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.7.ebuild | 308 ++++++++++++++++++++++++++++++
2 files changed, 309 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index b9d9da5be83..293c93ad739 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
DIST baselayout-2.6.tar.bz2 31871 BLAKE2B 4a51d173dc5a2837f78cd1247b5eadd89e7d0b5f2dbc72e75f027b0c23a5db9a386c53e756e80240f36ad4d63e3fe421bf9510c18321d7a31fda140ad47b2860 SHA512 5cad5faf56871ae951120643e29db0c39fea6dc845b4755382bd469eca32639ec6cd0cd046d3c439a7cc607b18770036f9c256260d35beaffb094e23cb13740b
+DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild
new file mode 100644
index 00000000000..a4b8ca535ac
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.7.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ for prefix in ${prefix_lst[@]}; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die " Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
+}
+
+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
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # don't want symlinked directories in PATH on systems with usr-merge
+ if ! use split-usr; then
+ sed \
+ -e 's|/usr/local/sbin:||g' \
+ -e 's|:/usr/sbin:|:|g' \
+ -e 's|:/sbin:|:|g' \
+ -e 's|:/bin:|:|g' \
+ -i etc/env.d/50baselayout || die
+ fi
+
+ # 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
+ use split-usr && ldpaths+=":${EPREFIX}/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.6 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr"
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2020-02-08 14:18 David Seifert
0 siblings, 0 replies; 124+ messages in thread
From: David Seifert @ 2020-02-08 14:18 UTC (permalink / raw
To: gentoo-commits
commit: 47970ff621c9550581c6eb29e901cb2fee7d1b0c
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 8 14:17:54 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb 8 14:17:54 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47970ff6
sys-apps/baselayout: [QA] Fix BadHomepage
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 2 +-
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index fc42f2d3ae7..1b25f4786fe 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -6,7 +6,7 @@ EAPI=6
inherit eutils multilib versionator prefix
DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
index 6398d236aca..0e9f29a7874 100644
--- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=6
inherit multilib versionator prefix
DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
inherit git-r3
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index dc992108fe8..274767b5eab 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=6
inherit multilib versionator prefix
DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
inherit git-r3
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2019-10-16 18:29 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2019-10-16 18:29 UTC (permalink / raw
To: gentoo-commits
commit: e8968e1a686d8cfd12193ab3d00b365e98295310
Author: William Hubbs <william.hubbs <AT> sony <DOT> com>
AuthorDate: Wed Oct 16 18:25:33 2019 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 18:26:52 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8968e1a
sys-apps/baselayout: remove split-usr from metadata since it is global
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/metadata.xml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 8a7288dd9a8..53e04953d60 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -9,7 +9,4 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
-<use>
- <flag name="split-usr">Enable this if /bin and /usr/bin are separate directories</flag>
-</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2019-05-04 18:36 Mikle Kolyada
0 siblings, 0 replies; 124+ messages in thread
From: Mikle Kolyada @ 2019-05-04 18:36 UTC (permalink / raw
To: gentoo-commits
commit: f98d0f8ca90ea5e93f876c89ae83e87f9de60255
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat May 4 18:35:53 2019 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat May 4 18:35:53 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f98d0f8c
sys-apps/baselayout: Add ~riscv keyword
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 4 ++--
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 4 ++--
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index a3a7fc30d9a..5adb7126676 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,7 +11,7 @@ SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
index 5a33d62f420..46f9625ff45 100644
--- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
fi
LICENSE="GPL-2"
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 74c90b6df27..698bb775923 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2019-03-03 18:54 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2019-03-03 18:54 UTC (permalink / raw
To: gentoo-commits
commit: 20f8576c593f9dc674012fcad444f61952c39498
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 3 18:29:52 2019 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Mar 3 18:53:45 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20f8576c
sys-apps/baselayout: sync live
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-9999.ebuild | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 0428b0afbb9..74c90b6df27 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -25,11 +25,36 @@ pkg_setup() {
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
- local def_libdir libdir libdirs
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
libdirs=$(get_all_libdirs)
: ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ for prefix in ${prefix_lst[@]}; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die " Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ done
+ return 0
+ fi
+
[ -z "${def_libdir}" ] &&
die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
@@ -62,7 +87,6 @@ multilib_layout() {
# setup symlinks and dirs where we expect them to be; do not migrate
# data ... just fall over in that case.
- local prefix prefix_lst
if use split-usr ; then
prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
else
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-11-30 12:14 Jeroen Roovers
0 siblings, 0 replies; 124+ messages in thread
From: Jeroen Roovers @ 2018-11-30 12:14 UTC (permalink / raw
To: gentoo-commits
commit: f7c520ec9e4cddbaefc018c02d5d2f322a5910f1
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 30 11:17:43 2018 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Nov 30 12:14:29 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7c520ec
sys-apps/baselayout: Stable for HPPA too.
Package-Manager: Portage-2.3.52, Repoman-2.3.12
RepoMan-Options: --ignore-arches
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
index 1abe713e1c6..5a33d62f420 100644
--- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-11-12 11:13 Lars Wendler
0 siblings, 0 replies; 124+ messages in thread
From: Lars Wendler @ 2018-11-12 11:13 UTC (permalink / raw
To: gentoo-commits
commit: 1290aa226a91adaf3bc7435fca0c56f45c824f09
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 11:13:29 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Nov 12 11:13:43 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1290aa22
sys-apps/baselayout: Removed old.
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.6.ebuild | 273 ------------------------------
1 file changed, 273 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.6.ebuild b/sys-apps/baselayout/baselayout-2.6.ebuild
deleted file mode 100644
index 0428b0afbb9..00000000000
--- a/sys-apps/baselayout/baselayout-2.6.ebuild
+++ /dev/null
@@ -1,273 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local def_libdir libdir libdirs
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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 prefix_lst
- if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
- fi
- done
- fi
-}
-
-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
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.6 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-11-08 0:15 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-11-08 0:15 UTC (permalink / raw
To: gentoo-commits
commit: fd889d6c7dce3714649d67a766ef22c18df0d127
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 8 00:10:45 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Nov 8 00:13:46 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd889d6c
sys-apps/baselayout: Mark 2.6-r1 stable
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
index daa903ef83a..1abe713e1c6 100644
--- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then
inherit git-r3
else
SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+ KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
fi
LICENSE="GPL-2"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-07-25 16:36 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-07-25 16:36 UTC (permalink / raw
To: gentoo-commits
commit: f76ddbcf61ac79ad9f5881e30200eaa190f71c21
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 25 16:35:24 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jul 25 16:35:59 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f76ddbcf
sys-apps/baselayout: 2.6-r1 bump for 17.1 profiles
Package-Manager: Portage-2.3.40, Repoman-2.3.9
sys-apps/baselayout/baselayout-2.6-r1.ebuild | 297 +++++++++++++++++++++++++++
1 file changed, 297 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
new file mode 100644
index 00000000000..daa903ef83a
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local dir def_libdir libdir libdirs
+ local prefix prefix_lst
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
+
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ for prefix in ${prefix_lst[@]}; do
+ for libdir in ${libdirs}; do
+ dir="${prefix}${libdir}"
+ if [[ -e "${dir}" ]]; then
+ [[ ! -d "${dir}" ]] &&
+ die "${dir} exists but is not a directory"
+ continue
+ fi
+ if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
+ einfo "symlinking ${dir} to usr/${libdir}"
+ ln -s usr/${libdir} ${dir} ||
+ die " Unable to make ${dir} symlink"
+ else
+ einfo "creating directory ${dir}"
+ mkdir -p "${dir}" ||
+ die "Unable to create ${dir} directory"
+ fi
+ done
+ done
+ return 0
+ fi
+
+ [ -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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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.
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
+}
+
+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
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.6 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr"
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-07-22 16:47 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-07-22 16:47 UTC (permalink / raw
To: gentoo-commits
commit: 9ba90c21126de9ad98404761c59a76817921e5fa
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 22 16:46:10 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jul 22 16:46:49 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ba90c21
sys-apps/baselayout: style change
Package-Manager: Portage-2.3.40, Repoman-2.3.9
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 3 ++-
sys-apps/baselayout/baselayout-2.6.ebuild | 3 ++-
sys-apps/baselayout/baselayout-9999.ebuild | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index d5f5254ba60..a3a7fc30d9a 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -23,7 +23,8 @@ 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"
+ [ -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
diff --git a/sys-apps/baselayout/baselayout-2.6.ebuild b/sys-apps/baselayout/baselayout-2.6.ebuild
index c32ab3e4495..0428b0afbb9 100644
--- a/sys-apps/baselayout/baselayout-2.6.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6.ebuild
@@ -30,7 +30,8 @@ multilib_layout() {
libdirs=$(get_all_libdirs)
: ${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"
+ [ -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
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index c32ab3e4495..0428b0afbb9 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -30,7 +30,8 @@ multilib_layout() {
libdirs=$(get_all_libdirs)
: ${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"
+ [ -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
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-31 20:03 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-31 20:03 UTC (permalink / raw
To: gentoo-commits
commit: 6f2f02098247654fb9a38a5252eea301ce827321
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 20:01:38 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu May 31 20:01:38 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f2f0209
sys-apps/baselayout: remove broken 2.5-r1 version
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.5-r1.ebuild | 272 ---------------------------
2 files changed, 273 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index e11a0bd8f7d..b9d9da5be83 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,3 +1,2 @@
DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
-DIST baselayout-2.5.tar.bz2 31368 BLAKE2B 73a939bf9a180da151804045ff0e57e4def11e9bca8f55b2b891437712877b718faaf7d6ef006161d92e853c747246b20adc7d26105832c5c3120510325cbc67 SHA512 5705740c0be47a7c76d480c1173fd69a5cfc278351f34ab0c4f54220da81617fc4755c8f61888985611f77881cc89b273775fec593915f344076fc3264ea6934
DIST baselayout-2.6.tar.bz2 31871 BLAKE2B 4a51d173dc5a2837f78cd1247b5eadd89e7d0b5f2dbc72e75f027b0c23a5db9a386c53e756e80240f36ad4d63e3fe421bf9510c18321d7a31fda140ad47b2860 SHA512 5cad5faf56871ae951120643e29db0c39fea6dc845b4755382bd469eca32639ec6cd0cd046d3c439a7cc607b18770036f9c256260d35beaffb094e23cb13740b
diff --git a/sys-apps/baselayout/baselayout-2.5-r1.ebuild b/sys-apps/baselayout/baselayout-2.5-r1.ebuild
deleted file mode 100644
index 866701708dc..00000000000
--- a/sys-apps/baselayout/baselayout-2.5-r1.ebuild
+++ /dev/null
@@ -1,272 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local def_libdir libdir libdirs
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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 prefix_lst
- if use split-usr ; then
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
- else
- prefix_lst=( "${EROOT}"{usr/,usr/local/} )
- fi
- for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
- fi
- done
- fi
-}
-
-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
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.5 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- # clean up after 2.5 typos
- # https://bugs.gentoo.org/show_bug.cgi?id=656380
- if [[ ${x} == 2.5 ]]; then
- rm -fr "${EROOT}{,usr"
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-29 0:53 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-29 0:53 UTC (permalink / raw
To: gentoo-commits
commit: 80e77709f57eea217fc9ca79c9ef648c843f8259
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue May 29 00:51:47 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue May 29 00:53:02 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80e77709
sys-apps/baselayout: sync live ebuild
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 866701708dc..c32ab3e4495 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -254,7 +254,7 @@ pkg_postinst() {
ewarn "env-update && . /etc/profile"
fi
- if ! version_is_at_least 2.5 ${x}; then
+ if ! version_is_at_least 2.6 ${x}; then
ewarn "Please run env-update then log out and back in to"
ewarn "update your path."
fi
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-28 20:19 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-28 20:19 UTC (permalink / raw
To: gentoo-commits
commit: b48a095d8b961b269304dfab948c80bf557f2386
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon May 28 20:18:46 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon May 28 20:18:46 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b48a095d
sys-apps/baselayout-2.6: typo fix
sys-apps/baselayout/baselayout-2.6.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.6.ebuild b/sys-apps/baselayout/baselayout-2.6.ebuild
index 866701708dc..c32ab3e4495 100644
--- a/sys-apps/baselayout/baselayout-2.6.ebuild
+++ b/sys-apps/baselayout/baselayout-2.6.ebuild
@@ -254,7 +254,7 @@ pkg_postinst() {
ewarn "env-update && . /etc/profile"
fi
- if ! version_is_at_least 2.5 ${x}; then
+ if ! version_is_at_least 2.6 ${x}; then
ewarn "Please run env-update then log out and back in to"
ewarn "update your path."
fi
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-28 20:14 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-28 20:14 UTC (permalink / raw
To: gentoo-commits
commit: f20b3833cb60131d3a725cbe0789ab45037655ea
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon May 28 20:12:49 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon May 28 20:13:41 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f20b3833
sys-apps/baselayout: 2.6 bump
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.6.ebuild | 272 ++++++++++++++++++++++++++++++
2 files changed, 273 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 0512ad54a4a..e11a0bd8f7d 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1,3 @@
DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
DIST baselayout-2.5.tar.bz2 31368 BLAKE2B 73a939bf9a180da151804045ff0e57e4def11e9bca8f55b2b891437712877b718faaf7d6ef006161d92e853c747246b20adc7d26105832c5c3120510325cbc67 SHA512 5705740c0be47a7c76d480c1173fd69a5cfc278351f34ab0c4f54220da81617fc4755c8f61888985611f77881cc89b273775fec593915f344076fc3264ea6934
+DIST baselayout-2.6.tar.bz2 31871 BLAKE2B 4a51d173dc5a2837f78cd1247b5eadd89e7d0b5f2dbc72e75f027b0c23a5db9a386c53e756e80240f36ad4d63e3fe421bf9510c18321d7a31fda140ad47b2860 SHA512 5cad5faf56871ae951120643e29db0c39fea6dc845b4755382bd469eca32639ec6cd0cd046d3c439a7cc607b18770036f9c256260d35beaffb094e23cb13740b
diff --git a/sys-apps/baselayout/baselayout-2.6.ebuild b/sys-apps/baselayout/baselayout-2.6.ebuild
new file mode 100644
index 00000000000..866701708dc
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.6.ebuild
@@ -0,0 +1,272 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local def_libdir libdir libdirs
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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 prefix_lst
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
+}
+
+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
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.5 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr"
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-24 17:13 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-24 17:13 UTC (permalink / raw
To: gentoo-commits
commit: bc57417ab8fc26344b67634ef95cb9f1cc8b27f5
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 17:11:35 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu May 24 17:13:44 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc57417a
sys-apps/baselayout: sync live ebuild
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 2d016a01e5b..866701708dc 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -63,11 +63,11 @@ multilib_layout() {
# data ... just fall over in that case.
local prefix prefix_lst
if use split-usr ; then
- prefix_lst="${EROOT}"{,usr/,usr/local/}
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
else
- prefix_lst="${EROOT}"{usr/,usr/local/}
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
fi
- for prefix in "${prefix_lst}"; do
+ for prefix in "${prefix_lst[@]}"; do
if [ "${SYMLINK_LIB}" = yes ] ; then
# we need to make sure "lib" points to the native libdir
if [ -h "${prefix}lib" ] ; then
@@ -258,6 +258,11 @@ pkg_postinst() {
ewarn "Please run env-update then log out and back in to"
ewarn "update your path."
fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr"
+ fi
done
if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-24 15:49 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-24 15:49 UTC (permalink / raw
To: gentoo-commits
commit: 261af461654f7df645f9f28b199a2136adf625b6
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 15:41:38 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu May 24 15:48:47 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=261af461
sys-apps/baselayout: remove broken 2.5 version
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-2.5.ebuild | 267 ------------------------------
1 file changed, 267 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.5.ebuild b/sys-apps/baselayout/baselayout-2.5.ebuild
deleted file mode 100644
index 2d016a01e5b..00000000000
--- a/sys-apps/baselayout/baselayout-2.5.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit multilib versionator prefix
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-if [[ ${PV} = 9999 ]]; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux +split-usr"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-multilib_layout() {
- local def_libdir libdir libdirs
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
- libdirs=$(get_all_libdirs)
- : ${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
- if use split-usr ; then
- exp=( {,usr/,usr/local/}${libdir} )
- else
- exp=( {usr/,usr/local/}${libdir} )
- fi
- for d in "${exp[@]}" ; 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 prefix_lst
- if use split-usr ; then
- prefix_lst="${EROOT}"{,usr/,usr/local/}
- else
- prefix_lst="${EROOT}"{usr/,usr/local/}
- fi
- for prefix in "${prefix_lst}"; 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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
- fi
- fi
- done
- if ! use split-usr ; then
- for libdir in ${libdirs}; do
- if [[ ! -e "${EROOT}${libdir}" ]]; then
- ln -s usr/"${libdir}" "${EROOT}${libdir}"
- fi
- done
- fi
-}
-
-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
-
- # 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
- if use split-usr ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
- echo PATH=/usr/bin:/bin >> etc/env.d/99host
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
- if [[ -n ${bad_users} ]] ; then
- echo
- ewarn "The following users lack passwords!"
- ewarn ${bad_users}
- fi
- fi
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"run
-
- local found fstype mountpoint
- while read -r _ mountpoint fstype _; do
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
- done < "${ROOT}"proc/mounts
- [[ -z ${found} ]] &&
- ewarn "You should reboot now to get /run mounted with tmpfs!"
- fi
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${x}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update && . /etc/profile"
- fi
-
- if ! version_is_at_least 2.5 ${x}; then
- ewarn "Please run env-update then log out and back in to"
- ewarn "update your path."
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-24 3:36 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-24 3:36 UTC (permalink / raw
To: gentoo-commits
commit: 21fd030f84718ed28179c2f468a22b4ae93f5d67
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 03:14:03 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu May 24 03:14:42 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21fd030f
sys-apps/baselayout: 2.5-r1 bump for bug #656380
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-2.5-r1.ebuild | 272 +++++++++++++++++++++++++++
1 file changed, 272 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.5-r1.ebuild b/sys-apps/baselayout/baselayout-2.5-r1.ebuild
new file mode 100644
index 00000000000..866701708dc
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.5-r1.ebuild
@@ -0,0 +1,272 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local def_libdir libdir libdirs
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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 prefix_lst
+ if use split-usr ; then
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
+ else
+ prefix_lst=( "${EROOT}"{usr/,usr/local/} )
+ fi
+ for prefix in "${prefix_lst[@]}"; 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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
+}
+
+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
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.5 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ # clean up after 2.5 typos
+ # https://bugs.gentoo.org/show_bug.cgi?id=656380
+ if [[ ${x} == 2.5 ]]; then
+ rm -fr "${EROOT}{,usr"
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-23 22:06 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-23 22:06 UTC (permalink / raw
To: gentoo-commits
commit: cab9f91ab52211bde36ad5a28ee5ea3eebb5c6df
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed May 23 22:00:05 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed May 23 22:00:44 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cab9f91a
sys-apps/baselayout: 2.5 version bump
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.5.ebuild | 267 ++++++++++++++++++++++++++++++
2 files changed, 268 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 33d8ce22d8f..0512ad54a4a 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
+DIST baselayout-2.5.tar.bz2 31368 BLAKE2B 73a939bf9a180da151804045ff0e57e4def11e9bca8f55b2b891437712877b718faaf7d6ef006161d92e853c747246b20adc7d26105832c5c3120510325cbc67 SHA512 5705740c0be47a7c76d480c1173fd69a5cfc278351f34ab0c4f54220da81617fc4755c8f61888985611f77881cc89b273775fec593915f344076fc3264ea6934
diff --git a/sys-apps/baselayout/baselayout-2.5.ebuild b/sys-apps/baselayout/baselayout-2.5.ebuild
new file mode 100644
index 00000000000..2d016a01e5b
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.5.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+multilib_layout() {
+ local def_libdir libdir libdirs
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
+ : ${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
+ if use split-usr ; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
+ for d in "${exp[@]}" ; 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 prefix_lst
+ if use split-usr ; then
+ prefix_lst="${EROOT}"{,usr/,usr/local/}
+ else
+ prefix_lst="${EROOT}"{usr/,usr/local/}
+ fi
+ for prefix in "${prefix_lst}"; 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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ i?86*|x86_64*|powerpc*|sparc*|s390*)
+ if [[ -d ${prefix}lib32 && ! -h ${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}lib" || die
+ fi
+ fi
+ done
+ if ! use split-usr ; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
+}
+
+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
+
+ # 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
+ if use split-usr ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
+ if [[ -n ${bad_users} ]] ; then
+ echo
+ ewarn "The following users lack passwords!"
+ ewarn ${bad_users}
+ fi
+ fi
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${x}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.5 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-05-23 21:28 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-05-23 21:28 UTC (permalink / raw
To: gentoo-commits
commit: a3a7afa711daa429827d3538570572cc109ada60
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed May 23 21:26:25 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed May 23 21:28:38 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a7afa7
sys-apps/baselayout: change usrmerge use flag to split-usr
This is so we will be in line with systemd's usage of split-usr.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 10 +++++-----
sys-apps/baselayout/metadata.xml | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index cef8791471a..2d016a01e5b 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_FreeBSD kernel_linux usrmerge"
+IUSE="build kernel_FreeBSD kernel_linux +split-usr"
pkg_setup() {
multilib_layout
@@ -35,7 +35,7 @@ multilib_layout() {
# figure out which paths should be symlinks and which should be directories
local dirs syms exp d
for libdir in ${libdirs} ; do
- if ! use usrmerge ; then
+ if use split-usr ; then
exp=( {,usr/,usr/local/}${libdir} )
else
exp=( {usr/,usr/local/}${libdir} )
@@ -62,7 +62,7 @@ multilib_layout() {
# setup symlinks and dirs where we expect them to be; do not migrate
# data ... just fall over in that case.
local prefix prefix_lst
- if ! use usrmerge ; then
+ if use split-usr ; then
prefix_lst="${EROOT}"{,usr/,usr/local/}
else
prefix_lst="${EROOT}"{usr/,usr/local/}
@@ -125,7 +125,7 @@ multilib_layout() {
fi
fi
done
- if use usrmerge ; then
+ if ! use split-usr ; then
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
ln -s usr/"${libdir}" "${EROOT}${libdir}"
@@ -145,7 +145,7 @@ pkg_preinst() {
# Also, we cannot reference $S as binpkg will break so we do this.
multilib_layout
if use build ; then
- if ! use usrmerge ; then
+ if use split-usr ; then
emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
else
emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 452b0130466..8a7288dd9a8 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -10,6 +10,6 @@
<name>Gentoo Base System</name>
</maintainer>
<use>
- <flag name="usrmerge">Activate the /usr merge when stages are built</flag>
+ <flag name="split-usr">Enable this if /bin and /usr/bin are separate directories</flag>
</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-03-20 21:24 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-03-20 21:24 UTC (permalink / raw
To: gentoo-commits
commit: 9cdaeebfbb00619040601debdf5b4e84283d8280
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 20 21:23:19 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Mar 20 21:24:10 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cdaeebf
sys-apps/baselayout: add back the build use flag
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 48 ++++++++++++++++--------------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 6bd0c0d4f70..cef8791471a 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -7,7 +7,6 @@ inherit multilib versionator prefix
DESCRIPTION="Filesystem baselayout and init scripts"
HOMEPAGE="https://www.gentoo.org/"
-
if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
inherit git-r3
@@ -18,7 +17,11 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="usrmerge kernel_linux"
+IUSE="build kernel_FreeBSD kernel_linux usrmerge"
+
+pkg_setup() {
+ multilib_layout
+}
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
@@ -27,13 +30,12 @@ multilib_layout() {
libdirs=$(get_all_libdirs)
: ${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"
+ [ -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
- if ! use usrmerge; then
+ if ! use usrmerge ; then
exp=( {,usr/,usr/local/}${libdir} )
else
exp=( {usr/,usr/local/}${libdir} )
@@ -60,7 +62,7 @@ multilib_layout() {
# setup symlinks and dirs where we expect them to be; do not migrate
# data ... just fall over in that case.
local prefix prefix_lst
- if ! use usrmerge; then
+ if ! use usrmerge ; then
prefix_lst="${EROOT}"{,usr/,usr/local/}
else
prefix_lst="${EROOT}"{usr/,usr/local/}
@@ -123,7 +125,7 @@ multilib_layout() {
fi
fi
done
- if use usrmerge; then
+ if use usrmerge ; then
for libdir in ${libdirs}; do
if [[ ! -e "${EROOT}${libdir}" ]]; then
ln -s usr/"${libdir}" "${EROOT}${libdir}"
@@ -132,15 +134,24 @@ multilib_layout() {
fi
}
-pkg_setup() {
- multilib_layout
-}
-
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
+
+ # 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
+ if ! use usrmerge ; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
}
src_prepare() {
@@ -170,22 +181,15 @@ src_prepare() {
}
src_install() {
- if ! use usrmerge; then
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- layout
- else
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- layout-usrmerge
- fi
emake \
OS=$(usex kernel_FreeBSD BSD Linux) \
DESTDIR="${ED}" \
install
dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-03-19 18:46 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-03-19 18:46 UTC (permalink / raw
To: gentoo-commits
commit: 4ecb6fb2b5a9012f44c6727509de2a3e77930fb7
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 18:45:38 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 18:46:07 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ecb6fb2
sys-apps/baselayout: live ebuild: add warning about path change
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 20a7143a742..6bd0c0d4f70 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -245,10 +245,14 @@ pkg_postinst() {
fi
for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${v}; then
+ if ! version_is_at_least 2.4 ${x}; then
ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update and . /etc/profile"
- break
+ ewarn "env-update && . /etc/profile"
+ fi
+
+ if ! version_is_at_least 2.5 ${x}; then
+ ewarn "Please run env-update then log out and back in to"
+ ewarn "update your path."
fi
done
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-02-07 19:51 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-02-07 19:51 UTC (permalink / raw
To: gentoo-commits
commit: 587512e176c5ea13385e7f5ba5d2c23afe80a8c3
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 7 19:49:41 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Feb 7 19:51:03 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=587512e1
sys-apps/baselayout: Live ebuild cleanups:
- run layout targets in src_install
- call multilib_layout only in pkg_setup
- remove some baselayout-1.x migration code from pkg_preinst/pkg_postinst
Package-Manager: Portage-2.3.19, Repoman-2.3.6
sys-apps/baselayout/baselayout-9999.ebuild | 49 ++++++++++--------------------
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 4622672eb5b..20a7143a742 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -18,11 +18,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build usrmerge kernel_linux"
-
-pkg_setup() {
- multilib_layout
-}
+IUSE="usrmerge kernel_linux"
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
@@ -136,31 +132,15 @@ multilib_layout() {
fi
}
-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 "${EROOT}"/etc/conf.d/* 2>/dev/null
+pkg_setup() {
+ multilib_layout
+}
+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
-
- # 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
- if ! use usrmerge; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
- else
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
- fi
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
}
src_prepare() {
@@ -190,15 +170,22 @@ src_prepare() {
}
src_install() {
+ if ! use usrmerge; then
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ layout
+ else
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ layout-usrmerge
+ fi
emake \
OS=$(usex kernel_FreeBSD BSD Linux) \
DESTDIR="${ED}" \
install
dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
}
pkg_postinst() {
@@ -235,10 +222,6 @@ pkg_postinst() {
fi
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
-
# whine about users with invalid shells #215698
if [[ -e "${EROOT}"etc/passwd ]] ; then
local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-02-07 0:20 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-02-07 0:20 UTC (permalink / raw
To: gentoo-commits
commit: cdd4b78ee24386567bad32953a69ab027860acd1
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 7 00:19:56 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Feb 7 00:19:56 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdd4b78e
sys-apps/baselayout: Stable 2.4.1-r2 on sparc
I'm not sure why this was the only arch where this version wasn't
stable.
Package-Manager: Portage-2.3.19, Repoman-2.3.6
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index bb57d59ef09..d5f5254ba60 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-02-06 18:57 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2018-02-06 18:57 UTC (permalink / raw
To: gentoo-commits
commit: 6194e626c0bf9d5d198aab9aa7bb536b76faa486
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 6 18:54:41 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Feb 6 18:56:29 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6194e626
sys-apps/baselayout: remove version 2.3
Package-Manager: Portage-2.3.19, Repoman-2.3.6
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.3.ebuild | 241 ------------------------------
2 files changed, 242 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 532aa128c21..33d8ce22d8f 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1 @@
-DIST baselayout-2.3.tar.bz2 32266 BLAKE2B 6535bb451e393accd7c041079188c8c76b318f449adf2e5d1579496a27951de12b8404fb4ded3c143b60fe59ad04017a1a53e4a4ce864559f192fc96f1269a05 SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb
DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
deleted file mode 100644
index 153e53b5ebe..00000000000
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils multilib
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="build kernel_linux"
-
-pkg_setup() {
- multilib_layout
-}
-
-# Create our multilib dirs - the Makefile has no knowledge of this
-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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- 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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- if use prefix; then
- sed -i -r\
- -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
- -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
- -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
- -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
- etc/profile || die
- sed -i -r \
- -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
- -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
- etc/env.d/00basic || die
- sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
- sed -i -r \
- -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
- share.Linux/passwd || die
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
- find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"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
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2018-01-12 4:19 Mike Frysinger
0 siblings, 0 replies; 124+ messages in thread
From: Mike Frysinger @ 2018-01-12 4:19 UTC (permalink / raw
To: gentoo-commits
commit: ff3d3f469414600e47cdd640ac5b4c289805bd3c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 12 04:18:39 2018 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jan 12 04:18:39 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff3d3f46
sys-apps/baselayout: mark 2.4.1-r2 arm64/m68k/s390/sh stable
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index bc82d2ddcdb..ec9e36e9794 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-12-10 21:41 Michał Górny
0 siblings, 0 replies; 124+ messages in thread
From: Michał Górny @ 2017-12-10 21:41 UTC (permalink / raw
To: gentoo-commits
commit: 0e071b3d533ce1bba96e0371931b1426e6d9993f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 17:42:44 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 21:41:21 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e071b3d
sys-apps/baselayout: Fix handling transitional lib32 symlink
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
sys-apps/baselayout/baselayout-9999.ebuild | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index d137c15e527..bc82d2ddcdb 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -93,7 +93,7 @@ multilib_layout() {
case ${CHOST} in
*-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [ -d "${prefix}lib32" ] ; then
+ if [[ -d ${prefix}lib32 && ! -h ${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"
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 7e43ea7af59..a7d95e53ed4 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -111,7 +111,7 @@ multilib_layout() {
case ${CHOST} in
*-gentoo-freebsd*) ;; # We want it the other way on fbsd.
i?86*|x86_64*|powerpc*|sparc*|s390*)
- if [ -d "${prefix}lib32" ] ; then
+ if [[ -d ${prefix}lib32 && ! -h ${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"
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-11-17 22:23 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-11-17 22:23 UTC (permalink / raw
To: gentoo-commits
commit: fae21fc0b18fba048809c848b11b163229c02dfe
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 17 22:22:00 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Nov 17 22:22:39 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fae21fc0
sys-apps/baselayout: add support for usr merge to live for testing
Package-Manager: Portage-2.3.13, Repoman-2.3.3
sys-apps/baselayout/baselayout-9999.ebuild | 39 ++++++++++++++++++++++++------
sys-apps/baselayout/metadata.xml | 3 +++
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
index 98795ba6d00..7e43ea7af59 100644
--- a/sys-apps/baselayout/baselayout-9999.ebuild
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit eutils multilib versionator prefix
+inherit multilib versionator prefix
DESCRIPTION="Filesystem baselayout and init scripts"
HOMEPAGE="https://www.gentoo.org/"
@@ -18,7 +18,7 @@ fi
LICENSE="GPL-2"
SLOT="0"
-IUSE="build kernel_linux"
+IUSE="build usrmerge kernel_linux"
pkg_setup() {
multilib_layout
@@ -26,15 +26,22 @@ pkg_setup() {
# Create our multilib dirs - the Makefile has no knowledge of this
multilib_layout() {
- local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ local def_libdir libdir libdirs
+ def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
+ libdirs=$(get_all_libdirs)
: ${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"
+ [ -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} )
+ if ! use usrmerge; then
+ exp=( {,usr/,usr/local/}${libdir} )
+ else
+ exp=( {usr/,usr/local/}${libdir} )
+ fi
for d in "${exp[@]}" ; do
# most things should be dirs
if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
@@ -56,8 +63,13 @@ multilib_layout() {
# 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 "${EROOT}"{,usr/,usr/local/} ; do
+ local prefix prefix_lst
+ if ! use usrmerge; then
+ prefix_lst="${EROOT}"{,usr/,usr/local/}
+ else
+ prefix_lst="${EROOT}"{usr/,usr/local/}
+ fi
+ for prefix in "${prefix_lst}"; do
if [ "${SYMLINK_LIB}" = yes ] ; then
# we need to make sure "lib" points to the native libdir
if [ -h "${prefix}lib" ] ; then
@@ -115,6 +127,13 @@ multilib_layout() {
fi
fi
done
+ if use usrmerge; then
+ for libdir in ${libdirs}; do
+ if [[ ! -e "${EROOT}${libdir}" ]]; then
+ ln -s usr/"${libdir}" "${EROOT}${libdir}"
+ fi
+ done
+ fi
}
pkg_preinst() {
@@ -135,7 +154,11 @@ pkg_preinst() {
# Also, we cannot reference $S as binpkg will break so we do this.
multilib_layout
if use build ; then
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ if ! use usrmerge; then
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
+ else
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
+ fi
fi
rm -f "${ED}"/usr/share/${PN}/Makefile
}
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 53e04953d60..452b0130466 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -9,4 +9,7 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
+<use>
+ <flag name="usrmerge">Activate the /usr merge when stages are built</flag>
+</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-10-06 19:02 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-10-06 19:02 UTC (permalink / raw
To: gentoo-commits
commit: 0776d0703723fd1de3de16c765d8b53fd725d120
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 6 19:01:53 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Oct 6 19:02:29 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0776d070
sys-apps/baselayout: add live ebuild for testing
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sys-apps/baselayout/baselayout-9999.ebuild | 253 +++++++++++++++++++++++++++++
1 file changed, 253 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild
new file mode 100644
index 00000000000..98795ba6d00
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-9999.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build kernel_linux"
+
+pkg_setup() {
+ multilib_layout
+}
+
+# Create our multilib dirs - the Makefile has no knowledge of this
+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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ 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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"run
+
+ local found fstype mountpoint
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
+ fi
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${v}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update and . /etc/profile"
+ break
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-10-03 18:00 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-10-03 18:00 UTC (permalink / raw
To: gentoo-commits
commit: 3fd785816fc088c925695886d18d67c9a7894a45
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 3 17:54:00 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 3 17:54:00 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fd78581
sys-apps/baselayout: add more local variables
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index 2d2293456f9..d137c15e527 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -224,7 +224,7 @@ pkg_postinst() {
if use kernel_linux; then
mkdir -p "${EROOT}"run
- local found
+ local found fstype mountpoint
while read -r _ mountpoint fstype _; do
[[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
done < "${ROOT}"proc/mounts
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-10-03 17:50 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-10-03 17:50 UTC (permalink / raw
To: gentoo-commits
commit: 73187892e3b1ff195c127df43a63aac42fc43031
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 3 17:35:54 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 3 17:36:26 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73187892
sys-apps/baselayout: 2.4.1-r2: fix tmpfs warning
bug: https://bugs.gentoo.org/show_bug.cgi?id=633360
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index 0d17f0e8894..2d2293456f9 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -224,10 +224,12 @@ pkg_postinst() {
if use kernel_linux; then
mkdir -p "${EROOT}"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
+ local found
+ while read -r _ mountpoint fstype _; do
+ [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+ done < "${ROOT}"proc/mounts
+ [[ -z ${found} ]] &&
+ ewarn "You should reboot now to get /run mounted with tmpfs!"
fi
for x in ${REPLACING_VERSIONS}; do
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-10-03 15:48 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-10-03 15:48 UTC (permalink / raw
To: gentoo-commits
commit: 0428a1d11b1567e89d223c2a2e0c96313ae22c8b
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 3 15:45:12 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 3 15:45:12 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0428a1d1
sys-apps/baselayout: remove unstable version
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sys-apps/baselayout/baselayout-2.4.1-r1.ebuild | 256 -------------------------
1 file changed, 256 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
deleted file mode 100644
index edb3c393e38..00000000000
--- a/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils multilib versionator
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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_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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- 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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- default
- if use prefix; then
- sed -i -r\
- -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
- -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
- -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
- -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
- etc/profile || die
- sed -i -r \
- -e "s@:/bin@:${EPREFIX}/bin@g" \
- -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
- -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
- etc/env.d/50baselayout || die
- sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
- sed -i -r \
- -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
- share.Linux/passwd || die
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
- find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"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
-
- for x in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 2.4 ${v}; then
- ewarn "After updating ${EROOT}etc/profile, please run"
- ewarn "env-update and . /etc/profile"
- break
- fi
- done
-
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
- ewarn "Please migrate your changes."
- fi
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-10-02 18:28 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-10-02 18:28 UTC (permalink / raw
To: gentoo-commits
commit: a1b8ada17067e903e4544b109c699617e9b678ce
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 2 18:27:06 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Oct 2 18:28:02 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b8ada1
sys-apps/baselayout: stabilize 2.4.1-r2 for #631510
Package-Manager: Portage-2.3.8, Repoman-2.3.1
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
index a535d30248a..0d17f0e8894 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-09-04 6:27 Benda XU
0 siblings, 0 replies; 124+ messages in thread
From: Benda XU @ 2017-09-04 6:27 UTC (permalink / raw
To: gentoo-commits
commit: d129d916465c0ddb7a67f12c3e928be4a25da214
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 4 06:16:45 2017 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Mon Sep 4 06:27:34 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d129d916
sys-apps/baselayout: handle Prefix-related paths more robustly.
commit 6d45b94abca08b1c124e11 fails with a corner case that EPREFIX
contains substring /usr. This commit fix it by using the well tested
hprefixify from prefix.eclass.
Also apply hprefix to other files to simplify the ebuild. Tested on
both Prefix and vanilla Gentoo.
Move the host PATHs to /etc/env.d/99host.
For Prefix, ROOTPATH will always be used, because it is almost a single
user system.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 245 +++++++++++++++++++++++++
1 file changed, 245 insertions(+)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
new file mode 100644
index 00000000000..a535d30248a
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator prefix
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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_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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ 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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
+ hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
+ echo PATH=/usr/bin:/bin >> etc/env.d/99host
+ echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"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
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.4 ${v}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update and . /etc/profile"
+ break
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-08-09 18:59 Tim Harder
0 siblings, 0 replies; 124+ messages in thread
From: Tim Harder @ 2017-08-09 18:59 UTC (permalink / raw
To: gentoo-commits
commit: 2abe351d0a4cd318ac47cc3a150b5e930f0f1559
Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 9 18:35:20 2017 +0000
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Wed Aug 9 18:58:52 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2abe351d
sys-apps/baselayout: fix version_is_at_least function typo
sys-apps/baselayout/baselayout-2.4.1-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
index e0b71bd2af4..edb3c393e38 100644
--- a/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
@@ -242,7 +242,7 @@ pkg_postinst() {
fi
for x in ${REPLACING_VERSIONS}; do
- if ! xersion_is_at_least 2.4 ${v}; then
+ if ! version_is_at_least 2.4 ${v}; then
ewarn "After updating ${EROOT}etc/profile, please run"
ewarn "env-update and . /etc/profile"
break
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-08-09 9:19 Guilherme Amadio
0 siblings, 0 replies; 124+ messages in thread
From: Guilherme Amadio @ 2017-08-09 9:19 UTC (permalink / raw
To: gentoo-commits
commit: 6d45b94abca08b1c124e1125375d1c86702fa14b
Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 9 09:10:43 2017 +0000
Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Wed Aug 9 09:19:12 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d45b94a
sys-apps/baselayout: add ${EPREFIX}/bin to $PATH on prefix
Fixes: https://bugs.gentoo.org/624522
Package-Manager: Portage-2.3.6, Repoman-2.3.3
.../baselayout/{baselayout-2.4.1.ebuild => baselayout-2.4.1-r1.ebuild} | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-apps/baselayout/baselayout-2.4.1.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
similarity index 99%
rename from sys-apps/baselayout/baselayout-2.4.1.ebuild
rename to sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
index 0c2d7de0cd4..e0b71bd2af4 100644
--- a/sys-apps/baselayout/baselayout-2.4.1.ebuild
+++ b/sys-apps/baselayout/baselayout-2.4.1-r1.ebuild
@@ -144,6 +144,7 @@ src_prepare() {
-e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
etc/profile || die
sed -i -r \
+ -e "s@:/bin@:${EPREFIX}/bin@g" \
-e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
-e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
etc/env.d/50baselayout || die
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-06-09 18:44 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2017-06-09 18:44 UTC (permalink / raw
To: gentoo-commits
commit: a8ee28f007b715efe658d1cf8a3656dd9055265d
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 9 18:42:31 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jun 9 18:42:51 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8ee28f0
sys-apps/baselayout: 2.4.1 version bump
Package-Manager: Portage-2.3.5, Repoman-2.3.1
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.4.1.ebuild | 255 ++++++++++++++++++++++++++++
2 files changed, 256 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 46912af538f..fff04068279 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
DIST baselayout-2.3.tar.bz2 32266 SHA256 e7bbd7d71ede6820a37738fd2e9010d54545fbd73c16ee686663dee2075c5d4c SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb WHIRLPOOL 92e88f5ff0eddd56698977bb6578ee53f62755bfdd9023fc7151415fce4a87952b539e0da3a7056a0f90c668a5a1c4fe2b43af0359fe9c40b4dc7b50568711d7
+DIST baselayout-2.4.1.tar.bz2 31307 SHA256 d75ae329ba47f26e7c41c6e060f57a8f1f1a97420d39e6a49ab2bdb86c4a2c00 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1 WHIRLPOOL 9057ab259c8ef61bb56d13b237e343f6a7aec8fef61a0a9872fc7e0aa34a7dc772cd4701a76341d170eaa3ba328ad0b693d098189ca7f4aa9e5e32232f1d1801
diff --git a/sys-apps/baselayout/baselayout-2.4.1.ebuild b/sys-apps/baselayout/baselayout-2.4.1.ebuild
new file mode 100644
index 00000000000..0c2d7de0cd4
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.4.1.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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_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[@]}" ; 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 "${EROOT}"{,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" ] && ! has lib32 ${libdirs} ; 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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ 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}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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ default
+ if use prefix; then
+ sed -i -r\
+ -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
+ -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
+ etc/profile || die
+ sed -i -r \
+ -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
+ etc/env.d/50baselayout || die
+ sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
+ sed -i -r \
+ -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
+ share.Linux/passwd || die
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"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
+
+ for x in ${REPLACING_VERSIONS}; do
+ if ! xersion_is_at_least 2.4 ${v}; then
+ ewarn "After updating ${EROOT}etc/profile, please run"
+ ewarn "env-update and . /etc/profile"
+ break
+ fi
+ done
+
+ if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
+ ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
+ ewarn "Please migrate your changes."
+ fi
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-01-20 16:14 Mike Frysinger
0 siblings, 0 replies; 124+ messages in thread
From: Mike Frysinger @ 2017-01-20 16:14 UTC (permalink / raw
To: gentoo-commits
commit: d8b95cc8fb5ea6e5f58e9762d0cb7d88a7e674e2
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 16:14:14 2017 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jan 20 16:14:28 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b95cc8
sys-apps/baselayout: mark 2.3 arm64/m68k/s390/sh stable
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index da18064..7e9b9de 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2017-01-17 16:23 Lars Wendler
0 siblings, 0 replies; 124+ messages in thread
From: Lars Wendler @ 2017-01-17 16:23 UTC (permalink / raw
To: gentoo-commits
commit: 164744dafee63612ffb7dc4abb177fb79f338de9
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 16:12:39 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 16:23:43 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=164744da
sys-apps/baselayout: Removed old.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
sys-apps/baselayout/Manifest | 1 -
sys-apps/baselayout/baselayout-2.2-r1.ebuild | 256 ---------------------------
sys-apps/baselayout/baselayout-2.2.ebuild | 234 ------------------------
3 files changed, 491 deletions(-)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 93b99ea..46912af 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1,2 +1 @@
-DIST baselayout-2.2.tar.bz2 40744 SHA256 11d4a223b06da545c3e59e07c9195570f334b5b1be05d995df0ebc8ea2203e98 SHA512 a5199c42e835d9f2683cc94f3c4c47ecdc392316c24e0932845736e2e90479b0c5c8ad72ead8e0537f097405b7d7548d00b87b7ff8c9e3651486e3c5c0970b36 WHIRLPOOL 60cc4f7f76c5a45c15303e526decffb3bad2b50ac659b1dd072d2ed4b0eb0b31929a1a733ddb03a31ee5882b889a4efb87206f63ffaa2b11e26d36afd0933a95
DIST baselayout-2.3.tar.bz2 32266 SHA256 e7bbd7d71ede6820a37738fd2e9010d54545fbd73c16ee686663dee2075c5d4c SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb WHIRLPOOL 92e88f5ff0eddd56698977bb6578ee53f62755bfdd9023fc7151415fce4a87952b539e0da3a7056a0f90c668a5a1c4fe2b43af0359fe9c40b4dc7b50568711d7
diff --git a/sys-apps/baselayout/baselayout-2.2-r1.ebuild b/sys-apps/baselayout/baselayout-2.2-r1.ebuild
deleted file mode 100644
index 11326dc..00000000
--- a/sys-apps/baselayout/baselayout-2.2-r1.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils multilib
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-SRC_URI="mirror://gentoo/${P}.tar.bz2
- https://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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[@]}" ; 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 "${EROOT}"{,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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- 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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
- fi
- rm -f "${ED}"/usr/share/${PN}/Makefile
-}
-
-src_prepare() {
- if use prefix; then
- sed -i -r\
- -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
- -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
- -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
- -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
- etc/profile || die
- sed -i -r \
- -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
- -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
- etc/env.d/00basic || die
- sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
- sed -i -r \
- -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
- share.Linux/passwd || die
- fi
-
- # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
- ldpaths+=":${EPREFIX}/usr/local/${libdir}"
- done
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
-
- # rc-scripts version for testing of features that *should* be present
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release
-}
-
-src_install() {
- emake \
- OS=$(usex kernel_FreeBSD BSD Linux) \
- DESTDIR="${ED}" \
- install
- dodoc ChangeLog.svn
-
- # need the makefile in pkg_preinst
- insinto /usr/share/${PN}
- doins Makefile
-}
-
-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 "${EROOT}etc/${x}" ] && continue
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
- done
-
- # Force shadow permissions to not be world-readable #260993
- for x in shadow ; do
- [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
- done
-
- # 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
-
- # whine about users that lack passwords #193541
- if [[ -e "${EROOT}"etc/shadow ]] ; then
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
- find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
-
- # whine about users with invalid shells #215698
- if [[ -e "${EROOT}"etc/passwd ]] ; then
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
- if [[ -n ${bad_shells} ]] ; then
- echo
- ewarn "The following users have non-existent shells!"
- ewarn "${bad_shells}"
- fi
- fi
-
- # https://bugs.gentoo.org/361349
- if use kernel_linux; then
- mkdir -p "${EROOT}"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
deleted file mode 100644
index 44077db..00000000
--- a/sys-apps/baselayout/baselayout-2.2.ebuild
+++ /dev/null
@@ -1,234 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils multilib
-
-DESCRIPTION="Filesystem baselayout and init scripts"
-HOMEPAGE="https://www.gentoo.org/"
-SRC_URI="mirror://gentoo/${P}.tar.bz2
- https://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 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
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
- 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
-}
-
-src_install() {
- 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
-}
-
-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
-
- # https://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
-}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-12-21 11:23 Thomas Deutschmann
0 siblings, 0 replies; 124+ messages in thread
From: Thomas Deutschmann @ 2016-12-21 11:23 UTC (permalink / raw
To: gentoo-commits
commit: b655dc16e14f6b78b7c49ac026f8bf74ea5ca22b
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 11:16:57 2016 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 11:23:40 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b655dc16
sys-apps/baselayout: x86 stable (bug #596104)
Package-Manager: Portage-2.3.2, Repoman-2.3.1
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index c2360c8..72e59e4 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-12-17 10:15 Aaron Bauman
0 siblings, 0 replies; 124+ messages in thread
From: Aaron Bauman @ 2016-12-17 10:15 UTC (permalink / raw
To: gentoo-commits
commit: 67f31b756f39668613479436e9ff3ed317296fc6
Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 17 10:14:50 2016 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sat Dec 17 10:14:50 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f31b75
sys-apps/baselayout: amd64 stable wrt bug #596104
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index 9deac63..c2360c8 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha ~amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-10-26 16:44 Markus Meier
0 siblings, 0 replies; 124+ messages in thread
From: Markus Meier @ 2016-10-26 16:44 UTC (permalink / raw
To: gentoo-commits
commit: 9cebd152cee3212ef5f6b8b7ef51d002cdc322de
Author: Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 26 16:44:12 2016 +0000
Commit: Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Oct 26 16:44:12 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cebd152
sys-apps/baselayout: arm stable, bug #596104
Package-Manager: portage-2.3.2
RepoMan-Options: --include-arches="arm"
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index 4609067..9deac63 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha ~amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-10-12 10:08 Jeroen Roovers
0 siblings, 0 replies; 124+ messages in thread
From: Jeroen Roovers @ 2016-10-12 10:08 UTC (permalink / raw
To: gentoo-commits
commit: 260ff77c5c3ba7cce098e62f935cba84051dce96
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 12 10:07:48 2016 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 10:08:06 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=260ff77c
sys-apps/baselayout: Stable for HPPA PPC64 (bug #596104).
Package-Manager: portage-2.3.2
RepoMan-Options: --ignore-arches
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index db61e23..4609067 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-10-04 7:37 Tobias Klausmann
0 siblings, 0 replies; 124+ messages in thread
From: Tobias Klausmann @ 2016-10-04 7:37 UTC (permalink / raw
To: gentoo-commits
commit: bd7b1acf1017f5a61fbdd95852c93f60f4adea2e
Author: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 4 07:36:53 2016 +0000
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Tue Oct 4 07:36:53 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd7b1acf
sys-apps/baselayout-2.3-r0: stable on alpha
Gentoo-Bug: 596104
sys-apps/baselayout/baselayout-2.3.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index d3d1351..db61e23 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux"
pkg_setup() {
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-09-03 11:06 Michał Górny
0 siblings, 0 replies; 124+ messages in thread
From: Michał Górny @ 2016-09-03 11:06 UTC (permalink / raw
To: gentoo-commits
commit: 5a5c86a41bc4e4ae8e367dd4407116f44d8d6e89
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 3 10:43:27 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 3 11:05:57 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a5c86a4
sys-apps/baselayout: Fix SYMLINK_LIB=no to create lib dir instead of sym
Fix the 'else' branch of SYMLINK_LIB=no code to create 'lib' as
a directory rather than a symlink.
sys-apps/baselayout/baselayout-2.3.ebuild | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
index 5c4e7c1..b4e82d2 100644
--- a/sys-apps/baselayout/baselayout-2.3.ebuild
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -106,9 +106,7 @@ multilib_layout() {
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
+ mkdir -p "${prefix}lib" || die
fi
fi
done
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-09-01 21:44 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2016-09-01 21:44 UTC (permalink / raw
To: gentoo-commits
commit: 78f20d7454dfae84fb38f8d53f1366b3c47fcf59
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 1 21:44:00 2016 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep 1 21:44:25 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78f20d74
sys-apps/baselayout: 2.3 version bump
Package-Manager: portage-2.2.28
sys-apps/baselayout/Manifest | 1 +
sys-apps/baselayout/baselayout-2.3.ebuild | 244 ++++++++++++++++++++++++++++++
2 files changed, 245 insertions(+)
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
index 1951dcd..93b99ea 100644
--- a/sys-apps/baselayout/Manifest
+++ b/sys-apps/baselayout/Manifest
@@ -1 +1,2 @@
DIST baselayout-2.2.tar.bz2 40744 SHA256 11d4a223b06da545c3e59e07c9195570f334b5b1be05d995df0ebc8ea2203e98 SHA512 a5199c42e835d9f2683cc94f3c4c47ecdc392316c24e0932845736e2e90479b0c5c8ad72ead8e0537f097405b7d7548d00b87b7ff8c9e3651486e3c5c0970b36 WHIRLPOOL 60cc4f7f76c5a45c15303e526decffb3bad2b50ac659b1dd072d2ed4b0eb0b31929a1a733ddb03a31ee5882b889a4efb87206f63ffaa2b11e26d36afd0933a95
+DIST baselayout-2.3.tar.bz2 32266 SHA256 e7bbd7d71ede6820a37738fd2e9010d54545fbd73c16ee686663dee2075c5d4c SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb WHIRLPOOL 92e88f5ff0eddd56698977bb6578ee53f62755bfdd9023fc7151415fce4a87952b539e0da3a7056a0f90c668a5a1c4fe2b43af0359fe9c40b4dc7b50568711d7
diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
new file mode 100644
index 00000000..5c4e7c1
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.3.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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_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[@]}" ; 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 "${EROOT}"{,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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ 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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ if use prefix; then
+ sed -i -r\
+ -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
+ -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
+ etc/profile || die
+ sed -i -r \
+ -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
+ etc/env.d/00basic || die
+ sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
+ sed -i -r \
+ -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
+ share.Linux/passwd || die
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"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
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-08-24 1:26 William Hubbs
0 siblings, 0 replies; 124+ messages in thread
From: William Hubbs @ 2016-08-24 1:26 UTC (permalink / raw
To: gentoo-commits
commit: afea0959d189ad8ce9467fb2f51e8153e343570d
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 24 01:25:32 2016 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug 24 01:25:32 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afea0959
sys-apps/baselayout: add myself as maintainer
Package-Manager: portage-2.2.28
sys-apps/baselayout/metadata.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys-apps/baselayout/metadata.xml b/sys-apps/baselayout/metadata.xml
index 56c1244..53e0495 100644
--- a/sys-apps/baselayout/metadata.xml
+++ b/sys-apps/baselayout/metadata.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+<maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
^ permalink raw reply related [flat|nested] 124+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
@ 2016-06-30 3:00 Benda XU
0 siblings, 0 replies; 124+ messages in thread
From: Benda XU @ 2016-06-30 3:00 UTC (permalink / raw
To: gentoo-commits
commit: 699111703bfe3cd30c28d54025ab7515e79c0e85
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 03:00:23 2016 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 03:00:44 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69911170
sys-apps/baselayout: revision bump to have EAPI=5 and support Prefix.
Bug: 532050
Package-Manager: portage-2.2.28
sys-apps/baselayout/baselayout-2.2-r1.ebuild | 256 +++++++++++++++++++++++++++
1 file changed, 256 insertions(+)
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 0000000..11326dc
--- /dev/null
+++ b/sys-apps/baselayout/baselayout-2.2-r1.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Filesystem baselayout and init scripts"
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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[@]}" ; 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 "${EROOT}"{,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
+ *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
+ 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 "${EROOT}"/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 "${EROOT}"/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 "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
+ fi
+ rm -f "${ED}"/usr/share/${PN}/Makefile
+}
+
+src_prepare() {
+ if use prefix; then
+ sed -i -r\
+ -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
+ -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
+ etc/profile || die
+ sed -i -r \
+ -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
+ etc/env.d/00basic || die
+ sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
+ sed -i -r \
+ -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
+ share.Linux/passwd || die
+ fi
+
+ # 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+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
+ ldpaths+=":${EPREFIX}/usr/local/${libdir}"
+ done
+ echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
+
+ # rc-scripts version for testing of features that *should* be present
+ echo "Gentoo Base System release ${PV}" > etc/gentoo-release
+}
+
+src_install() {
+ emake \
+ OS=$(usex kernel_FreeBSD BSD Linux) \
+ DESTDIR="${ED}" \
+ install
+ dodoc ChangeLog.svn
+
+ # need the makefile in pkg_preinst
+ insinto /usr/share/${PN}
+ doins Makefile
+}
+
+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 "${EROOT}etc/${x}" ] && continue
+ [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
+ cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
+ done
+
+ # Force shadow permissions to not be world-readable #260993
+ for x in shadow ; do
+ [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
+ done
+
+ # 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
+
+ # whine about users that lack passwords #193541
+ if [[ -e "${EROOT}"etc/shadow ]] ; then
+ local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/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 "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
+ find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
+
+ # whine about users with invalid shells #215698
+ if [[ -e "${EROOT}"etc/passwd ]] ; then
+ local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
+ if [[ -n ${bad_shells} ]] ; then
+ echo
+ ewarn "The following users have non-existent shells!"
+ ewarn "${bad_shells}"
+ fi
+ fi
+
+ # https://bugs.gentoo.org/361349
+ if use kernel_linux; then
+ mkdir -p "${EROOT}"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
+}
^ permalink raw reply related [flat|nested] 124+ messages in thread
end of thread, other threads:[~2024-11-04 19:54 UTC | newest]
Thread overview: 124+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03 11:06 [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2024-11-04 19:54 Mike Gilbert
2024-11-04 19:52 Mike Gilbert
2024-11-03 23:37 Mike Gilbert
2024-04-30 18:52 Arthur Zamarin
2024-03-12 1:43 Mike Gilbert
2024-02-15 21:17 William Hubbs
2024-02-09 12:18 Andreas K. Hüttel
2024-02-08 17:37 Mike Gilbert
2023-12-15 7:14 Sam James
2023-11-12 10:38 Fabian Groffen
2023-08-22 16:09 William Hubbs
2023-08-22 16:09 William Hubbs
2023-08-21 22:47 William Hubbs
2023-08-19 6:23 Sam James
2023-07-18 22:41 Sam James
2023-07-18 22:41 Sam James
2023-07-18 22:41 Sam James
2023-07-09 1:32 Mike Gilbert
2023-07-09 1:32 Mike Gilbert
2023-07-05 0:41 Mike Gilbert
2023-03-04 5:34 Arthur Zamarin
2023-01-29 0:10 William Hubbs
2023-01-29 0:10 William Hubbs
2023-01-28 22:14 William Hubbs
2023-01-28 22:14 William Hubbs
2023-01-28 22:06 William Hubbs
2023-01-28 22:06 William Hubbs
2023-01-28 21:00 Mike Gilbert
2023-01-28 2:17 Mike Gilbert
2023-01-28 0:38 Mike Gilbert
2023-01-28 0:20 William Hubbs
2023-01-28 0:08 William Hubbs
2023-01-27 22:38 Mike Gilbert
2023-01-27 21:47 William Hubbs
2023-01-27 18:21 William Hubbs
2023-01-27 18:19 William Hubbs
2023-01-27 17:30 William Hubbs
2023-01-26 3:51 William Hubbs
2023-01-26 0:13 William Hubbs
2023-01-24 22:58 Andreas K. Hüttel
2023-01-04 6:37 William Hubbs
2023-01-04 6:21 William Hubbs
2022-11-14 21:03 Mike Gilbert
2022-11-14 20:26 Arthur Zamarin
2022-09-18 21:50 William Hubbs
2022-09-18 3:12 Mike Gilbert
2022-07-17 15:50 Fabian Groffen
2022-07-14 19:30 Fabian Groffen
2022-05-28 21:01 William Hubbs
2022-05-28 20:59 Jakov Smolić
2022-01-04 10:30 David Seifert
2022-01-04 3:29 Sam James
2021-11-15 9:27 Jakov Smolić
2021-09-29 0:19 William Hubbs
2021-09-28 17:59 William Hubbs
2021-09-27 22:09 William Hubbs
2021-09-27 20:58 William Hubbs
2021-09-27 20:38 William Hubbs
2021-09-27 20:10 William Hubbs
2021-09-27 18:28 William Hubbs
2021-09-25 22:37 William Hubbs
2021-09-24 23:15 William Hubbs
2021-09-24 21:16 William Hubbs
2021-09-24 19:11 William Hubbs
2021-06-12 19:43 Andreas K. Hüttel
2021-05-12 20:11 William Hubbs
2021-04-16 16:38 William Hubbs
2021-04-16 16:26 William Hubbs
2020-11-14 17:07 William Hubbs
2020-08-30 21:59 Sam James
2020-08-30 21:51 Sam James
2020-08-20 15:28 William Hubbs
2020-08-20 14:51 William Hubbs
2020-08-20 14:47 William Hubbs
2020-02-17 2:39 William Hubbs
2020-02-10 4:31 William Hubbs
2020-02-10 4:31 William Hubbs
2020-02-08 14:18 David Seifert
2019-10-16 18:29 William Hubbs
2019-05-04 18:36 Mikle Kolyada
2019-03-03 18:54 William Hubbs
2018-11-30 12:14 Jeroen Roovers
2018-11-12 11:13 Lars Wendler
2018-11-08 0:15 William Hubbs
2018-07-25 16:36 William Hubbs
2018-07-22 16:47 William Hubbs
2018-05-31 20:03 William Hubbs
2018-05-29 0:53 William Hubbs
2018-05-28 20:19 William Hubbs
2018-05-28 20:14 William Hubbs
2018-05-24 17:13 William Hubbs
2018-05-24 15:49 William Hubbs
2018-05-24 3:36 William Hubbs
2018-05-23 22:06 William Hubbs
2018-05-23 21:28 William Hubbs
2018-03-20 21:24 William Hubbs
2018-03-19 18:46 William Hubbs
2018-02-07 19:51 William Hubbs
2018-02-07 0:20 William Hubbs
2018-02-06 18:57 William Hubbs
2018-01-12 4:19 Mike Frysinger
2017-12-10 21:41 Michał Górny
2017-11-17 22:23 William Hubbs
2017-10-06 19:02 William Hubbs
2017-10-03 18:00 William Hubbs
2017-10-03 17:50 William Hubbs
2017-10-03 15:48 William Hubbs
2017-10-02 18:28 William Hubbs
2017-09-04 6:27 Benda XU
2017-08-09 18:59 Tim Harder
2017-08-09 9:19 Guilherme Amadio
2017-06-09 18:44 William Hubbs
2017-01-20 16:14 Mike Frysinger
2017-01-17 16:23 Lars Wendler
2016-12-21 11:23 Thomas Deutschmann
2016-12-17 10:15 Aaron Bauman
2016-10-26 16:44 Markus Meier
2016-10-12 10:08 Jeroen Roovers
2016-10-04 7:37 Tobias Klausmann
2016-09-03 11:06 Michał Górny
2016-09-01 21:44 William Hubbs
2016-08-24 1:26 William Hubbs
2016-06-30 3:00 Benda XU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox