Skip to content

Commit

Permalink
Add a glibc-utils that can replace musl-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeShu authored and b01 committed Jun 4, 2024
1 parent e1bad3a commit 00157b0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ url="https://github.com/sgerrand/alpine-pkg-glibc"
license="LGPL"
source="https://github.com/sgerrand/docker-glibc-builder/releases/download/$pkgver-$_pkgrel/glibc-bin-$pkgver-$_pkgrel-x86_64.tar.gz
ld.so.conf"
subpackages="$pkgname-bin $pkgname-dev $pkgname-i18n"
subpackages="$pkgname-bin $pkgname-utils $pkgname-dev $pkgname-i18n"
triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"

package() {
Expand All @@ -35,6 +35,7 @@ package() {
}

bin() {
pkgdesc="executable programs that come with glibc, installed to /usr/glibc-compat/"
depends="$pkgname libgcc"
depends="$depends bash" # shebang for ldd, sotrus, tzselect, xtrace
depends="$depends perl" # shebang for mtrace
Expand All @@ -43,6 +44,19 @@ bin() {
cp -a "$srcdir"/usr/glibc-compat/sbin "$subpkgdir"/usr/glibc-compat
}

utils() {
pkgdesc="a replacement for musl-utils that uses the glibc versions of those utilities"
depends="$pkgname-bin"
provides="musl-utils"
conflicts="musl-utils"
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/sbin
ln -s /usr/glibc-compat/bin/getconf "$subpkgdir"/usr/bin
ln -s /usr/glibc-compat/bin/getent "$subpkgdir"/usr/bin
ln -s /usr/glibc-compat/bin/iconv "$subpkgdir"/usr/bin
ln -s /usr/glibc-compat/bin/ldd "$subpkgdir"/usr/bin
ln -s /usr/glibc-compat/sbin/ldconfig "$subpkgdir"/usr/sbin
}

i18n() {
depends="$pkgname-bin"
arch="noarch"
Expand Down

0 comments on commit 00157b0

Please sign in to comment.