commit: e31ae5a8f9f283fec5c1717a90ebb4767a17ee24
parent df9e9e125c7bc84b5cd0530d16b2fa1ba47ad95d
Author: Andrius Štikonas <andrius@stikonas.eu>
Date: Mon, 15 Mar 2021 22:33:40 +0000
Merge pull request #68 from pder/sed-after-tar-and-gzip
Sed after tar and gzip
Diffstat:
13 files changed, 55 insertions(+), 42 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -24,9 +24,6 @@
[submodule "sysa/tcc-0.9.27/src/tcc-0.9.27"]
path = sysa/tcc-0.9.27/src/tcc-0.9.27
url = git://repo.or.cz/tinycc.git
-[submodule "sysa/sed-4.0.7/src"]
- path = sysa/sed-4.0.7/src
- url = https://git.savannah.gnu.org/git/sed/sed-history.git
[submodule "sysa/tcc-0.9.26/src/mes-libc"]
path = sysa/tcc-0.9.26/src/mes-libc
url = https://gitlab.com/janneke/mes
diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources
@@ -27,6 +27,7 @@ ecb5c6469d732bcf01d6ec1afe9e64f1668caba5bfdb103c28d7f537ba3cdb8a patch-2.5.9.ta
1184478b298978b164a383ed5661e3a117c48ab97d6d0ab7ef614cdbe918b9eb perl5.004_05.tar.gz
93f41cd87ab8ee83391cfa39a63b076adeb7c3501d2efa31b98d0ef037122bd1 perl5.005_03.tar.gz
a5e66f6ebf701b0567f569f57cae82abf5ce57af70a2b45ae71323b61f49134e perl-5.6.2.tar.gz
+63ec0437ab1c3d62e8d63f8e6d604456c695bfcbe9297021ecc607fd90fd0da0 sed-4.0.7.tar.gz
c365874794187f8444e5d22998cd5888ffa47f36def4b77517a808dec27c0600 sed-4.0.9.tar.gz
404a8d72427a559c074e581bf8f7d5a73283faf249cd3faf6dc1c6faf97d07c7 sha-2-61555d.tar.gz
c6c37e888b136ccefab903c51149f4b7bd659d69d4aea21245f61053a57aa60a tar-1.12.tar.gz
diff --git a/parts.rst b/parts.rst
@@ -98,11 +98,6 @@ old GNU software, using older versions compilable by tinycc. Prior to
this point, all tools have been adapted significantly for the bootstrap;
now, we will be using old tooling instead.
-sed 4.0.7
-=========
-
-You are most likely aware of GNU ``sed``, a line editor.
-
tar 1.12
========
@@ -116,11 +111,15 @@ gzip 1.2.4
``gzip`` is the most common compression format used for software source
code. It is luckily distributed as a barebones uncompressed ``.tar``,
-which we extract and then build. We do require deletion of a few lines
-unsupported by mes libc.
+which we extract and then build.
Going forward, we can now use ``.tar.gz`` for source code.
+sed 4.0.7
+=========
+
+You are most likely aware of GNU ``sed``, a line editor.
+
patch 2.5.9
===========
diff --git a/rootfs.sh b/rootfs.sh
@@ -101,9 +101,6 @@ popd
# tcc 0.9.27
cp -r tcc-0.9.27 tmp/after/
-# sed 4.0.7
-cp -r sed-4.0.7 tmp/after/
-
# tar 1.12
url=https://ftp.gnu.org/gnu/tar/tar-1.12.tar.gz
cp -r tar-1.12 tmp/after
@@ -141,6 +138,9 @@ get_file() {
# gzip 1.2.4
get_file https://ftp.gnu.org/gnu/gzip/gzip-1.2.4.tar 1
+# sed 4.0.7
+get_file https://ftp.gnu.org/gnu/sed/sed-4.0.7.tar.gz 1
+
# patch 2.5.9
get_file https://ftp.gnu.org/pub/gnu/patch/patch-2.5.9.tar.gz 1
diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run
@@ -56,12 +56,6 @@ cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
-# sed
-pkg="sed-4.0.7"
-cd ${pkg}
-kaem --file ${pkg}.kaem
-cd ..
-
# tar
pkg="tar-1.12"
cd ${pkg}
@@ -74,6 +68,12 @@ cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
+# sed
+pkg="sed-4.0.7"
+cd ${pkg}
+kaem --file ${pkg}.kaem
+cd ..
+
# patch
pkg="patch-2.5.9"
cd ${pkg}
diff --git a/sysa/gzip-1.2.4/checksums b/sysa/gzip-1.2.4/checksums
@@ -1,3 +1,3 @@
-39142 /after/bin/gzip
-39142 /after/bin/gunzip
-39142 /after/bin/zcat
+47018 /after/bin/gzip
+47018 /after/bin/gunzip
+47018 /after/bin/zcat
diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.kaem b/sysa/gzip-1.2.4/gzip-1.2.4.kaem
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -13,11 +14,6 @@ cd build
tar xf ../src/${pkg}.tar
cd ${pkg}
-# Patch
-# Remove strlwr, it does not build with mes libc
-cp util.c util_patched.c
-sed -i 165,174d util_patched.c
-
# Compile
tcc -c -DNO_UTIME gzip.c
tcc -c bits.c
@@ -31,11 +27,12 @@ tcc -c unlzh.c
tcc -c unlzw.c
tcc -c unpack.c
tcc -c unzip.c
-tcc -c util_patched.c
+# strlwr is already defined in mes libc
+tcc -c -Dstrlwr=unused util.c
tcc -c zip.c
# Link
-tcc -static -o ${bindir}/gzip gzip.o zip.o deflate.o trees.o bits.o unzip.o inflate.o util_patched.o crypt.o lzw.o unlzw.o unpack.o unlzh.o getopt.o
+tcc -static -o ${bindir}/gzip gzip.o zip.o deflate.o trees.o bits.o unzip.o inflate.o util.o crypt.o lzw.o unlzw.o unpack.o unlzh.o getopt.o
# Install
cp ${bindir}/gzip ${bindir}/gunzip
diff --git a/sysa/pre-sha.sha256sums b/sysa/pre-sha.sha256sums
@@ -7,18 +7,18 @@ cacc2cda3ce6c2cc0cb761b8aa2115a003e166c94d1039974fc0221263897c52 /after/bin/boo
773eae17b7f347526f8033afc9d1f06af116dfbcd0a26cbde7e29ab47e77850d /after/bin/chmod
764881d80efac5509aa85fd4683a20beffa831442f57815d43ee030fb8f9f486 /after/bin/cp
e1481ecf337fb657f3949af0b45bb620c1886cd1a1b003fe27338832c250f41d /after/bin/fletcher16
-bbad3c53d86df800088146ef3b65b755786557ab11f04fe9706503e9f9c241b3 /after/bin/gunzip
-bbad3c53d86df800088146ef3b65b755786557ab11f04fe9706503e9f9c241b3 /after/bin/gzip
+fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/gunzip
+fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/gzip
d41067670562f87c6e43af0b461c4070c19a8ffc15c455cb075d98419ae76c73 /after/bin/mes
b91c81e543b878ead4cc975df75e3d211f7bd2dcdd4c90e42df99d44311ce71e /after/bin/mescc.scm
e94a2468c045582cfd13df51acd0932afdc834fa60139f7bfb7a2d65afa39a65 /after/bin/mes-tcc
3cf426251744300a099a40f3609ccbd32ec3b9f3334601defa5736e7fd6c6f1d /after/bin/patch
b4b16b3314a6f4a8be1b849aba45252e621a7123025dabdf9af6c2d4d657e9b6 /after/bin/sed
bc9ddf9854bd954c71bb1cf5b0af77fd65b8fa7f290b42c75020fb8893deb53c /after/bin/sha256sum
-9f83aae8cee866b3af409bb6d28e32d0a04db0e7b64680af4e38b5f43b5ece96 /after/bin/tar
+957229511dc5ac62a949dbd76e965e3a476ce214b8e6fc7f120bf17d195b924b /after/bin/tar
690c2a941c444ba761076f6b8ef1ba2b634ebe2e63ea44c8f3789f6e3df6d2a9 /after/bin/tcc
cacc2cda3ce6c2cc0cb761b8aa2115a003e166c94d1039974fc0221263897c52 /after/bin/tcc-0.9.26
-bbad3c53d86df800088146ef3b65b755786557ab11f04fe9706503e9f9c241b3 /after/bin/zcat
+fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/zcat
44b5f15e1f015685fe4c3d66eda5ba52aac77b94f2edd98b764cec05ca350d49 /after/lib/crt1.o
90811dafd33ad56b8e4b0adcc04263f9329b9047b7cc337abe8151a75017172c /after/lib/crt1.s
09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /after/lib/crti.o
diff --git a/sysa/sed-4.0.7/sed-4.0.7.kaem b/sysa/sed-4.0.7/sed-4.0.7.kaem
@@ -2,12 +2,18 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
-cd src
+cd build
+
+# Extract
+gunzip ../src/${pkg}.tar.gz
+tar xf ../src/${pkg}.tar
+cd ${pkg}
# Create config.h
catm config.h
@@ -43,7 +49,7 @@ tcc -static -o ${bindir}/sed -L lib lib/libsed.a compile.o execute.o regex.o fmt
# Test
sed --version
-cd ..
+cd ../..
# Checksums
fletcher16 checksums
diff --git a/sysa/sed-4.0.7/src b/sysa/sed-4.0.7/src
@@ -1 +0,0 @@
-Subproject commit b8fb156db0eedfd28db3340b418591e8fcab08bc
diff --git a/sysa/tar-1.12/checksums b/sysa/tar-1.12/checksums
@@ -1 +1 @@
-26761 /after/bin/tar
+3497 /after/bin/tar
diff --git a/sysa/tar-1.12/files/getdate_stub.c b/sysa/tar-1.12/files/getdate_stub.c
@@ -0,0 +1,12 @@
+/*
+ * SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "getdate.h"
+
+time_t get_date (const char *p, const time_t *now)
+{
+ return 0;
+}
diff --git a/sysa/tar-1.12/tar-1.12.kaem b/sysa/tar-1.12/tar-1.12.kaem
@@ -2,11 +2,14 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
+cp files/getdate_stub.c src/lib/getdate_stub.c
+
cd src
# Compile
@@ -19,6 +22,7 @@ tcc -c -DHAVE_DIRENT_H backupfile.c
tcc -c -I . error.c
tcc -c -I . fnmatch.c
tcc -c ftruncate.c
+tcc -c getdate_stub.c
tcc -c getopt.c
tcc -c getopt1.c
tcc -c getversion.c
@@ -28,7 +32,7 @@ tcc -c -DHAVE_GETCWD xgetcwd.c
tcc -c xmalloc.c
tcc -c xstrdup.c
-tcc -ar cr libtar.a argmatch.o backupfile.o error.o fnmatch.o ftruncate.o getopt.o getopt1.o getversion.o modechange.o msleep.o xgetcwd.o xmalloc.o xstrdup.o
+tcc -ar cr libtar.a argmatch.o backupfile.o error.o fnmatch.o ftruncate.o getdate_stub.o getopt.o getopt1.o getversion.o modechange.o msleep.o xgetcwd.o xmalloc.o xstrdup.o
cd ..
## tar
@@ -47,13 +51,11 @@ tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_DIRENT_H src/misc.c
tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_GETCWD src/names.c
tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/open3.c
tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/rtapelib.c
-cp src/tar.c src/tar_patched.c
-sed -i 709,709d src/tar_patched.c
-tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DPACKAGE=\"tar\" -DVERSION=\"1.12\" src/tar_patched.c
+tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DPACKAGE=\"tar\" -DVERSION=\"1.12\" src/tar.c
tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/update.c
# Link
-tcc -static -o ${bindir}/tar -L lib lib/libtar.a arith.o buffer.o compare.o create.o delete.o extract.o incremen.o list.o mangle.o misc.o names.o open3.o rtapelib.o tar_patched.o update.o -ltar
+tcc -static -o ${bindir}/tar -L lib lib/libtar.a arith.o buffer.o compare.o create.o delete.o extract.o incremen.o list.o mangle.o misc.o names.o open3.o rtapelib.o tar.o update.o -ltar
cd ..