Implement sha256summing in bash build harness

1. Adds sha256sum stage to the bash build harness.
2. Adds a third argument to build(), the checksum file name. This is
   used where there is more than one checksum file, most notably
   in multi-stage compilations.
3. Adds checksum files to all remaining programs.
4. Adds appropriate 3rd argument where needed (coreutils, tcc-musl,
   bison).
This commit is contained in:
fosslinux 2021-02-18 18:29:58 +11:00
parent 8724c94d20
commit 77ccf06efc
14 changed files with 93 additions and 5 deletions

View File

@ -0,0 +1 @@
6fe2a7c7493480b8ba6d1145d10b5dc97f0d11d10c0da7c96e939a334e4aefad /after/bin/bison

View File

@ -0,0 +1 @@
0d95976908f41c34195d634863144acf9ae0b1d2c04647fdf5cfd3103beec4dd /after/bin/bison

View File

@ -0,0 +1 @@
b02a549930ed891d40ef85060e3d0ae1d681830d7962237a9d99c6eeea23f4ef /after/bin/bison

View File

@ -0,0 +1,54 @@
e72c5b0ebff9c8f72cd40355eb6baed175bbfc3addaa16ec6085e6a0e850a028 /after/bin/install
ad6bf7547d6b38b3ccd2ae389ae4fd8a31a57138507b289305ad40d2d1b640ba /after/bin/basename
182ed1dd7bada465e34ef89af126119a4f02b4a9a1ab77ddb3d59fe366115d71 /after/bin/cat
9d5e12cd79d3e5fac23205d09ee2d26dc6070c2fab06e86e03c048b4b810fc35 /after/bin/chmod
4baa1a727b4cb9739e8095fa205d21ec14543a5ca2660c4c5e187848c8b6285e /after/bin/cksum
57c4bc1e89be122e7269d5306f90317082346d5cf9f1b7ce8210664911a1d2c0 /after/bin/csplit
8b8f0c8ab7538f6d972f6e13c1d3b51b3a2b09185f649471d018c77813b0f208 /after/bin/cut
21eecaacde1c44ae6bb944743d7bc61806bcb3fe24f792a1da1fced1f6a2d5a1 /after/bin/echo
c6c56ca458452782a7014c194b4001e13b89a1cdae42f699f42e527c535e6b30 /after/bin/expand
b5bb5ba4d52da5e86d8fc80c831a229cc4c057644e886c367711eab571cf8aec /after/bin/factor
25ab087dad2bdec3d8a0c51b93f1aec42516085905232b908dd19ac620727932 /after/bin/false
1fabff3d2bc61990fd94f9ed5055032cad1b3982a6effaaaed9d76d553708e17 /after/bin/fmt
ca21a324c2628d66994c19f444739d112246ade4eaaac71ab76f41751b5c6f9f /after/bin/fold
6b7b368cec7d0402c0cd17f1d59066dbf46c81345435cf994046e1f535853808 /after/bin/head
9afae9c301cbcfd25bc50efe47f92a90be8801772f83f6455197048df0161f42 /after/bin/id
dc62c58ca836141a6476135c9a20b01aa75f4403ffff0dc08675d285f2c31730 /after/bin/join
e8eaf3838c0ebd70f3ef5b475fcbe32771e1fd16db57a780212ff01af829b8be /after/bin/kill
9160804d2a84af504ce9ccb793b511b114b33e67b71e282101a7c85a5d1eb827 /after/bin/link
a9696d75821b2964b29c0a2f896964ac5bd723509ba940903f5d3e5a4ae28cc7 /after/bin/ln
66cc6ec8440ac2635c3e8c8a93618448a3b0ac32a2828d2c58ea4b04c43a0624 /after/bin/logname
0c006ee959d0bb585449e8cc03c7a4e8bef654d548f8e65adcf5d7c116828320 /after/bin/mkfifo
e8ce9b04108e6faeaf4e506e98ccb42d501af0c5c7b999ada0ac589eeef8e076 /after/bin/mkdir
696a2c4448890691317e9d2fd6097b635d9825e80eb4dde0430a617d68b7e2bf /after/bin/mknod
779f4108063fbbf2026f2948f6caf52dc834b4a22f74e43b3ebfce15ef111061 /after/bin/nl
a0b6658f0f27fbf753cd4617d33f1f9e82bb973d342e83e229ce48c09d5e8d86 /after/bin/od
fe7afbb1ac9144cfd13bf8955f0474740a192de00f37dc4f549032b74013422f /after/bin/paste
bbc99502af4745aeb45989adc055dc3d24d86b4f43ba63178b6e39912ee19750 /after/bin/pathchk
5860714658263857e0b8061d7d483b1a83e25935e45e47b8430465e1f751b908 /after/bin/printf
b43ab09f2edd05645e59a5b9be05ae0bf30d7b38585c59bc25ec46ef3c82f327 /after/bin/ptx
d3d0223c690358d5c392619396cec73dad97a84efbfcf959c7507efd0aef5708 /after/bin/pwd
53c504ac4df5e12bbc345a6ee78d3eb8f916263ae464d694d9e0f8334ff976f6 /after/bin/readlink
b58288bcad22f69ad34e1a91e1a5dc67544589f62b38bbff95a057f5600cefe2 /after/bin/rmdir
7871b2d181bf1c4460b0f78b91fc0ae6ccc9528bc7ae941367b066cb7b72cd0e /after/bin/seq
b1d8b246b3306cfc2491c81cf00969396e1ec5cfd3fa73012aa8fed0ce1446b0 /after/bin/sleep
8bf47b44f6a506ffed5d0f69791adc8463968b5562413186dd8a71ee595d26ee /after/bin/split
ae10f35493f3d275af4ffe70281ecbc72b047ed7d48620a9109e60c159a3c36b /after/bin/sum
10083826d7cb1a42e7061811f20548e4d24432b3e646f6d0ab537c0db6dabd48 /after/bin/tail
48558bc37919c524a1cbe674142484cc1027bf0010d3f68fb93403fc148de9d3 /after/bin/tee
0455bd0c814663287a2807bf78859d5f43aa7a2490c4da0c07d29a32df772dca /after/bin/touch
f31fd1fc30d2e0b16a37b277f4fe608f6a756cc4d09312d84f6a9ff86054eb38 /after/bin/tr
edc3b88d1de07f5ba7f59cf1e131476907ce59739ab2181bfd31d1ace2ee8a25 /after/bin/tsort
b68e707c10d51d4c7fce328e7619011d8baf6605df1058d9dd513e8671447fe7 /after/bin/unexpand
67900322d337e18a6782c5e81643a099c8775b1a4200eeb6808409db6e62eabf /after/bin/unlink
6201303021c9d6dffa796c50fec6e8f199efd5d00328373248531b6ec5ae27c7 /after/bin/wc
5de85a50c357e6450d616970479fa24c9965c5ce0c7f05da337d96510653811e /after/bin/whoami
4ed60b9f4dd8b7909fb69f07f5120e62b22eed0a746bb28139fab560538f2544 /after/bin/test
8165613f96eddbb107cf0a263789fa135a7a26c016bbcd2d69891294025a7fba /after/bin/true
82938399bdc017d8b60de8e22894c6b8cb7e377d4c72372b9126feaa7c9d1759 /after/bin/yes
c66b7e80bcfc8169d661a3b8529f179637c4df3441355a19cc900ba5e7c62cfb /after/bin/ls
e72c5b0ebff9c8f72cd40355eb6baed175bbfc3addaa16ec6085e6a0e850a028 /after/bin/install
ad7403999d4d48d30bb49f7433998a31e852ecb34242ebac9f7d09d4e8dfa25c /after/bin/md5sum
b7b46fd6f6a1c4871f76a35565ae94706a1f60ee645d5754d8c326ae9ca97117 /after/bin/mv
1bc536cd595734a9f85524eaed18f5d1127bde3e74337bdf348108225552975a /after/bin/rm
d84999007c0f75f8ed1aef1273b251bac868f4f2f5f6486a9ee1a0c04d95b1be /after/bin/sha1sum

View File

@ -0,0 +1,2 @@
4e02244d35aec2a439e67805574ff945aec2fbb5c20fc6d7aabe46e9c1ba09e9 /after/bin/cmp
b5c4cf04c70c93a26d61589671ea7e1dcb3bc3f1a565720a328d6d80e314538d /after/bin/diff

View File

@ -0,0 +1 @@
122a20639d0733b34421d12e1ec45341317916c5b0a798410d4a25481fc39d2b /after/bin/flex

View File

@ -0,0 +1 @@
cf92dbc55dd58f4212443e998635bab855422391ad40e97ec67fb266f07d849d /after/bin/flex

View File

@ -0,0 +1 @@
44a4f40de252c9c50ed45760a7a317934909c91eae904c59fa266d81da85fe56 /after/bin/gawk

1
sysa/grep-2.4/checksums Normal file
View File

@ -0,0 +1 @@
1acd145236315018b46591a3a9bb5f86f995ad318cca6d34ee8e25db81478d92 /after/bin/grep

View File

@ -1,6 +1,8 @@
#!/bin/bash -e
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
export PATH=/after/bin
@ -8,12 +10,14 @@ export PATH=/after/bin
# Common build steps
# Build function provides a few common stages with default implementation
# that can be overridden on per package basis in the build script.
# build takes two arguments:
# build takes three arguments:
# 1) name-version of the package
# 2) optionally specify build script. Default is name-version.sh
# 3) optionally specify name of checksum file. Default is checksums
build () {
pkg=$1
script_name=${2:-${pkg}.sh}
checksum_f=${3:-checksums}
cd "$pkg" || (echo "Cannot cd into ${pkg}!"; kill $$)
echo "${pkg}: beginning build using script ${script_name}"
@ -52,6 +56,9 @@ build () {
cd ../..
echo "${pkg}: checksumming installed files."
sha256sum -c "${checksum_f}"
echo "${pkg}: build successful"
cd ..

1
sysa/m4-1.4.7/checksums Normal file
View File

@ -0,0 +1 @@
58b1e4d808fd498aad2a19eabe06527f588508d45f0d10925295c73259ef4062 /after/bin/m4

View File

@ -0,0 +1,14 @@
457fff81b3188b82621f3ae49847ebc60128017fcbdba012245169af76cf122a /after/lib/musl/crt1.o
e3560c563125643467b29842db7984ccd1ecd3a6010358f9096674e199e36e05 /after/lib/musl/crti.o
b3a8cf971e9870bc3b2aa8fb8fc082b6a222cc0540a70f122a76ac6ced9151d0 /after/lib/musl/crtn.o
972db16d0c35619e1a12cfbaa1a500d97836b2850b6d93a08bf4e30e7cc377dc /after/lib/musl/libc.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libcrypt.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libdl.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libm.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libpthread.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libresolv.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/librt.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libutil.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libxnet.a
b60b59a94f10f039977cea2cea6f15b55b402b25df2e1b2a4e83fa84ccf2fd43 /after/lib/musl/rcrt1.o
a50500329680bed4dcc5ec3891fd50f65af9cae7de0b8e8fe925c37f1c6bb16b /after/lib/musl/Scrt1.o

View File

@ -1,6 +1,8 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e
@ -25,9 +27,9 @@ build m4-1.4.7
build flex-2.6.4
# Part 25
build bison-3.4.1 stage1.sh
build bison-3.4.1 stage2.sh
build bison-3.4.1 stage3.sh
build bison-3.4.1 stage1.sh checksums/stage1
build bison-3.4.1 stage2.sh checksums/stage2
build bison-3.4.1 stage3.sh checksums/stage3
# Part 26
build grep-2.4
@ -36,7 +38,7 @@ build grep-2.4
build diffutils-2.7
# Part 28
build coreutils-5.0
build coreutils-5.0 coreutils-5.0.sh checksums/pass2
# Part 29
build gawk-3.0.4

View File

@ -0,0 +1 @@
9819c29a2c8259883b4a97d6b57f2fdac87b9807ba9594f7c063601a7fe84af9 /after/bin/tcc-musl