linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit 9a180e196f1b4e3c4cacb4ab12dce8dbb7ca5d0b
parent df465cab73737f27bb587ec76824b27fbc0a83e8
Author: Jul <jul@9o.is>
Date:   Sat, 13 Sep 2025 22:18:56 +0800

add ubase

Diffstat:
M.gitmodules | 4++++
Mgen.sh | 1+
Apkg/ubase/config.h | 10++++++++++
Apkg/ubase/gen.sh | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/ubase/repo | 1+
5 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -82,3 +82,7 @@ path = pkg/rc/repo url = https://github.com/rakitzis/rc ignore = all +[submodule "ubase"] + path = pkg/ubase/repo + url = git://git.suckless.org/ubase + ignore = all diff --git a/gen.sh b/gen.sh @@ -32,6 +32,7 @@ subgen pkg/pax subgen pkg/probe subgen pkg/rc subgen pkg/sbase +subgen pkg/ubase subgen pkg/util-linux subgen pkg/xz-embedded subgen pkg/zlib diff --git a/pkg/ubase/config.h b/pkg/ubase/config.h @@ -0,0 +1,10 @@ +/* See LICENSE file for copyright and license details. */ + +#define ENV_PATH "/bin" +#define PW_CIPHER "$6$" /* SHA-512 */ +#undef UTMP_PATH +#define UTMP_PATH "/var/run/utmp" +#undef BTMP_PATH +#define BTMP_PATH "/var/log/btmp" +#undef WTMP_PATH +#define WTMP_PATH "/var/log/wtmp" diff --git a/pkg/ubase/gen.sh b/pkg/ubase/gen.sh @@ -0,0 +1,103 @@ +cflags " + -std=c99 + -D _GNU_SOURCE + -D _XOPEN_SOURCE=700 + -I $dir + -Wno-maybe-uninitialized + -Wno-format-truncation + -Wno-sign-compare + -Wno-stringop-truncation + -Wno-misleading-indentation + -Wno-overflow + -Wno-implicit-fallthrough +" + +lib libutil.a " + libutil/agetcwd.c + libutil/agetline.c + libutil/apathmax.c + libutil/concat.c + libutil/ealloc.c + libutil/eprintf.c + libutil/estrtol.c + libutil/estrtoul.c + libutil/explicit_bzero.c + libutil/passwd.c + libutil/proc.c + libutil/putword.c + libutil/recurse.c + libutil/strlcat.c + libutil/strlcpy.c + libutil/strtonum.c + libutil/tty.c +" + +exes() { + for val in $*; do + case $val in + [0-9]) + man $src.$val + ;; + *) + src=$val + exe $src $src.c $outdir/libutil.a + bin $src + ;; + esac + done +} + +exes " + blkdiscard + chvt 1 + clear 1 + ctrlaltdel 8 + dd 1 + df 1 + dmesg 1 + eject 1 + fallocate 1 + free 1 + freeramdisk 8 + fsfreeze 8 + getty 8 + halt 8 + hwclock 8 + id 1 + insmod 8 + killall5 8 + last + lastlog 8 + login 1 + lsmod 8 + lsusb 8 + mesg 1 + mknod 1 + mkswap 8 + mount 8 + mountpoint 1 + nologin 8 + pagesize 1 + passwd 1 + pidof 1 + pivot_root 8 + ps 1 + pwdx 1 + readahead 8 + respawn 1 + rmmod 8 + stat 1 + su 1 + swaplabel 8 + swapoff 8 + swapon 8 + switch_root 8 + sysctl 8 + truncate 1 + umount 8 + unshare 1 + uptime 1 + vtallow 1 + watch 1 + who 1 +" diff --git a/pkg/ubase/repo b/pkg/ubase/repo @@ -0,0 +1 @@ +Subproject commit a570a80ed1606bed43118cb148fc83c3ac22b5c1