From a9f6a86cbb0ea8bbd80b95a6b1d10ce11d3a37bc Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Mon, 28 Feb 2022 17:27:04 +0000 Subject: [PATCH 1/5] Update glibc to v2.35 --- APKBUILD | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/APKBUILD b/APKBUILD index 83372f4..fdda70f 100644 --- a/APKBUILD +++ b/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Sasha Gerrand pkgname="glibc" -pkgver="2.34" +pkgver="2.35" _pkgrel="0" pkgrel="0" pkgdesc="GNU C Library compatibility layer" @@ -47,6 +47,8 @@ i18n() { cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat } -sha512sums="77e772a8edd55812e94f99087ea2a2307ac48b09d58fe0bbcb41f9b9861ef3a15b177699e2e1fb7e49fdeb42c64c33b81c0fdf4d44e043cd9f54c72b93f40d98 glibc-bin-2.34-0-x86_64.tar.gz +sha512sums=" +0aff0ec76f4d341957a792b8635c0770148eba9a5cb64f9bbd85228c14d9cb93c1a402063cab533a9f536f5f7be92c27bc5be8ed13c2b4f7aa416510c754d071 glibc-bin-2.35-0-x86_64.tar.gz 478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf -2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf" +2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf +" From ddfe092f3d91c19f6cf8cb9f2938e088db4bfa8f Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Mon, 28 Feb 2022 17:28:07 +0000 Subject: [PATCH 2/5] Remove /lib64 reference to stop packaging errors Prevents the following error from being generated: >>> ERROR: glibc*: Packages must not put anything under /lib64, use /lib instead >>> ERROR: glibc*: prepare_subpackages failed >>> ERROR: glibc: rootpkg failed --- APKBUILD | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/APKBUILD b/APKBUILD index fdda70f..f9c89dd 100644 --- a/APKBUILD +++ b/APKBUILD @@ -15,7 +15,7 @@ subpackages="$pkgname-bin $pkgname-dev $pkgname-i18n" triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib" package() { - mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc + mkdir -p "$pkgdir/lib" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc cp -a "$srcdir"/usr "$pkgdir" cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf cp "$srcdir"/nsswitch.conf "$pkgdir"/etc/nsswitch.conf @@ -28,7 +28,6 @@ package() { rm -rf "$pkgdir"/usr/glibc-compat/share rm -rf "$pkgdir"/usr/glibc-compat/var ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib/ld-linux-x86-64.so.2 - ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib64/ld-linux-x86-64.so.2 ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/usr/glibc-compat/lib64/ld-linux-x86-64.so.2 ln -s /usr/glibc-compat/etc/ld.so.cache ${pkgdir}/etc/ld.so.cache } From 43f957a0eee4f104f258eae3c04c3c2928220809 Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Mon, 28 Feb 2022 17:29:24 +0000 Subject: [PATCH 3/5] Build and test with Alpine v3.15 --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bb710ad..4f790d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,9 +33,9 @@ jobs: - run: name: Create Docker volumes command: | - docker create --name input --volume /home/builder/package alpine:3.11 /bin/true + docker create --name input --volume /home/builder/package alpine:3.15 /bin/true docker cp . input:/home/builder/package/ - docker create --name output --volume /packages alpine:3.11 /bin/true + docker create --name output --volume /packages alpine:3.15 /bin/true docker cp sgerrand.rsa.pub output:/packages/ - run: name: Build packages @@ -45,13 +45,13 @@ jobs: --env RSA_PRIVATE_KEY_NAME="sgerrand.rsa" \ --volumes-from input \ --volumes-from output \ - sgerrand/alpine-abuild:3.11 + sgerrand/alpine-abuild:3.15 - run: name: Test package installation command: | docker run \ --volumes-from output \ - alpine:3.11 sh -c "cp /packages/sgerrand.rsa.pub /etc/apk/keys/ && apk -U add --no-progress --upgrade /packages/builder/x86_64/*.apk" + alpine:3.15 sh -c "cp /packages/sgerrand.rsa.pub /etc/apk/keys/ && apk -U add --no-progress --upgrade /packages/builder/x86_64/*.apk" - run: name: Extract packages command: | From 39878629cbf803bc70323f35dfeb674da9a5c0ac Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Mon, 14 Mar 2022 10:32:09 +0000 Subject: [PATCH 4/5] Add C library compatibility package to *-bin This package not being installed is a very common cause of reported user errors. --- APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APKBUILD b/APKBUILD index f9c89dd..0105a87 100644 --- a/APKBUILD +++ b/APKBUILD @@ -33,7 +33,7 @@ package() { } bin() { - depends="$pkgname libgcc" + depends="$pkgname libc6-compat 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 From ee7ffc8c1b683d1642e2e33bed80064399efe561 Mon Sep 17 00:00:00 2001 From: Sasha Gerrand Date: Mon, 14 Mar 2022 10:59:38 +0000 Subject: [PATCH 5/5] Add bash package to *-bin This package is needed by `./bin/ldd` (and possibly other scripts as well): head -n 1 /usr/glibc-compat/bin/ldd #!/bin/bash --- APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APKBUILD b/APKBUILD index 0105a87..fd45dab 100644 --- a/APKBUILD +++ b/APKBUILD @@ -33,7 +33,7 @@ package() { } bin() { - depends="$pkgname libc6-compat libgcc" + depends="$pkgname bash libc6-compat 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