From 5e3ea571c5ac10858b2a1d6d3dc94a26408ae601 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sun, 2 Jul 2017 14:22:05 -0400 Subject: gnu: bigloo: Update to 4.3a. * gnu/packages/scheme.scm (bigloo): Update to 4.3a. [source]: Remove old patch. Add snippet. [arguments]: Adjust the build phases accordingly. [inputs]: Add libgc, libunistring, libuv, openssl, pcre and sqlite. --- gnu/packages/patches/bigloo-gc-shebangs.patch | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 gnu/packages/patches/bigloo-gc-shebangs.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/bigloo-gc-shebangs.patch b/gnu/packages/patches/bigloo-gc-shebangs.patch deleted file mode 100644 index 367708610a..0000000000 --- a/gnu/packages/patches/bigloo-gc-shebangs.patch +++ /dev/null @@ -1,18 +0,0 @@ -Patch shebangs in source that gets unpacked by `configure'. - ---- bigloo4.1a/gc/install-gc-7.4.0 2014-02-04 14:55:03.000000000 +0100 -+++ bigloo4.1a/gc/install-gc-7.4.0 2014-02-04 14:55:36.000000000 +0100 -@@ -29,10 +29,12 @@ fi - - # untar the two versions of the GC - $tar xfz $src -C ../gc || (echo "$tar xfz $src failed"; exit 1) --/bin/rm -rf "../gc/$gc"_fth -+rm -rf "../gc/$gc"_fth -+find ../gc/$gc -perm /111 -type f | xargs sed -i -e"s|/bin/sh|`type -P sh`|g" - mv ../gc/$gc "../gc/$gc"_fth || (echo "mv $gc failed"; exit 1) - - $tar xfz $src -C ../gc || (echo "$tar xfz $src failed"; exit 1) -+find ../gc/$gc -perm /111 -type f | xargs sed -i -e"s|/bin/sh|`type -P sh`|g" - - # general Bigloo patch - (cd "../gc/$gc"_fth && $patch -p1 < ../$gc.patch > /dev/null) -- cgit v1.2.3 From 082725b5027a3782f242b634f94b9049d4c7f309 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Mon, 3 Jul 2017 14:34:34 -0400 Subject: gnu: hop: Update to 3.1.0-pre2. * gnu/packages/scheme.scm (hop): Update to 3.1.0-pre2. [source]: Remove unnecessary patch. [arguments]: Enable tests; disable parallel building; specify BIGLOO in make-flags. [inputs]: Add libgc, libunistring, libuv, pcre and sqlite. * gnu/local.mk (dist_patch_DATA): Remove unnecessary patch. * gnu/packages/patches/hop-linker-flags.patch: Delete file. --- gnu/local.mk | 1 - gnu/packages/patches/hop-linker-flags.patch | 60 ----------------------------- gnu/packages/scheme.scm | 23 +++++++---- 3 files changed, 15 insertions(+), 69 deletions(-) delete mode 100644 gnu/packages/patches/hop-linker-flags.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f73a6ddd08..199792b4f3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -688,7 +688,6 @@ dist_patch_DATA = \ %D%/packages/patches/hdf-eos5-fix-szip.patch \ %D%/packages/patches/hdf-eos5-fortrantests.patch \ %D%/packages/patches/higan-remove-march-native-flag.patch \ - %D%/packages/patches/hop-linker-flags.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ diff --git a/gnu/packages/patches/hop-linker-flags.patch b/gnu/packages/patches/hop-linker-flags.patch deleted file mode 100644 index f1f5dbfbd9..0000000000 --- a/gnu/packages/patches/hop-linker-flags.patch +++ /dev/null @@ -1,60 +0,0 @@ -Make hop's link rules honor flags set by the --blflags configure argument. - ---- hop-2.4.0/src/Makefile 2015-05-05 19:41:04.800151036 -0500 -+++ hop-2.4.0/src/Makefile 2015-05-05 19:40:40.916150417 -0500 -@@ -69,10 +69,10 @@ - $(MAKE) link.$(LINK) DEST=$@ - - link.dynamic: -- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) -+ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) - - link.static: -- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) -+ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) - - link.library: - echo "***ERROR: link.library not currently supported!" ---- hop-2.4.0/hopc/Makefile 2013-01-30 07:17:59.000000000 -0600 -+++ hop-2.4.0/hopc/Makefile 2015-05-05 19:45:21.876157699 -0500 -@@ -62,7 +62,7 @@ - mkdir -p $@ - - $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) -- @ $(call link,$(BIGLOO),$(BCFLAGS),,$(OBJECTS),-o,$@) -+ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) - - $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib - $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . ---- hop-2.4.0/hophz/Makefile 2013-01-30 07:17:59.000000000 -0600 -+++ hop-2.4.0/hophz/Makefile 2015-05-05 19:59:42.996180030 -0500 -@@ -16,9 +16,6 @@ - -include ../etc/Makefile.hopconfig - -include ../etc/Makefile.version - --BLFLAGS = --BLINKFLAGS = -suffix hop -- - #*---------------------------------------------------------------------*/ - #* Target and Project */ - #*---------------------------------------------------------------------*/ -@@ -72,7 +69,7 @@ - mkdir -p $@ - - $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) -- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BLINKFLAGS),$(OBJECTS),-o,$@) -+ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) - - $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib - @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . ---- hop-2.4.0/hopsh/Makefile 2013-01-30 07:17:59.000000000 -0600 -+++ hop-2.4.0/hopsh/Makefile 2015-05-05 19:46:36.060159626 -0500 -@@ -60,7 +60,7 @@ - mkdir -p $@ - - $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) -- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) -+ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) - - $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib - @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 8c8922d89f..92c0170205 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -288,21 +288,23 @@ Scheme and C programs and between Scheme and Java programs.") (define-public hop (package (name "hop") - (version "2.5.1") + (version "3.1.0-pre2") (source (origin (method url-fetch) (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-" version ".tar.gz")) (sha256 (base32 - "1bvp7pc71bln5yvfj87s8750c6l53wjl6f8m12v62q9926adhwys")) - (patches (search-patches "hop-linker-flags.patch")))) + "09m7pahjsp7wxzd20cdph9j3mgf2nq5dyckcjljcd40m25v85kks")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:test-target "test" + #:make-flags '("BIGLOO=bigloo") + #:parallel-build? #f + #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (zero? (system* "./configure" @@ -310,11 +312,16 @@ Scheme and C programs and between Scheme and Java programs.") (string-append "--blflags=" ;; user flags completely override useful ;; default flags, so repeat them here. - "-copt \\$(CPICFLAGS) -L\\$(BUILDLIBDIR) " - "-ldopt -Wl,-rpath," out "/lib"))))))) - #:tests? #f)) ; no test suite + "-copt \\$(CPICFLAGS) " + "-L \\$(BUILDLIBDIR) " + "-ldopt -Wl,-rpath," out "/lib"))))))))) (inputs `(("avahi" ,avahi) ("bigloo" ,bigloo) + ("libgc" ,libgc) + ("libunistring" ,libunistring) + ("libuv" ,libuv) + ("pcre" ,pcre) + ("sqlite" ,sqlite) ("which" ,which))) (home-page "http://hop.inria.fr/") (synopsis "Multi-tier programming language for the Web 2.0") -- cgit v1.2.3 From d89ce52096982d2b5ff3f81f9dc0c8316590fe41 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 12 Jul 2017 15:39:34 -0400 Subject: gnu: spice: Fix CVE-2017-7506. * gnu/packages/patches/spice-CVE-2017-7506.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/spice.scm (spice)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/patches/spice-CVE-2017-7506.patch | 158 +++++++++++++++++++++++++ gnu/packages/spice.scm | 3 +- 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/spice-CVE-2017-7506.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 199792b4f3..4da9cba27d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1006,6 +1006,7 @@ dist_patch_DATA = \ %D%/packages/patches/spice-CVE-2016-9577.patch \ %D%/packages/patches/spice-CVE-2016-9578-1.patch \ %D%/packages/patches/spice-CVE-2016-9578-2.patch \ + %D%/packages/patches/spice-CVE-2017-7506.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/swish-e-search.patch \ diff --git a/gnu/packages/patches/spice-CVE-2017-7506.patch b/gnu/packages/patches/spice-CVE-2017-7506.patch new file mode 100644 index 0000000000..37d8f02831 --- /dev/null +++ b/gnu/packages/patches/spice-CVE-2017-7506.patch @@ -0,0 +1,158 @@ +Fix CVE-2017-7506: + +https://bugzilla.redhat.com/show_bug.cgi?id=1452606 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7506 + +Patches copied from Debian spice package version +'spice_0.12.8-2.1+deb9u1.debian.tar.xz': +http://security.debian.org/debian-security/pool/updates/main/s/spice/spice_0.12.8-2.1+deb9u1.debian.tar.xz + +The patches had to be adapted to apply to the latest spice tarball, and +are based on these upstream commits: + +https://cgit.freedesktop.org/spice/spice/commit/?id=111ab38611cef5012f1565a65fa2d8a8a05cce37 +https://cgit.freedesktop.org/spice/spice/commit/?id=571cec91e71c2aae0d5f439ea2d8439d0c3d75eb +https://cgit.freedesktop.org/spice/spice/commit/?id=fbbcdad773e2791cfb988f4748faa41943551ca6 + +From 257f69d619fed407493156c8a7b952abc8a51314 Mon Sep 17 00:00:00 2001 +Date: Mon, 15 May 2017 15:57:28 +0100 +Subject: [spice-server 1/3] reds: Disconnect when receiving overly big + ClientMonitorsConfig + +Total message size received from the client was unlimited. There is +a 2kiB size check on individual agent messages, but the MonitorsConfig +message can be split in multiple chunks, and the size of the +non-chunked MonitorsConfig message was never checked. This could easily +lead to memory exhaustion on the host. + +--- + server/reds.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/server/reds.c b/server/reds.c +index f439a3668..7be85fdfc 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -993,19 +993,34 @@ static void reds_client_monitors_config_cleanup(void) + static void reds_on_main_agent_monitors_config( + MainChannelClient *mcc, void *message, size_t size) + { ++ const unsigned int MAX_MONITORS = 256; ++ const unsigned int MAX_MONITOR_CONFIG_SIZE = ++ sizeof(VDAgentMonitorsConfig) + MAX_MONITORS * sizeof(VDAgentMonConfig); ++ + VDAgentMessage *msg_header; + VDAgentMonitorsConfig *monitors_config; + RedsClientMonitorsConfig *cmc = &reds->client_monitors_config; + ++ // limit size of message sent by the client as this can cause a DoS through ++ // memory exhaustion, or potentially some integer overflows ++ if (sizeof(VDAgentMessage) + MAX_MONITOR_CONFIG_SIZE - cmc->buffer_size < size) { ++ goto overflow; ++ } + cmc->buffer_size += size; + cmc->buffer = realloc(cmc->buffer, cmc->buffer_size); + spice_assert(cmc->buffer); + cmc->mcc = mcc; + memcpy(cmc->buffer + cmc->buffer_pos, message, size); + cmc->buffer_pos += size; ++ if (sizeof(VDAgentMessage) > cmc->buffer_size) { ++ spice_debug("not enough data yet. %d", cmc->buffer_size); ++ return; ++ } + msg_header = (VDAgentMessage *)cmc->buffer; +- if (sizeof(VDAgentMessage) > cmc->buffer_size || +- msg_header->size > cmc->buffer_size - sizeof(VDAgentMessage)) { ++ if (msg_header->size > MAX_MONITOR_CONFIG_SIZE) { ++ goto overflow; ++ } ++ if (msg_header->size > cmc->buffer_size - sizeof(VDAgentMessage)) { + spice_debug("not enough data yet. %d", cmc->buffer_size); + return; + } +@@ -1013,6 +1028,12 @@ static void reds_on_main_agent_monitors_config( + spice_debug("%s: %d", __func__, monitors_config->num_of_monitors); + red_dispatcher_client_monitors_config(monitors_config); + reds_client_monitors_config_cleanup(); ++ return; ++ ++overflow: ++ spice_warning("received invalid MonitorsConfig request from client, disconnecting"); ++ red_channel_client_disconnect(main_channel_client_get_base(mcc)); ++ reds_client_monitors_config_cleanup(); + } + + void reds_on_main_agent_data(MainChannelClient *mcc, void *message, size_t size) +-- +2.13.0 +From ff2b4ef70181087d5abd50bad76d026ec5088a93 Mon Sep 17 00:00:00 2001 +Date: Mon, 15 May 2017 15:57:28 +0100 +Subject: [spice-server 2/3] reds: Avoid integer overflows handling monitor + configuration + +Avoid VDAgentMessage::size integer overflows. + +--- + server/reds.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/server/reds.c b/server/reds.c +index 7be85fdfc..e1c8c1086 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -1024,6 +1024,9 @@ static void reds_on_main_agent_monitors_config( + spice_debug("not enough data yet. %d", cmc->buffer_size); + return; + } ++ if (msg_header->size < sizeof(VDAgentMonitorsConfig)) { ++ goto overflow; ++ } + monitors_config = (VDAgentMonitorsConfig *)(cmc->buffer + sizeof(*msg_header)); + spice_debug("%s: %d", __func__, monitors_config->num_of_monitors); + red_dispatcher_client_monitors_config(monitors_config); +-- +2.13.0 +From 8cc3d7df2792751939cc832f4110c57e2addfca5 Mon Sep 17 00:00:00 2001 +Date: Mon, 15 May 2017 15:57:28 +0100 +Subject: [spice-server 3/3] reds: Avoid buffer overflows handling monitor + configuration + +It was also possible for a malicious client to set +VDAgentMonitorsConfig::num_of_monitors to a number larger +than the actual size of VDAgentMOnitorsConfig::monitors. +This would lead to buffer overflows, which could allow the guest to +read part of the host memory. This might cause write overflows in the +host as well, but controlling the content of such buffers seems +complicated. + +--- + server/reds.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/server/reds.c b/server/reds.c +index e1c8c1086..3a42c3755 100644 +--- a/server/reds.c ++++ b/server/reds.c +@@ -1000,6 +1000,7 @@ static void reds_on_main_agent_monitors_config( + VDAgentMessage *msg_header; + VDAgentMonitorsConfig *monitors_config; + RedsClientMonitorsConfig *cmc = &reds->client_monitors_config; ++ uint32_t max_monitors; + + // limit size of message sent by the client as this can cause a DoS through + // memory exhaustion, or potentially some integer overflows +@@ -1028,6 +1029,12 @@ static void reds_on_main_agent_monitors_config( + goto overflow; + } + monitors_config = (VDAgentMonitorsConfig *)(cmc->buffer + sizeof(*msg_header)); ++ // limit the monitor number to avoid buffer overflows ++ max_monitors = (msg_header->size - sizeof(VDAgentMonitorsConfig)) / ++ sizeof(VDAgentMonConfig); ++ if (monitors_config->num_of_monitors > max_monitors) { ++ goto overflow; ++ } + spice_debug("%s: %d", __func__, monitors_config->num_of_monitors); + red_dispatcher_client_monitors_config(monitors_config); + reds_client_monitors_config_cleanup(); +-- +2.13.0 diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm index 08343c52ed..8baf4f4a6d 100644 --- a/gnu/packages/spice.scm +++ b/gnu/packages/spice.scm @@ -211,7 +211,8 @@ which allows users to view a desktop computing environment.") (base32 "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr")) (patches - (search-patches "spice-CVE-2016-9577.patch" + (search-patches "spice-CVE-2017-7506.patch" + "spice-CVE-2016-9577.patch" "spice-CVE-2016-9578-1.patch" "spice-CVE-2016-9578-2.patch")))) (build-system gnu-build-system) -- cgit v1.2.3 From 5887d554ec8f626f9cb8e9f88e34109ad68076e8 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 13 Jul 2017 21:11:15 +0200 Subject: gnu: evince: Fix CVE-2017-1000083. * gnu/packages/patches/evince-CVE-2017-1000083.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (evince)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 1 + gnu/packages/patches/evince-CVE-2017-1000083.patch | 109 +++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 gnu/packages/patches/evince-CVE-2017-1000083.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4da9cba27d..1ced658911 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -576,6 +576,7 @@ dist_patch_DATA = \ %D%/packages/patches/eudev-rules-directory.patch \ %D%/packages/patches/eudev-conflicting-declaration.patch \ %D%/packages/patches/evilwm-lost-focus-bug.patch \ + %D%/packages/patches/evince-CVE-2017-1000083.patch \ %D%/packages/patches/expat-CVE-2016-0718-fix-regression.patch \ %D%/packages/patches/exim-CVE-2017-1000369.patch \ %D%/packages/patches/fabric-tests.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 972f3ec15b..3125fa03ca 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -615,6 +615,7 @@ forgotten when the session ends.") (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "evince-CVE-2017-1000083.patch")) (sha256 (base32 "13yw0i68dgqp9alyliy3zifszh7rikkpi1xbz5binvxxgfpraf04")))) diff --git a/gnu/packages/patches/evince-CVE-2017-1000083.patch b/gnu/packages/patches/evince-CVE-2017-1000083.patch new file mode 100644 index 0000000000..2ca062f337 --- /dev/null +++ b/gnu/packages/patches/evince-CVE-2017-1000083.patch @@ -0,0 +1,109 @@ +Fix CVE-2017-1000083. + +http://seclists.org/oss-sec/2017/q3/128 +https://bugzilla.gnome.org/show_bug.cgi?id=784630 + +Patch copied from upstream source repository: + +https://git.gnome.org/browse/evince/commit/?id=717df38fd8509bf883b70d680c9b1b3cf36732ee + +From 717df38fd8509bf883b70d680c9b1b3cf36732ee Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 6 Jul 2017 20:02:00 +0200 +Subject: comics: Remove support for tar and tar-like commands + +diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c +index 4c74731..641d785 100644 +--- a/backend/comics/comics-document.c ++++ b/backend/comics/comics-document.c +@@ -56,8 +56,7 @@ typedef enum + RARLABS, + GNAUNRAR, + UNZIP, +- P7ZIP, +- TAR ++ P7ZIP + } ComicBookDecompressType; + + typedef struct _ComicsDocumentClass ComicsDocumentClass; +@@ -117,9 +116,6 @@ static const ComicBookDecompressCommand command_usage_def[] = { + + /* 7zip */ + {NULL , "%s l -- %s" , "%s x -y %s -o%s", FALSE, OFFSET_7Z}, +- +- /* tar */ +- {"%s -xOf" , "%s -tf %s" , NULL , FALSE, NO_OFFSET} + }; + + static GSList* get_supported_image_extensions (void); +@@ -364,13 +360,6 @@ comics_check_decompress_command (gchar *mime_type, + comics_document->command_usage = GNAUNRAR; + return TRUE; + } +- comics_document->selected_command = +- g_find_program_in_path ("bsdtar"); +- if (comics_document->selected_command) { +- comics_document->command_usage = TAR; +- return TRUE; +- } +- + } else if (g_content_type_is_a (mime_type, "application/x-cbz") || + g_content_type_is_a (mime_type, "application/zip")) { + /* InfoZIP's unzip program */ +@@ -396,12 +385,6 @@ comics_check_decompress_command (gchar *mime_type, + comics_document->command_usage = P7ZIP; + return TRUE; + } +- comics_document->selected_command = +- g_find_program_in_path ("bsdtar"); +- if (comics_document->selected_command) { +- comics_document->command_usage = TAR; +- return TRUE; +- } + + } else if (g_content_type_is_a (mime_type, "application/x-cb7") || + g_content_type_is_a (mime_type, "application/x-7z-compressed")) { +@@ -425,27 +408,6 @@ comics_check_decompress_command (gchar *mime_type, + comics_document->command_usage = P7ZIP; + return TRUE; + } +- comics_document->selected_command = +- g_find_program_in_path ("bsdtar"); +- if (comics_document->selected_command) { +- comics_document->command_usage = TAR; +- return TRUE; +- } +- } else if (g_content_type_is_a (mime_type, "application/x-cbt") || +- g_content_type_is_a (mime_type, "application/x-tar")) { +- /* tar utility (Tape ARchive) */ +- comics_document->selected_command = +- g_find_program_in_path ("tar"); +- if (comics_document->selected_command) { +- comics_document->command_usage = TAR; +- return TRUE; +- } +- comics_document->selected_command = +- g_find_program_in_path ("bsdtar"); +- if (comics_document->selected_command) { +- comics_document->command_usage = TAR; +- return TRUE; +- } + } else { + g_set_error (error, + EV_DOCUMENT_ERROR, +diff --git a/configure.ac b/configure.ac +index 9e9f831..7eb0f1f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -795,7 +795,7 @@ AC_SUBST(TIFF_MIME_TYPES) + AC_SUBST(APPDATA_TIFF_MIME_TYPES) + AM_SUBST_NOTMAKE(APPDATA_TIFF_MIME_TYPES) + if test "x$enable_comics" = "xyes"; then +- COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7;application/x-ext-cbt" ++ COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7;" + APPDATA_COMICS_MIME_TYPES=$(echo "$COMICS_MIME_TYPES" | sed -e 's/;/<\/mimetype>\n /g') + if test -z "$EVINCE_MIME_TYPES"; then + EVINCE_MIME_TYPES="${COMICS_MIME_TYPES}" +-- +cgit v0.12 + -- cgit v1.2.3 From 5beecc320ee3f4224e356508547416b4bd24ad4b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 13 Jul 2017 09:38:59 +0200 Subject: gnu: Add sooperlooper. * gnu/packages/patches/sooperlooper-build-with-wx-30.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/music.scm (sooperlooper): New variable. --- gnu/local.mk | 1 + gnu/packages/music.scm | 72 +++++++++ .../patches/sooperlooper-build-with-wx-30.patch | 179 +++++++++++++++++++++ 3 files changed, 252 insertions(+) create mode 100644 gnu/packages/patches/sooperlooper-build-with-wx-30.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 50fac30404..96e4b2d254 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1005,6 +1005,7 @@ dist_patch_DATA = \ %D%/packages/patches/slim-reset.patch \ %D%/packages/patches/slim-login.patch \ %D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \ + %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/spice-CVE-2016-9577.patch \ %D%/packages/patches/spice-CVE-2016-9578-1.patch \ %D%/packages/patches/spice-CVE-2016-9578-2.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index a3f3d4bacb..40996b11be 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -2345,6 +2345,78 @@ part. The player is based on a highly modified version of the ModPlug engine, with a number of bugfixes and changes to improve IT playback.") (license license:gpl2+))) +(define-public sooperlooper + (package + (name "sooperlooper") + (version "1.7.3") + (source (origin + (method url-fetch) + (uri (string-append "http://essej.net/sooperlooper/sooperlooper-" + version ".tar.gz")) + (sha256 + (base32 + "0n2gdxw1fx8nxxnpzf4sj0kp6k6zi1yq59cbz6qqzcnsnpnvszbs")) + (patches (search-patches "sooperlooper-build-with-wx-30.patch")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "CXXFLAGS=-std=gnu++11") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'add-sigc++-includes + (lambda* (#:key inputs #:allow-other-keys) + (let ((sig (assoc-ref inputs "libsigc++")) + (xml (assoc-ref inputs "libxml2")) + (cwd (getcwd))) + (setenv "CPATH" + (string-append sig "/include/sigc++-2.0:" + sig "/lib/sigc++-2.0/include:" + xml "/include/libxml2/:" + cwd "/libs/pbd:" + cwd "/libs/midi++"))) + (substitute* '("src/control_osc.hpp" + "src/gui/app_frame.hpp" + "src/gui/config_panel.hpp" + "src/gui/keys_panel.hpp" + "src/gui/latency_panel.hpp" + "src/gui/main_panel.hpp" + "src/gui/midi_bind_panel.hpp" + "src/gui/prefs_dialog.hpp") + (("sigc\\+\\+/object.h") + "sigc++/sigc++.h")) + (substitute* '("src/engine.cpp" + "src/gui/latency_panel.cpp" + "src/gui/looper_panel.cpp" + "src/gui/main_panel.cpp") + (("(\\(| )bind " _ pre) + (string-append pre "sigc::bind "))) + #t)) + (add-after 'unpack 'fix-xpm-warnings + (lambda _ + (substitute* (find-files "." "\\.xpm$") + (("static char") "static const char")) + #t))))) + (inputs + `(("jack" ,jack-1) + ("alsa-lib" ,alsa-lib) + ("wxwidgets" ,wxwidgets-gtk2) + ("libsndfile" ,libsndfile) + ("libsamplerate" ,libsamplerate) + ("liblo" ,liblo) + ("rubberband" ,rubberband) + ("libxml2" ,libxml2) + ("libsigc++" ,libsigc++) + ("ncurses" ,ncurses))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://essej.net/sooperlooper/") + (synopsis "Live looping sampler") + (description + "SooperLooper is a live looping sampler capable of immediate loop +recording, overdubbing, multiplying, reversing and more. It allows for +multiple simultaneous multi-channel loops limited only by your computer's +available memory.") + (license license:gpl2+))) + (define-public moc (package (name "moc") diff --git a/gnu/packages/patches/sooperlooper-build-with-wx-30.patch b/gnu/packages/patches/sooperlooper-build-with-wx-30.patch new file mode 100644 index 0000000000..43f4b9be69 --- /dev/null +++ b/gnu/packages/patches/sooperlooper-build-with-wx-30.patch @@ -0,0 +1,179 @@ +Downloaded from https://anonscm.debian.org/cgit/pkg-multimedia/sooperlooper.git/plain/debian/patches/04-build_with_wx_30.patch -O gnu/packages/patches/sooperlooper-build-with-wx-30.patch + +Author: Jaromír Mikeš , Olly Betts +Description: build against wx 3.0. +Forwarded: yes + +Index: sooperlooper/src/gui/main_panel.cpp +=================================================================== +--- sooperlooper.orig/src/gui/main_panel.cpp ++++ sooperlooper/src/gui/main_panel.cpp +@@ -448,7 +448,7 @@ MainPanel::init_loopers (int count) + while (count < (int)_looper_panels.size()) { + looperpan = _looper_panels.back(); + _looper_panels.pop_back(); +- _main_sizer->Remove(looperpan); ++ _main_sizer->Detach(looperpan); + looperpan->Destroy(); + } + } +@@ -1277,7 +1277,7 @@ void MainPanel::misc_action (bool releas + } + + +- wxString filename = do_file_selector (wxT("Choose file to save loop"), wxT("wav"), wxT("WAVE files (*.wav)|*.wav;*.WAV;*.Wav"), wxSAVE|wxCHANGE_DIR|wxOVERWRITE_PROMPT); ++ wxString filename = do_file_selector (wxT("Choose file to save loop"), wxT("wav"), wxT("WAVE files (*.wav)|*.wav;*.WAV;*.Wav"), wxFD_SAVE|wxFD_CHANGE_DIR|wxFD_OVERWRITE_PROMPT); + + if ( !filename.empty() ) + { +@@ -1296,7 +1296,7 @@ void MainPanel::misc_action (bool releas + index = 0; + } + +- wxString filename = do_file_selector (wxT("Choose file to open"), wxT(""), wxT("*.slsess"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = do_file_selector (wxT("Choose file to open"), wxT(""), wxT("*.slsess"), wxFD_OPEN|wxFD_CHANGE_DIR); + + if ( !filename.empty() ) + { +@@ -1408,7 +1408,7 @@ void MainPanel::set_curr_loop (int index + + void MainPanel::do_load_session () + { +- wxString filename = do_file_selector (wxT("Choose session to load"), wxT("*.slsess"), wxT("*.slsess"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = do_file_selector (wxT("Choose session to load"), wxT("*.slsess"), wxT("*.slsess"), wxFD_OPEN|wxFD_CHANGE_DIR); + + if ( !filename.empty() ) + { +@@ -1419,7 +1419,7 @@ void MainPanel::do_load_session () + + void MainPanel::do_save_session (bool write_audio) + { +- wxString filename = do_file_selector (wxT("Choose file to save session"), wxT("slsess"), wxT("*.slsess"), wxSAVE|wxCHANGE_DIR|wxOVERWRITE_PROMPT); ++ wxString filename = do_file_selector (wxT("Choose file to save session"), wxT("slsess"), wxT("*.slsess"), wxFD_SAVE|wxFD_CHANGE_DIR|wxFD_OVERWRITE_PROMPT); + + if ( !filename.empty() ) + { +Index: sooperlooper/src/gui/pix_button.cpp +=================================================================== +--- sooperlooper.orig/src/gui/pix_button.cpp ++++ sooperlooper/src/gui/pix_button.cpp +@@ -250,7 +250,7 @@ PixButton::OnMouseEvents (wxMouseEvent & + pt.x += bounds.x; + pt.y += bounds.y; + +- if (bounds.Inside(pt)) { ++ if (bounds.Contains(pt)) { + clicked (get_mouse_button(ev)); // emit + + if (ev.MiddleUp() && ev.ControlDown()) { +Index: sooperlooper/src/gui/looper_panel.cpp +=================================================================== +--- sooperlooper.orig/src/gui/looper_panel.cpp ++++ sooperlooper/src/gui/looper_panel.cpp +@@ -1428,7 +1428,7 @@ LooperPanel::clicked_events (int button, + if (cmd == wxT("save")) + { + wxString filename = _mainpanel->do_file_selector (wxT("Choose file to save loop"), +- wxT("wav"), wxT("WAVE files (*.wav)|*.wav;*.WAV;*.Wav"), wxSAVE|wxCHANGE_DIR|wxOVERWRITE_PROMPT); ++ wxT("wav"), wxT("WAVE files (*.wav)|*.wav;*.WAV;*.Wav"), wxFD_SAVE|wxFD_CHANGE_DIR|wxFD_OVERWRITE_PROMPT); + + if ( !filename.empty() ) + { +@@ -1442,7 +1442,7 @@ LooperPanel::clicked_events (int button, + } + else if (cmd == wxT("load")) + { +- wxString filename = _mainpanel->do_file_selector(wxT("Choose file to open"), wxT(""), wxT("Audio files (*.wav,*.aif)|*.wav;*.WAV;*.Wav;*.aif;*.aiff;*.AIF;*.AIFF|All files (*.*)|*.*"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = _mainpanel->do_file_selector(wxT("Choose file to open"), wxT(""), wxT("Audio files (*.wav,*.aif)|*.wav;*.WAV;*.Wav;*.aif;*.aiff;*.AIF;*.AIFF|All files (*.*)|*.*"), wxFD_OPEN|wxFD_CHANGE_DIR); + + if ( !filename.empty() ) + { +Index: sooperlooper/src/gui/keyboard_target.cpp +=================================================================== +--- sooperlooper.orig/src/gui/keyboard_target.cpp ++++ sooperlooper/src/gui/keyboard_target.cpp +@@ -553,10 +553,10 @@ KeyboardTarget::keycode_from_name (const + keycode = WXK_RETURN; + } + else if ( keyname == wxT("PGUP") ) { +- keycode = WXK_PRIOR; ++ keycode = WXK_PAGEUP; + } + else if ( keyname == wxT("PGDN") ) { +- keycode = WXK_NEXT; ++ keycode = WXK_PAGEDOWN; + } + else if ( keyname == wxT("LEFT") ) { + keycode = WXK_LEFT; +@@ -630,10 +630,10 @@ wxString KeyboardTarget::name_from_keyco + case WXK_RETURN: + text += wxT("return"); + break; +- case WXK_PRIOR: ++ case WXK_PAGEUP: + text += wxT("pageup"); + break; +- case WXK_NEXT: ++ case WXK_PAGEDOWN: + text += wxT("pagedown"); + break; + case WXK_LEFT: +Index: sooperlooper/src/gui/check_box.cpp +=================================================================== +--- sooperlooper.orig/src/gui/check_box.cpp ++++ sooperlooper/src/gui/check_box.cpp +@@ -237,7 +237,7 @@ CheckBox::OnMouseEvents (wxMouseEvent &e + } + else if (ev.LeftUp()) + { +- if (bounds.Inside(ev.GetPosition())) { ++ if (bounds.Contains(ev.GetPosition())) { + // toggle value + _value = !_value; + +Index: sooperlooper/src/gui/midi_bind_panel.cpp +=================================================================== +--- sooperlooper.orig/src/gui/midi_bind_panel.cpp ++++ sooperlooper/src/gui/midi_bind_panel.cpp +@@ -880,7 +880,7 @@ void MidiBindPanel::on_button (wxCommand + } + else if (ev.GetId() == ID_LoadButton) + { +- wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to open"), wxT(""), wxT("*.slb"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to open"), wxT(""), wxT("*.slb"), wxFD_OPEN|wxFD_CHANGE_DIR); + if ( !filename.empty() ) + { + _parent->get_loop_control().load_midi_bindings(filename, _append_check->GetValue()); +@@ -888,7 +888,7 @@ void MidiBindPanel::on_button (wxCommand + } + else if (ev.GetId() == ID_SaveButton) + { +- wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to save"), wxT(""), wxT("*.slb"), wxSAVE|wxCHANGE_DIR|wxOVERWRITE_PROMPT); ++ wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to save"), wxT(""), wxT("*.slb"), wxFD_SAVE|wxFD_CHANGE_DIR|wxFD_OVERWRITE_PROMPT); + + if ( !filename.empty() ) + { +Index: sooperlooper/src/gui/config_panel.cpp +=================================================================== +--- sooperlooper.orig/src/gui/config_panel.cpp ++++ sooperlooper/src/gui/config_panel.cpp +@@ -378,7 +378,7 @@ void ConfigPanel::on_button (wxCommandEv + else if (ev.GetId() == ID_MidiBrowseButton) { + + _parent->get_keyboard().set_enabled(false); +- wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to use"), wxT(""), wxT("*.slb"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = _parent->do_file_selector(wxT("Choose midi binding file to use"), wxT(""), wxT("*.slb"), wxFD_OPEN|wxFD_CHANGE_DIR); + _parent->get_keyboard().set_enabled(true); + + if ( !filename.empty() ) +@@ -389,8 +389,8 @@ void ConfigPanel::on_button (wxCommandEv + else if (ev.GetId() == ID_SessionBrowseButton) { + + _parent->get_keyboard().set_enabled(false); +- wxString filename = _parent->do_file_selector(wxT("Choose session file to use"), wxT(""), wxT("*.slsess"), wxOPEN|wxCHANGE_DIR); +- //wxString filename = wxFileSelector(wxT("Choose session file to use"), wxT(""), wxT(""), wxT(""), wxT("*.slsess"), wxOPEN|wxCHANGE_DIR); ++ wxString filename = _parent->do_file_selector(wxT("Choose session file to use"), wxT(""), wxT("*.slsess"), wxFD_OPEN|wxFD_CHANGE_DIR); ++ //wxString filename = wxFileSelector(wxT("Choose session file to use"), wxT(""), wxT(""), wxT(""), wxT("*.slsess"), wxFD_OPEN|wxFD_CHANGE_DIR); + _parent->get_keyboard().set_enabled(true); + + if ( !filename.empty() ) -- cgit v1.2.3 From 7ad2a4f1d50e5a397010ec90dba79feaca296a81 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 17 Jul 2017 15:29:27 +0300 Subject: gnu: supertuxkart: Fix build on aarch64. * gnu/packages/games.scm (supertuxkart)[source]: Add patch. * gnu/packages/patches/supertuxkart-angelscript-ftbfs.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/games.scm | 1 + .../patches/supertuxkart-angelscript-ftbfs.patch | 42 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 gnu/packages/patches/supertuxkart-angelscript-ftbfs.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 96e4b2d254..8e3a52d28c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1012,6 +1012,7 @@ dist_patch_DATA = \ %D%/packages/patches/spice-CVE-2017-7506.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ + %D%/packages/patches/supertuxkart-angelscript-ftbfs.patch \ %D%/packages/patches/swish-e-search.patch \ %D%/packages/patches/swish-e-format-security.patch \ %D%/packages/patches/synfigstudio-fix-ui-with-gtk3.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 2bef92b93b..2dec9a3951 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1386,6 +1386,7 @@ This game is based on the GPL version of the famous game TuxRacer.") (sha256 (base32 "10l2ljmd7mv8f9ylarqmxxryicdnph2qkm3g5maxnsm2k2q0n20b")) + (patches (search-patches "supertuxkart-angelscript-ftbfs.patch")) (modules '((guix build utils))) (snippet ;; Delete bundled library sources diff --git a/gnu/packages/patches/supertuxkart-angelscript-ftbfs.patch b/gnu/packages/patches/supertuxkart-angelscript-ftbfs.patch new file mode 100644 index 0000000000..db3c56861b --- /dev/null +++ b/gnu/packages/patches/supertuxkart-angelscript-ftbfs.patch @@ -0,0 +1,42 @@ +https://github.com/supertuxkart/stk-code/commit/5e05f1178ce6bc5f3a653b55ab3dc6d016196341.patch + +From 5e05f1178ce6bc5f3a653b55ab3dc6d016196341 Mon Sep 17 00:00:00 2001 +From: Deve +Date: Mon, 3 Oct 2016 23:26:09 +0200 +Subject: [PATCH] Fixed compiler error on Linux with non-x86 64bit platforms, + e.g. arm64, mips, and s390x architectures + +This modification is already applied in upstream angelscript repository: +https://sourceforge.net/p/angelscript/code/2353/ + +Thanks to Adrian Bunk and Andreas Jonsson +--- + lib/angelscript/projects/cmake/CMakeLists.txt | 1 + + lib/angelscript/source/as_config.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/angelscript/projects/cmake/CMakeLists.txt b/lib/angelscript/projects/cmake/CMakeLists.txt +index e93971315e..755d8378c3 100644 +--- a/lib/angelscript/projects/cmake/CMakeLists.txt ++++ b/lib/angelscript/projects/cmake/CMakeLists.txt +@@ -67,6 +67,7 @@ set(ANGELSCRIPT_SOURCE + ../../source/as_builder.cpp + ../../source/as_bytecode.cpp + ../../source/as_callfunc.cpp ++ ../../source/as_callfunc_mips.cpp + ../../source/as_callfunc_x86.cpp + ../../source/as_callfunc_x64_gcc.cpp + ../../source/as_callfunc_x64_msvc.cpp +diff --git a/lib/angelscript/source/as_config.h b/lib/angelscript/source/as_config.h +index cb05bffbd5..5bb5b8e800 100644 +--- a/lib/angelscript/source/as_config.h ++++ b/lib/angelscript/source/as_config.h +@@ -844,7 +844,7 @@ + #define THISCALL_PASS_OBJECT_POINTER_ON_THE_STACK + #define AS_X86 + #undef AS_NO_THISCALL_FUNCTOR_METHOD +- #elif defined(__LP64__) && !defined(__arm64__) ++ #elif defined(__x86_64__) + #define AS_X64_GCC + #undef AS_NO_THISCALL_FUNCTOR_METHOD + #define HAS_128_BIT_PRIMITIVES -- cgit v1.2.3 From 144c8db9bd91bf5470be7a2c747885f9325f96bc Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 17 Jul 2017 20:14:15 -0400 Subject: gnu: chicken: Fix CVE-2017-11343. * gnu/packages/patches/chicken-CVE-2017-11343.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/scheme.scm (chicken)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/patches/chicken-CVE-2017-11343.patch | 57 +++++++++++++++++++++++ gnu/packages/scheme.scm | 3 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/chicken-CVE-2017-11343.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 54dd2f2380..e7395292f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -536,6 +536,7 @@ dist_patch_DATA = \ %D%/packages/patches/ceph-skip-collect-sys-info-test.patch \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ %D%/packages/patches/chicken-CVE-2017-6949.patch \ + %D%/packages/patches/chicken-CVE-2017-11343.patch \ %D%/packages/patches/chmlib-inttypes.patch \ %D%/packages/patches/clang-libc-search-path.patch \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ diff --git a/gnu/packages/patches/chicken-CVE-2017-11343.patch b/gnu/packages/patches/chicken-CVE-2017-11343.patch new file mode 100644 index 0000000000..1d46ad50d9 --- /dev/null +++ b/gnu/packages/patches/chicken-CVE-2017-11343.patch @@ -0,0 +1,57 @@ +Fix CVE-2017-11343: + +https://lists.nongnu.org/archive/html/chicken-announce/2017-07/msg00000.html +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-11343 + +Patch copied from upstream mailing list: + +http://lists.gnu.org/archive/html/chicken-hackers/2017-06/txtod8Pa1wGU0.txt + +From ae2633195cc5f4f61c9da4ac90f0c14c010dcc3d Mon Sep 17 00:00:00 2001 +From: Peter Bex +Date: Fri, 30 Jun 2017 15:39:45 +0200 +Subject: [PATCH 2/2] Initialize symbol table after setting up randomization + +Otherwise, the symbol table wouldn't be correctly randomized. +--- + NEWS | 3 +++ + runtime.c | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +#diff --git a/NEWS b/NEWS +#index f4b0e041..6588b30e 100644 +#--- a/NEWS +#+++ b/NEWS +#@@ -96,6 +96,9 @@ +# buffer overrun and/or segfault (thanks to Lemonboy). +# - CVE-2017-9334: `length' no longer crashes on improper lists (fixes +# #1375, thanks to "megane"). +#+ - The randomization factor of the symbol table was set before +#+ the random seed was set, causing it to have a fixed value on many +#+ platforms. +# +# - Core Libraries +# - Unit "posix": If file-lock, file-lock/blocking or file-unlock are +diff --git a/runtime.c b/runtime.c +index 81c54dd2..a4580abc 100644 +--- a/runtime.c ++++ b/runtime.c +@@ -799,7 +799,6 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel) + C_initial_timer_interrupt_period = INITIAL_TIMER_INTERRUPT_PERIOD; + C_timer_interrupt_counter = INITIAL_TIMER_INTERRUPT_PERIOD; + memset(signal_mapping_table, 0, sizeof(int) * NSIG); +- initialize_symbol_table(); + C_dlerror = "cannot load compiled code dynamically - this is a statically linked executable"; + error_location = C_SCHEME_FALSE; + C_pre_gc_hook = NULL; +@@ -816,6 +815,7 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel) + callback_continuation_level = 0; + gc_ms = 0; + (void)C_randomize(C_fix(time(NULL))); ++ initialize_symbol_table(); + + if (profiling) { + #ifndef C_NONUNIX +-- +2.11.0 + diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 92c0170205..161138285e 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -345,7 +345,8 @@ mashups, office (web agendas, mail clients, ...), etc.") (base32 "12b9gaa9lqh39lj1v4wm48f6z8ww3jdkvc5bh9gqqvn6kd2wwnk0")) (patches - (search-patches "chicken-CVE-2017-6949.patch")))) + (search-patches "chicken-CVE-2017-6949.patch" + "chicken-CVE-2017-11343.patch")))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) -- cgit v1.2.3 From 4c4485f30491a03040bd3081e1e3d3dc9e9b7716 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 17 Jul 2017 22:14:29 -0400 Subject: gnu: qemu: Fix CVE-2017-11334. * gnu/packages/patches/qemu-CVE-2017-11334.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/virtualization.scm (qemu)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/patches/qemu-CVE-2017-11334.patch | 52 ++++++++++++++++++++++++++ gnu/packages/virtualization.scm | 3 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qemu-CVE-2017-11334.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e7395292f8..7d9b2f8d76 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -975,6 +975,7 @@ dist_patch_DATA = \ %D%/packages/patches/qemu-CVE-2017-8379.patch \ %D%/packages/patches/qemu-CVE-2017-8380.patch \ %D%/packages/patches/qemu-CVE-2017-9524.patch \ + %D%/packages/patches/qemu-CVE-2017-11334.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2017-11334.patch b/gnu/packages/patches/qemu-CVE-2017-11334.patch new file mode 100644 index 0000000000..cb68c803aa --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-11334.patch @@ -0,0 +1,52 @@ +Fix CVE-2017-11334: + +https://bugzilla.redhat.com/show_bug.cgi?id=1471638 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-11334 + +Patch copied from upstream source repository: + +http://git.qemu.org/?p=qemu.git;a=commitdiff;h=04bf2526ce87f21b32c9acba1c5518708c243ad0 + +From 04bf2526ce87f21b32c9acba1c5518708c243ad0 Mon Sep 17 00:00:00 2001 +From: Prasad J Pandit +Date: Wed, 12 Jul 2017 18:08:40 +0530 +Subject: [PATCH] exec: use qemu_ram_ptr_length to access guest ram + +When accessing guest's ram block during DMA operation, use +'qemu_ram_ptr_length' to get ram block pointer. It ensures +that DMA operation of given length is possible; And avoids +any OOB memory access situations. + +Reported-by: Alex +Signed-off-by: Prasad J Pandit +Message-Id: <20170712123840.29328-1-ppandit@redhat.com> +Signed-off-by: Paolo Bonzini +--- + exec.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/exec.c b/exec.c +index a083ff89ad..ad103ce483 100644 +--- a/exec.c ++++ b/exec.c +@@ -2929,7 +2929,7 @@ static MemTxResult address_space_write_continue(AddressSpace *as, hwaddr addr, + } + } else { + /* RAM case */ +- ptr = qemu_map_ram_ptr(mr->ram_block, addr1); ++ ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l); + memcpy(ptr, buf, l); + invalidate_and_set_dirty(mr, addr1, l); + } +@@ -3020,7 +3020,7 @@ MemTxResult address_space_read_continue(AddressSpace *as, hwaddr addr, + } + } else { + /* RAM case */ +- ptr = qemu_map_ram_ptr(mr->ram_block, addr1); ++ ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l); + memcpy(buf, ptr, l); + } + +-- +2.13.3 + diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index fd5cea5eb2..d999d16e37 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -81,7 +81,8 @@ "qemu-CVE-2017-8309.patch" "qemu-CVE-2017-8379.patch" "qemu-CVE-2017-8380.patch" - "qemu-CVE-2017-9524.patch")) + "qemu-CVE-2017-9524.patch" + "qemu-CVE-2017-11334.patch")) (sha256 (base32 "08mhfs0ndbkyqgw7fjaa9vjxf4dinrly656f6hjzvmaz7hzc677h")))) -- cgit v1.2.3 From 05c88516955814ac61dc7578017e1976c43a1cd3 Mon Sep 17 00:00:00 2001 From: Jonathan Brielmaier Date: Fri, 14 Jul 2017 00:28:14 +0200 Subject: gnu: Add libusb@0.1. * gnu/packages/libusb.scm (libusb-0.1): New variable. * gnu/packages/patches/libusb-0.1-disable-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/libusb.scm | 16 ++++++++++++++++ gnu/packages/patches/libusb-0.1-disable-tests.patch | 15 +++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 gnu/packages/patches/libusb-0.1-disable-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3e085b1184..ee932006b7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -793,6 +793,7 @@ dist_patch_DATA = \ %D%/packages/patches/libtorrent-rasterbar-boost-compat.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ %D%/packages/patches/libunwind-CVE-2015-3239.patch \ + %D%/packages/patches/libusb-0.1-disable-tests.patch \ %D%/packages/patches/libvpx-CVE-2016-2818.patch \ %D%/packages/patches/libxcb-python-3.5-compat.patch \ %D%/packages/patches/libxml2-CVE-2016-4658.patch \ diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index ffbe5b1a88..ed97ed9de7 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Theodoros Foradis +;;; Copyright © 2017 Jonathan Brielmaier ;;; ;;; This file is part of GNU Guix. ;;; @@ -95,6 +96,21 @@ devices on various operating systems.") version of libusb to run with newer libusb.") (license lgpl2.1+))) +;; required by 0xffff, which compiles with libusb-compat, but executes only +;; with libusb-0.1 +(define-public libusb-0.1 + (package (inherit libusb) + (version "0.1.12") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libusb/libusb-0.1 (LEGACY)/" + version "/libusb-" version ".tar.gz")) + (sha256 + (base32 + "0i4bacxkyr7xyqxbmb00ypkrv4swkgm0mghbzjsnw6blvvczgxip")) + (patches (search-patches "libusb-0.1-disable-tests.patch")))))) + (define-public libusb4java ;; There is no public release so we take the latest version from git. (let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e") diff --git a/gnu/packages/patches/libusb-0.1-disable-tests.patch b/gnu/packages/patches/libusb-0.1-disable-tests.patch new file mode 100644 index 0000000000..37dd8bd111 --- /dev/null +++ b/gnu/packages/patches/libusb-0.1-disable-tests.patch @@ -0,0 +1,15 @@ +Disable tests who fail because they have to run as root. + +--- libusb-0.1.12/tests/Makefile.in 2006-03-04 03:54:06.000000000 +0100 ++++ libusb-0.1.12/tests/Makefile.in 2017-07-13 16:17:45.201728019 +0200 +@@ -255,8 +255,8 @@ + hub_strings_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@ + driver_name_SOURCES = driver_name.cpp + driver_name_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@ +-TESTS = testlibusb descriptor_test id_test find_hubs find_mice \ +- get_resolution hub_strings $(OS_SPECIFIC) ++TESTS = testlibusb descriptor_test id_test find_hubs find_mice ++ #get_resolution hub_strings $(OS_SPECIFIC) + + XFAIL_TESTS = get_resolution hub_strings $(OS_SPECIFIC_XFAIL) + all: all-am -- cgit v1.2.3 From 8582e03ae59ff51d2aacc24da611f769484dd4cb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 20 Jul 2017 08:59:35 -0400 Subject: gnu: Remove a left-over patch. This is a followup to commit 426b0b898f70a58133d80779980f163a5761686e. * gnu/packages/patches/pcre-CVE-2017-7186.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/pcre-CVE-2017-7186.patch | 56 --------------------------- 2 files changed, 57 deletions(-) delete mode 100644 gnu/packages/patches/pcre-CVE-2017-7186.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ee932006b7..bf9143ae23 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -893,7 +893,6 @@ dist_patch_DATA = \ %D%/packages/patches/patchelf-rework-for-arm.patch \ %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ - %D%/packages/patches/pcre-CVE-2017-7186.patch \ %D%/packages/patches/pcre2-CVE-2017-7186.patch \ %D%/packages/patches/pcre2-CVE-2017-8786.patch \ %D%/packages/patches/perl-file-path-CVE-2017-6512.patch \ diff --git a/gnu/packages/patches/pcre-CVE-2017-7186.patch b/gnu/packages/patches/pcre-CVE-2017-7186.patch deleted file mode 100644 index d23aa10374..0000000000 --- a/gnu/packages/patches/pcre-CVE-2017-7186.patch +++ /dev/null @@ -1,56 +0,0 @@ -Patch for -from . - ---- trunk/pcre_internal.h 2016/05/21 13:34:44 1649 -+++ trunk/pcre_internal.h 2017/02/24 17:30:30 1688 -@@ -2772,6 +2772,9 @@ - extern const pcre_uint16 PRIV(ucd_stage2)[]; - extern const pcre_uint32 PRIV(ucp_gentype)[]; - extern const pcre_uint32 PRIV(ucp_gbtable)[]; -+#ifdef COMPILE_PCRE32 -+extern const ucd_record PRIV(dummy_ucd_record)[]; -+#endif - #ifdef SUPPORT_JIT - extern const int PRIV(ucp_typerange)[]; - #endif -@@ -2780,9 +2783,15 @@ - /* UCD access macros */ - - #define UCD_BLOCK_SIZE 128 --#define GET_UCD(ch) (PRIV(ucd_records) + \ -+#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ - PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ - UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) -+ -+#ifdef COMPILE_PCRE32 -+#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) -+#else -+#define GET_UCD(ch) REAL_GET_UCD(ch) -+#endif - - #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype - #define UCD_SCRIPT(ch) GET_UCD(ch)->script - ---- trunk/pcre_ucd.c 2014/06/19 07:51:39 1490 -+++ trunk/pcre_ucd.c 2017/02/24 17:30:30 1688 -@@ -38,6 +38,20 @@ - const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0}; - #else - -+/* If the 32-bit library is run in non-32-bit mode, character values -+greater than 0x10ffff may be encountered. For these we set up a -+special record. */ -+ -+#ifdef COMPILE_PCRE32 -+const ucd_record PRIV(dummy_ucd_record)[] = {{ -+ ucp_Common, /* script */ -+ ucp_Cn, /* type unassigned */ -+ ucp_gbOther, /* grapheme break property */ -+ 0, /* case set */ -+ 0, /* other case */ -+ }}; -+#endif -+ - /* When recompiling tables with a new Unicode version, please check the - types in this structure definition from pcre_internal.h (the actual - field names will be different): -- cgit v1.2.3 From 81c35029d4ee4fa7cd517998844229a514b35531 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 20 Jul 2017 15:30:12 -0400 Subject: gnu: heimdal: Fix CVE-2017-{6594,11103}. * gnu/packages/patches/heimdal-CVE-2017-6594.patch, gnu/packages/patches/heimdal-CVE-2017-11103.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/kerberos.scm (heimdal)[source]: Use them. --- gnu/local.mk | 2 + gnu/packages/kerberos.scm | 2 + gnu/packages/patches/heimdal-CVE-2017-11103.patch | 45 ++++++++++++ gnu/packages/patches/heimdal-CVE-2017-6594.patch | 85 +++++++++++++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 gnu/packages/patches/heimdal-CVE-2017-11103.patch create mode 100644 gnu/packages/patches/heimdal-CVE-2017-6594.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bf9143ae23..6d9e570622 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -691,6 +691,8 @@ dist_patch_DATA = \ %D%/packages/patches/hdf-eos5-remove-gctp.patch \ %D%/packages/patches/hdf-eos5-fix-szip.patch \ %D%/packages/patches/hdf-eos5-fortrantests.patch \ + %D%/packages/patches/heimdal-CVE-2017-6594.patch \ + %D%/packages/patches/heimdal-CVE-2017-11103.patch \ %D%/packages/patches/hmmer-remove-cpu-specificity.patch \ %D%/packages/patches/higan-remove-march-native-flag.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 58f6197700..59fd944c69 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -144,6 +144,8 @@ secure manner through client-server mutual authentication via tickets.") (sha256 (base32 "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma")) + (patches (search-patches "heimdal-CVE-2017-6594.patch" + "heimdal-CVE-2017-11103.patch")) (modules '((guix build utils))) (snippet '(substitute* "configure" diff --git a/gnu/packages/patches/heimdal-CVE-2017-11103.patch b/gnu/packages/patches/heimdal-CVE-2017-11103.patch new file mode 100644 index 0000000000..d76f0df369 --- /dev/null +++ b/gnu/packages/patches/heimdal-CVE-2017-11103.patch @@ -0,0 +1,45 @@ +Fix CVE-2017-11103: + +https://orpheus-lyre.info/ +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-11103 +https://security-tracker.debian.org/tracker/CVE-2017-11103 + +Patch lifted from upstream source repository: + +https://github.com/heimdal/heimdal/commit/6dd3eb836bbb80a00ffced4ad57077a1cdf227ea + +From 6dd3eb836bbb80a00ffced4ad57077a1cdf227ea Mon Sep 17 00:00:00 2001 +From: Jeffrey Altman +Date: Wed, 12 Apr 2017 15:40:42 -0400 +Subject: [PATCH] CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation + +In _krb5_extract_ticket() the KDC-REP service name must be obtained from +encrypted version stored in 'enc_part' instead of the unencrypted version +stored in 'ticket'. Use of the unecrypted version provides an +opportunity for successful server impersonation and other attacks. + +Identified by Jeffrey Altman, Viktor Duchovni and Nico Williams. + +Change-Id: I45ef61e8a46e0f6588d64b5bd572a24c7432547c +--- + lib/krb5/ticket.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/krb5/ticket.c b/lib/krb5/ticket.c +index d95d96d1b..b8d81c6ad 100644 +--- a/lib/krb5/ticket.c ++++ b/lib/krb5/ticket.c +@@ -705,8 +705,8 @@ _krb5_extract_ticket(krb5_context context, + /* check server referral and save principal */ + ret = _krb5_principalname2krb5_principal (context, + &tmp_principal, +- rep->kdc_rep.ticket.sname, +- rep->kdc_rep.ticket.realm); ++ rep->enc_part.sname, ++ rep->enc_part.srealm); + if (ret) + goto out; + if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){ +-- +2.13.3 + diff --git a/gnu/packages/patches/heimdal-CVE-2017-6594.patch b/gnu/packages/patches/heimdal-CVE-2017-6594.patch new file mode 100644 index 0000000000..714af60304 --- /dev/null +++ b/gnu/packages/patches/heimdal-CVE-2017-6594.patch @@ -0,0 +1,85 @@ +Fix CVE-2017-6594: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-6594 +https://security-tracker.debian.org/tracker/CVE-2017-6594 + +Patch lifted from upstream source repository: + +https://github.com/heimdal/heimdal/commit/b1e699103f08d6a0ca46a122193c9da65f6cf837 + +To apply the patch to Heimdal 1.5.3 release tarball, the changes to 'NEWS' and +files in 'tests/' are removed, and hunk #4 of 'kdc/krb5tgs.c' is modified. + +From b1e699103f08d6a0ca46a122193c9da65f6cf837 Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni +Date: Wed, 10 Aug 2016 23:31:14 +0000 +Subject: [PATCH] Fix transit path validation CVE-2017-6594 + +Commit f469fc6 (2010-10-02) inadvertently caused the previous hop realm +to not be added to the transit path of issued tickets. This may, in +some cases, enable bypass of capath policy in Heimdal versions 1.5 +through 7.2. + +Note, this may break sites that rely on the bug. With the bug some +incomplete [capaths] worked, that should not have. These may now break +authentication in some cross-realm configurations. +--- + NEWS | 14 ++++++++++++++ + kdc/krb5tgs.c | 12 ++++++++++-- + tests/kdc/check-kdc.in | 17 +++++++++++++++++ + tests/kdc/krb5.conf.in | 4 ++++ + 4 files changed, 45 insertions(+), 2 deletions(-) + +diff --git a/kdc/krb5tgs.c b/kdc/krb5tgs.c +index 6048b9c55..98503812f 100644 +--- a/kdc/krb5tgs.c ++++ b/kdc/krb5tgs.c +@@ -655,8 +655,12 @@ fix_transited_encoding(krb5_context context, + "Decoding transited encoding"); + return ret; + } ++ ++ /* ++ * If the realm of the presented tgt is neither the client nor the server ++ * realm, it is a transit realm and must be added to transited set. ++ */ + if(strcmp(client_realm, tgt_realm) && strcmp(server_realm, tgt_realm)) { +- /* not us, so add the previous realm to transited set */ + if (num_realms + 1 > UINT_MAX/sizeof(*realms)) { + ret = ERANGE; + goto free_realms; +@@ -737,6 +741,7 @@ tgs_make_reply(krb5_context context, + const char *server_name, + hdb_entry_ex *client, + krb5_principal client_principal, ++ const char *tgt_realm, + hdb_entry_ex *krbtgt, + krb5_enctype krbtgt_etype, + krb5_principals spp, +@@ -798,7 +803,7 @@ tgs_make_reply(krb5_context context, + &tgt->transited, &et, + krb5_principal_get_realm(context, client_principal), + krb5_principal_get_realm(context, server->entry.principal), +- krb5_principal_get_realm(context, krbtgt->entry.principal)); ++ tgt_realm); + if(ret) + goto out; + +@@ -1519,4 +1524,6 @@ tgs_build_reply(krb5_context context, + krb5_keyblock sessionkey; + krb5_kvno kvno; + krb5_data rspac; ++ const char *tgt_realm = /* Realm of TGT issuer */ ++ krb5_principal_get_realm(context, krbtgt->entry.principal); + +@@ -2324,6 +2331,7 @@ server_lookup: + spn, + client, + cp, ++ tgt_realm, + krbtgt_out, + tkey_sign->key.keytype, + spp, +-- +2.13.3 + -- cgit v1.2.3 From 2580c2f07f2882552ecfee5206dccf9ada15c7e1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 22 Jul 2017 14:19:43 +0200 Subject: gnu: python-pyopenssl: Update to 17.2.0. * gnu/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/python.scm (python-pyopenssl, python2-pyopenssl): Update to 17.2.0. [native-inputs]: Add PYTHON-FLAKY. [source](patches): Remove. --- gnu/local.mk | 1 - .../python-pyopenssl-17.1.0-test-overflow.patch | 36 ---------------------- gnu/packages/python.scm | 9 +++--- 3 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 gnu/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6d9e570622..bc2d79c1a8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -972,7 +972,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ - %D%/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/qemu-CVE-2017-7493.patch \ %D%/packages/patches/qemu-CVE-2017-8112.patch \ diff --git a/gnu/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch b/gnu/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch deleted file mode 100644 index 06b2f4fe03..0000000000 --- a/gnu/packages/patches/python-pyopenssl-17.1.0-test-overflow.patch +++ /dev/null @@ -1,36 +0,0 @@ -Resolves a test failure on 32-bit platforms. - -https://github.com/pyca/pyopenssl/issues/657 - -Patch copied from upstream source repository: - -https://github.com/pyca/pyopenssl/commit/ecc0325479c0d5c5f2ca88b4550e87cdb59d6c95 - -From ecc0325479c0d5c5f2ca88b4550e87cdb59d6c95 Mon Sep 17 00:00:00 2001 -From: Alex Gaynor -Date: Thu, 6 Jul 2017 22:14:44 -0400 -Subject: [PATCH] Fixed #657 -- handle OverflowErrors on large allocation - requests - ---- - tests/test_rand.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/test_rand.py b/tests/test_rand.py -index bdd3af08..6adf72a1 100644 ---- a/tests/test_rand.py -+++ b/tests/test_rand.py -@@ -32,10 +32,10 @@ def test_bytes_wrong_args(self, args): - - def test_insufficient_memory(self): - """ -- `OpenSSL.rand.bytes` raises `MemoryError` if more bytes are requested -- than will fit in memory. -+ `OpenSSL.rand.bytes` raises `MemoryError` or `OverflowError` if more -+ bytes are requested than will fit in memory. - """ -- with pytest.raises(MemoryError): -+ with pytest.raises((MemoryError, OverflowError)): - rand.bytes(sys.maxsize) - - def test_bytes(self): diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 619dc07ee0..ce2864e1c6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7709,16 +7709,14 @@ message digests and key derivation functions.") (define-public python-pyopenssl (package (name "python-pyopenssl") - (version "17.1.0") + (version "17.2.0") (source (origin (method url-fetch) (uri (pypi-uri "pyOpenSSL" version)) - (patches - (search-patches "python-pyopenssl-17.1.0-test-overflow.patch")) (sha256 (base32 - "0qwmqhfsq84ydir9dz273ypmlcvs7v71m1jns0sd4k0h6lfsa82s")))) + "0d283g4zi0hr9papd24mjl70mi15gyzq6fx618rizi87dgipqqax")))) (build-system python-build-system) (arguments '(#:phases @@ -7742,7 +7740,8 @@ message digests and key derivation functions.") (inputs `(("openssl" ,openssl))) (native-inputs - `(("python-pretend" ,python-pretend) + `(("python-flaky" ,python-flaky) + ("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest-3.0))) (home-page "https://github.com/pyca/pyopenssl") (synopsis "Python wrapper module around the OpenSSL library") -- cgit v1.2.3 From aa51da7eef28706317ffd7c717f0c881b1e45748 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 22 Jul 2017 15:07:45 +0200 Subject: gnu: Remove python-fake-factory leftovers. This is a followup to c799eb2eb8b1a820147af96988eddaa9f752994b. * gnu/packages/patches/python-fake-factory-fix-build-32bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../python-fake-factory-fix-build-32bit.patch | 36 ---------------------- 2 files changed, 37 deletions(-) delete mode 100644 gnu/packages/patches/python-fake-factory-fix-build-32bit.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bc2d79c1a8..dd111e0299 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -961,7 +961,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-cython-fix-tests-32bit.patch \ - %D%/packages/patches/python-fake-factory-fix-build-32bit.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-pandas-skip-failing-tests.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch deleted file mode 100644 index cb60896fad..0000000000 --- a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch +++ /dev/null @@ -1,36 +0,0 @@ -These tests fail on 32-bit due to an overflow. - -Upstream bug URL: https://github.com/joke2k/faker/issues/408 - -diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py -index 6026772..58b6b83 100644 ---- a/faker/tests/__init__.py -+++ b/faker/tests/__init__.py -@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase): - provider = Provider - # test century - self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) -- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) - # test decade - self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) - self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) -@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase): - - # ensure all methods provide timezone aware datetimes - with self.assertRaises(TypeError): -- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now() -- with self.assertRaises(TypeError): - provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now() - with self.assertRaises(TypeError): - provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now() -@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase): - - # test century - self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) -- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) - # test decade - self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) - self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) --- -2.11.1 - -- cgit v1.2.3 From 36378bd57ec31ba2bbedbdbdbd77b5b0f82f3b8a Mon Sep 17 00:00:00 2001 From: Ryan Moe Date: Sat, 22 Jul 2017 07:18:42 -0700 Subject: gnu: quassel: Enable TLS. * gnu/packages/patches/quassel-fix-tls-check.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/irc.scm (quassel)[source]: Use it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/irc.scm | 1 + gnu/packages/patches/quassel-fix-tls-check.patch | 25 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 gnu/packages/patches/quassel-fix-tls-check.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 12cd8865a1..8d3916e26d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -984,6 +984,7 @@ dist_patch_DATA = \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ + %D%/packages/patches/quassel-fix-tls-check.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index 011665d387..1d6ac82e5f 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -66,6 +66,7 @@ (method url-fetch) (uri (string-append "http://quassel-irc.org/pub/quassel-" version ".tar.bz2")) + (patches (search-patches "quassel-fix-tls-check.patch")) (sha256 (base32 "0ka456fb8ha3w7g74xlzfg6w4azxjjxgrhl4aqpbwg3lnd6fbr4k")))) diff --git a/gnu/packages/patches/quassel-fix-tls-check.patch b/gnu/packages/patches/quassel-fix-tls-check.patch new file mode 100644 index 0000000000..057bc02a14 --- /dev/null +++ b/gnu/packages/patches/quassel-fix-tls-check.patch @@ -0,0 +1,25 @@ +This allows quasselclient to connect to SSL-enabled quasselcore instances. + +The check in qglobal.h requires -fPIC (not -fPIE as it is now). When this check +fails SSL / TLS is disabled. + +This patch comes from the upstream source repository [0] and can be +removed when the next version is packaged. + +[0] https://github.com/quassel/quassel/commit/4768c9e99f99b581d4e32e797db91d0182391696 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -428,6 +428,11 @@ endif() + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES} ${Qt5Core_INCLUDE_DIRS}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") ++ ++if (USE_QT5 AND Qt5_POSITION_INDEPENDENT_CODE) ++ set(CMAKE_REQUIRED_FLAGS "-fPIC -DQT_NO_VERSION_TAGGING") ++endif() ++ + check_cxx_source_compiles(" + #include \"qglobal.h\" + #if defined QT_NO_SSL + -- cgit v1.2.3 From 98593f9f51c8f6e3c2208d8443fdf08cf4d633bb Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Fri, 7 Apr 2017 19:21:28 +1000 Subject: gnu: bcftools: Update to 1.4.1. * gnu/packages/bioinformatics.scm (bcftools): Update to 1.4.1. [arguments]: Move Makefile modifications from here ... [source]: ... to added patch. Adjust patch for update to 1.4. * gnu/packages/patches/bcftools-fix-makefile.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 20 +++++--------- gnu/packages/patches/bcftools-fix-makefile.patch | 33 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 gnu/packages/patches/bcftools-fix-makefile.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8d3916e26d..3397216e15 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -522,6 +522,7 @@ dist_patch_DATA = \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-completion-directories.patch \ + %D%/packages/patches/bcftools-fix-makefile.patch \ %D%/packages/patches/binutils-ld-new-dtags.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/binutils-mips-bash-bug.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f5122a1802..87da4aed15 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -300,7 +300,7 @@ BAM files.") (define-public bcftools (package (name "bcftools") - (version "1.3.1") + (version "1.4.1") (source (origin (method url-fetch) (uri (string-append @@ -308,11 +308,12 @@ BAM files.") version "/bcftools-" version ".tar.bz2")) (sha256 (base32 - "095ry68vmz9q5s1scjsa698dhgyvgw5aicz24c19iwfbai07mhqj")) + "024xv59bzv148b6w3das4jmldf7rywsf8y1fbqznap008qc8gl6p")) + (patches (search-patches "bcftools-fix-makefile.patch")) (modules '((guix build utils))) (snippet ;; Delete bundled htslib. - '(delete-file-recursively "htslib-1.3.1")))) + '(delete-file-recursively "htslib-1.4.1")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -321,19 +322,12 @@ BAM files.") "USE_GPL=1" (string-append "prefix=" (assoc-ref %outputs "out")) (string-append "HTSDIR=" (assoc-ref %build-inputs "htslib") "/include") - (string-append "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.a") + (string-append "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.so") (string-append "BGZIP=" (assoc-ref %build-inputs "htslib") "/bin/bgzip") - (string-append "TABIX=" (assoc-ref %build-inputs "htslib") "/bin/tabix")) + (string-append "TABIX=" (assoc-ref %build-inputs "htslib") "/bin/tabix") + (string-append "PACKAGE_VERSION=" ,version)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-Makefile - (lambda _ - (substitute* "Makefile" - ;; Do not attempt to build htslib. - (("^include \\$\\(HTSDIR\\)/htslib\\.mk") "") - ;; Link against GSL cblas. - (("-lcblas") "-lgslcblas")) - #t)) (delete 'configure) (add-before 'check 'patch-tests (lambda _ diff --git a/gnu/packages/patches/bcftools-fix-makefile.patch b/gnu/packages/patches/bcftools-fix-makefile.patch new file mode 100644 index 0000000000..614f5fd6bd --- /dev/null +++ b/gnu/packages/patches/bcftools-fix-makefile.patch @@ -0,0 +1,33 @@ +diff --git a/Makefile b/Makefile +index edd2c4a..73b25ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,8 +30,8 @@ all: $(PROG) $(TEST_PROG) + + # Adjust $(HTSDIR) to point to your top-level htslib directory + HTSDIR = htslib-1.4.1 +-include $(HTSDIR)/htslib.mk +-include $(HTSDIR)/htslib_static.mk ++#include $(HTSDIR)/htslib.mk ++#include $(HTSDIR)/htslib_static.mk + HTSLIB = $(HTSDIR)/libhts.a + BGZIP = $(HTSDIR)/bgzip + TABIX = $(HTSDIR)/tabix +@@ -73,7 +73,7 @@ GSL_LIBS = + ifdef USE_GPL + EXTRA_CPPFLAGS += -DUSE_GPL + OBJS += polysomy.o peakfit.o +- GSL_LIBS = -lgsl -lcblas ++ GSL_LIBS = -lgsl -lgslcblas + endif + + prefix = /usr/local +@@ -217,7 +217,7 @@ test/test-regidx.o: test/test-regidx.c regidx.h + test/test-regidx: test/test-regidx.o regidx.o $(HTSLIB) + $(CC) $(ALL_LDFLAGS) -o $@ $^ $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(ALL_LIBS) + +-bcftools: $(HTSLIB) $(OBJS) ++bcftools: $(OBJS) + $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(GSL_LIBS) $(ALL_LIBS) + + doc/bcftools.1: doc/bcftools.txt -- cgit v1.2.3 From 0620387a594be1e8069dea8cda83dfc4a0b7f2de Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 22 Jul 2017 20:36:44 +1000 Subject: gnu: bcftools: Update to 1.5. * gnu/packages/bioinformatics.scm (bcftools): Update to 1.5. [origin]: Remove fix-makefile patch. [arguments]: Add configure flags, add LIBS make flag. Do not delete configure phase. * gnu/packages/patches/bcftools-fix-makefile.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 10 +++---- gnu/packages/patches/bcftools-fix-makefile.patch | 33 ------------------------ 3 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 gnu/packages/patches/bcftools-fix-makefile.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3397216e15..8d3916e26d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -522,7 +522,6 @@ dist_patch_DATA = \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-completion-directories.patch \ - %D%/packages/patches/bcftools-fix-makefile.patch \ %D%/packages/patches/binutils-ld-new-dtags.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/binutils-mips-bash-bug.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 3e3aaeb657..d9f7e2a5e1 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -300,7 +300,7 @@ BAM files.") (define-public bcftools (package (name "bcftools") - (version "1.4.1") + (version "1.5") (source (origin (method url-fetch) (uri (string-append @@ -308,18 +308,19 @@ BAM files.") version "/bcftools-" version ".tar.bz2")) (sha256 (base32 - "024xv59bzv148b6w3das4jmldf7rywsf8y1fbqznap008qc8gl6p")) - (patches (search-patches "bcftools-fix-makefile.patch")) + "0093hkkvxmbwfaa7905s6185jymynvg42kq6sxv7fili11l5mxwz")) (modules '((guix build utils))) (snippet ;; Delete bundled htslib. - '(delete-file-recursively "htslib-1.4.1")))) + '(delete-file-recursively "htslib-1.5")))) (build-system gnu-build-system) (arguments `(#:test-target "test" + #:configure-flags (list "--with-htslib=system") #:make-flags (list "USE_GPL=1" + "LIBS=-lgsl -lgslcblas" (string-append "prefix=" (assoc-ref %outputs "out")) (string-append "HTSDIR=" (assoc-ref %build-inputs "htslib") "/include") (string-append "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.so") @@ -328,7 +329,6 @@ BAM files.") (string-append "PACKAGE_VERSION=" ,version)) #:phases (modify-phases %standard-phases - (delete 'configure) (add-before 'check 'patch-tests (lambda _ (substitute* "test/test.pl" diff --git a/gnu/packages/patches/bcftools-fix-makefile.patch b/gnu/packages/patches/bcftools-fix-makefile.patch deleted file mode 100644 index 614f5fd6bd..0000000000 --- a/gnu/packages/patches/bcftools-fix-makefile.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/Makefile b/Makefile -index edd2c4a..73b25ea 100644 ---- a/Makefile -+++ b/Makefile -@@ -30,8 +30,8 @@ all: $(PROG) $(TEST_PROG) - - # Adjust $(HTSDIR) to point to your top-level htslib directory - HTSDIR = htslib-1.4.1 --include $(HTSDIR)/htslib.mk --include $(HTSDIR)/htslib_static.mk -+#include $(HTSDIR)/htslib.mk -+#include $(HTSDIR)/htslib_static.mk - HTSLIB = $(HTSDIR)/libhts.a - BGZIP = $(HTSDIR)/bgzip - TABIX = $(HTSDIR)/tabix -@@ -73,7 +73,7 @@ GSL_LIBS = - ifdef USE_GPL - EXTRA_CPPFLAGS += -DUSE_GPL - OBJS += polysomy.o peakfit.o -- GSL_LIBS = -lgsl -lcblas -+ GSL_LIBS = -lgsl -lgslcblas - endif - - prefix = /usr/local -@@ -217,7 +217,7 @@ test/test-regidx.o: test/test-regidx.c regidx.h - test/test-regidx: test/test-regidx.o regidx.o $(HTSLIB) - $(CC) $(ALL_LDFLAGS) -o $@ $^ $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(ALL_LIBS) - --bcftools: $(HTSLIB) $(OBJS) -+bcftools: $(OBJS) - $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(GSL_LIBS) $(ALL_LIBS) - - doc/bcftools.1: doc/bcftools.txt -- cgit v1.2.3 From f3f68a442c1c40438078c24c0869e22c08f30c48 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 15 Jul 2017 16:31:40 +1000 Subject: gnu: metabat: Update to 2.11.1. * gnu/packages/bioinformatics.scm (metabat): Update to 2.11.1. [source]: Add patch to fix compilation. [arguments]: Adjust regular expressions modifying 'SConstruct'. * gnu/packages/patches/metabat-fix-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 89 +++++++++++----------- gnu/packages/patches/metabat-fix-compilation.patch | 39 ++++++++++ 3 files changed, 83 insertions(+), 46 deletions(-) create mode 100644 gnu/packages/patches/metabat-fix-compilation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8d3916e26d..3eccc879b0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -840,6 +840,7 @@ dist_patch_DATA = \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch \ %D%/packages/patches/metabat-remove-compilation-date.patch \ + %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ %D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index eab9d49e12..3b4cc359ee 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3467,23 +3467,20 @@ form of assemblies or reads.") license:cpl1.0)))) ; Open Bloom Filter (define-public metabat - ;; We package from a git commit because compilation of the released version - ;; fails. - (let ((commit "cbdca756993e66ae57e50a27970595dda9cbde1b")) - (package - (name "metabat") - (version (string-append "0.32.4-1." (string-take commit 8))) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://bitbucket.org/berkeleylab/metabat.git") - (commit commit))) - (file-name (string-append name "-" version)) - (sha256 - (base32 - "0byia8nsip6zvc4ha0qkxkxxyjf4x7jcvy48q2dvb0pzr989syzr")) - (patches (search-patches "metabat-remove-compilation-date.patch")))) + (package + (name "metabat") + (version "2.11.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/berkeleylab/metabat/get/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0ll00l81aflscgggs5nfhj12cbvdiz3gg7f7n5f537a3xhx60vn9")) + (patches (search-patches "metabat-remove-compilation-date.patch" + "metabat-fix-compilation.patch")))) (build-system gnu-build-system) (arguments `(#:phases @@ -3500,35 +3497,35 @@ form of assemblies or reads.") "#include \"htslib/kseq.h\"")) #t)) (add-after 'unpack 'fix-scons - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "SConstruct" - (("^htslib_dir = 'samtools'") - (string-append "hitslib_dir = '" - (assoc-ref inputs "htslib") - "'")) - (("^samtools_dir = 'samtools'") - (string-append "samtools_dir = '" - (assoc-ref inputs "htslib") - "'")) - (("^findStaticOrShared\\('bam', hts_lib") - (string-append "findStaticOrShared('bam', '" - (assoc-ref inputs "samtools") - "/lib'")) - ;; Do not distribute README. - (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)") "")) - #t)) + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "SConstruct" + (("^htslib_dir += 'samtools'") + (string-append "htslib_dir = '" + (assoc-ref inputs "htslib") + "'")) + (("^samtools_dir = 'samtools'") + (string-append "samtools_dir = '" + (assoc-ref inputs "samtools") + "'")) + (("^findStaticOrShared\\('bam', hts_lib") + (string-append "findStaticOrShared('bam', '" + (assoc-ref inputs "samtools") + "/lib'")) + ;; Do not distribute README. + (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)") "")) + #t)) (delete 'configure) (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (mkdir (assoc-ref outputs "out")) - (zero? (system* "scons" - (string-append - "PREFIX=" - (assoc-ref outputs "out")) - (string-append - "BOOST_ROOT=" - (assoc-ref inputs "boost")) - "install")))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (mkdir (assoc-ref outputs "out")) + (zero? (system* "scons" + (string-append + "PREFIX=" + (assoc-ref outputs "out")) + (string-append + "BOOST_ROOT=" + (assoc-ref inputs "boost")) + "install")))) ;; Check and install are carried out during build phase. (delete 'check) (delete 'install)))) @@ -3549,8 +3546,8 @@ sequences to deconvolute complex microbial communities, or metagenome binning, enables the study of individual organisms and their interactions. MetaBAT is an automated metagenome binning software, which integrates empirical probabilistic distances of genome abundance and tetranucleotide frequency.") - (license (license:non-copyleft "file://license.txt" - "See license.txt in the distribution."))))) + (license (license:non-copyleft "file://license.txt" + "See license.txt in the distribution.")))) (define-public minced (package diff --git a/gnu/packages/patches/metabat-fix-compilation.patch b/gnu/packages/patches/metabat-fix-compilation.patch new file mode 100644 index 0000000000..7086a96e86 --- /dev/null +++ b/gnu/packages/patches/metabat-fix-compilation.patch @@ -0,0 +1,39 @@ +This patch changes metabat so that (1) it is not build statically, (2) it uses +shared libraries rather than static libraries where possible. + +diff --git a/SConstruct b/SConstruct +index 69cdc0a..ac99bcb 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None) + build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp'] + link_flags = ['-lstdc++', '-lm', '-fopenmp'] + +-if platform.platform(True, True).find('Darwin') == -1: +- link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++']) + + if debug is None: + build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable']) +@@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat + for path in testPaths: + if not os.path.isdir(path): + continue ++ for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)): ++ if os.path.isfile(testfile): ++ print "Found shared library %s as %s" % (lib, testfile) ++ link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] ) ++ return + for suffix in staticSuffixes: + testfile = '%s/lib%s%s' % (path, lib, suffix) + if os.path.isfile(testfile): + static_source_list.append(testfile) + print "Found static library %s as %s" % (lib, testfile) + return +- for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)): +- if os.path.isfile(testfile): +- print "Found shared library %s as %s" % (lib, testfile) +- link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] ) +- return + print "Could not find library for %s!!! Looked in %s" % (lib, testPaths) + return + -- cgit v1.2.3