summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-06 00:17:50 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-06 00:17:50 +0100
commitb6f946f039afad6cbc7027d52685072f7fbb8d35 (patch)
tree9dc33d1ef9d307f1e3ed8a825902ff69bbe288f9 /gnu/packages/patches
parente32aea5472007507e62933b27a4db9a50810e5dc (diff)
parentbc8b2ffdac3f55414629ace5b1a0db32e9656c0a (diff)
downloadguix-b6f946f039afad6cbc7027d52685072f7fbb8d35.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/appstream-glib-2020.patch31
-rw-r--r--gnu/packages/patches/ceph-boost-compat.patch81
-rw-r--r--gnu/packages/patches/ceph-volume-respect-PATH.patch22
-rw-r--r--gnu/packages/patches/libgit2-avoid-python.patch322
-rw-r--r--gnu/packages/patches/suitesparse-mongoose-cmake.patch27
5 files changed, 27 insertions, 456 deletions
diff --git a/gnu/packages/patches/appstream-glib-2020.patch b/gnu/packages/patches/appstream-glib-2020.patch
deleted file mode 100644
index ab8a4bbdee..0000000000
--- a/gnu/packages/patches/appstream-glib-2020.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-2020 is no longer the future.
-
-Taken from upstream:
-https://github.com/hughsie/appstream-glib/commit/953c8e529d7291e60a95e580967ed79ce2c9ccf0
-
-diff --git a/data/tests/broken.appdata.xml b/data/tests/broken.appdata.xml
-index f7a5386e..cf80f5b4 100644
---- a/data/tests/broken.appdata.xml
-+++ b/data/tests/broken.appdata.xml
-@@ -40,7 +40,7 @@
-         <p>This is a duplicate release on the same day!</p>
-       </description>
-     </release>
--    <release date="2020-01-01" version="0.6.2">
-+    <release date="2050-01-01" version="0.6.2">
-       <description>
-         <p>This is a release in the future!</p>
-       </description>
-diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
-index c1103ace..f50e4e41 100644
---- a/libappstream-glib/as-app-validate.c
-+++ b/libappstream-glib/as-app-validate.c
-@@ -864,7 +864,7 @@ as_app_validate_release (AsApp *app,
- 				     AS_PROBLEM_KIND_ATTRIBUTE_MISSING,
- 				     "<release> has no timestamp");
- 	}
--	if (timestamp > 20120101 && timestamp < 20251231) {
-+	if (timestamp > 20120101 && timestamp < 20351231) {
- 		ai_app_validate_add (helper,
- 				     AS_PROBLEM_KIND_ATTRIBUTE_INVALID,
- 				     "<release> timestamp should be a UNIX time");
diff --git a/gnu/packages/patches/ceph-boost-compat.patch b/gnu/packages/patches/ceph-boost-compat.patch
deleted file mode 100644
index b3df659d6b..0000000000
--- a/gnu/packages/patches/ceph-boost-compat.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Fix compatibility with Boost 1.70.
-
-Adapted for 14.2.5 from these upstream commits:
-https://github.com/ceph/ceph/commit/064f142746ae97f54865069cdacf5aae2b1b14f6
-https://github.com/ceph/ceph/commit/f1651b8c509d60787d10c4115e29fecfd2da237c
-
-diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
---- a/src/rgw/rgw_asio_frontend.cc
-+++ b/src/rgw/rgw_asio_frontend.cc
-@@ -83,7 +83,8 @@
- using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
- 
- template <typename Stream>
--void handle_connection(RGWProcessEnv& env, Stream& stream,
-+void handle_connection(boost::asio::io_context& context,
-+		       RGWProcessEnv& env, Stream& stream,
-                        parse_buffer& buffer, bool is_ssl,
-                        SharedMutex& pause_mutex,
-                        rgw::dmclock::Scheduler *scheduler,
-@@ -160,7 +161,7 @@
-                                   rgw::io::add_conlen_controlling(
-                                     &real_client))));
-       RGWRestfulIO client(cct, &real_client_io);
--      auto y = optional_yield{socket.get_io_context(), yield};
-+      auto y = optional_yield{context, yield};
-       process_request(env.store, env.rest, &req, env.uri_prefix,
-                       *env.auth_registry, &client, env.olog, y, scheduler);
-     }
-@@ -604,7 +605,7 @@
-           return;
-         }
-         buffer->consume(bytes);
--        handle_connection(env, stream, *buffer, true, pause_mutex,
-+        handle_connection(context, env, stream, *buffer, true, pause_mutex,
-                           scheduler.get(), ec, yield);
-         if (!ec) {
-           // ssl shutdown (ignoring errors)
-@@ -622,7 +623,7 @@
-         auto c = connections.add(conn);
-         auto buffer = std::make_unique<parse_buffer>();
-         boost::system::error_code ec;
--        handle_connection(env, s, *buffer, false, pause_mutex,
-+        handle_connection(context, env, s, *buffer, false, pause_mutex,
-                           scheduler.get(), ec, yield);
-         s.shutdown(tcp::socket::shutdown_both, ec);
-       });
-diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
---- a/src/rgw/rgw_dmclock_async_scheduler.h
-+++ b/src/rgw/rgw_dmclock_async_scheduler.h
-@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
-   using Completion = async::Completion<Signature, async::AsBase<Request>>;
- 
-   using Clock = ceph::coarse_real_clock;
-+#if BOOST_VERSION < 107000
-   using Timer = boost::asio::basic_waitable_timer<Clock>;
-+#else
-+  using Timer = boost::asio::basic_waitable_timer<Clock,
-+        boost::asio::wait_traits<Clock>, executor_type>;
-+#endif
-   Timer timer; //< timer for the next scheduled request
- 
-   CephContext *const cct;
-diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
---- a/src/rgw/rgw_reshard.h
-+++ b/src/rgw/rgw_reshard.h
-@@ -183,7 +183,14 @@ class RGWReshardWait {
-   ceph::condition_variable cond;
- 
-   struct Waiter : boost::intrusive::list_base_hook<> {
--    boost::asio::basic_waitable_timer<Clock> timer;
-+#if BOOST_VERSION < 107000
-+    using Timer = boost::asio::basic_waitable_timer<Clock>;
-+#else
-+    using Executor = boost::asio::io_context::executor_type;
-+    using Timer = boost::asio::basic_waitable_timer<Clock,
-+          boost::asio::wait_traits<Clock>, Executor>;
-+#endif
-+    Timer timer;
-     explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
-   };
-   boost::intrusive::list<Waiter> waiters;
diff --git a/gnu/packages/patches/ceph-volume-respect-PATH.patch b/gnu/packages/patches/ceph-volume-respect-PATH.patch
deleted file mode 100644
index 08a9a15ddd..0000000000
--- a/gnu/packages/patches/ceph-volume-respect-PATH.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Look for required tools in $PATH instead of just a handful locations.
-
-diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py
-index b637f023a4..14516e1c65 100644
---- a/src/ceph-volume/ceph_volume/util/system.py
-+++ b/src/ceph-volume/ceph_volume/util/system.py
-@@ -33,14 +33,7 @@ def generate_uuid():
- 
- def which(executable):
-     """find the location of an executable"""
--    locations = (
--        '/usr/local/bin',
--        '/bin',
--        '/usr/bin',
--        '/usr/local/sbin',
--        '/usr/sbin',
--        '/sbin',
--    )
-+    locations = os.getenv('PATH').split(':')
- 
-     for location in locations:
-         executable_path = os.path.join(location, executable)
diff --git a/gnu/packages/patches/libgit2-avoid-python.patch b/gnu/packages/patches/libgit2-avoid-python.patch
deleted file mode 100644
index b2e5141563..0000000000
--- a/gnu/packages/patches/libgit2-avoid-python.patch
+++ /dev/null
@@ -1,322 +0,0 @@
-This provides a Guile reimplementation of clar's "generate.py".
-It makes it possible for us to remove Python from libgit2's build-time
-dependencies.
-libgit2 is used in order to fetch a lot of sources for guix packages.
-Both Python2 and Python3 builds acted up in the past.
-Hence this patch which makes the number of libgit2 dependencies very
-small.
-The reimplementation tries to keep as close as possible to the original
-in both structure and runtime effect.  Some things are thus overly
-convoluted just to make them the same as in the original.
-
-Both implementations basically do:
-
-grep -r 'test_.*__.*' . > clar.suite
-
-It is important that the directory traversal order of the original and
-the reimplementation stay the same.
-
-diff -ruN orig/libgit2-0.27.7/tests/CMakeLists.txt libgit2-0.27.7/tests/CMakeLists.txt
---- orig/libgit2-0.27.7/tests/CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
-+++ libgit2-0.27.7/tests/CMakeLists.txt	2019-03-04 11:13:06.640118979 +0100
-@@ -1,10 +1,3 @@
--FIND_PACKAGE(PythonInterp)
--
--IF(NOT PYTHONINTERP_FOUND)
--  MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
--    "Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
--ENDIF()
--
- SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/resources/")
- SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
- ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
-@@ -21,7 +14,7 @@
- 
- ADD_CUSTOM_COMMAND(
- 	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clar.suite
--	COMMAND ${PYTHON_EXECUTABLE} generate.py -o "${CMAKE_CURRENT_BINARY_DIR}" -f -xonline -xstress -xperf .
-+	COMMAND guile generate.scm -o "${CMAKE_CURRENT_BINARY_DIR}" -f -x online -x stress -x perf .
- 	DEPENDS ${SRC_TEST}
- 	WORKING_DIRECTORY ${CLAR_PATH}
- )
-diff -ruN orig/libgit2-0.27.7/tests/generate.scm libgit2-0.27.7/tests/generate.scm
---- orig/libgit2-0.27.7/tests/generate.scm	1970-01-01 01:00:00.000000000 +0100
-+++ libgit2-0.27.7/tests/generate.scm	2019-03-04 12:18:00.688040975 +0100
-@@ -0,0 +1,277 @@
-+;; -*- geiser-scheme-implementation: guile -*-
-+
-+;;; Implementation: Danny Milosavljevic <dannym@scratchpost.org>
-+;;; Based on: Implementation in Python by Vicent Marti.
-+;;; License: ISC, like the original generate.py in clar.
-+
-+(use-modules (ice-9 ftw))
-+(use-modules (ice-9 regex))
-+(use-modules (ice-9 getopt-long))
-+(use-modules (ice-9 rdelim))
-+(use-modules (ice-9 match))
-+(use-modules (ice-9 textual-ports))
-+(use-modules (srfi srfi-1))
-+
-+(define (render-callback cb)
-+  (if cb
-+      (string-append "    { \"" (assoc-ref cb "short-name") "\", &"
-+                     (assoc-ref cb "symbol") " }")
-+      "    { NULL, NULL }"))
-+
-+(define (replace needle replacement haystack)
-+  "Replace all occurences of NEEDLE in HAYSTACK by REPLACEMENT.
-+NEEDLE is a regular expression."
-+  (regexp-substitute/global #f needle haystack 'pre replacement 'post))
-+
-+(define (skip-comments* text)
-+  (call-with-input-string
-+   text
-+   (lambda (port)
-+     (let loop ((result '())
-+                (section #f))
-+       (define (consume-char)
-+         (cons (read-char port) result))
-+       (define (skip-char)
-+         (read-char port)
-+         result)
-+       (match section
-+        (#f
-+         (match (peek-char port)
-+          (#\/ (loop (consume-char) 'almost-in-block-comment))
-+          (#\" (loop (consume-char) 'in-string-literal))
-+          (#\' (loop (consume-char) 'in-character-literal))
-+          ((? eof-object?) result)
-+          (_ (loop (consume-char) section))))
-+        ('almost-in-block-comment
-+         (match (peek-char port)
-+          (#\* (loop (consume-char) 'in-block-comment))
-+          (#\/ (loop (consume-char) 'in-line-comment))
-+          ((? eof-object?) result)
-+          (_ (loop (consume-char) #f))))
-+        ('in-line-comment
-+         (match (peek-char port)
-+          (#\newline (loop (consume-char) #f))
-+          ((? eof-object?) result)
-+          (_ (loop (skip-char) section))))
-+        ('in-block-comment
-+         (match (peek-char port)
-+           (#\* (loop (skip-char) 'almost-out-of-block-comment))
-+           ((? eof-object?) result)
-+           (_ (loop (skip-char) section))))
-+        ('almost-out-of-block-comment
-+         (match (peek-char port)
-+           (#\/ (loop (cons (read-char port) (cons #\* result)) #f))
-+           (#\* (loop (skip-char) 'almost-out-of-block-comment))
-+           ((? eof-object?) result)
-+           (_ (loop (skip-char) 'in-block-comment))))
-+        ('in-string-literal
-+         (match (peek-char port)
-+           (#\\ (loop (consume-char) 'in-string-literal-escape))
-+           (#\" (loop (consume-char) #f))
-+           ((? eof-object?) result)
-+           (_ (loop (consume-char) section))))
-+        ('in-string-literal-escape
-+         (match (peek-char port)
-+           ((? eof-object?) result)
-+           (_ (loop (consume-char) 'in-string-literal))))
-+        ('in-character-literal
-+         (match (peek-char port)
-+           (#\\ (loop (consume-char) 'in-character-literal-escape))
-+           (#\' (loop (consume-char) #f))
-+           ((? eof-object?) result)
-+           (_ (loop (consume-char) section))))
-+        ('in-character-literal-escape
-+         (match (peek-char port)
-+           ((? eof-object?) result)
-+           (_ (loop (consume-char) 'in-character-literal)))))))))
-+
-+(define (skip-comments text)
-+  (list->string (reverse (skip-comments* text))))
-+
-+(define (maybe-only items)
-+  (match items
-+   ((a) a)
-+   (_ #f)))
-+
-+(define (Module name path excludes)
-+  (let* ((clean-name (replace "_" "::" name))
-+         (enabled (not (any (lambda (exclude)
-+                              (string-prefix? exclude clean-name))
-+                            excludes))))
-+    (define (parse contents)
-+      (define (cons-match match prev)
-+        (cons
-+         `(("declaration" . ,(match:substring match 1))
-+           ("symbol" . ,(match:substring match 2))
-+           ("short-name" . ,(match:substring match 3)))
-+         prev))
-+      (let* ((contents (skip-comments contents))
-+             (entries (fold-matches (make-regexp
-+                                     (string-append "^(void\\s+(test_"
-+                                                    name
-+                                                    "__(\\w+))\\s*\\(\\s*void\\s*\\))\\s*\\{")
-+                                     regexp/newline)
-+                                    contents
-+                                    '()
-+                                    cons-match))
-+             (entries (reverse entries))
-+             (callbacks (filter (lambda (entry)
-+                                   (match (assoc-ref entry "short-name")
-+                                    ("initialize" #f)
-+                                    ("cleanup" #f)
-+                                    (_ #t)))
-+                                entries)))
-+        (if (> (length callbacks) 0)
-+            `(("name" . ,name)
-+              ("enabled" . ,(if enabled "1" "0"))
-+              ("clean-name" . ,clean-name)
-+              ("initialize" . ,(maybe-only (filter-map (lambda (entry)
-+                                                      (match (assoc-ref entry "short-name")
-+                                                       ("initialize" entry)
-+                                                       (_ #f)))
-+                                                     entries)))
-+              ("cleanup" . ,(maybe-only (filter-map (lambda (entry)
-+                                                   (match (assoc-ref entry "short-name")
-+                                                    ("cleanup" entry)
-+                                                    (_ #f)))
-+                                                  entries)))
-+              ("callbacks" . ,callbacks))
-+            #f)))
-+
-+    (define (refresh path)
-+      (and (file-exists? path)
-+           (parse (call-with-input-file path get-string-all))))
-+    (refresh path)))
-+
-+(define (generate-TestSuite path output excludes)
-+    (define (load)
-+        (define enter? (const #t))
-+        (define (leaf file stat result)
-+          (let* ((module-root (string-drop (dirname file)
-+                                           (string-length path)))
-+                 (module-root (filter-map (match-lambda
-+                                           ("" #f)
-+                                           (a a))
-+                                          (string-split module-root #\/))))
-+            (define (make-module path)
-+              (let* ((name (string-join (append module-root (list (string-drop-right (basename path) (string-length ".c")))) "_"))
-+                     (name (replace "-" "_" name)))
-+                (Module name path excludes)))
-+            (if (string-suffix? ".c" file)
-+                (let ((module (make-module file)))
-+                  (if module
-+                      (cons module result)
-+                      result))
-+                result)))
-+        (define (down dir stat result)
-+          result)
-+        (define (up file state result)
-+          result)
-+        (define skip (const #f))
-+        (file-system-fold enter? leaf down up skip error '() path))
-+
-+    (define (CallbacksTemplate module)
-+      (string-append "static const struct clar_func _clar_cb_"
-+                     (assoc-ref module "name") "[] = {\n"
-+                     (string-join (map render-callback
-+                                       (assoc-ref module "callbacks"))
-+                                  ",\n")
-+                     "\n};\n"))
-+
-+    (define (DeclarationTemplate module)
-+      (string-append (string-join (map (lambda (cb)
-+                                         (string-append "extern "
-+                                                        (assoc-ref cb "declaration")
-+                                                        ";"))
-+                                       (assoc-ref module "callbacks"))
-+                                  "\n")
-+                     "\n"
-+                     (if (assoc-ref module "initialize")
-+                         (string-append "extern " (assoc-ref (assoc-ref module "initialize") "declaration") ";\n")
-+                         "")
-+                     (if (assoc-ref module "cleanup")
-+                         (string-append "extern " (assoc-ref (assoc-ref module "cleanup") "declaration") ";\n")
-+                         "")))
-+
-+    (define (InfoTemplate module)
-+      (string-append "
-+    {
-+        \"" (assoc-ref module "clean-name") "\",
-+    " (render-callback (assoc-ref module "initialize")) ",
-+    " (render-callback (assoc-ref module "cleanup")) ",
-+        _clar_cb_" (assoc-ref module "name") ", "
-+        (number->string (length (assoc-ref module "callbacks")))
-+        ", " (assoc-ref module "enabled") "
-+    }"))
-+
-+    (define (Write data)
-+      (define (name< module-a module-b)
-+        (string<? (assoc-ref module-a "name")
-+                  (assoc-ref module-b "name")))
-+      (define modules (sort (load) name<))
-+
-+      (define (suite-count)
-+        (length modules))
-+
-+      (define (callback-count)
-+        (fold + 0 (map (lambda (entry)
-+                         (length (assoc-ref entry "callbacks")))
-+                         modules)))
-+
-+      (define (display-x value)
-+        (display value data))
-+
-+      (for-each (compose display-x DeclarationTemplate) modules)
-+      (for-each (compose display-x CallbacksTemplate) modules)
-+
-+      (display-x "static struct clar_suite _clar_suites[] = {")
-+      (display-x (string-join (map InfoTemplate modules) ","))
-+      (display-x "\n};\n")
-+
-+      (let ((suite-count-str (number->string (suite-count)))
-+            (callback-count-str (number->string (callback-count))))
-+        (display-x "static const size_t _clar_suite_count = ")
-+        (display-x suite-count-str)
-+        (display-x ";\n")
-+
-+        (display-x "static const size_t _clar_callback_count = ")
-+        (display-x callback-count-str)
-+        (display-x ";\n")
-+
-+        (display (string-append "Written `clar.suite` ("
-+                                callback-count-str
-+                                " tests in "
-+                                suite-count-str
-+                                " suites)"))
-+        (newline))
-+      #t)
-+
-+    (call-with-output-file (string-append output "/clar.suite") Write))
-+
-+;;; main
-+
-+(define (main)
-+  (define option-spec
-+    '((force (single-char #\f) (value #f))
-+      (exclude (single-char #\x) (value #t))
-+      (output (single-char #\o) (value #t))
-+      (help  (single-char #\h) (value #f))))
-+
-+  (define options (getopt-long (command-line) option-spec #:stop-at-first-non-option #t))
-+  (define args (reverse (option-ref options '() '())))
-+  (when (> (length args) 1)
-+    (display "More than one path given\n")
-+    (exit 1))
-+
-+  (if (< (length args) 1)
-+      (set! args '(".")))
-+
-+  (let* ((path (car args))
-+         (output (option-ref options 'output path))
-+         (excluded (filter-map (match-lambda
-+                                (('exclude . value) value)
-+                                (_ #f))
-+                               options)))
-+    (generate-TestSuite path output excluded)))
-+
-+(main)
diff --git a/gnu/packages/patches/suitesparse-mongoose-cmake.patch b/gnu/packages/patches/suitesparse-mongoose-cmake.patch
new file mode 100644
index 0000000000..e5062f9aaa
--- /dev/null
+++ b/gnu/packages/patches/suitesparse-mongoose-cmake.patch
@@ -0,0 +1,27 @@
+Fix required by suitesparse to build Mongoose
+
+The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
+installed into the suitesparse source directory, which is not the case
+for us, as we are building suitesparse out-of-tree.
+
+SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
+directory.
+
+diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
+index 7e134ab..76fa9e2 100644
+--- a/Mongoose/CMakeLists.txt
++++ b/Mongoose/CMakeLists.txt
+@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
+ #set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+ # determine which SuiteSparse_config to use
+-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
+-    message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
++if (EXISTS ${CMAKE_INSTALL_PREFIX})
++    message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
+     set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
+-    link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
++    link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
+     message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
+     set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
+ else ()