From 65953732a0336aa87426548c398f34654550edcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= Date: Fri, 9 Feb 2024 02:47:07 +0100 Subject: [PATCH] Support early xz/lzma decompression, and use it wherever possible --- seed/seed.kaem | 2 ++ seed/stage0-posix | 2 +- steps/autoconf-2.64/sources | 2 +- steps/autoconf-2.69/sources | 2 +- steps/automake-1.15.1/sources | 2 +- steps/bash-2.05b/pass1.kaem | 4 ++-- steps/bash-2.05b/sources | 2 +- steps/bc-1.07.1/sources | 2 +- steps/binutils-2.30/sources | 2 +- steps/bison-3.4.1/sources | 2 +- steps/bzip2-1.0.8/pass1.kaem | 4 ++-- steps/bzip2-1.0.8/sources | 2 +- .../checksum-transcriber-1.0.x86.checksums | 2 +- steps/coreutils-6.10/sources | 2 +- steps/curl-8.5.0/sources | 2 +- steps/diffutils-2.7/sources | 2 +- steps/e2fsprogs-1.45.7/sources | 2 +- steps/ed-1.4/sources | 2 +- steps/gcc-4.0.4/pass1.sh | 2 +- steps/gcc-4.0.4/pass2.sh | 2 +- steps/gcc-4.0.4/sources | 2 +- steps/helpers.sh | 9 +++++++-- steps/improve/clean_sources.sh | 2 +- steps/kbd-1.15/sources | 2 +- steps/libtool-2.2.4/sources | 2 +- steps/linux-4.9.10/pass1.sh | 2 +- steps/linux-4.9.10/sources | 2 +- steps/linux-headers-4.9.10/sources | 2 +- steps/m4-1.4.7/sources | 2 +- steps/mes-0.25/mes-0.25.x86.checksums | 2 +- steps/simple-patch-1.0/simple-patch-1.0.x86.checksums | 2 +- steps/util-linux-2.19.1/sources | 2 +- 32 files changed, 41 insertions(+), 34 deletions(-) diff --git a/seed/seed.kaem b/seed/seed.kaem index 68ae36a..b95242f 100755 --- a/seed/seed.kaem +++ b/seed/seed.kaem @@ -30,6 +30,7 @@ cp /${ARCH_DIR}/bin/sha256sum ${BINDIR}/sha256sum cp /${ARCH_DIR}/bin/unbz2 ${BINDIR}/unbz2 cp /${ARCH_DIR}/bin/ungz ${BINDIR}/ungz cp /${ARCH_DIR}/bin/untar ${BINDIR}/untar +cp /${ARCH_DIR}/bin/unxz ${BINDIR}/unxz cp /${ARCH_DIR}/bin/cp ${BINDIR}/cp cp /${ARCH_DIR}/bin/replace ${BINDIR}/replace cp /${ARCH_DIR}/bin/rm ${BINDIR}/rm @@ -50,6 +51,7 @@ chmod 755 ${BINDIR}/sha256sum chmod 755 ${BINDIR}/unbz2 chmod 755 ${BINDIR}/ungz chmod 755 ${BINDIR}/untar +chmod 755 ${BINDIR}/unxz chmod 755 ${BINDIR}/replace chmod 755 ${BINDIR}/rm diff --git a/seed/stage0-posix b/seed/stage0-posix index a5c382e..b6342a8 160000 --- a/seed/stage0-posix +++ b/seed/stage0-posix @@ -1 +1 @@ -Subproject commit a5c382e9ab5d070d192841122e453ca72754eec1 +Subproject commit b6342a88fbcbbf13fa11daf8890dd6ddd5a9011f diff --git a/steps/autoconf-2.64/sources b/steps/autoconf-2.64/sources index e221c8f..e4f333a 100644 --- a/steps/autoconf-2.64/sources +++ b/steps/autoconf-2.64/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/autoconf/autoconf-2.64.tar.bz2 872f4cadf12e7e7c8a2414e047fdff26b517c7f1a977d72433c124d0d3acaa85 +https://mirrors.kernel.org/gnu/autoconf/autoconf-2.64.tar.xz 32d977213320b8ae76c71175305301197f2b0e04e72d70694bc3d3e2ae6c7248 diff --git a/steps/autoconf-2.69/sources b/steps/autoconf-2.69/sources index 965512b..d35757d 100644 --- a/steps/autoconf-2.69/sources +++ b/steps/autoconf-2.69/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.gz 954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969 +https://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.xz 64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684 diff --git a/steps/automake-1.15.1/sources b/steps/automake-1.15.1/sources index d016644..6820e43 100644 --- a/steps/automake-1.15.1/sources +++ b/steps/automake-1.15.1/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/automake/automake-1.15.1.tar.gz 988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260 +https://mirrors.kernel.org/gnu/automake/automake-1.15.1.tar.xz af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf diff --git a/steps/bash-2.05b/pass1.kaem b/steps/bash-2.05b/pass1.kaem index 879b01e..9145f8a 100755 --- a/steps/bash-2.05b/pass1.kaem +++ b/steps/bash-2.05b/pass1.kaem @@ -16,8 +16,8 @@ mkdir build src cd build # Extract -cp ${DISTFILES}/${pkg}.tar.gz ../src/ -gzip -d -f ../src/${pkg}.tar.gz +cp ${DISTFILES}/${pkg}.tar.bz2 ../src/ +bzip2 -d -f ../src/${pkg}.tar.bz2 tar xf ../src/${pkg}.tar rm -r ../src/ cd ${pkg} diff --git a/steps/bash-2.05b/sources b/steps/bash-2.05b/sources index 3ef3ecb..5132745 100644 --- a/steps/bash-2.05b/sources +++ b/steps/bash-2.05b/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/bash/bash-2.05b.tar.gz ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 +https://src.fedoraproject.org/repo/pkgs/bash/bash-2.05b.tar.bz2/f3e5428ed52a4f536f571a945d5de95d/bash-2.05b.tar.bz2 1ce4e5b47a6354531389f0adefb54dee2823227bf6e1e59a31c0e9317a330822 diff --git a/steps/bc-1.07.1/sources b/steps/bc-1.07.1/sources index 8bbdd04..d9733d9 100644 --- a/steps/bc-1.07.1/sources +++ b/steps/bc-1.07.1/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/bc/bc-1.07.1.tar.gz 62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a +https://mirrors.kernel.org/slackware/slackware64-15.0/source/ap/bc/bc-1.07.1.tar.xz 95396f88fc719a1bf8bd463809119526fef44a42ab9eb708335c2cb79bc801c6 diff --git a/steps/binutils-2.30/sources b/steps/binutils-2.30/sources index 4648075..bc85103 100644 --- a/steps/binutils-2.30/sources +++ b/steps/binutils-2.30/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/binutils/binutils-2.30.tar.bz2 efeade848067e9a03f1918b1da0d37aaffa0b0127a06b5e9236229851d9d0c09 +https://mirrors.kernel.org/gnu/binutils/binutils-2.30.tar.xz 6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6 diff --git a/steps/bison-3.4.1/sources b/steps/bison-3.4.1/sources index 085cddb..fb8c217 100644 --- a/steps/bison-3.4.1/sources +++ b/steps/bison-3.4.1/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/bison/bison-3.4.1.tar.gz 7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095 +https://mirrors.kernel.org/gnu/bison/bison-3.4.1.tar.xz 27159ac5ebf736dffd5636fd2cd625767c9e437de65baa63cb0de83570bd820d diff --git a/steps/bzip2-1.0.8/pass1.kaem b/steps/bzip2-1.0.8/pass1.kaem index 487f5ae..2ff0704 100755 --- a/steps/bzip2-1.0.8/pass1.kaem +++ b/steps/bzip2-1.0.8/pass1.kaem @@ -15,8 +15,8 @@ mkdir build src cd build # Extract -cp ${DISTFILES}/${pkg}.tar.gz ../src/ -gzip -d -f ../src/${pkg}.tar.gz +cp ${DISTFILES}/${pkg}.tar.xz ../src/ +unxz --file ../src/${pkg}.tar.xz --output ../src/${pkg}.tar tar xf ../src/${pkg}.tar cd ${pkg} diff --git a/steps/bzip2-1.0.8/sources b/steps/bzip2-1.0.8/sources index 22f0659..5305f57 100644 --- a/steps/bzip2-1.0.8/sources +++ b/steps/bzip2-1.0.8/sources @@ -1 +1 @@ -https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 +https://mirrors.kernel.org/slackware/slackware-14.0/patches/source/bzip2/bzip2-1.0.8.tar.xz 47fd74b2ff83effad0ddf62074e6fad1f6b4a77a96e121ab421c20a216371a1f diff --git a/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums index 690a482..39440d6 100644 --- a/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums +++ b/steps/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums @@ -1 +1 @@ -a670c810b4f94d67bd171d5a79469882c04066ea7585f31c52f4c166ad5e5ee8 /usr/bin/checksum-transcriber +19fd50d727e8a7feba8b6e369e68287d1922d8f623a156fb113d994891e96998 /usr/bin/checksum-transcriber diff --git a/steps/coreutils-6.10/sources b/steps/coreutils-6.10/sources index 292dc56..5fe69f1 100644 --- a/steps/coreutils-6.10/sources +++ b/steps/coreutils-6.10/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/coreutils/coreutils-6.10.tar.gz 1d013547889f20576460249c4210632d5314531c8477378a2e046b13a8ebeb7e +https://mirrors.kernel.org/gnu/coreutils/coreutils-6.10.tar.lzma 8b05bba1b2726a164e444c314e3f359604b58216be704bed8f2e028449cc6204 diff --git a/steps/curl-8.5.0/sources b/steps/curl-8.5.0/sources index e25bdad..0f78089 100644 --- a/steps/curl-8.5.0/sources +++ b/steps/curl-8.5.0/sources @@ -1 +1 @@ -https://curl.se/download/curl-8.5.0.tar.bz2 ce4b6a6655431147624aaf582632a36fe1ade262d5fab385c60f78942dd8d87b +https://curl.se/download/curl-8.5.0.tar.xz 42ab8db9e20d8290a3b633e7fbb3cec15db34df65fd1015ef8ac1e4723750eeb diff --git a/steps/diffutils-2.7/sources b/steps/diffutils-2.7/sources index 960ac12..8e853f0 100644 --- a/steps/diffutils-2.7/sources +++ b/steps/diffutils-2.7/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/diffutils/diffutils-2.7.tar.gz d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 +https://dept.rpi.edu/acm/packages/diffutils/2.7/distrib/diffutils-2.7.tar.bz2 fd6c44f7cbd0a942a3f0c012365997965451197ad4faeb0b8aac1fe03192de58 diff --git a/steps/e2fsprogs-1.45.7/sources b/steps/e2fsprogs-1.45.7/sources index bffb86b..7258a70 100644 --- a/steps/e2fsprogs-1.45.7/sources +++ b/steps/e2fsprogs-1.45.7/sources @@ -1,4 +1,4 @@ -https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.7/e2fsprogs-1.45.7.tar.gz 340e9de42a12d0c26dd7527e9ef055ac85586de5c61f6273ae19f88d04e55804 +https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.7/e2fsprogs-1.45.7.tar.xz 62d49c86d9d4becf305093edd65464484dc9ea41c6ff9ae4f536e4a341b171a2 https://www.unicode.org/Public/11.0.0/ucd/CaseFolding.txt 64f117a4749dd4a1b6c54277f63f6cf1e0eb45d290cbedaf777fbe71b8880885 https://www.unicode.org/Public/11.0.0/ucd/DerivedAge.txt eb115a5de9a32c9ad447d6ea1cddcadb53d47f6cbc2521f3fe0bebb040c39866 https://www.unicode.org/Public/11.0.0/ucd/extracted/DerivedCombiningClass.txt 11c8bd81ecbede4d67c7b5b693a471647d5401956707c639ae053b836cc7f5da diff --git a/steps/ed-1.4/sources b/steps/ed-1.4/sources index 10885f3..4107343 100644 --- a/steps/ed-1.4/sources +++ b/steps/ed-1.4/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/ed/ed-1.4.tar.gz db36da85ee1a9d8bafb4b041bd4c8c11becba0c43ec446353b67045de1634fda +https://mirrors.kernel.org/slackware/slackware-13.37/source/a/ed/ed-1.4.tar.xz 102c80e6da527c6b8eebd5195cd05fc71808d60735d73e8bb503a5e294475007 diff --git a/steps/gcc-4.0.4/pass1.sh b/steps/gcc-4.0.4/pass1.sh index acae7d1..dbc80a5 100755 --- a/steps/gcc-4.0.4/pass1.sh +++ b/steps/gcc-4.0.4/pass1.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later -EXTRA_DISTFILES="automake-1.16.3.tar.gz" +EXTRA_DISTFILES="automake-1.16.3.tar.xz" src_prepare() { default diff --git a/steps/gcc-4.0.4/pass2.sh b/steps/gcc-4.0.4/pass2.sh index bcae547..17f4523 100755 --- a/steps/gcc-4.0.4/pass2.sh +++ b/steps/gcc-4.0.4/pass2.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later -EXTRA_DISTFILES="automake-1.16.3.tar.gz" +EXTRA_DISTFILES="automake-1.16.3.tar.xz" src_prepare() { default diff --git a/steps/gcc-4.0.4/sources b/steps/gcc-4.0.4/sources index 4ba3400..510dd54 100644 --- a/steps/gcc-4.0.4/sources +++ b/steps/gcc-4.0.4/sources @@ -1,2 +1,2 @@ https://mirrors.kernel.org/gnu/gcc/gcc-4.0.4/gcc-core-4.0.4.tar.bz2 e9bf58c761a4f988311aef6b41f12fd5c7e51d09477468fb73826aecc1be32e7 -https://mirrors.kernel.org/gnu/automake/automake-1.16.3.tar.gz ce010788b51f64511a1e9bb2a1ec626037c6d0e7ede32c1c103611b9d3cba65f +https://mirrors.kernel.org/gnu/automake/automake-1.16.3.tar.xz ff2bf7656c4d1c6fdda3b8bebb21f09153a736bcba169aaf65eab25fa113bf3a diff --git a/steps/helpers.sh b/steps/helpers.sh index 87e3e19..9694e66 100755 --- a/steps/helpers.sh +++ b/steps/helpers.sh @@ -307,8 +307,13 @@ extract_file() { *.tar.bz2) # Initial bzip2 built against meslibc has broken pipes bzip2 -dc "${DISTFILES}/${f}" | tar -xf - ${extract} ;; - *.tar.xz) - tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract} ;; + *.tar.xz | *.tar.lzma) + if test -e "${PREFIX}/bin/xz"; then + tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract} + else + unxz --file "${DISTFILES}/${f}" | tar -xf - ${extract} + fi + ;; esac fi ;; diff --git a/steps/improve/clean_sources.sh b/steps/improve/clean_sources.sh index 746472d..de6442f 100755 --- a/steps/improve/clean_sources.sh +++ b/steps/improve/clean_sources.sh @@ -40,7 +40,7 @@ done if [ -e "/external/repo-preseeded/linux-4.9.10_0.tar.bz2" ]; then # This is done in src_extract out of necessity usually -- I can't think of a better solution :( - rm -f "${DISTFILES}/linux-4.9.10.tar.gz" + rm -f "${DISTFILES}/linux-4.9.10.tar.xz" fi unset get_source_filename diff --git a/steps/kbd-1.15/sources b/steps/kbd-1.15/sources index 893e29f..6b23318 100644 --- a/steps/kbd-1.15/sources +++ b/steps/kbd-1.15/sources @@ -1 +1 @@ -https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-1.15.tar.gz 203c93e004ac7ad0e50423ff54d89e40fa99f45b207b2b892a4d70211feebe05 +https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-1.15.tar.xz 92f59ecaa85fe2746ef1830ac01eef84c394a413f7c7326b8d0a5c819e87502f diff --git a/steps/libtool-2.2.4/sources b/steps/libtool-2.2.4/sources index 0581842..ce1fddb 100644 --- a/steps/libtool-2.2.4/sources +++ b/steps/libtool-2.2.4/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/libtool/libtool-2.2.4.tar.bz2 c4e63399b12f5858d11c44cea8e92f21cd564f8548e488dadc84046b424c80fc +https://mirrors.kernel.org/gnu/libtool/libtool-2.2.4.tar.lzma d81839fa4d566dbef7c286fdca9b430d3530983fff6d389fac0f08baf27e4c3a diff --git a/steps/linux-4.9.10/pass1.sh b/steps/linux-4.9.10/pass1.sh index 2c1b619..bbc411e 100644 --- a/steps/linux-4.9.10/pass1.sh +++ b/steps/linux-4.9.10/pass1.sh @@ -9,7 +9,7 @@ src_unpack() { mkdir "${pkg}" cp "${DISTFILES}/deblob-4.9" "${pkg}/" default || true # Predictable link errors - not a problem - rm "${DISTFILES}/${pkg}.tar.gz" + rm "${DISTFILES}/${pkg}.tar.xz" } generate_autoconf_h() { diff --git a/steps/linux-4.9.10/sources b/steps/linux-4.9.10/sources index a82afe9..f47cabd 100644 --- a/steps/linux-4.9.10/sources +++ b/steps/linux-4.9.10/sources @@ -1,2 +1,2 @@ -https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz 97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 +https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.xz bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525 https://linux-libre.fsfla.org/pub/linux-libre/releases/old/gen6/4.9.10-gnu/deblob-4.9 af4214b851928a53ef470ed8729122b9db910a6c0769d5d46a5de0b3e96f74f3 diff --git a/steps/linux-headers-4.9.10/sources b/steps/linux-headers-4.9.10/sources index b986c50..50bc0c9 100644 --- a/steps/linux-headers-4.9.10/sources +++ b/steps/linux-headers-4.9.10/sources @@ -1 +1 @@ -https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz 97ff15f9550c6e85c25173b3cf5c7e89a2d39fb923112f2c8bc2729cf64bf6d8 +https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.xz bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525 diff --git a/steps/m4-1.4.7/sources b/steps/m4-1.4.7/sources index 474e294..48563da 100644 --- a/steps/m4-1.4.7/sources +++ b/steps/m4-1.4.7/sources @@ -1 +1 @@ -https://mirrors.kernel.org/gnu/m4/m4-1.4.7.tar.gz 093c993767f563a11e41c1cf887f4e9065247129679d4c1e213d0544d16d8303 +https://mirrors.kernel.org/gnu/m4/m4-1.4.7.tar.bz2 a88f3ddaa7c89cf4c34284385be41ca85e9135369c333fdfa232f3bf48223213 diff --git a/steps/mes-0.25/mes-0.25.x86.checksums b/steps/mes-0.25/mes-0.25.x86.checksums index 4d2acdc..908df95 100644 --- a/steps/mes-0.25/mes-0.25.x86.checksums +++ b/steps/mes-0.25/mes-0.25.x86.checksums @@ -1,5 +1,5 @@ ab14556dd405debd1fc4aa18bffea9ee8c89bc8fa89f745e8fb20c9da83e5809 /usr/bin/mes -1e5ceedd062bfddab21ceb5f84f762eafa373d274ea82017b092e03bb24bb7bf /usr/bin/mes-m2 +ddaa6eaaedc5f20298474b4118f12ef86e9e9a5b681893fb138ade189e971caf /usr/bin/mes-m2 834320264b245728c2270b2a60f1ceb5f63de8a79bcd99f5c6bba6be11ed7223 /usr/bin/mescc.scm 234c264965116a24583dd569050adc766d7cc2da83b1db38085210f26031b70c /usr/lib/x86-mes/crt1.s 494f184a87175abc485a898c250c3831b2b5dcf5aead46591e00b39d1c5529fc /usr/lib/x86-mes/crt1.o diff --git a/steps/simple-patch-1.0/simple-patch-1.0.x86.checksums b/steps/simple-patch-1.0/simple-patch-1.0.x86.checksums index adfd26c..73a7cdc 100644 --- a/steps/simple-patch-1.0/simple-patch-1.0.x86.checksums +++ b/steps/simple-patch-1.0/simple-patch-1.0.x86.checksums @@ -1 +1 @@ -bf49a897e96fe4052904aaedc8281f6849e3dc1836899d393c43726cc8f5e92e /usr/bin/simple-patch +f66b8200c9237a7d5fe6a3d4d94f1ae661009d8ad14efdc7e95ac4cb8c4775e8 /usr/bin/simple-patch diff --git a/steps/util-linux-2.19.1/sources b/steps/util-linux-2.19.1/sources index 3aa465b..b12c232 100644 --- a/steps/util-linux-2.19.1/sources +++ b/steps/util-linux-2.19.1/sources @@ -1 +1 @@ -https://mirrors.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-2.19.1.tar.gz f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 +https://mirrors.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-2.19.1.tar.xz d12e0f1be0257eadca6a2653acfb4792571c9f7189ed642873363f9b6797bb51