Add the signed build-base metapackage
@@ -23,6 +23,8 @@ The x86_64 compiler build then compiled and linked `libitm` with the newly built
2323
2424The retry produced `gcc-14.2.0-1-x86_64.pkg.tar.zst`, SHA-256 `136aeee3c040fcf356e3ff0d3e83150883c6452e4c3de9ea18bac4e60809b22a`. It reused the compiler objects and peaked at 545 MiB. The new signed SDK installed 18 packages and the auditor checked 3,763 owned paths and 101 target ELFs. See `gnu/gcc-package-release-01`, receipt SHA-256 `c7bce72a61d40ab598c25b7171b4f4ba244bc4574e353ba74d091fc6199b24f4`, and `gnu/gcc-final-verification-01/sdk/audit.log`. Running programs built by this compiler remains a separate acceptance check.
2525
26+Installing `build-base` by name from a signed x86_64 repository brought in 17 packages. The installed-root audit checked 3,196 owned files and links and 95 target ELFs. ALPM gives the metapackage a zero-byte file list. The auditor checked its archive manifest for package metadata and also rejected an empty file list substituted for the installed musl record. See `foundation/installed-root-meta-02`, receipt SHA-256 `0632e6ff628e031080655367caa4aa01df213d328e32c1bae77a82bd766330f2`.
27+
2628For the exact order within a source-built feed, run the following on the worker. The checker verifies each archive against the receipt from `feed publish`, reads its `.PKGINFO`, and resolves runtime, build and check dependencies including versioned providers. Its inputs are the feed and the indicated target architecture. The worker supplies `bsdtar`, ALPM's `vercmp` and Python 3.11 or later.
2729
2830```sh
@@ -0,0 +1,11 @@
1+defpkgbuild(build-base,
2+ #:pkgname, "build-base",
3+ #:pkgver, "1.0",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "Vinix C and C++ build environment",
6+ #:arch, [#:any],
7+ #:url, "https://github.com/vlang/vinix",
8+ #:license, "0BSD",
9+ ; musl contains the startup objects and libc headers, and gcc includes g++.
10+ #:depends, ["binutils", "file", "gcc", "make", "musl", "linux-headers", "fortify-headers", "patch"],
11+ #:package, fn() {})
@@ -55,6 +55,31 @@ fn (client &Client) resolve(path string) !string {
5555 return parts.join('/')
5656}
5757
58+fn check_empty_file_list(dir string) ! {
59+ // libalpm writes a zero-byte files record for metadata-only packages.
60+ mtree := os.exec(['gzip', '-dc', '--', os.join_path(dir, 'mtree')])
61+ if mtree.exit_code != 0 || !mtree.output.starts_with('#mtree\n') {
62+ return error('missing or invalid mtree for ${os.base(dir)}')
63+ }
64+ mut has_pkginfo := false
65+ for line in mtree.output.split_into_lines() {
66+ if line == '' || line.starts_with('#') || line.starts_with('/set ')
67+ || line.starts_with('/unset ') {
68+ continue
69+ }
70+ path := line.all_before(' ')
71+ if path !in ['./.PKGINFO', './.BUILDINFO', './.INSTALL', './.CHANGELOG'] {
72+ return error('empty file list for ${os.base(dir)} with payload path ${path}')
73+ }
74+ if path == './.PKGINFO' {
75+ has_pkginfo = true
76+ }
77+ }
78+ if !has_pkginfo {
79+ return error('missing package metadata in mtree for ${os.base(dir)}')
80+ }
81+}
82+
5883fn (mut client Client) load_owners(database string) !int {
5984 mut packages := 0
6085 for entry in os.ls(database)! {
@@ -70,6 +95,10 @@ fn (mut client Client) load_owners(database string) !int {
7095 }
7196 packages++
7297 list := os.read_file(os.join_path(dir, 'files'))!
98+ if list == '' {
99+ check_empty_file_list(dir)!
100+ continue
101+ }
73102 if !list.starts_with('%FILES%\n') { return error('missing file list for ${entry}') }
74103 for file in list.all_after('%FILES%\n').all_before('\n\n').split_into_lines() {
75104 if file == '' || file.ends_with('/') {