me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Support signed vpac downloads on Vinix without Landlock

diviocity committed 5 days ago · f9395a626df08e4415c502ecd90b5e23be75f9d2 View patch
Unverified signature 3 files changed +23 -3
BOOTSTRAP.md +2 -0

@@ -80,6 +80,8 @@ The published x86_64 Vinix kernel booted that 22-package root. Both `gpgv` and t

8080

8181The x86_64 vpac recipe uses V at `597b0f6`, targets musl explicitly, and embeds the Vile resources. Its configuration check temporarily removes both input Scheme files and queries an installed signed musl record. The recipe uses the locked `nobody` account from `vinix-accounts` and keeps package and database signature checks enabled. The build peaked at 2,281,107,456 bytes with zero cgroup OOM events. The resulting `vpac-1.0.0-1-x86_64.pkg.tar.zst` has SHA-256 `f6aa20508a8bc62b5da8b5134657f8d12b1ff5c1609a87e2d7eae02759ea7786`. The worker recorded the pinned source trees in `foundation/vpac-vcs-pins-01`, receipt SHA-256 `2124cc24c72459f7274eb4a74c0d1fa4ec30896a35183e31e6786e9060666014`.

8282

83+Release 2 handles the Vinix kernel's `ENOSYS` response to the Landlock ABI query. Downloads retain the locked account, no-new-privs and seccomp, and the transaction still verifies the signed package. The x86_64 guest refused a same-length modification of the signed netbase archive, installed the authentic archive, and verified its local owner and signature. A separate boot queried the signed repository record by exact name. See `foundation/vpac-transaction-08/disk/guest/serial.log` and `foundation/vpac-remote-query-01/disk/receipts.sha256`, receipt SHA-256 `0d0569ad76f9828fadac877bf1f67ae505eceab3231546b30a13423826f48891`. The combined test still times out during repository lookup after installation. The upgrade fixture reaches package verification and extraction and still needs to pass its post-upgrade checks.

84+

8385For later builds, `tools/build-queue.py` uses the source order and a verified bootstrap feed. Place the input archives and a `NAME.sha256` receipt for each in `$work/artifacts`. Configure the host compiler and signing tools as for a single native build, then select the ports to build. The worker uses this command form.

8486

8587```sh

vpac/PKGBUILD.vile +6 -3

@@ -5,7 +5,7 @@ v-arch := if string=?("aarch64", arch) { "arm64" } else { "x64" }

55defpkgbuild(vpac,

66 #:pkgname, "vpac",

77 #:pkgver, "1.0.0",

8- #:pkgrel, 1,

8+ #:pkgrel, 2,

99 #:pkgdesc, "Vinix package manager and native Vile package builder",

1010 #:arch, [#:x86-64, #:aarch64],

1111 #:url, "https://gitly.divio.city/me/vpac",

@@ -18,12 +18,15 @@ defpkgbuild(vpac,

1818 "nspkg::git+https://gitly.divio.city/me/nspkg.git#commit=c01b0795d1db56c7bce2539b2c46b110637fdc1a",

1919 "stutter::git+https://gitly.divio.city/me/stutter.git#commit=29b47cb4b818f95a5308d3c086bd7933b7c176bd",

2020 "vile::git+https://git.vorelabs.dev/diviocity/vile.git#commit=76646891b77a3d5c6af4a1e42b122cd61dc1654b",

21- "config.vile.in", "check-config.py"],

21+ "config.vile.in", "check-config.py", "vinix-landlock.patch"],

2222 #:sha256sums, ["SKIP", "SKIP", "SKIP", "SKIP", "da473de43c4b1232145dee708df4762a1b26f930bb5693053b19a763df462bf4",

23- "eb72a7f3ce972cfe0b653984324332cf119d778e723d7e659b3a49494cc883ea"],

23+ "eb72a7f3ce972cfe0b653984324332cf119d778e723d7e659b3a49494cc883ea",

24+ "7c0e1262f5d7b65a1c95b4efb5ea00e2fab9f0ef4f27b304f359858e564aa212"],

2425 #:prepare, fn() {

2526 run("mkdir", "modules")

2627 run("mv", "nspkg", "stutter", "vile", "modules/")

28+ run("patch", "--batch", "--fuzz=0", "-d", "modules/nspkg", "-p1", "-i",

29+ string-append(srcdir(), "/vinix-landlock.patch"))

2730 run("cp", "config.vile.in", "config.vile")

2831 run("sed", "-i", string-append("s/@ARCH@/", arch, "/g"), "config.vile")

2932 },

vpac/vinix-landlock.patch new file +15 -0

@@ -0,0 +1,15 @@

1+--- a/engine/sandbox_restrictions.v

2++++ b/engine/sandbox_restrictions.v

3+@@ -118,6 +118,12 @@

4+ abi := C.v_alpm_landlock_abi()

5+ if abi < 0 {

6++ // Vinix has no Landlock syscall. The caller still sets no-new-privs

7++ // and seccomp and drops privileges before it starts the transfer.

8++ if C.errno == C.ENOSYS && os.uname().sysname == 'Vinix' {

9++ handle.log(.debug, 'Landlock is unavailable on this Vinix kernel\n')

10++ return 0

11++ }

12+ problem := os.last_error().msg()

13+ handle.log(.error, localized_message('restricting filesystem access failed because Landlock is not supported by the kernel!\n'))

14+ return AlpmError{ kind: .retrieve_prepare, detail: 'Landlock is not supported: ${problem}' }

15+ }