aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/rosa/acl.go2
-rw-r--r--internal/rosa/cmake.go8
-rw-r--r--internal/rosa/curl.go2
-rw-r--r--internal/rosa/dtc.go2
-rw-r--r--internal/rosa/elfutils.go2
-rw-r--r--internal/rosa/etc.go2
-rw-r--r--internal/rosa/fakeroot.go2
-rw-r--r--internal/rosa/fuse.go2
-rw-r--r--internal/rosa/gnu.go12
-rw-r--r--internal/rosa/gtk.go2
-rw-r--r--internal/rosa/hakurei_current.go2
-rw-r--r--internal/rosa/hakurei_release.go2
-rw-r--r--internal/rosa/kernel.go2
-rw-r--r--internal/rosa/kmod.go2
-rw-r--r--internal/rosa/libseccomp.go2
-rw-r--r--internal/rosa/llvm.go78
-rw-r--r--internal/rosa/llvm_amd64.go2
-rw-r--r--internal/rosa/llvm_arm64.go2
-rw-r--r--internal/rosa/make.go2
-rw-r--r--internal/rosa/meson.go4
-rw-r--r--internal/rosa/ncurses.go2
-rw-r--r--internal/rosa/openssl.go2
-rw-r--r--internal/rosa/pcre2.go2
-rw-r--r--internal/rosa/perl.go8
-rw-r--r--internal/rosa/pkg-config.go2
-rw-r--r--internal/rosa/procps.go2
-rw-r--r--internal/rosa/qemu.go4
-rw-r--r--internal/rosa/rosa.go7
-rw-r--r--internal/rosa/rsync.go2
-rw-r--r--internal/rosa/strace.go2
-rw-r--r--internal/rosa/util-linux.go2
-rw-r--r--internal/rosa/wayland.go4
-rw-r--r--internal/rosa/zlib.go2
-rw-r--r--internal/rosa/zstd.go2
34 files changed, 92 insertions, 85 deletions
diff --git a/internal/rosa/acl.go b/internal/rosa/acl.go
index 780ee0f6..1a76de35 100644
--- a/internal/rosa/acl.go
+++ b/internal/rosa/acl.go
@@ -13,7 +13,7 @@ func (t Toolchain) newAttr() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
- Patches: [][2]string{
+ Patches: []KV{
{"libgen-basename", `From 8a80d895dfd779373363c3a4b62ecce5a549efb2 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sat, 30 Mar 2024 10:17:10 +0100
diff --git a/internal/rosa/cmake.go b/internal/rosa/cmake.go
index 5e52fb2f..e7abffde 100644
--- a/internal/rosa/cmake.go
+++ b/internal/rosa/cmake.go
@@ -25,7 +25,7 @@ func (t Toolchain) newCMake() (pkg.Artifact, string) {
// expected to be writable in the copy made during bootstrap
Chmod: true,
- Patches: [][2]string{
+ Patches: []KV{
{"bootstrap-test-no-openssl", `diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
index 137de78bc1..b4da52e664 100644
--- a/Tests/BootstrapTest.cmake
@@ -88,7 +88,7 @@ index 2ead810437..f85cbb8b1c 100644
OmitDefaults: true,
ConfigureName: "/usr/src/cmake/bootstrap",
- Configure: [][2]string{
+ Configure: []KV{
{"prefix", "/system"},
{"parallel", `"$(nproc)"`},
{"--"},
@@ -125,7 +125,7 @@ type CMakeHelper struct {
Append []string
// CMake CACHE entries.
- Cache [][2]string
+ Cache []KV
// Runs after install.
Script string
@@ -170,7 +170,7 @@ func (*CMakeHelper) wantsDir() string { return "/cure/" }
func (attr *CMakeHelper) script(name string) string {
if attr == nil {
attr = &CMakeHelper{
- Cache: [][2]string{
+ Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
}
diff --git a/internal/rosa/curl.go b/internal/rosa/curl.go
index 5e71c5e8..38046fd8 100644
--- a/internal/rosa/curl.go
+++ b/internal/rosa/curl.go
@@ -18,7 +18,7 @@ func (t Toolchain) newCurl() (pkg.Artifact, string) {
chmod +w tests/data && rm tests/data/test459
`,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"with-openssl"},
{"with-ca-bundle", "/system/etc/ssl/certs/ca-bundle.crt"},
diff --git a/internal/rosa/dtc.go b/internal/rosa/dtc.go
index dc341779..de1336e2 100644
--- a/internal/rosa/dtc.go
+++ b/internal/rosa/dtc.go
@@ -18,7 +18,7 @@ func (t Toolchain) newDTC() (pkg.Artifact, string) {
Writable: true,
Chmod: true,
}, &MesonHelper{
- Setup: [][2]string{
+ Setup: []KV{
{"Dyaml", "disabled"},
{"Dstatic-build", "true"},
},
diff --git a/internal/rosa/elfutils.go b/internal/rosa/elfutils.go
index 82796524..52351323 100644
--- a/internal/rosa/elfutils.go
+++ b/internal/rosa/elfutils.go
@@ -22,7 +22,7 @@ func (t Toolchain) newElfutils() (pkg.Artifact, string) {
// nonstandard glibc extension
SkipCheck: true,
- Configure: [][2]string{
+ Configure: []KV{
{"enable-deterministic-archives"},
},
},
diff --git a/internal/rosa/etc.go b/internal/rosa/etc.go
index f6ef1fa5..17723a17 100644
--- a/internal/rosa/etc.go
+++ b/internal/rosa/etc.go
@@ -25,7 +25,7 @@ func (a cureEtc) Cure(t *pkg.FContext) (err error) {
if err = os.MkdirAll(etc.String(), 0700); err != nil {
return
}
- for _, f := range [][2]string{
+ for _, f := range []KV{
{"hosts", "127.0.0.1 localhost cure cure-net\n"},
{"passwd", `root:x:0:0:System administrator:/proc/nonexistent:/bin/sh
cure:x:1023:1023:Cure:/usr/src:/bin/sh
diff --git a/internal/rosa/fakeroot.go b/internal/rosa/fakeroot.go
index 7cd7110d..75544b29 100644
--- a/internal/rosa/fakeroot.go
+++ b/internal/rosa/fakeroot.go
@@ -13,7 +13,7 @@ func (t Toolchain) newFakeroot() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarBzip2,
), &PackageAttr{
- Patches: [][2]string{
+ Patches: []KV{
{"remove-broken-docs", `diff --git a/doc/Makefile.am b/doc/Makefile.am
index f135ad9..85c784c 100644
--- a/doc/Makefile.am
diff --git a/internal/rosa/fuse.go b/internal/rosa/fuse.go
index c04e8de6..ee8ab579 100644
--- a/internal/rosa/fuse.go
+++ b/internal/rosa/fuse.go
@@ -13,7 +13,7 @@ func (t Toolchain) newFuse() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), nil, &MesonHelper{
- Setup: [][2]string{
+ Setup: []KV{
{"Ddefault_library", "both"},
{"Dtests", "true"},
{"Duseroot", "false"},
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index 5402049a..4d5cc865 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -351,7 +351,7 @@ func (t Toolchain) newBash() (pkg.Artifact, string) {
Flag: TEarly,
}, &MakeHelper{
Script: "ln -s bash /work/system/bin/sh\n",
- Configure: [][2]string{
+ Configure: []KV{
{"without-bash-malloc"},
},
}), version
@@ -390,7 +390,7 @@ test_disable 'int main(){return 0;}' gnulib-tests/test-fchownat.c
test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c
`,
- Patches: [][2]string{
+ Patches: []KV{
{"tests-fix-job-control", `From 21d287324aa43aa3a31f39619ade0deac7fd6013 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 24 Feb 2026 15:44:41 +0000
@@ -485,7 +485,7 @@ index 9a395416b..fbb043312 100755
Flag: TEarly,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"enable-single-binary", "symlinks"},
},
},
@@ -720,7 +720,7 @@ func (t Toolchain) newTar() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"disable-acl"},
{"without-posix-acls"},
{"without-xattrs"},
@@ -903,7 +903,7 @@ func (t Toolchain) newGCC() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), &PackageAttr{
- Patches: [][2]string{
+ Patches: []KV{
{"musl-off64_t-loff_t", `diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 180f5c31d74..44d7ea73f7d 100644
--- a/libgo/sysinfo.c
@@ -1062,7 +1062,7 @@ ln -s system/lib /work/
// it also saturates the CPU for a consequential amount of time.
Flag: TExclusive,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"disable-multilib"},
{"with-multilib-list", `""`},
{"enable-default-pie"},
diff --git a/internal/rosa/gtk.go b/internal/rosa/gtk.go
index dddb2277..9339bd9e 100644
--- a/internal/rosa/gtk.go
+++ b/internal/rosa/gtk.go
@@ -35,7 +35,7 @@ func (t Toolchain) newGLib() (pkg.Artifact, string) {
)),
},
}, &MesonHelper{
- Setup: [][2]string{
+ Setup: []KV{
{"Ddefault_library", "both"},
},
},
diff --git a/internal/rosa/hakurei_current.go b/internal/rosa/hakurei_current.go
index a6eec7f1..4ad23772 100644
--- a/internal/rosa/hakurei_current.go
+++ b/internal/rosa/hakurei_current.go
@@ -23,4 +23,4 @@ var hakureiSource = pkg.NewTar(pkg.NewFile(
), pkg.TarGzip)
// hakureiPatches are patches applied against the compile-time source tree.
-var hakureiPatches [][2]string
+var hakureiPatches []KV
diff --git a/internal/rosa/hakurei_release.go b/internal/rosa/hakurei_release.go
index 8142e3bb..83d8cf94 100644
--- a/internal/rosa/hakurei_release.go
+++ b/internal/rosa/hakurei_release.go
@@ -15,4 +15,4 @@ var hakureiSource = pkg.NewHTTPGetTar(
)
// hakureiPatches are patches applied against a hakurei release.
-var hakureiPatches [][2]string
+var hakureiPatches []KV
diff --git a/internal/rosa/kernel.go b/internal/rosa/kernel.go
index d2b1743b..9b2fcfa6 100644
--- a/internal/rosa/kernel.go
+++ b/internal/rosa/kernel.go
@@ -90,7 +90,7 @@ exec /system/sbin/depmod -m /lib/modules "$@"
`))),
},
- Patches: [][2]string{
+ Patches: []KV{
{"f54a91f5337cd918eb86cf600320d25b6cfd8209", `From f54a91f5337cd918eb86cf600320d25b6cfd8209 Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@kernel.org>
Date: Sat, 13 Dec 2025 19:58:10 +0900
diff --git a/internal/rosa/kmod.go b/internal/rosa/kmod.go
index 61346abe..ddb2a178 100644
--- a/internal/rosa/kmod.go
+++ b/internal/rosa/kmod.go
@@ -13,7 +13,7 @@ func (t Toolchain) newKmod() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), nil, &MesonHelper{
- Setup: [][2]string{
+ Setup: []KV{
{"Dmoduledir", "/system/lib/modules"},
{"Dsysconfdir", "/system/etc"},
{"Dbashcompletiondir", "no"},
diff --git a/internal/rosa/libseccomp.go b/internal/rosa/libseccomp.go
index 972fff21..0eb15c1e 100644
--- a/internal/rosa/libseccomp.go
+++ b/internal/rosa/libseccomp.go
@@ -17,7 +17,7 @@ func (t Toolchain) newLibseccomp() (pkg.Artifact, string) {
ln -s ../system/bin/bash /bin/
`,
- Patches: [][2]string{
+ Patches: []KV{
{"fix-export-oob-read", `diff --git a/src/api.c b/src/api.c
index adccef3..65a277a 100644
--- a/src/api.c
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go
index b654d20a..eca68989 100644
--- a/internal/rosa/llvm.go
+++ b/internal/rosa/llvm.go
@@ -19,7 +19,7 @@ type llvmAttr struct {
// Concatenated with default environment for PackageAttr.Env.
env []string
// Concatenated with generated entries for CMakeHelper.Cache.
- cmake [][2]string
+ cmake []KV
// Override CMakeHelper.Append.
append []string
// Passed through to PackageAttr.NonStage0.
@@ -30,7 +30,7 @@ type llvmAttr struct {
script string
// Patch name and body pairs.
- patches [][2]string
+ patches []KV
}
const (
@@ -94,43 +94,45 @@ func (t Toolchain) newLLVMVariant(variant string, attr *llvmAttr) pkg.Artifact {
var script string
- cache := [][2]string{
+ cache := []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
}
if len(projects) > 0 {
- cache = append(cache,
- [2]string{"LLVM_ENABLE_PROJECTS", `"${ROSA_LLVM_PROJECTS}"`})
+ cache = append(cache, []KV{
+ {"LLVM_ENABLE_PROJECTS", `"${ROSA_LLVM_PROJECTS}"`},
+ }...)
}
if len(runtimes) > 0 {
- cache = append(cache,
- [2]string{"LLVM_ENABLE_RUNTIMES", `"${ROSA_LLVM_RUNTIMES}"`})
+ cache = append(cache, []KV{
+ {"LLVM_ENABLE_RUNTIMES", `"${ROSA_LLVM_RUNTIMES}"`},
+ }...)
}
cmakeAppend := []string{"llvm"}
if attr.append != nil {
cmakeAppend = attr.append
} else {
- cache = append(cache,
- [2]string{"LLVM_ENABLE_LIBCXX", "ON"},
- [2]string{"LLVM_USE_LINKER", "lld"},
+ cache = append(cache, []KV{
+ {"LLVM_ENABLE_LIBCXX", "ON"},
+ {"LLVM_USE_LINKER", "lld"},
- [2]string{"LLVM_INSTALL_BINUTILS_SYMLINKS", "ON"},
- [2]string{"LLVM_INSTALL_CCTOOLS_SYMLINKS", "ON"},
+ {"LLVM_INSTALL_BINUTILS_SYMLINKS", "ON"},
+ {"LLVM_INSTALL_CCTOOLS_SYMLINKS", "ON"},
- [2]string{"LLVM_LIT_ARGS", "'--verbose'"},
- )
+ {"LLVM_LIT_ARGS", "'--verbose'"},
+ }...)
}
if attr.flags&llvmProjectClang != 0 {
- cache = append(cache,
- [2]string{"CLANG_DEFAULT_LINKER", "lld"},
- [2]string{"CLANG_DEFAULT_CXX_STDLIB", "libc++"},
- [2]string{"CLANG_DEFAULT_RTLIB", "compiler-rt"},
- [2]string{"CLANG_DEFAULT_UNWINDLIB", "libunwind"},
- )
+ cache = append(cache, []KV{
+ {"CLANG_DEFAULT_LINKER", "lld"},
+ {"CLANG_DEFAULT_CXX_STDLIB", "libc++"},
+ {"CLANG_DEFAULT_RTLIB", "compiler-rt"},
+ {"CLANG_DEFAULT_UNWINDLIB", "libunwind"},
+ }...)
}
if attr.flags&llvmProjectLld != 0 {
script += `
@@ -139,25 +141,27 @@ ln -s ld.lld /work/system/bin/ld
}
if attr.flags&llvmRuntimeCompilerRT != 0 {
if attr.append == nil {
- cache = append(cache,
- [2]string{"COMPILER_RT_USE_LLVM_UNWINDER", "ON"})
+ cache = append(cache, []KV{
+ {"COMPILER_RT_USE_LLVM_UNWINDER", "ON"},
+ }...)
}
}
if attr.flags&llvmRuntimeLibunwind != 0 {
- cache = append(cache,
- [2]string{"LIBUNWIND_USE_COMPILER_RT", "ON"})
+ cache = append(cache, []KV{
+ {"LIBUNWIND_USE_COMPILER_RT", "ON"},
+ }...)
}
if attr.flags&llvmRuntimeLibcxx != 0 {
- cache = append(cache,
- [2]string{"LIBCXX_HAS_MUSL_LIBC", "ON"},
- [2]string{"LIBCXX_USE_COMPILER_RT", "ON"},
- )
+ cache = append(cache, []KV{
+ {"LIBCXX_HAS_MUSL_LIBC", "ON"},
+ {"LIBCXX_USE_COMPILER_RT", "ON"},
+ }...)
}
if attr.flags&llvmRuntimeLibcxxABI != 0 {
- cache = append(cache,
- [2]string{"LIBCXXABI_USE_COMPILER_RT", "ON"},
- [2]string{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
- )
+ cache = append(cache, []KV{
+ {"LIBCXXABI_USE_COMPILER_RT", "ON"},
+ {"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
+ }...)
}
return t.NewPackage("llvm", llvmVersion, pkg.NewHTTPGetTar(
@@ -208,7 +212,7 @@ func (t Toolchain) newLLVM() (musl, compilerRT, runtimes, clang pkg.Artifact) {
panic("unsupported target " + runtime.GOARCH)
}
- minimalDeps := [][2]string{
+ minimalDeps := []KV{
{"LLVM_ENABLE_ZLIB", "OFF"},
{"LLVM_ENABLE_ZSTD", "OFF"},
{"LLVM_ENABLE_LIBXML2", "OFF"},
@@ -222,7 +226,7 @@ func (t Toolchain) newLLVM() (musl, compilerRT, runtimes, clang pkg.Artifact) {
env: stage0ExclConcat(t, []string{},
"LDFLAGS="+earlyLDFLAGS(false),
),
- cmake: [][2]string{
+ cmake: []KV{
// libc++ not yet available
{"CMAKE_CXX_COMPILER_TARGET", ""},
@@ -272,7 +276,7 @@ ln -s \
"LDFLAGS="+earlyLDFLAGS(false),
),
flags: llvmRuntimeLibunwind | llvmRuntimeLibcxx | llvmRuntimeLibcxxABI,
- cmake: slices.Concat([][2]string{
+ cmake: slices.Concat([]KV{
// libc++ not yet available
{"CMAKE_CXX_COMPILER_WORKS", "ON"},
@@ -293,7 +297,7 @@ ln -s \
"CXXFLAGS="+earlyCXXFLAGS(),
"LDFLAGS="+earlyLDFLAGS(false),
),
- cmake: slices.Concat([][2]string{
+ cmake: slices.Concat([]KV{
{"LLVM_TARGETS_TO_BUILD", target},
{"CMAKE_CROSSCOMPILING", "OFF"},
{"CXX_SUPPORTS_CUSTOM_LINKER", "ON"},
@@ -310,7 +314,7 @@ ln -s clang++ /work/system/bin/c++
ninja check-all
`,
- patches: slices.Concat([][2]string{
+ patches: slices.Concat([]KV{
{"add-rosa-vendor", `diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index 9c83abeeb3b1..5acfe5836a23 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
diff --git a/internal/rosa/llvm_amd64.go b/internal/rosa/llvm_amd64.go
index febdbbdd..dc28c367 100644
--- a/internal/rosa/llvm_amd64.go
+++ b/internal/rosa/llvm_amd64.go
@@ -1,4 +1,4 @@
package rosa
// clangPatches are patches applied to the LLVM source tree for building clang.
-var clangPatches [][2]string
+var clangPatches []KV
diff --git a/internal/rosa/llvm_arm64.go b/internal/rosa/llvm_arm64.go
index 79876699..4ce6646b 100644
--- a/internal/rosa/llvm_arm64.go
+++ b/internal/rosa/llvm_arm64.go
@@ -1,7 +1,7 @@
package rosa
// clangPatches are patches applied to the LLVM source tree for building clang.
-var clangPatches [][2]string
+var clangPatches []KV
// one version behind, latest fails 5 tests with 2 flaky on arm64
const (
diff --git a/internal/rosa/make.go b/internal/rosa/make.go
index 92fa1028..3930c3c3 100644
--- a/internal/rosa/make.go
+++ b/internal/rosa/make.go
@@ -60,7 +60,7 @@ type MakeHelper struct {
// Alternative name for the configure script.
ConfigureName string
// Flags passed to the configure script.
- Configure [][2]string
+ Configure []KV
// Host target triple, zero value is equivalent to the Rosa OS triple.
Host string
// Target triple, zero value is equivalent to the Rosa OS triple.
diff --git a/internal/rosa/meson.go b/internal/rosa/meson.go
index ed8cde96..63b945ae 100644
--- a/internal/rosa/meson.go
+++ b/internal/rosa/meson.go
@@ -59,7 +59,7 @@ type MesonHelper struct {
Script string
// Flags passed to the setup command.
- Setup [][2]string
+ Setup []KV
// Whether to skip meson test.
SkipTest bool
}
@@ -113,7 +113,7 @@ meson test \
cd "$(mktemp -d)"
meson setup \
` + strings.Join(slices.Collect(func(yield func(string) bool) {
- for _, v := range append([][2]string{
+ for _, v := range append([]KV{
{"prefix", "/system"},
{"buildtype", "release"},
}, attr.Setup...) {
diff --git a/internal/rosa/ncurses.go b/internal/rosa/ncurses.go
index f1599111..be8a8e0d 100644
--- a/internal/rosa/ncurses.go
+++ b/internal/rosa/ncurses.go
@@ -15,7 +15,7 @@ func (t Toolchain) newNcurses() (pkg.Artifact, string) {
// "tests" are actual demo programs, not a test suite.
SkipCheck: true,
- Configure: [][2]string{
+ Configure: []KV{
{"with-pkg-config"},
{"enable-pc-files"},
},
diff --git a/internal/rosa/openssl.go b/internal/rosa/openssl.go
index 2c823300..42ec982b 100644
--- a/internal/rosa/openssl.go
+++ b/internal/rosa/openssl.go
@@ -20,7 +20,7 @@ func (t Toolchain) newOpenSSL() (pkg.Artifact, string) {
OmitDefaults: true,
ConfigureName: "/usr/src/openssl/Configure",
- Configure: [][2]string{
+ Configure: []KV{
{"prefix", "/system"},
{"libdir", "lib"},
{"openssldir", "etc/ssl"},
diff --git a/internal/rosa/pcre2.go b/internal/rosa/pcre2.go
index 3bc241b5..cb4091f9 100644
--- a/internal/rosa/pcre2.go
+++ b/internal/rosa/pcre2.go
@@ -20,7 +20,7 @@ func (t Toolchain) newPCRE2() (pkg.Artifact, string) {
ln -s ../system/bin/toybox /bin/echo
`,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"enable-jit"},
{"enable-pcre2-8"},
{"enable-pcre2-16"},
diff --git a/internal/rosa/perl.go b/internal/rosa/perl.go
index f5aaceba..e26b9c21 100644
--- a/internal/rosa/perl.go
+++ b/internal/rosa/perl.go
@@ -31,7 +31,7 @@ rm -f /system/bin/ps # perl does not like toybox ps
InPlace: true,
ConfigureName: "./Configure",
- Configure: [][2]string{
+ Configure: []KV{
{"-des"},
{"Dprefix", "/system"},
{"Dcc", "clang"},
@@ -67,7 +67,7 @@ func init() {
func (t Toolchain) newViaPerlModuleBuild(
name, version string,
source pkg.Artifact,
- patches [][2]string,
+ patches []KV,
extra ...PArtifact,
) pkg.Artifact {
if name == "" || version == "" {
@@ -116,7 +116,7 @@ func init() {
func (t Toolchain) newViaPerlMakeMaker(
name, version string,
source pkg.Artifact,
- patches [][2]string,
+ patches []KV,
extra ...PArtifact,
) pkg.Artifact {
return t.NewPackage("perl-"+name, version, source, &PackageAttr{
@@ -131,7 +131,7 @@ func (t Toolchain) newViaPerlMakeMaker(
InPlace: true,
ConfigureName: "perl Makefile.PL",
- Configure: [][2]string{
+ Configure: []KV{
{"PREFIX", "/system"},
},
Check: []string{"test"},
diff --git a/internal/rosa/pkg-config.go b/internal/rosa/pkg-config.go
index 594e7706..d8c59813 100644
--- a/internal/rosa/pkg-config.go
+++ b/internal/rosa/pkg-config.go
@@ -13,7 +13,7 @@ func (t Toolchain) newPkgConfig() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), nil, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"CFLAGS", "'-Wno-int-conversion'"},
{"with-internal-glib"},
},
diff --git a/internal/rosa/procps.go b/internal/rosa/procps.go
index bd7b7594..e7a70882 100644
--- a/internal/rosa/procps.go
+++ b/internal/rosa/procps.go
@@ -14,7 +14,7 @@ func (t Toolchain) newProcps() (pkg.Artifact, string) {
pkg.TarBzip2,
), nil, &MakeHelper{
Generate: "./autogen.sh",
- Configure: [][2]string{
+ Configure: []KV{
{"without-ncurses"},
},
},
diff --git a/internal/rosa/qemu.go b/internal/rosa/qemu.go
index 3472b6ef..40e95c8a 100644
--- a/internal/rosa/qemu.go
+++ b/internal/rosa/qemu.go
@@ -12,7 +12,7 @@ func (t Toolchain) newQEMU() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarBzip2,
), &PackageAttr{
- Patches: [][2]string{
+ Patches: []KV{
{"disable-mcast-test", `diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c
index b731af0ad9..b5cbed4801 100644
--- a/tests/qtest/netdev-socket.c
@@ -58,7 +58,7 @@ _notrun 'appears to spuriously fail on zfs'
EOF
`,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"disable-download"},
{"disable-docs"},
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index b6a2c023..3b05b368 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -37,6 +37,9 @@ func mustDecode(s string) pkg.Checksum {
return pkg.MustDecode(s)
}
+// KV is a key-value pair of strings.
+type KV [2]string
+
var (
// AbsUsrSrc is the conventional directory to place source code under.
AbsUsrSrc = fhs.AbsUsr.Append("src")
@@ -364,7 +367,7 @@ func (t Toolchain) NewPatchedSource(
name, version string,
source pkg.Artifact,
passthrough bool,
- patches ...[2]string,
+ patches ...KV,
) pkg.Artifact {
if passthrough && len(patches) == 0 {
return source
@@ -446,7 +449,7 @@ type PackageAttr struct {
ScriptEarly string
// Passed to [Toolchain.NewPatchedSource].
- Patches [][2]string
+ Patches []KV
// Kind of source artifact.
SourceKind int
diff --git a/internal/rosa/rsync.go b/internal/rosa/rsync.go
index 041264b8..1bf5cf60 100644
--- a/internal/rosa/rsync.go
+++ b/internal/rosa/rsync.go
@@ -15,7 +15,7 @@ func (t Toolchain) newRsync() (pkg.Artifact, string) {
), &PackageAttr{
Flag: TEarly,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"disable-openssl"},
{"disable-xxhash"},
{"disable-zstd"},
diff --git a/internal/rosa/strace.go b/internal/rosa/strace.go
index 0cae379f..3bc4428e 100644
--- a/internal/rosa/strace.go
+++ b/internal/rosa/strace.go
@@ -23,7 +23,7 @@ sed -i 's/unsigned int msg_len;$/uint32_t msg_len;/g' \
tests/nlattr.c
`,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
// tests broken on clang
{"disable-gcc-Werror"},
diff --git a/internal/rosa/util-linux.go b/internal/rosa/util-linux.go
index 57c2e61e..35e21b66 100644
--- a/internal/rosa/util-linux.go
+++ b/internal/rosa/util-linux.go
@@ -22,7 +22,7 @@ func (t Toolchain) newUtilLinux() (pkg.Artifact, string) {
ln -s ../system/bin/bash /bin/
`,
}, &MakeHelper{
- Configure: [][2]string{
+ Configure: []KV{
{"disable-use-tty-group"},
{"disable-makeinstall-setuid"},
{"disable-makeinstall-chown"},
diff --git a/internal/rosa/wayland.go b/internal/rosa/wayland.go
index 5b7f4545..a529a968 100644
--- a/internal/rosa/wayland.go
+++ b/internal/rosa/wayland.go
@@ -20,7 +20,7 @@ chmod +w tests tests/sanity-test.c
echo 'int main(){}' > tests/sanity-test.c
`,
}, &MesonHelper{
- Setup: [][2]string{
+ Setup: []KV{
{"Ddefault_library", "both"},
{"Ddocumentation", "false"},
{"Dtests", "true"},
@@ -63,7 +63,7 @@ func (t Toolchain) newWaylandProtocols() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarBzip2,
), &PackageAttr{
- Patches: [][2]string{
+ Patches: []KV{
{"build-only", `From 8b4c76275fa1b6e0a99a53494151d9a2c907144d Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Fri, 8 Nov 2024 11:27:25 -0600
diff --git a/internal/rosa/zlib.go b/internal/rosa/zlib.go
index 00cef53f..3d5d14f0 100644
--- a/internal/rosa/zlib.go
+++ b/internal/rosa/zlib.go
@@ -12,7 +12,7 @@ func (t Toolchain) newZlib() (pkg.Artifact, string) {
mustDecode(checksum),
pkg.TarGzip,
), nil, &CMakeHelper{
- Cache: [][2]string{
+ Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"ZLIB_BUILD_TESTING", "OFF"},
diff --git a/internal/rosa/zstd.go b/internal/rosa/zstd.go
index 85a5b173..9e39d3cf 100644
--- a/internal/rosa/zstd.go
+++ b/internal/rosa/zstd.go
@@ -14,7 +14,7 @@ func (t Toolchain) newZstd() (pkg.Artifact, string) {
pkg.TarGzip,
), nil, &CMakeHelper{
Append: []string{"build", "cmake"},
- Cache: [][2]string{
+ Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
}), version