me

/

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

Package Git and OpenSSH clients with target object and signature checks

diviocity committed 5 days ago · 73ce2171ae35895d87442ccbc8f43104ce63a4fc View patch
Unverified signature 5 files changed +119 -0
BOOTSTRAP.md +2 -0

@@ -50,6 +50,8 @@ The Ubuntu build worker runs one build or guest test at a time under its shared

5050

5151## Verified x86_64 bootstrap

5252

53+A fresh signed Git 2.47.3 installation pulled in 15 packages and passed the audit for 1,842 paths and 46 ELF files. In the isolated root, Git created a commit, read it back and passed `git fsck --full`. The installed OpenSSH 9.9p2 client and its five dependencies passed the audit for 4,319 paths and 34 ELFs. Its `ssh-keygen` generated an Ed25519 key, signed a file and verified it for the named principal. The worker retains those installed-package results in `foundation/signed-git-01` and `foundation/signed-ssh-01`, receipt SHA-256 `f43c1f53e159f97b6e5cfb8db542828f5ab055996e7885b2e4b89b044df9ed76` and `6e30b1d67ad5e9740ca28cf76317ef3f4dac4e75c82c78560785a2395ddb2e32` respectively.

54+

5355The November 2026 worker run installed 24 packages by name into a fresh root from a test-signed repository. The ownership and ELF auditor at ports revision `4cc4c14` checked 8,169 files and links and 67 ELF files, including interpreter and shared library resolution. The package set includes BusyBox 1.38.0-4, musl, Linux headers, GNU Make, GMP, OpenSSL, the CA bundle, libpng, nghttp2 and c-ares. The worker retains the package hashes in `foundation/feed-01/packages.tsv` and the client in `foundation/sdk-01`.

5456

5557A separate client upgraded BusyBox 1.38.0-3 to 1.38.0-4 and installed `vinix-release`. vpac recorded BusyBox as owner of `/bin/uname` and the identity package as owner of `/usr/bin/uname`. The installed OS ID was `vinix`. [Signed upgrade commands](tests/FEED.md)

git/PKGBUILD.vile new file +31 -0

@@ -0,0 +1,31 @@

1+defpkgbuild(git,

2+ #:pkgname, "git",

3+ #:pkgver, "2.47.3",

4+ #:pkgrel, 1,

5+ #:pkgdesc, "Distributed version control with HTTP and HTTPS transport",

6+ #:arch, [#:x86-64, #:aarch64],

7+ #:license, "GPL-2.0-only",

8+ #:url, "https://git-scm.com/",

9+ #:depends, ["musl", "curl", "expat", "openssl", "pcre2", "zlib"],

10+ #:source, ["https://www.kernel.org/pub/software/scm/git/git-2.47.3.tar.xz",

11+ "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/main/git/fix-t4219-with-sticky-bit.patch",

12+ "config.mak", "check.py"],

13+ #:sha256sums, ["9c2eb1250781b3e5bfef098572d07fdf132d67e6c065e4307332ade9819a1501",

14+ "2ae5b4901a7ef98ffb35eaba1d201d97b556fca1bf4688f88f79ca24d51a8cd6",

15+ "458eb38655279e40713e134ba778346524279d6787681b1f8af2c16f0fce0c76", "8bc530df1d77f35bfdd0cbbcde4860c3f0964842cfbe6c50bdf878331d73332b"],

16+ #:prepare, fn() {

17+ run("patch", "-d", "git-2.47.3", "-p1", "-i", string-append(srcdir(), "/fix-t4219-with-sticky-bit.patch"))

18+ run("cp", "config.mak", "git-2.47.3/config.mak")

19+ },

20+ #:build, fn() {

21+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")

22+ run("make", "-C", "git-2.47.3", string-append("CURL_CONFIG=", root, "/usr/bin/curl-config"), "all")

23+ },

24+ #:check, fn() {

25+ run("python3", "check.py")

26+ },

27+ #:package, fn() {

28+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")

29+ run("make", "-C", "git-2.47.3", string-append("CURL_CONFIG=", root, "/usr/bin/curl-config"), string-append("DESTDIR=", pkgdir()), "install")

30+ run("install", "-Dm644", "git-2.47.3/COPYING", string-append(pkgdir(), "/usr/share/licenses/git/COPYING"))

31+ })

git/check.py new file +27 -0

@@ -0,0 +1,27 @@

1+"""Exercise Git's target object, index, reference and PCRE code offline."""

2+from pathlib import Path

3+import os

4+import subprocess

5+

6+source = Path.cwd()

7+binary = source / "git-2.47.3/git"

8+work = source / "git-check"

9+work.mkdir()

10+os.chdir(work)

11+os.environ.update(GIT_CONFIG_NOSYSTEM="1", HOME=str(work), GIT_TERMINAL_PROMPT="0",

12+ GIT_AUTHOR_NAME="Vinix", GIT_AUTHOR_EMAIL="test@invalid",

13+ GIT_COMMITTER_NAME="Vinix", GIT_COMMITTER_EMAIL="test@invalid")

14+

15+def git(*args, data=None):

16+ return subprocess.check_output(["vinix-run", str(binary), *args], input=data, text=True).strip()

17+

18+git("init", "-q", "--template=")

19+(work / "file").write_text("Vinix\n")

20+git("add", "file")

21+tree = git("write-tree")

22+commit = git("commit-tree", tree, data="First commit\n")

23+git("update-ref", "HEAD", commit)

24+if git("show", "HEAD:file") != "Vinix" or git("grep", "-P", "(?=Vini)Vinix") != "file:Vinix":

25+ raise SystemExit("target Git object or PCRE result did not match")

26+if not (source / "git-2.47.3/git-remote-http").is_file():

27+ raise SystemExit("target Git HTTP transport is missing")

git/config.mak new file +15 -0

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

1+prefix = /usr

2+CC = vinix-cc

3+CFLAGS = -O2

4+# libcurl's OpenSSL dependency must resolve in the same target SDK as libcurl.

5+LDFLAGS += -Wl,--sysroot=$(VPAC_MAKEPKG_ROOT) -L$(VPAC_MAKEPKG_ROOT)/usr/lib -Wl,-rpath-link,$(VPAC_MAKEPKG_ROOT)/usr/lib

6+INSTALL_SYMLINKS = YesPlease

7+USE_LIBPCRE2 = YesPlease

8+NO_GETTEXT = YesPlease

9+NO_PYTHON = YesPlease

10+NO_PERL = YesPlease

11+NO_TCLTK = YesPlease

12+NO_SVN_TESTS = YesPlease

13+ICONV_OMITS_BOM = YesPlease

14+NO_REGEX = YesPlease

15+NO_SYS_POLL_H = YesPlease

openssh-client/PKGBUILD.vile new file +44 -0

@@ -0,0 +1,44 @@

1+defpkgbuild(openssh-client,

2+ #:pkgname, "openssh-client",

3+ #:pkgver, "9.9p2",

4+ #:pkgrel, 1,

5+ #:pkgdesc, "OpenSSH client, file transfer, key generation and authentication agent",

6+ #:arch, [#:x86-64, #:aarch64],

7+ #:license, "SSH-OpenSSH",

8+ #:url, "https://www.openssh.com/portable.html",

9+ #:depends, ["musl", "libedit", "openssl", "zlib"],

10+ #:makedepends, ["linux-headers"],

11+ #:backup, ["etc/ssh/ssh_config"],

12+ #:source, ["https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p2.tar.gz",

13+ "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/main/openssh/include-config-dir.patch"],

14+ #:sha256sums, ["91aadb603e08cc285eddf965e1199d02585fa94d994d6cae5b41e1721e215673",

15+ "d64820f473f3421922c0b4d88b067b2816cd22323af3157af503688e1003f8c1"],

16+ #:prepare, fn() {

17+ run("patch", "-d", "openssh-9.9p2", "-p1", "-i", string-append(srcdir(), "/include-config-dir.patch"))

18+ },

19+ #:build, fn() {

20+ run("vinix-configure", "openssh-9.9p2/configure", "--sysconfdir=/etc/ssh", "--libexecdir=/usr/lib/ssh",

21+ "--with-libedit", "--with-xauth=/usr/bin/xauth", "--with-pid-dir=/run",

22+ "--disable-utmp", "--disable-wtmp", "--disable-lastlog")

23+ run("make", "ssh", "scp", "sftp", "ssh-keygen", "ssh-agent", "ssh-add", "ssh-keyscan", "ssh-pkcs11-helper")

24+ },

25+ #:check, fn() {

26+ run("vinix-run", "./ssh", "-V")

27+ run("vinix-run", "./ssh", "-Q", "cipher")

28+ run("vinix-run", "./ssh-keygen", "-q", "-t", "ed25519", "-N", "", "-f", "test-key")

29+ run("vinix-run", "./ssh-keygen", "-lf", "test-key.pub")

30+ run("vinix-run", "./ssh-keygen", "-Y", "sign", "-f", "test-key", "-n", "vinix", "openssh-9.9p2/LICENCE")

31+ run("test", "-s", "openssh-9.9p2/LICENCE.sig")

32+ },

33+ #:package, fn() {

34+ for-each(fn(tool) {

35+ run("install", "-Dm755", tool, string-append(pkgdir(), "/usr/bin/", tool))

36+ }, list("ssh", "scp", "sftp", "ssh-keygen", "ssh-agent", "ssh-add", "ssh-keyscan", "ssh-pkcs11-helper"))

37+ run("mkdir", "-p", string-append(pkgdir(), "/usr/lib/ssh"), string-append(pkgdir(), "/etc/ssh/ssh_config.d"))

38+ run("ln", "-s", "../../bin/ssh-pkcs11-helper", string-append(pkgdir(), "/usr/lib/ssh/ssh-pkcs11-helper"))

39+ run("install", "-Dm755", "openssh-9.9p2/contrib/ssh-copy-id", string-append(pkgdir(), "/usr/bin/ssh-copy-id"))

40+ run("install", "-Dm755", "openssh-9.9p2/contrib/findssl.sh", string-append(pkgdir(), "/usr/bin/findssl.sh"))

41+ run("install", "-Dm644", "openssh-9.9p2/ssh_config", string-append(pkgdir(), "/etc/ssh/ssh_config"))

42+ run("install", "-Dm644", "openssh-9.9p2/moduli", string-append(pkgdir(), "/etc/ssh/moduli"))

43+ run("install", "-Dm644", "openssh-9.9p2/LICENCE", string-append(pkgdir(), "/usr/share/licenses/openssh-client/LICENCE"))

44+ })