diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-05-01 23:11:41 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-05-01 23:11:41 +0200 |
commit | 3b458d5462e6bbd852c2dc5c6670d5655abf53f5 (patch) | |
tree | 4f3ccec0de1c355134369333c17e948e3258d546 /gnu/packages/patches | |
parent | 2ca3fdc2db1aef96fbf702a2f26f5e18ce832038 (diff) | |
parent | 14da3daafc8dd92fdabd3367694c930440fd72cb (diff) | |
download | guix-3b458d5462e6bbd852c2dc5c6670d5655abf53f5.tar guix-3b458d5462e6bbd852c2dc5c6670d5655abf53f5.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
36 files changed, 1781 insertions, 1085 deletions
diff --git a/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch b/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch new file mode 100644 index 0000000000..ab7cc83684 --- /dev/null +++ b/gnu/packages/patches/bind-fix-unused-pk11-ecc-constants.patch @@ -0,0 +1,43 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Thu, 25 Apr 2019 04:36:52 +0200 +Subject: [PATCH] gnu: bind: Fix unused PKCS#11 ECC constants. + +Without this patch, the build fails: + + pkcs11-keygen.c: In function ‘main’: + pkcs11-keygen.c:424:32: error: ‘pk11_ecc_prime256v1’ undeclared (first use in this function) + public_template[4].pValue = pk11_ecc_prime256v1; + ^ + pkcs11-keygen.c:424:32: note: each undeclared identifier is reported only once for each function it appears in + pkcs11-keygen.c:428:32: error: ‘pk11_ecc_secp384r1’ undeclared (first use in this function) + public_template[4].pValue = pk11_ecc_secp384r1; + ^ + make[2]: *** [Makefile:217: pkcs11-keygen.o] Error 1 + +Fix copied verbatim from upstream[0]. + +[0]: https://gitlab.isc.org/isc-projects/bind9/issues/935 + +--- +--- orig-bind-9.11.6/bin/pkcs11/pkcs11-keygen.c 2019-02-27 15:28:15.000000000 -0800 ++++ bind-9.11.6/bin/pkcs11/pkcs11-keygen.c 2019-03-11 09:20:50.955257469 -0700 +@@ -403,6 +403,10 @@ + public_template[RSA_PUBLIC_EXPONENT].ulValueLen = expsize; + break; + case key_ecc: ++#if !defined(HAVE_PKCS11_ECDSA) ++ fprintf(stderr, "prime256v1 and secp3841r1 is not supported\n"); ++ usage(); ++#else + op_type = OP_EC; + if (bits == 0) + bits = 256; +@@ -429,7 +433,7 @@ + public_template[4].ulValueLen = + sizeof(pk11_ecc_secp384r1); + } +- ++#endif + break; + case key_ecx: + #if !defined(CKM_EDDSA_KEY_PAIR_GEN) diff --git a/gnu/packages/patches/docker-use-fewer-modprobes.patch b/gnu/packages/patches/docker-use-fewer-modprobes.patch new file mode 100644 index 0000000000..4e4a45b6ce --- /dev/null +++ b/gnu/packages/patches/docker-use-fewer-modprobes.patch @@ -0,0 +1,137 @@ +This patch makes docker find out whether a filesystem type is supported +by trying to mount a filesystem of that type rather than invoking "modprobe". + +See <https://github.com/moby/moby/pull/38930>. + +--- docker-18.09.0-checkout/daemon/graphdriver/overlay/overlay.go.orig 1970-01-01 01:00:00.000000000 +0100 ++++ docker-18.09.0-checkout/daemon/graphdriver/overlay/overlay.go 2019-03-19 09:16:03.487087490 +0100 +@@ -8,7 +8,6 @@ + "io" + "io/ioutil" + "os" +- "os/exec" + "path" + "path/filepath" + "strconv" +@@ -201,9 +200,16 @@ + } + + func supportsOverlay() error { +- // We can try to modprobe overlay first before looking at +- // proc/filesystems for when overlay is supported +- exec.Command("modprobe", "overlay").Run() ++ // Access overlay filesystem so that Linux loads it (if possible). ++ mountTarget, err := ioutil.TempDir("", "supportsOverlay") ++ if err != nil { ++ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.") ++ return graphdriver.ErrNotSupported ++ } else { ++ /* The mounting will fail--after the module has been loaded.*/ ++ defer os.RemoveAll(mountTarget) ++ unix.Mount("overlay", mountTarget, "overlay", 0, "") ++ } + + f, err := os.Open("/proc/filesystems") + if err != nil { +--- docker-18.09.0-checkout/daemon/graphdriver/overlay2/overlay.go.orig 2019-03-18 23:42:23.728525231 +0100 ++++ docker-18.09.0-checkout/daemon/graphdriver/overlay2/overlay.go 2019-03-19 08:54:31.411906113 +0100 +@@ -10,7 +10,6 @@ + "io" + "io/ioutil" + "os" +- "os/exec" + "path" + "path/filepath" + "strconv" +@@ -261,9 +260,16 @@ + } + + func supportsOverlay() error { +- // We can try to modprobe overlay first before looking at +- // proc/filesystems for when overlay is supported +- exec.Command("modprobe", "overlay").Run() ++ // Access overlay filesystem so that Linux loads it (if possible). ++ mountTarget, err := ioutil.TempDir("", "supportsOverlay2") ++ if err != nil { ++ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.") ++ return graphdriver.ErrNotSupported ++ } else { ++ /* The mounting will fail--after the module has been loaded.*/ ++ defer os.RemoveAll(mountTarget) ++ unix.Mount("overlay", mountTarget, "overlay", 0, "") ++ } + + f, err := os.Open("/proc/filesystems") + if err != nil { +--- docker-18.09.0-checkout/daemon/graphdriver/devmapper/deviceset.go.orig 2019-03-19 09:19:16.592844887 +0100 ++++ docker-18.09.0-checkout/daemon/graphdriver/devmapper/deviceset.go 2019-03-19 09:21:18.019361761 +0100 +@@ -540,8 +539,14 @@ + return err // error text is descriptive enough + } + +- // Check if kernel supports xfs filesystem or not. +- exec.Command("modprobe", "xfs").Run() ++ mountTarget, err := ioutil.TempDir("", "supportsXFS") ++ if err != nil { ++ return errors.Wrapf(err, "error checking for xfs support") ++ } else { ++ /* The mounting will fail--after the module has been loaded.*/ ++ defer os.RemoveAll(mountTarget) ++ unix.Mount("none", mountTarget, "xfs", 0, "") ++ } + + f, err := os.Open("/proc/filesystems") + if err != nil { +--- docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/iptables/iptables.go.orig 2019-03-19 09:47:19.430111170 +0100 ++++ docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/iptables/iptables.go 2019-03-19 10:38:01.445136177 +0100 +@@ -72,11 +71,12 @@ + } + + func probe() { +- if out, err := exec.Command("modprobe", "-va", "nf_nat").CombinedOutput(); err != nil { +- logrus.Warnf("Running modprobe nf_nat failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) ++ path, err := exec.LookPath("iptables") ++ if err != nil { ++ return + } +- if out, err := exec.Command("modprobe", "-va", "xt_conntrack").CombinedOutput(); err != nil { +- logrus.Warnf("Running modprobe xt_conntrack failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) ++ if out, err := exec.Command(path, "--wait", "-t", "nat", "-L", "-n").CombinedOutput(); err != nil { ++ logrus.Warnf("Running iptables --wait -t nat -L -n failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) + } + } + +--- docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go.orig 2019-03-19 11:23:20.738316699 +0100 ++++ docker-18.09.0-checkout/vendor/github.com/docker/libnetwork/ns/init_linux.go 2019-03-19 11:27:57.149753073 +0100 +@@ -76,12 +76,8 @@ func NlHandle() *netlink.Handle { + func getSupportedNlFamilies() []int { + fams := []int{syscall.NETLINK_ROUTE} + // NETLINK_XFRM test +- if err := loadXfrmModules(); err != nil { +- if checkXfrmSocket() != nil { +- logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err) +- } else { +- fams = append(fams, syscall.NETLINK_XFRM) +- } ++ if err := checkXfrmSocket(); err != nil { ++ logrus.Warnf("Could not load necessary modules for IPSEC rules: %v", err) + } else { + fams = append(fams, syscall.NETLINK_XFRM) + } +@@ -99,16 +95,6 @@ func getSupportedNlFamilies() []int { + return fams + } + +-func loadXfrmModules() error { +- if out, err := exec.Command("modprobe", "-va", "xfrm_user").CombinedOutput(); err != nil { +- return fmt.Errorf("Running modprobe xfrm_user failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) +- } +- if out, err := exec.Command("modprobe", "-va", "xfrm_algo").CombinedOutput(); err != nil { +- return fmt.Errorf("Running modprobe xfrm_algo failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err) +- } +- return nil +-} +- + // API check on required xfrm modules (xfrm_user, xfrm_algo) + func checkXfrmSocket() error { + fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_RAW, syscall.NETLINK_XFRM) diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch new file mode 100644 index 0000000000..c1ad827a26 --- /dev/null +++ b/gnu/packages/patches/emacs-undohist-ignored.patch @@ -0,0 +1,27 @@ +From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001 +From: Patrick Mosby <info@schreiblogade.de> +Date: Mon, 7 Sep 2015 09:05:56 +0200 +Subject: [PATCH] Don't save undo file for ignored files. + +This fixes #4. +--- + undohist.el | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/undohist.el b/undohist.el +index b184a26..de60356 100644 +--- a/undohist.el ++++ b/undohist.el +@@ -164,7 +164,8 @@ To use undohist, you just call this function." + undohist-ignored-files))) + + (defun undohist-save-1 () +- (when (consp buffer-undo-list) ++ (when (and (consp buffer-undo-list) ++ (undohist-recover-file-p (buffer-file-name (current-buffer)))) + (let ((file (make-undohist-file-name (buffer-file-name))) + (contents `((digest . ,(md5 (current-buffer))) + (undo-list . ,(undohist-encode buffer-undo-list))))) +-- +2.21.0 + diff --git a/gnu/packages/patches/emacs-zones-called-interactively.patch b/gnu/packages/patches/emacs-zones-called-interactively.patch new file mode 100644 index 0000000000..b60f390a7e --- /dev/null +++ b/gnu/packages/patches/emacs-zones-called-interactively.patch @@ -0,0 +1,43 @@ +From fb56fbb706804215ef9af0cc575db97c373046c6 Mon Sep 17 00:00:00 2001 +From: Brian Leung <bkleung89@gmail.com> +Date: Sun, 17 Mar 2019 01:32:04 +0100 +Subject: [PATCH] This patch silences the byte-compiler. + +--- + zones.el | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/zones.el b/zones.el +index 1bf94f0..94fa9a6 100644 +--- a/zones.el ++++ b/zones.el +@@ -1031,7 +1031,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. + + This is a destructive operation. The list structure of the variable + value can be modified." +- (zz-narrow-advice (interactive-p))) ++ (zz-narrow-advice (called-interactively-p))) + + (defadvice narrow-to-defun (after zz-add-zone--defun activate) + "Push the defun limits to the current `zz-izones-var'. +@@ -1039,7 +1039,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. + + This is a destructive operation. The list structure of the variable + value can be modified." +- (zz-narrow-advice (interactive-p))) ++ (zz-narrow-advice (called-interactively-p))) + + ;; Call `zz-add-zone' if interactive or `zz-add-zone-anyway-p'. + ;; +@@ -1049,7 +1049,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. + + This is a destructive operation. The list structure of the variable + value can be modified." +- (zz-narrow-advice (interactive-p))) ++ (zz-narrow-advice (called-interactively-p))) + + ;;(@* "General Commands") + +-- +2.21.0 + diff --git a/gnu/packages/patches/flac-CVE-2017-6888.patch b/gnu/packages/patches/flac-CVE-2017-6888.patch new file mode 100644 index 0000000000..d2583201b4 --- /dev/null +++ b/gnu/packages/patches/flac-CVE-2017-6888.patch @@ -0,0 +1,29 @@ +https://git.xiph.org/?p=flac.git;a=patch;h=4f47b63e9c971e6391590caf00a0f2a5ed612e67 + +From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <erikd@mega-nerd.com> +Date: Sat, 8 Apr 2017 18:34:49 +1000 +Subject: [PATCH] stream_decoder.c: Fix a memory leak + +Leak reported by Secunia Research. +--- + src/libFLAC/stream_decoder.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c +index 14d5fe7f..a5527511 100644 +--- a/src/libFLAC/stream_decoder.c ++++ b/src/libFLAC/stream_decoder.c +@@ -1753,6 +1753,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre + } + memset (obj->comments[i].entry, 0, obj->comments[i].length) ; + if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) { ++ /* Current i-th entry is bad, so we delete it. */ ++ free (obj->comments[i].entry) ; ++ obj->comments[i].entry = NULL ; + obj->num_comments = i; + goto skip; + } +-- +2.11.0 + diff --git a/gnu/packages/patches/grub-efi-fat-serial-number.patch b/gnu/packages/patches/grub-efi-fat-serial-number.patch new file mode 100644 index 0000000000..ad92f9bc9e --- /dev/null +++ b/gnu/packages/patches/grub-efi-fat-serial-number.patch @@ -0,0 +1,27 @@ +Change 'grub-mkrescue' to honor the 'GRUB_FAT_SERIAL_NUMBER' +environment variable. That way, the caller can specify a fixed +serial number (instead of the randomly chosen one) to create EFI +images (the 'efi.img' file) that are reproducible bit-for-bit. + +Patch by Ludovic Courtès <ludo@gnu.org>. + +--- grub-2.02/util/grub-mkrescue.c 2019-04-20 19:15:26.180242812 +0200 ++++ grub-2.02/util/grub-mkrescue.c 2019-04-20 21:56:34.672370849 +0200 +@@ -788,8 +788,15 @@ main (int argc, char *argv[]) + + efiimgfat = grub_util_path_concat (2, iso9660_dir, "efi.img"); + int rv; +- rv = grub_util_exec ((const char * []) { "mformat", "-C", "-f", "2880", "-L", "16", "-i", +- efiimgfat, "::", NULL }); ++ ++ const char *fat_serial_number = getenv ("GRUB_FAT_SERIAL_NUMBER"); ++ const char *mformat_args[] = ++ { "mformat", "-C", "-f", "2880", "-L", "16", ++ fat_serial_number != NULL ? "-N" : "-C", ++ fat_serial_number != NULL ? fat_serial_number : "-C", ++ "-i", efiimgfat, "::", NULL }; ++ ++ rv = grub_util_exec (mformat_args); + if (rv != 0) + grub_util_error ("`%s` invocation failed\n", "mformat"); + rv = grub_util_exec ((const char * []) { "mcopy", "-s", "-i", efiimgfat, efidir_efi, "::/", NULL }); diff --git a/gnu/packages/patches/idris-test-no-node.patch b/gnu/packages/patches/idris-test-no-node.patch new file mode 100644 index 0000000000..c04ad41a8e --- /dev/null +++ b/gnu/packages/patches/idris-test-no-node.patch @@ -0,0 +1,61 @@ +From 6c52e1b902b869c25e2fe39cff6364143a04da61 Mon Sep 17 00:00:00 2001 +From: Niklas Larsson <niklas@mm.st> +Date: Tue, 11 Dec 2018 19:56:22 +0100 +Subject: [PATCH] Only check for Node when required + +--- + test/TestRun.hs | 34 ++++++++++++++++++++-------------- + 1 file changed, 20 insertions(+), 14 deletions(-) + +diff --git a/test/TestRun.hs b/test/TestRun.hs +index c7db9fdcd..4809911f3 100644 +--- a/test/TestRun.hs ++++ b/test/TestRun.hs +@@ -11,6 +11,7 @@ import Data.Proxy + import Data.Typeable + import Options.Applicative + import System.Directory ++import System.Environment + import System.Exit + import System.FilePath ((</>)) + import System.Info +@@ -103,20 +104,25 @@ runTest path flags = do + normalise (x : xs) = x : normalise xs + normalise [] = [] + ++checkNode :: IO () ++checkNode = do ++ nodePath <- findExecutable "node" ++ nodejsPath <- findExecutable "nodejs" ++ let node = nodePath <|> nodejsPath ++ case node of ++ Nothing -> do ++ putStrLn "For running the test suite against Node, node must be installed." ++ exitFailure ++ Just _ -> return () ++ + main :: IO () + main = do +- nodePath <- findExecutable "node" +- nodejsPath <- findExecutable "nodejs" +- let node = nodePath <|> nodejsPath +- case node of +- Nothing -> do +- putStrLn "For running the test suite against Node, node must be installed." +- exitFailure +- Just _ -> do +- defaultMainWithIngredients ingredients $ ++ args <- getArgs ++ when ("--node" `elem` args) checkNode ++ defaultMainWithIngredients ingredients $ + askOption $ \(NodeOpt node) -> +- let (codegen, flags) = if node then (JS, ["--codegen", "node"]) +- else (C , []) +- in +- mkGoldenTests (testFamiliesForCodegen codegen) +- (flags ++ idrisFlags) ++ let (codegen, flags) = if node then (JS, ["--codegen", "node"]) ++ else (C , []) ++ in ++ mkGoldenTests (testFamiliesForCodegen codegen) (flags ++ idrisFlags) ++ diff --git a/gnu/packages/patches/knot-include-system-lmdb-header.patch b/gnu/packages/patches/knot-include-system-lmdb-header.patch deleted file mode 100644 index 5c5c0beabc..0000000000 --- a/gnu/packages/patches/knot-include-system-lmdb-header.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Wed, 20 Mar 2019 00:08:00 +0100 -Subject: [PATCH] gnu: knot: Include system <lmdb.h>. - -Copied verbatim from Knot master[0]. - -[0]: https://gitlab.labs.nic.cz/knot/knot-dns/commit/b557430cffbb1c6b30617a394b02acc514e7e536 - -From b557430cffbb1c6b30617a394b02acc514e7e536 Mon Sep 17 00:00:00 2001 -From: Daniel Salzman <daniel.salzman@nic.cz> -Date: Wed, 6 Mar 2019 17:35:44 +0100 -Subject: [PATCH] journal: include proper header <lmdb.h> - -fixes #638 ---- - src/knot/journal/knot_lmdb.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/knot/journal/knot_lmdb.h b/src/knot/journal/knot_lmdb.h -index 35a88845c..b1d09cbb4 100644 ---- a/src/knot/journal/knot_lmdb.h -+++ b/src/knot/journal/knot_lmdb.h -@@ -16,7 +16,7 @@ - - #pragma once - --#include "contrib/lmdb/lmdb.h" -+#include <lmdb.h> - - #include <stdbool.h> - #include <stdlib.h> --- -2.18.1 - diff --git a/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch b/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch new file mode 100644 index 0000000000..2f60737e30 --- /dev/null +++ b/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch @@ -0,0 +1,17 @@ +Kodi doesn't set the CAPATH and CAINFO parameters for libcurl. To make HTTPS +connections work we can set them based on SSL_CERT_DIR and SSL_CERT_FILE. + +--- a/xbmc/filesystem/CurlFile.cpp ++++ b/xbmc/filesystem/CurlFile.cpp +@@ -626,5 +626,9 @@ + if (!m_cipherlist.empty()) + g_curlInterface.easy_setopt(h, CURLOPT_SSL_CIPHER_LIST, m_cipherlist.c_str()); + ++ // Load certificate data from environment paths ++ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAPATH, getenv("SSL_CERT_DIR")); ++ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAINFO, getenv("SSL_CERT_FILE")); ++ + // enable HTTP2 support. default: CURL_HTTP_VERSION_1_1. Curl >= 7.62.0 defaults to CURL_HTTP_VERSION_2TLS + g_curlInterface.easy_setopt(h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); +- + } diff --git a/gnu/packages/patches/lcms-CVE-2018-16435.patch b/gnu/packages/patches/lcms-CVE-2018-16435.patch new file mode 100644 index 0000000000..60228e73af --- /dev/null +++ b/gnu/packages/patches/lcms-CVE-2018-16435.patch @@ -0,0 +1,171 @@ +https://github.com/mm2/Little-CMS/commit/768f70ca405cd3159d990e962d54456773bb8cf8.patch + +From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001 +From: Marti Maria <info@littlecms.com> +Date: Wed, 15 Aug 2018 20:07:56 +0200 +Subject: [PATCH] Upgrade Visual studio 2017 15.8 + +- Upgrade to 15.8 +- Add check on CGATS memory allocation (thanks to Quang Nguyen for +pointing out this) +--- + Projects/VC2017/jpegicc/jpegicc.vcxproj | 1 + + Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj | 2 +- + Projects/VC2017/lcms2_static/lcms2_static.vcxproj | 2 +- + Projects/VC2017/linkicc/linkicc.vcxproj | 2 +- + Projects/VC2017/psicc/psicc.vcxproj | 2 +- + Projects/VC2017/testbed/testbed.vcxproj | 2 +- + Projects/VC2017/tiffdiff/tiffdiff.vcxproj | 2 +- + Projects/VC2017/tifficc/tifficc.vcxproj | 2 +- + Projects/VC2017/transicc/transicc.vcxproj | 1 + + src/cmscgats.c | 14 ++++++++++---- + 10 files changed, 19 insertions(+), 11 deletions(-) + +diff --git a/Projects/VC2017/jpegicc/jpegicc.vcxproj b/Projects/VC2017/jpegicc/jpegicc.vcxproj +index ab26a53..39cfd00 100644 +--- a/Projects/VC2017/jpegicc/jpegicc.vcxproj ++++ b/Projects/VC2017/jpegicc/jpegicc.vcxproj +@@ -22,6 +22,7 @@ + <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid> + <RootNamespace>jpegicc</RootNamespace> + <Keyword>Win32Proj</Keyword> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj +index 4c8aa3f..d1bf3eb 100644 +--- a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj ++++ b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid> + <RootNamespace>lcms2_DLL</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj +index 2a9988a..9fc05ce 100644 +--- a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj ++++ b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid> + <RootNamespace>lcms2_static</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/linkicc/linkicc.vcxproj b/Projects/VC2017/linkicc/linkicc.vcxproj +index 30c2b4e..51586dd 100644 +--- a/Projects/VC2017/linkicc/linkicc.vcxproj ++++ b/Projects/VC2017/linkicc/linkicc.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid> + <RootNamespace>linkicc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/psicc/psicc.vcxproj b/Projects/VC2017/psicc/psicc.vcxproj +index 9dcf89a..8f26e12 100644 +--- a/Projects/VC2017/psicc/psicc.vcxproj ++++ b/Projects/VC2017/psicc/psicc.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid> + <RootNamespace>psicc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/testbed/testbed.vcxproj b/Projects/VC2017/testbed/testbed.vcxproj +index 0af3762..3f6aea3 100644 +--- a/Projects/VC2017/testbed/testbed.vcxproj ++++ b/Projects/VC2017/testbed/testbed.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid> + <RootNamespace>testbed</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj +index 7edfe28..3a6d837 100644 +--- a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj ++++ b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid> + <RootNamespace>tiffdiff</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/tifficc/tifficc.vcxproj b/Projects/VC2017/tifficc/tifficc.vcxproj +index cd9f04c..5ef954f 100644 +--- a/Projects/VC2017/tifficc/tifficc.vcxproj ++++ b/Projects/VC2017/tifficc/tifficc.vcxproj +@@ -22,7 +22,7 @@ + <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid> + <RootNamespace>tifficc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/transicc/transicc.vcxproj b/Projects/VC2017/transicc/transicc.vcxproj +index d9b77c6..b3173d8 100644 +--- a/Projects/VC2017/transicc/transicc.vcxproj ++++ b/Projects/VC2017/transicc/transicc.vcxproj +@@ -22,6 +22,7 @@ + <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid> + <RootNamespace>transicc</RootNamespace> + <Keyword>Win32Proj</Keyword> ++ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/src/cmscgats.c b/src/cmscgats.c +index 1a87613..8c3e96d 100644 +--- a/src/cmscgats.c ++++ b/src/cmscgats.c +@@ -1,7 +1,7 @@ + //--------------------------------------------------------------------------------- + // + // Little Color Management System +-// Copyright (c) 1998-2017 Marti Maria Saguer ++// Copyright (c) 1998-2018 Marti Maria Saguer + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8) + t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); + t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); + +- t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); +- if (t->Data == NULL) { ++ if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe) ++ { ++ SynError(it8, "AllocateDataSet: too much data"); ++ } ++ else { ++ t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*)); ++ if (t->Data == NULL) { + +- SynError(it8, "AllocateDataSet: Unable to allocate data array"); ++ SynError(it8, "AllocateDataSet: Unable to allocate data array"); ++ } + } + + } diff --git a/gnu/packages/patches/ledger-fix-uninitialized.patch b/gnu/packages/patches/ledger-fix-uninitialized.patch deleted file mode 100644 index 128c90ec13..0000000000 --- a/gnu/packages/patches/ledger-fix-uninitialized.patch +++ /dev/null @@ -1,27 +0,0 @@ -This fixes failures of tests "BaseLine_opt-datetime-format" and -"BaseLine_opt-time-report", which were printing an unexpected trailing '*' on -the last line of output, e.g.: - - @@ -5,4 +5,4 @@ - 04/05/13 12:00 PM 04/05/13 01:30 PM 1.50h Lunch - 04/05/13 11:30 AM 04/05/13 12:00 PM 30.0m Walk - -------------------------------------------------- - - - + * - -Reported upstream at -https://groups.google.com/d/msg/ledger-cli/EeJUrUk8YDc/pIR-LOTVEAAJ - -diff --git a/src/account.h b/src/account.h -index 1b97463d..f2555593 100644 ---- a/src/account.h -+++ b/src/account.h -@@ -187,7 +187,7 @@ public: - - datetime_t earliest_checkin; - datetime_t latest_checkout; -- bool latest_checkout_cleared; -+ bool latest_checkout_cleared = false; - - std::set<path> filenames; - std::set<string> accounts_referenced; diff --git a/gnu/packages/patches/libopenshot-fixup-tests.patch b/gnu/packages/patches/libopenshot-fixup-tests.patch deleted file mode 100644 index 9a0bcc5e8f..0000000000 --- a/gnu/packages/patches/libopenshot-fixup-tests.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 691536f2f8a9ed7322fedb24d489db08c70705b9 Mon Sep 17 00:00:00 2001 -From: "Dr. Tobias Quathamer" <toddy@debian.org> -Date: Sat, 18 Nov 2017 13:54:22 +0100 -Subject: [PATCH] This the combination of two patches: - https://sources.debian.org/data/main/libo/libopenshot/0.2.2+dfsg1-1/debian/patches/0003-Fix-failing-tests-by-using-a-fault-tolerance.patch - https://sources.debian.org/data/main/libo/libopenshot/0.2.2+dfsg1-1/debian/patches/0004-Add-some-more-fault-tolerance-for-arm64.patch - -Together they should fix the test suite on all architectures ---- - tests/FFmpegReader_Tests.cpp | 9 ++++----- - tests/ImageWriter_Tests.cpp | 8 ++++---- - tests/Timeline_Tests.cpp | 28 ++++++++++++++-------------- - 3 files changed, 22 insertions(+), 23 deletions(-) - -diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp -index 53563ca..07fc41e 100644 ---- a/tests/FFmpegReader_Tests.cpp -+++ b/tests/FFmpegReader_Tests.cpp -@@ -95,8 +95,8 @@ TEST(FFmpegReader_Check_Video_File) - int pixel_index = 112 * 4; // pixel 112 (4 bytes per pixel) - - // Check image properties on scanline 10, pixel 112 -- CHECK_EQUAL(21, (int)pixels[pixel_index]); -- CHECK_EQUAL(191, (int)pixels[pixel_index + 1]); -+ CHECK_CLOSE(21, (int)pixels[pixel_index], 1); -+ CHECK_CLOSE(191, (int)pixels[pixel_index + 1], 2); - CHECK_EQUAL(0, (int)pixels[pixel_index + 2]); - CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); - -@@ -109,8 +109,8 @@ TEST(FFmpegReader_Check_Video_File) - - // Check image properties on scanline 10, pixel 112 - CHECK_EQUAL(0, (int)pixels[pixel_index]); -- CHECK_EQUAL(96, (int)pixels[pixel_index + 1]); -- CHECK_EQUAL(188, (int)pixels[pixel_index + 2]); -+ CHECK_CLOSE(96, (int)pixels[pixel_index + 1], 1); -+ CHECK_CLOSE(188, (int)pixels[pixel_index + 2], 1); - CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); - - // Close reader -@@ -209,4 +209,3 @@ TEST(FFmpegReader_Multiple_Open_and_Close) - // Close reader - r.Close(); - } -- -diff --git a/tests/ImageWriter_Tests.cpp b/tests/ImageWriter_Tests.cpp -index 107ee39..d10c8bd 100644 ---- a/tests/ImageWriter_Tests.cpp -+++ b/tests/ImageWriter_Tests.cpp -@@ -73,9 +73,9 @@ TEST(ImageWriter_Test_Gif) - int pixel_index = 230 * 4; // pixel 230 (4 bytes per pixel) - - // Check image properties -- CHECK_EQUAL(20, (int)pixels[pixel_index]); -- CHECK_EQUAL(18, (int)pixels[pixel_index + 1]); -- CHECK_EQUAL(11, (int)pixels[pixel_index + 2]); -+ CHECK_CLOSE(20, (int)pixels[pixel_index], 5); -+ CHECK_CLOSE(18, (int)pixels[pixel_index + 1], 2); -+ CHECK_CLOSE(11, (int)pixels[pixel_index + 2], 2); - CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); - } --#endif -\ No newline at end of file -+#endif -diff --git a/tests/Timeline_Tests.cpp b/tests/Timeline_Tests.cpp -index 8c81579..4d861a6 100644 ---- a/tests/Timeline_Tests.cpp -+++ b/tests/Timeline_Tests.cpp -@@ -119,8 +119,8 @@ TEST(Timeline_Check_Two_Track_Video) - int pixel_index = 230 * 4; // pixel 230 (4 bytes per pixel) - - // Check image properties -- CHECK_EQUAL(21, (int)f->GetPixels(pixel_row)[pixel_index]); -- CHECK_EQUAL(191, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -+ CHECK_CLOSE(21, (int)f->GetPixels(pixel_row)[pixel_index], 2); -+ CHECK_CLOSE(191, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - -@@ -128,17 +128,17 @@ TEST(Timeline_Check_Two_Track_Video) - f = t.GetFrame(2); - - // Check image properties -- CHECK_EQUAL(176, (int)f->GetPixels(pixel_row)[pixel_index]); -+ CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); -+ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - - // Get frame - f = t.GetFrame(3); - - // Check image properties -- CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]); -- CHECK_EQUAL(190, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -+ CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1); -+ CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - -@@ -146,8 +146,8 @@ TEST(Timeline_Check_Two_Track_Video) - f = t.GetFrame(24); - - // Check image properties -- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index]); -- CHECK_EQUAL(106, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -+ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index], 1); -+ CHECK_CLOSE(106, (int)f->GetPixels(pixel_row)[pixel_index + 1], 1); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - -@@ -155,8 +155,8 @@ TEST(Timeline_Check_Two_Track_Video) - f = t.GetFrame(5); - - // Check image properties -- CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]); -- CHECK_EQUAL(190, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -+ CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1); -+ CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - -@@ -165,17 +165,17 @@ TEST(Timeline_Check_Two_Track_Video) - - // Check image properties - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index]); -- CHECK_EQUAL(94, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); -+ CHECK_CLOSE(94, (int)f->GetPixels(pixel_row)[pixel_index + 1], 1); -+ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - - // Get frame - f = t.GetFrame(4); - - // Check image properties -- CHECK_EQUAL(176, (int)f->GetPixels(pixel_row)[pixel_index]); -+ CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1); - CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]); -- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); -+ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); - CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); - - // Close reader --- -2.21.0 - diff --git a/gnu/packages/patches/libopenshot-tests-with-system-libs.patch b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch deleted file mode 100644 index a18c4b8bba..0000000000 --- a/gnu/packages/patches/libopenshot-tests-with-system-libs.patch +++ /dev/null @@ -1,95 +0,0 @@ -Combination of two patches that fix libopenshot tests when built with -system-provided ffmpeg and jsoncpp. See - - https://github.com/OpenShot/libopenshot/pull/163 - -From 0d7691ab53433e1583f6a66ea96683b0f7af8a57 Mon Sep 17 00:00:00 2001 -From: "FeRD (Frank Dana)" <ferdnyc@gmail.com> -Date: Mon, 17 Sep 2018 14:04:40 -0400 -Subject: [PATCH] tests/CMakeFiles: Use FFMpeg like src/ - ---- - tests/CMakeLists.txt | 32 +++++++++++++++++++++++++++++++- - 1 file changed, 31 insertions(+), 1 deletion(-) - -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 2c45550..4df8464 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -79,7 +79,37 @@ ENDIF (ImageMagick_FOUND) - FIND_PACKAGE(FFmpeg REQUIRED) - - # Include FFmpeg headers (needed for compile) --include_directories(${FFMPEG_INCLUDE_DIR}) -+message('AVCODEC_FOUND: ${AVCODEC_FOUND}') -+message('AVCODEC_INCLUDE_DIRS: ${AVCODEC_INCLUDE_DIRS}') -+message('AVCODEC_LIBRARIES: ${AVCODEC_LIBRARIES}') -+ -+IF (AVCODEC_FOUND) -+ include_directories(${AVCODEC_INCLUDE_DIRS}) -+ENDIF (AVCODEC_FOUND) -+IF (AVDEVICE_FOUND) -+ include_directories(${AVDEVICE_INCLUDE_DIRS}) -+ENDIF (AVDEVICE_FOUND) -+IF (AVFORMAT_FOUND) -+ include_directories(${AVFORMAT_INCLUDE_DIRS}) -+ENDIF (AVFORMAT_FOUND) -+IF (AVFILTER_FOUND) -+ include_directories(${AVFILTER_INCLUDE_DIRS}) -+ENDIF (AVFILTER_FOUND) -+IF (AVUTIL_FOUND) -+ include_directories(${AVUTIL_INCLUDE_DIRS}) -+ENDIF (AVUTIL_FOUND) -+IF (POSTPROC_FOUND) -+ include_directories(${POSTPROC_INCLUDE_DIRS}) -+ENDIF (POSTPROC_FOUND) -+IF (SWSCALE_FOUND) -+ include_directories(${SWSCALE_INCLUDE_DIRS}) -+ENDIF (SWSCALE_FOUND) -+IF (SWRESAMPLE_FOUND) -+ include_directories(${SWRESAMPLE_INCLUDE_DIRS}) -+ENDIF (SWRESAMPLE_FOUND) -+IF (AVRESAMPLE_FOUND) -+ include_directories(${AVRESAMPLE_INCLUDE_DIRS}) -+ENDIF (AVRESAMPLE_FOUND) - - ################# LIBOPENSHOT-AUDIO ################### - # Find JUCE-based openshot Audio libraries - - -From e9e85cdfd036587adb86341f7f81619dc69f102c Mon Sep 17 00:00:00 2001 -From: "FeRD (Frank Dana)" <ferdnyc@gmail.com> -Date: Mon, 17 Sep 2018 19:23:25 -0400 -Subject: [PATCH] Use system jsoncpp in tests, too - -The tests/ build needs to use the same jsoncpp as the src/ build, -or tests in Clip_Tests.cpp can fail. ---- - tests/CMakeLists.txt | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index 4df8464..a1a0356 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -180,12 +180,18 @@ endif(OPENMP_FOUND) - # Find ZeroMQ library (used for socket communication & logging) - FIND_PACKAGE(ZMQ REQUIRED) - --# Include FFmpeg headers (needed for compile) -+# Include ZeroMQ headers (needed for compile) - include_directories(${ZMQ_INCLUDE_DIRS}) - - ################### JSONCPP ##################### - # Include jsoncpp headers (needed for JSON parsing) --include_directories("../thirdparty/jsoncpp/include") -+if (USE_SYSTEM_JSONCPP) -+ find_package(JsonCpp REQUIRED) -+ include_directories(${JSONCPP_INCLUDE_DIRS}) -+else() -+ message("Using embedded JsonCpp") -+ include_directories("../thirdparty/jsoncpp/include") -+endif(USE_SYSTEM_JSONCPP) - - IF (NOT DISABLE_TESTS) - ############### SET TEST SOURCE FILES ################# diff --git a/gnu/packages/patches/linkchecker-mark-more-tests-that-require-the-network.patch b/gnu/packages/patches/linkchecker-tests-require-network.patch index f3e488cec2..f3e488cec2 100644 --- a/gnu/packages/patches/linkchecker-mark-more-tests-that-require-the-network.patch +++ b/gnu/packages/patches/linkchecker-tests-require-network.patch diff --git a/gnu/packages/patches/localed-xorg-keyboard.patch b/gnu/packages/patches/localed-xorg-keyboard.patch new file mode 100644 index 0000000000..9a9071ba0a --- /dev/null +++ b/gnu/packages/patches/localed-xorg-keyboard.patch @@ -0,0 +1,322 @@ +Normally localed would do an approximate parsing of the Xorg config file +to determine the XKB keyboard layout. This doesn't make sense on Guix +where there's no such file in /etc, and where the keyboard layout is +known statically at configuration time. + +This patch removes the XOrg configuration parsing and expects to read the +configuration from environment variables instead. It also removes the +stateful bits that would write configuration to /etc/vconsole.conf +and /etc/X11, which are unused in Guix anyway. + +Patch by Ludovic Courtès <ludo@gnu.org>. + +diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c +index 6b6b32a591..46aab472b0 100644 +--- a/src/locale/keymap-util.c ++++ b/src/locale/keymap-util.c +@@ -174,32 +174,16 @@ int vconsole_read_data(Context *c, sd_bus_message *m) { + c->vc_cache = sd_bus_message_ref(m); + } + +- if (stat("/etc/vconsole.conf", &st) < 0) { +- if (errno != ENOENT) +- return -errno; +- +- c->vc_mtime = USEC_INFINITY; +- context_free_vconsole(c); +- return 0; +- } +- +- /* If mtime is not changed, then we do not need to re-read */ +- t = timespec_load(&st.st_mtim); +- if (c->vc_mtime != USEC_INFINITY && t == c->vc_mtime) +- return 0; +- +- c->vc_mtime = t; ++ c->vc_mtime = USEC_INFINITY; + context_free_vconsole(c); +- +- r = parse_env_file(NULL, "/etc/vconsole.conf", +- "KEYMAP", &c->vc_keymap, +- "KEYMAP_TOGGLE", &c->vc_keymap_toggle); +- if (r < 0) +- return r; +- + return 0; + } + ++static char *getenv_strdup(const char *variable) { ++ const char *value = getenv(variable); ++ return value == NULL ? NULL : strdup(value); ++} ++ + int x11_read_data(Context *c, sd_bus_message *m) { + _cleanup_fclose_ FILE *f = NULL; + bool in_section = false; +@@ -216,258 +200,27 @@ int x11_read_data(Context *c, sd_bus_message *m) { + c->x11_cache = sd_bus_message_ref(m); + } + +- if (stat("/etc/X11/xorg.conf.d/00-keyboard.conf", &st) < 0) { +- if (errno != ENOENT) +- return -errno; +- +- c->x11_mtime = USEC_INFINITY; +- context_free_x11(c); +- return 0; +- } +- +- /* If mtime is not changed, then we do not need to re-read */ +- t = timespec_load(&st.st_mtim); +- if (c->x11_mtime != USEC_INFINITY && t == c->x11_mtime) +- return 0; +- +- c->x11_mtime = t; ++ c->x11_mtime = 0; + context_free_x11(c); + +- f = fopen("/etc/X11/xorg.conf.d/00-keyboard.conf", "re"); +- if (!f) +- return -errno; +- +- for (;;) { +- _cleanup_free_ char *line = NULL; +- char *l; +- +- r = read_line(f, LONG_LINE_MAX, &line); +- if (r < 0) +- return r; +- if (r == 0) +- break; +- +- l = strstrip(line); +- if (IN_SET(l[0], 0, '#')) +- continue; +- +- if (in_section && first_word(l, "Option")) { +- _cleanup_strv_free_ char **a = NULL; +- +- r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES); +- if (r < 0) +- return r; +- +- if (strv_length(a) == 3) { +- char **p = NULL; +- +- if (streq(a[1], "XkbLayout")) +- p = &c->x11_layout; +- else if (streq(a[1], "XkbModel")) +- p = &c->x11_model; +- else if (streq(a[1], "XkbVariant")) +- p = &c->x11_variant; +- else if (streq(a[1], "XkbOptions")) +- p = &c->x11_options; +- +- if (p) { +- free_and_replace(*p, a[2]); +- } +- } +- +- } else if (!in_section && first_word(l, "Section")) { +- _cleanup_strv_free_ char **a = NULL; +- +- r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES); +- if (r < 0) +- return -ENOMEM; +- +- if (strv_length(a) == 2 && streq(a[1], "InputClass")) +- in_section = true; +- +- } else if (in_section && first_word(l, "EndSection")) +- in_section = false; +- } ++ c->x11_layout = getenv_strdup("GUIX_XKB_LAYOUT"); ++ c->x11_model = getenv_strdup("GUIX_XKB_MODEL"); ++ c->x11_variant = getenv_strdup("GUIX_XKB_VARIANT"); ++ c->x11_options = getenv_strdup("GUIX_XKB_OPTIONS"); + + return 0; + } + + int locale_write_data(Context *c, char ***settings) { +- _cleanup_strv_free_ char **l = NULL; +- struct stat st; +- int r, p; +- +- /* Set values will be returned as strv in *settings on success. */ +- +- for (p = 0; p < _VARIABLE_LC_MAX; p++) { +- _cleanup_free_ char *t = NULL; +- char **u; +- const char *name; +- +- name = locale_variable_to_string(p); +- assert(name); +- +- if (isempty(c->locale[p])) +- continue; +- +- if (asprintf(&t, "%s=%s", name, c->locale[p]) < 0) +- return -ENOMEM; +- +- u = strv_env_set(l, t); +- if (!u) +- return -ENOMEM; +- +- strv_free_and_replace(l, u); +- } +- +- if (strv_isempty(l)) { +- if (unlink("/etc/locale.conf") < 0) +- return errno == ENOENT ? 0 : -errno; +- +- c->locale_mtime = USEC_INFINITY; +- return 0; +- } +- +- r = write_env_file_label("/etc/locale.conf", l); +- if (r < 0) +- return r; +- +- *settings = TAKE_PTR(l); +- +- if (stat("/etc/locale.conf", &st) >= 0) +- c->locale_mtime = timespec_load(&st.st_mtim); +- +- return 0; ++ return -ENOSYS; + } + + int vconsole_write_data(Context *c) { +- _cleanup_strv_free_ char **l = NULL; +- struct stat st; +- int r; +- +- r = load_env_file(NULL, "/etc/vconsole.conf", &l); +- if (r < 0 && r != -ENOENT) +- return r; +- +- if (isempty(c->vc_keymap)) +- l = strv_env_unset(l, "KEYMAP"); +- else { +- _cleanup_free_ char *s = NULL; +- char **u; +- +- s = strappend("KEYMAP=", c->vc_keymap); +- if (!s) +- return -ENOMEM; +- +- u = strv_env_set(l, s); +- if (!u) +- return -ENOMEM; +- +- strv_free_and_replace(l, u); +- } +- +- if (isempty(c->vc_keymap_toggle)) +- l = strv_env_unset(l, "KEYMAP_TOGGLE"); +- else { +- _cleanup_free_ char *s = NULL; +- char **u; +- +- s = strappend("KEYMAP_TOGGLE=", c->vc_keymap_toggle); +- if (!s) +- return -ENOMEM; +- +- u = strv_env_set(l, s); +- if (!u) +- return -ENOMEM; +- +- strv_free_and_replace(l, u); +- } +- +- if (strv_isempty(l)) { +- if (unlink("/etc/vconsole.conf") < 0) +- return errno == ENOENT ? 0 : -errno; +- +- c->vc_mtime = USEC_INFINITY; +- return 0; +- } +- +- r = write_env_file_label("/etc/vconsole.conf", l); +- if (r < 0) +- return r; +- +- if (stat("/etc/vconsole.conf", &st) >= 0) +- c->vc_mtime = timespec_load(&st.st_mtim); +- +- return 0; ++ return -ENOSYS; + } + + int x11_write_data(Context *c) { +- _cleanup_fclose_ FILE *f = NULL; +- _cleanup_free_ char *temp_path = NULL; +- struct stat st; +- int r; +- +- if (isempty(c->x11_layout) && +- isempty(c->x11_model) && +- isempty(c->x11_variant) && +- isempty(c->x11_options)) { +- +- if (unlink("/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) +- return errno == ENOENT ? 0 : -errno; +- +- c->vc_mtime = USEC_INFINITY; +- return 0; +- } +- +- mkdir_p_label("/etc/X11/xorg.conf.d", 0755); +- +- r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path); +- if (r < 0) +- return r; +- +- (void) __fsetlocking(f, FSETLOCKING_BYCALLER); +- (void) fchmod(fileno(f), 0644); +- +- fputs("# Written by systemd-localed(8), read by systemd-localed and Xorg. It's\n" +- "# probably wise not to edit this file manually. Use localectl(1) to\n" +- "# instruct systemd-localed to update it.\n" +- "Section \"InputClass\"\n" +- " Identifier \"system-keyboard\"\n" +- " MatchIsKeyboard \"on\"\n", f); +- +- if (!isempty(c->x11_layout)) +- fprintf(f, " Option \"XkbLayout\" \"%s\"\n", c->x11_layout); +- +- if (!isempty(c->x11_model)) +- fprintf(f, " Option \"XkbModel\" \"%s\"\n", c->x11_model); +- +- if (!isempty(c->x11_variant)) +- fprintf(f, " Option \"XkbVariant\" \"%s\"\n", c->x11_variant); +- +- if (!isempty(c->x11_options)) +- fprintf(f, " Option \"XkbOptions\" \"%s\"\n", c->x11_options); +- +- fputs("EndSection\n", f); +- +- r = fflush_sync_and_check(f); +- if (r < 0) +- goto fail; +- +- if (rename(temp_path, "/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) { +- r = -errno; +- goto fail; +- } +- +- if (stat("/etc/X11/xorg.conf.d/00-keyboard.conf", &st) >= 0) +- c->x11_mtime = timespec_load(&st.st_mtim); +- +- return 0; +- +-fail: +- if (temp_path) +- (void) unlink(temp_path); +- +- return r; ++ return -ENOSYS; + } + + static int read_next_mapping(const char* filename, diff --git a/gnu/packages/patches/mtools-mformat-uninitialized.patch b/gnu/packages/patches/mtools-mformat-uninitialized.patch new file mode 100644 index 0000000000..ae69d45c99 --- /dev/null +++ b/gnu/packages/patches/mtools-mformat-uninitialized.patch @@ -0,0 +1,20 @@ +Fix a bug whereby 'mformat' could end up passing uninitialized bytes +to write(2). This could be reproduced with: + + mformat -C -f 1440 -L 16 -N 77777777 -i /tmp/x :: + +where the output of /tmp/x would be non-deterministic. + +Patch by Ludovic Courtès <ludo@gnu.org>. + +--- mtools-4.0.23/mformat.c 2019-04-21 00:12:01.496116195 +0200 ++++ mtools-4.0.23/mformat.c 2019-04-21 00:12:36.675967157 +0200 +@@ -927,6 +927,7 @@ void mformat(int argc, char **argv, int + + char *endptr; + ++ memset(&boot.bytes, '\0', sizeof boot); + hs = hs_set = 0; + argtracks = 0; + argheads = 0; + diff --git a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch new file mode 100644 index 0000000000..a7794aed47 --- /dev/null +++ b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch @@ -0,0 +1,72 @@ +Fix CVE-2019-9755: + +https://security-tracker.debian.org/tracker/CVE-2019-9755 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9755 + +Patch copied from upstream source repository: + +https://sourceforge.net/p/ntfs-3g/ntfs-3g/ci/85c1634a26faa572d3c558d4cf8aaaca5202d4e9/ + +From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr> +Date: Wed, 19 Dec 2018 15:57:50 +0100 +Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint + +The size check was inefficient because getcwd() uses an unsigned int +argument. +--- + src/lowntfs-3g.c | 6 +++++- + src/ntfs-3g.c | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c +index 993867fa..0660439b 100644 +--- a/src/lowntfs-3g.c ++++ b/src/lowntfs-3g.c +@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[]) + else { + ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX); + if (ctx->abs_mnt_point) { +- if (getcwd(ctx->abs_mnt_point, ++ if ((strlen(opts.mnt_point) < PATH_MAX) ++ && getcwd(ctx->abs_mnt_point, + PATH_MAX - strlen(opts.mnt_point) - 1)) { + strcat(ctx->abs_mnt_point, "/"); + strcat(ctx->abs_mnt_point, opts.mnt_point); +@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[]) + /* Solaris also wants the absolute mount point */ + opts.mnt_point = ctx->abs_mnt_point; + #endif /* defined(__sun) && defined (__SVR4) */ ++ } else { ++ free(ctx->abs_mnt_point); ++ ctx->abs_mnt_point = (char*)NULL; + } + } + } +diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c +index 6ce89fef..4e0912ae 100644 +--- a/src/ntfs-3g.c ++++ b/src/ntfs-3g.c +@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[]) + else { + ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX); + if (ctx->abs_mnt_point) { +- if (getcwd(ctx->abs_mnt_point, ++ if ((strlen(opts.mnt_point) < PATH_MAX) ++ && getcwd(ctx->abs_mnt_point, + PATH_MAX - strlen(opts.mnt_point) - 1)) { + strcat(ctx->abs_mnt_point, "/"); + strcat(ctx->abs_mnt_point, opts.mnt_point); +@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[]) + /* Solaris also wants the absolute mount point */ + opts.mnt_point = ctx->abs_mnt_point; + #endif /* defined(__sun) && defined (__SVR4) */ ++ } else { ++ free(ctx->abs_mnt_point); ++ ctx->abs_mnt_point = (char*)NULL; + } + } + } +-- +2.21.0 + diff --git a/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch b/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch new file mode 100644 index 0000000000..2c344af821 --- /dev/null +++ b/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch @@ -0,0 +1,52 @@ +From aeca7656f499d7f4595319858f242276920e31bb Mon Sep 17 00:00:00 2001 +From: Louis Gesbert <louis.gesbert@ocamlpro.com> +Date: Sat, 2 Dec 2017 12:51:01 +0100 +Subject: [PATCH] Fix for ocaml 4.06 + +--- + common/criteria_lexer.mll | 8 ++++---- + common/util.ml | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/common/criteria_lexer.mll b/common/criteria_lexer.mll +index 71f9178..fc4eae3 100644 +--- a/common/criteria_lexer.mll ++++ b/common/criteria_lexer.mll +@@ -18,7 +18,7 @@ + let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *) + (* find the terminating delimiter *) + let endpos = +- try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with ++ try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with + |Invalid_argument _ -> + raise (Format822.Syntax_error ( + Format822.error lexbuf "String too short")) +@@ -27,9 +27,9 @@ + Format822.error lexbuf (Printf.sprintf "cannot find: %c" c))) + in + let len = endpos - (lexbuf.lex_start_pos + 3) in +- let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in +- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4); +- s ++ let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in ++ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4); ++ Bytes.to_string s + + } + +diff --git a/common/util.ml b/common/util.ml +index 598f266..36ca3d1 100644 +--- a/common/util.ml ++++ b/common/util.ml +@@ -87,7 +87,7 @@ module MakeMessages(X : sig val label : string end) = struct + let clean label = + try + let s = Filename.chop_extension (Filename.basename label) in +- String.capitalize s ++ String.capitalize_ascii s + with Invalid_argument _ -> label + + let create ?(enabled=false) label = +-- +2.11.0 + diff --git a/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch b/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch new file mode 100644 index 0000000000..41494e7b3c --- /dev/null +++ b/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch @@ -0,0 +1,133 @@ +From b5314c20d8e3caf62fe0dc96ad937a2950158b23 Mon Sep 17 00:00:00 2001 +From: Louis Gesbert <louis.gesbert@ocamlpro.com> +Date: Thu, 2 Mar 2017 12:19:56 +0100 +Subject: [PATCH] Install mli, cmx, etc. + +--- + Makefile | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/Makefile b/Makefile +index 09464ff..5044d7f 100644 +--- a/Makefile ++++ b/Makefile +@@ -56,7 +56,7 @@ $(DOSELIBS)/cudf.%: + @for i in _build/cudf/cudf.*; do \ + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -67,7 +67,7 @@ $(DOSELIBS)/common.%: common/*.ml common/*.mli + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -78,7 +78,7 @@ $(DOSELIBS)/versioning.%: versioning/*.ml versioning/*.mli + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -88,7 +88,7 @@ $(DOSELIBS)/algo.%: algo/*.ml algo/*.mli $(DOSELIBS)/common.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -98,7 +98,7 @@ $(DOSELIBS)/debian.%: deb/*.ml deb/*.mli $(DOSELIBS)/pef.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -108,7 +108,7 @@ $(DOSELIBS)/opam.%: opam/*.ml opam/*.mli $(DOSELIBS)/pef.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -118,7 +118,7 @@ $(DOSELIBS)/npm.%: npm/*.ml npm/*.mli $(DOSELIBS)/versioning.% $(DOSELIBS)/pef.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -128,7 +128,7 @@ $(DOSELIBS)/rpm.%: rpm/*.ml $(DOSELIBS)/algo.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -138,7 +138,7 @@ $(DOSELIBS)/pef.%: pef/*.ml pef/*.mli + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -148,7 +148,7 @@ $(DOSELIBS)/csw.%: opencsw/*.ml $(DOSELIBS)/versioning.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ ++ rm -f $(DOSELIBS)/*.mlpack ; \ + fi ; \ + done + +@@ -158,7 +158,7 @@ $(DOSELIBS)/doseparse.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ; \ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx $(DOSELIBS)/*.ml ; \ ++ rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.ml ; \ + fi ; \ + done + +@@ -168,7 +168,7 @@ $(DOSELIBS)/doseparseNoRpm.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.% + if [ -e $$i ]; then \ + cp $$i $(DOSELIBS) ;\ + rm $$i ;\ +- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ;\ ++ rm -f $(DOSELIBS)/*.mlpack ;\ + fi ; \ + done + +@@ -223,7 +223,7 @@ INSTALL_STUFF_ = META + INSTALL_STUFF_ += $(wildcard _build/doselibs/*.cma _build/doselibs/*.cmi) + INSTALL_STUFF_ += $(wildcard _build/doselibs/*.cmxa _build/doselibs/*.cmxs) + INSTALL_STUFF_ += $(wildcard _build/doselibs/*.a) +-#INSTALL_STUFF_ += $(wildcard _build/*/*.mli) ++INSTALL_STUFF_ += $(wildcard _build/doselibs/*.mli) $(wildcard _build/doselibs/*.cmti) $(wildcard _build/doselibs/*.cmx) + INSTALL_STUFF_ += $(wildcard _build/rpm/*.so) + + exclude_cudf = $(wildcard _build/doselibs/*cudf* _build/cudf/*) +-- +2.11.0 + diff --git a/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch b/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch new file mode 100644 index 0000000000..d2cc44c784 --- /dev/null +++ b/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch @@ -0,0 +1,25 @@ +From b94cf24739818e5aff397e0a83b19ea32dc81f42 Mon Sep 17 00:00:00 2001 +From: Louis Gesbert <louis.gesbert@ocamlpro.com> +Date: Tue, 6 Feb 2018 10:15:45 +0100 +Subject: [PATCH 3/3] Add "unix" as dependency to dose3.common in META.in + +--- + META.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/META.in b/META.in +index aa2cd8d..0f9d337 100644 +--- a/META.in ++++ b/META.in +@@ -8,7 +8,7 @@ package "common" ( + version = "@PACKAGE_VERSION@" + archive(byte) = "common.cma" + archive(native) = "common.cmxa" +-requires = "extlib, re.pcre, cudf, @ZIP@, @BZ2@" ++requires = "extlib, re.pcre, cudf, unix, @ZIP@, @BZ2@" + ) + + package "algo" ( +-- +2.11.0 + diff --git a/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch b/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch new file mode 100644 index 0000000000..84b6a3b81b --- /dev/null +++ b/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch @@ -0,0 +1,9 @@ +--- a/configure ++++ b/configure +@@ -6552,6 +6552,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi +- +- +-make printconf diff --git a/gnu/packages/patches/openssh-CVE-2018-20685.patch b/gnu/packages/patches/openssh-CVE-2018-20685.patch deleted file mode 100644 index 463c08a9d4..0000000000 --- a/gnu/packages/patches/openssh-CVE-2018-20685.patch +++ /dev/null @@ -1,44 +0,0 @@ -Fix CVE-2018-20685: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20685 - -Patch copied from upstream source repository: - -https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2 - -From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001 -From: "djm@openbsd.org" <djm@openbsd.org> -Date: Fri, 16 Nov 2018 03:03:10 +0000 -Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer - to the - -current directory; based on report/patch from Harry Sintonen - -OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9 ---- - scp.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/scp.c b/scp.c -index 60682c68..4f3fdcd3 100644 ---- a/scp.c -+++ b/scp.c -#@@ -1,4 +1,4 @@ -#-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */ -#+/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */ -# /* -# * scp - secure remote copy. This is basically patched BSD rcp which -# * uses ssh to do the data transfer (instead of using rcmd). -@@ -1106,7 +1106,8 @@ sink(int argc, char **argv) - SCREWUP("size out of range"); - size = (off_t)ull; - -- if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { -+ if (*cp == '\0' || strchr(cp, '/') != NULL || -+ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { - run_err("error: unexpected filename: %s", cp); - exit(1); - } --- -2.20.1 - diff --git a/gnu/packages/patches/python-pyfakefs-remove-bad-test.patch b/gnu/packages/patches/python-pyfakefs-remove-bad-test.patch new file mode 100644 index 0000000000..a9488bbe43 --- /dev/null +++ b/gnu/packages/patches/python-pyfakefs-remove-bad-test.patch @@ -0,0 +1,23 @@ +This test incorrectly assumes that the root user is always available. +However, in the build environment, the root user is not available. +Note that because the original file distributed in the release on PyPi +has lines ending in CRLF, those are retained in the diff below. + +--- a/pyfakefs/tests/fake_filesystem_test.py 1969-12-31 16:00:00.000000000 -0800 ++++ b/pyfakefs/tests/fake_filesystem_test.py 1969-12-31 16:00:00.000000000 -0800 +@@ -1021,15 +1021,6 @@ + self.assertEqual(self.path.expanduser('~'),
+ self.os.environ['HOME'].replace('/', '!'))
+
+- @unittest.skipIf(TestCase.is_windows or TestCase.is_cygwin,
+- 'only tested on unix systems')
+- def test_expand_root(self):
+- if sys.platform == 'darwin':
+- roothome = '!var!root'
+- else:
+- roothome = '!root'
+- self.assertEqual(self.path.expanduser('~root'), roothome)
+-
+ def test_getsize_path_nonexistent(self):
+ file_path = 'foo!bar!baz'
+ self.assertRaises(os.error, self.path.getsize, file_path)
diff --git a/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch new file mode 100644 index 0000000000..ccd87911d8 --- /dev/null +++ b/gnu/packages/patches/python-robotframework-honor-source-date-epoch.patch @@ -0,0 +1,62 @@ +From 3cc41c05fad5601c0dd1832f64a6e9efca017727 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer <maxim.cournoyer@gmail.com> +Date: Mon, 1 Apr 2019 11:36:04 -0400 +Subject: [PATCH] robottime: Honor the SOURCE_DATE_EPOCH environment variable. + +Honoring the SOURCE_DATE_EPOCH environment variable allows building +the documentation using libdoc reproducibly, by setting the generated +timestamp to a fixed value. + +For more background on reproducible builds and the SOURCE_DATE_EPOCH +environment variable, see: +https://reproducible-builds.org/specs/source-date-epoch/. + +* src/robot/utils/robottime.py: import `os'. +(TimestampCache._get_epoch): Retrieve date from SOURCE_DATE_EPOCH if +it is defined, otherwise from time.time(). +* utest/output/test_logger.py (TestLogger.test_write_to_one_logger): +Check for the existance of a timestamp attribute instead of checking +for its content as the later is easy to break when using the +SOURCE_DATE_EPOCH environment variable. +--- + src/robot/utils/robottime.py | 3 +++ + utest/output/test_logger.py | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py +index 06432a4a6..91526f826 100644 +--- a/src/robot/utils/robottime.py ++++ b/src/robot/utils/robottime.py +@@ -14,6 +14,7 @@ + # limitations under the License. + + import datetime ++import os + import time + import re + +@@ -395,6 +396,8 @@ class TimestampCache(object): + + # Seam for mocking + def _get_epoch(self): ++ if os.getenv('SOURCE_DATE_EPOCH'): ++ return float(os.getenv('SOURCE_DATE_EPOCH')) + return time.time() + + def _use_cache(self, secs, *separators): +diff --git a/utest/output/test_logger.py b/utest/output/test_logger.py +index 92fe6d77d..e980227aa 100644 +--- a/utest/output/test_logger.py ++++ b/utest/output/test_logger.py +@@ -46,7 +46,7 @@ class TestLogger(unittest.TestCase): + logger = LoggerMock(('Hello, world!', 'INFO')) + self.logger.register_logger(logger) + self.logger.write('Hello, world!', 'INFO') +- assert_true(logger.msg.timestamp.startswith('20')) ++ assert_true(hasattr(logger.msg, 'timestamp')) + + def test_write_to_one_logger_with_trace_level(self): + logger = LoggerMock(('expected message', 'TRACE')) +-- +2.20.1 + diff --git a/gnu/packages/patches/quilt-getopt-nondigit-param.patch b/gnu/packages/patches/quilt-getopt-nondigit-param.patch deleted file mode 100644 index 6bbec67e75..0000000000 --- a/gnu/packages/patches/quilt-getopt-nondigit-param.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Jean Delvare <jdelvare@suse.de> -Subject: compat/getopt: Allow non-digit parameter embedded in short option - -The compatibility getopt script allows only digit parameters to be -embedded in short options. Util-linux's getopt implementation does -not have such a restriction and allows any parameter to be embedded -in short options. As a consequence, using the compatibility getopt -script would choke for example on "-pab", which is a legal option -of the "quilt refresh" command. - -Remove the limitation on digits so that the compatibility getopt -script allows what util-linux allows. This fixes the second half -of bug #54772: -https://savannah.nongnu.org/bugs/index.php?54772 - -As a side note, this feature of the compatibility script was broken -anyway, as it would output the digits in reverse order. - -Signed-off-by: Jean Delvare <jdelvare@suse.de> ---- - compat/getopt.in | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - ---- quilt.orig/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 -+++ quilt/compat/getopt.in 2018-10-03 16:12:17.624841732 +0200 -@@ -108,15 +108,10 @@ foreach my $word (@words) { - if (scalar(@letters) == 0) { - $need_param = $letter; - } else { -- # short options can have numerical args -- # embedded in the short option list: -UO -- die "unexpected character after option $letter" -- if ($letters[$#letters] !~ /[0-9]/); -- my @digits; -- while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) { -- push @digits, pop @letters; -- } -- push @options, quote_word(join('', reverse @digits)); -+ # short options can have args -+ # embedded in the short option list -+ push @options, quote_word(join('', reverse @letters)); -+ @letters = (); - } - } - } diff --git a/gnu/packages/patches/quilt-getopt-second-separator.patch b/gnu/packages/patches/quilt-getopt-second-separator.patch deleted file mode 100644 index cde2c8d41c..0000000000 --- a/gnu/packages/patches/quilt-getopt-second-separator.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Jean Delvare <jdelvare@suse.de> -Subject: compat/getopt: Handle a second separator - -getopt can be passed 2 '--' separators. The first one tells that -getopt options are over and target program options start. The second -one tells that the target program's options are over and following -arguments should be treated as non-options even if they look like -options. - -This second separator was not handled, causing the compatibility -getopt script to treat the following arguments as options, eventually -failing one way or another. - -Properly detect and handle the second separator. This fixes the first -half of bug #54772: -https://savannah.nongnu.org/bugs/index.php?54772 - -Signed-off-by: Jean Delvare <jdelvare@suse.de> ---- - compat/getopt.in | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - ---- quilt.orig/compat/getopt.in 2018-10-03 15:23:21.147620172 +0200 -+++ quilt/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 -@@ -8,12 +8,12 @@ - - use strict; - --my $opts; -+my $opts = ''; - my @words; - my $found_sep = 0; - - foreach my $arg (@ARGV) { -- if ($arg eq '--') { -+ if (!$found_sep && $arg eq '--') { - $found_sep = 1; - } - else { -@@ -62,10 +62,17 @@ sub quote_word - return "'$word'"; - } - -+# there can be a second separator, to inhibit processing following arguments -+# as options -+$found_sep = 0; - foreach my $word (@words) { -+ if ($word eq '--') { -+ $found_sep = 1; -+ next; -+ } - - # allow '-' to be an option value -- if (!$need_param && $word !~ /^-./) { -+ if ($found_sep || (!$need_param && $word !~ /^-./)) { - push @barewords, quote_word($word); - next; - } diff --git a/gnu/packages/patches/quilt-test-fix-regex.patch b/gnu/packages/patches/quilt-test-fix-regex.patch deleted file mode 100644 index 2e249ac55b..0000000000 --- a/gnu/packages/patches/quilt-test-fix-regex.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5193b137b5a9034ce79946edd40760df2f63a82a Mon Sep 17 00:00:00 2001 -From: Jean Delvare <jdelvare@suse.de> -Date: Tue, 25 Apr 2017 15:17:53 +0200 -Subject: test: Escape curly braces in regex - -Curly braces in perl regex are supposed to be escaped, recent -versions of perl complain when they aren't: - -Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114. -Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290. - -Signed-off-by: Jean Delvare <jdelvare@suse.de> ---- - test/run | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/run b/test/run -index 942014e..03afc7a 100755 ---- a/test/run -+++ b/test/run -@@ -112,7 +112,7 @@ sub flush_output() - sub substitute_vars($) - { - my ($line) = @_; -- $line =~ s[%{(\w+)}][defined $ENV{$1} ? $ENV{$1} : ""]eg; -+ $line =~ s[%\{(\w+)\}][defined $ENV{$1} ? $ENV{$1} : ""]eg; - return $line; - } - -@@ -288,7 +288,7 @@ while (defined(my $line = <SOURCE>)) { - # Parse the next command - if ($line =~ s/^\s*\$ ?//) { - # Substitute %{?} with the last command's status -- $line =~ s[%{\?}][$last_status]eg; -+ $line =~ s[%\{\?\}][$last_status]eg; - - chomp($prog = substitute_vars($line)); - $prog_line = $lineno; --- -cgit v1.0-41-gc330 - diff --git a/gnu/packages/patches/reptyr-fix-gcc-7.patch b/gnu/packages/patches/reptyr-fix-gcc-7.patch deleted file mode 100644 index 5e0e581218..0000000000 --- a/gnu/packages/patches/reptyr-fix-gcc-7.patch +++ /dev/null @@ -1,38 +0,0 @@ -This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches -fa0d63f and b45fd92. - -https://github.com/nelhage/reptyr/commit/fa0d63ff8c488be15976e5353580b565e85586a1 -https://github.com/nelhage/reptyr/commit/b45fd9238958fcf2d8f3d6fc23e6d491febea2ac - -Patch by Nelson Elhage <nelhage@nelhage.com>. - -diff --git a/attach.c b/attach.c -index bd8ef8c..8d9cbf8 100644 ---- a/attach.c -+++ b/attach.c -@@ -389,8 +389,11 @@ int setup_steal_socket(struct steal_pty_state *steal) { - return errno; - - steal->addr_un.sun_family = AF_UNIX; -- snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), -- "%s/reptyr.sock", steal->tmpdir); -+ if (snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), -+ "%s/reptyr.sock", steal->tmpdir) >= sizeof(steal->addr_un.sun_path)) { -+ error("tmpdir path too long!"); -+ return ENAMETOOLONG; -+ } - - if ((steal->sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) - return errno; -diff --git a/platform/linux/linux.h b/platform/linux/linux.h -index 9e6b78a..3ec5a99 100644 ---- a/platform/linux/linux.h -+++ b/platform/linux/linux.h -@@ -40,6 +40,7 @@ - #include <sys/ptrace.h> - #include <asm/ptrace.h> - #include <sys/types.h> -+#include <sys/sysmacros.h> - #include <sys/user.h> - #include <unistd.h> - #include <stdlib.h> diff --git a/gnu/packages/patches/soundtouch-CVE-2018-1000223.patch b/gnu/packages/patches/soundtouch-CVE-2018-1000223.patch deleted file mode 100644 index 961a183565..0000000000 --- a/gnu/packages/patches/soundtouch-CVE-2018-1000223.patch +++ /dev/null @@ -1,143 +0,0 @@ -Fix CVE-2018-1000223: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000223 -https://gitlab.com/soundtouch/soundtouch/issues/6 - -Patches copied from upstream source repository: - -https://gitlab.com/soundtouch/soundtouch/commit/9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e -https://gitlab.com/soundtouch/soundtouch/commit/e0240689056e4182fffdc2a16aa6e3425a15e275 -https://gitlab.com/soundtouch/soundtouch/commit/46531e5b92dd80dd9a7947463d6224fc7cb21967 - -From 9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e Mon Sep 17 00:00:00 2001 -From: oparviainen <oparviai@iki.fi> -Date: Sun, 12 Aug 2018 20:24:37 +0300 -Subject: [PATCH] Added minimum size check for WAV header block lengh values - ---- - source/SoundStretch/WavFile.cpp | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/source/SoundStretch/WavFile.cpp b/source/SoundStretch/WavFile.cpp -index 7e7ade2..68818c9 100644 ---- a/source/SoundStretch/WavFile.cpp -+++ b/source/SoundStretch/WavFile.cpp -@@ -530,7 +530,11 @@ int WavInFile::readHeaderBlock() - // read length of the format field
- if (fread(&nLen, sizeof(int), 1, fptr) != 1) return -1;
- // swap byte order if necessary
-- _swap32(nLen); // int format_len;
-+ _swap32(nLen);
-+
-+ // verify that header length isn't smaller than expected
-+ if (nLen < sizeof(header.format) - 8) return -1;
-+
- header.format.format_len = nLen;
-
- // calculate how much length differs from expected
-@@ -572,6 +576,10 @@ int WavInFile::readHeaderBlock() - if (fread(&nLen, sizeof(int), 1, fptr) != 1) return -1;
- // swap byte order if necessary
- _swap32(nLen); // int fact_len;
-+
-+ // verify that fact length isn't smaller than expected
-+ if (nLen < sizeof(header.fact) - 8) return -1;
-+
- header.fact.fact_len = nLen;
-
- // calculate how much length differs from expected
--- -2.18.0 - -From e0240689056e4182fffdc2a16aa6e3425a15e275 Mon Sep 17 00:00:00 2001 -From: oparviainen <oparviai@iki.fi> -Date: Mon, 13 Aug 2018 19:16:16 +0300 -Subject: [PATCH] Fixed WavFile header/fact not-too-small check - ---- - source/SoundStretch/WavFile.cpp | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/source/SoundStretch/WavFile.cpp b/source/SoundStretch/WavFile.cpp -index 4af7a4c..3421bca 100644 ---- a/source/SoundStretch/WavFile.cpp -+++ b/source/SoundStretch/WavFile.cpp -@@ -518,13 +518,13 @@ int WavInFile::readHeaderBlock() - // swap byte order if necessary
- _swap32(nLen);
-
-- // verify that header length isn't smaller than expected
-- if (nLen < sizeof(header.format) - 8) return -1;
-+ // calculate how much length differs from expected
-+ nDump = nLen - ((int)sizeof(header.format) - 8);
-
-- header.format.format_len = nLen;
-+ // verify that header length isn't smaller than expected structure
-+ if (nDump < 0) return -1;
-
-- // calculate how much length differs from expected
-- nDump = nLen - ((int)sizeof(header.format) - 8);
-+ header.format.format_len = nLen;
-
- // if format_len is larger than expected, read only as much data as we've space for
- if (nDump > 0)
-@@ -561,16 +561,16 @@ int WavInFile::readHeaderBlock() - // read length of the fact field
- if (fread(&nLen, sizeof(int), 1, fptr) != 1) return -1;
- // swap byte order if necessary
-- _swap32(nLen); // int fact_len;
--
-- // verify that fact length isn't smaller than expected
-- if (nLen < sizeof(header.fact) - 8) return -1;
--
-- header.fact.fact_len = nLen;
-+ _swap32(nLen);
-
- // calculate how much length differs from expected
- nDump = nLen - ((int)sizeof(header.fact) - 8);
-
-+ // verify that fact length isn't smaller than expected structure
-+ if (nDump < 0) return -1;
-+
-+ header.fact.fact_len = nLen;
-+
- // if format_len is larger than expected, read only as much data as we've space for
- if (nDump > 0)
- {
--- -2.18.0 - -From 46531e5b92dd80dd9a7947463d6224fc7cb21967 Mon Sep 17 00:00:00 2001 -From: olli <oparviai@iki.fi> -Date: Mon, 13 Aug 2018 19:42:58 +0300 -Subject: [PATCH] Improved WavFile header/fact not-too-small check - ---- - source/SoundStretch/WavFile.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/source/SoundStretch/WavFile.cpp b/source/SoundStretch/WavFile.cpp -index 3421bca..9d90b8a 100644 ---- a/source/SoundStretch/WavFile.cpp -+++ b/source/SoundStretch/WavFile.cpp -@@ -522,7 +522,7 @@ int WavInFile::readHeaderBlock() - nDump = nLen - ((int)sizeof(header.format) - 8);
-
- // verify that header length isn't smaller than expected structure
-- if (nDump < 0) return -1;
-+ if ((nLen < 0) || (nDump < 0)) return -1;
-
- header.format.format_len = nLen;
-
-@@ -567,7 +567,7 @@ int WavInFile::readHeaderBlock() - nDump = nLen - ((int)sizeof(header.fact) - 8);
-
- // verify that fact length isn't smaller than expected structure
-- if (nDump < 0) return -1;
-+ if ((nLen < 0) || (nDump < 0)) return -1;
-
- header.fact.fact_len = nLen;
-
--- -2.18.0 - diff --git a/gnu/packages/patches/soundtouch-CVE-2018-14044-14045.patch b/gnu/packages/patches/soundtouch-CVE-2018-14044-14045.patch deleted file mode 100644 index cc0282fc7b..0000000000 --- a/gnu/packages/patches/soundtouch-CVE-2018-14044-14045.patch +++ /dev/null @@ -1,138 +0,0 @@ -Fix CVE-2018-14044 and CVE-2018-14045: - -https://gitlab.com/soundtouch/soundtouch/issues/7 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14044 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14045 - -Patch copied from upstream source repository: - -https://gitlab.com/soundtouch/soundtouch/commit/107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 - -From 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 Mon Sep 17 00:00:00 2001 -From: oparviainen <oparviai@iki.fi> -Date: Sun, 12 Aug 2018 20:00:56 +0300 -Subject: [PATCH] Replaced illegal-number-of-channel assertions with run-time - exception - ---- - include/FIFOSamplePipe.h | 12 ++++++++++++ - include/STTypes.h | 3 +++ - source/SoundTouch/FIFOSampleBuffer.cpp | 3 ++- - source/SoundTouch/RateTransposer.cpp | 5 ++--- - source/SoundTouch/SoundTouch.cpp | 8 ++------ - source/SoundTouch/TDStretch.cpp | 5 ++--- - 6 files changed, 23 insertions(+), 13 deletions(-) - -diff --git a/include/FIFOSamplePipe.h b/include/FIFOSamplePipe.h -index 4ec9275..b08f836 100644 ---- a/include/FIFOSamplePipe.h -+++ b/include/FIFOSamplePipe.h -@@ -51,6 +51,18 @@ namespace soundtouch - /// Abstract base class for FIFO (first-in-first-out) sample processing classes.
- class FIFOSamplePipe
- {
-+protected:
-+
-+ bool verifyNumberOfChannels(int nChannels) const
-+ {
-+ if ((nChannels > 0) && (nChannels <= SOUNDTOUCH_MAX_CHANNELS))
-+ {
-+ return true;
-+ }
-+ ST_THROW_RT_ERROR("Error: Illegal number of channels");
-+ return false;
-+ }
-+
- public:
- // virtual default destructor
- virtual ~FIFOSamplePipe() {}
-diff --git a/include/STTypes.h b/include/STTypes.h -index 03e7e07..862505e 100644 ---- a/include/STTypes.h -+++ b/include/STTypes.h -@@ -56,6 +56,9 @@ typedef unsigned long ulong; -
- namespace soundtouch
- {
-+ /// Max allowed number of channels
-+ #define SOUNDTOUCH_MAX_CHANNELS 16
-+
- /// Activate these undef's to overrule the possible sampletype
- /// setting inherited from some other header file:
- //#undef SOUNDTOUCH_INTEGER_SAMPLES
-diff --git a/source/SoundTouch/FIFOSampleBuffer.cpp b/source/SoundTouch/FIFOSampleBuffer.cpp -index f0d5e42..706e869 100644 ---- a/source/SoundTouch/FIFOSampleBuffer.cpp -+++ b/source/SoundTouch/FIFOSampleBuffer.cpp -@@ -73,7 +73,8 @@ void FIFOSampleBuffer::setChannels(int numChannels) - {
- uint usedBytes;
-
-- assert(numChannels > 0);
-+ if (!verifyNumberOfChannels(numChannels)) return;
-+
- usedBytes = channels * samplesInBuffer;
- channels = (uint)numChannels;
- samplesInBuffer = usedBytes / channels;
-diff --git a/source/SoundTouch/RateTransposer.cpp b/source/SoundTouch/RateTransposer.cpp -index 8b66be3..d115a4c 100644 ---- a/source/SoundTouch/RateTransposer.cpp -+++ b/source/SoundTouch/RateTransposer.cpp -@@ -179,11 +179,10 @@ void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples) - // Sets the number of channels, 1 = mono, 2 = stereo
- void RateTransposer::setChannels(int nChannels)
- {
-- assert(nChannels > 0);
-+ if (!verifyNumberOfChannels(nChannels) ||
-+ (pTransposer->numChannels == nChannels)) return;
-
-- if (pTransposer->numChannels == nChannels) return;
- pTransposer->setChannels(nChannels);
--
- inputBuffer.setChannels(nChannels);
- midBuffer.setChannels(nChannels);
- outputBuffer.setChannels(nChannels);
-diff --git a/source/SoundTouch/SoundTouch.cpp b/source/SoundTouch/SoundTouch.cpp -index 7b6756b..06bdd56 100644 ---- a/source/SoundTouch/SoundTouch.cpp -+++ b/source/SoundTouch/SoundTouch.cpp -@@ -139,18 +139,14 @@ uint SoundTouch::getVersionId() - // Sets the number of channels, 1 = mono, 2 = stereo
- void SoundTouch::setChannels(uint numChannels)
- {
-- /*if (numChannels != 1 && numChannels != 2)
-- {
-- //ST_THROW_RT_ERROR("Illegal number of channels");
-- return;
-- }*/
-+ if (!verifyNumberOfChannels(numChannels)) return;
-+
- channels = numChannels;
- pRateTransposer->setChannels((int)numChannels);
- pTDStretch->setChannels((int)numChannels);
- }
-
-
--
- // Sets new rate control value. Normal rate = 1.0, smaller values
- // represent slower rate, larger faster rates.
- void SoundTouch::setRate(double newRate)
-diff --git a/source/SoundTouch/TDStretch.cpp b/source/SoundTouch/TDStretch.cpp -index 149cdb9..be2dc88 100644 ---- a/source/SoundTouch/TDStretch.cpp -+++ b/source/SoundTouch/TDStretch.cpp -@@ -588,9 +588,8 @@ void TDStretch::setTempo(double newTempo) - // Sets the number of channels, 1 = mono, 2 = stereo
- void TDStretch::setChannels(int numChannels)
- {
-- assert(numChannels > 0);
-- if (channels == numChannels) return;
--// assert(numChannels == 1 || numChannels == 2);
-+ if (!verifyNumberOfChannels(numChannels) ||
-+ (channels == numChannels)) return;
-
- channels = numChannels;
- inputBuffer.setChannels(channels);
--- -2.18.0 - diff --git a/gnu/packages/patches/synfigstudio-fix-ui-with-gtk3.patch b/gnu/packages/patches/synfigstudio-fix-ui-with-gtk3.patch deleted file mode 100644 index d7b3e92507..0000000000 --- a/gnu/packages/patches/synfigstudio-fix-ui-with-gtk3.patch +++ /dev/null @@ -1,55 +0,0 @@ -Downloaded from -https://github.com/synfig/synfig/commit/b9c3b73ee35b83c4d9183c800809040cef98b2f2.patch - -Without this patch the UI of Synfig Studio (when built with the latest version -of GTK) displays very large buttons in the header of every frame. - -This patch can be removed with the next release. - - -From b9c3b73ee35b83c4d9183c800809040cef98b2f2 Mon Sep 17 00:00:00 2001 -From: caryoscelus <caryoscelus@gmx.com> -Date: Wed, 25 Jan 2017 18:34:39 +0300 -Subject: [PATCH] Fix dock drop area size - -Fixes #227 - -By using Frame instead of Button we avoid intrusive Gtk themes -from forcing huge drop area size. ---- - synfig-studio/src/gui/docks/dockdroparea.cpp | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/src/gui/docks/dockdroparea.cpp b/synfig-studio/src/gui/docks/dockdroparea.cpp -index 0f8936fdb..e012282f0 100644 ---- a/src/gui/docks/dockdroparea.cpp -+++ b/src/gui/docks/dockdroparea.cpp -@@ -35,7 +35,7 @@ - #include "app.h" - #include "docks/dockdroparea.h" - #include "docks/dockmanager.h" --#include <gtkmm/button.h> -+#include <gtkmm/frame.h> - - #endif - -@@ -61,10 +61,15 @@ DockDropArea::DockDropArea(Gtk::Widget *target): - std::vector<Gtk::TargetEntry> listTargets; - listTargets.push_back( Gtk::TargetEntry("SYNFIG_DOCK") ); - -- Gtk::Button *button_left = manage(new Gtk::Button()); -- Gtk::Button *button_right = manage(new Gtk::Button()); -- Gtk::Button *button_top = manage(new Gtk::Button()); -- Gtk::Button *button_bottom = manage(new Gtk::Button()); -+ Gtk::Frame *button_left = manage(new Gtk::Frame()); -+ Gtk::Frame *button_right = manage(new Gtk::Frame()); -+ Gtk::Frame *button_top = manage(new Gtk::Frame()); -+ Gtk::Frame *button_bottom = manage(new Gtk::Frame()); -+ -+ button_left->set_size_request(20, 10); -+ button_right->set_size_request(20, 10); -+ button_top->set_size_request(20, 10); -+ button_bottom->set_size_request(20, 10); - - button_left->drag_dest_set(listTargets); - button_right->drag_dest_set(listTargets); diff --git a/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch b/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch new file mode 100644 index 0000000000..63646d420c --- /dev/null +++ b/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch @@ -0,0 +1,249 @@ +This patch adds support for newer versions of Poppler and some upstream +TexLive fixes, including one for CVE-2018-17407. + +It is taken from Linux From Scratch: +<http://www.linuxfromscratch.org/patches/blfs/svn/texlive-20180414-source-upstream_fixes-3.patch>. + +Submitted By: Ken Moffat <ken at linuxfromscratch dot org> +Date: 2018-12-26 +Initial Package Version: 20180414 +Upstream Status: Applied +Origin: Upstream +Description: Two fixes, cherry-picked from svn plus a CVE fix. +I have removed the partial fixes for various system versions of poppler. + +r47469 Fix segfault in dvipdfm-x (XeTeX) on 1/2/4-bit transparent indexed PNGs. + +r47477 Fix a ptex regression for discontinuous kinsoku table. + +Also, via fedora (I got lost in svn) a critical fix for CVE-2018-17407 + +"A buffer overflow in the handling of Type 1 fonts allows arbitrary code +execution when a malicious font is loaded by one of the vulnerable tools: +pdflatex, pdftex, dvips, or luatex." + +diff -Naur a/texk/dvipdfm-x/pngimage.c b/texk/dvipdfm-x/pngimage.c +--- a/texk/dvipdfm-x/pngimage.c 2018-02-17 08:41:35.000000000 +0000 ++++ b/texk/dvipdfm-x/pngimage.c 2018-10-09 01:52:01.648670875 +0100 +@@ -964,12 +964,16 @@ + png_bytep trans; + int num_trans; + png_uint_32 i; ++ png_byte bpc, mask, shift; + + if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) || + !png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL)) { + WARN("%s: PNG does not have valid tRNS chunk but tRNS is requested.", PNG_DEBUG_STR); + return NULL; + } ++ bpc = png_get_bit_depth(png_ptr, info_ptr); ++ mask = 0xff >> (8 - bpc); ++ shift = 8 - bpc; + + smask = pdf_new_stream(STREAM_COMPRESS); + dict = pdf_stream_dict(smask); +@@ -981,7 +985,8 @@ + pdf_add_dict(dict, pdf_new_name("ColorSpace"), pdf_new_name("DeviceGray")); + pdf_add_dict(dict, pdf_new_name("BitsPerComponent"), pdf_new_number(8)); + for (i = 0; i < width*height; i++) { +- png_byte idx = image_data_ptr[i]; ++ /* data is packed for 1/2/4 bpc formats, msb first */ ++ png_byte idx = (image_data_ptr[bpc * i / 8] >> (shift - bpc * i % 8)) & mask; + smask_data_ptr[i] = (idx < num_trans) ? trans[idx] : 0xff; + } + pdf_add_stream(smask, (char *)smask_data_ptr, width*height); +diff -Naur a/texk/dvipsk/writet1.c b/texk/dvipsk/writet1.c +--- a/texk/dvipsk/writet1.c 2016-11-25 18:24:26.000000000 +0000 ++++ b/texk/dvipsk/writet1.c 2018-10-09 01:52:01.648670875 +0100 +@@ -1449,7 +1449,9 @@ + *(strend(t1_buf_array) - 1) = ' '; + + t1_getline(); ++ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcat(t1_buf_array, t1_line_array); ++ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcpy(t1_line_array, t1_buf_array); + t1_line_ptr = eol(t1_line_array); + } +diff -Naur a/texk/web2c/luatexdir/font/writet1.w b/texk/web2c/luatexdir/font/writet1.w +--- a/texk/web2c/luatexdir/font/writet1.w 2016-11-25 18:24:34.000000000 +0000 ++++ b/texk/web2c/luatexdir/font/writet1.w 2018-10-09 01:52:01.648670875 +0100 +@@ -1625,7 +1625,9 @@ + if (sscanf(p, "%i", &i) != 1) { + strcpy(t1_buf_array, t1_line_array); + t1_getline(); ++ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcat(t1_buf_array, t1_line_array); ++ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcpy(t1_line_array, t1_buf_array); + t1_line_ptr = eol(t1_line_array); + } +diff -Naur a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w +--- a/texk/web2c/luatexdir/image/pdftoepdf.w 2018-01-17 18:00:12.000000000 +0000 ++++ b/texk/web2c/luatexdir/image/pdftoepdf.w 2018-10-09 01:52:01.648670875 +0100 +@@ -472,10 +472,10 @@ + break; + */ + case objString: +- copyString(pdf, obj->getString()); ++ copyString(pdf, (GooString *)obj->getString()); + break; + case objName: +- copyName(pdf, obj->getName()); ++ copyName(pdf, (char *)obj->getName()); + break; + case objNull: + pdf_add_null(pdf); +diff -Naur a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc +--- a/texk/web2c/luatexdir/lua/lepdflib.cc 2018-02-14 14:44:38.000000000 +0000 ++++ b/texk/web2c/luatexdir/lua/lepdflib.cc 2018-10-09 01:52:01.649670868 +0100 +@@ -674,7 +674,7 @@ + uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ + if (uin->pd != NULL && uin->pd->pc != uin->pc) \ + pdfdoc_changed_error(L); \ +- gs = ((in *) uin->d)->function(); \ ++ gs = (GooString *)((in *) uin->d)->function(); \ + if (gs != NULL) \ + lua_pushlstring(L, gs->getCString(), gs->getLength()); \ + else \ +@@ -1813,7 +1813,7 @@ + if (uin->pd != NULL && uin->pd->pc != uin->pc) + pdfdoc_changed_error(L); + if (((Object *) uin->d)->isString()) { +- gs = ((Object *) uin->d)->getString(); ++ gs = (GooString *)((Object *) uin->d)->getString(); + lua_pushlstring(L, gs->getCString(), gs->getLength()); + } else + lua_pushnil(L); +diff -Naur a/texk/web2c/pdftexdir/writet1.c b/texk/web2c/pdftexdir/writet1.c +--- a/texk/web2c/pdftexdir/writet1.c 2016-11-25 18:24:37.000000000 +0000 ++++ b/texk/web2c/pdftexdir/writet1.c 2018-10-09 01:52:01.649670868 +0100 +@@ -1598,7 +1598,9 @@ + *(strend(t1_buf_array) - 1) = ' '; + + t1_getline(); ++ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcat(t1_buf_array, t1_line_array); ++ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); + strcpy(t1_line_array, t1_buf_array); + t1_line_ptr = eol(t1_line_array); + } +diff -Naur a/texk/web2c/ptexdir/ptex_version.h b/texk/web2c/ptexdir/ptex_version.h +--- a/texk/web2c/ptexdir/ptex_version.h 2018-01-21 03:48:06.000000000 +0000 ++++ b/texk/web2c/ptexdir/ptex_version.h 2018-10-09 01:52:01.649670868 +0100 +@@ -1 +1 @@ +-#define PTEX_VERSION "p3.8.0" ++#define PTEX_VERSION "p3.8.1" +diff -Naur a/texk/web2c/ptexdir/tests/free_ixsp.tex b/texk/web2c/ptexdir/tests/free_ixsp.tex +--- a/texk/web2c/ptexdir/tests/free_ixsp.tex 1970-01-01 01:00:00.000000000 +0100 ++++ b/texk/web2c/ptexdir/tests/free_ixsp.tex 2018-10-09 01:52:01.649670868 +0100 +@@ -0,0 +1,53 @@ ++%#!eptex -ini -etex ++\let\dump\relax ++\batchmode ++\input plain ++ ++\errorstopmode ++\catcode`@=11 ++\newcount\@tempcnta ++\newcount\@tempcntb ++\newcount\@tempcntc ++\mathchardef\LIM=256 ++ ++\def\MYCHAR#1{% ++ \@tempcntc=\numexpr7*#1+"101\relax ++ \@tempcnta=\@tempcntc\divide\@tempcnta 94 ++ \@tempcntb=\numexpr\@tempcntc-94*\@tempcnta+1\relax ++ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi ++ \advance\@tempcnta18 % 18区以降 ++ \CNTA=\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax ++} ++ ++\newcount\CNT\newcount\CNTA ++\CNT=0 ++\loop ++ \MYCHAR\CNT ++ \message{\the\CNT.} ++ \inhibitxspcode\CNTA=1\relax ++ \advance\CNT1\relax ++ \ifnum\CNT<\LIM ++\repeat ++ ++\newcount\CNTB ++ ++\loop ++ \MYCHAR\CNTB ++ \global\inhibitxspcode\CNTA=3 ++{% ++\CNT=0 ++\loop ++ \MYCHAR\CNT ++ \count@=\numexpr 1-\inhibitxspcode\CNTA\relax ++ \ifnum\count@=0\else\ifnum\CNTB=\CNT\else ++ \errmessage{<\the\CNTB, \the\CNT, \the\inhibitxspcode\CNTA>}\fi\fi ++ \advance\CNT1\relax ++ \ifnum\CNT<\LIM ++\repeat ++} ++ \MYCHAR\CNTB ++ \global\inhibitxspcode\CNTA=1\relax ++ \advance\CNTB1\relax ++ \ifnum\CNTB<\LIM ++\repeat ++\bye +diff -Naur a/texk/web2c/ptexdir/tests/free_pena.tex b/texk/web2c/ptexdir/tests/free_pena.tex +--- a/texk/web2c/ptexdir/tests/free_pena.tex 1970-01-01 01:00:00.000000000 +0100 ++++ b/texk/web2c/ptexdir/tests/free_pena.tex 2018-10-09 01:52:01.649670868 +0100 +@@ -0,0 +1,52 @@ ++%#!eptex -ini -etex ++\let\dump\relax ++\batchmode ++\input plain ++ ++\errorstopmode ++\catcode`@=11 ++\newcount\@tempcnta ++\newcount\@tempcntb ++\newcount\@tempcntc ++\mathchardef\LIM=256 ++ ++\def\MYCHAR#1{% ++ \@tempcntc=\numexpr7*#1+"101\relax ++ \@tempcnta=\@tempcntc\divide\@tempcnta 94 ++ \@tempcntb=\numexpr\@tempcntc-94*\@tempcnta+1\relax ++ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi ++ \advance\@tempcnta18 % 18区以降 ++ \CNTA=\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax ++} ++ ++\newcount\CNT\newcount\CNTA ++\CNT=0 ++\loop ++ \MYCHAR\CNT ++ \message{\the\CNT.} ++ \prebreakpenalty\CNTA=\numexpr\CNT+1\relax ++ \advance\CNT1\relax ++ \ifnum\CNT<\LIM ++\repeat ++ ++\newcount\CNTB ++ ++\loop ++ \MYCHAR\CNTB ++ \global\prebreakpenalty\CNTA=0 ++{% ++\CNT=0 ++\loop ++ \MYCHAR\CNT ++ \count@=\numexpr -\CNT-1+\prebreakpenalty\CNTA\relax ++ \ifnum\count@=0\else\ifnum\CNTB=\CNT\else\errmessage{<\the\CNTB, \the\CNT>}\fi\fi ++ \advance\CNT1\relax ++ \ifnum\CNT<\LIM ++\repeat ++} ++ \MYCHAR\CNTB ++ \global\prebreakpenalty\CNTA=\numexpr\CNTB+1\relax ++ \advance\CNTB1\relax ++ \ifnum\CNTB<\LIM ++\repeat ++\bye diff --git a/gnu/packages/patches/texlive-bin-pdftex-poppler-compat.patch b/gnu/packages/patches/texlive-bin-pdftex-poppler-compat.patch deleted file mode 100644 index eba4733f32..0000000000 --- a/gnu/packages/patches/texlive-bin-pdftex-poppler-compat.patch +++ /dev/null @@ -1,188 +0,0 @@ -Fix compatibility with Poppler 0.72. - -These files are taken from the upstream "poppler0.72.0.cc" variants and -diffed against the "newpoppler" files from the 20180414 distribution. - -See revision 49336: -https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/ - ---- a/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc 2018-12-09 21:14:58.479732695 +0100 -@@ -22,7 +22,7 @@ - https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk - by Arch Linux. A little modifications are made to avoid a crash for - some kind of pdf images, such as figure_missing.pdf in gnuplot. --The poppler should be 0.59.0 or newer versions. -+The poppler should be 0.72.0 or newer versions. - POPPLER_VERSION should be defined. - */ - -@@ -120,7 +120,7 @@ - - static InObj *inObjList; - static UsedEncoding *encodingList; --static GBool isInit = gFalse; -+static bool isInit = false; - - // -------------------------------------------------------------------- - // Maintain list of open embedded PDF files -@@ -317,7 +317,7 @@ - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { -- key = obj->dictGetKey(i); -+ key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) -@@ -427,7 +427,7 @@ - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) -- epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); -+ epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); -@@ -454,7 +454,7 @@ - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) -- copyFont(obj->dictGetKey(i), &fontRef); -+ copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); -@@ -566,7 +566,7 @@ - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); -- p = s->getCString(); -+ p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); -@@ -664,7 +664,7 @@ - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } -- if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0) -+ if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; -@@ -683,7 +683,7 @@ - } - - // get the pagebox according to the pagebox_spec --static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -+static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) - { - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); -@@ -715,7 +715,7 @@ - { - PdfDocument *pdf_doc; - Page *page; -- PDFRectangle *pagebox; -+ const PDFRectangle *pagebox; - #ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; - #else -@@ -724,8 +724,8 @@ - // initialize - if (!isInit) { - globalParams = new GlobalParams(); -- globalParams->setErrQuiet(gFalse); -- isInit = gTrue; -+ globalParams->setErrQuiet(false); -+ isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); -@@ -849,7 +849,7 @@ - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); -- PDFRectangle *pagebox; -+ const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); -@@ -977,7 +977,7 @@ - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { -- groupDict.dictAdd(copyString(dic1.getKey(i)), -+ groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } - // end modification -@@ -1001,14 +1001,14 @@ - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); -- key = obj1->dictGetKey(i); -+ key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else -- copyOtherResources(&obj2, key); -+ copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - ---- a/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc 2018-12-09 21:14:58.479732695 +0100 -@@ -20,7 +20,7 @@ - /* - This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at - https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk --by Arch Linux. The poppler should be 0.59.0 or newer versions. -+by Arch Linux. The poppler should be 0.72.0 or newer versions. - POPPLER_VERSION should be defined. - */ - -@@ -109,7 +109,7 @@ - fprintf(stderr, "No SourceName found\n"); - exit(1); - } -- outname = (char *)srcName.getString()->getCString(); -+ outname = (char *)srcName.getString()->c_str(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { -@@ -118,7 +118,7 @@ - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } -- sprintf(buf, "%s", fileName->getCString()); -+ sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) -@@ -128,7 +128,7 @@ - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; -- sprintf(buf, "%s", fileName->getCString()); -+ sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); -@@ -173,9 +173,9 @@ - - // parse the header: object numbers and offsets - objStr.streamReset(); -- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first); -+ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); - lexer = new Lexer(xref, str); -- parser = new Parser(xref, lexer, gFalse); -+ parser = new Parser(xref, lexer, false); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - diff --git a/gnu/packages/patches/texlive-bin-xetex-poppler-compat.patch b/gnu/packages/patches/texlive-bin-xetex-poppler-compat.patch deleted file mode 100644 index cac716cc59..0000000000 --- a/gnu/packages/patches/texlive-bin-xetex-poppler-compat.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix compatibility with Poppler 0.72. - -Patch taken from upstream: -https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/xetexdir/pdfimage.cpp?r1=44964&r2=48969&diff_format=u - ---- a/texk/web2c/xetexdir/pdfimage.cpp 2017/08/06 07:12:02 44964 -+++ b/texk/web2c/xetexdir/pdfimage.cpp 2018/10/22 04:01:42 48969 -@@ -82,19 +82,19 @@ - switch (pdf_box) { - default: - case pdfbox_crop: -- r = page->getCropBox(); -+ r = (PDFRectangle *)page->getCropBox(); - break; - case pdfbox_media: -- r = page->getMediaBox(); -+ r = (PDFRectangle *)page->getMediaBox(); - break; - case pdfbox_bleed: -- r = page->getBleedBox(); -+ r = (PDFRectangle *)page->getBleedBox(); - break; - case pdfbox_trim: -- r = page->getTrimBox(); -+ r = (PDFRectangle *)page->getTrimBox(); - break; - case pdfbox_art: -- r = page->getArtBox(); -+ r = (PDFRectangle *)page->getArtBox(); - break; - } diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch new file mode 100644 index 0000000000..063677db4a --- /dev/null +++ b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch @@ -0,0 +1,57 @@ +From 48b52117235928cfd7ef1ec5c3f2cff5d7b03862 Mon Sep 17 00:00:00 2001 +From: Jordan Hand <jordanhand22@gmail.com> +Date: Wed, 10 Apr 2019 09:46:32 -0700 +Subject: [PATCH,v2] fdt: Fix mkimage list to try every header type +Origin: https://patchwork.ozlabs.org/patch/1083495/ + +Image type is not supplied to `mkimage -l`. For this reason, we cannot +use imagetool_verify_print_header_by_type. Instead, this patch uses +imagetool_verify_print_header to look through all header types to find +one where image validation succeeds. + +This patch fixes failures in test/image/test-imagetools.sh + +Signed-off-by: Jordan Hand <jorhand@microsoft.com> +Tested-by: Alex Kiernan <alex.kiernan@gmail.com> +Tested-by: Vagrant Cascadian <vagrant@debian.org> +--- + tools/mkimage.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/tools/mkimage.c b/tools/mkimage.c +index 2899adff81..76c3406d37 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -403,14 +403,21 @@ int main(int argc, char **argv) + exit (EXIT_FAILURE); + } + +- /* +- * scan through mkimage registry for all supported image types +- * and verify the input image file header for match +- * Print the image information for matched image type +- * Returns the error code if not matched +- */ +- retval = imagetool_verify_print_header_by_type(ptr, &sbuf, +- tparams, ¶ms); ++ if (params.fflag) { ++ /* ++ * Verifies the header format based on the expected header for ++ * image type in tparams ++ */ ++ retval = imagetool_verify_print_header_by_type(ptr, &sbuf, ++ tparams, ¶ms); ++ } else { ++ /** ++ * When listing the image, we are not given the image type. Simply check all ++ * image types to find one that matches our header ++ */ ++ retval = imagetool_verify_print_header(ptr, &sbuf, ++ tparams, ¶ms); ++ } + + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (ifd); +-- +2.20.1 + diff --git a/gnu/packages/patches/webkitgtk-sse2.patch b/gnu/packages/patches/webkitgtk-sse2.patch new file mode 100644 index 0000000000..df70e38919 --- /dev/null +++ b/gnu/packages/patches/webkitgtk-sse2.patch @@ -0,0 +1,202 @@ +Fix build on i686. + +This patch is taken from upstream, with ChangeLog entries omitted. + +From 5048338c5f21605441c6833907d1136ac9640b35 Mon Sep 17 00:00:00 2001 +From: "mcatanzaro@igalia.com" + <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> +Date: Wed, 10 Apr 2019 18:27:25 +0000 +Subject: [PATCH] Unreviewed, rolling out r243989. + +Broke i686 builds + +Reverted changeset: + +"[CMake] Detect SSE2 at compile time" +https://bugs.webkit.org/show_bug.cgi?id=196488 +https://trac.webkit.org/changeset/243989 + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@244138 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + CMakeLists.txt | 10 --- + ChangeLog | 12 ++++ + Source/JavaScriptCore/ChangeLog | 12 ++++ + .../assembler/MacroAssemblerX86Common.cpp | 7 ++ + .../assembler/MacroAssemblerX86Common.h | 30 +++++++++ + Source/cmake/FindSSE2.cmake | 65 ------------------- + 6 files changed, 61 insertions(+), 75 deletions(-) + delete mode 100644 Source/cmake/FindSSE2.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index acd77f4b623..d3e8a23f9ff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,16 +114,6 @@ else () + set(WTF_CPU_UNKNOWN 1) + endif () + +-#--------------------------- +-# Make sure SSE2 is present. +-#--------------------------- +-if (WTF_CPU_X86) +- include(FindSSE2) +- if (NOT SSE2_SUPPORT_FOUND) +- message(FATAL_ERROR "SSE2 support is required to compile WebKit") +- endif () +-endif () +- + # ----------------------------------------------------------------------------- + # Determine the operating system + # ----------------------------------------------------------------------------- +diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp +index 8c752c0d030..31753589df7 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp ++++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp +@@ -168,6 +168,11 @@ static_assert(PROBE_OFFSETOF_REG(cpu.fprs, X86Registers::xmm15) == PROBE_CPU_XMM + static_assert(sizeof(Probe::State) == PROBE_SIZE, "Probe::State::size's matches ctiMasmProbeTrampoline"); + static_assert((PROBE_EXECUTOR_OFFSET + PTR_SIZE) <= (PROBE_SIZE + OUT_SIZE), "Must have room after ProbeContext to stash the probe handler"); + ++#if CPU(X86) ++// SSE2 is a hard requirement on x86. ++static_assert(isSSE2Present(), "SSE2 support is required in JavaScriptCore"); ++#endif ++ + #undef PROBE_OFFSETOF + + #if CPU(X86) +@@ -787,6 +792,7 @@ void MacroAssemblerX86Common::collectCPUFeatures() + std::call_once(onceKey, [] { + { + CPUID cpuid = getCPUID(0x1); ++ s_sse2CheckState = (cpuid[3] & (1 << 26)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; + s_sse4_1CheckState = (cpuid[2] & (1 << 19)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; + s_sse4_2CheckState = (cpuid[2] & (1 << 20)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; + s_popcntCheckState = (cpuid[2] & (1 << 23)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; +@@ -803,6 +809,7 @@ void MacroAssemblerX86Common::collectCPUFeatures() + }); + } + ++MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse2CheckState = CPUIDCheckState::NotChecked; + MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_1CheckState = CPUIDCheckState::NotChecked; + MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_2CheckState = CPUIDCheckState::NotChecked; + MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_avxCheckState = CPUIDCheckState::NotChecked; +diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h +index ff097290ef3..097bcb0bb86 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h ++++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h +@@ -4197,11 +4197,41 @@ private: + } + #endif + ++#if CPU(X86) ++#if OS(MAC_OS_X) ++ ++ // All X86 Macs are guaranteed to support at least SSE2, ++ static bool isSSE2Present() ++ { ++ return true; ++ } ++ ++#else // OS(MAC_OS_X) ++ static bool isSSE2Present() ++ { ++ if (s_sse2CheckState == CPUIDCheckState::NotChecked) ++ collectCPUFeatures(); ++ return s_sse2CheckState == CPUIDCheckState::Set; ++ } ++ ++#endif // OS(MAC_OS_X) ++#elif !defined(NDEBUG) // CPU(X86) ++ ++ // On x86-64 we should never be checking for SSE2 in a non-debug build, ++ // but non debug add this method to keep the asserts above happy. ++ static bool isSSE2Present() ++ { ++ return true; ++ } ++ ++#endif ++ + using CPUID = std::array<unsigned, 4>; + static CPUID getCPUID(unsigned level); + static CPUID getCPUIDEx(unsigned level, unsigned count); + JS_EXPORT_PRIVATE static void collectCPUFeatures(); + ++ JS_EXPORT_PRIVATE static CPUIDCheckState s_sse2CheckState; + JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_1CheckState; + JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_2CheckState; + JS_EXPORT_PRIVATE static CPUIDCheckState s_avxCheckState; +diff --git a/Source/cmake/FindSSE2.cmake b/Source/cmake/FindSSE2.cmake +deleted file mode 100644 +index 7a947feadd4..00000000000 +--- a/Source/cmake/FindSSE2.cmake ++++ /dev/null +@@ -1,65 +0,0 @@ +-################################# +-# Check for the presence of SSE2. +-# +-# Once done, this will define: +-# - SSE2_SUPPORT_FOUND - the system supports (at least) SSE2. +-# +-# Copyright (c) 2014, Pablo Fernandez Alcantarilla, Jesus Nuevo +-# Copyright (c) 2019, Igalia S.L. +-# +-# Redistribution and use in source and binary forms, with or without modification, +-# are permitted provided that the following conditions are met: +-# +-# * Redistributions of source code must retain the above copyright notice, +-# this list of conditions and the following disclaimer. +-# +-# * Redistributions in binary form must reproduce the above copyright notice, +-# this list of conditions and the following disclaimer in the documentation +-# and/or other materials provided with the distribution. +-# +-# * Neither the name of the copyright holders nor the names of its contributors +-# may be used to endorse or promote products derived from this software without +-# specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +-# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +-# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +-# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +-# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- +-set(SSE2_SUPPORT_FOUND FALSE) +- +-macro(CHECK_FOR_SSE2) +- include(CheckCXXSourceRuns) +- +- check_cxx_source_runs(" +- #include <emmintrin.h> +- int main () +- { +- __m128d a, b; +- double vals[2] = {0}; +- a = _mm_loadu_pd (vals); +- b = _mm_add_pd (a,a); +- _mm_storeu_pd (vals,b); +- return(0); +- }" +- HAVE_SSE2_EXTENSIONS) +- +- if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG) +- if (HAVE_SSE2_EXTENSIONS) +- set(SSE2_SUPPORT_FOUND TRUE) +- endif () +- elseif (MSVC AND NOT CMAKE_CL_64) +- if (HAVE_SSE2_EXTENSIONS) +- set(SSE2_SUPPORT_FOUND TRUE) +- message(STATUS "Found SSE2 extensions.") +- endif (HAVE_SSE2_EXTENSIONS) +- endif () +- +-endmacro(CHECK_FOR_SSE2) +- +-CHECK_FOR_SSE2() +-- +2.21.0 + |