From 0c3ae6dc84fa7d12020983a42802346638be66bc Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 24 Jan 2024 17:27:40 +0100 Subject: gnu: arpack-ng: Update to 3.9.1. * gnu/packages/maths.scm (arpack-ng): Update to 3.9.1. Drop patch. * gnu/packages/patches/arpack-ng-propagate-rng-state.patch: Remove file. * gnu/packages/maths.scm (dist_patch_DATA): Unregister patch. Change-Id: I33a666c3a88fb2f6791c8d698eeb054a831103fc --- .../patches/arpack-ng-propagate-rng-state.patch | 523 --------------------- 1 file changed, 523 deletions(-) delete mode 100644 gnu/packages/patches/arpack-ng-propagate-rng-state.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/arpack-ng-propagate-rng-state.patch b/gnu/packages/patches/arpack-ng-propagate-rng-state.patch deleted file mode 100644 index 4466bb8e50..0000000000 --- a/gnu/packages/patches/arpack-ng-propagate-rng-state.patch +++ /dev/null @@ -1,523 +0,0 @@ -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 v1.2.3 From 95f3db691075ab716e1e6471b34b01d671e3be86 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 12 Feb 2024 10:51:41 -0500 Subject: gnu: sdcc: Update to 4.4.0. * gnu/packages/embedded.scm (sdcc): Update to 4.4.0. * gnu/packages/patches/sdcc-disable-non-free-code.patch: Update to match new version. Change-Id: Ie35c590a7f3004bc9f081d99b7ce019ac66cf3c0 Signed-off-by: Ricardo Wurmus --- gnu/packages/embedded.scm | 4 +- .../patches/sdcc-disable-non-free-code.patch | 244 ++++++++++----------- 2 files changed, 124 insertions(+), 124 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 313675814a..b758e445af 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -1637,7 +1637,7 @@ (define-public ucsim (define-public sdcc (package (name "sdcc") - (version "4.3.0") + (version "4.4.0") (source (origin (method url-fetch) (uri (string-append @@ -1645,7 +1645,7 @@ (define-public sdcc "/" version "/sdcc-src-" version ".tar.bz2")) (sha256 (base32 - "1kckr20jqa4rp4qcw38lwagmw3yfm3z0xb4kygd0608847qc0vra")) + "0xbaj3vx5cp3na1kmyhy4jvhcqwrg648scjbykgq0xmibqb1535f")) (modules '((guix build utils))) (snippet #~(begin diff --git a/gnu/packages/patches/sdcc-disable-non-free-code.patch b/gnu/packages/patches/sdcc-disable-non-free-code.patch index 7602ead9af..6dcfbee1ab 100644 --- a/gnu/packages/patches/sdcc-disable-non-free-code.patch +++ b/gnu/packages/patches/sdcc-disable-non-free-code.patch @@ -15,10 +15,10 @@ remove instructions that encourage the use of SDCC with non-free software. diff --git a/Makefile.common.in b/Makefile.common.in -index 9cd116c..6bbe9fb 100644 +index 8469079..174ed91 100644 --- a/Makefile.common.in +++ b/Makefile.common.in -@@ -77,7 +77,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@ +@@ -78,7 +78,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@ OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@ OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@ OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@ @@ -27,10 +27,10 @@ index 9cd116c..6bbe9fb 100644 SLIB = $(top_builddir)/support/util diff --git a/Makefile.in b/Makefile.in -index 6d035ec..12f1fad 100644 +index 3287e30..69511e1 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -105,9 +105,6 @@ endif +@@ -104,9 +104,6 @@ endif ifeq ($(OPT_DISABLE_DEVICE_LIB), 0) TARGETS += sdcc-device-lib PKGS += device/lib @@ -40,7 +40,7 @@ index 6d035ec..12f1fad 100644 endif ifeq ($(OPT_DISABLE_PACKIHX), 0) -@@ -128,9 +125,6 @@ endif +@@ -127,9 +124,6 @@ endif TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts PKGS += $(SDCC_LIBS) src device/include @@ -50,7 +50,7 @@ index 6d035ec..12f1fad 100644 PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_SCRIPTS) PORTS = $(shell cat ports.build) -@@ -168,21 +162,12 @@ sdcc-sdbinutils: +@@ -167,21 +161,12 @@ sdcc-sdbinutils: sdcc-device-inc: $(MAKE) -C device/include @@ -73,7 +73,7 @@ index 6d035ec..12f1fad 100644 # doc depends on latex and latex2html diff --git a/configure b/configure -index 9de81c6..2620e3c 100755 +index b509c84..c7ce7fc 100755 --- a/configure +++ b/configure @@ -659,7 +659,6 @@ LATEX @@ -84,7 +84,7 @@ index 9de81c6..2620e3c 100755 OPT_DISABLE_SDBINUTILS OPT_DISABLE_SDCDB OPT_DISABLE_SDCPP -@@ -692,10 +691,7 @@ OPT_DISABLE_Z80 +@@ -693,10 +692,7 @@ OPT_DISABLE_Z80 OPT_DISABLE_MCS51 SVN_REVISION GIT_REVISION @@ -95,7 +95,7 @@ index 9de81c6..2620e3c 100755 include_dir_suffix inclib_dir_suffix LIB_TYPE -@@ -824,7 +820,6 @@ enable_packihx +@@ -828,7 +824,6 @@ enable_packihx enable_sdcpp enable_sdcdb enable_sdbinutils @@ -103,7 +103,7 @@ index 9de81c6..2620e3c 100755 enable_doc enable_libgc ' -@@ -845,10 +840,7 @@ sdccconf_h_dir_separator +@@ -849,10 +844,7 @@ sdccconf_h_dir_separator LIB_TYPE inclib_dir_suffix include_dir_suffix @@ -114,7 +114,7 @@ index 9de81c6..2620e3c 100755 docdir' ac_subdirs_all='support/cpp support/packihx -@@ -856,9 +848,7 @@ sim/ucsim +@@ -860,9 +852,7 @@ sim/ucsim debugger/mcs51 support/sdbinutils device/lib/pic14 @@ -125,7 +125,7 @@ index 9de81c6..2620e3c 100755 # Initialize some variables set by options. ac_init_help= -@@ -1512,7 +1502,6 @@ Optional Features: +@@ -1517,7 +1507,6 @@ Optional Features: --disable-sdcpp Disables building sdcpp --disable-sdcdb Disables building sdcdb --disable-sdbinutils Disables configuring and building of sdbinutils @@ -133,7 +133,7 @@ index 9de81c6..2620e3c 100755 --enable-doc Enables building the documentation --enable-libgc Use the Bohem memory allocator. Lower runtime footprint. -@@ -1541,16 +1530,8 @@ Some influential environment variables: +@@ -1551,16 +1540,8 @@ Some influential environment variables: appended to datadir to define SDCC's include/lib directory include_dir_suffix appended to datadir to define SDCC's include directory @@ -150,7 +150,7 @@ index 9de81c6..2620e3c 100755 docdir documentation installation directory Use these variables to override the choices made by `configure' or to help -@@ -7426,19 +7407,6 @@ if test "${include_dir_suffix}" = ""; then +@@ -7869,19 +7850,6 @@ if test "${include_dir_suffix}" = ""; then include_dir_suffix="${inclib_dir_suffix}/include" fi @@ -170,7 +170,7 @@ index 9de81c6..2620e3c 100755 # lib_dir_suffix: # *nix default: "sdcc/lib" -@@ -7446,13 +7414,6 @@ if test "${lib_dir_suffix}" = ""; then +@@ -7889,13 +7857,6 @@ if test "${lib_dir_suffix}" = ""; then lib_dir_suffix="${inclib_dir_suffix}/lib" fi @@ -184,7 +184,7 @@ index 9de81c6..2620e3c 100755 # docdir: # *nix default: "${datadir}/sdcc/doc" -@@ -7605,22 +7566,6 @@ esac +@@ -8048,22 +8009,6 @@ esac printf "%s\n" "#define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_inc_dir_suffix}\"" >>confdefs.h @@ -207,7 +207,7 @@ index 9de81c6..2620e3c 100755 norm_lib_dir_suffix=${lib_dir_suffix} case ":$norm_lib_dir_suffix:" in -@@ -7638,22 +7583,6 @@ esac +@@ -8081,22 +8026,6 @@ esac printf "%s\n" "#define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_lib_dir_suffix}\"" >>confdefs.h @@ -230,7 +230,7 @@ index 9de81c6..2620e3c 100755 # relative paths for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do -@@ -8769,27 +8698,6 @@ printf "%s\n" "#define OPT_DISABLE_SDBINUTILS $OPT_DISABLE_SDBINUTILS" >>confdef +@@ -9237,27 +9166,6 @@ printf "%s\n" "#define OPT_DISABLE_SDBINUTILS $OPT_DISABLE_SDBINUTILS" >>confdef @@ -258,7 +258,7 @@ index 9de81c6..2620e3c 100755 # Check whether --enable-doc was given. if test ${enable_doc+y} -@@ -9217,20 +9125,12 @@ if test $OPT_DISABLE_PIC14 = 0; then +@@ -9685,20 +9593,12 @@ if test $OPT_DISABLE_PIC14 = 0; then test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14" @@ -278,8 +278,8 @@ index 9de81c6..2620e3c 100755 - fi - if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then -@@ -9307,8 +9207,6 @@ fi + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0 || test $OPT_DISABLE_R800 = 0; then +@@ -9775,8 +9675,6 @@ fi test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile" @@ -288,7 +288,7 @@ index 9de81c6..2620e3c 100755 ac_config_files="$ac_config_files main.mk:main_in.mk bin/Makefile src/Makefile device/include/Makefile sdas/linksrc/Makefile support/makebin/Makefile support/regression/Makefile support/regression/cases/Makefile support/valdiag/Makefile support/scripts/Makefile support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in Makefile Makefile.common:Makefile.common.in" -@@ -9324,10 +9222,6 @@ ac_config_files="$ac_config_files bin/sdranlib" +@@ -9792,10 +9690,6 @@ ac_config_files="$ac_config_files bin/sdranlib" ac_config_files="$ac_config_files bin/sdobjcopy" @@ -299,7 +299,7 @@ index 9de81c6..2620e3c 100755 cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -@@ -10068,7 +9962,6 @@ do +@@ -10538,7 +10432,6 @@ do "device/lib/pdk15-stack-auto/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/pdk15-stack-auto/Makefile" ;; "sdas/aspdk16/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/aspdk16/Makefile" ;; "device/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;; @@ -307,7 +307,7 @@ index 9de81c6..2620e3c 100755 "main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; -@@ -10088,7 +9981,6 @@ do +@@ -10558,7 +10451,6 @@ do "bin/sdnm") CONFIG_FILES="$CONFIG_FILES bin/sdnm" ;; "bin/sdranlib") CONFIG_FILES="$CONFIG_FILES bin/sdranlib" ;; "bin/sdobjcopy") CONFIG_FILES="$CONFIG_FILES bin/sdobjcopy" ;; @@ -315,7 +315,7 @@ index 9de81c6..2620e3c 100755 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac -@@ -10905,54 +10797,6 @@ esac +@@ -11375,54 +11267,6 @@ esac incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'` @@ -370,7 +370,7 @@ index 9de81c6..2620e3c 100755 libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'` case ":$libPath1:" in -@@ -11002,54 +10846,6 @@ esac +@@ -11472,54 +11316,6 @@ esac libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'` @@ -425,7 +425,7 @@ index 9de81c6..2620e3c 100755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sdcc ${VERSION} is now configured for -@@ -11091,7 +10887,6 @@ sdcc ${VERSION} is now configured for +@@ -11562,7 +11358,6 @@ sdcc ${VERSION} is now configured for mos6502 ${enable_mos6502_port} mos65c02 ${enable_mos65c02_port} @@ -433,7 +433,7 @@ index 9de81c6..2620e3c 100755 Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -11106,9 +10901,6 @@ sdcc ${VERSION} is now configured for +@@ -11577,9 +11372,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -443,7 +443,7 @@ index 9de81c6..2620e3c 100755 documentation: ${docdir} prefix: ${prefix} -@@ -11120,15 +10912,9 @@ sdcc ${VERSION} is now configured for +@@ -11591,15 +11383,9 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[0])${incPath2} ${incPath3} @@ -459,7 +459,7 @@ index 9de81c6..2620e3c 100755 " >&5 printf "%s\n" " sdcc ${VERSION} is now configured for -@@ -11171,7 +10957,6 @@ sdcc ${VERSION} is now configured for +@@ -11643,7 +11429,6 @@ sdcc ${VERSION} is now configured for mos6502 ${enable_mos6502_port} mos65c02 ${enable_mos65c02_port} @@ -467,7 +467,7 @@ index 9de81c6..2620e3c 100755 Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -11186,9 +10971,6 @@ sdcc ${VERSION} is now configured for +@@ -11658,9 +11443,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -477,7 +477,7 @@ index 9de81c6..2620e3c 100755 documentation: ${docdir} prefix: ${prefix} -@@ -11200,15 +10982,9 @@ sdcc ${VERSION} is now configured for +@@ -11672,15 +11454,9 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[0])${incPath2} ${incPath3} @@ -494,10 +494,10 @@ index 9de81c6..2620e3c 100755 # End of configure/configure.in diff --git a/configure.ac b/configure.ac -index ead779c..a3578fe 100644 +index adf5060..bd5a036 100644 --- a/configure.ac +++ b/configure.ac -@@ -564,19 +564,6 @@ if test "${include_dir_suffix}" = ""; then +@@ -542,19 +542,6 @@ if test "${include_dir_suffix}" = ""; then include_dir_suffix="${inclib_dir_suffix}/include" fi @@ -517,7 +517,7 @@ index ead779c..a3578fe 100644 # lib_dir_suffix: # *nix default: "sdcc/lib" AC_ARG_VAR([lib_dir_suffix], [appended to datadir to define SDCC's library root directory]) -@@ -584,13 +571,6 @@ if test "${lib_dir_suffix}" = ""; then +@@ -562,13 +549,6 @@ if test "${lib_dir_suffix}" = ""; then lib_dir_suffix="${inclib_dir_suffix}/lib" fi @@ -531,7 +531,7 @@ index ead779c..a3578fe 100644 # docdir: # *nix default: "${datadir}/sdcc/doc" AC_ARG_VAR([docdir], [documentation installation directory]) -@@ -631,19 +611,11 @@ norm_inc_dir_suffix=${include_dir_suffix} +@@ -609,19 +589,11 @@ norm_inc_dir_suffix=${include_dir_suffix} adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}", [XXX]) @@ -551,7 +551,7 @@ index ead779c..a3578fe 100644 # relative paths adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir]) -@@ -836,7 +808,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx]) +@@ -815,7 +787,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx]) AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp]) AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb]) AC_DO_DISABLER(sdbinutils, SDBINUTILS, [Disables configuring and building of sdbinutils]) @@ -559,7 +559,7 @@ index ead779c..a3578fe 100644 AC_DO_ENABLER(doc, DOC, [Enables building the documentation]) AC_CHECK_PROG([LYX], [lyx], [lyx], [:]) -@@ -915,16 +886,10 @@ if test $OPT_DISABLE_PIC14 = 0; then +@@ -895,16 +866,10 @@ if test $OPT_DISABLE_PIC14 = 0; then AC_CONFIG_FILES(src/pic14/Makefile) test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic14) fi @@ -574,9 +574,9 @@ index ead779c..a3578fe 100644 - test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic16) -fi - if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0 || test $OPT_DISABLE_R800 = 0; then AC_CONFIG_FILES([src/z80/Makefile]) -@@ -988,7 +953,6 @@ fi +@@ -969,7 +934,6 @@ fi test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile]) @@ -584,7 +584,7 @@ index ead779c..a3578fe 100644 AC_CONFIG_FILES([main.mk:main_in.mk bin/Makefile -@@ -1010,9 +974,6 @@ AC_CONFIG_FILES([bin/sdar], [chmod +x bin/sdar]) +@@ -991,9 +955,6 @@ AC_CONFIG_FILES([bin/sdar], [chmod +x bin/sdar]) AC_CONFIG_FILES([bin/sdnm], [chmod +x bin/sdnm]) AC_CONFIG_FILES([bin/sdranlib], [chmod +x bin/sdranlib]) AC_CONFIG_FILES([bin/sdobjcopy], [chmod +x bin/sdobjcopy]) @@ -594,7 +594,7 @@ index ead779c..a3578fe 100644 AC_OUTPUT # I found no better place -@@ -1030,16 +991,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [ +@@ -1011,16 +972,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [ adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch]) adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch]) adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch]) @@ -611,7 +611,7 @@ index ead779c..a3578fe 100644 AC_MSG_RESULT([ sdcc ${VERSION} is now configured for -@@ -1082,7 +1037,6 @@ sdcc ${VERSION} is now configured for +@@ -1064,7 +1019,6 @@ sdcc ${VERSION} is now configured for mos6502 ${enable_mos6502_port} mos65c02 ${enable_mos65c02_port} @@ -619,7 +619,7 @@ index ead779c..a3578fe 100644 Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -1097,9 +1051,6 @@ sdcc ${VERSION} is now configured for +@@ -1079,9 +1033,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -629,7 +629,7 @@ index ead779c..a3578fe 100644 documentation: ${docdir} prefix: ${prefix} -@@ -1111,14 +1062,8 @@ sdcc ${VERSION} is now configured for +@@ -1093,14 +1044,8 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[[0]])${incPath2} ${incPath3} @@ -1003,7 +1003,7 @@ index db0d421..9e90d7a 100644 .SUFFIXES: diff --git a/device/lib/pic16/libc/Makefile.in b/device/lib/pic16/libc/Makefile.in -index ae76fdd..75fc04a 100644 +index 74147d2..bed548b 100644 --- a/device/lib/pic16/libc/Makefile.in +++ b/device/lib/pic16/libc/Makefile.in @@ -88,10 +88,7 @@ PRE_UNINSTALL = : @@ -1018,7 +1018,7 @@ index ae76fdd..75fc04a 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -383,8 +380,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \ +@@ -384,8 +381,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \ string/strpbrk.c string/strrchr.c string/strspn.c \ string/strstr.c string/strtok.c string/strupr.c \ utils/cnvfrac.S utils/cnvint.S utils/cvtdec.S @@ -1028,7 +1028,7 @@ index ae76fdd..75fc04a 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -398,11 +394,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -399,11 +395,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1248,7 +1248,7 @@ index 5c2fce7..8d70807 100644 .SUFFIXES: diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt -index 3711c71..9e500a2 100644 +index 8dfadb6..dd17528 100644 --- a/doc/INSTALL.txt +++ b/doc/INSTALL.txt @@ -18,9 +18,7 @@ To install: @@ -1282,7 +1282,7 @@ index 3711c71..9e500a2 100644 You can test the install by entering: diff --git a/doc/README.txt b/doc/README.txt -index cd1ef3f..5a0d0a8 100644 +index e62177b..4d09afb 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -37,10 +37,9 @@ Exception are pic device libraries and header files which are derived @@ -1300,10 +1300,10 @@ index cd1ef3f..5a0d0a8 100644 However: Many think that the Microchip requirement is not legally enforceable, arguing that the header files only contain noncopyrightable facts. diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx -index a57bf15..d6f30c7 100644 +index efaf738..0ad1ba7 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx -@@ -1150,54 +1150,9 @@ A possible exception are pic device libraries and header files which are +@@ -1151,54 +1151,9 @@ A possible exception are pic device libraries and header files which are to be used with authentic Microchip devices" which makes them incompatible with the GPL, if Microchip has any copyright in them (which might depend on local copyright laws). @@ -1361,7 +1361,7 @@ index a57bf15..d6f30c7 100644 \end_layout \begin_layout Itemize -@@ -1260,23 +1215,6 @@ makebin: +@@ -1261,23 +1216,6 @@ makebin: zlib/libpng License \end_layout @@ -1385,7 +1385,7 @@ index a57bf15..d6f30c7 100644 \end_deeper \begin_layout Itemize libraries: -@@ -3062,18 +3000,6 @@ include_dir_suffix environment variable, see table below +@@ -3194,18 +3132,6 @@ include_dir_suffix environment variable, see table below \end_inset @@ -1404,7 +1404,7 @@ index a57bf15..d6f30c7 100644 \begin_inset space ~ \end_inset -@@ -3086,22 +3012,6 @@ lib_dir_suffix environment variable, see table below +@@ -3218,22 +3144,6 @@ lib_dir_suffix environment variable, see table below \end_inset @@ -1427,7 +1427,7 @@ index a57bf15..d6f30c7 100644 \begin_inset space ~ \end_inset -@@ -3600,7 +3510,7 @@ These defaults are: +@@ -3876,7 +3786,7 @@ These defaults are: \begin_layout Standard \align center \begin_inset Tabular @@ -1436,7 +1436,7 @@ index a57bf15..d6f30c7 100644 -@@ -3884,68 +3794,6 @@ sdcc/include +@@ -4160,68 +4070,6 @@ sdcc/include include \end_layout @@ -1505,7 +1505,7 @@ index a57bf15..d6f30c7 100644 \end_inset -@@ -3956,7 +3804,7 @@ lib +@@ -4232,7 +4080,7 @@ lib \begin_layout Plain Layout \emph on @@ -1514,7 +1514,7 @@ index a57bf15..d6f30c7 100644 \end_layout \end_inset -@@ -3965,7 +3813,7 @@ NON_FREE_LIB_DIR_SUFFIX +@@ -4241,7 +4089,7 @@ NON_FREE_LIB_DIR_SUFFIX \begin_inset Text \begin_layout Plain Layout @@ -1523,7 +1523,7 @@ index a57bf15..d6f30c7 100644 \end_layout \end_inset -@@ -3974,7 +3822,7 @@ sdcc/non-free/lib +@@ -4250,7 +4098,7 @@ sdcc/non-free/lib \begin_inset Text \begin_layout Plain Layout @@ -1532,7 +1532,7 @@ index a57bf15..d6f30c7 100644 \end_layout \end_inset -@@ -4373,20 +4221,6 @@ include +@@ -4649,20 +4497,6 @@ include \end_inset @@ -1553,7 +1553,7 @@ index a57bf15..d6f30c7 100644 \backslash \begin_inset Newline newline -@@ -4401,20 +4235,6 @@ lib +@@ -4677,20 +4511,6 @@ lib \end_inset @@ -1574,7 +1574,7 @@ index a57bf15..d6f30c7 100644 \backslash \begin_inset Newline newline -@@ -4595,20 +4415,6 @@ include +@@ -4871,20 +4691,6 @@ include \end_inset @@ -1595,7 +1595,7 @@ index a57bf15..d6f30c7 100644 \backslash \begin_inset Newline newline -@@ -4623,20 +4429,6 @@ lib +@@ -4899,20 +4705,6 @@ lib \end_inset @@ -1616,7 +1616,7 @@ index a57bf15..d6f30c7 100644 \backslash \begin_inset Newline newline -@@ -4733,7 +4525,7 @@ Install paths +@@ -5009,7 +4801,7 @@ Install paths \begin_layout Standard \align center \begin_inset Tabular @@ -1625,7 +1625,7 @@ index a57bf15..d6f30c7 100644 -@@ -4889,64 +4681,6 @@ include +@@ -5165,64 +4957,6 @@ include \begin_inset Text @@ -1690,7 +1690,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Plain Layout Library file** \end_layout -@@ -4996,64 +4730,6 @@ sdcc +@@ -5272,64 +5006,6 @@ sdcc lib \end_layout @@ -1755,7 +1755,7 @@ index a57bf15..d6f30c7 100644 \end_inset -@@ -5376,7 +5052,7 @@ $PATH +@@ -5652,7 +5328,7 @@ $PATH \begin_layout Standard \align center \begin_inset Tabular @@ -1764,7 +1764,7 @@ index a57bf15..d6f30c7 100644 -@@ -5654,203 +5330,13 @@ include +@@ -5930,203 +5606,13 @@ include @@ -1969,7 +1969,7 @@ index a57bf15..d6f30c7 100644 \end_inset -@@ -5866,21 +5352,13 @@ $DATADIR/ +@@ -6142,21 +5628,13 @@ $DATADIR/ \end_inset @@ -1992,7 +1992,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Text \begin_layout Plain Layout -@@ -5888,7 +5366,7 @@ $INCLUDE_DIR_SUFFIX +@@ -6164,7 +5642,7 @@ $INCLUDE_DIR_SUFFIX \begin_inset Newline newline \end_inset @@ -2001,7 +2001,7 @@ index a57bf15..d6f30c7 100644 \end_layout \end_inset -@@ -5986,7 +5464,7 @@ model +@@ -6262,7 +5740,7 @@ model \begin_layout Standard \align center \begin_inset Tabular @@ -2010,7 +2010,7 @@ index a57bf15..d6f30c7 100644 -@@ -6266,7 +5744,7 @@ lib +@@ -6542,7 +6020,7 @@ lib @@ -2019,7 +2019,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6275,7 +5753,7 @@ lib +@@ -6551,7 +6029,7 @@ lib \end_inset @@ -2028,7 +2028,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6306,7 +5784,7 @@ $LIB_DIR_SUFFIX/ +@@ -6582,7 +6060,7 @@ $LIB_DIR_SUFFIX/ \end_inset @@ -2037,7 +2037,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6321,7 +5799,7 @@ lib/ +@@ -6597,7 +6075,7 @@ lib/ \end_inset @@ -2046,7 +2046,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6344,308 +5822,6 @@ lib +@@ -6620,308 +6098,6 @@ lib \end_layout @@ -2355,7 +2355,7 @@ index a57bf15..d6f30c7 100644 \end_inset -@@ -8923,14 +8099,6 @@ In /share/sdcc/include +@@ -9201,14 +8377,6 @@ In /share/sdcc/include the include files \end_layout @@ -2370,7 +2370,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Standard In /share/sdcc/lib \end_layout -@@ -8939,14 +8107,6 @@ In /share/sdcc/lib +@@ -9217,14 +8385,6 @@ In /share/sdcc/lib the src and target subdirectories with the precompiled relocatables. \end_layout @@ -2385,7 +2385,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Standard In /share/sdcc/doc \end_layout -@@ -16096,66 +15256,6 @@ splint +@@ -16452,66 +15612,6 @@ splint myprogram.c \end_layout @@ -2452,7 +2452,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Subsection Linker Options \begin_inset Index idx -@@ -45880,66 +44980,9 @@ http://sourceforge.net/projects/gputils +@@ -46758,66 +45858,9 @@ http://sourceforge.net/projects/gputils Pic device specific header and c source files are automatically generated from MPLAB include files, which are published by Microchip with a special requirement that they are only to be used with authentic Microchip devices. @@ -2522,7 +2522,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Newline newline \end_inset -@@ -45993,7 +45036,7 @@ Makefile +@@ -46871,7 +45914,7 @@ Makefile \begin_inset space ~ \end_inset @@ -2531,7 +2531,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Newline newline \end_inset -@@ -46087,7 +45130,7 @@ Makefile +@@ -46965,7 +46008,7 @@ Makefile \begin_inset space ~ \end_inset @@ -2540,7 +2540,7 @@ index a57bf15..d6f30c7 100644 \begin_inset Newline newline \end_inset -@@ -46369,47 +45412,6 @@ status collapsed +@@ -47247,47 +46290,6 @@ status collapsed \begin_layout Plain Layout @@ -2588,7 +2588,7 @@ index a57bf15..d6f30c7 100644 \backslash / \end_layout -@@ -47282,47 +46284,6 @@ status collapsed +@@ -48160,47 +47162,6 @@ status collapsed -all-callee-saves \end_layout @@ -2636,7 +2636,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Subsection Port Specific Options \begin_inset Index idx -@@ -48599,188 +47560,6 @@ Linker +@@ -49477,188 +48438,6 @@ Linker \end_inset @@ -2825,7 +2825,7 @@ index a57bf15..d6f30c7 100644 \end_layout \begin_layout Subsection -@@ -49476,66 +48255,9 @@ name "subsec:PIC16_Header-Files-and-Libraries" +@@ -50354,66 +49133,9 @@ name "subsec:PIC16_Header-Files-and-Libraries" Pic device specific header and c source files are automatically generated from MPLAB include files, which are published by Microchip with a special requirement that they are only to be used with authentic Microchip devices. @@ -2895,7 +2895,7 @@ index a57bf15..d6f30c7 100644 \end_layout \begin_layout Subsection -@@ -49781,195 +48503,6 @@ vfprintf.c +@@ -50659,195 +49381,6 @@ vfprintf.c should also work, but is untested. \end_layout @@ -3091,7 +3091,7 @@ index a57bf15..d6f30c7 100644 \begin_layout Subsection Memory Models \end_layout -@@ -74714,6 +73247,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC +@@ -75717,6 +74250,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC developers. \end_layout @@ -3105,7 +3105,7 @@ index a57bf15..d6f30c7 100644 All product names mentioned herein may be trademarks \begin_inset Index idx diff --git a/sdcc.spec b/sdcc.spec -index b784cbc..f180b51 100644 +index ccb3217..292b642 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -89,9 +89,7 @@ rm -rf $RPM_BUILD_ROOT @@ -3118,7 +3118,7 @@ index b784cbc..f180b51 100644 %files doc %defattr(-,root,root) -@@ -102,6 +100,8 @@ rm -rf $RPM_BUILD_ROOT +@@ -104,6 +102,8 @@ rm -rf $RPM_BUILD_ROOT - version updated to 4.2.0 * Sat Feb 20 2021 - pkk AT spth.de - version updated to 4.0.0 @@ -3141,7 +3141,7 @@ index 8cf401b..19f5113 100644 #define BIN2DATA_DIR "\\.." #define PREFIX2BIN_DIR "\\bin" diff --git a/sdccconf_in.h b/sdccconf_in.h -index ca8d69f..980af8d 100644 +index 9e6e3c7..8681ceb 100644 --- a/sdccconf_in.h +++ b/sdccconf_in.h @@ -100,12 +100,6 @@ @@ -3168,10 +3168,10 @@ index ca8d69f..980af8d 100644 #undef OPT_DISABLE_PACKIHX diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h -index 87981f4..e2701f2 100644 +index 9f0e52a..02a5fb8 100644 --- a/src/SDCCglobl.h +++ b/src/SDCCglobl.h -@@ -287,7 +287,6 @@ struct options +@@ -290,7 +290,6 @@ struct options int stack_size; /* MCS51/DS390 - Tells the linker to allocate this space for stack */ int acall_ajmp; /* MCS51 - Use acall/ajmp instead of lcall/ljmp */ int no_ret_without_call; /* MCS51 - Do not use ret independent of acall/lcall */ @@ -3180,7 +3180,7 @@ index 87981f4..e2701f2 100644 int xstack_loc; /* initial location of external stack */ int stack_loc; /* initial value of internal stack pointer */ diff --git a/src/SDCCmain.c b/src/SDCCmain.c -index 6b50572..089c42f 100644 +index e7e8bd6..3b25061 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -143,7 +143,6 @@ char buffer[PATH_MAX * 2]; @@ -3191,15 +3191,15 @@ index 6b50572..089c42f 100644 #define OPTION_PEEP_RETURN "--peep-return" #define OPTION_NO_PEEP_RETURN "--no-peep-return" #define OPTION_NO_OPTSDCC_IN_ASM "--no-optsdcc-in-asm" -@@ -193,7 +192,6 @@ static const OPTION optionsTable[] = { - {0, OPTION_STD, NULL, "Determine the language standard (c89, c99, c11, c2x, sdcc89 etc.)"}, +@@ -195,7 +194,6 @@ static const OPTION optionsTable[] = { + {0, OPTION_STD, NULL, "Determine the language standard (c89, c99, c11, c23, sdcc89 etc.)"}, {0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character"}, {0, OPTION_SIGNED_CHAR, &options.signed_char, "Make \"char\" signed by default"}, - {0, OPTION_USE_NON_FREE, &options.use_non_free, "Search / include non-free licensed libraries and header files"}, {0, NULL, NULL, "Code generation options"}, {'m', NULL, NULL, "Set the port to use e.g. -mz80."}, -@@ -2207,10 +2205,6 @@ preProcess (char **envp) +@@ -2231,10 +2229,6 @@ preProcess (char **envp) else addSet (&preArgvSet, Safe_strdup ("-D__SDCC_CHAR_UNSIGNED")); @@ -3210,7 +3210,7 @@ index 6b50572..089c42f 100644 /* set the macro for large model */ switch (options.model) { -@@ -2454,12 +2448,6 @@ setIncludePath (void) +@@ -2478,12 +2472,6 @@ setIncludePath (void) * 6. - $SDCC_HOME/PREFIX2DATA_DIR/INCLUDE_DIR_SUFFIX * 7. - path(argv[0])/BIN2DATA_DIR/INCLUDE_DIR_SUFFIX * 8. - DATADIR/INCLUDE_DIR_SUFFIX (only on *nix) @@ -3223,7 +3223,7 @@ index 6b50572..089c42f 100644 */ if (!options.nostdinc) -@@ -2475,17 +2463,6 @@ setIncludePath (void) +@@ -2499,17 +2487,6 @@ setIncludePath (void) includeDirsSet = processStrSet (includeDirsSet, NULL, port->target, NULL); mergeSets (&includeDirsSet, tempSet); @@ -3241,7 +3241,7 @@ index 6b50572..089c42f 100644 if ((p = getenv (SDCC_INCLUDE_NAME)) != NULL) { struct dbuf_s dbuf; -@@ -2510,9 +2487,6 @@ setLibPath (void) +@@ -2534,9 +2511,6 @@ setLibPath (void) * 3. - $SDCC_HOME/PREFIX2DATA_DIR/LIB_DIR_SUFFIX/ * 4. - path(argv[0])/BIN2DATA_DIR/LIB_DIR_SUFFIX/ * 5. - DATADIR/LIB_DIR_SUFFIX/ (only on *nix) @@ -3251,7 +3251,7 @@ index 6b50572..089c42f 100644 */ if (!options.nostdlib) -@@ -2529,13 +2503,6 @@ setLibPath (void) +@@ -2553,13 +2527,6 @@ setLibPath (void) dbuf_makePath (&dbuf, LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname); libDirsSet = processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL); @@ -3266,7 +3266,7 @@ index 6b50572..089c42f 100644 { addSetHead (&libDirsSet, Safe_strdup (p)); diff --git a/src/pic14/main.c b/src/pic14/main.c -index ab4bcdf..1747fd6 100644 +index 304c79b..9cbb9e8 100644 --- a/src/pic14/main.c +++ b/src/pic14/main.c @@ -42,7 +42,6 @@ static OPTION _pic14_poptions[] = @@ -3319,7 +3319,7 @@ index 41a1b79..9c642e3 100644 extern pic16_options_t pic16_options; diff --git a/src/pic16/main.c b/src/pic16/main.c -index 8809e2c..53c700e 100644 +index 9557a10..d650e66 100644 --- a/src/pic16/main.c +++ b/src/pic16/main.c @@ -660,7 +660,6 @@ OPTION pic16_optionsTable[]= { @@ -3404,10 +3404,10 @@ index b0b0867..2d5cdd3 100644 OBJEXT = .o diff --git a/support/regression/ports/pic16/spec.mk b/support/regression/ports/pic16/spec.mk -index 541608a..6e7238f 100644 +index 15b4028..3b79cfe 100644 --- a/support/regression/ports/pic16/spec.mk +++ b/support/regression/ports/pic16/spec.mk -@@ -12,13 +12,9 @@ endif +@@ -16,13 +16,9 @@ EMU_INPUT = -c $(PORTS_DIR)/pic16/gpsim.cmd ifndef SDCC_BIN_PATH ifndef CROSSCOMPILING @@ -3423,7 +3423,7 @@ index 541608a..6e7238f 100644 endif ifdef CROSSCOMPILING -@@ -27,7 +23,6 @@ endif +@@ -31,7 +27,6 @@ endif SDCCFLAGS += -mpic16 -pp18f452 --less-pedantic -Wl,-q SDCCFLAGS += --no-peep @@ -3541,10 +3541,10 @@ index 6db417a..4b35225 100755 ); diff --git a/support/scripts/sdcc.nsi b/support/scripts/sdcc.nsi -index 8309df1..c0cc223 100644 +index 37393d7..997b2fe 100644 --- a/support/scripts/sdcc.nsi +++ b/support/scripts/sdcc.nsi -@@ -491,11 +491,6 @@ ${Section} "SDCC include files" SEC05 +@@ -487,11 +487,6 @@ ${Section} "SDCC include files" SEC05 SetOutPath "$INSTDIR\include" File "${DEV_ROOT}\include\*.h" @@ -3556,7 +3556,7 @@ index 8309df1..c0cc223 100644 ${SectionEnd} ${Section} "SDCC DS390 library" SEC06 -@@ -593,18 +588,12 @@ ${Section} "SDCC PIC16 library" SEC21 +@@ -589,18 +584,12 @@ ${Section} "SDCC PIC16 library" SEC21 SetOutPath "$INSTDIR\lib\pic16" File "${DEV_ROOT}\lib\pic16\*.o" File "${DEV_ROOT}\lib\pic16\*.lib" @@ -3575,7 +3575,7 @@ index 8309df1..c0cc223 100644 ${SectionEnd} ${Section} "SDCC STM8 medium model library" SEC23 -@@ -713,10 +702,6 @@ ${Section} "SDCC library sources" SEC25 +@@ -709,10 +698,6 @@ ${Section} "SDCC library sources" SEC25 File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc" # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile" @@ -3586,7 +3586,7 @@ index 8309df1..c0cc223 100644 SetOutPath "$INSTDIR\lib\src\pic14\libm" # File "${DEV_ROOT}\lib\src\pic14\libm\*.c" -@@ -768,10 +753,6 @@ ${Section} "SDCC library sources" SEC25 +@@ -764,10 +749,6 @@ ${Section} "SDCC library sources" SEC25 File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S" # File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile" @@ -3597,7 +3597,7 @@ index 8309df1..c0cc223 100644 SetOutPath "$INSTDIR\lib\src\pic16\libio" File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore" # File "${DEV_ROOT}\lib\src\pic16\libio\Makefile" -@@ -1137,13 +1118,9 @@ ${Section} Uninstall SECUNINSTALL +@@ -1169,13 +1150,9 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\lib\pic14\*.lib" @@ -3611,7 +3611,7 @@ index 8309df1..c0cc223 100644 Delete "$INSTDIR\lib\hc08\*.lib" Delete "$INSTDIR\lib\s08\*.lib" -@@ -1219,9 +1196,7 @@ ${Section} Uninstall SECUNINSTALL +@@ -1259,9 +1236,7 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\include\pic14\*.h" Delete "$INSTDIR\include\pic14\*.txt" Delete "$INSTDIR\include\pic14\*.inc" @@ -3621,7 +3621,7 @@ index 8309df1..c0cc223 100644 Delete "$INSTDIR\include\pic16\*.txt" Delete "$INSTDIR\include\mcs51\*.h" Delete "$INSTDIR\include\hc08\*.h" -@@ -1298,9 +1273,7 @@ ${Section} Uninstall SECUNINSTALL +@@ -1334,9 +1309,7 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\uninstall.exe" RMDir /r "$INSTDIR\lib\src\pic14" @@ -3631,9 +3631,9 @@ index 8309df1..c0cc223 100644 RMDir "$INSTDIR\lib\src\small" RMDir "$INSTDIR\lib\src\medium" RMDir "$INSTDIR\lib\src\large" -@@ -1328,12 +1301,9 @@ ${Section} Uninstall SECUNINSTALL - RMDir "$INSTDIR\lib\src\mos6502" - RMDir "$INSTDIR\lib\src\z80n" +@@ -1367,12 +1340,9 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\src\mos65c02" + RMDir "$INSTDIR\lib\src\s08-stack-auto" RMDir "$INSTDIR\lib\src" - RMDir "$INSTDIR\non-free\lib\src" @@ -3644,9 +3644,9 @@ index 8309df1..c0cc223 100644 RMDir "$INSTDIR\lib\z80" RMDir "$INSTDIR\lib\z180" RMDir "$INSTDIR\lib\r2k" -@@ -1361,15 +1331,12 @@ ${Section} Uninstall SECUNINSTALL - RMDir "$INSTDIR\lib\mos6502" - RMDir "$INSTDIR\lib\z80n" +@@ -1403,15 +1373,12 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\mos65c02" + RMDir "$INSTDIR\lib\s08-stack-auto" RMDir "$INSTDIR\lib" - RMDir "$INSTDIR\non-free\lib" @@ -3660,7 +3660,7 @@ index 8309df1..c0cc223 100644 RMDir "$INSTDIR\include\asm\mcs51" RMDir "$INSTDIR\include\asm\sm83" RMDir "$INSTDIR\include\asm\ds390" -@@ -1378,17 +1345,12 @@ ${Section} Uninstall SECUNINSTALL +@@ -1420,17 +1387,12 @@ ${Section} Uninstall SECUNINSTALL RMDir "$INSTDIR\include\asm" RMDir "$INSTDIR\include\z180" RMDir "$INSTDIR\include\pic14" -- cgit v1.2.3 From 8b7e0c195237f311608cd40c866848b76476c6d3 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 3 Feb 2024 15:06:17 +0100 Subject: gnu: Add restartd. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/admin.scm (restartd): New variable. * gnu/packages/patches/restartd-update-robust.patch: Add file. * gnu/local.mk: Register gnu/packages/patches/restartd-update-robust.patch. Change-Id: I38b9b70e97b64f006a86d7618a75f1ec3ed8b034 Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/admin.scm | 52 ++++ gnu/packages/patches/restartd-update-robust.patch | 295 ++++++++++++++++++++++ 3 files changed, 348 insertions(+) create mode 100644 gnu/packages/patches/restartd-update-robust.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index becca7dd56..c08b27f94d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1982,6 +1982,7 @@ dist_patch_DATA = \ %D%/packages/patches/racket-rktio-bin-sh.patch \ %D%/packages/patches/racket-zuo-bin-sh.patch \ %D%/packages/patches/remake-impure-dirs.patch \ + %D%/packages/patches/restartd-update-robust.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ %D%/packages/patches/rng-tools-revert-build-randstat.patch \ %D%/packages/patches/rocclr-5.6.0-enable-gfx800.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 11f69e57a4..47c82e9678 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -62,6 +62,7 @@ ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Tobias Kortkamp ;;; Copyright © 2023 Jaeme Sifat +;;; Copyright © 2023 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -5843,6 +5844,57 @@ (define-public fail2ban mechanisms if you really want to protect services.") (license license:gpl2+))) +(define-public restartd + (let* ((commit "7044125ac55056f2663536f7137170edf92ebd75") + ;; Version is 0.2.4 in the version file in the repo + ;; but not in github tags. + ;; It is released as 0.2.3-1.1 for other distributions. + ;; Probably because of the lack of activity upstream. + (revision "1")) + (package + (name "restartd") + (version (git-version "0.2.3" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ajraymond/restartd") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1m1np00b4zvvwx63gzysbi38i5vj1jsjvh2s0p9czl6dzyz582z0")) + (patches (search-patches "restartd-update-robust.patch")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ; no tests + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target))) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda _ + (install-file "restartd.conf" (string-append #$output "/etc")) + (install-file "restartd" (string-append #$output "/sbin")) + (install-file "restartd.8" + (string-append #$output "/share/man/man8")) + (mkdir-p (string-append #$output "/share/man/fr/man8")) + (copy-file + "restartd.fr.8" + (string-append #$output "/share/man/fr/man8/restartd.8"))))))) + (home-page "https://launchpad.net/debian/+source/restartd") + (synopsis "Daemon for restarting processes") + (description "This package provides a daemon for checking running and +not running processes. It reads the @file{/proc} directory every @var{n} +seconds and does a POSIX regexp on the process names. The daemon runs a +user-provided script when it detects a program in the running processes, or an +alternate script if it doesn't detect the program. The daemon can only be +called by the root user, but can use @command{sudo -u user} in the process +called if needed.") + (license license:gpl2+)))) + (define-public rex (package (name "rex") diff --git a/gnu/packages/patches/restartd-update-robust.patch b/gnu/packages/patches/restartd-update-robust.patch new file mode 100644 index 0000000000..d279ebd8ff --- /dev/null +++ b/gnu/packages/patches/restartd-update-robust.patch @@ -0,0 +1,295 @@ +From 01cd2d15a9bf1109e0e71b3e31b835d63dcf9cd8 Mon Sep 17 00:00:00 2001 +From: Maxime Devos , Yin Kangkai , Sudip Mukherjee +Subject: [PATCH] + +Fix segfault when run as normal user + +Also exit immediately when "restartd -h" +Signed-off-by: Yin Kangkai + +Fix build with gcc-10 + +Bug: https://bugs.debian.org/957761 +Signed-off-by: Sudip Mukherjee + +Handle memory allocation failures. + +This makes the code a little more robust. +Signed-off-by: Maxime Devos + +Handle fopen failures. + +This makes the code a little more robust. What if /var/run does not +exist, or we do not have permission to open +/var/run/restartd.pid (EPERM?) due to SELinux misconfiguration? +Signed-off-by: Maxime Devos + +Handle printf and fprintf failures. + +This makes the code a little more robust. What if the write was +refused to the underlying device being removed? + +The --help, debug and stderr printfs were ignored because there error +handling does not appear important to me. +Signed-off-by: Maxime Devos + +Handle fclose failures when writing. + +This makes the code a little more robust. What if a quotum is exceeded? +Signed-off-by: Maxime Devos +--- + config.c | 19 +++++++++---- + config.h | 14 ++++++---- + restartd.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++------- + 3 files changed, 92 insertions(+), 21 deletions(-) + +diff --git a/config.c b/config.c +index f307b8a..5cc0271 100644 +--- a/config.c ++++ b/config.c +@@ -57,7 +57,11 @@ int read_config(void) + config_process_number = 0; + + line1 = (char *) malloc(MAX_LINE_LENGTH); ++ if (!line1) ++ oom_failure(); + line2 = (char *) malloc(MAX_LINE_LENGTH); ++ if (!line2) ++ oom_failure(); + + if ((config_fd = fopen(config_file, "rt")) == NULL) { + fprintf(stderr, "Error at opening config file: %s\n", config_file); +@@ -155,11 +159,16 @@ void dump_config(void) { + int i; + + for(i=0; i + * Copyright (C) 2006 Aurélien GÉRÔME ++ * Copyright (C) 2022 Maxime Devos + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -25,12 +26,12 @@ + + #define DEFAULT_CONFIG "/etc/restartd.conf" + +-int debug; +-int config_process_number; +-int check_interval; +-int foreground; +-struct config_process_type *config_process; +-char *config_file; ++extern int debug; ++extern int config_process_number; ++extern int check_interval; ++extern int foreground; ++extern struct config_process_type *config_process; ++extern char *config_file; + + typedef struct config_process_type { + char name[64]; +@@ -43,5 +44,6 @@ typedef struct config_process_type { + + int read_config(/* char *config_file */); + void dump_config(void); ++void oom_failure(void); + + #endif /* RESTARTD_CONFIG_H */ +diff --git a/restartd.c b/restartd.c +index 2aa720c..aa74334 100644 +--- a/restartd.c ++++ b/restartd.c +@@ -1,6 +1,7 @@ + /* restartd - Process checker and/or restarter daemon + * Copyright (C) 2000-2002 Tibor Koleszar + * Copyright (C) 2006 Aurélien GÉRÔME ++ * Copyright (C) 2022 Maxime Devos + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -35,6 +36,13 @@ + + #include "config.h" + ++int debug; ++int config_process_number; ++int check_interval; ++int foreground; ++struct config_process_type *config_process; ++char *config_file; ++ + /* SIGTERM & SIGHUP handler */ + void got_signal(int sig) + { +@@ -52,6 +60,17 @@ void got_signal(int sig) + } + } + ++/* Ignoring out-of-memory failures is risky on systems without virtual memory ++ where additionally at address 0 there is actually something important ++ mapped. Additionally, while often on Linux the OOM killer will kill processes ++ where an OOM happens, this is not always the case and there exist other systems ++ without an OOM killer (e.g. the Hurd). */ ++void oom_failure() ++{ ++ syslog(LOG_ERR, "Failed to allocate memory. Exiting."); ++ exit(1); ++} ++ + int main(int argc, char *argv[]) + { + DIR *procdir_id; +@@ -75,15 +94,21 @@ int main(int argc, char *argv[]) + + /* Options */ + config_file = strdup(DEFAULT_CONFIG); ++ if (!config_file) ++ oom_failure(); ++ + list_only = 0; + + for(i = 0; i < argc; i++) { + if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--config")) { + config_file = strdup(argv[i + 1]); ++ if (!config_file) ++ oom_failure(); + } + if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) { + printf("restard %s - Copyright 2000-2002 Tibor Koleszar \n" +- " Copyright 2006 Aurélien GÉRÔME \n", ++ " Copyright 2006 Aurélien GÉRÔME \n" ++ " Copyright 2022 Maxime Devos \n", + VERSION); + exit(0); + } +@@ -118,10 +143,13 @@ int main(int argc, char *argv[]) + " -i : the check interval in second\n" + " -l : list configuration options\n" + " -h : help\n\n", VERSION); ++ exit(0); + } + } + + config_process = malloc(sizeof(struct config_process_type) * 128); ++ if (!config_process) ++ oom_failure(); + + read_config(); + if (list_only) { +@@ -133,9 +161,17 @@ int main(int argc, char *argv[]) + config_process_number); + + procdir_dirent = malloc(sizeof(struct dirent)); ++ if (!procdir_dirent) ++ oom_failure(); + proc_cmdline_str = (char *) malloc(1024); ++ if (!proc_cmdline_str) ++ oom_failure(); + proc_cmdline_name = (char *) malloc(1024); ++ if (!proc_cmdline_name) ++ oom_failure(); + regc = malloc(1024); ++ if (!regc) ++ oom_failure(); + + /* Catch signals */ + signal(SIGTERM, got_signal); +@@ -187,8 +223,19 @@ int main(int argc, char *argv[]) + } + + out_proc = fopen("/var/run/restartd.pid", "wt"); +- fprintf(out_proc, "%d", getpid()); +- fclose(out_proc); ++ if (!out_proc) { ++ syslog(LOG_ERR, "Failed to open /var/run/restartd.pid"); ++ return -1; ++ } ++ if (fprintf(out_proc, "%d", getpid()) < 0) { ++ syslog(LOG_ERR, "Failed to write to /var/run/restartd.pid. Exiting."); ++ return -1; ++ } ++ if (fclose(out_proc) < 0) { /* errors can happen when flushing the buffer */ ++ syslog(LOG_ERR, "Failed to write to /var/run/restartd.pid. Exiting."); ++ return -1; ++ } ++ + + while(1) { + if ((procdir_id = opendir("/proc")) == NULL) { +@@ -237,16 +284,23 @@ int main(int argc, char *argv[]) + now = time(NULL); + + out_proc = fopen("/var/run/restartd", "wt"); ++ if (!out_proc) { ++ syslog(LOG_ERR, "Failed to open /var/run/restartd.pid"); ++ return -1; ++ } + +- fprintf(out_proc, "%s\n", ctime(&now)); ++ if (fprintf(out_proc, "%s\n", ctime(&now)) < 0) { ++ syslog(LOG_ERR, "Failed to write to /var/run/restartd. Exiting."); ++ return -1; ++ } + + for(i=0; i 0) { + if (strlen(config_process[i].running) > 0) { + strcpy(config_process[i].status, "running"); +- syslog(LOG_INFO, "%s is running, executing '%s'", ++ /* syslog(LOG_INFO, "%s is running, executing '%s'", + config_process[i].name, +- config_process[i].running); ++ config_process[i].running); */ + system(config_process[i].running); + } else { + strcpy(config_process[i].status, "running"); +@@ -267,12 +321,18 @@ int main(int argc, char *argv[]) + strcpy(config_process[i].status, "not running"); + } + +- fprintf(out_proc, "%-12s %-12s %s\n", +- config_process[i].name, config_process[i].status, +- config_process[i].processes); ++ if (fprintf(out_proc, "%-12s %-12s %s\n", ++ config_process[i].name, config_process[i].status, ++ config_process[i].processes) < 0) { ++ syslog(LOG_ERR, "Failed to write to /var/run/restartd. Exiting."); ++ return -1; ++ } + } + +- fclose(out_proc); ++ if (fclose(out_proc) < 0) { ++ syslog(LOG_ERR, "Failed to write to /var/run/restartd.pid. Exiting."); ++ return -1; ++ } + + sleep(check_interval); + } +-- +2.37.3 + -- cgit v1.2.3 From 549a72f1289b3ad27410f248b92b1a10b838d123 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 19 Feb 2024 14:07:29 +0100 Subject: gnu: r-sgloptim: Apply patch to fix build. * gnu/packages/patches/r-sgloptim.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cran.scm (r-sgloptim)[source]: Apply it. Change-Id: I6435ec1dfadcffac684c378cd074777a19cd0d7f --- gnu/local.mk | 1 + gnu/packages/cran.scm | 3 +- gnu/packages/patches/r-sgloptim.patch | 53 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/r-sgloptim.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c08b27f94d..58011d1149 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1973,6 +1973,7 @@ dist_patch_DATA = \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/r-httpuv-1.6.6-unvendor-libuv.patch \ %D%/packages/patches/r-sapa-lapack.patch \ + %D%/packages/patches/r-sgloptim.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 2822da369a..a076a52640 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -33337,7 +33337,8 @@ (define-public r-sgloptim (uri (cran-uri "sglOptim" version)) (sha256 (base32 - "15bkkvgp9v9vsp65wps48g3c2fa0fj1025hbrziywq14j7wayyjr")))) + "15bkkvgp9v9vsp65wps48g3c2fa0fj1025hbrziywq14j7wayyjr")) + (patches (search-patches "r-sgloptim.patch")))) (properties `((upstream-name . "sglOptim"))) (build-system r-build-system) diff --git a/gnu/packages/patches/r-sgloptim.patch b/gnu/packages/patches/r-sgloptim.patch new file mode 100644 index 0000000000..efba2c7013 --- /dev/null +++ b/gnu/packages/patches/r-sgloptim.patch @@ -0,0 +1,53 @@ +From cb9a15eb9d558b2b4b67f9e6806b394f65bff01f Mon Sep 17 00:00:00 2001 +From: Dirk Eddelbuettel +Date: Wed, 30 Nov 2022 20:15:42 -0600 +Subject: [PATCH] Simplify includes and only include RcppArmadillo.h + +--- + inst/include/sgl.h | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/inst/include/sgl.h b/inst/include/sgl.h +index a36011e..869a295 100644 +--- a/inst/include/sgl.h ++++ b/inst/include/sgl.h +@@ -21,13 +21,12 @@ + + #define R_NO_REMAP + ++//R, Rcpp, RcppArmadillo ++#include ++ + //Progress monitor + #include + +-//Rcpp ect +-#include +-#include +-#include + + // Debugging + #ifdef SGL_DEBUG +@@ -45,8 +44,10 @@ + #else + // Do no debugging + #define ARMA_NO_DEBUG ++#ifndef NDEBUG + #define NDEBUG + #endif ++#endif + + // Registration helper macros + #define STR_VALUE(x) #x +@@ -59,11 +60,6 @@ + + #define CALL_METHOD(METHOD, MODULE, ARGS) {GET_STR_VALUE(FUN_NAME(METHOD,MODULE)), (DL_FUNC) &r_ ## MODULE ## _ ## METHOD, ARGS} + +-//Support for xl matrices +-//#define ARMA_64BIT_WORD +- +-#include +-#include + + //Boost + #include -- cgit v1.2.3 From b4148713d18c4b6c37639653de5191eb7f1ca4cc Mon Sep 17 00:00:00 2001 From: Ahmad Draidi Date: Sun, 4 Feb 2024 17:54:42 +0400 Subject: gnu: Update wlroots to 0.17.1. Keep the older version as wlroots-0.16 since a few packages break without it. * gnu/packages/wm.scm (wlroots): Update to 0.17.1. [source]: Add patch. [propagated-inputs]: Add libdisplay-info. * gnu/packages/patches/wlroots-hwdata-fallback.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/wm.scm (wlroots-0.16): New variable. * gnu/packages/wm.scm (cage)[inputs]: Replace wlroots with wlroots-0.16. * gnu/packages/wm.scm (fnott)[inputs]: Likewise. * gnu/packages/wm.scm (dwl)[inputs]: Likewise. * gnu/packages/wm.scm (sway)[inputs]: Likewise. * gnu/packages/wm.scm (cagebreak)[inputs]: Likewise. * gnu/packages/wm.scm (hikari)[inputs]: Likewise. * gnu/packages/wm.scm (river)[native-inputs]: Likewise. Change-Id: Ib3d3938d6486fb1674380811a6dc0a512c991ac7 Signed-off-by: John Kehayias --- gnu/local.mk | 1 + gnu/packages/patches/wlroots-hwdata-fallback.patch | 46 ++++++++++++++++++++++ gnu/packages/wm.scm | 37 +++++++++++++---- gnu/packages/zig-xyz.scm | 2 +- 4 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/wlroots-hwdata-fallback.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 58011d1149..bed0c181e4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2176,6 +2176,7 @@ dist_patch_DATA = \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ %D%/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ + %D%/packages/patches/wlroots-hwdata-fallback.patch \ %D%/packages/patches/wmctrl-64-fix.patch \ %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch \ %D%/packages/patches/wordnet-CVE-2008-2149.patch \ diff --git a/gnu/packages/patches/wlroots-hwdata-fallback.patch b/gnu/packages/patches/wlroots-hwdata-fallback.patch new file mode 100644 index 0000000000..6468c7cbf3 --- /dev/null +++ b/gnu/packages/patches/wlroots-hwdata-fallback.patch @@ -0,0 +1,46 @@ +backend/drm: add hardcoded hwdata path fallback + +Add hardcoded fallback "/usr/share/hwdata/pnp.ids" as a +temporary solution to get things working in Guix until +hwdata ships with pkg-config file. + +diff --git a/backend/drm/meson.build b/backend/drm/meson.build +index 6fcb2c15..ed95360a 100644 +--- a/backend/drm/meson.build ++++ b/backend/drm/meson.build +@@ -1,8 +1,7 @@ + hwdata = dependency( + 'hwdata', +- required: 'drm' in backends, ++ required: false, + native: true, +- not_found_message: 'Required for the DRM backend.', + ) + + libdisplay_info = dependency( +@@ -19,15 +18,21 @@ libliftoff = dependency( + required: false, + ) + +-if not (hwdata.found() and libdisplay_info.found() and features['session']) ++if hwdata.found() ++ hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir') ++ pnp_ids = files(hwdata_dir / 'pnp.ids') ++else ++ pnp_ids = files('/usr/share/hwdata/pnp.ids') ++endif ++ ++if not (libdisplay_info.found() and features['session']) + subdir_done() + endif + +-hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir') + pnpids_c = custom_target( + 'pnpids.c', + output: 'pnpids.c', +- input: files(hwdata_dir / 'pnp.ids'), ++ input: pnp_ids, + feed: true, + capture: true, + command: files('gen_pnpids.sh'), + diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 9abf505caf..fdf846f982 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -67,6 +67,7 @@ ;;; Copyright © 2023 Jaeme Sifat ;;; Copyright © 2023 Josselin Poiret ;;; Copyright © 2024 Timotej Lazar +;;; Copyright © 2024 Ahmad Draidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -208,7 +209,7 @@ (define-public cage (sha256 (base32 "11sg9x08zl2nr7a723h462knz5lf58sgvkhv1mgc9z3hhkhvbsja")))) (build-system meson-build-system) (native-inputs (list pkg-config scdoc)) - (inputs (list wayland wlroots libxkbcommon)) + (inputs (list wayland wlroots-0.16 libxkbcommon)) (home-page "https://github.com/cage-kiosk/cage") (synopsis "Wayland kiosk") (description "This package provides a Wayland @dfn{kiosk}, which runs a @@ -1168,7 +1169,7 @@ (define-public fnott tllist scdoc)) (inputs - (list wlroots wayland fcft dbus libpng)) + (list wlroots-0.16 wayland fcft dbus libpng)) (home-page "https://codeberg.org/dnkl/fnott") (synopsis "Keyboard driven and lightweight Wayland notification daemon") (description "Fnott is a keyboard driven and lightweight notification daemon @@ -1570,7 +1571,7 @@ (define-public dwl (native-inputs (list pkg-config)) (inputs - (list wlroots)) + (list wlroots-0.16)) (home-page "https://github.com/djpohly/dwl") (synopsis "Dynamic window manager for Wayland") (description @@ -1676,7 +1677,7 @@ (define-public polybar (define-public wlroots (package (name "wlroots") - (version "0.16.2") + (version "0.17.1") (source (origin (method git-fetch) @@ -1685,7 +1686,9 @@ (define-public wlroots (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1m12nv6avgnz626h3giqp6gcx44w1wq6z0jy780mx8z255ic7q15")))) + (base32 "1hj4gq5vx8in65622yvjm8bwqkw2vpc556k9my997a0hn0ricj37")) + ;; This patch can be removed once hwdata in Guix supports pkg-config + (patches (search-patches "wlroots-hwdata-fallback.patch")))) (build-system meson-build-system) (arguments `(#:phases @@ -1706,6 +1709,7 @@ (define-public wlroots (propagated-inputs (list ;; As required by wlroots.pc. eudev + libdisplay-info libinput-minimal libxkbcommon mesa @@ -1731,6 +1735,23 @@ (define-public wlroots modules for building a Wayland compositor.") (license license:expat))) ; MIT license +(define-public wlroots-0.16 + (package + (inherit wlroots) + (name "wlroots-0.16") + (version "0.16.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/wlroots/wlroots") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m12nv6avgnz626h3giqp6gcx44w1wq6z0jy780mx8z255ic7q15")))) + (propagated-inputs (modify-inputs (package-propagated-inputs wlroots) + (delete libdisplay-info))))) + (define-public sway (package (name "sway") @@ -1775,7 +1796,7 @@ (define-public sway pcre2 swaybg wayland - wlroots)) + wlroots-0.16)) (native-inputs (cons* linux-pam mesa pkg-config scdoc wayland-protocols (if (%current-target-system) @@ -2967,7 +2988,7 @@ (define-public cagebreak (("/etc/") (string-append #$output "/etc/")) (("/usr/share/") (string-append #$output "/usr/share/")))))))) (native-inputs (list pkg-config scdoc)) - (inputs (list libevdev pango wlroots)) + (inputs (list libevdev pango wlroots-0.16)) (home-page "https://github.com/project-repo/cagebreak") (synopsis "Tiling wayland compositor inspired by ratpoison") (description @@ -3107,7 +3128,7 @@ (define-public hikari linux-pam pango wayland - wlroots)) + wlroots-0.16)) (arguments `(#:tests? #f ; no tests #:make-flags diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm index f01c120cc3..fd194a6a4f 100644 --- a/gnu/packages/zig-xyz.scm +++ b/gnu/packages/zig-xyz.scm @@ -71,7 +71,7 @@ (define-public river scdoc wayland wayland-protocols - wlroots)) + wlroots-0.16)) (home-page "https://github.com/riverwm/river") (synopsis "Dynamic tiling Wayland compositor") (description -- cgit v1.2.3 From 313458c58c3fd89705081e1721e7c6fe7818d813 Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Fri, 16 Feb 2024 01:34:59 +0800 Subject: gnu: git-filter-repo: Update to 2.38.0. * gnu/packages/patches/git-filter-repo-generate-doc.patch: New file. * gnu/local.mk (dist_patch_DATA): Regisiter it. * gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0. [source]: Switch to git-fetch. Use the patch. [build-system]: Switch to gnu-build-system. [native-inputs]: Add asciidoc, docbook-xsl, libxml2, xmlto. Modified-by: Hilton Chain Change-Id: I7b15975ea56c44ae580d19cfe5a9e3eb75c6db0d Signed-off-by: Hilton Chain --- gnu/local.mk | 1 + .../patches/git-filter-repo-generate-doc.patch | 88 ++++++++++++++++++++++ gnu/packages/version-control.scm | 69 +++++++++++++---- 3 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 gnu/packages/patches/git-filter-repo-generate-doc.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bed0c181e4..741c72a653 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1305,6 +1305,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ + %D%/packages/patches/git-filter-repo-generate-doc.patch \ %D%/packages/patches/gitg-fix-positional-argument.patch \ %D%/packages/patches/gklib-suitesparse.patch \ %D%/packages/patches/glib-appinfo-watch.patch \ diff --git a/gnu/packages/patches/git-filter-repo-generate-doc.patch b/gnu/packages/patches/git-filter-repo-generate-doc.patch new file mode 100644 index 0000000000..4535ae5bc4 --- /dev/null +++ b/gnu/packages/patches/git-filter-repo-generate-doc.patch @@ -0,0 +1,88 @@ +From 56e6857e71d2b2a2236625f3c8b112bd40a8b164 Mon Sep 17 00:00:00 2001 +From: Josselin Poiret +Date: Fri, 16 Feb 2024 00:21:06 +0800 +Subject: [PATCH] Add documentation generation. + +This requires the manpage XSL and asciidoc config files from git 2.41.0. + +Modified-by: Hilton Chain +--- + Documentation/Makefile | 34 ++++++++++++++++++++++++++++++++++ + Makefile | 17 +++-------------- + 2 files changed, 37 insertions(+), 14 deletions(-) + create mode 100644 Documentation/Makefile + +diff --git a/Documentation/Makefile b/Documentation/Makefile +new file mode 100644 +index 0000000..d81ffbe +--- /dev/null ++++ b/Documentation/Makefile +@@ -0,0 +1,34 @@ ++MAN_BASE_URL := $(prefix)/share/doc/git-doc/ ++VERSION := $(git log --pretty="%H" -n 1) ++ ++ASCIIDOC := asciidoc ++ASCIIDOC_EXTRA := ++ASCIIDOC_HTML := xhtml11 ++ASCIIDOC_DOCBOOK := docbook ++ASCIIDOC_CONF := -f asciidoc.conf ++ASCIIDOC_COMMON := $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \ ++ -amanmanual='git-filter-repo Manual' -amansource='git-filter-repo $(VERSION)' ++ASCIIDOC_DEPS := asciidoc.conf ++TXT_TO_HTML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) ++TXT_TO_XML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK) ++MANPAGE_XSL := manpage-normal.xsl ++XMLTO := xmlto ++XMLTO_EXTRA := -m manpage-bold-literal.xsl \ ++ --stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)' ++ ++manpage-prereqs := $(wildcard manpage*.xsl) ++manpage-cmd := $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man ++ ++%.xml : %.txt $(ASCIIDOC_DEPS) ++ $(TXT_TO_XML) -d manpage -o $@ $< ++ ++man1/%.1 : %.xml $(manpage-prereqs) ++ mkdir -p man1 ++ $(manpage-cmd) -o man1 $< ++ ++html/%.html : %.txt $(ASCIIDOC_DEPS) ++ mkdir -p html ++ $(TXT_TO_HTML) -d manpage -o $@ $< ++ ++man: man1/git-filter-repo.1 ++html: html/git-filter-repo.html +diff --git a/Makefile b/Makefile +index a443450..d965ae5 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,21 +20,10 @@ test: + fixup_locale: + sed -ie s%@@LOCALEDIR@@%$(localedir)% git-filter-repo + +-# People installing from tarball will already have man1/git-filter-repo.1 and +-# html/git-filter-repo.html. But let's support people installing from a git +-# clone too; for them, just cheat and snag a copy of the built docs that I +-# record in a different branch. +-snag_docs: Documentation/man1/git-filter-repo.1 Documentation/html/git-filter-repo.html ++doc: ++ $(MAKE) -C Documentation man html + +-Documentation/man1/git-filter-repo.1: +- mkdir -p Documentation/man1 +- git show origin/docs:man1/git-filter-repo.1 >Documentation/man1/git-filter-repo.1 +- +-Documentation/html/git-filter-repo.html: +- mkdir -p Documentation/html +- git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html +- +-install: snag_docs #fixup_locale ++install: doc #fixup_locale + install -Dm0755 git-filter-repo "$(DESTDIR)/$(bindir)/git-filter-repo" + install -dm0755 "$(DESTDIR)/$(pythondir)" + ln -sf "$(bindir)/git-filter-repo" "$(DESTDIR)/$(pythondir)/git_filter_repo.py" + +base-commit: cbc6535694380d3a3bf3e5c96410d4ce7e8de94f +-- +2.41.0 + diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index cef0012645..af237ab4ee 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -50,6 +50,8 @@ ;;; Copyright © 2023 Nicolas Graves ;;; Copyright © 2023 Kjartan Oli Agustsson ;;; Copyright © 2023 Steve George +;;; Copyright © 2023 Josselin Poiret +;;; Copyright © 2024 Hilton Chain ;;; ;;; This file is part of GNU Guix. ;;; @@ -3846,25 +3848,64 @@ (define-public qgit (define-public git-filter-repo (package (name "git-filter-repo") - (version "2.29.0") + (version "2.38.0") (source (origin - ;; Use a release tarball instead of 'git-fetch' because it contains - ;; pre-compiled man-pages which are too hard to build in this context - ;; as it depends on Git's Makefile. - (method url-fetch) - (uri (string-append "https://github.com/newren/git-filter-repo/releases/" - "download/v" version - "/git-filter-repo-" version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/newren/git-filter-repo") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb")))) - (build-system copy-build-system) + "1al43zpw1mdfy9i05w4xw178abypjwnkk52lqvmbl19lr1l47r4i")) + ;; Modified from . + ;; Used with 'unpack-git-source phase. + (patches (search-patches "git-filter-repo-generate-doc.patch")))) + (build-system gnu-build-system) (arguments - `(#:install-plan - '(("git-filter-repo" "libexec/git-core/") - ("Documentation/man1/" "share/man/man1") - ("/" "" #:include ())))) + (list + #:tests? #f ;No tests. + #:imported-modules + `(,@%gnu-build-system-modules + (guix build python-build-system)) + #:modules + '((guix build gnu-build-system) + ((guix build python-build-system) #:select (site-packages)) + (guix build utils) + (srfi srfi-26)) + #:make-flags + #~(list (string-append "prefix=" #$output) + (string-append "VERSION=" #$(package-version this-package))) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'unpack-git-source + (lambda _ + (let* ((old-path (getcwd)) + (doc-source (string-append old-path "/Documentation"))) + (mkdir-p "git-source") + (chdir "git-source") + ((assoc-ref %standard-phases 'unpack) + #:source #+(package-source git)) + (for-each + (cut install-file <> doc-source) + (find-files "." "asciidoc\\.conf$|manpage.*\\.xsl$")) + (chdir old-path) + (delete-file-recursively "git-source")))) + (add-before 'build 'set-pythondir + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile" + (("(pythondir = ).*" _ pre) + (string-append pre (site-packages inputs outputs)))))) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "doc" make-flags)))))) + (native-inputs + (list asciidoc + docbook-xsl + libxml2 ;for XML_CATALOG_FILES + xmlto)) (inputs (list python)) ;for the shebang (home-page "https://github.com/newren/git-filter-repo") (synopsis "Quickly rewrite Git repository history") -- cgit v1.2.3