diff options
Diffstat (limited to 'sys-libs/musl')
-rw-r--r-- | sys-libs/musl/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.5-r3.ebuild | 47 | ||||
-rw-r--r-- | sys-libs/musl/musl-9999.ebuild | 47 |
3 files changed, 96 insertions, 2 deletions
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index b1110f61ce93..361b3a478be4 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -15,6 +15,6 @@ DIST musl-1.2.5.tar.gz.asc 490 BLAKE2B f0d91b20aa7729449bd02a60adf17e8287904ed59 DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee EBUILD musl-1.2.3-r10.ebuild 6111 BLAKE2B 66d292f541e7abfd078d0da6ae93171fb1f5dffe268c8ac327b8b062977ef58cf1add13c0cda4a7b4ebd418eda0c7d9a02174cfc5aed5f3509c8e8eacd6413a6 SHA512 935163d61343ea86335b7f5ad23c5541ba9639b9850b4e5bae4352b487bfa34455946583c183ef317b7ef083798a3ae0fdca84cb375138d8f09de0945b8a07b5 EBUILD musl-1.2.4-r4.ebuild 5943 BLAKE2B d6fcc42fee43d5928d8dd7ea841744c14657b63d6f982b6876c778e4953b42d5a50482dd314589f3910fb68ec34a03560462cb62509b3372257e2ea308115080 SHA512 64468d66643d4bc569a6a962fdabc55529918d71a8e4565febfb5e77a78edffb900f555a71962800c43794208dd75ca3376ef0f7f7f65498a0140fd18f09d6b3 -EBUILD musl-1.2.5-r3.ebuild 5918 BLAKE2B 98d6999e70c9a3c2dba987686833cf177d66930b97efc12458f493b8af5c93fd03bb2a41380ceeedbd27125d59319ba87ea32cda7e3fb9be00b19d528b4a0f62 SHA512 c2bd8ee788a808da547cccfdbdb1476c320e30c5dbbea5bc6f0f4a65fdb0fdc4e9447fd7d0da2a8bfa38c079df5fd20ce7248be81ded5a6e4c9a71ab007d2f07 -EBUILD musl-9999.ebuild 5745 BLAKE2B 6aa474780470f516baaad52d2d6cd01a4bca6ba9f5278b734c571cf4f74024eeaa3fa4f991a354f8cc1fd159ab3cbc589fae1a24e036cede7f42e24a44dc7aa2 SHA512 80d9fa556ba779f1de8f0b3713ec10887e54f8062183278def72fc947f48ec46e31da790cba237d150bd058af238ade656b74470d1b5824bc2161fee47f4fe25 +EBUILD musl-1.2.5-r3.ebuild 7598 BLAKE2B 1cc9a02c8e9737844fec38b4f0aa5ef1a68706f0525a3be705ebb6058a01a0e0d4469fb3e77ab35343fc52f992705a20cb6c2dc46b5fbf7345971ae0ce30e0be SHA512 cc4b0c32d6c4a565b25f474be6289c47542ed8e589ca881926dfc0d5914c688dd6eb78b46b564b894a760981496afde95f124f63006099494ed7f126ad4f8330 +EBUILD musl-9999.ebuild 7425 BLAKE2B 488533ae625c3abfa1a68722e25df73ef27966e0405f07f2b88e93f45d9b4ac126c87d78217805e066dd8139c0827d73bf39e21e671f4a63908d9b831da2f6f1 SHA512 a134500e9bf510b08e56eea17672c066fa48504e633a6c444a0d57ebba8b9ed391d6022e73e315d2b0ba428ba610eba991b432b18ee853ad10e5cb96a8b17329 MISC metadata.xml 559 BLAKE2B 8b1093a5278f716b8e21467b325e373a790f54c8ab71b92adc4c87dd569a92b20e08009372065f0f27ced39e3361c9e5e5a2e1bff271753d280439fabbddd3a4 SHA512 a35c13ea32ac8f26984bdb0d70d28a4285f34e32a2b0b17ad98fe3f357fb46c87a1e853377630d4da58fd5953de3fdeb02ee89181394e1815f5e0bbba4cd9f92 diff --git a/sys-libs/musl/musl-1.2.5-r3.ebuild b/sys-libs/musl/musl-1.2.5-r3.ebuild index 559077077d00..90e86cef2f07 100644 --- a/sys-libs/musl/musl-1.2.5-r3.ebuild +++ b/sys-libs/musl/musl-1.2.5-r3.ebuild @@ -193,12 +193,59 @@ src_install() { fi } +# Simple test to make sure our new musl isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this musl is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +musl_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/usr/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'libc.so' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /usr/$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + pkg_preinst() { # Nothing to do if just installing headers just_headers && return # Prepare /etc/ld.so.conf.d/ for files mkdir -p "${EROOT}"/etc/ld.so.conf.d + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + musl_sanity_check } pkg_postinst() { diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild index 3839dbffc355..bd3a60ef270f 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -187,12 +187,59 @@ src_install() { fi } +# Simple test to make sure our new musl isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this musl is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +musl_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/usr/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'libc.so' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /usr/$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + pkg_preinst() { # Nothing to do if just installing headers just_headers && return # Prepare /etc/ld.so.conf.d/ for files mkdir -p "${EROOT}"/etc/ld.so.conf.d + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + musl_sanity_check } pkg_postinst() { |