Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /lib64 reference again and tell abuild to allow it #180

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname="glibc"
pkgver="2.35"
_pkgrel="0"
pkgrel="0"
pkgrel="2"
pkgdesc="GNU C Library compatibility layer"
arch="x86_64"
url="https://github.com/sgerrand/alpine-pkg-glibc"
Expand All @@ -13,9 +13,11 @@ nsswitch.conf
ld.so.conf"
subpackages="$pkgname-bin $pkgname-dev $pkgname-i18n"
triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"
options="lib64"

package() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding this line to prevent issues for users of libc6-compat.

Suggested change
package() {
package() {
conflicts="libc6-compat"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To illustrate this problem in action:

fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/10) Installing glibc (2.35-r0)
(2/10) Installing ncurses-terminfo-base (6.3_p20211120-r1)
(3/10) Installing ncurses-libs (6.3_p20211120-r1)
(4/10) Installing readline (8.1.1-r0)
(5/10) Installing bash (5.1.16-r0)
Executing bash-5.1.16-r0.post-install
(6/10) Installing libc6-compat (1.2.2-r7)
ERROR: libc6-compat-1.2.2-r7: trying to overwrite lib64/ld-linux-x86-64.so.2 owned by glibc-2.35-r0.
(7/10) Installing libgcc (10.3.1_git20211027-r0)
(8/10) Installing glibc-bin (2.35-r0)
(9/10) Installing glibc-dev (2.35-r0)
(10/10) Installing glibc-i18n (2.35-r0)
Executing busybox-1.34.1-r7.trigger
Executing glibc-bin-2.35-r0.trigger
1 error; 109 MiB in 24 packages

Exited with code exit status 1

(source)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see why this change is probably needed, but doesn't this conflict with

bin() {
depends="$pkgname bash libc6-compat libgcc"
which actually installs libc6-compat as a dependency of glibc-bin?

Is it possible that dependency added in 3987862 be removed? It's a bit confusing as to why if we are installing glibc that we would want a dependency on a musl/glibc compatibility layer like libc6-compat as it does in the 2.35-r0/2.35-r1 glibc-bin packages and not so clear which user-reported issues were being addressed by that addition.

mkdir -p "$pkgdir/lib" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc
conflicts="libc6-compat"
mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$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
Expand All @@ -28,12 +30,13 @@ 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
pablosole marked this conversation as resolved.
Show resolved Hide resolved
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
}

bin() {
depends="$pkgname bash libc6-compat libgcc"
depends="$pkgname bash 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
Expand Down