aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/qemu.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-01 23:54:40 +0900
committerOphestra <cat@gensokyo.uk>2026-03-02 01:24:50 +0900
commitcc60e0d15d79916a69c8a1caeb3c4611351bb6c4 (patch)
tree67f4f59ed7ba7b18af51338e56ffa8d9acf52da6 /internal/rosa/qemu.go
parent9deaf853f0676ee4475468bffd35aae7e1160a74 (diff)
internal/rosa/make: migrate to helper interface
This also updates all affected artifacts to use new behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/qemu.go')
-rw-r--r--internal/rosa/qemu.go61
1 files changed, 32 insertions, 29 deletions
diff --git a/internal/rosa/qemu.go b/internal/rosa/qemu.go
index 34241e0b..385c13df 100644
--- a/internal/rosa/qemu.go
+++ b/internal/rosa/qemu.go
@@ -7,12 +7,13 @@ func (t Toolchain) newQEMU() pkg.Artifact {
version = "10.2.1"
checksum = "rjLTSgHJd3X3Vgpxrsus_ZZiaYLiNix1YhcHaGbLd_odYixwZjCcAIt8CVQPJGdZ"
)
- return t.NewViaMake("qemu", version, t.NewPatchedSource(
- "qemu", version, pkg.NewHTTPGetTar(
- nil, "https://download.qemu.org/qemu-"+version+".tar.bz2",
- mustDecode(checksum),
- pkg.TarBzip2,
- ), false, [2]string{"disable-mcast-test", `diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c
+ return t.NewPackage("qemu", version, pkg.NewHTTPGetTar(
+ nil, "https://download.qemu.org/qemu-"+version+".tar.bz2",
+ mustDecode(checksum),
+ pkg.TarBzip2,
+ ), &PackageAttr{
+ Patches: [][2]string{
+ {"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
+++ b/tests/qtest/netdev-socket.c
@@ -35,26 +36,28 @@ index b731af0ad9..b5cbed4801 100644
#endif
}
`},
- ), &MakeAttr{
+ },
+
// configure script uses source as scratch space
Writable: true,
+ Chmod: true,
ScriptEarly: `
# tests expect /var/tmp/ to be available
mkdir -p /var/tmp/
# https://gitlab.com/qemu-project/qemu/-/issues/3145
-(cd /usr/src/qemu && sed -i \
+sed -i \
's,Input/output error,I/O error,g' \
tests/qemu-iotests/[0-9][0-9][0-9]* \
tests/qemu-iotests/tests/copy-before-write \
- tests/qemu-iotests/tests/file-io-error.out &&
+ tests/qemu-iotests/tests/file-io-error.out
cat << EOF > tests/qemu-iotests/150
#!/bin/sh
_notrun 'appears to spuriously fail on zfs'
EOF
-)
`,
+ }, &MakeHelper{
Configure: [][2]string{
{"disable-download"},
{"disable-docs"},
@@ -68,28 +71,28 @@ EOF
"ppc64-softmmu"},
},
},
- t.Load(Bash),
- t.Load(Python),
- t.Load(Ninja),
- t.Load(Bzip2),
- t.Load(PkgConfig),
- t.Load(Diffutils),
+ Bash,
+ Python,
+ Ninja,
+ Bzip2,
+ PkgConfig,
+ Diffutils,
- t.Load(OpenSSL),
- t.Load(Bzip2),
- t.Load(XZ),
+ OpenSSL,
+ Bzip2,
+ XZ,
- t.Load(Flex),
- t.Load(Bison),
- t.Load(M4),
+ Flex,
+ Bison,
+ M4,
- t.Load(PCRE2),
- t.Load(Libffi),
- t.Load(Zlib),
- t.Load(GLib),
- t.Load(Zstd),
- t.Load(DTC),
- t.Load(KernelHeaders),
+ PCRE2,
+ Libffi,
+ Zlib,
+ GLib,
+ Zstd,
+ DTC,
+ KernelHeaders,
)
}
func init() { artifactsF[QEMU] = Toolchain.newQEMU }