From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6034D1382C5 for ; Sat, 12 Jun 2021 19:43:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF448E0833; Sat, 12 Jun 2021 19:43:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 81781E0833 for ; Sat, 12 Jun 2021 19:43:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E683C33BE23 for ; Sat, 12 Jun 2021 19:43:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 47B5C7A5 for ; Sat, 12 Jun 2021 19:43:02 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1623526972.e5779ed450cb40d944b013b1257a385714544d0c.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/baselayout/baselayout-2.7-r3.ebuild sys-apps/baselayout/baselayout-9999.ebuild X-VCS-Directories: sys-apps/baselayout/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: e5779ed450cb40d944b013b1257a385714544d0c X-VCS-Branch: master Date: Sat, 12 Jun 2021 19:43:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 02f9f9ff-3856-4bb0-8544-378e5e684d86 X-Archives-Hash: b415f9ddeeaabf6fd5f50d73d3d534c5 commit: e5779ed450cb40d944b013b1257a385714544d0c Author: Andreas K. Hüttel gentoo org> AuthorDate: Sat Jun 12 19:40:39 2021 +0000 Commit: Andreas K. Hüttel gentoo 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 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"