sys-libs/musl: add warning to /etc/env.d/00musl

env-update relies on this entry (which populates LDPATH) to look in
/etc/ld.so.conf.d/* which is needed to find GCC libraries.

Add a header reading the following:
> 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.

Prompted by a case on IRC where a user overwrote the file when following
a wiki page, see:
* https://wiki.gentoo.org/index.php?title=Musl_usage_guide&diff=1310555&oldid=1303905
* https://wiki.gentoo.org/index.php?title=Musl_usage_guide&diff=1331398&oldid=1310555
* https://wiki.gentoo.org/index.php?title=Musl_usage_guide&diff=1331399&oldid=1331398

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-01-12 11:22:57 +00:00
parent 7fd48bdf0f
commit b4e71be10e
5 changed files with 24 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -183,8 +183,10 @@ src_install() {
dobin "${T}"/getconf
dobin "${T}"/getent
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
newenvd - "00musl" <<-EOF
# 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
LDPATH="include ld.so.conf.d/*.conf"
EOF
fi
if is_crosscompile ; then

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -175,8 +175,10 @@ src_install() {
dobin "${T}"/getconf
dobin "${T}"/getent
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
newenvd - "00musl" <<-EOF
# 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
LDPATH="include ld.so.conf.d/*.conf"
EOF
fi
if target_is_not_host ; then

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -176,8 +176,10 @@ src_install() {
dobin "${T}"/getconf
dobin "${T}"/getent
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
newenvd - "00musl" <<-EOF
# 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
LDPATH="include ld.so.conf.d/*.conf"
EOF
fi
if target_is_not_host ; then

View File

@@ -177,8 +177,10 @@ src_install() {
dobin "${T}"/getconf
dobin "${T}"/getent
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
newenvd - "00musl" <<-EOF
# 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
LDPATH="include ld.so.conf.d/*.conf"
EOF
fi
if target_is_not_host ; then

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -173,8 +173,10 @@ src_install() {
dobin "${T}"/getconf
dobin "${T}"/getent
dobin "${T}"/iconv
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
doenvd "${T}"/00musl
newenvd - "00musl" <<-EOF
# 00musl autogenerated by sys-libs/musl ebuild; DO NOT EDIT.
LDPATH="include ld.so.conf.d/*.conf"
EOF
fi
if target_is_not_host ; then