summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-05-29 23:36:38 +0200
committerMarius Bakke <marius@gnu.org>2020-05-29 23:36:38 +0200
commitfe6d003908fd8278de65761bc550240c520ef9f4 (patch)
treeabe88c7905a8907ddafc554fbeef5b0af08f835d /gnu/packages/patches
parent8a7a5dc7805f4628e60f90af6b2416f951d0c034 (diff)
parent031315e4f0fbc4e04ffc8adee04128c23173a1f7 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/darkice-workaround-fpermissive-error.patch62
-rw-r--r--gnu/packages/patches/dhall-remove-network-tests.patch97
-rw-r--r--gnu/packages/patches/emacs-libgit-use-system-libgit2.patch88
-rw-r--r--gnu/packages/patches/emacs-magit-log-format-author-margin.patch72
-rw-r--r--gnu/packages/patches/enlightenment-fix-setuid-path.patch16
-rw-r--r--gnu/packages/patches/grub-setup-root.patch124
-rw-r--r--gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch47
-rw-r--r--gnu/packages/patches/lxsession-use-gapplication.patch152
-rw-r--r--gnu/packages/patches/netsurf-system-utf8proc.patch51
-rw-r--r--gnu/packages/patches/ruby-sanitize-system-libxml.patch38
-rw-r--r--gnu/packages/patches/transmission-CVE-2018-10756.patch71
11 files changed, 432 insertions, 386 deletions
diff --git a/gnu/packages/patches/darkice-workaround-fpermissive-error.patch b/gnu/packages/patches/darkice-workaround-fpermissive-error.patch
deleted file mode 100644
index 5ee29147c2..0000000000
--- a/gnu/packages/patches/darkice-workaround-fpermissive-error.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Copied from Debian:
-<https://sources.debian.org/data/main/d/darkice/1.3-0.2/debian/patches/0001-Cast-float-in-SRC-lib-calls-to-delete-fpermissive-co.patch>
-
-From 1e2eb18d349f205c70cb2836232825442359b6e3 Mon Sep 17 00:00:00 2001
-From: belette <ouack23@yahoo.fr>
-Date: Wed, 26 Oct 2016 02:43:43 +0200
-Subject: Cast float* in SRC lib calls to delete fpermissive compilation error
-
----
- darkice/trunk/src/FaacEncoder.cpp | 2 +-
- darkice/trunk/src/OpusLibEncoder.cpp | 2 +-
- darkice/trunk/src/VorbisLibEncoder.cpp | 2 +-
- darkice/trunk/src/aacPlusEncoder.cpp | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
---- a/src/FaacEncoder.cpp
-+++ b/src/FaacEncoder.cpp
-@@ -164,7 +164,7 @@ FaacEncoder :: write ( const void * buf,
- if ( converter ) {
- unsigned int converted;
- #ifdef HAVE_SRC_LIB
-- src_short_to_float_array ((short *) b, converterData.data_in, samples);
-+ src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples);
- converterData.input_frames = nSamples;
- converterData.data_out = resampledOffset + (resampledOffsetSize * channels);
- int srcError = src_process (converter, &converterData);
---- a/src/OpusLibEncoder.cpp
-+++ b/src/OpusLibEncoder.cpp
-@@ -403,7 +403,7 @@ OpusLibEncoder :: write ( const void * buf,
- #ifdef HAVE_SRC_LIB
- (void)inCount;
- converterData.input_frames = processed;
-- src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples);
-+ src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples);
- int srcError = src_process (converter, &converterData);
- if (srcError)
- throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError));
---- a/src/VorbisLibEncoder.cpp
-+++ b/src/VorbisLibEncoder.cpp
-@@ -337,7 +337,7 @@ VorbisLibEncoder :: write ( const void * buf,
- int converted;
- #ifdef HAVE_SRC_LIB
- converterData.input_frames = nSamples;
-- src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples);
-+ src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples);
- int srcError = src_process (converter, &converterData);
- if (srcError)
- throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError));
---- a/src/aacPlusEncoder.cpp
-+++ b/src/aacPlusEncoder.cpp
-@@ -155,7 +155,7 @@ aacPlusEncoder :: write ( const void * buf,
- if ( converter ) {
- unsigned int converted;
- #ifdef HAVE_SRC_LIB
-- src_short_to_float_array ((short *) b, converterData.data_in, samples);
-+ src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples);
- converterData.input_frames = nSamples;
- converterData.data_out = resampledOffset + (resampledOffsetSize * channels);
- int srcError = src_process (converter, &converterData);
---
-2.11.0
-
diff --git a/gnu/packages/patches/dhall-remove-network-tests.patch b/gnu/packages/patches/dhall-remove-network-tests.patch
new file mode 100644
index 0000000000..c260e7844d
--- /dev/null
+++ b/gnu/packages/patches/dhall-remove-network-tests.patch
@@ -0,0 +1,97 @@
+diff a/dhall-lang/tests/import/failure/referentiallyInsane.dhall b/dhall-lang/tests/import/failure/referentiallyInsane.dhall
+--- a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
++++ /dev/null
+@@ -1,13 +0,0 @@
+-{- The following remote import attempts to import an environment variable, which
+- must be disallowed by the referential sanity check
+-
+- One reason for doing this is to protect against remote imports exfiltrating
+- environment variables (such as via custom headers). Only referentially
+- opaque imports (i.e. local imports) have permission to refer to other
+- referentially opaque imports in order to protect against this attack.
+-
+- The referential sanity check also ensures that remote imports are
+- referentially transparent. Or in other words, any import that is globally
+- addressable must have a meaning that is not context-sensitive.
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
+diff a/dhall-lang/tests/import/success/customHeadersA.dhall b/dhall-lang/tests/import/success/customHeadersA.dhall
+--- a/dhall-lang/tests/import/success/customHeadersA.dhall
++++ /dev/null
+@@ -1,3 +0,0 @@
+-https://httpbin.org/user-agent
+- using [ { mapKey = "User-Agent", mapValue = "Dhall" } ]
+- as Text
+diff a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall b/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
+--- a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- The purpose of this test is to verify that the custom headers supplied to
+- this import are not forwarded to the transitive import of
+- https://httpbin.org/user-agent
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall
+- using [ { mapKey = "User-Agent", mapValue = "Secret" } ]
+diff a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall b/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
+--- a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt as Text
+diff a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall b/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
+--- a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+- This test verifies that `env:VAR as Location` isn't rejected as referentially opaque,
+- as `env:VAR` on its own would.
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/EnvA.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- This test verifies that `missing as Location` succeeds when chained since:
+- * The `missing` is never actually resolved (due to the `as Location`)
+- * The `missing` should be treated as referentially transparent (and therefore
+- be a valid transitive dependency of a remote import)
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/MissingA.dhall
+diff a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{-
+- This URL returns (probably) a different result for each request. This test
+- ensures that import results for a given URL are correctly cached within an
+- execution of dhall.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0
+diff a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+- This URL returns (probably) a different result for each request. This test
+- ensures that import locations are canonicalized before being cached.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0
diff --git a/gnu/packages/patches/emacs-libgit-use-system-libgit2.patch b/gnu/packages/patches/emacs-libgit-use-system-libgit2.patch
new file mode 100644
index 0000000000..4a5546b06b
--- /dev/null
+++ b/gnu/packages/patches/emacs-libgit-use-system-libgit2.patch
@@ -0,0 +1,88 @@
+From de3c48d72ec7064e7f0522877fe759c729df0c50 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Wed, 25 Mar 2020 11:32:18 -0400
+Subject: [PATCH] Allow using a system provided libgit2 library
+
+Setting the USE_SYSTEM_LIBGIT2 Make or CMake variable (through the
+BUILD_OPTIONS variable) to any value enables using the system library.
+The default behavior of using a bundled copy of libgit2 is unchanged.
+---
+ CMakeLists.txt | 9 +++++++--
+ Makefile | 11 +++++++++++
+ src/CMakeLists.txt | 9 +++++++--
+ 3 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a393d7c..75d6ca6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,9 +7,14 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "shared" FORCE)
+ set(BUILD_CLAR OFF CACHE BOOL "clar" FORCE)
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DEGIT_DEBUG")
+
+-add_subdirectory(libgit2)
++if(USE_SYSTEM_LIBGIT2)
++ find_package(PkgConfig REQUIRED)
++ pkg_check_modules(git2 REQUIRED IMPORTED_TARGET libgit2)
++else()
++ add_subdirectory(libgit2)
++ find_library(git2 libgit2.a)
++endif()
+
+-find_library(git2 libgit2.a)
+ add_subdirectory(src)
+
+ enable_testing()
+diff --git a/Makefile b/Makefile
+index 8199532..6a6a4e1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,6 +13,13 @@ ifeq ($(UNAME),MSYS)
+ BUILD_OPTIONS+= -G "MSYS Makefiles"
+ endif
+
++# If the variable USE_SYSTEM_LIBGIT2 is set to *any* value, use the
++# system provided libgit2 library.
++USE_SYSTEM_LIBGIT2? := \
++ $(if $(or $(USE_SYSTEM_LIBGIT2),\
++ $(findstring USE_SYSTEM_LIBGIT2,$(BUILD_OPTIONS))),\
++ true)
++
+ ifeq "$(TRAVIS)" "true"
+ ## Makefile for Travis ###################################################
+ #
+@@ -87,7 +94,11 @@ submodule-update:
+ @git submodule update
+
+ libgit2:
++ifeq ($(USE_SYSTEM_LIBGIT2?),)
+ @git submodule update --init
++else
++ @echo "Using the system provided libgit2 library"
++endif
+
+ CLEAN = $(ELCS) $(PKG)-autoloads.el build
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index cfb5777..0dbad8a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -13,8 +13,13 @@ if(WIN32)
+ set_target_properties(egit2 PROPERTIES PREFIX lib)
+ endif(WIN32)
+
+-target_link_libraries(egit2 git2)
+-target_include_directories(egit2 SYSTEM PRIVATE "${libgit2_SOURCE_DIR}/include")
++if(USE_SYSTEM_LIBGIT2)
++ target_link_libraries(egit2 PRIVATE PkgConfig::git2)
++else()
++ target_link_libraries(egit2 git2)
++ target_include_directories(
++ egit2 SYSTEM PRIVATE "${libgit2_SOURCE_DIR}/include")
++endif()
+
+ if(CMAKE_COMPILER_IS_GNUCC)
+ target_compile_options(egit2 PRIVATE -Wall -Wextra)
+--
+2.26.2
+
diff --git a/gnu/packages/patches/emacs-magit-log-format-author-margin.patch b/gnu/packages/patches/emacs-magit-log-format-author-margin.patch
deleted file mode 100644
index fc52157a32..0000000000
--- a/gnu/packages/patches/emacs-magit-log-format-author-margin.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 94914ca4690c0cff12d600a0c8ba6bfb3fb38dc5 Mon Sep 17 00:00:00 2001
-From: Jonas Bernoulli <jonas@bernoul.li>
-Date: Tue, 25 Jun 2019 21:44:32 +0200
-Subject: [PATCH] magit-log-format-author-margin: New function
-
-Split it from `magit-log-format-margin'.
----
- lisp/magit-log.el | 48 +++++++++++++++++++++++++----------------------
- 1 file changed, 26 insertions(+), 22 deletions(-)
-
-diff --git a/lisp/magit-log.el b/lisp/magit-log.el
-index c8e6ef63..c0a79b19 100644
---- a/lisp/magit-log.el
-+++ b/lisp/magit-log.el
-@@ -1374,28 +1374,32 @@ The shortstat style is experimental and rather slow."
- (when-let ((option (magit-margin-option)))
- (if magit-log-margin-show-shortstat
- (magit-log-format-shortstat-margin rev)
-- (pcase-let ((`(,_ ,style ,width ,details ,details-width)
-- (or magit-buffer-margin
-- (symbol-value option))))
-- (magit-make-margin-overlay
-- (concat (and details
-- (concat (propertize (truncate-string-to-width
-- (or author "")
-- details-width
-- nil ?\s (make-string 1 magit-ellipsis))
-- 'face 'magit-log-author)
-- " "))
-- (propertize
-- (if (stringp style)
-- (format-time-string
-- style
-- (seconds-to-time (string-to-number date)))
-- (pcase-let* ((abbr (eq style 'age-abbreviated))
-- (`(,cnt ,unit) (magit--age date abbr)))
-- (format (format (if abbr "%%2i%%-%ic" "%%2i %%-%is")
-- (- width (if details (1+ details-width) 0)))
-- cnt unit)))
-- 'face 'magit-log-date)))))))
-+ (magit-log-format-author-margin author date))))
-+
-+(defun magit-log-format-author-margin (author date &optional previous-line)
-+ (pcase-let ((`(,_ ,style ,width ,details ,details-width)
-+ (or magit-buffer-margin
-+ (symbol-value option))))
-+ (magit-make-margin-overlay
-+ (concat (and details
-+ (concat (propertize (truncate-string-to-width
-+ (or author "")
-+ details-width
-+ nil ?\s (make-string 1 magit-ellipsis))
-+ 'face 'magit-log-author)
-+ " "))
-+ (propertize
-+ (if (stringp style)
-+ (format-time-string
-+ style
-+ (seconds-to-time (string-to-number date)))
-+ (pcase-let* ((abbr (eq style 'age-abbreviated))
-+ (`(,cnt ,unit) (magit--age date abbr)))
-+ (format (format (if abbr "%%2i%%-%ic" "%%2i %%-%is")
-+ (- width (if details (1+ details-width) 0)))
-+ cnt unit)))
-+ 'face 'magit-log-date))
-+ previous-line)))
-
- (defun magit-log-format-shortstat-margin (rev)
- (magit-make-margin-overlay
---
-2.23.0
-
diff --git a/gnu/packages/patches/enlightenment-fix-setuid-path.patch b/gnu/packages/patches/enlightenment-fix-setuid-path.patch
index f2930845ba..a0efb29857 100644
--- a/gnu/packages/patches/enlightenment-fix-setuid-path.patch
+++ b/gnu/packages/patches/enlightenment-fix-setuid-path.patch
@@ -1,26 +1,24 @@
diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c
-index 8b0aa6641..f15d2c2a2 100644
+index 8b0aa6641..3dff0ad84 100644
--- a/src/bin/e_auth.c
+++ b/src/bin/e_auth.c
-@@ -11,9 +11,7 @@ e_auth_begin(char *passwd)
- pwlen = strlen(passwd);
+@@ -12,8 +12,7 @@ e_auth_begin(char *passwd)
if (pwlen == 0) goto out;
-- snprintf(buf, sizeof(buf),
+ snprintf(buf, sizeof(buf),
- "%s/enlightenment/utils/enlightenment_ckpasswd pw",
- e_prefix_lib_get());
-+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_ckpasswd");
++ "/run/setuid-programs/enlightenment_ckpasswd pw");
exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
if (!exe) goto out;
if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out;
-@@ -46,9 +44,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid)
- pwlen = strlen(passwd);
+@@ -47,8 +46,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid)
if (pwlen == 0) goto out;
-- snprintf(buf, sizeof(buf),
+ snprintf(buf, sizeof(buf),
- "%s/enlightenment/utils/enlightenment_ckpasswd pk",
- e_prefix_lib_get());
-+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_ckpasswd");
++ "/run/setuid-programs/enlightenment_ckpasswd pk");
exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
if (!exe) goto out;
snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd);
diff --git a/gnu/packages/patches/grub-setup-root.patch b/gnu/packages/patches/grub-setup-root.patch
new file mode 100644
index 0000000000..1abe9c383a
--- /dev/null
+++ b/gnu/packages/patches/grub-setup-root.patch
@@ -0,0 +1,124 @@
+This patch is taken from OpenWrt, see:
+
+https://github.com/openwrt/openwrt/blob/master/package/boot/grub2/patches/100-grub_setup_root.patch.
+
+It allows to use grub-bios-setup on a raw disk-images, without root permissions.
+
+--- a/util/grub-setup.c
++++ b/util/grub-setup.c
+@@ -87,6 +87,8 @@ static struct argp_option options[] = {
+ N_("install even if problems are detected"), 0},
+ {"skip-fs-probe",'s',0, 0,
+ N_("do not probe for filesystems in DEVICE"), 0},
++ {"root-device", 'r', N_("DEVICE"), 0,
++ N_("use DEVICE as the root device"), 0},
+ {"verbose", 'v', 0, 0, N_("print verbose messages."), 0},
+ {"allow-floppy", 'a', 0, 0,
+ /* TRANSLATORS: The potential breakage isn't limited to floppies but it's
+@@ -130,6 +132,7 @@ struct arguments
+ char *core_file;
+ char *dir;
+ char *dev_map;
++ char *root_dev;
+ int force;
+ int fs_probe;
+ int allow_floppy;
+@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct
+ arguments->dev_map = xstrdup (arg);
+ break;
+
++ case 'r':
++ if (arguments->root_dev)
++ free (arguments->root_dev);
++
++ arguments->root_dev = xstrdup (arg);
++ break;
++
+ case 'f':
+ arguments->force = 1;
+ break;
+@@ -313,7 +323,7 @@ main (int argc, char *argv[])
+ GRUB_SETUP_FUNC (arguments.dir ? : DEFAULT_DIRECTORY,
+ arguments.boot_file ? : DEFAULT_BOOT_FILE,
+ arguments.core_file ? : DEFAULT_CORE_FILE,
+- dest_dev, arguments.force,
++ arguments.root_dev, dest_dev, arguments.force,
+ arguments.fs_probe, arguments.allow_floppy,
+ arguments.add_rs_codes);
+
+--- a/util/setup.c
++++ b/util/setup.c
+@@ -252,13 +252,12 @@ identify_partmap (grub_disk_t disk __att
+ void
+ SETUP (const char *dir,
+ const char *boot_file, const char *core_file,
+- const char *dest, int force,
++ char *root, const char *dest, int force,
+ int fs_probe, int allow_floppy,
+ int add_rs_codes __attribute__ ((unused))) /* unused on sparc64 */
+ {
+ char *core_path;
+ char *boot_img, *core_img, *boot_path;
+- char *root = 0;
+ size_t boot_size, core_size;
+ grub_uint16_t core_sectors;
+ grub_device_t root_dev = 0, dest_dev, core_dev;
+@@ -307,7 +306,10 @@ SETUP (const char *dir,
+
+ core_dev = dest_dev;
+
+- {
++ if (root)
++ root_dev = grub_device_open(root);
++
++ if (!root_dev) {
+ char **root_devices = grub_guess_root_devices (dir);
+ char **cur;
+ int found = 0;
+@@ -320,6 +322,8 @@ SETUP (const char *dir,
+ char *drive;
+ grub_device_t try_dev;
+
++ if (root_dev)
++ break;
+ drive = grub_util_get_grub_dev (*cur);
+ if (!drive)
+ continue;
+--- a/include/grub/util/install.h
++++ b/include/grub/util/install.h
+@@ -191,13 +191,13 @@ grub_install_get_image_target (const cha
+ void
+ grub_util_bios_setup (const char *dir,
+ const char *boot_file, const char *core_file,
+- const char *dest, int force,
++ char *root, const char *dest, int force,
+ int fs_probe, int allow_floppy,
+ int add_rs_codes);
+ void
+ grub_util_sparc_setup (const char *dir,
+ const char *boot_file, const char *core_file,
+- const char *dest, int force,
++ char *root, const char *dest, int force,
+ int fs_probe, int allow_floppy,
+ int add_rs_codes);
+
+--- a/util/grub-install.c
++++ b/util/grub-install.c
+@@ -1712,7 +1712,7 @@ main (int argc, char *argv[])
+ /* Now perform the installation. */
+ if (install_bootsector)
+ grub_util_bios_setup (platdir, "boot.img", "core.img",
+- install_drive, force,
++ NULL, install_drive, force,
+ fs_probe, allow_floppy, add_rs_codes);
+ break;
+ }
+@@ -1738,7 +1738,7 @@ main (int argc, char *argv[])
+ /* Now perform the installation. */
+ if (install_bootsector)
+ grub_util_sparc_setup (platdir, "boot.img", "core.img",
+- install_drive, force,
++ NULL, install_drive, force,
+ fs_probe, allow_floppy,
+ 0 /* unused */ );
+ break;
diff --git a/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch b/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch
deleted file mode 100644
index df0571bf2b..0000000000
--- a/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Tue, 10 Dec 2019 16:20:40 +0100
-Subject: gnu: libnftnl: Don't check NFTNL_FLOWTABLE_SIZE.
-
-Taken verbatim from the upstream commit[0] directly following the 1.1.5
-release.
-
-[0]: https://git.netfilter.org/libnftnl/commit/?id=b2388765e0c4405442faa13845419f6a35d0134c
-
-From b2388765e0c4405442faa13845419f6a35d0134c Mon Sep 17 00:00:00 2001
-From: Phil Sutter <phil@nwl.cc>
-Date: Mon, 2 Dec 2019 18:29:56 +0100
-Subject: tests: flowtable: Don't check NFTNL_FLOWTABLE_SIZE
-
-Marshalling code around that attribute has been dropped by commit
-d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE") so it's value is
-lost during the test.
-
-Assuming that NFTNL_FLOWTABLE_SIZE will receive kernel support at a
-later point, leave the test code in place but just comment it out.
-
-Fixes: d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE")
-Signed-off-by: Phil Sutter <phil@nwl.cc>
-Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
----
- tests/nft-flowtable-test.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/nft-flowtable-test.c b/tests/nft-flowtable-test.c
-index 3edb00d..8ab8d4c 100644
---- a/tests/nft-flowtable-test.c
-+++ b/tests/nft-flowtable-test.c
-@@ -33,9 +33,11 @@ static void cmp_nftnl_flowtable(struct nftnl_flowtable *a, struct nftnl_flowtabl
- if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_USE) !=
- nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_USE))
- print_err("Flowtable use mismatches");
-+#if 0
- if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_SIZE) !=
- nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_SIZE))
- print_err("Flowtable size mismatches");
-+#endif
- if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_FLAGS) !=
- nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_FLAGS))
- print_err("Flowtable flags mismatches");
---
-cgit v1.2.1
-
diff --git a/gnu/packages/patches/lxsession-use-gapplication.patch b/gnu/packages/patches/lxsession-use-gapplication.patch
deleted file mode 100644
index 3f2269a42f..0000000000
--- a/gnu/packages/patches/lxsession-use-gapplication.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-Upstream patch to remove libunique dependency, and use glib >= 2.28.0
-to handle unique apps both for GTK+ 2 and 3.
-https://sourceforge.net/p/lxde/patches/539/
-
-
-From a7d3b40a79a7a16c1f5d50d2bd466570258dae29 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
-Date: Sun, 22 Jan 2017 01:09:59 +0100
-Subject: [PATCH] Use GApplication for unique app handling
-
-Remove libunique dependency, and use glib >= 2.28.0 to handle unique apps both for GTK+ 2 and 3.
----
- Makefile.am | 6 ------
- configure.ac | 7 +------
- lxclipboard/main.vala | 16 +---------------
- lxpolkit/main.vala | 16 +---------------
- 4 files changed, 3 insertions(+), 42 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index c2e1fe8..e3a3b97 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -90,9 +90,6 @@ if USE_GTK3
- lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK3
- else
- lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK2
--lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0
--lxclipboard_lxclipboard_CPPFLAGS += $(UNIQUE_CFLAGS)
--lxclipboard_lxclipboard_LDADD += $(UNIQUE_LIBS)
- endif
-
- lxpolkit_lxpolkit_vala_SOURCES = \
-@@ -137,9 +134,6 @@ if USE_GTK3
- lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK3
- else
- lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK2
--lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0
--lxpolkit_lxpolkit_CPPFLAGS += $(UNIQUE_CFLAGS)
--lxpolkit_lxpolkit_LDADD += $(UNIQUE_LIBS)
- endif
-
- lxsession_db_lxsession_db_SOURCES = \
-diff --git a/configure.ac b/configure.ac
-index 06ddbb3..9126f4d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -45,7 +45,7 @@ PKG_CHECK_MODULES(X11, [x11])
- AC_SUBST(X11_CFLAGS)
- AC_SUBST(X11_LIBS)
-
--PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0])
-+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28.0])
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
-
-@@ -79,11 +79,6 @@ else
- CFLAGS="$CFLAGS -D USE_GTK2"
- gtk_modules="gtk+-2.0 >= 2.6.0"
- VALA_GTK_LIBS="gtk+-2.0"
--
-- PKG_CHECK_MODULES(UNIQUE, [unique-1.0])
-- AC_SUBST(UNIQUE_CFLAGS)
-- AC_SUBST(UNIQUE_LIBS)
--
- fi
- PKG_CHECK_MODULES(GTK, [$gtk_modules])
- AC_SUBST(GTK_CFLAGS)
-diff --git a/lxclipboard/main.vala b/lxclipboard/main.vala
-index bee4044..3d4a8d7 100644
---- a/lxclipboard/main.vala
-+++ b/lxclipboard/main.vala
-@@ -17,9 +17,6 @@
- * MA 02110-1301, USA.
- */
- using Gtk;
--#if USE_GTK2
--using Unique;
--#endif
-
- namespace Lxsession
- {
-@@ -28,17 +25,7 @@ namespace Lxsession
- public static int main(string[] args)
- {
- Gtk.init (ref args);
--#if USE_GTK2
-- Unique.App app = new Unique.App("org.lxde.lxclipboard", null);
--
-- if(app.is_running)
-- {
-- message("lxclipboard is already running. Existing");
-- return 0;
-- }
--#endif
--# if USE_GTK3
-- Gtk.Application app = new Gtk.Application (
-+ GLib.Application app = new GLib.Application (
- "org.lxde.lxclipboard",
- GLib.ApplicationFlags.FLAGS_NONE);
- app.register ();
-@@ -48,7 +35,6 @@ namespace Lxsession
- message("lxclipboard is already running. Existing");
- return 0;
- }
--#endif
-
- clipboard_start ();
-
-diff --git a/lxpolkit/main.vala b/lxpolkit/main.vala
-index c0d6ae2..50c3cb7 100644
---- a/lxpolkit/main.vala
-+++ b/lxpolkit/main.vala
-@@ -17,9 +17,6 @@
- * MA 02110-1301, USA.
- */
- using Gtk;
--#if USE_GTK2
--using Unique;
--#endif
-
- const string GETTEXT_PACKAGE = "lxsession";
-
-@@ -33,17 +30,7 @@ namespace Lxsession
- Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "utf-8");
-
- Gtk.init (ref args);
--#if USE_GTK2
-- Unique.App app = new Unique.App("org.lxde.lxpolkit", null);
--
-- if(app.is_running)
-- {
-- message(_("lxpolkit is already running. Existing"));
-- return 0;
-- }
--#endif
--# if USE_GTK3
-- Gtk.Application app = new Gtk.Application (
-+ GLib.Application app = new GLib.Application (
- "org.lxde.lxpolkit",
- GLib.ApplicationFlags.FLAGS_NONE);
- app.register ();
-@@ -53,7 +40,6 @@ namespace Lxsession
- message(_("lxpolkit is already running. Existing"));
- return 0;
- }
--#endif
-
- policykit_agent_init();
-
---
-2.11.0
-
diff --git a/gnu/packages/patches/netsurf-system-utf8proc.patch b/gnu/packages/patches/netsurf-system-utf8proc.patch
index a2ee52ca05..04bf828f37 100644
--- a/gnu/packages/patches/netsurf-system-utf8proc.patch
+++ b/gnu/packages/patches/netsurf-system-utf8proc.patch
@@ -1,50 +1,13 @@
-Use upstream utf8proc package, as suggested in
-http://source.netsurf-browser.org/libutf8proc.git/commit/?id=770e329cceaf0620c7b482589a9b17ed1d19c16d
+Fix include directory for system utf8proc.
-Work around upstream's lack of a pkg-config file and update API.
-
---- netsurf-3.6/Makefile
-+++ netsurf-3.6/Makefile
-@@ -527,10 +527,9 @@
- $(eval $(call pkg_config_find_and_add,libcss,CSS))
- $(eval $(call pkg_config_find_and_add,libdom,DOM))
- $(eval $(call pkg_config_find_and_add,libnsutils,nsutils))
--$(eval $(call pkg_config_find_and_add,libutf8proc,utf8proc))
-
- # Common libraries without pkg-config support
--LDFLAGS += -lz
-+LDFLAGS += -lz -lutf8proc
+--- netsurf-3.10/utils/idna.c
++++ netsurf-3.10/utils/idna.c
+@@ -167,7 +167,7 @@
- # Optional libraries with pkgconfig
+ #ifdef WITH_UTF8PROC
---- netsurf-3.8/utils/idna.c
-+++ netsurf-3.8/utils/idna.c
-@@ -27,7 +27,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/types.h>
-#include <libutf8proc/utf8proc.h>
+#include <utf8proc.h>
- #include "netsurf/inttypes.h"
-
---- netsurf-3.8/test/Makefile
-+++ netsurf-3.8/test/Makefile
-@@ -142,14 +142,15 @@
- -Itest -Iinclude -Icontent/handlers -Ifrontends -I. -I.. \
- -Dnsgtk \
- $(SAN_FLAGS) \
-- $(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc) \
-+ $(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils) \
- $(LIB_CFLAGS)
- TESTCFLAGS := $(BASE_TESTCFLAGS) \
- $(COV_CFLAGS) \
- $(COV_CPPFLAGS)
-
- TESTLDFLAGS := -L$(TESTROOT) \
-- $(shell pkg-config --libs libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc) -lz \
-+ $(shell pkg-config --libs libcurl libparserutils libwapcaplet libdom libnsutils) \
-+ $(LDFLAGS) \
- $(SAN_FLAGS) \
- $(LIB_LDFLAGS)\
- $(COV_LDFLAGS)
+ int32_t idna_contexto[] = {
+ /* CONTEXTO codepoints which have a rule defined */
diff --git a/gnu/packages/patches/ruby-sanitize-system-libxml.patch b/gnu/packages/patches/ruby-sanitize-system-libxml.patch
new file mode 100644
index 0000000000..d19eb07294
--- /dev/null
+++ b/gnu/packages/patches/ruby-sanitize-system-libxml.patch
@@ -0,0 +1,38 @@
+Fix test failures that occur when nokogiri is using system libxml:
+
+ https://github.com/rgrove/sanitize/issues/198
+
+Taken from upstream:
+https://github.com/rgrove/sanitize/commit/21da9b62baf9ea659811d92e6b574130aee57eba
+
+diff --git a/test/test_malicious_html.rb b/test/test_malicious_html.rb
+index 2c23074..0756de0 100644
+--- a/test/test_malicious_html.rb
++++ b/test/test_malicious_html.rb
+@@ -135,6 +135,8 @@
+ # The relevant libxml2 code is here:
+ # <https://github.com/GNOME/libxml2/commit/960f0e275616cadc29671a218d7fb9b69eb35588>
+ describe 'unsafe libxml2 server-side includes in attributes' do
++ using_unpatched_libxml2 = Nokogiri::VersionInfo.instance.libxml2_using_system?
++
+ tag_configs = [
+ {
+ tag_name: 'a',
+@@ -166,6 +168,8 @@
+ input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]
+
+ it 'should escape unsafe characters in attributes' do
++ skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
++
+ # This uses Nokogumbo's HTML-compliant serializer rather than
+ # libxml2's.
+ @s.fragment(input).
+@@ -191,6 +195,8 @@
+ input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]
+
+ it 'should not escape characters unnecessarily' do
++ skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
++
+ # This uses Nokogumbo's HTML-compliant serializer rather than
+ # libxml2's.
+ @s.fragment(input).
diff --git a/gnu/packages/patches/transmission-CVE-2018-10756.patch b/gnu/packages/patches/transmission-CVE-2018-10756.patch
new file mode 100644
index 0000000000..f9bdcf60aa
--- /dev/null
+++ b/gnu/packages/patches/transmission-CVE-2018-10756.patch
@@ -0,0 +1,71 @@
+Fix CVE-2018-10756:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10756
+
+Patch copied from Fedora:
+
+https://src.fedoraproject.org/rpms/transmission/blob/master/f/2123adf8e5e1c2b48791f9d22fc8c747e974180e.patch
+
+--- a/libtransmission/variant.c 2018-05-01 12:21:08.000000000 -0500
++++ b/libtransmission/variant.c 2020-05-18 10:21:27.554214128 -0500
+@@ -820,7 +820,7 @@
+ struct SaveNode
+ {
+ const tr_variant * v;
+- tr_variant sorted;
++ tr_variant* sorted;
+ size_t childIndex;
+ bool isVisited;
+ };
+@@ -849,26 +849,33 @@
+
+ qsort (tmp, n, sizeof (struct KeyIndex), compareKeyIndex);
+
+- tr_variantInitDict (&node->sorted, n);
++ node->sorted = tr_new(tr_variant, 1);
++ tr_variantInitDict (node->sorted, n);
+ for (i=0; i<n; ++i)
+- node->sorted.val.l.vals[i] = *tmp[i].val;
++ node->sorted->val.l.vals[i] = *tmp[i].val;
+ node->sorted.val.l.count = n;
+
+ tr_free (tmp);
+
+- node->v = &node->sorted;
++ v = node->sorted;
+ }
+ else
+ {
+- node->v = v;
++ node->sorted = NULL;
+ }
++
++ node->v = v;
+ }
+
+ static void
+ nodeDestruct (struct SaveNode * node)
+ {
+- if (node->v == &node->sorted)
+- tr_free (node->sorted.val.l.vals);
++ //TR_ASSERT(node != NULL);
++ if (node->sorted != NULL)
++ {
++ tr_free(node->sorted->val.l.vals);
++ tr_free(node->sorted);
++ }
+ }
+
+ /**
+--- a/libtransmission/variant.c 2020-05-18 10:21:49.000000000 -0500
++++ b/libtransmission/variant.c 2020-05-18 10:24:34.673648865 -0500
+@@ -853,7 +853,7 @@
+ tr_variantInitDict (node->sorted, n);
+ for (i=0; i<n; ++i)
+ node->sorted->val.l.vals[i] = *tmp[i].val;
+- node->sorted.val.l.count = n;
++ node->sorted->val.l.count = n;
+
+ tr_free (tmp);
+
+