From 5594f4c999a71427d7aad9898d7e614b8dbd6b3a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 1 Jul 2023 19:41:21 +0200 Subject: gnu: sssd: Update to 2.9.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/sssd.scm (sssd): Update to 2.9.1. [native-inputs]: Add bc. * gnu/packages/patches/sssd-system-directories.patch: Adjust for new version. Signed-off-by: Ludovic Courtès --- gnu/packages/patches/sssd-system-directories.patch | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/sssd-system-directories.patch b/gnu/packages/patches/sssd-system-directories.patch index ce0dcf5d4d..cc37ac6024 100644 --- a/gnu/packages/patches/sssd-system-directories.patch +++ b/gnu/packages/patches/sssd-system-directories.patch @@ -2,19 +2,10 @@ Do not attempt to create $localstatedir and $sysconfdir (i.e., /var and /etc) upon "make install". diff --git a/Makefile.am b/Makefile.am -index 0de53a2c8..51ad57bf1 100644 +index e780e8a14..afd2b0a49 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -58,7 +58,7 @@ sssddatadir = $(datadir)/sssd - sssdapiplugindir = $(sssddatadir)/sssd.api.d - sssdtapscriptdir = $(sssddatadir)/systemtap - krb5snippetsdir = $(sssddatadir)/krb5-snippets --dbuspolicydir = $(sysconfdir)/dbus-1/system.d -+dbuspolicydir = $(prefix)/etc/dbus-1/system.d - dbusservicedir = $(datadir)/dbus-1/system-services - sss_statedir = $(localstatedir)/lib/sss - runstatedir = @runstatedir@ -@@ -85,7 +85,7 @@ pkgconfigdir = $(libdir)/pkgconfig +@@ -84,7 +84,7 @@ pkgconfigdir = $(libdir)/pkgconfig krb5rcachedir = @krb5rcachedir@ sudolibdir = @sudolibpath@ polkitdir = @polkitdir@ @@ -23,7 +14,7 @@ index 0de53a2c8..51ad57bf1 100644 systemtap_tapdir = @tapset_dir@ sssdkcmdatadir = $(datadir)/sssd-kcm deskprofilepath = $(sss_statedir)/deskprofile -@@ -5195,7 +5195,6 @@ installsssddirs:: +@@ -5378,7 +5378,6 @@ installsssddirs:: $(DESTDIR)$(bindir) \ $(DESTDIR)$(sbindir) \ $(DESTDIR)$(mandir) \ @@ -31,7 +22,7 @@ index 0de53a2c8..51ad57bf1 100644 $(DESTDIR)$(pluginpath) \ $(DESTDIR)$(libdir)/ldb \ $(DESTDIR)$(dbuspolicydir) \ -@@ -5205,24 +5204,12 @@ installsssddirs:: +@@ -5388,24 +5387,12 @@ installsssddirs:: $(DESTDIR)$(sssddatadir) \ $(DESTDIR)$(sudolibdir) \ $(DESTDIR)$(autofslibdir) \ @@ -56,7 +47,7 @@ index 0de53a2c8..51ad57bf1 100644 if HAVE_DOXYGEN docs: -@@ -5338,7 +5325,6 @@ if BUILD_SAMBA +@@ -5523,7 +5510,6 @@ if BUILD_SAMBA endif if BUILD_KCM $(MKDIR_P) $(DESTDIR)/$(sssdkcmdatadir) -- cgit 1.4.1 From ff208b4b629a15ce0b72555db1cda9fcb7eec1c9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 16 Jun 2023 15:26:04 +0200 Subject: gnu: arpack-ng: Update to 3.9.0. * gnu/packages/maths.scm (arpack-ng): Update to 3.9.0. [source]: Add 'patches'. [build-system]: Switch to CMAKE-BUILD-SYSTEM. [native-inputs]: Remove AUTOCONF, AUTOMAKE, and LIBTOOL. (arpack-ng-openmpi)[inputs]: Use 'modify-inputs'. [arguments]: Use gexps. * gnu/packages/patches/arpack-ng-propagate-rng-state.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 25 +- .../patches/arpack-ng-propagate-rng-state.patch | 523 +++++++++++++++++++++ 3 files changed, 537 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/arpack-ng-propagate-rng-state.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c817c9c926..e9ce4ada54 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -905,6 +905,7 @@ dist_patch_DATA = \ %D%/packages/patches/aoflagger-use-system-provided-pybind11.patch \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ %D%/packages/patches/ark-skip-xar-test.patch \ + %D%/packages/patches/arpack-ng-propagate-rng-state.patch \ %D%/packages/patches/aspell-CVE-2019-25051.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 0d59ff30f7..b0b3e382ae 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -973,7 +973,7 @@ halfspaces) or by their double description with both representations.") (define-public arpack-ng (package (name "arpack-ng") - (version "3.8.0") + (version "3.9.0") (home-page "https://github.com/opencollab/arpack-ng") (source (origin (method git-fetch) @@ -981,10 +981,11 @@ halfspaces) or by their double description with both representations.") (file-name (git-file-name name version)) (sha256 (base32 - "0l7as5z6xvbxly8alam9s4kws70952qq35a6vkljzayi4b9gbklx")))) - (build-system gnu-build-system) + "09smxilyn8v9xs3kpx3nlj2s7ql3v8z40mpc09kccbb6smyd35iv")) + (patches (search-patches "arpack-ng-propagate-rng-state.patch")))) + (build-system cmake-build-system) (native-inputs - (list autoconf automake libtool pkg-config)) + (list pkg-config)) (inputs (list eigen lapack gfortran)) (synopsis "Fortran subroutines for solving eigenvalue problems") @@ -998,16 +999,16 @@ large scale eigenvalue problems.") (package (inherit arpack-ng) (name "arpack-ng-openmpi") (inputs - `(("mpi" ,openmpi) - ,@(package-inputs arpack-ng))) + (modify-inputs (package-inputs arpack-ng) + (prepend openmpi))) (arguments (substitute-keyword-arguments (package-arguments arpack-ng) - ((#:configure-flags _ '()) - ''("--enable-mpi")) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'check 'mpi-setup - ,%openmpi-setup))))) + ((#:configure-flags _ #~()) + #~'("-DMPI=ON")) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-before 'check 'mpi-setup + #$%openmpi-setup))))) (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) (define-public lapack diff --git a/gnu/packages/patches/arpack-ng-propagate-rng-state.patch b/gnu/packages/patches/arpack-ng-propagate-rng-state.patch new file mode 100644 index 0000000000..4466bb8e50 --- /dev/null +++ b/gnu/packages/patches/arpack-ng-propagate-rng-state.patch @@ -0,0 +1,523 @@ +Fix a bug that manifests while running the test suite of 'python-igraph': + + https://github.com/opencollab/arpack-ng/issues/401 + https://github.com/opencollab/arpack-ng/pull/414 + +From d885b7be4ecdc9c1496f2d6f256f6c0d34962459 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Szabolcs=20Horva=CC=81t?= +Date: Sun, 9 Apr 2023 16:36:35 +0200 +Subject: [PATCH] fix: ensure that LAPACK RNG state is propagated + + - fixes #401, #410, #411 + - restores 'inits' variable removed in ce2e69a849da1d10dad5d6d3ec4db6120b3ecf50, ensuring that the RNG state is propagated + - reverts e0d67054f573da351f12a226f7c7cc65a690ef3d to ensure that seed is different on each parallel thread + - updates seed initialization of parallel pdgetv0/psgetv0 so that they match that of pzgetv0/pcgetv0 +--- + PARPACK/SRC/MPI/pcgetv0.f | 48 +++++++++++++++++++++++---------------- + PARPACK/SRC/MPI/pdgetv0.f | 40 ++++++++++++++++++++++++++------ + PARPACK/SRC/MPI/psgetv0.f | 43 ++++++++++++++++++++++++++--------- + PARPACK/SRC/MPI/pzgetv0.f | 48 +++++++++++++++++++++++---------------- + SRC/cgetv0.f | 21 ++++++++++++----- + SRC/dgetv0.f | 21 ++++++++++++----- + SRC/sgetv0.f | 21 ++++++++++++----- + SRC/zgetv0.f | 21 ++++++++++++----- + 8 files changed, 183 insertions(+), 80 deletions(-) + +diff --git a/PARPACK/SRC/MPI/pcgetv0.f b/PARPACK/SRC/MPI/pcgetv0.f +index 59e3d1658..24fe8a0f1 100644 +--- a/PARPACK/SRC/MPI/pcgetv0.f ++++ b/PARPACK/SRC/MPI/pcgetv0.f +@@ -176,13 +176,13 @@ subroutine pcgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj, myid, igen + Real + & rnorm0 + Complex + & cnorm, cnorm2 +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + Complex + & cnorm_buf, buf2(1) +@@ -203,6 +203,12 @@ subroutine pcgetv0 + & ccdotc + external ccdotc, pscnorm2, slapy2 + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -213,26 +219,30 @@ subroutine pcgetv0 + c | random number generator | + c %-----------------------------------% + c ++ if (inits) then + c +-c %-----------------------------------% +-c | Generate a seed on each processor | +-c | using process id (myid). | +-c | Note: the seed must be between 1 | +-c | and 4095. iseed(4) must be odd. | +-c %-----------------------------------% ++c %-----------------------------------% ++c | Generate a seed on each processor | ++c | using process id (myid). | ++c | Note: the seed must be between 1 | ++c | and 4095. iseed(4) must be odd. | ++c %-----------------------------------% + c +- call MPI_COMM_RANK(comm, myid, ierr) +- igen = 1000 + 2*myid + 1 +- if (igen .gt. 4095) then +- write(0,*) 'Error in p_getv0: seed exceeds 4095!' +- end if ++ call MPI_COMM_RANK(comm, myid, ierr) ++ igen = 1000 + 2*myid + 1 ++ if (igen .gt. 4095) then ++ write(0,*) 'Error in p_getv0: seed exceeds 4095!' ++ end if ++c ++ iseed(1) = igen/1000 ++ igen = mod(igen,1000) ++ iseed(2) = igen/100 ++ igen = mod(igen,100) ++ iseed(3) = igen/10 ++ iseed(4) = mod(igen,10) + c +- iseed(1) = igen/1000 +- igen = mod(igen,1000) +- iseed(2) = igen/100 +- igen = mod(igen,100) +- iseed(3) = igen/10 +- iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/PARPACK/SRC/MPI/pdgetv0.f b/PARPACK/SRC/MPI/pdgetv0.f +index 0f348b820..5a1956997 100644 +--- a/PARPACK/SRC/MPI/pdgetv0.f ++++ b/PARPACK/SRC/MPI/pdgetv0.f +@@ -177,11 +177,11 @@ subroutine pdgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth +- integer idist, iseed(4), iter, msglvl, jj ++ logical first, inits, orth ++ integer idist, iseed(4), iter, msglvl, jj, myid, igen + Double precision + & rnorm0, buf2(1) +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + Double precision + & rnorm_buf +@@ -206,6 +206,12 @@ subroutine pdgetv0 + c + intrinsic abs, sqrt + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -216,10 +222,30 @@ subroutine pdgetv0 + c | random number generator | + c %-----------------------------------% + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++ if (inits) then ++c ++c %-----------------------------------% ++c | Generate a seed on each processor | ++c | using process id (myid). | ++c | Note: the seed must be between 1 | ++c | and 4095. iseed(4) must be odd. | ++c %-----------------------------------% ++c ++ call MPI_COMM_RANK(comm, myid, ierr) ++ igen = 1000 + 2*myid + 1 ++ if (igen .gt. 4095) then ++ write(0,*) 'Error in p_getv0: seed exceeds 4095!' ++ end if ++c ++ iseed(1) = igen/1000 ++ igen = mod(igen,1000) ++ iseed(2) = igen/100 ++ igen = mod(igen,100) ++ iseed(3) = igen/10 ++ iseed(4) = mod(igen,10) ++c ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/PARPACK/SRC/MPI/psgetv0.f b/PARPACK/SRC/MPI/psgetv0.f +index d79a513b2..078e4fa8c 100644 +--- a/PARPACK/SRC/MPI/psgetv0.f ++++ b/PARPACK/SRC/MPI/psgetv0.f +@@ -177,11 +177,11 @@ subroutine psgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth +- integer idist, iseed(4), iter, msglvl, jj ++ logical first, inits, orth ++ integer idist, iseed(4), iter, msglvl, jj, myid, igen + Real + & rnorm0 +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + Real + & rnorm_buf +@@ -206,20 +206,41 @@ subroutine psgetv0 + c + intrinsic abs, sqrt + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% + c + c +-c %-----------------------------------% +-c | Initialize the seed of the LAPACK | +-c | random number generator | +-c %-----------------------------------% ++ if (inits) then + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++c %-----------------------------------% ++c | Generate a seed on each processor | ++c | using process id (myid). | ++c | Note: the seed must be between 1 | ++c | and 4095. iseed(4) must be odd. | ++c %-----------------------------------% ++c ++ call MPI_COMM_RANK(comm, myid, ierr) ++ igen = 1000 + 2*myid + 1 ++ if (igen .gt. 4095) then ++ write(0,*) 'Error in p_getv0: seed exceeds 4095!' ++ end if ++c ++ iseed(1) = igen/1000 ++ igen = mod(igen,1000) ++ iseed(2) = igen/100 ++ igen = mod(igen,100) ++ iseed(3) = igen/10 ++ iseed(4) = mod(igen,10) ++c ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/PARPACK/SRC/MPI/pzgetv0.f b/PARPACK/SRC/MPI/pzgetv0.f +index 731fb319f..94fb705f3 100644 +--- a/PARPACK/SRC/MPI/pzgetv0.f ++++ b/PARPACK/SRC/MPI/pzgetv0.f +@@ -176,13 +176,13 @@ subroutine pzgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj, myid, igen + Double precision + & rnorm0 + Complex*16 + & cnorm, cnorm2 +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + Complex*16 + & cnorm_buf, buf2(1) +@@ -203,6 +203,12 @@ subroutine pzgetv0 + & zzdotc + external zzdotc , pdznorm2 , dlapy2 + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -213,26 +219,30 @@ subroutine pzgetv0 + c | random number generator | + c %-----------------------------------% + c ++ if (inits) then + c +-c %-----------------------------------% +-c | Generate a seed on each processor | +-c | using process id (myid). | +-c | Note: the seed must be between 1 | +-c | and 4095. iseed(4) must be odd. | +-c %-----------------------------------% ++c %-----------------------------------% ++c | Generate a seed on each processor | ++c | using process id (myid). | ++c | Note: the seed must be between 1 | ++c | and 4095. iseed(4) must be odd. | ++c %-----------------------------------% + c +- call MPI_COMM_RANK(comm, myid, ierr) +- igen = 1000 + 2*myid + 1 +- if (igen .gt. 4095) then +- write(0,*) 'Error in p_getv0: seed exceeds 4095!' +- end if ++ call MPI_COMM_RANK(comm, myid, ierr) ++ igen = 1000 + 2*myid + 1 ++ if (igen .gt. 4095) then ++ write(0,*) 'Error in p_getv0: seed exceeds 4095!' ++ end if ++c ++ iseed(1) = igen/1000 ++ igen = mod(igen,1000) ++ iseed(2) = igen/100 ++ igen = mod(igen,100) ++ iseed(3) = igen/10 ++ iseed(4) = mod(igen,10) + c +- iseed(1) = igen/1000 +- igen = mod(igen,1000) +- iseed(2) = igen/100 +- igen = mod(igen,100) +- iseed(3) = igen/10 +- iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/SRC/cgetv0.f b/SRC/cgetv0.f +index b49e66708..c231eadcb 100644 +--- a/SRC/cgetv0.f ++++ b/SRC/cgetv0.f +@@ -156,13 +156,13 @@ subroutine cgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj + Real + & rnorm0 + Complex + & cnorm +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + c %----------------------% + c | External Subroutines | +@@ -180,6 +180,12 @@ subroutine cgetv0 + & ccdotc + external ccdotc, scnrm2, slapy2 + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -190,10 +196,13 @@ subroutine cgetv0 + c | random number generator | + c %-----------------------------------% + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++ if (inits) then ++ iseed(1) = 1 ++ iseed(2) = 3 ++ iseed(3) = 5 ++ iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/SRC/dgetv0.f b/SRC/dgetv0.f +index 8be4fa26d..1d6dc01bd 100644 +--- a/SRC/dgetv0.f ++++ b/SRC/dgetv0.f +@@ -157,11 +157,11 @@ subroutine dgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj + Double precision + & rnorm0 +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + c %----------------------% + c | External Subroutines | +@@ -183,6 +183,12 @@ subroutine dgetv0 + c + intrinsic abs, sqrt + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -193,10 +199,13 @@ subroutine dgetv0 + c | random number generator | + c %-----------------------------------% + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++ if (inits) then ++ iseed(1) = 1 ++ iseed(2) = 3 ++ iseed(3) = 5 ++ iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/SRC/sgetv0.f b/SRC/sgetv0.f +index 26130a014..d861b2d6d 100644 +--- a/SRC/sgetv0.f ++++ b/SRC/sgetv0.f +@@ -157,11 +157,11 @@ subroutine sgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj + Real + & rnorm0 +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + c %----------------------% + c | External Subroutines | +@@ -183,6 +183,12 @@ subroutine sgetv0 + c + intrinsic abs, sqrt + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -193,10 +199,13 @@ subroutine sgetv0 + c | random number generator | + c %-----------------------------------% + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++ if (inits) then ++ iseed(1) = 1 ++ iseed(2) = 3 ++ iseed(3) = 5 ++ iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c +diff --git a/SRC/zgetv0.f b/SRC/zgetv0.f +index cc13c3cfb..1fbd50851 100644 +--- a/SRC/zgetv0.f ++++ b/SRC/zgetv0.f +@@ -156,13 +156,13 @@ subroutine zgetv0 + c | Local Scalars & Arrays | + c %------------------------% + c +- logical first, orth ++ logical first, inits, orth + integer idist, iseed(4), iter, msglvl, jj + Double precision + & rnorm0 + Complex*16 + & cnorm +- save first, iseed, iter, msglvl, orth, rnorm0 ++ save first, iseed, inits, iter, msglvl, orth, rnorm0 + c + c %----------------------% + c | External Subroutines | +@@ -180,6 +180,12 @@ subroutine zgetv0 + & zzdotc + external zzdotc, dznrm2, dlapy2 + c ++c %-----------------% ++c | Data Statements | ++c %-----------------% ++c ++ data inits /.true./ ++c + c %-----------------------% + c | Executable Statements | + c %-----------------------% +@@ -190,10 +196,13 @@ subroutine zgetv0 + c | random number generator | + c %-----------------------------------% + c +- iseed(1) = 1 +- iseed(2) = 3 +- iseed(3) = 5 +- iseed(4) = 7 ++ if (inits) then ++ iseed(1) = 1 ++ iseed(2) = 3 ++ iseed(3) = 5 ++ iseed(4) = 7 ++ inits = .false. ++ end if + c + if (ido .eq. 0) then + c -- cgit 1.4.1 From 0dd293b4d9095137c9952e16ca951f887b7e7018 Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Mon, 22 May 2023 11:42:26 +0200 Subject: gnu: Add libc-for-target and glibc/hurd. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch * gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch * gnu/packages/patches/glibc-2.37-versioned-locpath.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/base.scm (glibc/hurd, libc-for-target): New variables. (glibc/hurd-headers): Use glibc/hurd. * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[outputs, source, arguments] (glibc-final)[source]: Use libc-for-target instead of glibc. * gnu/packages/cross-base.scm (cross-libc/deprecated, cross-libc*): Use libc-for-target. This part fixes https://issues.guix.gnu.org/63641#25 * gnu/packages/commencement.scm (%final-inputs): Change to memoized lambda taking "system". * gnu/packages/commencement.scm (canonical-package): Likewise, and update user, passing (%current-system). (make-gcc-toolchain): Update user, passing (%current-system). * gnu/packages/base.scm (%final-inputs): Likewise. * guix/scripts/refresh.scm (options->update-specs): Likewise. * guix/build-system/gnu.scm (standard-packages): Add optional "system" parameter. (lower): Update caller. Co-authored-by: Ludovic Courtès Co-authored-by: Janneke Nieuwenhuizen --- gnu/local.mk | 3 + gnu/packages/base.scm | 39 ++- gnu/packages/commencement.scm | 251 ++++++++++---------- gnu/packages/cross-base.scm | 4 +- .../glibc-2.37-hurd-clock_t_centiseconds.patch | 61 +++++ ...c-2.37-hurd-local-clock_gettime_MONOTONIC.patch | 135 +++++++++++ .../patches/glibc-2.37-versioned-locpath.patch | 264 +++++++++++++++++++++ guix/build-system/gnu.scm | 6 +- guix/scripts/refresh.scm | 3 +- 9 files changed, 634 insertions(+), 132 deletions(-) create mode 100644 gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch create mode 100644 gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch create mode 100644 gnu/packages/patches/glibc-2.37-versioned-locpath.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e9ce4ada54..3481659faa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1260,6 +1260,9 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \ %D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \ %D%/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch \ + %D%/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch \ + %D%/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch \ + %D%/packages/patches/glibc-2.37-versioned-locpath.patch \ %D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \ %D%/packages/patches/glibc-hurd-gettyent.patch \ %D%/packages/patches/glibc-hurd-mach-print.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 38593e4ada..55fe70309c 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -76,6 +76,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (glibc + libc-for-target make-ld-wrapper libiconv-if-needed)) @@ -1420,20 +1421,41 @@ variety of options. It is an alternative to the shell \"type\" built-in command.") (license gpl3+))) ; some files are under GPLv2+ +(define-public glibc/hurd + (package/inherit glibc + (name "glibc-hurd") + (version "2.37") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "0hqsp4dzrjx0iga6jv0magjw26dh82pxlmk8yis5v0d127qyymr2")) + (patches (search-patches "glibc-ldd-powerpc.patch" + "glibc-dl-cache.patch" + "glibc-2.37-versioned-locpath.patch" + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-supported-locales.patch" + "glibc-2.37-hurd-clock_t_centiseconds.patch" + "glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch" + "glibc-hurd-mach-print.patch" + "glibc-hurd-gettyent.patch")))) + (supported-systems %hurd-systems))) + (define-public glibc/hurd-headers - (package (inherit glibc) + (package/inherit glibc/hurd (name "glibc-hurd-headers") (outputs '("out")) (propagated-inputs (list gnumach-headers hurd-headers)) (native-inputs - (modify-inputs (package-native-inputs glibc) + (modify-inputs (package-native-inputs glibc/hurd) (prepend (if (%current-target-system) (let* ((cross-base (resolve-interface '(gnu packages cross-base))) (cross-mig (module-ref cross-base 'cross-mig))) (cross-mig (%current-target-system))) mig)))) (arguments - (substitute-keyword-arguments (package-arguments glibc) + (substitute-keyword-arguments (package-arguments glibc/hurd) ;; We just pass the flags really needed to build the headers. ((#:configure-flags flags) `(list "--enable-add-ons" @@ -1454,6 +1476,15 @@ command.") (delete 'build))))) ; nothing to build (supported-systems %hurd-systems))) +(define* (libc-for-target #:optional + (target (or (%current-target-system) + (%current-system)))) + (match target + ((? target-hurd?) + glibc/hurd) + (_ + glibc))) + (define-public tzdata (package (name "tzdata") @@ -1602,6 +1633,6 @@ package needs iconv ,@(libiconv-if-needed) should be added." "Return the list of \"final inputs\"." ;; Avoid circular dependency by lazily resolving 'commencement'. (let ((iface (resolve-interface '(gnu packages commencement)))) - (module-ref iface '%final-inputs))) + ((module-ref iface '%final-inputs) (%current-system)))) ;;; base.scm ends here diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 669d54099d..9bd0c113c2 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2822,64 +2822,65 @@ memoized as a function of '%current-system'." ("binutils-cross" ,binutils-boot0) ,@(alist-delete "binutils" (%boot0-inputs)))) -(define glibc-final-with-bootstrap-bash +(define/system-dependent glibc-final-with-bootstrap-bash ;; The final libc, "cross-built". If everything went well, the resulting ;; store path has no dependencies. Actually, the really-final libc is ;; built just below; the only difference is that this one uses the ;; bootstrap Bash. - (package - (inherit glibc) - (name "glibc-intermediate") - (outputs (delete "debug" (package-outputs glibc))) - (source (bootstrap-origin (package-source glibc))) - (arguments - `(#:guile ,%bootstrap-guile - #:implicit-inputs? #f - - ,@(substitute-keyword-arguments (package-arguments glibc) - ((#:configure-flags flags) - `(append (list ,(string-append "--host=" (boot-triplet)) - ,(string-append "--build=" - (nix-system->gnu-triplet)) - ,(if (system-hurd?) "--disable-werror" - "")) - ,flags)) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) - ;; Don't clobber include paths with the bootstrap libc. - (unsetenv "C_INCLUDE_PATH") - (unsetenv "CPLUS_INCLUDE_PATH") - - ;; Tell 'libpthread' where to find 'libihash' on Hurd systems. - ,@(if (system-hurd?) - '((substitute* '("sysdeps/mach/Makefile" - "sysdeps/mach/hurd/Makefile") - (("LDLIBS-pthread.so =.*") - (string-append "LDLIBS-pthread.so = " - (assoc-ref %build-inputs "kernel-headers") - "/lib/libihash.a\n")))) - '())))))))) - (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0)))) - (native-inputs - `(("bison" ,bison-boot0) - ("texinfo" ,texinfo-boot0) - ("perl" ,perl-boot0) - ("python" ,python-boot0))) - (inputs - `( ;; The boot inputs. That includes the bootstrap libc. We don't want - ;; it in $CPATH, hence the 'pre-configure' phase above. - ,@(%boot1-inputs) + (let ((libc (libc-for-target))) + (package + (inherit libc) + (name "glibc-intermediate") + (outputs (delete "debug" (package-outputs libc))) + (source (bootstrap-origin (package-source libc))) + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f - ;; A native MiG is needed to build Glibc on Hurd. - ,@(if (system-hurd?) - `(("mig" ,mig-boot0)) - '()) + ,@(substitute-keyword-arguments (package-arguments libc) + ((#:configure-flags flags) + `(append (list ,(string-append "--host=" (boot-triplet)) + ,(string-append "--build=" + (nix-system->gnu-triplet)) + ,(if (system-hurd?) "--disable-werror" + "")) + ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'configure 'pre-configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Don't clobber include paths with the bootstrap libc. + (unsetenv "C_INCLUDE_PATH") + (unsetenv "CPLUS_INCLUDE_PATH") + + ;; Tell 'libpthread' where to find 'libihash' on Hurd systems. + ,@(if (system-hurd?) + '((substitute* '("sysdeps/mach/Makefile" + "sysdeps/mach/hurd/Makefile") + (("LDLIBS-pthread.so =.*") + (string-append "LDLIBS-pthread.so = " + (assoc-ref %build-inputs "kernel-headers") + "/lib/libihash.a\n")))) + '())))))))) + (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0)))) + (native-inputs + `(("bison" ,bison-boot0) + ("texinfo" ,texinfo-boot0) + ("perl" ,perl-boot0) + ("python" ,python-boot0))) + (inputs + `( ;; The boot inputs. That includes the bootstrap libc. We don't want + ;; it in $CPATH, hence the 'pre-configure' phase above. + ,@(%boot1-inputs) + + ;; A native MiG is needed to build Glibc on Hurd. + ,@(if (system-hurd?) + `(("mig" ,mig-boot0)) + '()) - ;; Here, we use the bootstrap Bash, which is not satisfactory - ;; because we don't want to depend on bootstrap tools. - ("static-bash" ,@(assoc-ref (%boot0-inputs) "bash")))))) + ;; Here, we use the bootstrap Bash, which is not satisfactory + ;; because we don't want to depend on bootstrap tools. + ("static-bash" ,@(assoc-ref (%boot0-inputs) "bash"))))))) (define (cross-gcc-wrapper gcc binutils glibc bash) "Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC @@ -2997,39 +2998,39 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (("^PROGRAMS =.*$") "PROGRAMS =\n"))))))))) -(define glibc-final +(define/system-dependent glibc-final ;; The final glibc, which embeds the statically-linked Bash built above. ;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any. - (package/inherit - glibc - (name "glibc") - (source (bootstrap-origin (package-source glibc))) - (inputs `(("static-bash" ,static-bash-for-glibc) - ,@(alist-delete - "static-bash" - (package-inputs glibc-final-with-bootstrap-bash)))) - - ;; This time we need 'msgfmt' to install all the libc.mo files. - (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash) - ("gettext" ,gettext-boot0))) - - (propagated-inputs - (package-propagated-inputs glibc-final-with-bootstrap-bash)) - - ;; The final libc only refers to itself, but the 'debug' output contains - ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great - ;; if 'allowed-references' were per-output. - (arguments - `(#:allowed-references - (,(gexp-input gcc-boot0 "lib") - ,(kernel-headers-boot0) - ,static-bash-for-glibc - ,@(if (system-hurd?) - `(,gnumach-headers-boot0 - ,hurd-headers-boot0) - '()) - ,@(package-outputs glibc-final-with-bootstrap-bash)) - ,@(package-arguments glibc-final-with-bootstrap-bash))))) + (let ((libc (libc-for-target))) + (package/inherit libc + (name "glibc") + (source (bootstrap-origin (package-source libc))) + (inputs `(("static-bash" ,static-bash-for-glibc) + ,@(alist-delete + "static-bash" + (package-inputs glibc-final-with-bootstrap-bash)))) + + ;; This time we need 'msgfmt' to install all the libc.mo files. + (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash) + ("gettext" ,gettext-boot0))) + + (propagated-inputs + (package-propagated-inputs glibc-final-with-bootstrap-bash)) + + ;; The final libc only refers to itself, but the 'debug' output contains + ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great + ;; if 'allowed-references' were per-output. + (arguments + `(#:allowed-references + (,(gexp-input gcc-boot0 "lib") + ,(kernel-headers-boot0) + ,static-bash-for-glibc + ,@(if (system-hurd?) + `(,gnumach-headers-boot0 + ,hurd-headers-boot0) + '()) + ,@(package-outputs glibc-final-with-bootstrap-bash)) + ,@(package-arguments glibc-final-with-bootstrap-bash)))))) (define/system-dependent gcc-boot0-wrapped ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the @@ -3356,45 +3357,49 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (package/inherit sed (native-inputs `(("perl" ,perl-boot0)))))) (define-public %final-inputs - ;; Final derivations used as implicit inputs by 'gnu-build-system'. We - ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are - ;; used for origins that have patches, thereby avoiding circular - ;; dependencies. - (let ((finalize (compose with-boot6 - package-with-bootstrap-guile))) - `(,@(map (match-lambda - ((name package) - (list name (finalize package)))) - `(("tar" ,tar) - ("gzip" ,gzip) - ("bzip2" ,bzip2) - ("file" ,file) - ("diffutils" ,diffutils) - ("patch" ,patch) - ("findutils" ,findutils) - ("gawk" ,gawk))) - ("sed" ,sed-final) - ("grep" ,grep-final) - ("xz" ,xz-final) - ("coreutils" ,coreutils-final) - ("make" ,gnu-make-final) - ("bash" ,bash-final) - ("ld-wrapper" ,ld-wrapper) - ("binutils" ,binutils-final) - ("gcc" ,gcc-final) - ("libc" ,glibc-final) - ("libc:static" ,glibc-final "static") - ("locales" ,glibc-utf8-locales-final)))) + ;; The 'glibc-final' package is not the same depending on what system is + ;; targeted, so this whole list must be parameterized. + (mlambda (system) + ;; Final derivations used as implicit inputs by 'gnu-build-system'. We + ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are + ;; used for origins that have patches, thereby avoiding circular + ;; dependencies. + (let ((finalize (compose with-boot6 + package-with-bootstrap-guile))) + `(,@(map (match-lambda + ((name package) + (list name (finalize package)))) + `(("tar" ,tar) + ("gzip" ,gzip) + ("bzip2" ,bzip2) + ("file" ,file) + ("diffutils" ,diffutils) + ("patch" ,patch) + ("findutils" ,findutils) + ("gawk" ,gawk))) + ("sed" ,sed-final) + ("grep" ,grep-final) + ("xz" ,xz-final) + ("coreutils" ,coreutils-final) + ("make" ,gnu-make-final) + ("bash" ,bash-final) + ("ld-wrapper" ,ld-wrapper) + ("binutils" ,binutils-final) + ("gcc" ,gcc-final) + ("libc" ,glibc-final) + ("libc:static" ,glibc-final "static") + ("locales" ,glibc-utf8-locales-final))))) (define-public canonical-package - (let ((name->package (fold (lambda (input result) - (match input - ((_ package . outputs) - (vhash-cons (package-full-name package) - package result)))) - vlist-null - `(("guile" ,guile-final) - ,@%final-inputs)))) + (let ((name->package (mlambda (system) + (fold (lambda (input result) + (match input + ((_ package . outputs) + (vhash-cons (package-full-name package) + package result)))) + vlist-null + `(("guile" ,guile-final) + ,@(%final-inputs system)))))) (lambda (package) "Return the 'canonical' variant of PACKAGE---i.e., if PACKAGE is one of the implicit inputs of 'gnu-build-system', return that one, otherwise return @@ -3404,7 +3409,8 @@ The goal is to avoid duplication in cases like GUILE-FINAL vs. GUILE-2.2, COREUTILS-FINAL vs. COREUTILS, etc." ;; XXX: This doesn't handle dependencies of the final inputs, such as ;; libunistring, GMP, etc. - (match (vhash-assoc (package-full-name package) name->package) + (match (vhash-assoc (package-full-name package) + (name->package (%current-system))) ((_ . canon) ;; In general we want CANON, except if we're cross-compiling: CANON ;; uses explicit inputs, so it is "anchored" in the bootstrapped @@ -3486,7 +3492,8 @@ is the GNU Compiler Collection.") ;; install everything that we need, and (2) to make sure ld-wrapper comes ;; before Binutils' ld in the user's profile. (inputs `(("gcc" ,gcc) - ("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper"))) + ("ld-wrapper" ,(car (assoc-ref (%final-inputs (%current-system)) + "ld-wrapper"))) ("binutils" ,binutils-final) ("libc" ,libc) ("libc-debug" ,libc "debug") diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index cdf642358d..21d7277e22 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -578,7 +578,7 @@ the base compiler. Use XBINUTILS as the associated cross-Binutils." (define* (cross-libc/deprecated target #:optional - (libc glibc) + (libc (libc-for-target target)) (xgcc (cross-gcc target)) (xbinutils (cross-binutils target)) (xheaders (cross-kernel-headers target))) @@ -591,7 +591,7 @@ the base compiler. Use XBINUTILS as the associated cross-Binutils." (define* (cross-libc* target #:key - (libc glibc) + (libc (libc-for-target target)) (xgcc (cross-gcc target)) (xbinutils (cross-binutils target)) (xheaders (cross-kernel-headers target))) diff --git a/gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch b/gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch new file mode 100644 index 0000000000..944b2fe8df --- /dev/null +++ b/gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch @@ -0,0 +1,61 @@ +Taken from: https://salsa.debian.org/glibc-team/glibc/-/blob/9ce19663f00176f30d6eab29fd14db3e7cd53dcf/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff + +Some applications assume centisecond precision, or at most millisecond precision +(e.g. guile). This is a work-around for them. + +--- + getclktck.c | 5 ++--- + setitimer.c | 2 +- + times.c | 2 +- + 4 files changed, 8 insertions(+), 9 deletions(-) +commit d57f2f9b4bd007846af2fb4217486ea572579010 +Author: Richard Braun +Date: Tue Aug 27 11:35:31 2013 +0200 + + Express CPU time (clock_t of times(2)) in centiseconds + +diff --git a/sysdeps/mach/hurd/getclktck.c b/sysdeps/mach/hurd/getclktck.c +index 69be2cc..5f7d946 100644 +--- a/sysdeps/mach/hurd/getclktck.c ++++ b/sysdeps/mach/hurd/getclktck.c +@@ -18,12 +18,11 @@ + + #include + +-/* Return frequency of `times'. +- Since Mach reports CPU times in microseconds, we always use 1 million. */ ++/* Return frequency of `times'. */ + int + __getclktck (void) + { +- return 1000000; ++ return 100; + } + + /* Before glibc 2.2, the Hurd actually did this differently, so we +diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c +index 39b6b16..4992c89 100644 +--- a/sysdeps/mach/hurd/setitimer.c ++++ b/sysdeps/mach/hurd/setitimer.c +@@ -42,7 +42,7 @@ quantize_timeval (struct timeval *tv) + static time_t quantum = -1; + + if (quantum == -1) +- quantum = 1000000 / __getclktck (); ++ quantum = 100 / __getclktck (); + + tv->tv_usec = ((tv->tv_usec + (quantum - 1)) / quantum) * quantum; + if (tv->tv_usec >= 1000000) +diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c +index 9e13a75..593c33a 100644 +--- a/sysdeps/mach/hurd/times.c ++++ b/sysdeps/mach/hurd/times.c +@@ -29,7 +29,7 @@ + static inline clock_t + clock_from_time_value (const time_value_t *t) + { +- return t->seconds * 1000000 + t->microseconds; ++ return t->seconds * 100 + t->microseconds / 10000; + } + + /* Store the CPU time used by this process and all its diff --git a/gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch b/gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch new file mode 100644 index 0000000000..63e06b8519 --- /dev/null +++ b/gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch @@ -0,0 +1,135 @@ +Taken from: https://salsa.debian.org/glibc-team/glibc/-/blob/9ce19663f00176f30d6eab29fd14db3e7cd53dcf/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff + +Use the realtime clock for the monotonic clock. This is of course not a proper +implementation (which is being done in Mach), but will permit to fix at least +the iceweasel stack. + +vlc however doesn't build when _POSIX_CLOCK_SELECTION is enabled but +_POSIX_TIMERS is not, and they refuse to fix that (see #765578), so disable the +former. + +--- + sysdeps/mach/hurd/bits/posix_opt.h | 2 +- + sysdeps/unix/clock_gettime.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) +Index: glibc-2.27/sysdeps/mach/clock_gettime.c +=================================================================== +--- glibc-2.27.orig/sysdeps/mach/clock_gettime.c ++++ glibc-2.27/sysdeps/mach/clock_gettime.c +@@ -31,6 +31,10 @@ __clock_gettime (clockid_t clock_id, str + switch (clock_id) { + + case CLOCK_REALTIME: ++ case CLOCK_MONOTONIC: ++ case CLOCK_MONOTONIC_RAW: ++ case CLOCK_REALTIME_COARSE: ++ case CLOCK_MONOTONIC_COARSE: + { + /* __host_get_time can only fail if passed an invalid host_t. + __mach_host_self could theoretically fail (producing an +Index: glibc-2.27/rt/timer_create.c +=================================================================== +--- glibc-2.27.orig/rt/timer_create.c ++++ glibc-2.27/rt/timer_create.c +@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct + return -1; + } + +- if (clock_id != CLOCK_REALTIME) ++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) + { + __set_errno (EINVAL); + return -1; +Index: glibc-2.27/sysdeps/mach/hurd/bits/posix_opt.h +=================================================================== +--- glibc-2.27.orig/sysdeps/mach/hurd/bits/posix_opt.h ++++ glibc-2.27/sysdeps/mach/hurd/bits/posix_opt.h +@@ -163,10 +163,10 @@ + #define _POSIX_THREAD_PROCESS_SHARED -1 + + /* The monotonic clock might be available. */ +-#define _POSIX_MONOTONIC_CLOCK 0 ++#define _POSIX_MONOTONIC_CLOCK 200809L + +-/* The clock selection interfaces are available. */ +-#define _POSIX_CLOCK_SELECTION 200809L ++/* The clock selection interfaces are not really available yet. */ ++#define _POSIX_CLOCK_SELECTION -1 + + /* Advisory information interfaces could be available in future. */ + #define _POSIX_ADVISORY_INFO 0 +Index: glibc-upstream/sysdeps/posix/clock_getres.c +=================================================================== +--- glibc-upstream.orig/sysdeps/posix/clock_getres.c ++++ glibc-upstream/sysdeps/posix/clock_getres.c +@@ -52,6 +52,10 @@ __clock_getres (clockid_t clock_id, stru + switch (clock_id) + { + case CLOCK_REALTIME: ++ case CLOCK_MONOTONIC: ++ case CLOCK_MONOTONIC_RAW: ++ case CLOCK_REALTIME_COARSE: ++ case CLOCK_MONOTONIC_COARSE: + retval = realtime_getres (res); + break; + +--- ./sysdeps/mach/clock_nanosleep.c.original 2020-07-21 00:31:35.226113142 +0200 ++++ ./sysdeps/mach/clock_nanosleep.c 2020-07-21 00:31:49.026185761 +0200 +@@ -62,7 +62,7 @@ + __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, + struct timespec *rem) + { +- if (clock_id != CLOCK_REALTIME ++ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) + || !valid_nanoseconds (req->tv_nsec) + || (flags != 0 && flags != TIMER_ABSTIME)) + return EINVAL; +Index: glibc-2.32/hurd/hurdlock.c +=================================================================== +--- glibc-2.32.orig/hurd/hurdlock.c ++++ glibc-2.32/hurd/hurdlock.c +@@ -47,7 +47,7 @@ int + __lll_abstimed_wait (void *ptr, int val, + const struct timespec *tsp, int flags, int clk) + { +- if (clk != CLOCK_REALTIME) ++ if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC) + return EINVAL; + + int mlsec = compute_reltime (tsp, clk); +@@ -59,7 +59,7 @@ int + __lll_abstimed_wait_intr (void *ptr, int val, + const struct timespec *tsp, int flags, int clk) + { +- if (clk != CLOCK_REALTIME) ++ if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC) + return EINVAL; + + int mlsec = compute_reltime (tsp, clk); +@@ -79,7 +79,7 @@ int + __lll_abstimed_xwait (void *ptr, int lo, int hi, + const struct timespec *tsp, int flags, int clk) + { +- if (clk != CLOCK_REALTIME) ++ if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC) + return EINVAL; + + int mlsec = compute_reltime (tsp, clk); +@@ -91,7 +91,7 @@ int + __lll_abstimed_lock (void *ptr, + const struct timespec *tsp, int flags, int clk) + { +- if (clk != CLOCK_REALTIME) ++ if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC) + return EINVAL; + + if (__lll_trylock (ptr) == 0) +@@ -177,7 +177,7 @@ __lll_robust_abstimed_lock (void *ptr, + int wait_time = 25; + unsigned int val; + +- if (clk != CLOCK_REALTIME) ++ if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC) + return EINVAL; + + while (1) diff --git a/gnu/packages/patches/glibc-2.37-versioned-locpath.patch b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch new file mode 100644 index 0000000000..0acaeb1e46 --- /dev/null +++ b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch @@ -0,0 +1,264 @@ +From d73ba2caa10b8e9f51ff4239cc32eeb4e0de4279 Mon Sep 17 00:00:00 2001 +Message-Id: +From: Josselin Poiret +Date: Sat, 13 May 2023 14:10:43 +0200 +Subject: [PATCH] Add versioned locpath + +From: Josselin Poiret + +The format of locale data can be incompatible between libc versions, and +loading incompatible data can lead to 'setlocale' returning EINVAL at best +or triggering an assertion failure at worst. See +https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00717.html +for background information. + +To address that, this patch changes libc to honor a new 'GUIX_LOCPATH' +variable, and to look for locale data in version-specific sub-directories of +that variable. So, if GUIX_LOCPATH=/foo:/bar, locale data is searched for in +/foo/X.Y and /bar/X.Y, where X.Y is the libc version number. + +That way, a single 'GUIX_LOCPATH' setting can work even if different libc +versions coexist on the system. + + +This patch is adapted from the 2.35 patch. + +--- + locale/newlocale.c | 15 ++-------- + locale/setlocale.c | 68 +++++++++++++++++++++++++++++++++++++------- + string/Makefile | 1 + + string/argz-suffix.c | 56 ++++++++++++++++++++++++++++++++++++ + string/argz.h | 10 +++++++ + 5 files changed, 127 insertions(+), 23 deletions(-) + create mode 100644 string/argz-suffix.c + +diff --git a/locale/newlocale.c b/locale/newlocale.c +index 108d2428bf..6218e0fa77 100644 +--- a/locale/newlocale.c ++++ b/locale/newlocale.c +@@ -29,6 +29,7 @@ + /* Lock for protecting global data. */ + __libc_rwlock_define (extern , __libc_setlocale_lock attribute_hidden) + ++extern error_t compute_locale_search_path (char **, size_t *); + + /* Use this when we come along an error. */ + #define ERROR_RETURN \ +@@ -47,7 +48,6 @@ __newlocale (int category_mask, const char *locale, locale_t base) + locale_t result_ptr; + char *locale_path; + size_t locale_path_len; +- const char *locpath_var; + int cnt; + size_t names_len; + +@@ -101,17 +101,8 @@ __newlocale (int category_mask, const char *locale, locale_t base) + locale_path = NULL; + locale_path_len = 0; + +- locpath_var = getenv ("LOCPATH"); +- if (locpath_var != NULL && locpath_var[0] != '\0') +- { +- if (__argz_create_sep (locpath_var, ':', +- &locale_path, &locale_path_len) != 0) +- return NULL; +- +- if (__argz_add_sep (&locale_path, &locale_path_len, +- _nl_default_locale_path, ':') != 0) +- return NULL; +- } ++ if (compute_locale_search_path (&locale_path, &locale_path_len) != 0) ++ return NULL; + + /* Get the names for the locales we are interested in. We either + allow a composite name or a single name. */ +diff --git a/locale/setlocale.c b/locale/setlocale.c +index dd73fa4248..d8eb799384 100644 +--- a/locale/setlocale.c ++++ b/locale/setlocale.c +@@ -213,12 +213,65 @@ setdata (int category, struct __locale_data *data) + } + } + ++/* Return in *LOCALE_PATH and *LOCALE_PATH_LEN the locale data search path as ++ a colon-separated list. Return ENOMEN on error, zero otherwise. */ ++error_t ++compute_locale_search_path (char **locale_path, size_t *locale_path_len) ++{ ++ char* guix_locpath_var = getenv ("GUIX_LOCPATH"); ++ char *locpath_var = getenv ("LOCPATH"); ++ ++ if (guix_locpath_var != NULL && guix_locpath_var[0] != '\0') ++ { ++ /* Entries in 'GUIX_LOCPATH' take precedence over 'LOCPATH'. These ++ entries are systematically prefixed with "/X.Y" where "X.Y" is the ++ libc version. */ ++ if (__argz_create_sep (guix_locpath_var, ':', ++ locale_path, locale_path_len) != 0 ++ || __argz_suffix_entries (locale_path, locale_path_len, ++ "/" VERSION) != 0) ++ goto bail_out; ++ } ++ ++ if (locpath_var != NULL && locpath_var[0] != '\0') ++ { ++ char *reg_locale_path = NULL; ++ size_t reg_locale_path_len = 0; ++ ++ if (__argz_create_sep (locpath_var, ':', ++ ®_locale_path, ®_locale_path_len) != 0) ++ goto bail_out; ++ ++ if (__argz_append (locale_path, locale_path_len, ++ reg_locale_path, reg_locale_path_len) != 0) ++ goto bail_out; ++ ++ free (reg_locale_path); ++ } ++ ++ if (*locale_path != NULL) ++ { ++ /* Append the system default locale directory. */ ++ if (__argz_add_sep (locale_path, locale_path_len, ++ _nl_default_locale_path, ':') != 0) ++ goto bail_out; ++ } ++ ++ return 0; ++ ++ bail_out: ++ free (*locale_path); ++ *locale_path = NULL; ++ *locale_path_len = 0; ++ ++ return ENOMEM; ++} ++ + char * + setlocale (int category, const char *locale) + { + char *locale_path; + size_t locale_path_len; +- const char *locpath_var; + char *composite; + + /* Sanity check for CATEGORY argument. */ +@@ -249,17 +302,10 @@ setlocale (int category, const char *locale) + locale_path = NULL; + locale_path_len = 0; + +- locpath_var = getenv ("LOCPATH"); +- if (locpath_var != NULL && locpath_var[0] != '\0') ++ if (compute_locale_search_path (&locale_path, &locale_path_len) != 0) + { +- if (__argz_create_sep (locpath_var, ':', +- &locale_path, &locale_path_len) != 0 +- || __argz_add_sep (&locale_path, &locale_path_len, +- _nl_default_locale_path, ':') != 0) +- { +- __libc_rwlock_unlock (__libc_setlocale_lock); +- return NULL; +- } ++ __libc_rwlock_unlock (__libc_setlocale_lock); ++ return NULL; + } + + if (category == LC_ALL) +diff --git a/string/Makefile b/string/Makefile +index 3eced0d027..a7e68729ad 100644 +--- a/string/Makefile ++++ b/string/Makefile +@@ -51,6 +51,7 @@ routines := \ + argz-next \ + argz-replace \ + argz-stringify \ ++ argz-suffix \ + basename \ + bcopy \ + bzero \ +diff --git a/string/argz-suffix.c b/string/argz-suffix.c +new file mode 100644 +index 0000000000..505b0f248c +--- /dev/null ++++ b/string/argz-suffix.c +@@ -0,0 +1,56 @@ ++/* Copyright (C) 2015 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Ludovic Courtès . ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++ ++error_t ++__argz_suffix_entries (char **argz, size_t *argz_len, const char *suffix) ++ ++{ ++ size_t suffix_len = strlen (suffix); ++ size_t count = __argz_count (*argz, *argz_len); ++ size_t new_argz_len = *argz_len + count * suffix_len; ++ char *new_argz = malloc (new_argz_len); ++ ++ if (new_argz) ++ { ++ char *p = new_argz, *entry; ++ ++ for (entry = *argz; ++ entry != NULL; ++ entry = argz_next (*argz, *argz_len, entry)) ++ { ++ p = stpcpy (p, entry); ++ p = stpcpy (p, suffix); ++ p++; ++ } ++ ++ free (*argz); ++ *argz = new_argz; ++ *argz_len = new_argz_len; ++ ++ return 0; ++ } ++ else ++ return ENOMEM; ++} ++weak_alias (__argz_suffix_entries, argz_suffix_entries) +diff --git a/string/argz.h b/string/argz.h +index cbc588a8e6..bc6e484c9d 100644 +--- a/string/argz.h ++++ b/string/argz.h +@@ -108,6 +108,16 @@ extern error_t argz_replace (char **__restrict __argz, + const char *__restrict __str, + const char *__restrict __with, + unsigned int *__restrict __replace_count); ++ ++/* Suffix each entry of ARGZ & ARGZ_LEN with SUFFIX. Return 0 on success, ++ and ENOMEN if memory cannot be allocated. */ ++extern error_t __argz_suffix_entries (char **__restrict __argz, ++ size_t *__restrict __argz_len, ++ const char *__restrict __suffix); ++extern error_t argz_suffix_entries (char **__restrict __argz, ++ size_t *__restrict __argz_len, ++ const char *__restrict __suffix); ++ + + /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there + are no more. If entry is NULL, then the first entry is returned. This +-- +2.40.1 + diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 3308302472..c1aa187c42 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -266,13 +266,13 @@ listed in REFS." p)) -(define (standard-packages) +(define* (standard-packages #:optional (system (%current-system))) "Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of standard packages used as implicit inputs of the GNU build system." ;; Resolve (gnu packages commencement) lazily to hide circular dependency. (let ((distro (resolve-module '(gnu packages commencement)))) - (module-ref distro '%final-inputs))) + ((module-ref distro '%final-inputs) system))) (define* (lower name #:key source inputs native-inputs outputs target @@ -303,7 +303,7 @@ standard packages used as implicit inputs of the GNU build system." (standard-cross-packages target 'host) '()) ,@(if implicit-inputs? - (standard-packages) + (standard-packages system) '()))) (host-inputs (if target inputs '())) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index f5cb18af22..719883d4a9 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -228,7 +228,8 @@ options like '--recursive'." (let* ((input->package (match-lambda ((name (? package? package) _ ...) package) (_ #f))) - (final-inputs (map input->package %final-inputs)) + (final-inputs (map input->package + (%final-inputs (%current-system)))) (core (append final-inputs (append-map (compose (cut filter-map input->package <>) package-transitive-inputs) -- cgit 1.4.1 From 999a6ac0cfd9339e138007ed9e4e544a55e92e3e Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Mon, 22 May 2023 11:04:17 +0200 Subject: gnu: mig: Update to 1.8+git20230520. * gnu/packages/hurd.scm (mig)[source]: Update to 1.8+git20230520. * gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch: Drop patch. * gnu/local.mk (dist_patch_DATA): Unregister it. --- gnu/local.mk | 1 - gnu/packages/hurd.scm | 20 ++++++-------- ...missing-const_mach_port_name_array_t-type.patch | 32 ---------------------- 3 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3481659faa..1ff2b13c5d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1287,7 +1287,6 @@ dist_patch_DATA = \ %D%/packages/patches/gnome-settings-daemon-gc.patch \ %D%/packages/patches/gnome-session-support-elogind.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ - %D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 6dc14f25a0..9895955ea2 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -88,24 +88,20 @@ (define-public mig (package (name "mig") - (version "1.8+git20220827") + (version "1.8+git20230520") (source (origin - (method url-fetch) - ;; XXX: Version 2.35 of glibc can only be built with an - ;; unreleased version of MiG: - ;; . - ;; It cannot be fetched from Git though, as the extra dependency - ;; on Autoconf/Automake would complicate bootstrapping. - (uri (string-append "mirror://gnu/guix/mirror/mig-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/hurd/mig.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "163d37s9lscd6zxyfng421m9nl857464mgjj90xsrcl5ykbng5p2")) - (patches (search-patches "mig-cpu.h-generation.patch")))) + "10r0fdjqjzqsy6ajb21rifvhw0wpjvrw6a1zdyliqlzqny5k0qlz")))) (build-system gnu-build-system) ;; Flex is needed both at build and run time. (inputs (list gnumach-headers flex)) - (native-inputs (list flex bison)) + (native-inputs (list autoconf automake flex bison)) (arguments (list #:tests? #f #:phases diff --git a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch deleted file mode 100644 index 73c99ade23..0000000000 --- a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 17335d49a3c9e866a81abc051420d73a59d669bf Mon Sep 17 00:00:00 2001 -Message-Id: <17335d49a3c9e866a81abc051420d73a59d669bf.1678745341.git.dev@jpoiret.xyz> -From: Josselin Poiret -Date: Sun, 28 Aug 2022 01:17:34 +0200 -Subject: [PATCH] Add missing const_mach_port_name_array_t type - -From: Samuel Thibault - ---- - include/mach/port.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/mach/port.h b/include/mach/port.h -index 3c226f6c..d25eb0b4 100644 ---- a/include/mach/port.h -+++ b/include/mach/port.h -@@ -43,6 +43,7 @@ - */ - typedef unsigned int mach_port_name_t; - typedef mach_port_name_t *mach_port_name_array_t; -+typedef const mach_port_name_t *const_mach_port_name_array_t; - - /* - * A port is represented - -base-commit: 3e1702a65fb3caf50c8d09a1b383b0056a5efc82 -prerequisite-patch-id: 4688654277aef235ccd1797a72dce27d52b04616 -prerequisite-patch-id: 8f1e7dd6429c15cc8ed1d411dba0a75b6e745236 -prerequisite-patch-id: 605553ee086473ad9bc24e59c91d49a12dbf8631 --- -2.39.1 - -- cgit 1.4.1 From 5981e99f0a643e30e7af0f0a07f0034d363a843f Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Mon, 15 May 2023 11:38:50 +0200 Subject: gnu: hurd: Add rumpkernel. * gnu/packages/patches/hurd-fix-rumpdisk-build.patch, gnu/packages/patches/hurd-rumpdisk-no-hd.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/hurd.scm (hurd): Use them. (hurd)[inputs]: Replace util-linux with util-linux:static, add parted, rumpkernel. [arguments]: Rename `prepare-dde' phase to 'prepare-addons'. Add "rumpdisk" directory. Add --enable-static-progs=... option to #:configure-flags, and remove --without-parted. Signed-off-by: Josselin Poiret --- gnu/local.mk | 2 ++ gnu/packages/hurd.scm | 16 ++++++--- gnu/packages/patches/hurd-fix-rumpdisk-build.patch | 41 ++++++++++++++++++++++ gnu/packages/patches/hurd-rumpdisk-no-hd.patch | 26 ++++++++++++++ 4 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/hurd-fix-rumpdisk-build.patch create mode 100644 gnu/packages/patches/hurd-rumpdisk-no-hd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1ff2b13c5d..cf085c9c38 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1366,6 +1366,8 @@ dist_patch_DATA = \ %D%/packages/patches/hubbub-maybe-uninitialized.patch \ %D%/packages/patches/hueplusplus-mbedtls.patch \ %D%/packages/patches/hurd-add-without-rump-configure-option.patch \ + %D%/packages/patches/hurd-fix-rumpdisk-build.patch \ + %D%/packages/patches/hurd-rumpdisk-no-hd.patch \ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch \ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch \ %D%/packages/patches/hwloc-1-test-btrfs.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index a8f752aa7e..419d12939f 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) + #:use-module (gnu packages disk) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) #:use-module (gnu packages gnupg) @@ -312,12 +313,15 @@ Hurd-minimal package which are needed for both glibc and GCC.") (define-public hurd (package (name "hurd") - (source (package-source hurd-headers)) + (source (origin + (inherit (package-source hurd-headers)) + (patches (search-patches "hurd-fix-rumpdisk-build.patch" + "hurd-rumpdisk-no-hd.patch")))) (version (package-version hurd-headers)) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'prepare-dde + (add-after 'unpack 'prepare-addons (lambda* (#:key native-inputs inputs #:allow-other-keys) ;; First we import the things we want from dde. (for-each make-file-writable (find-files ".")) @@ -331,7 +335,7 @@ Hurd-minimal package which are needed for both glibc and GCC.") ;; Makefile. libdde_linux26 is built later in its own phase. (substitute* "Makefile" (("libbpf ") - "libbpf libmachdevdde libddekit")))) + "libbpf libmachdevdde libddekit rumpdisk")))) (add-after 'unpack 'find-tirpc (lambda* (#:key inputs #:allow-other-keys) (for-each (lambda (var) @@ -494,10 +498,10 @@ exec ${system}/rc \"$@\" #:configure-flags ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + "--enable-static-progs=ext2fs,iso9660fs,rumpdisk,pci-arbiter,acpi" "--disable-ncursesw" "--without-libbz2" "--without-libz" - "--without-parted" ;; This is needed to pass the configure check for ;; clnt_create "ac_func_search_save_LIBS=-ltirpc" @@ -518,7 +522,9 @@ exec ${system}/rc \"$@\" ("coreutils" ,coreutils) ("sed" ,sed) ("grep" ,grep) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "static") ;libuuid.a, for parted + ("parted" ,parted) ;for rumpdisk + ("rumpkernel" ,rumpkernel))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) diff --git a/gnu/packages/patches/hurd-fix-rumpdisk-build.patch b/gnu/packages/patches/hurd-fix-rumpdisk-build.patch new file mode 100644 index 0000000000..4ecd5ed0ee --- /dev/null +++ b/gnu/packages/patches/hurd-fix-rumpdisk-build.patch @@ -0,0 +1,41 @@ +Upstream status: taken from upstream. + +From a2b0f721d077fdc5c9decb21b975b58fb51a3e8f Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Mon, 22 May 2023 19:21:47 +0200 +Subject: [PATCH] rumpdisk: Do not assume FHS /usr/lib, fixes Guix cross-build. + +--- + rumpdisk/Makefile | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/rumpdisk/Makefile b/rumpdisk/Makefile +index 60a209b3..b59aaf9a 100644 +--- a/rumpdisk/Makefile ++++ b/rumpdisk/Makefile +@@ -1,5 +1,5 @@ + # +-# Copyright (C) 2019 Free Software Foundation, Inc. ++# Copyright (C) 2019, 2023 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -15,7 +15,6 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +-RUMPPATH=/usr/lib + RUMPLIBS=rump rumpuser rumpdev rumpdev_disk rumpdev_pci rumpvfs rumpdev_ahcisata rumpdev_piixide rumpdev_ata + RUMPEXTRA=rumpdev_scsipi + +@@ -38,6 +37,6 @@ target = rumpdisk + OBJS = $(SRCS:.c=.o) + HURDLIBS = machdev ports trivfs shouldbeinlibc iohelp ihash fshelp + LDLIBS += -lpthread -lpciaccess -ldl +-LDLIBS += -Wl,--whole-archive $(RUMPLIBS:%=$(RUMPPATH)/lib%_pic.a) -Wl,--no-whole-archive $(RUMPEXTRA:%=$(RUMPPATH)/lib%_pic.a) ++LDLIBS += -Wl,--whole-archive $(RUMPLIBS:%=-l%_pic) -Wl,--no-whole-archive $(RUMPEXTRA:%=-l%_pic) + + include ../Makeconf +-- +2.40.1 + diff --git a/gnu/packages/patches/hurd-rumpdisk-no-hd.patch b/gnu/packages/patches/hurd-rumpdisk-no-hd.patch new file mode 100644 index 0000000000..4e5d41917d --- /dev/null +++ b/gnu/packages/patches/hurd-rumpdisk-no-hd.patch @@ -0,0 +1,26 @@ +This avoids rumpdisk crash when booting without "noide". + +Upstream status: Taken from Debian Salsa package git + + https://salsa.debian.org/hurd-team/hurd/-/blob/f40ff84260b5a98bea949013415a1c92c127a43e/debian/patches/rumpdisk-no-hd + +Index: hurd-debian/rumpdisk/block-rump.c +=================================================================== +--- hurd-debian.orig/rumpdisk/block-rump.c ++++ hurd-debian/rumpdisk/block-rump.c +@@ -143,7 +143,6 @@ rumpdisk_device_init (void) + { + device_t device; + +-#if 0 + if (! device_open (device_master, D_READ, "hd0", &device) + || ! device_open (device_master, D_READ, "hd1", &device) + || ! device_open (device_master, D_READ, "hd3", &device) +@@ -154,7 +153,6 @@ rumpdisk_device_init (void) + disabled = 1; + return; + } +-#endif + + if (! device_open (device_master, D_READ, "sd0", &device) + || ! device_open (device_master, D_READ, "sd1", &device) -- cgit 1.4.1 From bbfb41ed9dff845e12ebd597026729f637903ac4 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Fri, 19 May 2023 14:03:47 +0200 Subject: gnu: gnumach: Support "noide" argument. * gnu/packages/patches/gnumach-support-noide.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/hurd.scm (gnumach-headers): Use it. * doc/guix.texi (Bootloader Configuration): Document it. Signed-off-by: Josselin Poiret --- doc/guix.texi | 24 ++++++++++++++++++++++- gnu/local.mk | 1 + gnu/packages/hurd.scm | 6 ++++++ gnu/packages/patches/gnumach-support-noide.patch | 25 ++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gnumach-support-noide.patch (limited to 'gnu/packages/patches') diff --git a/doc/guix.texi b/doc/guix.texi index 0cdc528c1c..8e4508b237 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -40078,7 +40078,29 @@ For example: @item @code{multiboot-arguments} (default: @code{'()}) The list of extra command-line arguments for the multiboot-kernel. -@item @code{multiboot-modules} (default: @code{'()}) +For example, when running in QEMU it can be useful to use a text-based +console (use options @option{--nographic} @option{--serial mon:stdio}): + +@lisp +'("console=com0") +@end lisp + +To use the new and still experimental +@uref{https://darnassus.sceen.net/~hurd-web/rump_kernel/, rumpdisk +user-level disk driver} instead of GNU@tie{}Mach's in-kernel IDE driver, +set @code{kernel-arguments} to: + +@lisp +'("noide") +@end lisp + +Of course, these options can be combined: + +@lisp +'("console=com0" "noide") +@end lisp + ++@item @code{multiboot-modules} (default: @code{'()}) The list of commands for loading Multiboot modules. For example: @lisp diff --git a/gnu/local.mk b/gnu/local.mk index cf085c9c38..30dd32fdce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1287,6 +1287,7 @@ dist_patch_DATA = \ %D%/packages/patches/gnome-settings-daemon-gc.patch \ %D%/packages/patches/gnome-session-support-elogind.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ + %D%/packages/patches/gnumach-support-noide.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 419d12939f..3a9797009b 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -253,6 +253,12 @@ Hurd-minimal package which are needed for both glibc and GCC.") (package (inherit gnumach-headers) (name "gnumach") + (source (origin + (inherit (package-source gnumach-headers)) + (patches + (append + (search-patches "gnumach-support-noide.patch") + (origin-patches (package-source gnumach-headers)))))) (arguments (substitute-keyword-arguments (package-arguments gnumach-headers) ((#:make-flags flags ''()) diff --git a/gnu/packages/patches/gnumach-support-noide.patch b/gnu/packages/patches/gnumach-support-noide.patch new file mode 100644 index 0000000000..723d4bcac4 --- /dev/null +++ b/gnu/packages/patches/gnumach-support-noide.patch @@ -0,0 +1,25 @@ +Upstream status: Taken from Debian/upsream. + + https://salsa.debian.org/hurd-team/gnumach/-/blob/master/debian/patches/90_noide.patch + +This supports using `noide' on the gnumach command line, disabling +gnumach IDE support and thus forcing use of rumdisk. + +--- + linux/dev/glue/block.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/linux/dev/glue/block.c ++++ b/linux/dev/glue/block.c +@@ -207,7 +207,10 @@ int + blk_dev_init () + { + #ifdef CONFIG_BLK_DEV_IDE +- ide_init (); ++ extern char *kernel_cmdline; ++ if (strncmp(kernel_cmdline, "noide", 5) && ++ !strstr(kernel_cmdline, " noide")) ++ ide_init (); + #endif + #ifdef CONFIG_BLK_DEV_FD + floppy_init (); -- cgit 1.4.1 From 37256c02a2b2b54378b19a31765e1e42aa3ff514 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Thu, 25 May 2023 07:25:26 +0200 Subject: gnu: netdde: Resurrect and update to 2.6.32.65-2-e67c284ac1. * gnu/packages/patches/netdde-build-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/hurd.scm (netdde)[source]: Update to e67c284ac113d939b10b4578334f27dab29d5b08 and use it. [inputs]: Add zlib:static. [arguments]: Remove #true from build phases. In 'build' phase, remove obsolete CFLAGS, and also build static version. In 'install' phase, install them in /hurd. There is no check target, so set #:tests? to #false. Signed-off-by: Josselin Poiret --- gnu/local.mk | 1 + gnu/packages/hurd.scm | 40 ++++++++++++++++------------- gnu/packages/patches/netdde-build-fix.patch | 28 ++++++++++++++++++++ 3 files changed, 51 insertions(+), 18 deletions(-) create mode 100644 gnu/packages/patches/netdde-build-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 30dd32fdce..53f59a830d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1618,6 +1618,7 @@ dist_patch_DATA = \ %D%/packages/patches/ncompress-fix-softlinks.patch \ %D%/packages/patches/ncftp-reproducible.patch \ %D%/packages/patches/netcdf-date-time.patch \ + %D%/packages/patches/netdde-build-fix.patch \ %D%/packages/patches/netpbm-CVE-2017-2586.patch \ %D%/packages/patches/netpbm-CVE-2017-2587.patch \ %D%/packages/patches/netsurf-message-timestamp.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 3a9797009b..5072b7de2b 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -553,8 +553,8 @@ implementing them.") (license gpl2+))) (define-public netdde - (let ((commit "4a1016f130b6f2065d3f088325e5fb0b2997ae12") - (revision "1")) + (let ((commit "e67c284ac113d939b10b4578334f27dab29d5b08") + (revision "2")) (package (name "netdde") ;; The version prefix corresponds to the version of Linux from which the @@ -565,20 +565,19 @@ implementing them.") (uri (git-reference (url "https://git.savannah.gnu.org/git/hurd/incubator.git") (commit commit))) + (patches (list (search-patch "netdde-build-fix.patch"))) (sha256 (base32 - "1njv9dszq4lj05yq4v9j5v247hfghpzvvz4hzy0khjjr35mw7hr8")) + "0vnkls7sr7srzib5mnw6gybzl5qa8c5a4zf3h08w6gdr7zqbndh0")) (file-name (git-file-name name commit)))) (build-system gnu-build-system) (arguments - `(#:make-flags + `(#:tests? #f ;no "check" target + #:make-flags (list (string-append "SHELL=" (search-input-file %build-inputs "/bin/bash")) "PKGDIR=libdde_linux26" - ,@(if (%current-target-system) - (list "CC=i586-pc-gnu-gcc" - "LINK_PROGRAM=i586-pc-gnu-gcc") - (list "CC=gcc"))) + (string-append "CC=" ,(cc-for-target))) #:configure-flags ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")) #:phases @@ -594,8 +593,7 @@ implementing them.") (string-append dde "/" dir ) dir)) '("libdde_linux26" "libddekit"))) (substitute* "libdde_linux26/mk/rel2abs.sh" - (("/bin/bash") (which "bash"))) - #t)) + (("/bin/bash") (which "bash"))))) (add-after 'patch-generated-file-shebangs 'build-libdde-linux26 (lambda* (#:key make-flags #:allow-other-keys) (with-directory-excursion "libdde_linux26" @@ -606,17 +604,23 @@ implementing them.") (apply invoke "make" "convert" make-flags))) (replace 'build (lambda* (#:key make-flags #:allow-other-keys) - ;; no-common can be dropped with GCC 10+ where this is the - ;; default. - (apply invoke "make" "CFLAGS=-fno-common" make-flags))) + (apply invoke "make" + ,(string-append "LINK_PROGRAM=" (cc-for-target)) + make-flags) + ;; This hack to build netdde.static was found in + ;; https://salsa.debian.org/hurd-team/netdde/-/blob/b539b2ad7a171371f140c3da58cce33f1a91ac12/debian/rules + (delete-file "Makefile.inc") + (apply invoke "make" + ,(string-append "LINK_PROGRAM=" (cc-for-target) " -static") + "TARGET=netdde.static" + make-flags))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (install-file "netdde" - (string-append (assoc-ref outputs "out") - "/bin")) - #t))))) + (let ((hurd (string-append (assoc-ref outputs "out") "/hurd"))) + (install-file "netdde" hurd) + (install-file "netdde.static" hurd))))))) (inputs - (list hurd libpciaccess-0.17 zlib)) + (list hurd libpciaccess-0.17 zlib `(,zlib "static"))) (native-inputs `(("coreutils" ,coreutils) ("gawk" ,gawk) diff --git a/gnu/packages/patches/netdde-build-fix.patch b/gnu/packages/patches/netdde-build-fix.patch new file mode 100644 index 0000000000..f7f0fc35a9 --- /dev/null +++ b/gnu/packages/patches/netdde-build-fix.patch @@ -0,0 +1,28 @@ +Upstream status: Presented upstream. + + https://lists.gnu.org/archive/html/bug-hurd/2023-05//msg00449.html + +From b0a7e4f2706bea8d1c80d5af7a095941f9635033 Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Fri, 26 May 2023 17:39:17 +0200 +Subject: [PATCH] Update for .../rumpdisk: Fix race condition in bootstrap + +--- + machdev.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/machdev.c b/machdev.c +index dda5eb8ba..1a6811072 100644 +--- a/machdev.c ++++ b/machdev.c +@@ -18,5 +18,6 @@ void machdev_run1 (void *arg) + + void machdev_run2(void) + { +- machdev_trivfs_server(bootstrap); ++ machdev_trivfs_server_startup(bootstrap); ++ machdev_trivfs_server_loop(NULL); + } +-- +2.40.1 + -- cgit 1.4.1 From ddbfef2e956effdb640712a1829206f2b496f6c2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 13 Jul 2023 20:49:33 +0300 Subject: gnu: zig-0.9: Fix building on riscv64-linux. * gnu/packages/zig.scm (zig-0.9)[source]: Add patch. [arguments]: Skip tests when building for riscv64-linux. When building for riscv64-linux add a phase to adjust the tests. * gnu/packages/patches/zig-0.9-riscv-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/patches/zig-0.9-riscv-support.patch | 47 ++++++++++++++++++++++++ gnu/packages/zig.scm | 22 ++++++++++- 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/zig-0.9-riscv-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 53f59a830d..71a13462ab 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2109,6 +2109,7 @@ dist_patch_DATA = \ %D%/packages/patches/xygrib-fix-finding-data.patch \ %D%/packages/patches/xygrib-newer-proj.patch \ %D%/packages/patches/yggdrasil-extra-config.patch \ + %D%/packages/patches/zig-0.9-riscv-support.patch \ %D%/packages/patches/zig-do-not-link-against-librt.patch \ %D%/packages/patches/zig-use-system-paths.patch \ %D%/packages/patches/zsh-egrep-failing-test.patch diff --git a/gnu/packages/patches/zig-0.9-riscv-support.patch b/gnu/packages/patches/zig-0.9-riscv-support.patch new file mode 100644 index 0000000000..372a68ea02 --- /dev/null +++ b/gnu/packages/patches/zig-0.9-riscv-support.patch @@ -0,0 +1,47 @@ +https://github.com/ziglang/zig/commit/ca3c4ff2d0afcdc8fe86e7e7b41a967c88779729 +From: Shupei Fan +zig0: properly set llvm_cpu_names and llvm_cpu_features for riscv + +Bug: https://bugs.gentoo.org/851732 + +--- a/src/stage1/zig0.cpp ++++ b/src/stage1/zig0.cpp +@@ -160,6 +160,17 @@ static void get_native_target(ZigTarget *target) { + } + } + ++static const char* get_baseline_llvm_cpu_name(ZigLLVM_ArchType arch) { ++ return ""; ++} ++ ++static const char* get_baseline_llvm_cpu_features(ZigLLVM_ArchType arch) { ++ switch (arch) { ++ case ZigLLVM_riscv64: return "+a,+c,+d,+m"; ++ default: return ""; ++ } ++} ++ + static Error target_parse_triple(struct ZigTarget *target, const char *zig_triple, const char *mcpu, + const char *dynamic_linker) + { +@@ -178,8 +189,8 @@ static Error target_parse_triple(struct ZigTarget *target, const char *zig_tripl + } else if (strcmp(mcpu, "baseline") == 0) { + target->is_native_os = false; + target->is_native_cpu = false; +- target->llvm_cpu_name = ""; +- target->llvm_cpu_features = ""; ++ target->llvm_cpu_name = get_baseline_llvm_cpu_name(target->arch); ++ target->llvm_cpu_features = get_baseline_llvm_cpu_features(target->arch); + } else { + const char *msg = "stage0 can't handle CPU/features in the target"; + stage2_panic(msg, strlen(msg)); +@@ -220,6 +231,9 @@ static Error target_parse_triple(struct ZigTarget *target, const char *zig_tripl + const char *msg = "stage0 can't handle CPU/features in the target"; + stage2_panic(msg, strlen(msg)); + } ++ ++ target->llvm_cpu_name = get_baseline_llvm_cpu_name(target->arch); ++ target->llvm_cpu_features = get_baseline_llvm_cpu_features(target->arch); + } + + return ErrorNone; diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index c2f92e04e7..dcca9a1121 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm @@ -136,7 +136,8 @@ toolchain. Among other features it provides (file-name (git-file-name name version)) (sha256 (base32 "0nfvgg23sw50ksy0z0ml6lkdsvmd0278mq29m23dbb2jsirkhry7")) - (patches (search-patches "zig-use-system-paths.patch" + (patches (search-patches "zig-0.9-riscv-support.patch" + "zig-use-system-paths.patch" "zig-do-not-link-against-librt.patch")))) (inputs (list clang-13 ; Clang propagates llvm. @@ -151,6 +152,9 @@ toolchain. Among other features it provides (%current-target-system)) '())) #:out-of-source? #f ; for tests + ;; There are too many unclear test failures. + #:tests? ,(not (or (target-riscv64?) + (%current-target-system))) #:phases (modify-phases %standard-phases (add-after 'configure 'set-cache-dir @@ -158,6 +162,22 @@ toolchain. Among other features it provides ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'. (setenv "ZIG_GLOBAL_CACHE_DIR" (string-append (getcwd) "/zig-cache")))) + ,@(if (target-riscv64?) + ;; It is unclear why all these tests fail to build. + `((add-after 'unpack 'adjust-tests + (lambda _ + (substitute* "build.zig" + ((".*addRuntimeSafetyTests.*") "") + ((".*addRunTranslatedCTests.*") "")) + (substitute* "test/standalone.zig" + ;; These tests fail to build on riscv64-linux. + ;; They both contain 'exe.linkSystemLibrary("c");' + ((".*shared_library.*") "") + ((".*mix_o_files.*") "") + ;; ld.lld: error: undefined symbol: __tls_get_addr + ;; Is this symbol x86 only in glibc? + ((".*link_static_lib_as_system_lib.*") ""))))) + '()) (delete 'check) (add-after 'install 'check (lambda* (#:key outputs tests? #:allow-other-keys) -- cgit 1.4.1 From a041bbb4bf98cce72b14c554369fc56eeacc2f5d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 14 Jul 2023 11:47:46 +0100 Subject: Revert "gnu: mig: Update to 1.8+git20230520." As noted in the comment, I think using git-fetch caused problems computing derivaations for i586-linux (Guix would just use more and more memory). This reverts commit 999a6ac0cfd9339e138007ed9e4e544a55e92e3e. --- gnu/local.mk | 1 + gnu/packages/hurd.scm | 20 ++++++++------ ...missing-const_mach_port_name_array_t-type.patch | 32 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 71a13462ab..b5c28dafac 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,7 @@ dist_patch_DATA = \ %D%/packages/patches/gnome-session-support-elogind.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnumach-support-noide.patch \ + %D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 7e788d398d..0e47a954d7 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -91,20 +91,24 @@ (define-public mig (package (name "mig") - (version "1.8+git20230520") + (version "1.8+git20220827") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://git.savannah.gnu.org/git/hurd/mig.git") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) + (method url-fetch) + ;; XXX: Version 2.35 of glibc can only be built with an + ;; unreleased version of MiG: + ;; . + ;; It cannot be fetched from Git though, as the extra dependency + ;; on Autoconf/Automake would complicate bootstrapping. + (uri (string-append "mirror://gnu/guix/mirror/mig-" + version ".tar.gz")) (sha256 (base32 - "10r0fdjqjzqsy6ajb21rifvhw0wpjvrw6a1zdyliqlzqny5k0qlz")))) + "163d37s9lscd6zxyfng421m9nl857464mgjj90xsrcl5ykbng5p2")) + (patches (search-patches "mig-cpu.h-generation.patch")))) (build-system gnu-build-system) ;; Flex is needed both at build and run time. (inputs (list gnumach-headers flex)) - (native-inputs (list autoconf automake flex bison)) + (native-inputs (list flex bison)) (arguments (list #:tests? #f #:phases diff --git a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch new file mode 100644 index 0000000000..73c99ade23 --- /dev/null +++ b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch @@ -0,0 +1,32 @@ +From 17335d49a3c9e866a81abc051420d73a59d669bf Mon Sep 17 00:00:00 2001 +Message-Id: <17335d49a3c9e866a81abc051420d73a59d669bf.1678745341.git.dev@jpoiret.xyz> +From: Josselin Poiret +Date: Sun, 28 Aug 2022 01:17:34 +0200 +Subject: [PATCH] Add missing const_mach_port_name_array_t type + +From: Samuel Thibault + +--- + include/mach/port.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/mach/port.h b/include/mach/port.h +index 3c226f6c..d25eb0b4 100644 +--- a/include/mach/port.h ++++ b/include/mach/port.h +@@ -43,6 +43,7 @@ + */ + typedef unsigned int mach_port_name_t; + typedef mach_port_name_t *mach_port_name_array_t; ++typedef const mach_port_name_t *const_mach_port_name_array_t; + + /* + * A port is represented + +base-commit: 3e1702a65fb3caf50c8d09a1b383b0056a5efc82 +prerequisite-patch-id: 4688654277aef235ccd1797a72dce27d52b04616 +prerequisite-patch-id: 8f1e7dd6429c15cc8ed1d411dba0a75b6e745236 +prerequisite-patch-id: 605553ee086473ad9bc24e59c91d49a12dbf8631 +-- +2.39.1 + -- cgit 1.4.1 From 67fb8efdf782592c133726a1ab7bc6692259e385 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 9 Jul 2023 02:00:01 +0200 Subject: gnu: ghostscript: Fix CVE-2023-36664. * gnu/packages/ghostscript.scm (ghostscript/fixed): New variable. (ghostscript)[replacement]: Assign it to new field. * gnu/packages/patches/ghostscript-CVE-2023-36664.patch, gnu/packages/patches/ghostscript-CVE-2023-36664-fixup.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. --- gnu/local.mk | 2 + gnu/packages/ghostscript.scm | 7 + .../patches/ghostscript-CVE-2023-36664-fixup.patch | 56 ++++++++ .../patches/ghostscript-CVE-2023-36664.patch | 142 +++++++++++++++++++++ 4 files changed, 207 insertions(+) create mode 100644 gnu/packages/patches/ghostscript-CVE-2023-36664-fixup.patch create mode 100644 gnu/packages/patches/ghostscript-CVE-2023-36664.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b5c28dafac..06a376a99a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1237,6 +1237,8 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-bloomfilter-ghc9.2.patch \ %D%/packages/patches/ghc-bytestring-handle-ghc9.patch \ %D%/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch \ + %D%/packages/patches/ghostscript-CVE-2023-36664.patch \ + %D%/packages/patches/ghostscript-CVE-2023-36664-fixup.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 1813cc367e..8d35f1195c 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -145,6 +145,7 @@ printing, and psresize, for adjusting page sizes.") (package (name "ghostscript") (version "9.56.1") + (replacement ghostscript/fixed) (source (origin (method url-fetch) @@ -266,6 +267,12 @@ output file formats and printers.") (home-page "https://www.ghostscript.com/") (license license:agpl3+))) +(define ghostscript/fixed + (package-with-patches + ghostscript + (search-patches "ghostscript-CVE-2023-36664.patch" + "ghostscript-CVE-2023-36664-fixup.patch"))) + (define-public ghostscript/x (package/inherit ghostscript (name (string-append (package-name ghostscript) "-with-x")) diff --git a/gnu/packages/patches/ghostscript-CVE-2023-36664-fixup.patch b/gnu/packages/patches/ghostscript-CVE-2023-36664-fixup.patch new file mode 100644 index 0000000000..c2a222701f --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2023-36664-fixup.patch @@ -0,0 +1,56 @@ +From 0974e4f2ac0005d3731e0b5c13ebc7e965540f4d Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Wed, 14 Jun 2023 09:08:12 +0100 +Subject: [PATCH] Bug 706778: 706761 revisit + +Two problems with the original commit. The first a silly typo inverting the +logic of a test. + +The second was forgetting that we actually actually validate two candidate +strings for pipe devices. One with the expected "%pipe%" prefix, the other +using the pipe character prefix: "|". + +This addresses both those. +--- + base/gpmisc.c | 2 +- + base/gslibctx.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/base/gpmisc.c b/base/gpmisc.c +index 58511270e..2b0064bea 100644 +--- a/base/gpmisc.c ++++ b/base/gpmisc.c +@@ -1081,7 +1081,7 @@ gp_validate_path_len(const gs_memory_t *mem, + /* "%pipe%" do not follow the normal rules for path definitions, so we + don't "reduce" them to avoid unexpected results + */ +- if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { + bufferfull = buffer = (char *)gs_alloc_bytes(mem->thread_safe_memory, len + 1, "gp_validate_path"); + if (buffer == NULL) + return gs_error_VMerror; +diff --git a/base/gslibctx.c b/base/gslibctx.c +index d2a1aa91d..42af99090 100644 +--- a/base/gslibctx.c ++++ b/base/gslibctx.c +@@ -743,7 +743,7 @@ gs_add_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, co + /* "%pipe%" do not follow the normal rules for path definitions, so we + don't "reduce" them to avoid unexpected results + */ +- if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { + buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_add_control_path_len"); + if (buffer == NULL) + return gs_error_VMerror; +@@ -850,7 +850,7 @@ gs_remove_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, + /* "%pipe%" do not follow the normal rules for path definitions, so we + don't "reduce" them to avoid unexpected results + */ +- if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { + buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_remove_control_path_len"); + if (buffer == NULL) + return gs_error_VMerror; +-- +2.34.1 + diff --git a/gnu/packages/patches/ghostscript-CVE-2023-36664.patch b/gnu/packages/patches/ghostscript-CVE-2023-36664.patch new file mode 100644 index 0000000000..e9c53c1f87 --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2023-36664.patch @@ -0,0 +1,142 @@ +From 505eab7782b429017eb434b2b95120855f2b0e3c Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Wed, 7 Jun 2023 10:23:06 +0100 +Subject: [PATCH] Bug 706761: Don't "reduce" %pipe% file names for permission + validation + +For regular file names, we try to simplfy relative paths before we use them. + +Because the %pipe% device can, effectively, accept command line calls, we +shouldn't be simplifying that string, because the command line syntax can end +up confusing the path simplifying code. That can result in permitting a pipe +command which does not match what was originally permitted. + +Special case "%pipe" in the validation code so we always deal with the entire +string. +--- + base/gpmisc.c | 31 +++++++++++++++++++-------- + base/gslibctx.c | 56 ++++++++++++++++++++++++++++++++++++------------- + 2 files changed, 64 insertions(+), 23 deletions(-) + +diff --git a/base/gpmisc.c b/base/gpmisc.c +index 5f39ebba7..2fb87f769 100644 +--- a/base/gpmisc.c ++++ b/base/gpmisc.c +@@ -1076,16 +1076,29 @@ gp_validate_path_len(const gs_memory_t *mem, + && !memcmp(path + cdirstrl, dirsepstr, dirsepstrl)) { + prefix_len = 0; + } +- rlen = len+1; +- bufferfull = (char *)gs_alloc_bytes(mem->thread_safe_memory, rlen + prefix_len, "gp_validate_path"); +- if (bufferfull == NULL) +- return gs_error_VMerror; +- +- buffer = bufferfull + prefix_len; +- if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) +- return gs_error_invalidfileaccess; +- buffer[rlen] = 0; + ++ /* "%pipe%" do not follow the normal rules for path definitions, so we ++ don't "reduce" them to avoid unexpected results ++ */ ++ if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ bufferfull = buffer = (char *)gs_alloc_bytes(mem->thread_safe_memory, len + 1, "gp_validate_path"); ++ if (buffer == NULL) ++ return gs_error_VMerror; ++ memcpy(buffer, path, len); ++ buffer[len] = 0; ++ rlen = len; ++ } ++ else { ++ rlen = len+1; ++ bufferfull = (char *)gs_alloc_bytes(mem->thread_safe_memory, rlen + prefix_len, "gp_validate_path"); ++ if (bufferfull == NULL) ++ return gs_error_VMerror; ++ ++ buffer = bufferfull + prefix_len; ++ if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) ++ return gs_error_invalidfileaccess; ++ buffer[rlen] = 0; ++ } + while (1) { + switch (mode[0]) + { +diff --git a/base/gslibctx.c b/base/gslibctx.c +index eb566ed06..d2a1aa91d 100644 +--- a/base/gslibctx.c ++++ b/base/gslibctx.c +@@ -740,14 +740,28 @@ gs_add_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, co + return gs_error_rangecheck; + } + +- rlen = len+1; +- buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gp_validate_path"); +- if (buffer == NULL) +- return gs_error_VMerror; ++ /* "%pipe%" do not follow the normal rules for path definitions, so we ++ don't "reduce" them to avoid unexpected results ++ */ ++ if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_add_control_path_len"); ++ if (buffer == NULL) ++ return gs_error_VMerror; ++ memcpy(buffer, path, len); ++ buffer[len] = 0; ++ rlen = len; ++ } ++ else { ++ rlen = len + 1; + +- if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) +- return gs_error_invalidfileaccess; +- buffer[rlen] = 0; ++ buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gs_add_control_path_len"); ++ if (buffer == NULL) ++ return gs_error_VMerror; ++ ++ if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) ++ return gs_error_invalidfileaccess; ++ buffer[rlen] = 0; ++ } + + n = control->num; + for (i = 0; i < n; i++) +@@ -833,14 +847,28 @@ gs_remove_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, + return gs_error_rangecheck; + } + +- rlen = len+1; +- buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gp_validate_path"); +- if (buffer == NULL) +- return gs_error_VMerror; ++ /* "%pipe%" do not follow the normal rules for path definitions, so we ++ don't "reduce" them to avoid unexpected results ++ */ ++ if (len > 5 && memcmp(path, "%pipe", 5) != 0) { ++ buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_remove_control_path_len"); ++ if (buffer == NULL) ++ return gs_error_VMerror; ++ memcpy(buffer, path, len); ++ buffer[len] = 0; ++ rlen = len; ++ } ++ else { ++ rlen = len+1; + +- if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) +- return gs_error_invalidfileaccess; +- buffer[rlen] = 0; ++ buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gs_remove_control_path_len"); ++ if (buffer == NULL) ++ return gs_error_VMerror; ++ ++ if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success) ++ return gs_error_invalidfileaccess; ++ buffer[rlen] = 0; ++ } + + n = control->num; + for (i = 0; i < n; i++) { +-- +2.34.1 + -- cgit 1.4.1 From aa576321f2b3bd74f0c11ff737112ce6a8337605 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 9 Jul 2023 02:00:04 +0200 Subject: gnu: oath-toolkit: Update to 2.6.9. * gnu/packages/authentication.scm (oath-toolkit): Update to 2.6.9. [source]: Remove patch. * gnu/packages/patches/oath-toolkit-xmlsec-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/authentication.scm | 5 +- .../patches/oath-toolkit-xmlsec-compat.patch | 79 ---------------------- 3 files changed, 2 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/patches/oath-toolkit-xmlsec-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 06a376a99a..b460d3bc91 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1644,7 +1644,6 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ - %D%/packages/patches/oath-toolkit-xmlsec-compat.patch \ %D%/packages/patches/obs-modules-location.patch \ %D%/packages/patches/ocaml-dose3-add-unix-dependency.patch \ %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \ diff --git a/gnu/packages/authentication.scm b/gnu/packages/authentication.scm index de1769d65f..f89458cb8c 100644 --- a/gnu/packages/authentication.scm +++ b/gnu/packages/authentication.scm @@ -62,15 +62,14 @@ (define-public oath-toolkit (package (name "oath-toolkit") - (version "2.6.7") + (version "2.6.9") (source (origin (method url-fetch) (uri (string-append "https://download.savannah.nongnu.org/releases/" name "/" name "-" version ".tar.gz")) - (patches (search-patches "oath-toolkit-xmlsec-compat.patch")) (sha256 - (base32 "1aa620k05lsw3l3slkp2mzma40q3p9wginspn9zk8digiz7dzv9n")))) + (base32 "11g9r1avl3d2nnkglk0g7d6z6gs5padk75xqzvbxp9pir0qwhfik")))) (build-system gnu-build-system) (arguments ;; TODO ‘--enable-pskc’ causes xmlsec-related test suite failures. diff --git a/gnu/packages/patches/oath-toolkit-xmlsec-compat.patch b/gnu/packages/patches/oath-toolkit-xmlsec-compat.patch deleted file mode 100644 index 18589366a9..0000000000 --- a/gnu/packages/patches/oath-toolkit-xmlsec-compat.patch +++ /dev/null @@ -1,79 +0,0 @@ -Adjust tests for compatibility with newer xmlsec. - -Taken from upstream: - - https://gitlab.com/oath-toolkit/oath-toolkit/-/commit/0ae59b9c72f69ee21044e736e292b73051df3272 - -diff --git a/libpskc/examples/pskc-hotp-signed.xml b/libpskc/examples/pskc-hotp-signed.xml -index 359dd4723cf2b5ae1ca53d793cc6900a15bd4969..396e0829ff245b3ad6953cc3523d77568c8a18f4 100644 ---- a/libpskc/examples/pskc-hotp-signed.xml -+++ b/libpskc/examples/pskc-hotp-signed.xml -@@ -38,7 +38,8 @@ rIXbwqKhnBP943U4Ch31oEbZtbo+XRbiq11wv6dLNsi76TNGDqsjTKgEcSIYI6Vd - rMxnil6ChoIBvSSPGHhJuj1bW1EPW92JtIa6byrAj1m4RwSviQy2i65YoIdtrhRt - CWekj2zuL/0szv5rZMCCvxioOCA8znqELEPMfs0Aa/cACD2MZcC4gGXehNCvzYJr - TmB6lFpxP6f0g6eO7PVcqYN9NCwECxb5Cvx2j2uNlereY35/9oPR6YJx+V7sL+DB --n6F0mN8OUAFxDamepKdGRApU8uZ35624o/I4 -+n6F0mN8OUAFxDamepKdGRApU8uZ35624o/I4 -+ - - - -diff --git a/pskctool/tests/pskc-all-signed.xml b/pskctool/tests/pskc-all-signed.xml -index 39cf8af5bb00e34fa5e1acb97cea59ff742758f4..5d44e72d928ccf1f46975e6ccca58297e235be95 100644 ---- a/pskctool/tests/pskc-all-signed.xml -+++ b/pskctool/tests/pskc-all-signed.xml -@@ -38,7 +38,8 @@ rIXbwqKhnBP943U4Ch31oEbZtbo+XRbiq11wv6dLNsi76TNGDqsjTKgEcSIYI6Vd - rMxnil6ChoIBvSSPGHhJuj1bW1EPW92JtIa6byrAj1m4RwSviQy2i65YoIdtrhRt - CWekj2zuL/0szv5rZMCCvxioOCA8znqELEPMfs0Aa/cACD2MZcC4gGXehNCvzYJr - TmB6lFpxP6f0g6eO7PVcqYN9NCwECxb5Cvx2j2uNlereY35/9oPR6YJx+V7sL+DB --n6F0mN8OUAFxDamepKdGRApU8uZ35624o/I4 -+n6F0mN8OUAFxDamepKdGRApU8uZ35624o/I4 -+ - - - -diff --git a/pskctool/tests/tst_libexamples.sh b/pskctool/tests/tst_libexamples.sh -index 0e8e558b4cbefbac9f2ca301fddb2ac4b8cfbdfa..5cb52ce44f40a78ab886ff12d2eac64e5b5c4c7e 100755 ---- a/pskctool/tests/tst_libexamples.sh -+++ b/pskctool/tests/tst_libexamples.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - - # tst_libexamples.sh - keep pskctool output in GTK-DOC manual up to date --# Copyright (C) 2012-2021 Simon Josefsson -+# Copyright (C) 2012-2022 Simon Josefsson - - # This program is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -45,7 +45,8 @@ fi - - $PSKCTOOL --sign --sign-key $srcdir/pskc-ee-key.pem \ - --sign-crt $srcdir/pskc-ee-crt.pem \ -- $srcdir/../../libpskc/examples/pskc-hotp.xml > foo -+ $srcdir/../../libpskc/examples/pskc-hotp.xml \ -+ | sed 's,4 foo - if ! diff -ur $srcdir/../../libpskc/examples/pskc-hotp-signed.xml foo; then - echo "FAIL: pskctool --sign output change, commit updated file." - exit 1 -diff --git a/pskctool/tests/tst_sign.sh b/pskctool/tests/tst_sign.sh -index b62757336061394746d60f706369127fe1db466d..2d452d69f2e6595ff85a34540939801324dbdfea 100755 ---- a/pskctool/tests/tst_sign.sh -+++ b/pskctool/tests/tst_sign.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - - # tst_sign.sh - test that pskctool can sign and verify --# Copyright (C) 2012-2021 Simon Josefsson -+# Copyright (C) 2012-2022 Simon Josefsson - - # This program is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -32,7 +32,7 @@ $PSKCTOOL --info --strict --debug $pskc_all > tmp-pre-human.txt - $PSKCTOOL --sign \ - --sign-key $pskc_ee_key \ - --sign-crt $pskc_ee_crt \ -- $pskc_all > tmp-signed.xml -+ $pskc_all | sed 's,4 tmp-signed.xml - - diff -ur $pskc_all_signed tmp-signed.xml - -- cgit 1.4.1 From 460b2afeb39733ee8d2730b35192c97630fc2a10 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Wed, 5 Jul 2023 17:34:04 +0100 Subject: gnu: Add mactelnet. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/admin.scm (mactelnet): New variable. * gnu/packages/patches/mactelnet-remove-init.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/admin.scm | 42 ++++++++++ gnu/packages/patches/mactelnet-remove-init.patch | 98 ++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 gnu/packages/patches/mactelnet-remove-init.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b460d3bc91..2767f5290b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1568,6 +1568,7 @@ dist_patch_DATA = \ %D%/packages/patches/lua-5.4-liblua-so.patch \ %D%/packages/patches/luit-posix.patch \ %D%/packages/patches/lvm2-static-link.patch \ + %D%/packages/patches/mactelnet-remove-init.patch \ %D%/packages/patches/mailutils-variable-lookup.patch \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mariadb-rocksdb-atomic-linking.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index dfd6bf0e41..f2378b0d8a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -59,6 +59,7 @@ ;;; Copyright © 2023 Lu Hui ;;; Copyright © 2023 Yovan Naumovski ;;; Copyright © 2023 Alexey Abramov +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -5852,3 +5853,44 @@ file or files to several hosts.") (description "This package provides a graphical disk usage analyzer in text mode.") (license license:asl2.0))) + +(define-public mactelnet + (package + (name "mactelnet") + (version "0.4.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/haakonnessjoen/MAC-Telnet") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1z63dz22crrvrm0sh2cwpyqb7wqd9m45m6f2641mwmyp6hcpf4k4")) + (patches (search-patches "mactelnet-remove-init.patch")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f)) ; no tests + (native-inputs (list autoconf automake gettext-minimal)) + (synopsis "MAC-Telnet utilities for communicating with RouterOS devices") + (description "This package provides an implementation of the MAC-Telnet protocol +used by RouterOS devices. It provides the following commands: +@table @command +@item{macping} +Ping RouterOS devices or @command{mactelnetd} hosts. +@item{mactelnetd} +MAC-Telnet daemon. +@item{mactelnet} +MAC-Telnet client. +@item{mndp} +Discover other RouterOS devices or @command{mactelnetd} hosts. +@end table") + (home-page "https://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/") + (license + (list license:gpl2+ + ;; Note: applies to src/md5.{c,h} + ;; This file is likely to be gone in the next release. + license:zlib + ;; Bundled uthash-1.9.9. + license:bsd-2)))) diff --git a/gnu/packages/patches/mactelnet-remove-init.patch b/gnu/packages/patches/mactelnet-remove-init.patch new file mode 100644 index 0000000000..82372e3fe4 --- /dev/null +++ b/gnu/packages/patches/mactelnet-remove-init.patch @@ -0,0 +1,98 @@ +From ca2dff0b97df0ceb8f6357de3a4375ebc09646dd Mon Sep 17 00:00:00 2001 +Message-Id: +From: Bruno Victal +Date: Wed, 5 Jul 2023 16:43:31 +0100 +Subject: [PATCH] Skip installing init file. + +The file refers to hardcoded paths. +--- + Makefile.am | 2 +- + config/Makefile.am | 5 ----- + config/mactelnetd.init | 21 --------------------- + config/mactelnetd.users | 12 ------------ + configure.ac | 2 +- + 5 files changed, 2 insertions(+), 40 deletions(-) + delete mode 100644 config/Makefile.am + delete mode 100644 config/mactelnetd.init + delete mode 100644 config/mactelnetd.users + +diff --git a/Makefile.am b/Makefile.am +index 4e67178..264d8ea 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,5 +1,5 @@ + AUTOMAKE_OPTIONS = foreign +-SUBDIRS = src doc config po ++SUBDIRS = src doc po + + CFLAGS = --pedantic -Wall -std=c99 -O3 + LDFLAGS = +diff --git a/config/Makefile.am b/config/Makefile.am +deleted file mode 100644 +index 574a2e0..0000000 +--- a/config/Makefile.am ++++ /dev/null +@@ -1,5 +0,0 @@ +-dist_sysconf_DATA = mactelnetd.users +- +-install-exec-hook: +- chmod 600 $(DESTDIR)$(sysconfdir)/mactelnetd.users +- chown root $(DESTDIR)$(sysconfdir)/mactelnetd.users +diff --git a/config/mactelnetd.init b/config/mactelnetd.init +deleted file mode 100644 +index b7ddddf..0000000 +--- a/config/mactelnetd.init ++++ /dev/null +@@ -1,21 +0,0 @@ +-# mactelnetd - MAC-Telnet server +-# +-# The MAC-Telnet server provides telnet access via MAC addresses. +-# +-# Ubuntu upstart config: +- +-description "MAC-Telnet server" +- +-start on filesystem +-stop on runlevel [!2345] +- +-respawn +-respawn limit 10 5 +-umask 022 +- +-pre-start script +- test -O /etc/mactelnetd.users || { stop; exit 0; } +- test -x /usr/sbin/mactelnetd || { stop; exit 0; } +-end script +- +-exec /usr/sbin/mactelnetd -f +diff --git a/config/mactelnetd.users b/config/mactelnetd.users +deleted file mode 100644 +index c140e36..0000000 +--- a/config/mactelnetd.users ++++ /dev/null +@@ -1,12 +0,0 @@ +-# Users file for MAC-Telnetd +-# +-#################################################################### +-# WARNING: This file has passwords written in plain-text. # +-# Make sure this file is owned and only readable by root. # +-#################################################################### +-# +-# Each line consists of a username and a password seperated by :. +-# Usernames must be existing users from passwd. +-# +-# Format: +-#username:password +diff --git a/configure.ac b/configure.ac +index c0fdda4..9d2f7d7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -34,4 +34,4 @@ AC_FUNC_MALLOC + AC_FUNC_STRNLEN + AC_CHECK_FUNCS([alarm bzero clock_gettime getpass gettimeofday inet_ntoa memset select setenv setlocale socket strcasecmp strerror strncasecmp sysinfo uname]) + +-AC_OUTPUT(Makefile src/Makefile doc/Makefile config/Makefile po/Makefile.in) ++AC_OUTPUT(Makefile src/Makefile doc/Makefile po/Makefile.in) +-- +2.40.1 + -- cgit 1.4.1 From 94f83088d237ecd032c411bb94e2d647a2931990 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Tue, 18 Jul 2023 14:14:36 +0200 Subject: gnu: Remove unused gnumach patch. This is a followup to commit 2edd67d34b85715e97b222f4a46da7b156973616 gnu: gnumach: Update to 1.8+git20221224. * gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - ...missing-const_mach_port_name_array_t-type.patch | 32 ---------------------- 2 files changed, 33 deletions(-) delete mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2767f5290b..0d0f8c1937 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1290,7 +1290,6 @@ dist_patch_DATA = \ %D%/packages/patches/gnome-session-support-elogind.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnumach-support-noide.patch \ - %D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch deleted file mode 100644 index 73c99ade23..0000000000 --- a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 17335d49a3c9e866a81abc051420d73a59d669bf Mon Sep 17 00:00:00 2001 -Message-Id: <17335d49a3c9e866a81abc051420d73a59d669bf.1678745341.git.dev@jpoiret.xyz> -From: Josselin Poiret -Date: Sun, 28 Aug 2022 01:17:34 +0200 -Subject: [PATCH] Add missing const_mach_port_name_array_t type - -From: Samuel Thibault - ---- - include/mach/port.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/mach/port.h b/include/mach/port.h -index 3c226f6c..d25eb0b4 100644 ---- a/include/mach/port.h -+++ b/include/mach/port.h -@@ -43,6 +43,7 @@ - */ - typedef unsigned int mach_port_name_t; - typedef mach_port_name_t *mach_port_name_array_t; -+typedef const mach_port_name_t *const_mach_port_name_array_t; - - /* - * A port is represented - -base-commit: 3e1702a65fb3caf50c8d09a1b383b0056a5efc82 -prerequisite-patch-id: 4688654277aef235ccd1797a72dce27d52b04616 -prerequisite-patch-id: 8f1e7dd6429c15cc8ed1d411dba0a75b6e745236 -prerequisite-patch-id: 605553ee086473ad9bc24e59c91d49a12dbf8631 --- -2.39.1 - -- cgit 1.4.1 From 4e11cac6be68a674c16965dc74e7da54cd3168df Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 18 Jul 2023 17:18:40 +0200 Subject: gnu: mig: Update to 1.8+git20230520. This reinstates 999a6ac0cfd9339e138007ed9e4e544a55e92e3e, which was reverted by a041bbb4bf98cce72b14c554369fc56eeacc2f5d, but without resorting to 'git-fetch'. * gnu/packages/hurd.scm (mig): Update to 1.8+git20220827. [source]: Remove patch. * gnu/packages/patches/mig-cpu.h-generation.patch: Delete. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/hurd.scm | 7 +++---- gnu/packages/patches/mig-cpu.h-generation.patch | 16 ---------------- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/mig-cpu.h-generation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0d0f8c1937..b85be30838 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1594,7 +1594,6 @@ dist_patch_DATA = \ %D%/packages/patches/mia-vtk9.patch \ %D%/packages/patches/mia-vtk92.patch \ %D%/packages/patches/mia-vtk-version.patch \ - %D%/packages/patches/mig-cpu.h-generation.patch \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 3785c47750..b184657fb9 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -91,10 +91,10 @@ (define-public mig (package (name "mig") - (version "1.8+git20220827") + (version "1.8+git20230520") (source (origin (method url-fetch) - ;; XXX: Version 2.35 of glibc can only be built with an + ;; XXX: Versions 2.35 and 2.37 of glibc can only be built with an ;; unreleased version of MiG: ;; . ;; It cannot be fetched from Git though, as the extra dependency @@ -103,8 +103,7 @@ version ".tar.gz")) (sha256 (base32 - "163d37s9lscd6zxyfng421m9nl857464mgjj90xsrcl5ykbng5p2")) - (patches (search-patches "mig-cpu.h-generation.patch")))) + "1ap31jd9jkvvz3vb88hg19cyqmqzmra724yl1xhcrv7gcgnan7d9")))) (build-system gnu-build-system) ;; Flex is needed both at build and run time. (inputs (list gnumach-headers flex)) diff --git a/gnu/packages/patches/mig-cpu.h-generation.patch b/gnu/packages/patches/mig-cpu.h-generation.patch deleted file mode 100644 index 3030eaeaa6..0000000000 --- a/gnu/packages/patches/mig-cpu.h-generation.patch +++ /dev/null @@ -1,16 +0,0 @@ -Backport MiG commit 73fbf2504ae606dda81372701a67dad6fee0865e: - - From: Flavio Cruz - Subject: Generate cpu.h with -ffreestanding - ---- a/Makefile.in 2023-03-26 23:02:51.384318331 +0200 -+++ b/Makefile.in 2023-03-26 23:03:03.300329369 +0200 -@@ -1051,7 +1051,7 @@ uninstall-am: uninstall-binSCRIPTS unins - .sym.symc: - $(AWK_V) $(AWK) -f $(srcdir)/gensym.awk $< > $@ - .symc.symo: -- $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -x c -o $@ $< -+ $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffreestanding -x c -o $@ $< - .symo.h: - $(AM_V_GEN) sed -e '/^[^*].*$$/d' -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' \ - $< > $@ -- cgit 1.4.1 From c769425a71c42113caced0ed497970fcb3ee70e1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 5 Jun 2023 21:27:22 +0200 Subject: gnu: Clear or deprecate hyphen-related texlive packages or functions. * gnu/packages/tex.scm (define-deprecated-package): Move near the top of the module so it can be called earlier. (hyph-utf8-scripts): Remove package. (texlive-hyphen-package): Remove function. (texlive-dehyph): (texlive-generic-dehyph-exptl): (texlive-generic-hyph-utf8): (texlive-hyphen-afrikaans): (texlive-hyphen-ancientgreek): (texlive-hyphen-armenian): (texlive-hyphen-basque): (texlive-hyphen-belarusian): (texlive-hyphen-bulgarian): (texlive-hyphen-catalan): (texlive-hyphen-chinese): (texlive-hyphen-churchslavonic): (texlive-hyphen-coptic): (texlive-hyphen-croatian): (texlive-hyphen-czech): (texlive-hyphen-danish): (texlive-hyphen-dutch): (texlive-hyphen-english): (texlive-hyphen-esperanto): (texlive-hyphen-estonian): (texlive-hyphen-ethiopic): (texlive-hyphen-finnish): (texlive-hyphen-french): (texlive-hyphen-friulan): (texlive-hyphen-galician): (texlive-hyphen-georgian): (texlive-hyphen-german): (texlive-hyphen-greek): (texlive-hyphen-hungarian): (texlive-hyphen-icelandic): (texlive-hyphen-indic): (texlive-hyphen-indonesian): (texlive-hyphen-interlingua): (texlive-hyphen-irish): (texlive-hyphen-italian): (texlive-hyphen-kurmanji): (texlive-hyphen-latin): (texlive-hyphen-latvian): (texlive-hyphen-lithuanian): (texlive-hyphen-macedonian): (texlive-hyphen-mongolian): (texlive-hyphen-norwegian): (texlive-hyphen-occitan): (texlive-hyphen-pali): (texlive-hyphen-piedmontese): (texlive-hyphen-polish): (texlive-hyphen-portuguese): (texlive-hyphen-romanian): (texlive-hyphen-romansh): (texlive-hyphen-russian): (texlive-hyphen-sanskrit): (texlive-hyphen-schoolfinnish): (texlive-hyphen-serbian): (texlive-hyphen-slovak): (texlive-hyphen-slovenian): (texlive-hyphen-spanish): (texlive-hyphen-swedish): (texlive-hyphen-thai): (texlive-hyphen-turkish): (texlive-hyphen-turkmen): (texlive-hyphen-ukrainian): (texlive-hyphen-uppersorbian): (texlive-hyphen-welsh): (texlive-ruhyphen): (texlive-ukrhyph): Deprecate package. * gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Unregister it. --- gnu/local.mk | 1 - .../patches/texlive-hyph-utf8-no-byebug.patch | 13 - gnu/packages/tex.scm | 1225 ++------------------ 3 files changed, 78 insertions(+), 1161 deletions(-) delete mode 100644 gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b85be30838..a56864be86 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1980,7 +1980,6 @@ dist_patch_DATA = \ %D%/packages/patches/telegram-purple-adjust-test.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ - %D%/packages/patches/texlive-hyph-utf8-no-byebug.patch \ %D%/packages/patches/thefuck-test-environ.patch \ %D%/packages/patches/tidy-CVE-2015-5522+5523.patch \ %D%/packages/patches/timewarrior-time-sensitive-tests.patch \ diff --git a/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch b/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch deleted file mode 100644 index fb29b76ef2..0000000000 --- a/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch +++ /dev/null @@ -1,13 +0,0 @@ -Description: Avoid dependency on byebug to reduce package closure - significantly, see https://issues.guix.gnu.org/55997 -diff --git a/lib/tex/hyphen/language.rb b/lib/tex/hyphen/language.rb -index 12831417..df6daa39 100644 ---- a/lib/tex/hyphen/language.rb -+++ b/lib/tex/hyphen/language.rb -@@ -1,6 +1,5 @@ - require 'yaml' - require 'hydra' --require 'byebug' - - require_relative 'path' - diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index a8d6d0c69b..21593d190e 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -103,89 +103,10 @@ #:use-module (ice-9 match) #:use-module ((srfi srfi-1) #:hide (zip))) -(define hyph-utf8-scripts - (origin - (method svn-fetch) - (uri (texlive-ref "generic" "hyph-utf8")) - (file-name (string-append "hyph-utf8-scripts-" - (number->string %texlive-revision) - "-checkout")) - (patches (search-patches "texlive-hyph-utf8-no-byebug.patch")) - (sha256 - (base32 - "04xzf5gr3ylyh3ls09imrx4mwq3qp1k97r9njzlan6hlff875rx2")))) - -(define (texlive-hyphen-package name code locations hash) - "Return a TeX Live hyphenation package with the given NAME, using source -files from LOCATIONS with expected checksum HASH. CODE is not currently in -use." - (package - (name name) - (version (number->string %texlive-revision)) - (source (texlive-origin name version location hash)) - (build-system texlive-build-system) - (arguments - (list - #:texlive-latex-base #f - #:phases - #~(modify-phases %standard-phases - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - (let* ((root (string-append #$output "/share/texmf-dist")) - (patterns - (string-append root "/tex/generic/hyph-utf8/patterns/txt/")) - (loaders - (string-append root "/tex/generic/hyph-utf8/loadhyph")) - (ptex - (string-append root "/tex/generic/hyph-utf8/patterns/ptex")) - (quote - (string-append root "/tex/generic/hyph-utf8/patterns/quote"))) - (mkdir "scripts") - (copy-recursively - (dirname (search-input-file inputs "hyph-utf8.rb")) - "scripts") - - ;; Prepare target directories - (mkdir-p patterns) - (mkdir-p loaders) - (mkdir-p ptex) - (mkdir-p quote) - - ;; Generate plain patterns - (with-directory-excursion "scripts" - (substitute* "lib/tex/hyphen/path.rb" - (("^([[:blank:]]+)TeXROOT = .*" _ indent) - (string-append indent "TeXROOT = \"" - (getcwd) "/..\"\n"))) - - (substitute* "generate-plain-patterns.rb" - ;; Ruby 2 does not need this. - (("require 'unicode'") "") - ;; Write directly to the output directory - (("File\\.join\\(PATH::TXT") - (string-append "File.join(\"" patterns "\"")) - (("File\\.join\\(PATH::QUOTE") - (string-append "File.join(\"" quote "\""))) - (invoke "ruby" "generate-plain-patterns.rb") - - ;; Build pattern loaders - (substitute* "generate-pattern-loaders.rb" - (("File\\.join\\(PATH::LOADER") - (string-append "File.join(\"" loaders "\""))) - - (invoke "ruby" "generate-pattern-loaders.rb") - - ;; Build ptex patterns - (substitute* "generate-ptex-patterns.rb" - (("File\\.join\\(PATH::PTEX") - (string-append "File.join(\"" ptex "\""))) - (invoke "ruby" "generate-ptex-patterns.rb")))))))) - (native-inputs - (list hyph-utf8-scripts ruby-2.7 ruby-hydra-minimal/pinned)) - (home-page "https://ctan.org/pkg/hyph-utf8") - (synopsis #f) - (description #f) - (license #f))) +(define-syntax-rule (define-deprecated-package old-name name) + "Define OLD-NAME as a deprecated package alias for NAME." + (define-deprecated/public old-name name + (deprecated-package (symbol->string 'old-name) name))) (define-public texlive-hyphen-complete (package @@ -290,8 +211,8 @@ use." (string-append "File.join(\"" ptex "\""))) (invoke "ruby" "generate-ptex-patterns.rb")))))))) (native-inputs - (list ruby - ruby-hydra-minimal + (list ruby-2.7 + ruby-hydra-minimal/pinned texlive-docstrip texlive-tex)) (home-page "https://ctan.org/pkg/hyph-utf8") @@ -338,8 +259,78 @@ and should be preferred to it whenever a package would otherwise depend on "Ancestral BSD variant") (license:non-copyleft "file:///tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex" - "FSF all permissive license"))))) - + "FSF all permissive license") + (license:non-copyleft + "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex" + "FSF All permissive license") + (license:non-copyleft + "file:///tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex"))))) + +(define-deprecated-package texlive-dehyph texlive-hyphen-complete) +(define-deprecated-package texlive-generic-dehyph-exptl texlive-hyphen-complete) +(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-afrikaans texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-ancientgreek texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-armenian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-basque texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-belarusian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-bulgarian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-catalan texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-chinese texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-churchslavonic texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-coptic texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-croatian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-czech texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-danish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-dutch texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-english texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-esperanto texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-estonian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-ethiopic texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-finnish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-french texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-friulan texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-galician texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-georgian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-german texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-greek texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-hungarian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-icelandic texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-indic texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-indonesian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-interlingua texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-irish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-italian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-kurmanji texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-latin texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-latvian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-lithuanian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-macedonian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-mongolian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-norwegian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-occitan texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-pali texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-piedmontese texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-polish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-portuguese texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-romanian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-romansh texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-russian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-sanskrit texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-schoolfinnish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-serbian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-slovak texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-slovenian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-spanish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-swedish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-thai texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-turkish texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-turkmen texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-ukrainian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-uppersorbian texlive-hyphen-complete) +(define-deprecated-package texlive-hyphen-welsh texlive-hyphen-complete) +(define-deprecated-package texlive-ruhyphen texlive-hyphen-complete) +(define-deprecated-package texlive-ukrhyph texlive-hyphen-complete) (define texlive-extra-src (origin @@ -846,11 +837,6 @@ includes adaptations for use with many other commonly-used packages.") from a list of user-specified directories similar to how shells look up executables. It is maintained as a part of TeX Live."))) -(define-syntax-rule (define-deprecated-package old-name name) - "Define OLD-NAME as a deprecated package alias for NAME." - (define-deprecated/public old-name name - (deprecated-package (symbol->string 'old-name) name))) - (define-public texlive-alphalph (package (name "texlive-alphalph") @@ -2061,1061 +2047,6 @@ Adobe's basic set.") ;; No license version specified. (license license:gpl3+))) -(define-public texlive-hyphen-afrikaans - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-afrikaans" "af" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex") - (base32 - "1k9k27a27bbrb0gz36191w32l2v6d3zbdh8zhrp4l3ild2pj3n4l"))) - (synopsis "Hyphenation patterns for Afrikaans") - (description "The package provides hyphenation patterns for the Afrikaans -language.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-ancientgreek - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-ancientgreek" "grc" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-grc.tex" - "/tex/generic/hyphen/grahyph5.tex" - "/tex/generic/hyphen/ibyhyph.tex") - (base32 - "01326lb6z0s8krcfgs8i1pnjfrm4gr33rc53gy80f63qbv4ssxrw"))) - (synopsis "Hyphenation patterns for ancient Greek") - (description "The package provides hyphenation patterns for ancient -Greek.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-armenian - (let ((template (texlive-hyphen-package - "texlive-hyphen-armenian" "hy" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hy.tex") - (base32 - "0hzny0npynsb07syxrpbfa5pkpj8r0j51pj64yxyfl1c0bak1fwp")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Armenian") - (description "The package provides hyphenation patterns for the Armenian -language.") - ;; Any version of the LGPL. - (license license:lgpl3+)))) - -(define-public texlive-hyphen-basque - (let ((template (texlive-hyphen-package - "texlive-hyphen-basque" "eu" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex") - (base32 - "15w969g1jqzn68l2b2lzf7iv7g3kil02aba3if6cag3qcnq92ra9")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Basque") - (description "The package provides hyphenation patterns for the Basque -language.") - ;; Similar to Unicode license. - (license (license:fsf-free - "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex"))))) - -(define-public texlive-hyphen-belarusian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-belarusian" "be" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-be.tex") - (base32 - "0ppm12wndaxv9da62dwkbnk7w9nijikn6jkc97m76xis338g2h02"))) - (synopsis "Hyphenation patterns for Belarusian") - (description "The package provides hyphenation patterns for the Belarusian -language.") - (license license:expat))) - -(define-public texlive-hyphen-bulgarian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-bulgarian" "bg" - '("/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex") - (base32 - "0m254y71j3qrb71klvfalfmic3kjy31l85b9cgpdm5yznlsq3i8d"))) - (synopsis "Hyphenation patterns for Bulgarian") - (description "The package provides hyphenation patterns for the Bulgarian -language in T2A and UTF-8 encodings.") - (license (license:non-copyleft - "file:///tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex" - "Ancestral BSD variant")))) - -(define-public texlive-hyphen-catalan - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-catalan" "ca" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex") - (base32 - "10zzlfz5v8d9csg85ibpp2vfvmpqa56vbl85qy5gws099vygpayg"))) - (synopsis "Hyphenation patterns for Catalan") - (description "The package provides hyphenation patterns for Catalan in -T1/EC and UTF-8 encodings.") - (license license:lppl1.0+))) - -(define-public texlive-hyphen-chinese - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-chinese" "zh-latn-pinyin" - '("/tex/generic/hyph-utf8/patterns/ptex/hyph-zh-latn-pinyin.ec.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex") - (base32 - "1hhh30hcjymm2igpllly04cavsfmd6xrjkd9zax6b2wdxn3ka4pm"))) - (synopsis "Hyphenation patterns for unaccented Chinese pinyin") - (description "The package provides hyphenation patterns for unaccented -Chinese pinyin T1/EC and UTF-8 encodings.") - (license license:gpl2+))) - -(define-public texlive-hyphen-churchslavonic - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-churchslavonic" "cu" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cu.tex") - (base32 - "0fhbwaapq2213msbhgr0d1lw06ihmrqirxj092mn73d8ynl13qlh"))) - (synopsis "Hyphenation patterns for Church Slavonic") - (description "The package provides hyphenation patterns for Church -Slavonic in UTF-8 encoding.") - (license license:expat))) - -(define-public texlive-hyphen-coptic - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-coptic" "cop" - (list "/tex/generic/hyph-utf8/patterns/tex-8bit/copthyph.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-cop.tex") - (base32 - "1jlxxvyfa2aljizaa3qlcxyhqsrb4dawv3q3fbyp2lxz6ag9fy6m"))) - (synopsis "Hyphenation patterns for Coptic") - (description "The package provides hyphenation patterns for Coptic in -UTF-8 encoding as well as in ASCII-based encoding for 8-bit engines.") - ;; No explicit license declaration, so we use the project license. - (license license:lppl))) - -(define-public texlive-hyphen-croatian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-croatian" "hr" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hr.tex") - (base32 - "12n9r2winai15jc622sqdwclgcs1s68r6vcf7ic8vvq0x9qhwc5v"))) - (synopsis "Hyphenation patterns for Croatian") - (description "The package provides hyphenation patterns for Croatian in -T1/EC and UTF-8 encodings.") - (license license:lppl1.0+))) - -(define-public texlive-hyphen-czech - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-czech" "cs" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cs.tex") - (base32 - "1q37s6p8yfyi3rp1azbz421lg4lr4aiki8m631i4x9rmps89m8iq"))) - (synopsis "Hyphenation patterns for Czech") - (description "The package provides hyphenation patterns for Czech in T1/EC -and UTF-8 encodings.") - (license license:gpl2+))) - -(define-public texlive-hyphen-danish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-danish" "da" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-da.tex") - (base32 - "1vj8nip64rzcrcg3skm4vqad1ggqwgan74znrdns610wjcm1z9qd"))) - (synopsis "Hyphenation patterns for Danish") - (description "The package provides hyphenation patterns for Danish in -T1/EC and UTF-8 encodings.") - ;; Either LPPL 1.3 or later, or Expat - (license (list license:lppl1.3+ license:expat)))) - -(define-public texlive-hyphen-dutch - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-dutch" "nl" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex") - (base32 - "1bg9g790ksq5cn8qihai6pacmkp9vpf35h4771z361nvwa40l8yk"))) - (synopsis "Hyphenation patterns for Dutch") - (description "The package provides hyphenation patterns for Dutch in T1/EC -and UTF-8 encodings.") - (license license:lppl1.0+))) - -(define-public texlive-hyphen-english - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-english" '("en-gb" "en-us") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-en-gb.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex") - (base32 - "08b3jihjaamcl1pvffi0s47nwavkm66l9mrrmby3l32dfpkprrc5"))) - (synopsis "Hyphenation patterns for American and British English") - (description "The package provides additional hyphenation patterns for -American and British English in ASCII encoding.") - (license (license:non-copyleft - "file:///tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex" - "FSF all permissive license")))) - -(define-public texlive-hyphen-esperanto - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-esperanto" "eo" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eo.tex") - (base32 - "1503kzn9bk4mm4ba35cka2hm8rz0v3j5l30v5rrsd4rqgpibcgic"))) - (synopsis "Hyphenation patterns for Esperanto") - (description "The package provides hyphenation patterns for Esperanto ISO -Latin 3 and UTF-8 encodings.") - (license license:lppl1.0+))) - -(define-public texlive-hyphen-estonian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-estonian" "et" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-et.tex") - (base32 - "1rdas2450ib02rwy65i69l86nyc9h15bl07xbbwhmhxfnj8zj4v8"))) - (synopsis "Hyphenation patterns for Estonian") - (description "The package provides hyphenation patterns for Estonian in -T1/EC and UTF-8 encodings.") - ;; Dual licensed under either license. - (license (list license:lppl1.3+ license:expat)))) - -(define-public texlive-hyphen-ethiopic - (let ((template (texlive-hyphen-package - "texlive-hyphen-ethiopic" "mul-ethi" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mul-ethi.tex") - (base32 - "1b93fc6j4aybh0pgq23hsn1njm6asf7sfz803fbj3ai0whsxd10l")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Ethiopic scripts") - (description "The package provides hyphenation patterns for languages -written using the Ethiopic script for Unicode engines. They are not supposed -to be linguistically relevant in all cases and should, for proper typography, -be replaced by files tailored to individual languages.") - (license license:expat)))) - -(define-public texlive-hyphen-finnish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-finnish" "fi" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi.tex") - (base32 - "1pa8sjs9zvnv1y6dma4s60sf9cr4zrvhxwm6i8cnshm84q16w4bc"))) - (synopsis "Hyphenation patterns for Finnish") - (description "The package provides hyphenation patterns for Finnish in -T1/EC and UTF-8 encodings.") - (license license:public-domain))) - -(define-public texlive-hyphen-schoolfinnish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-schoolfinnish" "fi-x-school" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi-x-school.tex") - (base32 - "1w5n6gaclgifbbnafg32vz3mfaibyldvh4yh1ya3sq9fwfmv035c"))) - (synopsis "Hyphenation patterns for Finnish for school") - (description "The package provides hyphenation patterns for Finnish for -school in T1/EC and UTF-8 encodings.") - (license license:public-domain))) - -(define-public texlive-hyphen-french - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-french" "fr" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fr.tex") - (base32 - "0jc3kqys6cxjw8x8pzjln7z78l8s7f5rlyrkv7dzr1kiwnwilk9d"))) - (synopsis "Hyphenation patterns for French") - (description "The package provides hyphenation patterns for French in -T1/EC and UTF-8 encodings.") - (license license:expat))) - -(define-public texlive-hyphen-friulan - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-friulan" "fur" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fur.tex") - (base32 - "1dlnh8slpf50mryxv7zzbx08xp54zkdfs1j7y37ipwbrajvd740f"))) - (synopsis "Hyphenation patterns for Friulan") - (description "The package provides hyphenation patterns for Friulan in -ASCII encodings.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-galician - (let ((template (texlive-hyphen-package - "texlive-hyphen-galician" "gl" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-gl.tex") - (base32 - "13zx2r3nrxdr025g2lxrph0ga6wf7cs8dxixn4fhbl6xr1cx028g")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Galician") - (description "The package provides hyphenation patterns for Galician in -T1/EC and UTF-8 encodings.") - (license license:lppl1.3)))) - -(define-public texlive-hyphen-georgian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-georgian" "ka" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ka.tex") - (base32 - "0l0hk7ka04fr8x11nnw95x151cxyycy0fph772m3a3p8qk4x9wp7"))) - (synopsis "Hyphenation patterns for Georgian") - (description "The package provides hyphenation patterns for Georgian in -T8M, T8K, and UTF-8 encodings.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-german - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-german" '("de-1901" "de-1996" "de-ch-1901") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1901.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1996.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-de-ch-1901.tex" - "/tex/generic/dehyph/dehyphn.tex" - "/tex/generic/dehyph/dehypht.tex" - "/tex/generic/dehyph/dehyphtex.tex" - "/tex/generic/dehyph/README") - (base32 - "17cc5hd0fr3ykpgly9nxaiz4sik3kmfn2wyxz1fkdnqqhl3i41a0"))) - (synopsis "Hyphenation patterns for German") - (description "This package provides hyphenation patterns for German in -T1/EC and UTF-8 encodings, for traditional and reformed spelling, including -Swiss German.") - ;; The patterns are released under the Expat license; the dehyph* files - ;; are released under the LPPL version 1 or later. - (license (list license:expat license:lppl1.0+)))) - -(define-public texlive-hyphen-greek - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-greek" '("el-monoton" "el-polyton") - (list "/doc/generic/elhyphen/" - "/tex/generic/hyph-utf8/patterns/tex/hyph-el-monoton.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex" - "/tex/generic/hyphen/grmhyph5.tex" - "/tex/generic/hyphen/grphyph5.tex") - (base32 - "1qyr6m1nh6d4wj68616cfxv4wjpiy1w2rlldxlx2ajzba381w3hf"))) - (synopsis "Hyphenation patterns for Greek") - (description "This package provides hyphenation patterns for Modern Greek -in monotonic and polytonic spelling in LGR and UTF-8 encodings.") - (license license:lppl))) - -(define-public texlive-hyphen-hungarian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-hungarian" "hu" - (list "/doc/generic/huhyphen/" - "/doc/generic/hyph-utf8/languages/hu/" - "/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex") - (base32 - "006d2290lcsqzh9ljansbaj9k52s17zgkw0kpsspn5l7a8n00zcl"))) - (synopsis "Hyphenation patterns for Hungarian") - (description "This package provides hyphenation patterns for Hungarian in -T1/EC and UTF-8 encodings.") - ;; Any of these licenses - (license (list license:gpl2 license:lgpl2.1+ license:mpl1.1)))) - -(define-public texlive-hyphen-icelandic - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-icelandic" "is" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-is.tex") - (base32 - "1m9xj41csj3ldym09d82zjbd3345sg2z10d8pxpvhgibf97mb66h"))) - (synopsis "Hyphenation patterns for Icelandic") - (description "This package provides hyphenation patterns for Icelandic in -T1/EC and UTF-8 encodings.") - (license license:lppl1.2+))) - -(define-public texlive-hyphen-indic - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-indic" - '("as" "bn" "gu" "hi" "kn" "ml" "mr" "or" "pa" "ta" "te") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-as.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-bn.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-gu.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-hi.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-kn.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-ml.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-mr.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-or.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-pa.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-ta.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-te.tex") - (base32 - "02d2kcd3lpk95fykjwhzw9s2a1s2w1skz8h2mmszrz979d1xzhpm"))) - (synopsis "Indic hyphenation patterns") - (description "This package provides hyphenation patterns for Assamese, -Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Panjabi, Tamil -and Telugu for Unicode engines.") - (license license:expat))) - -(define-public texlive-hyphen-indonesian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-indonesian" "id" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-id.tex") - (base32 - "1r62w02rf0i4z0jgij54d16qjbj0zyfwm9dwdkqka76jrivij83q"))) - (synopsis "Indonesian hyphenation patterns") - (description "This package provides hyphenation patterns for -Indonesian (Bahasa Indonesia) in ASCII encoding. They are probably also -usable for Malay (Bahasa Melayu).") - (license license:gpl2))) - -(define-public texlive-hyphen-interlingua - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-interlingua" "ia" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ia.tex") - (base32 - "0a9na20vjnzhgjbicaxay0jk4rm5zg1rjyiswr377mjhd9mx5cg3"))) - (synopsis "Interlingua hyphenation patterns") - (description "This package provides hyphenation patterns for Interlingua -in ASCII encoding.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-irish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-irish" "ga" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ga.tex") - (base32 - "1h1l9jzkpsb91nyhz6s6c9jfrbz8jx5ip8vyq3dkz0rl6g960i6b"))) - (synopsis "Irish hyphenation patterns") - (description "This package provides hyphenation patterns for -Irish (Gaeilge) in T1/EC and UTF-8 encodings.") - ;; Either of these licenses - (license (list license:gpl2+ license:expat)))) - -(define-public texlive-hyphen-italian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-italian" "it" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-it.tex") - (base32 - "03c7jiqslfxvl3gbdx79hggbvrfi2l4z2bnwxc0na8f8lkp1m787"))) - (synopsis "Italian hyphenation patterns") - (description "This package provides hyphenation patterns for Italian in -ASCII encoding. Compliant with the Recommendation UNI 6461 on hyphenation -issued by the Italian Standards Institution (Ente Nazionale di Unificazione -UNI).") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-kurmanji - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-kurmanji" "kmr" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-kmr.tex") - (base32 - "01ylbsi5wymrdrxr9b28nmjmcj72mdhqr657lwsb6m9aj33c9ql6"))) - (synopsis "Kurmanji hyphenation patterns") - (description "This package provides hyphenation patterns for -Kurmanji (Northern Kurdish) as spoken in Turkey and by the Kurdish diaspora in -Europe, in T1/EC and UTF-8 encodings.") - (license license:lppl1.3))) - -(define-public texlive-hyphen-latin - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-latin" '("la-x-classic" "la-x-liturgic" "la") - '("/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex" - "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-la-x-classic.ec.tex") - (base32 - "119rf6sk1f639ky6zr9njn21nsxzgfmjci94y26745qs8w08ilkl"))) - (synopsis "Liturgical Latin hyphenation patterns") - (description "This package provides hyphenation patterns for Latin in -T1/EC and UTF-8 encodings, mainly in modern spelling (u when u is needed and v -when v is needed), medieval spelling with the ligatures @code{\\ae} and -@code{\\oe} and the (uncial) lowercase 'v' written as a 'u' is also supported. -Apparently there is no conflict between the patterns of modern Latin and those -of medieval Latin. It also includes hyphenation patterns for the Classical -Latin in T1/EC and UTF-8 encodings. Classical Latin hyphenation patterns are -different from those of 'plain' Latin, the latter being more adapted to modern -Latin. It also provides hyphenation patterns for the Liturgical Latin in -T1/EC and UTF-8 encodings.") - ;; Either of these licenses - (license (list license:lppl1.0+ license:expat)))) - -(define-public texlive-hyphen-latvian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-latvian" "lv" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lv.tex") - (base32 - "00jf8xma4ldz0zpqwma97k9q3j0mqx7qdj6b7baph3n5xgc24aaw"))) - (synopsis "Latvian hyphenation patterns") - (description "This package provides hyphenation patterns for Latvian in -L7X and UTF-8 encodings.") - ;; Either of these licenses. - (license (list license:gpl2 license:lgpl2.1)))) - -(define-public texlive-hyphen-lithuanian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-lithuanian" "lt" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lt.tex") - (base32 - "1kfq7j2ajg6nj952s1ygd520sj9z9kl0bqvd291a36ni2b1frzgd"))) - (synopsis "Lithuanian hyphenation patterns") - (description "This package provides hyphenation patterns for Lithuanian in -L7X and UTF-8 encodings.") - ;; "Do ... whatever ... as long as you respect the copyright"; as part of - ;; the hyph-utf8 package we choose the LPPL license. - (license license:lppl))) - -(define-public texlive-hyphen-macedonian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-macedonian" "mk" - '("/tex/generic/hyph-utf8/patterns/tex/hyph-mk.tex" - "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-mk.macedonian.tex") - (base32 - "1fv6y8gpic5ciw8cclfxc8h3wr5xir1j0a7shixja1pmdyz7db2b"))) - (synopsis "Macedonian hyphenation patterns") - (description "This package provides hyphenation patterns for Macedonian.") - ;; XXX: License just says 'GPL'. Assume GPL2 since the file predates GPL3. - (license license:gpl2+))) - -(define-public texlive-hyphen-mongolian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-mongolian" '("mn-cyrl-x-lmc" "mn-cyrl") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl-x-lmc.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl.tex") - (base32 - "1y1b91ihrdl9bad3rxlsfjpd9wmyd5zzgci3qv9w8qqk33jxhwya"))) - (synopsis "Mongolian hyphenation patterns in Cyrillic script") - (description "This package provides hyphenation patterns for Mongolian in -T2A, LMC and UTF-8 encodings.") - ;; Either of these licenses - (license (list license:lppl1.3+ license:expat)))) - -(define-public texlive-hyphen-norwegian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-norwegian" '("nb" "nn" "no") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nb.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-nn.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex") - (base32 - "08gbwj64p4fckm199k52yp5lx65h9f4wwdkvl4pv4aa7k370jq9y"))) - (synopsis "Norwegian Bokmal and Nynorsk hyphenation patterns") - (description "This package provides hyphenation patterns for Norwegian -Bokmal and Nynorsk in T1/EC and UTF-8 encodings.") - (license (license:non-copyleft - "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex" - "FSF All permissive license")))) - -(define-public texlive-hyphen-occitan - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-occitan" "oc" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-oc.tex") - (base32 - "0vhjbq2nr58vhqwwky3cwx4dqiwjmmfwp81rb65mfpf0m8yypdfg"))) - (synopsis "Occitan hyphenation patterns") - (description "This package provides hyphenation patterns for Occitan in -T1/EC and UTF-8 encodings. They are supposed to be valid for all the Occitan -variants spoken and written in the wide area called 'Occitanie' by the French. -It ranges from the Val d'Aran within Catalunya, to the South Western Italian -Alps encompassing the southern half of the French pentagon.") - (license license:lppl1.0+))) - -(define-public texlive-hyphen-pali - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-pali" "pi" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pi.tex") - (base32 - "1fak853s4ijdqgrnhwymaq1lh8jab3qfyxapdmf6qpg6bqd20kxq"))) - (synopsis "Panjabi hyphenation patterns") - (description "This package provides hyphenation patterns for Panjabi in -T1/EC encoding.") - ;; Can be used with either license. - (license (list license:expat license:lgpl3+ license:gpl3+)))) - -(define-public texlive-hyphen-piedmontese - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-piedmontese" "pms" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pms.tex") - (base32 - "0xva3l2gwzkqw1sz64k5g5iprhdyr27w1mv8rxp8x62i5y3aqr1k"))) - (synopsis "Piedmontese hyphenation patterns") - (description "This package provides hyphenation patterns for Piedmontese -in ASCII encoding. Compliant with 'Gramatica dla lengua piemonteisa' by -Camillo Brero.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-polish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-polish" "pl" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pl.tex") - (base32 - "1c22g99isxapv4xjrmsw24hhp1xb83wbgcxyd8j24mxdnizywxzm"))) - (synopsis "Polish hyphenation patterns") - (description "This package provides hyphenation patterns for Polish in QX -and UTF-8 encodings.") - ;; No differing license declared, so we choose the project license. - (license license:lppl))) - -(define-public texlive-hyphen-portuguese - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-portuguese" "pt" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pt.tex") - (base32 - "00rkjy4p7893zs940bq3s4hp7al0skgxqggj5qfax0bx8karf30b"))) - (synopsis "Portuguese hyphenation patterns") - (description "This package provides hyphenation patterns for Portuguese in -T1/EC and UTF-8 encodings.") - (license license:bsd-3))) - -(define-public texlive-hyphen-romanian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-romanian" "ro" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ro.tex") - (base32 - "1ykb5v7ip6p3n34wq8qypfyrap4gg946by5rsl6ab0k5gv6ypsbf"))) - (synopsis "Romanian hyphenation patterns") - (description "This package provides hyphenation patterns for Romanian in -T1/EC and UTF-8 encodings.") - ;; No differing license declared, so we choose the project license. - (license license:lppl))) - -(define-public texlive-hyphen-romansh - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-romansh" "rm" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex") - (base32 - "0a1q9p6sp5n6a9w6xhwk03vmkrrmnh2md7g1k4qhnf0dc4h7dy9r"))) - (synopsis "Romansh hyphenation patterns") - (description "This package provides hyphenation patterns for Romansh in -ASCII encodings. They are supposed to comply with the rules indicated by the -Lia Rumantscha (Romansh language society).") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-russian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-russian" "ru" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ru.tex") - (base32 - "00sy7qh5f8ryxw36fwbyd1yi2hxhv7hmk99yp7dwh73n4mxv6lpl"))) - (synopsis "Russian hyphenation patterns") - (description "This package provides hyphenation patterns for Russian in -T2A and UTF-8 encodings.") - (license license:lppl1.2+))) - -(define-public texlive-hyphen-sanskrit - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-sanskrit" "sa" - (list "/doc/generic/hyph-utf8/languages/sa/hyphenmin.txt" - "/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex") - (base32 - "1bkzj8swj4lbswf1vr4pb1jg6dixzs7p8h8zm8s8as52h442aida"))) - (synopsis "Sanskrit hyphenation patterns") - (description "This package provides hyphenation patterns for Sanskrit and -Prakrit in longdesc transliteration, and in Devanagari, Bengali, Kannada, -Malayalam longdesc and Telugu scripts for Unicode engines.") - ;; "You may freely use, copy, modify and/or distribute this file." - (license (license:non-copyleft - "file:///tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")))) - -(define-public texlive-hyphen-serbian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-serbian" '("sh-cyrl" "sh-latn" "sr-cyrl") - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sh-cyrl.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-sh-latn.tex" - "/tex/generic/hyph-utf8/patterns/tex/hyph-sr-cyrl.tex") - (base32 - "0pwc9z0m5y6acq1vqm0da9akg156jbhxzvsfp2f8bsz5b99y5z45"))) - (synopsis "Serbian hyphenation patterns") - (description "This package provides hyphenation patterns for Serbian in -T1/EC, T2A and UTF-8 encodings.") - ;; Any version of the GPL. - (license license:gpl3+))) - -(define-public texlive-hyphen-slovak - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-slovak" "sk" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sk.tex") - (base32 - "0ppp53bbclp5c8wvx748krvrp5y5053khgkjnnv966a90fvp3vgd"))) - (synopsis "Slovak hyphenation patterns") - (description "This package provides hyphenation patterns for Slovak in -T1/EC and UTF-8 encodings.") - (license license:gpl2+))) - -(define-public texlive-hyphen-slovenian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-slovenian" "sl" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sl.tex") - (base32 - "02n8l9yf4hqyhbpsc1n6b2mggy09z6lq4dcb8ndiwawb6h0mp7s4"))) - (synopsis "Slovenian hyphenation patterns") - (description "This package provides hyphenation patterns for Slovenian in -T1/EC and UTF-8 encodings.") - ;; Either license - (license (list license:lppl1.0+ license:expat)))) - -(define-public texlive-hyphen-spanish - (package - ;; The source files "eshyph-make.lua" and "eshyph.src" are provided to - ;; generate obsolete hyphenation patterns, which aren't included in a - ;; default TeX Live distribution, so we don't include them either. - (inherit (texlive-hyphen-package - "texlive-hyphen-spanish" "es" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-es.tex") - (base32 - "05lbvjkj304xxghyihk8js0kmg97ddlgijld3bp81bc28h4cav0v"))) - (synopsis "Hyphenation patterns for Spanish") - (description "The package provides hyphenation patterns for Spanish in -T1/EC and UTF-8 encodings.") - (license license:expat))) - -(define-public texlive-hyphen-swedish - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-swedish" "sv" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sv.tex") - (base32 - "1n7incy7n24pix1q2i8c3h7i78zpql5ayhskavlmy6mhd7ayncaw"))) - (synopsis "Swedish hyphenation patterns") - (description "This package provides hyphenation patterns for Swedish in -T1/EC and UTF-8 encodings.") - (license license:lppl1.2+))) - -(define-public texlive-hyphen-thai - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-thai" "th" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-th.tex") - (base32 - "00gxcs4jfqifd5cnrjipn77m73fmpw2qms4lp216jj3kz4a7h9kf"))) - (synopsis "Thai hyphenation patterns") - (description "This package provides hyphenation patterns for Thai in LTH -and UTF-8 encodings.") - (license license:lppl1.3+))) - -(define-public texlive-hyphen-turkish - (let ((template (texlive-hyphen-package - "texlive-hyphen-turkish" "tr" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tr.tex") - (base32 - "04sihjgpm31i5bi67rrfp15w3imn7hxwwk70v0vhx053ghxy72vh")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Turkish") - (description "The package provides hyphenation patterns for Turkish in -T1/EC and UTF-8 encodings. The patterns for Turkish were first produced for -the Ottoman Texts Project in 1987 and were suitable for both Modern Turkish -and Ottoman Turkish in Latin script, however the required character set didn't -fit into EC encoding, so support for Ottoman Turkish had to be dropped to keep -compatibility with 8-bit engines.") - (license license:lppl1.0+)))) - -(define-public texlive-hyphen-turkmen - (let ((template (texlive-hyphen-package - "texlive-hyphen-turkmen" "tk" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tk.tex") - (base32 - "0g5ip2lw9g47s61mv3cypswc6qm7zy9c4iqq4h19ysvds81adzkr")))) - (package - (inherit template) - (synopsis "Hyphenation patterns for Turkmen") - (description "The package provides hyphenation patterns for Turkmen in -T1/EC and UTF-8 encodings.") - (license license:expat)))) - -(define-public texlive-hyphen-ukrainian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-ukrainian" "uk" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-uk.tex") - (base32 - "0fbfhx1fmbshxr4ihsjaqgx251h69h7i288p8gh3w6ysgxr53p60"))) - (synopsis "Ukrainian hyphenation patterns") - (description "This package provides hyphenation patterns for Ukrainian in -T2A and UTF-8 encodings.") - ;; No version specified - (license license:lppl))) - -(define-public texlive-hyphen-uppersorbian - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-uppersorbian" "hsb" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hsb.tex") - (base32 - "0x0051wph3sqmzzw6prvjy6bp7gn02rbmys1bmbc210jk3pkylfj"))) - (synopsis "Upper Sorbian hyphenation patterns") - (description "This package provides hyphenation patterns for Upper Sorbian -in T1/EC and UTF-8 encodings.") - (license license:lppl1.3a+))) - -(define-public texlive-hyphen-welsh - (package - (inherit (texlive-hyphen-package - "texlive-hyphen-welsh" "cy" - (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cy.tex") - (base32 - "1bpxp3jiifdw7waw2idz5j9xgi3526nkxm8mbmsspr4mlf2xyr76"))) - (synopsis "Welsh hyphenation patterns") - (description "This package provides hyphenation patterns for Welsh in -T1/EC and UTF-8 encodings.") - ;; Either license - (license (list license:lppl1.0+ license:expat)))) - -(define-public texlive-hyph-utf8 - (package - (name "texlive-hyph-utf8") - (version (number->string %texlive-revision)) - (source (texlive-origin - name version - (list "doc/luatex/hyph-utf8/" - "source/generic/hyph-utf8/" - "source/generic/hyph-utf8/contributed/" - "source/generic/hyph-utf8/data/" - "source/luatex/hyph-utf8/" - "tex/luatex/hyph-utf8/" - ;; Documentation; we can't use the whole directory because - ;; it includes files from other packages. - "doc/generic/hyph-utf8/CHANGES" - "doc/generic/hyph-utf8/HISTORY" - "doc/generic/hyph-utf8/hyph-utf8.pdf" - "doc/generic/hyph-utf8/hyph-utf8.tex" - "doc/generic/hyph-utf8/hyphenation-distribution.pdf" - "doc/generic/hyph-utf8/hyphenation-distribution.tex" - "doc/generic/hyph-utf8/img/miktex-languages.png" - "doc/generic/hyph-utf8/img/texlive-collection.png") - (base32 - "1dm023k05c0pnnyqgbsy1cbpq8layabdp8acln0v59kpsx7flmj9"))) - (outputs '("out" "doc")) - (build-system gnu-build-system) - (arguments - (list - #:tests? #f ; there are none - #:modules '((guix build gnu-build-system) - (guix build utils) - (ice-9 match)) - #:make-flags - #~(list "-C" "source/luatex/hyph-utf8/" - (string-append "DO_TEX = tex --interaction=nonstopmode '&tex' $<") - (string-append "RUNDIR =" (assoc-ref %outputs "out") "/share/texmf-dist/tex/luatex/hyph-utf8/") - (string-append "DOCDIR =" (assoc-ref %outputs "doc") "/share/texmf-dist/doc/luatex/hyph-utf8/") - ;; hyphen.cfg is neither included nor generated, so let's only build the lua file. - (string-append "UNPACKED = $(NAME).lua")) - #:phases - #~(modify-phases %standard-phases - ;; TeX isn't usable at this point, so we first need to generate the - ;; tex.fmt. - (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Target directories must exist. - (mkdir-p (string-append (assoc-ref %outputs "out") - "/share/texmf-dist/tex/luatex/hyph-utf8/")) - (mkdir-p (string-append (assoc-ref %outputs "doc") - "/share/texmf-dist/doc/luatex/hyph-utf8/")) - - ;; We cannot build the documentation because that requires a - ;; fully functional pdflatex, which depends on this package. - (substitute* "source/luatex/hyph-utf8/Makefile" - (("all: .*") "all: $(RUNFILES)\n")) - - ;; Find required fonts for building tex.fmt - (setenv "TFMFONTS" - (string-append (assoc-ref inputs "texlive-cm") - "/share/texmf-dist/fonts/tfm/public/cm:" - (assoc-ref inputs "texlive-knuth-lib") - "/share/texmf-dist/fonts/tfm/public/knuth-lib")) - ;; ...and find all tex files in this environment. - (setenv "TEXINPUTS" - (string-append - (getcwd) ":" - (string-join - (map (match-lambda ((_ . dir) dir)) inputs) - "//:"))) - - ;; Generate tex.fmt. - (let ((where "source/luatex/hyph-utf8")) - (mkdir-p where) - (with-directory-excursion where - (invoke "tex" "-ini" - (string-append (assoc-ref inputs "texlive-plain") - "/share/texmf-dist/tex/plain/config/tex.ini")))))) - (add-before 'build 'build-loaders-and-converters - (lambda _ - (let* ((root (string-append #$output "/share/texmf-dist")) - (conv - (string-append root "/tex/generic/hyph-utf8/conversions"))) - - ;; Build converters - (mkdir-p conv) - (with-directory-excursion "source/generic/hyph-utf8" - (substitute* "generate-converters.rb" - (("\\$path_root=File.*") - (string-append "$path_root=\"" root "\"\n")) - ;; Avoid error with newer Ruby. - (("#1\\{%") "#1{%%")) - (invoke "ruby" "generate-converters.rb"))))) - (replace 'install - (lambda* (#:key source #:allow-other-keys) - (mkdir-p #$output:doc) - (copy-recursively - (string-append source "/doc") - (string-append #$output:doc "/doc")) - (install-file - (string-append source "/tex/luatex/hyph-utf8/etex.src") - (string-append #$output "/share/texmf-dist/tex/luatex/hyph-utf8/"))))))) - (native-inputs - (list ruby-2.7 - texlive-bin - ;; The following packages are needed for build "tex.fmt", which we - ;; need for a working "tex". - texlive-cm - texlive-docstrip - texlive-knuth-lib - texlive-hyphen-base - texlive-plain)) - (home-page "https://ctan.org/pkg/hyph-utf8") - (synopsis "Hyphenation patterns expressed in UTF-8") - (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need -hyphenation patterns in UTF-8 format, whereas older systems require -hyphenation patterns in the 8-bit encoding of the font in use (such encodings -are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1, -etc). The present package offers a collection of conversions of existing -patterns to UTF-8 format, together with converters for use with 8-bit fonts in -older systems. Since hyphenation patterns for Knuthian-style TeX systems are -only read at iniTeX time, it is hoped that the UTF-8 patterns, with their -converters, will completely supplant the older patterns.") - ;; Individual files each have their own license. Most of these files are - ;; independent hyphenation patterns. - (license (list license:lppl1.0+ - license:lppl1.2+ - license:lppl1.3 - license:lppl1.3+ - license:lppl1.3a+ - license:lgpl2.1 - license:lgpl2.1+ - license:lgpl3+ - license:gpl2+ - license:gpl3+ - license:mpl1.1 - license:asl2.0 - license:expat - license:bsd-3 - license:cc0 - license:public-domain - license:wtfpl2)))) - -(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyph-utf8) - -(define-public texlive-dehyph - (package - (name "texlive-dehyph") - (version (number->string %texlive-revision)) - (source (texlive-origin - name version - (list "tex/generic/dehyph/") - (base32 - "0fkqlsknrlxk8zazcqy4q3nisxr3a4x21aiwqhz8s237rdf3w39g"))) - (build-system texlive-build-system) - (home-page "https://ctan.org/pkg/dehyph") - (synopsis "German hyphenation patterns for traditional orthography") - (description - "The package provides older hyphenation patterns for the German language. -Please note that by default only pdfLaTeX uses these patterns (mainly for -backwards compatibility). The older packages ghyphen and gnhyph are now -bundled together with dehyph, and are no longer be updated. Both XeLaTeX and -LuaLaTeX use the current German hyphenation patterns taken from Hyphenation -patterns in UTF-8, and using the Experimental hyphenation patterns for the -German language package it is possible to make pdfLaTeX use the new German -patterns as well.") - (license license:lppl1.0+))) - -(define-public texlive-dehyph-exptl - (package - (name "texlive-dehyph-exptl") - (version (number->string %texlive-revision)) - (source (texlive-origin - name version - (list "doc/generic/dehyph-exptl/" - "tex/generic/dehyph-exptl/") - (base32 - "0l57a0r4gycp94kz6lrxqvh9m57j2shmbr2laf5zjb0qnrisq46d"))) - (outputs '("out" "doc")) - (build-system texlive-build-system) - (arguments (list #:texlive-latex-base #f)) - (propagated-inputs (list texlive-hyph-utf8 texlive-hyphen-base)) - (home-page "https://ctan.org/pkg/dehyph-exptl") - (synopsis "Hyphenation patterns for German") - (description - "The package provides experimental hyphenation patterns for the German -language, covering both traditional and reformed orthography. The patterns -can be used with packages Babel and @code{hyphsubst} from the Oberdiek -bundle.") - ;; Hyphenation patterns are under the Expat license; documentation is - ;; under LPPL. - (license (list license:expat license:lppl)))) - -(define-deprecated-package texlive-generic-dehyph-exptl texlive-dehyph-exptl) - -(define-public texlive-ukrhyph - (package - (name "texlive-ukrhyph") - (version (number->string %texlive-revision)) - (source (texlive-origin - name version - (list "doc/generic/ukrhyph/" "tex/generic/ukrhyph/") - (base32 - "01ma274sixcrbpb7fpqkxwfvrnzfj2srv9b4a42rfnph1pdql74z"))) - (outputs '("out" "doc")) - (build-system texlive-build-system) - (arguments (list #:texlive-latex-base #f)) - (home-page "https://ctan.org/pkg/ukrhyph") - (synopsis "Hyphenation Patterns for Ukrainian") - (description "The package provides a range of hyphenation patterns for -Ukrainian, depending on the encoding of the output font including the standard -T2A.") - (license license:lppl))) - -(define-public texlive-ruhyphen - (package - (name "texlive-ruhyphen") - (version (number->string %texlive-revision)) - (source (texlive-origin - name version - (list "source/generic/ruhyphen/" - "tex/generic/ruhyphen/") - (base32 - "18n1bqhh8jv765vz3a3fjwffy7m71vhwx9yq8zl0p5j7p72q9qcn"))) - (build-system texlive-build-system) - (arguments (list #:texlive-latex-base #f)) - (home-page "https://ctan.org/pkg/ruhyphen") - (synopsis "Hyphenation patterns for Russian") - (description "The package provides a collection of Russian hyphenation -patterns supporting a number of Cyrillic font encodings, including T2, -UCY (Omega Unicode Cyrillic), LCY, LWN (OT2), and koi8-r.") - (license license:lppl))) - (define-public texlive-inputenx (package (name "texlive-inputenx") -- cgit 1.4.1 From 3aeca58073eff8b7a835f6492e735dd152d9dc99 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 19 Jun 2023 14:43:56 +0200 Subject: gnu: biber -> texlive-biber. Build from sources provided by TeX Live distribution, so they always match BibLaTeX version. * gnu/packages/patches/biber-adapt-perl-5.36.patch: Delete file. * gnu/local.mk: Apply removal. * gnu/packages/tex.scm (texlive-biber): New variable. (biber): Deprecate variable. (perl-text-bibtex): Move from here... * gnu/packages/perl.scm (perl-text-bibtex): ... to here. --- gnu/local.mk | 1 - gnu/packages/patches/biber-adapt-perl-5.36.patch | 40 ------- gnu/packages/perl.scm | 40 +++++++ gnu/packages/tex.scm | 136 +++++++++-------------- 4 files changed, 95 insertions(+), 122 deletions(-) delete mode 100644 gnu/packages/patches/biber-adapt-perl-5.36.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a56864be86..f2ef72c10a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -957,7 +957,6 @@ dist_patch_DATA = \ %D%/packages/patches/bsd-games-stdio.h.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ - %D%/packages/patches/biber-adapt-perl-5.36.patch \ %D%/packages/patches/bidiv-update-fribidi.patch \ %D%/packages/patches/binutils-boot-2.20.1a.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ diff --git a/gnu/packages/patches/biber-adapt-perl-5.36.patch b/gnu/packages/patches/biber-adapt-perl-5.36.patch deleted file mode 100644 index 895813c1f2..0000000000 --- a/gnu/packages/patches/biber-adapt-perl-5.36.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d9e961710074d266ad6bdf395c98868d91952088 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 25 May 2022 12:41:59 +0200 -Subject: [PATCH] Adapt to Perl 5.36 - -A developmental release of Perl 5.36.0 fails to run tests with: - - $ perl -Ilib t/basic-misc.t - 1..72 - Can't modify undef operator in scalar assignment at lib/Biber/Section.pm line 433, near "undef;" - Compilation failed in require at lib/Biber.pm line 24. - BEGIN failed--compilation aborted at lib/Biber.pm line 24. - Compilation failed in require at t/basic-misc.t line 11. - BEGIN failed--compilation aborted at t/basic-misc.t line 11. - # Looks like your test exited with 255 before it could output anything. - -This is because of a missing semicolon between commands in -del_everykeys(). The new perl is more strict and raises a compile-time -error: - - $ perl -e '$a = undef $b = undef;' - Can't modify undef operator in scalar assignment at -e line 1, near "undef;" - Execution of -e aborted due to compilation errors. ---- - lib/Biber/Section.pm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/Biber/Section.pm b/lib/Biber/Section.pm -index 03ed69a51..a78942f57 100644 ---- a/lib/Biber/Section.pm -+++ b/lib/Biber/Section.pm -@@ -429,7 +429,7 @@ sub add_everykey { - - sub del_everykeys { - my $self = shift; -- $self->{everykey} = undef -+ $self->{everykey} = undef; - $self->{everykey_lc} = undef; - return; - } diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 13bf3fa84c..57852a3cee 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -10631,6 +10631,46 @@ used to justify strings to various alignment styles.") text sequences from strings.") (license (package-license perl)))) +(define-public perl-text-bibtex + (package + (name "perl-text-bibtex") + (version "0.88") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-" + version ".tar.gz")) + (sha256 + (base32 + "0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h")))) + (build-system perl-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'add-output-directory-to-rpath + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "inc/MyBuilder.pm" + (("-Lbtparse" line) + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib " line))) + #t)) + (add-after 'unpack 'install-libraries-to-/lib + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Build.PL" + (("lib64") "lib")) + #t))))) + (native-inputs + (list perl-capture-tiny perl-config-autoconf perl-extutils-libbuilder + perl-module-build)) + (home-page "https://metacpan.org/release/Text-BibTeX") + (synopsis "Interface to read and parse BibTeX files") + (description "@code{Text::BibTeX} is a Perl library for reading, parsing, +and processing BibTeX files. @code{Text::BibTeX} gives you access to the data +at many different levels: you may work with BibTeX entries as simple field to +string mappings, or get at the original form of the data as a list of simple +values (strings, macros, or numbers) pasted together.") + (license license:perl-license))) + (define-public perl-text-charwidth (package (name "perl-text-charwidth") diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 30ce70619b..bd81c33bee 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -9515,78 +9515,56 @@ This package contains the complete TeX Live distribution.") (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) (home-page "https://www.tug.org/texlive/"))) -(define-public perl-text-bibtex +(define-public texlive-biber (package - (name "perl-text-bibtex") - (version "0.88") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-" - version ".tar.gz")) - (sha256 - (base32 - "0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h")))) - (build-system perl-build-system) + (name "texlive-biber") + (version (number->string %texlive-revision)) + (source (texlive-origin + name version + (list "doc/bibtex/biber/" "source/bibtex/biber/") + (base32 + "0i1hqr9zb7b9d1zjlyg4awa6mkyq6wnrb6z4689j1rg07vnbd7mw"))) + (outputs '("out" "doc")) + (build-system texlive-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'add-output-directory-to-rpath - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "inc/MyBuilder.pm" - (("-Lbtparse" line) - (string-append "-Wl,-rpath=" - (assoc-ref outputs "out") "/lib " line))) - #t)) - (add-after 'unpack 'install-libraries-to-/lib - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Build.PL" - (("lib64") "lib")) - #t))))) + (list + #:tests? #true + #:imported-modules `(,@%texlive-build-system-modules + (guix build perl-build-system)) + #:modules '((guix build texlive-build-system) + ((guix build perl-build-system) #:prefix perl:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-biber-source + (lambda _ + (mkdir-p "build") + (with-directory-excursion "build" + (invoke "tar" "xvf" + "../source/bibtex/biber/biblatex-biber.tar.gz" + "--strip-components=1")))) + (add-after 'unpack-biber-source 'build-biber + (lambda args + (with-directory-excursion "build" + (for-each (lambda (phase) + (apply (assoc-ref perl:%standard-phases phase) args)) + '(configure build check install))))) + (add-after 'install 'wrap-programs + (lambda _ + (let ((perl5lib (getenv "PERL5LIB"))) + (wrap-program (string-append #$output "/bin/biber") + `("PERL5LIB" ":" prefix + (,(string-append perl5lib ":" + #$output "/lib/perl5/site_perl")))))))))) (native-inputs - (list perl-capture-tiny perl-config-autoconf perl-extutils-libbuilder - perl-module-build)) - (home-page "https://metacpan.org/release/Text-BibTeX") - (synopsis "Interface to read and parse BibTeX files") - (description "@code{Text::BibTeX} is a Perl library for reading, parsing, -and processing BibTeX files. @code{Text::BibTeX} gives you access to the data -at many different levels: you may work with BibTeX entries as simple field to -string mappings, or get at the original form of the data as a list of simple -values (strings, macros, or numbers) pasted together.") - (license license:perl-license))) - -(define-public biber - (package - ;; Note: When updating Biber, make sure it matches our BibLaTeX version by - ;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual - ;; at . - (name "biber") - (version "2.16") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/plk/biber/") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0586q8y1f2k23mvb02ccm3qsb35cwskafksixsjaih7a7xcf5gxx")) - (patches (search-patches "biber-adapt-perl-5.36.patch")))) - (build-system perl-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'wrap-programs - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (perl5lib (getenv "PERL5LIB"))) - (wrap-program (string-append out "/bin/biber") - `("PERL5LIB" ":" prefix - (,(string-append perl5lib ":" out - "/lib/perl5/site_perl"))))) - #t))))) + (list perl-config-autoconf + perl-extutils-libbuilder + perl-file-which + perl-module-build + perl-test-differences)) (inputs - (list perl-autovivification + (list perl + perl-autovivification perl-class-accessor perl-data-dump perl-data-compare @@ -9625,19 +9603,15 @@ values (strings, macros, or numbers) pasted together.") perl-business-issn perl-business-ismn perl-lingua-translit)) - (native-inputs - `(("perl-config-autoconf" ,perl-config-autoconf) - ("perl-extutils-libbuilder" ,perl-extutils-libbuilder) - ("perl-module-build" ,perl-module-build) - ;; for tests - ("perl-file-which" ,perl-file-which) - ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient - ("perl-test-differences" ,perl-test-differences))) - (home-page "https://biblatex-biber.sourceforge.net/") - (synopsis "Backend for the BibLaTeX citation management tool") - (description "Biber is a BibTeX replacement for users of biblatex. Among -other things it comes with full Unicode support.") - (license license:artistic2.0))) + (home-page "https://ctan.org/pkg/biber") + (synopsis "BibTeX replacement for users of BibLaTeX") + (description + "Biber is a BibTeX replacement for users of BibLaTeX. It supports full +UTF-8, can (re)-encode input and output, supports highly configurable sorting, +dynamic bibliography sets and many other features.") + (license license:gpl3+))) + +(define-deprecated-package biber texlive-biber) (define-public rubber (package -- cgit 1.4.1 From b0d47d9e18e52ff7935aebe6ab37e702f58101be Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 2 Jul 2023 18:20:39 -0700 Subject: gnu: u-boot: Update to 2023.07.02. * gnu/packages/patches/u-boot-infodocs-target.patch: Delete file. * gnu/packages/patches/u-boot-patman-guix-integration.patch: Delete file. * gnu/local.mk: De-register patches. * gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh. * gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Refresh. * gnu/packages/bootloaders.scm (u-boot): Update to 2023.07.02. [native-inputs]: Add python-pyelftools. [source]: Remove patches. (u-boot-tools)[phases]: Update substitution for python3-coverage. Adjust 'patch to catch more openssl incompatibilities. Split lines in 'patch phase. [native-inputs]: Add python-filelock and python-pytest-xdist. (make-u-boot-sunxi64-package): Set SCP environment variable. (u-boot-sifive-unleashed): Update to use opensbi. (u-boot-puma-rk3399)[inputs]: Add arm-trusted-firmware-rk3399 to package-inputs instead of native-inputs. (u-boot-rockpro64-rk3399): Disable CONFIG_SPL_FIT_SIGNATURE in config. Reviewed-by: Maxim Cournoyer --- gnu/local.mk | 2 - gnu/packages/bootloaders.scm | 55 +- .../patches/u-boot-allow-disabling-openssl.patch | 13 +- gnu/packages/patches/u-boot-infodocs-target.patch | 84 -- .../patches/u-boot-patman-guix-integration.patch | 1244 -------------------- .../u-boot-sifive-prevent-reloc-initrd-fdt.patch | 8 +- 6 files changed, 54 insertions(+), 1352 deletions(-) delete mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch delete mode 100644 gnu/packages/patches/u-boot-patman-guix-integration.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f2ef72c10a..cdce2666e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2005,8 +2005,6 @@ dist_patch_DATA = \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-fix-build-python-3.10.patch \ - %D%/packages/patches/u-boot-infodocs-target.patch \ - %D%/packages/patches/u-boot-patman-guix-integration.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 01fd1093ff..966f1787f8 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -648,23 +648,21 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2022.10") + (version "2023.07.02") (source (origin (patches (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt %u-boot-rk3399-enable-emmc-phy-patch - (search-patch "u-boot-fix-build-python-3.10.patch") - (search-patch "u-boot-infodocs-target.patch") - (search-patch "u-boot-patman-guix-integration.patch"))) + (search-patch "u-boot-fix-build-python-3.10.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" "u-boot-" version ".tar.bz2")) (sha256 (base32 - "1y5x8vxdgsqdqlsvq01mn8lmw53fqairkhvhhjx83hjva0m4id2h")))) + "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb")))) (build-system gnu-build-system) (native-inputs (list bison @@ -676,6 +674,7 @@ tree binary files. These are board description files used by Linux and BSD.") perl pkg-config ;for 'make menuconfig' python + python-pyelftools swig (list util-linux "lib"))) (home-page "https://www.denx.de/wiki/U-Boot/") @@ -726,7 +725,12 @@ Info manual."))) (name "u-boot-tools") (native-inputs (modify-inputs (package-native-inputs u-boot) - (prepend python-coverage python-pycryptodomex python-pytest sdl2))) + (prepend python-coverage + python-filelock + python-pycryptodomex + python-pytest + python-pytest-xdist + sdl2))) (arguments `(#:make-flags '("HOSTCC=gcc") #:test-target "tcheck" @@ -739,7 +743,7 @@ Info manual."))) (("/bin/false") (which "false"))) (substitute* "tools/dtoc/fdt_util.py" (("'cc'") "'gcc'")) - (substitute* "tools/patman/test_util.py" + (substitute* "tools/u_boot_pylib/test_util.py" ;; python3-coverage is simply called coverage in guix. (("python3-coverage") "coverage") @@ -777,7 +781,16 @@ def test_ctrl_c")) ;; See https://bugs.gnu.org/34717 for ;; details. (("CONFIG_FIT_SIGNATURE=y") - "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n") + "CONFIG_FIT_SIGNATURE=n +CONFIG_UT_LIB_ASN1=n +CONFIG_TOOLS_LIBCRYPTO=n") + ;; Catch instances of implied CONFIG_FIG_SIGNATURE + ;; with VPL targets + (("CONFIG_SANDBOX_VPL=y") + "CONFIG_SANDBOX_VPL=y +CONFIG_FIT_SIGNATURE=n +CONFIG_VPL_FIT_SIGNATURE=n +CONFIG_TOOLS_LIBCRYPTO=n") ;; This test requires a sound system, which is un-used ;; in u-boot-tools. (("CONFIG_SOUND=y") "CONFIG_SOUND=n"))) @@ -1009,6 +1022,9 @@ removed so that it fits within common partitioning schemes."))) #~(modify-phases #$phases (add-after 'unpack 'set-environment (lambda* (#:key native-inputs inputs #:allow-other-keys) + ;; Avoid dependency on crust-firmware + ;; https://issues.guix.gnu.org/48371 + (setenv "SCP" "/dev/null") (setenv "BL31" (search-input-file inputs "bl31.bin")))))))) (inputs (modify-inputs (package-inputs base) @@ -1104,7 +1120,7 @@ partition.")) (delete 'strip) (delete 'validate-runpath))))) (inputs - (modify-inputs (package-native-inputs base) + (modify-inputs (package-inputs base) (append arm-trusted-firmware-rk3399)))))) (define-public u-boot-qemu-arm @@ -1170,7 +1186,20 @@ Documentation} for more information (for example by running @samp{info (append sdl2)))))) (define-public u-boot-sifive-unleashed - (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")) + (let ((base (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + (setenv "OPENSBI" (search-input-file inputs + "fw_dynamic.bin")))))))) + (inputs + (modify-inputs (package-inputs base) + (append opensbi-generic)))))) (define-public u-boot-sifive-unmatched (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))) @@ -1230,7 +1259,11 @@ Documentation} for more information (for example by running @samp{info "CONFIG_SATA_SIL=y" "CONFIG_SCSI=y" "CONFIG_SCSI_AHCI=y" - "CONFIG_DM_SCSI=y")))) + "CONFIG_DM_SCSI=y" + ;; Disable SPL FIT signatures, + ;; due to GPLv2 and Openssl + ;; license incompatibilities + "# CONFIG_SPL_FIT_SIGNATURE is not set")))) (package (inherit base) (arguments diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch index 5f2856dbb4..5195a7a6f8 100644 --- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch +++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch @@ -128,29 +128,28 @@ index 94b7685392..eec599b0ee 100644 datai = 0; for (cfgi = 0; cfgi < cfgn; cfgi++) { e = &image_cfg[cfgi]; -@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, +@@ -1624,10 +1640,12 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, &datai, delay); } +#if defined(CONFIG_KWB_SECURE) - if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz, - headersz, image, secure_hdr)) + if (secure_hdr && add_secure_header_v1(params, ptr + *dataoff, payloadsz, + image, headersz, secure_hdr)) return NULL; +#endif - *imagesz = headersz; + /* Calculate and set the header checksum */ + main_hdr->checksum = image_checksum8(main_hdr, headersz); --- a/tools/image-host.c +++ b/tools/image-host.c -@@ -14,10 +14,12 @@ +@@ -14,8 +14,10 @@ #include #include +#ifdef CONFIG_FIT_PRELOAD #include #include - - #define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig" +#endif /** diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch deleted file mode 100644 index 5b21a99de3..0000000000 --- a/gnu/packages/patches/u-boot-infodocs-target.patch +++ /dev/null @@ -1,84 +0,0 @@ -Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333259 - -diff --git a/Makefile b/Makefile -index de5746399a..597a8886c3 100644 ---- a/Makefile -+++ b/Makefile -@@ -2372,7 +2372,7 @@ tcheck: - # Documentation targets - # --------------------------------------------------------------------------- - DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \ -- linkcheckdocs dochelp refcheckdocs -+ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs - PHONY += $(DOC_TARGETS) - $(DOC_TARGETS): scripts_basic FORCE - $(Q)$(MAKE) $(build)=doc $@ -diff --git a/doc/Makefile b/doc/Makefile -index f5de65e927..d0904a9f99 100644 ---- a/doc/Makefile -+++ b/doc/Makefile -@@ -69,6 +69,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) - htmldocs: - @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) - -+texinfodocs: -+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var))) -+ -+# Note: the 'info' Make target is generated by sphinx itself when -+# running the texinfodocs target defined above. -+infodocs: texinfodocs -+ $(MAKE) -C $(BUILDDIR)/texinfo info -+ - linkcheckdocs: - @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) - -@@ -109,6 +117,8 @@ cleandocs: - dochelp: - @echo ' U-Boot documentation in different formats from ReST:' - @echo ' htmldocs - HTML' -+ @echo ' texinfodocs - Texinfo' -+ @echo ' infodocs - Info' - @echo ' latexdocs - LaTeX' - @echo ' pdfdocs - PDF' - @echo ' epubdocs - EPUB' -diff --git a/doc/conf.py b/doc/conf.py -index 62c8d31270..3db70f80c1 100644 ---- a/doc/conf.py -+++ b/doc/conf.py -@@ -449,7 +449,7 @@ for fn in os.listdir('.'): - # One entry per manual page. List of tuples - # (source start file, name, description, authors, manual section). - man_pages = [ -- (master_doc, 'dasuboot', 'The U-Boot Documentation', -+ (master_doc, 'u-boot', 'The U-Boot Documentation', - [author], 1) - ] - -@@ -463,8 +463,8 @@ man_pages = [ - # (source start file, target name, title, author, - # dir menu entry, description, category) - texinfo_documents = [ -- (master_doc, 'DasUBoot', 'The U-Boot Documentation', -- author, 'DasUBoot', 'One line description of project.', -+ (master_doc, 'u-boot', 'The U-Boot Documentation', -+ author, 'U-Boot', 'Boot loader for embedded systems', - 'Miscellaneous'), - ] - -diff --git a/doc/media/Makefile b/doc/media/Makefile -index b9b43a34c3..9b32258696 100644 ---- a/doc/media/Makefile -+++ b/doc/media/Makefile -@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke - - # Media build rules - --.PHONY: all html epub xml latex -+.PHONY: all html texinfo epub xml latex - - all: $(IMGDOT) $(BUILDDIR) ${TARGETS} - html: all -+texinfo: all - epub: all - xml: all - latex: $(IMGPDF) all diff --git a/gnu/packages/patches/u-boot-patman-guix-integration.patch b/gnu/packages/patches/u-boot-patman-guix-integration.patch deleted file mode 100644 index 3472656c99..0000000000 --- a/gnu/packages/patches/u-boot-patman-guix-integration.patch +++ /dev/null @@ -1,1244 +0,0 @@ -These changes correspond to commits 9ff7500ace..3154de3dd6 already merged to -the u-boot-dm custodian repo (at -https://source.denx.de/u-boot/custodians/u-boot-dm/-/commits/next), scheduled -to be pulled after the next release. - -diff --git a/tools/patman/__init__.py b/tools/patman/__init__.py -index c9d3e35052..1b98ec7fee 100644 ---- a/tools/patman/__init__.py -+++ b/tools/patman/__init__.py -@@ -1,6 +1,6 @@ - # SPDX-License-Identifier: GPL-2.0+ - - __all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess', -- 'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream', -+ 'func_test', 'get_maintainer', 'gitutil', '__main__', 'patchstream', - 'project', 'series', 'setup', 'settings', 'terminal', - 'test_checkpatch', 'test_util', 'tools', 'tout'] -diff --git a/tools/patman/main.py b/tools/patman/__main__.py -similarity index 89% -rename from tools/patman/main.py -rename to tools/patman/__main__.py -index 8067a288ab..749e6348b6 100755 ---- a/tools/patman/main.py -+++ b/tools/patman/__main__.py -@@ -7,6 +7,7 @@ - """See README for more information""" - - from argparse import ArgumentParser -+import importlib.resources - import os - import re - import sys -@@ -19,6 +20,7 @@ if __name__ == "__main__": - - # Our modules - from patman import control -+from patman import func_test - from patman import gitutil - from patman import project - from patman import settings -@@ -53,7 +55,8 @@ parser.add_argument('-H', '--full-help', action='store_true', dest='full_help', - default=False, help='Display the README file') - - subparsers = parser.add_subparsers(dest='cmd') --send = subparsers.add_parser('send') -+send = subparsers.add_parser( -+ 'send', help='Format, check and email patches (default command)') - send.add_argument('-i', '--ignore-errors', action='store_true', - dest='ignore_errors', default=False, - help='Send patches email even if patch errors are found') -@@ -62,6 +65,12 @@ send.add_argument('-l', '--limit-cc', dest='limit', type=int, default=None, - send.add_argument('-m', '--no-maintainers', action='store_false', - dest='add_maintainers', default=True, - help="Don't cc the file maintainers automatically") -+send.add_argument( -+ '--get-maintainer-script', dest='get_maintainer_script', type=str, -+ action='store', -+ default=os.path.join(gitutil.get_top_level(), 'scripts', -+ 'get_maintainer.pl') + ' --norolestats', -+ help='File name of the get_maintainer.pl (or compatible) script.') - send.add_argument('-n', '--dry-run', action='store_true', dest='dry_run', - default=False, help="Do a dry run (create but don't email patches)") - send.add_argument('-r', '--in-reply-to', type=str, action='store', -@@ -94,9 +103,11 @@ send.add_argument('--smtp-server', type=str, - - send.add_argument('patchfiles', nargs='*') - --test_parser = subparsers.add_parser('test', help='Run tests') --test_parser.add_argument('testname', type=str, default=None, nargs='?', -- help="Specify the test to run") -+# Only add the 'test' action if the test data files are available. -+if os.path.exists(func_test.TEST_DATA_DIR): -+ test_parser = subparsers.add_parser('test', help='Run tests') -+ test_parser.add_argument('testname', type=str, default=None, nargs='?', -+ help="Specify the test to run") - - status = subparsers.add_parser('status', - help='Check status of patches in patchwork') -@@ -113,7 +124,7 @@ status.add_argument('-f', '--force', action='store_true', - argv = sys.argv[1:] - args, rest = parser.parse_known_args(argv) - if hasattr(args, 'project'): -- settings.Setup(gitutil, parser, args.project, '') -+ settings.Setup(parser, args.project) - args, rest = parser.parse_known_args(argv) - - # If we have a command, it is safe to parse all arguments -@@ -160,11 +171,8 @@ elif args.cmd == 'send': - fd.close() - - elif args.full_help: -- tools.print_full_help( -- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), -- 'README.rst') -- ) -- -+ with importlib.resources.path('patman', 'README.rst') as readme: -+ tools.print_full_help(str(readme)) - else: - # If we are not processing tags, no need to warning about bad ones - if not args.process_tags: -diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py -index d1b902dd96..012c0d895c 100644 ---- a/tools/patman/checkpatch.py -+++ b/tools/patman/checkpatch.py -@@ -211,7 +211,7 @@ def check_patch(fname, verbose=False, show_types=False, use_tree=False): - stdout: Full output of checkpatch - """ - chk = find_check_patch() -- args = [chk] -+ args = [chk, '--u-boot', '--strict'] - if not use_tree: - args.append('--no-tree') - if show_types: -diff --git a/tools/patman/control.py b/tools/patman/control.py -index bf426cf7bc..38e98dab84 100644 ---- a/tools/patman/control.py -+++ b/tools/patman/control.py -@@ -94,8 +94,8 @@ def check_patches(series, patch_files, run_checkpatch, verbose, use_tree): - - - def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, -- ignore_bad_tags, add_maintainers, limit, dry_run, in_reply_to, -- thread, smtp_server): -+ ignore_bad_tags, add_maintainers, get_maintainer_script, limit, -+ dry_run, in_reply_to, thread, smtp_server): - """Email patches to the recipients - - This emails out the patches and cover letter using 'git send-email'. Each -@@ -123,6 +123,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, - ignore_bad_tags (bool): True to just print a warning for unknown tags, - False to halt with an error - add_maintainers (bool): Run the get_maintainer.pl script for each patch -+ get_maintainer_script (str): The script used to retrieve which -+ maintainers to cc - limit (int): Limit on the number of people that can be cc'd on a single - patch or the cover letter (None if no limit) - dry_run (bool): Don't actually email the patches, just print out what -@@ -134,7 +136,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, - smtp_server (str): SMTP server to use to send patches (None for default) - """ - cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags, -- add_maintainers, limit) -+ add_maintainers, limit, get_maintainer_script) - - # Email the patches out (giving the user time to check / cancel) - cmd = '' -@@ -174,8 +176,8 @@ def send(args): - email_patches( - col, series, cover_fname, patch_files, args.process_tags, - its_a_go, args.ignore_bad_tags, args.add_maintainers, -- args.limit, args.dry_run, args.in_reply_to, args.thread, -- args.smtp_server) -+ args.get_maintainer_script, args.limit, args.dry_run, -+ args.in_reply_to, args.thread, args.smtp_server) - - def patchwork_status(branch, count, start, end, dest_branch, force, - show_comments, url): -diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py -index 7b92bc67be..c25a47bdeb 100644 ---- a/tools/patman/func_test.py -+++ b/tools/patman/func_test.py -@@ -6,7 +6,9 @@ - - """Functional tests for checking that patman behaves correctly""" - -+import contextlib - import os -+import pathlib - import re - import shutil - import sys -@@ -28,6 +30,21 @@ from patman.test_util import capture_sys_output - import pygit2 - from patman import status - -+PATMAN_DIR = pathlib.Path(__file__).parent -+TEST_DATA_DIR = PATMAN_DIR / 'test/' -+ -+ -+@contextlib.contextmanager -+def directory_excursion(directory): -+ """Change directory to `directory` for a limited to the context block.""" -+ current = os.getcwd() -+ try: -+ os.chdir(directory) -+ yield -+ finally: -+ os.chdir(current) -+ -+ - class TestFunctional(unittest.TestCase): - """Functional tests for checking that patman behaves correctly""" - leb = (b'Lord Edmund Blackadd\xc3\xabr '. -@@ -57,8 +74,7 @@ class TestFunctional(unittest.TestCase): - Returns: - str: Full path to file in the test directory - """ -- return os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), -- 'test', fname) -+ return TEST_DATA_DIR / fname - - @classmethod - def _get_text(cls, fname): -@@ -200,6 +216,8 @@ class TestFunctional(unittest.TestCase): - text = self._get_text('test01.txt') - series = patchstream.get_metadata_for_test(text) - cover_fname, args = self._create_patches_for_test(series) -+ get_maintainer_script = str(pathlib.Path(__file__).parent.parent.parent -+ / 'get_maintainer.pl') + ' --norolestats' - with capture_sys_output() as out: - patchstream.fix_patches(series, args) - if cover_fname and series.get('cover'): -@@ -207,7 +225,7 @@ class TestFunctional(unittest.TestCase): - series.DoChecks() - cc_file = series.MakeCcFile(process_tags, cover_fname, - not ignore_bad_tags, add_maintainers, -- None) -+ None, get_maintainer_script) - cmd = gitutil.email_patches( - series, cover_fname, args, dry_run, not ignore_bad_tags, - cc_file, in_reply_to=in_reply_to, thread=None) -@@ -502,6 +520,37 @@ complicated as possible''') - finally: - os.chdir(orig_dir) - -+ def test_custom_get_maintainer_script(self): -+ """Validate that a custom get_maintainer script gets used.""" -+ self.make_git_tree() -+ with directory_excursion(self.gitdir): -+ # Setup git. -+ os.environ['GIT_CONFIG_GLOBAL'] = '/dev/null' -+ os.environ['GIT_CONFIG_SYSTEM'] = '/dev/null' -+ tools.run('git', 'config', 'user.name', 'Dummy') -+ tools.run('git', 'config', 'user.email', 'dumdum@dummy.com') -+ tools.run('git', 'branch', 'upstream') -+ tools.run('git', 'branch', '--set-upstream-to=upstream') -+ tools.run('git', 'add', '.') -+ tools.run('git', 'commit', '-m', 'new commit') -+ -+ # Setup patman configuration. -+ with open('.patman', 'w', buffering=1) as f: -+ f.write('[settings]\n' -+ 'get_maintainer_script: dummy-script.sh\n' -+ 'check_patch: False\n') -+ with open('dummy-script.sh', 'w', buffering=1) as f: -+ f.write('#!/usr/bin/env python\n' -+ 'print("hello@there.com")\n') -+ os.chmod('dummy-script.sh', 0x555) -+ -+ # Finally, do the test -+ with capture_sys_output(): -+ output = tools.run(PATMAN_DIR / 'patman', '--dry-run') -+ # Assert the email address is part of the dry-run -+ # output. -+ self.assertIn('hello@there.com', output) -+ - def test_tags(self): - """Test collection of tags in a patchstream""" - text = '''This is a patch -diff --git a/tools/patman/get_maintainer.py b/tools/patman/get_maintainer.py -index e1d15ff6ab..f7011be1e4 100644 ---- a/tools/patman/get_maintainer.py -+++ b/tools/patman/get_maintainer.py -@@ -1,48 +1,61 @@ - # SPDX-License-Identifier: GPL-2.0+ - # Copyright (c) 2012 The Chromium OS Authors. -+# Copyright (c) 2022 Maxim Cournoyer - # - - import os -+import shlex -+import shutil - - from patman import command -+from patman import gitutil - --def find_get_maintainer(try_list): -- """Look for the get_maintainer.pl script. - -- Args: -- try_list: List of directories to try for the get_maintainer.pl script -+def find_get_maintainer(script_file_name): -+ """Try to find where `script_file_name` is. - -- Returns: -- If the script is found we'll return a path to it; else None. -+ It searches in PATH and falls back to a path relative to the top -+ of the current git repository. - """ -- # Look in the list -- for path in try_list: -- fname = os.path.join(path, 'get_maintainer.pl') -- if os.path.isfile(fname): -- return fname -+ get_maintainer = shutil.which(script_file_name) -+ if get_maintainer: -+ return get_maintainer -+ -+ git_relative_script = os.path.join(gitutil.get_top_level(), -+ script_file_name) -+ if os.path.exists(git_relative_script): -+ return git_relative_script - -- return None - --def get_maintainer(dir_list, fname, verbose=False): -- """Run get_maintainer.pl on a file if we find it. -+def get_maintainer(script_file_name, fname, verbose=False): -+ """Run `script_file_name` on a file. - -- We look for get_maintainer.pl in the 'scripts' directory at the top of -- git. If we find it we'll run it. If we don't find get_maintainer.pl -- then we fail silently. -+ `script_file_name` should be a get_maintainer.pl-like script that -+ takes a patch file name as an input and return the email addresses -+ of the associated maintainers to standard output, one per line. -+ -+ If `script_file_name` does not exist we fail silently. - - Args: -- dir_list: List of directories to try for the get_maintainer.pl script -- fname: Path to the patch file to run get_maintainer.pl on. -+ script_file_name: The file name of the get_maintainer.pl script -+ (or compatible). -+ fname: File name of the patch to process with get_maintainer.pl. - - Returns: - A list of email addresses to CC to. - """ -- get_maintainer = find_get_maintainer(dir_list) -+ # Expand `script_file_name` into a file name and its arguments, if -+ # any. -+ cmd_args = shlex.split(script_file_name) -+ file_name = cmd_args[0] -+ arguments = cmd_args[1:] -+ -+ get_maintainer = find_get_maintainer(file_name) - if not get_maintainer: - if verbose: - print("WARNING: Couldn't find get_maintainer.pl") - return [] - -- stdout = command.output(get_maintainer, '--norolestats', fname) -+ stdout = command.output(get_maintainer, *arguments, fname) - lines = stdout.splitlines() -- return [ x.replace('"', '') for x in lines ] -+ return [x.replace('"', '') for x in lines] -diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py -index ceaf2ce150..5e742102c2 100644 ---- a/tools/patman/gitutil.py -+++ b/tools/patman/gitutil.py -@@ -2,21 +2,19 @@ - # Copyright (c) 2011 The Chromium OS Authors. - # - --import re - import os --import subprocess - import sys - - from patman import command - from patman import settings - from patman import terminal --from patman import tools - - # True to use --no-decorate - we check this in setup() - use_no_decorate = True - -+ - def log_cmd(commit_range, git_dir=None, oneline=False, reverse=False, -- count=None): -+ count=None): - """Create a command to perform a 'git log' - - Args: -@@ -49,6 +47,7 @@ def log_cmd(commit_range, git_dir=None, oneline=False, reverse=False, - cmd.append('--') - return cmd - -+ - def count_commits_to_branch(branch): - """Returns number of commits between HEAD and the tracking branch. - -@@ -68,13 +67,14 @@ def count_commits_to_branch(branch): - rev_range = '@{upstream}..' - pipe = [log_cmd(rev_range, oneline=True)] - result = command.run_pipe(pipe, capture=True, capture_stderr=True, -- oneline=True, raise_on_error=False) -+ oneline=True, raise_on_error=False) - if result.return_code: - raise ValueError('Failed to determine upstream: %s' % - result.stderr.strip()) - patch_count = len(result.stdout.splitlines()) - return patch_count - -+ - def name_revision(commit_hash): - """Gets the revision name for a commit - -@@ -91,6 +91,7 @@ def name_revision(commit_hash): - name = stdout.split(' ')[1].strip() - return name - -+ - def guess_upstream(git_dir, branch): - """Tries to guess the upstream for a branch - -@@ -109,7 +110,7 @@ def guess_upstream(git_dir, branch): - """ - pipe = [log_cmd(branch, git_dir=git_dir, oneline=True, count=100)] - result = command.run_pipe(pipe, capture=True, capture_stderr=True, -- raise_on_error=False) -+ raise_on_error=False) - if result.return_code: - return None, "Branch '%s' not found" % branch - for line in result.stdout.splitlines()[1:]: -@@ -121,6 +122,7 @@ def guess_upstream(git_dir, branch): - return name, "Guessing upstream as '%s'" % name - return None, "Cannot find a suitable upstream for branch '%s'" % branch - -+ - def get_upstream(git_dir, branch): - """Returns the name of the upstream for a branch - -@@ -135,10 +137,10 @@ def get_upstream(git_dir, branch): - """ - try: - remote = command.output_one_line('git', '--git-dir', git_dir, 'config', -- 'branch.%s.remote' % branch) -+ 'branch.%s.remote' % branch) - merge = command.output_one_line('git', '--git-dir', git_dir, 'config', -- 'branch.%s.merge' % branch) -- except: -+ 'branch.%s.merge' % branch) -+ except Exception: - upstream, msg = guess_upstream(git_dir, branch) - return upstream, msg - -@@ -149,7 +151,8 @@ def get_upstream(git_dir, branch): - return '%s/%s' % (remote, leaf), None - else: - raise ValueError("Cannot determine upstream branch for branch " -- "'%s' remote='%s', merge='%s'" % (branch, remote, merge)) -+ "'%s' remote='%s', merge='%s'" -+ % (branch, remote, merge)) - - - def get_range_in_branch(git_dir, branch, include_upstream=False): -@@ -168,6 +171,7 @@ def get_range_in_branch(git_dir, branch, include_upstream=False): - rstr = '%s%s..%s' % (upstream, '~' if include_upstream else '', branch) - return rstr, msg - -+ - def count_commits_in_range(git_dir, range_expr): - """Returns the number of commits in the given range. - -@@ -180,12 +184,13 @@ def count_commits_in_range(git_dir, range_expr): - """ - pipe = [log_cmd(range_expr, git_dir=git_dir, oneline=True)] - result = command.run_pipe(pipe, capture=True, capture_stderr=True, -- raise_on_error=False) -+ raise_on_error=False) - if result.return_code: - return None, "Range '%s' not found or is invalid" % range_expr - patch_count = len(result.stdout.splitlines()) - return patch_count, None - -+ - def count_commits_in_branch(git_dir, branch, include_upstream=False): - """Returns the number of commits in the given branch. - -@@ -201,6 +206,7 @@ def count_commits_in_branch(git_dir, branch, include_upstream=False): - return None, msg - return count_commits_in_range(git_dir, range_expr) - -+ - def count_commits(commit_range): - """Returns the number of commits in the given range. - -@@ -215,6 +221,7 @@ def count_commits(commit_range): - patch_count = int(stdout) - return patch_count - -+ - def checkout(commit_hash, git_dir=None, work_tree=None, force=False): - """Checkout the selected commit for this build - -@@ -231,10 +238,11 @@ def checkout(commit_hash, git_dir=None, work_tree=None, force=False): - pipe.append('-f') - pipe.append(commit_hash) - result = command.run_pipe([pipe], capture=True, raise_on_error=False, -- capture_stderr=True) -+ capture_stderr=True) - if result.return_code != 0: - raise OSError('git checkout (%s): %s' % (pipe, result.stderr)) - -+ - def clone(git_dir, output_dir): - """Checkout the selected commit for this build - -@@ -243,10 +251,11 @@ def clone(git_dir, output_dir): - """ - pipe = ['git', 'clone', git_dir, '.'] - result = command.run_pipe([pipe], capture=True, cwd=output_dir, -- capture_stderr=True) -+ capture_stderr=True) - if result.return_code != 0: - raise OSError('git clone: %s' % result.stderr) - -+ - def fetch(git_dir=None, work_tree=None): - """Fetch from the origin repo - -@@ -263,6 +272,7 @@ def fetch(git_dir=None, work_tree=None): - if result.return_code != 0: - raise OSError('git fetch: %s' % result.stderr) - -+ - def check_worktree_is_available(git_dir): - """Check if git-worktree functionality is available - -@@ -274,9 +284,10 @@ def check_worktree_is_available(git_dir): - """ - pipe = ['git', '--git-dir', git_dir, 'worktree', 'list'] - result = command.run_pipe([pipe], capture=True, capture_stderr=True, -- raise_on_error=False) -+ raise_on_error=False) - return result.return_code == 0 - -+ - def add_worktree(git_dir, output_dir, commit_hash=None): - """Create and checkout a new git worktree for this build - -@@ -290,10 +301,11 @@ def add_worktree(git_dir, output_dir, commit_hash=None): - if commit_hash: - pipe.append(commit_hash) - result = command.run_pipe([pipe], capture=True, cwd=output_dir, -- capture_stderr=True) -+ capture_stderr=True) - if result.return_code != 0: - raise OSError('git worktree add: %s' % result.stderr) - -+ - def prune_worktrees(git_dir): - """Remove administrative files for deleted worktrees - -@@ -305,7 +317,8 @@ def prune_worktrees(git_dir): - if result.return_code != 0: - raise OSError('git worktree prune: %s' % result.stderr) - --def create_patches(branch, start, count, ignore_binary, series, signoff = True): -+ -+def create_patches(branch, start, count, ignore_binary, series, signoff=True): - """Create a series of patches from the top of the current branch. - - The patch files are written to the current directory using -@@ -321,9 +334,7 @@ def create_patches(branch, start, count, ignore_binary, series, signoff = True): - Filename of cover letter (None if none) - List of filenames of patch files - """ -- if series.get('version'): -- version = '%s ' % series['version'] -- cmd = ['git', 'format-patch', '-M' ] -+ cmd = ['git', 'format-patch', '-M'] - if signoff: - cmd.append('--signoff') - if ignore_binary: -@@ -341,9 +352,10 @@ def create_patches(branch, start, count, ignore_binary, series, signoff = True): - - # We have an extra file if there is a cover letter - if series.get('cover'): -- return files[0], files[1:] -+ return files[0], files[1:] - else: -- return None, files -+ return None, files -+ - - def build_email_list(in_list, tag=None, alias=None, warn_on_error=True): - """Build a list of email addresses based on an input list. -@@ -385,40 +397,43 @@ def build_email_list(in_list, tag=None, alias=None, warn_on_error=True): - raw += lookup_email(item, alias, warn_on_error=warn_on_error) - result = [] - for item in raw: -- if not item in result: -+ if item not in result: - result.append(item) - if tag: - return ['%s %s%s%s' % (tag, quote, email, quote) for email in result] - return result - -+ - def check_suppress_cc_config(): - """Check if sendemail.suppresscc is configured correctly. - - Returns: - True if the option is configured correctly, False otherwise. - """ -- suppresscc = command.output_one_line('git', 'config', 'sendemail.suppresscc', -- raise_on_error=False) -+ suppresscc = command.output_one_line( -+ 'git', 'config', 'sendemail.suppresscc', raise_on_error=False) - - # Other settings should be fine. - if suppresscc == 'all' or suppresscc == 'cccmd': - col = terminal.Color() - - print((col.build(col.RED, "error") + -- ": git config sendemail.suppresscc set to %s\n" % (suppresscc)) + -- " patman needs --cc-cmd to be run to set the cc list.\n" + -- " Please run:\n" + -- " git config --unset sendemail.suppresscc\n" + -- " Or read the man page:\n" + -- " git send-email --help\n" + -- " and set an option that runs --cc-cmd\n") -+ ": git config sendemail.suppresscc set to %s\n" -+ % (suppresscc)) + -+ " patman needs --cc-cmd to be run to set the cc list.\n" + -+ " Please run:\n" + -+ " git config --unset sendemail.suppresscc\n" + -+ " Or read the man page:\n" + -+ " git send-email --help\n" + -+ " and set an option that runs --cc-cmd\n") - return False - - return True - -+ - def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname, -- self_only=False, alias=None, in_reply_to=None, thread=False, -- smtp_server=None): -+ self_only=False, alias=None, in_reply_to=None, thread=False, -+ smtp_server=None, get_maintainer_script=None): - """Email a patch series. - - Args: -@@ -435,6 +450,7 @@ def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname, - thread: True to add --thread to git send-email (make - all patches reply to cover-letter or first patch in series) - smtp_server: SMTP server to use to send patches -+ get_maintainer_script: File name of script to get maintainers emails - - Returns: - Git command that was/would be run -@@ -487,9 +503,10 @@ send --cc-cmd cc-fname" cover p1 p2' - "git config sendemail.to u-boot@lists.denx.de") - return - cc = build_email_list(list(set(series.get('cc')) - set(series.get('to'))), -- '--cc', alias, warn_on_error) -+ '--cc', alias, warn_on_error) - if self_only: -- to = build_email_list([os.getenv('USER')], '--to', alias, warn_on_error) -+ to = build_email_list([os.getenv('USER')], '--to', -+ alias, warn_on_error) - cc = [] - cmd = ['git', 'send-email', '--annotate'] - if smtp_server: -@@ -565,7 +582,7 @@ def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0): - if not alias: - alias = settings.alias - lookup_name = lookup_name.strip() -- if '@' in lookup_name: # Perhaps a real email address -+ if '@' in lookup_name: # Perhaps a real email address - return [lookup_name] - - lookup_name = lookup_name.lower() -@@ -581,7 +598,7 @@ def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0): - return out_list - - if lookup_name: -- if not lookup_name in alias: -+ if lookup_name not in alias: - msg = "Alias '%s' not found" % lookup_name - if warn_on_error: - print(col.build(col.RED, msg)) -@@ -589,11 +606,12 @@ def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0): - for item in alias[lookup_name]: - todo = lookup_email(item, alias, warn_on_error, level + 1) - for new_item in todo: -- if not new_item in out_list: -+ if new_item not in out_list: - out_list.append(new_item) - - return out_list - -+ - def get_top_level(): - """Return name of top-level directory for this git repo. - -@@ -608,6 +626,7 @@ def get_top_level(): - """ - return command.output_one_line('git', 'rev-parse', '--show-toplevel') - -+ - def get_alias_file(): - """Gets the name of the git alias file. - -@@ -615,7 +634,7 @@ def get_alias_file(): - Filename of git alias file, or None if none - """ - fname = command.output_one_line('git', 'config', 'sendemail.aliasesfile', -- raise_on_error=False) -+ raise_on_error=False) - if not fname: - return None - -@@ -625,6 +644,7 @@ def get_alias_file(): - - return os.path.join(get_top_level(), fname) - -+ - def get_default_user_name(): - """Gets the user.name from .gitconfig file. - -@@ -634,6 +654,7 @@ def get_default_user_name(): - uname = command.output_one_line('git', 'config', '--global', 'user.name') - return uname - -+ - def get_default_user_email(): - """Gets the user.email from the global .gitconfig file. - -@@ -643,17 +664,19 @@ def get_default_user_email(): - uemail = command.output_one_line('git', 'config', '--global', 'user.email') - return uemail - -+ - def get_default_subject_prefix(): - """Gets the format.subjectprefix from local .git/config file. - - Returns: - Subject prefix found in local .git/config file, or None if none - """ -- sub_prefix = command.output_one_line('git', 'config', 'format.subjectprefix', -- raise_on_error=False) -+ sub_prefix = command.output_one_line( -+ 'git', 'config', 'format.subjectprefix', raise_on_error=False) - - return sub_prefix - -+ - def setup(): - """Set up git utils, by reading the alias files.""" - # Check for a git alias file also -@@ -666,6 +689,7 @@ def setup(): - use_no_decorate = (command.run_pipe([cmd], raise_on_error=False) - .return_code == 0) - -+ - def get_head(): - """Get the hash of the current HEAD - -@@ -674,6 +698,7 @@ def get_head(): - """ - return command.output_one_line('git', 'show', '-s', '--pretty=format:%H') - -+ - if __name__ == "__main__": - import doctest - -diff --git a/tools/patman/patman b/tools/patman/patman -index 11a5d8e18a..5a427d1942 120000 ---- a/tools/patman/patman -+++ b/tools/patman/patman -@@ -1 +1 @@ --main.py -\ No newline at end of file -+__main__.py -\ No newline at end of file -diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst -index 8c5c9cc2cc..6113962fb4 100644 ---- a/tools/patman/patman.rst -+++ b/tools/patman/patman.rst -@@ -1,6 +1,7 @@ - .. SPDX-License-Identifier: GPL-2.0+ - .. Copyright (c) 2011 The Chromium OS Authors - .. Simon Glass -+.. Maxim Cournoyer - .. v1, v2, 19-Oct-11 - .. revised v3 24-Nov-11 - .. revised v4 Independence Day 2020, with Patchwork integration -@@ -68,13 +69,28 @@ this once:: - - git config sendemail.aliasesfile doc/git-mailrc - --For both Linux and U-Boot the 'scripts/get_maintainer.pl' handles figuring --out where to send patches pretty well. -+For both Linux and U-Boot the 'scripts/get_maintainer.pl' handles -+figuring out where to send patches pretty well. For other projects, -+you may want to specify a different script to be run, for example via -+a project-specific `.patman` file:: -+ -+ # .patman configuration file at the root of some project -+ -+ [settings] -+ get_maintainer_script: etc/teams.scm get-maintainer -+ -+The `get_maintainer_script` option corresponds to the -+`--get-maintainer-script` argument of the `send` command. It is -+looked relatively to the root of the current git repository, as well -+as on PATH. It can also be provided arguments, as shown above. The -+contract is that the script should accept a patch file name and return -+a list of email addresses, one per line, like `get_maintainer.pl` -+does. - - During the first run patman creates a config file for you by taking the default - user name and email address from the global .gitconfig file. - --To add your own, create a file ~/.patman like this:: -+To add your own, create a file `~/.patman` like this:: - - # patman alias file - -@@ -85,6 +101,12 @@ To add your own, create a file ~/.patman like this:: - wolfgang: Wolfgang Denk - others: Mike Frysinger , Fred Bloggs - -+As hinted above, Patman will also look for a `.patman` configuration -+file at the root of the current project git repository, which makes it -+possible to override the `project` settings variable or anything else -+in a project-specific way. The values of this "local" configuration -+file take precedence over those of the "global" one. -+ - Aliases are recursive. - - The checkpatch.pl in the U-Boot tools/ subdirectory will be located and -@@ -680,6 +702,16 @@ them: - - $ tools/patman/patman test - -+Note that since the test suite depends on data files only available in -+the git checkout, the `test` command is hidden unless `patman` is -+invoked from the U-Boot git repository. -+ -+Alternatively, you can run the test suite via Pytest: -+ -+.. code-block:: bash -+ -+ $ cd tools/patman && pytest -+ - Error handling doesn't always produce friendly error messages - e.g. - putting an incorrect tag in a commit may provide a confusing message. - -diff --git a/tools/patman/pytest.ini b/tools/patman/pytest.ini -new file mode 100644 -index 0000000000..df3eb518d0 ---- /dev/null -+++ b/tools/patman/pytest.ini -@@ -0,0 +1,2 @@ -+[pytest] -+addopts = --doctest-modules -diff --git a/tools/patman/series.py b/tools/patman/series.py -index 3075378ac1..2eeeef71dc 100644 ---- a/tools/patman/series.py -+++ b/tools/patman/series.py -@@ -235,7 +235,7 @@ class Series(dict): - print(col.build(col.RED, str)) - - def MakeCcFile(self, process_tags, cover_fname, warn_on_error, -- add_maintainers, limit): -+ add_maintainers, limit, get_maintainer_script): - """Make a cc file for us to use for per-commit Cc automation - - Also stores in self._generated_cc to make ShowActions() faster. -@@ -249,6 +249,8 @@ class Series(dict): - True/False to call the get_maintainers to CC maintainers - List of maintainers to include (for testing) - limit: Limit the length of the Cc list (None if no limit) -+ get_maintainer_script: The file name of the get_maintainer.pl -+ script (or compatible). - Return: - Filename of temp file created - """ -@@ -267,8 +269,9 @@ class Series(dict): - if type(add_maintainers) == type(cc): - cc += add_maintainers - elif add_maintainers: -- dir_list = [os.path.join(gitutil.get_top_level(), 'scripts')] -- cc += get_maintainer.get_maintainer(dir_list, commit.patch) -+ -+ cc += get_maintainer.get_maintainer(get_maintainer_script, -+ commit.patch) - for x in set(cc) & set(settings.bounces): - print(col.build(col.YELLOW, 'Skipping "%s"' % x)) - cc = list(set(cc) - set(settings.bounces)) -diff --git a/tools/patman/settings.py b/tools/patman/settings.py -index 903d6fcb0b..636983e32d 100644 ---- a/tools/patman/settings.py -+++ b/tools/patman/settings.py -@@ -1,18 +1,18 @@ - # SPDX-License-Identifier: GPL-2.0+ - # Copyright (c) 2011 The Chromium OS Authors. -+# Copyright (c) 2022 Maxim Cournoyer - # - - try: - import configparser as ConfigParser --except: -+except Exception: - import ConfigParser - - import argparse - import os - import re - --from patman import command --from patman import tools -+from patman import gitutil - - """Default settings per-project. - -@@ -32,7 +32,8 @@ _default_settings = { - }, - } - --class _ProjectConfigParser(ConfigParser.SafeConfigParser): -+ -+class _ProjectConfigParser(ConfigParser.ConfigParser): - """ConfigParser that handles projects. - - There are two main goals of this class: -@@ -83,14 +84,14 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser): - def __init__(self, project_name): - """Construct _ProjectConfigParser. - -- In addition to standard SafeConfigParser initialization, this also loads -- project defaults. -+ In addition to standard ConfigParser initialization, this also -+ loads project defaults. - - Args: - project_name: The name of the project. - """ - self._project_name = project_name -- ConfigParser.SafeConfigParser.__init__(self) -+ ConfigParser.ConfigParser.__init__(self) - - # Update the project settings in the config based on - # the _default_settings global. -@@ -102,31 +103,31 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser): - self.set(project_settings, setting_name, setting_value) - - def get(self, section, option, *args, **kwargs): -- """Extend SafeConfigParser to try project_section before section. -+ """Extend ConfigParser to try project_section before section. - - Args: -- See SafeConfigParser. -+ See ConfigParser. - Returns: -- See SafeConfigParser. -+ See ConfigParser. - """ - try: -- val = ConfigParser.SafeConfigParser.get( -+ val = ConfigParser.ConfigParser.get( - self, "%s_%s" % (self._project_name, section), option, - *args, **kwargs - ) - except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): -- val = ConfigParser.SafeConfigParser.get( -+ val = ConfigParser.ConfigParser.get( - self, section, option, *args, **kwargs - ) - return val - - def items(self, section, *args, **kwargs): -- """Extend SafeConfigParser to add project_section to section. -+ """Extend ConfigParser to add project_section to section. - - Args: -- See SafeConfigParser. -+ See ConfigParser. - Returns: -- See SafeConfigParser. -+ See ConfigParser. - """ - project_items = [] - has_project_section = False -@@ -134,7 +135,7 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser): - - # Get items from the project section - try: -- project_items = ConfigParser.SafeConfigParser.items( -+ project_items = ConfigParser.ConfigParser.items( - self, "%s_%s" % (self._project_name, section), *args, **kwargs - ) - has_project_section = True -@@ -143,7 +144,7 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser): - - # Get top-level items - try: -- top_items = ConfigParser.SafeConfigParser.items( -+ top_items = ConfigParser.ConfigParser.items( - self, section, *args, **kwargs - ) - except ConfigParser.NoSectionError: -@@ -155,6 +156,7 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser): - item_dict.update(project_items) - return {(item, val) for item, val in item_dict.items()} - -+ - def ReadGitAliases(fname): - """Read a git alias file. This is in the form used by git: - -@@ -170,7 +172,7 @@ def ReadGitAliases(fname): - print("Warning: Cannot find alias file '%s'" % fname) - return - -- re_line = re.compile('alias\s+(\S+)\s+(.*)') -+ re_line = re.compile(r'alias\s+(\S+)\s+(.*)') - for line in fd.readlines(): - line = line.strip() - if not line or line[0] == '#': -@@ -190,7 +192,8 @@ def ReadGitAliases(fname): - - fd.close() - --def CreatePatmanConfigFile(gitutil, config_fname): -+ -+def CreatePatmanConfigFile(config_fname): - """Creates a config file under $(HOME)/.patman if it can't find one. - - Args: -@@ -200,12 +203,12 @@ def CreatePatmanConfigFile(gitutil, config_fname): - None - """ - name = gitutil.get_default_user_name() -- if name == None: -+ if name is None: - name = input("Enter name: ") - - email = gitutil.get_default_user_email() - -- if email == None: -+ if email is None: - email = input("Enter email: ") - - try: -@@ -220,7 +223,8 @@ me: %s <%s> - [bounces] - nxp = Zhikang Zhang - ''' % (name, email), file=f) -- f.close(); -+ f.close() -+ - - def _UpdateDefaults(main_parser, config): - """Update the given OptionParser defaults based on config. -@@ -242,8 +246,8 @@ def _UpdateDefaults(main_parser, config): - # Find all the parsers and subparsers - parsers = [main_parser] - parsers += [subparser for action in main_parser._actions -- if isinstance(action, argparse._SubParsersAction) -- for _, subparser in action.choices.items()] -+ if isinstance(action, argparse._SubParsersAction) -+ for _, subparser in action.choices.items()] - - # Collect the defaults from each parser - defaults = {} -@@ -270,8 +274,9 @@ def _UpdateDefaults(main_parser, config): - # Set all the defaults and manually propagate them to subparsers - main_parser.set_defaults(**defaults) - for parser, pdefs in zip(parsers, parser_defaults): -- parser.set_defaults(**{ k: v for k, v in defaults.items() -- if k in pdefs }) -+ parser.set_defaults(**{k: v for k, v in defaults.items() -+ if k in pdefs}) -+ - - def _ReadAliasFile(fname): - """Read in the U-Boot git alias file if it exists. -@@ -298,6 +303,7 @@ def _ReadAliasFile(fname): - if bad_line: - print(bad_line) - -+ - def _ReadBouncesFile(fname): - """Read in the bounces file if it exists - -@@ -311,6 +317,7 @@ def _ReadBouncesFile(fname): - continue - bounces.add(line.strip()) - -+ - def GetItems(config, section): - """Get the items from a section of the config. - -@@ -323,31 +330,50 @@ def GetItems(config, section): - """ - try: - return config.items(section) -- except ConfigParser.NoSectionError as e: -+ except ConfigParser.NoSectionError: - return [] -- except: -- raise - --def Setup(gitutil, parser, project_name, config_fname=''): -+ -+def Setup(parser, project_name, config_fname=None): - """Set up the settings module by reading config files. - -+ Unless `config_fname` is specified, a `.patman` config file local -+ to the git repository is consulted, followed by the global -+ `$HOME/.patman`. If none exists, the later is created. Values -+ defined in the local config file take precedence over those -+ defined in the global one. -+ - Args: -- parser: The parser to update -+ parser: The parser to update. - project_name: Name of project that we're working on; we'll look - for sections named "project_section" as well. -- config_fname: Config filename to read ('' for default) -+ config_fname: Config filename to read. An error is raised if it -+ does not exist. - """ - # First read the git alias file if available - _ReadAliasFile('doc/git-mailrc') - config = _ProjectConfigParser(project_name) -- if config_fname == '': -+ -+ if config_fname and not os.path.exists(config_fname): -+ raise Exception(f'provided {config_fname} does not exist') -+ -+ if not config_fname: - config_fname = '%s/.patman' % os.getenv('HOME') -+ has_config = os.path.exists(config_fname) -+ -+ git_local_config_fname = os.path.join(gitutil.get_top_level(), '.patman') -+ has_git_local_config = os.path.exists(git_local_config_fname) - -- if not os.path.exists(config_fname): -- print("No config file found ~/.patman\nCreating one...\n") -- CreatePatmanConfigFile(gitutil, config_fname) -+ # Read the git local config last, so that its values override -+ # those of the global config, if any. -+ if has_config: -+ config.read(config_fname) -+ if has_git_local_config: -+ config.read(git_local_config_fname) - -- config.read(config_fname) -+ if not (has_config or has_git_local_config): -+ print("No config file found.\nCreating ~/.patman...\n") -+ CreatePatmanConfigFile(config_fname) - - for name, value in GetItems(config, 'alias'): - alias[name] = value.split(',') -@@ -358,6 +384,7 @@ def Setup(gitutil, parser, project_name, config_fname=''): - - _UpdateDefaults(parser, config) - -+ - # These are the aliases we understand, indexed by alias. Each member is a list. - alias = {} - bounces = set() -diff --git a/tools/patman/setup.py b/tools/patman/setup.py -index 5643bf1503..2ff791da0f 100644 ---- a/tools/patman/setup.py -+++ b/tools/patman/setup.py -@@ -7,6 +7,6 @@ setup(name='patman', - scripts=['patman'], - packages=['patman'], - package_dir={'patman': ''}, -- package_data={'patman': ['README']}, -+ package_data={'patman': ['README.rst']}, - classifiers=['Environment :: Console', - 'Topic :: Software Development']) -diff --git a/tools/patman/test_settings.py b/tools/patman/test_settings.py -new file mode 100644 -index 0000000000..c768a2fc64 ---- /dev/null -+++ b/tools/patman/test_settings.py -@@ -0,0 +1,67 @@ -+# SPDX-License-Identifier: GPL-2.0+ -+# -+# Copyright (c) 2022 Maxim Cournoyer -+# -+ -+import argparse -+import contextlib -+import os -+import sys -+import tempfile -+ -+from patman import settings -+from patman import tools -+ -+ -+@contextlib.contextmanager -+def empty_git_repository(): -+ with tempfile.TemporaryDirectory() as tmpdir: -+ os.chdir(tmpdir) -+ tools.run('git', 'init', raise_on_error=True) -+ yield tmpdir -+ -+ -+@contextlib.contextmanager -+def cleared_command_line_args(): -+ old_value = sys.argv[:] -+ sys.argv = [sys.argv[0]] -+ try: -+ yield -+ finally: -+ sys.argv = old_value -+ -+ -+def test_git_local_config(): -+ # Clearing the command line arguments is required, otherwise -+ # arguments passed to the test running such as in 'pytest -k -+ # filter' would be processed by _UpdateDefaults and fail. -+ with cleared_command_line_args(): -+ with empty_git_repository(): -+ with tempfile.NamedTemporaryFile() as global_config: -+ global_config.write(b'[settings]\n' -+ b'project=u-boot\n') -+ global_config.flush() -+ parser = argparse.ArgumentParser() -+ parser.add_argument('-p', '--project', default='unknown') -+ subparsers = parser.add_subparsers(dest='cmd') -+ send = subparsers.add_parser('send') -+ send.add_argument('--no-check', action='store_false', -+ dest='check_patch', default=True) -+ -+ # Test "global" config is used. -+ settings.Setup(parser, 'unknown', global_config.name) -+ args, _ = parser.parse_known_args([]) -+ assert args.project == 'u-boot' -+ send_args, _ = send.parse_known_args([]) -+ assert send_args.check_patch -+ -+ # Test local config can shadow it. -+ with open('.patman', 'w', buffering=1) as f: -+ f.write('[settings]\n' -+ 'project: guix-patches\n' -+ 'check_patch: False\n') -+ settings.Setup(parser, 'unknown', global_config.name) -+ args, _ = parser.parse_known_args([]) -+ assert args.project == 'guix-patches' -+ send_args, _ = send.parse_known_args([]) -+ assert not send_args.check_patch diff --git a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch index a5b92e3e8f..858f42efe7 100644 --- a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch +++ b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch @@ -5,12 +5,12 @@ Index: u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h =================================================================== --- u-boot-2021.07~rc4+dfsg.orig/include/configs/sifive-unmatched.h +++ u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h -@@ -62,6 +62,8 @@ +@@ -55,6 +55,8 @@ "name=system,size=-,bootable,type=${type_guid_gpt_system};" - #define CONFIG_EXTRA_ENV_SETTINGS \ + #define CFG_EXTRA_ENV_SETTINGS \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ "kernel_addr_r=0x84000000\0" \ - "fdt_addr_r=0x88000000\0" \ - "scriptaddr=0x88100000\0" \ + "kernel_comp_addr_r=0x88000000\0" \ + "kernel_comp_size=0x4000000\0" \ -- cgit 1.4.1 From ffbcc113df02293e1676310dbf3bfb23df8cae10 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 8 Jul 2023 00:03:17 -0400 Subject: gnu: Add python-u-boot-pylib. * gnu/packages/bootloaders.scm (python-u-boot-pylib): New variable. * gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Vagrant Cascadian --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 23 ++++++++++++++++++++- .../patches/u-boot-fix-u-boot-lib-build.patch | 24 ++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index cdce2666e5..ad31e8d2de 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2005,6 +2005,7 @@ dist_patch_DATA = \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-fix-build-python-3.10.patch \ + %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ea69fc890b..8afb2c3293 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -655,7 +655,8 @@ tree binary files. These are board description files used by Linux and BSD.") %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt %u-boot-rk3399-enable-emmc-phy-patch - (search-patch "u-boot-fix-build-python-3.10.patch"))) + (search-patch "u-boot-fix-build-python-3.10.patch") + (search-patch "u-boot-fix-u-boot-lib-build.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -841,6 +842,26 @@ CONFIG_TOOLS_LIBCRYPTO=n") " This package provides board-independent tools " "of U-Boot.")))) +(define-public python-u-boot-pylib + (package + (inherit u-boot) + (name "python-u-boot-pylib") + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "tools/u_boot_pylib"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./u_boot_pylib"))))))) + (synopsis "U-Boot Python library") + (description "This package provides common Python code used by some of the +commands part of the U-Boot project, such as Patman."))) + ;;; This is packaged separately, as it can be used in other contexts than for ;;; U-Boot development. (define-public patman diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch new file mode 100644 index 0000000000..233c437de6 --- /dev/null +++ b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch @@ -0,0 +1,24 @@ +Submitted upstream (see: +https://lists.denx.de/pipermail/u-boot/2023-July/521984.html) + +diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml +index 3f33caf6f8..037c5d629e 100644 +--- a/tools/u_boot_pylib/pyproject.toml ++++ b/tools/u_boot_pylib/pyproject.toml +@@ -9,7 +9,7 @@ authors = [ + { name="Simon Glass", email="sjg@chromium.org" }, + ] + description = "U-Boot python library" +-readme = "README.md" ++readme = "README.rst" + requires-python = ">=3.7" + classifiers = [ + "Programming Language :: Python :: 3", +@@ -20,3 +20,7 @@ classifiers = [ + [project.urls] + "Homepage" = "https://u-boot.readthedocs.io" + "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues" ++ ++[tool.setuptools.packages.find] ++where = [".."] ++include = ["u_boot_pylib*"] -- cgit 1.4.1 From d3a1684c8a092bb729d68a840abea28092dfc587 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Tue, 13 Jun 2023 07:18:26 +0200 Subject: gnu: doxygen: Fix build for the Hurd. * gnu/packages/patches/doxygen-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/documentation.scm (doxygen)[arguments]: When building for the Hurd, add new phase 'apply-patch' and use it. --- gnu/local.mk | 1 + gnu/packages/documentation.scm | 12 +++++++++++- gnu/packages/patches/doxygen-hurd.patch | 30 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/doxygen-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ad31e8d2de..0c1425a118 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1065,6 +1065,7 @@ dist_patch_DATA = \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/dovecot-opensslv3.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ + %D%/packages/patches/doxygen-hurd.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ %D%/packages/patches/dune-common-skip-failing-tests.patch \ diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index ec70ca4d8f..5d455431d3 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2020, 2021 Michael Rohleder ;;; Copyright © 2021, 2022 Marius Bakke ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,6 +41,7 @@ #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix deprecation) + #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -224,7 +226,15 @@ markup) can be customized and extended by the user.") (let ((/bin/sh (search-input-file inputs "/bin/sh"))) (substitute* "src/portable.cpp" (("/bin/sh") - /bin/sh)))))))) + /bin/sh))))) + #$@(if (target-hurd?) + #~((add-after 'unpack 'apply-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "doxygen-hurd.patch")))) + (invoke "patch" "--force" "-p1" "-i" patch-file))))) + #~())))) (synopsis "Generate documentation from annotated sources") (description "Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular diff --git a/gnu/packages/patches/doxygen-hurd.patch b/gnu/packages/patches/doxygen-hurd.patch new file mode 100644 index 0000000000..a40923184b --- /dev/null +++ b/gnu/packages/patches/doxygen-hurd.patch @@ -0,0 +1,30 @@ +Upstream status: Adapted from upstream. + +From d3d968e5835f449d7ea715f45160db81ea906303 Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Tue, 16 Aug 2022 20:29:54 +0200 +Subject: [PATCH] Fix build on GNU/Hurd + +There is no path length limitation there, even via pathconf. But glibc +provides a getcwd function that allocates the buffer dynamically so we can +just leverage that. +--- + include/ghc/filesystem.hpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/filesystem/filesystem.hpp.orig 2022-08-11 22:14:32.000000000 +0200 ++++ b/filesystem/filesystem.hpp 2023-06-13 07:26:25.310000000 +0200 +@@ -4081,6 +4081,13 @@ + return path(); + } + return path(std::wstring(buffer.get()), path::native_format); ++#elif defined(__GLIBC__) ++ std::unique_ptr buffer { ::getcwd(NULL, 0), std::free }; ++ if (buffer == nullptr) { ++ ec = detail::make_system_error(); ++ return path(); ++ } ++ return path(buffer.get()); + #else + size_t pathlen = static_cast(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); + std::unique_ptr buffer(new char[pathlen + 1]); -- cgit 1.4.1 From 03f35ff390d5f77843d65a9df4bd763f82049d24 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Tue, 13 Jun 2023 12:41:08 +0200 Subject: gnu: ghostscript: Fix build for the Hurd. * gnu/packages/patches/ghostscript-leptonica-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ghostscript.scm (ghostscript)[arguments]: When building for the Hurd, add phase 'patch-leptonica' and use it. --- gnu/local.mk | 3 +- gnu/packages/ghostscript.scm | 10 +++ .../patches/ghostscript-leptonica-hurd.patch | 78 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ghostscript-leptonica-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0c1425a118..b3190b8bc2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1237,8 +1237,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-bloomfilter-ghc9.2.patch \ %D%/packages/patches/ghc-bytestring-handle-ghc9.patch \ %D%/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch \ - %D%/packages/patches/ghostscript-CVE-2023-36664.patch \ - %D%/packages/patches/ghostscript-CVE-2023-36664-fixup.patch \ + %D%/packages/patches/ghostscript-leptonica-hurd.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 94807fdd94..2d7f07fb40 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -201,6 +201,16 @@ printing, and psresize, for adjusting page sizes.") '())) #:phases #~(modify-phases %standard-phases + #$@(if (target-hurd?) + #~((add-after 'unpack 'patch-leptonica + (lambda _ + (let ((patch-file + #$(local-file + (search-patch + "ghostscript-leptonica-hurd.patch")))) + (with-directory-excursion "leptonica" + (invoke "patch" "--force" "-p1" "-i" patch-file)))))) + #~()) (add-before 'configure 'create-output-directory (lambda _ ;; The configure script refuses to function if the directory diff --git a/gnu/packages/patches/ghostscript-leptonica-hurd.patch b/gnu/packages/patches/ghostscript-leptonica-hurd.patch new file mode 100644 index 0000000000..124365b3e6 --- /dev/null +++ b/gnu/packages/patches/ghostscript-leptonica-hurd.patch @@ -0,0 +1,78 @@ +Upstream status: This patch was taken from leptonica upstream. + +Backported to ghostscripts bundled leptonica. + +From f04da7c816feb1d5f689c34f3d0e7e3621edf1f5 Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Wed, 1 Feb 2023 19:35:43 +0100 +Subject: [PATCH] Fix GNU/Hurd build + +There is no PATH_MAX limitation on GNU/Hurd, and realpath() can be +safely be used with its second parameter set to NULL (as required by +posix since its version 2001). +--- + src/sarray1.c | 29 +++++++++++++++++++++++------ + 1 file changed, 23 insertions(+), 6 deletions(-) + +--- a/src/sarray1.c 2023-06-13 12:31:13.393672916 +0200 ++++ a/src/sarray1.c 2023-06-13 12:34:13.574237149 +0200 +@@ -1953,7 +1953,11 @@ + SARRAY * + getFilenamesInDirectory(const char *dirname) + { ++#if _POSIX_VERSION >= 200112 || defined(__GLIBC__) ++char *dir; ++#else + char dir[PATH_MAX + 1]; ++#endif + char *realdir, *stat_path, *ignore; + size_t size; + SARRAY *safiles; +@@ -1976,17 +1980,28 @@ + * If the file or directory exists, realpath returns its path; + else it returns NULL. + * If the second arg to realpath is passed in, the canonical path +- is returned there. Use a buffer of sufficient size. If the +- second arg is NULL, the path is malloc'd and returned if the +- file or directory exists. +- We pass in a buffer for the second arg, and check that the canonical +- directory path was made. The existence of the directory is checked +- later, after its actual path is returned by genPathname(). */ ++ is returned there. Use a buffer of sufficient size. ++ We pass in a buffer for the second arg, and check that the ++ canonical directory path was made. The existence of the ++ directory is checked later, after its actual path is returned by ++ genPathname(). ++ With GNU libc or Posix 2001, if the second arg is NULL, the path ++ is malloc'd and returned if the file or directory exists. ++ */ ++#if _POSIX_VERSION >= 200112 || defined(__GLIBC__) ++ dir = realpath(dirname, NULL); ++ if (dir == NULL) ++ return (SARRAY *)ERROR_PTR("dir not made", __func__, NULL); ++#else + dir[0] = '\0'; /* init empty in case realpath() fails to write it */ + ignore = realpath(dirname, dir); + if (dir[0] == '\0') + return (SARRAY *)ERROR_PTR("dir not made", procName, NULL); ++#endif + realdir = genPathname(dir, NULL); ++#if _POSIX_VERSION >= 200112 || defined(__GLIBC__) ++ LEPT_FREE(dir); ++#endif + if ((pdir = opendir(realdir)) == NULL) { + LEPT_FREE(realdir); + return (SARRAY *)ERROR_PTR("pdir not opened", procName, NULL); +@@ -1998,10 +2013,12 @@ + stat_ret = fstatat(dfd, pdirentry->d_name, &st, 0); + #else + size = strlen(realdir) + strlen(pdirentry->d_name) + 2; ++#if _POSIX_VERSION < 200112 && !defined(__GLIBC__) + if (size > PATH_MAX) { + L_ERROR("size = %zu too large; skipping\n", procName, size); + continue; + } ++#endif + stat_path = (char *)LEPT_CALLOC(size, 1); + snprintf(stat_path, size, "%s/%s", realdir, pdirentry->d_name); + stat_ret = stat(stat_path, &st); -- cgit 1.4.1 From 8c5891d50ba90b1e00edd445e1cf9ab1e1e4a449 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Tue, 13 Jun 2023 14:49:10 +0200 Subject: gnu: fontforge: Support build on the Hurd. * gnu/packages/patches/fontforge-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/fontutils.scm (fontforge)[arguments]: When building natively on the Hurd, add new phase 'apply-hurd-patch' and use it, and replace phase 'check' to skip two tests. --- gnu/local.mk | 1 + gnu/packages/fontutils.scm | 88 ++++++++++++++++++++----------- gnu/packages/patches/fontforge-hurd.patch | 82 ++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 30 deletions(-) create mode 100644 gnu/packages/patches/fontforge-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b3190b8bc2..f10713f126 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1146,6 +1146,7 @@ dist_patch_DATA = \ %D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \ %D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \ %D%/packages/patches/fontconfig-cache-ignore-mtime.patch \ + %D%/packages/patches/fontforge-hurd.patch \ %D%/packages/patches/foobillard++-pkg-config.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 64b15fbf05..2cfaa45c37 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -1534,37 +1534,65 @@ definitions.") ("python" ,python) ("zlib" ,zlib))) (arguments - '(#:configure-flags '(;; TODO: Provide GTK+ for the Wayland-friendly GDK - ;; backend, instead of the legacy X11 backend. - ;; Currently it introduces a circular dependency. - "-DENABLE_X11=ON") + (list + #:configure-flags #~'( ;; TODO: Provide GTK+ for the Wayland-friendly GDK + ;; backend, instead of the legacy X11 backend. + ;; Currently it introduces a circular dependency. + "-DENABLE_X11=ON") #:phases - (modify-phases %standard-phases - (add-after 'unpack 'do-not-override-RPATH - (lambda _ - ;; Do not attempt to set a default RPATH, as our ld-wrapper - ;; already does the right thing. - (substitute* "CMakeLists.txt" - (("^set_default_rpath\\(\\)") - "")) - #t)) - (add-after 'install 'set-library-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (potrace (dirname - (search-input-file inputs "bin/potrace")))) - (wrap-program (string-append out "/bin/fontforge") - ;; Fontforge dynamically opens libraries. - `("LD_LIBRARY_PATH" ":" prefix - ,(map (lambda (input) - (string-append (assoc-ref inputs input) - "/lib")) - '("libtiff" "libjpeg" "libpng" "libungif" - "libxml2" "zlib" "libspiro" "freetype" - "pango" "cairo" "fontconfig"))) - ;; Checks for potrace program at runtime - `("PATH" ":" prefix (,potrace))) - #t)))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'do-not-override-RPATH + (lambda _ + ;; Do not attempt to set a default RPATH, as our ld-wrapper + ;; already does the right thing. + (substitute* "CMakeLists.txt" + (("^set_default_rpath\\(\\)") + "")) + #t)) + #$@(if (target-hurd?) + #~((add-after 'unpack 'apply-hurd-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "fontforge-hurd.patch")))) + (invoke "patch" "--force" "-p1" "-i" patch-file))))) + #~()) + #$@(if (system-hurd?) + #~((replace 'check + ;; cmake-build-system ignores #:make-flags for make check + (lambda* (#:key test-target tests? parallel-tests? + #:allow-other-keys) + (let ((skip '("test0001_py" "test0001_pyhook"))) + (if tests? + (let ((jobs + (if parallel-tests? + (number->string (parallel-job-count)) + "1"))) + (invoke "make" + (string-append "ARGS=-j " jobs + " --exclude-regex ^" + (string-join skip "\\|") + "$") + test-target)) + (format #t "test suite not run~%")))))) + #~()) + (add-after 'install 'set-library-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (potrace (dirname + (search-input-file inputs "bin/potrace")))) + (wrap-program (string-append out "/bin/fontforge") + ;; Fontforge dynamically opens libraries. + `("LD_LIBRARY_PATH" ":" prefix + ,(map (lambda (input) + (string-append (assoc-ref inputs input) + "/lib")) + '("libtiff" "libjpeg" "libpng" "libungif" + "libxml2" "zlib" "libspiro" "freetype" + "pango" "cairo" "fontconfig"))) + ;; Checks for potrace program at runtime + `("PATH" ":" prefix (,potrace))) + #t)))))) (synopsis "Outline font editor") (description "FontForge allows you to create and modify postscript, truetype and diff --git a/gnu/packages/patches/fontforge-hurd.patch b/gnu/packages/patches/fontforge-hurd.patch new file mode 100644 index 0000000000..20d62b8ce2 --- /dev/null +++ b/gnu/packages/patches/fontforge-hurd.patch @@ -0,0 +1,82 @@ +Upstream status: Taken from upstream. + +From dca87c025665f0f010f906a4eba96da9794a4d04 Mon Sep 17 00:00:00 2001 +From: Anthony Fok +Date: Thu, 16 Jun 2022 02:40:23 -0600 +Subject: [PATCH] Define PATH_MAX and MAXPATHLEN for GNU/Hurd compatibility + +Special thanks to @henrich, @ucko and @kilobyte for reporting the issue +and offering suggestions on a fix. + +See also https://bugs.debian.org/877795 + +Fixes #3119 +--- + inc/basics.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/inc/basics.h b/inc/basics.h +index b8d65823b..14590c5b1 100644 +--- a/inc/basics.h ++++ b/inc/basics.h +@@ -123,5 +123,13 @@ static inline int imax(int a, int b) + last = newitem; \ + } + ++#ifdef __GNU__ ++# ifndef PATH_MAX ++# define PATH_MAX 4096 ++# endif ++# ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++# endif ++#endif + + #endif /* FONTFORGE_BASICS_H */ +-- +2.40.1 + +From e0480f143f27f8f2686b5b14d7d302fe22f35002 Mon Sep 17 00:00:00 2001 +From: Anthony Fok +Date: Thu, 16 Jun 2022 03:06:56 -0600 +Subject: [PATCH] Undefine "extended" macro temporarily on GNU Hurd + +GNU Mach microkernel header files (gnumach-dev 1.8+git20201129) added to +struct i386_xfp_save in /usr/include/i386-gnu/include/mach/i386/fp_reg.h +a new "extended" field which happens to collide with the macro definition +"#define extended double" in FontForge, leading to FTBFS on GNU Hurd. + +This issue may be circumvented by temporarily undefining the "extended" +macro before loading `` and friends, and redefining the +"extended" macro right after. +--- + inc/ffglib.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/inc/ffglib.h b/inc/ffglib.h +index f3419f0ab..25fe9ebde 100644 +--- a/inc/ffglib.h ++++ b/inc/ffglib.h +@@ -26,11 +26,19 @@ + #define GMenuItem GMenuItem_GIO + #define GTimer GTimer_GTK + ++#ifdef __GNU__ ++# undef extended ++#endif ++ + #include + #include + #include + #include + ++#ifdef __GNU__ ++# define extended double ++#endif ++ + #undef GList + #undef GMenuItem + #undef GTimer +-- +2.40.1 + -- cgit 1.4.1 From 9bba3eb336f8cf3cd662f7d72e13e97d7d9e5561 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 16 Jul 2023 02:00:07 +0200 Subject: gnu: qxlsx: Fix include directory. * gnu/packages/qt.scm (qxlsx)[source]: Add patch. * gnu/packages/patches/qxlsx-fix-include-directory.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/qxlsx-fix-include-directory.patch | 24 ++++++++++++++++++++++ gnu/packages/qt.scm | 3 ++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qxlsx-fix-include-directory.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f10713f126..06a370eec6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1721,6 +1721,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-wxwidgets-type-errors.patch \ %D%/packages/patches/quodlibet-fix-invalid-glob.patch \ %D%/packages/patches/quodlibet-fix-mtime-tests.patch \ + %D%/packages/patches/qxlsx-fix-include-directory.patch \ %D%/packages/patches/scribus-1.5.8-poppler-22.03.0.patch \ %D%/packages/patches/scribus-1.5.8-poppler-22.04.0.patch \ %D%/packages/patches/scribus-1.5.8-poppler-22.09.0.patch \ diff --git a/gnu/packages/patches/qxlsx-fix-include-directory.patch b/gnu/packages/patches/qxlsx-fix-include-directory.patch new file mode 100644 index 0000000000..a68ca0cc3b --- /dev/null +++ b/gnu/packages/patches/qxlsx-fix-include-directory.patch @@ -0,0 +1,24 @@ +From 8c3e6633e3c901bc5a5cd477383421b0980dcd26 Mon Sep 17 00:00:00 2001 +From: Alexey Sokolov +Date: Mon, 17 Apr 2023 23:43:59 +0100 +Subject: [PATCH] Fix #278 + +There's no real reason to install the same headers twice, but at least +now clients of the library can build again +--- + QXlsx/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt +index 4fa7f7f1..074922a8 100644 +--- a/QXlsx/CMakeLists.txt ++++ b/QXlsx/CMakeLists.txt +@@ -179,7 +179,7 @@ PRIVATE + ${QXLSX_HEADERPATH} + PUBLIC + $ +- $ ++ $ + ) + + set_target_properties(QXlsx PROPERTIES diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7a82d94d90..a79338f84e 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1129,7 +1129,8 @@ from within Qt 5."))) (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0xbpajvwkv09h2fang200nsanv5gl1alsdd725gh9cgq4szng6gj")))) + (base32 "0xbpajvwkv09h2fang200nsanv5gl1alsdd725gh9cgq4szng6gj")) + (patches (search-patches "qxlsx-fix-include-directory.patch")))) (build-system cmake-build-system) (arguments (list -- cgit 1.4.1 From 261422e7451901d99c6cfcbaa5e0037117588f34 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 19 Jul 2023 21:04:26 +0300 Subject: chez-sheme-for-racket: Fix building on riscv64-linux. * gnu/packages/racket.scm (%racket-origin): Add patch. * gnu/packages/patches/racket-rktboot-riscv64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/patches/racket-rktboot-riscv64-support.patch | 15 +++++++++++++++ gnu/packages/racket.scm | 1 + 3 files changed, 17 insertions(+) create mode 100644 gnu/packages/patches/racket-rktboot-riscv64-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 06a370eec6..76e02a81d5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1882,6 +1882,7 @@ dist_patch_DATA = \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ %D%/packages/patches/racket-chez-scheme-bin-sh.patch \ + %D%/packages/patches/racket-rktboot-riscv64-support.patch \ %D%/packages/patches/racket-rktio-bin-sh.patch \ %D%/packages/patches/racket-zuo-bin-sh.patch \ %D%/packages/patches/remake-impure-dirs.patch \ diff --git a/gnu/packages/patches/racket-rktboot-riscv64-support.patch b/gnu/packages/patches/racket-rktboot-riscv64-support.patch new file mode 100644 index 0000000000..f268b1e7f8 --- /dev/null +++ b/gnu/packages/patches/racket-rktboot-riscv64-support.patch @@ -0,0 +1,15 @@ +Submitted upstream: +https://github.com/racket/racket/pull/4703 + +diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt +index 8ff0688..59ebfc8 100644 +--- a/racket/src/rktboot/machine-def.rkt ++++ b/racket/src/rktboot/machine-def.rkt +@@ -25,6 +25,7 @@ + [(regexp-match? #rx"^t?arm32" target-machine) "arm32"] + [(regexp-match? #rx"^t?arm64" target-machine) "arm64"] + [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"] ++ [(regexp-match? #rx"^t?rv64" target-machine) "rv64"] + [(regexp-match? #rx"^t?pb" target-machine) "pb"] + [else (error "machine.def: cannot infer architecture")]))] + [s (regexp-replace* #rx"[$][(]Mend[)]" s diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index dce7cd9587..03abd7cc41 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -204,6 +204,7 @@ (base32 "120djvscm2x1nv46is0kzwahd22rcc8gc0ssf12jnj7w290dpmra")) (file-name (git-file-name "racket" %racket-version)) (patches (search-patches "racket-chez-scheme-bin-sh.patch" + "racket-rktboot-riscv64-support.patch" "racket-rktio-bin-sh.patch" "racket-zuo-bin-sh.patch")) (modules '((guix build utils))) -- cgit 1.4.1 From acbb9d2dadc7011bce7e022689633944e595e75b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 17 May 2023 22:58:46 -0400 Subject: gnu: linux-libre: Apply wireguard patch fixing keep-alive bug. * gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/linux.scm (linux-libre-6.4-source, linux-libre-6.3-source) (linux-libre-6.2-source, linux-libre-6.1-source, linux-libre-5.15-source) (linux-libre-5.10-source): Apply it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 27 +++-- .../linux-libre-wireguard-postup-privkey.patch | 119 +++++++++++++++++++++ 3 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a56406ddd7..02a5b4721a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1544,6 +1544,7 @@ dist_patch_DATA = \ %D%/packages/patches/linphone-desktop-without-sdk.patch \ %D%/packages/patches/linux-libre-infodocs-target.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ + %D%/packages/patches/linux-libre-wireguard-postup-privkey.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/linux-pam-unix_chkpwd.patch \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 67128524ff..aabbc7fc17 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -34,7 +34,7 @@ ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2019 Tim Gesthuizen ;;; Copyright © 2019 mikadoZero -;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer +;;; Copyright © 2019, 2020, 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović ;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau @@ -641,28 +641,39 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (define-public linux-libre-6.4-source (source-with-patches linux-libre-6.4-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch + "linux-libre-wireguard-postup-privkey.patch")))) (define-public linux-libre-6.3-source (source-with-patches linux-libre-6.3-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch + "linux-libre-wireguard-postup-privkey.patch")))) (define-public linux-libre-6.1-source (source-with-patches linux-libre-6.1-pristine-source - (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch - (search-patch "linux-libre-infodocs-target.patch")))) + (append + (list %boot-logo-patch + %linux-libre-arm-export-__sync_icache_dcache-patch) + (search-patches + "linux-libre-infodocs-target.patch" + "linux-libre-wireguard-postup-privkey.patch")))) (define-public linux-libre-5.15-source (source-with-patches linux-libre-5.15-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch + "linux-libre-wireguard-postup-privkey.patch")))) (define-public linux-libre-5.10-source (source-with-patches linux-libre-5.10-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch + "linux-libre-wireguard-postup-privkey.patch")))) (define-public linux-libre-5.4-source (source-with-patches linux-libre-5.4-pristine-source diff --git a/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch b/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch new file mode 100644 index 0000000000..a6050499e1 --- /dev/null +++ b/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch @@ -0,0 +1,119 @@ +From 3ac1bf099766f1e9735883d5127148054cd5b30a Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Thu, 18 May 2023 03:08:44 +0200 +Subject: wireguard: netlink: send staged packets when setting initial private + key + +Packets bound for peers can queue up prior to the device private key +being set. For example, if persistent keepalive is set, a packet is +queued up to be sent as soon as the device comes up. However, if the +private key hasn't been set yet, the handshake message never sends, and +no timer is armed to retry, since that would be pointless. + +But, if a user later sets a private key, the expectation is that those +queued packets, such as a persistent keepalive, are actually sent. So +adjust the configuration logic to account for this edge case, and add a +test case to make sure this works. + +Maxim noticed this with a wg-quick(8) config to the tune of: + + [Interface] + PostUp = wg set %i private-key somefile + + [Peer] + PublicKey = ... + Endpoint = ... + PersistentKeepalive = 25 + +Here, the private key gets set after the device comes up using a PostUp +script, triggering the bug. + +Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") +Cc: stable@vger.kernel.org +Reported-by: Maxim Cournoyer +Link: https://lore.kernel.org/wireguard/87fs7xtqrv.fsf@gmail.com/ +Signed-off-by: Jason A. Donenfeld +--- + drivers/net/wireguard/netlink.c | 14 +++++++++----- + tools/testing/selftests/wireguard/netns.sh | 30 ++++++++++++++++++++++++++---- + 2 files changed, 35 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c +index 43c8c84e7ea8..6d1bd9f52d02 100644 +--- a/drivers/net/wireguard/netlink.c ++++ b/drivers/net/wireguard/netlink.c +@@ -546,6 +546,7 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) + u8 *private_key = nla_data(info->attrs[WGDEVICE_A_PRIVATE_KEY]); + u8 public_key[NOISE_PUBLIC_KEY_LEN]; + struct wg_peer *peer, *temp; ++ bool send_staged_packets; + + if (!crypto_memneq(wg->static_identity.static_private, + private_key, NOISE_PUBLIC_KEY_LEN)) +@@ -564,14 +565,17 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) + } + + down_write(&wg->static_identity.lock); +- wg_noise_set_static_identity_private_key(&wg->static_identity, +- private_key); +- list_for_each_entry_safe(peer, temp, &wg->peer_list, +- peer_list) { ++ send_staged_packets = !wg->static_identity.has_identity && netif_running(wg->dev); ++ wg_noise_set_static_identity_private_key(&wg->static_identity, private_key); ++ send_staged_packets = send_staged_packets && wg->static_identity.has_identity; ++ ++ wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); ++ list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) { + wg_noise_precompute_static_static(peer); + wg_noise_expire_current_peer_keypairs(peer); ++ if (send_staged_packets) ++ wg_packet_send_staged_packets(peer); + } +- wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); + up_write(&wg->static_identity.lock); + } + skip_set_private_key: +diff --git a/tools/testing/selftests/wireguard/netns.sh b/tools/testing/selftests/wireguard/netns.sh +index 69c7796c7ca9..405ff262ca93 100755 +--- a/tools/testing/selftests/wireguard/netns.sh ++++ b/tools/testing/selftests/wireguard/netns.sh +@@ -514,10 +514,32 @@ n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/all/rp_filter' + n1 ping -W 1 -c 1 192.168.241.2 + [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.3:1" ]] + +-ip1 link del veth1 +-ip1 link del veth3 +-ip1 link del wg0 +-ip2 link del wg0 ++ip1 link del dev veth3 ++ip1 link del dev wg0 ++ip2 link del dev wg0 ++ ++# Make sure persistent keep alives are sent when an adapter comes up ++ip1 link add dev wg0 type wireguard ++n1 wg set wg0 private-key <(echo "$key1") peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1 ++read _ _ tx_bytes < <(n1 wg show wg0 transfer) ++[[ $tx_bytes -eq 0 ]] ++ip1 link set dev wg0 up ++read _ _ tx_bytes < <(n1 wg show wg0 transfer) ++[[ $tx_bytes -gt 0 ]] ++ip1 link del dev wg0 ++# This should also happen even if the private key is set later ++ip1 link add dev wg0 type wireguard ++n1 wg set wg0 peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1 ++read _ _ tx_bytes < <(n1 wg show wg0 transfer) ++[[ $tx_bytes -eq 0 ]] ++ip1 link set dev wg0 up ++read _ _ tx_bytes < <(n1 wg show wg0 transfer) ++[[ $tx_bytes -eq 0 ]] ++n1 wg set wg0 private-key <(echo "$key1") ++read _ _ tx_bytes < <(n1 wg show wg0 transfer) ++[[ $tx_bytes -gt 0 ]] ++ip1 link del dev veth1 ++ip1 link del dev wg0 + + # We test that Netlink/IPC is working properly by doing things that usually cause split responses + ip0 link add dev wg0 type wireguard +-- +cgit v1.2.3-59-g8ed1b + -- cgit 1.4.1 From 27d4563e82bda5d0520fda83c137c43935862cec Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Thu, 15 Jun 2023 10:35:04 -0700 Subject: gnu: libmateweather: Update to 1.26.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/mate.scm (libmateweather): Update to 1.26.1. [source]: Add libmateweather-use-TZDIR.patch. [inputs]: Replace tzdata with tzdata-for-tests. [arguments]: Set TZDIR, ignore test failure for 'check-timezones.sh'. * gnu/packages/patches/libmateweather-use-TZDIR.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Co-authored-by: 宋文武 --- gnu/local.mk | 1 + gnu/packages/mate.scm | 17 +++++---- .../patches/libmateweather-use-TZDIR.patch | 42 ++++++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/libmateweather-use-TZDIR.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 02a5b4721a..f9d57bbec3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1503,6 +1503,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmad-length-check.patch \ %D%/packages/patches/libmad-md_size.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \ + %D%/packages/patches/libmateweather-use-TZDIR.patch \ %D%/packages/patches/libmp4v2-c++11.patch \ %D%/packages/patches/libmpeg2-arm-private-symbols.patch \ %D%/packages/patches/libmpeg2-global-symbol-test.patch \ diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm index 56a60d693b..c1f53d3dca 100644 --- a/gnu/packages/mate.scm +++ b/gnu/packages/mate.scm @@ -251,34 +251,37 @@ desktop and the mate-about program.") (define-public libmateweather (package (name "libmateweather") - (version "1.24.1") + (version "1.26.1") (source (origin (method url-fetch) (uri (string-append "mirror://mate/" (version-major+minor version) "/" "libmateweather-" version ".tar.xz")) (sha256 - (base32 "02d7c59pami1fzxg73mp6risa9hvsdpgs68f62wkg09nrppzsk4v")))) + (base32 "0fpgc2l46024j2sqqsvclg9c6x33hyjk2zbg5h74v7cf9c7rj062")) + (patches + (list (search-patch "libmateweather-use-TZDIR.patch"))))) (build-system gnu-build-system) (arguments '(#:configure-flags - (list (string-append "--with-zoneinfo-dir=" - (assoc-ref %build-inputs "tzdata") - "/share/zoneinfo")) + (list (string-append "--with-zoneinfo-dir=/var/empty")) #:phases (modify-phases %standard-phases (add-before 'check 'fix-tzdata-location (lambda* (#:key inputs #:allow-other-keys) + (setenv "TZDIR" (search-input-directory inputs "/share/zoneinfo")) (substitute* "data/check-timezones.sh" (("/usr/share/zoneinfo/zone.tab") - (search-input-file inputs "/share/zoneinfo/zone.tab")))))))) + (search-input-file inputs "/share/zoneinfo/zone.tab")) + ;; XXX: Ignore this test for now, which requires tzdata-2023c. + (("exit 1") "exit 0"))))))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool) ("dconf" ,dconf) ("glib:bin" ,glib "bin"))) (inputs - (list gtk+ tzdata)) + (list gtk+ tzdata-for-tests)) (propagated-inputs ;; both of these are requires.private in mateweather.pc (list libsoup-minimal-2 libxml2)) diff --git a/gnu/packages/patches/libmateweather-use-TZDIR.patch b/gnu/packages/patches/libmateweather-use-TZDIR.patch new file mode 100644 index 0000000000..5f72043986 --- /dev/null +++ b/gnu/packages/patches/libmateweather-use-TZDIR.patch @@ -0,0 +1,42 @@ +From 109fef8208188ddf4be76d6899f7d8fde5b8b3be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= +Date: Sat, 22 Jul 2023 14:40:31 +0800 +Subject: [PATCH] Use TZDIR for ZONEINFO_DIR if the variable is set. + +--- + libmateweather/mateweather-timezone.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libmateweather/mateweather-timezone.c b/libmateweather/mateweather-timezone.c +index 2754728..6c858c4 100644 +--- a/libmateweather/mateweather-timezone.c ++++ b/libmateweather/mateweather-timezone.c +@@ -61,7 +61,7 @@ static gboolean + parse_tzdata (const char *tzname, time_t start, time_t end, + int *offset, gboolean *has_dst, int *dst_offset) + { +- char *filename, *contents; ++ char *tzdir, *filename, *contents; + gsize length; + int timecnt, transitions_size, ttinfo_map_size; + int initial_transition = -1, second_transition = -1; +@@ -71,7 +71,10 @@ parse_tzdata (const char *tzname, time_t start, time_t end, + char initial_isdst, second_isdst; + int i; + +- filename = g_build_filename (ZONEINFO_DIR, tzname, NULL); ++ tzdir = g_getenv("TZDIR"); ++ if (tzdir == NULL) ++ tzdir = ZONEINFO_DIR; ++ filename = g_build_filename (tzdir, tzname, NULL); + if (!g_file_get_contents (filename, &contents, &length, NULL)) { + g_free (filename); + return FALSE; +@@ -403,4 +406,3 @@ mateweather_timezone_get_dst_offset (MateWeatherTimezone *zone) + g_return_val_if_fail (zone->has_dst, 0); + return zone->dst_offset; + } +- +-- +2.41.0 + -- cgit 1.4.1