From 64e5a1068bdb5e7bd97283cc927088c870b8208e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 1 Apr 2026 17:12:57 +0900 Subject: [PATCH] internal/rosa: libtasn1 artifact Optional dependency of p11-kit. Signed-off-by: Ophestra --- internal/rosa/all.go | 3 ++- internal/rosa/gnu.go | 23 +++++++++++++++++++++++ internal/rosa/p11.go | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/internal/rosa/all.go b/internal/rosa/all.go index f0d0716d..eeb6b7db 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -82,8 +82,9 @@ const ( Libmd Libmnl Libnftnl - Libtool Libseccomp + Libtasn1 + Libtool Libucontext Libxml2 Libxslt diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 8f67505c..4b1f4303 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -781,6 +781,29 @@ func init() { } } +func (t Toolchain) newLibtasn1() (pkg.Artifact, string) { + const ( + version = "4.21.0" + checksum = "9DYI3UYbfYLy8JsKUcY6f0irskbfL0fHZA91Q-JEOA3kiUwpodyjemRsYRjUpjuq" + ) + return t.NewPackage("libtasn1", version, pkg.NewHTTPGetTar( + nil, "https://ftpmirror.gnu.org/gnu/libtasn1/libtasn1-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), nil, (*MakeHelper)(nil)), version +} +func init() { + artifactsM[Libtasn1] = Metadata{ + f: Toolchain.newLibtasn1, + + Name: "libtasn1", + Description: "the ASN.1 library used by GnuTLS, p11-kit and some other packages", + Website: "https://www.gnu.org/software/libtasn1/", + + ID: 1734, + } +} + func (t Toolchain) newBinutils() (pkg.Artifact, string) { const ( version = "2.46.0" diff --git a/internal/rosa/p11.go b/internal/rosa/p11.go index 7e491dc0..82c3c7ac 100644 --- a/internal/rosa/p11.go +++ b/internal/rosa/p11.go @@ -17,6 +17,8 @@ func (t Toolchain) newP11Kit() (pkg.Artifact, string) { }, Coreutils, Diffutils, + + Libtasn1, ), version } func init() { @@ -27,6 +29,10 @@ func init() { Description: "provides a way to load and enumerate PKCS#11 modules", Website: "https://p11-glue.freedesktop.org/p11-kit.html", + Dependencies: P{ + Libtasn1, + }, + ID: 2582, } }