diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-18 22:00:52 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-18 22:06:00 +0900 |
| commit | 594221eb78fede12840121982782a470e6ed29d0 (patch) | |
| tree | 84142dce80eb59e4b8b0a2babad2777de5c37c85 /internal/rosa/package | |
| parent | 34822925e18cb35e1815d3837a8b55169953d876 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package')
| -rw-r--r-- | internal/rosa/package/gnu.az (renamed from internal/rosa/package/gnu/package.az) | 0 | ||||
| -rw-r--r-- | internal/rosa/package/gnutls/alpine-tests-certtool.patch | 26 | ||||
| -rw-r--r-- | internal/rosa/package/gnutls/bootstrap-remove-gtk-doc.patch | 60 | ||||
| -rw-r--r-- | internal/rosa/package/gnutls/package.az | 66 | ||||
| -rw-r--r-- | internal/rosa/package/gnutls/test-kernel-version-ksh.patch | 15 |
5 files changed, 167 insertions, 0 deletions
diff --git a/internal/rosa/package/gnu/package.az b/internal/rosa/package/gnu.az index 3dc7074f..3dc7074f 100644 --- a/internal/rosa/package/gnu/package.az +++ b/internal/rosa/package/gnu.az 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 <<EOF ++ GNUTLS_PIN=${PASS} ${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <<EOF + $PASS + EOF + if test $? != 0;then +@@ -59,7 +59,7 @@ + fi + + grep "Enter password" ${TMPFILE2} >/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 |
