summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-05-26 22:34:46 +0200
committerMarius Bakke <marius@gnu.org>2020-05-26 22:34:46 +0200
commitaa13c5657d4f8b5dd52beda88a9a8ccc59ebca86 (patch)
tree856094a6541a72b70d471ed5265d6e940cb11e55 /gnu/packages/patches
parent8ab211dbdb7df000a64aceadfe7b53488819d245 (diff)
parentb4f04e0efff1fb6112b84dc6d36ea46215c336b2 (diff)
downloadguix-patches-aa13c5657d4f8b5dd52beda88a9a8ccc59ebca86.tar
guix-patches-aa13c5657d4f8b5dd52beda88a9a8ccc59ebca86.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch39
-rw-r--r--gnu/packages/patches/kpmcore-fix-tests.patch30
-rw-r--r--gnu/packages/patches/kpmcore-remove-broken-test.patch139
-rw-r--r--gnu/packages/patches/multipath-tools-sans-systemd.patch83
-rw-r--r--gnu/packages/patches/openjdk-14-builtins.patch11
-rw-r--r--gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch82
-rw-r--r--gnu/packages/patches/soundconverter-remove-gconf-dependency.patch29
7 files changed, 215 insertions, 198 deletions
diff --git a/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch b/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch
new file mode 100644
index 0000000000..79bd3e8dbc
--- /dev/null
+++ b/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch
@@ -0,0 +1,39 @@
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Wed, 20 May 2020 19:17:13 +0200
+Subject: [PATCH] gnu: http-client: Fix assertion on armhf-linux.
+
+Copied verbatim from [0] to fix guix pull[1] on ARM systems.
+
+[0]: https://github.com/nodejs/http-parser/pull/510
+[1]: https://issues.guix.gnu.org/40604
+
+From 0e5868aebb9eb92b078d27bb2774c2154dc167e2 Mon Sep 17 00:00:00 2001
+From: Ben Noordhuis <info@bnoordhuis.nl>
+Date: Thu, 30 Apr 2020 11:22:50 +0200
+Subject: [PATCH] Fix sizeof(http_parser) assert
+
+The result should be 32 on both 32 bits and 64 bits architectures
+because of struct padding.
+
+Fixes: https://github.com/nodejs/http-parser/issues/507
+---
+ test.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/test.c b/test.c
+index 7983424..f60a84f 100644
+--- a/test.c
++++ b/test.c
+@@ -4220,8 +4220,11 @@ main (void)
+ patch = version & 255;
+ printf("http_parser v%u.%u.%u (0x%06lx)\n", major, minor, patch, version);
+
++ /* Should be 32 on both 32 bits and 64 bits architectures because of
++ * struct padding, see https://github.com/nodejs/http-parser/issues/507.
++ */
+ printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser));
+- assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *));
++ assert(sizeof(http_parser) == 32);
+
+ //// API
+ test_preserve_data();
diff --git a/gnu/packages/patches/kpmcore-fix-tests.patch b/gnu/packages/patches/kpmcore-fix-tests.patch
deleted file mode 100644
index 12043abe72..0000000000
--- a/gnu/packages/patches/kpmcore-fix-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Git commit c02d59aa6d314678cef9683f96b28e2a1abd82b7 by Andrius Štikonas, on behalf of Hartmut Goebel.
-Committed on 07/11/2019 at 22:16.
-Pushed by stikonas into branch '4.0'.
-
-Fix test for kpmcore: stop helper only if formerly started.
-
-See https://bugs.kde.org/413851 and https://phabricator.kde.org/D25161
-
-diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp
---- a/src/util/externalcommand.cpp
-+++ b/src/util/externalcommand.cpp
-@@ -433,14 +433,17 @@
-
- void ExternalCommand::stopHelper()
- {
-+ if (!helperStarted)
-+ return;
- auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"),
- QStringLiteral("/Helper"), QDBusConnection::systemBus());
- QByteArray request;
- const quint64 nonce = interface->getNonce();
- request.setNum(nonce);
- QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512);
- interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce);
-
-+ helperStarted = false;
- delete privateKey;
- delete init;
- }
-
diff --git a/gnu/packages/patches/kpmcore-remove-broken-test.patch b/gnu/packages/patches/kpmcore-remove-broken-test.patch
deleted file mode 100644
index d02cca7883..0000000000
--- a/gnu/packages/patches/kpmcore-remove-broken-test.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From c9a08a593bac8b8610a647db118fea6f2958156d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
-Date: Thu, 7 Nov 2019 22:12:00 +0000
-Subject: [PATCH] Remove broken smart unit test.
-
-BUG: 413853
----
- test/CMakeLists.txt | 9 ----
- test/testsmart.cpp | 102 --------------------------------------------
- 2 files changed, 111 deletions(-)
- delete mode 100644 test/testsmart.cpp
-
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 67f63a2..6a300d3 100644
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -53,12 +53,3 @@ find_package (Threads)
- # Execute external commands as root
- kpm_test(testexternalcommand testexternalcommand.cpp)
- add_test(NAME testexternalcommand COMMAND testexternalcommand ${BACKEND})
--
--# Including SMART files reference
--set(SMARTPARSER ${CMAKE_SOURCE_DIR}/src/core/smartdiskinformation.cpp
-- ${CMAKE_SOURCE_DIR}/src/core/smartattributeparseddata.cpp
-- ${CMAKE_SOURCE_DIR}/src/core/smartparser.cpp)
--
--# Test SMART support
--kpm_test(testsmart testsmart.cpp ${SMARTPARSER})
--add_test(NAME testsmart COMMAND testsmart ${BACKEND})
-diff --git a/test/testsmart.cpp b/test/testsmart.cpp
-deleted file mode 100644
-index 2236af7..0000000
---- a/test/testsmart.cpp
-+++ /dev/null
-@@ -1,102 +0,0 @@
--#include "helpers.h"
--
--#include "util/externalcommand.h"
--#include "backend/corebackend.h"
--#include "backend/corebackendmanager.h"
--#include "core/smartstatus.h"
--#include "core/smartparser.h"
--
--#include <QCoreApplication>
--#include <QDebug>
--
--static QString getDefaultDevicePath();
--static bool testSmartStatus();
--static bool testSmartParser();
--
--int main(int argc, char **argv)
--{
-- QCoreApplication app(argc, argv);
--
-- KPMCoreInitializer i;
--
-- if (argc == 2)
-- i = KPMCoreInitializer(argv[1]);
--
-- if (!i.isValid())
-- return 1;
--
-- CoreBackend *backend = CoreBackendManager::self()->backend();
--
-- if (!backend)
-- {
-- qWarning() << "Couldn't get backend.";
-- return 1;
-- }
--
-- if (!testSmartStatus() || !testSmartParser())
-- return 1;
--
-- return app.exec();
--}
--
--static QString getDefaultDevicePath()
--{
-- // Getting default home partition using 'df -P /home | awk 'END{print $1}'' command
-- ExternalCommand command(QStringLiteral("df"), { QStringLiteral("-P"), QStringLiteral("/home"), QStringLiteral("|"),
-- QStringLiteral("awk"), QStringLiteral("\'END{print $1}\'") });
--
-- if (command.run() && command.exitCode() == 0) {
-- QString output = command.output();
-- return output;
-- }
--
-- return QString();
--}
--
--static bool testSmartStatus()
--{
-- QString devicePath = getDefaultDevicePath();
--
-- SmartStatus smart(devicePath);
--
-- if (smart.devicePath() != devicePath)
-- return false;
--
-- if (!smart.status())
-- return false;
--
-- if (smart.modelName() == QString())
-- return false;
--
-- if (smart.firmware() == QString())
-- return false;
--
-- if (smart.serial() == QString())
-- return false;
--
-- if (smart.selfTestStatus() != SmartStatus::SelfTestStatus::Success)
-- return false;
--
-- if (!smart.isValid())
-- return false;
--
-- return true;
--}
--
--static bool testSmartParser()
--{
-- QString devicePath = getDefaultDevicePath();
--
-- SmartParser parser(devicePath);
--
-- if (!parser.init())
-- return false;
--
-- if (parser.devicePath() != devicePath)
-- return false;
--
-- if (!parser.diskInformation())
-- return false;
--
-- return true;
--}
---
-2.17.1
diff --git a/gnu/packages/patches/multipath-tools-sans-systemd.patch b/gnu/packages/patches/multipath-tools-sans-systemd.patch
new file mode 100644
index 0000000000..8f3144718c
--- /dev/null
+++ b/gnu/packages/patches/multipath-tools-sans-systemd.patch
@@ -0,0 +1,83 @@
+Fix various compiler warnings when built without systemd.
+
+Submitted upstream at <https://www.redhat.com/archives/dm-devel/2020-May/thread.html>.
+
+diff --git a/libmultipath/config.c b/libmultipath/config.c
+--- a/libmultipath/config.c
++++ b/libmultipath/config.c
+@@ -696,7 +696,7 @@ process_config_dir(struct config *conf, char *dir)
+ pthread_cleanup_pop(1);
+ }
+
+-static void set_max_checkint_from_watchdog(struct config *conf)
++static void set_max_checkint_from_watchdog(__attribute__((unused)) struct config *conf)
+ {
+ #ifdef USE_SYSTEMD
+ char *envp = getenv("WATCHDOG_USEC");
+diff --git a/multipathd/main.c b/multipathd/main.c
+--- a/multipathd/main.c
++++ b/multipathd/main.c
+@@ -176,6 +176,7 @@ daemon_status(void)
+ /*
+ * I love you too, systemd ...
+ */
++#ifdef USE_SYSTEMD
+ static const char *
+ sd_notify_status(enum daemon_status state)
+ {
+@@ -195,7 +196,6 @@ sd_notify_status(enum daemon_status state)
+ return NULL;
+ }
+
+-#ifdef USE_SYSTEMD
+ static void do_sd_notify(enum daemon_status old_state,
+ enum daemon_status new_state)
+ {
+@@ -247,7 +247,9 @@ enum daemon_status wait_for_state_change_if(enum daemon_status oldstate,
+ static void __post_config_state(enum daemon_status state)
+ {
+ if (state != running_state && running_state != DAEMON_SHUTDOWN) {
+- enum daemon_status old_state = running_state;
++ /* save state for sd_notify */
++ enum daemon_status
++ __attribute__((unused)) old_state = running_state;
+
+ running_state = state;
+ pthread_cond_broadcast(&config_cond);
+@@ -272,7 +274,9 @@ int set_config_state(enum daemon_status state)
+ pthread_cleanup_push(config_cleanup, NULL);
+ pthread_mutex_lock(&config_lock);
+ if (running_state != state) {
+- enum daemon_status old_state = running_state;
++ /* save state for sd_notify */
++ enum daemon_status
++ __attribute__((unused)) old_state = running_state;
+
+ if (running_state == DAEMON_SHUTDOWN)
+ rc = EINVAL;
+@@ -2280,7 +2284,6 @@ checkerloop (void *ap)
+ struct timespec last_time;
+ struct config *conf;
+ int foreign_tick = 0;
+- bool use_watchdog;
+
+ pthread_cleanup_push(rcu_unregister, NULL);
+ rcu_register_thread();
+@@ -2292,11 +2295,15 @@ checkerloop (void *ap)
+ get_monotonic_time(&last_time);
+ last_time.tv_sec -= 1;
+
+- /* use_watchdog is set from process environment and never changes */
+ conf = get_multipath_config();
+- use_watchdog = conf->use_watchdog;
+ put_multipath_config(conf);
+
++#ifdef USE_SYSTEMD
++ /* use_watchdog is set from process environment and never changes */
++ bool use_watchdog;
++ use_watchdog = conf->use_watchdog;
++#endif
++
+ while (1) {
+ struct timespec diff_time, start_time, end_time;
+ int num_paths = 0, strict_timing, rc = 0;
diff --git a/gnu/packages/patches/openjdk-14-builtins.patch b/gnu/packages/patches/openjdk-14-builtins.patch
new file mode 100644
index 0000000000..0e7e3dcaa9
--- /dev/null
+++ b/gnu/packages/patches/openjdk-14-builtins.patch
@@ -0,0 +1,11 @@
+--- jdk14-bc54620a3848/make/autoconf/basics.m4 2020-02-07 04:40:54.000000000 +1030
++++ jdk14-bc54620a3848-new/make/autoconf/basics.m4 2020-04-24 10:59:33.056098506 +0930
+@@ -583,7 +583,7 @@
+ BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
+ if test "x[$]$1" = x; then
+ AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
+- if help $2 > /dev/null 2>&1; then
++ if command -v $2 > /dev/null 2>&1; then
+ AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
+ $1="$2"
+ else
diff --git a/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch
new file mode 100644
index 0000000000..f3b56e42d6
--- /dev/null
+++ b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch
@@ -0,0 +1,82 @@
+Fix compatibility with Python 3.8.
+
+Upstream issue: https://github.com/DirectXMan12/should_be/pull/5
+
+diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/core.py shouldbe-0.1.2.patched/should_be/core.py
+--- shouldbe-0.1.2/should_be/core.py 2019-03-06 07:38:22.000000000 +0100
++++ shouldbe-0.1.2.patched/should_be/core.py 2020-05-18 08:44:24.214664704 +0200
+@@ -103,7 +103,7 @@
+ return resf
+
+
+-def buildCode(baseCode, argcount=None, kwonlyargcount=None,
++def buildCode(baseCode, argcount=None, posonlyargcount=None, kwonlyargcount=None,
+ nlocals=None, stacksize=None, flags=None,
+ code=None, consts=None, names=None,
+ varnames=None, filename=None, name=None,
+@@ -121,6 +121,24 @@
+ nlocals or baseCode.co_nlocals,
+ stacksize or baseCode.co_stacksize,
+ flags or baseCode.co_flags,
++ code or baseCode.co_code,
++ consts or baseCode.co_consts,
++ names or baseCode.co_names,
++ varnames or baseCode.co_varnames,
++ filename or baseCode.co_filename,
++ name or baseCode.co_name,
++ firstlineno or baseCode.co_firstlineno,
++ lnotab or baseCode.co_lnotab,
++ freevars or baseCode.co_freevars,
++ cellvars or baseCode.co_cellvars)
++ elif hasattr(baseCode, 'co_posonlyargcount'):
++ # Python 3.8
++ resc = CodeType(argcount or baseCode.co_argcount,
++ posonlyargcount or baseCode.co_posonlyargcount,
++ kwonlyargcount or baseCode.co_kwonlyargcount,
++ nlocals or baseCode.co_nlocals,
++ stacksize or baseCode.co_stacksize,
++ flags or baseCode.co_flags,
+ code or baseCode.co_code,
+ consts or baseCode.co_consts,
+ names or baseCode.co_names,
+diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/tests/test_container_mixin.py shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py
+--- shouldbe-0.1.2/should_be/tests/test_container_mixin.py 2019-03-01 06:38:16.000000000 +0100
++++ shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py 2020-05-18 09:00:51.372531064 +0200
+@@ -7,31 +7,31 @@
+ self.lst = [1, 2, 3]
+
+ def test_should_include_iter(self):
+- err_msg = (r'[a-zA-Z0-9.]+ should have included \[.+?\]'
++ err_msg = (r'[a-zA-Z0-9.()]+ should have included \[.+?\]'
+ r', but did not have items .+')
+- self.assertRaisesRegexp(AssertionError, err_msg,
++ self.assertRaisesRegex(AssertionError, err_msg,
+ self.lst.should_include, [4])
+
+ self.lst.should_include([1, 2, 3])
+
+ def test_should_include_item(self):
+- err_msg = (r'[a-zA-Z0-9.]+ should have included .+?'
++ err_msg = (r'[a-zA-Z0-9.()]+ should have included .+?'
+ r', but did not')
+- self.assertRaisesRegexp(AssertionError, err_msg,
++ self.assertRaisesRegex(AssertionError, err_msg,
+ self.lst.should_include, 4)
+
+ self.lst.should_include(3)
+
+ def test_shouldnt_include_iter(self):
+ err_msg = 'should not have included'
+- self.assertRaisesRegexp(AssertionError, err_msg,
++ self.assertRaisesRegex(AssertionError, err_msg,
+ self.lst.shouldnt_include, [2, 3])
+
+ self.lst.shouldnt_include([4, 5])
+
+ def test_shouldnt_include_item(self):
+ err_msg = 'should not have included'
+- self.assertRaisesRegexp(AssertionError, err_msg,
++ self.assertRaisesRegex(AssertionError, err_msg,
+ self.lst.shouldnt_include, 3)
+
+ self.lst.shouldnt_include(4)
diff --git a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch b/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch
deleted file mode 100644
index 29cdeb6e8d..0000000000
--- a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Tobias Geerinckx-Rice <me@tobias.gr>
-Date: Tue, 19 Feb 2019 07:46:28 +0100
-Subject: [PATCH] gnu: soundconverter: Catch (and ignore) the right error.
-
-Without this patch and GConf:
-
- Traceback (most recent call last):
- File "/gnu/…/bin/...soundconverter-real-real-real", line 164, in <module>
- from soundconverter.batch import cli_convert_main
- File "/gnu/…/lib/soundconverter/python/soundconverter/batch.py", line 31, in <module>
- from soundconverter.gstreamer import TagReader
- File "/gnu/…/lib/soundconverter/python/soundconverter/gstreamer.py", line 70, in <module>
- gi.require_version('GConf', '2.0')
- File "/gnu/…/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
- raise ValueError('Namespace %s not available' % namespace)
- ValueError: Namespace GConf not available
----
-diff -Naur soundconverter-3.0.1/soundconverter/gstreamer.py soundconverter-3.0.1/soundconverter/gstreamer.py
---- soundconverter-3.0.1/soundconverter/gstreamer.py 2018-11-23 20:38:46.000000000 +0100
-+++ soundconverter-3.0.1/soundconverter/gstreamer.py 2019-02-19 07:42:15.767684388 +0100
-@@ -88,7 +88,7 @@
- profile = description, extension, pipeline
- audio_profiles_list.append(profile)
- audio_profiles_dict[description] = profile
--except ImportError:
-+except ValueError:
- pass
-
- required_elements = ('decodebin', 'fakesink', 'audioconvert', 'typefind', 'audiorate')