From d1fea647ee5a23b9b34b22e10800e66746b511b6 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Fri, 20 May 2022 19:13:54 +0300 Subject: [PATCH 1/4] Use ${bindir} in after.kaem --- sysa/after.kaem | 57 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/sysa/after.kaem b/sysa/after.kaem index 3a689342..eb8a4353 100755 --- a/sysa/after.kaem +++ b/sysa/after.kaem @@ -25,38 +25,37 @@ MES_PKG=mes-0.24 MES_PREFIX=${sysa}/${MES_PKG}/build/${MES_PKG} GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sysa}/${MES_PKG}/build/${NYACC_PKG}/module mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${TMPDIR} -cd ${prefix} # Remove remaining dependencies on /bin (stage0-posix directory) -cp /${ARCH_DIR}/bin/blood-elf bin/blood-elf -cp /${ARCH_DIR}/bin/catm bin/catm -cp /${ARCH_DIR}/bin/chmod bin/chmod -cp /${ARCH_DIR}/bin/get_machine bin/get_machine -cp /${ARCH_DIR}/bin/hex2 bin/hex2 -cp /${ARCH_DIR}/bin/kaem bin/kaem -cp /${ARCH_DIR}/bin/match bin/match -cp /${ARCH_DIR}/bin/M1 bin/M1 -cp /${ARCH_DIR}/bin/M2-Planet bin/M2-Planet -cp /${ARCH_DIR}/bin/mkdir bin/mkdir -cp /${ARCH_DIR}/bin/sha256sum bin/sha256sum -cp /${ARCH_DIR}/bin/ungz bin/ungz -cp /${ARCH_DIR}/bin/untar bin/untar -cp /${ARCH_DIR}/bin/cp bin/cp +cp /${ARCH_DIR}/bin/blood-elf ${bindir}/blood-elf +cp /${ARCH_DIR}/bin/catm ${bindir}/catm +cp /${ARCH_DIR}/bin/chmod ${bindir}/chmod +cp /${ARCH_DIR}/bin/get_machine ${bindir}/get_machine +cp /${ARCH_DIR}/bin/hex2 ${bindir}/hex2 +cp /${ARCH_DIR}/bin/kaem ${bindir}/kaem +cp /${ARCH_DIR}/bin/match ${bindir}/match +cp /${ARCH_DIR}/bin/M1 ${bindir}/M1 +cp /${ARCH_DIR}/bin/M2-Planet ${bindir}/M2-Planet +cp /${ARCH_DIR}/bin/mkdir ${bindir}/mkdir +cp /${ARCH_DIR}/bin/sha256sum ${bindir}/sha256sum +cp /${ARCH_DIR}/bin/ungz ${bindir}/ungz +cp /${ARCH_DIR}/bin/untar ${bindir}/untar +cp /${ARCH_DIR}/bin/cp ${bindir}/cp -chmod 755 bin/blood-elf -chmod 755 bin/catm -chmod 755 bin/chmod -chmod 755 bin/cp -chmod 755 bin/get_machine -chmod 755 bin/hex2 -chmod 755 bin/kaem -chmod 755 bin/match -chmod 755 bin/M1 -chmod 755 bin/M2-Planet -chmod 755 bin/mkdir -chmod 755 bin/sha256sum -chmod 755 bin/ungz -chmod 755 bin/untar +chmod 755 ${bindir}/blood-elf +chmod 755 ${bindir}/catm +chmod 755 ${bindir}/chmod +chmod 755 ${bindir}/cp +chmod 755 ${bindir}/get_machine +chmod 755 ${bindir}/hex2 +chmod 755 ${bindir}/kaem +chmod 755 ${bindir}/match +chmod 755 ${bindir}/M1 +chmod 755 ${bindir}/M2-Planet +chmod 755 ${bindir}/mkdir +chmod 755 ${bindir}/sha256sum +chmod 755 ${bindir}/ungz +chmod 755 ${bindir}/untar PATH=${bindir} From d12d0e0f9c8f53b02621304b7214d24e39f8dac0 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Fri, 20 May 2022 19:48:18 +0300 Subject: [PATCH 2/4] Make bootstrap.cfg available during early bootstrap --- sysa/after.kaem | 83 +++----------------------------------------- sysa/run.kaem | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 79 deletions(-) create mode 100755 sysa/run.kaem diff --git a/sysa/after.kaem b/sysa/after.kaem index eb8a4353..8d0c53a7 100755 --- a/sysa/after.kaem +++ b/sysa/after.kaem @@ -3,6 +3,7 @@ # SPDX-FileCopyrightText: 2021 Andrius Štikonas # SPDX-FileCopyrightText: 2021 Paul Dersey # SPDX-FileCopyrightText: 2020-2022 fosslinux +# SPDX-FileCopyrightText: 2022 Dor Askayo # # SPDX-License-Identifier: GPL-3.0-or-later @@ -19,11 +20,6 @@ libdir=${prefix}/lib incdir=${prefix}/include TMPDIR=/tmp # tmpdir is needed for patch to work -# Environmental variables needed for mes -NYACC_PKG=nyacc-1.00.2 -MES_PKG=mes-0.24 -MES_PREFIX=${sysa}/${MES_PKG}/build/${MES_PKG} -GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sysa}/${MES_PKG}/build/${NYACC_PKG}/module mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${TMPDIR} # Remove remaining dependencies on /bin (stage0-posix directory) @@ -61,78 +57,7 @@ PATH=${bindir} cd ${sysa} -# mes -pkg=${MES_PKG} -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. +catm run2.kaem bootstrap.cfg run.kaem +chmod +x run2.kaem -# tcc 0.9.26 -pkg="tcc-0.9.26" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -libdir=${libdir}/mes - -# make -pkg="make-3.80" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# gzip -pkg="gzip-1.2.4" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# tar -pkg="tar-1.12" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# sed -pkg="sed-4.0.9" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# patch -pkg="patch-2.5.9" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# bzip2 -pkg="bzip2-1.0.8" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# tcc 0.9.27 -pkg="tcc-0.9.27" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# coreutils -pkg="coreutils-5.0" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# heirloom-devtools -pkg="heirloom-devtools-070527" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -# bash -pkg="bash-2.05b" -cd ${pkg} -kaem --file ${pkg}.kaem -cd .. - -exec bash run.sh +kaem --file run2.kaem diff --git a/sysa/run.kaem b/sysa/run.kaem new file mode 100755 index 00000000..78e528e8 --- /dev/null +++ b/sysa/run.kaem @@ -0,0 +1,92 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# SPDX-FileCopyrightText: 2021 Paul Dersey +# SPDX-FileCopyrightText: 2020-2022 fosslinux +# SPDX-FileCopyrightText: 2022 Dor Askayo +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Environmental variables needed for mes +NYACC_PKG=nyacc-1.00.2 +MES_PKG=mes-0.24 +MES_PREFIX=${sysa}/${MES_PKG}/build/${MES_PKG} +GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sysa}/${MES_PKG}/build/${NYACC_PKG}/module + +# mes +pkg=${MES_PKG} +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# tcc 0.9.26 +pkg="tcc-0.9.26" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +libdir=${libdir}/mes + +# make +pkg="make-3.80" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# gzip +pkg="gzip-1.2.4" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# tar +pkg="tar-1.12" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# sed +pkg="sed-4.0.9" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# patch +pkg="patch-2.5.9" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# bzip2 +pkg="bzip2-1.0.8" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# tcc 0.9.27 +pkg="tcc-0.9.27" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# coreutils +pkg="coreutils-5.0" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# heirloom-devtools +pkg="heirloom-devtools-070527" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# bash +pkg="bash-2.05b" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +exec bash run.sh From 18fa6421002b326a309a7d863c6c8229215e7940 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Fri, 20 May 2022 18:10:20 +0300 Subject: [PATCH 3/4] Rename checksums to ${pkg}.checksums --- .reuse/dep5 | 2 +- DEVEL.md | 9 +++------ sysa/bash-2.05b/{checksums => bash-2.05b.checksums} | 0 sysa/bash-2.05b/bash-2.05b.kaem | 2 +- sysa/bzip2-1.0.8/{checksums => bzip2-1.0.8.checksums} | 0 sysa/bzip2-1.0.8/bzip2-1.0.8.kaem | 2 +- .../coreutils-5.0/{checksums => coreutils-5.0.checksums} | 0 sysa/coreutils-5.0/coreutils-5.0.kaem | 2 +- sysa/gzip-1.2.4/{checksums => gzip-1.2.4.checksums} | 0 sysa/gzip-1.2.4/gzip-1.2.4.kaem | 2 +- .../{checksums => heirloom-devtools-070527.checksums} | 0 .../heirloom-devtools-070527.kaem | 2 +- sysa/make-3.80/{checksums => make-3.80.checksums} | 0 sysa/make-3.80/make-3.80.kaem | 2 +- sysa/mes-0.24/{checksums => mes-0.24.checksums} | 0 sysa/mes-0.24/mes-0.24.kaem | 2 +- sysa/patch-2.5.9/{checksums => patch-2.5.9.checksums} | 0 sysa/patch-2.5.9/patch-2.5.9.kaem | 2 +- sysa/sed-4.0.9/{checksums => sed-4.0.9.checksums} | 0 sysa/sed-4.0.9/sed-4.0.9.kaem | 2 +- sysa/tar-1.12/{checksums => tar-1.12.checksums} | 0 sysa/tar-1.12/tar-1.12.kaem | 2 +- sysa/tcc-0.9.26/{checksums => tcc-0.9.26.checksums} | 0 sysa/tcc-0.9.26/tcc-0.9.26.kaem | 2 +- sysa/tcc-0.9.27/{checksums => tcc-0.9.27.checksums} | 0 sysa/tcc-0.9.27/tcc-0.9.27.kaem | 2 +- 26 files changed, 16 insertions(+), 19 deletions(-) rename sysa/bash-2.05b/{checksums => bash-2.05b.checksums} (100%) rename sysa/bzip2-1.0.8/{checksums => bzip2-1.0.8.checksums} (100%) rename sysa/coreutils-5.0/{checksums => coreutils-5.0.checksums} (100%) rename sysa/gzip-1.2.4/{checksums => gzip-1.2.4.checksums} (100%) rename sysa/heirloom-devtools-070527/{checksums => heirloom-devtools-070527.checksums} (100%) rename sysa/make-3.80/{checksums => make-3.80.checksums} (100%) rename sysa/mes-0.24/{checksums => mes-0.24.checksums} (100%) rename sysa/patch-2.5.9/{checksums => patch-2.5.9.checksums} (100%) rename sysa/sed-4.0.9/{checksums => sed-4.0.9.checksums} (100%) rename sysa/tar-1.12/{checksums => tar-1.12.checksums} (100%) rename sysa/tcc-0.9.26/{checksums => tcc-0.9.26.checksums} (100%) rename sysa/tcc-0.9.27/{checksums => tcc-0.9.27.checksums} (100%) diff --git a/.reuse/dep5 b/.reuse/dep5 index 6f9bcc45..d2344cc5 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -9,6 +9,6 @@ Source: https://github.com/fosslinux/live-bootstrap # Copyright: $YEAR $NAME <$CONTACT> # License: ... -Files: SHA256SUMS.sources sysa/pre-sha.sha256sums sysa/*/checksums sysa/SHA256SUMS.pkgs +Files: SHA256SUMS.sources sysa/pre-sha.sha256sums sysa/*/*.checksums sysa/SHA256SUMS.pkgs Copyright: none License: MIT diff --git a/DEVEL.md b/DEVEL.md index 87e4d2e2..e1d575e0 100644 --- a/DEVEL.md +++ b/DEVEL.md @@ -40,7 +40,7 @@ It then diverges based upon which driver is being used: There are default functions run which can be overridden by an optional script `package-version.sh` within the package-specific directory. -In this folder, there are other folders/files. `src` and `checksums` are +In this folder, there are other folders/files. `src` and `*.checksums` are required, others are optional. Permissable folders/files: @@ -50,11 +50,8 @@ Permissable folders/files: - `patches`: patches for the source. - `src`: the upstream unmodified source code. This may be either a submodule or nonexistent. -- `checksums`: the checksums for the resulting binaries and libraries that - are compiled and installed. This may be either a folder or a file. It should - be a folder when there are multiple checksumming files required (normally - multiple seperate passes) but a file when there is only one checksumming - file. +- `*.checksums`: files containing the checksums for the resulting binaries and +libraries that are compiled and installed. - Up to and including `patch`, `fletcher16` is used for the checksumming. - After `patch`, `sha-2` is built which contains an external implementation of `sha256sum`. We then use that currently for all remaining software. diff --git a/sysa/bash-2.05b/checksums b/sysa/bash-2.05b/bash-2.05b.checksums similarity index 100% rename from sysa/bash-2.05b/checksums rename to sysa/bash-2.05b/bash-2.05b.checksums diff --git a/sysa/bash-2.05b/bash-2.05b.kaem b/sysa/bash-2.05b/bash-2.05b.kaem index b6ac4ebb..33c44158 100755 --- a/sysa/bash-2.05b/bash-2.05b.kaem +++ b/sysa/bash-2.05b/bash-2.05b.kaem @@ -51,4 +51,4 @@ ln -s ${prefix}/bin/bash ${prefix}/bin/sh cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/bzip2-1.0.8/checksums b/sysa/bzip2-1.0.8/bzip2-1.0.8.checksums similarity index 100% rename from sysa/bzip2-1.0.8/checksums rename to sysa/bzip2-1.0.8/bzip2-1.0.8.checksums diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem index d2cfd704..28fa0ef0 100755 --- a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem +++ b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem @@ -35,4 +35,4 @@ bzip2 --help cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/coreutils-5.0/checksums b/sysa/coreutils-5.0/coreutils-5.0.checksums similarity index 100% rename from sysa/coreutils-5.0/checksums rename to sysa/coreutils-5.0/coreutils-5.0.checksums diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/sysa/coreutils-5.0/coreutils-5.0.kaem index ad718214..8f1c4499 100755 --- a/sysa/coreutils-5.0/coreutils-5.0.kaem +++ b/sysa/coreutils-5.0/coreutils-5.0.kaem @@ -38,4 +38,4 @@ cd ../.. rm -r src/ # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/gzip-1.2.4/checksums b/sysa/gzip-1.2.4/gzip-1.2.4.checksums similarity index 100% rename from sysa/gzip-1.2.4/checksums rename to sysa/gzip-1.2.4/gzip-1.2.4.checksums diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.kaem b/sysa/gzip-1.2.4/gzip-1.2.4.kaem index d5f0c005..e73404d0 100755 --- a/sysa/gzip-1.2.4/gzip-1.2.4.kaem +++ b/sysa/gzip-1.2.4/gzip-1.2.4.kaem @@ -37,4 +37,4 @@ chmod 755 ${bindir}/gunzip cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/heirloom-devtools-070527/checksums b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums similarity index 100% rename from sysa/heirloom-devtools-070527/checksums rename to sysa/heirloom-devtools-070527/heirloom-devtools-070527.checksums diff --git a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem index 8605eae1..665c66dc 100755 --- a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem +++ b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem @@ -44,4 +44,4 @@ install -m 644 ncform ${lexdir} cd ../../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/make-3.80/checksums b/sysa/make-3.80/make-3.80.checksums similarity index 100% rename from sysa/make-3.80/checksums rename to sysa/make-3.80/make-3.80.checksums diff --git a/sysa/make-3.80/make-3.80.kaem b/sysa/make-3.80/make-3.80.kaem index 5f5dc1d5..8936f779 100755 --- a/sysa/make-3.80/make-3.80.kaem +++ b/sysa/make-3.80/make-3.80.kaem @@ -55,4 +55,4 @@ make --version cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/mes-0.24/checksums b/sysa/mes-0.24/mes-0.24.checksums similarity index 100% rename from sysa/mes-0.24/checksums rename to sysa/mes-0.24/mes-0.24.checksums diff --git a/sysa/mes-0.24/mes-0.24.kaem b/sysa/mes-0.24/mes-0.24.kaem index ab722023..d0e5792e 100755 --- a/sysa/mes-0.24/mes-0.24.kaem +++ b/sysa/mes-0.24/mes-0.24.kaem @@ -316,4 +316,4 @@ cp include/sys/wait.h ${incdir}/sys/wait.h # Checksums cd ../.. -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/patch-2.5.9/checksums b/sysa/patch-2.5.9/patch-2.5.9.checksums similarity index 100% rename from sysa/patch-2.5.9/checksums rename to sysa/patch-2.5.9/patch-2.5.9.checksums diff --git a/sysa/patch-2.5.9/patch-2.5.9.kaem b/sysa/patch-2.5.9/patch-2.5.9.kaem index 1094ff00..4805c7cc 100755 --- a/sysa/patch-2.5.9/patch-2.5.9.kaem +++ b/sysa/patch-2.5.9/patch-2.5.9.kaem @@ -34,4 +34,4 @@ chmod 755 ${prefix}/bin/patch cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/sed-4.0.9/checksums b/sysa/sed-4.0.9/sed-4.0.9.checksums similarity index 100% rename from sysa/sed-4.0.9/checksums rename to sysa/sed-4.0.9/sed-4.0.9.checksums diff --git a/sysa/sed-4.0.9/sed-4.0.9.kaem b/sysa/sed-4.0.9/sed-4.0.9.kaem index a5ead71b..8670bf91 100755 --- a/sysa/sed-4.0.9/sed-4.0.9.kaem +++ b/sysa/sed-4.0.9/sed-4.0.9.kaem @@ -31,4 +31,4 @@ chmod 755 ${prefix}/bin/sed cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/tar-1.12/checksums b/sysa/tar-1.12/tar-1.12.checksums similarity index 100% rename from sysa/tar-1.12/checksums rename to sysa/tar-1.12/tar-1.12.checksums diff --git a/sysa/tar-1.12/tar-1.12.kaem b/sysa/tar-1.12/tar-1.12.kaem index 18535f35..10b5e5c5 100755 --- a/sysa/tar-1.12/tar-1.12.kaem +++ b/sysa/tar-1.12/tar-1.12.kaem @@ -34,4 +34,4 @@ chmod 755 ${prefix}/bin/tar cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/tcc-0.9.26/checksums b/sysa/tcc-0.9.26/tcc-0.9.26.checksums similarity index 100% rename from sysa/tcc-0.9.26/checksums rename to sysa/tcc-0.9.26/tcc-0.9.26.checksums diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.kaem b/sysa/tcc-0.9.26/tcc-0.9.26.kaem index 9975b1cf..9a1ce03d 100755 --- a/sysa/tcc-0.9.26/tcc-0.9.26.kaem +++ b/sysa/tcc-0.9.26/tcc-0.9.26.kaem @@ -388,4 +388,4 @@ tcc -ar cr ${libdir}/libgetopt.a getopt.o cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums diff --git a/sysa/tcc-0.9.27/checksums b/sysa/tcc-0.9.27/tcc-0.9.27.checksums similarity index 100% rename from sysa/tcc-0.9.27/checksums rename to sysa/tcc-0.9.27/tcc-0.9.27.checksums diff --git a/sysa/tcc-0.9.27/tcc-0.9.27.kaem b/sysa/tcc-0.9.27/tcc-0.9.27.kaem index 09550515..181b3c68 100755 --- a/sysa/tcc-0.9.27/tcc-0.9.27.kaem +++ b/sysa/tcc-0.9.27/tcc-0.9.27.kaem @@ -47,4 +47,4 @@ tcc -version cd ../.. # Checksums -sha256sum -c checksums +sha256sum -c ${pkg}.checksums From 653f31b59feeaacc95039e3a58b94676643904b9 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Fri, 20 May 2022 17:55:35 +0300 Subject: [PATCH 4/4] Add support for --update-checksums in early bootstrap This allows creating *.checksums files instead of checking against them when UPDATE_CHECKSUMS is set to True in bootstrap.cfg. The checksums are also copied to /usr/src so they can be accessed easily after the bootstrap completes. --- sysa/after.kaem | 3 +- sysa/bash-2.05b/bash-2.05b.kaem | 9 ++- sysa/bzip2-1.0.8/bzip2-1.0.8.kaem | 9 ++- sysa/coreutils-5.0/coreutils-5.0.kaem | 62 ++++++++++++++++++- sysa/gzip-1.2.4/gzip-1.2.4.kaem | 9 ++- .../heirloom-devtools-070527.kaem | 13 +++- sysa/make-3.80/make-3.80.kaem | 9 ++- sysa/mes-0.24/mes-0.24.kaem | 25 +++++++- sysa/patch-2.5.9/patch-2.5.9.kaem | 9 ++- sysa/run.sh | 11 ++-- sysa/sed-4.0.9/sed-4.0.9.kaem | 9 ++- sysa/tar-1.12/tar-1.12.kaem | 9 ++- sysa/tcc-0.9.26/tcc-0.9.26.kaem | 21 ++++++- sysa/tcc-0.9.27/tcc-0.9.27.kaem | 9 ++- 14 files changed, 187 insertions(+), 20 deletions(-) diff --git a/sysa/after.kaem b/sysa/after.kaem index 8d0c53a7..c356beca 100755 --- a/sysa/after.kaem +++ b/sysa/after.kaem @@ -18,9 +18,10 @@ prefix=/usr bindir=${prefix}/bin libdir=${prefix}/lib incdir=${prefix}/include +srcdir=${prefix}/src TMPDIR=/tmp # tmpdir is needed for patch to work -mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${TMPDIR} +mkdir -p ${prefix} ${bindir} ${libdir} ${incdir} ${srcdir} ${TMPDIR} # Remove remaining dependencies on /bin (stage0-posix directory) cp /${ARCH_DIR}/bin/blood-elf ${bindir}/blood-elf diff --git a/sysa/bash-2.05b/bash-2.05b.kaem b/sysa/bash-2.05b/bash-2.05b.kaem index 33c44158..b883f9d5 100755 --- a/sysa/bash-2.05b/bash-2.05b.kaem +++ b/sysa/bash-2.05b/bash-2.05b.kaem @@ -51,4 +51,11 @@ ln -s ${prefix}/bin/bash ${prefix}/bin/sh cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/bash + + install ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem index 28fa0ef0..ef295ccc 100755 --- a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem +++ b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem @@ -35,4 +35,11 @@ bzip2 --help cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/bzip2 + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/sysa/coreutils-5.0/coreutils-5.0.kaem index 8f1c4499..3550c76a 100755 --- a/sysa/coreutils-5.0/coreutils-5.0.kaem +++ b/sysa/coreutils-5.0/coreutils-5.0.kaem @@ -38,4 +38,64 @@ cd ../.. rm -r src/ # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/install \ + /usr/bin/basename \ + /usr/bin/cat \ + /usr/bin/chmod \ + /usr/bin/cksum \ + /usr/bin/cp \ + /usr/bin/csplit \ + /usr/bin/cut \ + /usr/bin/echo \ + /usr/bin/expand \ + /usr/bin/factor \ + /usr/bin/false \ + /usr/bin/fmt \ + /usr/bin/fold \ + /usr/bin/head \ + /usr/bin/id \ + /usr/bin/join \ + /usr/bin/kill \ + /usr/bin/link \ + /usr/bin/ln \ + /usr/bin/logname \ + /usr/bin/mkfifo \ + /usr/bin/mkdir \ + /usr/bin/mknod \ + /usr/bin/nl \ + /usr/bin/od \ + /usr/bin/paste \ + /usr/bin/pathchk \ + /usr/bin/printf \ + /usr/bin/ptx \ + /usr/bin/pwd \ + /usr/bin/readlink \ + /usr/bin/rmdir \ + /usr/bin/seq \ + /usr/bin/sleep \ + /usr/bin/split \ + /usr/bin/sum \ + /usr/bin/tail \ + /usr/bin/tee \ + /usr/bin/tr \ + /usr/bin/tsort \ + /usr/bin/unexpand \ + /usr/bin/unlink \ + /usr/bin/wc \ + /usr/bin/whoami \ + /usr/bin/test \ + /usr/bin/touch \ + /usr/bin/true \ + /usr/bin/yes \ + /usr/bin/ls \ + /usr/bin/md5sum \ + /usr/bin/mv \ + /usr/bin/rm \ + /usr/bin/sha1sum + + install ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.kaem b/sysa/gzip-1.2.4/gzip-1.2.4.kaem index e73404d0..adbb0eac 100755 --- a/sysa/gzip-1.2.4/gzip-1.2.4.kaem +++ b/sysa/gzip-1.2.4/gzip-1.2.4.kaem @@ -37,4 +37,11 @@ chmod 755 ${bindir}/gunzip cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/gzip + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem index 665c66dc..1c7848ea 100755 --- a/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem +++ b/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem @@ -44,4 +44,15 @@ install -m 644 ncform ${lexdir} cd ../../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/yacc \ + /usr/bin/lex \ + /usr/lib/mes/libl.a \ + /yaccpar \ + /lex/ncform + + install ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/make-3.80/make-3.80.kaem b/sysa/make-3.80/make-3.80.kaem index 8936f779..157660de 100755 --- a/sysa/make-3.80/make-3.80.kaem +++ b/sysa/make-3.80/make-3.80.kaem @@ -55,4 +55,11 @@ make --version cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/make + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/mes-0.24/mes-0.24.kaem b/sysa/mes-0.24/mes-0.24.kaem index d0e5792e..56953ef3 100755 --- a/sysa/mes-0.24/mes-0.24.kaem +++ b/sysa/mes-0.24/mes-0.24.kaem @@ -314,6 +314,27 @@ cp include/sys/ucontext.h ${incdir}/sys/ucontext.h cp include/sys/user.h ${incdir}/sys/user.h cp include/sys/wait.h ${incdir}/sys/wait.h -# Checksums cd ../.. -sha256sum -c ${pkg}.checksums + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/mes \ + /usr/bin/mes-m2 \ + /usr/bin/mescc.scm \ + /usr/lib/x86-mes/crt1.s \ + /usr/lib/x86-mes/crt1.o \ + /usr/lib/x86-mes/x86.M1 \ + /usr/lib/x86-mes/libmescc.s \ + /usr/lib/x86-mes/libc+tcc.s \ + /usr/lib/x86-mes/libc.s \ + /usr/lib/x86-mes/libmescc.a \ + /usr/lib/x86-mes/libc+tcc.a \ + /usr/lib/x86-mes/libc.a \ + /usr/lib/linux/x86-mes/elf32-header.hex2 \ + /usr/lib/linux/x86-mes/elf32-footer-single-main.hex2 + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/patch-2.5.9/patch-2.5.9.kaem b/sysa/patch-2.5.9/patch-2.5.9.kaem index 4805c7cc..4653dd77 100755 --- a/sysa/patch-2.5.9/patch-2.5.9.kaem +++ b/sysa/patch-2.5.9/patch-2.5.9.kaem @@ -34,4 +34,11 @@ chmod 755 ${prefix}/bin/patch cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/patch + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/run.sh b/sysa/run.sh index 7b6a5ee5..192ec612 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -16,19 +16,18 @@ export PREFIX="${prefix}" export SOURCES="${sysa}" export DISTFILES="${sysa}/distfiles" export DESTDIR=/tmp/destdir -export REPO="${PREFIX}/src/repo" +# shellcheck disable=SC2154 +export SRCDIR="${srcdir}" create_sysb() { # Copy everything in echo "Creating sysb rootfs" mkdir -p "/sysb${PREFIX}" - for d in bin include lib libexec share; do + for d in bin include lib libexec share src; do # Minimise RAM (storage) use - use hard links cp -rl "${PREFIX}/${d}" "/sysb${PREFIX}/${d}" done - mkdir /sysb/usr/src - cp "${SOURCES}/helpers.sh" "${SOURCES}/SHA256SUMS.pkgs" "${SOURCES}/bootstrap.cfg" /sysb/usr/src/ - cp -rl "${REPO}" "/sysb/${REPO}" + cp "${SOURCES}/helpers.sh" "${SOURCES}/SHA256SUMS.pkgs" "${SOURCES}/bootstrap.cfg" "/sysb/${SRCDIR}" populate_device_nodes /sysb echo "Creating sysb initramfs" gen_initramfs_list.sh -o "${PREFIX}/boot/initramfs-sysb.cpio.gz" /sysb @@ -101,7 +100,7 @@ echo "Thank you! All done." echo "ARCH=${ARCH}" >> "${SOURCES}/bootstrap.cfg" -mkdir -p "${DESTDIR}" "${REPO}" /dev +mkdir -p "${DESTDIR}" "${SRCDIR}/repo" /dev build flex-2.5.11 diff --git a/sysa/sed-4.0.9/sed-4.0.9.kaem b/sysa/sed-4.0.9/sed-4.0.9.kaem index 8670bf91..4ba79d4d 100755 --- a/sysa/sed-4.0.9/sed-4.0.9.kaem +++ b/sysa/sed-4.0.9/sed-4.0.9.kaem @@ -31,4 +31,11 @@ chmod 755 ${prefix}/bin/sed cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/sed + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/tar-1.12/tar-1.12.kaem b/sysa/tar-1.12/tar-1.12.kaem index 10b5e5c5..527b25d8 100755 --- a/sysa/tar-1.12/tar-1.12.kaem +++ b/sysa/tar-1.12/tar-1.12.kaem @@ -34,4 +34,11 @@ chmod 755 ${prefix}/bin/tar cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/tar + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/tcc-0.9.26/tcc-0.9.26.kaem b/sysa/tcc-0.9.26/tcc-0.9.26.kaem index 9a1ce03d..d08de005 100755 --- a/sysa/tcc-0.9.26/tcc-0.9.26.kaem +++ b/sysa/tcc-0.9.26/tcc-0.9.26.kaem @@ -388,4 +388,23 @@ tcc -ar cr ${libdir}/libgetopt.a getopt.o cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/mes-tcc \ + /usr/bin/boot0-tcc \ + /usr/bin/boot1-tcc \ + /usr/bin/boot2-tcc \ + /usr/bin/boot3-tcc \ + /usr/bin/boot4-tcc \ + /usr/bin/tcc \ + /usr/lib/mes/libc.a \ + /usr/lib/mes/libgetopt.a \ + /usr/lib/mes/crt1.o \ + /usr/lib/mes/crti.o \ + /usr/lib/mes/crtn.o \ + /usr/lib/mes/tcc/libtcc1.a + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi diff --git a/sysa/tcc-0.9.27/tcc-0.9.27.kaem b/sysa/tcc-0.9.27/tcc-0.9.27.kaem index 181b3c68..7c5dcc43 100755 --- a/sysa/tcc-0.9.27/tcc-0.9.27.kaem +++ b/sysa/tcc-0.9.27/tcc-0.9.27.kaem @@ -47,4 +47,11 @@ tcc -version cd ../.. # Checksums -sha256sum -c ${pkg}.checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/tcc + + cp ${pkg}.checksums ${srcdir} +else + sha256sum -c ${pkg}.checksums +fi