linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 97f6f1b923f8538eec9d0e438a233bb31a879aa0 parent c6d44e7ce0b820605d242f12b121c2184fb00de7 Author: Jul <jul@9o.is> Date: Tue, 9 Sep 2025 19:12:06 +0800 use xz-embedded to decompress linux archive Diffstat:
| M | .gitmodules | | | 3 | +++ |
| M | gen.sh | | | 1 | + |
| M | ninja/functions.sh | | | 11 | ++++++----- |
| M | ninja/rules.ninja | | | 4 | ++-- |
| A | pkg/xz-embedded/gen.sh | | | 20 | ++++++++++++++++++++ |
| A | pkg/xz-embedded/repo | | | 1 | + |
6 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/.gitmodules b/.gitmodules @@ -74,3 +74,6 @@ path = pkg/util-linux/repo url = https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git ignore = all +[submodule "xz-embedded"] + path = pkg/xz-embedded/repo + url = https://github.com/tukaani-project/xz-embedded diff --git a/gen.sh b/gen.sh @@ -32,6 +32,7 @@ subgen pkg/pax subgen pkg/probe subgen pkg/sbase subgen pkg/util-linux +subgen pkg/xz-embedded subgen pkg/zlib subgen pkg/zstd diff --git a/ninja/functions.sh b/ninja/functions.sh @@ -506,14 +506,15 @@ _ninja_flush_fetch() { case $_name in *.tar.gz|*.tgz) _archive=${_name%.t*gz}.tar - _tool=gunzip - _tool_dep=$hostdir/minigzip - _extract_rule=extract-deflate + _tool=$hostdir/minigzip + _tool_dep=$_tool + _extract_rule=extract-decompress ;; *.tar.xz) _archive=${_name%.xz} - _tool=xz - _extract_rule=extract-deflate + _tool=$hostdir/xzminidec + _tool_dep=$_tool + _extract_rule=extract-decompress ;; *) _archive=$_name diff --git a/ninja/rules.ninja b/ninja/rules.ninja @@ -86,9 +86,9 @@ rule extract command = rm -rf $srcdir && $hostdir/pax -r -s ',^[^/]*,$srcdir,' $srcs <$in && touch $out description = EXTRACT $srcdir -rule extract-deflate +rule extract-decompress command = rm -rf $srcdir && $tool -c -d <$in | $hostdir/pax -r -s ',^[^/]*,$srcdir,' $srcs && touch $out - description = EXTRACT/DEFLATE $srcdir + description = EXTRACT/DECOMPRESS $srcdir rule patch command = git -C $srcdir am --3way --keep-non-patch --no-gpg-sign --whitespace=nowarn ../../../$in >/dev/null && touch $out diff --git a/pkg/xz-embedded/gen.sh b/pkg/xz-embedded/gen.sh @@ -0,0 +1,20 @@ +fetch git + +host() { + cflags " + -I $srcdir/linux/include/linux + -I $srcdir/userspace + -D XZ_DEC_CONCATENATED + -D XZ_USE_CRC64 + " + + exe xzminidec " + userspace/xzminidec.c + linux/lib/xz/xz_crc32.c + linux/lib/xz/xz_crc64.c + linux/lib/xz/xz_sha256.c + linux/lib/xz/xz_dec_stream.c + linux/lib/xz/xz_dec_lzma2.c + linux/lib/xz/xz_dec_bcj.c + " +} diff --git a/pkg/xz-embedded/repo b/pkg/xz-embedded/repo @@ -0,0 +1 @@ +Subproject commit ae63ae3a36ed01724674e8f3d750dc47bf125410