From 13c8e747e86e39c0a8c6ec7da8c812d9bbcb682b Mon Sep 17 00:00:00 2001 From: Jack Hill Date: Wed, 12 Feb 2020 15:33:43 -0500 Subject: gnu: containerd: Fix test failure with Go 1.13. * gnu/packages/docker.scm (containerd)[source]: Add patch. * gnu/packages/patches/containerd-test-with-go1.13.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. --- 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 9a316f6edb..1f7cad9d32 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -794,6 +794,7 @@ dist_patch_DATA = \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \ %D%/packages/patches/combinatorial-blas-io-fix.patch \ + %D%/packages/patches/containerd-test-with-go1.13.patch \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ -- cgit v1.2.3 From f5255ed3d3689c793b87939d30df7e2e3443b004 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 17 Feb 2020 04:55:47 +0100 Subject: gnu: upx: Update to 3.96. * gnu/packages/compression.scm (upx): Update to 3.96. [source]: Remove patch. [arguments]: Remove CHECK_WHITESPACE work-around. [properties]: Remove obsolete hidden CVE. * gnu/packages/patches/upx-fix-CVE-2017-15056.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/compression.scm | 15 +--- gnu/packages/patches/upx-fix-CVE-2017-15056.patch | 96 ----------------------- 3 files changed, 3 insertions(+), 109 deletions(-) delete mode 100644 gnu/packages/patches/upx-fix-CVE-2017-15056.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1f7cad9d32..f2289518e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1465,7 +1465,6 @@ dist_patch_DATA = \ %D%/packages/patches/ustr-fix-build-with-gcc-5.patch \ %D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/upower-builddir.patch \ - %D%/packages/patches/upx-fix-CVE-2017-15056.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index a65e320a9b..3f4b99bfcf 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1903,15 +1903,14 @@ decompression is a little bit slower.") (define-public upx (package (name "upx") - (version "3.94") + (version "3.96") (source (origin (method url-fetch) (uri (string-append "https://github.com/upx/upx/releases/download/v" version "/upx-" version "-src.tar.xz")) (sha256 (base32 - "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1")) - (patches (search-patches "upx-fix-CVE-2017-15056.patch")))) + "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) @@ -1920,10 +1919,7 @@ decompression is a little bit slower.") ("zlib" ,zlib))) (arguments `(#:make-flags - (list "all" - ;; CHECK_WHITESPACE does not seem to work. - ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/upx. - "CHECK_WHITESPACE=true") + (list "all") #:phases (modify-phases %standard-phases (delete 'configure) @@ -1945,11 +1941,6 @@ decompression is a little bit slower.") #t)) ))) (home-page "https://upx.github.io/") - ;; CVE-2017-16869 is about Mach-O files which is not of a big concern for Guix. - ;; See https://github.com/upx/upx/issues/146 and - ;; https://nvd.nist.gov/vuln/detail?vulnId=CVE-2017-16869. - ;; The issue will be fixed after version 3.94. - (properties `((lint-hidden-cve . ("CVE-2017-16869")))) (synopsis "Compression tool for executables") (description "The Ultimate Packer for eXecutables (UPX) is an executable file diff --git a/gnu/packages/patches/upx-fix-CVE-2017-15056.patch b/gnu/packages/patches/upx-fix-CVE-2017-15056.patch deleted file mode 100644 index 525980e73e..0000000000 --- a/gnu/packages/patches/upx-fix-CVE-2017-15056.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 3e0c2966dffb5dadb512a476ef4be3d0cc51c2be Mon Sep 17 00:00:00 2001 -From: Pierre Neidhardt -Date: Sat, 16 Jun 2018 16:35:00 +0200 -Subject: [PATCH] Protect against bad crafted input - -Also check for wrap-around when checking oversize involving e_shoff and e_shnum. - -raised by https://github.com/upx/upx/pull/190 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index 822a7652..41e805ee 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -235,8 +235,17 @@ PackLinuxElf32::PackLinuxElf32help1(InputFile *f) - sz_phdrs = 0; - return; - } -+ if (0==e_phnum) throwCantUnpack("0==e_phnum"); - e_phoff = get_te32(&ehdri.e_phoff); -+ unsigned const last_Phdr = e_phoff + e_phnum * sizeof(Elf32_Phdr); -+ if (last_Phdr < e_phoff || (unsigned long)file_size < last_Phdr) { -+ throwCantUnpack("bad e_phoff"); -+ } - e_shoff = get_te32(&ehdri.e_shoff); -+ unsigned const last_Shdr = e_shoff + e_shnum * sizeof(Elf32_Shdr); -+ if (last_Shdr < e_shoff || (unsigned long)file_size < last_Shdr) { -+ throwCantUnpack("bad e_shoff"); -+ } - sz_phdrs = e_phnum * e_phentsize; - - if (f && Elf32_Ehdr::ET_DYN!=e_type) { -@@ -599,8 +608,17 @@ PackLinuxElf64::PackLinuxElf64help1(InputFile *f) - sz_phdrs = 0; - return; - } -+ if (0==e_phnum) throwCantUnpack("0==e_phnum"); - e_phoff = get_te64(&ehdri.e_phoff); -+ upx_uint64_t const last_Phdr = e_phoff + e_phnum * sizeof(Elf64_Phdr); -+ if (last_Phdr < e_phoff || (unsigned long)file_size < last_Phdr) { -+ throwCantUnpack("bad e_phoff"); -+ } - e_shoff = get_te64(&ehdri.e_shoff); -+ upx_uint64_t const last_Shdr = e_shoff + e_shnum * sizeof(Elf64_Shdr); -+ if (last_Shdr < e_shoff || (unsigned long)file_size < last_Shdr) { -+ throwCantUnpack("bad e_shoff"); -+ } - sz_phdrs = e_phnum * e_phentsize; - - if (f && Elf64_Ehdr::ET_DYN!=e_type) { -@@ -3763,6 +3781,9 @@ void PackLinuxElf64::pack4(OutputFile *fo, Filter &ft) - - void PackLinuxElf64::unpack(OutputFile *fo) - { -+ if (e_phoff != sizeof(Elf64_Ehdr)) {// Phdrs not contiguous with Ehdr -+ throwCantUnpack("bad e_phoff"); -+ } - unsigned const c_phnum = get_te16(&ehdri.e_phnum); - upx_uint64_t old_data_off = 0; - upx_uint64_t old_data_len = 0; -@@ -3828,6 +3849,9 @@ void PackLinuxElf64::unpack(OutputFile *fo) - unsigned total_out = 0; - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); -+ if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { -+ throwCantUnpack("bad compressed e_phnum"); -+ } - - // Packed ET_EXE has no PT_DYNAMIC. - // Packed ET_DYN has original PT_DYNAMIC for info needed by rtld. -@@ -4383,6 +4407,9 @@ Elf64_Sym const *PackLinuxElf64::elf_lookup(char const *name) const - - void PackLinuxElf32::unpack(OutputFile *fo) - { -+ if (e_phoff != sizeof(Elf32_Ehdr)) {// Phdrs not contiguous with Ehdr -+ throwCantUnpack("bad e_phoff"); -+ } - unsigned const c_phnum = get_te16(&ehdri.e_phnum); - unsigned old_data_off = 0; - unsigned old_data_len = 0; -@@ -4449,6 +4476,9 @@ void PackLinuxElf32::unpack(OutputFile *fo) - unsigned total_out = 0; - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); -+ if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { -+ throwCantUnpack("bad compressed e_phnum"); -+ } - - // Packed ET_EXE has no PT_DYNAMIC. - // Packed ET_DYN has original PT_DYNAMIC for info needed by rtld. --- -2.17.0 - -- cgit v1.2.3 From c080beb9c7d0e6b3d1405dd72e32cf8ef40815d5 Mon Sep 17 00:00:00 2001 From: Jakub Kądziołka Date: Sat, 22 Feb 2020 00:09:52 +0100 Subject: gnu: choqok: Update to 1.7.0. * gnu/packages/kde-internet.scm (choqok): Update to 1.7.0. (inputs): Add purpose, qtnetworkauth. (source): Don't apply patch. * gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch: Remove (no longer needed). --- gnu/local.mk | 1 - gnu/packages/kde-internet.scm | 7 +- .../choqok-Fix-building-under-Qt-5.13.patch | 89 ---------------------- 3 files changed, 4 insertions(+), 93 deletions(-) delete mode 100644 gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f2289518e5..c26ea40a90 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -774,7 +774,6 @@ dist_patch_DATA = \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ %D%/packages/patches/ceph-volume-respect-PATH.patch \ %D%/packages/patches/chmlib-inttypes.patch \ - %D%/packages/patches/choqok-Fix-building-under-Qt-5.13.patch \ %D%/packages/patches/clamav-config-llvm-libs.patch \ %D%/packages/patches/clamav-system-tomsfastmath.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ diff --git a/gnu/packages/kde-internet.scm b/gnu/packages/kde-internet.scm index 0d5b9788b8..12aa9fe53a 100644 --- a/gnu/packages/kde-internet.scm +++ b/gnu/packages/kde-internet.scm @@ -51,7 +51,7 @@ (define-public choqok (package (name "choqok") - (version "1.6.0") + (version "1.7.0") (source (origin (method url-fetch) @@ -59,8 +59,7 @@ (version-major+minor version) "/src/choqok-" version ".tar.xz")) (sha256 - (base32 "03ri4y1wzyqlixnhczsls5gmy7jzzm67bb5gz8bav51ngc32fxca")) - (patches (search-patches "choqok-Fix-building-under-Qt-5.13.patch")))) + (base32 "0zm4nkpmvd181xlkis7ydzx54p3vn0zgpdzgh54f1hsjy6ahsq16")))) (build-system qt-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) @@ -86,9 +85,11 @@ ("kxmlgui" ,kxmlgui) ;; TODO: telepathy ("oxygen-icons" ,oxygen-icons) ; default icon set + ("purpose" ,purpose) ("qca" ,qca) ("qoauth" ,qoauth) ("qtbase" ,qtbase) + ("qtnetworkauth" ,qtnetworkauth) ("qtwebkit" ,qtwebkit) ("sonnet" ,sonnet))) (home-page "https://kde.org/applications/internet/org.kde.choqok") diff --git a/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch b/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch deleted file mode 100644 index 4250106a19..0000000000 --- a/gnu/packages/patches/choqok-Fix-building-under-Qt-5.13.patch +++ /dev/null @@ -1,89 +0,0 @@ -Add QMap include to fix building under Qt 5.13 - -This combines several patches which all add the same missing include: -- e13ab06f65a4e8b6259bccda1401abb9c1c9fdca -- 546ede9ef712bb1b156a55ce30df81c3203dde61 -- 08fb06b63a78888e6703de6ac1a4fd6a0e2791eb -- bef6784596bf0b41287ebad81f138e1c8c2a6be2 - -Include is no longer added transitively. ---- - ---- a/plugins/betternotify/notify.h -+++ b/plugins/betternotify/notify.h -@@ -23,6 +23,7 @@ - #ifndef NOTIFY_H - #define NOTIFY_H - -+#include - #include - #include - #include ---- a/plugins/untiny/untiny.h -+++ b/plugins/untiny/untiny.h -@@ -27,6 +27,7 @@ - - #include "plugin.h" - -+#include - #include - #include - #include ---- a/plugins/uploaders/flickr/flickr.h -+++ b/plugins/uploaders/flickr/flickr.h -@@ -26,6 +26,8 @@ - - #include "uploader.h" - -+#include -+ - /** - @author Andrey Esin \ - */ -diff --git a/plugins/uploaders/imageshack/imageshack.h b/plugins/uploaders/imageshack/imageshack.h -index d9ddc88..63d0e3f 100644 ---- a/plugins/uploaders/imageshack/imageshack.h -+++ b/plugins/uploaders/imageshack/imageshack.h -@@ -26,6 +26,8 @@ - - #include "uploader.h" - -+#include -+ - /** - @author Mehrdad Momeny \ - */ ---- a/plugins/uploaders/mobypicture/mobypicture.h -+++ b/plugins/uploaders/mobypicture/mobypicture.h -@@ -26,6 +26,8 @@ - - #include "uploader.h" - -+#include -+ - class KJob; - - class Mobypicture : public Choqok::Uploader ---- a/plugins/uploaders/posterous/posterous.h -+++ b/plugins/uploaders/posterous/posterous.h -@@ -26,6 +26,8 @@ - - #include "uploader.h" - -+#include -+ - class KJob; - - class Posterous : public Choqok::Uploader ---- a/plugins/uploaders/twitgoo/twitgoo.h -+++ b/plugins/uploaders/twitgoo/twitgoo.h -@@ -26,6 +26,8 @@ - - #include "uploader.h" - -+#include -+ - class KJob; - - class Twitgoo : public Choqok::Uploader --- -- cgit v1.2.3 From f267420707142dc17f8e9f976f98447697823c85 Mon Sep 17 00:00:00 2001 From: raingloom Date: Wed, 19 Feb 2020 14:36:26 +0100 Subject: gnu: desmume: fix build on new GCC versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emulation.scm (desmume): add patches * gnu/packages/patches/desmume-gcc6-fixes.patch: new file * gnu/packages/patches/desmume-gcc7-fixes.patch: new file * gnu/local.mk (dist_patch_DATA): register the above Note: desmume-gcc6-fixes.patch contains some CRLF line endings. Signed-off-by: Jakub Kądziołka --- gnu/local.mk | 2 + gnu/packages/emulators.scm | 4 +- gnu/packages/patches/desmume-gcc6-fixes.patch | 59 +++++++++++++++++++++++++++ gnu/packages/patches/desmume-gcc7-fixes.patch | 18 ++++++++ 4 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/desmume-gcc6-fixes.patch create mode 100644 gnu/packages/patches/desmume-gcc7-fixes.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c26ea40a90..94b07c93b2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -809,6 +809,8 @@ dist_patch_DATA = \ %D%/packages/patches/debops-constants-for-external-program-names.patch \ %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ + %D%/packages/patches/desmume-gcc6-fixes.patch \ + %D%/packages/patches/desmume-gcc7-fixes.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 92e50d1484..5e1ab6cb3f 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -102,7 +102,9 @@ version "/desmume-" version ".tar.gz")) (sha256 (base32 - "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")))) + "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")) + (patches (search-patches "desmume-gcc6-fixes.patch" + "desmume-gcc7-fixes.patch")))) (build-system gnu-build-system) (arguments ;; Enable support for WiFi and microphone. diff --git a/gnu/packages/patches/desmume-gcc6-fixes.patch b/gnu/packages/patches/desmume-gcc6-fixes.patch new file mode 100644 index 0000000000..6eb9576f64 --- /dev/null +++ b/gnu/packages/patches/desmume-gcc6-fixes.patch @@ -0,0 +1,59 @@ +From: zeromus +Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430 +Subject: fix GCC6 issues +Bug: https://sourceforge.net/p/desmume/bugs/1570/ +Bug-Debian: http://bugs.debian.org/811691 + +Index: desmume/src/MMU_timing.h +=================================================================== +--- desmume/src/MMU_timing.h (revision 5513) ++++ desmume/src/MMU_timing.h (revision 5517) +@@ -155,8 +155,8 @@ + enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT }; + enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT }; + enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT }; +- enum { TAGMASK = (u32)(~0 << TAGSHIFT) }; +- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) }; ++ enum { TAGMASK = (u32)(~0U << TAGSHIFT) }; ++ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) }; + enum { WORDSIZE = sizeof(u32) }; + enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE }; + enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY }; +Index: desmume/src/ctrlssdl.cpp +=================================================================== +--- desmume/src/ctrlssdl.cpp (revision 5513) ++++ desmume/src/ctrlssdl.cpp (revision 5517) +@@ -200,7 +200,7 @@ + break; + case SDL_JOYAXISMOTION: + /* Dead zone of 50% */ +- if( (abs(event.jaxis.value) >> 14) != 0 ) ++ if( ((u32)abs(event.jaxis.value) >> 14) != 0 ) + { + key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1); + if (event.jaxis.value > 0) { +@@ -370,7 +370,7 @@ + Note: button constants have a 1bit offset. */ + case SDL_JOYAXISMOTION: + key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1); +- if( (abs(event->jaxis.value) >> 14) != 0 ) ++ if( ((u32)abs(event->jaxis.value) >> 14) != 0 ) + { + if (event->jaxis.value > 0) + key_code |= 1; +Index: desmume/src/wifi.cpp +=================================================================== +--- desmume/src/wifi.cpp (revision 5429) ++++ desmume/src/wifi.cpp (revision 5430) +@@ -320,9 +320,9 @@ + + #if (WIFI_LOGGING_LEVEL >= 1) + #if WIFI_LOG_USE_LOGC +- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__); ++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__); + #else +- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__); ++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__); + #endif + #else + #define WIFI_LOG(level, ...) {} diff --git a/gnu/packages/patches/desmume-gcc7-fixes.patch b/gnu/packages/patches/desmume-gcc7-fixes.patch new file mode 100644 index 0000000000..a4934ff6e6 --- /dev/null +++ b/gnu/packages/patches/desmume-gcc7-fixes.patch @@ -0,0 +1,18 @@ +From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001 +From: rogerman +Date: Mon, 17 Aug 2015 21:15:04 +0000 +Subject: Fix bug with libfat string handling. + +diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp +index 765d7ae5..b6d7f01f 100644 +--- a/src/utils/libfat/directory.cpp ++++ b/src/utils/libfat/directory.cpp +@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len + int bytes; + size_t count = 0; + +- while (count < len-1 && src != '\0') { ++ while (count < len-1 && *src != '\0') { + bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps); + if (bytes > 0) { + *dst = (ucs2_t)tempChar; -- cgit v1.2.3 From 233deb82f3b1c9b66b33b709426ab76bd274bb75 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 21 Feb 2020 17:07:39 +0100 Subject: gnu: clang@9: Fix search path handling. * gnu/packages/patches/clang-9.0-libc-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/llvm.scm (clang-9): Add #:patches. --- gnu/local.mk | 1 + gnu/packages/llvm.scm | 5 +- .../patches/clang-9.0-libc-search-path.patch | 83 ++++++++++++++++++++++ 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/clang-9.0-libc-search-path.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 94b07c93b2..412bcb0dd4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -781,6 +781,7 @@ dist_patch_DATA = \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ %D%/packages/patches/clang-6.0-libc-search-path.patch \ %D%/packages/patches/clang-7.0-libc-search-path.patch \ + %D%/packages/patches/clang-9.0-libc-search-path.patch \ %D%/packages/patches/clang-runtime-asan-build-fixes.patch \ %D%/packages/patches/clang-runtime-esan-build-fixes.patch \ %D%/packages/patches/classpath-aarch64-support.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index a6f779e7f8..e7b196be86 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Dennis Mungai ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2017 Roel Janssen -;;; Copyright © 2018, 2019 Marius Bakke +;;; Copyright © 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2018 Tim Gesthuizen @@ -479,7 +479,8 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.") (define-public clang-9 (clang-from-llvm llvm-9 clang-runtime-9 - "0426ma80i41qsgzm1qdz81mjskck426diygxi2k5vji2gkpixa3v")) + "0426ma80i41qsgzm1qdz81mjskck426diygxi2k5vji2gkpixa3v" + #:patches '("clang-9.0-libc-search-path.patch"))) (define-public clang-toolchain-9 (make-clang-toolchain clang-9)) diff --git a/gnu/packages/patches/clang-9.0-libc-search-path.patch b/gnu/packages/patches/clang-9.0-libc-search-path.patch new file mode 100644 index 0000000000..be34344842 --- /dev/null +++ b/gnu/packages/patches/clang-9.0-libc-search-path.patch @@ -0,0 +1,83 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on non-GuixSD systems. + +diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -240,6 +240,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + .str()); + } + ++// Comment out the distro-specific tweaks so that they don't bite when ++// using Guix on a foreign distro. ++#if 0 + Distro Distro(D.getVFS()); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -306,6 +309,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + if (IsAndroid || Distro.IsOpenSUSE()) + ExtraOpts.push_back("--enable-new-dtags"); ++#endif + + // The selection of paths to try here is designed to match the patterns which + // the GCC driver itself uses, as this is part of the GCC-compatible driver. +@@ -363,7 +367,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + // the cross. Note that GCC does include some of these directories in some + // configurations but this seems somewhere between questionable and simply + // a bug. +- if (StringRef(LibPath).startswith(SysRoot)) { ++ if (0) { + addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths); + addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths); + } +@@ -382,6 +386,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths); + addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); + ++// This requires the commented distro tweaks above. ++#if 0 + if (IsAndroid) { + // Android sysroots contain a library directory for each supported OS + // version as well as some unversioned libraries in the usual multiarch +@@ -410,10 +416,15 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths); + addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths); + } ++#endif + + // Try walking via the GCC triple path in case of biarch or multiarch GCC + // installations with strange symlinks. + if (GCCInstallation.isValid()) { ++ ++// The following code would end up adding things like ++// "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path. ++#if 0 + addPathIfExists(D, + SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() + + "/../../" + OSLibDir, +@@ -426,6 +437,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + BiarchSibling.gccSuffix(), + Paths); + } ++#endif + + // See comments above on the multilib variant for details of why this is + // included even from outside the sysroot. +@@ -450,8 +462,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + if (StringRef(D.Dir).startswith(SysRoot)) + addPathIfExists(D, D.Dir + "/../lib", Paths); + +- addPathIfExists(D, SysRoot + "/lib", Paths); +- addPathIfExists(D, SysRoot + "/usr/lib", Paths); ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); + } + + ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const { -- cgit v1.2.3 From e2546bb472b6285a8856cacf686c5e0ce9bb62c5 Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 21 Feb 2020 21:13:47 -0800 Subject: gnu: qtbase: Add variant that fixes file name handling in CMake macros. * gnu/packages/patches/qtbase-QTBUG-81715.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/qt.scm (qtbase-patched): New public variable. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/patches/qtbase-QTBUG-81715.patch | 40 +++++++++++++++++++++++++++ gnu/packages/qt.scm | 13 +++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/qtbase-QTBUG-81715.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 412bcb0dd4..b85c289c4e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1355,6 +1355,7 @@ dist_patch_DATA = \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ + %D%/packages/patches/qtbase-QTBUG-81715.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ diff --git a/gnu/packages/patches/qtbase-QTBUG-81715.patch b/gnu/packages/patches/qtbase-QTBUG-81715.patch new file mode 100644 index 0000000000..70b83b97d2 --- /dev/null +++ b/gnu/packages/patches/qtbase-QTBUG-81715.patch @@ -0,0 +1,40 @@ +From 8a3fde00bf53d99e9e4853e8ab97b0e1bcf74915 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Wed, 29 Jan 2020 11:06:35 +0100 +Subject: [PATCH] Fix qt5_make_output_file macro for paths containing dots + +Commit 89bd5a7e broke CMake projects that use dots in their build +paths, because the used regular expression matches the directory part +of the path as well. + +The regex wants to achieve the same as get_filename_component(... +NAME_WLE) which is available since CMake 3.14. Re-implement the +NAME_WLE functionality for older CMake versions by using multiple +get_filename_component calls. + +Fixes: QTBUG-81715 +Task-number: QTBUG-80295 +Change-Id: I2ef053300948f6e1b2c0c5eafac35105f193d4e6 +Reviewed-by: Alexandru Croitor +--- + +diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake +index 7735e51..b3da640 100644 +--- a/src/corelib/Qt5CoreMacros.cmake ++++ b/src/corelib/Qt5CoreMacros.cmake +@@ -59,7 +59,14 @@ + set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") + string(REPLACE ".." "__" _outfile ${_outfile}) + get_filename_component(outpath ${_outfile} PATH) +- string(REGEX REPLACE "\\.[^.]*$" "" _outfile ${_outfile}) ++ if(CMAKE_VERSION VERSION_LESS "3.14") ++ get_filename_component(_outfile_ext ${_outfile} EXT) ++ get_filename_component(_outfile_ext ${_outfile_ext} NAME_WE) ++ get_filename_component(_outfile ${_outfile} NAME_WE) ++ string(APPEND _outfile ${_outfile_ext}) ++ else() ++ get_filename_component(_outfile ${_outfile} NAME_WLE) ++ endif() + file(MAKE_DIRECTORY ${outpath}) + set(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) + endmacro() diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 466c6ba358..7aa9d0f0f9 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -598,6 +598,19 @@ developers using C++ or QML, a CSS & JavaScript like language.") developers using C++ or QML, a CSS & JavaScript like language.") (license (list license:lgpl2.1 license:lgpl3)))) +;; This variant fixes a problem with the CMake macros shipped by qtbase. See +;; discussion at . +(define-public qtbase-patched + (let ((src (package-source qtbase))) + (hidden-package + (package + (inherit qtbase) + (source + (origin + (inherit src) + (patches + (append (search-patches "qtbase-QTBUG-81715.patch") + (origin-patches src))))))))) ;; qt used to refer to the monolithic Qt 5.x package (define-deprecated qt qtbase) -- cgit v1.2.3