From 808e4c141ef270cf0787690fbfff906f36f164cc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 10 Jan 2021 15:10:26 +0200 Subject: gnu: tipp10: Build with qt-5. * gnu/packages/education.scm (tipp10)[source]: Add new patches. [inputs]: Remove qt-4, sqlite. Add qtbase, qtmultimedia. * gnu/packages/patches/tipp10-disable-downloader.patch, gnu/packages/patches/tipp10-qt5.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. --- .../patches/tipp10-disable-downloader.patch | 165 +++++++++++++++++++++ gnu/packages/patches/tipp10-qt5.patch | 69 +++++++++ 2 files changed, 234 insertions(+) create mode 100644 gnu/packages/patches/tipp10-disable-downloader.patch create mode 100644 gnu/packages/patches/tipp10-qt5.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/tipp10-disable-downloader.patch b/gnu/packages/patches/tipp10-disable-downloader.patch new file mode 100644 index 0000000000..4917a927f9 --- /dev/null +++ b/gnu/packages/patches/tipp10-disable-downloader.patch @@ -0,0 +1,165 @@ +https://salsa.debian.org/debian/tipp10/-/raw/debian/2.1.0-5/debian/patches/disable_downloaders.patch + +Author: Reiner Herrmann +Description: Disable downloaders + This makes porting to Qt5 much easier, as QHttp is no longer available. + But the functionality was not enabled anyway or is no longer useful. + . + - checkversion.h/.cpp: + At startup (while loading settings), Tipp10 "phones home" to do an + update check (www.tipp10.com/update/version.tipp10v210). + For a packaged software and one that is no longer being developed, + this does not make much sense. + - updatedialog.h/.cpp: + Can download newer sqlite database (www.tipp10.com/update/sql.tipp10v210.utf), + but this file is no longer available on the server (404). + The update action has also not been enabled in the menu, so the update + functionality was currently not active: + widget/mainwindow.cpp:143: //fileMenu->addAction(updateAction); + - downloaddialog.h/.cpp: + Allows downloading lessons from user-specified location. + But the action (widget/startwidget.cpp -> lessonDownload) has not been part + of any menu, so it was also not in use. + +--- a/tipp10.pro ++++ b/tipp10.pro +@@ -15,7 +15,6 @@ + INCLUDEPATH += . + CONFIG += qt + QT += sql +-QT += network + RC_FILE += tipp10.rc + RESOURCES += tipp10.qrc + HEADERS += def/defines.h \ +@@ -36,15 +35,12 @@ + widget/settingspages.h \ + widget/lessondialog.h \ + widget/regexpdialog.h \ +- widget/downloaddialog.h \ + widget/lessonprintdialog.h \ + widget/lessonresult.h \ +- widget/updatedialog.h \ + widget/helpbrowser.h \ + widget/companylogo.h \ + widget/errormessage.h \ + widget/txtmessagedialog.h \ +- widget/checkversion.h \ + sql/connection.h \ + sql/lessontablesql.h \ + sql/chartablesql.h \ +@@ -70,15 +66,12 @@ + widget/settingspages.cpp \ + widget/lessondialog.cpp \ + widget/regexpdialog.cpp \ +- widget/downloaddialog.cpp \ + widget/lessonprintdialog.cpp \ + widget/lessonresult.cpp \ +- widget/updatedialog.cpp \ + widget/helpbrowser.cpp \ + widget/companylogo.cpp \ + widget/errormessage.cpp \ + widget/txtmessagedialog.cpp \ +- widget/checkversion.cpp \ + sql/lessontablesql.cpp \ + sql/chartablesql.cpp \ + sql/trainingsql.cpp \ +--- a/widget/mainwindow.cpp ++++ b/widget/mainwindow.cpp +@@ -41,11 +41,9 @@ + + #include "mainwindow.h" + #include "settingsdialog.h" +-#include "updatedialog.h" + #include "def/defines.h" + #include "def/errordefines.h" + #include "errormessage.h" +-#include "checkversion.h" + + MainWindow::MainWindow() { + trainingStarted = false; +@@ -214,8 +212,8 @@ + } + + void MainWindow::showUpdate() { +- UpdateDialog updateDialog(this); +- updateDialog.exec(); ++ //UpdateDialog updateDialog(this); ++ //updateDialog.exec(); + // Fill lesson list after online update + startWidget->fillLessonList(false); + } +@@ -486,6 +484,7 @@ + settings.endGroup(); + + settings.beginGroup("general"); ++#if 0 + if (settings.value("check_new_version", true).toBool()) { + + QDate lastVersionCheck = settings.value("last_version_check").toDate(); +@@ -499,6 +498,7 @@ + } + settings.setValue("last_version_check", today); + } ++#endif + settings.endGroup(); + } + +--- a/widget/settingspages.cpp ++++ b/widget/settingspages.cpp +@@ -581,7 +581,7 @@ + + // Layout of group box vertical + QVBoxLayout *layout = new QVBoxLayout; +- layout->addWidget(checkNewVersion); ++ //layout->addWidget(checkNewVersion); + layout->addSpacing(1); + layout->addWidget(checkNativeStyle); + layout->setMargin(16); +@@ -610,7 +610,6 @@ + checkIntelligence->setChecked(settings.value("check_toggle_intelligence", true).toBool()); + checkLimitLesson->setChecked(settings.value("check_limit_lesson", true).toBool()); + checkLessonPublish->setChecked(settings.value("check_lesson_publish", true).toBool()); +- checkNewVersion->setChecked(settings.value("check_new_version", true).toBool()); + checkNativeStyle->setChecked(settings.value("check_native_style", false).toBool()); + settings.endGroup(); + } +@@ -636,7 +635,6 @@ + settings.setValue("check_limit_lesson", checkLimitLesson->isChecked()); + settings.setValue("check_lesson_publish", checkLessonPublish->isChecked()); + settings.setValue("check_native_style", checkNativeStyle->isChecked()); +- settings.setValue("check_new_version", checkNewVersion->isChecked()); + settings.endGroup(); + + return requireRestart; +--- a/widget/startwidget.cpp ++++ b/widget/startwidget.cpp +@@ -43,12 +43,10 @@ + + #include "startwidget.h" + #include "sql/startsql.h" +-#include "updatedialog.h" + #include "def/defines.h" + #include "def/errordefines.h" + #include "errormessage.h" + #include "lessondialog.h" +-#include "downloaddialog.h" + #include "illustrationdialog.h" + #include "txtmessagedialog.h" + +@@ -1048,7 +1046,7 @@ + } + + void StartWidget::clickDownloadLesson() { +- ++#if 0 + QStringList lessonData; + + DownloadDialog downloadDialog(&lessonData, this); +@@ -1083,6 +1081,7 @@ + } + } + } ++#endif + } + + void StartWidget::clickEditLesson() { diff --git a/gnu/packages/patches/tipp10-qt5.patch b/gnu/packages/patches/tipp10-qt5.patch new file mode 100644 index 0000000000..34ad5cd708 --- /dev/null +++ b/gnu/packages/patches/tipp10-qt5.patch @@ -0,0 +1,69 @@ +https://salsa.debian.org/debian/tipp10/-/raw/debian/2.1.0-5/debian/patches/qt5.patch + +Author: Reiner Herrmann +Description: Port to Qt5 +Bug-Debian: https://bugs.debian.org/875207 + +--- a/tipp10.pro ++++ b/tipp10.pro +@@ -14,6 +14,7 @@ + DEPENDPATH += . + INCLUDEPATH += . + CONFIG += qt ++QT += widgets multimedia printsupport + QT += sql + RC_FILE += tipp10.rc + RESOURCES += tipp10.qrc +--- a/main.cpp ++++ b/main.cpp +@@ -24,7 +24,6 @@ + ****************************************************************/ + + #include +-#include + #include + #include + #include +@@ -212,7 +211,7 @@ + + // Set windows style + if (!useNativeStyle) { +- app.setStyle("plastique"); ++ app.setStyle("fusion"); + } + + // Translation +--- a/games/abcrainwidget.cpp ++++ b/games/abcrainwidget.cpp +@@ -235,8 +235,7 @@ + charballs.last()->wind = (qrand() % 8) + 2; + charballs.last()->rad = 0; + +- chartext.append(new QGraphicsTextItem(QString(characterTemp), +- charballs.last(), scene)); ++ chartext.append(new QGraphicsTextItem(QString(characterTemp), charballs.last())); + chartext.last()->setFont(QFont("Courier", 16, 100)); + chartext.last()->setPos(-(chartext.last()->boundingRect().width() / 2), -(chartext.last()->boundingRect().height() / 2)); + +--- a/sql/chartablesql.cpp ++++ b/sql/chartablesql.cpp +@@ -137,7 +137,7 @@ + sortColumn(4); + + headerview->setStretchLastSection(true); +- headerview->setResizeMode(QHeaderView::Interactive); ++ headerview->setSectionResizeMode(QHeaderView::Interactive); + headerview->setSortIndicatorShown(true); + + // Resize the columns +--- a/sql/lessontablesql.cpp ++++ b/sql/lessontablesql.cpp +@@ -202,7 +202,7 @@ + sortColumn(-1); + + headerview->setStretchLastSection(true); +- headerview->setResizeMode(QHeaderView::Interactive); ++ headerview->setSectionResizeMode(QHeaderView::Interactive); + headerview->setSortIndicatorShown(true); + + // Resize the columns -- cgit v1.2.3 From 21cf0d36db9f02b3da976088b5ab466822d16625 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 11 Jan 2021 11:29:00 +0100 Subject: gnu: guile: Fix tests on emulated architectures. The stack overflow test limits the virtual memory size using setrlimit with RLIMIT_AS argument. This is ignored when using QEMU transparent emulation, causing the test to crash. * gnu/packages/patches/guile-2.2-skip-so-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/guile.scm (guile-3.0-latest): Add it. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 23 +++++++++++++---------- gnu/packages/patches/guile-2.2-skip-so-test.patch | 23 +++++++++++++++++++++++ 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/guile-2.2-skip-so-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index dea7b3a906..a41795d8aa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1126,6 +1126,7 @@ dist_patch_DATA = \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ + %D%/packages/patches/guile-2.2-skip-so-test.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-2.2-default-utf8.patch \ %D%/packages/patches/guile-relocatable.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 1c983e50eb..dfba797b79 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -310,16 +310,19 @@ without requiring the source code to be rewritten.") (define-public guile-3.0-latest ;; TODO: Make this 'guile-3.0' on the next rebuild cycle. - (package - (inherit guile-3.0) - (version "3.0.5") - (source (origin - (inherit (package-source guile-3.0)) - (uri (string-append "mirror://gnu/guile/guile-" - version ".tar.xz")) - (sha256 - (base32 - "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid")))))) + (package-with-extra-patches + (package + (inherit guile-3.0) + (version "3.0.5") + (source (origin + (inherit (package-source guile-3.0)) + (uri (string-append "mirror://gnu/guile/guile-" + version ".tar.xz")) + (sha256 + (base32 + "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid"))))) + ;; Remove on the next rebuild cycle. + (search-patches "guile-2.2-skip-so-test.patch"))) (define-public guile-next (deprecated-package "guile-next" guile-3.0)) diff --git a/gnu/packages/patches/guile-2.2-skip-so-test.patch b/gnu/packages/patches/guile-2.2-skip-so-test.patch new file mode 100644 index 0000000000..e7c2594e91 --- /dev/null +++ b/gnu/packages/patches/guile-2.2-skip-so-test.patch @@ -0,0 +1,23 @@ +Skip 'test-stack-overflow' that crashes when using QEMU transparent emulation. + +--- a/test-suite/standalone/Makefile.in 1970-01-01 01:00:01.000000000 +0100 ++++ b/test-suite/standalone/Makefile.in 2021-01-11 10:59:31.606269449 +0100 +@@ -102,8 +102,7 @@ + test-scm-to-latin1-string$(EXEEXT) test-scm-values$(EXEEXT) \ + test-scm-c-bind-keyword-arguments$(EXEEXT) \ + test-srfi-4$(EXEEXT) $(am__append_6) $(am__EXEEXT_1) \ +- test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) \ +- test-stack-overflow ++ test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) + check_PROGRAMS = test-num2integral$(EXEEXT) test-round$(EXEEXT) \ + test-foreign-object-c$(EXEEXT) test-list$(EXEEXT) \ + test-unwind$(EXEEXT) test-conversion$(EXEEXT) \ +@@ -1938,7 +1937,7 @@ + test-command-line-encoding test-command-line-encoding2 \ + test-language test-guild-compile $(am__append_3) \ + test-foreign-object-scm test-fast-slot-ref test-mb-regexp \ +- test-use-srfi $(am__append_5) test-stack-overflow ++ test-use-srfi $(am__append_5) + BUILT_SOURCES = $(am__append_2) + EXTRA_DIST = test-import-order-a.scm test-import-order-b.scm \ + test-import-order-c.scm test-import-order-d.scm \ -- cgit v1.2.3 From df50d2a02d1fb574b13a3f89eaf061e102ceb424 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 11 Jan 2021 22:25:08 +0100 Subject: gnu: podofo: Update to 0.9.7. * gnu/packages/pdf.scm (podofo): Update to 0.9.7. [source]: Remove patch. * gnu/packages/patches/podofo-cmake-3.12.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/podofo-cmake-3.12.patch | 19 ------------------- gnu/packages/pdf.scm | 7 +++---- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 gnu/packages/patches/podofo-cmake-3.12.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a41795d8aa..65fbbe8dc5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1489,7 +1489,6 @@ dist_patch_DATA = \ %D%/packages/patches/plib-CVE-2011-4620.patch \ %D%/packages/patches/plib-CVE-2012-4552.patch \ %D%/packages/patches/plotutils-spline-test.patch \ - %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ %D%/packages/patches/postgresql-disable-resolve_symlinks.patch \ diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch deleted file mode 100644 index 0a3c19b21a..0000000000 --- a/gnu/packages/patches/podofo-cmake-3.12.patch +++ /dev/null @@ -1,19 +0,0 @@ -The build fails with cmake 3.12.0. This patch will be obsolete with the next -release. - -https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch - - ---- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 -+++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 -@@ -2,10 +2,3 @@ - TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) - SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") - ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) -- --# Copy the test samples over to the build tree --ADD_CUSTOM_COMMAND( -- TARGET TokenizerTest -- POST_BUILD -- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" -- ) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 224bd792bd..48c2158e7a 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017, 2018 Rene Saavedra -;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Ben Sturmfels ;;; Copyright © 2019,2020 Hartmut Goebel @@ -648,15 +648,14 @@ interaction.") (define-public podofo (package (name "podofo") - (version "0.9.6") + (version "0.9.7") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/podofo/podofo/" version "/podofo-" version ".tar.gz")) (sha256 (base32 - "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")) - (patches (search-patches "podofo-cmake-3.12.patch")))) + "1f0yvkx6nf99fp741w2y706d8bs9824x1z2gqm3rdy5fv8bfgwkw")))) (build-system cmake-build-system) (native-inputs `(("cppunit" ,cppunit) -- cgit v1.2.3 From aeed7218a933054806edd246548346e9edc327c4 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Tue, 12 Jan 2021 22:44:18 +0100 Subject: gnu: Add ipxe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/bootloaders.scm (ipxe): New variable. * gnu/packages/patches/ipxe-reproducible-geniso.patch: New file … * gnu/local.mk (dist_patch_DATA): … add it. Co-authored-by: Tobias Geerinckx-Rice Co-authored-by: Brice Waegeneire Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 125 ++++++++++++++++++++- .../patches/ipxe-reproducible-geniso.patch | 77 +++++++++++++ 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ipxe-reproducible-geniso.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bcf7ee0245..eb28104add 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1184,6 +1184,7 @@ dist_patch_DATA = \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/iputils-libcap-compat.patch \ + %D%/packages/patches/ipxe-reproducible-geniso.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/json-c-CVE-2020-12762.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 9ca574a151..38dba4cebd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -7,12 +7,14 @@ ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2017, 2018, 2020 Efraim Flashner -;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 nee ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Björn Höfling ;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian ;;; Copyright © 2020 Pierre Langlois +;;; Copyright © 2021 Vincent Legoll +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -1095,3 +1097,124 @@ systems so that they can be added to the bootloader. It also works out how to boot existing GNU/Linux systems and detects what distribution is installed in order to add a suitable bootloader menu entry.") (license license:gpl2+))) + +(define-public ipxe + ;; XXX: 'BUILD_TIMESTAMP' is used to automatically select the newest version + ;; of iPXE if multiple iPXE drivers are loaded concurrently in a UEFI system. + ;; + ;; TODO: Bump this timestamp at each modifications of the package (not only + ;; for updates) by running: date +%s. + (let ((timestamp "1591706427")) + (package + (name "ipxe") + (version "1.20.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ipxe/ipxe") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "ipxe-reproducible-geniso.patch")) + (sha256 + (base32 + "0w7h7y97gj9nqvbmsg1zp6zj5mpbbpckqbbx7bpp6k3ahy5fk8zp")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build utils) + (guix build gnu-build-system) + (guix base32) + (ice-9 string-fun) + (ice-9 regex) + (rnrs bytevectors)) + #:imported-modules ((guix base32) + ,@%gnu-build-system-modules) + #:make-flags + ;; XXX: 'BUILD_ID' is used to determine when another ROM in the + ;; system contains identical code in order to save space within the + ;; legacy BIOS option ROM area, which is extremely limited in size. + ;; It is supposed to be collision-free across all ROMs, to do so we + ;; use the truncated output hash of the package. + (let ((build-id + (lambda (out) + (let* ((nix-store (string-append + (or (getenv "NIX_STORE") "/gnu/store") + "/")) + (filename + (string-replace-substring out nix-store "")) + (hash (match:substring (string-match "[0-9a-z]{32}" + filename))) + (bv (nix-base32-string->bytevector hash))) + (format #f "0x~x" + (bytevector-u32-ref bv 0 (endianness big)))))) + (out (assoc-ref %outputs "out")) + (syslinux (assoc-ref %build-inputs "syslinux"))) + (list "ECHO_E_BIN_ECHO=echo" + "ECHO_E_BIN_ECHO_E=echo -e" + + ;; cdrtools' mkisofs will silently ignore a missing isolinux.bin! + ;; Luckily xorriso is more strict. + (string-append "ISOLINUX_BIN=" syslinux + "/share/syslinux/isolinux.bin") + (string-append "SYSLINUX_MBR_DISK_PATH=" syslinux + "/share/syslinux/isohdpfx.bin") + + ;; Build reproducibly. + (string-append "BUILD_ID_CMD=echo -n " (build-id out)) + (string-append "BUILD_TIMESTAMP=" ,timestamp) + "everything")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source-directory + (lambda _ (chdir "src") #t)) + (add-after 'enter-source-directory 'set-options + (lambda _ + (substitute* "config/general.h" + (("^//(#define PING_CMD.*)" _ uncommented) uncommented) + (("^//(#define IMAGE_TRUST_CMD.*)" _ uncommented) + uncommented) + (("^#undef.*(DOWNLOAD_PROTO_HTTPS.*)" _ option) + (string-append "#define " option)) + (("^#undef.*(DOWNLOAD_PROTO_NFS.*)" _ option) + (string-append "#define " option))) + #t)) + (delete 'configure) ; no configure script + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (ipxe (string-append out "/lib/ipxe")) + (exts-re + "\\.(efi|efirom|iso|kkpxe|kpxe|lkrn|mrom|pxe|rom|usb)$") + (dirs '("bin" "bin-i386-linux" "bin-x86_64-pcbios" + "bin-x86_64-efi" "bin-x86_64-linux" "bin-i386-efi")) + (files (apply append + (map (lambda (dir) + (find-files dir exts-re)) dirs)))) + (for-each (lambda (file) + (let* ((subdir (dirname file)) + (fn (basename file)) + (tgtsubdir (cond + ((string=? "bin" subdir) "") + ((string-prefix? "bin-" subdir) + (string-drop subdir 4))))) + (install-file file + (string-append ipxe "/" tgtsubdir)))) + files)) + #t)) + (add-after 'install 'leave-source-directory + (lambda _ (chdir "..") #t))) + #:tests? #f)) ; no test suite + (native-inputs + `(("perl" ,perl) + ("syslinux" ,syslinux) + ("xorriso" ,xorriso))) + (home-page "https://ipxe.org") + (synopsis "PXE-compliant network boot firmware") + (description "iPXE is a network boot firmware. It provides a full PXE +implementation enhanced with additional features such as booting from: a web +server via HTTP, an iSCSI SAN, a Fibre Channel SAN via FCoE, an AoE SAN, a +wireless network, a wide-area network, an Infiniband network. It allows to +control the boot process with a script. You can use iPXE to replace the +existing PXE ROM on your network card, or you can chainload into iPXE to obtain +the features of iPXE without the hassle of reflashing.") + (license license:gpl2+)))) + diff --git a/gnu/packages/patches/ipxe-reproducible-geniso.patch b/gnu/packages/patches/ipxe-reproducible-geniso.patch new file mode 100644 index 0000000000..ff6aa1da94 --- /dev/null +++ b/gnu/packages/patches/ipxe-reproducible-geniso.patch @@ -0,0 +1,77 @@ +From 052d24d8217c51c572c2f6cbb4a687be2e8ba52d Mon Sep 17 00:00:00 2001 +From: Brice Waegeneire +Date: Fri, 5 Jun 2020 14:38:43 +0200 +Subject: [PATCH] [geniso] Make it reproducible + +Some timestamps get embedded in the generated ISO, making it +unreproducible so we overwrite those timestamps to be at the UNIX epoch. +--- + src/util/geniso | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/util/geniso b/src/util/geniso +index ff090d4a..e032ffb0 100755 +--- a/src/util/geniso ++++ b/src/util/geniso +@@ -11,6 +11,13 @@ function help() { + echo " -o FILE save iso image to file" + } + ++function reset_timestamp() { ++ for f in "$1"/*; do ++ touch -t 197001010100 "$f" ++ done ++ touch -t 197001010100 "$1" ++} ++ + LEGACY=0 + FIRST="" + +@@ -37,8 +44,9 @@ if [ -z "${OUT}" ]; then + exit 1 + fi + +-# There should either be mkisofs or the compatible genisoimage program +-for command in genisoimage mkisofs; do ++# There should either be mkisofs, xorriso or the compatible genisoimage ++# program ++for command in xorriso genisoimage mkisofs; do + if ${command} --version >/dev/null 2>/dev/null; then + mkisofs=(${command}) + break +@@ -46,8 +54,10 @@ for command in genisoimage mkisofs; do + done + + if [ -z "${mkisofs}" ]; then +- echo "${0}: mkisofs or genisoimage not found, please install or set PATH" >&2 ++ echo "${0}: mkisofs, xorriso or genisoimage not found, please install or set PATH" >&2 + exit 1 ++elif [ "$mkisofs" = "xorriso" ]; then ++ mkisofs+=(-as mkisofs) + fi + + dir=$(mktemp -d bin/iso.dir.XXXXXX) +@@ -115,6 +125,8 @@ case "${LEGACY}" in + exit 1 + fi + ++ reset_timestamp "$dir" ++ + # generate the iso image + "${mkisofs[@]}" -b boot.img -output ${OUT} ${dir} + ;; +@@ -127,6 +139,12 @@ case "${LEGACY}" in + cp ${LDLINUX_C32} ${dir} + fi + ++ reset_timestamp "$dir" ++ ++ if [ "${mkisofs[0]}" = "xorriso" ]; then ++ mkisofs+=(-isohybrid-mbr "$SYSLINUX_MBR_DISK_PATH") ++ fi ++ + # generate the iso image + "${mkisofs[@]}" -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -output ${OUT} ${dir} + +-- +2.26.2 -- cgit v1.2.3 From 93309e25c7c3da5744b0a3304b89effed949f844 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 14 Jan 2021 20:38:10 +0200 Subject: gnu: vcflib: Update to 1.0.2. * gnu/packages/bioinformatics.scm (vcflib): Update to 1.0.2. [source]: Download using git-fetch. Remove patch. Update snippet to use packaged libraries. [build-system]: Switch to cmake-build-system. [inputs]: Add bzip2. [native-inputs]: Add package-source of fsom. [arguments]: Delete custom 'set-flags, 'install phases. Don't delete 'configure phase. Adjust 'unpack-submodule-sources phase. * gnu/packages/patches/vcflib-use-shared-libraries.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 84 +++++-------- .../patches/vcflib-use-shared-libraries.patch | 135 --------------------- 3 files changed, 29 insertions(+), 191 deletions(-) delete mode 100644 gnu/packages/patches/vcflib-use-shared-libraries.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index eb28104add..77f1d4a096 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1703,7 +1703,6 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ - %D%/packages/patches/vcflib-use-shared-libraries.patch \ %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 77150e0dce..bb97b2d313 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14923,32 +14923,44 @@ library automatically handles index file generation and use.") (define-public vcflib (package (name "vcflib") - (version "1.0.1") + (version "1.0.2") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/vcflib/vcflib/releases/" - "download/v" version - "/vcflib-" version "-src.tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/vcflib/vcflib") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm")) - (patches (search-patches "vcflib-use-shared-libraries.patch")) + (base32 "1k1z3876kbzifj1sqfzsf3lgb4rw779hvkg6ryxbyq5bc2paj9kh")) (modules '((guix build utils))) (snippet - `(begin + '(begin + (substitute* "CMakeLists.txt" + ((".*fastahack.*") "") + ((".*smithwaterman.*") "") + (("(pkg_check_modules\\(TABIXPP)" text) + (string-append + "pkg_check_modules(FASTAHACK REQUIRED fastahack)\n" + "pkg_check_modules(SMITHWATERMAN REQUIRED smithwaterman)\n" + text)) + (("\\$\\{TABIXPP_LIBRARIES\\}" text) + (string-append "${FASTAHACK_LIBRARIES} " + "${SMITHWATERMAN_LIBRARIES} " + text))) (substitute* (find-files "." "\\.(h|c)(pp)?$") (("\"SmithWatermanGotoh.h\"") "") (("\"convert.h\"") "") (("\"disorder.h\"") "") - (("\"tabix.hpp\"") "") - (("\"Fasta.h\"") "")) + (("Fasta.h") "fastahack/Fasta.h")) (for-each delete-file-recursively '("fastahack" "filevercmp" "fsom" "googletest" "intervaltree" - "libVCFH" "multichoose" "smithwaterman" "tabixpp")) + "libVCFH" "multichoose" "smithwaterman")) #t)))) - (build-system gnu-build-system) + (build-system cmake-build-system) (inputs - `(("htslib" ,htslib) + `(("bzip2" ,bzip2) + ("htslib" ,htslib) ("fastahack" ,fastahack) ("perl" ,perl) ("python" ,python) @@ -14961,22 +14973,13 @@ library automatically handles index file generation and use.") ;; Submodules. ;; This package builds against the .o files so we need to extract the source. ("filevercmp-src" ,(package-source filevercmp)) + ("fsom-src" ,(package-source fsom)) ("intervaltree-src" ,(package-source intervaltree)) ("multichoose-src" ,(package-source multichoose)))) (arguments `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - (add-after 'unpack 'set-flags - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Makefile" - (("LDFLAGS =") - (string-append "LDFLAGS = -Wl,-rpath=" - (assoc-ref outputs "out") "/lib "))) - (substitute* "filevercmp/Makefile" - (("-c") "-c -fPIC")) - #t)) - (delete 'configure) (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) (let ((unpack (lambda (source target) @@ -14989,39 +14992,10 @@ library automatically handles index file generation and use.") "--strip-components=1")))))) (and (unpack "filevercmp-src" "filevercmp") + (unpack "fsom-src" "fsom") (unpack "intervaltree-src" "intervaltree") - (unpack "multichoose-src" "multichoose"))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib"))) - (for-each (lambda (file) - (install-file file bin)) - (find-files "bin" ".*")) - (install-file "libvcflib.so" lib) - (install-file "libvcflib.a" lib) - (for-each - (lambda (file) - (install-file file (string-append out "/include"))) - (find-files "include" "\\.h(pp)?$")) - (mkdir-p (string-append lib "/pkgconfig")) - (with-output-to-file (string-append lib "/pkgconfig/vcflib.pc") - (lambda _ - (format #t "prefix=~a~@ - exec_prefix=${prefix}~@ - libdir=${exec_prefix}/lib~@ - includedir=${prefix}/include~@ - ~@ - ~@ - Name: libvcflib~@ - Version: ~a~@ - Requires: smithwaterman, fastahack~@ - Description: C++ library for parsing and manipulating VCF files~@ - Libs: -L${libdir} -lvcflib~@ - Cflags: -I${includedir}~%" - out ,version)))) - #t))))) + (unpack "multichoose-src" "multichoose")) + #t)))))) (home-page "https://github.com/vcflib/vcflib/") (synopsis "Library for parsing and manipulating VCF files") (description "Vcflib provides methods to manipulate and interpret diff --git a/gnu/packages/patches/vcflib-use-shared-libraries.patch b/gnu/packages/patches/vcflib-use-shared-libraries.patch deleted file mode 100644 index e198ec663c..0000000000 --- a/gnu/packages/patches/vcflib-use-shared-libraries.patch +++ /dev/null @@ -1,135 +0,0 @@ -This patch is a combination of many of the patches from Debian: -https://sources.debian.org/src/libvcflib/1.0.1+dfsg-3/debian/patches/ - ---- - Makefile | 63 +++++++++++--------------------------------------------- - 1 file changed, 12 insertions(+), 51 deletions(-) - -diff --git a/Makefile b/Makefile -index 6b13350..be85f22 100644 ---- a/Makefile -+++ b/Makefile -@@ -114,43 +114,25 @@ BIN_SOURCES = src/vcfecho.cpp \ - src/vcfnull2ref.cpp \ - src/vcfinfosummarize.cpp - --# when we can figure out how to build on mac --# src/vcfsom.cpp -- - #BINS = $(BIN_SOURCES:.cpp=) - BINS = $(addprefix $(BIN_DIR)/,$(notdir $(BIN_SOURCES:.cpp=))) - SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=)) - --TABIX = tabixpp/tabix.o --FASTAHACK = fastahack/Fasta.o --SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o --REPEATS = smithwaterman/Repeats.o --INDELALLELE = smithwaterman/IndelAllele.o --DISORDER = smithwaterman/disorder.o --LEFTALIGN = smithwaterman/LeftAlign.o --FSOM = fsom/fsom.o - FILEVERCMP = filevercmp/filevercmp.o - --# Work out how to find htslib --# Use the one we ship in tabixpp unless told otherwise by the environment --HTS_LIB ?= $(VCF_LIB_LOCAL)/tabixpp/htslib/libhts.a --HTS_INCLUDES ?= -I$(VCF_LIB_LOCAL)/tabixpp/htslib --HTS_LDFLAGS ?= -L$(VCF_LIB_LOCAL)/tabixpp/htslib -lhts -lbz2 -lm -lz -llzma -pthread -- -- --INCLUDES = $(HTS_INCLUDES) -I$(INC_DIR) --LDFLAGS = -L$(LIB_DIR) -lvcflib $(HTS_LDFLAGS) -lpthread -lz -lm -llzma -lbz2 -+INCLUDES = -I$(INC_DIR) $(shell pkg-config --cflags htslib fastahack smithwaterman tabixpp) -+LDFLAGS = -L$(LIB_DIR) -lvcflib -lpthread -lz -lstdc++ -lm -llzma -lbz2 $(shell pkg-config --libs htslib fastahack smithwaterman tabixpp) - - - --all: $(OBJECTS) $(BINS) scriptToBin -+all: $(OBJECTS) $(BINS) scriptToBin libvcflib.a - - scriptToBin: $(BINS) - $(CP) scripts/* $(BIN_DIR) - - GIT_VERSION += $(shell git describe --abbrev=4 --dirty --always) - --CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -+CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -fPIC - #CXXFLAGS = -O2 - #CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual - -@@ -168,7 +150,7 @@ profiling: - gprof: - $(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all - --$(OBJECTS): $(SOURCES) $(HEADERS) $(TABIX) multichoose pre $(SMITHWATERMAN) $(FILEVERCMP) $(FASTAHACK) -+$(OBJECTS): $(SOURCES) $(HEADERS) multichoose pre $(FILEVERCMP) - $(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && $(CP) src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - multichoose: pre -@@ -177,39 +159,22 @@ multichoose: pre - intervaltree: pre - cd intervaltree && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - --$(TABIX): pre -- cd tabixpp && INCLUDES="$(HTS_INCLUDES)" LIBPATH="-L. $(HTS_LDFLAGS)" HTSLIB="$(HTS_LIB)" $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ -- --$(SMITHWATERMAN): pre -- cd smithwaterman && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --$(DISORDER): $(SMITHWATERMAN) -- --$(REPEATS): $(SMITHWATERMAN) -- --$(LEFTALIGN): $(SMITHWATERMAN) -- --$(INDELALLELE): $(SMITHWATERMAN) -- --$(FASTAHACK): pre -- cd fastahack && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) Fasta.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --#$(FSOM): --# cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm -- - $(FILEVERCMP): pre - cd filevercmp && make && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - $(SHORTBINS): pre - $(MAKE) $(BIN_DIR)/$@ - --$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree -+$(BINS): $(BIN_SOURCES) libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) pre intervaltree - $(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) -DVERSION=\"$(GIT_VERSION)\" - --libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) $(TABIX) pre -- ar rs libvcflib.a $(OBJECTS) smithwaterman/sw.o $(FASTAHACK) $(SSW) $(FILEVERCMP) $(TABIX) -+libvcflib.a: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP) - $(CP) libvcflib.a $(LIB_DIR) - -+libvcflib.so: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ $(CXX) -shared -o libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) -+ $(CP) libvcflib.so $(LIB_DIR) - - test: $(BINS) - @prove -Itests/lib -w tests/*.t -@@ -230,16 +195,12 @@ clean: - $(RM) $(BINS) $(OBJECTS) - $(RM) ssw_cpp.o ssw.o - $(RM) libvcflib.a -+ $(RM) libvcflib.so - $(RM) -r $(BIN_DIR) - $(RM) -r $(LIB_DIR) - $(RM) -r $(INC_DIR) - $(RM) -r $(OBJ_DIR) -- $(MAKE) clean -C tabixpp -- $(MAKE) clean -C smithwaterman -- $(MAKE) clean -C fastahack - $(MAKE) clean -C multichoose -- $(MAKE) clean -C fsom -- $(MAKE) clean -C libVCFH - $(MAKE) clean -C test - $(MAKE) clean -C filevercmp - $(MAKE) clean -C intervaltree --- -2.28.0 - -- cgit v1.2.3 From fc9fd5496f33f697f4dc1e0dc1f20ba62c15726a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 17 Jan 2021 15:31:21 +0200 Subject: gnu: freebayes: Update to 1.3.3. * gnu/packages/bioinformatics.scm (freebayes): Update to 1.3.3. [source]: Add patch. Add snippet to remove vendored library. [build-system]: Switch to meson-build-system. [inputs]: Remove bamtools. Add fastahack, smithwaterman, tabixpp. [native-inputs]: Remove procps, python-2, tabixpp source, smithwaterman source, multichoose source, fsom source, filevercmp source, fastahack source, bash-tap source. Add bash-tap, grep, pkg-config, simde, vcflib. [arguments]: Drop make-flags. Don't delete 'configure phase. Delete custom 'fix-tests, 'build-tabixpp-and-vcflib, 'fix-makefiles, 'install phases. Adjust 'unpack-submodule-sources phase to changed native-inputs. Add new 'patch-source phase. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 203 +++++++++------------ gnu/packages/patches/freebayes-devendor-deps.patch | 129 +++++++++++++ 3 files changed, 218 insertions(+), 115 deletions(-) create mode 100644 gnu/packages/patches/freebayes-devendor-deps.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 77f1d4a096..6f66021c78 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -998,6 +998,7 @@ dist_patch_DATA = \ %D%/packages/patches/fpc-reproducibility.patch \ %D%/packages/patches/fplll-std-fenv.patch \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ + %D%/packages/patches/freebayes-devendor-deps.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7326686245..c527111928 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -57,6 +57,7 @@ #:use-module (guix build-system trivial) #:use-module (guix deprecation) #:use-module (gnu packages) + #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages algebra) #:use-module (gnu packages base) @@ -15011,125 +15012,97 @@ manipulations on VCF files.") (license license:expat))) (define-public freebayes - (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb") - (revision "1") - (version "1.0.2")) - (package - (name "freebayes") - (version (git-version version revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ekg/freebayes") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2")))) - (build-system gnu-build-system) - (inputs - `(("bamtools" ,bamtools) - ("htslib" ,htslib) - ("zlib" ,zlib))) - (native-inputs - `(("bc" ,bc) ; Needed for running tests. - ("samtools" ,samtools) ; Needed for running tests. - ("parallel" ,parallel) ; Needed for running tests. - ("perl" ,perl) ; Needed for running tests. - ("procps" ,procps) ; Needed for running tests. - ("python" ,python-2) ; Needed for running tests. - ("vcflib-src" ,(package-source vcflib)) - ;; These are submodules for the vcflib version used in freebayes. - ;; This package builds against the .o files so we need to extract the source. - ("tabixpp-src" ,(package-source tabixpp)) - ("smithwaterman-src" ,(package-source smithwaterman)) - ("multichoose-src" ,(package-source multichoose)) - ("fsom-src" ,(package-source fsom)) - ("filevercmp-src" ,(package-source filevercmp)) - ("fastahack-src" ,(package-source fastahack)) - ("intervaltree-src" ,(package-source intervaltree)) - ;; These submodules are needed to run the tests. - ("bash-tap-src" ,(package-source bash-tap)) - ("test-simple-bash-src" - ,(origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ingydotnet/test-simple-bash/") - (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc"))) - (file-name "test-simple-bash-src-checkout") - (sha256 - (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga")))))) - (arguments - `(#:make-flags - (list "CC=gcc" - (string-append "BAMTOOLS_ROOT=" - (assoc-ref %build-inputs "bamtools"))) - #:test-target "test" - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "test/t/01_call_variants.t" - (("grep -P \"\\(\\\\t500\\$\\|\\\\t11000\\$\\|\\\\t1000\\$\\)\"") - "grep -E ' (500|11000|1000)$'")) - #t)) - (add-after 'unpack 'unpack-submodule-sources - (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (with-directory-excursion target - (if (file-is-directory? (assoc-ref inputs source)) - (copy-recursively (assoc-ref inputs source) ".") - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and - (unpack "vcflib-src" "vcflib") - (unpack "fastahack-src" "vcflib/fastahack") - (unpack "filevercmp-src" "vcflib/filevercmp") - (unpack "fsom-src" "vcflib/fsom") - (unpack "intervaltree-src" "vcflib/intervaltree") - (unpack "multichoose-src" "vcflib/multichoose") - (unpack "smithwaterman-src" "vcflib/smithwaterman") - (unpack "tabixpp-src" "vcflib/tabixpp") - (unpack "test-simple-bash-src" "test/test-simple-bash") - (unpack "bash-tap-src" "test/bash-tap"))))) - (add-after 'unpack-submodule-sources 'fix-makefiles - (lambda _ - ;; We don't have the .git folder to get the version tag from. - (substitute* "vcflib/Makefile" - (("^GIT_VERSION.*") - (string-append "GIT_VERSION = v" ,version))) - (substitute* "src/Makefile" - (("-I\\$\\(BAMTOOLS_ROOT\\)/src") - "-I$(BAMTOOLS_ROOT)/include/bamtools")) - #t)) - (add-before 'build 'build-tabixpp-and-vcflib - (lambda* (#:key inputs make-flags #:allow-other-keys) - (with-directory-excursion "vcflib" - (with-directory-excursion "tabixpp" - (apply invoke "make" - (string-append "HTS_LIB=" - (assoc-ref inputs "htslib") - "/lib/libhts.a") - make-flags)) - (apply invoke "make" - (string-append "CFLAGS=-Itabixpp") - "all" - make-flags)))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) - (install-file "bin/freebayes" bin) - (install-file "bin/bamleftalign" bin)) - #t))))) - (home-page "https://github.com/ekg/freebayes") - (synopsis "Haplotype-based variant detector") - (description "FreeBayes is a Bayesian genetic variant detector designed to + (package + (name "freebayes") + (version "1.3.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/freebayes") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0myz3giad7jqp6ricdfnig9ymlcps2h67mlivadvx97ngagm85z8")) + (patches (search-patches "freebayes-devendor-deps.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "contrib/htslib") + #t)))) + (build-system meson-build-system) + (inputs + `(("fastahack" ,fastahack) + ("htslib" ,htslib) + ("smithwaterman" ,smithwaterman) + ("tabixpp" ,tabixpp) + ("zlib" ,zlib))) + (native-inputs + `(("bash-tap" ,bash-tap) + ("bc" ,bc) + ("grep" ,grep) ; Built with perl support. + ("parallel" ,parallel) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("samtools" ,samtools) + ("simde" ,simde) + ;; We need some binaries from vcflib, but we also need to link against a + ;; subset of the library. Vendor the parts we need until we have a shared library. + ("vcflib" ,vcflib) + ("vcflib-src" ,(package-source vcflib)) + ("intervaltree-src" ,(package-source intervaltree)) + ;; This submodule is needed to run the tests. + ("test-simple-bash-src" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ingydotnet/test-simple-bash/") + (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc"))) + (file-name "test-simple-bash-src-checkout") + (sha256 + (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga")))))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash-tap (assoc-ref inputs "bash-tap"))) + (substitute* (find-files "test/t") + (("BASH_TAP_ROOT=bash-tap") + (string-append "BASH_TAP_ROOT=" bash-tap "/bin")) + (("bash-tap/bash-tap-bootstrap") + (string-append bash-tap "/bin/bash-tap-bootstrap")) + (("source.*bash-tap-bootstrap") + (string-append "source " bash-tap "/bin/bash-tap-bootstrap"))) + (substitute* "meson.build" + ;; Some inputs aren't actually needed. + ((".*bamtools/src.*") "") + ((".*multichoose.*") "") + (("'vcflib/filevercmp'") "")) + #t))) + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (unless (directory-exists? target) + (mkdir-p target)) + (with-directory-excursion target + (if (file-is-directory? (assoc-ref inputs source)) + (copy-recursively (assoc-ref inputs source) ".") + (invoke "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and + (unpack "vcflib-src" "vcflib") + (unpack "intervaltree-src" "vcflib/intervaltree") + (unpack "test-simple-bash-src" "test/test-simple-bash")) + #t)))))) + (home-page "https://github.com/ekg/freebayes") + (synopsis "Haplotype-based variant detector") + (description "FreeBayes is a Bayesian genetic variant detector designed to find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms), indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and complex events (composite insertion and substitution events) smaller than the length of a short-read sequencing alignment.") - (license license:expat)))) + (license license:expat))) (define-public samblaster (package diff --git a/gnu/packages/patches/freebayes-devendor-deps.patch b/gnu/packages/patches/freebayes-devendor-deps.patch new file mode 100644 index 0000000000..580f53a3b1 --- /dev/null +++ b/gnu/packages/patches/freebayes-devendor-deps.patch @@ -0,0 +1,129 @@ +This patch is original to Guix, ongoing work to upstream bits as possible. + +From 50833daba0b1dbe2ed364b1e980b67a09a312789 Mon Sep 17 00:00:00 2001 +From: Efraim Flashner +Date: Sun, 17 Jan 2021 13:27:17 +0200 +Subject: [PATCH] devendor-dependants + +--- + meson.build | 60 +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 47 insertions(+), 13 deletions(-) + +diff --git a/meson.build b/meson.build +index f6bf242..7a3805e 100644 +--- a/meson.build ++++ b/meson.build +@@ -9,8 +9,12 @@ project('freebayes', ['cpp', 'c'], + + zlib_dep = dependency('zlib') + lzma_dep = dependency('liblzma') ++simde_dep = dependency('simde') + bzip2_dep = dependency('bz2lib', required: false) + htslib_dep = dependency('htslib', required : false) ++tabixpp_dep = dependency('tabixpp', required : false) ++fastahack_dep = dependency('fastahack', required : false) ++smithwaterman_dep = dependency('smithwaterman', required : false) + thread_dep = dependency('threads') + + if htslib_dep.found() +@@ -59,6 +63,41 @@ else + ] + endif + ++if tabixpp_dep.found() ++ tabixpp_includes = '' ++ tabixpp_src = [] ++else ++ tabixpp_includes = [ ++ 'vcflib/tabixpp', ++ ] ++ tabixpp_src = [ ++ 'vcflib/tabixpp/tabix.cpp', ++ ] ++endif ++ ++if fastahack_dep.found() ++ fastahack_src = [] ++else ++ fastahack_src = [ ++ 'vcflib/fastahack/Fasta.cpp', ++ ] ++endif ++ ++if smithwaterman_dep.found() ++ smithwaterman_includes = '' ++ smithwaterman_src = [] ++else ++ smithwaterman_includes = [ ++ 'vcflib/smithwaterman', ++ ] ++ smithwaterman_src = [ ++ 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', ++ 'vcflib/smithwaterman/disorder.cpp', ++ 'vcflib/smithwaterman/Repeats.cpp', ++ 'vcflib/smithwaterman/LeftAlign.cpp', ++ 'vcflib/smithwaterman/IndelAllele.cpp', ++ ] ++endif + + + # +@@ -105,22 +144,17 @@ seqlib_src = [ + ] + + vcflib_src = [ +- 'vcflib/tabixpp/tabix.cpp', + 'vcflib/src/Variant.cpp', +- 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', +- 'vcflib/smithwaterman/disorder.cpp', +- 'vcflib/smithwaterman/Repeats.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', ++ tabixpp_src, ++ smithwaterman_src, + ] + + bamleftalign_src = [ + 'src/bamleftalign.cpp', + 'src/IndelAllele.cpp', + 'contrib/SeqLib/src/BamWriter.cpp', +- 'vcflib/fastahack/Fasta.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', ++ fastahack_src, ++ smithwaterman_src, + 'vcflib/src/split.cpp', + 'src/LeftAlign.cpp', + ] +@@ -135,8 +169,8 @@ incdir = include_directories( + 'contrib', + 'contrib/SeqLib', + 'vcflib/src', +- 'vcflib/tabixpp', +- 'vcflib/smithwaterman', ++ tabixpp_includes, ++ smithwaterman_includes, + 'vcflib/multichoose', + 'vcflib/filevercmp') + +@@ -152,7 +186,7 @@ executable('freebayes', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, thread_dep], + install: true + ) + +@@ -165,7 +199,7 @@ executable('bamleftalign', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, thread_dep], + install: true + ) + +-- +2.30.0 + -- cgit v1.2.3 From 99043adf46d3e27fb10939c1365552844596345d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 19 Jan 2021 11:38:06 +0200 Subject: gnu: freebayes: Don't include vcflib sources. * gnu/packages/bioinformatics.scm (freebayes)[native-inputs]: Remove vcflib-source, intervaltree-source. Move vcflib ... [inputs]: ... to here. [arguments]: Adjust 'patch-source and 'unpack-submodule-sources for changes in vendored code. * gnu/packages/patches/freebayes-devendor-deps.patch: Update patch. --- gnu/packages/bioinformatics.scm | 30 ++++-------- gnu/packages/patches/freebayes-devendor-deps.patch | 57 +++++++++++++++------- 2 files changed, 49 insertions(+), 38 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 95352f948b..70166501d7 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -15138,6 +15138,7 @@ manipulations on VCF files.") ("htslib" ,htslib) ("smithwaterman" ,smithwaterman) ("tabixpp" ,tabixpp) + ("vcflib" ,vcflib) ("zlib" ,zlib))) (native-inputs `(("bash-tap" ,bash-tap) @@ -15148,11 +15149,6 @@ manipulations on VCF files.") ("pkg-config" ,pkg-config) ("samtools" ,samtools) ("simde" ,simde) - ;; We need some binaries from vcflib, but we also need to link against a - ;; subset of the library. Vendor the parts we need until we have a shared library. - ("vcflib" ,vcflib) - ("vcflib-src" ,(package-source vcflib)) - ("intervaltree-src" ,(package-source intervaltree)) ;; This submodule is needed to run the tests. ("test-simple-bash-src" ,(origin @@ -15179,25 +15175,17 @@ manipulations on VCF files.") (substitute* "meson.build" ;; Some inputs aren't actually needed. ((".*bamtools/src.*") "") - ((".*multichoose.*") "") - (("'vcflib/filevercmp'") "")) + ((".*multichoose.*") "")) + (substitute* '("src/BedReader.cpp" + "src/BedReader.h") + (("../intervaltree/IntervalTree.h") "IntervalTree.h")) #t))) (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (unless (directory-exists? target) - (mkdir-p target)) - (with-directory-excursion target - (if (file-is-directory? (assoc-ref inputs source)) - (copy-recursively (assoc-ref inputs source) ".") - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and - (unpack "vcflib-src" "vcflib") - (unpack "intervaltree-src" "vcflib/intervaltree") - (unpack "test-simple-bash-src" "test/test-simple-bash")) - #t))) + (mkdir-p "test/test-simple-bash") + (copy-recursively (assoc-ref inputs "test-simple-bash-src") + "test/test-simple-bash") + #t)) ;; The slow tests take longer than the specified timeout. ,@(if (any (cute string=? <> (%current-system)) '("armhf-linux" "aarch64-linux")) diff --git a/gnu/packages/patches/freebayes-devendor-deps.patch b/gnu/packages/patches/freebayes-devendor-deps.patch index 580f53a3b1..7e84666b85 100644 --- a/gnu/packages/patches/freebayes-devendor-deps.patch +++ b/gnu/packages/patches/freebayes-devendor-deps.patch @@ -1,19 +1,19 @@ This patch is original to Guix, ongoing work to upstream bits as possible. -From 50833daba0b1dbe2ed364b1e980b67a09a312789 Mon Sep 17 00:00:00 2001 +From 9acc56db5e7469f5976be38b52ba4993de98ee38 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 17 Jan 2021 13:27:17 +0200 Subject: [PATCH] devendor-dependants --- - meson.build | 60 +++++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 47 insertions(+), 13 deletions(-) + meson.build | 84 +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/meson.build b/meson.build -index f6bf242..7a3805e 100644 +index f6bf242..bded4af 100644 --- a/meson.build +++ b/meson.build -@@ -9,8 +9,12 @@ project('freebayes', ['cpp', 'c'], +@@ -9,8 +9,13 @@ project('freebayes', ['cpp', 'c'], zlib_dep = dependency('zlib') lzma_dep = dependency('liblzma') @@ -23,10 +23,11 @@ index f6bf242..7a3805e 100644 +tabixpp_dep = dependency('tabixpp', required : false) +fastahack_dep = dependency('fastahack', required : false) +smithwaterman_dep = dependency('smithwaterman', required : false) ++vcflib_dep = dependency('libvcflib', required: false) thread_dep = dependency('threads') if htslib_dep.found() -@@ -59,6 +63,41 @@ else +@@ -59,6 +64,56 @@ else ] endif @@ -42,11 +43,26 @@ index f6bf242..7a3805e 100644 + ] +endif + ++if vcflib_dep.found() ++ vcflib_includes = '' ++ vcflib_src = [] ++else ++ vcflib_includes = [ ++ 'vcflib/src', ++ 'vcflib/multichoose', ++ 'vcflib/filevercmp', ++ ] ++ vcflib_src = [ ++ 'vcflib/src/Variant.cpp', ++ ] ++endif ++ +if fastahack_dep.found() + fastahack_src = [] +else + fastahack_src = [ + 'vcflib/fastahack/Fasta.cpp', ++ 'vcflib/src/split.cpp', + ] +endif + @@ -68,17 +84,18 @@ index f6bf242..7a3805e 100644 # -@@ -105,22 +144,17 @@ seqlib_src = [ +@@ -105,23 +160,18 @@ seqlib_src = [ ] vcflib_src = [ - 'vcflib/tabixpp/tabix.cpp', - 'vcflib/src/Variant.cpp', +- 'vcflib/src/Variant.cpp', - 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', - 'vcflib/smithwaterman/disorder.cpp', - 'vcflib/smithwaterman/Repeats.cpp', - 'vcflib/smithwaterman/LeftAlign.cpp', - 'vcflib/smithwaterman/IndelAllele.cpp', ++ vcflib_src, + tabixpp_src, + smithwaterman_src, ] @@ -90,37 +107,43 @@ index f6bf242..7a3805e 100644 - 'vcflib/fastahack/Fasta.cpp', - 'vcflib/smithwaterman/LeftAlign.cpp', - 'vcflib/smithwaterman/IndelAllele.cpp', +- 'vcflib/src/split.cpp', + fastahack_src, + smithwaterman_src, - 'vcflib/src/split.cpp', ++ vcflib_src, 'src/LeftAlign.cpp', ] -@@ -135,8 +169,8 @@ incdir = include_directories( + +@@ -134,11 +184,9 @@ incdir = include_directories( + 'ttmath', 'contrib', 'contrib/SeqLib', - 'vcflib/src', +- 'vcflib/src', - 'vcflib/tabixpp', - 'vcflib/smithwaterman', +- 'vcflib/multichoose', +- 'vcflib/filevercmp') + tabixpp_includes, + smithwaterman_includes, - 'vcflib/multichoose', - 'vcflib/filevercmp') ++ vcflib_includes) -@@ -152,7 +186,7 @@ executable('freebayes', + c_args = ['-fpermissive','-w'] + cpp_args = ['-fpermissive','-w','-Wc++14-compat'] +@@ -152,7 +200,7 @@ executable('freebayes', include_directories : incdir, cpp_args : cpp_args, c_args : c_args, - dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], -+ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, vcflib_dep, thread_dep], install: true ) -@@ -165,7 +199,7 @@ executable('bamleftalign', +@@ -165,7 +213,7 @@ executable('bamleftalign', include_directories : incdir, cpp_args : cpp_args, c_args : c_args, - dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], -+ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, vcflib_dep, thread_dep], install: true ) -- cgit v1.2.3 From c67ff5636f2e62e4fd75ac584865c56d973e27fe Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 18 Jan 2021 23:27:25 -0600 Subject: gnu: idris: Update to 1.3.3. * gnu/packages/patches/idris-disable-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/idris.scm (idris): Update to 1.3.3. [source]: Use the patch. [native-inputs]: Add ghc-cheapskate. [arguments]: Adjust cheapskate version bounds. Make auxiliary test script executable. --- gnu/local.mk | 1 + gnu/packages/idris.scm | 12 ++++++++---- gnu/packages/patches/idris-disable-test.patch | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/idris-disable-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6f66021c78..370719f4d3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1179,6 +1179,7 @@ dist_patch_DATA = \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ + %D%/packages/patches/idris-disable-test.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 1982d7cf07..ca2772b904 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2018 Alex ter Weele -;;; Copyright © 2019 Eric Bavier +;;; Copyright © 2019, 2021 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,7 +38,7 @@ (define-public idris (package (name "idris") - (version "1.3.2") + (version "1.3.3") (source (origin (method url-fetch) (uri (string-append @@ -46,10 +46,12 @@ "idris-" version "/idris-" version ".tar.gz")) (sha256 (base32 - "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7")))) + "1pachwc6msw3n1mz2z1r1w6h518w9gbhdvbaa5vi1qp3cn3wm6q4")) + (patches (search-patches "idris-disable-test.patch")))) (build-system haskell-build-system) (native-inputs ;For tests `(("perl" ,perl) + ("ghc-cheapskate" ,ghc-cheapskate) ("ghc-tasty" ,ghc-tasty) ("ghc-tasty-golden" ,ghc-tasty-golden) ("ghc-tasty-rerun" ,ghc-tasty-rerun))) @@ -98,7 +100,8 @@ (add-after 'unpack 'update-constraints (lambda _ (substitute* "idris.cabal" - (("ansi-terminal < 0\\.9") "ansi-terminal < 0.10")) + (("ansi-terminal < 0\\.9") "ansi-terminal < 0.10") + (("cheapskate >= 0\\.1\\.1\\.2 && < 0\\.2") "cheapskate >= 0.1.1.1 && < 0.2")) #t)) (add-before 'configure 'set-cc-command (lambda _ @@ -118,6 +121,7 @@ (add-after 'install 'check (lambda* (#:key outputs #:allow-other-keys #:rest args) (let ((out (assoc-ref outputs "out"))) + (chmod "test/scripts/timeout" #o755) ;must be executable (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count))) (setenv "IDRIS_CC" "gcc") ;Needed for creating executables (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))) diff --git a/gnu/packages/patches/idris-disable-test.patch b/gnu/packages/patches/idris-disable-test.patch new file mode 100644 index 0000000000..ec8c7c8451 --- /dev/null +++ b/gnu/packages/patches/idris-disable-test.patch @@ -0,0 +1,19 @@ +The "pkg010" test output depends on the version of optparse-applicative being +used. The expected output requires optparse-applicative >= 0.15.1.0. Skip +the test for now. + +--- idris-1.3.3/test/TestData.hs 2021-01-19 23:05:24.238958262 -0600 ++++ idris-1.3.3/test/TestData.hs 2021-01-19 23:10:33.314390997 -0600 +@@ -212,8 +212,10 @@ + ( 5, ANY ), + ( 6, ANY ), + ( 7, ANY ), +- ( 8, ANY ), +- ( 10, ANY )]), ++ ( 8, ANY )]), ++-- FIXME: Expected output depends on optparse-applicative version. ++-- See https://github.com/idris-lang/Idris-dev/issues/4896 ++-- ( 10, ANY )]), + ("prelude", "Prelude", + [ ( 1, ANY )]), + ("primitives", "Primitive types", -- cgit v1.2.3 From 81710c867ca229348fb783ead634c1ba09f31f1c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 20 Jan 2021 15:43:45 +0100 Subject: gnu: r-httpuv: Update to 1.5.5. * gnu/packages/cran.scm (r-httpuv): Update to 1.5.5. [source]: Update patch name and remove unused modules. * gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch: Rename this file... * gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch: ...to this. * gnu/local.mk (dist_patch_DATA): Rename it. --- gnu/local.mk | 2 +- gnu/packages/cran.scm | 10 ++-- .../patches/r-httpuv-1.5.4-unvendor-libuv.patch | 59 ---------------------- .../patches/r-httpuv-1.5.5-unvendor-libuv.patch | 59 ++++++++++++++++++++++ 4 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch create mode 100644 gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 370719f4d3..c631e449d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1581,7 +1581,7 @@ dist_patch_DATA = \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ - %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ + %D%/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 1b1ad91595..4e853fc902 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -1024,19 +1024,17 @@ into a pipeline of data manipulation and visualisation.") (define-public r-httpuv (package (name "r-httpuv") - (version "1.5.4") + (version "1.5.5") (source (origin (method url-fetch) (uri (cran-uri "httpuv" version)) (sha256 (base32 - "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm")) + "05rir03xwamwfq5691vx0x957sgmr4i8iv5vpx5rv1f74y4wkrhb")) ;; Unvendor bundled libraries. As of 1.5.4 the vendored libuv ;; only contains fixes for building on Solaris. - (patches (search-patches "r-httpuv-1.5.4-unvendor-libuv.patch")) - (modules '((guix build utils) - (ice-9 ftw) - (srfi srfi-1))) + (patches (search-patches "r-httpuv-1.5.5-unvendor-libuv.patch")) + (modules '((guix build utils))) (snippet `(begin (delete-file-recursively "src/libuv") diff --git a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch deleted file mode 100644 index 0947718059..0000000000 --- a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch +++ /dev/null @@ -1,59 +0,0 @@ -Removes references to bundled libuv. - ---- a/src/Makevars 2020-07-31 11:53:30.576484531 +0200 -+++ b/src/Makevars 2020-07-31 11:54:19.369863118 +0200 -@@ -5,7 +5,7 @@ - - UNAME := $(shell uname) - --PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread -+PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread - - ifeq ($(UNAME), Darwin) - PKG_LIBS += -framework CoreServices -@@ -23,7 +23,7 @@ - - PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS - PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS --PKG_CPPFLAGS = -Ilibuv/include -pthread -+PKG_CPPFLAGS = -pthread - - # To avoid spurious warnings from `R CMD check --as-cran`, about compiler - # warning flags like -Werror. -@@ -43,35 +43,5 @@ - # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS - - --$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base64/base64.o -+$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o - --# We needed to rename lt~obsolete.m4 because the name causes problems with R --# CMD check. Here we rename it back. --libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 -- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 -- --# Run ./configure. We need to touch various autotools-related files to avoid --# it trying to run autotools programs again. We also need to make sure --# configure is executable, because on some platforms, calling unzip() in R --# does not preserve the executable bit. --# --# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also --# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple --# files to a single touch command gives them all the same time, but on others --# (Solaris and possibly some Fedoras) the timestamps are slightly increasing --# from one to the next, i.e. the order matters. To remove this fragility, we --# use "-r aclocal.m4" to ensure that all three files are guaranteed to have --# precisely the same timestamp value. --libuv/Makefile: libuv/m4/lt~obsolete.m4 -- (cd libuv \ -- && touch aclocal.m4 \ -- && touch -r aclocal.m4 configure Makefile.in \ -- && chmod +x configure \ -- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS)) -- --libuv/.libs/libuv.a: libuv/Makefile -- $(MAKE) --directory=libuv \ -- HAVE_DTRACE=0 -- --clean: -- $(MAKE) --directory=libuv distclean diff --git a/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch new file mode 100644 index 0000000000..0947718059 --- /dev/null +++ b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch @@ -0,0 +1,59 @@ +Removes references to bundled libuv. + +--- a/src/Makevars 2020-07-31 11:53:30.576484531 +0200 ++++ b/src/Makevars 2020-07-31 11:54:19.369863118 +0200 +@@ -5,7 +5,7 @@ + + UNAME := $(shell uname) + +-PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread ++PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread + + ifeq ($(UNAME), Darwin) + PKG_LIBS += -framework CoreServices +@@ -23,7 +23,7 @@ + + PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS + PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS +-PKG_CPPFLAGS = -Ilibuv/include -pthread ++PKG_CPPFLAGS = -pthread + + # To avoid spurious warnings from `R CMD check --as-cran`, about compiler + # warning flags like -Werror. +@@ -43,35 +43,5 @@ + # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS + + +-$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base64/base64.o ++$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o + +-# We needed to rename lt~obsolete.m4 because the name causes problems with R +-# CMD check. Here we rename it back. +-libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 +- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 +- +-# Run ./configure. We need to touch various autotools-related files to avoid +-# it trying to run autotools programs again. We also need to make sure +-# configure is executable, because on some platforms, calling unzip() in R +-# does not preserve the executable bit. +-# +-# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also +-# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple +-# files to a single touch command gives them all the same time, but on others +-# (Solaris and possibly some Fedoras) the timestamps are slightly increasing +-# from one to the next, i.e. the order matters. To remove this fragility, we +-# use "-r aclocal.m4" to ensure that all three files are guaranteed to have +-# precisely the same timestamp value. +-libuv/Makefile: libuv/m4/lt~obsolete.m4 +- (cd libuv \ +- && touch aclocal.m4 \ +- && touch -r aclocal.m4 configure Makefile.in \ +- && chmod +x configure \ +- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS)) +- +-libuv/.libs/libuv.a: libuv/Makefile +- $(MAKE) --directory=libuv \ +- HAVE_DTRACE=0 +- +-clean: +- $(MAKE) --directory=libuv distclean -- cgit v1.2.3 From 708d3ec0de9cfffc933615d92825906efacd4c6d Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 20 Jan 2021 19:35:37 -0500 Subject: gnu: Mutt: Fix CVE-2021-3181. * gnu/packages/patches/mutt-CVE-2021-3181.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mail.scm (mutt)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/mail.scm | 3 +- gnu/packages/patches/mutt-CVE-2021-3181.patch | 45 +++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mutt-CVE-2021-3181.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c631e449d1..0553c12f28 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1385,6 +1385,7 @@ dist_patch_DATA = \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/musl-cross-locale.patch \ %D%/packages/patches/mutt-store-references.patch \ + %D%/packages/patches/mutt-CVE-2021-3181.patch \ %D%/packages/patches/m4-gnulib-libio.patch \ %D%/packages/patches/ncompress-fix-softlinks.patch \ %D%/packages/patches/netcdf-date-time.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 5b235eea85..ab3a19578e 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -456,7 +456,8 @@ aliasing facilities to work just as they would on normal mail.") (sha256 (base32 "1m4ig69qw4g3lhm4351snmy5i0ch65fqc9vqqdybr6jy21w7w225")) - (patches (search-patches "mutt-store-references.patch")))) + (patches (search-patches "mutt-store-references.patch" + "mutt-CVE-2021-3181.patch")))) (build-system gnu-build-system) (inputs `(("cyrus-sasl" ,cyrus-sasl) diff --git a/gnu/packages/patches/mutt-CVE-2021-3181.patch b/gnu/packages/patches/mutt-CVE-2021-3181.patch new file mode 100644 index 0000000000..df5214b052 --- /dev/null +++ b/gnu/packages/patches/mutt-CVE-2021-3181.patch @@ -0,0 +1,45 @@ +Fix CVE-2021-3181: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3181 + +Patch copied from upstream source repository: + +https://gitlab.com/muttmua/mutt/-/commit/c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 + +From c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 Mon Sep 17 00:00:00 2001 +From: Kevin McCarthy +Date: Sun, 17 Jan 2021 10:40:37 -0800 +Subject: [PATCH] Fix memory leak parsing group address. + +When there was a group address terminator with no previous addresses, +an address would be allocated but not attached to the address list. + +Change this to only allocate when last exists. + +It would be more correct to not allocate at all unless we are inside a +group list, but I will address that in a separate commit to master. +--- + rfc822.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/rfc822.c b/rfc822.c +index 7ff4eaa3..ced619f2 100644 +--- a/rfc822.c ++++ b/rfc822.c +@@ -587,11 +587,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) + #endif + + /* add group terminator */ +- cur = rfc822_new_address (); + if (last) + { +- last->next = cur; +- last = cur; ++ last->next = rfc822_new_address (); ++ last = last->next; + } + + phraselen = 0; +-- +GitLab + -- cgit v1.2.3