From d7794f8f1513babc1671a484f13cb339645e56b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 12:22:22 +0000 Subject: [PATCH 1/9] Create device nodes. --- sysa/run.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sysa/run.sh b/sysa/run.sh index 8863952e..ea0e495a 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -10,6 +10,17 @@ set -e # shellcheck source=sysa/helpers.sh . helpers.sh +populate_device_nodes() { + # http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html + test -c /dev/console || mknod -m 622 /dev/console c 5 1 + test -c /dev/null || mknod -m 666 /dev/null c 1 3 + test -c /dev/zero || mknod -m 666 /dev/zero c 1 5 + test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2 + test -c /dev/tty || mknod -m 666 /dev/tty c 5 0 + test -c /dev/random || mknod -m 444 /dev/random c 1 8 + test -c /dev/urandom || mknod -m 444 /dev/urandom c 1 9 +} + export PREFIX=/after build flex-2.5.11 @@ -55,4 +66,6 @@ build perl5.005_03 build perl-5.6.2 +populate_device_nodes + echo "Bootstrapping completed." From c88e4c1ab7179b3bdfb4b6ccbf02f50dc4da5a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 21 Feb 2021 21:09:47 +0000 Subject: [PATCH 2/9] Install autoconf 2.52. --- SHA256SUMS.sources | 1 + parts.rst | 9 +++++++++ rootfs.sh | 3 +++ sysa/autoconf-2.52/autoconf-2.52.sh | 22 ++++++++++++++++++++++ sysa/autoconf-2.52/checksums | 0 sysa/run.sh | 2 ++ 6 files changed, 37 insertions(+) create mode 100755 sysa/autoconf-2.52/autoconf-2.52.sh create mode 100644 sysa/autoconf-2.52/checksums diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 44b5cc51..66817f0f 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -1,3 +1,4 @@ +534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz 7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095 bison-3.4.1.tar.gz ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz diff --git a/parts.rst b/parts.rst index 6fcd015f..b8d1d380 100644 --- a/parts.rst +++ b/parts.rst @@ -352,3 +352,12 @@ perl 5.6.2 ========== Even more perl. 5.6.2 is the last version buildable with 5.004. + +autoconf 2.52 +============== + +GNU Autoconf is a tool for producing ``configure`` scripts for building, installing and +packaging software on computer systems where a Bourne shell is available. + +At this stage we still do not have a working autotools system, so we manually install +``autoconf`` script and replace a few placeholder variables with ``sed``. diff --git a/rootfs.sh b/rootfs.sh index cd929e48..9cdc78eb 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -201,6 +201,9 @@ get_file https://www.cpan.org/src/5.0/perl5.005_03.tar.gz # perl 5.6.2 get_file https://www.cpan.org/src/5.0/perl-5.6.2.tar.gz +# autoconf 2.52 +get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/autoconf-2.52/autoconf-2.52.sh b/sysa/autoconf-2.52/autoconf-2.52.sh new file mode 100755 index 00000000..0708858e --- /dev/null +++ b/sysa/autoconf-2.52/autoconf-2.52.sh @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_compile() { + cp autoconf.in autoconf + sed -i "s# @SHELL@#/bin/sh#" autoconf + sed -i 's/@M4@/m4/' autoconf + sed -i 's/@AWK@/awk/' autoconf + sed -i 's/@PACKAGE_NAME@/Autoconf/' autoconf + sed -i 's/@VERSION@/2.52/' autoconf + sed -i "s#@datadir@#${PREFIX}/share/autoconf-2.52#" autoconf + chmod +x autoconf + + m4 autoconf.m4 --freeze-state=autoconf.m4f +} + +src_install() { + install autoconf ${PREFIX}/bin/autoconf-2.52 + mkdir -p ${PREFIX}/share/autoconf-2.52 + cp -r *.m4* ${PREFIX}/share/autoconf-2.52/ +} diff --git a/sysa/autoconf-2.52/checksums b/sysa/autoconf-2.52/checksums new file mode 100644 index 00000000..e69de29b diff --git a/sysa/run.sh b/sysa/run.sh index ea0e495a..ff71f132 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -68,4 +68,6 @@ build perl-5.6.2 populate_device_nodes +build autoconf-2.52 + echo "Bootstrapping completed." From 3109a4e701e1f2502f87d8419cb2b396473ddfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 23:38:12 +0000 Subject: [PATCH 3/9] fixup --- parts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts.rst b/parts.rst index b8d1d380..8e173581 100644 --- a/parts.rst +++ b/parts.rst @@ -354,7 +354,7 @@ perl 5.6.2 Even more perl. 5.6.2 is the last version buildable with 5.004. autoconf 2.52 -============== +============= GNU Autoconf is a tool for producing ``configure`` scripts for building, installing and packaging software on computer systems where a Bourne shell is available. From b15a8296751e3f7f65e2a22119e4eeebafae2ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 17:08:17 +0000 Subject: [PATCH 4/9] Add automake-1.4-p6. --- SHA256SUMS.sources | 1 + rootfs.sh | 3 +++ sysa/automake-1.4-p6/checksums | 0 sysa/automake-1.4-p6/stage1.sh | 24 ++++++++++++++++++++++++ sysa/automake-1.4-p6/stage2.sh | 21 +++++++++++++++++++++ sysa/run.sh | 3 +++ 6 files changed, 52 insertions(+) create mode 100644 sysa/automake-1.4-p6/checksums create mode 100755 sysa/automake-1.4-p6/stage1.sh create mode 100755 sysa/automake-1.4-p6/stage2.sh diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 66817f0f..1b72422b 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -1,4 +1,5 @@ 534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz +503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz 7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095 bison-3.4.1.tar.gz ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz diff --git a/rootfs.sh b/rootfs.sh index 9cdc78eb..b234d77e 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -204,6 +204,9 @@ get_file https://www.cpan.org/src/5.0/perl-5.6.2.tar.gz # autoconf 2.52 get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz +# automake 1.4-p6 +get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/automake-1.4-p6/checksums b/sysa/automake-1.4-p6/checksums new file mode 100644 index 00000000..e69de29b diff --git a/sysa/automake-1.4-p6/stage1.sh b/sysa/automake-1.4-p6/stage1.sh new file mode 100755 index 00000000..22fb22a0 --- /dev/null +++ b/sysa/automake-1.4-p6/stage1.sh @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + sed -i 's#m4/Makefile tests/Makefile##; s/Makefile //' configure.in + + rm configure Makefile.in */Makefile.in + autoconf-2.52 +} + +src_configure() { + ./configure --prefix=/after +} + +src_compile() { + : +} + +src_install() { + install automake ${PREFIX}/bin/automake-1.4 + mkdir -p ${PREFIX}/share/automake-1.4 + cp -r *.am ${PREFIX}/share/automake-1.4/ +} diff --git a/sysa/automake-1.4-p6/stage2.sh b/sysa/automake-1.4-p6/stage2.sh new file mode 100755 index 00000000..39632333 --- /dev/null +++ b/sysa/automake-1.4-p6/stage2.sh @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure Makefile.in */Makefile.in + autoconf-2.52 + automake-1.4 +} + +src_configure() { + ./configure --prefix=/after +} + +src_install() { + # cleanup old manual install + rm ${PREFIX}/bin/automake-1.4 + rm -rf ${PREFIX}/share/automake-1.4 + + default_src_install +} diff --git a/sysa/run.sh b/sysa/run.sh index ff71f132..4b1133ba 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -70,4 +70,7 @@ populate_device_nodes build autoconf-2.52 +build automake-1.4-p6 stage1.sh +build automake-1.4-p6 stage2.sh + echo "Bootstrapping completed." From 5be7064d5fb593c0b322f78b7984fc63de64ad41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 17:35:02 +0000 Subject: [PATCH 5/9] Rebuild autoconf 2.52. --- .../{autoconf-2.52.sh => stage1.sh} | 0 sysa/autoconf-2.52/stage2.sh | 27 +++++++++++++++++++ sysa/run.sh | 4 ++- 3 files changed, 30 insertions(+), 1 deletion(-) rename sysa/autoconf-2.52/{autoconf-2.52.sh => stage1.sh} (100%) create mode 100755 sysa/autoconf-2.52/stage2.sh diff --git a/sysa/autoconf-2.52/autoconf-2.52.sh b/sysa/autoconf-2.52/stage1.sh similarity index 100% rename from sysa/autoconf-2.52/autoconf-2.52.sh rename to sysa/autoconf-2.52/stage1.sh diff --git a/sysa/autoconf-2.52/stage2.sh b/sysa/autoconf-2.52/stage2.sh new file mode 100755 index 00000000..da084a6e --- /dev/null +++ b/sysa/autoconf-2.52/stage2.sh @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm Makefile.in */Makefile.in + rm configure + autoconf-2.52 + automake-1.4 + + # Install autoconf data files into versioned directory + for file in */Makefile.in Makefile.in; do + sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file + done +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.52 +} + +src_install() { + # Remove manually installed autoconf + rm ${PREFIX}/bin/autoconf-2.52 + rm -rf ${PREFIX}/share/autoconf-2.52 + + default_src_install +} diff --git a/sysa/run.sh b/sysa/run.sh index 4b1133ba..cf7b430a 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -68,9 +68,11 @@ build perl-5.6.2 populate_device_nodes -build autoconf-2.52 +build autoconf-2.52 stage1.sh build automake-1.4-p6 stage1.sh build automake-1.4-p6 stage2.sh +build autoconf-2.52 stage2.sh + echo "Bootstrapping completed." From 755572903e14484637008a1346ace00a6f3baa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 17:58:10 +0000 Subject: [PATCH 6/9] Update autoconf/automake description in parts.rst. --- parts.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/parts.rst b/parts.rst index 8e173581..7dbb5bd3 100644 --- a/parts.rst +++ b/parts.rst @@ -361,3 +361,24 @@ packaging software on computer systems where a Bourne shell is available. At this stage we still do not have a working autotools system, so we manually install ``autoconf`` script and replace a few placeholder variables with ``sed``. + +Version 2.52 is the newest version that runs on ``miniperl``. + +automake 1.4-p6 +=============== + +GNU Automake is a tool for automatically generating Makefile.in files. Together with +Autoconf they from GNU Autotools build system. + +``automake`` again needs both ``automake`` and ``autoconf``. In order to bootstrap it +we patch ``configure.in`` file to produce ``automake`` and skip ``Makefile`` effectively +removing dependency on ``automake`` at the cost of having to install ``automake`` manually. + +Then we rebuild both ``automake`` using already installed ``autoconf`` and ``automake``. + +Version 1.4-p6 is again the newest version that runs on ``miniperl``. + +autoconf 2.52 +============= + +We now properly rebuild ``autoconf`` using ``autoconf`` and ``automake``. From 607991542d51e4c20af09d1710bdd21e23941d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 20:07:04 +0000 Subject: [PATCH 7/9] Add autoconf 2.13. --- SHA256SUMS.sources | 1 + parts.rst | 5 +++++ rootfs.sh | 3 +++ sysa/autoconf-2.13/autoconf-2.13.sh | 14 ++++++++++++++ sysa/autoconf-2.13/checksums | 0 sysa/run.sh | 2 ++ 6 files changed, 25 insertions(+) create mode 100755 sysa/autoconf-2.13/autoconf-2.13.sh create mode 100644 sysa/autoconf-2.13/checksums diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 1b72422b..a5951f9b 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -1,3 +1,4 @@ +f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz 534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz 503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz diff --git a/parts.rst b/parts.rst index 7dbb5bd3..c8709bdb 100644 --- a/parts.rst +++ b/parts.rst @@ -382,3 +382,8 @@ autoconf 2.52 ============= We now properly rebuild ``autoconf`` using ``autoconf`` and ``automake``. + +autoconf 2.13 +============= + +Different versions of autotools are not fully compatible, so build older ``autoconf`` too. diff --git a/rootfs.sh b/rootfs.sh index b234d77e..91ae5b6f 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -207,6 +207,9 @@ get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz # automake 1.4-p6 get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz +# autoconf 2.13 +get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/autoconf-2.13/autoconf-2.13.sh b/sysa/autoconf-2.13/autoconf-2.13.sh new file mode 100755 index 00000000..b94c0ae5 --- /dev/null +++ b/sysa/autoconf-2.13/autoconf-2.13.sh @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure + autoconf-2.52 + + sed -i '/^acdatadir/s:$:-2.13:' Makefile.in +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.13 +} diff --git a/sysa/autoconf-2.13/checksums b/sysa/autoconf-2.13/checksums new file mode 100644 index 00000000..e69de29b diff --git a/sysa/run.sh b/sysa/run.sh index cf7b430a..b3c1a9c3 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -75,4 +75,6 @@ build automake-1.4-p6 stage2.sh build autoconf-2.52 stage2.sh +build autoconf-2.13 + echo "Bootstrapping completed." From 67cdd9124c537b31448b74543c7eb7bf6cb4b9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 22:42:23 +0000 Subject: [PATCH 8/9] Autoconf 2.12. --- SHA256SUMS.sources | 1 + parts.rst | 5 +++++ rootfs.sh | 3 +++ sysa/autoconf-2.12/autoconf-2.12.sh | 14 ++++++++++++++ sysa/autoconf-2.12/checksums | 0 sysa/run.sh | 2 ++ 6 files changed, 25 insertions(+) create mode 100755 sysa/autoconf-2.12/autoconf-2.12.sh create mode 100644 sysa/autoconf-2.12/checksums diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index a5951f9b..123ff5b1 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -1,3 +1,4 @@ +66fde474e124e80c843560041cd68820c9dce56e696f388312ba30361a814a16 autoconf-2.12.tar.gz f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz 534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz 503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz diff --git a/parts.rst b/parts.rst index c8709bdb..822347b4 100644 --- a/parts.rst +++ b/parts.rst @@ -387,3 +387,8 @@ autoconf 2.13 ============= Different versions of autotools are not fully compatible, so build older ``autoconf`` too. + +autoconf 2.12 +============= + +Yet another old autoconf version that we will need for GNU Binutils. diff --git a/rootfs.sh b/rootfs.sh index 91ae5b6f..6ee07468 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -210,6 +210,9 @@ get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz # autoconf 2.13 get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz +# autoconf 2.12 +get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.12.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/autoconf-2.12/autoconf-2.12.sh b/sysa/autoconf-2.12/autoconf-2.12.sh new file mode 100755 index 00000000..04cfef95 --- /dev/null +++ b/sysa/autoconf-2.12/autoconf-2.12.sh @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure + autoconf-2.52 + + sed -i '/^acdatadir/s:$:-2.12:' Makefile.in +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.12 +} diff --git a/sysa/autoconf-2.12/checksums b/sysa/autoconf-2.12/checksums new file mode 100644 index 00000000..e69de29b diff --git a/sysa/run.sh b/sysa/run.sh index b3c1a9c3..306993bc 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -77,4 +77,6 @@ build autoconf-2.52 stage2.sh build autoconf-2.13 +build autoconf-2.12 + echo "Bootstrapping completed." From aad6fd2c9af7cdd29d2449b599e16dc51864b8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 27 Feb 2021 23:56:00 +0000 Subject: [PATCH 9/9] Fix a typo in the description. --- parts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts.rst b/parts.rst index 822347b4..218e53dc 100644 --- a/parts.rst +++ b/parts.rst @@ -351,7 +351,7 @@ introduces the new pregenerated files ``regnodes.h`` and perl 5.6.2 ========== -Even more perl. 5.6.2 is the last version buildable with 5.004. +Even more perl. 5.6.2 is the last version buildable with 5.005. autoconf 2.52 =============