internal/rosa: gnu patch artifact
All checks were successful
Test / Create distribution (push) Successful in 49s
Test / Sandbox (push) Successful in 2m41s
Test / Hakurei (push) Successful in 3m53s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m34s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 6m14s
Test / Flake checks (push) Successful in 1m38s
All checks were successful
Test / Create distribution (push) Successful in 49s
Test / Sandbox (push) Successful in 2m41s
Test / Hakurei (push) Successful in 3m53s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m34s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 6m14s
Test / Flake checks (push) Successful in 1m38s
This is more robust than the busybox implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -140,6 +140,35 @@ make DESTDIR=/work install
|
|||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewPatch returns a [pkg.Artifact] containing an installation of GNU patch.
|
||||||
|
func (t Toolchain) NewPatch() pkg.Artifact {
|
||||||
|
const (
|
||||||
|
version = "2.8"
|
||||||
|
checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"
|
||||||
|
)
|
||||||
|
return t.New("patch-"+version, []pkg.Artifact{
|
||||||
|
t.NewMake(),
|
||||||
|
}, nil, nil, `
|
||||||
|
cd /usr/src/patch
|
||||||
|
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
|
||||||
|
|
||||||
|
test_disable '#!/bin/sh' tests/ed-style
|
||||||
|
test_disable '#!/bin/sh' tests/need-filename
|
||||||
|
|
||||||
|
cd "$(mktemp -d)"
|
||||||
|
/usr/src/patch/configure \
|
||||||
|
--prefix=/system \
|
||||||
|
--build="${ROSA_TRIPLE}"
|
||||||
|
make "-j$(nproc)" check
|
||||||
|
make DESTDIR=/work install
|
||||||
|
`, pkg.Path(AbsUsrSrc.Append("patch"), true, pkg.NewHTTPGetTar(
|
||||||
|
nil,
|
||||||
|
"https://ftp.gnu.org/gnu/patch/patch-"+version+".tar.gz",
|
||||||
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
)))
|
||||||
|
}
|
||||||
|
|
||||||
// NewBash returns a [pkg.Artifact] containing an installation of GNU Bash.
|
// NewBash returns a [pkg.Artifact] containing an installation of GNU Bash.
|
||||||
func (t Toolchain) NewBash() pkg.Artifact {
|
func (t Toolchain) NewBash() pkg.Artifact {
|
||||||
const (
|
const (
|
||||||
|
|||||||
Reference in New Issue
Block a user