From 656059278d96c86987c261ae842592617ee17962 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 20 May 2026 05:57:13 +0900 Subject: [PATCH] internal/rosa/package: migrate remaining trivial packages The rest are migrated individually. Signed-off-by: Ophestra --- cmd/mbf/main.go | 6 ++- internal/rosa/package/rdfind.az | 20 +++++++++ internal/rosa/package/rsync.az | 27 +++++++++++ internal/rosa/package/squashfs-tools.az | 51 +++++++++++++++++++++ internal/rosa/package/stage0.az | 17 +++++++ internal/rosa/package/strace.az | 38 ++++++++++++++++ internal/rosa/package/util-linux.az | 59 ++++++++++++++++++++++++ internal/rosa/package/vim.az | 30 +++++++++++++ internal/rosa/package/xz.az | 18 ++++++++ internal/rosa/package/zlib.az | 28 ++++++++++++ internal/rosa/package/zstd.az | 31 +++++++++++++ internal/rosa/rdfind.go | 35 --------------- internal/rosa/rosa.go | 10 ++++- internal/rosa/rsync.go | 37 --------------- internal/rosa/squashfs.go | 58 ------------------------ internal/rosa/stage0.go | 24 +--------- internal/rosa/state.go | 12 ++--- internal/rosa/state_native.go | 4 -- internal/rosa/strace.go | 47 ------------------- internal/rosa/util-linux.go | 60 ------------------------- internal/rosa/vim.go | 43 ------------------ internal/rosa/xz.go | 28 ------------ internal/rosa/zlib.go | 38 ---------------- internal/rosa/zstd.go | 39 ---------------- 24 files changed, 341 insertions(+), 419 deletions(-) create mode 100644 internal/rosa/package/rdfind.az create mode 100644 internal/rosa/package/rsync.az create mode 100644 internal/rosa/package/squashfs-tools.az create mode 100644 internal/rosa/package/stage0.az create mode 100644 internal/rosa/package/strace.az create mode 100644 internal/rosa/package/util-linux.az create mode 100644 internal/rosa/package/vim.az create mode 100644 internal/rosa/package/xz.az create mode 100644 internal/rosa/package/zlib.az create mode 100644 internal/rosa/package/zstd.az delete mode 100644 internal/rosa/rdfind.go delete mode 100644 internal/rosa/rsync.go delete mode 100644 internal/rosa/squashfs.go delete mode 100644 internal/rosa/strace.go delete mode 100644 internal/rosa/util-linux.go delete mode 100644 internal/rosa/vim.go delete mode 100644 internal/rosa/xz.go delete mode 100644 internal/rosa/zlib.go delete mode 100644 internal/rosa/zstd.go diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 8d6d745f..9552fc0a 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -91,6 +91,10 @@ func main() { addr net.UnixAddr ) c := command.New(os.Stderr, log.Printf, "mbf", func([]string) error { + if !rosa.Native().HasStage0() { + return pkg.UnsupportedArchError(runtime.GOARCH) + } + if flagPT { log.Println("parsed in", rosa.ParseTime()) } @@ -127,7 +131,7 @@ func main() { } rosa.Native().DropCaches(flagArch, flags) - if !rosa.HasStage0() { + if !rosa.Native().HasStage0() { return pkg.UnsupportedArchError(flagArch) } } diff --git a/internal/rosa/package/rdfind.az b/internal/rosa/package/rdfind.az new file mode 100644 index 00000000..f464faff --- /dev/null +++ b/internal/rosa/package/rdfind.az @@ -0,0 +1,20 @@ +package rdfind { + description = "a program that finds duplicate files"; + website = "https://rdfind.pauldreik.se"; + anitya = 231641; + + version* = "1.8.0"; + source = remoteTar { + url = "https://rdfind.pauldreik.se/rdfind-"+version+".tar.gz"; + checksum = "PoaeJ2WIG6yyfe5VAYZlOdAQiR3mb3WhAUMj2ziTCx_IIEal4640HMJUb4SzU9U3"; + compress = gzip; + }; + + exec = make { + // test suite hard codes /bin/echo + preCheck = "\nln -s ../system/bin/toybox /bin/echo\n"; + }; + + inputs = [ nettle ]; + runtime = [ nettle ]; +} diff --git a/internal/rosa/package/rsync.az b/internal/rosa/package/rsync.az new file mode 100644 index 00000000..009ac4ba --- /dev/null +++ b/internal/rosa/package/rsync.az @@ -0,0 +1,27 @@ +package rsync { + description = "an open source utility that provides fast incremental file transfer"; + website = "https://rsync.samba.org"; + anitya = 4217; + + version* = "3.4.2"; + source = remoteTar { + url = "https://download.samba.org/pub/rsync/src/"+ + "rsync-"+version+".tar.gz"; + checksum = "t7PxS4WHXzefLMKKc_3hJgxUmlGG6KgHMZ8i4DZvCQAUAizxbclNKwfLyOHyq5BX"; + compress = gzip; + }; + + toyboxEarly = true; + + exec = make { + configure = { + "disable-openssl"; + "disable-xxhash"; + "disable-zstd"; + "disable-lz4"; + }; + + // circular dependency + skipCheck = true; + }; +} diff --git a/internal/rosa/package/squashfs-tools.az b/internal/rosa/package/squashfs-tools.az new file mode 100644 index 00000000..a9d40e99 --- /dev/null +++ b/internal/rosa/package/squashfs-tools.az @@ -0,0 +1,51 @@ +package squashfs-tools { + description = "tools to create and extract Squashfs filesystems"; + website = "https://github.com/plougher/squashfs-tools"; + anitya = 4879; + + version* = "4.7.5"; + source = remoteGitHubRelease { + suffix = "plougher/squashfs-tools"; + tag = version; + name = "squashfs-tools-"+version+".tar.gz"; + checksum = "rF52wLQP-jeAmcD-48wqJcck8ZWRFwkax3T-7snaRf5EBnCQQh0YypMY9lwcivLz"; + compress = gzip; + }; + + // uses source tree as scratch space + writable = true; + chmod = true; + + env = [ + "CONFIG=1", + "XZ_SUPPORT=0", + "LZO_SUPPORT=0", + "LZ4_SUPPORT=0", + "COMP_DEFAULT=zstd", + "USE_PREBUILT_MANPAGES=y", + ]; + + early = "cd squashfs-tools"; + + exec = make { + skipConfigure = true; + inPlace = true; + + skipCheck = true; + install = "make INSTALL_PREFIX=/work/system install"; + }; + + inputs = [ + sed, + + zstd, + gzip, + zlib, + ]; + + runtime = [ + zstd, + gzip, + zlib, + ]; +} diff --git a/internal/rosa/package/stage0.az b/internal/rosa/package/stage0.az new file mode 100644 index 00000000..02930657 --- /dev/null +++ b/internal/rosa/package/stage0.az @@ -0,0 +1,17 @@ +package stage0-dist { + description = "Rosa OS stage0 bootstrap seed"; + + version* = "20260504"; + output = remoteTar { + url = "https://hakurei.app/seed/"+version+"/"+ + "stage0-"+triple+".tar.bz2"; + checksum = arch { + amd64 = "IQjFDkiAVLo1XzflgMMiLP3gnVY2hhDMTzl-QqJDCQhcLQ3lLtRzjI5WCxGyW_lk"; + arm64 = "6fmwl2Umx2QssKQvxxb1JOGkAjzfA_MXKku0jVdGjYGb35OvwEVA5NYtd0HIy3yH"; + riscv64 = "Z2ODV0rIoo9iQRUIu35bsaOBeXc_9qQfGcyb2aGneatzNUJlXh5emSpEV2bOklUL"; + + default = 0; + }; + compress = bzip2; + }; +} diff --git a/internal/rosa/package/strace.az b/internal/rosa/package/strace.az new file mode 100644 index 00000000..fa10a749 --- /dev/null +++ b/internal/rosa/package/strace.az @@ -0,0 +1,38 @@ +package strace { + description = "a diagnostic, debugging and instructional userspace utility"; + website = "https://strace.io"; + anitya = 4897; + + version* = "6.19"; + source = remoteFile { + url = "https://strace.io/files/"+version+"/strace-"+version+".tar.xz"; + checksum = "XJFJJ9XLh_1rHS3m_QNjLKzkkBAooE-QT9p9lJNNWowAmd54IJop_fI4-IFtjeeL"; + }; + + early = ` +sed -i 's/off64_t/off_t/g' \ + tests/readahead.c \ + tests/sync_file_range.c \ + tests/sync_file_range2.c +sed -i 's/unsigned int msg_len;$/uint32_t msg_len;/g' \ + tests/nlattr.c +`; + + exec = make { + configure = { + // tests broken on clang + "disable-gcc-Werror"; + + "enable-mpers": "no"; + }; + + // does not compile on musl + skipCheck = true; + }; + + inputs = [ + xz, + + kernel-headers, + ]; +} diff --git a/internal/rosa/package/util-linux.az b/internal/rosa/package/util-linux.az new file mode 100644 index 00000000..b2055583 --- /dev/null +++ b/internal/rosa/package/util-linux.az @@ -0,0 +1,59 @@ +package util-linux { + description = "a random collection of Linux utilities"; + website = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"; + anitya = 8179; + // release candidates confuse Anitya + latest = anityaFallback; + + version* = "2.42"; + source = remoteTar { + url = "https://www.kernel.org/pub/linux/utils/util-linux/"+ + "v"+join { + elems = slice { + elems = split { + s = version; + sep = "."; + n = 3; + }; + end = 2; + }; + sep = "."; + }+"/util-linux-"+version+".tar.gz"; + checksum = "Uy8Nxg9DsW5YwDoeaZeZTyQJ2YmnaaL_fSsQXsLUiFFUd7wnZeD_3SEaVO7ClJlk"; + compress = gzip; + }; + + early = "\nln -s ../system/bin/bash /bin/\n"; + + exec = make { + configure = { + "disable-use-tty-group"; + "disable-makeinstall-setuid"; + "disable-makeinstall-chown"; + + "enable-fs-paths-default": join { + elems = [ + "/system/sbin", + "/system/sbin/fs.d", + "/system/sbin/fs", + ]; + sep = ":"; + }; + + "disable-su"; + "disable-liblastlog2"; + "disable-pam-lastlog2"; + }; + + // check script claims: + // For development purpose only. + // Don't execute on production system! + skipCheck = true; + }; + + inputs = [ + bash, + + kernel-headers, + ]; +} diff --git a/internal/rosa/package/vim.az b/internal/rosa/package/vim.az new file mode 100644 index 00000000..7a5b3d0d --- /dev/null +++ b/internal/rosa/package/vim.az @@ -0,0 +1,30 @@ +package vim { + description = "a greatly improved version of the good old UNIX editor Vi"; + website = "https://www.vim.org"; + anitya = 5092; + + version* = "9.2.0461"; + source = remoteGitHub { + suffix = "vim/vim"; + tag = "v"+version; + checksum = "18Rr_5oIf_PkKuqVkN4CMZIGkZEgpN1vamlrsvPLBjn4mN98CRuoJmhzRZ7MoVYM"; + }; + + writable = true; + chmod = true; + enterSource = true; + + exec = make { + inPlace = true; + configure = { + "with-tlib": "ncursesw"; + }; + check = [ "test" ]; + + // very expensive + skipCheck = true; + }; + + inputs = [ ncurses ]; + runtime = [ ncurses ]; +} diff --git a/internal/rosa/package/xz.az b/internal/rosa/package/xz.az new file mode 100644 index 00000000..41f53ba0 --- /dev/null +++ b/internal/rosa/package/xz.az @@ -0,0 +1,18 @@ +package xz { + description = "XZ Utils"; + website = "https://tukaani.org/xz"; + anitya = 5277; + + version* = "5.8.3"; + source = remoteGitHubRelease { + suffix = "tukaani-project/xz"; + tag = "v"+version; + name = "xz-"+version+".tar.bz2"; + checksum = "nCdayphPGdIdVoAZ2hR4vYlhDG9LeVKho_i7ealTud4Vxy5o5dWe0VwFlN7utuUL"; + compress = bzip2; + }; + + exec = make {}; + + inputs = [ diffutils ]; +} diff --git a/internal/rosa/package/zlib.az b/internal/rosa/package/zlib.az new file mode 100644 index 00000000..39d64a77 --- /dev/null +++ b/internal/rosa/package/zlib.az @@ -0,0 +1,28 @@ +package zlib { + description = "lossless data-compression library"; + website = "https://zlib.net"; + anitya = 5303; + + version* = "1.3.2"; + source = remoteTar { + url = "https://www.zlib.net/fossils/zlib-"+version+".tar.gz"; + checksum = "KHZrePe42vL2XvOUE3KlJkp1UgWhWkl0jjT_BOvFhuM4GzieEH9S7CioepOFVGYB"; + compress = gzip; + }; + + exec = cmake { + cache = { + "CMAKE_C_FLAGS": "-fPIC"; + "ZLIB_BUILD_TESTING": "ON"; + "ZLIB_BUILD_SHARED": "ON"; + "ZLIB_BUILD_STATIC": "ON"; + "ZLIB_BUILD_MINIZIP": "OFF"; + + "ZLIB_INSTALL": "ON"; + "ZLIB_PREFIX": "OFF"; + }; + + // ninja dependency loop + make = true; + }; +} diff --git a/internal/rosa/package/zstd.az b/internal/rosa/package/zstd.az new file mode 100644 index 00000000..7f965d72 --- /dev/null +++ b/internal/rosa/package/zstd.az @@ -0,0 +1,31 @@ +package zstd { + description = "a fast compression algorithm"; + website = "https://facebook.github.io/zstd"; + anitya = 12083; + + version* = "1.5.7"; + source = remoteGitHubRelease { + suffix = "facebook/zstd"; + tag = "v"+version; + name = "zstd-"+version+".tar.gz"; + checksum = "4XhfR7DwVkwo1R-TmYDAJOcx9YXv9WSFhcFUe3hWEAMmdMLPhFaznCqYIA19_xxV"; + compress = gzip; + }; + + // tests Makefile assumes writable source + writable = true; + chmod = true; + + exec = cmake { + append = [ "build", "cmake" ]; + test = ` +make -C /usr/src/zstd/tests datagen +ZSTD_BIN=/cure/programs/zstd /usr/src/zstd/tests/playTests.sh +`; + }; + + inputs = [ + make, + diffutils, + ]; +} diff --git a/internal/rosa/rdfind.go b/internal/rosa/rdfind.go deleted file mode 100644 index f77a9164..00000000 --- a/internal/rosa/rdfind.go +++ /dev/null @@ -1,35 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newRdfind() (pkg.Artifact, string) { - const ( - version = "1.8.0" - checksum = "PoaeJ2WIG6yyfe5VAYZlOdAQiR3mb3WhAUMj2ziTCx_IIEal4640HMJUb4SzU9U3" - ) - return t.NewPackage("rdfind", version, newTar( - "https://rdfind.pauldreik.se/rdfind-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), nil, &MakeHelper{ - // test suite hard codes /bin/echo - ScriptCheckEarly: ` -ln -s ../system/bin/toybox /bin/echo -`, - }, - Nettle, - ), version -} -func init() { - native.mustRegister(Toolchain.newRdfind, &Metadata{ - Name: "rdfind", - Description: "a program that finds duplicate files", - Website: "https://rdfind.pauldreik.se/", - - Dependencies: P{ - Nettle, - }, - - ID: 231641, - }) -} diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index 70a6c9b1..3ad0b089 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -224,8 +224,14 @@ const ( THostNet ) -// The Mksh shell is added by [Toolchain.New] and used by almost all packages. -var Mksh = H("mksh") +var ( + // stage0Dist is a binary distribution of an initial toolchain [Stage]. It + // is used by [Toolchain.New] as stageEarly. + stage0Dist = H("stage0-dist") + + // The Mksh shell is added by [Toolchain.New] and used by almost all packages. + Mksh = H("mksh") +) // New returns a [pkg.Artifact] based on a [Toolchain] via s. func (t Toolchain) New( diff --git a/internal/rosa/rsync.go b/internal/rosa/rsync.go deleted file mode 100644 index 0ea1096a..00000000 --- a/internal/rosa/rsync.go +++ /dev/null @@ -1,37 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newRsync() (pkg.Artifact, string) { - const ( - version = "3.4.2" - checksum = "t7PxS4WHXzefLMKKc_3hJgxUmlGG6KgHMZ8i4DZvCQAUAizxbclNKwfLyOHyq5BX" - ) - return t.NewPackage("rsync", version, newTar( - "https://download.samba.org/pub/rsync/src/"+ - "rsync-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), &PackageAttr{ - Flag: TEarly, - }, &MakeHelper{ - Configure: []KV{ - {"disable-openssl"}, - {"disable-xxhash"}, - {"disable-zstd"}, - {"disable-lz4"}, - }, - - // circular dependency - SkipCheck: true, - }), version -} -func init() { - native.mustRegister(Toolchain.newRsync, &Metadata{ - Name: "rsync", - Description: "an open source utility that provides fast incremental file transfer", - Website: "https://rsync.samba.org/", - - ID: 4217, - }) -} diff --git a/internal/rosa/squashfs.go b/internal/rosa/squashfs.go deleted file mode 100644 index 267dd3d3..00000000 --- a/internal/rosa/squashfs.go +++ /dev/null @@ -1,58 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newSquashfsTools() (pkg.Artifact, string) { - const ( - version = "4.7.5" - checksum = "rF52wLQP-jeAmcD-48wqJcck8ZWRFwkax3T-7snaRf5EBnCQQh0YypMY9lwcivLz" - ) - return t.NewPackage("squashfs-tools", version, newFromGitHubRelease( - "plougher/squashfs-tools", - version, - "squashfs-tools-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), &PackageAttr{ - // uses source tree as scratch space - Writable: true, - Chmod: true, - - Env: []string{ - "CONFIG=1", - "XZ_SUPPORT=0", - "LZO_SUPPORT=0", - "LZ4_SUPPORT=0", - "COMP_DEFAULT=zstd", - "USE_PREBUILT_MANPAGES=y", - }, - ScriptEarly: "cd squashfs-tools", - }, &MakeHelper{ - SkipConfigure: true, - InPlace: true, - - SkipCheck: true, - Install: "make INSTALL_PREFIX=/work/system install", - }, - Sed, - - Zstd, - Gzip, - Zlib, - ), version -} -func init() { - native.mustRegister(Toolchain.newSquashfsTools, &Metadata{ - Name: "squashfs-tools", - Description: "tools to create and extract Squashfs filesystems", - Website: "https://github.com/plougher/squashfs-tools", - - Dependencies: P{ - Zstd, - Gzip, - Zlib, - }, - - ID: 4879, - }) -} diff --git a/internal/rosa/stage0.go b/internal/rosa/stage0.go index 05335ab5..55b26504 100644 --- a/internal/rosa/stage0.go +++ b/internal/rosa/stage0.go @@ -29,31 +29,11 @@ tar \ }) } -func init() { - meta := Metadata{ - Name: "stage0-dist", - Description: "Rosa OS stage0 bootstrap seed", - Version: "20260504", - } - native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) { - return &meta, newTar( - "https://hakurei.app/seed/"+meta.Version+"/"+ - "stage0-"+t.triple()+".tar.bz2", - perArch[string]{ - "amd64": "IQjFDkiAVLo1XzflgMMiLP3gnVY2hhDMTzl-QqJDCQhcLQ3lLtRzjI5WCxGyW_lk", - "arm64": "6fmwl2Umx2QssKQvxxb1JOGkAjzfA_MXKku0jVdGjYGb35OvwEVA5NYtd0HIy3yH", - "riscv64": "Z2ODV0rIoo9iQRUIu35bsaOBeXc_9qQfGcyb2aGneatzNUJlXh5emSpEV2bOklUL", - }.unwrap(t.S), - pkg.TarBzip2, - ) - }) -} - // HasStage0 returns whether a stage0 distribution is available. -func HasStage0() (ok bool) { +func (s *S) HasStage0() (ok bool) { func() { defer func() { ok = recover() == nil }() - native.New(stageEarly).Load(stage0Dist) + s.New(stageEarly).MustLoad(stage0Dist) }() return } diff --git a/internal/rosa/state.go b/internal/rosa/state.go index a6149d46..5d3421f2 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -189,6 +189,8 @@ type S struct { // Target architecture. arch string + // For matching arch-specific values. + identArch unique.Handle[azalea.Ident] // For initialising arch. archOnce sync.Once @@ -227,6 +229,7 @@ func (s *S) wantsArch() { s.archOnce.Do(func() { if s.arch == "" { s.arch = runtime.GOARCH + s.identArch = unique.Make(azalea.Ident(s.arch)) } }) } @@ -245,6 +248,7 @@ func (s *S) DropCaches(targetArch string, flags int) { } s.arch = targetArch + s.identArch = unique.Make(azalea.Ident(s.arch)) s.opts = flags for i := range s.c { s.c[i].Clear() @@ -422,10 +426,7 @@ func (s *S) getFrame() azalea.Frame { return unique.Make(azalea.Ident(name)) } - var ( - identDefault = k("default") - identArch = k(s.arch) - ) + var identDefault = k("default") enumCompress := map[unique.Handle[azalea.Ident]]any{ k("uncompressed"): uint32(pkg.TarUncompressed), @@ -434,6 +435,7 @@ func (s *S) getFrame() azalea.Frame { } s.frame.Val = map[unique.Handle[azalea.Ident]]any{ + k("triple"): s.triple(), k("linuxArch"): s.linuxArch(), k("earlyLDFLAGS"): s.earlyLDFLAGS(false), @@ -625,7 +627,7 @@ func (s *S) getFrame() azalea.Frame { fallback = arg.V continue - case identArch: + case s.identArch: return arg.V, true, nil } } diff --git a/internal/rosa/state_native.go b/internal/rosa/state_native.go index fec5d58a..1cd3f37e 100644 --- a/internal/rosa/state_native.go +++ b/internal/rosa/state_native.go @@ -55,8 +55,6 @@ var ( M4 = H("m4") NSS = H("nss") NSSCACert = H("nss-cacert") - Ncurses = H("ncurses") - Nettle = H("nettle") Patch = H("patch") Pixman = H("pixman") PkgConfig = H("pkg-config") @@ -71,13 +69,11 @@ var ( WaylandProtocols = H("wayland-protocols") XCB = H("xcb") XCBProto = H("xcb-proto") - XZ = H("xz") Xkbcomp = H("xkbcomp") XkeyboardConfig = H("xkeyboard-config") XorgProto = H("xorgproto") Zlib = H("zlib") Zstd = H("zstd") - stage0Dist = H("stage0-dist") llvmSource = H("llvm-project") earlyCompilerRT = H("early-compiler-rt") earlyRuntimes = H("early-runtimes") diff --git a/internal/rosa/strace.go b/internal/rosa/strace.go deleted file mode 100644 index 69851765..00000000 --- a/internal/rosa/strace.go +++ /dev/null @@ -1,47 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newStrace() (pkg.Artifact, string) { - const ( - version = "6.19" - checksum = "XJFJJ9XLh_1rHS3m_QNjLKzkkBAooE-QT9p9lJNNWowAmd54IJop_fI4-IFtjeeL" - ) - return t.NewPackage("strace", version, pkg.NewHTTPGet( - nil, "https://strace.io/files/"+version+"/strace-"+version+".tar.xz", - mustDecode(checksum), - ), &PackageAttr{ - // patch not possible with nonzero SourceKind - ScriptEarly: ` -sed -i 's/off64_t/off_t/g' \ - tests/readahead.c \ - tests/sync_file_range.c \ - tests/sync_file_range2.c -sed -i 's/unsigned int msg_len;$/uint32_t msg_len;/g' \ - tests/nlattr.c -`, - }, &MakeHelper{ - Configure: []KV{ - // tests broken on clang - {"disable-gcc-Werror"}, - - {"enable-mpers", "no"}, - }, - - // does not compile on musl, hangs after patch - SkipCheck: true, - }, - XZ, - - KernelHeaders, - ), version -} -func init() { - native.mustRegister(Toolchain.newStrace, &Metadata{ - Name: "strace", - Description: "a diagnostic, debugging and instructional userspace utility", - Website: "https://strace.io/", - - ID: 4897, - }) -} diff --git a/internal/rosa/util-linux.go b/internal/rosa/util-linux.go deleted file mode 100644 index 80ec9f7e..00000000 --- a/internal/rosa/util-linux.go +++ /dev/null @@ -1,60 +0,0 @@ -package rosa - -import ( - "strings" - - "hakurei.app/internal/pkg" -) - -func (t Toolchain) newUtilLinux() (pkg.Artifact, string) { - const ( - version = "2.42" - checksum = "Uy8Nxg9DsW5YwDoeaZeZTyQJ2YmnaaL_fSsQXsLUiFFUd7wnZeD_3SEaVO7ClJlk" - ) - return t.NewPackage("util-linux", version, newTar( - "https://www.kernel.org/pub/linux/utils/util-linux/"+ - "v"+strings.Join(strings.SplitN(version, ".", 3)[:2], ".")+ - "/util-linux-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), &PackageAttr{ - ScriptEarly: ` -ln -s ../system/bin/bash /bin/ -`, - }, &MakeHelper{ - Configure: []KV{ - {"disable-use-tty-group"}, - {"disable-makeinstall-setuid"}, - {"disable-makeinstall-chown"}, - {"enable-fs-paths-default", "" + - "/system/sbin:" + - "/system/sbin/fs.d:" + - "/system/sbin/fs"}, - - {"disable-su"}, - {"disable-liblastlog2"}, - {"disable-pam-lastlog2"}, - }, - - // check script claims: - // For development purpose only. - // Don't execute on production system! - SkipCheck: true, - }, - Bash, - - KernelHeaders, - ), version -} -func init() { - native.mustRegister(Toolchain.newUtilLinux, &Metadata{ - Name: "util-linux", - Description: "a random collection of Linux utilities", - Website: "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git", - - ID: 8179, - - // release candidates confuse Anitya - latest: (*Versions).getStable, - }) -} diff --git a/internal/rosa/vim.go b/internal/rosa/vim.go deleted file mode 100644 index 7c67ca81..00000000 --- a/internal/rosa/vim.go +++ /dev/null @@ -1,43 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newVIM() (pkg.Artifact, string) { - const ( - version = "9.2.0461" - checksum = "18Rr_5oIf_PkKuqVkN4CMZIGkZEgpN1vamlrsvPLBjn4mN98CRuoJmhzRZ7MoVYM" - ) - return t.NewPackage("vim", version, newFromGitHub( - "vim/vim", - "v"+version, - checksum, - ), &PackageAttr{ - Chmod: true, - Writable: true, - EnterSource: true, - }, &MakeHelper{ - InPlace: true, - Configure: []KV{ - {"with-tlib", "ncursesw"}, - }, - Check: []string{"test"}, - - // very expensive - SkipCheck: true, - }, - Ncurses, - ), version -} -func init() { - native.mustRegister(Toolchain.newVIM, &Metadata{ - Name: "vim", - Description: "a greatly improved version of the good old UNIX editor Vi", - Website: "https://www.vim.org", - - Dependencies: P{ - Ncurses, - }, - - ID: 5092, - }) -} diff --git a/internal/rosa/xz.go b/internal/rosa/xz.go deleted file mode 100644 index 27696ae9..00000000 --- a/internal/rosa/xz.go +++ /dev/null @@ -1,28 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newXZ() (pkg.Artifact, string) { - const ( - version = "5.8.3" - checksum = "nCdayphPGdIdVoAZ2hR4vYlhDG9LeVKho_i7ealTud4Vxy5o5dWe0VwFlN7utuUL" - ) - return t.NewPackage("xz", version, newFromGitHubRelease( - "tukaani-project/xz", - "v"+version, - "xz-"+version+".tar.bz2", - checksum, - pkg.TarBzip2, - ), nil, (*MakeHelper)(nil), - Diffutils, - ), version -} -func init() { - native.mustRegister(Toolchain.newXZ, &Metadata{ - Name: "xz", - Description: "XZ Utils", - Website: "https://tukaani.org/xz/", - - ID: 5277, - }) -} diff --git a/internal/rosa/zlib.go b/internal/rosa/zlib.go deleted file mode 100644 index 7af8efbb..00000000 --- a/internal/rosa/zlib.go +++ /dev/null @@ -1,38 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newZlib() (pkg.Artifact, string) { - const ( - version = "1.3.2" - checksum = "KHZrePe42vL2XvOUE3KlJkp1UgWhWkl0jjT_BOvFhuM4GzieEH9S7CioepOFVGYB" - ) - return t.NewPackage("zlib", version, newTar( - "https://www.zlib.net/fossils/zlib-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), nil, &CMakeHelper{ - Cache: []KV{ - {"CMAKE_C_FLAGS", "-fPIC"}, - {"ZLIB_BUILD_TESTING", "ON"}, - {"ZLIB_BUILD_SHARED", "ON"}, - {"ZLIB_BUILD_STATIC", "ON"}, - {"ZLIB_BUILD_MINIZIP", "OFF"}, - - {"ZLIB_INSTALL", "ON"}, - {"ZLIB_PREFIX", "OFF"}, - }, - - // ninja dependency loop - Make: true, - }), version -} -func init() { - native.mustRegister(Toolchain.newZlib, &Metadata{ - Name: "zlib", - Description: "lossless data-compression library", - Website: "https://zlib.net/", - - ID: 5303, - }) -} diff --git a/internal/rosa/zstd.go b/internal/rosa/zstd.go deleted file mode 100644 index 15de3154..00000000 --- a/internal/rosa/zstd.go +++ /dev/null @@ -1,39 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newZstd() (pkg.Artifact, string) { - const ( - version = "1.5.7" - checksum = "4XhfR7DwVkwo1R-TmYDAJOcx9YXv9WSFhcFUe3hWEAMmdMLPhFaznCqYIA19_xxV" - ) - return t.NewPackage("zstd", version, newFromGitHubRelease( - "facebook/zstd", - "v"+version, - "zstd-"+version+".tar.gz", - checksum, - pkg.TarGzip, - ), &PackageAttr{ - // tests Makefile assumes writable source - Writable: true, - Chmod: true, - }, &CMakeHelper{ - Append: []string{"build", "cmake"}, - Test: ` -make -C /usr/src/zstd/tests datagen -ZSTD_BIN=/cure/programs/zstd /usr/src/zstd/tests/playTests.sh -`, - }, - Make, - Diffutils, - ), version -} -func init() { - native.mustRegister(Toolchain.newZstd, &Metadata{ - Name: "zstd", - Description: "a fast compression algorithm", - Website: "https://facebook.github.io/zstd/", - - ID: 12083, - }) -}