From a76d0f032b6d4148bd36dcb640109fae20922bbc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 10 Feb 2019 23:11:20 +0100 Subject: gnu: gnome-shell: Customize the GDM log-in screen. * gnu/packages/patches/gnome-shell-theme.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (gnome-shell)[source](patches, modules) (snippet): New fields. [arguments]: Add 'rebuild-css' phase. [native-inputs]: Add RUBY-SASS. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 37083ca916..3bb60d3ade 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -827,6 +827,7 @@ dist_patch_DATA = \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ + %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-todo-libical-compat.patch \ %D%/packages/patches/gnome-tweak-tool-search-paths.patch \ %D%/packages/patches/gnucash-fix-test-transaction-failure.patch \ -- cgit v1.2.3 From c86b5f1b9bdfdd478ba15804f9343feb8d9c019b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 11 Feb 2019 22:40:10 +0200 Subject: gnu: glibc@2.27: fix CVE-2018-11236, CVE-2018-11237. * gnu/packages/base.scm (glibc@2.27)[sources]: Add patches. [properties]: New field, mark CVE-2017-18269 fixed. * gnu/packages/patches/glibc-CVE-2018-11236.patch, gnu/packages/patches/glibc-CVE-2018-11237.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 2 + gnu/packages/base.scm | 5 +- gnu/packages/patches/glibc-CVE-2018-11236.patch | 149 ++++++++++++++++++++++++ gnu/packages/patches/glibc-CVE-2018-11237.patch | 55 +++++++++ 4 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glibc-CVE-2018-11236.patch create mode 100644 gnu/packages/patches/glibc-CVE-2018-11237.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3bb60d3ade..9fe34cb1dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -811,6 +811,8 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-CVE-2017-1000366-pt1.patch \ %D%/packages/patches/glibc-CVE-2017-1000366-pt2.patch \ %D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \ + %D%/packages/patches/glibc-CVE-2018-11236.patch \ + %D%/packages/patches/glibc-CVE-2018-11237.patch \ %D%/packages/patches/glibc-allow-kernel-2.6.32.patch \ %D%/packages/patches/glibc-bootstrap-system.patch \ %D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 67fab7c114..db9cca6faf 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -892,7 +892,10 @@ with the Linux kernel.") "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" - "glibc-reinstate-prlimit64-fallback.patch")))))) + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-CVE-2018-11236.patch" + "glibc-CVE-2018-11237.patch")))) + (properties `((lint-hidden-cve . ("CVE-2017-18269")))))) ; glibc-2.27-git-fixes (define-public glibc-2.26 (package diff --git a/gnu/packages/patches/glibc-CVE-2018-11236.patch b/gnu/packages/patches/glibc-CVE-2018-11236.patch new file mode 100644 index 0000000000..4f8a72943c --- /dev/null +++ b/gnu/packages/patches/glibc-CVE-2018-11236.patch @@ -0,0 +1,149 @@ +https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=5460617d1567657621107d895ee2dd83bc1f88f2 +with ChangeLog removed + +From 5460617d1567657621107d895ee2dd83bc1f88f2 Mon Sep 17 00:00:00 2001 +From: Paul Pluzhnikov +Date: Tue, 8 May 2018 18:12:41 -0700 +Subject: [PATCH] Fix BZ 22786: integer addition overflow may cause stack + buffer overflow when realpath() input length is close to SSIZE_MAX. + +2018-05-09 Paul Pluzhnikov + + [BZ #22786] + * stdlib/canonicalize.c (__realpath): Fix overflow in path length + computation. + * stdlib/Makefile (test-bz22786): New test. + * stdlib/test-bz22786.c: New test. +--- + ChangeLog | 8 +++++ + stdlib/Makefile | 2 +- + stdlib/canonicalize.c | 2 +- + stdlib/test-bz22786.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 100 insertions(+), 2 deletions(-) + create mode 100644 stdlib/test-bz22786.c + +diff --git a/stdlib/Makefile b/stdlib/Makefile +index af1643c..1ddb1f9 100644 +--- a/stdlib/Makefile ++++ b/stdlib/Makefile +@@ -84,7 +84,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ + tst-cxa_atexit tst-on_exit test-atexit-race \ + test-at_quick_exit-race test-cxa_atexit-race \ + test-on_exit-race test-dlclose-exit-race \ +- tst-makecontext-align ++ tst-makecontext-align test-bz22786 + + tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ + tst-tls-atexit tst-tls-atexit-nodelete +diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c +index 4135f3f..390fb43 100644 +--- a/stdlib/canonicalize.c ++++ b/stdlib/canonicalize.c +@@ -181,7 +181,7 @@ __realpath (const char *name, char *resolved) + extra_buf = __alloca (path_max); + + len = strlen (end); +- if ((long int) (n + len) >= path_max) ++ if (path_max - n <= len) + { + __set_errno (ENAMETOOLONG); + goto error; +diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c +new file mode 100644 +index 0000000..e7837f9 +--- /dev/null ++++ b/stdlib/test-bz22786.c +@@ -0,0 +1,90 @@ ++/* Bug 22786: test for buffer overflow in realpath. ++ Copyright (C) 2018 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This file must be run from within a directory called "stdlib". */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ const char dir[] = "bz22786"; ++ const char lnk[] = "bz22786/symlink"; ++ ++ rmdir (dir); ++ if (mkdir (dir, 0755) != 0 && errno != EEXIST) ++ { ++ printf ("mkdir %s: %m\n", dir); ++ return EXIT_FAILURE; ++ } ++ if (symlink (".", lnk) != 0 && errno != EEXIST) ++ { ++ printf ("symlink (%s, %s): %m\n", dir, lnk); ++ return EXIT_FAILURE; ++ } ++ ++ const size_t path_len = (size_t) INT_MAX + 1; ++ ++ DIAG_PUSH_NEEDS_COMMENT; ++#if __GNUC_PREREQ (7, 0) ++ /* GCC 7 warns about too-large allocations; here we need such ++ allocation to succeed for the test to work. */ ++ DIAG_IGNORE_NEEDS_COMMENT (7, "-Walloc-size-larger-than="); ++#endif ++ char *path = malloc (path_len); ++ DIAG_POP_NEEDS_COMMENT; ++ ++ if (path == NULL) ++ { ++ printf ("malloc (%zu): %m\n", path_len); ++ return EXIT_UNSUPPORTED; ++ } ++ ++ /* Construct very long path = "bz22786/symlink/aaaa....." */ ++ char *p = mempcpy (path, lnk, sizeof (lnk) - 1); ++ *(p++) = '/'; ++ memset (p, 'a', path_len - (path - p) - 2); ++ p[path_len - (path - p) - 1] = '\0'; ++ ++ /* This call crashes before the fix for bz22786 on 32-bit platforms. */ ++ p = realpath (path, NULL); ++ ++ if (p != NULL || errno != ENAMETOOLONG) ++ { ++ printf ("realpath: %s (%m)", p); ++ return EXIT_FAILURE; ++ } ++ ++ /* Cleanup. */ ++ unlink (lnk); ++ rmdir (dir); ++ ++ return 0; ++} ++ ++#define TEST_FUNCTION do_test ++#include +-- +2.9.3 + diff --git a/gnu/packages/patches/glibc-CVE-2018-11237.patch b/gnu/packages/patches/glibc-CVE-2018-11237.patch new file mode 100644 index 0000000000..8a7c604ecd --- /dev/null +++ b/gnu/packages/patches/glibc-CVE-2018-11237.patch @@ -0,0 +1,55 @@ +https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e +with the ChangeLog removed + +From 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Tue, 22 May 2018 10:37:59 +0200 +Subject: [PATCH] Don't write beyond destination in + __mempcpy_avx512_no_vzeroupper (bug 23196) + +When compiled as mempcpy, the return value is the end of the destination +buffer, thus it cannot be used to refer to the start of it. +--- + ChangeLog | 9 +++++++++ + string/test-mempcpy.c | 1 + + sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++-- + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c +index c08fba8..d98ecdd 100644 +--- a/string/test-mempcpy.c ++++ b/string/test-mempcpy.c +@@ -18,6 +18,7 @@ + . */ + + #define MEMCPY_RESULT(dst, len) (dst) + (len) ++#define MIN_PAGE_SIZE 131072 + #define TEST_MAIN + #define TEST_NAME "mempcpy" + #include "test-string.h" +diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S +index 23c0f7a..effc3ac 100644 +--- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S ++++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S +@@ -336,6 +336,7 @@ L(preloop_large): + vmovups (%rsi), %zmm4 + vmovups 0x40(%rsi), %zmm5 + ++ mov %rdi, %r11 + /* Align destination for access with non-temporal stores in the loop. */ + mov %rdi, %r8 + and $-0x80, %rdi +@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop): + cmp $256, %rdx + ja L(gobble_256bytes_nt_loop) + sfence +- vmovups %zmm4, (%rax) +- vmovups %zmm5, 0x40(%rax) ++ vmovups %zmm4, (%r11) ++ vmovups %zmm5, 0x40(%r11) + jmp L(check) + + L(preloop_large_bkw): +-- +2.9.3 + -- cgit v1.2.3 From ce4593ec4c5ee14efad5eca84694c0f796403446 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 11 Feb 2019 15:07:29 -0500 Subject: gnu: runc: Update to 1.0.0-rc6 [fixes CVE-2019-5736]. * gnu/packages/virtualization.scm (runc): Update to 1.0.0-rc6. [source]: Use a descriptive file-name. Add 'runc-CVE-2019-5736.patch' * gnu/packages/patches/runc-CVE-2019-5736.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/runc-CVE-2019-5736.patch | 343 ++++++++++++++++++++++++++ gnu/packages/virtualization.scm | 6 +- 3 files changed, 348 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/runc-CVE-2019-5736.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9fe34cb1dc..16bb704933 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1207,6 +1207,7 @@ dist_patch_DATA = \ %D%/packages/patches/ruby-concurrent-test-arm.patch \ %D%/packages/patches/ruby-rack-ignore-failing-test.patch \ %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ + %D%/packages/patches/runc-CVE-2019-5736.patch \ %D%/packages/patches/rust-1.19-mrustc.patch \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ diff --git a/gnu/packages/patches/runc-CVE-2019-5736.patch b/gnu/packages/patches/runc-CVE-2019-5736.patch new file mode 100644 index 0000000000..f629fcbfb4 --- /dev/null +++ b/gnu/packages/patches/runc-CVE-2019-5736.patch @@ -0,0 +1,343 @@ +Fix CVE-2019-5736: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5736 +https://seclists.org/oss-sec/2019/q1/119 + +Patch copied from upstream source repository: + +https://github.com/opencontainers/runc/commit/0a8e4117e7f715d5fbeef398405813ce8e88558b + +From 0a8e4117e7f715d5fbeef398405813ce8e88558b Mon Sep 17 00:00:00 2001 +From: Aleksa Sarai +Date: Wed, 9 Jan 2019 13:40:01 +1100 +Subject: [PATCH] nsenter: clone /proc/self/exe to avoid exposing host binary + to container + +There are quite a few circumstances where /proc/self/exe pointing to a +pretty important container binary is a _bad_ thing, so to avoid this we +have to make a copy (preferably doing self-clean-up and not being +writeable). + +We require memfd_create(2) -- though there is an O_TMPFILE fallback -- +but we can always extend this to use a scratch MNT_DETACH overlayfs or +tmpfs. The main downside to this approach is no page-cache sharing for +the runc binary (which overlayfs would give us) but this is far less +complicated. + +This is only done during nsenter so that it happens transparently to the +Go code, and any libcontainer users benefit from it. This also makes +ExtraFiles and --preserve-fds handling trivial (because we don't need to +worry about it). + +Fixes: CVE-2019-5736 +Co-developed-by: Christian Brauner +Signed-off-by: Aleksa Sarai +--- + libcontainer/nsenter/cloned_binary.c | 268 +++++++++++++++++++++++++++ + libcontainer/nsenter/nsexec.c | 11 ++ + 2 files changed, 279 insertions(+) + create mode 100644 libcontainer/nsenter/cloned_binary.c + +diff --git a/libcontainer/nsenter/cloned_binary.c b/libcontainer/nsenter/cloned_binary.c +new file mode 100644 +index 000000000..c8a42c23f +--- /dev/null ++++ b/libcontainer/nsenter/cloned_binary.c +@@ -0,0 +1,268 @@ ++/* ++ * Copyright (C) 2019 Aleksa Sarai ++ * Copyright (C) 2019 SUSE LLC ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Use our own wrapper for memfd_create. */ ++#if !defined(SYS_memfd_create) && defined(__NR_memfd_create) ++# define SYS_memfd_create __NR_memfd_create ++#endif ++#ifdef SYS_memfd_create ++# define HAVE_MEMFD_CREATE ++/* memfd_create(2) flags -- copied from . */ ++# ifndef MFD_CLOEXEC ++# define MFD_CLOEXEC 0x0001U ++# define MFD_ALLOW_SEALING 0x0002U ++# endif ++int memfd_create(const char *name, unsigned int flags) ++{ ++ return syscall(SYS_memfd_create, name, flags); ++} ++#endif ++ ++/* This comes directly from . */ ++#ifndef F_LINUX_SPECIFIC_BASE ++# define F_LINUX_SPECIFIC_BASE 1024 ++#endif ++#ifndef F_ADD_SEALS ++# define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) ++# define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) ++#endif ++#ifndef F_SEAL_SEAL ++# define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ ++# define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ ++# define F_SEAL_GROW 0x0004 /* prevent file from growing */ ++# define F_SEAL_WRITE 0x0008 /* prevent writes */ ++#endif ++ ++#define RUNC_SENDFILE_MAX 0x7FFFF000 /* sendfile(2) is limited to 2GB. */ ++#ifdef HAVE_MEMFD_CREATE ++# define RUNC_MEMFD_COMMENT "runc_cloned:/proc/self/exe" ++# define RUNC_MEMFD_SEALS \ ++ (F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE) ++#endif ++ ++static void *must_realloc(void *ptr, size_t size) ++{ ++ void *old = ptr; ++ do { ++ ptr = realloc(old, size); ++ } while(!ptr); ++ return ptr; ++} ++ ++/* ++ * Verify whether we are currently in a self-cloned program (namely, is ++ * /proc/self/exe a memfd). F_GET_SEALS will only succeed for memfds (or rather ++ * for shmem files), and we want to be sure it's actually sealed. ++ */ ++static int is_self_cloned(void) ++{ ++ int fd, ret, is_cloned = 0; ++ ++ fd = open("/proc/self/exe", O_RDONLY|O_CLOEXEC); ++ if (fd < 0) ++ return -ENOTRECOVERABLE; ++ ++#ifdef HAVE_MEMFD_CREATE ++ ret = fcntl(fd, F_GET_SEALS); ++ is_cloned = (ret == RUNC_MEMFD_SEALS); ++#else ++ struct stat statbuf = {0}; ++ ret = fstat(fd, &statbuf); ++ if (ret >= 0) ++ is_cloned = (statbuf.st_nlink == 0); ++#endif ++ close(fd); ++ return is_cloned; ++} ++ ++/* ++ * Basic wrapper around mmap(2) that gives you the file length so you can ++ * safely treat it as an ordinary buffer. Only gives you read access. ++ */ ++static char *read_file(char *path, size_t *length) ++{ ++ int fd; ++ char buf[4096], *copy = NULL; ++ ++ if (!length) ++ return NULL; ++ ++ fd = open(path, O_RDONLY | O_CLOEXEC); ++ if (fd < 0) ++ return NULL; ++ ++ *length = 0; ++ for (;;) { ++ int n; ++ ++ n = read(fd, buf, sizeof(buf)); ++ if (n < 0) ++ goto error; ++ if (!n) ++ break; ++ ++ copy = must_realloc(copy, (*length + n) * sizeof(*copy)); ++ memcpy(copy + *length, buf, n); ++ *length += n; ++ } ++ close(fd); ++ return copy; ++ ++error: ++ close(fd); ++ free(copy); ++ return NULL; ++} ++ ++/* ++ * A poor-man's version of "xargs -0". Basically parses a given block of ++ * NUL-delimited data, within the given length and adds a pointer to each entry ++ * to the array of pointers. ++ */ ++static int parse_xargs(char *data, int data_length, char ***output) ++{ ++ int num = 0; ++ char *cur = data; ++ ++ if (!data || *output != NULL) ++ return -1; ++ ++ while (cur < data + data_length) { ++ num++; ++ *output = must_realloc(*output, (num + 1) * sizeof(**output)); ++ (*output)[num - 1] = cur; ++ cur += strlen(cur) + 1; ++ } ++ (*output)[num] = NULL; ++ return num; ++} ++ ++/* ++ * "Parse" out argv and envp from /proc/self/cmdline and /proc/self/environ. ++ * This is necessary because we are running in a context where we don't have a ++ * main() that we can just get the arguments from. ++ */ ++static int fetchve(char ***argv, char ***envp) ++{ ++ char *cmdline = NULL, *environ = NULL; ++ size_t cmdline_size, environ_size; ++ ++ cmdline = read_file("/proc/self/cmdline", &cmdline_size); ++ if (!cmdline) ++ goto error; ++ environ = read_file("/proc/self/environ", &environ_size); ++ if (!environ) ++ goto error; ++ ++ if (parse_xargs(cmdline, cmdline_size, argv) <= 0) ++ goto error; ++ if (parse_xargs(environ, environ_size, envp) <= 0) ++ goto error; ++ ++ return 0; ++ ++error: ++ free(environ); ++ free(cmdline); ++ return -EINVAL; ++} ++ ++static int clone_binary(void) ++{ ++ int binfd, memfd; ++ ssize_t sent = 0; ++ ++#ifdef HAVE_MEMFD_CREATE ++ memfd = memfd_create(RUNC_MEMFD_COMMENT, MFD_CLOEXEC | MFD_ALLOW_SEALING); ++#else ++ memfd = open("/tmp", O_TMPFILE | O_EXCL | O_RDWR | O_CLOEXEC, 0711); ++#endif ++ if (memfd < 0) ++ return -ENOTRECOVERABLE; ++ ++ binfd = open("/proc/self/exe", O_RDONLY | O_CLOEXEC); ++ if (binfd < 0) ++ goto error; ++ ++ sent = sendfile(memfd, binfd, NULL, RUNC_SENDFILE_MAX); ++ close(binfd); ++ if (sent < 0) ++ goto error; ++ ++#ifdef HAVE_MEMFD_CREATE ++ int err = fcntl(memfd, F_ADD_SEALS, RUNC_MEMFD_SEALS); ++ if (err < 0) ++ goto error; ++#else ++ /* Need to re-open "memfd" as read-only to avoid execve(2) giving -EXTBUSY. */ ++ int newfd; ++ char *fdpath = NULL; ++ ++ if (asprintf(&fdpath, "/proc/self/fd/%d", memfd) < 0) ++ goto error; ++ newfd = open(fdpath, O_RDONLY | O_CLOEXEC); ++ free(fdpath); ++ if (newfd < 0) ++ goto error; ++ ++ close(memfd); ++ memfd = newfd; ++#endif ++ return memfd; ++ ++error: ++ close(memfd); ++ return -EIO; ++} ++ ++int ensure_cloned_binary(void) ++{ ++ int execfd; ++ char **argv = NULL, **envp = NULL; ++ ++ /* Check that we're not self-cloned, and if we are then bail. */ ++ int cloned = is_self_cloned(); ++ if (cloned > 0 || cloned == -ENOTRECOVERABLE) ++ return cloned; ++ ++ if (fetchve(&argv, &envp) < 0) ++ return -EINVAL; ++ ++ execfd = clone_binary(); ++ if (execfd < 0) ++ return -EIO; ++ ++ fexecve(execfd, argv, envp); ++ return -ENOEXEC; ++} +diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c +index 28269dfc0..7750af35e 100644 +--- a/libcontainer/nsenter/nsexec.c ++++ b/libcontainer/nsenter/nsexec.c +@@ -534,6 +534,9 @@ void join_namespaces(char *nslist) + free(namespaces); + } + ++/* Defined in cloned_binary.c. */ ++extern int ensure_cloned_binary(void); ++ + void nsexec(void) + { + int pipenum; +@@ -549,6 +552,14 @@ void nsexec(void) + if (pipenum == -1) + return; + ++ /* ++ * We need to re-exec if we are not in a cloned binary. This is necessary ++ * to ensure that containers won't be able to access the host binary ++ * through /proc/self/exe. See CVE-2019-5736. ++ */ ++ if (ensure_cloned_binary() < 0) ++ bail("could not ensure we are a cloned binary"); ++ + /* Parse all of the netlink configuration. */ + nl_parse(pipenum, &config); + diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index f5e4540329..8a5af2e8ea 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -847,15 +847,17 @@ monitor/GPU.") (define-public runc (package (name "runc") - (version "1.0.0-rc5") + (version "1.0.0-rc6") (source (origin (method url-fetch) (uri (string-append "https://github.com/opencontainers/runc/releases/" "download/v" version "/runc.tar.xz")) + (file-name (string-append name "-" version ".tar.xz")) + (patches (search-patches "runc-CVE-2019-5736.patch")) (sha256 (base32 - "081avdzwnqpk368wbaihlzsypaxpj42d7699h7jgp0fks14x4103")))) + "1c7832dq70slkjh8qp2civ1wxhhdd2hrx84pq7db1mmqc9fdr3cc")))) (build-system go-build-system) (arguments '(#:import-path "github.com/opencontainers/runc" -- cgit v1.2.3 From bec2a2e10e199d6ee671ec5713bd103242e91b62 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 12 Feb 2019 23:17:00 +0100 Subject: gnu: Move KDE Plasma components to separate module. * gnu/packages/kde.scm (libkscreen, libksysguard): Move from here ... * gnu/packages/kde-plasma.scm: ... to here. New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. --- gnu/local.mk | 3 +- gnu/packages/kde-plasma.scm | 129 ++++++++++++++++++++++++++++++++++++++++++++ gnu/packages/kde.scm | 103 +---------------------------------- 3 files changed, 133 insertions(+), 102 deletions(-) create mode 100644 gnu/packages/kde-plasma.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 16bb704933..cd1fd6e419 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -253,8 +253,9 @@ GNU_SYSTEM_MODULES = \ %D%/packages/jrnl.scm \ %D%/packages/jose.scm \ %D%/packages/julia.scm \ - %D%/packages/kde.scm \ + %D%/packages/kde.scm \ %D%/packages/kde-frameworks.scm \ + %D%/packages/kde-plasma.scm \ %D%/packages/kerberos.scm \ %D%/packages/key-mon.scm \ %D%/packages/kodi.scm \ diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm new file mode 100644 index 0000000000..ab35eab87a --- /dev/null +++ b/gnu/packages/kde-plasma.scm @@ -0,0 +1,129 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Thomas Danckaert +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages kde-plasma) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cmake) + #:use-module (gnu packages compression) + #:use-module (gnu packages glib) + #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages qt) + #:use-module (gnu packages xorg)) + +(define-public libkscreen + (package + (name "libkscreen") + (version "5.13.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/plasma/" version "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "04719va15i66qn1xqx318v6risxhp8bfcnhxh9mqm5h9qx5c6c4k")))) + (build-system cmake-build-system) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ;; For testing. + ("dbus" ,dbus))) + (inputs + `(("kwayland" ,kwayland) + ("libxrandr" ,libxrandr) + ("qtbase" ,qtbase) + ("qtx11extras" ,qtx11extras))) + (arguments + '(#:tests? #f ; FIXME: 55% tests passed, 5 tests failed out of 11 + #:phases + (modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; For the missing '/etc/machine-id'. + (setenv "DBUS_FATAL_WARNINGS" "0") + ;; Run the tests offscreen. + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))))) + (home-page "https://community.kde.org/Solid/Projects/ScreenManagement") + (synopsis "KDE's screen management software") + (description "KScreen is the new screen management software for KDE Plasma +Workspaces which tries to be as magic and automatic as possible for users with +basic needs and easy to configure for those who want special setups.") + (license license:gpl2+))) + +(define-public libksysguard + (package + (name "libksysguard") + (version "5.13.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde//stable/plasma/" version + "/libksysguard-" version ".tar.xz")) + (sha256 + (base32 + "0k8q5bxk9zyv7c3nny1c399v8acqs618nw39q20pj2qdijl9ibvh")))) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("pkg-config" ,pkg-config))) + (inputs + `(("kconfigwidgets" ,kconfigwidgets) + ("kiconthemes" ,kiconthemes) + ("kwindowsystem" ,kwindowsystem) + ("ki18n" ,ki18n) + ("kauth" ,kauth) + ("kcompletion" ,kcompletion) + ("kconfig" ,kconfig) + ("kcoreaddons" ,kcoreaddons) + ("kwidgetsaddons" ,kwidgetsaddons) + ("kservice" ,kservice) + ("qtbase" ,qtbase) + ("qtscript" ,qtscript) + ("qtwebkit" ,qtwebkit) + ("qtx11extras" ,qtx11extras) + ("plasma" ,plasma-framework) + ("zlib" ,zlib))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + `(,(string-append "-DKDE_INSTALL_DATADIR=" + (assoc-ref %outputs "out") "/share")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-cmakelists + (lambda _ + ;; TODO: Verify: This should no longer be necessary, since + ;; KF5AuthConfig.cmake.in contains this already. + (substitute* "processcore/CMakeLists.txt" + (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR")))) + (add-before 'check 'check-setup + (lambda _ + ;; make Qt render "offscreen", required for tests + (setenv "QT_QPA_PLATFORM" "offscreen"))) + (replace 'check + (lambda _ + ;; TODO: Fix this failing test-case + (invoke "ctest" "-E" "processtest")))))) + (home-page "https://www.kde.org/info/plasma-5.13.4.php") + (synopsis "Network enabled task and system monitoring") + (description "KSysGuard can obtain information on system load and +manage running processes. It obtains this information by interacting +with a ksysguardd daemon, which may also run on a remote system.") + (license license:gpl3+))) + diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 5946ba0b52..ff26b0ea83 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Efraim Flashner -;;; Copyright © 2016, 2017 Thomas Danckaert +;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017, 2018 Mark Meyer ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Gábor Boskovits @@ -36,11 +36,11 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) - #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages graphics) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages kde-plasma) #:use-module (gnu packages llvm) #:use-module (gnu packages maths) #:use-module (gnu packages pdf) @@ -480,105 +480,6 @@ used in KDE development tools Kompare and KDevelop.") ;; source archive (license (list license:gpl2+ license:lgpl2.0+ license:bsd-3)))) -(define-public libkscreen - (package - (name "libkscreen") - (version "5.13.5") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://kde/stable/plasma/" version "/" - name "-" version ".tar.xz")) - (sha256 - (base32 "04719va15i66qn1xqx318v6risxhp8bfcnhxh9mqm5h9qx5c6c4k")))) - (build-system cmake-build-system) - (native-inputs - `(("extra-cmake-modules" ,extra-cmake-modules) - ;; For testing. - ("dbus" ,dbus))) - (inputs - `(("kwayland" ,kwayland) - ("libxrandr" ,libxrandr) - ("qtbase" ,qtbase) - ("qtx11extras" ,qtx11extras))) - (arguments - '(#:tests? #f ; FIXME: 55% tests passed, 5 tests failed out of 11 - #:phases - (modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda _ - ;; For the missing '/etc/machine-id'. - (setenv "DBUS_FATAL_WARNINGS" "0") - ;; Run the tests offscreen. - (setenv "QT_QPA_PLATFORM" "offscreen") - #t))))) - (home-page "https://community.kde.org/Solid/Projects/ScreenManagement") - (synopsis "KDE's screen management software") - (description "KScreen is the new screen management software for KDE Plasma -Workspaces which tries to be as magic and automatic as possible for users with -basic needs and easy to configure for those who want special setups.") - (license license:gpl2+))) - -(define-public libksysguard - (package - (name "libksysguard") - (version "5.13.4") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://kde//stable/plasma/" version - "/libksysguard-" version ".tar.xz")) - (sha256 - (base32 - "0k8q5bxk9zyv7c3nny1c399v8acqs618nw39q20pj2qdijl9ibvh")))) - (native-inputs - `(("extra-cmake-modules" ,extra-cmake-modules) - ("pkg-config" ,pkg-config))) - (inputs - `(("kconfigwidgets" ,kconfigwidgets) - ("kiconthemes" ,kiconthemes) - ("kwindowsystem" ,kwindowsystem) - ("ki18n" ,ki18n) - ("kauth" ,kauth) - ("kcompletion" ,kcompletion) - ("kconfig" ,kconfig) - ("kcoreaddons" ,kcoreaddons) - ("kwidgetsaddons" ,kwidgetsaddons) - ("kservice" ,kservice) - ("qtbase" ,qtbase) - ("qtscript" ,qtscript) - ("qtwebkit" ,qtwebkit) - ("qtx11extras" ,qtx11extras) - ("plasma" ,plasma-framework) - ("zlib" ,zlib))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags - `(,(string-append "-DKDE_INSTALL_DATADIR=" - (assoc-ref %outputs "out") "/share")) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-cmakelists - (lambda _ - ;; TODO: Verify: This should no longer be necessary, since - ;; KF5AuthConfig.cmake.in contains this already. - (substitute* "processcore/CMakeLists.txt" - (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR")))) - (add-before 'check 'check-setup - (lambda _ - ;; make Qt render "offscreen", required for tests - (setenv "QT_QPA_PLATFORM" "offscreen"))) - (replace 'check - (lambda _ - ;; TODO: Fix this failing test-case - (invoke "ctest" "-E" "processtest")))))) - (home-page "https://www.kde.org/info/plasma-5.13.4.php") - (synopsis "Network enabled task and system monitoring") - (description "KSysGuard can obtain information on system load and -manage running processes. It obtains this information by interacting -with a ksysguardd daemon, which may also run on a remote system.") - (license license:gpl3+))) - (define-public qca (package (name "qca") -- cgit v1.2.3 From e7e259a50335269cddd004482a655f59d5c7a237 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 11 Feb 2019 09:28:49 +0000 Subject: gnu: red-eclipse: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a patch from the upstream repository [1] that resolves some errors that prevent the package from building [2]. 1: https://github.com/red-eclipse/base/commit/b16b4963c1ad81bb9ef784bc49 2: error: ‘____gammal_r_finite’ was not declared in this scope * gnu/packages/games.scm (red-eclipse)[source] Add patch. * gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch: New file * gnu/local.mk (dist_patch_DATA): Add new patch. --- gnu/local.mk | 1 + gnu/packages/games.scm | 4 +- .../red-eclipse-remove-gamma-name-hack.patch | 52 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index cd1fd6e419..af0337378c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1197,6 +1197,7 @@ dist_patch_DATA = \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ + %D%/packages/patches/red-eclipse-remove-gamma-name-hack.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/reptyr-fix-gcc-7.patch \ %D%/packages/patches/ripperx-missing-file.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 5d7c89a880..de53ac798d 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2843,7 +2843,9 @@ http://lavachat.symlynx.com/unix/") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1vs9k6f5fgsiy1n72imlqm8khjwm8cryc08zwd4gr7yxlxv45bs0")))) + "1vs9k6f5fgsiy1n72imlqm8khjwm8cryc08zwd4gr7yxlxv45bs0")) + (patches + (search-patches "red-eclipse-remove-gamma-name-hack.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target diff --git a/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch b/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch new file mode 100644 index 0000000000..573920cb99 --- /dev/null +++ b/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch @@ -0,0 +1,52 @@ +From b16b4963c1ad81bb9ef784bc4913a4c8ab5f1bb4 Mon Sep 17 00:00:00 2001 +From: Lee Salzman +Date: Tue, 12 Sep 2017 14:45:10 -0400 +Subject: [PATCH] remove gamma name hack + +--- + src/engine/main.cpp | 6 +++--- + src/shared/cube.h | 8 -------- + 2 files changed, 3 insertions(+), 11 deletions(-) + +diff --git a/src/engine/main.cpp b/src/engine/main.cpp +index 1032004d..77c9233a 100644 +--- a/src/engine/main.cpp ++++ b/src/engine/main.cpp +@@ -278,10 +278,10 @@ static void setgamma(int val) + } + + static int curgamma = 100; +-VARF(IDF_PERSIST, gamma, 30, 100, 300, ++VARFN(IDF_PERSIST, gamma, reqgamma, 30, 100, 300, + { +- if(initing || gamma == curgamma) return; +- curgamma = gamma; ++ if(initing || reqgamma == curgamma) return; ++ curgamma = reqgamma; + setgamma(curgamma); + }); + +diff --git a/src/shared/cube.h b/src/shared/cube.h +index 3864c492..7ff5e267 100644 +--- a/src/shared/cube.h ++++ b/src/shared/cube.h +@@ -3,19 +3,11 @@ + + #define _FILE_OFFSET_BITS 64 + +-#ifdef __GNUC__ +-#define gamma __gamma +-#endif +- + #ifdef WIN32 + #define _USE_MATH_DEFINES + #endif + #include + +-#ifdef __GNUC__ +-#undef gamma +-#endif +- + #include + #include + #include -- cgit v1.2.3 From f90ed0284ad531633576392660bb6bf80d1c4388 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 13 Feb 2019 09:51:49 +0100 Subject: gnu: ledger: Update to 3.1.2 [security fixes]. * gnu/packages/finance.scm (ledger): Update to 3.1.2. [arguments]: Remove #:modules; remove obsolete configure flags; remove make flags; remove phase "boost-compat"; remove custom check phase; remove "relocate-elisp" phase; disable broken test in "check-setup" phase. [native-inputs]: Remove emacs-minimal. [license]: Remove gpl2+. * gnu/packages/patches/ledger-revert-boost-python-fix.patch: Remove patch. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/finance.scm | 55 +++++----------------- .../patches/ledger-revert-boost-python-fix.patch | 39 --------------- 3 files changed, 12 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/patches/ledger-revert-boost-python-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index af0337378c..1780ece26d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -932,7 +932,6 @@ dist_patch_DATA = \ %D%/packages/patches/ldc-bootstrap-disable-tests.patch \ %D%/packages/patches/ldc-disable-phobos-tests.patch \ %D%/packages/patches/ledger-fix-uninitialized.patch \ - %D%/packages/patches/ledger-revert-boost-python-fix.patch \ %D%/packages/patches/liba52-enable-pic.patch \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 36cb508564..340c5b27dc 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -139,7 +139,7 @@ line client and a client based on Qt.") (define-public ledger (package (name "ledger") - (version "3.1.1") + (version "3.1.2") (source (origin (method git-fetch) @@ -148,39 +148,17 @@ line client and a client based on Qt.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1j4p7djkmdmd858hylrsc3inamh9z0vkfl98s9wiqfmrzw51pmxp")) - (patches (search-patches "ledger-revert-boost-python-fix.patch" - "ledger-fix-uninitialized.patch")))) + (base32 "0hwnipj2m9p95hhyv6kyq54m27g14r58gnsy2my883kxhpcyb2vc")) + (patches (search-patches "ledger-fix-uninitialized.patch")))) (build-system cmake-build-system) (arguments - `(#:modules ((guix build cmake-build-system) - ((guix build gnu-build-system) #:prefix gnu:) - (guix build utils) - (guix build emacs-utils)) - #:imported-modules (,@%cmake-build-system-modules - (guix build emacs-utils)) - #:configure-flags + `(#:configure-flags `("-DBUILD_DOCS:BOOL=ON" "-DBUILD_WEB_DOCS:BOOL=ON" - "-DBUILD_EMACSLISP:BOOL=ON" "-DUSE_PYTHON:BOOL=ON" - "-DCMAKE_INSTALL_LIBDIR:PATH=lib" - ,(string-append "-DUTFCPP_INCLUDE_DIR:PATH=" - (assoc-ref %build-inputs "utfcpp") - "/include")) - ;; Skip failing test BaselineTest_cmd-org during the check phase. - ;; This is a known upstream issue. See - ;; https://github.com/ledger/ledger/issues/550 - #:make-flags (list "ARGS=-E BaselineTest_cmd-org") + "-DCMAKE_INSTALL_LIBDIR:PATH=lib") #:phases (modify-phases %standard-phases - (add-after 'unpack 'boost-compat - (lambda _ - (substitute* "src/utils.h" - ;; This library moved in Boost 1.66. Remove for Ledger - ;; versions > 3.1.1. - (("boost/uuid/sha1.hpp") "boost/uuid/detail/sha1.hpp")) - #t)) (add-before 'configure 'install-examples (lambda* (#:key outputs #:allow-other-keys) (let ((examples (string-append (assoc-ref outputs "out") @@ -196,18 +174,11 @@ line client and a client based on Qt.") (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")) - #t)) - (replace 'check (assoc-ref gnu:%standard-phases 'check)) - (add-after 'install 'relocate-elisp - (lambda* (#:key outputs #:allow-other-keys) - (let* ((site-dir (string-append (assoc-ref outputs "out") - "/share/emacs/site-lisp")) - (guix-dir (string-append site-dir "/guix.d")) - (orig-dir (string-append site-dir "/ledger-mode")) - (dest-dir (string-append guix-dir "/ledger-mode"))) - (mkdir-p guix-dir) - (rename-file orig-dir dest-dir) - (emacs-generate-autoloads ,name dest-dir))))))) + ;; Skip failing test BaselineTest_cmd-org. + ;; This is a known upstream issue. See + ;; https://github.com/ledger/ledger/issues/550 + (setenv "ARGS" "-E BaselineTest_cmd-org") + #t))))) (inputs `(("boost" ,boost) ("gmp" ,gmp) @@ -217,8 +188,7 @@ line client and a client based on Qt.") ("tzdata" ,tzdata) ("utfcpp" ,utfcpp))) (native-inputs - `(("emacs" ,emacs-minimal) - ("groff" ,groff) + `(("groff" ,groff) ("texinfo" ,texinfo))) (home-page "https://ledger-cli.org/") (synopsis "Command-line double-entry accounting program") @@ -244,8 +214,7 @@ in ability, and easy to use.") license:asl2.0 ; src/strptime.cc (license:non-copyleft "file://src/wcwidth.cc" - "See src/wcwidth.cc in the distribution.") - license:gpl2+)))) ; lisp/* + "See src/wcwidth.cc in the distribution."))))) (define-public geierlein (package diff --git a/gnu/packages/patches/ledger-revert-boost-python-fix.patch b/gnu/packages/patches/ledger-revert-boost-python-fix.patch deleted file mode 100644 index 99f48f6e46..0000000000 --- a/gnu/packages/patches/ledger-revert-boost-python-fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 01220484f428a447e9b00e071a0d85185f30e1de Mon Sep 17 00:00:00 2001 -From: Alexis Hildebrandt -Date: Wed, 22 Jun 2016 15:43:37 +0200 -Subject: [PATCH] Revert "[python] Add fix for Boost.Python compile errors" - -This reverts commit 11590e134eafa768ccc4a171cc7fb216e906095f. ---- - src/py_commodity.cc | 3 --- - src/py_journal.cc | 3 --- - 2 files changed, 6 deletions(-) - -diff --git a/src/py_commodity.cc b/src/py_commodity.cc -index 5aafa6c..c457e64 100644 ---- a/src/py_commodity.cc -+++ b/src/py_commodity.cc -@@ -243,9 +243,6 @@ namespace { - - void export_commodity() - { --#if BOOST_VERSION >= 106000 -- python::register_ptr_to_python< shared_ptr >(); --#endif - class_< commodity_pool_t, shared_ptr, - boost::noncopyable > ("CommodityPool", no_init) - .add_property("null_commodity", -diff --git a/src/py_journal.cc b/src/py_journal.cc -index c1c38a9..879f954 100644 ---- a/src/py_journal.cc -+++ b/src/py_journal.cc -@@ -232,9 +232,6 @@ void export_journal() - boost::noncopyable >("PostHandler") - ; - --#if BOOST_VERSION >= 106000 -- python::register_ptr_to_python< shared_ptr >(); --#endif - class_< collector_wrapper, shared_ptr, - boost::noncopyable >("PostCollectorWrapper", no_init) - .def("__len__", &collector_wrapper::length) -- cgit v1.2.3 From f73750e6f45959864921bb3ef29b5ff545dc30f8 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 13 Feb 2019 12:46:09 -0600 Subject: gnu: scalapack: Remove use of deprecated MPI1 symbols. * gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (scalapack)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 3 +- .../patches/scalapack-blacs-mpi-deprecations.patch | 170 +++++++++++++++++++++ 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1780ece26d..3d9d334ac6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1215,6 +1215,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ + %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 7d3ac773b3..9fc87860c8 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -584,7 +584,8 @@ problems in numerical linear algebra.") version ".tgz")) (sha256 (base32 - "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c")))) + "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c")) + (patches (search-patches "scalapack-blacs-mpi-deprecations.patch")))) (build-system cmake-build-system) (inputs `(("mpi" ,openmpi) diff --git a/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch b/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch new file mode 100644 index 0000000000..6ec1b8f21f --- /dev/null +++ b/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch @@ -0,0 +1,170 @@ +From f11c3f094ed5ca727ec819983425b6641db8227c Mon Sep 17 00:00:00 2001 +From: Eric Bavier +Date: Wed, 13 Feb 2019 09:32:11 -0600 +Subject: [PATCH] BLACS: Remove use of long-deprecated MPI1 functions. + +* BLACS/SRC/blacs_get_.c: 'MPI_Attr_get' -> 'MPI_Comm_get_attr'. +* BLACS/SRC/cgamn2d_.c, BLACS/SRC/cgamx2d_.c, BLACS/SRC/dgamn2d_.c, +BLACS/SRC/dgamx2d_.c, BLACS/SRC/igamn2d_.c, BLACS/SRC/igamx2d_.c, +BLACS/SRC/sgamn2d_.c, BLACS/SRC/sgamx2d_.c, BLACS/SRC/zgamn2d_.c, +BLACS/SRC/zgamx2d_.c: 'MPI_Type_struct' -> 'MPI_Type_create_struct'. +--- + BLACS/SRC/blacs_get_.c | 2 +- + BLACS/SRC/cgamn2d_.c | 2 +- + BLACS/SRC/cgamx2d_.c | 2 +- + BLACS/SRC/dgamn2d_.c | 2 +- + BLACS/SRC/dgamx2d_.c | 2 +- + BLACS/SRC/igamn2d_.c | 2 +- + BLACS/SRC/igamx2d_.c | 2 +- + BLACS/SRC/sgamn2d_.c | 2 +- + BLACS/SRC/sgamx2d_.c | 2 +- + BLACS/SRC/zgamn2d_.c | 2 +- + BLACS/SRC/zgamx2d_.c | 2 +- + 11 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/BLACS/SRC/blacs_get_.c b/BLACS/SRC/blacs_get_.c +index e979767..d4b04cf 100644 +--- a/BLACS/SRC/blacs_get_.c ++++ b/BLACS/SRC/blacs_get_.c +@@ -23,7 +23,7 @@ F_VOID_FUNC blacs_get_(int *ConTxt, int *what, int *val) + case SGET_MSGIDS: + if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &val[1]); + iptr = &val[1]; +- ierr=MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val); ++ ierr=MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val); + val[0] = 0; + val[1] = *iptr; + break; +diff --git a/BLACS/SRC/cgamn2d_.c b/BLACS/SRC/cgamn2d_.c +index 2db6ccb..6958f32 100644 +--- a/BLACS/SRC/cgamn2d_.c ++++ b/BLACS/SRC/cgamn2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC cgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/cgamx2d_.c b/BLACS/SRC/cgamx2d_.c +index 707c0b6..f802d01 100644 +--- a/BLACS/SRC/cgamx2d_.c ++++ b/BLACS/SRC/cgamx2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC cgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/dgamn2d_.c b/BLACS/SRC/dgamn2d_.c +index dff23b4..a2627ac 100644 +--- a/BLACS/SRC/dgamn2d_.c ++++ b/BLACS/SRC/dgamn2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC dgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/dgamx2d_.c b/BLACS/SRC/dgamx2d_.c +index a51f731..2a644d0 100644 +--- a/BLACS/SRC/dgamx2d_.c ++++ b/BLACS/SRC/dgamx2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC dgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/igamn2d_.c b/BLACS/SRC/igamn2d_.c +index 16bc003..f6a7859 100644 +--- a/BLACS/SRC/igamn2d_.c ++++ b/BLACS/SRC/igamn2d_.c +@@ -218,7 +218,7 @@ F_VOID_FUNC igamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/igamx2d_.c b/BLACS/SRC/igamx2d_.c +index 8165cbe..a7cfcc6 100644 +--- a/BLACS/SRC/igamx2d_.c ++++ b/BLACS/SRC/igamx2d_.c +@@ -218,7 +218,7 @@ F_VOID_FUNC igamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/sgamn2d_.c b/BLACS/SRC/sgamn2d_.c +index d6c95e5..569c797 100644 +--- a/BLACS/SRC/sgamn2d_.c ++++ b/BLACS/SRC/sgamn2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC sgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/sgamx2d_.c b/BLACS/SRC/sgamx2d_.c +index 4b0af6f..8897ece 100644 +--- a/BLACS/SRC/sgamx2d_.c ++++ b/BLACS/SRC/sgamx2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC sgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/zgamn2d_.c b/BLACS/SRC/zgamn2d_.c +index 9de2b23..37897df 100644 +--- a/BLACS/SRC/zgamn2d_.c ++++ b/BLACS/SRC/zgamn2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC zgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +diff --git a/BLACS/SRC/zgamx2d_.c b/BLACS/SRC/zgamx2d_.c +index 414c381..0e9d474 100644 +--- a/BLACS/SRC/zgamx2d_.c ++++ b/BLACS/SRC/zgamx2d_.c +@@ -221,7 +221,7 @@ F_VOID_FUNC zgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n, + { + #endif + i = 2; +- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType); ++ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType); + ierr=MPI_Type_commit(&MyType); + bp->N = bp2->N = 1; + bp->dtype = bp2->dtype = MyType; +-- +2.20.1 + -- cgit v1.2.3