Skip to content

Commit

Permalink
feat: update musl to 1.2.5
Browse files Browse the repository at this point in the history
Update patchset.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Mar 6, 2024
1 parent 5917598 commit 9267aec
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 86 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-27T17:15:55Z by kres latest.
# Generated on 2024-03-06T10:13:48Z by kres latest.

name: default
concurrency:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
labels: ${{ steps.retrieve-pr-labels.outputs.result }}
services:
buildkitd:
image: moby/buildkit:v0.12.3
image: moby/buildkit:v0.12.5
options: --privileged
ports:
- 1234:1234
Expand Down Expand Up @@ -70,11 +70,12 @@ jobs:
make PUSH=true
- name: Retrieve PR labels
id: retrieve-pr-labels
if: github.event_name == 'pull_request' && always()
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
retries: "3"
script: |
if (context.eventName != "pull_request") { return "[]" }
const resp = await github.rest.issues.get({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand All @@ -101,7 +102,7 @@ jobs:
- default
services:
buildkitd:
image: moby/buildkit:v0.12.3
image: moby/buildkit:v0.12.5
options: --privileged
ports:
- 1234:1234
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-27T17:15:55Z by kres latest.
# Generated on 2024-03-06T10:13:48Z by kres latest.

name: weekly
concurrency:
Expand All @@ -16,7 +16,7 @@ jobs:
- pkgs
services:
buildkitd:
image: moby/buildkit:v0.12.3
image: moby/buildkit:v0.12.5
options: --privileged
ports:
- 1234:1234
Expand Down
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-27T18:10:07Z by kres latest.
# Generated on 2024-03-06T10:13:48Z by kres latest.

# common variables

Expand Down Expand Up @@ -45,6 +45,9 @@ COMMON_ARGS += --progress=$(PROGRESS)
COMMON_ARGS += --platform=$(PLATFORM)
COMMON_ARGS += --build-arg=SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)

# extra variables


# targets defines all the available targets

TARGETS = toolchain
Expand All @@ -70,6 +73,23 @@ To create a builder instance, run:

docker buildx create --name local --use

If running builds that needs to be cached aggresively create a builder instance with the following:

docker buildx create --name local --use --config=config.toml

config.toml contents:

[worker.oci]
gc = true
gckeepstorage = 50000

[[worker.oci.gcpolicy]]
keepBytes = 10737418240
keepDuration = 604800
filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"]
[[worker.oci.gcpolicy]]
all = true
keepBytes = 53687091200

If you already have a compatible builder instance, you may use that instead.

Expand Down
12 changes: 6 additions & 6 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ vars:
mpc_sha512: 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97

# renovate: datasource=git-tags extractVersion=^v(?<version>.*)$ depName=git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
linux_version: 6.6.13
linux_sha256: 88b89e7dd41ead4e3ab1e411c8bb8d592575acf815cf1df3c0dc57e2e882c0bc
linux_sha512: c1598bb1116528525004a677e571117d2b5156cf8f60c84f73e11d9010032b1fd5aaf8e5d286679019db55abb699c2f55de2dbb332c0a96f6337eebd56220863
linux_version: 6.6.18
linux_sha256: 4e43d8c5fba14f7c82597838011648056487b7550fd83276ad534559e8499b1d
linux_sha512: 7453d9ae753345e9312ad01da7805f68c1fb04f33aaec58ac3ba08e4b7af132c19e1822d8635fb747eb2d72cc8d89c89f3e5b7ff2e2207903cb2eb8b7dc5e884

# renovate: datasource=git-tags extractVersion=^v(?<version>.*)$ depName=git://git.musl-libc.org/musl
musl_version: 1.2.4
musl_sha256: 7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039
musl_sha512: 498ec5d7941194a8806f4d42f0f6d218c862996ef1398b737d0d06995e0b7a6574b240a48088f6b84016b14b2776fe463f829dcb11149cdfc1023d496b235c55
musl_version: 1.2.5
musl_sha256: a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4
musl_sha512: 7bb7f7833923cd69c7a1a9b8a5f1784bfd5289663eb6061dcd43d583e45987df8a68a1be05d75cc1c88a3f5b610653d1a70f4a9cff4d8f7fd41ae73ee058c17c

labels:
org.opencontainers.image.source: https://github.com/siderolabs/toolchain
30 changes: 0 additions & 30 deletions musl/patches/elf.h-add-typedefs.patch

This file was deleted.

48 changes: 48 additions & 0 deletions musl/patches/handle-aux-at-base.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
https://git.alpinelinux.org/aports/plain/main/musl/handle-aux-at_base.patch

This is required to make the gcompat ELF interpreter stub work with some
packed binaries.

diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c
index b125eb1..616c6a6 100644
--- a/src/env/__init_tls.c
+++ b/src/env/__init_tls.c
@@ -66,8 +66,10 @@ void *__copy_tls(unsigned char *mem)
}

#if ULONG_MAX == 0xffffffff
+typedef Elf32_Ehdr Ehdr;
typedef Elf32_Phdr Phdr;
#else
+typedef Elf64_Ehdr Ehdr;
typedef Elf64_Phdr Phdr;
#endif

@@ -77,15 +79,23 @@ extern const size_t _DYNAMIC[];
static void static_init_tls(size_t *aux)
{
unsigned char *p;
- size_t n;
+ size_t n, e;
Phdr *phdr, *tls_phdr=0;
size_t base = 0;
void *mem;

- for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) {
+ if (aux[AT_BASE]) {
+ Ehdr *ehdr = (void *)aux[AT_BASE];
+ p = (unsigned char *)aux[AT_BASE] + ehdr->e_phoff;
+ n = ehdr->e_phnum;
+ e = ehdr->e_phentsize;
+ } else {
+ p = (void *)aux[AT_PHDR];
+ n = aux[AT_PHNUM];
+ e = aux[AT_PHENT];
+ }
+ for (; n; n--, p+=e) {
phdr = (void *)p;
- if (phdr->p_type == PT_PHDR)
- base = aux[AT_PHDR] - phdr->p_vaddr;
if (phdr->p_type == PT_DYNAMIC && _DYNAMIC)
base = (size_t)_DYNAMIC - phdr->p_vaddr;
if (phdr->p_type == PT_TLS)
40 changes: 0 additions & 40 deletions musl/patches/revert-faccessat2.patch

This file was deleted.

3 changes: 1 addition & 2 deletions musl/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ steps:
- |
tar -xzf musl.tar.gz --strip-components=1
patch -p1 < /pkg/patches/revert-faccessat2.patch
patch -p1 < /pkg/patches/elf.h-add-typedefs.patch
patch -p1 < /pkg/patches/handle-aux-at-base.patch
mkdir build
cd build
Expand Down

0 comments on commit 9267aec

Please sign in to comment.