From 722f51dc57f569304055315000b87a391d43605d Mon Sep 17 00:00:00 2001 From: Andy Shinn Date: Fri, 12 Feb 2016 22:24:27 -0600 Subject: [PATCH] trigger ldconfig to regerenate ld.so.cache on lib dir changes related to #6 --- APKBUILD | 13 ++++++++----- glibc-bin.trigger | 2 ++ ld.so.conf | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100755 glibc-bin.trigger create mode 100644 ld.so.conf diff --git a/APKBUILD b/APKBUILD index 6706729..4508c88 100644 --- a/APKBUILD +++ b/APKBUILD @@ -3,20 +3,22 @@ pkgname="glibc" pkgver="2.22" _pkgrel="5" -pkgrel="7" +pkgrel="8" pkgdesc="GNU C Library compatibility layer" arch="x86_64" url="https://github.com/gliderlabs/alpine-glibc" license="GPL" source="https://github.com/andyshinn/docker-glibc-builder/releases/download/$pkgver-$_pkgrel/glibc-bin-$pkgver-$_pkgrel-x86_64.tar.gz -nsswitch.conf" +nsswitch.conf +ld.so.conf" subpackages="$pkgname-bin $pkgname-i18n" +triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib" package() { mkdir -p "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/etc cp -a "$srcdir"/usr "$pkgdir" cp "$srcdir"/nsswitch.conf "$pkgdir"/etc/nsswitch.conf - touch "$pkgdir"/usr/glibc-compat/etc/ld.so.conf + cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf rm "$pkgdir"/usr/glibc-compat/etc/rpc rm -rf "$pkgdir"/usr/glibc-compat/bin rm -rf "$pkgdir"/usr/glibc-compat/sbin @@ -31,7 +33,7 @@ package() { } bin() { - depends="$pkgname" + depends="$pkgname libgcc" mkdir -p "$subpkgdir"/usr/glibc-compat cp -a "$srcdir"/usr/glibc-compat/bin "$subpkgdir"/usr/glibc-compat cp -a "$srcdir"/usr/glibc-compat/sbin "$subpkgdir"/usr/glibc-compat @@ -45,4 +47,5 @@ i18n() { } md5sums="4f2ea9f8cc1be716479f831597a14682 glibc-bin-2.22-5-x86_64.tar.gz -5be984273de4203318c9c3fb0d4e9d2b nsswitch.conf" +5be984273de4203318c9c3fb0d4e9d2b nsswitch.conf +b4a846d17bde75e47976d972c4e067a5 ld.so.conf" diff --git a/glibc-bin.trigger b/glibc-bin.trigger new file mode 100755 index 0000000..051104b --- /dev/null +++ b/glibc-bin.trigger @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/glibc-compat/sbin/ldconfig diff --git a/ld.so.conf b/ld.so.conf new file mode 100644 index 0000000..39e4c82 --- /dev/null +++ b/ld.so.conf @@ -0,0 +1,3 @@ +/usr/glibc-compat/lib +/usr/lib +/lib