internal/rosa: chmod via patch helper
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (race detector) (push) Successful in 57s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m9s
Test / ShareFS (push) Successful in 3m4s
Test / Hakurei (race detector) (push) Successful in 3m42s
Test / Hpkg (push) Successful in 3m24s
Test / Flake checks (push) Successful in 1m46s
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (race detector) (push) Successful in 57s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m9s
Test / ShareFS (push) Successful in 3m4s
Test / Hakurei (race detector) (push) Successful in 3m42s
Test / Hpkg (push) Successful in 3m24s
Test / Flake checks (push) Successful in 1m46s
This works around the zfs overlay mount overhead and significantly reduces I/O in general. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -17,9 +17,6 @@ func (t Toolchain) newCMake() pkg.Artifact {
|
|||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
t.Load(KernelHeaders),
|
t.Load(KernelHeaders),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
# expected to be writable in the copy made during bootstrap
|
|
||||||
chmod -R +w /usr/src/cmake/Tests
|
|
||||||
|
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/cmake/bootstrap \
|
/usr/src/cmake/bootstrap \
|
||||||
--prefix=/system \
|
--prefix=/system \
|
||||||
@@ -28,13 +25,15 @@ cd "$(mktemp -d)"
|
|||||||
-DCMAKE_USE_OPENSSL=OFF
|
-DCMAKE_USE_OPENSSL=OFF
|
||||||
make "-j$(nproc)"
|
make "-j$(nproc)"
|
||||||
make DESTDIR=/work install
|
make DESTDIR=/work install
|
||||||
`, pkg.Path(AbsUsrSrc.Append("cmake"), true,
|
`, pkg.Path(AbsUsrSrc.Append("cmake"), true, t.NewPatchedSource(
|
||||||
pkg.NewHTTPGetTar(
|
// expected to be writable in the copy made during bootstrap
|
||||||
|
"cmake", version, pkg.NewHTTPGetTar(
|
||||||
nil, "https://github.com/Kitware/CMake/releases/download/"+
|
nil, "https://github.com/Kitware/CMake/releases/download/"+
|
||||||
"v"+version+"/cmake-"+version+".tar.gz",
|
"v"+version+"/cmake-"+version+".tar.gz",
|
||||||
mustDecode(checksum),
|
mustDecode(checksum),
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
)))
|
), false,
|
||||||
|
)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[CMake] = Toolchain.newCMake }
|
func init() { artifactsF[CMake] = Toolchain.newCMake }
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,18 @@ func (t Toolchain) newGit() pkg.Artifact {
|
|||||||
|
|
||||||
t.Load(Zlib),
|
t.Load(Zlib),
|
||||||
), nil, nil, `
|
), nil, nil, `
|
||||||
chmod -R +w /usr/src/git && cd /usr/src/git
|
cd /usr/src/git
|
||||||
make configure
|
make configure
|
||||||
./configure --prefix=/system
|
./configure --prefix=/system
|
||||||
make "-j$(nproc)" all
|
make "-j$(nproc)" all
|
||||||
make DESTDIR=/work install
|
make DESTDIR=/work install
|
||||||
`, pkg.Path(AbsUsrSrc.Append("git"), true, pkg.NewHTTPGetTar(
|
`, pkg.Path(AbsUsrSrc.Append("git"), true, t.NewPatchedSource(
|
||||||
nil, "https://www.kernel.org/pub/software/scm/git/"+
|
"git", version, pkg.NewHTTPGetTar(
|
||||||
"git-"+version+".tar.gz",
|
nil, "https://www.kernel.org/pub/software/scm/git/"+
|
||||||
mustDecode(checksum),
|
"git-"+version+".tar.gz",
|
||||||
pkg.TarGzip,
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
), false,
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Git] = Toolchain.newGit }
|
func init() { artifactsF[Git] = Toolchain.newGit }
|
||||||
|
|||||||
@@ -48,18 +48,17 @@ rmdir -v /work/lib
|
|||||||
), nil, slices.Concat([]string{
|
), nil, slices.Concat([]string{
|
||||||
"ROSA_MUSL_TARGET=" + target,
|
"ROSA_MUSL_TARGET=" + target,
|
||||||
}, attr.Env), `
|
}, attr.Env), `
|
||||||
# expected to be writable in copies
|
|
||||||
chmod -R +w /usr/src/musl/
|
|
||||||
|
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/musl/configure \
|
/usr/src/musl/configure \
|
||||||
--prefix=/system \
|
--prefix=/system \
|
||||||
--target="${ROSA_TRIPLE}"
|
--target="${ROSA_TRIPLE}"
|
||||||
make "-j$(nproc)" DESTDIR=/work "${ROSA_MUSL_TARGET}"
|
make "-j$(nproc)" DESTDIR=/work "${ROSA_MUSL_TARGET}"
|
||||||
`+script, pkg.Path(AbsUsrSrc.Append("musl"), true, pkg.NewHTTPGetTar(
|
`+script, pkg.Path(AbsUsrSrc.Append("musl"), false, t.NewPatchedSource(
|
||||||
nil,
|
// expected to be writable in copies
|
||||||
"https://musl.libc.org/releases/musl-"+version+".tar.gz",
|
"musl", version, pkg.NewHTTPGetTar(
|
||||||
mustDecode(checksum),
|
nil, "https://musl.libc.org/releases/musl-"+version+".tar.gz",
|
||||||
pkg.TarGzip,
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
), false,
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ func (t Toolchain) newNinja() pkg.Artifact {
|
|||||||
t.Load(Python),
|
t.Load(Python),
|
||||||
t.Load(Bash),
|
t.Load(Bash),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
chmod -R +w /usr/src/ninja/
|
|
||||||
mkdir -p /work/system/bin/ && cd /work/system/bin/
|
mkdir -p /work/system/bin/ && cd /work/system/bin/
|
||||||
python3 /usr/src/ninja/configure.py \
|
python3 /usr/src/ninja/configure.py \
|
||||||
--bootstrap \
|
--bootstrap \
|
||||||
@@ -25,12 +24,13 @@ python3 /usr/src/ninja/configure.py \
|
|||||||
"v1.16.0/googletest-1.16.0.tar.gz",
|
"v1.16.0/googletest-1.16.0.tar.gz",
|
||||||
mustDecode("NjLGvSbgPy_B-y-o1hdanlzEzaYeStFcvFGxpYV3KYlhrWWFRcugYhM3ZMzOA9B_"),
|
mustDecode("NjLGvSbgPy_B-y-o1hdanlzEzaYeStFcvFGxpYV3KYlhrWWFRcugYhM3ZMzOA9B_"),
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
)), pkg.Path(AbsUsrSrc.Append("ninja"), true,
|
)), pkg.Path(AbsUsrSrc.Append("ninja"), true, t.NewPatchedSource(
|
||||||
pkg.NewHTTPGetTar(
|
"ninja", version, pkg.NewHTTPGetTar(
|
||||||
nil, "https://github.com/ninja-build/ninja/archive/refs/tags/"+
|
nil, "https://github.com/ninja-build/ninja/archive/refs/tags/"+
|
||||||
"v"+version+".tar.gz",
|
"v"+version+".tar.gz",
|
||||||
mustDecode(checksum),
|
mustDecode(checksum),
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
)))
|
), false,
|
||||||
|
)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Ninja] = Toolchain.newNinja }
|
func init() { artifactsF[Ninja] = Toolchain.newNinja }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ func (t Toolchain) newPerl() pkg.Artifact {
|
|||||||
return t.New("perl-"+version, TEarly, []pkg.Artifact{
|
return t.New("perl-"+version, TEarly, []pkg.Artifact{
|
||||||
t.Load(Make),
|
t.Load(Make),
|
||||||
}, nil, nil, `
|
}, nil, nil, `
|
||||||
chmod -R +w /usr/src/perl && cd /usr/src/perl
|
cd /usr/src/perl
|
||||||
|
|
||||||
echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t
|
echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t
|
||||||
rm -f /system/bin/ps # perl does not like toybox ps
|
rm -f /system/bin/ps # perl does not like toybox ps
|
||||||
@@ -28,11 +28,12 @@ make \
|
|||||||
TEST_JOBS=256 \
|
TEST_JOBS=256 \
|
||||||
test_harness
|
test_harness
|
||||||
make DESTDIR=/work install
|
make DESTDIR=/work install
|
||||||
`, pkg.Path(AbsUsrSrc.Append("perl"), true, pkg.NewHTTPGetTar(
|
`, pkg.Path(AbsUsrSrc.Append("perl"), true, t.NewPatchedSource(
|
||||||
nil,
|
"perl", version, pkg.NewHTTPGetTar(
|
||||||
"https://www.cpan.org/src/5.0/perl-"+version+".tar.gz",
|
nil, "https://www.cpan.org/src/5.0/perl-"+version+".tar.gz",
|
||||||
mustDecode(checksum),
|
mustDecode(checksum),
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
|
), false,
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Perl] = Toolchain.newPerl }
|
func init() { artifactsF[Perl] = Toolchain.newPerl }
|
||||||
|
|||||||
@@ -47,9 +47,6 @@ func (t Toolchain) newPython() pkg.Artifact {
|
|||||||
"LDFLAGS=-Wl,--dynamic-linker=/system/lib/" +
|
"LDFLAGS=-Wl,--dynamic-linker=/system/lib/" +
|
||||||
"ld-musl-" + linuxArch() + ".so.1",
|
"ld-musl-" + linuxArch() + ".so.1",
|
||||||
}, `
|
}, `
|
||||||
# test_synopsis_sourceless assumes this is writable and checks __pycache__
|
|
||||||
chmod -R +w /usr/src/python/
|
|
||||||
|
|
||||||
export HOME="$(mktemp -d)"
|
export HOME="$(mktemp -d)"
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
/usr/src/python/configure \
|
/usr/src/python/configure \
|
||||||
@@ -59,12 +56,13 @@ make "-j$(nproc)"
|
|||||||
make test
|
make test
|
||||||
make DESTDIR=/work install
|
make DESTDIR=/work install
|
||||||
`, pkg.Path(AbsUsrSrc.Append("python"), true,
|
`, pkg.Path(AbsUsrSrc.Append("python"), true,
|
||||||
pkg.NewHTTPGetTar(
|
// test_synopsis_sourceless assumes this is writable and checks __pycache__
|
||||||
|
t.NewPatchedSource("python", version, pkg.NewHTTPGetTar(
|
||||||
nil, "https://www.python.org/ftp/python/"+version+
|
nil, "https://www.python.org/ftp/python/"+version+
|
||||||
"/Python-"+version+".tgz",
|
"/Python-"+version+".tgz",
|
||||||
mustDecode(checksum),
|
mustDecode(checksum),
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
)))
|
), false)))
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Python] = Toolchain.newPython }
|
func init() { artifactsF[Python] = Toolchain.newPython }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user