From fa1668adaccb447729c3126773902533ee7d878c Mon Sep 17 00:00:00 2001 From: diviocity Date: Sun, 29 Nov 2026 23:47:58 +0100 Subject: [PATCH] vinix-release: generate package-owned identity files from the release sources --- vinix-release/PKGBUILD.vile | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 vinix-release/PKGBUILD.vile diff --git a/vinix-release/PKGBUILD.vile b/vinix-release/PKGBUILD.vile new file mode 100644 index 0000000..952bdc6 --- /dev/null +++ b/vinix-release/PKGBUILD.vile @@ -0,0 +1,38 @@ +; Use the identity generator from the Vinix release checkout. +defpkgbuild(vinix-release, + #:pkgname, "vinix-release", + #:pkgver, "0.1.0", + #:pkgrel, 1, + #:pkgdesc, "Vinix operating system identification and login banners", + #:arch, [#:any], + #:url, "https://github.com/vlang/vinix", + #:license, "GPL-2.0-or-later", + #:depends, ["busybox"], + #:source, ["https://raw.githubusercontent.com/vlang/vinix/a58255423edea821aef9b2a0d10cb4091d59355a/build-support/identitycore/core.v", + "https://raw.githubusercontent.com/vlang/vinix/a58255423edea821aef9b2a0d10cb4091d59355a/build-support/stage-identity.v", + "https://raw.githubusercontent.com/vlang/vinix/a58255423edea821aef9b2a0d10cb4091d59355a/build-support/uname"], + #:sha256sums, ["286d89c66615cc3d67eda836f4fd468d9425fda201f2fa6ddc0f84d07d0b877a", + "fdec51d3df1da79c92b80d67d007f184db14c52050c12711730a8e912eb3a30b", + "3dc823187cbee58f337ad6bca9f802a23ee00b94be035f911140701bd5ea1bd0"], + #:prepare, fn() { + run("mkdir", "identitycore") + run("mv", "core.v", "identitycore/core.v") + }, + #:build, fn() { + run("v", "-path", ".|@vlib|@vmodules", "-o", "stage-identity", "stage-identity.v") + run("mkdir", "identity") + run("./stage-identity", "identity") + }, + #:check, fn() { + run("grep", "-Fx", "ID=vinix", "identity/usr/lib/os-release") + run("cmp", "identity/etc/os-release", "identity/usr/lib/os-release") + run("grep", "-Fx", "DISTRIB_ID=Vinix", "identity/etc/lsb-release") + run("test", "-s", "identity/etc/issue") + run("test", "-s", "identity/etc/motd") + }, + #:package, fn() { + run("cp", "-a", "identity/etc", string-append(pkgdir(), "/etc")) + run("cp", "-a", "identity/usr", string-append(pkgdir(), "/usr")) + ; The relative /usr/bin/uname link resolves to the applet owned by BusyBox. + ; Release assembly writes the image-specific /etc/vinix-release tag. + }) -- 2.56.1