Skip to content

Commit

Permalink
Alpine 3.12 glibc 2.33
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexkey committed Mar 10, 2021
1 parent 2f9881b commit 32b3b86
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .abuild/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuQ4udtPA21RNZIWnSOes
eCTP/+RYEhAfyM54ojjeUivyDqdDFApa0VB1bM8TxLKWqKMTOz9cu2i9VxnbBJEn
aWDk2+soISaVTWwEmtSlfPqCr3I7pa21A47LuGKhZ1xTxEi06XbFG6xstKxcPpfr
RlHseY3M1SbBxzL7ffnOvWvI/mucTFErIzUN1A6shuMIvQKWhKMQSfm9MHFN1hUI
qJfGvEcGwixJLYxGjq3LtgoSs8Kl+V7majA0RTMSOMAjd5uNqtoX+QABH4Qev+6N
cQx7o5+wpNLLD37IDzGJHuO1r9650yHqS2Byz+nAOFTtIytvGph19Vqser9d+b6H
1wIDAQAB
-----END PUBLIC KEY-----
4 changes: 2 additions & 2 deletions APKBUILD-aarch64
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Sasha Gerrand <[email protected]>

pkgname="glibc"
pkgver="2.29"
pkgver="2.33"
_pkgrel="0"
pkgrel="0"
pkgdesc="GNU C Library compatibility layer"
Expand Down Expand Up @@ -48,6 +48,6 @@ i18n() {
cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat
}

sha512sums="9584cc997e467a46cdeb0a4caf67502cbcefc5eb60db27c7ccb3c27bef175453d5a67d0ae4f336e7f5cb6f0ac87253a19cd129773a07753a491f7bb7d9e87142 glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
sha512sums="20f214ca5d4882cb7d85fd9f44c3bac22ab4bf713ab14390c93305477e728e5c9aa451ad0a8bb178d67ac4ac544b3b390c1248f93831f5ef5e8a5da530f6b8c3 glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf"
4 changes: 2 additions & 2 deletions APKBUILD-armhf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Sasha Gerrand <[email protected]>

pkgname="glibc"
pkgver="2.29"
pkgver="2.33"
_pkgrel="0"
pkgrel="0"
pkgdesc="GNU C Library compatibility layer"
Expand Down Expand Up @@ -46,6 +46,6 @@ i18n() {
cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat
}

sha512sums="3abf8d5c550292df4aea83c10c2890624db4757e5e77b8eb3b9e431f3dd9ec6e4d5caeb2200d336e27b8deef0e0cdabca6d25a6380257b7e742f8d462a15b3fe glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
sha512sums="3b00e01f154aeb30e56fa7bddce27470520bb230fcb9f076ff7b93fadb58a7925a854a88b064f3fd59f94b66d942513ba512985f2e0be40f0ebdf0acc0b6aa33 glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf"
2 changes: 1 addition & 1 deletion APKBUILD-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ i18n() {
cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat
}

sha512sums="810a3c8e4a0dc06b181fb38eb2df7446d78426b0d3bba71c5543272df2154015ddec20f69600d9650ff2fab1b556ce78ccb6553190c8b7500b0db0488198feac glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
sha512sums="cc47d172eeedb63444b27d22c07d721dfdd6ab95474c497b5c308d1c0606807b77a1fdb9fad7946dc3da080f9a2a1978f10417befc6fe60266f57a6073aff1b5 glibc-bin-$pkgver-$_pkgrel-$arch.tar.gz
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf"
104 changes: 85 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,114 @@
# Satoshi Portal, what we did

## Build abuild
## Getting everything

```
git clone https://github.com/SatoshiPortal/docker-alpine-abuild.git
cd docker-alpine-abuild/
git clone https://github.com/satoshiportal/docker-glibc-builder.git
git clone https://github.com/satoshiportal/alpine-pkg-glibc
cd docker-glibc-builder/
docker build -t cyphernode/glibc-builder .
cd ../docker-alpine-abuild/
docker build -t cyphernode/alpine-abuild .
```

## Our keys

You can find our public key at https://raw.githubusercontent.com/SatoshiPortal/alpine-pkg-glibc/master/.abuild/[email protected]

We generated them with:

```
docker run --name keys --entrypoint abuild-keygen -e PACKAGER="Cyphernode Team <[email protected]>" cyphernode/alpine-abuild -n
mkdir ~/.abuild
docker cp keys:/home/builder/.abuild/[email protected] ~/.abuild/
docker cp keys:/home/builder/.abuild/[email protected] ~/.abuild/
docker cp keys:/home/builder/.abuild/[email protected] ./
docker cp keys:/home/builder/.abuild/[email protected].pub ./
docker rm -f keys
```

## Builder
## Building glibc

```
git clone https://github.com/satoshiportal/docker-glibc-builder.git
cd docker-glibc-builder/
docker build -t cyphernode/glibc-builder .
cd ../builder
docker run --name glibc-binary cyphernode/glibc-builder 2.29 /usr/glibc-compat
cd ../alpine-pkg-glibc/
cp ../docker-alpine-abuild/[email protected]* .abuild/
chmod 600 .abuild/[email protected]
docker run --name glibc-binary cyphernode/glibc-builder 2.33 /usr/glibc-compat
docker cp glibc-binary:/glibc-bin-2.33.tar.gz ./
docker rm glibc-binary
```

## Building the APK

### x86_64

```
docker cp glibc-binary:/glibc-bin-2.29.tar.gz ./
mv glibc-bin-2.29.tar.gz glibc-bin-2.29-0-x86_64.tar.gz
mv glibc-bin-2.29.tar.gz glibc-bin-2.29-0-aarch64.tar.gz
mv glibc-bin-2.29.tar.gz glibc-bin-2.29-0-armhf.tar.gz
docker rm glibc-binary
mv glibc-bin-2.33.tar.gz glibc-bin-2.33-0-x86_64.tar.gz
cp APKBUILD-x86_64 APKBUILD
```

## Packager
### aarch64 (ARM64)

```
git clone https://github.com/satoshiportal/alpine-pkg-glibc
cd alpine-pkg-glibc/
mv glibc-bin-2.33.tar.gz glibc-bin-2.33-0-aarch64.tar.gz
cp APKBUILD-aarch64 APKBUILD
```

### armhf (arm32)

```
mv glibc-bin-2.33.tar.gz glibc-bin-2.33-0-armhf.tar.gz
cp APKBUILD-armhf APKBUILD
```

### All arch

```
chmod +x package.sh
vi package.sh
./package.sh
```

## Prepare release

### x86_64

```
cp glibc-bin-2.33-0-x86_64.tar.gz .abuild/packages/builder/x86_64/
cd .abuild/packages/builder/x86_64
mv APKINDEX.tar.gz APKINDEX-x86_64.tar.gz
mv glibc-2.33-r0.apk glibc-2.33-r0-x86_64.apk
mv glibc-bin-2.33-r0.apk glibc-bin-2.33-r0-x86_64.apk
mv glibc-dev-2.33-r0.apk glibc-dev-2.33-r0-x86_64.apk
mv glibc-i18n-2.33-r0.apk glibc-i18n-2.33-r0-x86_64.apk
shasum -a 256 glibc-2.33-r0-x86_64.apk glibc-bin-2.33-r0-x86_64.apk > SHA256SUMS.asc
```

### aarch64

```
cp glibc-bin-2.33-0-aarch64.tar.gz .abuild/packages/builder/aarch64/
cd .abuild/packages/builder/aarch64
mv APKINDEX.tar.gz APKINDEX-aarch64.tar.gz
mv glibc-2.33-r0.apk glibc-2.33-r0-aarch64.apk
mv glibc-bin-2.33-r0.apk glibc-bin-2.33-r0-aarch64.apk
mv glibc-dev-2.33-r0.apk glibc-dev-2.33-r0-aarch64.apk
mv glibc-i18n-2.33-r0.apk glibc-i18n-2.33-r0-aarch64.apk
shasum -a 256 glibc-2.33-r0-aarch64.apk glibc-bin-2.33-r0-aarch64.apk >> SHA256SUMS.asc
```

### x86_64

```
cp glibc-bin-2.33-0-armhf.tar.gz .abuild/packages/builder/armhf/
cd .abuild/packages/builder/armhf
mv APKINDEX.tar.gz APKINDEX-armhf.tar.gz
mv glibc-2.33-r0.apk glibc-2.33-r0-armhf.apk
mv glibc-bin-2.33-r0.apk glibc-bin-2.33-r0-armhf.apk
mv glibc-dev-2.33-r0.apk glibc-dev-2.33-r0-armhf.apk
mv glibc-i18n-2.33-r0.apk glibc-i18n-2.33-r0-armhf.apk
shasum -a 256 glibc-2.33-r0-armhf.apk glibc-bin-2.33-r0-armhf.apk >> SHA256SUMS.asc
```


# alpine-pkg-glibc

Expand Down
8 changes: 4 additions & 4 deletions package.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

docker rm -f input

docker create --name input --volume /home/builder/package alpine:3.9 /bin/true
docker create --name input --volume /home/builder/package alpine:3.12.4 /bin/true
docker cp . input:/home/builder/package/

docker run -it --volumes-from input \
-e RSA_PRIVATE_KEY_NAME="[email protected]" \
-e PACKAGER="Cyphernode Team <[email protected]>" \
-e PACKAGER_PRIVKEY="/home/builder/.abuild/[email protected]" \
-v "$HOME/.abuild:/home/builder/.abuild" \
-v "$HOME/.abuild/packages:/packages" \
-v "$HOME/.abuild/[email protected]:/etc/apk/keys/[email protected]" \
-v "$PWD/.abuild:/home/builder/.abuild" \
-v "$PWD/.abuild/packages:/packages" \
-v "$PWD/.abuild/[email protected]:/etc/apk/keys/[email protected]" \
cyphernode/alpine-abuild

0 comments on commit 32b3b86

Please sign in to comment.