commit: 10ab63e45859c1c5e20e1a6152a0482c1b5da8e1
parent fa3c8dc0ab7411a1d9b1db3bd043c228b689aaa7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 3 May 2024 14:55:50 +0200
Get tar from heirloom
Diffstat:
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -88,6 +88,12 @@ Meanwhile:
### Heirloom (toolchest) diff
Slighly messy Makefiles but only has few dependencies.
+### Heirloom (toolchest) tar
+Slighly messy Makefiles but only has few dependencies.
+Meanwhile:
+- libarchive aka bsdtar: `./configure` script doesn't likes minised
+- GNU tar: [No.](https://www.roguelazer.com/blog/surprising-behavior-in-gnu-tar/)
+
## Launching in QEMU
```
$ qemu-system-x86_64 -enable-kvm -m 512 -kernel /boot/vmlinuz-6.6.21-gentoo -initrd /tmp/initramfs-tcc-x86_64.cpio.xz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot
diff --git a/init.sh b/init.sh
@@ -89,8 +89,8 @@ build_hierloom_devtools() {
build_hierloom() {
cd /heirloom-0*/
- mkdir -p /usr/5bin /usr/5lib
- for cmd in diff
+ mkdir -p /usr/5bin /usr/5lib /etc/default
+ for cmd in diff tar
do
bmake "$cmd/Makefile"
bmake CC=$CC -C "$cmd"
diff --git a/make-root.sh b/make-root.sh
@@ -138,7 +138,15 @@ sed -i \
heirloom-0*/build/mk.config \
|| die "Failed configuring heirloom (toolchest)"
-sed -i -e 's;__GLIBC__;__linux__;' heirloom-070715/libcommon/getdir.c || die "Failed fixing heirloom libcommon for musl"
+sed -i \
+ -e 's;__GLIBC__;__linux__;' \
+ -e '/#define getdents/s;^;//;' \
+ heirloom-070715/libcommon/getdir.c || die "Failed fixing heirloom libcommon for musl"
+
+sed -i \
+ -e 's;#ifdef _AIX;#if defined(_AIX) || defined(__linux__);' \
+ -e '/static int utf8/avoid writerr(struct oblok *op, int count, int written) {}' \
+ heirloom-070715/tar/tar.c || die "Failed fixing heirloom libcommon for musl"
deblob -n | tee /dev/stderr | awk '/detected: /{ print $2 }' | xargs du -bach | sort -h