From 06fab5687b8739c694bfca19caf304b5b0c79fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 18:56:15 +0000 Subject: [PATCH 1/7] Fix whitespace. --- rootfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs.sh b/rootfs.sh index 540d10ca..c41f0adc 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -90,9 +90,9 @@ get_file() { popd ext="${url##*.}" if [ "$ext" = "tar" ]; then - bname=$(basename "$url" ".tar") + bname=$(basename "$url" ".tar") else - bname=$(basename "$url" ".tar.${ext}") + bname=$(basename "$url" ".tar.${ext}") fi cp -r "${bname}" tmp/after/ cp "../sources/$(basename "$url")" "tmp/after/${bname}/src/" From 996e6f7c10ea46b22bf81c63351dc0de2fc54952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 19:08:08 +0000 Subject: [PATCH 2/7] Simplify some make recipes. --- sysa/bash-2.05b/mk/main.mk | 10 +++++----- sysa/m4-1.4/mk/main.mk | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysa/bash-2.05b/mk/main.mk b/sysa/bash-2.05b/mk/main.mk index 87eb5dfd..bc45182a 100644 --- a/sysa/bash-2.05b/mk/main.mk +++ b/sysa/bash-2.05b/mk/main.mk @@ -52,28 +52,28 @@ mkbuiltins: $(MKBUILTINS_OBJS) # libsh libsh.a: $(SHLIB_OBJS) - $(AR) cr $@ $(SHLIB_OBJS) + $(AR) cr $@ $^ # libglob libglob.a: $(GLOB_OBJS) - $(AR) cr $@ $(GLOB_OBJS) + $(AR) cr $@ $^ # libtilde libtilde.a: $(TILDE_OBJS) - $(AR) cr $@ $(TILDE_OBJS) + $(AR) cr $@ $^ # The actual program mksyntax: $(MKSYNTAX_OBJS) - $(CC) $(MKSYNTAX_OBJS) $(LDFLAGS) -o $@ -lgetopt + $(CC) $^ $(LDFLAGS) -o $@ -lgetopt syntax.c: mksyntax ./mksyntax -o $@ mksignames: $(MKSIGNAMES_OBJS) - $(CC) $(MKSIGNAMES_OBJS) $(LDFLAGS) -o $@ -lgetopt + $(CC) $^ $(LDFLAGS) -o $@ -lgetopt signames.h: mksignames ./mksignames $@ diff --git a/sysa/m4-1.4/mk/main.mk b/sysa/m4-1.4/mk/main.mk index 92982c10..3ab02fee 100644 --- a/sysa/m4-1.4/mk/main.mk +++ b/sysa/m4-1.4/mk/main.mk @@ -25,4 +25,4 @@ m4: libm4.a $(M4_OBJ) $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ libm4.a: $(LIB_OBJECTS) - $(AR) cr $@ $(LIB_OBJECTS) + $(AR) cr $@ $^ From 089b6d6020e58780cf43d896edc7ce3a400a6b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 19:05:10 +0000 Subject: [PATCH 3/7] Build grep-2.4. --- rootfs.sh | 3 +++ sysa/after.kaem.run | 10 ++++++++-- sysa/grep-2.4/grep-2.4.kaem | 23 +++++++++++++++++++++++ sysa/grep-2.4/mk/main.mk | 21 +++++++++++++++++++++ sysa/grep-2.4/src/.placeholder | 0 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 sysa/grep-2.4/grep-2.4.kaem create mode 100644 sysa/grep-2.4/mk/main.mk create mode 100644 sysa/grep-2.4/src/.placeholder diff --git a/rootfs.sh b/rootfs.sh index c41f0adc..d33f0ca6 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -113,6 +113,9 @@ get_file https://ftp.gnu.org/gnu/make/make-3.80.tar.gz # bzip2 1.0.8 get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz +# grep 2.4 +get_file https://ftp.gnu.org/gnu/grep/grep-2.4.tar.gz + # bash 2.05b get_file https://ftp.gnu.org/pub/gnu/bash/bash-2.05b.tar.gz diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run index e0d5f6f9..491a49d1 100755 --- a/sysa/after.kaem.run +++ b/sysa/after.kaem.run @@ -118,13 +118,19 @@ cd ${pkg} kaem --file ${pkg}.kaem cd .. -# Part 15: bash +# Part 15: grep +pkg="grep-2.4" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# Part 16: bash pkg="bash-2.05b" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# Part 16: m4 +# Part 17: m4 pkg="m4-1.4" cd ${pkg} kaem --file ${pkg}.kaem diff --git a/sysa/grep-2.4/grep-2.4.kaem b/sysa/grep-2.4/grep-2.4.kaem new file mode 100644 index 00000000..617265cd --- /dev/null +++ b/sysa/grep-2.4/grep-2.4.kaem @@ -0,0 +1,23 @@ +#!/bin/sh + +set -ex + +cd build + +# Extract +gunzip ../src/${pkg}.tar.gz +tar xf ../src/${pkg}.tar +cd ${pkg} +cp ../../mk/main.mk Makefile + +# Build +make + +# Install +cp grep /after/bin/grep +chmod 755 /after/bin/grep + +# Test +grep --version + +cd ../.. diff --git a/sysa/grep-2.4/mk/main.mk b/sysa/grep-2.4/mk/main.mk new file mode 100644 index 00000000..c35d91b1 --- /dev/null +++ b/sysa/grep-2.4/mk/main.mk @@ -0,0 +1,21 @@ +PACKAGE=grep +VERSION=2.4 + +CC = tcc +LD = tcc +AR = tcc -ar + +CFLAGS = -DPACKAGE=\"$(PACKAGE)\" \ + -DVERSION=\"$(VERSION)\" \ + -DHAVE_DIRENT_H=1 \ + -DHAVE_UNISTD_H=1 + +.PHONY: all + +GREP_SRC = grep dfa kwset obstack regex stpcpy savedir getopt getopt1 search grepmat +GREP_OBJECTS = $(addprefix src/, $(addsuffix .o, $(GREP_SRC))) + +all: grep + +grep: $(GREP_OBJECTS) + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ diff --git a/sysa/grep-2.4/src/.placeholder b/sysa/grep-2.4/src/.placeholder new file mode 100644 index 00000000..e69de29b From e0335ce910adff1f73d8b65b4c1bda76caff3d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 19:09:42 +0000 Subject: [PATCH 4/7] Install bunzip2. --- sysa/bzip2-1.0.8/bzip2-1.0.8.kaem | 2 ++ 1 file changed, 2 insertions(+) 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 7935c7b8..a037b87c 100755 --- a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem +++ b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem @@ -18,7 +18,9 @@ make CC=tcc AR="tcc -ar" bzip2 # Install cp bzip2 /after/bin/bzip2 +cp bzip2 /after/bin/bunzip2 chmod 755 /after/bin/bzip2 +chmod 755 /after/bin/bunzip2 # Test bzip2 --help From d26463ffa21441345379018e04e67fc6efb2f2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 19:23:48 +0000 Subject: [PATCH 5/7] Build most utils from coreutils-5.0. --- rootfs.sh | 3 + sysa/after.kaem.run | 12 ++- sysa/coreutils-5.0/build/.placeholder | 0 sysa/coreutils-5.0/coreutils-5.0.kaem | 24 +++++ sysa/coreutils-5.0/mk/main.mk | 110 ++++++++++++++++++++ sysa/coreutils-5.0/patches/mbstate.patch | 36 +++++++ sysa/coreutils-5.0/patches/modechange.patch | 12 +++ sysa/coreutils-5.0/src/.placeholder | 0 8 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 sysa/coreutils-5.0/build/.placeholder create mode 100755 sysa/coreutils-5.0/coreutils-5.0.kaem create mode 100644 sysa/coreutils-5.0/mk/main.mk create mode 100644 sysa/coreutils-5.0/patches/mbstate.patch create mode 100644 sysa/coreutils-5.0/patches/modechange.patch create mode 100644 sysa/coreutils-5.0/src/.placeholder diff --git a/rootfs.sh b/rootfs.sh index d33f0ca6..32437ae6 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -113,6 +113,9 @@ get_file https://ftp.gnu.org/gnu/make/make-3.80.tar.gz # bzip2 1.0.8 get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz +# coreutils 5.0 +get_file https://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 + # grep 2.4 get_file https://ftp.gnu.org/gnu/grep/grep-2.4.tar.gz diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run index 491a49d1..f504175d 100755 --- a/sysa/after.kaem.run +++ b/sysa/after.kaem.run @@ -118,19 +118,25 @@ cd ${pkg} kaem --file ${pkg}.kaem cd .. -# Part 15: grep +# Part 15: coreutils +pkg="coreutils-5.0" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. + +# Part 16: grep pkg="grep-2.4" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# Part 16: bash +# Part 17: bash pkg="bash-2.05b" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# Part 17: m4 +# Part 18: m4 pkg="m4-1.4" cd ${pkg} kaem --file ${pkg}.kaem diff --git a/sysa/coreutils-5.0/build/.placeholder b/sysa/coreutils-5.0/build/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/sysa/coreutils-5.0/coreutils-5.0.kaem new file mode 100755 index 00000000..c5123561 --- /dev/null +++ b/sysa/coreutils-5.0/coreutils-5.0.kaem @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ex + +cd build + +# Extract +bunzip2 ../src/${pkg}.tar.bz2 +tar xf ../src/${pkg}.tar +cd ${pkg} +cp ../../mk/main.mk Makefile + +# Patch and prepare +cp lib/fnmatch_.h lib/fnmatch.h +cp lib/ftw_.h lib/ftw.h +cp lib/search_.h lib/search.h +catm config.h + +patch -Np0 -i ../../patches/modechange.patch +patch -Np0 -i ../../patches/mbstate.patch + +# Build and install +/after/bin/make -f Makefile +/after/bin/make -f Makefile install diff --git a/sysa/coreutils-5.0/mk/main.mk b/sysa/coreutils-5.0/mk/main.mk new file mode 100644 index 00000000..dacfcf91 --- /dev/null +++ b/sysa/coreutils-5.0/mk/main.mk @@ -0,0 +1,110 @@ +PACKAGE=coreutils +PACKAGE_NAME=GNU\ coreutils +PACKAGE_BUGREPORT=bug-coreutils@gnu.org +PACKAGE_VERSION=5.0 +VERSION=5.0 + +CC = tcc +LD = tcc +AR = tcc -ar + +bindir=/after/bin + +CFLAGS = -I . -I lib \ + -DPACKAGE=\"$(PACKAGE)\" \ + -DPACKAGE_NAME=\"$(PACKAGE_NAME)\" \ + -DGNU_PACKAGE=\"$(PACKAGE_NAME)\" \ + -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" \ + -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" \ + -DVERSION=\"$(VERSION)\" \ + -DHAVE_LIMITS_H=1 \ + -DHAVE_DECL_FREE=1 \ + -DHAVE_DECL_MALLOC=1 \ + -DHAVE_MALLOC=1 \ + -DHAVE_STDLIB_H=1 \ + -DHAVE_REALLOC=1 \ + -DHAVE_DECL_REALLOC=1 \ + -DHAVE_DECL_GETENV=1 \ + -DHAVE_DIRENT_H=1 \ + -DHAVE_DECL___FPENDING=0 \ + -DSTDC_HEADERS=1 \ + -DHAVE_ALLOCA_H=1 \ + -DHAVE_STRUCT_TIMESPEC=1 \ + -DHAVE_STRING_H=1 \ + -DHAVE_SYS_TIME_H=1 \ + -DTIME_WITH_SYS_TIME=1 \ + -DHAVE_STDINT_H=1 \ + -DMB_LEN_MAX=16 \ + -DLIBDIR=\"/after/lib\" \ + -DHAVE_DECL_WCWIDTH=0 \ + -DHAVE_SYS_STAT_H=1 \ + -DHAVE_INTTYPES_H=1 \ + -DHAVE_DECL_MEMCHR=1 \ + -DHAVE_MEMORY_H=1 \ + -DPENDING_OUTPUT_N_BYTES=1 \ + -DCHAR_MIN=0 \ + -DLOCALEDIR=NULL \ + -DHAVE_FCNTL_H=1 \ + -DEPERM=1 \ + -DHAVE_DECL_STRTOUL=1 \ + -DHAVE_DECL_STRTOULL=1 \ + -DHAVE_DECL_STRTOL=1 \ + -DHAVE_DECL_STRTOLL=1 \ + -DHAVE_RMDIR=1 \ + -DRMDIR_ERRNO_NOT_EMPTY=39 \ + -DHAVE_DECL_FREE=1 \ + -DENOTEMPTY=1 \ + -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 \ + -DHAVE_DECL_DIRFD=0 \ + -DLC_TIME=\"C\" \ + -DLC_COLLATE=\"C\" \ + -DHAVE_GETCWD=1 \ + -Dmy_strftime=nstrftime \ + -DDIR_TO_FD\(Dir_p\)=-1 \ + -DUTILS_OPEN_MAX=1000 + +.PHONY: all install + +SRC_DIR=src + +COREUTILS = basename cat chmod cksum csplit cut echo expand factor false fmt fold head id join kill link ln logname mkfifo mkdir nl od paste pathchk printf ptx pwd readlink rmdir seq split sum tail tee touch tr tsort unexpand unlink wc whoami + +BINARIES = $(addprefix $(SRC_DIR)/, $(COREUTILS)) + +ALL=$(BINARIES) $(SRC_DIR)/install $(SRC_DIR)/md5sum $(SRC_DIR)/mv $(SRC_DIR)/rm $(SRC_DIR)/sha1sum +all: $(BINARIES) $(SRC_DIR)/install $(SRC_DIR)/md5sum $(SRC_DIR)/mv $(SRC_DIR)/rm $(SRC_DIR)/sha1sum + +LIB_DIR = lib +LIB_SRC = acl getdate posixtm posixver strftime getopt getopt1 hash hash-pjw addext argmatch backupfile basename canon-host closeout cycle-check diacrit dirname dup-safer error exclude exitfail filemode __fpending file-type fnmatch fopen-safer full-read full-write getline getstr gettime hard-locale human idcache isdir imaxtostr linebuffer localcharset long-options makepath mbswidth md5 memcasecmp memcoll modechange offtostr path-concat physmem quote quotearg readtokens rpmatch safe-read safe-write same save-cwd savedir settime sha stpcpy stripslash strtoimax strtoumax umaxtostr unicodeio userspec version-etc xgetcwd xgethostname xmalloc xmemcoll xnanosleep xreadlink xstrdup xstrtod xstrtol xstrtoul xstrtoimax xstrtoumax yesno strnlen getcwd sig2str mountlist regex canonicalize mkstemp memrchr euidaccess ftw dirfd obstack strverscmp strftime tsearch + +LIB_OBJECTS = $(addprefix $(LIB_DIR)/, $(addsuffix .o, $(LIB_SRC))) + +$(LIB_DIR)/libfettish.a: $(LIB_OBJECTS) + $(AR) cr $@ $^ + +$(BINARIES) : % : %.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/cp: $(SRC_DIR)/cp.o $(SRC_DIR)/copy.o $(SRC_DIR)/cp-hash.c $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/install: $(SRC_DIR)/install.o $(SRC_DIR)/copy.o $(SRC_DIR)/cp-hash.c $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/ls: $(SRC_DIR)/ls.o $(SRC_DIR)/ls-ls.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/md5sum: $(SRC_DIR)/md5.o $(SRC_DIR)/md5sum.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/mv: $(SRC_DIR)/mv.o $(SRC_DIR)/copy.o $(SRC_DIR)/remove.o $(SRC_DIR)/cp-hash.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/rm: $(SRC_DIR)/rm.o $(SRC_DIR)/remove.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(SRC_DIR)/sha1sum: $(SRC_DIR)/sha1sum.o $(SRC_DIR)/md5sum.o $(LIB_DIR)/libfettish.a + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +install: $(ALL) + $(SRC_DIR)/install $^ $(bindir) diff --git a/sysa/coreutils-5.0/patches/mbstate.patch b/sysa/coreutils-5.0/patches/mbstate.patch new file mode 100644 index 00000000..7c95008c --- /dev/null +++ b/sysa/coreutils-5.0/patches/mbstate.patch @@ -0,0 +1,36 @@ +--- lib/quotearg.c 2002-11-23 07:08:10.000000000 +0000 ++++ lib/quotearg.c 2021-01-17 19:41:59.461095532 +0000 +@@ -21,6 +21,7 @@ + # include + #endif + ++#include "mbstate_t.h" + #include "quotearg.h" + + #include "xalloc.h" +--- lib/mbstate_t.h 1970-01-01 01:00:00.000000000 +0100 ++++ lib/mbstate_t.h 2021-01-17 19:42:21.341658668 +0000 +@@ -0,0 +1,23 @@ ++#ifndef ____mbstate_t_defined ++#define ____mbstate_t_defined 1 ++ ++/* Integral type unchanged by default argument promotions that can ++ hold any value corresponding to members of the extended character ++ set, as well as at least one value that does not correspond to any ++ member of the extended character set. */ ++#ifndef __WINT_TYPE__ ++# define __WINT_TYPE__ unsigned int ++#endif ++ ++/* Conversion state information. */ ++typedef struct ++{ ++ int __count; ++ union ++ { ++ __WINT_TYPE__ __wch; ++ char __wchb[4]; ++ } __value; /* Value so far. */ ++} mbstate_t; ++ ++#endif diff --git a/sysa/coreutils-5.0/patches/modechange.patch b/sysa/coreutils-5.0/patches/modechange.patch new file mode 100644 index 00000000..69bfe290 --- /dev/null +++ b/sysa/coreutils-5.0/patches/modechange.patch @@ -0,0 +1,12 @@ +--- lib/modechange.c 2001-12-09 22:54:19.000000000 +0000 ++++ lib/modechange.c 2021-01-17 18:34:22.016427148 +0000 +@@ -28,8 +28,8 @@ + # include + #endif + +-#include "modechange.h" + #include ++#include "modechange.h" + #include "xstrtol.h" + + #if STDC_HEADERS diff --git a/sysa/coreutils-5.0/src/.placeholder b/sysa/coreutils-5.0/src/.placeholder new file mode 100644 index 00000000..e69de29b From a833a051ae2e3e71d8f6d112c01abf554d84a356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 19:25:44 +0000 Subject: [PATCH 6/7] Start using available coreutils. --- sysa/bash-2.05b/bash-2.05b.kaem | 10 +++++----- sysa/bash-2.05b/build/.placeholder | 0 sysa/grep-2.4/grep-2.4.kaem | 4 ++-- sysa/m4-1.4/build/.placeholder | 0 sysa/m4-1.4/m4-1.4.kaem | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 sysa/bash-2.05b/build/.placeholder mode change 100644 => 100755 sysa/grep-2.4/grep-2.4.kaem delete mode 100644 sysa/m4-1.4/build/.placeholder diff --git a/sysa/bash-2.05b/bash-2.05b.kaem b/sysa/bash-2.05b/bash-2.05b.kaem index 13a00d6f..f29af052 100755 --- a/sysa/bash-2.05b/bash-2.05b.kaem +++ b/sysa/bash-2.05b/bash-2.05b.kaem @@ -2,6 +2,7 @@ set -ex +mkdir build cd build # Extract @@ -13,9 +14,9 @@ cp ../../mk/builtins.mk builtins/Makefile cp ../../mk/common.mk common.mk # Create various .h files -catm config.h -catm include/version.h -catm include/pipesize.h +touch config.h +touch include/version.h +touch include/pipesize.h # Patch patch -Np0 -i ../../patches/mes-libc.patch @@ -32,7 +33,6 @@ cd .. make # Install -cp bash /after/bin/ -chmod 755 /after/bin/bash +install bash /after/bin/ cd ../.. diff --git a/sysa/bash-2.05b/build/.placeholder b/sysa/bash-2.05b/build/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/sysa/grep-2.4/grep-2.4.kaem b/sysa/grep-2.4/grep-2.4.kaem old mode 100644 new mode 100755 index 617265cd..bf324e6a --- a/sysa/grep-2.4/grep-2.4.kaem +++ b/sysa/grep-2.4/grep-2.4.kaem @@ -2,6 +2,7 @@ set -ex +mkdir build cd build # Extract @@ -14,8 +15,7 @@ cp ../../mk/main.mk Makefile make # Install -cp grep /after/bin/grep -chmod 755 /after/bin/grep +install grep /after/bin/ # Test grep --version diff --git a/sysa/m4-1.4/build/.placeholder b/sysa/m4-1.4/build/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/sysa/m4-1.4/m4-1.4.kaem b/sysa/m4-1.4/m4-1.4.kaem index 2ecd5b59..10984986 100755 --- a/sysa/m4-1.4/m4-1.4.kaem +++ b/sysa/m4-1.4/m4-1.4.kaem @@ -2,6 +2,7 @@ set -ex +mkdir build cd build # Extract @@ -17,8 +18,7 @@ patch -Np0 -i ../../patches/signal-include.patch make # Install -cp m4 /after/bin/m4 -chmod 755 /after/bin/m4 +install m4 /after/bin/ # Test m4 --version From 019a3e2e4106d555700549ae9d7b9b1b145e4d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 20 Jan 2021 21:28:47 +0000 Subject: [PATCH 7/7] Update README. --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3caeaa46..052029e7 100644 --- a/README.md +++ b/README.md @@ -50,13 +50,13 @@ have greater trust in the bootstrap procedure. | Item | Guix | live-bootstrap | | -- | -- | -- | -| Total size of seeds [1] | ~120MB (Reduced Source Bootstrap) [2] | ~1KB | +| Total size of seeds [1] | ~30MB (Reduced Source Bootstrap) [2] | ~1KB | | Use of kernel | Linux-Libre Kernel | Any Linux Kernel (2.6+) [3] | | Implementation complete | Yes | No (in development) | | Automation | Almost fully automatic | Optional user customization | [1]: Excluding kernel. -[2]: Reiterating that Guix is working on a full source bootstrap. +[2]: Reiterating that Guix is working on a full source bootstrap, although that still uses guile (~12 MB). [3]: Work is ongoing to use other, smaller POSIX kernels. ## Why would I want bootstrapping? @@ -211,7 +211,7 @@ is required later for autotools. #### Part 11: patch 2.5.9 -`patch` is a very useful tool at this stage, allowing us to make sigificantly +`patch` is a very useful tool at this stage, allowing us to make significantly more complex edits, including just changes to lines. Luckily, we are able to patch patch using sed only. @@ -222,7 +222,7 @@ been forced to manually specify static linking for each tool. Now that we have patch, we can patch tinycc to force static linking and then recompile it. Note that we have to do this using tinycc 0.9.26, as tinycc 0.9.27 cannot -recompile itself for unknown reasonsn. +recompile itself for unknown reasons. #### Part 13: make 3.80 @@ -235,7 +235,19 @@ scripts. `bzip2` is a compression format that compresses more than `gzip`. It is preferred where we can use it, and makes source code sizes smaller. -#### Part 15: bash 2.05b +#### Part 15: coreutils 5.0.0 + +Coreutils is a collection on widely used utilities such as cat, chmod, chown, +cp, install, ln, mkdir, mv, rm, rmdir, tee, and many others. + +A few of the utilities cannot be easily compiled with Mes C library, so we skip them. + +#### Part 16: grep 2.4 + +grep is a pattern matching utility. Is is not immediately needed but will +be useful later for autotools. + +#### Part 17: bash 2.05b GNU `bash` is the most well known shell and the most complex piece of software so far. However, it comes with a number of great benefits over kaem, including @@ -244,7 +256,7 @@ proper POSIX sh support, globbing, etc. NOTE: Currently, there is a bison pregenerated file here, which we are working to remove. -#### Part 16: m4 1.4 +#### Part 18: m4 1.4 `m4` is the first piece of software we need in the autotools suite. It allows macros to be defined and files to be generated from those macros.