From 594221eb78fede12840121982782a470e6ed29d0 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 18 May 2026 22:00:52 +0900 Subject: internal/rosa/package: migrate gnutls This is the first nontrivial package to be migrated to azalea. Validated to generate identical IR. Signed-off-by: Ophestra --- internal/rosa/gnu.go | 181 ------ internal/rosa/package/gnu.az | 664 +++++++++++++++++++++ internal/rosa/package/gnu/package.az | 664 --------------------- .../package/gnutls/alpine-tests-certtool.patch | 26 + .../package/gnutls/bootstrap-remove-gtk-doc.patch | 60 ++ internal/rosa/package/gnutls/package.az | 66 ++ .../package/gnutls/test-kernel-version-ksh.patch | 15 + internal/rosa/state.go | 71 ++- 8 files changed, 899 insertions(+), 848 deletions(-) create mode 100644 internal/rosa/package/gnu.az delete mode 100644 internal/rosa/package/gnu/package.az create mode 100644 internal/rosa/package/gnutls/alpine-tests-certtool.patch create mode 100644 internal/rosa/package/gnutls/bootstrap-remove-gtk-doc.patch create mode 100644 internal/rosa/package/gnutls/package.az create mode 100644 internal/rosa/package/gnutls/test-kernel-version-ksh.patch diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 893d24a8..9ec83da4 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -77,187 +77,6 @@ func init() { }) } -func (t Toolchain) newGnuTLS() (pkg.Artifact, string) { - const ( - version = "3.8.12" - checksum = "VPdP-nRydQQRJcnma-YA7CJYA_kzTJ2rb3QFeP6D27emSyInJ8sQ-Wzn518I38dl" - ) - - var configureExtra []KV - switch t.arch { - case "arm64": - configureExtra = []KV{ - {"disable-hardware-acceleration"}, - } - } - - return t.NewPackage("gnutls", version, t.newTagRemote( - "https://gitlab.com/gnutls/gnutls.git", - version, checksum, - ), &PackageAttr{ - Patches: []KV{ - {"bootstrap-remove-gtk-doc", `diff --git a/bootstrap.conf b/bootstrap.conf -index 1c3cc61e6..32bae9387 100644 ---- a/bootstrap.conf -+++ b/bootstrap.conf -@@ -50,7 +50,6 @@ bison 2.4 - gettext 0.17 - git 1.4.4 - gperf - --gtkdocize - - perl 5.5 - wget - - " -diff --git a/configure.ac b/configure.ac -index 5057536e5..731558a15 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -403,11 +403,6 @@ if test "$enable_fuzzer_target" != "no";then - AC_DEFINE([FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], 1, [Enable fuzzer target -not for production]) - fi - --dnl --dnl check for gtk-doc --dnl --GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) -- - AM_GNU_GETTEXT([external]) - AM_GNU_GETTEXT_VERSION([0.19]) - m4_ifdef([AM_GNU_GET][TEXT_REQUIRE_VERSION],[ -diff --git a/doc/Makefile.am b/doc/Makefile.am -index fb1390d70..52f0ad9af 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -33,9 +33,6 @@ IMAGES = \ - pkcs11-vision.png - - SUBDIRS = examples scripts credentials latex --if ENABLE_GTK_DOC --SUBDIRS += reference --endif - - -include $(top_srcdir)/doc/doc.mk - -diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am -index f10c8ed3c..b711b58ec 100644 ---- a/doc/reference/Makefile.am -+++ b/doc/reference/Makefile.am -@@ -82,13 +82,4 @@ include $(top_srcdir)/gtk-doc.make - # e.g. EXTRA_DIST += version.xml.in - EXTRA_DIST += version.xml.in - --# Comment this out if you want 'make check' to test you doc status --# and run some sanity checks --if ENABLE_GTK_DOC --TESTS_ENVIRONMENT = \ -- DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ -- SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) --#TESTS = $(GTKDOC_CHECK) --endif -- - -include $(top_srcdir)/git.mk -`}, - - {"alpine-tests-certtool", `I think this tests is simply wrong. -When a PIN is given, the program should run in batch mode. -So the question for "Enter password" should _not_ be present. - -DO NOT REMOVE UNLESS VERIFIED IT'S NOT ACTUALLY NECESSARY ANYMORE. - ---- a/tests/cert-tests/certtool.sh 2019-02-07 07:33:45.960887338 +0000 -+++ b/tests/cert-tests/certtool.sh 2019-02-07 07:36:14.550955051 +0000 -@@ -49,7 +49,7 @@ - - #check whether password is being honoured - #some CI runners need GNUTLS_PIN (GNUTLS_PIN=${PASS}) -- ${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <${TMPFILE2} 2>&1 </dev/null 2>&1 -- if test $? != 0;then -+ if test $? != 1; then - cat ${TMPFILE2} - echo "No password was asked" - exit 1 -`}, - - {"test-kernel-version-ksh", `diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh -index 1b78b8cf1..350156a86 100644 ---- a/tests/scripts/common.sh -+++ b/tests/scripts/common.sh -@@ -279,10 +279,6 @@ kernel_version_check() { - kernel_major=$(echo $kernel_version | cut -d. -f1 2>/dev/null) - kernel_minor=$(echo $kernel_version | cut -d. -f2 2>/dev/null) - -- if ! [[ "$kernel_major" =~ ^[0-9]+$ ]] || ! [[ "$kernel_minor" =~ ^[0-9]+$ ]]; then -- return 1 -- fi -- - if [ "$kernel_major" -lt "$required_major" ]; then - return 1 - fi -`}, - }, - }, &MakeHelper{ - Generate: "./bootstrap --skip-po --no-git --gnulib-srcdir=gnulib", - - Configure: append([]KV{ - {"disable-doc"}, - {"disable-openssl-compatibility"}, - - {"with-default-trust-store-file", "/system/etc/ssl/certs/ca-bundle.crt"}, - {"with-default-trust-store-pkcs11", "pkcs11:"}, - - {"with-zlib", "link"}, - {"with-zstd", "link"}, - }, configureExtra...), - }, - Gzip, - Automake, - Libtool, - Bison, - Gettext, - Gperf, - PkgConfig, - - Python, - Texinfo, - Diffutils, - NSSCACert, - - Libev, - Zlib, - Zstd, - P11Kit, - nettle3, - Libunistring, - ), version -} -func init() { - native.MustRegister(&Artifact{ - f: Toolchain.newGnuTLS, - - Name: "gnutls", - Description: "a secure communications library implementing the SSL, TLS and DTLS protocols", - Website: "https://gnutls.org", - - Dependencies: P{ - Zlib, - Zstd, - P11Kit, - nettle3, - Libunistring, - }, - - ID: 1221, - }) -} - func (t Toolchain) newBinutils() (pkg.Artifact, string) { const ( version = "2.46.0" diff --git a/internal/rosa/package/gnu.az b/internal/rosa/package/gnu.az new file mode 100644 index 00000000..3dc7074f --- /dev/null +++ b/internal/rosa/package/gnu.az @@ -0,0 +1,664 @@ +// GNU software with trivial packaging. + +package m4 { + description = "a macro processor with GNU extensions"; + website = "https://www.gnu.org/software/m4"; + anitya = 1871; + + version* = "1.4.21"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/m4/m4-"+version+".tar.bz2"; + checksum = "pPa6YOo722Jw80l1OsH1tnUaklnPFjFT-bxGw5iAVrZTm1P8FQaWao_NXop46-pm"; + compress = bzip2; + }; + + writable = true; + early = ` +chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh +`; + + exec = make {}; + + inputs = [ + diffutils, + + kernel-headers, + ]; +} + +package autoconf { + description = "M4 macros to produce self-contained configure script"; + website = "https://www.gnu.org/software/autoconf"; + anitya = 141; + + version* = "2.73"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz"; + checksum = "yGabDTeOfaCUB0JX-h3REYLYzMzvpDwFmFFzHNR7QilChCUNE4hR6q7nma4viDYg"; + compress = gzip; + }; + + // test suite is very expensive + exclusive = true; + + exec = make { + check = [ + "TESTSUITEFLAGS=" + jobsFlagE, + "check", + ]; + }; + + inputs = [ + m4, + perl, + bash, + diffutils, + ]; + + runtime = [ + m4, + perl, + ]; +} + +package automake { + description = "a tool for automatically generating Makefile.in files"; + website = "https://www.gnu.org/software/automake"; + anitya = 144; + + version* = "1.18.1"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/automake/automake-"+version+".tar.gz"; + checksum = "FjvLG_GdQP7cThTZJLDMxYpRcKdpAVG-YDs1Fj1yaHlSdh_Kx6nRGN14E0r_BjcG"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' t/objcxx-minidemo.sh +test_disable '#!/bin/sh' t/objcxx-deps.sh + +test_disable '#!/bin/sh' t/dist-no-built-sources.sh +test_disable '#!/bin/sh' t/distname.sh +test_disable '#!/bin/sh' t/pr9.sh +`; + + exec = make {}; + + inputs = [ + grep, + gzip, + autoconf, + diffutils, + ]; + + runtime = [ autoconf ]; +} + +package libtool { + description = "a generic library support script"; + website = "https://www.gnu.org/software/libtool"; + anitya = 1741; + + version* = "2.5.4"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/libtool/libtool-"+version+".tar.gz"; + checksum = "pa6LSrQggh8mSJHQfwGjysAApmZlGJt8wif2cCLzqAAa2jpsTY0jZ-6stS3BWZ2Q"; + compress = gzip; + }; + + exec = make { + // _Z2a2c: symbol not found + skipEarlyStageCheck = true; + + check = [ + "TESTSUITEFLAGS=" + jobsFlagE, + "check", + ]; + }; + + inputs = [ + m4, + diffutils, + ]; +} + +package gzip { + description = "a popular data compression program"; + website = "https://www.gnu.org/software/gzip"; + anitya = 1290; + + version* = "1.14"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/gzip/gzip-"+version+".tar.gz"; + checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q"; + compress = gzip; + }; + + exec = make { + // dependency loop + skipCheck = true; + }; +} + +package sed { + description = "a non-interactive command-line text editor"; + website = "https://www.gnu.org/software/sed"; + anitya = 4789; + + version* = "4.10"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/sed/sed-"+version+".tar.gz"; + checksum = "TXTRFQJCyflb-bpBRI2S5Y1DpplwvT7-KfXtpqN4AdZgZ5OtI6yStn1-bkhDKx51"; + compress = gzip; + }; + + exec = make {}; + + inputs = [ + diffutils, + + kernel-headers, + ]; +} + +package diffutils { + description = "several programs related to finding differences between files"; + website = "https://www.gnu.org/software/diffutils"; + anitya = 436; + + version* = "3.12"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/diffutils/diffutils-"+version+".tar.gz"; + checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh +test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c +test_disable '#!/bin/sh' tests/cmp +`; + + toyboxEarly = true; + exec = make {}; +} + +package patch { + description = "a program to apply diff output to files"; + website = "https://savannah.gnu.org/projects/patch"; + anitya = 2597; + + version* = "2.8"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/patch/patch-"+version+".tar.gz"; + checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' tests/ed-style +test_disable '#!/bin/sh' tests/need-filename +`; + + toyboxEarly = true; + exec = make {}; +} + +package gawk { + description = "an implementation of awk with GNU extensions"; + website = "https://www.gnu.org/software/gawk"; + anitya = 868; + + version* = "5.4.0"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/gawk/gawk-"+version+".tar.gz"; + checksum = "m0RkIolC-PI7EY5q8pcx5Y-0twlIW0Yp3wXXmV-QaHorSdf8BhZ7kW9F8iWomz0C"; + compress = gzip; + }; + + toyboxEarly = true; + exec = make { + // dependency loop + skipCheck = true; + }; +} + +package grep { + description = "searches input for lines containing a match to a pattern"; + website = "https://www.gnu.org/software/grep"; + anitya = 1251; + + version* = "3.12"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/grep/grep-"+version+".tar.gz"; + checksum = "qMB4RjaPNRRYsxix6YOrjE8gyAT1zVSTy4nW4wKW9fqa0CHYAuWgPwDTirENzm_1"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh +test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c +`; + + exec = make {}; + + inputs = [ diffutils ]; +} + +package gettext { + description = "tools for producing multi-lingual messages"; + website = "https://www.gnu.org/software/gettext"; + anitya = 898; + + version* = "1.0"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/gettext/gettext-"+version+".tar.gz"; + checksum = "3MasKeEdPeFEgWgzsBKk7JqWqql1wEMbgPmzAfs-mluyokoW0N8oQVxPQoOnSdgC"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' gettext-tools/tests/msgcat-22 +test_disable '#!/bin/sh' gettext-tools/tests/msgconv-2 +test_disable '#!/bin/sh' gettext-tools/tests/msgconv-8 +test_disable '#!/bin/sh' gettext-tools/tests/xgettext-python-3 +test_disable '#!/bin/sh' gettext-tools/tests/msgmerge-compendium-6 +test_disable '#!/bin/sh' gettext-tools/tests/gettextpo-1 +test_disable '#!/bin/sh' gettext-tools/tests/format-c-5 +test_disable '#!/bin/sh' gettext-tools/gnulib-tests/test-c32ispunct.sh +test_disable 'int main(){return 0;}' gettext-tools/gnulib-tests/test-stdcountof-h.c + +touch gettext-tools/autotools/archive.dir.tar +`; + + exec = make {}; + + inputs = [ + diffutils, + gzip, + sed, + + kernel-headers, + ]; +} + +package findutils { + description = "the basic directory searching utilities"; + website = "https://www.gnu.org/software/findutils"; + anitya = 812; + + version* = "4.10.0"; + source = remoteFile { + url = "https://ftpmirror.gnu.org/gnu/findutils/findutils-"+version+".tar.xz"; + checksum = "ZXABdNBQXL7QjTygynRRTdXYWxQKZ0Wn5eMd3NUnxR0xaS0u0VfcKoTlbo50zxv6"; + }; + + early = ` +echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh +echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c +`; + + exec = make {}; + + inputs = [ + diffutils, + xz, + sed, + ]; +} + +package bash { + description = "the Bourne Again SHell"; + website = "https://www.gnu.org/software/bash"; + anitya = 166; + + version* = "5.3"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/bash/bash-"+version+".tar.gz"; + checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"; + compress = gzip; + }; + + toyboxEarly = true; + exec = make { + configure = { + "without-bash-malloc"; + }; + postInstall = "ln -s bash /work/system/bin/sh\n"; + }; +} + +package coreutils { + description = "the basic file, shell and text manipulation utilities"; + website = "https://www.gnu.org/software/coreutils"; + anitya = 343; + + version* = "9.11"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/coreutils/coreutils-"+version+".tar.gz"; + checksum = "t8UMed5wpFEoC56aa42_yidfOAaRGzOfj7MRtQkkqgGbpXiskNA8bd-EmVSQkZie"; + compress = gzip; + }; + + toyboxEarly = true; + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh +test_disable '#!/bin/sh' tests/ls/hyperlink.sh +test_disable '#!/bin/sh' tests/misc/user.sh +test_disable 'int main(){return 0;}' gnulib-tests/test-chown.c +test_disable 'int main(){return 0;}' gnulib-tests/test-fchownat.c +test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c +`; + + exec = make { + configure = { + "enable-single-binary": "symlinks"; + }; + }; + + inputs = [ + perl, + bash, + + kernel-headers, + ]; +} + +package tar { + description = "provides the ability to create tar archives"; + website = "https://www.gnu.org/software/tar"; + anitya = 4939; + + version* = "1.35"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/tar/tar-"+version+".tar.gz"; + checksum = "zSaoSlVUDW0dSfm4sbL4FrXLFR8U40Fh3zY5DWhR5NCIJ6GjU6Kc4VZo2-ZqpBRA"; + compress = gzip; + }; + + exec = make { + configure = { + "disable-acl"; + "without-posix-acls"; + "without-xattrs"; + }; + + check = [ + // very expensive + "TARTEST_SKIP_LARGE_FILES=1", + + "TESTSUITEFLAGS=" + jobsFlagE, + "check", + ]; + }; + + inputs = [ + diffutils, + + gzip, + bzip2, + zstd, + ]; +} + +package texinfo { + description = "the GNU square-wheel-reinvension of man pages"; + website = "https://www.gnu.org/software/texinfo"; + anitya = 4958; + + version* = "7.3"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/texinfo/texinfo-"+version+".tar.gz"; + checksum = "RRmC8Xwdof7JuZJeWGAQ_GeASIHAuJFQMbNONXBz5InooKIQGmqmWRjGNGEr5n4-"; + compress = gzip; + }; + + exec = make { + // nonstandard glibc extension + skipCheck = true; + }; + + inputs = [ perl ]; + + runtime = [ + perl, + gawk, + ]; +} + +package gperf { + description = "a perfect hash function generator"; + website = "https://www.gnu.org/software/gperf"; + anitya = 1237; + + version* = "3.3"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gperf/gperf-"+version+".tar.gz"; + checksum = "RtIy9pPb_Bb8-31J2Nw-rRGso2JlS-lDlVhuNYhqR7Nt4xM_nObznxAlBMnarJv7"; + compress = gzip; + }; + + exec = make {}; + + inputs = [ diffutils ]; +} + +package bc { + description = "an arbitrary precision numeric processing language"; + website = "https://www.gnu.org/software/bc"; + anitya = 170; + + version* = "1.08.2"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/bc/bc-"+version+".tar.gz"; + checksum = "8h6f3hjV80XiFs6v9HOPF2KEyg1kuOgn5eeFdVspV05ODBVQss-ey5glc8AmneLy"; + compress = gzip; + }; + + // source expected to be writable + writable = true; + chmod = true; + + exec = make {}; + + inputs = [ + texinfo, + ]; +} + +package libiconv { + description = "iconv implementation independent of glibc"; + website = "https://www.gnu.org/software/libiconv"; + anitya = 10656; + + version* = "1.19"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/libiconv/libiconv-"+version+".tar.gz"; + checksum = "UibB6E23y4MksNqYmCCrA3zTFO6vJugD1DEDqqWYFZNuBsUWMVMcncb_5pPAr88x"; + compress = gzip; + }; + + exec = make {}; +} + +package parallel { + description = "a shell tool for executing jobs in parallel using one or more computers"; + website = "https://www.gnu.org/software/parallel"; + anitya = 5448; + + version* = "20260422"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/parallel/parallel-"+version+".tar.bz2"; + checksum = "eTsepxgqhXpMEhPd55qh-W5y4vjKn0x9TD2mzbJCNZYtFf4lT4Wzoqr74HGJYBEH"; + compress = bzip2; + }; + + early = ` +ln -s ../system/bin/bash /bin/ +`; + + exec = make {}; + + inputs = [ + perl, + bash, + ]; + + runtime = [ perl ]; +} + +package libunistring { + description = "provides functions for manipulating Unicode strings"; + website = "https://www.gnu.org/software/libunistring"; + anitya = 1747; + + version* = "1.4.2"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/libunistring/libunistring-"+version+".tar.gz"; + checksum = "iW9BbfLoVlXjWoLTZ4AekQSu4cFBnLcZ4W8OHWbv0AhJNgD3j65_zqaLMzFKylg2"; + compress = gzip; + }; + + writable = true; + early = ` +test_disable() { chmod +w "$2" && echo "$1" > "$2"; } + +test_disable '#!/bin/sh' tests/test-c32ispunct.sh +test_disable 'int main(){return 0;}' tests/test-c32ispunct.c +`; + + exec = make {}; + + inputs = [ + diffutils, + ]; +} + +package libtasn1 { + description = "the ASN.1 library used by GnuTLS, p11-kit and some other packages"; + website = "https://www.gnu.org/software/libtasn1"; + anitya = 1734; + + version* = "4.21.0"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/libtasn1/libtasn1-"+version+".tar.gz"; + checksum = "9DYI3UYbfYLy8JsKUcY6f0irskbfL0fHZA91Q-JEOA3kiUwpodyjemRsYRjUpjuq"; + compress = gzip; + }; + + exec = make {}; +} + +package readline { + description = "provides a set of functions for use by applications that allow users to edit command lines as they are typed in"; + website = "https://tiswww.cwru.edu/php/chet/readline/rltop.html"; + anitya = 4173; + + version* = "8.3"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/readline/readline-"+version+".tar.gz"; + checksum = "r-lcGRJq_MvvBpOq47Z2Y1OI2iqrmtcqhTLVXR0xWo37ZpC2uT_md7gKq5o_qTMV"; + compress = gzip; + }; + + exec = make { + configure = { + "with-curses"; + "with-shared-termcap-library"; + }; + }; + + inputs = [ ncurses ]; + runtime = [ ncurses ]; +} + +package gmp { + description = "a free library for arbitrary precision arithmetic"; + website = "https://gmplib.org"; + anitya = 1186; + + version* = "6.3.0"; + source = remoteTar { + url = "https://gcc.gnu.org/pub/gcc/infrastructure/"+ + "gmp-"+version+".tar.bz2"; + checksum = "yrgbgEDWKDdMWVHh7gPbVl56-sRtVVhfvv0M_LX7xMUUk_mvZ1QOJEAnt7g4i3k5"; + compress = bzip2; + }; + + env = [ + "CC=cc", + ]; + + exec = make {}; + + inputs = [ m4 ]; +} + +package mpfr { + description = "a C library for multiple-precision floating-point computations"; + website = "https://www.mpfr.org"; + anitya = 2019; + + version* = "4.2.2"; + source = remoteTar { + url = "https://gcc.gnu.org/pub/gcc/infrastructure/"+ + "mpfr-"+version+".tar.bz2"; + checksum = "wN3gx0zfIuCn9r3VAn_9bmfvAYILwrRfgBjYSD1IjLqyLrLojNN5vKyQuTE9kA-B"; + compress = bzip2; + }; + + exec = make {}; + + inputs = [ gmp ]; + runtime = [ gmp ]; +} + +package mpc { + description = "a C library for the arithmetic of complex numbers"; + website = "https://www.multiprecision.org"; + anitya = 1667; + + version* = "1.4.1"; + source = remoteGitLab { + domain = "gitlab.inria.fr"; + suffix = "mpc/mpc"; + ref = version; + checksum = "ZffaZyWkvIw0iPvRe5EJ7O-VvHtSkbbb3K_7SgPtK810NvGan7nbF0T5-6tozjQN"; + }; + + // does not find mpc-impl.h otherwise + enterSource = true; + + exec = make { + inPlace = true; + generate = "autoreconf -vfi"; + }; + + inputs = [ + automake, + libtool, + texinfo, + + mpfr, + ]; + + runtime = [ mpfr ]; +} diff --git a/internal/rosa/package/gnu/package.az b/internal/rosa/package/gnu/package.az deleted file mode 100644 index 3dc7074f..00000000 --- a/internal/rosa/package/gnu/package.az +++ /dev/null @@ -1,664 +0,0 @@ -// GNU software with trivial packaging. - -package m4 { - description = "a macro processor with GNU extensions"; - website = "https://www.gnu.org/software/m4"; - anitya = 1871; - - version* = "1.4.21"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/m4/m4-"+version+".tar.bz2"; - checksum = "pPa6YOo722Jw80l1OsH1tnUaklnPFjFT-bxGw5iAVrZTm1P8FQaWao_NXop46-pm"; - compress = bzip2; - }; - - writable = true; - early = ` -chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh -`; - - exec = make {}; - - inputs = [ - diffutils, - - kernel-headers, - ]; -} - -package autoconf { - description = "M4 macros to produce self-contained configure script"; - website = "https://www.gnu.org/software/autoconf"; - anitya = 141; - - version* = "2.73"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz"; - checksum = "yGabDTeOfaCUB0JX-h3REYLYzMzvpDwFmFFzHNR7QilChCUNE4hR6q7nma4viDYg"; - compress = gzip; - }; - - // test suite is very expensive - exclusive = true; - - exec = make { - check = [ - "TESTSUITEFLAGS=" + jobsFlagE, - "check", - ]; - }; - - inputs = [ - m4, - perl, - bash, - diffutils, - ]; - - runtime = [ - m4, - perl, - ]; -} - -package automake { - description = "a tool for automatically generating Makefile.in files"; - website = "https://www.gnu.org/software/automake"; - anitya = 144; - - version* = "1.18.1"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/automake/automake-"+version+".tar.gz"; - checksum = "FjvLG_GdQP7cThTZJLDMxYpRcKdpAVG-YDs1Fj1yaHlSdh_Kx6nRGN14E0r_BjcG"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' t/objcxx-minidemo.sh -test_disable '#!/bin/sh' t/objcxx-deps.sh - -test_disable '#!/bin/sh' t/dist-no-built-sources.sh -test_disable '#!/bin/sh' t/distname.sh -test_disable '#!/bin/sh' t/pr9.sh -`; - - exec = make {}; - - inputs = [ - grep, - gzip, - autoconf, - diffutils, - ]; - - runtime = [ autoconf ]; -} - -package libtool { - description = "a generic library support script"; - website = "https://www.gnu.org/software/libtool"; - anitya = 1741; - - version* = "2.5.4"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/libtool/libtool-"+version+".tar.gz"; - checksum = "pa6LSrQggh8mSJHQfwGjysAApmZlGJt8wif2cCLzqAAa2jpsTY0jZ-6stS3BWZ2Q"; - compress = gzip; - }; - - exec = make { - // _Z2a2c: symbol not found - skipEarlyStageCheck = true; - - check = [ - "TESTSUITEFLAGS=" + jobsFlagE, - "check", - ]; - }; - - inputs = [ - m4, - diffutils, - ]; -} - -package gzip { - description = "a popular data compression program"; - website = "https://www.gnu.org/software/gzip"; - anitya = 1290; - - version* = "1.14"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/gzip/gzip-"+version+".tar.gz"; - checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q"; - compress = gzip; - }; - - exec = make { - // dependency loop - skipCheck = true; - }; -} - -package sed { - description = "a non-interactive command-line text editor"; - website = "https://www.gnu.org/software/sed"; - anitya = 4789; - - version* = "4.10"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/sed/sed-"+version+".tar.gz"; - checksum = "TXTRFQJCyflb-bpBRI2S5Y1DpplwvT7-KfXtpqN4AdZgZ5OtI6yStn1-bkhDKx51"; - compress = gzip; - }; - - exec = make {}; - - inputs = [ - diffutils, - - kernel-headers, - ]; -} - -package diffutils { - description = "several programs related to finding differences between files"; - website = "https://www.gnu.org/software/diffutils"; - anitya = 436; - - version* = "3.12"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/diffutils/diffutils-"+version+".tar.gz"; - checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh -test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c -test_disable '#!/bin/sh' tests/cmp -`; - - toyboxEarly = true; - exec = make {}; -} - -package patch { - description = "a program to apply diff output to files"; - website = "https://savannah.gnu.org/projects/patch"; - anitya = 2597; - - version* = "2.8"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/patch/patch-"+version+".tar.gz"; - checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' tests/ed-style -test_disable '#!/bin/sh' tests/need-filename -`; - - toyboxEarly = true; - exec = make {}; -} - -package gawk { - description = "an implementation of awk with GNU extensions"; - website = "https://www.gnu.org/software/gawk"; - anitya = 868; - - version* = "5.4.0"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/gawk/gawk-"+version+".tar.gz"; - checksum = "m0RkIolC-PI7EY5q8pcx5Y-0twlIW0Yp3wXXmV-QaHorSdf8BhZ7kW9F8iWomz0C"; - compress = gzip; - }; - - toyboxEarly = true; - exec = make { - // dependency loop - skipCheck = true; - }; -} - -package grep { - description = "searches input for lines containing a match to a pattern"; - website = "https://www.gnu.org/software/grep"; - anitya = 1251; - - version* = "3.12"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/grep/grep-"+version+".tar.gz"; - checksum = "qMB4RjaPNRRYsxix6YOrjE8gyAT1zVSTy4nW4wKW9fqa0CHYAuWgPwDTirENzm_1"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh -test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c -`; - - exec = make {}; - - inputs = [ diffutils ]; -} - -package gettext { - description = "tools for producing multi-lingual messages"; - website = "https://www.gnu.org/software/gettext"; - anitya = 898; - - version* = "1.0"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/gettext/gettext-"+version+".tar.gz"; - checksum = "3MasKeEdPeFEgWgzsBKk7JqWqql1wEMbgPmzAfs-mluyokoW0N8oQVxPQoOnSdgC"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' gettext-tools/tests/msgcat-22 -test_disable '#!/bin/sh' gettext-tools/tests/msgconv-2 -test_disable '#!/bin/sh' gettext-tools/tests/msgconv-8 -test_disable '#!/bin/sh' gettext-tools/tests/xgettext-python-3 -test_disable '#!/bin/sh' gettext-tools/tests/msgmerge-compendium-6 -test_disable '#!/bin/sh' gettext-tools/tests/gettextpo-1 -test_disable '#!/bin/sh' gettext-tools/tests/format-c-5 -test_disable '#!/bin/sh' gettext-tools/gnulib-tests/test-c32ispunct.sh -test_disable 'int main(){return 0;}' gettext-tools/gnulib-tests/test-stdcountof-h.c - -touch gettext-tools/autotools/archive.dir.tar -`; - - exec = make {}; - - inputs = [ - diffutils, - gzip, - sed, - - kernel-headers, - ]; -} - -package findutils { - description = "the basic directory searching utilities"; - website = "https://www.gnu.org/software/findutils"; - anitya = 812; - - version* = "4.10.0"; - source = remoteFile { - url = "https://ftpmirror.gnu.org/gnu/findutils/findutils-"+version+".tar.xz"; - checksum = "ZXABdNBQXL7QjTygynRRTdXYWxQKZ0Wn5eMd3NUnxR0xaS0u0VfcKoTlbo50zxv6"; - }; - - early = ` -echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh -echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c -`; - - exec = make {}; - - inputs = [ - diffutils, - xz, - sed, - ]; -} - -package bash { - description = "the Bourne Again SHell"; - website = "https://www.gnu.org/software/bash"; - anitya = 166; - - version* = "5.3"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/bash/bash-"+version+".tar.gz"; - checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"; - compress = gzip; - }; - - toyboxEarly = true; - exec = make { - configure = { - "without-bash-malloc"; - }; - postInstall = "ln -s bash /work/system/bin/sh\n"; - }; -} - -package coreutils { - description = "the basic file, shell and text manipulation utilities"; - website = "https://www.gnu.org/software/coreutils"; - anitya = 343; - - version* = "9.11"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/coreutils/coreutils-"+version+".tar.gz"; - checksum = "t8UMed5wpFEoC56aa42_yidfOAaRGzOfj7MRtQkkqgGbpXiskNA8bd-EmVSQkZie"; - compress = gzip; - }; - - toyboxEarly = true; - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh -test_disable '#!/bin/sh' tests/ls/hyperlink.sh -test_disable '#!/bin/sh' tests/misc/user.sh -test_disable 'int main(){return 0;}' gnulib-tests/test-chown.c -test_disable 'int main(){return 0;}' gnulib-tests/test-fchownat.c -test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c -`; - - exec = make { - configure = { - "enable-single-binary": "symlinks"; - }; - }; - - inputs = [ - perl, - bash, - - kernel-headers, - ]; -} - -package tar { - description = "provides the ability to create tar archives"; - website = "https://www.gnu.org/software/tar"; - anitya = 4939; - - version* = "1.35"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/tar/tar-"+version+".tar.gz"; - checksum = "zSaoSlVUDW0dSfm4sbL4FrXLFR8U40Fh3zY5DWhR5NCIJ6GjU6Kc4VZo2-ZqpBRA"; - compress = gzip; - }; - - exec = make { - configure = { - "disable-acl"; - "without-posix-acls"; - "without-xattrs"; - }; - - check = [ - // very expensive - "TARTEST_SKIP_LARGE_FILES=1", - - "TESTSUITEFLAGS=" + jobsFlagE, - "check", - ]; - }; - - inputs = [ - diffutils, - - gzip, - bzip2, - zstd, - ]; -} - -package texinfo { - description = "the GNU square-wheel-reinvension of man pages"; - website = "https://www.gnu.org/software/texinfo"; - anitya = 4958; - - version* = "7.3"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/texinfo/texinfo-"+version+".tar.gz"; - checksum = "RRmC8Xwdof7JuZJeWGAQ_GeASIHAuJFQMbNONXBz5InooKIQGmqmWRjGNGEr5n4-"; - compress = gzip; - }; - - exec = make { - // nonstandard glibc extension - skipCheck = true; - }; - - inputs = [ perl ]; - - runtime = [ - perl, - gawk, - ]; -} - -package gperf { - description = "a perfect hash function generator"; - website = "https://www.gnu.org/software/gperf"; - anitya = 1237; - - version* = "3.3"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gperf/gperf-"+version+".tar.gz"; - checksum = "RtIy9pPb_Bb8-31J2Nw-rRGso2JlS-lDlVhuNYhqR7Nt4xM_nObznxAlBMnarJv7"; - compress = gzip; - }; - - exec = make {}; - - inputs = [ diffutils ]; -} - -package bc { - description = "an arbitrary precision numeric processing language"; - website = "https://www.gnu.org/software/bc"; - anitya = 170; - - version* = "1.08.2"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/bc/bc-"+version+".tar.gz"; - checksum = "8h6f3hjV80XiFs6v9HOPF2KEyg1kuOgn5eeFdVspV05ODBVQss-ey5glc8AmneLy"; - compress = gzip; - }; - - // source expected to be writable - writable = true; - chmod = true; - - exec = make {}; - - inputs = [ - texinfo, - ]; -} - -package libiconv { - description = "iconv implementation independent of glibc"; - website = "https://www.gnu.org/software/libiconv"; - anitya = 10656; - - version* = "1.19"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/libiconv/libiconv-"+version+".tar.gz"; - checksum = "UibB6E23y4MksNqYmCCrA3zTFO6vJugD1DEDqqWYFZNuBsUWMVMcncb_5pPAr88x"; - compress = gzip; - }; - - exec = make {}; -} - -package parallel { - description = "a shell tool for executing jobs in parallel using one or more computers"; - website = "https://www.gnu.org/software/parallel"; - anitya = 5448; - - version* = "20260422"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/parallel/parallel-"+version+".tar.bz2"; - checksum = "eTsepxgqhXpMEhPd55qh-W5y4vjKn0x9TD2mzbJCNZYtFf4lT4Wzoqr74HGJYBEH"; - compress = bzip2; - }; - - early = ` -ln -s ../system/bin/bash /bin/ -`; - - exec = make {}; - - inputs = [ - perl, - bash, - ]; - - runtime = [ perl ]; -} - -package libunistring { - description = "provides functions for manipulating Unicode strings"; - website = "https://www.gnu.org/software/libunistring"; - anitya = 1747; - - version* = "1.4.2"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/libunistring/libunistring-"+version+".tar.gz"; - checksum = "iW9BbfLoVlXjWoLTZ4AekQSu4cFBnLcZ4W8OHWbv0AhJNgD3j65_zqaLMzFKylg2"; - compress = gzip; - }; - - writable = true; - early = ` -test_disable() { chmod +w "$2" && echo "$1" > "$2"; } - -test_disable '#!/bin/sh' tests/test-c32ispunct.sh -test_disable 'int main(){return 0;}' tests/test-c32ispunct.c -`; - - exec = make {}; - - inputs = [ - diffutils, - ]; -} - -package libtasn1 { - description = "the ASN.1 library used by GnuTLS, p11-kit and some other packages"; - website = "https://www.gnu.org/software/libtasn1"; - anitya = 1734; - - version* = "4.21.0"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/libtasn1/libtasn1-"+version+".tar.gz"; - checksum = "9DYI3UYbfYLy8JsKUcY6f0irskbfL0fHZA91Q-JEOA3kiUwpodyjemRsYRjUpjuq"; - compress = gzip; - }; - - exec = make {}; -} - -package readline { - description = "provides a set of functions for use by applications that allow users to edit command lines as they are typed in"; - website = "https://tiswww.cwru.edu/php/chet/readline/rltop.html"; - anitya = 4173; - - version* = "8.3"; - source = remoteTar { - url = "https://ftpmirror.gnu.org/gnu/readline/readline-"+version+".tar.gz"; - checksum = "r-lcGRJq_MvvBpOq47Z2Y1OI2iqrmtcqhTLVXR0xWo37ZpC2uT_md7gKq5o_qTMV"; - compress = gzip; - }; - - exec = make { - configure = { - "with-curses"; - "with-shared-termcap-library"; - }; - }; - - inputs = [ ncurses ]; - runtime = [ ncurses ]; -} - -package gmp { - description = "a free library for arbitrary precision arithmetic"; - website = "https://gmplib.org"; - anitya = 1186; - - version* = "6.3.0"; - source = remoteTar { - url = "https://gcc.gnu.org/pub/gcc/infrastructure/"+ - "gmp-"+version+".tar.bz2"; - checksum = "yrgbgEDWKDdMWVHh7gPbVl56-sRtVVhfvv0M_LX7xMUUk_mvZ1QOJEAnt7g4i3k5"; - compress = bzip2; - }; - - env = [ - "CC=cc", - ]; - - exec = make {}; - - inputs = [ m4 ]; -} - -package mpfr { - description = "a C library for multiple-precision floating-point computations"; - website = "https://www.mpfr.org"; - anitya = 2019; - - version* = "4.2.2"; - source = remoteTar { - url = "https://gcc.gnu.org/pub/gcc/infrastructure/"+ - "mpfr-"+version+".tar.bz2"; - checksum = "wN3gx0zfIuCn9r3VAn_9bmfvAYILwrRfgBjYSD1IjLqyLrLojNN5vKyQuTE9kA-B"; - compress = bzip2; - }; - - exec = make {}; - - inputs = [ gmp ]; - runtime = [ gmp ]; -} - -package mpc { - description = "a C library for the arithmetic of complex numbers"; - website = "https://www.multiprecision.org"; - anitya = 1667; - - version* = "1.4.1"; - source = remoteGitLab { - domain = "gitlab.inria.fr"; - suffix = "mpc/mpc"; - ref = version; - checksum = "ZffaZyWkvIw0iPvRe5EJ7O-VvHtSkbbb3K_7SgPtK810NvGan7nbF0T5-6tozjQN"; - }; - - // does not find mpc-impl.h otherwise - enterSource = true; - - exec = make { - inPlace = true; - generate = "autoreconf -vfi"; - }; - - inputs = [ - automake, - libtool, - texinfo, - - mpfr, - ]; - - runtime = [ mpfr ]; -} diff --git a/internal/rosa/package/gnutls/alpine-tests-certtool.patch b/internal/rosa/package/gnutls/alpine-tests-certtool.patch new file mode 100644 index 00000000..083b2a5e --- /dev/null +++ b/internal/rosa/package/gnutls/alpine-tests-certtool.patch @@ -0,0 +1,26 @@ +I think this tests is simply wrong. +When a PIN is given, the program should run in batch mode. +So the question for "Enter password" should _not_ be present. + +DO NOT REMOVE UNLESS VERIFIED IT'S NOT ACTUALLY NECESSARY ANYMORE. + +--- a/tests/cert-tests/certtool.sh 2019-02-07 07:33:45.960887338 +0000 ++++ b/tests/cert-tests/certtool.sh 2019-02-07 07:36:14.550955051 +0000 +@@ -49,7 +49,7 @@ + + #check whether password is being honoured + #some CI runners need GNUTLS_PIN (GNUTLS_PIN=${PASS}) +- ${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <${TMPFILE2} 2>&1 </dev/null 2>&1 +- if test $? != 0;then ++ if test $? != 1; then + cat ${TMPFILE2} + echo "No password was asked" + exit 1 diff --git a/internal/rosa/package/gnutls/bootstrap-remove-gtk-doc.patch b/internal/rosa/package/gnutls/bootstrap-remove-gtk-doc.patch new file mode 100644 index 00000000..5007218c --- /dev/null +++ b/internal/rosa/package/gnutls/bootstrap-remove-gtk-doc.patch @@ -0,0 +1,60 @@ +diff --git a/bootstrap.conf b/bootstrap.conf +index 1c3cc61e6..32bae9387 100644 +--- a/bootstrap.conf ++++ b/bootstrap.conf +@@ -50,7 +50,6 @@ bison 2.4 + gettext 0.17 + git 1.4.4 + gperf - +-gtkdocize - + perl 5.5 + wget - + " +diff --git a/configure.ac b/configure.ac +index 5057536e5..731558a15 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -403,11 +403,6 @@ if test "$enable_fuzzer_target" != "no";then + AC_DEFINE([FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], 1, [Enable fuzzer target -not for production]) + fi + +-dnl +-dnl check for gtk-doc +-dnl +-GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) +- + AM_GNU_GETTEXT([external]) + AM_GNU_GETTEXT_VERSION([0.19]) + m4_ifdef([AM_GNU_GET][TEXT_REQUIRE_VERSION],[ +diff --git a/doc/Makefile.am b/doc/Makefile.am +index fb1390d70..52f0ad9af 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -33,9 +33,6 @@ IMAGES = \ + pkcs11-vision.png + + SUBDIRS = examples scripts credentials latex +-if ENABLE_GTK_DOC +-SUBDIRS += reference +-endif + + -include $(top_srcdir)/doc/doc.mk + +diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am +index f10c8ed3c..b711b58ec 100644 +--- a/doc/reference/Makefile.am ++++ b/doc/reference/Makefile.am +@@ -82,13 +82,4 @@ include $(top_srcdir)/gtk-doc.make + # e.g. EXTRA_DIST += version.xml.in + EXTRA_DIST += version.xml.in + +-# Comment this out if you want 'make check' to test you doc status +-# and run some sanity checks +-if ENABLE_GTK_DOC +-TESTS_ENVIRONMENT = \ +- DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ +- SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) +-#TESTS = $(GTKDOC_CHECK) +-endif +- + -include $(top_srcdir)/git.mk diff --git a/internal/rosa/package/gnutls/package.az b/internal/rosa/package/gnutls/package.az new file mode 100644 index 00000000..bdc6d47f --- /dev/null +++ b/internal/rosa/package/gnutls/package.az @@ -0,0 +1,66 @@ +package gnutls { + description = "a secure communications library implementing the SSL, TLS and DTLS protocols"; + website = "https://gnutls.org"; + anitya = 1221; + + version* = "3.8.12"; + source = remoteGit { + url = "https://gitlab.com/gnutls/gnutls.git"; + tag = version; + checksum = "VPdP-nRydQQRJcnma-YA7CJYA_kzTJ2rb3QFeP6D27emSyInJ8sQ-Wzn518I38dl"; + }; + patches = [ + "bootstrap-remove-gtk-doc.patch", + "alpine-tests-certtool.patch", + "test-kernel-version-ksh.patch", + ]; + + exec = make { + generate = "./bootstrap --skip-po --no-git --gnulib-srcdir=gnulib"; + + configure = { + "disable-doc"; + "disable-openssl-compatibility"; + + "with-default-trust-store-file": "/system/etc/ssl/certs/ca-bundle.crt"; + "with-default-trust-store-pkcs11": "pkcs11:"; + + "with-zlib": "link"; + "with-zstd": "link"; + + "": arch { + arm64 = "disable-hardware-acceleration"; + }; + }; + }; + + inputs = [ + gzip, + automake, + libtool, + bison, + gettext, + gperf, + pkg-config, + + python, + texinfo, + diffutils, + nss-cacert, + + libev, + zlib, + zstd, + p11-kit, + nettle3, + libunistring, + ]; + + runtime = [ + zlib, + zstd, + p11-kit, + nettle3, + libunistring, + ]; +} diff --git a/internal/rosa/package/gnutls/test-kernel-version-ksh.patch b/internal/rosa/package/gnutls/test-kernel-version-ksh.patch new file mode 100644 index 00000000..fbff46a5 --- /dev/null +++ b/internal/rosa/package/gnutls/test-kernel-version-ksh.patch @@ -0,0 +1,15 @@ +diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh +index 1b78b8cf1..350156a86 100644 +--- a/tests/scripts/common.sh ++++ b/tests/scripts/common.sh +@@ -279,10 +279,6 @@ kernel_version_check() { + kernel_major=$(echo $kernel_version | cut -d. -f1 2>/dev/null) + kernel_minor=$(echo $kernel_version | cut -d. -f2 2>/dev/null) + +- if ! [[ "$kernel_major" =~ ^[0-9]+$ ]] || ! [[ "$kernel_minor" =~ ^[0-9]+$ ]]; then +- return 1 +- fi +- + if [ "$kernel_major" -lt "$required_major" ]; then + return 1 + fi diff --git a/internal/rosa/state.go b/internal/rosa/state.go index fd363faf..efb51d96 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -8,6 +8,7 @@ import ( "io/fs" "net/http" "path/filepath" + "reflect" "runtime" "slices" "strconv" @@ -373,6 +374,13 @@ func (s *S) Collect() (handles P) { return } +// deferredGit is a call to Toolchain.newTagRemote from azalea. +type deferredGit struct { + url string + tag string + checksum string +} + // getS must be called before accessing s. This value is not currently safe for // concurrent use, but the underlying frame is immutable. func (s *S) getS() []azalea.Frame { @@ -381,6 +389,12 @@ func (s *S) getS() []azalea.Frame { k := func(name string) unique.Handle[azalea.Ident] { return unique.Make(azalea.Ident(name)) } + + var ( + identDefault = k("default") + identArch = k(s.arch) + ) + s.s = make([]azalea.Frame, 1, 1<<4) s.s[0].Val = map[unique.Handle[azalea.Ident]]any{ k("jobsE"): jobsE, @@ -428,9 +442,45 @@ func (s *S) getS() []azalea.Frame { return }}, + // state helpers + + k("arch"): {F: func( + args azalea.FArgs, + ) (v any, set bool, err error) { + var fallback any + for _, arg := range args { + switch arg.K { + case identDefault: + fallback = arg.V + continue + + case identArch: + return arg.V, true, nil + } + } + + return fallback, fallback != nil, nil + }}, + // convenience functions - unique.Make(azalea.Ident("remoteGitLab")): {F: func( + k("remoteGit"): {F: func( + args azalea.FArgs, + ) (v any, set bool, err error) { + var a deferredGit + if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ + k("url"): &a.url, + k("tag"): &a.tag, + k("checksum"): &a.checksum, + }); err != nil { + return + } + v = a + set = true + return + }}, + + k("remoteGitLab"): {F: func( args azalea.FArgs, ) (v any, set bool, err error) { var domain, suffix, ref, checksum string @@ -526,7 +576,7 @@ func (ctx *evalContext) f( anitya int64 version string - source pkg.Artifact + sourceA any helper Helper inputs, runtimes azalea.Array @@ -537,7 +587,7 @@ func (ctx *evalContext) f( k("anitya"): &anitya, k("version"): &version, - k("source"): &source, + k("source"): &sourceA, k("writable"): &attr.Writable, k("chmod"): &attr.Chmod, @@ -581,6 +631,21 @@ func (ctx *evalContext) f( meta.ID = int(anitya) meta.f = func(t Toolchain) (pkg.Artifact, string) { + var source pkg.Artifact + switch p := sourceA.(type) { + case pkg.Artifact: + source = p + + case deferredGit: + source = t.newTagRemote(p.url, p.tag, p.checksum) + + default: + panic(azalea.TypeError{ + Concrete: reflect.TypeOf(sourceA), + Asserted: reflect.TypeFor[pkg.Artifact](), + }) + } + return t.NewPackage( meta.Name, version, -- cgit v1.3.1