-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Fully replace libc6-compat
and musl-utils
#179
Open
LukeShu
wants to merge
4
commits into
sgerrand:main
Choose a base branch
from
datawire:lukeshu/libc6-compat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,22 @@ | |
pkgname="glibc" | ||
pkgver="2.35" | ||
_pkgrel="0" | ||
pkgrel="0" | ||
pkgrel="1" | ||
pkgdesc="GNU C Library compatibility layer" | ||
options="lib64" | ||
arch="x86_64" | ||
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 | ||
nsswitch.conf | ||
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() { | ||
mkdir -p "$pkgdir/lib" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc | ||
provides="libc6-compat" | ||
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 | ||
|
@@ -28,17 +31,34 @@ 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 | ||
} | ||
|
||
bin() { | ||
depends="$pkgname bash libc6-compat libgcc" | ||
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 | ||
mkdir -p "$subpkgdir"/usr/glibc-compat | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so then add |
||
cp -a "$srcdir"/usr/glibc-compat/bin "$subpkgdir"/usr/glibc-compat | ||
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" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This declaration isn't accurate but the line below it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand why you think this is incorrect.
In the PR description I wrote:
Or, put another way: What could be more libc6-compatible than actually installing libc6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provides
is not meant to declare a capability, but should refer to packages provided, see also https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#provides. Further one could argue, the packages from this repository do not provide compatibility, they do provide glibc.libc6-compat
is a package, https://pkgs.alpinelinux.org/packages?name=libc6-compat&branch=v3.16&repo=&arch=&maintainer=.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalberti I think I see why setting
provide=libc6-compat
is not what we would want; after the suggested reading by @sgerrand :This definition shows that provides it meant as an alternate name for installation. Since this is glibc and not just a compatibility, it would make more since to set
provide='glibc=2.35'
I'm not familiar with ABUILD, but there must be another way to show conflict between
libc6-compat
and other packages.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalberti My this would work!?
depends="$pkgname bash !libc6-compat libgcc"
Notice the "!" added before libc6-compat. This makes the most since, and explains why that is in the depends list in the first place.
Excerpt from https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#depends