diff options
-rw-r--r-- | guix/guix/guix-1.4.0-guile-3.0.9.patch | 52 | ||||
-rw-r--r-- | guix/guix/guix.spec | 51 |
2 files changed, 86 insertions, 17 deletions
diff --git a/guix/guix/guix-1.4.0-guile-3.0.9.patch b/guix/guix/guix-1.4.0-guile-3.0.9.patch new file mode 100644 index 0000000..41d485e --- /dev/null +++ b/guix/guix/guix-1.4.0-guile-3.0.9.patch @@ -0,0 +1,52 @@ +From 8b2721de6af76780611fe9f86fa5d4cd062400d1 Mon Sep 17 00:00:00 2001 +From: Ludovic Courtès <ludo@gnu.org> +Date: Wed, 25 Jan 2023 17:29:09 +0100 +Subject: packages: Adjust 'generate-package-cache' for Guile 3.0.9. + +* gnu/packages.scm (generate-package-cache): Adjust for Guile 3.0.9. +--- + gnu/packages.scm | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/gnu/packages.scm b/gnu/packages.scm +index 61345f75a9..80c22d1d7f 100644 +--- a/gnu/packages.scm ++++ b/gnu/packages.scm +@@ -1,5 +1,5 @@ + ;;; GNU Guix --- Functional package management for GNU +-;;; Copyright © 2012-2020, 2022 Ludovic Courtès <ludo@gnu.org> ++;;; Copyright © 2012-2020, 2022-2023 Ludovic Courtès <ludo@gnu.org> + ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> + ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> + ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> +@@ -38,6 +38,7 @@ + #:use-module (ice-9 vlist) + #:use-module (ice-9 match) + #:use-module (ice-9 binary-ports) ++ #:autoload (rnrs bytevectors) (bytevector?) + #:autoload (system base compile) (compile) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) +@@ -442,10 +443,15 @@ reducing the memory footprint." + (lambda (port) + ;; Store the cache as a '.go' file. This makes loading fast and reduces + ;; heap usage since some of the static data is directly mmapped. +- (put-bytevector port +- (compile `'(,@exp) +- #:to 'bytecode +- #:opts '(#:to-file? #t))))) ++ (match (compile `'(,@exp) ++ #:to 'bytecode ++ #:opts '(#:to-file? #t)) ++ ((? bytevector? bv) ++ (put-bytevector port bv)) ++ (proc ++ ;; In Guile 3.0.9, the linker can return a procedure instead of a ++ ;; bytevector. Adjust to that. ++ (proc port))))) + cache-file) + + +-- +cgit v1.2.3-70-g09d2 + diff --git a/guix/guix/guix.spec b/guix/guix/guix.spec index 9ec4d94..578ef69 100644 --- a/guix/guix/guix.spec +++ b/guix/guix/guix.spec @@ -6,7 +6,7 @@ Name: guix Version: 1.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A purely functional package manager for the GNU system License: GPLv3+ @@ -19,6 +19,9 @@ Patch0: guix-1.4.0-tests-guix-home.patch # Fix tests/gremlin.scm for GCC 14. Patch1: guix-1.4.0-tests-gremlin.patch +# Fix tests/packages.scm for Guile 3.0.9. +Patch2: guix-1.4.0-guile-3.0.9.patch + %global guix_user guixbuild %global guix_group guixbuild %global guile_source_dir %{_datadir}/guile/site/3.0 @@ -36,13 +39,17 @@ BuildRequires: gcc-c++ BuildRequires: autoconf, automake, gettext-devel, po4a, help2man, texinfo BuildRequires: bzip2-devel, libgcrypt-devel, pkgconfig(sqlite3) BuildRequires: gettext, graphviz -BuildRequires: bash-completion, fish +BuildRequires: pkgconfig(bash-completion), pkgconfig(fish) BuildRequires: selinux-policy, systemd BuildRequires: glibc-langpack-en BuildRequires: pkgconfig(guile-3.0) >= 3.0.3 BuildRequires: guile-gcrypt >= 0.1.0 +%if 0%{?fedora} >= 41 +BuildRequires: guile-gnutls +%else BuildRequires: guile30-gnutls +%endif BuildRequires: guile-sqlite3 >= 0.1.0 BuildRequires: guile-zlib >= 0.1.0 BuildRequires: guile-lzlib @@ -58,7 +65,11 @@ BuildRequires: disarchive Requires: guile30 >= 3.0.3 Requires: guile-gcrypt >= 0.1.0 +%if 0%{?fedora} >= 41 +Requires: guile-gnutls +%else Requires: guile30-gnutls +%endif Requires: guile-sqlite3 >= 0.1.0 Requires: guile-zlib >= 0.1.0 Requires: guile-lzlib @@ -100,13 +111,13 @@ composed. %build -# Rename test-tmp to t to save the length of the path. +mktemp -d > guix_test_root.txt %configure \ --disable-rpath \ --with-bash-completion-dir=%{bash_completion_dir} \ --with-fish-completion-dir=%{fish_completion_dir} \ --with-selinux-policy-dir=%{_datadir}/selinux/packages \ - ac_cv_guix_test_root="$(pwd)/t" + ac_cv_guix_test_root="$(< guix_test_root.txt)" # The progress bar of Guile compilation does not work with -O option. %global _make_output_sync %{nil} %make_build @@ -117,17 +128,15 @@ if [ "$(curl http://fedoraproject.org/static/hotspot.txt)" != OK ]; then echo 'Guix tests require Internet access to work.' echo 'Expect failure if the build process has no access to Internet.' fi -# The default path used by mock is /builddir/build/BUILD/guix-<version>, whose -# length is at least 32 bytes. However, the test tests/gexp.scm fails when the -# path is longer than 29 bytes because of the length limit of the shebang line. -# We raise the working directory length limit from 29 to 36 by overriding the -# autoconf cache variable ac_cv_guix_test_root, saving 7 bytes by renaming -# test-tmp to t. -cwd_str="$(pwd)" -cwd_len="${#cwd_str}" -if [ "${cwd_len}" -gt 36 ]; then - echo "${cwd_str} is too long." - echo 'The working directory cannot be longer than 36 bytes.' +# The tests/gexp.scm test fails when the test root is longer than 38 bytes +# because of the length limit of the shebang line. Move the test root to /tmp +# by overriding the autoconf cache variable ac_cv_guix_test_root since the +# default RPM build root is too long. +test_root_str="$(< guix_test_root.txt)" +test_root_len="${#test_root_str}" +if [ "${test_root_len}" -gt 38 ]; then + echo "${test_root_str} is too long." + echo 'The Guix test root cannot be longer than 38 bytes.' exit 1 fi # Mounting proc in mock causes errors: @@ -146,8 +155,8 @@ fi # In procedure copy-file: Permission denied: # "/builddir/build/BUILD/guix-1.4.0/gnu/packages/bootstrap/i686-linux/bash" %{__make} check -# Grant write permission so rpmbuild can clean the build root. -chmod -R u+w "$(pwd)/t" +chmod -R u+w "${test_root_str}" +rm -r "${test_root_str}" %install @@ -500,6 +509,14 @@ fi %changelog +* Thu May 08 2025 Ting-Wei Lan <lantw44@gmail.com> - 1.4.0-5 +- Fix tests with Guile 3.0.9 for Fedora 41 and later +- Switch to the official guile-gnutls package on Fedora 41 and later +- Switch bash-completion and fish BuildRequires to pkgconfig dependencies since + Fedora 41 moves bash-completion.pc to the devel subpackage +- Move the test root to /tmp since Fedora 41 RPM 4.20 per-build directory makes + the path too long to run the tests/gexp.scm test + * Sat Nov 02 2024 Ting-Wei Lan <lantw44@gmail.com> - 1.4.0-4 - Fix tests with GCC 14 for Fedora 40 and later - Drop dependency on libgcrypt.so because it has been handled by guile-gcrypt |