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 --- gnu/local.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5683dbf6de..becca7dd56 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,7 +935,6 @@ dist_patch_DATA = \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ %D%/packages/patches/aria2-unbundle-wslay.patch \ %D%/packages/patches/ark-skip-xar-test.patch \ - %D%/packages/patches/arpack-ng-propagate-rng-state.patch \ %D%/packages/patches/asli-use-system-libs.patch \ %D%/packages/patches/aspell-CVE-2019-25051.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ -- 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/local.mk') 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/local.mk') 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/local.mk') 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/local.mk') 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