diff options
Diffstat (limited to 'gnu/packages/patches')
103 files changed, 3692 insertions, 4652 deletions
diff --git a/gnu/packages/patches/4store-fix-buildsystem.patch b/gnu/packages/patches/4store-fix-buildsystem.patch deleted file mode 100644 index 383baa9461..0000000000 --- a/gnu/packages/patches/4store-fix-buildsystem.patch +++ /dev/null @@ -1,56 +0,0 @@ -This patch sets a fixed version to avoid needing Git and the .git/ folder. -It also removes the creation of "/var/lib/4store", which is not available -during the install phase in GNU Guix. - -Patch by Roel Janssen <roel@gnu.org> -*** a/configure.ac Wed Feb 4 19:05:24 2015 ---- b/configure.ac Wed Mar 23 11:20:38 2016 -*************** -*** 2,13 **** - # Process this file with autoconf to produce a configure script. - - AC_PREREQ([2.50]) -! AC_INIT([4store], m4_esyscmd([./version.sh .version]), [http://4store.org/support/], [4store]) - AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) -! AM_INIT_AUTOMAKE([1.7 std-options -Wall]) - AC_CONFIG_HEADERS(4store-config.h) - - # Checks for programs. - AC_PROG_LIBTOOL - AC_PROG_AWK - AC_PROG_CC ---- 2,14 ---- - # Process this file with autoconf to produce a configure script. - - AC_PREREQ([2.50]) -! AC_INIT([4store], [1.1.6], [http://4store.org/support/], [4store]) - AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) -! AM_INIT_AUTOMAKE([1.7 std-options foreign -Wall]) - AC_CONFIG_HEADERS(4store-config.h) - - # Checks for programs. -+ AM_PROG_AR - AC_PROG_LIBTOOL - AC_PROG_AWK - AC_PROG_CC - -*** a/src/utilities/Makefile.am Wed Feb 4 19:05:24 2015 ---- b/src/utilities/Makefile.am Wed Mar 23 14:05:56 2016 -*************** -*** 13,20 **** - noinst_PROGRAMS = lex-file-verify 4s-rid - - install-data-local: -! mkdir -p $(DESTDIR)@FS_STORE_ROOT@ -! chmod 1777 $(DESTDIR)@FS_STORE_ROOT@ - - 4s_backend_destroy_SOURCES = backend-destroy.c - 4s_backend_destroy_LDADD = ../common/lib4sintl.a ---- 13,19 ---- - noinst_PROGRAMS = lex-file-verify 4s-rid - - install-data-local: -! echo "Please create the following directory: " $(DESTDIR)@FS_STORE_ROOT@ - - 4s_backend_destroy_SOURCES = backend-destroy.c - 4s_backend_destroy_LDADD = ../common/lib4sintl.a diff --git a/gnu/packages/patches/4store-unset-preprocessor-directive.patch b/gnu/packages/patches/4store-unset-preprocessor-directive.patch deleted file mode 100644 index c4b1d6eda4..0000000000 --- a/gnu/packages/patches/4store-unset-preprocessor-directive.patch +++ /dev/null @@ -1,16 +0,0 @@ -This patch removes the _XOPEN_SOURCE preprocessor directive as it does not seem to be needed. -Setting it removes the definition of strdup, which is used in filter-datatypes.c. - -Patch by Roel Janssen <roel@gnu.org> -*** a/src/frontend/filter-datatypes.c 1970-01-01 01:00:00.000000000 +0100 ---- b/src/frontend/filter-datatypes.c 2018-04-03 17:39:23.177905592 +0200 -*************** -*** 18,24 **** - * Copyright (C) 2006 Steve Harris for Garlik - */ - -- #define _XOPEN_SOURCE - #include <stdlib.h> - #include <string.h> - #include <math.h> ---- 18,23 ---- diff --git a/gnu/packages/patches/breezy-fix-gio.patch b/gnu/packages/patches/breezy-fix-gio.patch new file mode 100644 index 0000000000..f70e761555 --- /dev/null +++ b/gnu/packages/patches/breezy-fix-gio.patch @@ -0,0 +1,338 @@ +This patch combines https://code.launchpad.net/~jelmer/brz/enable-gio/+merge/419150 +and https://bazaar.launchpad.net/~jelmer/brz/fix-gio/revision/7570. + +=== modified file 'breezy/transport/gio_transport.py' +--- a/breezy/transport/gio_transport.py 2022-04-09 12:17:41 +0000 ++++ b/breezy/transport/gio_transport.py 2022-04-09 12:33:51 +0000 +@@ -52,11 +52,7 @@ + from ..tests.test_server import TestServer + + try: +- import glib +-except ImportError as e: +- raise errors.DependencyNotPresent('glib', e) +-try: +- import gio ++ from gi.repository import Gio as gio + except ImportError as e: + raise errors.DependencyNotPresent('gio', e) + + +@@ -57,6 +57,9 @@ + raise errors.DependencyNotPresent('gio', e) + + ++from gi.repository.GLib import GError ++ ++ + class GioLocalURLServer(TestServer): + """A pretend server for local transports, using file:// urls. + +@@ -81,7 +84,7 @@ + def __init__(self, transport, relpath): + FileStream.__init__(self, transport, relpath) + self.gio_file = transport._get_GIO(relpath) +- self.stream = self.gio_file.create() ++ self.stream = self.gio_file.create(0, None) + + def _close(self): + self.stream.close() +@@ -90,7 +93,7 @@ + try: + # Using pump_string_file seems to make things crash + osutils.pumpfile(BytesIO(bytes), self.stream) +- except gio.Error as e: ++ except GError as e: + # self.transport._translate_gio_error(e,self.relpath) + raise errors.BzrError(str(e)) + +@@ -98,12 +101,12 @@ + class GioStatResult(object): + + def __init__(self, f): +- info = f.query_info('standard::size,standard::type') ++ info = f.query_info('standard::size,standard::type', 0, None) + self.st_size = info.get_size() + type = info.get_file_type() +- if (type == gio.FILE_TYPE_REGULAR): ++ if type == gio.FileType.REGULAR: + self.st_mode = stat.S_IFREG +- elif type == gio.FILE_TYPE_DIRECTORY: ++ elif type == gio.FileType.DIRECTORY: + self.st_mode = stat.S_IFDIR + + +@@ -122,7 +125,7 @@ + user, netloc = netloc.rsplit('@', 1) + # Seems it is not possible to list supported backends for GIO + # so a hardcoded list it is then. +- gio_backends = ['dav', 'file', 'ftp', 'obex', 'sftp', 'ssh', 'smb'] ++ gio_backends = ['dav', 'file', 'ftp', 'obex', 'sftp', 'ssh', 'smb', 'http'] + if scheme not in gio_backends: + raise urlutils.InvalidURL(base, + extra="GIO support is only available for " + +@@ -138,13 +141,10 @@ + _from_transport=_from_transport) + + def _relpath_to_url(self, relpath): +- full_url = urlutils.join(self.url, relpath) +- if isinstance(full_url, str): +- raise urlutils.InvalidURL(full_url) +- return full_url ++ return urlutils.join(self.url, relpath) + + def _get_GIO(self, relpath): +- """Return the ftplib.GIO instance for this object.""" ++ """Return the GIO instance for this object.""" + # Ensures that a connection is established + connection = self._get_connection() + if connection is None: +@@ -152,7 +152,7 @@ + connection, credentials = self._create_connection() + self._set_connection(connection, credentials) + fileurl = self._relpath_to_url(relpath) +- file = gio.File(fileurl) ++ file = gio.File.new_for_uri(fileurl) + return file + + def _auth_cb(self, op, message, default_user, default_domain, flags): +@@ -197,7 +197,7 @@ + try: + obj.mount_enclosing_volume_finish(res) + self.loop.quit() +- except gio.Error as e: ++ except GError as e: + self.loop.quit() + raise errors.BzrError( + "Failed to mount the given location: " + str(e)) +@@ -209,12 +209,12 @@ + user, password = credentials + + try: +- connection = gio.File(self.url) ++ connection = gio.File.new_for_uri(self.url) + mount = None + try: + mount = connection.find_enclosing_mount() +- except gio.Error as e: +- if (e.code == gio.ERROR_NOT_MOUNTED): ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_MOUNTED: + self.loop = glib.MainLoop() + ui.ui_factory.show_message('Mounting %s using GIO' % + self.url) +@@ -227,7 +227,7 @@ + m = connection.mount_enclosing_volume(op, + self._mount_done_cb) + self.loop.run() +- except gio.Error as e: ++ except GError as e: + raise errors.TransportError(msg="Error setting up connection:" + " %s" % str(e), orig_error=e) + return connection, (user, password) +@@ -257,8 +257,8 @@ + if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode): + return True + return False +- except gio.Error as e: +- if e.code == gio.ERROR_NOT_FOUND: ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_FOUND: + return False + else: + self._translate_gio_error(e, relpath) +@@ -281,10 +281,10 @@ + buf = fin.read() + fin.close() + return BytesIO(buf) +- except gio.Error as e: ++ except GError as e: + # If we get a not mounted here it might mean + # that a bad path has been entered (or that mount failed) +- if (e.code == gio.ERROR_NOT_MOUNTED): ++ if e.code == gio.IOErrorEnum.NOT_MOUNTED: + raise errors.PathError(relpath, + extra='Failed to get file, make sure the path is correct. ' + + str(e)) +@@ -307,19 +307,19 @@ + closed = True + try: + f = self._get_GIO(tmppath) +- fout = f.create() ++ fout = f.create(0, None) + closed = False + length = self._pump(fp, fout) + fout.close() + closed = True + self.stat(tmppath) + dest = self._get_GIO(relpath) +- f.move(dest, flags=gio.FILE_COPY_OVERWRITE) ++ f.move(dest, flags=gio.FileCopyFlags.OVERWRITE) + f = None + if mode is not None: + self._setmode(relpath, mode) + return length +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + finally: + if not closed and fout is not None: +@@ -335,7 +335,7 @@ + f = self._get_GIO(relpath) + f.make_directory() + self._setmode(relpath, mode) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def open_write_stream(self, relpath, mode=None): +@@ -369,14 +369,11 @@ + f.delete() + else: + raise errors.NotADirectory(relpath) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + except errors.NotADirectory as e: + # just pass it forward + raise e +- except Exception as e: +- mutter('failed to rmdir %s: %s' % (relpath, e)) +- raise errors.PathError(relpath) + + def append_file(self, relpath, file, mode=None): + """Append the text in the file-like object into the final +@@ -392,7 +389,7 @@ + result = 0 + fo = self._get_GIO(tmppath) + fi = self._get_GIO(relpath) +- fout = fo.create() ++ fout = fo.create(0, None) + try: + info = GioStatResult(fi) + result = info.st_size +@@ -400,11 +397,11 @@ + self._pump(fin, fout) + fin.close() + # This separate except is to catch and ignore the +- # gio.ERROR_NOT_FOUND for the already existing file. ++ # gio.IOErrorEnum.NOT_FOUND for the already existing file. + # It is valid to open a non-existing file for append. + # This is caused by the broken gio append_to... +- except gio.Error as e: +- if e.code != gio.ERROR_NOT_FOUND: ++ except GError as e: ++ if e.code != gio.IOErrorEnum.NOT_FOUND: + self._translate_gio_error(e, relpath) + length = self._pump(file, fout) + fout.close() +@@ -413,9 +410,11 @@ + raise errors.BzrError("Failed to append size after " + "(%d) is not original (%d) + written (%d) total (%d)" % + (info.st_size, result, length, result + length)) +- fo.move(fi, flags=gio.FILE_COPY_OVERWRITE) ++ fo.move( ++ fi, flags=gio.FileCopyFlags.OVERWRITE, cancellable=None, ++ progress_callback=None) + return result +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def _setmode(self, relpath, mode): +@@ -429,8 +428,8 @@ + try: + f = self._get_GIO(relpath) + f.set_attribute_uint32(gio.FILE_ATTRIBUTE_UNIX_MODE, mode) +- except gio.Error as e: +- if e.code == gio.ERROR_NOT_SUPPORTED: ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_SUPPORTED: + # Command probably not available on this server + mutter("GIO Could not set permissions to %s on %s. %s", + oct(mode), self._remote_path(relpath), str(e)) +@@ -444,8 +443,8 @@ + mutter("GIO move (rename): %s => %s", rel_from, rel_to) + f = self._get_GIO(rel_from) + t = self._get_GIO(rel_to) +- f.move(t) +- except gio.Error as e: ++ f.move(t, flags=0, cancellable=None, progress_callback=None) ++ except GError as e: + self._translate_gio_error(e, rel_from) + + def move(self, rel_from, rel_to): +@@ -455,8 +454,8 @@ + mutter("GIO move: %s => %s", rel_from, rel_to) + f = self._get_GIO(rel_from) + t = self._get_GIO(rel_to) +- f.move(t, flags=gio.FILE_COPY_OVERWRITE) +- except gio.Error as e: ++ f.move(t, flags=gio.FileCopyFlags.OVERWRITE) ++ except GError as e: + self._translate_gio_error(e, relfrom) + + def delete(self, relpath): +@@ -466,7 +465,7 @@ + mutter("GIO delete: %s", relpath) + f = self._get_GIO(relpath) + f.delete() +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def external_url(self): +@@ -489,11 +488,11 @@ + try: + entries = [] + f = self._get_GIO(relpath) +- children = f.enumerate_children(gio.FILE_ATTRIBUTE_STANDARD_NAME) ++ children = f.enumerate_children(gio.FILE_ATTRIBUTE_STANDARD_NAME, 0, None) + for child in children: + entries.append(urlutils.escape(child.get_name())) + return entries +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def iter_files_recursive(self): +@@ -519,7 +518,7 @@ + mutter("GIO stat: %s", relpath) + f = self._get_GIO(relpath) + return GioStatResult(f) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath, extra='error w/ stat') + + def lock_read(self, relpath): +@@ -556,21 +555,21 @@ + mutter("GIO Error: %s %s" % (str(err), path)) + if extra is None: + extra = str(err) +- if err.code == gio.ERROR_NOT_FOUND: ++ if err.code == gio.IOErrorEnum.NOT_FOUND: + raise errors.NoSuchFile(path, extra=extra) +- elif err.code == gio.ERROR_EXISTS: ++ elif err.code == gio.IOErrorEnum.EXISTS: + raise errors.FileExists(path, extra=extra) +- elif err.code == gio.ERROR_NOT_DIRECTORY: ++ elif err.code == gio.IOErrorEnum.NOT_DIRECTORY: + raise errors.NotADirectory(path, extra=extra) +- elif err.code == gio.ERROR_NOT_EMPTY: ++ elif err.code == gio.IOErrorEnum.NOT_EMPTY: + raise errors.DirectoryNotEmpty(path, extra=extra) +- elif err.code == gio.ERROR_BUSY: ++ elif err.code == gio.IOErrorEnum.BUSY: + raise errors.ResourceBusy(path, extra=extra) +- elif err.code == gio.ERROR_PERMISSION_DENIED: ++ elif err.code == gio.IOErrorEnum.PERMISSION_DENIED: + raise errors.PermissionDenied(path, extra=extra) +- elif err.code == gio.ERROR_HOST_NOT_FOUND: ++ elif err.code == gio.IOErrorEnum.HOST_NOT_FOUND: + raise errors.PathError(path, extra=extra) +- elif err.code == gio.ERROR_IS_DIRECTORY: ++ elif err.code == gio.IOErrorEnum.IS_DIRECTORY: + raise errors.PathError(path, extra=extra) + else: + mutter('unable to understand error for path: %s: %s', path, err) + diff --git a/gnu/packages/patches/casync-renameat2-declaration.patch b/gnu/packages/patches/casync-renameat2-declaration.patch deleted file mode 100644 index 74c2ca7b3c..0000000000 --- a/gnu/packages/patches/casync-renameat2-declaration.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fix build failure on glibc 2.28 where 'renameat2' would end up being -declared twice: <https://github.com/systemd/casync/issues/166>. - -From 625244ca47e8ee1375d2d0092271bfd13b0913ea Mon Sep 17 00:00:00 2001 -From: Daniel Mack <daniel@zonque.org> -Date: Tue, 13 Nov 2018 17:52:48 +0100 -Subject: [PATCH] meson.build: pass -D_GNU_SOURCE when checking for functions - -As described in #166, -D_GNU_SOURCE needs to be passed to the meson function -availability checker. h/t to @tomeon for providing a link to the solution as -well. ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index f42ed16..c0f741e 100644 ---- a/meson.build -+++ b/meson.build -@@ -78,6 +78,6 @@ foreach ident : [ - ['copy_file_range', '''#include <sys/syscall.h> - #include <unistd.h>'''], - ] -- have = cc.has_function(ident[0], prefix : ident[1]) -+ have = cc.has_function(ident[0], args : '-D_GNU_SOURCE', prefix : ident[1]) - conf.set10('HAVE_' + ident[0].to_upper(), have) - endforeach diff --git a/gnu/packages/patches/clang-14.0-libc-search-path.patch b/gnu/packages/patches/clang-14.0-libc-search-path.patch new file mode 100644 index 0000000000..78b0637cab --- /dev/null +++ b/gnu/packages/patches/clang-14.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 5ac38c34d112..2a704b418fdc 100644 +--- a/clang/lib/Driver/Distro.cpp ++++ b/clang/lib/Driver/Distro.cpp +@@ -96,6 +96,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 4a9f6d4c4e3e..0ae13ebebd27 100644 +--- a/clang/lib/Driver/ToolChains/Cuda.cpp ++++ b/clang/lib/Driver/ToolChains/Cuda.cpp +@@ -117,6 +117,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 83cb41159de7..6b920e33d1ef 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -186,6 +186,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()) { +@@ -250,6 +254,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + if (IsAndroid || Distro.IsOpenSUSE()) + ExtraOpts.push_back("--enable-new-dtags"); ++#endif + + // The selection of paths to try here is designed to match the patterns which + // the GCC driver itself uses, as this is part of the GCC-compatible driver. +@@ -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, SysRoot + "/lib/" + MultiarchTriple, Paths); + addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); + +@@ -298,9 +304,11 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths); + addPathIfExists(D, 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, SysRoot + "/lib", Paths); + addPathIfExists(D, 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/dealii-fix-compiliation-with-boost-1.78.patch b/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch deleted file mode 100644 index 1937aa9afc..0000000000 --- a/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cbef761731627cece2a6f0276b87dacabbdc8a72 Mon Sep 17 00:00:00 2001 -From: David Wells <drwells@email.unc.edu> -Date: Tue, 4 Jan 2022 12:46:30 -0500 -Subject: [PATCH] Fix compilation with boost 1.78. - -I bisected (fortunately Boost.Geometry a header-only library so adding the -include directory sufficed) and -https://github.com/boostorg/geometry/commit/6eb9e238bcb37e26dc31d16acf826784a2ba30f4 -is where this problem starts for us. See also -https://github.com/boostorg/geometry/issues/792 - the easiest fix for all such -issues is to just include the project header `boost/geometry/geometry.hpp`. - -In this particular case, if you look at the commit which causes grid_tools.cc -fails to compile, its because we were relying on some implicit includes. In -particular, we need the distance header to find the distance between points and -boxes, but that was previously included in another file. - -This patch has been adapted from -e0e76835519d122fd12b5858e16d08641a641c6a to apply to dealii 9.3.2. - -See https://github.com/dealii/dealii/pull/13165. ---- - include/deal.II/numerics/rtree.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/deal.II/numerics/rtree.h b/include/deal.II/numerics/rtree.h -index 1b9d04dacd..1e1bfd2932 100644 ---- a/include/deal.II/numerics/rtree.h -+++ b/include/deal.II/numerics/rtree.h -@@ -26,6 +26,7 @@ - #include <deal.II/boost_adaptors/segment.h> - - DEAL_II_DISABLE_EXTRA_DIAGNOSTICS -+#include <boost/geometry/algorithms/distance.hpp> - #include <boost/geometry/index/rtree.hpp> - #include <boost/geometry/strategies/strategies.hpp> - DEAL_II_ENABLE_EXTRA_DIAGNOSTICS --- -2.30.2 - diff --git a/gnu/packages/patches/dealii-fix-sundials.patch b/gnu/packages/patches/dealii-fix-sundials.patch deleted file mode 100644 index 7dd5df45da..0000000000 --- a/gnu/packages/patches/dealii-fix-sundials.patch +++ /dev/null @@ -1,60 +0,0 @@ -From af73f368f7f9d4a00df075d1a9f50fc495f8e87a Mon Sep 17 00:00:00 2001 -From: Timo Heister <timo.heister@gmail.com> -Date: Sat, 25 Dec 2021 12:30:45 -0500 -Subject: [PATCH] fix sundials compilation - ---- - include/deal.II/sundials/n_vector.templates.h | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h -index 2b49e3efc9..746f63a03b 100644 ---- a/include/deal.II/sundials/n_vector.templates.h -+++ b/include/deal.II/sundials/n_vector.templates.h -@@ -253,13 +253,13 @@ namespace SUNDIALS - template < - typename VectorType, - typename std::enable_if_t<!IsBlockVector<VectorType>::value, int> = 0> -- MPI_Comm -+ const MPI_Comm & - get_communicator(N_Vector v); - - template < - typename VectorType, - typename std::enable_if_t<IsBlockVector<VectorType>::value, int> = 0> -- MPI_Comm -+ const MPI_Comm & - get_communicator(N_Vector v); - - /** -@@ -481,7 +481,7 @@ SUNDIALS::internal::NVectorOperations::destroy(N_Vector v) - - template <typename VectorType, - std::enable_if_t<IsBlockVector<VectorType>::value, int>> --MPI_Comm -+const MPI_Comm & - SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) - { - return unwrap_nvector_const<VectorType>(v)->block(0).get_mpi_communicator(); -@@ -491,7 +491,7 @@ SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) - - template <typename VectorType, - std::enable_if_t<!IsBlockVector<VectorType>::value, int>> --MPI_Comm -+const MPI_Comm & - SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v) - { - return unwrap_nvector_const<VectorType>(v)->get_mpi_communicator(); -@@ -519,7 +519,8 @@ SUNDIALS::internal::NVectorOperations::get_communicator_as_void_ptr(N_Vector v) - (void)v; - return nullptr; - # else -- return get_communicator<VectorType>(v); -+ // We need to cast away const here, as SUNDIALS demands a pure `void *`. -+ return &(const_cast<MPI_Comm &>(get_communicator<VectorType>(v))); - # endif - } - --- -2.30.2 - diff --git a/gnu/packages/patches/efivar-211.patch b/gnu/packages/patches/efivar-211.patch new file mode 100644 index 0000000000..39d53a6ee0 --- /dev/null +++ b/gnu/packages/patches/efivar-211.patch @@ -0,0 +1,86 @@ +Patch from <https://github.com/rhboot/efivar/pull/211>. + +From 15622b7e5761f3dde3f0e42081380b2b41639a48 Mon Sep 17 00:00:00 2001 +From: itd0 <69421122+itd0@users.noreply.github.com> +Date: Mon, 4 Apr 2022 19:59:58 +0200 +Subject: [PATCH] Avoid format error on i686 + +On i686 definition of off_t and ssize_t differ. Update format length +modifiers as needed to avoid format errors with GCC. + +Signed-off-by: itd0 <69421122+itd0@users.noreply.github.com> +--- + src/esl-iter.c | 18 +++++++++--------- + src/secdb-dump.c | 2 +- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/esl-iter.c b/src/esl-iter.c +index 26b5cb5e..4a1938ad 100644 +--- a/src/esl-iter.c ++++ b/src/esl-iter.c +@@ -308,13 +308,13 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + return -1; + } + if (iter->offset < 0) { +- efi_error("iter->offset (%zd) < 0", iter->offset); ++ efi_error("iter->offset (%jd) < 0", (intmax_t)iter->offset); + errno = EINVAL; + return -1; + } + if ((uint32_t)iter->offset >= iter->len) { +- efi_error("iter->offset (%zd) >= iter->len (%zd)", +- iter->offset, iter->len); ++ efi_error("iter->offset (%jd) >= iter->len (%zd)", ++ (intmax_t)iter->offset, iter->len); + errno = EINVAL; + return -1; + } +@@ -335,9 +335,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + iter->len - iter->offset, iter->len - iter->offset, + iter->esl->signature_list_size, iter->esl->signature_list_size); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at %lx", ++ warnx("correcting ESL size from %d to %jd at %lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at %lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +@@ -360,9 +360,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + if (iter->len - iter->offset < iter->esl->signature_list_size) { + debug("EFI_SIGNATURE_LIST is malformed"); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at 0x%lx", ++ warnx("correcting ESL size from %d to %jd at 0x%lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at 0x%lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +@@ -411,9 +411,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type, + if (iter->esl->signature_list_size > iter->len - iter->offset) { + debug("EFI_SIGNATURE_LIST is malformed"); + if (correct_size && (iter->len - iter->offset) > 0) { +- warnx("correcting ESL size from %d to %zd at 0x%lx", ++ warnx("correcting ESL size from %d to %jd at 0x%lx", + iter->esl->signature_list_size, +- iter->len - iter->offset, iter->offset); ++ (intmax_t)(iter->len - iter->offset), iter->offset); + debug("correcting ESL size from %d to %zd at 0x%lx", + iter->esl->signature_list_size, + iter->len - iter->offset, iter->offset); +diff --git a/src/secdb-dump.c b/src/secdb-dump.c +index 02fb915b..17f64411 100644 +--- a/src/secdb-dump.c ++++ b/src/secdb-dump.c +@@ -248,7 +248,7 @@ secdb_dump(efi_secdb_t *secdb, bool annotations) + esln += 1; + } + secdb_dump_finish(); +- printf("%08lx\n", offset); ++ printf("%08zx\n", offset); + + fflush(stdout); + } diff --git a/gnu/packages/patches/elm-compiler-disable-reactor.patch b/gnu/packages/patches/elm-compiler-disable-reactor.patch deleted file mode 100644 index 9871b55e8d..0000000000 --- a/gnu/packages/patches/elm-compiler-disable-reactor.patch +++ /dev/null @@ -1,71 +0,0 @@ -commit 20d80e2323b565a36751c9455e535d8f73fa32f7 -Author: Robert Vollmert <rob@vllmrt.net> -Date: Fri Jun 14 16:05:47 2019 +0200 - - disable reactor - -diff --git a/elm.cabal b/elm.cabal -index c75f9689..ece63c46 100644 ---- a/elm.cabal -+++ b/elm.cabal -@@ -45,9 +45,6 @@ Executable elm - builder/src - ui/terminal/src - -- other-extensions: -- TemplateHaskell -- - Main-Is: - Main.hs - -@@ -56,8 +53,6 @@ Executable elm - Develop - Develop.Generate.Help - Develop.Generate.Index -- Develop.StaticFiles -- Develop.StaticFiles.Build - Diff - Init - Install -diff --git a/ui/terminal/src/Develop.hs b/ui/terminal/src/Develop.hs -index 4b2252e1..7ed7716e 100644 ---- a/ui/terminal/src/Develop.hs -+++ b/ui/terminal/src/Develop.hs -@@ -23,7 +23,6 @@ import Snap.Util.FileServe - import qualified Elm.Project as Project - import qualified Develop.Generate.Help as Generate - import qualified Develop.Generate.Index as Index --import qualified Develop.StaticFiles as StaticFiles - import qualified Generate.Output as Output - import qualified Json.Encode as Encode - import qualified Reporting.Exit as Exit -@@ -219,16 +218,7 @@ compileToHtmlBuilder mode file = - - - serveAssets :: Snap () --serveAssets = -- do file <- getSafePath -- case StaticFiles.lookup file of -- Nothing -> -- pass -- -- Just (content, mimeType) -> -- do modifyResponse (setContentType (mimeType <> ";charset=utf-8")) -- writeBS content -- -+serveAssets = pass - - - -- MIME TYPES -diff --git a/ui/terminal/src/Main.hs b/terminal/src/Main.hs -index 7000f3ca..2c76965a 100644 ---- a/ui/terminal/src/Main.hs -+++ b/ui/terminal/src/Main.hs -@@ -39,7 +39,6 @@ main = - complex intro outro - [ repl - , init -- , reactor - , make - , install - , bump diff --git a/gnu/packages/patches/elm-compiler-fix-map-key.patch b/gnu/packages/patches/elm-compiler-fix-map-key.patch deleted file mode 100644 index 4f05ded530..0000000000 --- a/gnu/packages/patches/elm-compiler-fix-map-key.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit e3512d887df41a8162c3e361171c04beca08415b -Author: Tom Stejskal <tom.stejskal@gmail.com> -Date: Mon Nov 19 20:09:43 2018 +0100 - - Fix Map.!: given key is not an element in the map - -diff --git a/compiler/src/Elm/Compiler/Type/Extract.hs b/compiler/src/Elm/Compiler/Type/Extract.hs -index 1aafe1d4..99763392 100644 ---- a/compiler/src/Elm/Compiler/Type/Extract.hs -+++ b/compiler/src/Elm/Compiler/Type/Extract.hs -@@ -10,6 +10,7 @@ module Elm.Compiler.Type.Extract - - - import Data.Map ((!)) -+import qualified Data.Map as Map - import qualified Data.Maybe as Maybe - import qualified Data.Set as Set - -@@ -134,11 +135,15 @@ extractUnion interfaces (Opt.Global home name) = - else - let - pname = toPublicName home name -- unions = I._unions (interfaces ! home) -+ maybeUnions = I._unions <$> Map.lookup home interfaces - in -- case I.toUnionInternals (unions ! name) of -- Can.Union vars ctors _ _ -> -- T.Union pname vars <$> traverse extractCtor ctors -+ case Map.lookup name =<< maybeUnions of -+ Just union -> -+ case I.toUnionInternals union of -+ Can.Union vars ctors _ _ -> -+ T.Union pname vars <$> traverse extractCtor ctors -+ Nothing -> -+ return $ T.Union pname [] [] - - - extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type]) diff --git a/gnu/packages/patches/elm-offline-package-registry.patch b/gnu/packages/patches/elm-offline-package-registry.patch new file mode 100644 index 0000000000..761ec69878 --- /dev/null +++ b/gnu/packages/patches/elm-offline-package-registry.patch @@ -0,0 +1,71 @@ +From 06563409e6f2b1cca7bc1b27e31efd07a7569da8 Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Thu, 14 Apr 2022 22:41:04 -0400 +Subject: [PATCH] minimal support for offline builds + +Normally, Elm performs HTTP requests before building to obtain or +update its list of all registed packages and their versions. +This is problematic in the Guix build environment. + +This patch causes Elm to check if the `GUIX_ELM_OFFLINE_REGISTRY_FILE` +is set and, if so, to use the contents of the file it specifies as +though it were the response from +https://package.elm-lang.org/all-packages. + +This patch does not attempt to add more general support for offline +builds. In particular, it does not attempt to support incremental +updates to the package registry cache file. See also discussion at +https://discourse.elm-lang.org/t/private-package-tool-spec/6779/25. +--- + builder/src/Deps/Registry.hs | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +diff --git a/builder/src/Deps/Registry.hs b/builder/src/Deps/Registry.hs +index 8d7def98..70cf3622 100644 +--- a/builder/src/Deps/Registry.hs ++++ b/builder/src/Deps/Registry.hs +@@ -18,6 +18,8 @@ import Control.Monad (liftM2) + import Data.Binary (Binary, get, put) + import qualified Data.List as List + import qualified Data.Map.Strict as Map ++import System.Environment as Env ++import qualified Data.ByteString as BS + + import qualified Deps.Website as Website + import qualified Elm.Package as Pkg +@@ -190,13 +192,28 @@ getVersions' name (Registry _ versions) = + post :: Http.Manager -> String -> D.Decoder x a -> (a -> IO b) -> IO (Either Exit.RegistryProblem b) + post manager path decoder callback = + let +- url = Website.route path [] +- in +- Http.post manager url [] Exit.RP_Http $ +- \body -> ++ mkBodyCallback url body = + case D.fromByteString decoder body of + Right a -> Right <$> callback a + Left _ -> return $ Left $ Exit.RP_Data url body ++ postOnline url cb = ++ Http.post manager url [] Exit.RP_Http cb ++ performPost f url = ++ f url (mkBodyCallback url) ++ in ++ do ++ maybeFile <- Env.lookupEnv "GUIX_ELM_OFFLINE_REGISTRY_FILE" ++ case (path, maybeFile) of ++ ( "/all-packages", Just file ) -> ++ performPost postOffline file ++ ( _, _ ) -> ++ -- don't know how to handle other endpoints yet ++ performPost postOnline (Website.route path []) ++ ++postOffline :: String -> (BS.ByteString -> IO a) -> IO a ++postOffline file callback = do ++ body <- BS.readFile file ++ callback body + + + +-- +2.32.0 + diff --git a/gnu/packages/patches/elm-reactor-static-files.patch b/gnu/packages/patches/elm-reactor-static-files.patch new file mode 100644 index 0000000000..94c4aa0cd1 --- /dev/null +++ b/gnu/packages/patches/elm-reactor-static-files.patch @@ -0,0 +1,251 @@ +From 41d219a29b03f3114af7a0521c8b2dbbb487c3e1 Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Wed, 13 Apr 2022 18:45:58 -0400 +Subject: [PATCH] reactor: look for static files relative to executable + +Must built with `-DGUIX_REACTOR_STATIC_REL_ROOT="../path/to/reactor"`. + +This lets us build a version of Elm without the `elm reactor` for +bootstrapping, then simply put the files in place in the final package. +--- + elm.cabal | 2 +- + terminal/src/Develop.hs | 32 +++++++++++---- + terminal/src/Develop/StaticFiles.hs | 37 ++++++++++------- + terminal/src/Develop/StaticFiles/Build.hs | 50 ++++++++++++++--------- + 4 files changed, 79 insertions(+), 42 deletions(-) + +diff --git a/elm.cabal b/elm.cabal +index bf1cfcf0..93161072 100644 +--- a/elm.cabal ++++ b/elm.cabal +@@ -50,6 +50,7 @@ Executable elm + + other-extensions: + TemplateHaskell ++ CPP + + Main-Is: + Main.hs +@@ -211,7 +212,6 @@ Executable elm + containers >= 0.5.8.2 && < 0.6, + directory >= 1.2.3.0 && < 2.0, + edit-distance >= 0.2 && < 0.3, +- file-embed, + filelock, + filepath >= 1 && < 2.0, + ghc-prim >= 0.5.2, +diff --git a/terminal/src/Develop.hs b/terminal/src/Develop.hs +index 00339364..6855b03e 100644 +--- a/terminal/src/Develop.hs ++++ b/terminal/src/Develop.hs +@@ -33,6 +33,7 @@ import qualified Reporting.Exit as Exit + import qualified Reporting.Task as Task + import qualified Stuff + ++import System.Exit as SysExit + + + -- RUN THE DEV SERVER +@@ -45,13 +46,29 @@ data Flags = + + + run :: () -> Flags -> IO () +-run () (Flags maybePort) = ++run () flags = do ++ frontEnd <- StaticFiles.prepare ++ case frontEnd of ++ Right lookup -> ++ reallyRun lookup flags ++ Left missing -> ++ SysExit.die $ unlines ++ [ "The `reactor` command is not available." ++ , "" ++ , "On Guix, these files are needed for `elm reactor` to work," ++ , "but they are missing:" ++ , "" ++ , unlines (map (\pth -> " " ++ (show pth)) missing) ++ ] ++ ++reallyRun :: StaticFiles.Lookup -> Flags -> IO () ++reallyRun lookup (Flags maybePort) = + do let port = maybe 8000 id maybePort + putStrLn $ "Go to http://localhost:" ++ show port ++ " to see your project dashboard." + httpServe (config port) $ + serveFiles + <|> serveDirectoryWith directoryConfig "." +- <|> serveAssets ++ <|> serveAssets lookup + <|> error404 + + +@@ -169,16 +186,15 @@ compile path = + -- SERVE STATIC ASSETS + + +-serveAssets :: Snap () +-serveAssets = ++serveAssets :: StaticFiles.Lookup -> Snap () ++serveAssets lookup = + do path <- getSafePath +- case StaticFiles.lookup path of ++ case lookup path of + Nothing -> + pass + +- Just (content, mimeType) -> +- do modifyResponse (setContentType (mimeType <> ";charset=utf-8")) +- writeBS content ++ Just (fsPath, mimeType) -> ++ serveFileAs (mimeType <> ";charset=utf-8") fsPath + + + +diff --git a/terminal/src/Develop/StaticFiles.hs b/terminal/src/Develop/StaticFiles.hs +index 94ee72dc..3227d617 100644 +--- a/terminal/src/Develop/StaticFiles.hs ++++ b/terminal/src/Develop/StaticFiles.hs +@@ -2,7 +2,8 @@ + {-# LANGUAGE OverloadedStrings #-} + {-# LANGUAGE TemplateHaskell #-} + module Develop.StaticFiles +- ( lookup ++ ( prepare ++ , Lookup + , cssPath + , elmPath + , waitingPath +@@ -11,9 +12,7 @@ module Develop.StaticFiles + + import Prelude hiding (lookup) + import qualified Data.ByteString as BS +-import Data.FileEmbed (bsToExp) + import qualified Data.HashMap.Strict as HM +-import Language.Haskell.TH (runIO) + import System.FilePath ((</>)) + + import qualified Develop.StaticFiles.Build as Build +@@ -26,20 +25,29 @@ import qualified Develop.StaticFiles.Build as Build + type MimeType = + BS.ByteString + ++type Lookup = FilePath -> Maybe (FilePath, MimeType) + +-lookup :: FilePath -> Maybe (BS.ByteString, MimeType) +-lookup path = ++prepare :: IO (Either [FilePath] Lookup) ++prepare = do ++ found <- Build.findReactorFrontEnd expectedFiles ++ return $ case found of ++ Left missing -> ++ Left missing ++ Right resolved -> ++ Right (mkLookup (HM.fromList resolved)) ++ ++mkLookup :: HM.HashMap FilePath (FilePath, MimeType) -> Lookup ++mkLookup dict path = + HM.lookup path dict + + +-dict :: HM.HashMap FilePath (BS.ByteString, MimeType) +-dict = +- HM.fromList +- [ faviconPath ==> (favicon , "image/x-icon") +- , elmPath ==> (elm , "application/javascript") +- , cssPath ==> (css , "text/css") +- , codeFontPath ==> (codeFont, "font/ttf") +- , sansFontPath ==> (sansFont, "font/ttf") ++expectedFiles :: [(FilePath, MimeType)] ++expectedFiles = ++ [ faviconPath ==> "image/x-icon" ++ , elmPath ==> "application/javascript" ++ , cssPath ==> "text/css" ++ , codeFontPath ==> "font/ttf" ++ , sansFontPath ==> "font/ttf" + ] + + +@@ -82,7 +90,7 @@ sansFontPath = + "_elm" </> "source-sans-pro.ttf" + + +- ++{- + -- ELM + + +@@ -121,3 +129,4 @@ sansFont = + favicon :: BS.ByteString + favicon = + $(bsToExp =<< runIO (Build.readAsset "favicon.ico")) ++-} +diff --git a/terminal/src/Develop/StaticFiles/Build.hs b/terminal/src/Develop/StaticFiles/Build.hs +index c61fae57..c39b08b0 100644 +--- a/terminal/src/Develop/StaticFiles/Build.hs ++++ b/terminal/src/Develop/StaticFiles/Build.hs +@@ -1,28 +1,39 @@ + {-# LANGUAGE OverloadedStrings #-} ++{-# LANGUAGE CPP #-} + module Develop.StaticFiles.Build +- ( readAsset +- , buildReactorFrontEnd ++ ( findReactorFrontEnd + ) + where + +- +-import qualified Data.ByteString as BS +-import qualified Data.ByteString.Builder as B +-import qualified Data.ByteString.Lazy as LBS +-import qualified Data.NonEmptyList as NE + import qualified System.Directory as Dir +-import System.FilePath ((</>)) +- +-import qualified BackgroundWriter as BW +-import qualified Build +-import qualified Elm.Details as Details +-import qualified Generate +-import qualified Reporting +-import qualified Reporting.Exit as Exit +-import qualified Reporting.Task as Task +- +- +- ++import System.FilePath ((</>), takeDirectory) ++import System.Environment (getExecutablePath) ++import Data.Either as Either ++ ++reactorStaticRelRoot :: FilePath ++reactorStaticRelRoot = GUIX_REACTOR_STATIC_REL_ROOT ++ ++type Resolved a = (FilePath, (FilePath, a)) ++ ++findReactorFrontEnd :: [(FilePath, a)] -> IO (Either [FilePath] [Resolved a]) ++findReactorFrontEnd specs = do ++ exe <- getExecutablePath ++ let dir = takeDirectory exe </> reactorStaticRelRoot ++ dirExists <- Dir.doesDirectoryExist dir ++ files <- sequence (map (findFile dir) specs) ++ return $ case Either.lefts files of ++ [] -> ++ Right (Either.rights files) ++ missing -> ++ Left $ if dirExists then missing else [dir] ++ ++findFile :: FilePath -> (FilePath, a) -> IO (Either FilePath (Resolved a)) ++findFile dir (rel, rhs) = do ++ let abs = dir </> rel ++ exists <- Dir.doesFileExist abs ++ return $ if not exists then Left abs else Right (rel, (abs, rhs)) ++ ++{- + -- ASSETS + + +@@ -71,3 +82,4 @@ runTaskUnsafe task = + \\nCompile with `elm make` directly to figure it out faster\ + \\n--------------------------------------------------------\ + \\n" ++-} +-- +2.32.0 + diff --git a/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch b/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch new file mode 100644 index 0000000000..fdb444c29b --- /dev/null +++ b/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch @@ -0,0 +1,58 @@ +From 226734f06196d31971d8ca2026a9ce432d5227d0 Mon Sep 17 00:00:00 2001 +From: r0man <roman@burningswell.com> +Date: Thu, 26 May 2022 10:42:25 +0200 +Subject: [PATCH] Fix wrong-number-of-arguments error + +With Emacs 28 I'm seeing the following error when running the tests. + +``` +deferred error : (wrong-number-of-arguments #<subr start-process-shell-command> 4) +``` + +I believe this is because the `start-process-shell-command` function +is called with the command arguments as &rest parameters. This is the +function signature of `start-process-shell-command`, and it only takes +3 arguments, the name, buffer, and command. The command argument can +be a shell string like "ls -l" for example. + +``` +(defun start-process-shell-command (name buffer command) ...) +``` + +The `start-process` function on the other hand has &rest parameters +and can be called with a list of arguments. + +``` +(defun start-process (name buffer program &rest program-args) ...) +``` + +This PR fixes the issue by concatenating the command and it's argument +before calling out to `deferred:process-buffer-gen`, which is used in +both cases, when calling `start-process-shell-command`, and when +calling `start-process`. +--- + deferred.el | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deferred.el b/deferred.el +index 041c90b..3092ac0 100644 +--- a/deferred.el ++++ b/deferred.el +@@ -754,7 +754,7 @@ object. The process name and buffer name of the argument of the + `start-process-shell-command' are generated by this function automatically. + The next deferred object receives stdout and stderr string from + the command process." +- (deferred:process-gen 'start-process-shell-command command args)) ++ (deferred:process-gen 'start-process-shell-command (string-join (cons command args) " ") nil)) + + (defun deferred:process-buffer (command &rest args) + "A deferred wrapper of `start-process'. Return a deferred +@@ -770,7 +770,7 @@ object. The process name and buffer name of the argument of the + `start-process-shell-command' are generated by this function automatically. + The next deferred object receives stdout and stderr buffer from + the command process." +- (deferred:process-buffer-gen 'start-process-shell-command command args)) ++ (deferred:process-buffer-gen 'start-process-shell-command (string-join (cons command args) " ") nil)) + + (defun deferred:process-gen (f command args) + "[internal]" diff --git a/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch b/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch new file mode 100644 index 0000000000..f7b61391c3 --- /dev/null +++ b/gnu/packages/patches/emacs-ess-fix-obsolete-function-alias.patch @@ -0,0 +1,23 @@ +From 9cc5520e1998d03f5dec0fbb1fe71b7cdec38b65 Mon Sep 17 00:00:00 2001 +From: Alex Branham <alex.branham@gmail.com> +Date: Wed, 6 Jan 2021 06:41:20 -0500 +Subject: [PATCH] Add required when to obsolete function alias + +Closes #1085 +--- + lisp/ess-r-package.el | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lisp/ess-r-package.el b/lisp/ess-r-package.el +index 260959955..397ce14e6 100644 +--- a/lisp/ess-r-package.el ++++ b/lisp/ess-r-package.el +@@ -577,7 +577,7 @@ package mode. Use this function if state of the buffer such as + (error "As of ESS 16.04, `ess-developer' is deprecated. Use `ess-r-set-evaluation-env' instead")) + + (defalias 'ess-toggle-developer 'ess-developer) +-(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder) ++(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder "18.04") + (define-obsolete-function-alias 'ess-r-devtools-ask 'ess-r-devtools-execute-command "18.04") + + (make-obsolete-variable 'ess-developer "Please use `ess-developer-select-package' and `ess-r-set-evaluation-env' instead." "16.04") diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch index 7303599df1..9a76b0237d 100644 --- a/gnu/packages/patches/emacs-exec-path.patch +++ b/gnu/packages/patches/emacs-exec-path.patch @@ -4,13 +4,13 @@ with things like GCC being referenced. --- a/lisp/loadup.el +++ b/lisp/loadup.el -@@ -481,7 +481,8 @@ lost after dumping"))) +@@ -530,7 +530,8 @@ lost after dumping"))) ((equal dump-mode "dump") "emacs") ((equal dump-mode "bootstrap") "emacs") ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") -- (t (error "unrecognized dump mode %s" dump-mode))))) -+ (t (error "unrecognized dump mode %s" dump-mode)))) +- (t (error "Unrecognized dump mode %s" dump-mode))))) ++ (t (error "Unrecognized dump mode %s" dump-mode)))) + (exec-path nil)) - (message "Dumping under the name %s" output) - (condition-case () - (delete-file output) + (when (and (featurep 'native-compile) + (equal dump-mode "pdump")) + ;; Don't enable this before bootstrap is completed, as the diff --git a/gnu/packages/patches/emacs-git-email-missing-parens.patch b/gnu/packages/patches/emacs-git-email-missing-parens.patch new file mode 100644 index 0000000000..051e2bf1eb --- /dev/null +++ b/gnu/packages/patches/emacs-git-email-missing-parens.patch @@ -0,0 +1,27 @@ +From 820ad7eb2e919e3f880bec22bd4f737fa55c4d22 Mon Sep 17 00:00:00 2001 +From: Niklas Eklund <niklas.eklund@posteo.net> +Date: Thu, 5 May 2022 12:43:49 +0200 +Subject: [PATCH] Fix missing parens in git-email-mu4e.el + +The incorrect number of parens in this file lead to Emacs failing to +parse the file. +--- + git-email-mu4e.el | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/git-email-mu4e.el b/git-email-mu4e.el +index d5b8770..9220bf9 100644 +--- a/git-email-mu4e.el ++++ b/git-email-mu4e.el +@@ -51,7 +51,7 @@ from Lisp, enable the mode if ARG is omitted or nil." + ;; built in context feature. + (seq-filter (lambda (header) + (not (eq (car header) 'from))) +- headers) ++ headers)))) + (setq git-email-compose-email-function 'message-mail))) + + (provide 'git-email-mu4e) +-- +2.34.0 + diff --git a/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch b/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch new file mode 100644 index 0000000000..de40010fa2 --- /dev/null +++ b/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch @@ -0,0 +1,18 @@ +This patch fixing a build failure has been cherry-picked from upstream. +Originally submitted as pull request by Erik Šabič. +See also <https://github.com/Wilfred/helpful/pull/296>. +diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el +index a07aa8e..8a95129 100644 +--- a/test/helpful-unit-test.el ++++ b/test/helpful-unit-test.el +@@ -119,7 +119,9 @@ bar"))) + (should + (equal + (helpful--docstring #'test-foo-advised t) +- "Docstring here too."))) ++ (if (version< emacs-version "28") ++ "Docstring here too." ++ "Docstring here too.\n\nThis function has :around advice: `ad-Advice-test-foo-advised'.")))) + + (defun test-foo-no-docstring () + nil) diff --git a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch deleted file mode 100644 index 398e65bdc8..0000000000 --- a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix contributed upstream here: -https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694. - -Index: emacs-26.3/src/xfns.c -=================================================================== ---- emacs-26.3.orig/src/xfns.c -+++ emacs-26.3/src/xfns.c -@@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f) - static XIMStyle - best_xim_style (XIMStyles *xim) - { -+ if (xim == NULL) goto out; -+ - int i, j; - int nr_supported = ARRAYELTS (supported_xim_styles); - -@@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim) - if (supported_xim_styles[i] == xim->supported_styles[j]) - return supported_xim_styles[i]; - -+ out: - /* Return the default style. */ - return XIMPreeditNothing | XIMStatusNothing; - } diff --git a/gnu/packages/patches/emacs-lispy-fix-thread-last-test.patch b/gnu/packages/patches/emacs-lispy-fix-thread-last-test.patch new file mode 100644 index 0000000000..2690dabdc8 --- /dev/null +++ b/gnu/packages/patches/emacs-lispy-fix-thread-last-test.patch @@ -0,0 +1,39 @@ +From dbe23aec174001c42f6edc7a594863a82a24bcfa Mon Sep 17 00:00:00 2001 +From: Kyle Meyer <kyle@kyleam.com> +Date: Sun, 15 May 2022 13:56:37 -0400 +Subject: [PATCH] lispy-test.el (lispy-toggle-threaded-last): Update for Emacs + 28 + +Starting with Emacs 28.1, thread-first uses `(declare (indent 0) ...)` +rather than `(declare (indent 1) ...)`. +--- + + Proposed upstream at <https://github.com/abo-abo/lispy/pull/632>. + + lispy-test.el | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/lispy-test.el b/lispy-test.el +index d946731..87d8c87 100644 +--- a/lispy-test.el ++++ b/lispy-test.el +@@ -150,7 +150,13 @@ (ert-deftest lispy-toggle-threaded-last () + "|(thread-last (a 1) (b 2) (c 3))")) + (should (string= (lispy-with "|(equal 1443070800.0\n (ts-unix\n (ts-parse-org-element\n (org-element-context))))" + (lispy-toggle-thread-last)) +- "|(thread-last (org-element-context)\n (ts-parse-org-element)\n (ts-unix)\n (equal 1443070800.0))")) ++ (let ((indent (make-string ++ (if (version< emacs-version "28.1") 2 13) ++ ?\s))) ++ (concat "|(thread-last (org-element-context)\n" ++ indent "(ts-parse-org-element)\n" ++ indent "(ts-unix)\n" ++ indent "(equal 1443070800.0))")))) + (should (string= (lispy-with "|(thread-last (org-element-context)\n (ts-parse-org-element)\n (ts-unix)\n (equal 1443070800.0))" + (lispy-toggle-thread-last)) + "|(equal 1443070800.0\n (ts-unix\n (ts-parse-org-element\n (org-element-context))))"))) + +base-commit: df1b7e614fb0f73646755343e8892ddda310f427 +-- +2.36.0 + diff --git a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch new file mode 100644 index 0000000000..475352d8db --- /dev/null +++ b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch @@ -0,0 +1,95 @@ +From 904a058fcf4e1f4985e03f8551eec282ca12ccb5 Mon Sep 17 00:00:00 2001 +From: Philipp Stephani <phst@google.com> +Date: Mon, 6 Dec 2021 18:50:10 +0100 +Subject: [PATCH] Unbreak unit tests under Emacs 28. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- Emacs 28 has a new mode ‘lisp-data-mode’ for Lisp data. +- A test that was temporarily broken passes again. +- The default for ‘org-adapt-indentation’ has changed. +--- + yasnippet-tests.el | 41 ++++++++++++++++++++++++++--------------- + 1 file changed, 26 insertions(+), 15 deletions(-) + +diff --git a/yasnippet-tests.el b/yasnippet-tests.el +index b8a7980f..9fadf00c 100644 +--- a/yasnippet-tests.el ++++ b/yasnippet-tests.el +@@ -1,6 +1,6 @@ + ;;; yasnippet-tests.el --- some yasnippet tests -*- lexical-binding: t -*- + +-;; Copyright (C) 2012-2015, 2017-2018 Free Software Foundation, Inc. ++;; Copyright (C) 2012-2015, 2017-2018, 2021 Free Software Foundation, Inc. + + ;; Author: João Távora <joaot@siscog.pt> + ;; Keywords: emulations, convenience +@@ -556,16 +556,19 @@ XXXXX ------------------------")))) + (yas-mock-insert "foo bar") + (ert-simulate-command '(yas-next-field)) + (goto-char (point-min)) +- (let ((expected (with-temp-buffer +- (insert (format (concat "* Test foo bar\n" +- " " org-property-format "\n" +- " " org-property-format "\n" +- " " org-property-format) +- ":PROPERTIES:" "" +- ":ID:" "foo bar-after" +- ":END:" "")) +- (delete-trailing-whitespace) +- (buffer-string)))) ++ ;; The default value of `org-adapt-indentation' changed between Org-mode 9.4 ++ ;; and 9.5, so force a specific value. ++ (let* ((org-adapt-indentation nil) ++ (expected (with-temp-buffer ++ (insert (format (concat "* Test foo bar\n" ++ org-property-format "\n" ++ org-property-format "\n" ++ org-property-format) ++ ":PROPERTIES:" "" ++ ":ID:" "foo bar-after" ++ ":END:" "")) ++ (delete-trailing-whitespace) ++ (buffer-string)))) + ;; Some org-mode versions leave trailing whitespace, some don't. + (delete-trailing-whitespace) + (should (equal expected (buffer-string)))))) +@@ -1390,7 +1393,9 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \ + ,@(if (fboundp 'prog-mode) + '(prog-mode)) + emacs-lisp-mode +- lisp-interaction-mode)) ++ lisp-interaction-mode ++ ;; `lisp-data-mode' doesn't exist prior to Emacs 28. ++ ,@(and (fboundp 'lisp-data-mode) '(lisp-data-mode)))) + (observed (yas--modes-to-activate))) + (should (equal major-mode (car observed))) + (should (equal (sort expected #'string<) (sort observed #'string<)))))))) +@@ -1418,7 +1423,11 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \ + '(prog-mode)) + emacs-lisp-mode + and-also-this-one +- lisp-interaction-mode)) ++ lisp-interaction-mode ++ ;; `lisp-data-mode' doesn't exist prior to ++ ;; Emacs 28. ++ ,@(and (fboundp 'lisp-data-mode) ++ '(lisp-data-mode)))) + (observed (yas--modes-to-activate))) + (should (equal expected-first + (cl-subseq observed 0 (length expected-first)))) +@@ -1691,9 +1700,11 @@ TODO: be meaner" + "Test expansion of snippets in org source blocks." + ;; org 9+ no longer runs fontification for text-mode, so our hacks + ;; don't work. Note that old ert doesn't have skipping, so we have +- ;; to expect failure instead. ++ ;; to expect failure instead. Starting with Org-mode 9.5 this seems ++ ;; to work again. + :expected-result (if (and (fboundp 'org-in-src-block-p) +- (version< (org-version) "9")) ++ (or (version< (org-version) "9") ++ (version<= "9.5" (org-version)))) + :passed :failed) + (let ((text-mode-hook #'yas-minor-mode)) + (do-yas-org-native-tab-in-source-block "text"))) diff --git a/gnu/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch b/gnu/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch new file mode 100644 index 0000000000..79fec8e526 --- /dev/null +++ b/gnu/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch @@ -0,0 +1,19 @@ +Most Guix system setup with desktop evironment will install GDK_PIXBUF_MODULE_FILE +environment variable in the system profile, and it'll be leaked into the sandbox +environment of flatpak, so the applications in sandbox may fail to find correct +GdkPixbuf loaders. + +This patch unset the GDK_PIXBUF_MODULE_FILE environment variable before running +the sandboxed applications, prevents it to load GdkPixbuf loaders from the path +of host system. + +--- a/common/flatpak-run.c ++++ b/common/flatpak-run.c +@@ -1853,6 +1853,7 @@ static const ExportData default_exports[] = { + {"GST_PTP_HELPER", NULL}, + {"GST_PTP_HELPER_1_0", NULL}, + {"GST_INSTALL_PLUGINS_HELPER", NULL}, ++ {"GDK_PIXBUF_MODULE_FILE", NULL}, + }; + + static const ExportData no_ld_so_cache_exports[] = { diff --git a/gnu/packages/patches/ganeti-haskell-compat.patch b/gnu/packages/patches/ganeti-haskell-compat.patch deleted file mode 100644 index 931c50e116..0000000000 --- a/gnu/packages/patches/ganeti-haskell-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Adjust to type change of TupE in Template Haskell 2.16. - -diff --git a/src/Ganeti/THH/Types.hs b/src/Ganeti/THH/Types.hs ---- a/src/Ganeti/THH/Types.hs -+++ b/src/Ganeti/THH/Types.hs -@@ -123,4 +123,11 @@ curryN n = do - f <- newName "f" - ps <- replicateM n (newName "x") - return $ LamE (VarP f : map VarP ps) -- (AppE (VarE f) (TupE $ map VarE ps)) -+ (AppE (VarE f) (nonUnaryTupE $ map VarE ps)) -+ where -+ nonUnaryTupE :: [Exp] -> Exp -+ nonUnaryTupE es = TupE $ -+#if MIN_VERSION_template_haskell(2,16,0) -+ map Just -+#endif -+ es diff --git a/gnu/packages/patches/ganeti-pyyaml-compat.patch b/gnu/packages/patches/ganeti-pyyaml-compat.patch new file mode 100644 index 0000000000..2f74e48a82 --- /dev/null +++ b/gnu/packages/patches/ganeti-pyyaml-compat.patch @@ -0,0 +1,41 @@ +Add Loader argument to 'yaml.load' invocations as required by PyYAML 6.0. + +Submitted upstream: + + https://github.com/ganeti/ganeti/pull/1668 + +diff --git a/qa/qa_utils.py b/qa/qa_utils.py +index da485df48..27428e685 100644 +--- a/qa/qa_utils.py ++++ b/qa/qa_utils.py +@@ -450,7 +450,7 @@ def GetObjectInfo(infocmd): + master = qa_config.GetMasterNode() + cmdline = utils.ShellQuoteArgs(infocmd) + info_out = GetCommandOutput(master.primary, cmdline) +- return yaml.load(info_out) ++ return yaml.load(info_out, Loader=yaml.SafeLoader) + + + def UploadFile(node, src): +diff --git a/test/py/ganeti.cli_unittest.py b/test/py/ganeti.cli_unittest.py +index 9cc980afa..242aac9fd 100755 +--- a/test/py/ganeti.cli_unittest.py ++++ b/test/py/ganeti.cli_unittest.py +@@ -1141,14 +1141,15 @@ class TestFormatPolicyInfo(unittest.TestCase): + self._RenameDictItem(minmax, key, keyparts[0]) + self.assertTrue(constants.IPOLICY_DTS in parsed) + parsed[constants.IPOLICY_DTS] = yaml.load("[%s]" % +- parsed[constants.IPOLICY_DTS]) ++ parsed[constants.IPOLICY_DTS], ++ Loader=yaml.SafeLoader) + + @staticmethod + def _PrintAndParsePolicy(custom, effective, iscluster): + formatted = cli.FormatPolicyInfo(custom, effective, iscluster) + buf = StringIO() + cli._SerializeGenericInfo(buf, formatted, 0) +- return yaml.load(buf.getvalue()) ++ return yaml.load(buf.getvalue(), Loader=yaml.SafeLoader) + + def _PrintAndCheckParsed(self, policy): + parsed = self._PrintAndParsePolicy(policy, NotImplemented, True) diff --git a/gnu/packages/patches/ganeti-sphinx-compat.patch b/gnu/packages/patches/ganeti-sphinx-compat.patch deleted file mode 100644 index 4e84abbf37..0000000000 --- a/gnu/packages/patches/ganeti-sphinx-compat.patch +++ /dev/null @@ -1,24 +0,0 @@ -Adjust documentation for Sphinx 4.0. - -Discussed upstream at <https://github.com/ganeti/ganeti/pull/1615>. - -diff --git a/doc/index.rst b/doc/index.rst ---- a/doc/index.rst -+++ b/doc/index.rst -@@ -119,7 +119,6 @@ Draft designs - design-hotplug.rst - design-internal-shutdown.rst - design-kvmd.rst -- design-location.rst - design-linuxha.rst - design-location.rst - design-lu-generated-jobs.rst -diff --git a/lib/build/shell_example_lexer.py b/lib/build/shell_example_lexer.py ---- a/lib/build/shell_example_lexer.py -+++ b/lib/build/shell_example_lexer.py -@@ -79,4 +79,4 @@ class ShellExampleLexer(RegexLexer): - - - def setup(app): -- app.add_lexer("shell-example", ShellExampleLexer()) -+ app.add_lexer("shell-example", ShellExampleLexer) diff --git a/gnu/packages/patches/gcc-12-cross-environment-variables.patch b/gnu/packages/patches/gcc-12-cross-environment-variables.patch new file mode 100644 index 0000000000..8787f094c0 --- /dev/null +++ b/gnu/packages/patches/gcc-12-cross-environment-variables.patch @@ -0,0 +1,54 @@ +Search path environment variables for cross-compilers. See the discussion +at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>. + +Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed +at <http://bugs.gnu.org/22186>. + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -4832,7 +4832,7 @@ process_command (unsigned int decoded_options_count, + } + + temp = env.get (LIBRARY_PATH_ENV); +- if (temp && *cross_compile == '0') ++ if (temp) + { + const char *startp, *endp; + char *nstore = (char *) alloca (strlen (temp) + 3); +diff --git a/gcc/incpath.cc b/gcc/incpath.cc +--- a/gcc/incpath.cc ++++ b/gcc/incpath.cc +@@ -480,8 +480,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + int stdinc, int cxx_stdinc, int verbose) + { + static const char *const lang_env_vars[] = +- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", +- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; ++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH", ++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + +@@ -492,7 +492,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + + /* CPATH and language-dependent environment variables may add to the + include chain. */ +- add_env_var_paths ("CPATH", INC_BRACKET); ++ add_env_var_paths ("CROSS_CPATH", INC_BRACKET); + add_env_var_paths (lang_env_vars[idx], INC_SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); +diff --git a/gcc/system.h b/gcc/system.h +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -1317,4 +1317,6 @@ endswith (const char *str, const char *suffix) + return memcmp (str + str_len - suffix_len, suffix, suffix_len) == 0; + } + ++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH" ++ + #endif /* ! GCC_SYSTEM_H */ +-- +2.36.1 + diff --git a/gnu/packages/patches/gcc-12-strmov-store-file-names.patch b/gnu/packages/patches/gcc-12-strmov-store-file-names.patch new file mode 100644 index 0000000000..091fc3f576 --- /dev/null +++ b/gnu/packages/patches/gcc-12-strmov-store-file-names.patch @@ -0,0 +1,114 @@ +Make sure that statements such as: + + strcpy (dst, "/gnu/store/…"); + +or + + static const char str[] = "/gnu/store/…"; + … + strcpy (dst, str); + +do not result in chunked /gnu/store strings that are undetectable by +Guix's GC and its grafting code. See <https://bugs.gnu.org/24703> +and <https://bugs.gnu.org/30395>. + +diff --git a/gcc/builtins.cc b/gcc/builtins.cc +index 5b085e3a1..480bc0b54 100644 +--- a/gcc/builtins.cc ++++ b/gcc/builtins.cc +@@ -3363,6 +3363,58 @@ expand_builtin_mempcpy (tree exp, rtx target) + target, exp, /*retmode=*/ RETURN_END); + } + ++extern void debug_tree (tree); ++ ++/* Return true if STR contains the string "/gnu/store". */ ++ ++bool ++store_reference_p (tree str) ++{ ++ if (getenv ("GUIX_GCC_DEBUG") != NULL) ++ debug_tree (str); ++ ++ if (TREE_CODE (str) == ADDR_EXPR) ++ str = TREE_OPERAND (str, 0); ++ ++ if (TREE_CODE (str) == VAR_DECL ++ && TREE_STATIC (str) ++ && TREE_READONLY (str)) ++ { ++ /* STR may be a 'static const' variable whose initial value ++ is a string constant. See <https://bugs.gnu.org/30395>. */ ++ str = DECL_INITIAL (str); ++ if (str == NULL_TREE) ++ return false; ++ } ++ ++ if (TREE_CODE (str) != STRING_CST) ++ return false; ++ ++ int len; ++ const char *store; ++ ++ store = getenv ("NIX_STORE") ? getenv ("NIX_STORE") : "/gnu/store"; ++ len = strlen (store); ++ ++ /* Size of the hash part of store file names, including leading slash and ++ trailing hyphen. */ ++ const int hash_len = 34; ++ ++ if (TREE_STRING_LENGTH (str) < len + hash_len) ++ return false; ++ ++ /* We cannot use 'strstr' because 'TREE_STRING_POINTER' returns a string ++ that is not necessarily NUL-terminated. */ ++ ++ for (int i = 0; i < TREE_STRING_LENGTH (str) - (len + hash_len); i++) ++ { ++ if (strncmp (TREE_STRING_POINTER (str) + i, store, len) == 0) ++ return true; ++ } ++ ++ return false; ++} ++ + /* Helper function to do the actual work for expand of memory copy family + functions (memcpy, mempcpy, stpcpy). Expansing should assign LEN bytes + of memory from SRC to DEST and assign to TARGET if convenient. Return +@@ -3384,6 +3436,13 @@ expand_builtin_memory_copy_args (tree dest, tree src, tree len, + + bool is_move_done; + ++ /* Do not emit block moves, which translate to the 'movabs' instruction on ++ x86_64, when SRC refers to store items. That way, store references ++ remain visible to the Guix GC and grafting code. See ++ <https://bugs.gnu.org/24703>. */ ++ if (store_reference_p (src)) ++ return NULL_RTX; ++ + /* If DEST is not a pointer type, call the normal function. */ + if (dest_align == 0) + return NULL_RTX; +diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc +index 863ee3d39..4cc46c265 100644 +--- a/gcc/gimple-fold.cc ++++ b/gcc/gimple-fold.cc +@@ -856,6 +856,8 @@ var_decl_component_p (tree var) + && TREE_CODE (TREE_OPERAND (inner, 0)) == ADDR_EXPR)); + } + ++extern bool store_reference_p (tree); ++ + /* Return TRUE if the SIZE argument, representing the size of an + object, is in a range of values of which exactly zero is valid. */ + +@@ -960,6 +962,9 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi, + = build_int_cst (build_pointer_type_for_mode (char_type_node, + ptr_mode, true), 0); + ++ if (store_reference_p (src)) ++ return false; ++ + /* If we can perform the copy efficiently with first doing all loads + and then all stores inline it that way. Currently efficiently + means that we can load all the memory into a single integer diff --git a/gnu/packages/patches/gcolor3-update-libportal-usage.patch b/gnu/packages/patches/gcolor3-update-libportal-usage.patch new file mode 100644 index 0000000000..3e6d33e544 --- /dev/null +++ b/gnu/packages/patches/gcolor3-update-libportal-usage.patch @@ -0,0 +1,55 @@ +Fix gcolor3 to work with libportal-0.5 + +This patch is extracted from upstream, see here +https://gitlab.gnome.org/World/gcolor3/-/commit/1750369a3fd922aa9db6916207dc460c6f885e14 + +From 1750369a3fd922aa9db6916207dc460c6f885e14 Mon Sep 17 00:00:00 2001 +From: Michal Vasilek <michal@vasilek.cz> +Date: Mon, 27 Dec 2021 13:47:14 +0100 +Subject: [PATCH] Update to libportal 0.5 + +--- + meson.build | 2 ++ + src/gcolor3-color-selection.c | 2 +- + src/meson.build | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 6453679..7d6dc50 100644 +--- a/meson.build ++++ b/meson.build +@@ -7,9 +7,11 @@ dep_gtk = dependency('gtk+-3.0', version: '>= 3.20.0', required: true) + dep_libportal = dependency( + 'libportal', + required: true, ++ version: '>= 0.5', + fallback: ['libportal', 'libportal_dep'], + default_options: ['gtk_doc=false'], + ) ++dep_libportal_gtk3 = dependency('libportal-gtk3', version: '>= 0.5', required: true) + cc = meson.get_compiler('c') + dep_lm = cc.find_library('m', required: true) + +diff --git a/src/gcolor3-color-selection.c b/src/gcolor3-color-selection.c +index 7413850..5df9d54 100644 +--- a/src/gcolor3-color-selection.c ++++ b/src/gcolor3-color-selection.c +@@ -41,7 +41,7 @@ + #include <gtk/gtk.h> + #include <glib/gi18n.h> + #include <libportal/portal.h> +-#include <libportal/portal-gtk3.h> ++#include <libportal-gtk3/portal-gtk3.h> + + #ifdef ENABLE_NLS + #define P_(String) g_dgettext(GETTEXT_PACKAGE "-properties",String) +diff --git a/src/meson.build b/src/meson.build +index 3998f68..d488e51 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -42,6 +42,7 @@ executable( + dependencies: [ + dep_gtk, + dep_libportal, ++ dep_libportal_gtk3, + dep_lm diff --git a/gnu/packages/patches/gourmet-sqlalchemy-compat.patch b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch new file mode 100644 index 0000000000..d0cdf9e5a7 --- /dev/null +++ b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch @@ -0,0 +1,18 @@ +diff --git a/gourmet/backends/db.py b/gourmet/backends/db.py +index faa6a57a..7e6d2bc6 100644 +--- a/gourmet/backends/db.py ++++ b/gourmet/backends/db.py +@@ -773,9 +773,11 @@ class RecData (Pluggable): + """Return the number of rows in table that match criteria + """ + if criteria: +- return table.count(*make_simple_select_arg(criteria,table)).execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count(criteria)).select_from(table).scalar() + else: +- return table.count().execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count()).select_from(table).scalar() + + def fetch_join (self, table1, table2, col1, col2, + column_names=None, sort_by=[], **criteria): diff --git a/gnu/packages/patches/gtk-introspection-test.patch b/gnu/packages/patches/gtk-introspection-test.patch deleted file mode 100644 index 570ea806a9..0000000000 --- a/gnu/packages/patches/gtk-introspection-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -# Extend rather than stomp environment variables. -# Upstream status: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4268 -diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build -index 6202fb7446..b59191eb0f 100644 ---- a/testsuite/introspection/meson.build -+++ b/testsuite/introspection/meson.build -@@ -1,9 +1,10 @@ -+env = environment() -+env.prepend('GI_TYPELIB_PATH', -+ join_paths(project_build_root, 'gtk'), -+ gi_dep.get_pkgconfig_variable('typelibdir')) -+env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so')) - - test('api', - find_program('api.py', dirs: meson.current_source_dir()), - suite: ['introspection'], -- env: [ -- 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root, -- gi_dep.get_pkgconfig_variable('typelibdir')), -- 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root), -- ]) -+ env: env) diff --git a/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch b/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch new file mode 100644 index 0000000000..19fd475c39 --- /dev/null +++ b/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch @@ -0,0 +1,28 @@ +Submitted upstream: https://gitlab.com/weinholt/ac-d-bus/-/merge_requests/3 + +diff --git a/tests/test-signature.sps b/tests/test-signature.sps +index 278401b..cc5574f 100755 +--- a/tests/test-signature.sps ++++ b/tests/test-signature.sps +@@ -43,6 +43,7 @@ + (format-type-signature '(message BYTE BYTE BYTE BYTE UINT32 UINT32 + (ARRAY (STRUCT BYTE VARIANT))))) + ++(define fail-count (test-runner-fail-count (test-runner-get))) + (test-end) + +-(exit (if (zero? (test-runner-fail-count (test-runner-get))) 0 1)) ++(exit (if (zero? fail-count) 0 1)) +diff --git a/tests/test-wire.sps b/tests/test-wire.sps +index c3354bf..06ae73b 100755 +--- a/tests/test-wire.sps ++++ b/tests/test-wire.sps +@@ -147,6 +147,7 @@ + #x08 #x01 #x67 #x00 #x00 #x00 #x00 #x00 #x05 #x01 #x75 #x00 #x04 #x00 #x00 #x00 + #x07 #x01 #x73 #x00 #x06 #x00 #x00 #x00 #x3A #x31 #x2E #x32 #x39 #x38 #x00 #x00))) + ++(define fail-count (test-runner-fail-count (test-runner-get))) + (test-end) + +-(exit (if (zero? (test-runner-fail-count (test-runner-get))) 0 1)) ++(exit (if (zero? fail-count) 0 1)) diff --git a/gnu/packages/patches/hwloc-1-test-btrfs.patch b/gnu/packages/patches/hwloc-1-test-btrfs.patch new file mode 100644 index 0000000000..a5d3780e2d --- /dev/null +++ b/gnu/packages/patches/hwloc-1-test-btrfs.patch @@ -0,0 +1,54 @@ +From 093316a897a2eb4972a7a3a5888f40975d03f6bf Mon Sep 17 00:00:00 2001 +From: Brice Goglin <Brice.Goglin@inria.fr> +Date: Tue, 5 Apr 2022 17:39:50 +0200 +Subject: [PATCH] linux: (partial) fix the discovery of hugepages on btrfs + fsroot + +btrfs always returns 1 in directory stat.st_nlink. +It breaks make check in tests/linux/ because the hugepages discovery +uses st_nlink to allocate the memory page_types array. + +Always allocate at least 3 page_types slots +(enough for all known cases, 1 for normal, 2 for huge pages) + +(partially cherry-picked from commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc) + +We don't reallocate later if needed as in 2.x commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc +because v1.11 doesn't deserve a complete fix. Just commit the minimal change +so that tests/linux/2i386-2t-hugepagesizecount with HWLOC_PAGESIZE_DEBUG=4096 +doesn't crash in btrfs anymore (test-topology.sh fails during make check if /tmp is in btrfs). + +Thanks to Philippe Swartvagher for the report. + +Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> +--- + src/topology-linux.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/topology-linux.c b/src/topology-linux.c +index 58c275fea..269eca7f5 100644 +--- a/src/topology-linux.c ++++ b/src/topology-linux.c +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2019 Inria. All rights reserved. ++ * Copyright © 2009-2022 Inria. All rights reserved. + * Copyright © 2009-2013, 2015 Université Bordeaux + * Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. + * Copyright © 2015 Intel, Inc. All rights reserved. +@@ -2329,7 +2329,14 @@ hwloc_get_procfs_meminfo_info(struct hwloc_topology *topology, + + err = hwloc_stat("/sys/kernel/mm/hugepages", &st, data->root_fd); + if (!err) { +- types = 1 + st.st_nlink-2; ++ types = 1 /* normal non-huge size */ + st.st_nlink - 2 /* ignore . and .. */; ++ if (types < 3) ++ /* some buggy filesystems (e.g. btrfs when reading from fsroot) ++ * return wrong st_nlink for directories (always 1 for btrfs). ++ * use 3 as a sane default (default page + 2 huge sizes). ++ * hwloc_parse_hugepages_info() will extend it if needed. ++ */ ++ types = 3; + has_sysfs_hugepages = 1; + } diff --git a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch deleted file mode 100644 index 5d1fec2409..0000000000 --- a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 89a87cf666eb8b27190c779e72d0d76eadc1bc14 Mon Sep 17 00:00:00 2001 -From: Niklas Larsson <niklas@mm.st> -Date: Sat, 6 Jun 2020 15:29:45 +0200 -Subject: [PATCH] Fix to unblock haskeline-0.8 - ---- -Taken from <https://github.com/idris-lang/Idris-dev/pull/4871> - - idris.cabal | 2 +- - src/Idris/Output.hs | 8 -------- - src/Idris/REPL.hs | 12 +++++------- - 3 files changed, 6 insertions(+), 16 deletions(-) - -diff --git a/idris.cabal b/idris.cabal -index 38359019a9..bc9e265023 100644 ---- a/idris.cabal -+++ b/idris.cabal -@@ -336,7 +336,7 @@ Library - , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0 - , filepath < 1.5 - , fingertree >= 0.1.4.1 && < 0.2 -- , haskeline >= 0.7 && < 0.8 -+ , haskeline >= 0.8 && < 0.9 - , ieee754 >= 0.7 && < 0.9 - , megaparsec >= 7.0.4 && < 9 - , mtl >= 2.1 && < 2.3 -diff --git a/src/Idris/Output.hs b/src/Idris/Output.hs -index 70b4d48a30..6b5d59948c 100644 ---- a/src/Idris/Output.hs -+++ b/src/Idris/Output.hs -@@ -37,21 +37,13 @@ import Prelude hiding ((<$>)) - #endif - - import Control.Arrow (first) --import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT) - import Data.List (intersperse, nub) - import Data.Maybe (fromJust, fromMaybe, isJust, listToMaybe) - import qualified Data.Set as S --import System.Console.Haskeline.MonadException (MonadException(controlIO), -- RunIO(RunIO)) - import System.FilePath (replaceExtension) - import System.IO (Handle, hPutStr, hPutStrLn) - import System.IO.Error (tryIOError) - --instance MonadException m => MonadException (ExceptT Err m) where -- controlIO f = ExceptT $ controlIO $ \(RunIO run) -> let -- run' = RunIO (fmap ExceptT . run . runExceptT) -- in fmap runExceptT $ f run' -- - pshow :: IState -> Err -> String - pshow ist err = displayDecorated (consoleDecorate ist) . - renderPretty 1.0 80 . -diff --git a/src/Idris/REPL.hs b/src/Idris/REPL.hs -index 05587d9672..5e0dc21089 100644 ---- a/src/Idris/REPL.hs -+++ b/src/Idris/REPL.hs -@@ -122,23 +122,21 @@ repl orig mods efile - (if colour && not isWindows - then colourisePrompt theme str - else str) ++ " " -- x <- H.catch (H.withInterrupt $ getInputLine prompt) -- (ctrlC (return $ Just "")) -+ x <- H.handleInterrupt (ctrlC (return $ Just "")) (H.withInterrupt $ getInputLine prompt) - case x of - Nothing -> do lift $ when (not quiet) (iputStrLn "Bye bye") - return () - Just input -> -- H.catch -- do ms <- H.catch (H.withInterrupt $ lift $ processInput input orig mods efile) -- (ctrlC (return (Just mods))) -+ do ms <- H.handleInterrupt (ctrlC (return (Just mods))) (H.withInterrupt $ lift $ processInput input orig mods efile) - case ms of - Just mods -> let efile' = fromMaybe efile (listToMaybe mods) - in repl orig mods efile' - Nothing -> return () - -- ctrlC) - -- ctrlC -- where ctrlC :: InputT Idris a -> SomeException -> InputT Idris a -- ctrlC act e = do lift $ iputStrLn (show e) -- act -- repl orig mods -+ where ctrlC :: InputT Idris a -> InputT Idris a -+ ctrlC act = do lift $ iputStrLn "Interrupted" -+ act -- repl orig mods - - showMVs c thm [] = "" - showMVs c thm ms = "Holes: " ++ diff --git a/gnu/packages/patches/idris-build-with-megaparsec-9.patch b/gnu/packages/patches/idris-build-with-megaparsec-9.patch deleted file mode 100644 index 6d7ff1d713..0000000000 --- a/gnu/packages/patches/idris-build-with-megaparsec-9.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6ea9bc913877d765048d7cdb7fc5aec60b196fac Mon Sep 17 00:00:00 2001 -From: Felix Yan <felixonmars@archlinux.org> -Date: Wed, 16 Dec 2020 21:48:32 +0800 -Subject: [PATCH] Fix compatibility with megaparsec 9 - ---- -Taken from <https://github.com/idris-lang/Idris-dev/pull/4892> - - src/Idris/Parser/Stack.hs | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs -index fb7b611440..879786f4d2 100644 ---- a/src/Idris/Parser/Stack.hs -+++ b/src/Idris/Parser/Stack.hs -@@ -84,7 +84,11 @@ instance Message ParseError where - (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err) - #endif - messageText = PP.text . init . P.parseErrorTextPretty . parseError -+#if MIN_VERSION_megaparsec(9,0,0) -+ messageSource err = sline -+#else - messageSource err = Just sline -+#endif - where - #if MIN_VERSION_megaparsec(8,0,0) - (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err) diff --git a/gnu/packages/patches/idris-disable-test.patch b/gnu/packages/patches/idris-disable-test.patch deleted file mode 100644 index ec8c7c8451..0000000000 --- a/gnu/packages/patches/idris-disable-test.patch +++ /dev/null @@ -1,19 +0,0 @@ -The "pkg010" test output depends on the version of optparse-applicative being -used. The expected output requires optparse-applicative >= 0.15.1.0. Skip -the test for now. - ---- idris-1.3.3/test/TestData.hs 2021-01-19 23:05:24.238958262 -0600 -+++ idris-1.3.3/test/TestData.hs 2021-01-19 23:10:33.314390997 -0600 -@@ -212,8 +212,10 @@ - ( 5, ANY ), - ( 6, ANY ), - ( 7, ANY ), -- ( 8, ANY ), -- ( 10, ANY )]), -+ ( 8, ANY )]), -+-- FIXME: Expected output depends on optparse-applicative version. -+-- See https://github.com/idris-lang/Idris-dev/issues/4896 -+-- ( 10, ANY )]), - ("prelude", "Prelude", - [ ( 1, ANY )]), - ("primitives", "Primitive types", diff --git a/gnu/packages/patches/idris-test-ffi008.patch b/gnu/packages/patches/idris-test-ffi008.patch new file mode 100644 index 0000000000..530813c20e --- /dev/null +++ b/gnu/packages/patches/idris-test-ffi008.patch @@ -0,0 +1,26 @@ +Avoid "multiple definition of `mystruct'" error from `ld`: + +Submitted upstream at https://github.com/idris-lang/Idris-dev/issues/4914 + +--- a/test/ffi008/ffi008.h 1969-12-31 18:00:01.000000000 -0600 ++++ a/test/ffi008/ffi008.h 2022-04-13 00:32:35.561262598 -0500 +@@ -10,7 +10,7 @@ + int16_t b; + }; + +-struct test2 mystruct; ++extern struct test2 mystruct; + + int size1(void); + int size2(void); +--- a/test/ffi008/ffi008.c 1969-12-31 18:00:01.000000000 -0600 ++++ a/test/ffi008/ffi008.c 2022-04-13 00:32:53.145186302 -0500 +@@ -11,6 +11,8 @@ + return sizeof(struct test2); + } + ++struct test2 mystruct; ++ + void print_mystruct(void) { + printf("a: %d b: %d\n", mystruct.a, mystruct.b); + } diff --git a/gnu/packages/patches/irrlicht-link-against-needed-libs.patch b/gnu/packages/patches/irrlicht-link-against-needed-libs.patch new file mode 100644 index 0000000000..2e9f5c78d5 --- /dev/null +++ b/gnu/packages/patches/irrlicht-link-against-needed-libs.patch @@ -0,0 +1,24 @@ +From: Christoph Egger <Christoph.Egger@gmx.de> +Subject: [PATCH] debian/link-against-needed-libs + +There are quite some libraries irrlicht needs but does not link +against. This patch makes irrlicht link correctly against all the +needed libraries. + +Signed-off-by: Christoph Egger <Christoph.Egger@gmx.de> + +--- + source/Irrlicht/Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- irrlicht.orig/source/Irrlicht/Makefile ++++ irrlicht/source/Irrlicht/Makefile +@@ -90,7 +90,7 @@ + LIB_PATH = ../../lib/$(SYSTEM)
+ INSTALL_DIR = /usr/local/lib
+ sharedlib install: SHARED_LIB = libIrrlicht.so
+-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
++staticlib sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lX11 -lz -lpng -ljpeg -lbz2
+ staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+
+ #OSX specific options
diff --git a/gnu/packages/patches/irrlicht-use-system-libs.patch b/gnu/packages/patches/irrlicht-use-system-libs.patch index e764f411d3..06cb6db062 100644 --- a/gnu/packages/patches/irrlicht-use-system-libs.patch +++ b/gnu/packages/patches/irrlicht-use-system-libs.patch @@ -1,40 +1,13 @@ -This patch is a combination of the two following patches with minor -changes to the install code -https://sources.debian.org/src/irrlicht/1.8.4+dfsg1-1/debian/patches/debian/link-against-needed-libs.diff/ -https://sources.debian.org/src/irrlicht/1.8.4+dfsg1-1/debian/patches/debian/use-system-libs.diff/ +Subject: [PATCH] debian/use-system-libs +Path to build irrlicht using the system libraries for png,zlib and +jpeg as well as the glext family of header files. ---- - include/IrrCompileConfig.h | 26 +++++++++------------ - source/Irrlicht/CIrrDeviceLinux.h | 2 +- - source/Irrlicht/COpenGLExtensionHandler.h | 8 +++---- - source/Irrlicht/COpenGLSLMaterialRenderer.h | 2 +- - source/Irrlicht/Makefile | 15 ++++++------ - 5 files changed, 25 insertions(+), 28 deletions(-) +Signed-off-by: Christoph Egger <debian@christoph-egger.org -diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h -index 6bb0589..2216353 100644 ---- a/include/IrrCompileConfig.h -+++ b/include/IrrCompileConfig.h -@@ -238,6 +238,17 @@ for Windows based systems. You also have to set #define UNICODE for this to comp - #undef _IRR_WCHAR_FILESYSTEM
- #endif
-
-+//! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib.
-+/** This enables the engine to read from compressed .zip archives. If you
-+disable this feature, the engine can still read archives, but only uncompressed
-+ones. */
-+#define _IRR_COMPILE_WITH_ZLIB_
-+
-+//! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht.
-+/** If this is commented out, Irrlicht will try to compile using the zlib installed in the system.
-+ This is only used when _IRR_COMPILE_WITH_ZLIB_ is defined. */
-+#undef _IRR_USE_NON_SYSTEM_ZLIB_
-+
- //! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg.
- /** This enables the engine to read jpeg images. If you comment this out,
- the engine will no longer read .jpeg images. */
-@@ -249,10 +260,7 @@ the engine will no longer read .jpeg images. */ +--- irrlicht.orig/include/IrrCompileConfig.h ++++ irrlicht/include/IrrCompileConfig.h +@@ -253,10 +253,7 @@ //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
/** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
@@ -45,7 +18,7 @@ index 6bb0589..2216353 100644 //! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng.
/** This enables the engine to read png images. If you comment this out,
-@@ -265,10 +273,7 @@ the engine will no longer read .png images. */ +@@ -269,10 +266,7 @@ //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
/** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
@@ -56,7 +29,7 @@ index 6bb0589..2216353 100644 //! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9
/** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h,
-@@ -602,10 +607,7 @@ ones. */ +@@ -606,10 +600,7 @@ /** If this is commented out, Irrlicht will try to compile using the zlib
installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
defined. */
@@ -67,7 +40,7 @@ index 6bb0589..2216353 100644 //! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives
#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
#ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_
-@@ -623,18 +625,12 @@ library. */ +@@ -627,18 +618,12 @@ /** If this is commented out, Irrlicht will try to compile using the bzlib
installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is
defined. */
@@ -86,10 +59,8 @@ index 6bb0589..2216353 100644 //! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives
#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
-diff --git a/source/Irrlicht/CIrrDeviceLinux.h b/source/Irrlicht/CIrrDeviceLinux.h -index 4d2a2c6..8cf24ba 100644 ---- a/source/Irrlicht/CIrrDeviceLinux.h -+++ b/source/Irrlicht/CIrrDeviceLinux.h +--- irrlicht.orig/source/Irrlicht/CIrrDeviceLinux.h ++++ irrlicht/source/Irrlicht/CIrrDeviceLinux.h @@ -22,7 +22,7 @@ #define GLX_GLXEXT_LEGACY 1
#include <GL/glx.h>
@@ -99,10 +70,8 @@ index 4d2a2c6..8cf24ba 100644 #endif
#endif
-diff --git a/source/Irrlicht/COpenGLExtensionHandler.h b/source/Irrlicht/COpenGLExtensionHandler.h -index 1b77bad..3886a0e 100644 ---- a/source/Irrlicht/COpenGLExtensionHandler.h -+++ b/source/Irrlicht/COpenGLExtensionHandler.h +--- irrlicht.orig/source/Irrlicht/COpenGLExtensionHandler.h ++++ irrlicht/source/Irrlicht/COpenGLExtensionHandler.h @@ -35,7 +35,7 @@ #endif
#include <OpenGL/gl.h>
@@ -133,10 +102,8 @@ index 1b77bad..3886a0e 100644 #endif
#endif
-diff --git a/source/Irrlicht/COpenGLSLMaterialRenderer.h b/source/Irrlicht/COpenGLSLMaterialRenderer.h -index ff71150..f8a6007 100644 ---- a/source/Irrlicht/COpenGLSLMaterialRenderer.h -+++ b/source/Irrlicht/COpenGLSLMaterialRenderer.h +--- irrlicht.orig/source/Irrlicht/COpenGLSLMaterialRenderer.h ++++ irrlicht/source/Irrlicht/COpenGLSLMaterialRenderer.h @@ -25,7 +25,7 @@ #include <GL/gl.h>
#endif
@@ -146,11 +113,9 @@ index ff71150..f8a6007 100644 #endif
#endif
-diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile -index 67a3899..d9ea7f3 100644 ---- a/source/Irrlicht/Makefile -+++ b/source/Irrlicht/Makefile -@@ -43,7 +43,7 @@ IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderDDS.o CIm +--- irrlicht.orig/source/Irrlicht/Makefile ++++ irrlicht/source/Irrlicht/Makefile +@@ -45,7 +45,7 @@ CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o
IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
@@ -159,7 +124,7 @@ index 67a3899..d9ea7f3 100644 IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o
IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o
ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
-@@ -56,14 +56,14 @@ BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o +@@ -58,14 +58,14 @@ EXTRAOBJ =
LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
@@ -178,25 +143,11 @@ index 67a3899..d9ea7f3 100644 ifndef NDEBUG
CXXFLAGS += -g -D_DEBUG
else
-@@ -88,7 +88,7 @@ STATIC_LIB = libIrrlicht.a - LIB_PATH = ../../lib/$(SYSTEM)
- INSTALL_DIR = /usr/local/lib
- sharedlib install: SHARED_LIB = libIrrlicht.so
--sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
-+staticlib sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lX11 -lz -lpng -ljpeg -lbz2
- staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
-
- #OSX specific options
-@@ -153,7 +153,8 @@ install install_osx: - $(RM) -r $(INSTALL_DIR)/../include/irrlicht
+@@ -156,6 +156,7 @@ mkdir -p $(INSTALL_DIR)/../include/irrlicht
cp ../../include/*.h $(INSTALL_DIR)/../include/irrlicht/
-- cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR)
-+ cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR) || true
-+ cp $(LIB_PATH)/$(STATIC_LIB) $(INSTALL_DIR) || true
+ cp $(LIB_PATH)/$(SHARED_FULLNAME) $(INSTALL_DIR)
++ cp $(LIB_PATH)/$(STATIC_LIB) $(INSTALL_DIR)
cd $(INSTALL_DIR) && ln -s -f $(SHARED_FULLNAME) $(SONAME)
cd $(INSTALL_DIR) && ln -s -f $(SONAME) $(SHARED_LIB)
# ldconfig -n $(INSTALL_DIR)
--- -2.18.0 - diff --git a/gnu/packages/patches/isc-dhcp-gcc-compat.patch b/gnu/packages/patches/isc-dhcp-gcc-compat.patch deleted file mode 100644 index 82cb572d17..0000000000 --- a/gnu/packages/patches/isc-dhcp-gcc-compat.patch +++ /dev/null @@ -1,72 +0,0 @@ -Add minor fixes for compiling with GCC 10. - -Taken from upstream: -https://gitlab.isc.org/isc-projects/dhcp/-/commit/6c7e61578b1b449272dbb40dd8b98d03dad8a57a - -diff --git a/client/dhclient.c b/client/dhclient.c ---- a/client/dhclient.c -+++ b/client/dhclient.c -@@ -83,8 +83,9 @@ static const char message [] = "Internet Systems Consortium DHCP Client"; - static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/"; - #endif /* UNIT_TEST */ - --u_int16_t local_port = 0; --u_int16_t remote_port = 0; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; -+ - #if defined(DHCPv6) && defined(DHCP4o6) - int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */ - #endif -diff --git a/common/discover.c b/common/discover.c ---- a/common/discover.c -+++ b/common/discover.c -@@ -45,8 +45,8 @@ struct interface_info *fallback_interface = 0; - - int interfaces_invalidated; - int quiet_interface_discovery; --u_int16_t local_port; --u_int16_t remote_port; -+u_int16_t local_port = 0; -+u_int16_t remote_port = 0; - u_int16_t relay_port = 0; - int dhcpv4_over_dhcpv6 = 0; - int (*dhcp_interface_setup_hook) (struct interface_info *, struct iaddr *); -diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c ---- a/relay/dhcrelay.c -+++ b/relay/dhcrelay.c -@@ -95,8 +95,8 @@ enum { forward_and_append, /* Forward and append our own relay option. */ - forward_untouched, /* Forward without changes. */ - discard } agent_relay_mode = forward_and_replace; - --u_int16_t local_port; --u_int16_t remote_port; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; - - /* Relay agent server list. */ - struct server_list { -diff --git a/server/mdb.c b/server/mdb.c ---- a/server/mdb.c -+++ b/server/mdb.c -@@ -67,7 +67,7 @@ static host_id_info_t *host_id_info = NULL; - - int numclasseswritten; - --omapi_object_type_t *dhcp_type_host; -+extern omapi_object_type_t *dhcp_type_host; - - isc_result_t enter_class(cd, dynamicp, commit) - struct class *cd; -diff --git a/server/mdb6.c b/server/mdb6.c ---- a/server/mdb6.c -+++ b/server/mdb6.c -@@ -1945,7 +1945,7 @@ create_prefix6(struct ipv6_pool *pool, struct iasubopt **pref, - } - new_ds.data = new_ds.buffer->data; - memcpy(new_ds.buffer->data, ds.data, ds.len); -- memcpy(new_ds.buffer->data + ds.len, &tmp, sizeof(tmp)); -+ memcpy(&new_ds.buffer->data[0] + ds.len, &tmp, sizeof(tmp)); - data_string_forget(&ds, MDL); - data_string_copy(&ds, &new_ds, MDL); - data_string_forget(&new_ds, MDL); diff --git a/gnu/packages/patches/itk-snap-alt-glibc-compat.patch b/gnu/packages/patches/itk-snap-alt-glibc-compat.patch new file mode 100644 index 0000000000..764c5da2c2 --- /dev/null +++ b/gnu/packages/patches/itk-snap-alt-glibc-compat.patch @@ -0,0 +1,22 @@ +Retrieved from ALT Linux. +https://git.altlinux.org/tasks/273587/build/300/x86_64/srpm/itk-snap-3.8.0-alt6.src.rpm + +diff --git a/GUI/Qt/main.cxx b/GUI/Qt/main.cxx +index 576f7160..ceab92e6 100644 +--- a/GUI/Qt/main.cxx ++++ b/GUI/Qt/main.cxx +@@ -51,12 +51,13 @@ using namespace std; + #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) + + #include <signal.h> ++#include <string.h> + #include <execinfo.h> + + void SegmentationFaultHandler(int sig) + { + cerr << "*************************************" << endl; +- cerr << "ITK-SNAP: " << sys_siglist[sig] << endl; ++ cerr << "ITK-SNAP: " << strsignal(sig) << " (" << sigabbrev_np(sig) << ")" << endl; + cerr << "BACKTRACE: " << endl; + void *array[50]; + int nsize = backtrace(array, 50); diff --git a/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch b/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch deleted file mode 100644 index e8d5dce0ed..0000000000 --- a/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch +++ /dev/null @@ -1,35 +0,0 @@ - Disable usage of SSLv3 in testing - - Integrated uptream version 0.9.74 - - -diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c - ---- a/src/testcurl/https/test_tls_options.c -+++ b/src/testcurl/https/test_tls_options.c -@@ -119,11 +119,6 @@ main (int argc, char *const *argv) - fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); - return 77; - } -- if (0 != strncmp (ssl_version, "GnuTLS", 6)) -- { -- fprintf (stderr, "This test can be run only with libcurl-gnutls.\n"); -- return 77; -- } - - if (! testsuite_curl_global_init ()) - return 99; -@@ -152,10 +147,10 @@ main (int argc, char *const *argv) - fprintf (stderr, - "The following handshake should fail (and print an error message)...\n"); - if (0 != -- test_wrap ("TLS1.0 vs SSL3", -+ test_wrap ("TLS1.1 vs TLS1.0", - &test_unmatching_ssl_version, NULL, port, daemon_flags, - aes256_sha, -- CURL_SSLVERSION_SSLv3, -+ CURL_SSLVERSION_TLSv1_1, - MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, - MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, - MHD_OPTION_HTTPS_PRIORITIES, - diff --git a/gnu/packages/patches/libobjc2-unbundle-robin-map.patch b/gnu/packages/patches/libobjc2-unbundle-robin-map.patch new file mode 100644 index 0000000000..b828a64221 --- /dev/null +++ b/gnu/packages/patches/libobjc2-unbundle-robin-map.patch @@ -0,0 +1,47 @@ +From 2c5b0d5d6eba3bda4e83f489da546060fa8f3a2b Mon Sep 17 00:00:00 2001 +From: Zhu Zihao <all_but_last@163.com> +Date: Sat, 26 Mar 2022 16:54:43 +0800 +Subject: [PATCH] Unbundle robin-map. + +This patch makes libobjc2 use robin-map header from system instead of cloning +from submodule. +--- + CMakeLists.txt | 8 -------- + arc.mm | 2 +- + 2 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2746e9..cf731f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,14 +86,6 @@ else () + list(APPEND libobjc_C_SRCS eh_personality.c) + endif (WIN32) + +-if (NOT EXISTS "${CMAKE_SOURCE_DIR}/third_party/robin-map/include/tsl/robin_map.h") +- message(FATAL_ERROR "Git submodules not present, please run:\n\n" +- " $ git submodule init && git submodule update\n\n" +- "If you did not checkout via git, you will need to" +- "fetch the submodule's contents from" +- "https://github.com/Tessil/robin-map/") +-endif () +- + # For release builds, we disable spamming the terminal with warnings about + # selector type mismatches + if (CMAKE_BUILD_TYPE STREQUAL Release) +diff --git a/arc.mm b/arc.mm +index c96681f..cc93e7f 100644 +--- a/arc.mm ++++ b/arc.mm +@@ -3,7 +3,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <assert.h> +-#include "third_party/robin-map/include/tsl/robin_map.h" ++#include <tsl/robin_map.h> + #import "lock.h" + #import "objc/runtime.h" + #import "objc/blocks_runtime.h" +-- +2.34.0 + diff --git a/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch b/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch new file mode 100644 index 0000000000..97f0f5fbd3 --- /dev/null +++ b/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch @@ -0,0 +1,100 @@ +From f91a9cfcd70178404ac2aafdfa124c9a4efe8866 Mon Sep 17 00:00:00 2001 +From: Richard Hughes <richard@hughsie.com> +Date: Mon, 18 Apr 2022 10:50:42 +0100 +Subject: [PATCH 11/11] Install xb-tool into bindir + +Fixes https://github.com/hughsie/libxmlb/issues/123 +--- + contrib/libxmlb.spec.in | 3 ++- + meson.build | 4 +++- + src/meson.build | 9 ++++++++- + src/xb-tool.1 | 19 +++++++++++++++++++ + 4 files changed, 32 insertions(+), 3 deletions(-) + create mode 100644 src/xb-tool.1 + +diff --git a/contrib/libxmlb.spec.in b/contrib/libxmlb.spec.in +index 6be65d1..24478fe 100644 +--- a/contrib/libxmlb.spec.in ++++ b/contrib/libxmlb.spec.in +@@ -71,7 +71,8 @@ Executable and data files for installed tests. + %files + %doc README.md + %license LICENSE +-%{_libexecdir}/xb-tool ++%{_bindir}/xb-tool ++%{_mandir}/man1/xb-tool.1* + %dir %{_libdir}/girepository-1.0 + %{_libdir}/girepository-1.0/Xmlb-2.0.typelib + %{_libdir}/libxmlb.so.2* +diff --git a/meson.build b/meson.build +index 6870907..53b1324 100644 +--- a/meson.build ++++ b/meson.build +@@ -103,16 +103,18 @@ add_project_link_arguments( + ) + + if host_machine.system() == 'windows' +- libexecdir = get_option('libexecdir') ++ bindir = get_option('bindir') + installed_test_bindir = get_option('libexecdir') + installed_test_datadir = get_option('datadir') + else + prefix = get_option('prefix') + datadir = join_paths(prefix, get_option('datadir')) ++ bindir = join_paths(prefix, get_option('bindir')) + libexecdir = join_paths(prefix, get_option('libexecdir')) + installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name()) + installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name()) + endif ++mandir = join_paths(prefix, get_option('mandir')) + + gio = dependency('gio-2.0', version : '>= 2.45.8') + giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) +diff --git a/src/meson.build b/src/meson.build +index d7a1401..93fb8ba 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -96,7 +96,14 @@ xb_tool = executable( + libxmlb, + ], + install : true, +- install_dir : libexecdir ++ install_dir : bindir ++) ++configure_file( ++ input : 'xb-tool.1', ++ output : 'xb-tool.1', ++ configuration : conf, ++ install: true, ++ install_dir: join_paths(mandir, 'man1'), + ) + endif + +diff --git a/src/xb-tool.1 b/src/xb-tool.1 +new file mode 100644 +index 0000000..348d1b1 +--- /dev/null ++++ b/src/xb-tool.1 +@@ -0,0 +1,19 @@ ++.\" Report problems in https://github.com/hughsie/libxmlb ++.TH man 1 "18 April 2022" @PACKAGE_VERSION@ "xb-tool man page" ++.SH NAME ++xb-tool \- standalone XMLb utility ++.SH SYNOPSIS ++xb-tool [CMD] ++.SH DESCRIPTION ++This tool allows creating, dumping and querying binary XML blobs. ++.PP ++Additionally \fBxb-tool\fR can be used to profile specfic tokenized queries. ++.SH OPTIONS ++The xb-tool command takes various options depending on the action. ++Run \fBxb-tool --help\fR for the full list. ++.SH EXIT STATUS ++Commands that successfully execute will return "0", otherwise "1". ++.SH BUGS ++No known bugs. ++.SH AUTHOR ++Richard Hughes (richard@hughsie.com) +-- +2.35.1 + diff --git a/gnu/packages/patches/mia-fix-boost-headers.patch b/gnu/packages/patches/mia-fix-boost-headers.patch new file mode 100644 index 0000000000..158ab2afeb --- /dev/null +++ b/gnu/packages/patches/mia-fix-boost-headers.patch @@ -0,0 +1,479 @@ +Retrieved from Debian, and added a few "#include <boost/mpl/vector.hpp>" +directives to fix the build. + +diff --git a/addons/hdf5/test_hdf5_3dimage.cc b/addons/hdf5/test_hdf5_3dimage.cc +index a7185618..7a398821 100644 +--- a/addons/hdf5/test_hdf5_3dimage.cc ++++ b/addons/hdf5/test_hdf5_3dimage.cc +@@ -23,7 +23,7 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> ++#include <boost/test/unit_test.hpp> + + #include <addons/hdf5/hdf5_3dimage.hh> + +diff --git a/addons/hdf5/test_hdf5mia.cc b/addons/hdf5/test_hdf5mia.cc +index 3d62106e..8141be07 100644 +--- a/addons/hdf5/test_hdf5mia.cc ++++ b/addons/hdf5/test_hdf5mia.cc +@@ -23,7 +23,6 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <boost/mpl/insert_range.hpp> + + #include <addons/hdf5/hdf5a_mia.hh> +diff --git a/addons/nifti/test_niftiimage.cc b/addons/nifti/test_niftiimage.cc +index 8df3f0b5..840ae585 100644 +--- a/addons/nifti/test_niftiimage.cc ++++ b/addons/nifti/test_niftiimage.cc +@@ -23,8 +23,6 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + + #include <nifti/niftiimage.hh> + #include <unistd.h> +diff --git a/addons/vistaio/test_2dvistaio.cc b/addons/vistaio/test_2dvistaio.cc +index b3da29a0..9b1599dd 100644 +--- a/addons/vistaio/test_2dvistaio.cc ++++ b/addons/vistaio/test_2dvistaio.cc +@@ -23,8 +23,6 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + + #include <vistaio/2dvistaio.hh> + #include <unistd.h> +diff --git a/addons/vistaio/test_3dvistaio.cc b/addons/vistaio/test_3dvistaio.cc +index 93c007d0..c3ae1fdb 100644 +--- a/addons/vistaio/test_3dvistaio.cc ++++ b/addons/vistaio/test_3dvistaio.cc +@@ -23,8 +23,6 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + + #include <vistaio/3dvistaio.hh> + #include <unistd.h> +diff --git a/addons/vtk/test_vtkimage.cc b/addons/vtk/test_vtkimage.cc +index eaf96a6b..8212ef1d 100644 +--- a/addons/vtk/test_vtkimage.cc ++++ b/addons/vtk/test_vtkimage.cc +@@ -23,8 +23,6 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + + #include <vtk/vtkimage.hh> + #include <unistd.h> +diff --git a/mia/2d/creator/test_circle.cc b/mia/2d/creator/test_circle.cc +index 9784e05d..7ca4bab9 100644 +--- a/mia/2d/creator/test_circle.cc ++++ b/mia/2d/creator/test_circle.cc +@@ -21,8 +21,6 @@ + + #include <mia/internal/plugintester.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + #include <mia/2d/creator/circle.hh> + + using namespace mia; +diff --git a/mia/2d/filter/test_convert.cc b/mia/2d/filter/test_convert.cc +index 80304793..f40d295a 100644 +--- a/mia/2d/filter/test_convert.cc ++++ b/mia/2d/filter/test_convert.cc +@@ -25,7 +25,6 @@ + #include <type_traits> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <boost/mpl/insert_range.hpp> + + +diff --git a/mia/2d/filter/test_morphological.cc b/mia/2d/filter/test_morphological.cc +index 2fc58583..9a004946 100644 +--- a/mia/2d/filter/test_morphological.cc ++++ b/mia/2d/filter/test_morphological.cc +@@ -20,7 +20,6 @@ + + #include <mia/internal/plugintester.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <mia/2d/filter/morphological.hh> + + namespace bmpl = boost::mpl; +diff --git a/mia/2d/filter/test_sortlabel.cc b/mia/2d/filter/test_sortlabel.cc +index 78464e1a..49c327e3 100644 +--- a/mia/2d/filter/test_sortlabel.cc ++++ b/mia/2d/filter/test_sortlabel.cc +@@ -23,7 +23,6 @@ + #include <mia/2d/filter/sortlabel.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + namespace bmpl = boost::mpl; + + +diff --git a/mia/2d/filter/test_thinning.cc b/mia/2d/filter/test_thinning.cc +index 3ebb2cdc..8bc5b356 100644 +--- a/mia/2d/filter/test_thinning.cc ++++ b/mia/2d/filter/test_thinning.cc +@@ -21,7 +21,6 @@ + + #include <mia/internal/plugintester.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <mia/2d/filter/thinning.hh> + #include <mia/2d/imagetest.hh> + +diff --git a/mia/2d/test_filter_cast.cc b/mia/2d/test_filter_cast.cc +index e806e14f..91c77398 100644 +--- a/mia/2d/test_filter_cast.cc ++++ b/mia/2d/test_filter_cast.cc +@@ -24,7 +24,7 @@ + #include <mia/internal/autotest.hh> + #include <mia/2d/filter.hh> + +-#include <boost/test/test_case_template.hpp> ++#include <boost/mpl/vector.hpp> + #include <boost/type_traits.hpp> + #include <boost/mpl/list.hpp> + +diff --git a/mia/2d/test_image.cc b/mia/2d/test_image.cc +index c82dc59b..1f602510 100644 +--- a/mia/2d/test_image.cc ++++ b/mia/2d/test_image.cc +@@ -24,6 +24,7 @@ + #include <mia/internal/autotest.hh> + + #include <boost/filesystem/path.hpp> ++#include <boost/mpl/vector.hpp> + + #include <iostream> + +diff --git a/mia/2d/test_interpol.cc b/mia/2d/test_interpol.cc +index d1f3703d..5caafccf 100644 +--- a/mia/2d/test_interpol.cc ++++ b/mia/2d/test_interpol.cc +@@ -23,7 +23,6 @@ + + #include <mia/internal/autotest.hh> + +-#include <boost/test/test_case_template.hpp> + #include <boost/type_traits.hpp> + #include <boost/mpl/list.hpp> + +diff --git a/mia/3d/fifotestfixture.cc b/mia/3d/fifotestfixture.cc +index ab2e7c65..1b6e6bb4 100644 +--- a/mia/3d/fifotestfixture.cc ++++ b/mia/3d/fifotestfixture.cc +@@ -24,7 +24,7 @@ + + #include <climits> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + #include <mia/core/msgstream.hh> + #include <mia/2d/imagetest.hh> + #include <mia/3d/fifotestfixture.hh> +diff --git a/mia/3d/filter/test_convert.cc b/mia/3d/filter/test_convert.cc +index e83032c1..dad9afaa 100644 +--- a/mia/3d/filter/test_convert.cc ++++ b/mia/3d/filter/test_convert.cc +@@ -20,7 +20,6 @@ + + #include <mia/internal/autotest.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <mia/core/type_traits.hh> + #include <mia/3d/filter/convert.hh> + #include <boost/mpl/insert_range.hpp> +diff --git a/mia/3d/test_image.cc b/mia/3d/test_image.cc +index 18f71892..c21e0d20 100644 +--- a/mia/3d/test_image.cc ++++ b/mia/3d/test_image.cc +@@ -21,7 +21,8 @@ + #include <climits> + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> ++#include <boost/mpl/vector.hpp> + + #include <mia/3d/image.hh> + #include <mia/core/filter.hh> +diff --git a/mia/3d/test_imageio.cc b/mia/3d/test_imageio.cc +index 0640a668..7a6b5635 100644 +--- a/mia/3d/test_imageio.cc ++++ b/mia/3d/test_imageio.cc +@@ -20,7 +20,6 @@ + + #include <mia/internal/autotest.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + #include <boost/mpl/insert_range.hpp> + + #include <mia/core/attribute_names.hh> +diff --git a/mia/core/splinekernel/test_bspline.cc b/mia/core/splinekernel/test_bspline.cc +index 54d6bda3..0abfe443 100644 +--- a/mia/core/splinekernel/test_bspline.cc ++++ b/mia/core/splinekernel/test_bspline.cc +@@ -23,8 +23,6 @@ + #include <mia/core/splinekernel/bspline.hh> + #include <mia/core/interpolator1d.hh> + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> +- + + using namespace mia; + using namespace mia::bsplinekernel; +diff --git a/mia/core/test_cost.cc b/mia/core/test_cost.cc +index 70097b2e..305ca84d 100644 +--- a/mia/core/test_cost.cc ++++ b/mia/core/test_cost.cc +@@ -27,7 +27,7 @@ + #include <mia/core/msgstream.hh> + + #include <boost/test/unit_test_suite.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + #include <boost/test/test_tools.hpp> + + NS_MIA_USE +diff --git a/mia/core/test_cstplan.cc b/mia/core/test_cstplan.cc +index aa241d48..a9e5a0e3 100644 +--- a/mia/core/test_cstplan.cc ++++ b/mia/core/test_cstplan.cc +@@ -23,7 +23,7 @@ + + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/cstplan.hh> + +diff --git a/mia/core/test_dictmap.cc b/mia/core/test_dictmap.cc +index a9217290..fd05fe30 100644 +--- a/mia/core/test_dictmap.cc ++++ b/mia/core/test_dictmap.cc +@@ -26,7 +26,7 @@ + + #include <boost/test/test_tools.hpp> + #include <boost/test/unit_test_suite.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/dictmap.hh> + #include <mia/core/cmdlineparser.hh> +diff --git a/mia/core/test_fifofilter.cc b/mia/core/test_fifofilter.cc +index 2a066f2e..6e2a385d 100644 +--- a/mia/core/test_fifofilter.cc ++++ b/mia/core/test_fifofilter.cc +@@ -27,7 +27,7 @@ + + #include <boost/test/test_tools.hpp> + #include <boost/test/unit_test_suite.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + + #include <mia/core/cmdlineparser.hh> +diff --git a/mia/core/test_gsl_matrix.cc b/mia/core/test_gsl_matrix.cc +index 4add5f7a..6d16353d 100644 +--- a/mia/core/test_gsl_matrix.cc ++++ b/mia/core/test_gsl_matrix.cc +@@ -25,7 +25,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + #include <mia/core/gsl_matrix.hh> + + #include <stdexcept> +diff --git a/mia/core/test_gsl_matrix_vector_ops.cc b/mia/core/test_gsl_matrix_vector_ops.cc +index e5f7d7b9..217020f7 100644 +--- a/mia/core/test_gsl_matrix_vector_ops.cc ++++ b/mia/core/test_gsl_matrix_vector_ops.cc +@@ -28,7 +28,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <iostream> + #include <cmath> +diff --git a/mia/core/test_gsl_multimin.cc b/mia/core/test_gsl_multimin.cc +index 5bbc434b..129f578a 100644 +--- a/mia/core/test_gsl_multimin.cc ++++ b/mia/core/test_gsl_multimin.cc +@@ -25,7 +25,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + #include <vector> + + #include <mia/core/gsl_multimin.hh> +diff --git a/mia/core/test_gsl_pca.cc b/mia/core/test_gsl_pca.cc +index 436b36b0..12942921 100644 +--- a/mia/core/test_gsl_pca.cc ++++ b/mia/core/test_gsl_pca.cc +@@ -27,7 +27,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/gsl_pca.hh> + +diff --git a/mia/core/test_gsl_vector.cc b/mia/core/test_gsl_vector.cc +index 541c88b8..ba91f159 100644 +--- a/mia/core/test_gsl_vector.cc ++++ b/mia/core/test_gsl_vector.cc +@@ -25,10 +25,9 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> + + #include <mia/core/gsl_vector.hh> + +diff --git a/mia/core/test_interpol.cc b/mia/core/test_interpol.cc +index 36669dc0..2dd5157d 100644 +--- a/mia/core/test_interpol.cc ++++ b/mia/core/test_interpol.cc +@@ -24,7 +24,7 @@ + #include <mia/internal/autotest.hh> + + #include <boost/mpl/vector.hpp> +-#include <boost/test/test_case_template.hpp> ++#include <boost/test/unit_test.hpp> + #include <boost/type_traits.hpp> + #include <boost/filesystem/path.hpp> + +diff --git a/mia/core/test_parameter.cc b/mia/core/test_parameter.cc +index ae9b4976..28ef2a80 100644 +--- a/mia/core/test_parameter.cc ++++ b/mia/core/test_parameter.cc +@@ -26,7 +26,7 @@ + + #include <boost/test/test_tools.hpp> + #include <boost/test/unit_test_suite.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/parameter.hh> + #include <mia/core/msgstream.hh> +diff --git a/mia/core/test_probmap.cc b/mia/core/test_probmap.cc +index 2dc6cb6c..38052681 100644 +--- a/mia/core/test_probmap.cc ++++ b/mia/core/test_probmap.cc +@@ -22,7 +22,7 @@ + + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/cmdlineparser.hh> + #include <mia/core/probmap.hh> +diff --git a/mia/core/test_sqmin.cc b/mia/core/test_sqmin.cc +index f00b3b85..4a0b67b9 100644 +--- a/mia/core/test_sqmin.cc ++++ b/mia/core/test_sqmin.cc +@@ -23,7 +23,7 @@ + #define BOOST_TEST_DYN_LINK + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core/sqmin.hh> + +diff --git a/mia/internal/autotest.hh b/mia/internal/autotest.hh +index 419f6e8f..4458c0b2 100644 +--- a/mia/internal/autotest.hh ++++ b/mia/internal/autotest.hh +@@ -34,7 +34,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_NO_MAIN + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <miaconfig.h> + #include <mia/core/cmdlineparser.hh> +diff --git a/mia/internal/plugintester.hh b/mia/internal/plugintester.hh +index 2d42b858..e632e5f7 100644 +--- a/mia/internal/plugintester.hh ++++ b/mia/internal/plugintester.hh +@@ -31,7 +31,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_NO_MAIN + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <miaconfig.h> + #include <mia/core/factory.hh> +diff --git a/mia/test/testhelpers.hh b/mia/test/testhelpers.hh +index 27f37e7f..68c213a6 100644 +--- a/mia/test/testhelpers.hh ++++ b/mia/test/testhelpers.hh +@@ -23,7 +23,7 @@ + + #include <type_traits> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + namespace miatest + { +diff --git a/src/2dlerp.cc b/src/2dlerp.cc +index 4c7dde77..1e8801de 100644 +--- a/src/2dlerp.cc ++++ b/src/2dlerp.cc +@@ -25,7 +25,7 @@ + + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core.hh> + #include <mia/internal/main.hh> +diff --git a/src/3dlerp.cc b/src/3dlerp.cc +index 6ee8dca0..2f1c1f3a 100644 +--- a/src/3dlerp.cc ++++ b/src/3dlerp.cc +@@ -24,7 +24,7 @@ + #define BOOST_TEST_NO_MAIN + #include <boost/test/unit_test_suite.hpp> + #include <boost/test/unit_test.hpp> +-#include <boost/test/floating_point_comparison.hpp> ++#include <boost/test/tools/floating_point_comparison.hpp> + + #include <mia/core.hh> + #include <mia/internal/main.hh> diff --git a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch deleted file mode 100644 index 41338e6e6f..0000000000 --- a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch +++ /dev/null @@ -1,156 +0,0 @@ -From d10ea2ad7efc2364a8a2007b4c6d3e85511e2f84 Mon Sep 17 00:00:00 2001 -From: Maxime Devos <maximedevos@telenet.be> -Date: Tue, 3 Aug 2021 01:00:23 +0200 -Subject: [PATCH] Add environment variable MINETEST_MOD_PATH - -This adds an environment variable MINETEST_MOD_PATH. -When it exists, Minetest will look there for mods -in addition to ~/.minetest/mods/. Mods can still be -installed to ~/.minetest/mods/ with the built-in installer. - -With thanks to Liliana Marie Prikler. ---- - builtin/mainmenu/pkgmgr.lua | 7 +++---- - doc/menu_lua_api.txt | 8 +++++++- - src/content/subgames.cpp | 11 +++++++++++ - src/script/lua_api/l_mainmenu.cpp | 23 +++++++++++++++++++++++ - src/script/lua_api/l_mainmenu.h | 2 ++ - 5 files changed, 46 insertions(+), 5 deletions(-) - -diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua -index 787936e31..d8fba0ebe 100644 ---- a/builtin/mainmenu/pkgmgr.lua -+++ b/builtin/mainmenu/pkgmgr.lua -@@ -682,10 +682,9 @@ function pkgmgr.preparemodlist(data) - local game_mods = {} - - --read global mods -- local modpath = core.get_modpath() -- -- if modpath ~= nil and -- modpath ~= "" then -+ local modpaths = core.get_modpaths() -+ --XXX what was ‘modpath ~= ""’ and ‘modpath ~= nil’ for? -+ for _,modpath in ipairs(modpaths) do - get_mods(modpath,global_mods) - end - -diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt -index b3975bc1d..132444b14 100644 ---- a/doc/menu_lua_api.txt -+++ b/doc/menu_lua_api.txt -@@ -218,7 +218,13 @@ Package - content which is downloadable from the content db, may or may not be i - * returns path to global user data, - the directory that contains user-provided mods, worlds, games, and texture packs. - * core.get_modpath() (possible in async calls) -- * returns path to global modpath -+ * returns path to global modpath, where mods can be installed -+* core.get_modpaths() (possible in async calls) -+ * returns list of paths to global modpaths, where mods have been installed -+ -+ The difference with "core.get_modpath" is that no mods should be installed in these -+ directories by Minetest -- they might be read-only. -+ - * core.get_clientmodpath() (possible in async calls) - * returns path to global client-side modpath - * core.get_gamepath() (possible in async calls) -diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp -index e9dc609b0..d73f95a1f 100644 ---- a/src/content/subgames.cpp -+++ b/src/content/subgames.cpp -@@ -61,6 +61,12 @@ std::string getSubgamePathEnv() - return subgame_path ? std::string(subgame_path) : ""; - } - -+std::string getModPathEnv() -+{ -+ char *mod_path = getenv("MINETEST_MOD_PATH"); -+ return mod_path ? std::string(mod_path) : ""; -+} -+ - SubgameSpec findSubgame(const std::string &id) - { - if (id.empty()) -@@ -110,6 +116,11 @@ SubgameSpec findSubgame(const std::string &id) - std::set<std::string> mods_paths; - if (!user_game) - mods_paths.insert(share + DIR_DELIM + "mods"); -+ -+ Strfnd mod_search_paths(getModPathEnv()); -+ while (!mod_search_paths.at_end()) -+ mods_paths.insert(mod_search_paths.next(PATH_DELIM)); -+ - if (user != share || user_game) - mods_paths.insert(user + DIR_DELIM + "mods"); - -diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp -index 3e9709bde..903ac3a22 100644 ---- a/src/script/lua_api/l_mainmenu.cpp -+++ b/src/script/lua_api/l_mainmenu.cpp -@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., - #include "lua_api/l_internal.h" - #include "common/c_content.h" - #include "cpp_api/s_async.h" -+#include "util/strfnd.h" - #include "gui/guiEngine.h" - #include "gui/guiMainMenu.h" - #include "gui/guiKeyChangeMenu.h" -@@ -502,6 +503,26 @@ int ModApiMainMenu::l_get_modpath(lua_State *L) - return 1; - } - -+/******************************************************************************/ -+int ModApiMainMenu::l_get_modpaths(lua_State *L) -+{ -+ const char *c_modpath = getenv("MINETEST_MOD_PATH"); -+ if (c_modpath == NULL) -+ c_modpath = ""; -+ int index = 1; -+ lua_newtable(L); -+ Strfnd mod_search_paths{std::string(c_modpath)}; -+ while (!mod_search_paths.at_end()) { -+ std::string component = mod_search_paths.next(PATH_DELIM); -+ lua_pushstring(L, component.c_str()); -+ lua_rawseti(L, -2, index); -+ index++; -+ } -+ ModApiMainMenu::l_get_modpath(L); -+ lua_rawseti(L, -2, index); -+ return 1; -+} -+ - /******************************************************************************/ - int ModApiMainMenu::l_get_clientmodpath(lua_State *L) - { -@@ -949,6 +970,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top) - API_FCT(get_mapgen_names); - API_FCT(get_user_path); - API_FCT(get_modpath); -+ API_FCT(get_modpaths); - API_FCT(get_clientmodpath); - API_FCT(get_gamepath); - API_FCT(get_texturepath); -@@ -983,6 +1005,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top) - API_FCT(get_mapgen_names); - API_FCT(get_user_path); - API_FCT(get_modpath); -+ API_FCT(get_modpaths); - API_FCT(get_clientmodpath); - API_FCT(get_gamepath); - API_FCT(get_texturepath); -diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h -index 33ac9e721..a6a54a2cb 100644 ---- a/src/script/lua_api/l_mainmenu.h -+++ b/src/script/lua_api/l_mainmenu.h -@@ -112,6 +112,8 @@ class ModApiMainMenu: public ModApiBase - - static int l_get_modpath(lua_State *L); - -+ static int l_get_modpaths(lua_State *L); -+ - static int l_get_clientmodpath(lua_State *L); - - static int l_get_gamepath(lua_State *L); --- -2.32.0 - diff --git a/gnu/packages/patches/mozjs17-aarch64-support.patch b/gnu/packages/patches/mozjs17-aarch64-support.patch deleted file mode 100644 index 51e2e306d5..0000000000 --- a/gnu/packages/patches/mozjs17-aarch64-support.patch +++ /dev/null @@ -1,60 +0,0 @@ -https://build.opensuse.org/package/view_file/openSUSE:Factory/mozjs17/mozjs-aarch64-support.patch - -index c071c33..90764c3 100644 ---- a/js/src/assembler/jit/ExecutableAllocator.h -+++ b/js/src/assembler/jit/ExecutableAllocator.h -@@ -382,6 +382,12 @@ public: - { - reprotectRegion(start, size, Executable); - } -+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX -+ static void cacheFlush(void* code, size_t size) -+ { -+ intptr_t end = reinterpret_cast<intptr_t>(code) + size; -+ __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end)); -+ } - #else - static void makeWritable(void*, size_t) {} - static void makeExecutable(void*, size_t) {} -diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h -index 0c84896..e8763a7 100644 ---- a/js/src/assembler/wtf/Platform.h -+++ b/js/src/assembler/wtf/Platform.h -@@ -325,6 +325,10 @@ - #define WTF_THUMB_ARCH_VERSION 0 - #endif - -+/* CPU(AArch64) - 64-bit ARM */ -+#if defined(__aarch64__) -+#define WTF_CPU_AARCH64 1 -+#endif - - /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */ - /* On ARMv5 and below the natural alignment is required. -diff --git a/js/src/configure.in b/js/src/configure.in -index 15605b2..19fd704 100644 ---- a/js/src/configure.in -+++ b/js/src/configure.in -@@ -1121,6 +1121,10 @@ arm*) - CPU_ARCH=arm - ;; - -+aarch64) -+ CPU_ARCH=aarch64 -+ ;; -+ - mips|mipsel) - CPU_ARCH="mips" - ;; -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h -index 0eec2d9..fe26dab 100644 ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -58,6 +58,7 @@ - defined(__mips__) || defined(__powerpc__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ -+ defined(__aarch64__) || \ - defined(_MIPS_ARCH_MIPS32R2) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) diff --git a/gnu/packages/patches/mozjs24-aarch64-support.patch b/gnu/packages/patches/mozjs24-aarch64-support.patch deleted file mode 100644 index 9dca8e500c..0000000000 --- a/gnu/packages/patches/mozjs24-aarch64-support.patch +++ /dev/null @@ -1,21 +0,0 @@ -This patch is sourced from Debian's mozjs24 patch set. - -Description: Add arm64 support -Author: Andreas Schwab <schwab@suse.de> -Origin: vendor, https://build.opensuse.org/package/view_file/openSUSE:Factory/mozjs17/mozjs-aarch64-support.patch -Forwarded: no -Last-Update: 2014-01-03 - -Index: b/mfbt/double-conversion/utils.h -=================================================================== ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -58,7 +58,7 @@ - defined(__mips__) || defined(__powerpc__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ -- defined(_MIPS_ARCH_MIPS32R2) -+ defined(_MIPS_ARCH_MIPS32R2) || defined(__aarch64__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) diff --git a/gnu/packages/patches/mozjs38-pkg-config-version.patch b/gnu/packages/patches/mozjs38-pkg-config-version.patch deleted file mode 100644 index 49ff6f6f8d..0000000000 --- a/gnu/packages/patches/mozjs38-pkg-config-version.patch +++ /dev/null @@ -1,24 +0,0 @@ -Taken from https://bug1339931.bmoattachments.org/attachment.cgi?id=8837770. - -Add major version to pkg-config filename. -Author: Rico Tzschichholz <ricotz@ubuntu.com> -Forwarded: no -Last-Update: 2015-05-04 - -Index: b/js/src/Makefile.in -=================================================================== ---- a/js/src/Makefile.in -+++ b/js/src/Makefile.in -@@ -214,10 +214,10 @@ - $(JS_CONFIG_NAME): js-config - cp $^ $@ - --$(LIBRARY_NAME).pc: js.pc -+$(JS_LIBRARY_NAME).pc: js.pc - cp $^ $@ - --install:: $(LIBRARY_NAME).pc -+install:: $(JS_LIBRARY_NAME).pc - $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig - - install:: js-config.h diff --git a/gnu/packages/patches/mozjs38-shell-version.patch b/gnu/packages/patches/mozjs38-shell-version.patch deleted file mode 100644 index e7d3d19c85..0000000000 --- a/gnu/packages/patches/mozjs38-shell-version.patch +++ /dev/null @@ -1,67 +0,0 @@ -Taken from https://bug1339931.bmoattachments.org/attachment.cgi?id=8837771. - -# HG changeset patch -# Parent 4732a0e5d22bc7e5c1f1ace7a182d537d9cc2c6a -Add major version to shell and js-config filenames. -Author: Rico Tzschichholz <ricotz@ubuntu.com> -Forwarded: no -Last-Update: 2014-10-29 - ---- -diff --git a/js/src/configure b/js/src/configure ---- a/js/src/configure -+++ b/js/src/configure -@@ -1696,8 +1696,13 @@ - MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` - IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` - -+if test -n "$JS_STANDALONE"; then -+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION -+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config -+else - JS_SHELL_NAME=js - JS_CONFIG_NAME=js-config -+fi - - - if test -n "$IS_ALPHA"; then - -diff --git a/js/src/configure.in b/js/src/configure.in ---- a/js/src/configure.in -+++ b/js/src/configure.in -@@ -234,16 +234,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI - MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` - IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` - --dnl XXX in a temporary bid to avoid developer anger at renaming files --dnl XXX before "js" symlinks exist, don't change names. --dnl --dnl if test -n "$JS_STANDALONE"; then --dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION --dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config --dnl else -+if test -n "$JS_STANDALONE"; then -+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION -+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config -+else - JS_SHELL_NAME=js - JS_CONFIG_NAME=js-config --dnl fi -+fi - - changequote([,]) - if test -n "$IS_ALPHA"; then - -diff -r 80a9e64d75f5 js/src/Makefile.in ---- a/js/src/Makefile.in Wed Jun 25 15:11:42 2014 +0200 -+++ b/js/src/Makefile.in Sat Jul 05 14:08:38 2014 +0200 -@@ -273,6 +273,9 @@ - SCRIPTS = $(JS_CONFIG_NAME) - SDK_BINARY = $(JS_CONFIG_NAME) - -+$(JS_CONFIG_NAME): js-config -+ cp $^ $@ -+ - $(JS_LIBRARY_NAME).pc: js.pc - cp $^ $@ - diff --git a/gnu/packages/patches/mozjs38-tracelogger.patch b/gnu/packages/patches/mozjs38-tracelogger.patch deleted file mode 100644 index 0375ec36cc..0000000000 --- a/gnu/packages/patches/mozjs38-tracelogger.patch +++ /dev/null @@ -1,608 +0,0 @@ -Squashed version of several commits to fix the tracelogger. - -Taken from -https://github.com/GNOME/jhbuild/blob/master/patches/mozjs38-fix-tracelogger.patch. - -# === Fix the SM38 tracelogger === -# This patch is a squashed version of several patches that were adapted -# to fix failing hunks. -# -# Applied in the following order, they are: -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223767 -# Assertion failure: i < size_, at js/src/vm/TraceLoggingTypes.h:210 -# Also fix stop-information to make reduce.py work correctly. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227914 -# Limit the memory tracelogger can take. -# This causes tracelogger to flush data to the disk regularly and prevents out of -# memory issues if a lot of data gets logged. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1155618 -# Fix tracelogger destructor that touches possibly uninitialised hash table. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223636 -# Don't treat extraTextId as containing only extra ids. -# This fixes an assertion failure: id == nextTextId at js/src/vm/TraceLoggingGraph.cpp -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227028 -# Fix when to keep the payload of a TraceLogger event. -# This fixes an assertion failure: textId < uint32_t(1 << 31) at js/src/vm/TraceLoggingGraph.h -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1266649 -# Handle failing to add to pointermap gracefully. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1280648 -# Don't cache based on pointers to movable GC things. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1224123 -# Fix the use of LastEntryId in tracelogger.h. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1231170 -# Use size in debugger instead of the current id to track last logged item. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1221844 -# Move TraceLogger_Invalidation to LOG_ITEM. -# Add some debug checks to logTimestamp. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1255766 -# Also mark resizing of memory. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1259403 -# Only increase capacity by multiples of 2. -# Always make sure there are 3 free slots for events. -# === - -diff --git a/js/src/jit-test/tests/tracelogger/bug1231170.js b/js/src/jit-test/tests/tracelogger/bug1231170.js -new file mode 100644 -index 0000000..023e93e ---- /dev/null -+++ b/js/src/jit-test/tests/tracelogger/bug1231170.js -@@ -0,0 +1,3 @@ -+var du = new Debugger(); -+if (typeof du.drainTraceLogger === "function") -+ du.drainTraceLogger(); -diff --git a/js/src/jit-test/tests/tracelogger/bug1266649.js b/js/src/jit-test/tests/tracelogger/bug1266649.js -new file mode 100644 -index 0000000..81ae7ad ---- /dev/null -+++ b/js/src/jit-test/tests/tracelogger/bug1266649.js -@@ -0,0 +1,10 @@ -+ -+var du = new Debugger(); -+if (typeof du.setupTraceLogger === "function" && -+ typeof oomTest === 'function') -+{ -+ du.setupTraceLogger({ -+ Scripts: true -+ }) -+ oomTest(() => function(){}); -+} -diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp -index 93e2fda..09049d6 100644 ---- a/js/src/jit/Ion.cpp -+++ b/js/src/jit/Ion.cpp -@@ -1055,6 +1055,8 @@ IonScript::Destroy(FreeOp* fop, IonScript* script) - - script->destroyCaches(); - script->unlinkFromRuntime(fop); -+ // Frees the potential event we have set. -+ script->traceLoggerScriptEvent_ = TraceLoggerEvent(); - fop->free_(script); - } - -diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp -index 26262fd..af7f313 100644 ---- a/js/src/vm/Debugger.cpp -+++ b/js/src/vm/Debugger.cpp -@@ -369,10 +369,10 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg) - objects(cx), - environments(cx), - #ifdef NIGHTLY_BUILD -- traceLoggerLastDrainedId(0), -+ traceLoggerLastDrainedSize(0), - traceLoggerLastDrainedIteration(0), - #endif -- traceLoggerScriptedCallsLastDrainedId(0), -+ traceLoggerScriptedCallsLastDrainedSize(0), - traceLoggerScriptedCallsLastDrainedIteration(0) - { - assertSameCompartment(cx, dbg); -@@ -3907,9 +3907,9 @@ Debugger::drainTraceLogger(JSContext* cx, unsigned argc, Value* vp) - size_t num; - TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime()); - bool lostEvents = logger->lostEvents(dbg->traceLoggerLastDrainedIteration, -- dbg->traceLoggerLastDrainedId); -+ dbg->traceLoggerLastDrainedSize); - EventEntry* events = logger->getEventsStartingAt(&dbg->traceLoggerLastDrainedIteration, -- &dbg->traceLoggerLastDrainedId, -+ &dbg->traceLoggerLastDrainedSize, - &num); - - RootedObject array(cx, NewDenseEmptyArray(cx)); -@@ -4002,10 +4002,10 @@ Debugger::drainTraceLoggerScriptCalls(JSContext* cx, unsigned argc, Value* vp) - size_t num; - TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime()); - bool lostEvents = logger->lostEvents(dbg->traceLoggerScriptedCallsLastDrainedIteration, -- dbg->traceLoggerScriptedCallsLastDrainedId); -+ dbg->traceLoggerScriptedCallsLastDrainedSize); - EventEntry* events = logger->getEventsStartingAt( - &dbg->traceLoggerScriptedCallsLastDrainedIteration, -- &dbg->traceLoggerScriptedCallsLastDrainedId, -+ &dbg->traceLoggerScriptedCallsLastDrainedSize, - &num); - - RootedObject array(cx, NewDenseEmptyArray(cx)); -diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h -index 8cac36a..c92d685 100644 ---- a/js/src/vm/Debugger.h -+++ b/js/src/vm/Debugger.h -@@ -314,10 +314,10 @@ class Debugger : private mozilla::LinkedListElement<Debugger> - * lost events. - */ - #ifdef NIGHTLY_BUILD -- uint32_t traceLoggerLastDrainedId; -+ uint32_t traceLoggerLastDrainedSize; - uint32_t traceLoggerLastDrainedIteration; - #endif -- uint32_t traceLoggerScriptedCallsLastDrainedId; -+ uint32_t traceLoggerScriptedCallsLastDrainedSize; - uint32_t traceLoggerScriptedCallsLastDrainedIteration; - - class FrameRange; -diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp -index 6715b36..9766a6f 100644 ---- a/js/src/vm/TraceLogging.cpp -+++ b/js/src/vm/TraceLogging.cpp -@@ -131,7 +131,7 @@ TraceLoggerThread::init() - { - if (!pointerMap.init()) - return false; -- if (!extraTextId.init()) -+ if (!textIdPayloads.init()) - return false; - if (!events.init()) - return false; -@@ -185,10 +185,10 @@ TraceLoggerThread::~TraceLoggerThread() - graph = nullptr; - } - -- for (TextIdHashMap::Range r = extraTextId.all(); !r.empty(); r.popFront()) -- js_delete(r.front().value()); -- extraTextId.finish(); -- pointerMap.finish(); -+ if (textIdPayloads.initialized()) { -+ for (TextIdHashMap::Range r = textIdPayloads.all(); !r.empty(); r.popFront()) -+ js_delete(r.front().value()); -+ } - } - - bool -@@ -287,7 +287,7 @@ TraceLoggerThread::eventText(uint32_t id) - if (id < TraceLogger_Last) - return TLTextIdString(static_cast<TraceLoggerTextId>(id)); - -- TextIdHashMap::Ptr p = extraTextId.lookup(id); -+ TextIdHashMap::Ptr p = textIdPayloads.lookup(id); - MOZ_ASSERT(p); - - return p->value()->string(); -@@ -341,13 +341,15 @@ TraceLoggerThread::extractScriptDetails(uint32_t textId, const char** filename, - TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId textId) - { -- TextIdHashMap::AddPtr p = extraTextId.lookupForAdd(textId); -- if (p) -+ TextIdHashMap::AddPtr p = textIdPayloads.lookupForAdd(textId); -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() == textId); // Sanity check. - return p->value(); -+ } - - TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, (char*)nullptr); - -- if (!extraTextId.add(p, textId, payload)) -+ if (!textIdPayloads.add(p, textId, payload)) - return nullptr; - - return payload; -@@ -357,8 +359,10 @@ TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(const char* text) - { - PointerHashMap::AddPtr p = pointerMap.lookupForAdd((const void*)text); -- if (p) -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check. - return p->value(); -+ } - - size_t len = strlen(text); - char* str = js_pod_malloc<char>(len + 1); -@@ -369,7 +373,7 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text) - MOZ_ASSERT(ret == len); - MOZ_ASSERT(strlen(str) == len); - -- uint32_t textId = extraTextId.count() + TraceLogger_Last; -+ uint32_t textId = nextTextId; - - TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, str); - if (!payload) { -@@ -377,17 +381,19 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text) - return nullptr; - } - -- if (!extraTextId.putNew(textId, payload)) { -+ if (!textIdPayloads.putNew(textId, payload)) { - js_delete(payload); - return nullptr; - } - -- if (!pointerMap.add(p, text, payload)) -- return nullptr; -- - if (graph.get()) - graph->addTextId(textId, str); - -+ nextTextId++; -+ -+ if (!pointerMap.add(p, text, payload)) -+ return nullptr; -+ - return payload; - } - -@@ -407,9 +413,14 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f - if (!traceLoggerState->isTextIdEnabled(type)) - return getOrCreateEventPayload(type); - -- PointerHashMap::AddPtr p = pointerMap.lookupForAdd(ptr); -- if (p) -- return p->value(); -+ PointerHashMap::AddPtr p; -+ if (ptr) { -+ p = pointerMap.lookupForAdd(ptr); -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check. -+ return p->value(); -+ } -+ } - - // Compute the length of the string to create. - size_t lenFilename = strlen(filename); -@@ -428,24 +439,28 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f - MOZ_ASSERT(ret == len); - MOZ_ASSERT(strlen(str) == len); - -- uint32_t textId = extraTextId.count() + TraceLogger_Last; -+ uint32_t textId = nextTextId; - TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, str); - if (!payload) { - js_free(str); - return nullptr; - } - -- if (!extraTextId.putNew(textId, payload)) { -+ if (!textIdPayloads.putNew(textId, payload)) { - js_delete(payload); - return nullptr; - } - -- if (!pointerMap.add(p, ptr, payload)) -- return nullptr; -- - if (graph.get()) - graph->addTextId(textId, str); - -+ nextTextId++; -+ -+ if (ptr) { -+ if (!pointerMap.add(p, ptr, payload)) -+ return nullptr; -+ } -+ - return payload; - } - -@@ -453,14 +468,14 @@ TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, JSScript* script) - { - return getOrCreateEventPayload(type, script->filename(), script->lineno(), script->column(), -- script); -+ nullptr); - } - - TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, - const JS::ReadOnlyCompileOptions& script) - { -- return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, &script); -+ return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, nullptr); - } - - void -@@ -485,7 +500,7 @@ TraceLoggerThread::startEvent(uint32_t id) - if (!traceLoggerState->isTextIdEnabled(id)) - return; - -- logTimestamp(id); -+ log(id); - } - - void -@@ -510,7 +525,7 @@ TraceLoggerThread::stopEvent(uint32_t id) - if (!traceLoggerState->isTextIdEnabled(id)) - return; - -- logTimestamp(TraceLogger_Stop); -+ log(TraceLogger_Stop); - } - - void -@@ -522,23 +537,57 @@ TraceLoggerThread::logTimestamp(TraceLoggerTextId id) - void - TraceLoggerThread::logTimestamp(uint32_t id) - { -+ MOZ_ASSERT(id > TraceLogger_LastTreeItem && id < TraceLogger_Last); -+ log(id); -+} -+ -+void -+TraceLoggerThread::log(uint32_t id) -+{ - if (enabled == 0) - return; - - MOZ_ASSERT(traceLoggerState); -- if (!events.ensureSpaceBeforeAdd()) { -+ -+ // We request for 3 items to add, since if we don't have enough room -+ // we record the time it took to make more place. To log this information -+ // we need 2 extra free entries. -+ if (!events.hasSpaceForAdd(3)) { - uint64_t start = rdtsc() - traceLoggerState->startupTime; - -- if (graph.get()) -- graph->log(events); -+ if (!events.ensureSpaceBeforeAdd(3)) { -+ if (graph.get()) -+ graph->log(events); -+ -+ iteration_++; -+ events.clear(); -+ -+ // Remove the item in the pointerMap for which the payloads -+ // have no uses anymore -+ for (PointerHashMap::Enum e(pointerMap); !e.empty(); e.popFront()) { -+ if (e.front().value()->uses() != 0) -+ continue; -+ -+ TextIdHashMap::Ptr p = textIdPayloads.lookup(e.front().value()->textId()); -+ MOZ_ASSERT(p); -+ textIdPayloads.remove(p); -+ -+ e.removeFront(); -+ } - -- iteration_++; -- events.clear(); -+ // Free all payloads that have no uses anymore. -+ for (TextIdHashMap::Enum e(textIdPayloads); !e.empty(); e.popFront()) { -+ if (e.front().value()->uses() == 0) { -+ js_delete(e.front().value()); -+ e.removeFront(); -+ } -+ } -+ } - - // Log the time it took to flush the events as being from the - // Tracelogger. - if (graph.get()) { -- MOZ_ASSERT(events.capacity() > 2); -+ MOZ_ASSERT(events.hasSpaceForAdd(2)); - EventEntry& entryStart = events.pushUninitialized(); - entryStart.time = start; - entryStart.textId = TraceLogger_Internal; -@@ -548,13 +597,6 @@ TraceLoggerThread::logTimestamp(uint32_t id) - entryStop.textId = TraceLogger_Stop; - } - -- // Free all TextEvents that have no uses anymore. -- for (TextIdHashMap::Enum e(extraTextId); !e.empty(); e.popFront()) { -- if (e.front().value()->uses() == 0) { -- js_delete(e.front().value()); -- e.removeFront(); -- } -- } - } - - uint64_t time = rdtsc() - traceLoggerState->startupTime; -@@ -956,3 +998,16 @@ TraceLoggerEvent::~TraceLoggerEvent() - if (payload_) - payload_->release(); - } -+ -+TraceLoggerEvent& -+TraceLoggerEvent::operator=(const TraceLoggerEvent& other) -+{ -+ if (hasPayload()) -+ payload()->release(); -+ if (other.hasPayload()) -+ other.payload()->use(); -+ -+ payload_ = other.payload_; -+ -+ return *this; -+} -diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h -index a124dcb..91a1eb0 100644 ---- a/js/src/vm/TraceLogging.h -+++ b/js/src/vm/TraceLogging.h -@@ -110,6 +110,9 @@ class TraceLoggerEvent { - bool hasPayload() const { - return !!payload_; - } -+ -+ TraceLoggerEvent& operator=(const TraceLoggerEvent& other); -+ TraceLoggerEvent(const TraceLoggerEvent& event) = delete; - }; - - /** -@@ -130,6 +133,10 @@ class TraceLoggerEventPayload { - uses_(0) - { } - -+ ~TraceLoggerEventPayload() { -+ MOZ_ASSERT(uses_ == 0); -+ } -+ - uint32_t textId() { - return textId_; - } -@@ -166,7 +173,8 @@ class TraceLoggerThread - mozilla::UniquePtr<TraceLoggerGraph> graph; - - PointerHashMap pointerMap; -- TextIdHashMap extraTextId; -+ TextIdHashMap textIdPayloads; -+ uint32_t nextTextId; - - ContinuousSpace<EventEntry> events; - -@@ -181,6 +189,7 @@ class TraceLoggerThread - : enabled(0), - failed(false), - graph(), -+ nextTextId(TraceLogger_Last), - iteration_(0), - top(nullptr) - { } -@@ -195,22 +204,22 @@ class TraceLoggerThread - bool enable(JSContext* cx); - bool disable(); - -- // Given the previous iteration and lastEntryId, return an array of events -+ // Given the previous iteration and size, return an array of events - // (there could be lost events). At the same time update the iteration and -- // lastEntry and gives back how many events there are. -- EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastEntryId, size_t* num) { -+ // size and gives back how many events there are. -+ EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastSize, size_t* num) { - EventEntry* start; - if (iteration_ == *lastIteration) { -- MOZ_ASSERT(events.lastEntryId() >= *lastEntryId); -- *num = events.lastEntryId() - *lastEntryId; -- start = events.data() + *lastEntryId + 1; -+ MOZ_ASSERT(*lastSize <= events.size()); -+ *num = events.size() - *lastSize; -+ start = events.data() + *lastSize; - } else { -- *num = events.lastEntryId() + 1; -+ *num = events.size(); - start = events.data(); - } - - *lastIteration = iteration_; -- *lastEntryId = events.lastEntryId(); -+ *lastSize = events.size(); - return start; - } - -@@ -220,16 +229,16 @@ class TraceLoggerThread - const char** lineno, size_t* lineno_len, const char** colno, - size_t* colno_len); - -- bool lostEvents(uint32_t lastIteration, uint32_t lastEntryId) { -+ bool lostEvents(uint32_t lastIteration, uint32_t lastSize) { - // If still logging in the same iteration, there are no lost events. - if (lastIteration == iteration_) { -- MOZ_ASSERT(lastEntryId <= events.lastEntryId()); -+ MOZ_ASSERT(lastSize <= events.size()); - return false; - } - -- // When proceeded to the next iteration and lastEntryId points to -- // the maximum capacity there are no logs that are lost. -- if (lastIteration + 1 == iteration_ && lastEntryId == events.capacity()) -+ // If we are in a consecutive iteration we are only sure we didn't lose any events, -+ // when the lastSize equals the maximum size 'events' can get. -+ if (lastIteration == iteration_ - 1 && lastSize == events.maxSize()) - return false; - - return true; -@@ -268,6 +277,7 @@ class TraceLoggerThread - void stopEvent(uint32_t id); - private: - void stopEvent(); -+ void log(uint32_t id); - - public: - static unsigned offsetOfEnabled() { -diff --git a/js/src/vm/TraceLoggingGraph.cpp b/js/src/vm/TraceLoggingGraph.cpp -index d1b7f2e..a4eb273 100644 ---- a/js/src/vm/TraceLoggingGraph.cpp -+++ b/js/src/vm/TraceLoggingGraph.cpp -@@ -276,7 +276,7 @@ TraceLoggerGraph::flush() - if (bytesWritten < tree.size()) - return false; - -- treeOffset += tree.lastEntryId(); -+ treeOffset += tree.size(); - tree.clear(); - } - -@@ -359,7 +359,7 @@ TraceLoggerGraph::startEventInternal(uint32_t id, uint64_t timestamp) - - if (parent.lastChildId() == 0) { - MOZ_ASSERT(!entry.hasChildren()); -- MOZ_ASSERT(parent.treeId() == tree.lastEntryId() + treeOffset); -+ MOZ_ASSERT(parent.treeId() == treeOffset + tree.size() - 1); - - if (!updateHasChildren(parent.treeId())) - return false; -diff --git a/js/src/vm/TraceLoggingTypes.h b/js/src/vm/TraceLoggingTypes.h -index f1c9d0c..10b76d6 100644 ---- a/js/src/vm/TraceLoggingTypes.h -+++ b/js/src/vm/TraceLoggingTypes.h -@@ -21,7 +21,6 @@ - _(Internal) \ - _(Interpreter) \ - _(InlinedScripts) \ -- _(Invalidation) \ - _(IonCompilation) \ - _(IonCompilationPaused) \ - _(IonLinking) \ -@@ -60,6 +59,7 @@ - - #define TRACELOGGER_LOG_ITEMS(_) \ - _(Bailout) \ -+ _(Invalidation) \ - _(Disable) \ - _(Enable) \ - _(Stop) -@@ -130,6 +130,9 @@ class ContinuousSpace { - uint32_t size_; - uint32_t capacity_; - -+ // The maximum amount of ram memory a continuous space structure can take (in bytes). -+ static const uint32_t LIMIT = 200 * 1024 * 1024; -+ - public: - ContinuousSpace () - : data_(nullptr) -@@ -151,6 +154,10 @@ class ContinuousSpace { - data_ = nullptr; - } - -+ static uint32_t maxSize() { -+ return LIMIT / sizeof(T); -+ } -+ - T* data() { - return data_; - } -@@ -187,11 +194,14 @@ class ContinuousSpace { - if (hasSpaceForAdd(count)) - return true; - -+ // Limit the size of a continuous buffer. -+ if (size_ + count > maxSize()) -+ return false; -+ - uint32_t nCapacity = capacity_ * 2; -- if (size_ + count > nCapacity) -- nCapacity = size_ + count; -- T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T)); -+ nCapacity = (nCapacity < maxSize()) ? nCapacity : maxSize(); - -+ T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T)); - if (!entries) - return false; - diff --git a/gnu/packages/patches/mozjs38-version-detection.patch b/gnu/packages/patches/mozjs38-version-detection.patch deleted file mode 100644 index ec2d264ccc..0000000000 --- a/gnu/packages/patches/mozjs38-version-detection.patch +++ /dev/null @@ -1,180 +0,0 @@ -Taken from -https://trac.wildfiregames.com/export/18656/ps/trunk/libraries/source/spidermonkey/FixVersionDetectionConfigure.diff. - -Fixes a version detection issue in 0ad. See -https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00625.html. - -diff --git a/js/src/configure b/js/src/configure ---- a/js/src/configure -+++ b/js/src/configure -@@ -1662,70 +1662,6 @@ esac - - fi - --MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` --MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` --MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` -- --cat >> confdefs.pytmp <<EOF -- (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''') --EOF --cat >> confdefs.h <<EOF --#define MOZILLA_VERSION "$MOZILLA_VERSION" --EOF -- --cat >> confdefs.pytmp <<EOF -- (''' MOZILLA_VERSION_U ''', r''' $MOZILLA_VERSION ''') --EOF --cat >> confdefs.h <<EOF --#define MOZILLA_VERSION_U $MOZILLA_VERSION --EOF -- --cat >> confdefs.pytmp <<EOF -- (''' MOZILLA_UAVERSION ''', r''' "$MOZILLA_UAVERSION" ''') --EOF --cat >> confdefs.h <<EOF --#define MOZILLA_UAVERSION "$MOZILLA_UAVERSION" --EOF -- -- -- --# Separate version into components for use in shared object naming etc -- --MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"` --MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"` --MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` --IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` -- --JS_SHELL_NAME=js --JS_CONFIG_NAME=js-config -- -- --if test -n "$IS_ALPHA"; then -- -- MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"` -- --fi --cat >> confdefs.pytmp <<EOF -- (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') --EOF --cat >> confdefs.h <<EOF --#define MOZJS_MAJOR_VERSION $MOZJS_MAJOR_VERSION --EOF -- --cat >> confdefs.pytmp <<EOF -- (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') --EOF --cat >> confdefs.h <<EOF --#define MOZJS_MINOR_VERSION $MOZJS_MINOR_VERSION --EOF -- -- -- -- -- -- -- -- - - AR_FLAGS='crs $@' - -@@ -5731,6 +5565,71 @@ XCFLAGS="$X_CFLAGS" - - fi # COMPILE_ENVIRONMENT - -+MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` -+MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` -+MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` -+ -+cat >> confdefs.pytmp <<EOF -+ (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''') -+EOF -+cat >> confdefs.h <<EOF -+#define MOZILLA_VERSION "$MOZILLA_VERSION" -+EOF -+ -+cat >> confdefs.pytmp <<EOF -+ (''' MOZILLA_VERSION_U ''', r''' $MOZILLA_VERSION ''') -+EOF -+cat >> confdefs.h <<EOF -+#define MOZILLA_VERSION_U $MOZILLA_VERSION -+EOF -+ -+cat >> confdefs.pytmp <<EOF -+ (''' MOZILLA_UAVERSION ''', r''' "$MOZILLA_UAVERSION" ''') -+EOF -+cat >> confdefs.h <<EOF -+#define MOZILLA_UAVERSION "$MOZILLA_UAVERSION" -+EOF -+ -+ -+ -+# Separate version into components for use in shared object naming etc -+ -+MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"` -+MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"` -+MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` -+IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` -+ -+JS_SHELL_NAME=js -+JS_CONFIG_NAME=js-config -+ -+ -+if test -n "$IS_ALPHA"; then -+ -+ MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"` -+ -+fi -+cat >> confdefs.pytmp <<EOF -+ (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') -+EOF -+cat >> confdefs.h <<EOF -+#define MOZJS_MAJOR_VERSION $MOZJS_MAJOR_VERSION -+EOF -+ -+cat >> confdefs.pytmp <<EOF -+ (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') -+EOF -+cat >> confdefs.h <<EOF -+#define MOZJS_MINOR_VERSION $MOZJS_MINOR_VERSION -+EOF -+ -+ -+ -+ -+ -+ -+ -+ -+ - AS_BIN=$AS - AR_LIST='$(AR) t' - AR_EXTRACT='$(AR) x' -@@ -16003,13 +15908,6 @@ sed 's/$/,/' >> $CONFIG_STATUS <<EOF - (''' ANDROID_NDK ''', r''' $ANDROID_NDK ''') - (''' ANDROID_TOOLCHAIN ''', r''' $ANDROID_TOOLCHAIN ''') - (''' ANDROID_PLATFORM ''', r''' $ANDROID_PLATFORM ''') -- (''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''') -- (''' JS_SHELL_NAME ''', r''' $JS_SHELL_NAME ''') -- (''' JS_CONFIG_NAME ''', r''' $JS_CONFIG_NAME ''') -- (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') -- (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') -- (''' MOZJS_PATCH_VERSION ''', r''' $MOZJS_PATCH_VERSION ''') -- (''' MOZJS_ALPHA ''', r''' $MOZJS_ALPHA ''') - (''' HOST_CC ''', r''' $HOST_CC ''') - (''' HOST_CXX ''', r''' $HOST_CXX ''') - (''' HOST_RANLIB ''', r''' $HOST_RANLIB ''') -@@ -16061,6 +15959,13 @@ sed 's/$/,/' >> $CONFIG_STATUS <<EOF - (''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''') - (''' X_LIBS ''', r''' $X_LIBS ''') - (''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''') -+ (''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''') -+ (''' JS_SHELL_NAME ''', r''' $JS_SHELL_NAME ''') -+ (''' JS_CONFIG_NAME ''', r''' $JS_CONFIG_NAME ''') -+ (''' MOZJS_MAJOR_VERSION ''', r''' $MOZJS_MAJOR_VERSION ''') -+ (''' MOZJS_MINOR_VERSION ''', r''' $MOZJS_MINOR_VERSION ''') -+ (''' MOZJS_PATCH_VERSION ''', r''' $MOZJS_PATCH_VERSION ''') -+ (''' MOZJS_ALPHA ''', r''' $MOZJS_ALPHA ''') - (''' SOLARIS_SUNPRO_CC ''', r''' $SOLARIS_SUNPRO_CC ''') - (''' SOLARIS_SUNPRO_CXX ''', r''' $SOLARIS_SUNPRO_CXX ''') - (''' MOZ_THUMB2 ''', r''' $MOZ_THUMB2 ''') diff --git a/gnu/packages/patches/mozjs60-riscv64-support.patch b/gnu/packages/patches/mozjs60-riscv64-support.patch deleted file mode 100644 index c9fa2ba9b3..0000000000 --- a/gnu/packages/patches/mozjs60-riscv64-support.patch +++ /dev/null @@ -1,122 +0,0 @@ -This is a combination of several upstream patches which weren't accepted. -They were proposed by Fedora for spidermonkey 52 and were ultimately -accepted years later after some changes for a later version. It was -adapted slightly from both sets of patches to apply cleanly to mozjs-60. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1318905 -https://bug1318905.bmoattachments.org/attachment.cgi?id=8812602 -https://bug1318905.bmoattachments.org/attachment.cgi?id=8812603 -https://bug1318905.bmoattachments.org/attachment.cgi?id=8812604 -https://phabricator.services.mozilla.com/D78623 -https://phabricator.services.mozilla.com/D78624 -https://phabricator.services.mozilla.com/D78625 - - -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 83b8d705..59131525 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -676,6 +676,9 @@ def split_triplet(triplet, allow_unknown=False): - elif cpu == 'sh4': - canonical_cpu = 'sh4' - endianness = 'little' -+ elif cpu.startswith('riscv64'): -+ canonical_cpu = 'riscv64' -+ endianness = 'little' - elif allow_unknown: - canonical_cpu = cpu - endianness = 'unknown' -diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h -index a8970b0d..6b947a3f 100644 ---- a/js/src/jit/AtomicOperations.h -+++ b/js/src/jit/AtomicOperations.h -@@ -375,7 +375,7 @@ AtomicOperations::isLockfreeJS(int32_t size) - # endif - #elif defined(__ppc__) || defined(__PPC__) - # include "jit/none/AtomicOperations-feeling-lucky.h" --#elif defined(__sparc__) -+#elif defined(__sparc__) || defined(__riscv) - # include "jit/none/AtomicOperations-feeling-lucky.h" - #elif defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__) - # include "jit/none/AtomicOperations-feeling-lucky.h" -diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h -index da572284..6ce40c89 100644 ---- a/js/src/jit/none/AtomicOperations-feeling-lucky.h -+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h -@@ -49,6 +49,12 @@ - # define GNUC_COMPATIBLE - #endif - -+#if defined(__riscv) && __riscv_xlen == 64 -+# define HAS_64BIT_ATOMICS -+# define HAS_64BIT_LOCKFREE -+# define GNUC_COMPATIBLE -+#endif -+ - #ifdef __sparc__ - # define GNUC_COMPATIBLE - # ifdef __LP64__ -diff --git a/js/src/jit/none/MacroAssembler-none.h b/js/src/jit/none/MacroAssembler-none.h -index 80143dc8..b430fedb 100644 ---- a/js/src/jit/none/MacroAssembler-none.h -+++ b/js/src/jit/none/MacroAssembler-none.h -@@ -402,6 +402,10 @@ class MacroAssemblerNone : public Assembler - #endif - }; - -+ struct AutoPrepareForPatching { -+ explicit AutoPrepareForPatching(MacroAssemblerNone&) {} -+ }; -+ - typedef MacroAssemblerNone MacroAssemblerSpecific; - - class ABIArgGenerator -diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp -index 06c24ed0..c3fed0df 100644 ---- a/mfbt/tests/TestPoisonArea.cpp -+++ b/mfbt/tests/TestPoisonArea.cpp -@@ -160,6 +160,9 @@ - #elif defined __aarch64__ - #define RETURN_INSTR 0xd65f03c0 /* ret */ - -+#elif defined __riscv -+#define RETURN_INSTR 0x80828082 /* ret; ret */ -+ - #elif defined __ia64 - struct ia64_instr { uint32_t mI[4]; }; - static const ia64_instr _return_instr = -diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py -index 33ae5a45..11a01d3b 100644 ---- a/python/mozbuild/mozbuild/configure/constants.py -+++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -50,6 +50,7 @@ CPU_bitness = { - 'mips64': 64, - 'ppc': 32, - 'ppc64': 64, -+ 'riscv64': 64, - 's390': 32, - 's390x': 64, - 'sh4': 32, -@@ -82,6 +84,7 @@ CPU_preprocessor_checks = OrderedDict(( - ('s390', '__s390__'), - ('ppc64', '__powerpc64__'), - ('ppc', '__powerpc__'), -+ ('riscv64', '__riscv && __riscv_xlen == 64'), - ('Alpha', '__alpha__'), - ('hppa', '__hppa__'), - ('sparc64', '__sparc__ && __arch64__'), -diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -index cb7ff709..9da41adf 100755 ---- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -@@ -1165,6 +1165,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest): - 'sh4-unknown-linux-gnu': little_endian + { - '__sh__': 1, - }, -+ 'riscv64-unknown-linux-gnu': little_endian + { -+ '__riscv': 1, -+ '__riscv_xlen': 64, -+ }, - } - - PLATFORMS['powerpc64le-unknown-linux-gnu'] = \ diff --git a/gnu/packages/patches/ncftp-reproducible.patch b/gnu/packages/patches/ncftp-reproducible.patch new file mode 100644 index 0000000000..043b3b1e70 --- /dev/null +++ b/gnu/packages/patches/ncftp-reproducible.patch @@ -0,0 +1,29 @@ +Author: Reiner Herrmann <reiner@reiner-h.de> +Date: 2016-07-01 16:00:02 UTC +Bug-Debian: https://bugs.debian.org/829249 + + make ncftp build reproducible. + +diff --git a/ncftp/main.c b/ncftp/main.c +index a7fccac..b27a94e 100644 +--- a/ncftp/main.c ++++ b/ncftp/main.c +@@ -62,7 +62,7 @@ static void + Usage(void) + { + FILE *fp; +-#ifdef UNAME ++#if 0 + char s[80]; + #endif + +@@ -76,7 +76,7 @@ Usage(void) + -F Dump a sample $HOME/.ncftp/firewall prefs file to stdout and exit.\n"); + + (void) fprintf(fp, "\nProgram version: %s\nLibrary version: %s\n", gVersion + 5, gLibNcFTPVersion + 5); +-#ifdef UNAME ++#if 0 + AbbrevStr(s, UNAME, 60, 1); + (void) fprintf(fp, "Build system: %s\n", s); + #endif +
diff --git a/gnu/packages/patches/nftables-fix-makefile.patch b/gnu/packages/patches/nftables-fix-makefile.patch new file mode 100644 index 0000000000..1660635874 --- /dev/null +++ b/gnu/packages/patches/nftables-fix-makefile.patch @@ -0,0 +1,34 @@ +From 18a08fb7f0443f8bde83393bd6f69e23a04246b3 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso <pablo@netfilter.org> +Date: Tue, 22 Feb 2022 00:56:36 +0100 +Subject: examples: compile with `make check' and add AM_CPPFLAGS + +Compile examples via `make check' like libnftnl does. Use AM_CPPFLAGS to +specify local headers via -I. + +Unfortunately, `make distcheck' did not catch this compile time error in +my system, since it was using the nftables/libnftables.h file of the +previous nftables release. + +Fixes: 5b364657a35f ("build: missing SUBIRS update") +Fixes: caf2a6ad2d22 ("examples: add libnftables example program") +Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> +--- + examples/Makefile.am | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index c972170d..3b8b0b67 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,4 +1,6 @@ +-noinst_PROGRAMS = nft-buffer \ ++check_PROGRAMS = nft-buffer \ + nft-json-file + ++AM_CPPFLAGS = -I$(top_srcdir)/include ++ + LDADD = $(top_builddir)/src/libnftables.la +-- +cgit v1.2.3 + diff --git a/gnu/packages/patches/openbox-python3.patch b/gnu/packages/patches/openbox-python3.patch new file mode 100644 index 0000000000..782524d8a7 --- /dev/null +++ b/gnu/packages/patches/openbox-python3.patch @@ -0,0 +1,165 @@ +Retrieved from the openbox Debian package. + +From acfbbc4ea40932f183617bb7006700140fe5f61e Mon Sep 17 00:00:00 2001 +From: Troy Curtis Jr <troycurtisjr@gmail.com> +Date: Wed, 13 Sep 2017 21:59:48 -0500 +Subject: [PATCH] Add python3 support to openbox-xdg-autostart. + +Updated syntax in openbox-xdg-autostart to support both python2 and +python3. + +Added a configure substitution to set the chosen python at build time. + +https://bugzilla.icculus.org/show_bug.cgi?id=6444 +--- + .gitignore | 1 + + configure.ac | 3 + + ...xdg-autostart => openbox-xdg-autostart.in} | 70 +++++++++---------- + 3 files changed, 38 insertions(+), 36 deletions(-) + rename data/autostart/{openbox-xdg-autostart => openbox-xdg-autostart.in} (77%) + +diff --git a/configure.ac b/configure.ac +index ca1602670..9a31e9845 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,6 +103,8 @@ AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h) + AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h) + AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h) + ++AM_PATH_PYTHON([2],,) ++ + AC_PATH_PROG([SED], [sed], [no]) + if test "$SED" = "no"; then + AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.]) +@@ -259,6 +261,7 @@ AC_CONFIG_FILES([ + obrender/version.h + obt/version.h + version.h ++ data/autostart/openbox-xdg-autostart + ]) + AC_CONFIG_COMMANDS([doc], + [test -d doc || mkdir doc]) +diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart.in +similarity index 77% +rename from data/autostart/openbox-xdg-autostart +rename to data/autostart/openbox-xdg-autostart.in +index 04a17a199..3c365b112 100755 +--- a/data/autostart/openbox-xdg-autostart ++++ b/data/autostart/openbox-xdg-autostart.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!@PYTHON@ + + # openbox-xdg-autostart runs things based on the XDG autostart specification + # Copyright (C) 2008 Dana Jansens +@@ -28,9 +28,7 @@ try: + from xdg.DesktopEntry import DesktopEntry + from xdg.Exceptions import ParsingError + except ImportError: +- print +- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" +- print ++ sys.stderr.write("\nERROR: %s requires PyXDG to be installed\n" % ME) + sys.exit(1) + + def main(argv=sys.argv): +@@ -51,7 +49,7 @@ def main(argv=sys.argv): + try: + autofile = AutostartFile(path) + except ParsingError: +- print "Invalid .desktop file: " + path ++ print("Invalid .desktop file: " + path) + else: + if not autofile in files: + files.append(autofile) +@@ -99,9 +97,9 @@ class AutostartFile: + + def _alert(self, str, info=False): + if info: +- print "\t ", str ++ print("\t ", str) + else: +- print "\t*", str ++ print("\t*", str) + + def _showInEnvironment(self, envs, verbose=False): + default = not self.de.getOnlyShowIn() +@@ -146,14 +144,14 @@ class AutostartFile: + + def display(self, envs): + if self._shouldRun(envs): +- print "[*] " + self.de.getName() ++ print("[*] " + self.de.getName()) + else: +- print "[ ] " + self.de.getName() ++ print("[ ] " + self.de.getName()) + self._alert("File: " + self.path, info=True) + if self.de.getExec(): + self._alert("Executes: " + self.de.getExec(), info=True) + self._shouldRun(envs, True) +- print ++ print() + + def run(self, envs): + here = os.getcwd() +@@ -165,34 +163,34 @@ class AutostartFile: + os.chdir(here) + + def show_help(): +- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..." +- print +- print "This tool will run xdg autostart .desktop files" +- print +- print "OPTIONS" +- print " --list Show a list of the files which would be run" +- print " Files which would be run are marked with an asterix" +- print " symbol [*]. For files which would not be run," +- print " information is given for why they are excluded" +- print " --help Show this help and exit" +- print " --version Show version and copyright information" +- print +- print "ENVIRONMENT specifies a list of environments for which to run autostart" +- print "applications. If none are specified, only applications which do not " +- print "limit themselves to certain environments will be run." +- print +- print "ENVIRONMENT can be one or more of:" +- print " GNOME Gnome Desktop" +- print " KDE KDE Desktop" +- print " ROX ROX Desktop" +- print " XFCE XFCE Desktop" +- print " Old Legacy systems" +- print ++ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...") ++ print() ++ print("This tool will run xdg autostart .desktop files") ++ print() ++ print("OPTIONS") ++ print(" --list Show a list of the files which would be run") ++ print(" Files which would be run are marked with an asterix") ++ print(" symbol [*]. For files which would not be run,") ++ print(" information is given for why they are excluded") ++ print(" --help Show this help and exit") ++ print(" --version Show version and copyright information") ++ print() ++ print("ENVIRONMENT specifies a list of environments for which to run autostart") ++ print("applications. If none are specified, only applications which do not ") ++ print("limit themselves to certain environments will be run.") ++ print() ++ print("ENVIRONMENT can be one or more of:") ++ print(" GNOME Gnome Desktop") ++ print(" KDE KDE Desktop") ++ print(" ROX ROX Desktop") ++ print(" XFCE XFCE Desktop") ++ print(" Old Legacy systems") ++ print() + + def show_version(): +- print ME, VERSION +- print "Copyright (c) 2008 Dana Jansens" +- print ++ print(ME, VERSION) ++ print("Copyright (c) 2008 Dana Jansens") ++ print() + + if __name__ == "__main__": + sys.exit(main()) diff --git a/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch b/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch new file mode 100644 index 0000000000..9325dd3da6 --- /dev/null +++ b/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch @@ -0,0 +1,72 @@ +From: Danny Milosavljevic <dannym@scratchpost.org> +Date: Thu, 31 Mar 2022 17:02:00 +0200 +Subject: Make openjdk use libxcursor directly + +Fixes <https://issues.guix.gnu.org/54654>. + +This patch makes openjdk use libxcursor directly. +Without it, libx11 would try to dlopen("libXcursor.so.1") and fail. + +diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk +--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 2022-03-31 15:34:08.773419480 +0200 ++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 2022-03-31 21:36:27.854273411 +0200 +@@ -217,7 +217,7 @@ + endif + endif + +- LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm ++ LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXcursor -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm + + ifeq ($(call isTargetOs, linux), true) + LIBAWT_XAWT_LIBS += -lpthread +diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c +--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2022-03-31 15:34:11.917502206 +0200 ++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2022-03-31 21:38:16.417253535 +0200 +@@ -40,10 +40,12 @@ + #include <X11/keysym.h> + #include <X11/Sunkeysym.h> + #include <X11/Xlib.h> ++#include <X11/Xlibint.h> + #include <X11/Xatom.h> + #include <X11/XKBlib.h> + #include <X11/Xos.h> + #include <X11/Xutil.h> ++#include <X11/Xcursor/Xcursor.h> + + #if defined(AIX) + #undef X_HAVE_UTF8_STRING +@@ -972,10 +974,21 @@ + + } + ++static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */ ++static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */ ++ + JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XCreateFontCursor + (JNIEnv *env, jclass clazz, jlong display, jint shape) { + AWT_CHECK_HAVE_LOCK_RETURN(0); +- return XCreateFontCursor((Display *) jlong_to_ptr(display), (int) shape); ++ Display * dpy = (Display *) jlong_to_ptr(display); ++ if (dpy->cursor_font == None) { ++ dpy->cursor_font = XLoadFont(dpy, "cursor"); ++ if (dpy->cursor_font == None) return None; ++ } ++ Cursor result = XcursorTryShapeCursor(dpy, dpy->cursor_font, dpy->cursor_font, (int) shape, (int) shape + 1, &foreground, &background); ++ if (!result) ++ result = XCreateFontCursor(dpy, (int) shape); ++ return result; + } + + /* +diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix +--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 2022-03-31 15:34:10.553466316 +0200 ++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 2022-03-31 21:36:27.854273411 +0200 +@@ -31,7 +31,7 @@ + + J_INC = $(TESTJAVA)/include + INCLUDES = -I$(J_INC) -I$(J_INC)/$(SYST) -I. +-LIBS = -L$(TESTJAVA)/lib -ljawt -lX11 ++LIBS = -L$(TESTJAVA)/lib -ljawt -lX11 -lXcursor + + all: $(CLASSES) libmylib.so + diff --git a/gnu/packages/patches/openssh-trust-guix-store-directory.patch b/gnu/packages/patches/openssh-trust-guix-store-directory.patch new file mode 100644 index 0000000000..b3a9c1bdfc --- /dev/null +++ b/gnu/packages/patches/openssh-trust-guix-store-directory.patch @@ -0,0 +1,40 @@ +From 0d85bbd42ddcd442864a9ba4719aca8b70d68048 Mon Sep 17 00:00:00 2001 +From: Alexey Abramov <levenson@mmer.org> +Date: Fri, 22 Apr 2022 11:32:15 +0200 +Subject: [PATCH] Trust guix store directory + +To be able to execute binaries defined in OpenSSH configuration, we +need to tell OpenSSH that we can trust Guix store objects. safe_path +procedure takes a canonical path and for each component, walking +upwards, checks ownership and permissions constrains which are: must +be owned by root, not writable by group or others. +--- + misc.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/misc.c b/misc.c +index 0134d69..7131d5e 100644 +--- a/misc.c ++++ b/misc.c +@@ -2146,6 +2146,7 @@ int + safe_path(const char *name, struct stat *stp, const char *pw_dir, + uid_t uid, char *err, size_t errlen) + { ++ static const char guix_store[] = @STORE_DIRECTORY@; + char buf[PATH_MAX], homedir[PATH_MAX]; + char *cp; + int comparehome = 0; +@@ -2178,6 +2179,10 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir, + } + strlcpy(buf, cp, sizeof(buf)); + ++ /* If we are past the Guix store then we can stop */ ++ if (strcmp(guix_store, buf) == 0) ++ break; ++ + if (stat(buf, &st) == -1 || + (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) || + (st.st_mode & 022) != 0) { +-- +2.34.0 + diff --git a/gnu/packages/patches/pigx-bsseq-no-citeproc.patch b/gnu/packages/patches/pigx-bsseq-no-citeproc.patch deleted file mode 100644 index 882e660fe4..0000000000 --- a/gnu/packages/patches/pigx-bsseq-no-citeproc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur pigx_bsseq-0.1.5/configure.ac pigx_bsseq-0.1.5.patched/configure.ac ---- pigx_bsseq-0.1.5/configure.ac 2021-06-08 15:28:08.000000000 +0200 -+++ pigx_bsseq-0.1.5.patched/configure.ac 2021-10-05 14:43:56.806529137 +0200 -@@ -38,7 +38,6 @@ - find_or_override_prog([GNUBASH], [bash]) - find_or_override_prog([SNAKEMAKE], [snakemake]) - find_or_override_prog([PANDOC], [pandoc]) --find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc]) - find_or_override_prog([FASTQC], [fastqc]) - find_or_override_prog([MULTIQC], [multiqc]) - find_or_override_prog([TRIMGALORE], [trim_galore]) -diff -Naur pigx_bsseq-0.1.5/Makefile.in pigx_bsseq-0.1.5.patched/Makefile.in ---- pigx_bsseq-0.1.5/Makefile.in 2021-06-08 16:17:03.000000000 +0200 -+++ pigx_bsseq-0.1.5.patched/Makefile.in 2021-10-05 14:43:34.635876855 +0200 -@@ -408,7 +408,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PANDOC = @PANDOC@ --PANDOC_CITEPROC = @PANDOC_CITEPROC@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PYTHON = @PYTHON@ - PYTHONPATH = @PYTHONPATH@ -diff -Naur pigx_bsseq-0.1.5/pigx-common/common/pigx-runner.in pigx_bsseq-0.1.5.patched/pigx-common/common/pigx-runner.in ---- pigx_bsseq-0.1.5/pigx-common/common/pigx-runner.in 2021-06-08 10:14:29.000000000 +0200 -+++ pigx_bsseq-0.1.5.patched/pigx-common/common/pigx-runner.in 2021-10-05 14:43:44.296161069 +0200 -@@ -375,7 +375,6 @@ - if path.exists(bin): shutil.rmtree(bin) - os.makedirs(bin, exist_ok=True) - os.symlink('@PANDOC@', path.join(bin, "pandoc")) -- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc")) - os.symlink('@RSCRIPT@', path.join(bin, "Rscript")) - os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] - os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] diff --git a/gnu/packages/patches/pigx-chipseq-no-citeproc.patch b/gnu/packages/patches/pigx-chipseq-no-citeproc.patch deleted file mode 100644 index b01820f110..0000000000 --- a/gnu/packages/patches/pigx-chipseq-no-citeproc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur pigx_chipseq-0.0.53/configure.ac pigx_chipseq-0.0.53.patched/configure.ac ---- pigx_chipseq-0.0.53/configure.ac 2021-09-28 11:14:12.000000000 +0200 -+++ pigx_chipseq-0.0.53.patched/configure.ac 2021-10-07 14:48:53.034054327 +0200 -@@ -52,7 +52,6 @@ - find_or_override_prog([MACS2], [macs2]) - find_or_override_prog([SNAKEMAKE], [snakemake]) - find_or_override_prog([PANDOC], [pandoc]) --find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc]) - find_or_override_prog([FASTQC], [fastqc]) - find_or_override_prog([BOWTIE2], [bowtie2]) - find_or_override_prog([BOWTIE2_BUILD], [bowtie2-build]) -diff -Naur pigx_chipseq-0.0.53/Makefile.in pigx_chipseq-0.0.53.patched/Makefile.in ---- pigx_chipseq-0.0.53/Makefile.in 2021-09-28 11:55:05.000000000 +0200 -+++ pigx_chipseq-0.0.53.patched/Makefile.in 2021-10-07 14:48:37.195577143 +0200 -@@ -407,7 +407,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PANDOC = @PANDOC@ --PANDOC_CITEPROC = @PANDOC_CITEPROC@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PERL = @PERL@ - PYTHON = @PYTHON@ -diff -Naur pigx_chipseq-0.0.53/pigx-common/common/pigx-runner.in pigx_chipseq-0.0.53.patched/pigx-common/common/pigx-runner.in ---- pigx_chipseq-0.0.53/pigx-common/common/pigx-runner.in 2021-09-27 18:16:42.000000000 +0200 -+++ pigx_chipseq-0.0.53.patched/pigx-common/common/pigx-runner.in 2021-10-07 14:48:44.200788218 +0200 -@@ -379,7 +379,6 @@ - if path.exists(bin): shutil.rmtree(bin) - os.makedirs(bin, exist_ok=True) - os.symlink('@PANDOC@', path.join(bin, "pandoc")) -- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc")) - os.symlink('@RSCRIPT@', path.join(bin, "Rscript")) - os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] - os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] diff --git a/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch deleted file mode 100644 index 366ae3890a..0000000000 --- a/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur pigx_rnaseq-0.0.19/configure.ac pigx_rnaseq-0.0.19.patched/configure.ac ---- pigx_rnaseq-0.0.19/configure.ac 2021-07-23 14:01:00.304391428 +0200 -+++ pigx_rnaseq-0.0.19.patched/configure.ac 2021-10-06 13:51:29.512960106 +0200 -@@ -38,7 +38,6 @@ - find_or_override_prog([GNUBASH], [bash]) - find_or_override_prog([SNAKEMAKE], [snakemake]) - find_or_override_prog([PANDOC], [pandoc]) --find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc]) - find_or_override_prog([STAR], [STAR]) - find_or_override_prog([HISAT2], [hisat2]) - find_or_override_prog([HISAT2_BUILD], [hisat2-build]) -diff -Naur pigx_rnaseq-0.0.19/Makefile.in pigx_rnaseq-0.0.19.patched/Makefile.in ---- pigx_rnaseq-0.0.19/Makefile.in 2021-08-13 13:40:10.402922844 +0200 -+++ pigx_rnaseq-0.0.19.patched/Makefile.in 2021-10-06 13:51:04.052247524 +0200 -@@ -410,7 +410,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PANDOC = @PANDOC@ --PANDOC_CITEPROC = @PANDOC_CITEPROC@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PYTHON = @PYTHON@ - PYTHONPATH = @PYTHONPATH@ -diff -Naur pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in ---- pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in 2021-08-13 13:27:50.494352532 +0200 -+++ pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in 2021-10-06 13:51:38.798220108 +0200 -@@ -379,7 +379,6 @@ - if path.exists(bin): shutil.rmtree(bin) - os.makedirs(bin, exist_ok=True) - os.symlink('@PANDOC@', path.join(bin, "pandoc")) -- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc")) - os.symlink('@RSCRIPT@', path.join(bin, "Rscript")) - os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] - os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] diff --git a/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch b/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch deleted file mode 100644 index 3f34bca6b2..0000000000 --- a/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur pigx_sars-cov2-ww-0.0.3/configure.ac pigx_sars-cov2-ww-0.0.3.patched/configure.ac ---- pigx_sars-cov2-ww-0.0.3/configure.ac 2021-06-10 10:12:00.552889984 +0200 -+++ pigx_sars-cov2-ww-0.0.3.patched/configure.ac 2021-10-05 14:52:32.318695129 +0200 -@@ -50,7 +50,6 @@ - find_or_override_prog([MULTIQC], [multiqc]) - find_or_override_prog([WGET], [wget]) - find_or_override_prog([PANDOC], [pandoc]) --find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc]) - - AC_ARG_ENABLE([r-packages-check], - AS_HELP_STRING([--disable-r-packages-check], [Do not check any R packages.]), -diff -Naur pigx_sars-cov2-ww-0.0.3/Makefile.in pigx_sars-cov2-ww-0.0.3.patched/Makefile.in ---- pigx_sars-cov2-ww-0.0.3/Makefile.in 2021-08-05 16:33:59.164123383 +0200 -+++ pigx_sars-cov2-ww-0.0.3.patched/Makefile.in 2021-10-05 14:52:41.272958547 +0200 -@@ -402,7 +402,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PANDOC = @PANDOC@ --PANDOC_CITEPROC = @PANDOC_CITEPROC@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PRINSEQ = @PRINSEQ@ - PYTHON = @PYTHON@ -diff -Naur pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in ---- pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in 2021-07-30 11:10:17.913115902 +0200 -+++ pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in 2021-10-05 14:52:23.602438714 +0200 -@@ -379,7 +379,6 @@ - if path.exists(bin): shutil.rmtree(bin) - os.makedirs(bin, exist_ok=True) - os.symlink('@PANDOC@', path.join(bin, "pandoc")) -- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc")) - os.symlink('@RSCRIPT@', path.join(bin, "Rscript")) - os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] - os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] diff --git a/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch deleted file mode 100644 index 4cce33fb01..0000000000 --- a/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur pigx_scrnaseq-1.1.7/configure.ac pigx_scrnaseq-1.1.7.patched/configure.ac ---- pigx_scrnaseq-1.1.7/configure.ac 2020-03-17 14:37:46.000000000 +0100 -+++ pigx_scrnaseq-1.1.7.patched/configure.ac 2021-10-06 13:55:49.779271317 +0200 -@@ -43,7 +43,6 @@ - find_or_override_prog([GNUBASH], [bash]) - find_or_override_prog([SNAKEMAKE], [snakemake]) - find_or_override_prog([PANDOC], [pandoc]) --find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc]) - find_or_override_prog([FASTQC], [fastqc]) - find_or_override_prog([STAR], [STAR]) - find_or_override_prog([SAMTOOLS], [samtools]) -diff -Naur pigx_scrnaseq-1.1.7/Makefile.in pigx_scrnaseq-1.1.7.patched/Makefile.in ---- pigx_scrnaseq-1.1.7/Makefile.in 2020-11-30 16:55:48.000000000 +0100 -+++ pigx_scrnaseq-1.1.7.patched/Makefile.in 2021-10-06 13:55:52.224340194 +0200 -@@ -395,7 +395,6 @@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PANDOC = @PANDOC@ --PANDOC_CITEPROC = @PANDOC_CITEPROC@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PERL = @PERL@ - PYTHON = @PYTHON@ -diff -Naur pigx_scrnaseq-1.1.7/pigx-scrnaseq.in pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in ---- pigx_scrnaseq-1.1.7/pigx-scrnaseq.in 2020-11-30 16:08:55.000000000 +0100 -+++ pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in 2021-10-06 13:55:47.889218079 +0200 -@@ -274,7 +274,6 @@ - if path.exists(bin): shutil.rmtree(bin) - os.makedirs(bin, exist_ok=True) - os.symlink('@PANDOC@', path.join(bin, "pandoc")) -- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc")) - os.symlink('@RSCRIPT@', path.join(bin, "Rscript")) - os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] - os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH'] diff --git a/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch b/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch new file mode 100644 index 0000000000..7a6ad54489 --- /dev/null +++ b/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch @@ -0,0 +1,254 @@ +Allow using pydevd as a regular dependency. +Submitted upstream at: https://github.com/microsoft/debugpy/pull/902 + +diff --git a/setup.py b/setup.py +index 5fc40070..3a530a29 100644 +--- a/setup.py ++++ b/setup.py +@@ -11,6 +11,9 @@ import subprocess + import sys + + ++DEBUGPY_BUNDLING_DISABLED = bool(os.getenv('DEBUGPY_BUNDLING_DISABLED')) ++ ++ + sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + import versioneer # noqa + +@@ -18,12 +21,15 @@ del sys.path[0] + + sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "src")) + import debugpy +-import debugpy._vendored ++ ++if not DEBUGPY_BUNDLING_DISABLED: ++ import debugpy._vendored + + del sys.path[0] + + +-PYDEVD_ROOT = debugpy._vendored.project_root("pydevd") ++PYDEVD_ROOT = (None if DEBUGPY_BUNDLING_DISABLED else ++ debugpy._vendored.project_root("pydevd")) + DEBUGBY_ROOT = os.path.dirname(os.path.abspath(debugpy.__file__)) + + +@@ -67,7 +73,7 @@ def iter_vendored_files(): + # relevant setuptools versions. + class ExtModules(list): + def __bool__(self): +- return True ++ return not DEBUGPY_BUNDLING_DISABLED + + + def override_build(cmds): +@@ -133,9 +139,24 @@ with open("DESCRIPTION.md", "r") as fh: + + + if __name__ == "__main__": +- if not os.getenv("SKIP_CYTHON_BUILD"): ++ if not (os.getenv("SKIP_CYTHON_BUILD") or DEBUGPY_BUNDLING_DISABLED): + cython_build() + ++ # Etch bundling status in the source. ++ if debugpy.__bundling_disabled__ != DEBUGPY_BUNDLING_DISABLED: ++ ++ with open(os.path.join(DEBUGBY_ROOT, '__init__.py'), 'r') as f: ++ lines = f.readlines() ++ with open(os.path.join(DEBUGBY_ROOT, '__init__.py'), 'w') as f: ++ edited = [] ++ for line in lines: ++ if line.startswith('__bundling_disabled__'): ++ edited.append( ++ f'__bundling_disabled__ = {DEBUGPY_BUNDLING_DISABLED}\n') ++ else: ++ edited.append(line) ++ f.writelines(edited) ++ + extras = {} + platforms = get_buildplatform() + if platforms is not None: +@@ -145,6 +166,18 @@ if __name__ == "__main__": + override_build(cmds) + override_build_py(cmds) + ++ data = {"debugpy": ["ThirdPartyNotices.txt"]} ++ packages = [ ++ "debugpy", ++ "debugpy.adapter", ++ "debugpy.common", ++ "debugpy.launcher", ++ "debugpy.server", ++ ] ++ if not DEBUGPY_BUNDLING_DISABLED: ++ data.update({"debugpy._vendored": list(iter_vendored_files())}) ++ packages.append("debugpy._vendored") ++ + setuptools.setup( + name="debugpy", + version=versioneer.get_version(), +@@ -173,20 +206,10 @@ if __name__ == "__main__": + "License :: OSI Approved :: MIT License", + ], + package_dir={"": "src"}, +- packages=[ +- "debugpy", +- "debugpy.adapter", +- "debugpy.common", +- "debugpy.launcher", +- "debugpy.server", +- "debugpy._vendored", +- ], +- package_data={ +- "debugpy": ["ThirdPartyNotices.txt"], +- "debugpy._vendored": list(iter_vendored_files()), +- }, ++ packages=packages, ++ package_data=data, + ext_modules=ExtModules(), +- has_ext_modules=lambda: True, ++ has_ext_modules=lambda: not DEBUGPY_BUNDLING_DISABLED, + cmdclass=cmds, + **extras + ) +diff --git a/src/debugpy/__init__.py b/src/debugpy/__init__.py +index baa5a7c5..7b7a29aa 100644 +--- a/src/debugpy/__init__.py ++++ b/src/debugpy/__init__.py +@@ -206,6 +206,8 @@ def trace_this_thread(should_trace): + + __version__ = _version.get_versions()["version"] + ++__bundling_disabled__ = False ++ + # Force absolute path on Python 2. + __file__ = os.path.abspath(__file__) + +diff --git a/src/debugpy/server/__init__.py b/src/debugpy/server/__init__.py +index e6a1ad66..5f29a87a 100644 +--- a/src/debugpy/server/__init__.py ++++ b/src/debugpy/server/__init__.py +@@ -4,6 +4,50 @@ + + from __future__ import absolute_import, division, print_function, unicode_literals + ++from importlib import import_module ++import os ++ + # "force_pydevd" must be imported first to ensure (via side effects) + # that the debugpy-vendored copy of pydevd gets used. +-import debugpy._vendored.force_pydevd # noqa ++import debugpy ++if debugpy.__bundling_disabled__: ++ # Do what force_pydevd.py does, but using the system-provided ++ # pydevd. ++ ++ # XXX: This is copied here so that the whole '_vendored' directory ++ # can be deleted when DEBUGPY_BUNDLING_DISABLED is set. ++ ++ # If debugpy logging is enabled, enable it for pydevd as well ++ if "DEBUGPY_LOG_DIR" in os.environ: ++ os.environ[str("PYDEVD_DEBUG")] = str("True") ++ os.environ[str("PYDEVD_DEBUG_FILE")] = \ ++ os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log") ++ ++ # Work around https://github.com/microsoft/debugpy/issues/346. ++ # Disable pydevd frame-eval optimizations only if unset, to allow opt-in. ++ if "PYDEVD_USE_FRAME_EVAL" not in os.environ: ++ os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO") ++ ++ # Constants must be set before importing any other pydevd module ++ # due to heavy use of "from" in them. ++ pydevd_constants = import_module('_pydevd_bundle.pydevd_constants') ++ # The default pydevd value is 1000. ++ pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2 ** 32 ++ ++ # When pydevd is imported it sets the breakpoint behavior, but it needs to be ++ # overridden because by default pydevd will connect to the remote debugger using ++ # its own custom protocol rather than DAP. ++ import pydevd # noqa ++ import debugpy # noqa ++ ++ def debugpy_breakpointhook(): ++ debugpy.breakpoint() ++ ++ pydevd.install_breakpointhook(debugpy_breakpointhook) ++ ++ # Ensure that pydevd uses JSON protocol ++ from _pydevd_bundle import pydevd_constants ++ from _pydevd_bundle import pydevd_defaults ++ pydevd_defaults.PydevdCustomization.DEFAULT_PROTOCOL = pydevd_constants.HTTP_JSON_PROTOCOL ++else: ++ import debugpy._vendored.force_pydevd # noqa +diff --git a/src/debugpy/server/attach_pid_injected.py b/src/debugpy/server/attach_pid_injected.py +index e6345996..87cfdd53 100644 +--- a/src/debugpy/server/attach_pid_injected.py ++++ b/src/debugpy/server/attach_pid_injected.py +@@ -8,6 +8,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera + + import os + ++import debugpy + + __file__ = os.path.abspath(__file__) + _debugpy_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) +@@ -30,25 +31,29 @@ def attach(setup): + def on_critical(msg): + print(msg, file=sys.stderr) + +- pydevd_attach_to_process_path = os.path.join( +- _debugpy_dir, +- "debugpy", +- "_vendored", +- "pydevd", +- "pydevd_attach_to_process", +- ) +- assert os.path.exists(pydevd_attach_to_process_path) +- sys.path.insert(0, pydevd_attach_to_process_path) +- +- # NOTE: that it's not a part of the pydevd PYTHONPATH +- import attach_script ++ if debugpy.__bundling_disabled__: ++ from pydevd_attach_to_process import attach_script ++ else: ++ pydevd_attach_to_process_path = os.path.join( ++ _debugpy_dir, ++ "debugpy", ++ "_vendored", ++ "pydevd", ++ "pydevd_attach_to_process", ++ ) ++ assert os.path.exists(pydevd_attach_to_process_path) ++ sys.path.insert(0, pydevd_attach_to_process_path) ++ ++ # NOTE: that it's not a part of the pydevd PYTHONPATH ++ import attach_script + + attach_script.fix_main_thread_id( + on_warn=on_warn, on_exception=on_exception, on_critical=on_critical + ) + +- # NOTE: At this point it should be safe to remove this. +- sys.path.remove(pydevd_attach_to_process_path) ++ if not debugpy.__bundling_disabled__: ++ # NOTE: At this point it should be safe to remove this. ++ sys.path.remove(pydevd_attach_to_process_path) + except: + import traceback + +diff --git a/tests/tests/test_vendoring.py b/tests/tests/test_vendoring.py +index dd6c4269..28c03702 100644 +--- a/tests/tests/test_vendoring.py ++++ b/tests/tests/test_vendoring.py +@@ -1,3 +1,8 @@ ++import pytest ++ ++import debugpy ++ ++@pytest.mark.skipif(debugpy.__bundling_disabled__, reason='Bundling disabled') + def test_vendoring(pyfile): + @pyfile + def import_debugpy(): +-- +2.34.0 + diff --git a/gnu/packages/patches/python-ipython-documentation-chars.patch b/gnu/packages/patches/python-ipython-documentation-chars.patch new file mode 100644 index 0000000000..a52c54f513 --- /dev/null +++ b/gnu/packages/patches/python-ipython-documentation-chars.patch @@ -0,0 +1,18 @@ +Avoid LaTeX errors due to non-printable characters. +Submitted upstream: https://github.com/ipython/ipython/pull/13640 + +diff --git a/IPython/utils/coloransi.py b/IPython/utils/coloransi.py +index e33142180..9300b0108 100644 +--- a/IPython/utils/coloransi.py ++++ b/IPython/utils/coloransi.py +@@ -74,8 +74,8 @@ class TermColors: + class InputTermColors: + """Color escape sequences for input prompts. + +- This class is similar to TermColors, but the escapes are wrapped in \001 +- and \002 so that readline can properly know the length of each line and ++ This class is similar to TermColors, but the escapes are wrapped in \\001 ++ and \\002 so that readline can properly know the length of each line and + can wrap lines accordingly. Use this class for any colored text which + needs to be used in input prompts, such as in calls to raw_input(). + diff --git a/gnu/packages/patches/python-ipython-documentation-repro.patch b/gnu/packages/patches/python-ipython-documentation-repro.patch new file mode 100644 index 0000000000..d6a6e9c3fd --- /dev/null +++ b/gnu/packages/patches/python-ipython-documentation-repro.patch @@ -0,0 +1,25 @@ +Fix non-reproducibilities caused by time-dependent procedures. +Submitted upstream: https://github.com/ipython/ipython/pull/13640 + +diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py +index 18bdfcae9..2c665ac87 100644 +--- a/IPython/sphinxext/ipython_directive.py ++++ b/IPython/sphinxext/ipython_directive.py +@@ -19,7 +19,7 @@ + In [1]: 1+1 + + In [1]: import datetime +- ...: datetime.datetime.now() ++ ...: datetime.date.fromisoformat('2022-02-22') + + It supports IPython construct that plain + Python does not understand (like magics): +@@ -28,7 +28,7 @@ + + In [0]: import time + +- In [0]: %timeit time.sleep(0.05) ++ In [0]: %pdoc time + + This will also support top-level async when using IPython 7.0+ + diff --git a/gnu/packages/patches/python-mypy-use-sys-path.patch b/gnu/packages/patches/python-mypy-use-sys-path.patch new file mode 100644 index 0000000000..1b12526456 --- /dev/null +++ b/gnu/packages/patches/python-mypy-use-sys-path.patch @@ -0,0 +1,130 @@ +This patch fixes the annotation files search of mypy on non-FHS distributions. + +Submitted upstream: https://github.com/python/mypy/pull/12530 + +diff --git a/mypy/main.py b/mypy/main.py +index 3d9836587..f9b0cbd39 100644 +--- a/mypy/main.py ++++ b/mypy/main.py +@@ -1033,10 +1033,10 @@ def process_options(args: List[str], + # Set target. + if special_opts.modules + special_opts.packages: + options.build_type = BuildType.MODULE +- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) ++ site_packages = get_site_packages_dirs(options.python_executable) + search_paths = SearchPaths((os.getcwd(),), + tuple(mypy_path() + options.mypy_path), +- tuple(egg_dirs + site_packages), ++ tuple(site_packages), + ()) + targets = [] + # TODO: use the same cache that the BuildManager will +diff --git a/mypy/modulefinder.py b/mypy/modulefinder.py +index 94d2dd34c..337a2d59b 100644 +--- a/mypy/modulefinder.py ++++ b/mypy/modulefinder.py +@@ -629,7 +629,7 @@ def get_prefixes(python_executable: Optional[str]) -> Tuple[str, str]: + + + @functools.lru_cache(maxsize=None) +-def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], List[str]]: ++def get_site_packages_dirs(python_executable: Optional[str]) -> List[str]: + """Find package directories for given python. + + This runs a subprocess call, which generates a list of the egg directories, and the site +@@ -648,51 +648,7 @@ def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], + site_packages = ast.literal_eval( + subprocess.check_output([python_executable, pyinfo.__file__, 'getsitepackages'], + stderr=subprocess.PIPE).decode()) +- return expand_site_packages(site_packages) +- +- +-def expand_site_packages(site_packages: List[str]) -> Tuple[List[str], List[str]]: +- """Expands .pth imports in site-packages directories""" +- egg_dirs: List[str] = [] +- for dir in site_packages: +- if not os.path.isdir(dir): +- continue +- pth_filenames = sorted(name for name in os.listdir(dir) if name.endswith(".pth")) +- for pth_filename in pth_filenames: +- egg_dirs.extend(_parse_pth_file(dir, pth_filename)) +- +- return egg_dirs, site_packages +- +- +-def _parse_pth_file(dir: str, pth_filename: str) -> Iterator[str]: +- """ +- Mimics a subset of .pth import hook from Lib/site.py +- See https://github.com/python/cpython/blob/3.5/Lib/site.py#L146-L185 +- """ +- +- pth_file = os.path.join(dir, pth_filename) +- try: +- f = open(pth_file, "r") +- except OSError: +- return +- with f: +- for line in f.readlines(): +- if line.startswith("#"): +- # Skip comment lines +- continue +- if line.startswith(("import ", "import\t")): +- # import statements in .pth files are not supported +- continue +- +- yield _make_abspath(line.rstrip(), dir) +- +- +-def _make_abspath(path: str, root: str) -> str: +- """Take a path and make it absolute relative to root if not already absolute.""" +- if os.path.isabs(path): +- return os.path.normpath(path) +- else: +- return os.path.join(root, os.path.normpath(path)) ++ return site_packages + + + def add_py2_mypypath_entries(mypypath: List[str]) -> List[str]: +@@ -781,7 +737,7 @@ def compute_search_paths(sources: List[BuildSource], + if options.python_version[0] == 2: + mypypath = add_py2_mypypath_entries(mypypath) + +- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) ++ site_packages = get_site_packages_dirs(options.python_executable) + base_prefix, prefix = get_prefixes(options.python_executable) + is_venv = base_prefix != prefix + for site_dir in site_packages: +@@ -801,7 +757,7 @@ def compute_search_paths(sources: List[BuildSource], + + return SearchPaths(python_path=tuple(reversed(python_path)), + mypy_path=tuple(mypypath), +- package_path=tuple(egg_dirs + site_packages), ++ package_path=tuple(site_packages), + typeshed_path=tuple(lib_path)) + + +diff --git a/mypy/pyinfo.py b/mypy/pyinfo.py +index ab2d3286b..9fb0501a1 100644 +--- a/mypy/pyinfo.py ++++ b/mypy/pyinfo.py +@@ -24,16 +24,11 @@ def getprefixes(): + + def getsitepackages(): + # type: () -> List[str] +- res = [] +- if hasattr(site, 'getsitepackages'): +- res.extend(site.getsitepackages()) + +- if hasattr(site, 'getusersitepackages') and site.ENABLE_USER_SITE: +- res.insert(0, site.getusersitepackages()) +- else: +- from distutils.sysconfig import get_python_lib +- res = [get_python_lib()] +- return res ++ # Simply return sys.path, which has already been expanded ++ # correctly via Python's site.py module, which takes care of .pth, ++ # sitecustomize.py files, etc. ++ return sys.path + + + if __name__ == '__main__': diff --git a/gnu/packages/patches/python-robotframework-atest.patch b/gnu/packages/patches/python-robotframework-atest.patch new file mode 100644 index 0000000000..619ed61b65 --- /dev/null +++ b/gnu/packages/patches/python-robotframework-atest.patch @@ -0,0 +1,61 @@ +Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286. + +diff --git a/atest/robot/standard_libraries/operating_system/modified_time.robot b/atest/robot/standard_libraries/operating_system/modified_time.robot +index d144ffd34..c7681e61d 100644 +--- a/atest/robot/standard_libraries/operating_system/modified_time.robot ++++ b/atest/robot/standard_libraries/operating_system/modified_time.robot +@@ -8,7 +8,7 @@ ${TESTFILE} %{TEMPDIR}${/}robot-os-tests${/}f1.txt + *** Test Cases *** + Get Modified Time As Timestamp + ${tc} = Check Test Case ${TESTNAME} +- Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is 20\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d ++ Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d + + Get Modified Time As Seconds After Epoch + ${tc} = Check Test Case ${TESTNAME} +diff --git a/atest/testdata/standard_libraries/builtin/get_time.robot b/atest/testdata/standard_libraries/builtin/get_time.robot +index 9847d8c42..24ce732ca 100644 +--- a/atest/testdata/standard_libraries/builtin/get_time.robot ++++ b/atest/testdata/standard_libraries/builtin/get_time.robot +@@ -11,18 +11,18 @@ Get Time As Timestamp + + Get Time As Seconds After Epoch + ${time} = Get Time epoch +- Should Be True 1000000000 < ${time} < 2000000000 ++ Should Be True 0 < ${time} + + Get Time As Parts + @{time} = Get Time year, month, day, hour, min, sec +- Should Be True 2000 < ${time}[0] < 2100 ++ Should Match Regexp ${time}[0] \\d{4} + Should Be True 1 <= int('${time}[1]') <= 12 + Should Be True 1 <= int('${time}[2]') <= 31 + Should Be True 0 <= int('${time}[3]') <= 23 + Should Be True 0 <= int('${time}[4]') <= 59 + Should Be True 0 <= int('${time}[5]') <= 59 + ${year} ${min} ${sec} = Get Time seconds and minutes and year and whatnot +- Should Be True 2000 < ${year} < 2100 ++ Should Match Regexp ${year} \\d{4} + Should Be True 0 <= int('${min}') <= 59 + Should Be True 0 <= int('${sec}') <= 59 + +diff --git a/atest/testdata/standard_libraries/operating_system/modified_time.robot b/atest/testdata/standard_libraries/operating_system/modified_time.robot +index 9489b3c9c..c712ebaed 100644 +--- a/atest/testdata/standard_libraries/operating_system/modified_time.robot ++++ b/atest/testdata/standard_libraries/operating_system/modified_time.robot +@@ -14,13 +14,13 @@ Get Modified Time As Timestamp + + Get Modified Time As Seconds After Epoch + ${dirtime} = Get Modified Time ${CURDIR} epoch +- Should Be True 1000000000 < ${dirtime} < 2000000000 ++ Should Be True ${dirtime} > 0 + ${current} = Get Time epoch + Should Be True ${current} >= ${dirtime} + + Get Modified Time As Parts + ${year} = Get Modified Time ${CURDIR} year +- Should Be True 2000 < ${year} < 2100 ++ Should Match Regexp ${year} \\d{4} + ${yyyy} ${mm} ${dd} = Get Modified Time ${CURDIR} year, month, day + Should Be Equal ${yyyy} ${year} + # Must use `int('x')` because otherwise 08 and 09 are considered octal diff --git a/gnu/packages/patches/python-robotframework-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch index 11424bf4db..7f00d82061 100644 --- a/gnu/packages/patches/python-robotframework-source-date-epoch.patch +++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch @@ -1,12 +1,64 @@ -Do not embed any timestamp in the built documentation. - -Upstream issue: https://github.com/robotframework/robotframework/issues/4262. +Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286. +diff --git a/BUILD.rst b/BUILD.rst +index 67902dd09..749c53fde 100644 +--- a/BUILD.rst ++++ b/BUILD.rst +@@ -204,6 +204,9 @@ Creating distributions + + 7. Documentation + ++ - For a reproducible build, set the ``SOURCE_DATE_EPOCH`` ++ environment variable to 1. ++ + - Generate library documentation:: + + invoke library-docs all +diff --git a/atest/robot/libdoc/html_output.robot b/atest/robot/libdoc/html_output.robot +index f42a4b150..af428c967 100644 +--- a/atest/robot/libdoc/html_output.robot ++++ b/atest/robot/libdoc/html_output.robot +@@ -15,7 +15,7 @@ Version + + Generated + [Template] Should Match Regexp +- ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} ++ ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[+-]\\d{2}:\\d{2} + + Scope + ${MODEL}[scope] GLOBAL +diff --git a/atest/robot/libdoc/json_output.robot b/atest/robot/libdoc/json_output.robot +index 78305a458..654603704 100644 +--- a/atest/robot/libdoc/json_output.robot ++++ b/atest/robot/libdoc/json_output.robot +@@ -15,7 +15,7 @@ Version + + Generated + [Template] Should Match Regexp +- ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} ++ ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[+-]\\d{2}:\\d{2} + + Scope + ${MODEL}[scope] GLOBAL +diff --git a/atest/robot/libdoc/libdoc_resource.robot b/atest/robot/libdoc/libdoc_resource.robot +index bd7c10ecd..b7e06aacc 100644 +--- a/atest/robot/libdoc/libdoc_resource.robot ++++ b/atest/robot/libdoc/libdoc_resource.robot +@@ -92,7 +92,8 @@ Lineno Should Be + Element Attribute Should Be ${LIBDOC} lineno ${lineno} + + Generated Should Be Defined +- Element Attribute Should Match ${LIBDOC} generated ????-??-??T??:??:??Z ++ # For example, '1970-01-01T00:00:01+00:00'. ++ Element Attribute Should Match ${LIBDOC} generated ????-??-??T??:??:?????:?? + + Spec version should be correct + Element Attribute Should Be ${LIBDOC} specversion 4 diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py -index 43cdb31bd..550e74a79 100755 +index 033203552..b278c71c8 100755 --- a/doc/userguide/ug2html.py +++ b/doc/userguide/ug2html.py -@@ -158,8 +158,7 @@ def create_userguide(): +@@ -150,8 +150,7 @@ def create_userguide(): install_file = _copy_installation_instructions() description = 'HTML generator for Robot Framework User Guide.' @@ -17,48 +69,97 @@ index 43cdb31bd..550e74a79 100755 'RobotFrameworkUserGuide.html'] os.chdir(CURDIR) diff --git a/src/robot/libdocpkg/model.py b/src/robot/libdocpkg/model.py -index 4d9ffd70b..5c276d1d6 100644 +index 5f44039ef..c36bf4a49 100644 --- a/src/robot/libdocpkg/model.py +++ b/src/robot/libdocpkg/model.py -@@ -14,6 +14,7 @@ - # limitations under the License. +@@ -19,7 +19,7 @@ from itertools import chain - import json -+import os - import re - from itertools import chain + from robot.model import Tags + from robot.running import ArgumentSpec +-from robot.utils import getshortdoc, get_timestamp, Sortable, setter ++from robot.utils import get_timestamp_for_doc, getshortdoc, Sortable, setter -@@ -113,7 +114,8 @@ class LibraryDoc(object): + from .htmlutils import DocFormatter, DocToHtml, HtmlToText + from .writer import LibdocWriter +@@ -113,7 +113,7 @@ class LibraryDoc: 'name': self.name, 'doc': self.doc, 'version': self.version, - 'generated': get_timestamp(daysep='-', millissep=None), -+ 'generated': ('' if os.environ['SOURCE_DATE_EPOCH'] -+ else get_timestamp(daysep='-', millissep=None)), ++ 'generated': get_timestamp_for_doc(), 'type': self.type, 'scope': self.scope, 'docFormat': self.doc_format, diff --git a/src/robot/libdocpkg/xmlwriter.py b/src/robot/libdocpkg/xmlwriter.py -index 3882e1219..4a84fb42e 100644 +index a765ebb2b..980debebb 100644 --- a/src/robot/libdocpkg/xmlwriter.py +++ b/src/robot/libdocpkg/xmlwriter.py -@@ -14,6 +14,8 @@ +@@ -13,9 +13,7 @@ + # See the License for the specific language governing permissions and # limitations under the License. - import os.path -+import os -+ - from datetime import datetime +-from datetime import datetime +- +-from robot.utils import XmlWriter ++from robot.utils import XmlWriter, get_timestamp_for_doc + - from robot.utils import WINDOWS, XmlWriter, unicode -@@ -30,7 +32,9 @@ class LibdocXmlWriter(object): + class LibdocXmlWriter: +@@ -32,12 +30,11 @@ class LibdocXmlWriter: self._write_end(writer) def _write_start(self, libdoc, writer): - generated = datetime.utcnow().replace(microsecond=0).isoformat() + 'Z' -+ generated = ( -+ '' if os.environ['SOURCE_DATE_EPOCH'] -+ else datetime.utcnow().replace(microsecond=0).isoformat() + 'Z') attrs = {'name': libdoc.name, 'type': libdoc.type, 'format': libdoc.doc_format, + 'scope': libdoc.scope, +- 'generated': generated, ++ 'generated': get_timestamp_for_doc(), + 'specversion': '4'} + self._add_source_info(attrs, libdoc) + writer.start('keywordspec', attrs) +diff --git a/src/robot/utils/__init__.py b/src/robot/utils/__init__.py +index 442ffa4f3..80793ec29 100644 +--- a/src/robot/utils/__init__.py ++++ b/src/robot/utils/__init__.py +@@ -58,9 +58,9 @@ from .robotinspect import is_init + from .robotio import binary_file_writer, create_destination_directory, file_writer + from .robotpath import abspath, find_file, get_link_path, normpath + from .robottime import (elapsed_time_to_string, format_time, get_elapsed_time, +- get_time, get_timestamp, secs_to_timestamp, +- secs_to_timestr, timestamp_to_secs, timestr_to_secs, +- parse_time) ++ get_time, get_timestamp, get_timestamp_for_doc, ++ secs_to_timestamp, secs_to_timestr, timestamp_to_secs, ++ timestr_to_secs, parse_time) + from .robottypes import (FALSE_STRINGS, TRUE_STRINGS, is_bytes, is_dict_like, is_falsy, + is_integer, is_list_like, is_number, is_pathlike, is_string, + is_truthy, is_union, type_name, type_repr, typeddict_types) +diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py +index 97a7d1af0..4a0ba2d83 100644 +--- a/src/robot/utils/robottime.py ++++ b/src/robot/utils/robottime.py +@@ -13,6 +13,8 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++import datetime ++import os + import re + import time + +@@ -316,6 +318,13 @@ def get_timestamp(daysep='', daytimesep=' ', timesep=':', millissep='.'): + return TIMESTAMP_CACHE.get_timestamp(daysep, daytimesep, timesep, millissep) + + ++def get_timestamp_for_doc(): ++ """Return a timestamp that honors `SOURCE_DATE_EPOCH`.""" ++ ts = float(os.getenv('SOURCE_DATE_EPOCH', time.time())) ++ dt = datetime.datetime.fromtimestamp(round(ts), datetime.timezone.utc) ++ return dt.isoformat() ++ ++ + def timestamp_to_secs(timestamp, seps=None): + try: + secs = _timestamp_to_millis(timestamp, seps) / 1000.0 diff --git a/gnu/packages/patches/python-robotframework-ug2html.patch b/gnu/packages/patches/python-robotframework-ug2html.patch deleted file mode 100644 index eea88e01f3..0000000000 --- a/gnu/packages/patches/python-robotframework-ug2html.patch +++ /dev/null @@ -1,57 +0,0 @@ -Do not require the obsolete robotframeworklexer. - -Submitted upstream at: https://github.com/robotframework/robotframework/pull/4265. -diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py -index 43cdb31bd..033203552 100755 ---- a/doc/userguide/ug2html.py -+++ b/doc/userguide/ug2html.py -@@ -93,34 +93,26 @@ from docutils.parsers.rst import directives - from pygments import highlight, __version__ as pygments_version - from pygments.lexers import get_lexer_by_name - --# Use latest version, not version bundled with Pygments --import robotframeworklexer -- - - def too_old(version_string, minimum): - version = tuple(int(v) for v in version_string.split('.')[:2]) - return version < minimum - - --if too_old(getattr(robotframeworklexer, '__version__', '1.0'), (1, 1)): -- sys.exit('robotframeworklexer >= 1.1 is required.') --if too_old(pygments_version, (2, 1)): -- sys.exit('Pygments >= 2.1 is required.') -+if too_old(pygments_version, (2, 8)): -+ sys.exit('Pygments >= 2.8 is required.') - - - def pygments_directive(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - try: -- if arguments[0] == 'robotframework': -- lexer = robotframeworklexer.RobotFrameworkLexer() -- else: -- lexer = get_lexer_by_name(arguments[0]) -+ lexer = get_lexer_by_name(arguments[0]) - except ValueError as err: - raise ValueError(f'Invalid syntax highlighting language "{arguments[0]}".') - # take an arbitrary option if more than one is given - formatter = options and VARIANTS[options.keys()[0]] or DEFAULT - # possibility to read the content from an external file -- filtered = [ line for line in content if line.strip() ] -+ filtered = [line for line in content if line.strip()] - if len(filtered) == 1: - path = filtered[0].replace('/', os.sep) - if os.path.isfile(path): -diff --git a/requirements-build.txt b/requirements-build.txt -index e0f5e19a2..a2fcdcfd5 100644 ---- a/requirements-build.txt -+++ b/requirements-build.txt -@@ -5,5 +5,4 @@ rellu >= 0.7 - twine >= 1.12 - wheel - docutils --pygments >= 2.1 --robotframeworklexer >= 1.1 -+pygments >= 2.8 diff --git a/gnu/packages/patches/python-w3lib-fix-test-failure.patch b/gnu/packages/patches/python-w3lib-fix-test-failure.patch new file mode 100644 index 0000000000..f38fc749df --- /dev/null +++ b/gnu/packages/patches/python-w3lib-fix-test-failure.patch @@ -0,0 +1,60 @@ +From fae6cc40e112cd13697cb0e8d79976f32c72491d Mon Sep 17 00:00:00 2001 +From: Eugenio Lacuesta <eugenio.lacuesta@gmail.com> +Date: Wed, 10 Mar 2021 12:31:05 -0300 +Subject: [PATCH] [CI] Mark single add_or_replace_parameter test as xfail + +--- +This patch is based on upstream commit +fae6cc40e112cd13697cb0e8d79976f32c72491d which is part of +https://github.com/scrapy/w3lib/pull/166. + + .gitignore | 3 ++- + tests/test_url.py | 25 ++++++++++++++----------- + 2 files changed, 16 insertions(+), 12 deletions(-) + +diff --git a/tests/test_url.py b/tests/test_url.py +index 8b07c00..0f7458e 100644 +--- a/tests/test_url.py ++++ b/tests/test_url.py +@@ -1,12 +1,14 @@ +-# -*- coding: utf-8 -*- + from __future__ import absolute_import + import os + import unittest ++ ++import pytest ++from six.moves.urllib.parse import urlparse ++ + from w3lib.url import (is_url, safe_url_string, safe_download_url, + url_query_parameter, add_or_replace_parameter, url_query_cleaner, + file_uri_to_path, parse_data_uri, path_to_file_uri, any_to_uri, + urljoin_rfc, canonicalize_url, parse_url, add_or_replace_parameters) +-from six.moves.urllib.parse import urlparse + + + class UrlTests(unittest.TestCase): +@@ -310,10 +311,6 @@ def test_add_or_replace_parameter(self): + self.assertEqual(add_or_replace_parameter(url, 'arg3', 'nv3'), + 'http://domain/test?arg1=v1&arg2=v2&arg3=nv3') + +- url = 'http://domain/test?arg1=v1;arg2=v2' +- self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'), +- 'http://domain/test?arg1=v3&arg2=v2') +- + self.assertEqual(add_or_replace_parameter("http://domain/moreInfo.asp?prodID=", 'prodID', '20'), + 'http://domain/moreInfo.asp?prodID=20') + url = 'http://rmc-offers.co.uk/productlist.asp?BCat=2%2C60&CatID=60' +@@ -338,6 +335,13 @@ def test_add_or_replace_parameter(self): + self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'), + 'http://domain/test?arg1=v3&arg2=v2') + ++ @pytest.mark.xfail(reason="https://github.com/scrapy/w3lib/issues/164") ++ def test_add_or_replace_parameter_fail(self): ++ self.assertEqual( ++ add_or_replace_parameter('http://domain/test?arg1=v1;arg2=v2', 'arg1', 'v3'), ++ 'http://domain/test?arg1=v3&arg2=v2' ++ ) ++ + def test_add_or_replace_parameters(self): + url = 'http://domain/test' + self.assertEqual(add_or_replace_parameters(url, {'arg': 'v'}), diff --git a/gnu/packages/patches/python2-parameterized-docstring-test.patch b/gnu/packages/patches/python2-parameterized-docstring-test.patch deleted file mode 100644 index 14691e1904..0000000000 --- a/gnu/packages/patches/python2-parameterized-docstring-test.patch +++ /dev/null @@ -1,18 +0,0 @@ -Skip unicode docstring test, required when running on Python 2. - -See <https://github.com/wolever/parameterized/issues/44>. - ---- a/parameterized/test.py -+++ b/parameterized/test.py -@@ -284,11 +284,6 @@ - " More" %(foo, ) - ) - -- @parameterized.expand([param("foo")]) -- def test_unicode_docstring(self, foo): -- u"""Döcumentation.""" -- self._assert_docstring(u"Döcumentation [with foo=%r]." %(foo, )) -- - @parameterized.expand([param("foo", )]) - def test_default_values_get_correct_value(self, foo, bar=12): - """Documentation""" diff --git a/gnu/packages/patches/python2-pygobject-2-deprecation.patch b/gnu/packages/patches/python2-pygobject-2-deprecation.patch deleted file mode 100644 index 6a08e56351..0000000000 --- a/gnu/packages/patches/python2-pygobject-2-deprecation.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e5df32ffbf37481dbb6a70c4d4e7b7b9778c5549 Mon Sep 17 00:00:00 2001 -From: "John (J5) Palmieri" <johnp@redhat.com> -Date: Sat, 13 Aug 2011 04:13:28 -0400 -Subject: remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN - - -diff --git a/gi/pygi-info.c b/gi/pygi-info.c -index 8729e25..007b609 100644 ---- a/gi/pygi-info.c -+++ b/gi/pygi-info.c -@@ -165,9 +165,6 @@ _pygi_info_new (GIBaseInfo *info) - case GI_INFO_TYPE_CONSTANT: - type = &PyGIConstantInfo_Type; - break; -- case GI_INFO_TYPE_ERROR_DOMAIN: -- type = &PyGIErrorDomainInfo_Type; -- break; - case GI_INFO_TYPE_UNION: - type = &PyGIUnionInfo_Type; - break; -@@ -484,7 +481,6 @@ _pygi_g_type_info_size (GITypeInfo *type_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: -@@ -863,7 +859,6 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: --- -cgit v0.10.1 - diff --git a/gnu/packages/patches/python2-subprocess32-disable-input-test.patch b/gnu/packages/patches/python2-subprocess32-disable-input-test.patch deleted file mode 100644 index 05b4eef1ba..0000000000 --- a/gnu/packages/patches/python2-subprocess32-disable-input-test.patch +++ /dev/null @@ -1,18 +0,0 @@ -This test tries to send a KeyboardInterrupt, which does -not work in the build environment. - ---- a/test_subprocess32.py 2017-03-06 22:21:49.334045485 +0100 -+++ b/test_subprocess32.py 2017-03-06 22:22:02.490439949 +0100 -@@ -1299,12 +1299,6 @@ - getattr(p, method)(*args) - return p - -- def test_send_signal(self): -- p = self._kill_process('send_signal', signal.SIGINT) -- _, stderr = p.communicate() -- self.assertIn('KeyboardInterrupt', stderr) -- self.assertNotEqual(p.wait(), 0) -- - def test_kill(self): - p = self._kill_process('kill') - _, stderr = p.communicate() diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch deleted file mode 100644 index 3a5a4a3d82..0000000000 --- a/gnu/packages/patches/racket-enable-scheme-backport.patch +++ /dev/null @@ -1,465 +0,0 @@ -From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001 -From: Matthew Flatt <mflatt@racket-lang.org> -Date: Sun, 6 Feb 2022 10:36:09 -0700 -Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=` - -(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5) - -(Fixed conflicts by dropping pbchunks and pbarch changes.) ---- - racket/src/ChezScheme/configure | 15 ++++++++++++++- - racket/src/ChezScheme/s/Mf-base | 4 ++-- - racket/src/ChezScheme/s/Mf-cross | 4 +++- - 3 files changed, 19 insertions(+), 4 deletions(-) - -diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure -index 4515ffc105..0098829091 100755 ---- a/racket/src/ChezScheme/configure -+++ b/racket/src/ChezScheme/configure -@@ -45,6 +45,7 @@ threads=yes - nothreads=no - temproot="" - help=no -+forceworkarea=no - gzipmanpages=yes - installowner="" - installgroup="" -@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do - --pb) - pb=yes - ;; -+ --force) -+ forceworkarea=yes -+ ;; - --installprefix=*) - installprefix=`echo $1 | sed -e 's/^--installprefix=//'` - ;; -@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then - echo " --toolprefix=<prefix> prefix tool (compiler, linker, ...) names" - echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)" - echo " --workarea=<pathname> build directory ($w)" -+ echo " --force configure even without boot files" - echo " CC=<C compiler> C compiler" - echo " CPPFLAGS=<C preprocessor flags> C preprocessor flags" - echo " CFLAGS=<C compiler flags> C compiler flags" -@@ -721,8 +726,16 @@ case "${flagsmuni}" in - ;; - esac - -+if [ "$w" = "$m" ] ; then -+ configuringin="" -+else -+ configuringin=" in $w" -+fi -+ - if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then -- echo "Configuring for $m" -+ echo "Configuring for $m$configuringin" -+elif [ "$forceworkarea" = yes ] ; then -+ echo "Configuring for $m$configuringin despite missing boot files" - else - if [ "$m" = "" ] ; then - maybem="<machine type>" -diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base -index cc6178c973..1f4a967998 100644 ---- a/racket/src/ChezScheme/s/Mf-base -+++ b/racket/src/ChezScheme/s/Mf-base -@@ -94,7 +94,7 @@ endif - # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme - # implementation - Scheme = ../bin/$m/scheme${ExeSuffix} --export SCHEMEHEAPDIRS=../boot/%m -+export SCHEMEHEAPDIRS=../boot/$m - export CHEZSCHEMELIBDIRS=. - - # Define the libdirs separator character -@@ -691,4 +691,4 @@ reset-one: - - .PHONY: run - run: -- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS) -+ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS) -diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross -index d796cbb459..397af59a28 100644 ---- a/racket/src/ChezScheme/s/Mf-cross -+++ b/racket/src/ChezScheme/s/Mf-cross -@@ -43,5 +43,7 @@ x$(xm).$(m): - $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch - mv xpatch x$(xm).$(m) - -+ifneq ($(SCHEMEHEAPDIRS),:) - # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed --nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot -+nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot -+endif --- -2.32.0 - - -From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001 -From: Matthew Flatt <mflatt@racket-lang.org> -Date: Sun, 6 Feb 2022 11:03:30 -0700 -Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable - -When the same Chez Scheme version as used by Racket is already -available, then `--enable-scheme=...` can supply an executable. For -cross builds, `--enable-scheme=...` can still supply a build -directory, instead, as before. - -(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f) ---- - racket/src/ChezScheme/makefiles/Makefile.in | 3 ++ - racket/src/README.txt | 30 +++++++++++--- - racket/src/configure | 8 +++- - racket/src/cs/README.txt | 6 ++- - racket/src/cs/c/Makefile.in | 44 ++++++++++++++++----- - racket/src/cs/c/configure | 24 +++++++++-- - racket/src/cs/c/configure.ac | 21 ++++++++-- - 7 files changed, 112 insertions(+), 24 deletions(-) - -diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in -index c396efc851..3998ef9ccd 100644 ---- a/racket/src/ChezScheme/makefiles/Makefile.in -+++ b/racket/src/ChezScheme/makefiles/Makefile.in -@@ -59,6 +59,9 @@ reset: - %.boot: - (cd $(workarea) && $(MAKE) $*.boot) - -+auto.boot: -+ (cd $(workarea) && $(MAKE) $(defaultm).boot) -+ - # <machine>.bootquick to build boot files for <machine> - # with o=3 d=0 for the cross compiler, and only after - # building the kernel for the configured machine -diff --git a/racket/src/README.txt b/racket/src/README.txt -index 98647aebce..d77310b4a4 100644 ---- a/racket/src/README.txt -+++ b/racket/src/README.txt -@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of - ======================================================================== - - Cross-compilation requires at least two flags to `configure`: -+`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS) -+`--enable-scheme-SCHEME`. -+ -+More information: - - * `--host=OS`, where OS is something like `i386-gnu-linux` to - indicate the target platform. -@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`: - run `configure` again (with no arguments) in a "local" subdirectory - to create a build for the current platform. - --An additional flag is needed for building Racket CS, unless the flag --`--enable-racket=auto` is used: -- -- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme" -- directory where Chez Scheme is built for the host system. -+ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable -+ executable that runs on the build platform; the executable must be -+ the same version as used in Racket built for the target platform. -+ -+ Supplying `--enable-scheme=DIR` is also supported in cross-build -+ mode, where DIR is a path that has a "ChezScheme" directory where -+ Chez Scheme is built for the host system. -+ -+The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are -+allowed for non-cross builds, too: -+ -+ * For Racket CS, supplying either selects a Racket or Chez Scheme -+ implementation used to create boot files to the build platform. -+ Suppling Chez Scheme is a much more direct path, but when Racket is -+ supplied, its version does not have to match the version being -+ built. -+ -+ * For Racket BC, `--enable-racket=RACKET` selects a Racket for -+ prepare C sources to cooperate with garbage collection. Its version -+ needs to be close to the one being built, and potentially exactly -+ the same version. - - Some less commonly needed `configure` flags are for Racket BC: - -diff --git a/racket/src/configure b/racket/src/configure -index c9f3ba4419..1b53ec7ce2 100755 ---- a/racket/src/configure -+++ b/racket/src/configure -@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb" - use_cs=maybe - use_bc=maybe - supplied_racket=no -+supplied_scheme=no - enable_boothelp= - - # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`, -@@ -34,6 +35,9 @@ for arg in $*; do - --enable-racket=*) - supplied_racket=yes - ;; -+ --enable-scheme=*) -+ supplied_scheme=yes -+ ;; - --help | -h) - echo $0: - echo see --help-bc or --help-cs, since the Racket CS build and the -@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then - fi - - if test "$use_cs" = "yes" ; then -- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then -- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly -+ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then -+ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly - exit 1 - fi - -diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt -index 2ece417b78..8e6fc57b74 100644 ---- a/racket/src/cs/README.txt -+++ b/racket/src/cs/README.txt -@@ -39,6 +39,11 @@ build: - installed in the "../ChezScheme/boot/pb" directory as described by - "../ChezScheme/BUILDING". - -+ Supplying `--enable-scheme=...` is also an option if you alerady -+ have the same version of Chez Scheme built on the current platform. -+ Another build will be created, anyway, but more quickly than -+ without Chez Scheme. -+ - * Racket is needed to generate the files in the "schemified" - directory from the sources in sibling directories like "../io". The - Racket version must be practically the same as the current Racket -@@ -48,7 +53,6 @@ build: - Unlike Chez Scheme boot files, the files generated in "schemified" - are human-readable and -editable Scheme code. That provides a way - out of bootstrapping black holes, even without BC. -- - - - ======================================================================== -diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in -index 54a644a1d9..d73993f0fc 100644 ---- a/racket/src/cs/c/Makefile.in -+++ b/racket/src/cs/c/Makefile.in -@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@ - SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA) - SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme - SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH) --SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot -+SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot -+SCHEME_existing = @MAKE_SCHEME_SCHEME@ -+SCHEME = $(SCHEME@USE_SCHEME_MODE@) - - TARGET_MACH = @TARGET_MACH@ - SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH) -@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../.. - @INCLUDEDEP@ @srcdir@/../../version/version.mak - - cs: -- $(MAKE) scheme@T_CROSS_MODE@ -+ $(MAKE) scheme@MAKE_SCHEME_MODE@ - $(MAKE) racket-so - cd rktio; $(MAKE) - $(MAKE) racketcs -@@ -121,9 +123,13 @@ racket-so: - - RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@ - -+TARGET_MACH_built = $(TARGET_MACH) -+TARGET_MACH_existing = xc-$(TARGET_MACH) -+XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch -+ - CS_PROGS = SCHEME="$(SCHEME)" - CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@ --CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch" -+CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)" - PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot" - - build-racket-so: -@@ -163,6 +169,15 @@ pb-bootquick: - cd $(SCHEME_WORKAREA) && $(MAKE) reset - $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA) - -+scheme-via-scheme: -+ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot -+ $(MAKE) mach-make -+ -+$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot: -+ mkdir -p $(SCHEME_WORKAREA) -+ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force" -+ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all -+ - mach-make: - $(MAKE) config-scheme - cd $(SCHEME_WORKAREA) && $(MAKE) -@@ -182,24 +197,33 @@ config-scheme: - - scheme-cross: - env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt -+ $(MAKE) finish-scheme-cross -+ -+finish-scheme-cross: - $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA) - cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS) - cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t -- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch -+ $(MAKE) $(XPATCH_FILE) -+ -+scheme-cross-via-scheme: -+ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH) -+ $(MAKE) finish-scheme-cross - - # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older --# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files --XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ -- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot -+# than the build-<host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files -+XPATCH_DEPS_built = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ -+ $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot -+XPATCH_DEPS_existing = -+XPATCH_DEPS = $(XPATCH_DEPS@USE_SCHEME_MODE@) - --$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(XPATCH_DEPS) -+$(XPATCH_FILE): $(XPATCH_DEPS) - $(MAKE) bounce TARGET=build-xpatch-using-host - - build-xpatch-using-host: - cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/s && $(MAKE) -f Mf-cross m=$(MACH) xm=$(TARGET_MACH) Scheme="$(SCHEME_BIN)" SCHEMEHEAPDIRS="$(SCHEME_INC)" - - XPATCH = --XPATCHcross = --xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch -+XPATCHcross = --xpatch $(XPATCH_FILE) - - racket.boot: racket.so - $(SCHEME) --script $(srcdir)/convert-to-boot.ss @BOOT_COMPRESS_COMP@ $(XPATCH@CROSS_MODE@) racket.so racket.boot $(TARGET_MACH) -@@ -410,7 +434,7 @@ install-cross: - $(MAKE) compile-xpatch.$(TARGET_MACH) - $(MAKE) library-xpatch.$(TARGET_MACH) - --SCHEME_XPATCH = $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch -+SCHEME_XPATCH = $(XPATCH_FILE) - - CROSS_SERVE_DEPS = $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss \ - $(srcdir)/../expander/env.ss $(srcdir)/../linklet/config.ss -diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure -index 21695a431a..1eeef57753 100755 ---- a/racket/src/cs/c/configure -+++ b/racket/src/cs/c/configure -@@ -654,6 +654,9 @@ MINGW - NOT_OSX - OSX - SETUP_BOOT_MODE -+USE_SCHEME_MODE -+MAKE_SCHEME_SCHEME -+MAKE_SCHEME_MODE - TT_CROSS_MODE - T_CROSS_MODE - CROSS_MODE -@@ -1448,7 +1451,7 @@ Optional Features: - --enable-docs build docs on install (enabled by default) - --enable-usersetup setup user-specific files on install - --enable-racket=<path> use <path> as Racket for build; or "auto" to create -- --enable-scheme=<path> use <path> as host's build directory for cross -+ --enable-scheme=<path> use <path> as host build for cross - --enable-mach=<mach> use Chez Scheme machine type <mach> - --enable-target=<mach> cross-build for Chez Scheme machine type <mach> - --enable-portable prefer portable to host-specific -@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style" - show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib' - - show_explicitly_set "${enable_racket}" "Racket" --show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" -+show_explicitly_set "${enable_scheme}" "Chez Scheme for build" - show_explicitly_set "${enable_mach}" "machine type" - show_explicitly_set "${enable_target}" "cross-build machine type" - show_explicitly_enabled "${enable_portable}" "portable" -@@ -4745,9 +4748,21 @@ esac - - SCHEME_DIR=${srcdir}/../../ChezScheme - MAKE_BUILD_SCHEME=checkout -+USE_SCHEME_MODE="_built" -+MAKE_SCHEME_MODE="${T_CROSS_MODE}" - - if test "${enable_scheme}" != "" ; then -- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ if test -d "${enable_scheme}" ; then -+ # Directory exists, so use it as a build directory -+ echo "Using supplied Scheme path as a build directory" -+ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ else -+ # Directory does not exist, so assume it's an executable -+ echo "Using supplied Scheme path as an executable" -+ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" -+ MAKE_SCHEME_SCHEME="${enable_scheme}" -+ USE_SCHEME_MODE="_existing" -+ fi - fi - - if test "${enable_racket}" != "" ; then -@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags - - - -+ -+ -+ - - - -diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac -index 464ebe1760..aaee88156d 100644 ---- a/racket/src/cs/c/configure.ac -+++ b/racket/src/cs/c/configure.ac -@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev - AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files]) - m4_include(../ac/path_arg.m4) - AC_ARG_ENABLE(racket, [ --enable-racket=<path> use <path> as Racket for build; or "auto" to create]) --AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> use <path> as host's build directory for cross]) -+AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> use <path> as host build for cross]) - AC_ARG_ENABLE(mach, [ --enable-mach=<mach> use Chez Scheme machine type <mach>]) - AC_ARG_ENABLE(target, [ --enable-target=<mach> cross-build for Chez Scheme machine type <mach>]) - m4_include(../ac/portable_arg.m4) -@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files" - show_explicitly_enabled "${enable_xonx}" "Unix style" - m4_include(../ac/path_show.m4) - show_explicitly_set "${enable_racket}" "Racket" --show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" -+show_explicitly_set "${enable_scheme}" "Chez Scheme for build" - show_explicitly_set "${enable_mach}" "machine type" - show_explicitly_set "${enable_target}" "cross-build machine type" - m4_include(../ac/portable_show.m4) -@@ -504,9 +504,21 @@ esac - - SCHEME_DIR=${srcdir}/../../ChezScheme - MAKE_BUILD_SCHEME=checkout -+USE_SCHEME_MODE="_built" -+MAKE_SCHEME_MODE="${T_CROSS_MODE}" - - if test "${enable_scheme}" != "" ; then -- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ if test -d "${enable_scheme}" ; then -+ # Directory exists, so use it as a build directory -+ echo "Using supplied Scheme path as a build directory" -+ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ else -+ # Directory does not exist, so assume it's an executable -+ echo "Using supplied Scheme path as an executable" -+ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" -+ MAKE_SCHEME_SCHEME="${enable_scheme}" -+ USE_SCHEME_MODE="_existing" -+ fi - fi - - if test "${enable_racket}" != "" ; then -@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH) - AC_SUBST(CROSS_MODE) - AC_SUBST(T_CROSS_MODE) - AC_SUBST(TT_CROSS_MODE) -+AC_SUBST(MAKE_SCHEME_MODE) -+AC_SUBST(MAKE_SCHEME_SCHEME) -+AC_SUBST(USE_SCHEME_MODE) - AC_SUBST(SETUP_BOOT_MODE) - AC_SUBST(OSX) - AC_SUBST(NOT_OSX) --- -2.32.0 - diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch deleted file mode 100644 index 1e018eaa79..0000000000 --- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch +++ /dev/null @@ -1,26 +0,0 @@ -From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001 -From: Matthew Flatt <mflatt@racket-lang.org> -Date: Mon, 31 Jan 2022 15:31:22 -0700 -Subject: [PATCH] fix creation of tethered launchers - -Related to racket/racket#4133 - -(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) ---- - gui-lib/mred/installer.rkt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt -index b1691472..9ef06c53 100644 ---- a/gui-lib/mred/installer.rkt -+++ b/gui-lib/mred/installer.rkt -@@ -72,4 +72,5 @@ - (list "-A" (path->string (find-system-path 'addon-dir))))) - - (define (config-flags) -- (list "-G" (path->string (find-config-dir)))) -+ (list "-X" (path->string (find-collects-dir)) -+ "-G" (path->string (find-config-dir)))) --- -2.32.0 - diff --git a/gnu/packages/patches/rapicorn-isnan.patch b/gnu/packages/patches/rapicorn-isnan.patch deleted file mode 100644 index b0e7819e64..0000000000 --- a/gnu/packages/patches/rapicorn-isnan.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e0c8341b3e4e13778bcde00d477e461ea8e94306 Mon Sep 17 00:00:00 2001 -From: Stefan Westerfeld <stefan@space.twc.de> -Date: Fri, 22 Apr 2016 18:03:37 +0200 -Subject: [PATCH 031/176] RCORE: compile fixes for KUbuntu 16.04/gcc - 5.3.1-14ubuntu2 - -Rapicorn uses isnan(...) and isinf(...) from cmath.h, however on KUbuntu 16.04 -it should use std::isnan(...) and std::isinf(...) instead. Patch below. - -Acked-by: Tim Janik <timj@gnu.org> ---- - rcore/strings.cc | 10 +++++----- - rcore/tests/benchrcore.cc | 4 ++-- - rcore/tests/strings.cc | 4 ++-- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/rcore/strings.cc b/rcore/strings.cc -index d5b0216..8b3bc3f 100644 ---- a/rcore/strings.cc -+++ b/rcore/strings.cc -@@ -437,7 +437,7 @@ static long double - libc_strtold (const char *nptr, char **endptr) - { - const long double result = strtold (nptr, endptr); -- if (isnan (result) && std::signbit (result) == 0) -+ if (std::isnan (result) && std::signbit (result) == 0) - { - const char *p = nptr; - while (isspace (*p)) -@@ -500,9 +500,9 @@ string_to_double (const char *dblstring, const char **endptr) - String - string_from_float (float value) - { -- if (isnan (value)) -+ if (std::isnan (value)) - return std::signbit (value) ? "-NaN" : "+NaN"; -- if (isinf (value)) -+ if (std::isinf (value)) - return std::signbit (value) ? "-Infinity" : "+Infinity"; - return string_format ("%.7g", value); - } -@@ -511,9 +511,9 @@ string_from_float (float value) - String - string_from_double (double value) - { -- if (isnan (value)) -+ if (std::isnan (value)) - return std::signbit (value) ? "-NaN" : "+NaN"; -- if (isinf (value)) -+ if (std::isinf (value)) - return std::signbit (value) ? "-Infinity" : "+Infinity"; - return string_format ("%.17g", value); - } -diff --git a/rcore/tests/benchrcore.cc b/rcore/tests/benchrcore.cc -index 3899a08..12fde16 100644 ---- a/rcore/tests/benchrcore.cc -+++ b/rcore/tests/benchrcore.cc -@@ -188,8 +188,8 @@ test_random_numbers() - const double rf = random_frange (989617512, 9876547656); - TASSERT (rf >= 989617512 && rf < 9876547656); - } -- TASSERT (isnan (random_frange (NAN, 1))); -- TASSERT (isnan (random_frange (0, NAN))); -+ TASSERT (std::isnan (random_frange (NAN, 1))); -+ TASSERT (std::isnan (random_frange (0, NAN))); - #if 0 // example penalty paid in random_int64() - size_t i, j = 0; - for (i = 0; i < 100; i++) -diff --git a/rcore/tests/strings.cc b/rcore/tests/strings.cc -index 468a6e6..dae3e3d 100644 ---- a/rcore/tests/strings.cc -+++ b/rcore/tests/strings.cc -@@ -311,9 +311,9 @@ string_conversions (void) - TCMP (string_to_double ("-0.5"), ==, -0.5); - double tfloat; - tfloat = string_to_double ("+NAN"); -- assert (isnan (tfloat) && std::signbit (tfloat) == 0); -+ assert (std::isnan (tfloat) && std::signbit (tfloat) == 0); - tfloat = string_to_double ("-NAN"); -- assert (isnan (tfloat) && std::signbit (tfloat) == 1); -+ assert (std::isnan (tfloat) && std::signbit (tfloat) == 1); - TCMP (string_capitalize ("fOO bar"), ==, "Foo Bar"); - TCMP (string_capitalize ("foo BAR BAZ", 2), ==, "Foo Bar BAZ"); - } --- -2.9.1 - diff --git a/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch b/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch new file mode 100644 index 0000000000..7f100d04bd --- /dev/null +++ b/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch @@ -0,0 +1,25 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 57924f1..0c59727 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -43,11 +43,6 @@ bench = false + version = "0.4" + optional = true + +-[dependencies.blas-src] +-version = "0.6.1" +-optional = true +-default-features = false +- + [dependencies.cblas-sys] + version = "0.1.4" + optional = true +@@ -92,7 +87,7 @@ version = "0.9" + default-features = false + + [features] +-blas = ["cblas-sys", "blas-src"] ++blas = ["cblas-sys"] + docs = ["approx", "serde", "rayon"] + serde-1 = ["serde"] + test = ["test-blas-openblas-sys"] diff --git a/gnu/packages/patches/sssd-collision-with-external-nss-symbol.patch b/gnu/packages/patches/sssd-collision-with-external-nss-symbol.patch deleted file mode 100644 index 9d59ae91be..0000000000 --- a/gnu/packages/patches/sssd-collision-with-external-nss-symbol.patch +++ /dev/null @@ -1,71 +0,0 @@ -From fe9eeb51be06059721e873f77092b1e9ba08e6c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com> -Date: Thu, 27 Feb 2020 06:50:40 +0100 -Subject: [PATCH] nss: Collision with external nss symbol -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -One of our internal static function names started -to collide with external nss symbol. Additional -sss_ suffix was added to avoid the collision. - -This is needed to unblock Fedora Rawhide's -SSSD build. - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> ---- - src/responder/nss/nss_cmd.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c -index 356aea1564..02706c4b94 100644 ---- a/src/responder/nss/nss_cmd.c -+++ b/src/responder/nss/nss_cmd.c -@@ -731,11 +731,13 @@ static void nss_getent_done(struct tevent_req *subreq) - talloc_free(cmd_ctx); - } - --static void nss_setnetgrent_done(struct tevent_req *subreq); -+static void sss_nss_setnetgrent_done(struct tevent_req *subreq); - --static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, -- enum cache_req_type type, -- nss_protocol_fill_packet_fn fill_fn) -+/* This function's name started to collide with external nss symbol, -+ * so it has additional sss_* prefix unlike other functions here. */ -+static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx, -+ enum cache_req_type type, -+ nss_protocol_fill_packet_fn fill_fn) - { - struct nss_ctx *nss_ctx; - struct nss_state_ctx *state_ctx; -@@ -777,7 +779,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, - goto done; - } - -- tevent_req_set_callback(subreq, nss_setnetgrent_done, cmd_ctx); -+ tevent_req_set_callback(subreq, sss_nss_setnetgrent_done, cmd_ctx); - - ret = EOK; - -@@ -790,7 +792,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, - return EOK; - } - --static void nss_setnetgrent_done(struct tevent_req *subreq) -+static void sss_nss_setnetgrent_done(struct tevent_req *subreq) - { - struct nss_cmd_ctx *cmd_ctx; - errno_t ret; -@@ -1040,8 +1042,8 @@ static errno_t nss_cmd_initgroups_ex(struct cli_ctx *cli_ctx) - - static errno_t nss_cmd_setnetgrent(struct cli_ctx *cli_ctx) - { -- return nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, -- nss_protocol_fill_setnetgrent); -+ return sss_nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, -+ nss_protocol_fill_setnetgrent); - } - - static errno_t nss_cmd_getnetgrent(struct cli_ctx *cli_ctx) diff --git a/gnu/packages/patches/sssd-fix-samba-4.15.3.patch b/gnu/packages/patches/sssd-fix-samba-4.15.3.patch deleted file mode 100644 index 731daa0ed9..0000000000 --- a/gnu/packages/patches/sssd-fix-samba-4.15.3.patch +++ /dev/null @@ -1,523 +0,0 @@ -From 3ba88c317fd64b69b000adbdf881c88383f325d1 Mon Sep 17 00:00:00 2001 -From: Noel Power <noel.power@suse.com> -Date: Tue, 24 Mar 2020 13:37:07 +0000 -Subject: [PATCH] Use ndr_pull_steal_switch_value for modern samba versions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -commit bc56b10aea999284458dcc293b54cf65288e325d attempted to -fix the build error resulting from removal of 'ndr_pull_get_switch' - -This change uses the new replacement method -'ndr_pull_steal_switch_value' however depending on the samba version -the ndr_pull_steal_switch_value abi is different. - -Note: ndr_pull_steal_switch_value is used since samba 4.10 for - the affected methods - -Note: the following methods have been refreshed from samba-4.12 generated - code; - - o ndr_pull_security_ace_object_type - o ndr_pull_security_ace_object_inherited_type - o ndr_pull_security_ace_object_ctr - -Signed-off-by: Noel Power <noel.power@suse.com> - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> -(cherry picked from commit 1fdd8fa2fded1985fbfc6aa67394eebcdbb6a2fc) - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> ---- - src/external/samba.m4 | 9 ++++++- - src/providers/ad/ad_gpo_ndr.c | 45 ++++++++++++++++++++--------------- - 2 files changed, 34 insertions(+), 20 deletions(-) - -diff --git a/src/external/samba.m4 b/src/external/samba.m4 -index 089f602a60..8e06174ead 100644 ---- a/src/external/samba.m4 -+++ b/src/external/samba.m4 -@@ -132,8 +132,15 @@ int main(void) - AC_DEFINE_UNQUOTED(SMB_IDMAP_DOMAIN_HAS_DOM_SID, 1, - [Samba's struct idmap_domain has dom_sid member]) - AC_MSG_NOTICE([Samba's struct idmap_domain has dom_sid member]) -+ if test $samba_minor_version -ge 12 ; then -+ AC_DEFINE_UNQUOTED(SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH, 1, -+ [Samba's new push/pull switch functions]) -+ AC_MSG_NOTICE([Samba has support for new ndr_push_steal_switch_value and ndr_pull_steal_switch_value functions]) -+ else -+ AC_MSG_NOTICE([Samba supports old ndr_pull_steal_switch_value and ndr_pull_steal_switch_value functions]) -+ fi - else - AC_MSG_NOTICE([Samba's struct idmap_domain does not have dom_sid member]) -+ AC_MSG_NOTICE([Samba supports old ndr_pull_steal_switch_value and ndr_pull_steal_switch_value functions]) - fi -- - fi - - SAVE_CFLAGS=$CFLAGS -diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c -index 49c49d71b2..3d389e513d 100644 ---- a/src/providers/ad/ad_gpo_ndr.c -+++ b/src/providers/ad/ad_gpo_ndr.c -@@ -105,9 +105,14 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr, - union security_ace_object_type *r) - { - uint32_t level; -- level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { -+ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ -+#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH -+ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); -+#else -+ level = ndr_pull_steal_switch_value(ndr, r); -+#endif - NDR_CHECK(ndr_pull_union_align(ndr, 4)); - switch (level) { - case SEC_ACE_OBJECT_TYPE_PRESENT: { -@@ -117,14 +122,6 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr, - break; } - } - } -- if (ndr_flags & NDR_BUFFERS) { -- switch (level) { -- case SEC_ACE_OBJECT_TYPE_PRESENT: -- break; -- default: -- break; -- } -- } - return NDR_ERR_SUCCESS; - } - -@@ -135,9 +132,14 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, - union security_ace_object_inherited_type *r) - { - uint32_t level; -- level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { -+ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ -+#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH -+ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); -+#else -+ level = ndr_pull_steal_switch_value(ndr, r); -+#endif - NDR_CHECK(ndr_pull_union_align(ndr, 4)); - switch (level) { - case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { -@@ -149,14 +151,6 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, - break; } - } - } -- if (ndr_flags & NDR_BUFFERS) { -- switch (level) { -- case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: -- break; -- default: -- break; -- } -- } - return NDR_ERR_SUCCESS; - } - -@@ -198,9 +192,14 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, - union security_ace_object_ctr *r) - { - uint32_t level; -- level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { -+ /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */ -+#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH -+ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); -+#else -+ level = ndr_pull_steal_switch_value(ndr, r); -+#endif - NDR_CHECK(ndr_pull_union_align(ndr, 4)); - switch (level) { - case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { -@@ -224,6 +223,14 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, - } - } - if (ndr_flags & NDR_BUFFERS) { -+ if (!(ndr_flags & NDR_SCALARS)) { -+ /* We didn't get it above, and the token is not needed after this. */ -+#ifdef SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH -+ NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level)); -+#else -+ level = ndr_pull_steal_switch_value(ndr, r); -+#endif -+ } - switch (level) { - case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: - NDR_CHECK(ndr_pull_security_ace_object -From 5285a1896ee19bb8f1ff752380547bc6d7a43334 Mon Sep 17 00:00:00 2001 -From: Noel Power <noel.power@suse.com> -Date: Tue, 24 Mar 2020 18:14:34 +0000 -Subject: [PATCH] ad_gpo_ndr.c: refresh ndr_ methods from samba-4.12 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Noel Power <noel.power@suse.com> - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> -(cherry picked from commit c031adde4f532f39845a0efd78693600f1f8b2f4) - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> ---- - src/providers/ad/ad_gpo_ndr.c | 201 ++++++++++++++++++---------------- - 1 file changed, 106 insertions(+), 95 deletions(-) - -diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c -index 3d389e513d..a64b1a0f84 100644 ---- a/src/providers/ad/ad_gpo_ndr.c -+++ b/src/providers/ad/ad_gpo_ndr.c -@@ -177,8 +177,16 @@ ndr_pull_security_ace_object(struct ndr_pull *ndr, - NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); - } - if (ndr_flags & NDR_BUFFERS) { -+ NDR_CHECK(ndr_pull_set_switch_value -+ (ndr, -+ &r->type, -+ r->flags & SEC_ACE_OBJECT_TYPE_PRESENT)); - NDR_CHECK(ndr_pull_security_ace_object_type - (ndr, NDR_BUFFERS, &r->type)); -+ NDR_CHECK(ndr_pull_set_switch_value -+ (ndr, -+ &r->inherited_type, -+ r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); - NDR_CHECK(ndr_pull_security_ace_object_inherited_type - (ndr, NDR_BUFFERS, &r->inherited_type)); - } -@@ -342,7 +350,7 @@ ndr_pull_security_acl(struct ndr_pull *ndr, - (ndr, NDR_SCALARS, &r->revision)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces)); -- if (r->num_aces > 1000) { -+ if (r->num_aces > 2000) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } - size_aces_0 = r->num_aces; -@@ -408,107 +416,110 @@ ad_gpo_ndr_pull_security_descriptor(struct ndr_pull *ndr, - TALLOC_CTX *_mem_save_sacl_0; - uint32_t _ptr_dacl; - TALLOC_CTX *_mem_save_dacl_0; -- uint32_t _flags_save_STRUCT = ndr->flags; -- uint32_t _relative_save_offset; -- -- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); -- NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); -- if (ndr_flags & NDR_SCALARS) { -- NDR_CHECK(ndr_pull_align(ndr, 5)); -- NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, -+ { -+ uint32_t _flags_save_STRUCT = ndr->flags; -+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); -+ NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); -+ if (ndr_flags & NDR_SCALARS) { -+ NDR_CHECK(ndr_pull_align(ndr, 5)); -+ NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, -+ NDR_SCALARS, -+ &r->revision)); -+ NDR_CHECK(ndr_pull_security_descriptor_type(ndr, - NDR_SCALARS, -- &r->revision)); -- NDR_CHECK(ndr_pull_security_descriptor_type(ndr, -- NDR_SCALARS, -- &r->type)); -- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid)); -- if (_ptr_owner_sid) { -- NDR_PULL_ALLOC(ndr, r->owner_sid); -- NDR_CHECK(ndr_pull_relative_ptr1(ndr, -- r->owner_sid, -- _ptr_owner_sid)); -- } else { -- r->owner_sid = NULL; -- } -- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); -- if (_ptr_group_sid) { -- NDR_PULL_ALLOC(ndr, r->group_sid); -- NDR_CHECK(ndr_pull_relative_ptr1(ndr, -- r->group_sid, -- _ptr_group_sid)); -- } else { -- r->group_sid = NULL; -- } -- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl)); -- if (_ptr_sacl) { -- NDR_PULL_ALLOC(ndr, r->sacl); -- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl)); -- } else { -- r->sacl = NULL; -- } -- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl)); -- if (_ptr_dacl) { -- NDR_PULL_ALLOC(ndr, r->dacl); -- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl)); -- } else { -- r->dacl = NULL; -- } -- NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); -- } -- if (ndr_flags & NDR_BUFFERS) { -- if (r->owner_sid) { -- _relative_save_offset = ndr->offset; -- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid)); -- _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); -- NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0); -- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid)); -- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0); -- if (ndr->offset > ndr->relative_highest_offset) { -- ndr->relative_highest_offset = ndr->offset; -+ &r->type)); -+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid)); -+ if (_ptr_owner_sid) { -+ NDR_PULL_ALLOC(ndr, r->owner_sid); -+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, -+ r->owner_sid, -+ _ptr_owner_sid)); -+ } else { -+ r->owner_sid = NULL; - } -- ndr->offset = _relative_save_offset; -- } -- if (r->group_sid) { -- _relative_save_offset = ndr->offset; -- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid)); -- _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); -- NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); -- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid)); -- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); -- if (ndr->offset > ndr->relative_highest_offset) { -- ndr->relative_highest_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); -+ if (_ptr_group_sid) { -+ NDR_PULL_ALLOC(ndr, r->group_sid); -+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, -+ r->group_sid, -+ _ptr_group_sid)); -+ } else { -+ r->group_sid = NULL; - } -- ndr->offset = _relative_save_offset; -- } -- if (r->sacl) { -- _relative_save_offset = ndr->offset; -- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl)); -- _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr); -- NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0); -- NDR_CHECK(ndr_pull_security_acl(ndr, -- NDR_SCALARS|NDR_BUFFERS, -- r->sacl)); -- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0); -- if (ndr->offset > ndr->relative_highest_offset) { -- ndr->relative_highest_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl)); -+ if (_ptr_sacl) { -+ NDR_PULL_ALLOC(ndr, r->sacl); -+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl)); -+ } else { -+ r->sacl = NULL; - } -- ndr->offset = _relative_save_offset; -+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl)); -+ if (_ptr_dacl) { -+ NDR_PULL_ALLOC(ndr, r->dacl); -+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl)); -+ } else { -+ r->dacl = NULL; -+ } -+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); - } -- if (r->dacl) { -- _relative_save_offset = ndr->offset; -- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl)); -- _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr); -- NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0); -- NDR_CHECK(ndr_pull_security_acl(ndr, -- NDR_SCALARS|NDR_BUFFERS, -- r->dacl)); -- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0); -- if (ndr->offset > ndr->relative_highest_offset) { -- ndr->relative_highest_offset = ndr->offset; -+ if (ndr_flags & NDR_BUFFERS) { -+ if (r->owner_sid) { -+ uint32_t _relative_save_offset; -+ _relative_save_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid)); -+ _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); -+ NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0); -+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid)); -+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0); -+ if (ndr->offset > ndr->relative_highest_offset) { -+ ndr->relative_highest_offset = ndr->offset; -+ } -+ ndr->offset = _relative_save_offset; -+ } -+ if (r->group_sid) { -+ uint32_t _relative_save_offset; -+ _relative_save_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid)); -+ _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); -+ NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); -+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid)); -+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); -+ if (ndr->offset > ndr->relative_highest_offset) { -+ ndr->relative_highest_offset = ndr->offset; -+ } -+ ndr->offset = _relative_save_offset; -+ } -+ if (r->sacl) { -+ uint32_t _relative_save_offset; -+ _relative_save_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl)); -+ _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr); -+ NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0); -+ NDR_CHECK(ndr_pull_security_acl(ndr, -+ NDR_SCALARS|NDR_BUFFERS, -+ r->sacl)); -+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0); -+ if (ndr->offset > ndr->relative_highest_offset) { -+ ndr->relative_highest_offset = ndr->offset; -+ } -+ ndr->offset = _relative_save_offset; -+ } -+ if (r->dacl) { -+ uint32_t _relative_save_offset; -+ _relative_save_offset = ndr->offset; -+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl)); -+ _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr); -+ NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0); -+ NDR_CHECK(ndr_pull_security_acl(ndr, -+ NDR_SCALARS|NDR_BUFFERS, -+ r->dacl)); -+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0); -+ if (ndr->offset > ndr->relative_highest_offset) { -+ ndr->relative_highest_offset = ndr->offset; -+ } -+ ndr->offset = _relative_save_offset; - } -- ndr->offset = _relative_save_offset; - } -- - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -From d5809f6f41ec0dc3fd38f9e4ae917a38bf7dfa43 Mon Sep 17 00:00:00 2001 -From: Sumit Bose <sbose@redhat.com> -Date: Thu, 28 May 2020 15:02:43 +0200 -Subject: [PATCH] ad_gpo_ndr.c: more ndr updates -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch add another update to the ndr code which was previously -updated by commit c031adde4f532f39845a0efd78693600f1f8b2f4 and -1fdd8fa2fded1985fbfc6aa67394eebcdbb6a2fc. - -As missing update in ndr_pull_security_ace() cased -a failure in ad_gpo_parse_sd(). A unit-test for ad_gpo_parse_sd() was -added to prevent similar issues in future. - -Resolves: https://github.com/SSSD/sssd/issues/5183 - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> -(cherry picked from commit a7c755672cd277497da3df4714f6d9457b6ac5ae) - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> ---- - src/providers/ad/ad_gpo_ndr.c | 1 + - src/tests/cmocka/test_ad_gpo.c | 57 ++++++++++++++++++++++++++++++++++ - 2 files changed, 58 insertions(+) - -diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c -index a64b1a0f84..9f040dfb03 100644 ---- a/src/providers/ad/ad_gpo_ndr.c -+++ b/src/providers/ad/ad_gpo_ndr.c -@@ -317,6 +317,7 @@ ndr_pull_security_ace(struct ndr_pull *ndr, - ndr->offset += pad; - } - if (ndr_flags & NDR_BUFFERS) { -+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->type)); - NDR_CHECK(ndr_pull_security_ace_object_ctr - (ndr, NDR_BUFFERS, &r->object)); - } -diff --git a/src/tests/cmocka/test_ad_gpo.c b/src/tests/cmocka/test_ad_gpo.c -index 0589adcc3d..97dbe01794 100644 ---- a/src/tests/cmocka/test_ad_gpo.c -+++ b/src/tests/cmocka/test_ad_gpo.c -@@ -329,6 +329,60 @@ void test_ad_gpo_ace_includes_client_sid_false(void **state) - ace_dom_sid, false); - } - -+uint8_t test_sid_data[] = { -+0x01, 0x00, 0x04, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x34, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, -+0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, -+0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x00, 0x02, 0x00, 0x00, -+0x00, 0x0a, 0x24, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, -+0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, -+0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, -+0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, -+0xb5, 0x57, 0x47, 0xf8, 0x07, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x24, 0x00, 0xff, 0x00, 0x0f, 0x00, -+0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0xda, 0x0e, 0xba, 0x60, -+0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, -+0xbd, 0x00, 0x0e, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, -+0xda, 0x0e, 0xba, 0x60, 0x0f, 0xa2, 0xf4, 0x55, 0xb5, 0x57, 0x47, 0xf8, 0x00, 0x02, 0x00, 0x00, -+0x00, 0x0a, 0x14, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, -+0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0xff, 0x00, 0x0f, 0x00, 0x01, 0x01, 0x00, 0x00, -+0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x94, 0x00, 0x02, 0x00, -+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x02, 0x28, 0x00, -+0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x8f, 0xfd, 0xac, 0xed, 0xb3, 0xff, 0xd1, 0x11, -+0xb4, 0x1d, 0x00, 0xa0, 0xc9, 0x68, 0xf9, 0x39, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, -+0x0b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x94, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, -+0x00, 0x00, 0x00, 0x05, 0x09, 0x00, 0x00, 0x00 -+}; -+ -+void test_ad_gpo_parse_sd(void **state) -+{ -+ int ret; -+ struct security_descriptor *sd = NULL; -+ -+ ret = ad_gpo_parse_sd(test_ctx, NULL, 0, &sd); -+ assert_int_equal(ret, EINVAL); -+ -+ ret = ad_gpo_parse_sd(test_ctx, test_sid_data, sizeof(test_sid_data), &sd); -+ assert_int_equal(ret, EOK); -+ assert_non_null(sd); -+ assert_int_equal(sd->revision, 1); -+ assert_int_equal(sd->type, 39940); -+ assert_null(sd->owner_sid); -+ assert_null(sd->group_sid); -+ assert_null(sd->sacl); -+ assert_non_null(sd->dacl); -+ assert_int_equal(sd->dacl->revision, 4); -+ assert_int_equal(sd->dacl->size, 308); -+ assert_int_equal(sd->dacl->num_aces, 10); -+ assert_int_equal(sd->dacl->aces[0].type, 0); -+ assert_int_equal(sd->dacl->aces[0].flags, 0); -+ assert_int_equal(sd->dacl->aces[0].size, 36); -+ assert_int_equal(sd->dacl->aces[0].access_mask, 917693); -+ /* There are more components and ACEs in the security_descriptor struct -+ * which are not checked here. */ -+ -+ talloc_free(sd); -+} -+ - int main(int argc, const char *argv[]) - { - poptContext pc; -@@ -364,6 +418,9 @@ int main(int argc, const char *argv[]) - cmocka_unit_test_setup_teardown(test_ad_gpo_ace_includes_client_sid_false, - ad_gpo_test_setup, - ad_gpo_test_teardown), -+ cmocka_unit_test_setup_teardown(test_ad_gpo_parse_sd, -+ ad_gpo_test_setup, -+ ad_gpo_test_teardown), - }; - - /* Set debug level to invalid value so we can decide if -d 0 was used. */ diff --git a/gnu/packages/patches/sssd-fix-samba.patch b/gnu/packages/patches/sssd-fix-samba.patch deleted file mode 100644 index 714968337a..0000000000 --- a/gnu/packages/patches/sssd-fix-samba.patch +++ /dev/null @@ -1,50 +0,0 @@ -From bc56b10aea999284458dcc293b54cf65288e325d Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher <sgallagh@redhat.com> -Date: Fri, 24 Jan 2020 15:17:39 +0100 -Subject: [PATCH] Fix build failure against samba 4.12.0rc1 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The ndr_pull_get_switch() function was dropped, but it was just a wrapper -around the ndr_token_peek() function, so we can use this approach on both -old and new versions of libndr. - -Signed-off-by: Stephen Gallagher <sgallagh@redhat.com> - -Reviewed-by: Pavel Březina <pbrezina@redhat.com> ---- - src/providers/ad/ad_gpo_ndr.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c -index d573033494..8f405aa62b 100644 ---- a/src/providers/ad/ad_gpo_ndr.c -+++ b/src/providers/ad/ad_gpo_ndr.c -@@ -105,7 +105,7 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr, - union security_ace_object_type *r) - { - uint32_t level; -- level = ndr_pull_get_switch_value(ndr, r); -+ level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_union_align(ndr, 4)); -@@ -135,7 +135,7 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, - union security_ace_object_inherited_type *r) - { - uint32_t level; -- level = ndr_pull_get_switch_value(ndr, r); -+ level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_union_align(ndr, 4)); -@@ -198,7 +198,7 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, - union security_ace_object_ctr *r) - { - uint32_t level; -- level = ndr_pull_get_switch_value(ndr, r); -+ level = ndr_token_peek(&ndr->switch_list, r); - NDR_PULL_CHECK_FLAGS(ndr, ndr_flags); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_union_align(ndr, 4)); diff --git a/gnu/packages/patches/sssd-optional-systemd.patch b/gnu/packages/patches/sssd-optional-systemd.patch new file mode 100644 index 0000000000..0784fdc7aa --- /dev/null +++ b/gnu/packages/patches/sssd-optional-systemd.patch @@ -0,0 +1,45 @@ +Allow running sss_analyze without Python modules for systemd. +Upstream PR: https://github.com/SSSD/sssd/pull/6125 + +diff --git a/src/tools/analyzer/modules/request.py b/src/tools/analyzer/modules/request.py +index b96a23c05..28ac2f194 100644 +--- a/src/tools/analyzer/modules/request.py ++++ b/src/tools/analyzer/modules/request.py +@@ -1,8 +1,6 @@ + import re + import logging + +-from sssd.source_files import Files +-from sssd.source_journald import Journald + from sssd.parser import SubparsersAction + from sssd.parser import Option + +@@ -77,8 +75,10 @@ class RequestAnalyzer: + Instantiated source object + """ + if args.source == "journald": ++ from sssd.source_journald import Journald + source = Journald() + else: ++ from sssd.source_files import Files + source = Files(args.logdir) + return source + +@@ -143,7 +143,7 @@ class RequestAnalyzer: + self.consumed_logs.append(line.rstrip(line[-1])) + else: + # files source includes newline +- if isinstance(source, Files): ++ if type(source).__name__ == 'Files': + print(line, end='') + else: + print(line) +@@ -225,7 +225,7 @@ class RequestAnalyzer: + source.set_component(component, False) + self.done = "" + for line in self.matched_line(source, patterns): +- if isinstance(source, Journald): ++ if type(source).__name__ == 'Journald': + print(line) + else: + self.print_formatted(line, args.verbose) diff --git a/gnu/packages/patches/sssd-system-directories.patch b/gnu/packages/patches/sssd-system-directories.patch index f2ab0182e1..ce0dcf5d4d 100644 --- a/gnu/packages/patches/sssd-system-directories.patch +++ b/gnu/packages/patches/sssd-system-directories.patch @@ -1,29 +1,29 @@ Do not attempt to create $localstatedir and $sysconfdir (i.e., /var and /etc) upon "make install". -diff --git a/Makefile.in b/Makefile.in -index c32cb7d..77a5c00 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -7991,7 +7991,7 @@ sssdconfdir = $(sysconfdir)/sssd - sssddatadir = $(datadir)/sssd +diff --git a/Makefile.am b/Makefile.am +index 0de53a2c8..51ad57bf1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -58,7 +58,7 @@ sssddatadir = $(datadir)/sssd sssdapiplugindir = $(sssddatadir)/sssd.api.d sssdtapscriptdir = $(sssddatadir)/systemtap + krb5snippetsdir = $(sssddatadir)/krb5-snippets -dbuspolicydir = $(sysconfdir)/dbus-1/system.d +dbuspolicydir = $(prefix)/etc/dbus-1/system.d dbusservicedir = $(datadir)/dbus-1/system-services sss_statedir = $(localstatedir)/lib/sss - pamlibdir = @pammoddir@ -@@ -8000,7 +8000,7 @@ nfslibdir = @nfsidmaplibdir@ - keytabdir = $(sss_statedir)/keytabs - pkgconfigdir = $(libdir)/pkgconfig + runstatedir = @runstatedir@ +@@ -85,7 +85,7 @@ pkgconfigdir = $(libdir)/pkgconfig + krb5rcachedir = @krb5rcachedir@ sudolibdir = @sudolibpath@ + polkitdir = @polkitdir@ -pamconfdir = $(sysconfdir)/pam.d +pamconfdir = $(prefix)/etc/pam.d systemtap_tapdir = @tapset_dir@ sssdkcmdatadir = $(datadir)/sssd-kcm deskprofilepath = $(sss_statedir)/deskprofile -@@ -43733,7 +43733,6 @@ installsssddirs:: +@@ -5195,7 +5195,6 @@ installsssddirs:: $(DESTDIR)$(bindir) \ $(DESTDIR)$(sbindir) \ $(DESTDIR)$(mandir) \ @@ -31,15 +31,18 @@ index c32cb7d..77a5c00 100644 $(DESTDIR)$(pluginpath) \ $(DESTDIR)$(libdir)/ldb \ $(DESTDIR)$(dbuspolicydir) \ -@@ -43743,22 +43742,9 @@ installsssddirs:: +@@ -5205,24 +5204,12 @@ installsssddirs:: $(DESTDIR)$(sssddatadir) \ $(DESTDIR)$(sudolibdir) \ $(DESTDIR)$(autofslibdir) \ - $(DESTDIR)$(pipepath)/private \ + $(DESTDIR)$(krb5snippetsdir) \ - $(SSSD_USER_DIRS) \ $(NULL); - @SSSD_USER_TRUE@ -chown $(SSSD_USER):$(SSSD_USER) $(SSSD_USER_DIRS) - @SSSD_USER_TRUE@ -chown $(SSSD_USER) $(DESTDIR)$(pipepath)/private + if SSSD_USER + -chown $(SSSD_USER):$(SSSD_USER) $(SSSD_USER_DIRS) + -chown $(SSSD_USER) $(DESTDIR)$(pipepath)/private + endif - $(INSTALL) -d -m 0700 $(DESTDIR)$(dbpath) $(DESTDIR)$(logpath) \ - $(DESTDIR)$(keytabdir) \ - $(NULL) @@ -50,7 +53,14 @@ index c32cb7d..77a5c00 100644 - $(INSTALL) -d -m 0711 $(DESTDIR)$(sssdconfdir) \ - $(DESTDIR)$(sssdconfdir)/conf.d \ - $(DESTDIR)$(sssdconfdir)/pki --@BUILD_SECRETS_TRUE@ $(MKDIR_P) $(DESTDIR)$(secdbpath) - @HAVE_DOXYGEN_TRUE@docs: - @HAVE_DOXYGEN_TRUE@ $(DOXYGEN) src/doxy.config + if HAVE_DOXYGEN + docs: +@@ -5338,7 +5325,6 @@ if BUILD_SAMBA + endif + if BUILD_KCM + $(MKDIR_P) $(DESTDIR)/$(sssdkcmdatadir) +- $(MKDIR_P) $(DESTDIR)$(secdbpath) + endif + + uninstall-hook: diff --git a/gnu/packages/patches/tor-sandbox-i686.patch b/gnu/packages/patches/tor-sandbox-i686.patch deleted file mode 100644 index 34b0a053b1..0000000000 --- a/gnu/packages/patches/tor-sandbox-i686.patch +++ /dev/null @@ -1,36 +0,0 @@ -This patch fixes sandboxing on i686 by allowing 'statx'. Without this, -'src/test/test_include.sh' would fail. - -Patch adapted from: - - https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/480 - -From 001d880d1082f5d124e10554e2718e407c7e88c6 Mon Sep 17 00:00:00 2001 -From: Simon South <simon@simonsouth.net> -Date: Fri, 5 Nov 2021 10:10:10 -0400 -Subject: [PATCH] sandbox: Allow "statx" syscall on i386 for glibc 2.33 - -glibc versions 2.33 and newer use the modern "statx" system call in their -implementations of stat() and opendir() for Linux on i386. Prevent failures in -the sandbox unit tests by modifying the sandbox to allow this system call -without restriction on i386 when it is available, and update the test suite to -skip the "sandbox/stat_filename" test in this case as it is certain to fail. ---- - src/lib/sandbox/sandbox.c | 3 +++ - src/test/test_sandbox.c | 7 ++++--- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c -index fb02a345ab..a15f99ad76 100644 ---- a/src/lib/sandbox/sandbox.c -+++ b/src/lib/sandbox/sandbox.c -@@ -252,6 +252,9 @@ static int filter_nopar_gen[] = { - SCMP_SYS(sigreturn), - #endif - SCMP_SYS(stat), -+#if defined(__i386__) && defined(__NR_statx) -+ SCMP_SYS(statx), -+#endif - SCMP_SYS(uname), - SCMP_SYS(wait4), - SCMP_SYS(write), diff --git a/gnu/packages/patches/tremc-fix-decodestring.patch b/gnu/packages/patches/tremc-fix-decodestring.patch deleted file mode 100644 index 346f65e611..0000000000 --- a/gnu/packages/patches/tremc-fix-decodestring.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 79995bc82e81f0429222aab4d90a03440feef057 Mon Sep 17 00:00:00 2001 -From: Matan Ziv-Av <matan@svgalib.org> -Date: Mon, 29 Jun 2020 15:18:03 +0300 -Subject: [PATCH] Use base64.decodebytes. - -Based on upstream commit 79995bc82e81f0429222aab4d90a03440feef057 which -confuses several unrelated changes. - ---- - tremc | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -diff --git a/tremc b/tremc -index b47f012..c626fde 100755 ---- a/tremc -+++ b/tremc -@@ -440,7 +443,7 @@ class Transmission(object): - # TAG_TORRENT_DETAILS, but just passing seems to help.(?) - try: - torrent_details = response['arguments']['torrents'][0] -- torrent_details['pieces'] = base64.decodestring(bytes(torrent_details['pieces'], ENCODING)) -+ torrent_details['pieces'] = base64.decodebytes(bytes(torrent_details['pieces'], ENCODING)) - self.torrent_details_cache = torrent_details - self.upgrade_peerlist() - except IndexError: diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch index e3ec92be84..73e5878546 100644 --- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch +++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch @@ -1,39 +1,15 @@ -From f060e90d148270307228315e2759a0065ec1d796 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@debian.org> Date: Fri, 22 Oct 2021 17:34:53 -0700 Subject: [PATCH] Revert "tools: kwbimage: Do not hide usage of secure header under CONFIG_ARMADA_38X" This reverts commit b4f3cc2c42d97967a3a3c8796c340f6b07ecccac. ---- - tools/Makefile | 8 ++++++++ - tools/kwbimage.c | 22 ++++++++++++++++++++++ - 2 files changed, 30 insertions(+) -diff --git a/tools/Makefile b/tools/Makefile -index 4a86321f64..9517f203fd 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -169,6 +169,14 @@ HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff - HOST_EXTRACFLAGS += -DCONFIG_FIT_CIPHER - endif - -+ifneq ($(CONFIG_SYS_U_BOOT_OFFS),) -+HOSTCFLAGS_kwbimage.o += -DCONFIG_SYS_U_BOOT_OFFS=$(CONFIG_SYS_U_BOOT_OFFS) -+endif -+ -+ifneq ($(CONFIG_ARMADA_38X),) -+HOSTCFLAGS_kwbimage.o += -DCONFIG_KWB_SECURE -+endif -+ - # MXSImage needs LibSSL - ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_TOOLS_LIBCRYPTO),) - HOSTCFLAGS_kwbimage.o += \ diff --git a/tools/kwbimage.c b/tools/kwbimage.c -index d200ff2425..23d6be3c9a 100644 +index 94b7685392..eec599b0ee 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c -@@ -14,6 +14,7 @@ +@@ -19,6 +19,7 @@ #include <stdint.h> #include "kwbimage.h" @@ -41,12 +17,16 @@ index d200ff2425..23d6be3c9a 100644 #include <openssl/bn.h> #include <openssl/rsa.h> #include <openssl/pem.h> -@@ -39,10 +40,13 @@ void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) +@@ -44,6 +45,7 @@ void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) EVP_MD_CTX_reset(ctx); } #endif +#endif + /* fls - find last (most-significant) bit set in 4-bit integer */ + static inline int fls4(int num) +@@ -62,7 +64,9 @@ static inline int fls4(int num) + static struct image_cfg_element *image_cfg; static int cfgn; +#ifdef CONFIG_KWB_SECURE @@ -55,7 +35,7 @@ index d200ff2425..23d6be3c9a 100644 struct boot_mode { unsigned int id; -@@ -237,6 +241,8 @@ image_count_options(unsigned int optiontype) +@@ -278,6 +282,8 @@ image_count_options(unsigned int optiontype) return count; } @@ -64,16 +44,15 @@ index d200ff2425..23d6be3c9a 100644 static int image_get_csk_index(void) { struct image_cfg_element *e; -@@ -259,6 +265,8 @@ static bool image_get_spezialized_img(void) - return e->sec_specialized_img; - } +@@ -288,6 +294,7 @@ static int image_get_csk_index(void) + return e->csk_idx; + } +#endif -+ - /* - * Compute a 8-bit checksum of a memory area. This algorithm follows - * the requirements of the Marvell SoC BootROM specifications. -@@ -353,6 +361,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate) + + static bool image_get_spezialized_img(void) + { +@@ -432,6 +439,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate) } } @@ -81,18 +60,17 @@ index d200ff2425..23d6be3c9a 100644 static void kwb_msg(const char *fmt, ...) { if (verbose_mode) { -@@ -847,6 +856,8 @@ done: +@@ -926,6 +934,7 @@ static int kwb_dump_fuse_cmds(struct secure_hdr_v1 *sec_hdr) + done: return ret; } - +#endif -+ - static void *image_create_v0(size_t *imagesz, struct image_tool_params *params, - int payloadsz) + + static size_t image_headersz_align(size_t headersz, uint8_t blockid) { -@@ -977,11 +988,13 @@ static size_t image_headersz_v1(int *hasext) - *hasext = 1; - } +@@ -1079,11 +1088,13 @@ static size_t image_headersz_v1(int *hasext) + */ + headersz = sizeof(struct main_hdr_v1); +#if defined(CONFIG_KWB_SECURE) if (image_get_csk_index() >= 0) { @@ -102,28 +80,27 @@ index d200ff2425..23d6be3c9a 100644 } +#endif - /* - * The payload should be aligned on some reasonable -@@ -1058,6 +1071,8 @@ err_close: + cpu_sheeva = image_is_cpu_sheeva(); + +@@ -1270,6 +1281,7 @@ err_close: return -1; } +#if defined(CONFIG_KWB_SECURE) -+ - int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr) + static int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr) { FILE *hashf; -@@ -1170,6 +1185,7 @@ int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr, +@@ -1382,6 +1394,7 @@ static int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr, return 0; } +#endif - static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, - uint8_t *ptr, int payloadsz) -@@ -1177,7 +1193,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, - struct image_cfg_element *e; + static void finish_register_set_header_v1(uint8_t **cur, uint8_t **next_ext, + struct register_set_hdr_v1 *register_set_hdr, +@@ -1406,7 +1419,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, struct main_hdr_v1 *main_hdr; + struct opt_hdr_v1 *ohdr; struct register_set_hdr_v1 *register_set_hdr; +#if defined(CONFIG_KWB_SECURE) struct secure_hdr_v1 *secure_hdr = NULL; @@ -131,7 +108,7 @@ index d200ff2425..23d6be3c9a 100644 size_t headersz; uint8_t *image, *cur; int hasext = 0; -@@ -1253,6 +1271,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, +@@ -1491,6 +1506,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, if (main_hdr->blockid == IBR_HDR_PEX_ID) main_hdr->srcaddr = cpu_to_le32(0xFFFFFFFF); @@ -139,26 +116,24 @@ index d200ff2425..23d6be3c9a 100644 if (image_get_csk_index() >= 0) { /* * only reserve the space here; we fill the header later since -@@ -1263,6 +1282,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, +@@ -1501,7 +1517,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, *next_ext = 1; next_ext = &secure_hdr->next; } +- +#endif - datai = 0; - register_set_hdr = (struct register_set_hdr_v1 *)cur; -@@ -1310,9 +1330,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, - return NULL; + for (cfgi = 0; cfgi < cfgn; cfgi++) { + e = &image_cfg[cfgi]; +@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, + &datai, delay); } +#if defined(CONFIG_KWB_SECURE) - if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz, + if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz, headersz, image, secure_hdr)) return NULL; +#endif - /* Calculate and set the header checksum */ - main_hdr->checksum = image_checksum8(main_hdr, headersz); --- -2.30.2 - + *imagesz = headersz; + diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch deleted file mode 100644 index 468024ab00..0000000000 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3fc056f0b9f7c26e58a1e947c8c0184e55919614 Mon Sep 17 00:00:00 2001 -From: David Abdurachmanov <david.abdurachmanov@gmail.com> -Date: Wed, 21 Aug 2019 12:07:20 -0700 -Subject: [PATCH] qemu-riscv64_smode, sifive-fu540: fix extlinux (define - preboot) -Forwarded: https://patchwork.ozlabs.org/patch/1151125/ - -Commit 37304aaf60bf92a5dc3ef222ba520698bd862a44 removed preboot -commands in RISC-V targets and broke extlinux support as reported -by Fu Wei <wefu@redhat.com>. - -The patch finishes migration of CONFIG_USE_PREBOOT and CONFIG_REBOOT -to Kconfig. - -Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com> ---- - configs/qemu-riscv64_smode_defconfig | 2 ++ - configs/sifive_fu540_defconfig | 2 ++ - 3 files changed, 4 insertions(+), 4 deletions(-) - -Index: u-boot/configs/qemu-riscv64_smode_defconfig -=================================================================== ---- u-boot.orig/configs/qemu-riscv64_smode_defconfig -+++ u-boot/configs/qemu-riscv64_smode_defconfig -@@ -14,3 +14,5 @@ CONFIG_CMD_NVEDIT_EFI=y - CONFIG_OF_PRIOR_STAGE=y - CONFIG_SYS_RELOC_GD_ENV_ADDR=y - CONFIG_DM_MTD=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" -Index: u-boot/configs/sifive_fu540_defconfig -=================================================================== ---- u-boot.orig/configs/sifive_unleashed_defconfig -+++ u-boot/configs/sifive_unleashed_defconfig -@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y - CONFIG_SPL_CLK=y - CONFIG_DM_MTD=y - CONFIG_DM_RESET=y -+CONFIG_USE_PREBOOT=y -+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch index 831e2b899c..b39cf1281b 100644 --- a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch +++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch @@ -6,8 +6,8 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -141,6 +141,12 @@ config("perfetto_config") { - } +@@ -184,6 +184,12 @@ buildflag_header("ios_cronet_buildflags") { + flags = [ "CRONET_BUILD=$is_cronet_build" ] } +if (is_linux) { @@ -19,7 +19,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn # Base and everything it depends on should be a static library rather than # a source set. Base is more of a "library" in the classic sense in that many # small parts of it are used in many different contexts. This combined with a -@@ -759,8 +765,6 @@ component("base") { +@@ -838,8 +844,6 @@ mixed_component("base") { "third_party/cityhash_v103/src/city_v103.cc", "third_party/cityhash_v103/src/city_v103.h", "third_party/icu/icu_utf.h", @@ -31,10 +31,10 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/base/time/pr_time_unittest.cc b/base/time/pr_time_unittest.cc --- a/base/time/pr_time_unittest.cc +++ b/base/time/pr_time_unittest.cc -@@ -7,7 +7,7 @@ +@@ -6,7 +6,7 @@ + #include <time.h> #include "base/compiler_specific.h" - #include "base/cxx17_backports.h" -#include "base/third_party/nspr/prtime.h" +#include <nspr/prtime.h> #include "base/time/time.h" @@ -43,7 +43,7 @@ diff --git a/base/time/pr_time_unittest.cc b/base/time/pr_time_unittest.cc diff --git a/base/time/time.cc b/base/time/time.cc --- a/base/time/time.cc +++ b/base/time/time.cc -@@ -18,7 +18,7 @@ +@@ -21,7 +21,7 @@ #include <utility> #include "base/strings/stringprintf.h" diff --git a/gnu/packages/patches/valgrind-fix-default-debuginfo-path.patch b/gnu/packages/patches/valgrind-fix-default-debuginfo-path.patch new file mode 100644 index 0000000000..f78dec02dc --- /dev/null +++ b/gnu/packages/patches/valgrind-fix-default-debuginfo-path.patch @@ -0,0 +1,100 @@ +From a7f17b57a94e9cde6d7fa96ac86be5c4fc4f9211 Mon Sep 17 00:00:00 2001 +From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +Date: Sun, 24 Apr 2022 22:20:50 +0200 +Subject: [PATCH] valgrind: fix default debuginfo path + +Description: Workaround for missing symbol in Guix's ld.so. The + correct fix (not stripping all the ld.so symbols) will be done in the + next Guix release as it requires to recompile a lot of packages. + +Forwarded: not-needed +Bug-Guix: https://issues.guix.gnu.org/54728 +Author: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +--- + coregrind/m_debuginfo/readelf.c | 11 ++++++----- + docs/xml/manual-core-adv.xml | 4 ++-- + docs/xml/manual-core.xml | 2 +- + 3 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c +index c586e3f33..947fcc500 100644 +--- a/coregrind/m_debuginfo/readelf.c ++++ b/coregrind/m_debuginfo/readelf.c +@@ -1509,9 +1509,9 @@ DiImage* find_debug_file( struct _DebugInfo* di, + + if (buildid != NULL) { + debugpath = ML_(dinfo_zalloc)("di.fdf.1", +- VG_(strlen)(buildid) + 33); ++ VG_(strlen)(buildid) + DEBUGPATH_EXTRA_BYTES_1); + +- VG_(sprintf)(debugpath, "/usr/lib/debug/.build-id/%c%c/%s.debug", ++ VG_(sprintf)(debugpath, "DEFAULT_DEBUGINFO_PATH/.build-id/%c%c/%s.debug", + buildid[0], buildid[1], buildid + 2); + + dimg = open_debug_file(debugpath, buildid, 0, rel_ok, NULL); +@@ -1536,7 +1536,8 @@ DiImage* find_debug_file( struct _DebugInfo* di, + + debugpath = ML_(dinfo_zalloc)( + "di.fdf.3", +- VG_(strlen)(objdir) + VG_(strlen)(debugname) + 64 ++ VG_(strlen)(objdir) + VG_(strlen)(debugname) ++ + VG_(strlen)("DEFAULT_DEBUGINFO_PATH/") + 1 + + (extrapath ? VG_(strlen)(extrapath) : 0) + + (serverpath ? VG_(strlen)(serverpath) : 0)); + +@@ -1561,7 +1562,7 @@ DiImage* find_debug_file( struct _DebugInfo* di, + + TRY_OBJDIR_USRMERGE_OBJDIR("%s/%s"); + TRY_OBJDIR_USRMERGE_OBJDIR("%s/.debug/%s"); +- TRY_OBJDIR_USRMERGE_OBJDIR("/usr/lib/debug%s/%s"); ++ TRY_OBJDIR_USRMERGE_OBJDIR("DEFAULT_DEBUGINFO_PATH%s/%s"); + + if (extrapath) { + TRY_OBJDIR("%s%s/%s", extrapath, objdir, debugname); +@@ -1631,7 +1632,7 @@ DiImage* find_debug_file_ad_hoc( const DebugInfo* di, + + debugpath = ML_(dinfo_zalloc)( + "di.fdfah.3", +- VG_(strlen)(objdir) + 64 ++ VG_(strlen)(objdir) + DEBUGPATH_EXTRA_BYTES_2 + + (extrapath ? VG_(strlen)(extrapath) : 0) + + (serverpath ? VG_(strlen)(serverpath) : 0)); + +diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml +index 1fa801edc..a7c01d5e6 100644 +--- a/docs/xml/manual-core-adv.xml ++++ b/docs/xml/manual-core-adv.xml +@@ -447,7 +447,7 @@ Valgrind embedded gdbserver:</para> + Remote debugging using | vgdb + relaying data between gdb and process 2418 + Reading symbols from /lib/ld-linux.so.2...done. +-Reading symbols from /usr/lib/debug/lib/ld-2.11.2.so.debug...done. ++Reading symbols from DEFAULT_DEBUGINFO_PATH/lib/ld-2.11.2.so.debug...done. + Loaded symbols for /lib/ld-linux.so.2 + [Switching to Thread 2418] + 0x001f2850 in _start () from /lib/ld-linux.so.2 +@@ -475,7 +475,7 @@ Remote communication error: Resource temporarily unavailable. + Remote debugging using | vgdb --pid=2479 + relaying data between gdb and process 2479 + Reading symbols from /lib/ld-linux.so.2...done. +-Reading symbols from /usr/lib/debug/lib/ld-2.11.2.so.debug...done. ++Reading symbols from DEFAULT_DEBUGINFO_PATH/lib/ld-2.11.2.so.debug...done. + Loaded symbols for /lib/ld-linux.so.2 + [Switching to Thread 2479] + 0x001f2850 in _start () from /lib/ld-linux.so.2 +diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml +index dc33e1269..f6eb60086 100644 +--- a/docs/xml/manual-core.xml ++++ b/docs/xml/manual-core.xml +@@ -1409,7 +1409,7 @@ that can report errors, e.g. Memcheck, but not Cachegrind.</para> + <listitem> + <para>By default Valgrind searches in several well-known paths + for debug objects, such +- as <computeroutput>/usr/lib/debug/</computeroutput>.</para> ++ as <computeroutput>DEFAULT_DEBUGINFO_PATH/</computeroutput>.</para> + + <para>However, there may be scenarios where you may wish to put + debug objects at an arbitrary location, such as external storage +-- +2.35.1 + diff --git a/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch b/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch new file mode 100644 index 0000000000..17413c71ae --- /dev/null +++ b/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch @@ -0,0 +1,117 @@ +This patch disables build targets that contain pre-built Java archives that +would be copied to the build's output. + +Patch by Roel Janssen <roel@gnu.org> +*** a-virtuoso-opensource-7.2.7/binsrc/Makefile.am 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/binsrc/Makefile.am 2022-05-27 12:20:52.909135774 +0200 +*************** +*** 19,25 **** + # + # + +! SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel fct tutorial conductor samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena jena2 jena3 jena4 sesame sesame2 sesame3 sesame4 redland hibernate dbpedia rdb2rdf rdf4j + + + # ---------------------------------------------------------------------- +--- 19,25 ---- + # + # + +! SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel fct tutorial conductor samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql redland dbpedia rdb2rdf + + + # ---------------------------------------------------------------------- +*** a-virtuoso-opensource-7.2.7/configure.ac 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/configure.ac 2022-05-27 12:27:51.879208018 +0200 +*************** +*** 57,64 **** + dnl AM_INIT_AUTOMAKE([1.8]) + dnl AM_INIT_AUTOMAKE([1.9 tar-ustar]) + dnl +! AM_INIT_AUTOMAKE([1.9 tar-ustar]) +! + AM_MAINTAINER_MODE + + +--- 57,63 ---- + dnl AM_INIT_AUTOMAKE([1.8]) + dnl AM_INIT_AUTOMAKE([1.9 tar-ustar]) + dnl +! AM_INIT_AUTOMAKE([1.9 tar-ustar subdir-objects]) + AM_MAINTAINER_MODE + + +*************** +*** 3157,3163 **** + binsrc/dbpedia/Makefile + binsrc/driver/Makefile + binsrc/fct/Makefile +- binsrc/hibernate/Makefile + binsrc/hosting/Makefile + binsrc/hosting/mono/Makefile + binsrc/hosting/mono/tests/Makefile +--- 3156,3161 ---- +*************** +*** 3169,3184 **** + binsrc/hosting/ruby/Makefile + binsrc/hosting/shapefileio/Makefile + binsrc/isparql/Makefile +- binsrc/jena/Makefile +- binsrc/jena2/Makefile +- binsrc/jena3/Makefile +- binsrc/jena4/Makefile + binsrc/maildrop/Makefile + binsrc/mono/Makefile + binsrc/oat/Makefile + binsrc/rdf_mappers/Makefile + binsrc/rdb2rdf/Makefile +- binsrc/rdf4j/Makefile + binsrc/redland/Makefile + binsrc/samples/demo/Makefile + binsrc/samples/hslookup/Makefile +--- 3167,3177 ---- +*************** +*** 3191,3200 **** + binsrc/samples/webapp/Makefile + binsrc/samples/xpath/Makefile + binsrc/samples/xquery/Makefile +- binsrc/sesame/Makefile +- binsrc/sesame2/Makefile +- binsrc/sesame3/Makefile +- binsrc/sesame4/Makefile + binsrc/sqldoc/Makefile + binsrc/sync/Makefile + binsrc/tests/biftest/Makefile +--- 3184,3189 ---- +*************** +*** 3236,3245 **** + docsrc/stylesheets/Makefile + docsrc/xmlsource/Makefile + libsrc/Dk/Makefile +- libsrc/JDBCDriverType4/Makefile +- libsrc/JDBCDriverType4/testsuite_4.0/Makefile +- libsrc/JDBCDriverType4/virtuoso/jdbc/Makefile +- libsrc/JDBCDriverType4/virtuoso/Makefile + libsrc/langfunc/Makefile + libsrc/odbcsdk/Makefile + libsrc/plugin/Makefile +--- 3225,3230 ---- +*** a-virtuoso-opensource-7.2.7/libsrc/Makefile.am 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/libsrc/Makefile.am 2022-05-27 12:30:12.658593011 +0200 +*************** +*** 19,25 **** + # + # + +! SUBDIRS = util zlib odbcsdk Dk Thread langfunc Wi plugin Tidy Xml.new JDBCDriverType4 + + noinst_HEADERS = Dk.h libutil.h + +--- 19,25 ---- + # + # + +! SUBDIRS = util zlib odbcsdk Dk Thread langfunc Wi plugin Tidy Xml.new + + noinst_HEADERS = Dk.h libutil.h + diff --git a/gnu/packages/patches/vtk-7-gcc-10-compat.patch b/gnu/packages/patches/vtk-7-gcc-10-compat.patch new file mode 100644 index 0000000000..50f9f6cca3 --- /dev/null +++ b/gnu/packages/patches/vtk-7-gcc-10-compat.patch @@ -0,0 +1,14 @@ +Retrieved from +https://sources.debian.org/src/vtk7/7.1.1%2Bdfsg2-10.1/debian/patches/. + +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/gnu/packages/patches/vtk-7-hdf5-compat.patch b/gnu/packages/patches/vtk-7-hdf5-compat.patch new file mode 100644 index 0000000000..1f3c0c7be4 --- /dev/null +++ b/gnu/packages/patches/vtk-7-hdf5-compat.patch @@ -0,0 +1,38 @@ +Description: The H5FD_class_t struct gained an extra member in 1.10 +Bug-Debian: https://bugs.debian.org/846372 +Author: Iain Lane <iain.lane@canonical.com> +--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx ++++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx +@@ -139,7 +139,11 @@ + #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type); ++#else + static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file); ++#endif + #else + static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr); +@@ -155,6 +159,9 @@ + "dsm", /*name */ + MAXADDR, /*maxaddr */ + H5F_CLOSE_WEAK, /*fc_degree */ ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++ NULL, /* terminate */ ++#endif + NULL, /*sb_size */ + NULL, /*sb_encode */ + NULL, /*sb_decode */ +@@ -687,7 +694,9 @@ + *------------------------------------------------------------------------- + */ + static haddr_t +-#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type) ++#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + H5FD_dsm_get_eof(const H5FD_t *_file) + #else + H5FD_dsm_get_eof(H5FD_t *_file) diff --git a/gnu/packages/patches/vtk-7-python-compat.patch b/gnu/packages/patches/vtk-7-python-compat.patch new file mode 100644 index 0000000000..375624e4e2 --- /dev/null +++ b/gnu/packages/patches/vtk-7-python-compat.patch @@ -0,0 +1,16 @@ +Author: Gert Wollny <gewo@debian.org> +Description: Work around compile bug with python 3.7.1 +Debian-Bug: https://bugs.debian.org/914347 +diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx +index 1b1e4b9..682f8b8 100644 +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast<char*>(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch deleted file mode 100644 index 27013180c4..0000000000 --- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream commit: https://github.com/WebKit/WebKit/commit/31ac354cbeecf866f9a38f7b2f8f59f7975d3f6a - -diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -index ecc804663784..8de174be3c0e 100644 ---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -@@ -288,6 +288,7 @@ static void bindFonts(Vector<CString>& args) - const char* homeDir = g_get_home_dir(); - const char* dataDir = g_get_user_data_dir(); - const char* cacheDir = g_get_user_cache_dir(); -+ const char* const * dataDirs = g_get_system_data_dirs(); - - // Configs can include custom dirs but then we have to parse them... - GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr)); -@@ -304,6 +305,10 @@ static void bindFonts(Vector<CString>& args) - bindIfExists(args, fontHomeConfigDir.get()); - bindIfExists(args, fontData.get()); - bindIfExists(args, fontHomeData.get()); -+ for (auto* dataDir = dataDirs; dataDir && *dataDir; dataDir++) { -+ GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr)); -+ bindIfExists(args, fontDataDir.get()); -+ } - bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian. - } - diff --git a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch deleted file mode 100644 index 741d534831..0000000000 --- a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch +++ /dev/null @@ -1,66 +0,0 @@ -Upstream commit: https://github.com/WebKit/WebKit/commit/6a87eb254ef57a986a1a6ce9a3a4b66928afeb65 - -diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -index ecc804663784..a2a1c9d7a4dd 100644 ---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -@@ -27,7 +27,6 @@ - #include <seccomp.h> - #include <sys/ioctl.h> - #include <sys/mman.h> --#include <unistd.h> - #include <wtf/FileSystem.h> - #include <wtf/UniStdExtras.h> - #include <wtf/glib/GRefPtr.h> -@@ -165,6 +164,15 @@ enum class BindFlags { - Device, - }; - -+static void bindSymlinksRealPath(Vector<CString>& args, const char* path, const char* bindOption = "--ro-bind") -+{ -+ WTF::String realPath = FileSystem::realPath(path); -+ if (path != realPath) { -+ CString rpath = realPath.utf8(); -+ args.appendVector(Vector<CString>({ bindOption, rpath.data(), rpath.data() })); -+ } -+} -+ - static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bindFlags = BindFlags::ReadOnly) - { - if (!path || path[0] == '\0') -@@ -177,7 +185,16 @@ static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bind - bindType = "--ro-bind-try"; - else - bindType = "--bind-try"; -- args.appendVector(Vector<CString>({ bindType, path, path })); -+ -+ // Canonicalize the source path, otherwise a symbolic link could -+ // point to a location outside of the namespace. -+ bindSymlinksRealPath(args, path, bindType); -+ -+ // As /etc is exposed wholesale, do not layer extraneous bind -+ // directives on top, which could fail in the presence of symbolic -+ // links. -+ if (!g_str_has_prefix(path, "/etc/")) -+ args.appendVector(Vector<CString>({ bindType, path, path })); - } - - static void bindDBusSession(Vector<CString>& args, bool allowPortals) -@@ -410,17 +427,6 @@ static void bindV4l(Vector<CString>& args) - })); - } - --static void bindSymlinksRealPath(Vector<CString>& args, const char* path) --{ -- char realPath[PATH_MAX]; -- -- if (realpath(path, realPath) && strcmp(path, realPath)) { -- args.appendVector(Vector<CString>({ -- "--ro-bind", realPath, realPath, -- })); -- } --} -- - // Translate a libseccomp error code into an error message. libseccomp - // mostly returns negative errno values such as -ENOMEM, but some - // standard errno values are used for non-standard purposes where their diff --git a/gnu/packages/patches/wicd-bitrate-none-fix.patch b/gnu/packages/patches/wicd-bitrate-none-fix.patch deleted file mode 100644 index 1809b7217d..0000000000 --- a/gnu/packages/patches/wicd-bitrate-none-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix copied from https://bugs.launchpad.net/wicd/+bug/1432423/comments/1 - ---- wicd-1.7.3/curses/netentry_curses.py 1969-12-31 19:00:00.000000000 -0500 -+++ wicd-1.7.3/curses/netentry_curses.py 2015-08-11 23:26:19.999999649 -0400 -@@ -538,11 +538,16 @@ - self.bitrates = wireless.GetAvailableBitrates() - self.bitrates.append('auto') - self.bitrate_combo.set_list(self.bitrates) -+ -+ # bitrate property is sometimes None -+ chosen_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate') -+ if chosen_bitrate not in self.bitrates: -+ chosen_bitrate = 'auto' -+ - self.bitrate_combo.set_focus( -- self.bitrates.index( -- wireless.GetWirelessProperty(networkID, 'bitrate') -- ) -+ self.bitrates.index(chosen_bitrate) - ) -+ - self.allow_lower_bitrates_chkbox.set_state( - to_bool(self.format_entry(networkID, 'allow_lower_bitrates')) - ) diff --git a/gnu/packages/patches/wicd-get-selected-profile-fix.patch b/gnu/packages/patches/wicd-get-selected-profile-fix.patch deleted file mode 100644 index 3042a87308..0000000000 --- a/gnu/packages/patches/wicd-get-selected-profile-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix copied from https://bugs.launchpad.net/wicd/+bug/1421918/comments/2 - ---- wicd-1.7.3/curses/wicd-curses.py 2014-12-21 16:57:33 +0000 -+++ wicd-1.7.3/curses/wicd-curses.py 2015-02-24 23:41:01 +0000 -@@ -532,7 +532,10 @@ - def get_selected_profile(self): - """Get the selected wired profile""" - loc = self.get_focus()[1] -- return self.theList[loc] -+ if len(self.theList) > loc: -+ return self.theList[loc] -+ else: -+ return self.theList[-1] - - - class AdHocDialog(Dialog2): diff --git a/gnu/packages/patches/wicd-urwid-1.3.patch b/gnu/packages/patches/wicd-urwid-1.3.patch deleted file mode 100644 index 1dc47f869b..0000000000 --- a/gnu/packages/patches/wicd-urwid-1.3.patch +++ /dev/null @@ -1,18 +0,0 @@ -Update the wicd-curses client to work with urwid-1.3. Based on a patch from: -http://technik.blogbasis.net/wicd-curses-fix-fuer-attributeerror-screen-object-no-attribute-get_input_nonblocking-04-12-2014 - ---- wicd-1.7.3/curses/wicd-curses.py.orig 2014-12-21 14:40:46.000000000 -0500 -+++ wicd-1.7.3/curses/wicd-curses.py 2015-02-05 23:41:17.530901204 -0500 -@@ -1153,9 +1153,10 @@ - if not ui._started: - return False - -- input_data = ui.get_input_nonblocking() -+ ui.set_input_timeouts(max_wait=0) -+ input_data = ui.get_input() - # Resolve any "alarms" in the waiting -- self.handle_keys(input_data[1]) -+ self.handle_keys(input_data) - - # Update the screen - canvas = self.frame.render((self.size), True) diff --git a/gnu/packages/patches/wicd-wpa2-ttls.patch b/gnu/packages/patches/wicd-wpa2-ttls.patch deleted file mode 100644 index 9d80ee7ed2..0000000000 --- a/gnu/packages/patches/wicd-wpa2-ttls.patch +++ /dev/null @@ -1,38 +0,0 @@ -Add a template for WPA2-TTLS, which is notably used by Eduroam. - ---- a/encryption/templates/active -+++ b/encryption/templates/active -@@ -4,6 +4,7 @@ wpa-psk - wpa-psk-hex - wpa2-leap - wpa2-peap -+wpa2-ttls - wep-hex - wep-passphrase - wep-shared -diff --git a/encryption/templates/wpa2-ttls b/encryption/templates/wpa2-ttls -new file mode 100644 -index 0000000..4f66a1e ---- /dev/null -+++ b/encryption/templates/wpa2-ttls -@@ -0,0 +1,20 @@ -+name = WPA2-TTLS (used notably by Eduroam) -+author = various contributors -+version = 1 -+require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert -+protected password *Password -+----- -+ctrl_interface=/var/run/wpa_supplicant -+network={ -+ ssid="$_ESSID" -+ scan_ssid=$_SCAN -+ proto=WPA2 -+ key_mgmt=WPA-EAP -+ group=CCMP TKIP -+ eap=TTLS -+ identity="$_IDENTITY" -+ password="$_PASSWORD" -+ anonymous_identity="$_ANONYMOUS_IDENTITY" -+ ca_cert="$_CA_CERT" -+ phase2="auth=PAP" -+} diff --git a/gnu/packages/patches/xterm-370-explicit-xcursor.patch b/gnu/packages/patches/xterm-370-explicit-xcursor.patch new file mode 100644 index 0000000000..2500ccf0c8 --- /dev/null +++ b/gnu/packages/patches/xterm-370-explicit-xcursor.patch @@ -0,0 +1,37 @@ +From: Danny Milosavljevic <dannym@scratchpost.org> +Date: Thu, 2 Apr 2022 12:10:00 +0200 +Subject: Make xterm use libxcursor directly + +Fixes <https://issues.guix.gnu.org/54654>. + +This patch makes xterm use libxcursor directly. +Without it, libx11 would try to dlopen("libXcursor.so.1") and fail. + +--- xterm-370/misc.c.orig 2022-04-02 11:52:26.225131854 +0200 ++++ xterm-370/misc.c 2022-04-02 12:06:13.091482385 +0200 +@@ -79,6 +79,9 @@ + #ifdef HAVE_LIBXPM + #include <X11/xpm.h> + #endif ++#ifdef HAVE_LIB_XCURSOR ++#include <X11/Xcursor/Xcursor.h> ++#endif + + #ifdef HAVE_LANGINFO_CODESET + #include <langinfo.h> +@@ -866,7 +869,14 @@ + * 0, 2 a shape, 3 a mask for 2, etc. <X11/cursorfont.h> + * contains defined names for each shape. + */ +- c = XCreateGlyphCursor(dpy, ++ c = XcursorTryShapeCursor(dpy, ++ myFont.fs->fid, /* source_font */ ++ myFont.fs->fid, /* mask_font */ ++ c_index + 0, /* source_char */ ++ c_index + 1, /* mask_char */ ++ &foreground, ++ &background); ++ if (c == None) c = XCreateGlyphCursor(dpy, + myFont.fs->fid, /* source_font */ + myFont.fs->fid, /* mask_font */ + c_index + 0, /* source_char */ diff --git a/gnu/packages/patches/ytfzf-programs.patch b/gnu/packages/patches/ytfzf-programs.patch deleted file mode 100644 index 005ce2cf99..0000000000 --- a/gnu/packages/patches/ytfzf-programs.patch +++ /dev/null @@ -1,643 +0,0 @@ -From 3f1eaf5a1645b28ca18cfa028417dc225b7a557f Mon Sep 17 00:00:00 2001 -From: Raghav Gururajan <rg@raghavgururajan.name> -Date: Mon, 5 Jul 2021 06:45:49 -0400 -Subject: [PATCH] Modify the strings of referenced programs. - -Pattern the strings of referenced programs, so that they can be easily -substituted with absolute paths using a custom-phase. - -Co-authored-by: jgart <jgart@dismail.de> ---- - ytfzf | 198 +++++++++++++++++++++++++++++----------------------------- - 1 file changed, 99 insertions(+), 99 deletions(-) - -diff --git a/ytfzf b/ytfzf -index f4d2e0d..e8bb60b 100755 ---- a/ytfzf -+++ b/ytfzf -@@ -49,17 +49,17 @@ cache_dir=${YTFZF_CACHE-${cache_dir-$HOME/.cache/ytfzf}} - #video type preference (mp4/1080p, mp4/720p, etc..) - video_pref=${YTFZF_PREF-${video_pref-}} - #the menu to use instead of fzf when -D is specified --external_menu=${YTFZF_EXTMENU-${external_menu-dmenu -i -l 30 -p Search:}} -+external_menu=${YTFZF_EXTMENU-${external_menu-@dmenu@ -i -l 30 -p Search:}} - #number of columns (characters on a line) the external menu can have - #necessary for formatting text for external menus - external_menu_len=${YTFZF_EXTMENU_LEN-${external_menu_len-220}} - #player settings (players need to support streaming with youtube-dl) - #player to use for watching the video --video_player=${YTFZF_PLAYER-${video_player-mpv}} -+video_player=${YTFZF_PLAYER-${video_player-@mpv@}} - #if YTFZF_PREF is specified, use this player instead --video_player_format=${YTFZF_PLAYER_FORMAT-${video_player_format-mpv --ytdl-format=}} -+video_player_format=${YTFZF_PLAYER_FORMAT-${video_player_format-@mpv@ --ytdl-format=}} - #player to use for audio only --audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-mpv --no-video}} -+audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-@mpv@ --no-video}} - #the command to use for displaying thumbnails - thumb_disp_method=${YTFZF_THUMB_DISP_METHOD-${thumb_disp_method-ueberzug}} - #Storing the argument and location for autogenerated subtitles -@@ -85,8 +85,8 @@ subscriptions_file=${subscriptions_file-$config_dir/subscriptions} - #> stores the pid of running ytfzf sessions - pid_file="$cache_dir/.pid" - #> make folders that don't exist --[ -d "$cache_dir" ] || mkdir -p "$cache_dir" --[ -d "$thumb_dir" ] || mkdir -p "$thumb_dir" -+[ -d "$cache_dir" ] || @mkdir@ -p "$cache_dir" -+[ -d "$thumb_dir" ] || @mkdir@ -p "$thumb_dir" - - #> config settings - #list of shortcuts to use in fzf -@@ -177,12 +177,12 @@ dep_ck () { - done - unset Dep - } --dep_ck "jq" "youtube-dl" "curl" -+dep_ck "@jq@" "@youtube-dl@" "@curl@" - - - #only check for mpv if $YTFZF_PLAYER is set to it - #don't check $YTFZF_PLAYER as it could be multiple commands --[ "$video_player" = "mpv" ] && dep_ck "mpv" -+[ "$video_player" = "@mpv@" ] && dep_ck "@mpv@" - - ############################ - # Help Texts # -@@ -326,8 +326,8 @@ print_info () { - } - - print_error () { -- [ $ext_menu_notifs -eq 1 ] && notify-send "error" "$*" || printf "\033[31m$*\033[0m" >&2 -- [ $ext_menu_notifs -eq 1 ] && notify-send "Check for new versions and report at: https://github.com/pystardust/ytfzf\n" || printf "Check for new versions and report at: https://github.com/pystardust/ytfzf\n" >&2 -+ [ $ext_menu_notifs -eq 1 ] && @notify-send@ "error" "$*" || printf "\033[31m$*\033[0m" >&2 -+ [ $ext_menu_notifs -eq 1 ] && @notify-send@ "Check for new versions and report at: https://github.com/pystardust/ytfzf\n" || printf "Check for new versions and report at: https://github.com/pystardust/ytfzf\n" >&2 - } - - ############################ -@@ -398,12 +398,12 @@ format_fzf () { - format_menu () { - if [ "$is_ext_menu" -eq 0 ]; then - #dep_ck fzf here because it is only necessary to use here -- dep_ck "fzf" -- menu_command='column -t -s "$tab_space" | fzf -m --bind change:top --tabstop=1 --layout=reverse --delimiter="$tab_space" --nth=1,2 --expect="$shortcuts" $FZF_DEFAULT_OPTS' -+ dep_ck "@fzf@" -+ menu_command='@column@ -t -s "$tab_space" | @fzf@ -m --bind change:top --tabstop=1 --layout=reverse --delimiter="$tab_space" --nth=1,2 --expect="$shortcuts" $FZF_DEFAULT_OPTS' - format_fzf - else - # Dmenu doesn't render tabs so removing it -- menu_command='tr -d "$tab_space" | '"$external_menu" -+ menu_command='@tr@ -d "$tab_space" | '"$external_menu" - format_ext_menu - fi - } -@@ -461,13 +461,13 @@ ID="ytfzf-ueberzug" - WIDTH=$FZF_PREVIEW_COLUMNS - HEIGHT=$FZF_PREVIEW_LINES - start_ueberzug () { -- [ -e $FIFO ] || { mkfifo "$FIFO" || exit 1 ; } -- ueberzug layer --parser json --silent < "$FIFO" & -+ [ -e $FIFO ] || { @mkfifo@ "$FIFO" || exit 1 ; } -+ @ueberzug@ layer --parser json --silent < "$FIFO" & - exec 3>"$FIFO" - } - stop_ueberzug () { - exec 3>&- -- rm "$FIFO" > /dev/null 2>&1 -+ @rm@ "$FIFO" > /dev/null 2>&1 - } - - preview_img () { -@@ -476,12 +476,12 @@ preview_img () { - shorturl=${args##*${tab_space}|} - shorturl="${shorturl%% *}" - -- json_obj=$(printf "%s" "$videos_json" | jq '.[]|select( .videoID == "'"$shorturl"'")') -+ json_obj=$(printf "%s" "$videos_json" | @jq@ '.[]|select( .videoID == "'"$shorturl"'")') - - - IFS=$tab_space read -r title channel duration views date description <<-EOF - $( -- printf "%s" "$json_obj" | jq -r \ -+ printf "%s" "$json_obj" | @jq@ -r \ - ' - [.title,.channel,.duration,.views,.date,.description]|@tsv - ' -@@ -530,31 +530,31 @@ preview_img () { - } > "$FIFO" ;; - catimg) - printf "\n" -- catimg -w "$((thumb_width * 2))" "$IMAGE" ;; -+ @catimg@ -w "$((thumb_width * 2))" "$IMAGE" ;; - jp2a) - printf "\n" -- jp2a --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=24 "$IMAGE" ;; -+ @jp2a@ --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=24 "$IMAGE" ;; - jp2a-8) - printf "\n" -- jp2a --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=8 "$IMAGE" ;; -+ @jp2a@ --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=8 "$IMAGE" ;; - jp2a-4) - printf "\n" -- jp2a --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=4 "$IMAGE" ;; -+ @jp2a@ --size="${thumb_width}x$((thumb_height / 2))" --colors --color-depth=4 "$IMAGE" ;; - jp2a-gray|jp2a-grey) - printf "\n" -- jp2a --size="${thumb_width}x$((thumb_height / 2))" "$IMAGE" ;; -+ @jp2a@ --size="${thumb_width}x$((thumb_height / 2))" "$IMAGE" ;; - chafa) - printf "\n" -- chafa --size="${thumb_width}x${thumb_height}" "$IMAGE" ;; -+ @chafa@ --size="${thumb_width}x${thumb_height}" "$IMAGE" ;; - chafa-gray|chafa-grey) - printf "\n" -- chafa --size="${thumb_width}x${thumb_height}" --colors=2 "$IMAGE" ;; -+ @chafa@ --size="${thumb_width}x${thumb_height}" --colors=2 "$IMAGE" ;; - chafa-4) - printf "\n" -- chafa --size="${thumb_width}x${thumb_height}" --colors=16 "$IMAGE" ;; -+ @chafa@ --size="${thumb_width}x${thumb_height}" --colors=16 "$IMAGE" ;; - chafa-8) - printf "\n" -- chafa --size="${thumb_width}x${thumb_height}" --colors=256 "$IMAGE" ;; -+ @chafa@ --size="${thumb_width}x${thumb_height}" --colors=256 "$IMAGE" ;; - custom) - if ! function_exists "handle_display_img"; then - printf "\033[031mERROR[#07]: \033[0m\033[1mhandle_display_img\033[0m is not defined" >&2 -@@ -585,20 +585,20 @@ download_thumbnails () { - if [ "$thumbnail_quality" -eq 1 ]; then - image_download () { - # higher quality images -- curl -s "$Url" -G --data-urlencode "sqp=" > "$thumb_dir/$Name.png" -+ @curl@ -s "$Url" -G --data-urlencode "sqp=" > "$thumb_dir/$Name.png" - } - else - image_download () { -- curl -s "$Url" > "$thumb_dir/$Name.png" -+ @curl@ -s "$Url" > "$thumb_dir/$Name.png" - } - fi - - print_info "Downloading Thumbnails...\n" - thumb_urls=$(printf "%s" "$*" |\ -- jq -r '.[]|[.thumbs,.videoID]|@tsv' ) -+ @jq@ -r '.[]|[.thumbs,.videoID]|@tsv' ) - - while IFS=$tab_space read -r Url Name; do -- sleep 0.001 -+ @sleep@ 0.001 - { - image_download - } & -@@ -628,7 +628,7 @@ get_sp_filter () { - #another example is sort by filter + upload date filter only changes one character as well - if [ -n "$filter_id" ]; then - #gets the character in the filter_id that needs to be replaced if upload_date_filter is also given -- upload_date_character=$(printf "%s" "$filter_id" | awk '{print substr($1, 8, 1)}') -+ upload_date_character=$(printf "%s" "$filter_id" | @awk@ '{print substr($1, 8, 1)}') - fi - - #For each of these, if upload_date_character is unset, the filter_id should be the normal filter -@@ -650,7 +650,7 @@ get_sp_filter () { - if [ -n "$upload_date_character" ]; then - #replaces the 8th character in the filter_id with the appropriate character - #the 8th character specifies the upload_date_filter -- sp=$(printf "%s" "$filter_id" | sed 's/\(.\{7\}\)./\1'"$upload_date_character"'/') -+ sp=$(printf "%s" "$filter_id" | @sed@ 's/\(.\{7\}\)./\1'"$upload_date_character"'/') - #otherwise set it to the filter_id - else - sp=$filter_id -@@ -660,15 +660,15 @@ get_sp_filter () { - - get_yt_json () { - # scrapes the json embedded in the youtube html page -- printf "%s" "$*" | sed -n '/var *ytInitialData/,$p' | tr -d '\n' |\ -- sed -E ' s_^.*var ytInitialData ?=__ ; s_;</script>.*__ ;' -+ printf "%s" "$*" | @sed@ -n '/var *ytInitialData/,$p' | @tr@ -d '\n' |\ -+ @sed@ -E ' s_^.*var ytInitialData ?=__ ; s_;</script>.*__ ;' - } - - get_yt_html () { - link=$1 - query=$2 - printf "%s" "$( -- curl "$link" -s \ -+ @curl@ "$link" -s \ - -G --data-urlencode "search_query=$query" \ - -G --data-urlencode "sp=$sp" \ - -H 'Authority: www.youtube.com' \ -@@ -684,7 +684,7 @@ get_video_data () { - # outputs tab and pipe separated fields: title, channel, view count, video length, video upload date, and the video id/url - # from the videos_json - printf "%s" "$*" |\ -- jq -r '.[]| "\(.title)'"$tab_space"'|\(.channel)'"$tab_space"'|\(.views)'"$tab_space"'|\(.duration)'"$tab_space"'|\(.date)'"$tab_space"'|\(.videoID)"' -+ @jq@ -r '.[]| "\(.title)'"$tab_space"'|\(.channel)'"$tab_space"'|\(.views)'"$tab_space"'|\(.duration)'"$tab_space"'|\(.date)'"$tab_space"'|\(.videoID)"' - } - - scrape_channel () { -@@ -694,7 +694,7 @@ scrape_channel () { - channel_url=$* - - # Converting channel title page url to channel video url -- if ! printf "%s" "$channel_url" | grep -q '/videos *$'; then -+ if ! printf "%s" "$channel_url" | @grep@ -q '/videos *$'; then - channel_url=${channel_url%/featured}/videos - fi - -@@ -706,8 +706,8 @@ scrape_channel () { - fi - - #gets the channel name from title of page -- channel_name=$(printf "%s" "$yt_html" | grep -o '<title>.*</title>' | -- sed \ -+ channel_name=$(printf "%s" "$yt_html" | @grep@ -o '<title>.*</title>' | -+ @sed@ \ - -e 's/ - YouTube//' \ - -e 's/<\/\?title>//g' \ - -e "s/'/'/g" \ -@@ -723,7 +723,7 @@ scrape_channel () { - - #gets a list of videos - videos_json=$(printf "%s" "$yt_json" |\ -- jq '[ .contents | ..|.gridVideoRenderer? | -+ @jq@ '[ .contents | ..|.gridVideoRenderer? | - select(. !=null) | - { - title: .title.runs[0].text, -@@ -736,7 +736,7 @@ scrape_channel () { - } - ]') - -- videos_json=$(printf "%s" "$videos_json" | jq '.[0:'$sub_link_count']') -+ videos_json=$(printf "%s" "$videos_json" | @jq@ '.[0:'$sub_link_count']') - printf "%s\n" "$videos_json" >> "$tmp_video_json_file" - #checks if it's empty in case it was defined in a config function eg: on_get_search - [ -z "$videos_data" ] && videos_data=$(get_video_data "$videos_json") -@@ -768,11 +768,11 @@ get_trending_url_data () { - scrape_pt () { - #gets a list of videos - pt_json=$( -- curl \ -+ @curl@ \ - -s "https://sepiasearch.org/api/v1/search/videos" \ - -G --data-urlencode "search=$*") - videos_json=$(printf "%s" "$pt_json" |\ -- jq '[ .data | .[] | -+ @jq@ '[ .data | .[] | - { - title: .name, - channel: .channel.displayName, -@@ -829,7 +829,7 @@ scrape_yt () { - fi - - #gets a list of videos -- videos_json=$(printf "%s" "$yt_json" | jq '[ .contents| -+ videos_json=$(printf "%s" "$yt_json" | @jq@ '[ .contents| - ..|.videoRenderer? | - select(. !=null) | - { -@@ -844,7 +844,7 @@ scrape_yt () { - } - ]') - -- playlist_json=$(printf "%s" "$yt_json" | jq '[ .contents| -+ playlist_json=$(printf "%s" "$yt_json" | @jq@ '[ .contents| - ..|.playlistRenderer? | - select(. !=null) | - { -@@ -904,28 +904,28 @@ get_search_query () { - #> To select videos from videos_data - user_selection () { - #remove subscription separators -- videos_data_clean=$(printf "%s" "$videos_data" | sed "/.*$tab_space$/d") -+ videos_data_clean=$(printf "%s" "$videos_data" | @sed@ "/.*$tab_space$/d") - - #$selected_data is the video the user picked - #picks the first n videos - if [ "$select_all" -eq 1 ] ; then - selected_data=$videos_data_clean - elif [ "$auto_select" -eq 1 ] ; then -- selected_data=$(printf "%s\n" "$videos_data_clean" | sed "${link_count}"q ) -+ selected_data=$(printf "%s\n" "$videos_data_clean" | @sed@ "${link_count}"q ) - #picks n random videos - elif [ "$random_select" -eq 1 ] ; then -- selected_data=$(printf "%s\n" "$videos_data_clean" | posix_shuf | head -n${link_count}) -+ selected_data=$(printf "%s\n" "$videos_data_clean" | posix_shuf | @head@ -n${link_count}) - #posix_shuf, pick the first $link_count videos - - #show thumbnail menu - elif [ "$show_thumbnails" -eq 1 ] ; then -- dep_ck "ueberzug" "fzf" -+ dep_ck "@ueberzug@" "@fzf@" - export YTFZF_THUMB_DISP_METHOD="$thumb_disp_method" - [ "$thumb_disp_method" = "ueberzug" ] && start_ueberzug - #thumbnails only work in fzf, use fzf -- menu_command="fzf -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \ -+ menu_command="@fzf@ -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \ - --nth=1,2 --expect='$shortcuts' $FZF_DEFAULT_OPTS \ -- --layout=reverse --preview \"sh $0 -U {}\" \ -+ --layout=reverse --preview \"@sh@ $0 -U {}\" \ - --preview-window \"$PREVIEW_SIDE:50%:noborder:wrap\"" - selected_data=$( title_len=200 video_menu "$videos_data" ) - [ "$thumb_disp_method" = "ueberzug" ] && stop_ueberzug -@@ -951,10 +951,10 @@ handle_shortcuts () { - case $selected_key in - "$urls_shortcut") printf "%s\n" $selected_urls; return 1 ;; - "$title_shortcut") -- printf "%s\n" "$selected_data" | awk -F " " '{print $1}'; return 1 ;; -+ printf "%s\n" "$selected_data" | @awk@ -F " " '{print $1}'; return 1 ;; - "$open_browser_shortcut") - for url in $selected_urls; do -- nohup $BROWSER "$url" >/dev/null 2>&1 -+ @nohup@ $BROWSER "$url" >/dev/null 2>&1 - done - return 1 ;; - "$watch_shortcut") is_download=0; is_audio_only=0; return 0;; -@@ -988,10 +988,10 @@ format_user_selection () { - 11) selected_urls=$selected_urls$new_line'https://www.youtube.com/watch?v='$surl ;; - 34) selected_urls=$selected_urls$new_line'https://www.youtube.com/playlist?list='$surl ;; - 36) -- selected_urls=$selected_urls$new_line"$(printf "%s" "$videos_json" | jq '.[].url' | grep -F "$surl" | tr -d '"')" ;; -+ selected_urls=$selected_urls$new_line"$(printf "%s" "$videos_json" | @jq@ '.[].url' | @grep@ -F "$surl" | @tr@ -d '"')" ;; - *) continue ;; - esac -- refined_selected_data=$refined_selected_data$new_line$(printf '%s' "$videos_data" | grep "|$surl" ) -+ refined_selected_data=$refined_selected_data$new_line$(printf '%s' "$videos_data" | @grep@ "|$surl" ) - done<<-EOF - $selected_data - EOF -@@ -1014,9 +1014,9 @@ print_data () { - get_video_format () { - # select format if flag given - [ $show_format -eq 0 ] && return -- formats=$(youtube-dl -F "$(printf "$selected_urls")") -- line_number=$(printf "$formats" | grep -n '.*extension resolution.*' | cut -d: -f1) -- quality=$(printf "$formats \n1 2 xAudio" | awk -v lineno=$line_number 'FNR > lineno {print $3}' | sort -n | awk -F"x" '{print $2 "p"}' | uniq | sed -e "s/Audiop/Audio/" -e "/^p$/d" | eval "$menu_command" | sed "s/p//g") -+ formats=$(@youtube-dl@ -F "$(printf "$selected_urls")") -+ line_number=$(printf "$formats" | @grep@ -n '.*extension resolution.*' | @cut@ -d: -f1) -+ quality=$(printf "$formats \n1 2 xAudio" | @awk@ -v lineno=$line_number 'FNR > lineno {print $3}' | @sort@ -n | @awk@ -F"x" '{print $2 "p"}' | @uniq@ | @sed@ -e "s/Audiop/Audio/" -e "/^p$/d" | eval "$menu_command" | @sed@ "s/p//g") - [ -z "$quality" ] && exit; - [ $quality = "Audio" ] && video_pref= && video_player="$audio_player" || video_pref="bestvideo[height=?$quality][vcodec!=?vp9]+bestaudio/best" - -@@ -1026,9 +1026,9 @@ get_video_format () { - get_sub_lang () { - if [ $auto_caption -eq 1 ]; then - #Gets the auto generated subs and stores them in a file -- sub_list=$(youtube-dl --list-subs --write-auto-sub "$selected_urls" | sed '/Available subtitles/,$d' | awk '{print $1}' | sed '1d;2d;3d') -+ sub_list=$(@youtube-dl@ --list-subs --write-auto-sub "$selected_urls" | @sed@ '/Available subtitles/,$d' | @awk@ '{print $1}' | @sed@ '1d;2d;3d') - if [ -n "$sub_list" ]; then -- [ -n "$selected_sub" ] || selected_sub=$(printf "$sub_list" | eval "$menu_command") && youtube-dl --sub-lang $selected_sub --write-auto-sub --skip-download "$selected_urls" -o /tmp/ytfzf && YTFZF_SUBT_NAME="--sub-file=/tmp/ytfzf.$selected_sub.vtt" || printf "Auto generated subs not available." -+ [ -n "$selected_sub" ] || selected_sub=$(printf "$sub_list" | eval "$menu_command") && @youtube-dl@ --sub-lang $selected_sub --write-auto-sub --skip-download "$selected_urls" -o /tmp/ytfzf && YTFZF_SUBT_NAME="--sub-file=/tmp/ytfzf.$selected_sub.vtt" || printf "Auto generated subs not available." - fi - unset sub_list - fi -@@ -1046,10 +1046,10 @@ open_player () { - if [ $detach_player -eq 1 ]; then - if [ -z "$video_pref" ] || [ $is_audio_only -eq 1 ]; then - printf "Opening Player: %s\n" "$video_player $*" -- setsid -f $video_player "$@" $YTFZF_SUBT_NAME >/dev/null 2>&1 -+ @setsid@ -f $video_player "$@" $YTFZF_SUBT_NAME >/dev/null 2>&1 - else - printf "Opening Player: %s\n" "$video_player_format$video_pref $*" -- setsid -f $video_player_format"$video_pref" "$@" $YTFZF_SUBT_NAME >/dev/null 2>&1 -+ @setsid@ -f $video_player_format"$video_pref" "$@" $YTFZF_SUBT_NAME >/dev/null 2>&1 - fi - return - fi -@@ -1064,9 +1064,9 @@ open_player () { - fi - elif [ $is_download -eq 1 ]; then - if [ -z "$video_pref" ]; then -- youtube-dl "$@" "$YTFZF_SUBT_NAME" -+ @youtube-dl@ "$@" "$YTFZF_SUBT_NAME" - else -- youtube-dl -f "$video_pref" "$@" $YTFZF_SUBT_NAME || video_pref= open_player "$@" -+ @youtube-dl@ -f "$video_pref" "$@" $YTFZF_SUBT_NAME || video_pref= open_player "$@" - fi - fi - } -@@ -1087,7 +1087,7 @@ play_url () { - fi - - #Delete the temp auto-gen subtitle file -- [ $auto_caption -eq 1 ] && rm -f "${YTFZF_SUBT_NAME#*=}" -+ [ $auto_caption -eq 1 ] && @rm@ -f "${YTFZF_SUBT_NAME#*=}" - - unset player_urls - } -@@ -1102,7 +1102,7 @@ session_is_running () { - #> removes tmp files and clutter - clean_up () { - if ! session_is_running ; then -- [ -d "$thumb_dir" ] && rm -r "$thumb_dir" -+ [ -d "$thumb_dir" ] && @rm@ -r "$thumb_dir" - : > "$pid_file" - function_exists "on_exit" && on_exit - fi -@@ -1124,9 +1124,9 @@ save_before_exit () { - check_if_url () { - # to check if given input is a url - url_regex='^https\?://.*' -- if printf "%s" "$1" | grep -q "$url_regex"; then -+ if printf "%s" "$1" | @grep@ -q "$url_regex"; then - is_url=1 -- selected_urls=$(printf "%s" "$1" | tr ' ' '\n') -+ selected_urls=$(printf "%s" "$1" | @tr@ ' ' '\n') - scrape="url" - else - is_url=0 -@@ -1139,10 +1139,10 @@ get_history () { - if [ "$enable_hist" -eq 1 ]; then - [ -e "$history_file" ] || : > "$history_file" - #gets history data in reverse order (makes it most recent to least recent) -- hist_data=$( sed '1!G; h; $!d' "$history_file" ) -+ hist_data=$( @sed@ '1!G; h; $!d' "$history_file" ) - [ -z "$hist_data" ] && printf "History is empty!\n" >&2 && return 1; - #removes duplicate values from $history_data -- videos_data=$(printf "%s" "$hist_data" | uniq ) -+ videos_data=$(printf "%s" "$hist_data" | @uniq@ ) - [ "$sort_videos_data" -eq 1 ] && videos_data="$(printf "%s" "$videos_data" | sort_video_data_fn)" - else - printf "History is not enabled. Please enable it to use this option (-H).\n" >&2; -@@ -1177,10 +1177,10 @@ get_search_history () { - if [ "$enable_search_hist" -eq 1 ]; then - [ -e "$search_history_file" ] || : > "$search_history_file" - #gets history data in reverse order (makes it most recent to least recent) -- hist_data=$( sed '1!G; h; $!d' "$search_history_file" ) -+ hist_data=$( @sed@ '1!G; h; $!d' "$search_history_file" ) - [ -z "$hist_data" ] && printf "Search history is empty!\n" >&2 && return 1; - #removes duplicate values from $history_data -- search_history=$(printf "%s" "$hist_data" | uniq ) -+ search_history=$(printf "%s" "$hist_data" | @uniq@ ) - else - printf "Search history is not enabled. Please enable it to use this option (-q).\n" >&2; - exit 1; -@@ -1190,7 +1190,7 @@ get_search_history () { - - set_search_history () { - [ -z "$search_query" ] && return -- [ $enable_search_hist -eq 1 ] && printf "%s\t%s\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$search_query" >> "$search_history_file" ; -+ [ $enable_search_hist -eq 1 ] && printf "%s\t%s\n" "$(@date@ '+%Y-%m-%d %H:%M:%S')" "$search_query" >> "$search_history_file" ; - } - - search_history_menu () { -@@ -1200,15 +1200,15 @@ search_history_menu () { - #when using an external menu, the search history will be done there - choice=$( printf "%s\n" "$search_history" | eval "$external_menu" ) - else -- choice="$( printf "%s\n" "$search_history" | fzf --prompt="$search_history_prompt" --print-query --no-multi -d '\t' --with-nth=2.. --expect='alt-enter' --bind='tab:replace-query' )" -+ choice="$( printf "%s\n" "$search_history" | @fzf@ --prompt="$search_history_prompt" --print-query --no-multi -d '\t' --with-nth=2.. --expect='alt-enter' --bind='tab:replace-query' )" - fi - - # first line is the fzf query (what the user types in fzf) - # second line is the fzf --expect key pressed - # third line is the search_history selection made -- query="$( printf "%s" "$choice" | sed -n '1p' )" -- key="$( printf "%s" "$choice" | sed -n '2p' )" -- selection="$( printf "%s" "$choice" | sed -n '3p' )" -+ query="$( printf "%s" "$choice" | @sed@ -n '1p' )" -+ key="$( printf "%s" "$choice" | @sed@ -n '2p' )" -+ selection="$( printf "%s" "$choice" | @sed@ -n '3p' )" - - # if no search history selection has been made - # and the user typed a query, use that instead -@@ -1225,7 +1225,7 @@ search_history_menu () { - search_query="$query" - return;; - esac -- search_query="$( printf "%s" "$selection" | awk -F'\t' '{printf "%s", $NF}' )" -+ search_query="$( printf "%s" "$selection" | @awk@ -F'\t' '{printf "%s", $NF}' )" - } - - ! function_exists "send_select_video_notif" && send_select_video_notif () { -@@ -1244,13 +1244,13 @@ search_history_menu () { - - #if downloading, say Downloading not currently playing - [ $is_download -eq 1 ] && title="Downloading" || title="Currently playing" -- notify-send "$title" "$message" -i "$video_thumb" -+ @notify-send@ "$title" "$message" -i "$video_thumb" - - unset message video_thumb title - } - - send_notify () { -- videos_selected_count=$(printf "%s\n" "$*" | wc -l) -+ videos_selected_count=$(printf "%s\n" "$*" | @wc@ -l) - while IFS=$tab_space read -r video_title video_channel video_views video_duration video_date video_shorturl; do - send_select_video_notif - done << EOF -@@ -1284,14 +1284,14 @@ if ! function_exists "data_sort_key"; then - sort_by="${5#|}" - sort_by="${sort_by#Streamed}" - #print the data that should be sorted by -- printf "%d" "$(date -d "${sort_by}" '+%s')" -+ printf "%d" "$(@date@ -d "${sort_by}" '+%s')" - unset sort_by - } - fi - #the function to use for sorting - if ! function_exists "data_sort_fn"; then - data_sort_fn () { -- sort -nr -+ @sort@ -nr - } - fi - sort_video_data_fn () { -@@ -1300,7 +1300,7 @@ sort_video_data_fn () { - IFS="$tab_space" - #run the key function to get the value to sort by - printf "%s\t%s\n" "$(data_sort_key $line)" "$line" -- done | data_sort_fn | cut -f2- -+ done | data_sort_fn | @cut@ -f2- - unset IFS line - } - -@@ -1314,19 +1314,19 @@ scrape_subscriptions () { - while IFS= read -r url; do - scrape_channel "$url" & - done <<-EOF -- $( sed \ -+ $( @sed@ \ - -e "s/#.*//" \ - -e "/^[[:space:]]*$/d" \ - -e "s/[[:space:]]*//g" \ - "$subscriptions_file") - EOF - wait -- videos_json="$(cat "$tmp_video_json_file")" -+ videos_json="$(@cat@ "$tmp_video_json_file")" - export videos_json - if [ $sort_videos_data -eq 1 ]; then - videos_data=$(sort_video_data_fn < "$tmp_video_data_file") - else -- videos_data=$(cat "$tmp_video_data_file") -+ videos_data=$(@cat@ "$tmp_video_data_file") - fi - } - -@@ -1346,11 +1346,11 @@ create_subs () { - : > "$config_dir/subscriptions" - - # check how many subscriptions there are in the file -- sublength=$( jq '. | length' < "$yt_sub_import_file" ) -+ sublength=$( @jq@ '. | length' < "$yt_sub_import_file" ) - -- for i in $(seq $((sublength - 1))); do -- channelInfo=$(jq --argjson index ${i} '[ "https://www.youtube.com/channel/" + .[$index].snippet.resourceId.channelId + "/videos", "#" + .[$index].snippet.title ]' < "$yt_sub_import_file") -- printf "%s\n" "$(printf "%s" "$channelInfo" | tr -d '[]"\n,')" >> "$subscriptions_file" -+ for i in $(@seq@ $((sublength - 1))); do -+ channelInfo=$(@jq@ --argjson index ${i} '[ "https://www.youtube.com/channel/" + .[$index].snippet.resourceId.channelId + "/videos", "#" + .[$index].snippet.title ]' < "$yt_sub_import_file") -+ printf "%s\n" "$(printf "%s" "$channelInfo" | @tr@ -d '[]"\n,')" >> "$subscriptions_file" - done - exit - } -@@ -1367,10 +1367,10 @@ verify_thumb_disp_method () { - - #sort -R is not posix - posix_shuf () { -- awk -F '\n' ' -+ @awk@ -F '\n' ' - BEGIN {srand()} #set the random seed at the start - {print rand() " " $0} #prepend a random number for each line' |\ -- sort | sed -E 's/[^ ]* //' -+ @sort@ | @sed@ -E 's/[^ ]* //' - #sort by the random numbers, remove the random number - } - -@@ -1486,8 +1486,8 @@ parse_opt () { - exit ;; - version) - printf "\033[1mytfzf:\033[0m %s\n" "$YTFZF_VERSION" -- printf "\033[1myoutube-dl:\033[0m %s\n" "$(youtube-dl --version)" -- command -v "fzf" 1>/dev/null && printf "\033[1mfzf:\033[0m %s\n" "$(fzf --version)" -+ printf "\033[1myoutube-dl:\033[0m %s\n" "$(@youtube-dl@ --version)" -+ command -v "@fzf@" 1>/dev/null && printf "\033[1mfzf:\033[0m %s\n" "$(@fzf@ --version)" - exit ;; - - subt) -@@ -1559,19 +1559,19 @@ done - shift $((OPTIND-1)) - - #only apply to ext_menu since they dont have a terminal to print to --[ $is_ext_menu -eq 1 ] && command -v notify-send 1>/dev/null 2>&1 && ext_menu_notifs=1 || ext_menu_notifs=0 -+[ $is_ext_menu -eq 1 ] && command -v @notify-send@ 1>/dev/null 2>&1 && ext_menu_notifs=1 || ext_menu_notifs=0 - - #used for thumbnail previews in ueberzug - if [ $is_ext_menu -eq 0 ]; then -- export TTY_LINES=$(tput lines) -- export TTY_COLS=$(tput cols) -+ export TTY_LINES=$(@tput@ lines) -+ export TTY_COLS=$(@tput@ cols) - fi - - #if both are true, it defaults to using fzf, and if fzf isnt installed it will throw an error - #so print this error instead and set $show_thumbnails to 0 - if [ $is_ext_menu -eq 1 ] && [ $show_thumbnails -eq 1 ]; then - [ $ext_menu_notifs -eq 1 ] &&\ -- notify-send "warning" "Currently thumbnails do not work in external menus" ||\ -+ @notify-send@ "warning" "Currently thumbnails do not work in external menus" ||\ - printf "\033[33mWARNING: Currently thumbnails do not work in external menus\033[0m\n" >&2 - show_thumbnails=0 - fi --- -2.32.0 - diff --git a/gnu/packages/patches/ytfzf-updates.patch b/gnu/packages/patches/ytfzf-updates.patch deleted file mode 100644 index 40e7c138b0..0000000000 --- a/gnu/packages/patches/ytfzf-updates.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ceb6836cd31653267506957cd0ccf78046404d3b Mon Sep 17 00:00:00 2001 -From: Raghav Gururajan <rg@raghavgururajan.name> -Date: Mon, 5 Jul 2021 06:47:38 -0400 -Subject: [PATCH 2/2] Disable updates within the application. - -Patch the code responsible for self-updating the application. - -Co-authored-by: jgart <jgart@dismail.de> ---- - ytfzf | 18 ++---------------- - 1 file changed, 2 insertions(+), 16 deletions(-) - -diff --git a/ytfzf b/ytfzf -index f0f2e16..2d1bb2e 100755 ---- a/ytfzf -+++ b/ytfzf -@@ -1260,22 +1260,8 @@ EOF - } - - update_ytfzf () { -- branch="$1" -- updatefile="/tmp/ytfzf-update" -- curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile" -- -- if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh'; then -- chmod 755 "$updatefile" -- [ "$(uname)" = "Darwin" ] && prefix="/usr/local/bin" || prefix="/usr/bin" -- function_exists "sudo" && doasroot="sudo" || doasroot="doas" -- $doasroot cp "$updatefile" "$prefix/ytfzf" -- unset prefix doasroot -- else -- printf "%bFailed to update ytfzf. Try again later.%b" "$c_red" "$c_reset" -- fi -- -- rm "$updatefile" -- exit 0 -+ printf "%bUpdates have to be installed with Guix.%b\n" "$c_red" "$c_reset" -+ exit 1 - } - - #gives a value to sort by (this will give the unix time the video was uploaded) --- -2.32.0 - diff --git a/gnu/packages/patches/ytnef-CVE-2021-3403.patch b/gnu/packages/patches/ytnef-CVE-2021-3403.patch deleted file mode 100644 index 4b1c9d659f..0000000000 --- a/gnu/packages/patches/ytnef-CVE-2021-3403.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f2380a53fb84d370eaf6e6c3473062c54c57fac7 Mon Sep 17 00:00:00 2001 -From: Oliver Giles <ohw.giles@gmail.com> -Date: Mon, 1 Feb 2021 10:12:16 +1300 -Subject: [PATCH] Prevent potential double-free in TNEFSubjectHandler - -If TNEFSubjectHandler is called multiple times, but the last time -failed due to the PREALLOCCHECK, the subject.data member will be -a freed, but invalid pointer. To prevent a double-free next time -TNEFSubjectHandler is entered, set it to zero after freeing. - -Resolves: #85 -Reported-by: jasperla ---- - lib/ytnef.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/ytnef.c b/lib/ytnef.c -index b148719..b06c807 100644 ---- a/lib/ytnef.c -+++ b/lib/ytnef.c -@@ -301,8 +301,10 @@ int TNEFFromHandler STD_ARGLIST { - } - // ----------------------------------------------------------------------------- - int TNEFSubjectHandler STD_ARGLIST { -- if (TNEF->subject.data) -+ if (TNEF->subject.data) { - free(TNEF->subject.data); -+ TNEF->subject.data = NULL; -+ } - - PREALLOCCHECK(size, 100); - TNEF->subject.data = calloc(size+1, sizeof(BYTE)); diff --git a/gnu/packages/patches/ytnef-CVE-2021-3404.patch b/gnu/packages/patches/ytnef-CVE-2021-3404.patch deleted file mode 100644 index e991d6aff1..0000000000 --- a/gnu/packages/patches/ytnef-CVE-2021-3404.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f9ff4a203b8c155d51a208cadadb62f224fba715 Mon Sep 17 00:00:00 2001 -From: Oliver Giles <ohw.giles@gmail.com> -Date: Mon, 1 Feb 2021 10:18:17 +1300 -Subject: [PATCH] Ensure the size of the version field is 4 bytes - -A corrupted version field size can cause TNEFVersion to access outside -of allocated memory. Check the version is the expected size and raise -an error if not. - -Resolves: #86 -Reported-by: jasperla ---- - lib/ytnef.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/ytnef.c b/lib/ytnef.c -index b148719..ffede44 100644 ---- a/lib/ytnef.c -+++ b/lib/ytnef.c -@@ -335,6 +335,10 @@ int TNEFRendData STD_ARGLIST { - int TNEFVersion STD_ARGLIST { - WORD major; - WORD minor; -+ if (size != 2 * sizeof(WORD)) { -+ printf("Incorrect size of version field, suspected corruption\n"); -+ return -1; -+ } - minor = SwapWord((BYTE*)data, size); - major = SwapWord((BYTE*)data + 2, size - 2); - diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/packages/patches/zig-disable-libc-note-test.patch deleted file mode 100644 index 4508cee200..0000000000 --- a/gnu/packages/patches/zig-disable-libc-note-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -This test fails with "error.CompilationIncorrectlySucceeded". - -diff --git a/test/compile_errors.zig b/test/compile_errors.zig -index b1eaa0302..621f9db0a 100644 ---- a/test/compile_errors.zig -+++ b/test/compile_errors.zig -@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void { - "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command", - }); - -- ctx.testErrStage1("libc headers note", -- \\const c = @cImport(@cInclude("stdio.h")); -- \\export fn entry() void { -- \\ _ = c.printf("hello, world!\n"); -- \\} -- , &[_][]const u8{ -- "tmp.zig:1:11: error: C import failed", -- "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", -- }); -+ // ctx.testErrStage1("libc headers note", -+ // \\const c = @cImport(@cInclude("stdio.h")); -+ // \\export fn entry() void { -+ // \\ _ = c.printf("hello, world!\n"); -+ // \\} -+ // , &[_][]const u8{ -+ // "tmp.zig:1:11: error: C import failed", -+ // "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", -+ // }); - } - - ctx.testErrStage1("comptime vector overflow shows the index", |