diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d61440f..00ebc6e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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 @@ -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, @@ -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 diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index 8743a05..99b5e1e 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -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: @@ -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 diff --git a/Makefile b/Makefile index 1a1a7cf..1b67603 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 @@ -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. diff --git a/Pkgfile b/Pkgfile index 0034ce1..48faf99 100644 --- a/Pkgfile +++ b/Pkgfile @@ -32,14 +32,14 @@ vars: mpc_sha512: 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97 # renovate: datasource=git-tags extractVersion=^v(?.*)$ 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(?.*)$ 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 diff --git a/musl/patches/elf.h-add-typedefs.patch b/musl/patches/elf.h-add-typedefs.patch deleted file mode 100644 index b69017f..0000000 --- a/musl/patches/elf.h-add-typedefs.patch +++ /dev/null @@ -1,30 +0,0 @@ -https://gitlab.alpinelinux.org/alpine/aports/-/raw/master/main/musl/0001-elf.h-add-typedefs-for-Elf-_Relr.patch - -From 981144ebc9ff30b085af107f1337543de7b0bf94 Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Mon, 6 Nov 2023 12:29:16 +0100 -Subject: [PATCH] elf.h: add typedefs for Elf*_Relr - -Add typedefs for Elf32_Relr and Elf64_relr as a follow-up to commit -d32dadd60efb (ldso: support DT_RELR relative relocation format) ---- - include/elf.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/include/elf.h b/include/elf.h -index 23f2c4bc..aa186d9d 100644 ---- a/include/elf.h -+++ b/include/elf.h -@@ -32,6 +32,9 @@ typedef uint16_t Elf64_Section; - typedef Elf32_Half Elf32_Versym; - typedef Elf64_Half Elf64_Versym; - -+typedef Elf32_Word Elf32_Relr; -+typedef Elf64_Xword Elf64_Relr; -+ - #define EI_NIDENT (16) - - typedef struct { --- -2.42.1 - diff --git a/musl/patches/handle-aux-at-base.patch b/musl/patches/handle-aux-at-base.patch new file mode 100644 index 0000000..826b736 --- /dev/null +++ b/musl/patches/handle-aux-at-base.patch @@ -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) diff --git a/musl/patches/revert-faccessat2.patch b/musl/patches/revert-faccessat2.patch deleted file mode 100644 index c681683..0000000 --- a/musl/patches/revert-faccessat2.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6c7fb5f32ad0fb2558d50cdaa39ff7fb0e95c58b Mon Sep 17 00:00:00 2001 -From: Ariadne Conill -Date: Sat, 31 Oct 2020 06:26:46 -0600 -Subject: [PATCH] Revert "use new SYS_faccessat2 syscall to implement faccessat - with flags" - -This reverts commit 55fb9a177316aa46c639d93dd0323d9a9a8c160c. - -Causes too many problems on Alpine right now due to seccomp. ---- - src/unistd/faccessat.c | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c -index 557503eb..76bbd4c7 100644 ---- a/src/unistd/faccessat.c -+++ b/src/unistd/faccessat.c -@@ -25,17 +25,12 @@ static int checker(void *p) - - int faccessat(int fd, const char *filename, int amode, int flag) - { -- if (flag) { -- int ret = __syscall(SYS_faccessat2, fd, filename, amode, flag); -- if (ret != -ENOSYS) return __syscall_ret(ret); -- } -+ if (!flag || (flag==AT_EACCESS && getuid()==geteuid() && getgid()==getegid())) -+ return syscall(SYS_faccessat, fd, filename, amode, flag); - -- if (flag & ~AT_EACCESS) -+ if (flag != AT_EACCESS) - return __syscall_ret(-EINVAL); - -- if (!flag || (getuid()==geteuid() && getgid()==getegid())) -- return syscall(SYS_faccessat, fd, filename, amode); -- - char stack[1024]; - sigset_t set; - pid_t pid; --- -2.29.2 diff --git a/musl/pkg.yaml b/musl/pkg.yaml index 227b0b0..c8da4d6 100644 --- a/musl/pkg.yaml +++ b/musl/pkg.yaml @@ -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