diff options
Diffstat (limited to 'gnu/packages/patches')
6 files changed, 326 insertions, 72 deletions
diff --git a/gnu/packages/patches/agda-categories-use-stdlib-1.7.3.patch b/gnu/packages/patches/agda-categories-use-stdlib-1.7.3.patch new file mode 100644 index 0000000000..32680b99d7 --- /dev/null +++ b/gnu/packages/patches/agda-categories-use-stdlib-1.7.3.patch @@ -0,0 +1,28 @@ +From 76d3863a5e6e7b9ee948f10a3faec3420a2020f1 Mon Sep 17 00:00:00 2001 +Message-ID: <76d3863a5e6e7b9ee948f10a3faec3420a2020f1.1698265016.git.dev@jpoiret.xyz> +From: Josselin Poiret <dev@jpoiret.xyz> +Date: Wed, 25 Oct 2023 22:15:43 +0200 +Subject: [PATCH] Bump stdlib to 1.7.3 + +From: Josselin Poiret <dev@jpoiret.xyz> + +--- + agda-categories.agda-lib | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agda-categories.agda-lib b/agda-categories.agda-lib +index 5b19c405..4d63d415 100644 +--- a/agda-categories.agda-lib ++++ b/agda-categories.agda-lib +@@ -1,3 +1,3 @@ + name: agda-categories +-depend: standard-library-1.7.2 ++depend: standard-library-1.7.3 + include: src/ + +base-commit: 9d61106740147a67fa2cae0a89ac066897b24a51 +prerequisite-patch-id: 508dabd923ba9ac1ee4d8dab6697432b4bd8ba18 +prerequisite-patch-id: b5f39b4fc9e4c9993ab31300de041ed2c7eb696b +-- +2.41.0 + diff --git a/gnu/packages/patches/agda-use-sphinx-5.patch b/gnu/packages/patches/agda-use-sphinx-5.patch new file mode 100644 index 0000000000..19fcf252f9 --- /dev/null +++ b/gnu/packages/patches/agda-use-sphinx-5.patch @@ -0,0 +1,51 @@ +From 99ed1b59ef73fd35053810f6a09e034e1513caee Mon Sep 17 00:00:00 2001 +Message-ID: <99ed1b59ef73fd35053810f6a09e034e1513caee.1698243851.git.dev@jpoiret.xyz> +From: Josselin Poiret <dev@jpoiret.xyz> +Date: Wed, 25 Oct 2023 16:23:32 +0200 +Subject: [PATCH] Revert "Docs: bump Sphinx to 6.0.0" + +From: Josselin Poiret <dev@jpoiret.xyz> + +This reverts commit 40dd42eaa7c04e134fa38cb4f958414a76df27a7. +--- + doc/user-manual/conf.py | 5 ++--- + doc/user-manual/requirements.txt | 4 ++-- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/doc/user-manual/conf.py b/doc/user-manual/conf.py +index 127f6582dc..d737ede19b 100644 +--- a/doc/user-manual/conf.py ++++ b/doc/user-manual/conf.py +@@ -35,7 +35,7 @@ release = version + # + # If your change the version here also change it in the + # `requirements.txt` file [Issue #1936]. +-needs_sphinx = '6.0.0' ++needs_sphinx = '5.0.0' + + # Add any Sphinx extension module names here, as strings. They can be + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +@@ -43,8 +43,7 @@ needs_sphinx = '6.0.0' + extensions = [ + 'sphinx.ext.imgmath', + 'sphinx.ext.ifconfig', +- 'sphinx.ext.imgconverter', +- 'sphinxcontrib.jquery' ++ 'sphinx.ext.imgconverter' + ] + + # Add any paths that contain templates here, relative to this directory. +diff --git a/doc/user-manual/requirements.txt b/doc/user-manual/requirements.txt +index 384b1466b4..656e6c9ac0 100644 +--- a/doc/user-manual/requirements.txt ++++ b/doc/user-manual/requirements.txt +@@ -1,2 +1,2 @@ +-Sphinx >= 7.2.5 +-sphinx_rtd_theme >= 1.3.0 ++Sphinx >= 5.0.0, != 5.2.0.post0 ++sphinx_rtd_theme >= 1.0 + +base-commit: 08b79a684d712ba3dc4b26e5052ec49f49f5ff6c +-- +2.41.0 + diff --git a/gnu/packages/patches/clang-16.0-libc-search-path.patch b/gnu/packages/patches/clang-16.0-libc-search-path.patch new file mode 100644 index 0000000000..282f58f03b --- /dev/null +++ b/gnu/packages/patches/clang-16.0-libc-search-path.patch @@ -0,0 +1,95 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on foreign distros. + +diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp +index 87a0c5a58511..86ea82eda4b5 100644 +--- a/clang/lib/Driver/Distro.cpp ++++ b/clang/lib/Driver/Distro.cpp +@@ -98,6 +98,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ // The compiler should always behave the same, even when used via Guix on a ++ // foreign distro. ++ return Distro::UnknownDistro; ++ + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp +index aa125bb308e8..8b86e144054c 100644 +--- a/clang/lib/Driver/ToolChains/Cuda.cpp ++++ b/clang/lib/Driver/ToolChains/Cuda.cpp +@@ -124,6 +124,9 @@ CudaInstallationDetector::CudaInstallationDetector( + const Driver &D, const llvm::Triple &HostTriple, + const llvm::opt::ArgList &Args) + : D(D) { ++ // Don't look for CUDA in /usr. ++ return; ++ + struct Candidate { + std::string Path; + bool StrictChecking; +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index c6fb290ffdb4..4736f4bb3392 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -189,6 +189,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + Generic_GCC::PushPPaths(PPaths); + ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 ++ + Distro Distro(D.getVFS(), Triple); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -249,6 +253,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + #ifdef ENABLE_LINKER_BUILD_ID + ExtraOpts.push_back("--build-id"); ++#endif + #endif + + // The selection of paths to try here is designed to match the patterns which +@@ -270,6 +275,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + } + Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); + ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib", MultiarchTriple), Paths); + addPathIfExists(D, concat(SysRoot, "/lib/..", OSLibDir), Paths); + +@@ -298,9 +304,11 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, concat(SysRoot, "/", OSLibDir, ABIName), Paths); + addPathIfExists(D, concat(SysRoot, "/usr", OSLibDir, ABIName), Paths); + } ++#endif + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++#if 0 + // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs + // libc++.so in D.Dir+"/../lib/". Detect this path. + // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported. +@@ -310,6 +318,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); ++#endif ++ ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); ++ ++ // Add GCC's lib/ directory so libstdc++.so can be found. ++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths); + } + + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { diff --git a/gnu/packages/patches/clang-17.0-libc-search-path.patch b/gnu/packages/patches/clang-17.0-libc-search-path.patch new file mode 100644 index 0000000000..dd4d8cb998 --- /dev/null +++ b/gnu/packages/patches/clang-17.0-libc-search-path.patch @@ -0,0 +1,90 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on foreign distros. + +diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp +index 6e0087565941..c0a3ba7d7702 100644 +--- a/clang/lib/Driver/Distro.cpp ++++ b/clang/lib/Driver/Distro.cpp +@@ -99,6 +99,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ // The compiler should always behave the same, even when used via Guix on a ++ // foreign distro. ++ return Distro::UnknownDistro; ++ + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp +index 3a577650eb08..ca3373edc127 100644 +--- a/clang/lib/Driver/ToolChains/Cuda.cpp ++++ b/clang/lib/Driver/ToolChains/Cuda.cpp +@@ -128,6 +128,9 @@ CudaInstallationDetector::CudaInstallationDetector( + const Driver &D, const llvm::Triple &HostTriple, + const llvm::opt::ArgList &Args) + : D(D) { ++ // Don't look for CUDA in /usr. ++ return; ++ + struct Candidate { + std::string Path; + bool StrictChecking; +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 1ba222bf83b1..28766c5ab792 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -220,6 +220,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + Generic_GCC::PushPPaths(PPaths); + ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 ++ + Distro Distro(D.getVFS(), Triple); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -280,6 +284,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + #ifdef ENABLE_LINKER_BUILD_ID + ExtraOpts.push_back("--build-id"); ++#endif + #endif + + // The selection of paths to try here is designed to match the patterns which +@@ -301,6 +306,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + } + Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); + ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib", MultiarchTriple), Paths); + addPathIfExists(D, concat(SysRoot, "/lib/..", OSLibDir), Paths); + +@@ -329,11 +335,21 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, concat(SysRoot, "/", OSLibDir, ABIName), Paths); + addPathIfExists(D, concat(SysRoot, "/usr", OSLibDir, ABIName), Paths); + } ++#endif + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); ++#endif ++ ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); ++ ++ // Add GCC's lib/ directory so libstdc++.so can be found. ++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths); + } + + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { diff --git a/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch b/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch deleted file mode 100644 index 7a6cb642d0..0000000000 --- a/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch +++ /dev/null @@ -1,29 +0,0 @@ -Preserve subject when replying to patch threads. -Upstream status: likely to be in the next release (bug#66330) - -diff --git a/debbugs-gnu.el b/debbugs-gnu.el -index f366fba11d..cd549e364d 100644 ---- a/debbugs-gnu.el -+++ b/debbugs-gnu.el -@@ -1747,6 +1747,12 @@ MERGED is the list of bugs merged with this one." - (format "Re: bug#%d: %s" id (alist-get 'subject status))) - (debbugs-gnu-summary-mode 1))) - -+(defcustom debbugs-gnu-summary-keep-subject -+ (rx "[PATCH" (? (0+ (not (any digit "/]"))) (1+ digit) "/" (1+ digit)) "]") -+ "Regular expression which keeps the original message subject in replies." -+ :version "29.1" -+ :type 'regexp) -+ - (defvar debbugs-gnu-summary-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "C" #'debbugs-gnu-send-control-message) -@@ -1778,6 +1784,8 @@ MERGED is the list of bugs merged with this one." - (cons new new)) - address)))))) - ,@(and debbugs-gnu-subject -+ (not (string-match-p debbugs-gnu-summary-keep-subject -+ debbugs-gnu-subject)) - `((subject ,debbugs-gnu-subject))))))) - - (defun debbugs-gnu-guess-current-id () diff --git a/gnu/packages/patches/ucx-tcp-iface-ioctl.patch b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch index c441a0861a..2a0e4ce138 100644 --- a/gnu/packages/patches/ucx-tcp-iface-ioctl.patch +++ b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch @@ -3,102 +3,121 @@ TCP network interfaces cannot be obtained via /sys/class/net. This patch provides alternative code that uses the SIOCGIFCONF ioctl to get the names of the available TCP network interfaces. +Initially submitted at <https://github.com/openucx/ucx/pull/4462>. + diff --git a/src/uct/tcp/tcp_iface.c b/src/uct/tcp/tcp_iface.c -index cad4a2709..7c1d2c9de 100644 +index 6a6cd34fa..af32bb2e9 100644 --- a/src/uct/tcp/tcp_iface.c +++ b/src/uct/tcp/tcp_iface.c -@@ -17,6 +17,8 @@ - #include <sys/poll.h> +@@ -18,6 +18,8 @@ #include <netinet/tcp.h> #include <dirent.h> + #include <float.h> +#include <net/if.h> +#include <sys/ioctl.h> + #define UCT_TCP_IFACE_NETDEV_DIR "/sys/class/net" - extern ucs_class_t UCS_CLASS_DECL_NAME(uct_tcp_iface_t); -@@ -586,6 +588,68 @@ static UCS_CLASS_DEFINE_NEW_FUNC(uct_tcp_iface_t, uct_iface_t, uct_md_h, +@@ -875,6 +877,85 @@ static UCS_CLASS_DEFINE_NEW_FUNC(uct_tcp_iface_t, uct_iface_t, uct_md_h, uct_worker_h, const uct_iface_params_t*, const uct_iface_config_t*); +/* Fetch information about available network devices through an ioctl. */ -+static ucs_status_t query_devices_ioctl(uct_md_h md, -+ uct_tl_device_resource_t **tl_devices_p, -+ unsigned *num_tl_devices_p) ++static ucs_status_t uct_tcp_query_devices_ioctl(uct_md_h md, ++ uct_tl_device_resource_t **devices_p, ++ unsigned *num_devices_p) +{ + int sock, err, i; -+ uct_tl_device_resource_t *resources, *tmp; -+ unsigned num_resources; ++ uct_tl_device_resource_t *devices, *tmp; ++ unsigned num_devices; + ucs_status_t status; + struct ifconf conf; -+ struct ifreq reqs[10]; + -+ conf.ifc_len = sizeof reqs; -+ conf.ifc_req = reqs; ++ conf.ifc_len = 0; ++ conf.ifc_req = NULL; ++ ++ status = ucs_socket_create(AF_INET, SOCK_STREAM, &sock); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ err = ioctl(sock, SIOCGIFCONF, &conf); ++ if (err < 0) { ++ ucs_error("ioctl(SIOCGIFCONF) failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out; ++ } + -+ sock = socket(SOCK_STREAM, AF_INET, 0); -+ if (sock < 0) { -+ ucs_error("socket(2) failed: %m"); -+ status = UCS_ERR_IO_ERROR; -+ goto out; ++ conf.ifc_req = ucs_calloc(1, conf.ifc_len, "ifreq"); ++ if (conf.ifc_req == NULL) { ++ ucs_error("memory alocation failed"); ++ status = UCS_ERR_NO_MEMORY; ++ goto out; + } + + err = ioctl(sock, SIOCGIFCONF, &conf); + if (err < 0) { -+ ucs_error("SIOCGIFCONF ioctl failed: %m"); -+ status = UCS_ERR_IO_ERROR; -+ goto out; ++ ucs_error("ioctl(SIOCGIFCONF) failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out_free; + } + -+ resources = NULL; -+ num_resources = 0; -+ for (i = 0; i < conf.ifc_len / sizeof(struct ifreq); i++) { -+ const char *name = reqs[i].ifr_name; ++ devices = NULL; ++ num_devices = 0; ++ for (i = 0; i < (conf.ifc_len / sizeof(struct ifreq)); i++) { ++ const char *name = conf.ifc_req[i].ifr_name; ++ sa_family_t family = conf.ifc_req[i].ifr_addr.sa_family; + -+ if (!ucs_netif_is_active(name, AF_INET)) { ++ if (!ucs_netif_is_active(name, family)) { + continue; + } + -+ tmp = ucs_realloc(resources, sizeof(*resources) * (num_resources + 1), -+ "tcp resources"); ++ tmp = ucs_realloc(devices, sizeof(*devices) * (num_devices + 1), ++ "tcp devices"); + if (tmp == NULL) { -+ ucs_free(resources); ++ ucs_free(devices); + status = UCS_ERR_NO_MEMORY; -+ goto out; ++ goto out_free; + } -+ resources = tmp; ++ devices = tmp; + -+ ucs_snprintf_zero(resources[i].name, sizeof(resources[i].name), ++ ucs_snprintf_zero(devices[num_devices].name, ++ sizeof(devices[num_devices].name), + "%s", name); -+ resources[i].type = UCT_DEVICE_TYPE_NET; -+ ++num_resources; ++ devices[num_devices].type = UCT_DEVICE_TYPE_NET; ++ ++num_devices; + } + -+ *num_tl_devices_p = num_resources; -+ *tl_devices_p = resources; -+ status = UCS_OK; ++ *num_devices_p = num_devices; ++ *devices_p = devices; ++ status = UCS_OK; + ++out_free: ++ ucs_free(conf.ifc_req); +out: -+ if (sock >= 0) close(sock); ++ if (sock >= 0) { ++ close(sock); ++ } + return status; +} + ucs_status_t uct_tcp_query_devices(uct_md_h md, uct_tl_device_resource_t **devices_p, unsigned *num_devices_p) -@@ -599,9 +663,9 @@ ucs_status_t uct_tcp_query_devices(uct_md_h md, +@@ -893,9 +974,9 @@ ucs_status_t uct_tcp_query_devices(uct_md_h md, dir = opendir(UCT_TCP_IFACE_NETDEV_DIR); if (dir == NULL) { - ucs_error("opendir(%s) failed: %m", UCT_TCP_IFACE_NETDEV_DIR); - status = UCS_ERR_IO_ERROR; - goto out; -+ /* When /sys is unavailable, as can be the case in a container, -+ * resort to a good old 'ioctl'. */ -+ return query_devices_ioctl(md, devices_p, num_devices_p); ++ /* When /sys is unavailable, as can be the case in a container, ++ * resort to a good old 'ioctl'. */ ++ return uct_tcp_query_devices_ioctl(md, devices_p, num_devices_p); } devices = NULL; -@@ -655,7 +719,6 @@ ucs_status_t uct_tcp_query_devices(uct_md_h md, +@@ -963,7 +1044,6 @@ ucs_status_t uct_tcp_query_devices(uct_md_h md, out_closedir: closedir(dir); |