Skip to content

Commit

Permalink
Fixed linking in APK build
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Mar 5, 2024
1 parent 87c3f93 commit 61e379f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docker/glibc-package/scripts/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,24 @@ source="glibc-bin.tar.gz
ld.so.conf"
subpackages="${pkgname}-bin ${pkgname}-dev"
triggers="glibc-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"
depends="gcompat libuuid"
depends="libuuid libgcc"

package() {
mkdir -p $pkgdir/lib $pkgdir/usr/glibc-compat/lib/locale $pkgdir/usr/glibc-compat/lib64 $pkgdir/etc $pkgdir/usr/glibc-compat/etc/
cp -a $srcdir/usr $pkgdir
cp $srcdir/ld.so.conf $pkgdir/usr/glibc-compat/etc/ld.so.conf
cd $pkgdir/usr/glibc-compat
rm -rf etc/rpc bin sbin lib/gconv lib/getconf lib/audit share var include
ln -s /usr/glibc-compat/lib/ld-linux-$(uname -m).so.1 $pkgdir/lib
ln -s /usr/glibc-compat/lib/ld-linux-$(uname -m).so.1 $pkgdir/usr/glibc-compat/lib64

FILENAME=$(ls $pkgdir/usr/glibc-compat/lib/ld-linux-*.so.*)
LIBNAME=$(basename $FILENAME)
ln -s /usr/glibc-compat/lib/$LIBNAME $pkgdir/lib/$LIBNAME
ln -s /usr/glibc-compat/lib/$LIBNAME $pkgdir/usr/glibc-compat/lib64/$LIBNAME
ln -s /usr/glibc-compat/etc/ld.so.cache $pkgdir/etc/ld.so.cache
}

bin() {
depends="$pkgname bash libc6-compat libgcc"
depends="$pkgname"
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
Expand Down
2 changes: 1 addition & 1 deletion docker/pulsar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RUN apk add --no-cache \

# Install GLibc compatibility library
COPY --from=glibc /root/packages /root/packages
RUN apk add --allow-untrusted --force-overwrite /root/packages/$(uname -m)/glibc-2.38-r0.apk /root/packages/$(uname -m)/glibc-bin-2.38-r0.apk
RUN apk add --allow-untrusted --force-overwrite /root/packages/$(uname -m)/glibc-2.38-r0.apk /root/packages/$(uname -m)/glibc-bin-2.38-r0.apk

COPY --from=jvm /opt/jvm /opt/jvm
ENV JAVA_HOME=/opt/jvm
Expand Down

0 comments on commit 61e379f

Please sign in to comment.