From e411ce186021540770c389ec13b7b5b42252c4bb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 29 Apr 2016 03:31:41 -0400 Subject: gnu: poppler: Fix CVE-2015-8868. * gnu/packages/pdf.scm (poppler)[replacement]: New field. (poppler/fixed): New variable. * gnu/packages/patches/poppler-CVE-2015-8868.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/poppler-CVE-2015-8868.patch | 30 ++++++++++++++++++++++++ gnu/packages/pdf.scm | 8 +++++++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/poppler-CVE-2015-8868.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7556fa76e8..e45405fe0e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -681,6 +681,7 @@ dist_patch_DATA = \ gnu/packages/patches/plink-1.07-unclobber-i.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/polkit-drop-test.patch \ + gnu/packages/patches/poppler-CVE-2015-8868.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ diff --git a/gnu/packages/patches/poppler-CVE-2015-8868.patch b/gnu/packages/patches/poppler-CVE-2015-8868.patch new file mode 100644 index 0000000000..ac78d32ffa --- /dev/null +++ b/gnu/packages/patches/poppler-CVE-2015-8868.patch @@ -0,0 +1,30 @@ +Fixes CVE-2015-8868 (heap overflow). + +Upstream source: +https://cgit.freedesktop.org/poppler/poppler/commit/?id=b3425dd3261679958cd56c0f71995c15d2124433 + +From b3425dd3261679958cd56c0f71995c15d2124433 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Tue, 22 Dec 2015 22:50:33 +0100 +Subject: Do not crash on invalid files + +Bug #93476 + +diff --git a/poppler/Function.cc b/poppler/Function.cc +index 67283df..ee5afc1 100644 +--- a/poppler/Function.cc ++++ b/poppler/Function.cc +@@ -577,6 +577,10 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { + goto err2; + } + n = obj1.arrayGetLength(); ++ if (unlikely(n > funcMaxOutputs)) { ++ error(errSyntaxError, -1, "Function's C0 array is wrong length"); ++ n = funcMaxOutputs; ++ } + for (i = 0; i < n; ++i) { + obj1.arrayGet(i, &obj2); + if (!obj2.isNum()) { +-- +cgit v0.10.2 + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 1d33be85d5..8f9f5dd503 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -53,6 +53,7 @@ (define-public poppler (package (name "poppler") (version "0.37.0") + (replacement poppler/fixed) (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" @@ -104,6 +105,13 @@ (define-public poppler (license license:gpl2+) (home-page "http://poppler.freedesktop.org/"))) +(define poppler/fixed + (package + (inherit poppler) + (source (origin + (inherit (package-source poppler)) + (patches (search-patches "poppler-CVE-2015-8868.patch")))))) + (define-public poppler-qt4 (package (inherit poppler) (name "poppler-qt4") -- cgit v1.2.3 From 200dac065492691b4291d5d382f38e2391155091 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 Apr 2016 23:30:56 +0200 Subject: syscalls: statfs: Add missing 'mount-flags' field of 'struct statfs'. * guix/build/syscalls.scm ()[mount-flags]: New field. [spare2]: Remove. (%statfs): Likewise. --- guix/build/syscalls.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 6cdf65304d..a85f865180 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -59,6 +59,7 @@ (define-module (guix build syscalls) file-system-identifier file-system-maximum-name-length file-system-fragment-size + file-system-mount-flags statfs processes @@ -475,8 +476,7 @@ (define mkdtemp! (define-record-type (file-system type block-size blocks blocks-free blocks-available files free-files identifier - name-length fragment-size - spare0 spare1 spare2) + name-length fragment-size mount-flags spare0 spare1) file-system? (type file-system-type) (block-size file-system-block-size) @@ -488,14 +488,14 @@ (define-record-type (identifier file-system-identifier) (name-length file-system-maximum-name-length) (fragment-size file-system-fragment-size) + (mount-flags file-system-mount-flags) (spare0 file-system--spare0) - (spare1 file-system--spare1) - (spare2 file-system--spare2)) + (spare1 file-system--spare1)) (define-syntax fsword ;fsword_t (identifier-syntax long)) -(define-c-struct %statfs +(define-c-struct %statfs ; sizeof-statfs ;slightly overestimated file-system read-statfs @@ -510,9 +510,9 @@ (define-c-struct %statfs (identifier uint64) ;really "int[2]" (name-length fsword) (fragment-size fsword) + (mount-flags fsword) (spare0 int128) ;really "fsword[4]" - (spare1 int128) - (spare2 int64)) ;XXX: to match array alignment + (spare1 int128)) (define statfs (let ((proc (syscall->procedure int "statfs" '(* *)))) -- cgit v1.2.3 From 96f2a432bf94c531c4492a46b36fa4836d00a79b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 Apr 2016 23:32:25 +0200 Subject: syscalls: 'statfs' explicitly binds 'statfs64'. * guix/build/syscalls.scm (statfs): Explicitly bind "statfs64". --- guix/build/syscalls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index a85f865180..ed7942c10a 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -515,7 +515,7 @@ (define-c-struct %statfs ; (spare1 int128)) (define statfs - (let ((proc (syscall->procedure int "statfs" '(* *)))) + (let ((proc (syscall->procedure int "statfs64" '(* *)))) (lambda (file) "Return a data structure describing the file system mounted at FILE." @@ -523,7 +523,7 @@ (define statfs (ret (proc (string->pointer file) (bytevector->pointer stat))) (err (errno))) (if (zero? ret) - (read-statfs stat 0) + (read-statfs stat) (throw 'system-error "statfs" "~A: ~A" (list file (strerror err)) (list err))))))) -- cgit v1.2.3 From 3135b95fd83fd9c39c4b579ca47b7842a1d0ffd1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 14 Apr 2016 07:31:35 +0200 Subject: gnu: bootstrap: Add case for i686-mingw. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for i686-mingw. Signed-off-by: Manolis Ragkousis --- gnu/packages/bootstrap.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 3f3770d89b..a3cd18519c 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -172,6 +172,7 @@ (define* (glibc-dynamic-linker ;; here just so we can keep going. ((string=? system "xtensa-elf") "no-ld.so") ((string=? system "avr") "no-ld.so") + ((string=? system "i686-mingw") "no-ld.so") (else (error "dynamic linker name not known for this system" system)))) -- cgit v1.2.3 From 55f4b4e00fde3323e89a41821141a477030cf739 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Wed, 27 Apr 2016 21:22:03 +0200 Subject: gnu: ao: Format the description string. * gnu/packages/xiph.scm (ao): Add markup to description string. --- gnu/packages/xiph.scm | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index 83bed814f9..d451ec05e2 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -176,23 +176,26 @@ (define ao "Libao is a cross-platform audio library that allows programs to output audio using a simple API on a wide variety of platforms. It currently supports: -Null output (handy for testing without a sound device), -WAV files, -AU files, -RAW files, -OSS (Open Sound System, used on Linux and FreeBSD), -ALSA (Advanced Linux Sound Architecture), -aRts (Analog RealTime Synth, used by KDE), -PulseAudio (next generation GNOME sound server), -esd (EsounD or Enlightened Sound Daemon), -Mac OS X, -Windows (98 and later), -AIX, -Sun/NetBSD/OpenBSD, -IRIX, -NAS (Network Audio Server), -RoarAudio (Modern, multi-OS, networked Sound System), -OpenBSD's sndio.") +@itemize +@item Null output (handy for testing without a sound device), +@item WAV files, +@item AU files, +@item RAW files, +@item OSS (Open Sound System, used on Linux and FreeBSD), +@item ALSA (Advanced Linux Sound Architecture), +@item aRts (Analog RealTime Synth, used by KDE), +@item PulseAudio (next generation GNOME sound server), +@item esd (EsounD or Enlightened Sound Daemon), +@item Mac OS X, +@item Windows (98 and later), +@item AIX, +@item Sun/NetBSD/OpenBSD, +@item IRIX, +@item NAS (Network Audio Server), +@item RoarAudio (Modern, multi-OS, networked Sound System), +@item OpenBSD's sndio. +@end itemize +") (license license:gpl2+) (home-page "http://www.xiph.org/ao/"))) -- cgit v1.2.3 From 2df092a93dd4a7718834aafadc729ccd9c3f3289 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 1 May 2016 18:11:51 +0200 Subject: gnu: ao: Replace "itemize" with "enumerate" in description string. * gnu/packages/xiph.scm (ao): Replace "itemize" with "enumerate" in description string. Apparently Guile cannot yet handle "itemize" when creating HTML. --- gnu/packages/xiph.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index d451ec05e2..244f0c84b4 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -176,7 +176,7 @@ (define ao "Libao is a cross-platform audio library that allows programs to output audio using a simple API on a wide variety of platforms. It currently supports: -@itemize +@enumerate @item Null output (handy for testing without a sound device), @item WAV files, @item AU files, @@ -194,7 +194,7 @@ (define ao @item NAS (Network Audio Server), @item RoarAudio (Modern, multi-OS, networked Sound System), @item OpenBSD's sndio. -@end itemize +@end enumerate ") (license license:gpl2+) (home-page "http://www.xiph.org/ao/"))) -- cgit v1.2.3 From a66a60f251e38424078f2881522d0956e2f3643a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 27 Apr 2016 22:49:22 +0200 Subject: gnu: Add synthv1. * gnu/packages/music.scm (synthv1): New variable. --- gnu/packages/music.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index cea685f705..f5ed8b8a59 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -689,6 +689,34 @@ (define-public powertabeditor Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.") (license license:gpl3+))) +(define-public synthv1 + (package + (name "synthv1") + (version "0.7.4") + (source (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/synthv1/synthv1-" + version ".tar.gz")) + (sha256 + (base32 + "16n0v4jk0ilirq84rrildvdwqxgxav78rk58ilhl622v5n893c7w")))) + (build-system gnu-build-system) + ;; There are no tests. + (arguments `(#:tests? #f)) + (inputs + `(("jack" ,jack-1) + ("lv2" ,lv2) + ("alsa-lib" ,alsa-lib) + ("liblo" ,liblo) + ("qt" ,qt))) + (home-page "http://synthv1.sourceforge.net") + (synopsis "Polyphonic subtractive synthesizer") + (description + "Synthv1 is an old-school subtractive polyphonic synthesizer with four +oscillators and stereo effects.") + (license license:gpl2+))) + (define-public setbfree (package (name "setbfree") -- cgit v1.2.3 From 1b90e57eb75e760bd83acb39a0f8085d22d3813d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 28 Apr 2016 08:11:05 +0200 Subject: gnu: Add antiword. * gnu/packages/textutils.scm (antiword): New variable. --- gnu/packages/textutils.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 71cf25b224..f6735a43e0 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -292,3 +292,39 @@ (define-public oniguruma characteristic of this library is that different character encoding for every regular expression object can be specified.") (license license:bsd-2))) + +(define-public antiword + (package + (name "antiword") + (version "0.37") + (source (origin + (method url-fetch) + (uri (string-append "http://www.winfield.demon.nl/linux" + "/antiword-" version ".tar.gz")) + (sha256 + (base32 + "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There are no tests + #:make-flags + (list "-f" "Makefile.Linux" + (string-append "GLOBAL_INSTALL_DIR=" + (assoc-ref %outputs "out") "/bin") + (string-append "GLOBAL_RESOURCES_DIR=" + (assoc-ref %outputs "out") "/share/antiword")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" `("global_install" ,@make-flags)))))))) + (home-page "http://www.winfield.demon.nl/") + (synopsis "Microsoft Word document reader") + (description "Antiword is an application for displaying Microsoft Word +documents. It can also convert the document to PostScript or XML. Only +documents made by MS Word version 2 and version 6 or later are supported. The +name comes from: \"The antidote against people who send Microsoft Word files +to everybody, because they believe that everybody runs Windows and therefore +runs Word\".") + (license license:gpl2+))) -- cgit v1.2.3 From dfc9d18e88b3c77d90a72fbe223084ed44f5a6f6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 1 May 2016 18:09:30 +0200 Subject: gnu: qtractor: Update to 0.7.7. * gnu/packages/music.scm (qtractor): Update to 0.7.7. --- gnu/packages/music.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index f5ed8b8a59..95f52c5dd6 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1209,14 +1209,14 @@ (define-public cursynth (define-public qtractor (package (name "qtractor") - (version "0.7.5") + (version "0.7.7") (source (origin (method url-fetch) (uri (string-append "http://downloads.sourceforge.net/qtractor/" "qtractor-" version ".tar.gz")) (sha256 (base32 - "0drqzp1rbqmqiwdzc9n3307y8rm882fha3awy5qlvir5ma2mwl80")))) + "0q8kvy1ynlg64v1w7jxix1rpq0lp2ixgb2y8cbbwxd2b28r3r2vl")))) (build-system gnu-build-system) (arguments `(#:tests? #f)) ; no "check" target (inputs -- cgit v1.2.3 From d706d943359926ddd0950bbcfc71eb98f671ee1d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 1 May 2016 18:10:38 +0200 Subject: gnu: guitarix: Update to 0.35.0. * gnu/packages/audio.scm (guitarix): Update to 0.35.0. --- gnu/packages/audio.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index cdcb61afee..bcb3b77b88 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -862,15 +862,15 @@ (define-public freepats (define-public guitarix (package (name "guitarix") - (version "0.34.0") + (version "0.35.0") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/guitarix/guitarix2-" - version ".tar.bz2")) + version ".tar.xz")) (sha256 (base32 - "0pamaq8iybsaglq6y1m1rlmz4wgbs2r6m24bj7x4fwg4grjvzjl8")))) + "10hijqrrl8xil46kgsac10ysfxysisxlibm2rz133zyig5n63jdw")))) (build-system waf-build-system) (arguments `(#:tests? #f ; no "check" target -- cgit v1.2.3 From 63bcec71409d383a75f25a880a713140be9fe4ca Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 7 Apr 2016 14:28:57 +0200 Subject: gnu: Add python2-shedskin. * gnu/packages/python.scm (python2-shedskin): New variable. Signed-off-by: Leo Famulari --- gnu/packages/python.scm | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f367e1e605..7593fc71ac 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -37,7 +37,7 @@ (define-module (gnu packages python) #:use-module ((guix licenses) #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style - gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ + gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ isc mpl2.0 psfl public-domain repoze unlicense x11-style zpl2.1)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) @@ -78,6 +78,8 @@ (define-module (gnu packages python) #:use-module (gnu packages xdisorg) #:use-module (gnu packages zip) #:use-module (gnu packages tcl) + #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages pcre) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -8704,3 +8706,42 @@ (define-public python-cysignals (define-public python2-cysignals (package-with-python2 python-cysignals)) +(define-public python2-shedskin + (package + (name "python2-shedskin") + (version "0.9.4") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/shedskin/shedskin/" + "releases/download/v" version + "/shedskin-" version ".tgz")) + (sha256 + (base32 + "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-resulting-include-libs + (lambda* (#:key inputs #:allow-other-keys) + (let ((libgc (assoc-ref inputs "libgc")) + (pcre (assoc-ref inputs "pcre"))) + (substitute* "shedskin/makefile.py" + (("variable == 'CCFLAGS':[ ]*") + (string-append "variable == 'CCFLAGS':\n" + " line += ' -I " pcre "/include" + " -I " libgc "/include'")) + (("variable == 'LFLAGS':[ ]*") + (string-append "variable == 'LFLAGS':\n" + " line += ' -L" pcre "/lib" + " -L " libgc "/lib'"))) + #t)))))) + (native-inputs `(("python2-setuptools" ,python2-setuptools))) + (inputs `(("pcre" ,pcre) + ("libgc" ,libgc))) + (home-page "https://shedskin.github.io/") + (synopsis "Experimental Python-2 to C++ Compiler") + (description (string-append "This is an experimental compiler for a subset of +Python. It generates C++ code and a Makefile.")) + (license (list gpl3 bsd-3 license:expat)))) -- cgit v1.2.3 From acb31b5dcd008ee7b34d83c8d2170dcdffb3199b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 30 Apr 2016 11:43:35 +0200 Subject: gnu: asymptote: Update to 2.37. * gnu/packages/plotutils.scm (asymptote): Update to 2.37. * gnu/packages/patches/asymptote-gsl2.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove reference. --- gnu/local.mk | 1 - gnu/packages/patches/asymptote-gsl2.patch | 33 ------------------------------- gnu/packages/plotutils.scm | 26 ++++++++++++++---------- 3 files changed, 16 insertions(+), 44 deletions(-) delete mode 100644 gnu/packages/patches/asymptote-gsl2.patch diff --git a/gnu/local.mk b/gnu/local.mk index e45405fe0e..702c9a602e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -415,7 +415,6 @@ dist_patch_DATA = \ gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ gnu/packages/patches/apr-skip-getservbyname-test.patch \ gnu/packages/patches/arb-ldconfig.patch \ - gnu/packages/patches/asymptote-gsl2.patch \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ diff --git a/gnu/packages/patches/asymptote-gsl2.patch b/gnu/packages/patches/asymptote-gsl2.patch deleted file mode 100644 index 4f73d16d7f..0000000000 --- a/gnu/packages/patches/asymptote-gsl2.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 71ff9e769ba5d9995b367201f0d41b7a8dedab9d Mon Sep 17 00:00:00 2001 -From: John Bowman -Date: Sat, 14 Nov 2015 01:25:56 -0700 -Subject: [PATCH] Support GSL 2.0. - ---- - gsl.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/gsl.cc b/gsl.cc -index b500557..0f81dc6 100644 ---- a/gsl.cc -+++ b/gsl.cc -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "opsymbols.h" - -@@ -1088,7 +1089,11 @@ void gen_rungsl_venv(venv &ve) - addGSLDOUBLE2Func(SYM(F)); - addGSLDOUBLE2Func(SYM(E)); - addGSLDOUBLE3Func(SYM(P),SYM(phi),SYM(k),SYM(n)); -+#if GSL_MAJOR_VERSION >= 2 -+ addGSLDOUBLE2Func(SYM(D),SYM(phi),SYM(k)); -+#else - addGSLDOUBLE3Func(SYM(D),SYM(phi),SYM(k),SYM(n)); -+#endif - addGSLDOUBLE2Func(SYM(RC),SYM(x),SYM(y)); - addGSLDOUBLE3Func(SYM(RD),SYM(x),SYM(y),SYM(z)); - addGSLDOUBLE3Func(SYM(RF),SYM(x),SYM(y),SYM(z)); diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 67f692daf5..3fdd539835 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Eric Bavier +;;; Copyright © 2016 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -171,15 +172,14 @@ (define-public ploticus (define-public asymptote (package (name "asymptote") - (version "2.35") + (version "2.37") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/asymptote/" version "/asymptote-" version ".src.tgz")) (sha256 (base32 - "11f28vxw0ybhvl7vxmqcdwvw7y6gz55ykw9ybgzb2px6lsvgag7z")) - (patches (search-patches "asymptote-gsl2.patch")))) + "16nh02m52mk9a53i8wc6l9vg710gnzr3lfbypcbvamghvaj0458i")))) (build-system gnu-build-system) ;; Note: The 'asy' binary retains a reference to docdir for use with its ;; "help" command in interactive mode, so adding a "doc" output is not @@ -206,13 +206,19 @@ (define-public asymptote (string-append "--with-context=" (assoc-ref %outputs "out") "/share/texmf/tex/context/third")) - #:phases (modify-phases %standard-phases - (add-before 'build 'patch-pdf-viewer - (lambda _ - ;; Default to a free pdf viewer - (substitute* "settings.cc" - (("defaultPDFViewer=\"acroread\"") - "defaultPDFViewer=\"gv\""))))))) + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-pdf-viewer + (lambda _ + ;; Default to a free pdf viewer + (substitute* "settings.cc" + (("defaultPDFViewer=\"acroread\"") + "defaultPDFViewer=\"gv\"")))) + (add-before 'check 'set-HOME + ;; Some tests require write access to $HOME, otherwise leading to + ;; "failed to create directory /homeless-shelter/.asy" error. + (lambda _ + (setenv "HOME" "/tmp")))))) (home-page "http://asymptote.sourceforge.net") (synopsis "Script-based vector graphics language") (description -- cgit v1.2.3 From 00cd41974e9579eccedb948d5eebed442efb600e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 1 May 2016 21:38:53 +0200 Subject: syscalls: Implement arrays in 'define-c-struct' and use it. * guix/build/syscalls.scm (sizeof*, alignof*, write-type, read-type): Add support for (array ...) forms. * guix/build/syscalls.scm ()[spare0, spare1]: Remove. [spare]: New field. * guix/build/syscalls.scm (%statfs)[identifier]: Change to (array int 2). [spare0, spare1]: Remove. [spare]: New field. --- guix/build/syscalls.scm | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index ed7942c10a..721c590f69 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -123,9 +123,11 @@ (define-module (guix build syscalls) (define-syntax sizeof* ;; XXX: This duplicates 'compile-time-value'. - (syntax-rules (int128) + (syntax-rules (int128 array) ((_ int128) 16) + ((_ (array type n)) + (* (sizeof* type) n)) ((_ type) (let-syntax ((v (lambda (s) (let ((val (sizeof type))) @@ -135,9 +137,11 @@ (define-syntax sizeof* (define-syntax alignof* ;; XXX: This duplicates 'compile-time-value'. - (syntax-rules (int128) + (syntax-rules (int128 array) ((_ int128) 16) + ((_ (array type n)) + (alignof* type)) ((_ type) (let-syntax ((v (lambda (s) (let ((val (alignof type))) @@ -182,10 +186,19 @@ (define-syntax struct-size types ...)))) (define-syntax write-type - (syntax-rules (~) + (syntax-rules (~ array) ((_ bv offset (type ~ order) value) (bytevector-uint-set! bv offset value (endianness order) (sizeof* type))) + ((_ bv offset (array type n) value) + (let loop ((i 0) + (value value) + (o offset)) + (unless (= i n) + (match value + ((head . tail) + (write-type bv o type head) + (loop (+ 1 i) tail (+ o (sizeof* type)))))))) ((_ bv offset type value) (bytevector-uint-set! bv offset value (native-endianness) (sizeof* type))))) @@ -202,7 +215,7 @@ (define-syntax write-types (types ...) (fields ...)))))) (define-syntax read-type - (syntax-rules (~ quote *) + (syntax-rules (~ array quote *) ((_ bv offset '*) (make-pointer (bytevector-uint-ref bv offset (native-endianness) @@ -210,6 +223,12 @@ (define-syntax read-type ((_ bv offset (type ~ order)) (bytevector-uint-ref bv offset (endianness order) (sizeof* type))) + ((_ bv offset (array type n)) + (unfold (lambda (i) (= i n)) + (lambda (i) + (read-type bv (+ offset (* i (sizeof* type))) type)) + 1+ + 0)) ((_ bv offset type) (bytevector-uint-ref bv offset (native-endianness) (sizeof* type))))) @@ -476,7 +495,7 @@ (define mkdtemp! (define-record-type (file-system type block-size blocks blocks-free blocks-available files free-files identifier - name-length fragment-size mount-flags spare0 spare1) + name-length fragment-size mount-flags spare) file-system? (type file-system-type) (block-size file-system-block-size) @@ -489,8 +508,7 @@ (define-record-type (name-length file-system-maximum-name-length) (fragment-size file-system-fragment-size) (mount-flags file-system-mount-flags) - (spare0 file-system--spare0) - (spare1 file-system--spare1)) + (spare file-system--spare)) (define-syntax fsword ;fsword_t (identifier-syntax long)) @@ -507,12 +525,11 @@ (define-c-struct %statfs ; (blocks-available uint64) (files uint64) (free-files uint64) - (identifier uint64) ;really "int[2]" + (identifier (array int 2)) (name-length fsword) (fragment-size fsword) (mount-flags fsword) - (spare0 int128) ;really "fsword[4]" - (spare1 int128)) + (spare (array fsword 4))) (define statfs (let ((proc (syscall->procedure int "statfs64" '(* *)))) -- cgit v1.2.3 From ae4ff9f359514937878cf82f4ac46dd14aac9056 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 1 May 2016 23:59:05 +0200 Subject: syscalls: Add 'tcgetattr' and 'tcsetattr' bindings. * guix/build/syscalls.scm (bits->symbols-body, define-bits) (local-flags): New macros. (TCSANOW, TCSADRAIN, TCSAFLUSH): New variables. (): New record type. (%termios): New C structure. (tcgetattr, tcsetattr): New procedures. * tests/syscalls.scm ("tcgetattr ENOTTY", "tcgetattr") ("tcsetattr"): New tests. --- guix/build/syscalls.scm | 131 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/syscalls.scm | 25 +++++++++ 2 files changed, 156 insertions(+) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 721c590f69..4e543d70d8 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -100,6 +100,22 @@ (define-module (guix build syscalls) interface-broadcast-address network-interfaces + termios? + termios-input-flags + termios-output-flags + termios-control-flags + termios-local-flags + termios-line-discipline + termios-control-chars + termios-input-speed + termios-output-speed + local-flags + TCSANOW + TCSADRAIN + TCSAFLUSH + tcgetattr + tcsetattr + window-size? window-size-rows window-size-columns @@ -996,6 +1012,121 @@ (define free-ifaddrs ;;; Terminals. ;;; +(define-syntax bits->symbols-body + (syntax-rules () + ((_ bits () ()) + '()) + ((_ bits (name names ...) (value values ...)) + (let ((result (bits->symbols-body bits (names ...) (values ...)))) + (if (zero? (logand bits value)) + result + (cons 'name result)))))) + +(define-syntax define-bits + (syntax-rules (define) + "Define the given numerical constants under CONSTRUCTOR, such that + (CONSTRUCTOR NAME) returns VALUE. Define BITS->SYMBOLS as a procedure that, +given an integer, returns the list of names of the constants that are or'd." + ((_ constructor bits->symbols (define names values) ...) + (begin + (define-syntax constructor + (syntax-rules (names ...) + ((_ names) values) ... + ((_ several (... ...)) + (logior (constructor several) (... ...))))) + (define (bits->symbols bits) + (bits->symbols-body bits (names ...) (values ...))) + (define names values) ...)))) + +;; 'local-flags' bits from +(define-bits local-flags + local-flags->symbols + (define ISIG #o0000001) + (define ICANON #o0000002) + (define XCASE #o0000004) + (define ECHO #o0000010) + (define ECHOE #o0000020) + (define ECHOK #o0000040) + (define ECHONL #o0000100) + (define NOFLSH #o0000200) + (define TOSTOP #o0000400) + (define ECHOCTL #o0001000) + (define ECHOPRT #o0002000) + (define ECHOKE #o0004000) + (define FLUSHO #o0010000) + (define PENDIN #o0040000) + (define IEXTEN #o0100000) + (define EXTPROC #o0200000)) + +;; "Actions" values for 'tcsetattr'. +(define TCSANOW 0) +(define TCSADRAIN 1) +(define TCSAFLUSH 2) + +(define-record-type + (termios input-flags output-flags control-flags local-flags + line-discipline control-chars + input-speed output-speed) + termios? + (input-flags termios-input-flags) + (output-flags termios-output-flags) + (control-flags termios-control-flags) + (local-flags termios-local-flags) + (line-discipline termios-line-discipline) + (control-chars termios-control-chars) + (input-speed termios-input-speed) + (output-speed termios-output-speed)) + +(define-c-struct %termios ; + sizeof-termios + termios + read-termios + write-termios! + (input-flags unsigned-int) + (output-flags unsigned-int) + (control-flags unsigned-int) + (local-flags unsigned-int) + (line-discipline uint8) + (control-chars (array uint8 32)) + (input-speed unsigned-int) + (output-speed unsigned-int)) + +(define tcgetattr + (let ((proc (syscall->procedure int "tcgetattr" (list int '*)))) + (lambda (fd) + "Return the structure for the tty at FD." + (let* ((bv (make-bytevector sizeof-termios)) + (ret (proc fd (bytevector->pointer bv))) + (err (errno))) + (if (zero? ret) + (read-termios bv) + (throw 'system-error "tcgetattr" "~A" + (list (strerror err)) + (list err))))))) + +(define tcsetattr + (let ((proc (syscall->procedure int "tcsetattr" (list int int '*)))) + (lambda (fd actions termios) + "Use TERMIOS for the tty at FD. ACTIONS is one of 'TCSANOW', +'TCSADRAIN', or 'TCSAFLUSH'; see tcsetattr(3) for details." + (define bv + (make-bytevector sizeof-termios)) + + (let-syntax ((match/write (syntax-rules () + ((_ fields ...) + (match termios + (($ fields ...) + (write-termios! bv 0 fields ...))))))) + (match/write input-flags output-flags control-flags local-flags + line-discipline control-chars input-speed output-speed)) + + (let ((ret (proc fd actions (bytevector->pointer bv))) + (err (errno))) + (unless (zero? ret) + (throw 'system-error "tcgetattr" "~A" + (list (strerror err)) + (list err))))))) + (define-syntax TIOCGWINSZ ; (identifier-syntax #x5413)) diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 71bcbc4d32..ab1e13984d 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -259,6 +259,31 @@ (define perform-container-tests? (#f #f) (lo (interface-address lo))))))) +(test-equal "tcgetattr ENOTTY" + ENOTTY + (catch 'system-error + (lambda () + (call-with-input-file "/dev/null" + (lambda (port) + (tcgetattr (fileno port))))) + (compose system-error-errno list))) + +(test-skip (if (and (file-exists? "/proc/self/fd/0") + (string-prefix? "/dev/pts/" (readlink "/proc/self/fd/0"))) + 0 + 2)) + +(test-assert "tcgetattr" + (let ((termios (tcgetattr 0))) + (and (termios? termios) + (> (termios-input-speed termios) 0) + (> (termios-output-speed termios) 0)))) + +(test-assert "tcsetattr" + (let ((first (tcgetattr 0))) + (tcsetattr 0 TCSANOW first) + (equal? first (tcgetattr 0)))) + (test-assert "terminal-window-size ENOTTY" (call-with-input-file "/dev/null" (lambda (port) -- cgit v1.2.3 From cba962086da190b474df4f55bf2b50278f519640 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Mon, 2 May 2016 10:20:17 +1000 Subject: gnu: ruby-hashery: Update to 2.1.2. * gnu/packages/ruby.scm (ruby-hashery): Update to 2.1.2. [arguments]: Remove test workaround. --- gnu/packages/ruby.scm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2aab8bf415..6c2e08f29d 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3737,24 +3737,20 @@ (define-public ruby-rubytest-cli (define-public ruby-hashery (package (name "ruby-hashery") - (version "2.1.1") + (version "2.1.2") (source (origin (method url-fetch) (uri (rubygems-uri "hashery" version)) (sha256 (base32 - "0xawbljsjarl9l7700bka672ixwznzwih4s9i38p1y9mp8hyx54g")))) + "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj")))) (build-system ruby-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - ;; Remove known test failure documented at - ;; https://github.com/rubyworks/hashery/issues/25 - (substitute* "test/case_key_hash.rb" - (("^ assert\\(s\\)") "")) (and (zero? (system* "qed")) (zero? (system* "rubytest" "-Ilib" "-Itest" "test/")))))))) (native-inputs -- cgit v1.2.3 From b74f64a960542b0679ab13de0dd28adc496cf084 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 2 May 2016 10:55:29 +0200 Subject: gnu: Add r-xnomial. * gnu/packages/statistics.scm (r-xnomial): New variable. --- gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 2178984d04..3d0faf7572 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -1828,6 +1828,34 @@ (define-public r-xml offers access to an XPath \"interpreter\".") (license license:bsd-2))) +(define-public r-xnomial + (package + (name "r-xnomial") + (version "1.0.4") + (source + (origin (method url-fetch) + (uri (cran-uri "XNomial" version)) + (sha256 + (base32 + "1mwx302576rmsjllbq2clfxilm3hkyp5bw0wmwqbn0kgv5wpy8z6")))) + (properties (quasiquote ((upstream-name . "XNomial")))) + (build-system r-build-system) + (home-page "http://cran.r-project.org/web/packages/XNomial") + (synopsis "Goodness-of-Fit test for multinomial data") + (description + "This package provides an exact Goodness-of-Fit test for +multinomial data with fixed probabilities. It can be used to +determine whether a set of counts fits a given expected ratio. To see +whether a set of observed counts fits an expectation, one can examine +all possible outcomes with @code{xmulti()} or a random sample of them +with @code{xmonte()} and find the probability of an observation +deviating from the expectation by at least as much as the observed. +As a measure of deviation from the expected, one can use the +log-likelihood ratio, the multinomial probability, or the classic +chi-square statistic. A histogram of the test statistic can also be +plotted and compared with the asymptotic curve.") + (license (list license:gpl2+ license:gpl3+)))) + (define-public r-lambda-r (package (name "r-lambda-r") -- cgit v1.2.3 From 04100c3bbb1c4269da282e8b46bd55e1c9c892b4 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 22 Apr 2016 16:07:38 +0200 Subject: gnu: Add java-qdox-1.12. * gnu/packages/java.scm (java-qdox-1.12): New variable. --- gnu/packages/java.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c94f2e4b28..eea50950ce 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -859,3 +859,44 @@ (define-public java-xz compression in pure Java. Single-threaded streamed compression and decompression and random access decompression have been fully implemented.") (license license:public-domain))) + +;; java-hamcrest-core uses qdox version 1.12. We package this version instead +;; of the latest release. +(define-public java-qdox-1.12 + (package + (name "java-qdox") + (version "1.12.1") + (source (origin + (method url-fetch) + (uri (string-append "http://central.maven.org/maven2/" + "com/thoughtworks/qdox/qdox/" version + "/qdox-" version "-sources.jar")) + (sha256 + (base32 + "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) + (build-system ant-build-system) + (arguments + `(;; Tests require junit + #:tests? #f + #:jar-name "qdox.jar" + #:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (mkdir "src") + (with-directory-excursion "src" + (zero? (system* "jar" "-xf" source))))) + ;; At this point we don't have junit, so we must remove the API + ;; tests. + (add-after 'unpack 'delete-tests + (lambda _ + (delete-file-recursively "src/com/thoughtworks/qdox/junit") + #t))))) + (home-page "http://qdox.codehaus.org/") + (synopsis "Parse definitions from Java source files") + (description + "QDox is a high speed, small footprint parser for extracting +class/interface/method definitions from source files complete with JavaDoc +@code{@tags}. It is designed to be used by active code generators or +documentation tools.") + (license license:asl2.0))) -- cgit v1.2.3 From e7e28510bb8f5bd3b5d36413d9e82f081ff55baf Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 22 Apr 2016 16:08:14 +0200 Subject: gnu: Add java-jarjar. * gnu/packages/java.scm (java-jarjar): New variable. --- gnu/packages/java.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index eea50950ce..bc96d74edd 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -900,3 +900,39 @@ (define-public java-qdox-1.12 @code{@tags}. It is designed to be used by active code generators or documentation tools.") (license license:asl2.0))) + +(define-public java-jarjar + (package + (name "java-jarjar") + (version "1.4") + (source (origin + (method url-fetch) + (uri (string-append + "https://storage.googleapis.com/google-code-archive-downloads/v2/" + "code.google.com/jarjar/jarjar-src-" version ".zip")) + (sha256 + (base32 + "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")))) + (build-system ant-build-system) + (arguments + `(;; Tests require junit, which ultimately depends on this package. + #:tests? #f + #:build-target "jar" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((target (string-append (assoc-ref outputs "out") + "/share/java"))) + (install-file (string-append "dist/jarjar-" ,version ".jar") + target)) + #t))))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "https://code.google.com/archive/p/jarjar/") + (synopsis "Repackage Java libraries") + (description + "Jar Jar Links is a utility that makes it easy to repackage Java +libraries and embed them into your own distribution. Jar Jar Links includes +an Ant task that extends the built-in @code{jar} task.") + (license license:asl2.0))) -- cgit v1.2.3 From 87c31a21a5d8cb75f907fdffaac6dad2c7c6fdad Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 22 Apr 2016 16:08:41 +0200 Subject: gnu: Add java-hamcrest-core. * gnu/packages/java.scm (java-hamcrest-core): New variable. --- gnu/packages/java.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index bc96d74edd..e8dcd7e670 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -936,3 +936,84 @@ (define-public java-jarjar libraries and embed them into your own distribution. Jar Jar Links includes an Ant task that extends the built-in @code{jar} task.") (license license:asl2.0))) + +(define-public java-hamcrest-core + (package + (name "java-hamcrest-core") + (version "1.3") + (source (origin + (method url-fetch) + (uri (string-append "https://hamcrest.googlecode.com/files/" + "hamcrest-" version ".tgz")) + (sha256 + (base32 + "1hi0jv0zrgsf4l25aizxrgvxpsrmdklsmvw0jzwz7zv9s108whn6")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled jar archives. + (for-each delete-file (find-files "." "\\.jar$")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; Tests require junit + #:make-flags (list (string-append "-Dversion=" ,version)) + #:build-target "core" + #:phases + (modify-phases %standard-phases + ;; Disable unit tests, because they require junit, which requires + ;; hamcrest-core. We also give a fixed value to the "Built-Date" + ;; attribute from the manifest for reproducibility. + (add-before 'configure 'patch-build.xml + (lambda _ + (substitute* "build.xml" + (("unit-test, ") "") + (("\\$\\{build.timestamp\\}") "guix")) + #t)) + ;; Java's "getMethods()" returns methods in an unpredictable order. + ;; To make the output of the generated code deterministic we must + ;; sort the array of methods. + (add-after 'unpack 'make-method-order-deterministic + (lambda _ + (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" + (("import java\\.util\\.Iterator;" line) + (string-append line "\n" + "import java.util.Arrays; import java.util.Comparator;")) + (("allMethods = cls\\.getMethods\\(\\);" line) + (string-append "_" line + " +private Method[] getSortedMethods() { + Arrays.sort(_allMethods, new Comparator() { + @Override + public int compare(Method a, Method b) { + return a.toString().compareTo(b.toString()); + } + }); + return _allMethods; +} + +private Method[] allMethods = getSortedMethods();"))))) + (add-before 'build 'do-not-use-bundled-qdox + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "build.xml" + (("lib/generator/qdox-1.12.jar") + (string-append (assoc-ref inputs "java-qdox-1.12") + "/share/java/qdox.jar"))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file (string-append "build/hamcrest-core-" + ,version ".jar") + (string-append (assoc-ref outputs "out") + "/share/java"))))))) + (native-inputs + `(("java-qdox-1.12" ,java-qdox-1.12) + ("java-jarjar" ,java-jarjar))) + (home-page "http://hamcrest.org/") + (synopsis "Library of matchers for building test expressions") + (description + "This package provides a library of matcher objects (also known as +constraints or predicates) allowing @code{match} rules to be defined +declaratively, to be used in other frameworks. Typical scenarios include +testing frameworks, mocking libraries and UI validation rules.") + (license license:bsd-2))) -- cgit v1.2.3 From d0184f44d3c1cc2f143e48d769c11f77666bcd68 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 22 Apr 2016 16:09:17 +0200 Subject: gnu: Add java-junit. * gnu/packages/java.scm (java-junit): New variable. --- gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e8dcd7e670..fbee1a3fb3 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1017,3 +1017,35 @@ (define-public java-hamcrest-core declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules.") (license license:bsd-2))) + +(define-public java-junit + (package + (name "java-junit") + (version "4.12") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/junit-team/junit/" + "archive/r" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled jar archives. + (delete-file-recursively "lib") + #t)))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; no tests + #:jar-name "junit.jar")) + (inputs + `(("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "http://junit.org/") + (synopsis "Test framework for Java") + (description + "JUnit is a simple framework to write repeatable tests for Java projects. +JUnit provides assertions for testing expected results, test fixtures for +sharing common test data, and test runners for running tests.") + (license license:epl1.0))) -- cgit v1.2.3 From 4c48bf55020d5900c67b37be0b7380455de88a51 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Mon, 18 Apr 2016 17:00:44 +0200 Subject: gnu: powertop: Patch absolute file names. * gnu/packages/linux.scm (powertop)[inputs]: Add kmod. [arguments]: Patch absolute file names. --- gnu/packages/linux.scm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a26e641342..aa778beefb 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1203,11 +1203,31 @@ (define-public powertop (base32 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8")))) (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to + ;; allow calibrating the network interface in GuixSD. + (add-after 'unpack 'patch-absolute-file-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((kmod (assoc-ref inputs "kmod"))) + (substitute* (find-files "src" "\\.cpp$") + ;; Give the right 'modprobe' file name so that essential + ;; modules such as msr.ko can be loaded. + (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) + ;; These programs are only needed to calibrate, so using + ;; relative file names avoids adding extra inputs. When they + ;; are missing powertop gracefully handles it. + (("/usr/bin/hcitool") "hcitool") + (("/usr/bin/xset") "xset") + (("/usr/sbin/hciconfig") "hciconfig")) + #t)))))) (inputs - `(("zlib" ,zlib) - ("pciutils" ,pciutils) + `(("kmod" ,kmod) + ("libnl" ,libnl) ("ncurses" ,ncurses) - ("libnl" ,libnl))) + ("pciutils" ,pciutils) + ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://01.org/powertop/") -- cgit v1.2.3 From 62063d8546bec2d528ba56dabbe97e57332e782a Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Fri, 8 Apr 2016 00:16:37 +0200 Subject: gnu: Add reposurgeon. * gnu/packages/version-control.scm (reposurgeon): New variable. --- gnu/packages/version-control.scm | 56 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 94339012f5..fb85d933f9 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2013, 2014 Andreas Enge -;;; Copyright © 2015 Mathieu Lirzin +;;; Copyright © 2015, 2016 Mathieu Lirzin ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2014, 2016 Eric Bavier ;;; Copyright © 2015, 2016 Efraim Flashner @@ -27,7 +27,7 @@ (define-module (gnu packages version-control) #:use-module ((guix licenses) - #:select (asl2.0 bsd-2 + #:select (asl2.0 bsd-2 bsd-3 gpl1+ gpl2 gpl2+ gpl3+ lgpl2.1 public-domain x11-style)) #:use-module (guix utils) @@ -1012,6 +1012,58 @@ (define-public aegis any project with more than one developer, is one of Aegis's major functions.") (license gpl3+))) +(define-public reposurgeon + (package + (name "reposurgeon") + (version "3.37") + (source (origin + (method url-fetch) + (uri (string-append "http://www.catb.org/~esr/" name "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "14asjg4xy3mhh5z0r3k7c1wv9y803j2zfq32g5q5m95sf7yzygan")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no test suite distributed + #:make-flags + (list (string-append "target=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'fix-docbook + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "." "\\.xml$") + (("docbook/docbookx.dtd") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/docbookx.dtd"))) + #t)) + (add-after 'install 'install-emacs-data + (lambda* (#:key outputs #:allow-other-keys) + (install-file "reposurgeon-mode.el" + (string-append (assoc-ref outputs "out") + "/share/emacs/site-lisp"))))))) + (inputs + `(("python" ,python-wrapper))) + (native-inputs + `(("asciidoc" ,asciidoc) + ("docbook-xml" ,docbook-xml-4.1.2) + ("docbook-xsl" ,docbook-xsl) + ("libxml2" ,libxml2) + ("xmlto" ,xmlto))) + (home-page "http://www.catb.org/~esr/reposurgeon/") + (synopsis "Edit version-control repository history") + (description "Reposurgeon enables risky operations that version-control +systems don't want to let you do, such as editing past comments and metadata +and removing commits. It works with any version control system that can +export and import Git fast-import streams, including Git, Mercurial, Fossil, +Bazaar, CVS, RCS, and Src. It can also read Subversion dump files directly +and can thus be used to script production of very high-quality conversions +from Subversion to any supported Distributed Version Control System (DVCS).") + ;; Most files are distributed under bsd-2, except 'repocutter' which is + ;; under bsd-3. + (license (list bsd-2 bsd-3)))) + (define-public tig (package (name "tig") -- cgit v1.2.3 From aacb52fb0fe8ad48b923daa500f021dc99661fda Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 27 Apr 2016 21:20:07 +0200 Subject: gnu: Add portmidi. * gnu/packages/music.scm (portmidi): New variable. * gnu/packages/patches/portmidi-modular-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/music.scm | 30 ++ gnu/packages/patches/portmidi-modular-build.patch | 325 ++++++++++++++++++++++ 3 files changed, 356 insertions(+) create mode 100644 gnu/packages/patches/portmidi-modular-build.patch diff --git a/gnu/local.mk b/gnu/local.mk index 702c9a602e..7fefdf4349 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -682,6 +682,7 @@ dist_patch_DATA = \ gnu/packages/patches/polkit-drop-test.patch \ gnu/packages/patches/poppler-CVE-2015-8868.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ + gnu/packages/patches/portmidi-modular-build.patch \ gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 95f52c5dd6..96495bf660 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -958,6 +958,36 @@ (define-public pd projects.") (license license:bsd-3))) +(define-public portmidi + (package + (name "portmidi") + (version "217") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/portmedia/portmidi/" + version "/portmidi-src-" version ".zip")) + (sha256 + (base32 + "03rfsk7z6rdahq2ihy5k13qjzgx757f75yqka88v3gc0pn9ais88")) + (patches (list (search-patch "portmidi-modular-build.patch"))))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; tests cannot be linked + #:configure-flags + (list "-DPORTMIDI_ENABLE_JAVA=Off" + "-DCMAKE_BUILD_TYPE=Release" ; needed to have PMALSA set + "-DPORTMIDI_ENABLE_TEST=Off"))) ; tests fail linking + (inputs + `(("alsa-lib" ,alsa-lib))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "http://portmedia.sourceforge.net/portmidi/") + (synopsis "Library for MIDI I/O") + (description + "PortMidi is a library supporting real-time input and output of MIDI data +using a system-independent interface.") + (license license:expat))) + (define-public frescobaldi (package (name "frescobaldi") diff --git a/gnu/packages/patches/portmidi-modular-build.patch b/gnu/packages/patches/portmidi-modular-build.patch new file mode 100644 index 0000000000..25e64ae317 --- /dev/null +++ b/gnu/packages/patches/portmidi-modular-build.patch @@ -0,0 +1,325 @@ +We took this patch from Gentoo to break apart the portmidi build, so that we +can disable the Java parts and cleanly disable the tests which fail to link +(possibly because they are linked before “-lportmidi” is available). The +patch was downloaded from here: + +https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/portmidi/files/portmidi-217-cmake.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d + +--- portmidi/CMakeLists.txt ++++ portmidi/CMakeLists.txt +@@ -9,12 +9,11 @@ + set(CMAKE_BUILD_TYPE Release CACHE STRING + "Semicolon-separate list of supported configuration types") + # set default directories but don't override cached values... +- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "libraries go here") +- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "libraries go here") +- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY +- ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE} ++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + CACHE STRING "executables go here") + + else(UNIX) +@@ -68,10 +67,20 @@ + include_directories(pm_common porttime) + add_subdirectory(pm_common) + +-add_subdirectory(pm_test) ++option(PORTMIDI_ENABLE_JAVA "Enable Java bindings support" ON) ++option(PORTMIDI_ENABLE_STATIC "Build and install static libraries" OFF) ++option(PORTMIDI_ENABLE_TEST "Build test programs" ON) ++ ++if(PORTMIDI_ENABLE_TEST) ++ add_subdirectory(pm_test) ++endif(PORTMIDI_ENABLE_TEST) + + add_subdirectory(pm_dylib) + + # Cannot figure out how to make an xcode Java application with CMake +-add_subdirectory(pm_java) ++if(PORTMIDI_ENABLE_JAVA) ++ set(JAR_INSTALL_DIR share/java ++ CACHE STRING "Define directory name for jar installation") ++ add_subdirectory(pm_java) ++endif(PORTMIDI_ENABLE_JAVA) + +--- portmidi/pm_common/CMakeLists.txt ++++ portmidi/pm_common/CMakeLists.txt +@@ -44,9 +44,6 @@ + + # first include the appropriate system-dependent file: + if(UNIX) +- # add the -g switch for Linux and Mac OS X (not used in Win32) +- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}" +- CACHE STRING "enable extra checks for debugging" FORCE) + if(APPLE) + set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) + prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) +@@ -62,19 +59,23 @@ + ${COREMIDI_LIB} ${CORESERVICES_LIB} + CACHE INTERNAL "") + +- set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework") +- set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers) ++ if(PORTMIDI_ENABLE_JAVA) ++ set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework") ++ set(JAVA_INCLUDE_PATHS ${JAVAVM_LIB}/Headers) ++ endif(PORTMIDI_ENABLE_JAVA) + message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT}) + else(APPLE) + # LINUX settings... +- include(FindJNI) +- message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) +- message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) +- message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2}) +- message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY}) +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # libjvm.so is found relative to JAVA_INCLUDE_PATH: +- set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) ++ message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) ++ message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) ++ message(STATUS "JAVA_INCLUDE_PATH2 is " ${JAVA_INCLUDE_PATH2}) ++ message(STATUS "JAVA_JVM_LIBRARY is " ${JAVA_JVM_LIBRARY}) ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # libjvm.so is found relative to JAVA_INCLUDE_PATH: ++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}/libjvm.so) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(LINUXSRC pmlinuxalsa pmlinux finddefault) + prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) +@@ -88,10 +89,12 @@ + # /MD is multithread DLL, /MT is multithread. Change to static: + include(../pm_win/static.cmake) + +- include(FindJNI) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) + +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(WINSRC pmwin pmwinmm) + prepend_path(LIBSRC ../pm_win/ ${WINSRC}) +@@ -99,29 +102,43 @@ + set(PM_NEEDED_LIBS winmm.lib) + endif(WIN32) + endif(UNIX) +-set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY}) ++ ++if(PORTMIDI_ENABLE_JAVA) ++ set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVA_JVM_LIBRARY}) ++endif(PORTMIDI_ENABLE_JAVA) + + # this completes the list of library sources by adding shared code + list(APPEND LIBSRC pmutil portmidi) + + # now add the shared files to make the complete list of library sources +-add_library(portmidi-static ${LIBSRC}) +-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s") +-target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) +- +-# define the jni library +-include_directories(${JAVA_INCLUDE_PATHS}) +- +-set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c) +-add_library(pmjni SHARED ${JNISRC}) +-target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) +-set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") ++if(PORTMIDI_ENABLE_STATIC) ++ add_library(portmidi-static ${LIBSRC}) ++ set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi") ++ target_link_libraries(portmidi-static ${PM_NEEDED_LIBS}) ++endif(PORTMIDI_ENABLE_STATIC) ++ ++if(PORTMIDI_ENABLE_JAVA) ++ # define the jni library ++ include_directories(${JAVA_INCLUDE_PATHS}) ++ ++ set(JNISRC ${LIBSRC} ../pm_java/pmjni/pmjni.c) ++ add_library(pmjni SHARED ${JNISRC}) ++ target_link_libraries(pmjni ${JNI_EXTRA_LIBS}) ++ set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION "jnilib") ++endif(PORTMIDI_ENABLE_JAVA) + + # install the libraries (Linux and Mac OS X command line) + if(UNIX) +- INSTALL(TARGETS portmidi-static pmjni +- LIBRARY DESTINATION /usr/local/lib +- ARCHIVE DESTINATION /usr/local/lib) ++ if(PORTMIDI_ENABLE_STATIC) ++ INSTALL(TARGETS portmidi-static ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ endif(PORTMIDI_ENABLE_STATIC) ++ if(PORTMIDI_ENABLE_JAVA) ++ INSTALL(TARGETS pmjni ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ endif(PORTMIDI_ENABLE_JAVA) + # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here + # INSTALL(FILES portmidi.h ../porttime/porttime.h + # DESTINATION /usr/local/include) +--- portmidi/pm_dylib/CMakeLists.txt ++++ portmidi/pm_dylib/CMakeLists.txt +@@ -39,9 +39,6 @@ + + # first include the appropriate system-dependent file: + if(UNIX) +- # add the -g switch for Linux and Mac OS X (not used in Win32) +- set (CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}" +- CACHE STRING "enable extra checks for debugging" FORCE) + if(APPLE) + set(MACSRC pmmacosxcm pmmac readbinaryplist finddefault) + prepend_path(LIBSRC ../pm_mac/ ${MACSRC}) +@@ -63,7 +60,8 @@ + message(STATUS "SYSROOT: " ${CMAKE_OSX_SYSROOT}) + else(APPLE) + # LINUX settings... +- include(FindJNI) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) + # message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) + # message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) + # note: should use JAVA_JVM_LIB_PATH, but it is not set properly +@@ -75,11 +73,8 @@ + # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH + # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation + # because JAVA_INCLUDE_PATH2 is pretty obscure) +- set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN} +- CACHE STRING "where to find Java SDK include directory") +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux) +- # libjvm.so is found relative to JAVA_INCLUDE_PATH: +- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so) ++ set(JAVAVM_LIB ${JAVA_JVM_LIBRARY}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(LINUXSRC pmlinuxalsa pmlinux finddefault) + prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC}) +@@ -91,13 +86,15 @@ + if(WIN32) + # /MDd is multithread debug DLL, /MTd is multithread debug + # /MD is multithread DLL, /MT is multithread +- +- include(FindJNI) +- # note: should use JAVA_JVM_LIB_PATH, but it is not set properly +- set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib) + +- set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) +- # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ if(PORTMIDI_ENABLE_JAVA) ++ include(FindJNI) ++ # note: should use JAVA_JVM_LIB_PATH, but it is not set properly ++ set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib) ++ ++ set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) ++ # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) ++ endif(PORTMIDI_ENABLE_JAVA) + + set(WINSRC pmwin pmwinmm) + prepend_path(LIBSRC ../pm_win/ ${WINSRC}) +@@ -106,7 +103,10 @@ + # message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB}) + endif(WIN32) + endif(UNIX) ++ ++if(PORTMIDI_ENABLE_JAVA) + set(JNI_EXTRA_LIBS ${PM_NEEDED_LIBS} ${JAVAVM_LIB}) ++endif(PORTMIDI_ENABLE_JAVA) + + # this completes the list of library sources by adding shared code + set(SHARED_FILES pmutil portmidi) +@@ -120,8 +120,8 @@ + # install the libraries (Linux and Mac OS X command line) + if(UNIX) + INSTALL(TARGETS portmidi-dynamic +- LIBRARY DESTINATION /usr/local/lib +- ARCHIVE DESTINATION /usr/local/lib) ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h +- DESTINATION /usr/local/include) ++ DESTINATION include) + endif(UNIX) +--- portmidi/pm_java/CMakeLists.txt ++++ portmidi/pm_java/CMakeLists.txt +@@ -5,43 +5,24 @@ + # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj + else(APPLE) + # linux +- set(JPORTMIDICLASS JPortMidi.class JPortMidiException.class +- JPortMidiApi.class) +- set(PMDEFAULTSCLASS PmDefaultsFrame.class PmDefaults.class) +- prepend_path(JPORTMIDICLASS2 jportmidi/ ${JPORTMIDICLASS}) +- prepend_path(PMDEFAULTSCLASS2 pmdefaults/ ${PMDEFAULTSCLASS}) +- set(PMDEFAULTS_ALL_CLASSES ${JPORTMIDICLASS2} ${PMDEFAULTSCLASS2}) +- # message(STATUS "PMDEFAULTS_ALL_CLASSES is " ${PMDEFAULTS_ALL_CLASSES}) +- add_custom_command(OUTPUT pmdefaults/PmDefaultsFrame.class +- COMMAND javac -classpath . pmdefaults/PmDefaultsFrame.java +- MAIN_DEPENDENCY pmdefaults/PmDefaultsFrame.java +- DEPENDS pmdefaults/PmDefaults.java +- WORKING_DIRECTORY pm_java) +- add_custom_command(OUTPUT pmdefaults/PmDefaults.class +- COMMAND javac -classpath . pmdefaults/PmDefaults.java +- MAIN_DEPENDENCY pmdefaults/PmDefaults.java +- DEPENDS pmdefaults/PmDefaultsFrame.java +- WORKING_DIRECTORY pm_java) +- add_custom_command(OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar +- COMMAND cp pmdefaults/portmusic_logo.png . +- COMMAND jar cmf pmdefaults/manifest.txt pmdefaults.jar +- pmdefaults/*.class portmusic_logo.png jportmidi/*.class +- COMMAND chmod +x pmdefaults/pmdefaults +- COMMAND cp pmdefaults/pmdefaults ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +- COMMAND mv pmdefaults.jar ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +- COMMAND rm portmusic_logo.png +- MAIN_DEPENDENCY pmdefaults/PmDefaults.class +- DEPENDS ${PMDEFAULTS_ALL_CLASSES} +- WORKING_DIRECTORY pm_java) +- add_custom_target(pmdefaults_target ALL +- DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar) +- # message(STATUS "add_custom_target: pmdefaults.jar") ++ set(JAVA_CLASSES jportmidi pmdefaults) ++ add_custom_command(OUTPUT ${JAVA_CLASSES} ++ COMMAND javac -d ${CMAKE_CURRENT_BINARY_DIR} jportmidi/*.java pmdefaults/*.java ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ++ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ DEPENDS ${JAVA_CLASSES} ++ COMMAND jar cmf pmdefaults/manifest.txt ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ -C pmdefaults portmusic_logo.png -C ${CMAKE_CURRENT_BINARY_DIR} jportmidi ++ -C ${CMAKE_CURRENT_BINARY_DIR} pmdefaults ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ++ add_custom_target(pmdefaults.jar ALL ++ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar) + + # install the libraries (Linux only) +- INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar +- DESTINATION /usr/share/java) +- INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults +- DESTINATION /usr/local/bin) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pmdefaults.jar ++ DESTINATION ${JAR_INSTALL_DIR}) ++ INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/pmdefaults/pmdefaults ++ DESTINATION bin) + endif(APPLE) + endif(UNIX) + # In windows, use pm_java/make.bat +--- portmidi/pm_test/CMakeLists.txt ++++ portmidi/pm_test/CMakeLists.txt +@@ -12,8 +12,8 @@ + + macro(make_a_test name) + add_executable(${name} ${name}.c) +- target_link_libraries(${name} portmidi-static ${PM_NEEDED_LIBS}) +- add_dependencies(${name} portmidi-static) ++ target_link_libraries(${name} portmidi ${PM_NEEDED_LIBS}) ++ add_dependencies(${name} portmidi) + endmacro(make_a_test) + + make_a_test(test) -- cgit v1.2.3 From f65d59fc8e72f13933a9a9b795ef12b0f67d1f36 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 27 Apr 2016 21:25:14 +0200 Subject: gnu: Add python-pyportmidi. * gnu/packages/music.scm (python-pyportmidi): New variable. --- gnu/packages/music.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 96495bf660..fba43368a7 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -988,6 +988,40 @@ (define-public portmidi using a system-independent interface.") (license license:expat))) +(define-public python-pyportmidi + (package + (name "python-pyportmidi") + (version (package-version portmidi)) + (source (package-source portmidi)) + (build-system python-build-system) + (arguments + `(#:tests? #f ; no tests included + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-dir + (lambda _ (chdir "pm_python") #t)) + (add-after 'enter-dir 'fix-setup.py + (lambda _ + (substitute* "setup.py" + ;; Use Python 3 syntax + (("print (\".*\")" _ text) + (string-append "print(" text ")\n")) + ;; TODO.txt and CHANGES.txt don't exist + (("CHANGES =.*") "CHANGES = \"\"\n") + (("TODO =.*") "TODO = \"\"\n")) + #t))))) + (inputs + `(("portmidi" ,portmidi) + ("alsa-lib" ,alsa-lib) + ("python-cython" ,python-cython))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "http://portmedia.sourceforge.net/portmidi/") + (synopsis "Python bindings to PortMidi") + (description + "This package provides Python bindings to the PortMidi library.") + (license license:expat))) + (define-public frescobaldi (package (name "frescobaldi") -- cgit v1.2.3 From 6855b34754e5560040717922bdbc810547e2cc79 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 27 Apr 2016 21:25:42 +0200 Subject: gnu: frescobaldi: Add MIDI support. * gnu/packages/music.scm (frescobaldi)[inputs]: Add portmidi and python-pyportmidi. --- gnu/packages/music.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index fba43368a7..8465954dc7 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1037,8 +1037,10 @@ (define-public frescobaldi (build-system python-build-system) (inputs `(("lilypond" ,lilypond) + ("portmidi" ,portmidi) ("python-pyqt-4" ,python-pyqt-4) ("python-ly" ,python-ly) + ("python-pyportmidi" ,python-pyportmidi) ("poppler" ,poppler) ("python-poppler-qt4" ,python-poppler-qt4) ("python-sip" ,python-sip))) -- cgit v1.2.3 From 73124d34227a7df8a5319c5497f62c6323a64800 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 2 May 2016 19:41:55 +0200 Subject: gnu: bristol: Do not check for JACK with ldd. * gnu/packages/music.scm (bristol)[arguments]: Add build phase to disable runtime check for JACK. --- gnu/packages/music.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 8465954dc7..4946024264 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -831,6 +831,13 @@ (define-public bristol (string-prefix? "i686" system))) (substitute* "bristol/Makefile.in" (("-msse -mfpmath=sse") ""))) + #t)) + ;; We know that Bristol has been linked with JACK and we don't have + ;; ldd, so we can just skip this check. + (add-after 'unpack 'do-not-grep-for-jack + (lambda _ + (substitute* "bin/startBristol.in" + (("ldd `which bristol` | grep jack") "echo guix")) #t))))) (inputs `(("alsa-lib" ,alsa-lib) -- cgit v1.2.3 From 3854f3d7e4c6a23923c46806469678c63c392143 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 29 Apr 2016 20:55:19 -0400 Subject: gnu: ocaml: Fix CVE-2015-8869. * gnu/packages/patches/ocaml-CVE-2015-8869.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ocaml.scm (ocaml): Use it. --- gnu/local.mk | 1 + gnu/packages/ocaml.scm | 3 +- gnu/packages/patches/ocaml-CVE-2015-8869.patch | 72 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ocaml-CVE-2015-8869.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7fefdf4349..a8d156dd89 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -642,6 +642,7 @@ dist_patch_DATA = \ gnu/packages/patches/nvi-assume-preserve-path.patch \ gnu/packages/patches/nvi-dbpagesize-binpower.patch \ gnu/packages/patches/nvi-db4.patch \ + gnu/packages/patches/ocaml-CVE-2015-8869.patch \ gnu/packages/patches/ocaml-findlib-make-install.patch \ gnu/packages/patches/openexr-missing-samples.patch \ gnu/packages/patches/openimageio-boost-1.60.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 5d489532f7..434fb132bb 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -60,7 +60,8 @@ (define-public ocaml "/ocaml-" version ".tar.xz")) (sha256 (base32 - "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3")))) + "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3")) + (patches (search-patches "ocaml-CVE-2015-8869.patch")))) (build-system gnu-build-system) (native-search-paths (list (search-path-specification diff --git a/gnu/packages/patches/ocaml-CVE-2015-8869.patch b/gnu/packages/patches/ocaml-CVE-2015-8869.patch new file mode 100644 index 0000000000..0a4cb34d25 --- /dev/null +++ b/gnu/packages/patches/ocaml-CVE-2015-8869.patch @@ -0,0 +1,72 @@ +Adapted from upstream commit 659615c7b100a89eafe6253e7a5b9d84d0e8df74, +this patch omits the upstream changes to 'Changes' and 'VERSION'. + +http://seclists.org/oss-sec/2016/q2/170 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8869 +https://github.com/ocaml/ocaml/commit/659615c7b100a89eafe6253e7a5b9d84d0e8df74 +--- + byterun/alloc.c | 4 ++-- + byterun/intern.c | 2 +- + byterun/str.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/byterun/alloc.c b/byterun/alloc.c +index 96a21bf..0db9947 100644 +--- a/byterun/alloc.c ++++ b/byterun/alloc.c +@@ -153,7 +153,7 @@ CAMLexport int caml_convert_flag_list(value list, int *flags) + /* [size] is a [value] representing number of words (fields) */ + CAMLprim value caml_alloc_dummy(value size) + { +- mlsize_t wosize = Int_val(size); ++ mlsize_t wosize = Long_val(size); + + if (wosize == 0) return Atom(0); + return caml_alloc (wosize, 0); +@@ -169,7 +169,7 @@ CAMLprim value caml_alloc_dummy_function(value size,value arity) + /* [size] is a [value] representing number of floats. */ + CAMLprim value caml_alloc_dummy_float (value size) + { +- mlsize_t wosize = Int_val(size) * Double_wosize; ++ mlsize_t wosize = Long_val(size) * Double_wosize; + + if (wosize == 0) return Atom(0); + return caml_alloc (wosize, 0); +diff --git a/byterun/intern.c b/byterun/intern.c +index 89d13d1..7b8d049 100644 +--- a/byterun/intern.c ++++ b/byterun/intern.c +@@ -291,7 +291,7 @@ static void intern_rec(value *dest) + case OFreshOID: + /* Refresh the object ID */ + /* but do not do it for predefined exception slots */ +- if (Int_val(Field((value)dest, 1)) >= 0) ++ if (Long_val(Field((value)dest, 1)) >= 0) + caml_set_oo_id((value)dest); + /* Pop item and iterate */ + sp--; +diff --git a/byterun/str.c b/byterun/str.c +index 5ad4e29..885772f 100644 +--- a/byterun/str.c ++++ b/byterun/str.c +@@ -266,7 +266,7 @@ CAMLprim value caml_string_greaterequal(value s1, value s2) + CAMLprim value caml_blit_string(value s1, value ofs1, value s2, value ofs2, + value n) + { +- memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Int_val(n)); ++ memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Long_val(n)); + return Val_unit; + } + +@@ -278,7 +278,7 @@ CAMLprim value caml_fill_string(value s, value offset, value len, value init) + + CAMLprim value caml_bitvect_test(value bv, value n) + { +- int pos = Int_val(n); ++ intnat pos = Long_val(n); + return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7))); + } + +-- +2.7.4 + -- cgit v1.2.3 From 4c6aa73b8f9a16130ae9546efd8fdcb99fc034d9 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 27 Apr 2016 00:44:22 +0200 Subject: gnu: Add 4store. * gnu/packages/databases.scm (4store): New variable. * gnu/packages/patches/4store-fix-buildsystem.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch file entry. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/databases.scm | 53 +++++++++++++++++++++ gnu/packages/patches/4store-fix-buildsystem.patch | 56 +++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 gnu/packages/patches/4store-fix-buildsystem.patch diff --git a/gnu/local.mk b/gnu/local.mk index a8d156dd89..4a36bb5a36 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -403,6 +403,7 @@ GNU_SYSTEM_MODULES = \ patchdir = $(guilemoduledir)/gnu/packages/patches dist_patch_DATA = \ + gnu/packages/patches/4store-fix-buildsystem.patch \ gnu/packages/patches/abiword-explictly-cast-bools.patch \ gnu/packages/patches/abiword-wmf-version-lookup-fix.patch \ gnu/packages/patches/acl-hurd-path-max.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 9aee7b796a..63ca754688 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Nils Gillmann +;;; Copyright © 2016 Roel Janssen ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,8 +28,12 @@ (define-module (gnu packages databases) #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages avahi) #:use-module (gnu packages bash) #:use-module (gnu packages boost) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) #:use-module (gnu packages perl) #:use-module (gnu packages language) #:use-module (gnu packages linux) @@ -40,9 +45,12 @@ (define-module (gnu packages databases) #:use-module (gnu packages check) #:use-module (gnu packages algebra) #:use-module (gnu packages curl) + #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages gnupg) #:use-module (gnu packages python) #:use-module (gnu packages pcre) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages rdf) #:use-module (gnu packages xml) #:use-module (gnu packages bison) #:use-module (gnu packages jemalloc) @@ -58,6 +66,51 @@ (define-module (gnu packages databases) #:use-module (srfi srfi-26) #:use-module (ice-9 match)) +(define-public 4store + (package + (name "4store") + (version "1.1.6") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/garlik/4store/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "004fmcf1w75zhc1x3zc6kc97j4jqn2v5nhk6yb3z3cpfrhzi9j50")) + (patches (list (search-patch "4store-fix-buildsystem.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("perl" ,perl) + ("python" ,python-2) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gnu-gettext) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("glib" ,glib) + ("rasqal" ,rasqal) + ("libxml2" ,libxml2) + ("raptor2" ,raptor2) + ("readline" ,readline) + ("avahi" ,avahi) + ("pcre" ,pcre) + ("cyrus-sasl" ,cyrus-sasl) + ("openssl" ,openssl) + ("util-linux" ,util-linux))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'generate-configure + (lambda _ + (zero? (system* "./autogen.sh"))))))) + ;; http://www.4store.org has been down for a while now. + (home-page "https://github.com/garlik/4store") + (synopsis "Clustered RDF storage and query engine") + (description "4store is a RDF/SPARQL store written in C, supporting +either single machines or networked clusters.") + (license gpl3+))) + (define-public gdbm (package (name "gdbm") diff --git a/gnu/packages/patches/4store-fix-buildsystem.patch b/gnu/packages/patches/4store-fix-buildsystem.patch new file mode 100644 index 0000000000..383baa9461 --- /dev/null +++ b/gnu/packages/patches/4store-fix-buildsystem.patch @@ -0,0 +1,56 @@ +This patch sets a fixed version to avoid needing Git and the .git/ folder. +It also removes the creation of "/var/lib/4store", which is not available +during the install phase in GNU Guix. + +Patch by Roel Janssen +*** a/configure.ac Wed Feb 4 19:05:24 2015 +--- b/configure.ac Wed Mar 23 11:20:38 2016 +*************** +*** 2,13 **** + # Process this file with autoconf to produce a configure script. + + AC_PREREQ([2.50]) +! AC_INIT([4store], m4_esyscmd([./version.sh .version]), [http://4store.org/support/], [4store]) + AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) +! AM_INIT_AUTOMAKE([1.7 std-options -Wall]) + AC_CONFIG_HEADERS(4store-config.h) + + # Checks for programs. + AC_PROG_LIBTOOL + AC_PROG_AWK + AC_PROG_CC +--- 2,14 ---- + # Process this file with autoconf to produce a configure script. + + AC_PREREQ([2.50]) +! AC_INIT([4store], [1.1.6], [http://4store.org/support/], [4store]) + AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) +! AM_INIT_AUTOMAKE([1.7 std-options foreign -Wall]) + AC_CONFIG_HEADERS(4store-config.h) + + # Checks for programs. ++ AM_PROG_AR + AC_PROG_LIBTOOL + AC_PROG_AWK + AC_PROG_CC + +*** a/src/utilities/Makefile.am Wed Feb 4 19:05:24 2015 +--- b/src/utilities/Makefile.am Wed Mar 23 14:05:56 2016 +*************** +*** 13,20 **** + noinst_PROGRAMS = lex-file-verify 4s-rid + + install-data-local: +! mkdir -p $(DESTDIR)@FS_STORE_ROOT@ +! chmod 1777 $(DESTDIR)@FS_STORE_ROOT@ + + 4s_backend_destroy_SOURCES = backend-destroy.c + 4s_backend_destroy_LDADD = ../common/lib4sintl.a +--- 13,19 ---- + noinst_PROGRAMS = lex-file-verify 4s-rid + + install-data-local: +! echo "Please create the following directory: " $(DESTDIR)@FS_STORE_ROOT@ + + 4s_backend_destroy_SOURCES = backend-destroy.c + 4s_backend_destroy_LDADD = ../common/lib4sintl.a -- cgit v1.2.3 From 0a17fd7c0b82ac315b68c88e6f206e0051dcd661 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 3 May 2016 09:33:47 -0400 Subject: gnu: wpa-supplicant: Add fixes for CVE-2016-{4476,4477}. * gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch, gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch, gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch, gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch, gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch: New files. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (wpa-supplicant-minimal)[source]: Add patches. --- gnu/local.mk | 5 ++ gnu/packages/admin.scm | 7 +- .../patches/wpa-supplicant-CVE-2016-4476.patch | 82 ++++++++++++++++++++++ .../patches/wpa-supplicant-CVE-2016-4477-pt1.patch | 51 ++++++++++++++ .../patches/wpa-supplicant-CVE-2016-4477-pt2.patch | 82 ++++++++++++++++++++++ .../patches/wpa-supplicant-CVE-2016-4477-pt3.patch | 62 ++++++++++++++++ .../patches/wpa-supplicant-CVE-2016-4477-pt4.patch | 50 +++++++++++++ 7 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch create mode 100644 gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch create mode 100644 gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch create mode 100644 gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch create mode 100644 gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4a36bb5a36..a01efa9224 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -794,6 +794,11 @@ dist_patch_DATA = \ gnu/packages/patches/wpa-supplicant-CVE-2015-5314.patch \ gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch \ gnu/packages/patches/wpa-supplicant-CVE-2015-5316.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch \ gnu/packages/patches/xdotool-fix-makefile.patch \ gnu/packages/patches/xf86-video-ark-remove-mibstore.patch \ gnu/packages/patches/xf86-video-ast-remove-mibstore.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 11a2d1622b..d815dfb8b5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -874,7 +874,12 @@ (define-public wpa-supplicant-minimal (search-patches "wpa-supplicant-CVE-2015-5310.patch" "wpa-supplicant-CVE-2015-5314.patch" "wpa-supplicant-CVE-2015-5315.patch" - "wpa-supplicant-CVE-2015-5316.patch")))) + "wpa-supplicant-CVE-2015-5316.patch" + "wpa-supplicant-CVE-2016-4476.patch" + "wpa-supplicant-CVE-2016-4477-pt1.patch" + "wpa-supplicant-CVE-2016-4477-pt2.patch" + "wpa-supplicant-CVE-2016-4477-pt3.patch" + "wpa-supplicant-CVE-2016-4477-pt4.patch")))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch b/gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch new file mode 100644 index 0000000000..acad6be0a4 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2016-4476.patch @@ -0,0 +1,82 @@ +From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 4 Mar 2016 17:20:18 +0200 +Subject: [PATCH 1/5] WPS: Reject a Credential with invalid passphrase + +WPA/WPA2-Personal passphrase is not allowed to include control +characters. Reject a Credential received from a WPS Registrar both as +STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or +WPA2PSK authentication type and includes an invalid passphrase. + +This fixes an issue where hostapd or wpa_supplicant could have updated +the configuration file PSK/passphrase parameter with arbitrary data from +an external device (Registrar) that may not be fully trusted. Should +such data include a newline character, the resulting configuration file +could become invalid and fail to be parsed. + +Signed-off-by: Jouni Malinen +--- + src/utils/common.c | 12 ++++++++++++ + src/utils/common.h | 1 + + src/wps/wps_attr_process.c | 10 ++++++++++ + 3 files changed, 23 insertions(+) + +diff --git a/src/utils/common.c b/src/utils/common.c +index 450e2c6..27b7c02 100644 +--- a/src/utils/common.c ++++ b/src/utils/common.c +@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len) + } + + ++int has_ctrl_char(const u8 *data, size_t len) ++{ ++ size_t i; ++ ++ for (i = 0; i < len; i++) { ++ if (data[i] < 32 || data[i] == 127) ++ return 1; ++ } ++ return 0; ++} ++ ++ + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len) +diff --git a/src/utils/common.h b/src/utils/common.h +index 701dbb2..a972240 100644 +--- a/src/utils/common.h ++++ b/src/utils/common.h +@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); + + char * wpa_config_parse_string(const char *value, size_t *len); + int is_hex(const u8 *data, size_t len); ++int has_ctrl_char(const u8 *data, size_t len); + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len); +diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c +index eadb22f..e8c4579 100644 +--- a/src/wps/wps_attr_process.c ++++ b/src/wps/wps_attr_process.c +@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred) + cred->key_len--; + #endif /* CONFIG_WPS_STRICT */ + } ++ ++ ++ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) && ++ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) { ++ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase"); ++ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key", ++ cred->key, cred->key_len); ++ return -1; ++ } ++ + return 0; + } + +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch new file mode 100644 index 0000000000..507a96e47c --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch @@ -0,0 +1,51 @@ +From 73e4abb24a936014727924d8b0b2965edfc117dd Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 4 Mar 2016 18:46:41 +0200 +Subject: [PATCH 2/5] Reject psk parameter set with invalid passphrase + character + +WPA/WPA2-Personal passphrase is not allowed to include control +characters. Reject a passphrase configuration attempt if that passphrase +includes an invalid passphrase. + +This fixes an issue where wpa_supplicant could have updated the +configuration file psk parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the passphrase value before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject up to 63 characters of +almost arbitrary data into the configuration file. Such configuration +file could result in wpa_supplicant trying to load a library (e.g., +opensc_engine_path, pkcs11_engine_path, pkcs11_module_path, +load_dynamic_eap) from user controlled location when starting again. +This would allow code from that library to be executed under the +wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +--- + wpa_supplicant/config.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index b1c7870..fdd9643 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -478,6 +478,12 @@ static int wpa_config_parse_psk(const struct parse_data *data, + } + wpa_hexdump_ascii_key(MSG_MSGDUMP, "PSK (ASCII passphrase)", + (u8 *) value, len); ++ if (has_ctrl_char((u8 *) value, len)) { ++ wpa_printf(MSG_ERROR, ++ "Line %d: Invalid passphrase character", ++ line); ++ return -1; ++ } + if (ssid->passphrase && os_strlen(ssid->passphrase) == len && + os_memcmp(ssid->passphrase, value, len) == 0) { + /* No change to the previously configured value */ +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch new file mode 100644 index 0000000000..684d25de96 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch @@ -0,0 +1,82 @@ +From 0fe5a234240a108b294a87174ad197f6b5cb38e9 Mon Sep 17 00:00:00 2001 +From: Paul Stewart +Date: Thu, 3 Mar 2016 15:40:19 -0800 +Subject: [PATCH 3/5] Remove newlines from wpa_supplicant config network + output + +Spurious newlines output while writing the config file can corrupt the +wpa_supplicant configuration. Avoid writing these for the network block +parameters. This is a generic filter that cover cases that may not have +been explicitly addressed with a more specific commit to avoid control +characters in the psk parameter. + +Signed-off-by: Paul Stewart +--- + src/utils/common.c | 11 +++++++++++ + src/utils/common.h | 1 + + wpa_supplicant/config.c | 15 +++++++++++++-- + 3 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/src/utils/common.c b/src/utils/common.c +index 27b7c02..9856463 100644 +--- a/src/utils/common.c ++++ b/src/utils/common.c +@@ -709,6 +709,17 @@ int has_ctrl_char(const u8 *data, size_t len) + } + + ++int has_newline(const char *str) ++{ ++ while (*str) { ++ if (*str == '\n' || *str == '\r') ++ return 1; ++ str++; ++ } ++ return 0; ++} ++ ++ + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len) +diff --git a/src/utils/common.h b/src/utils/common.h +index a972240..d19927b 100644 +--- a/src/utils/common.h ++++ b/src/utils/common.h +@@ -489,6 +489,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); + char * wpa_config_parse_string(const char *value, size_t *len); + int is_hex(const u8 *data, size_t len); + int has_ctrl_char(const u8 *data, size_t len); ++int has_newline(const char *str); + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len); +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index fdd9643..eb97cd5 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -2699,8 +2699,19 @@ char * wpa_config_get(struct wpa_ssid *ssid, const char *var) + + for (i = 0; i < NUM_SSID_FIELDS; i++) { + const struct parse_data *field = &ssid_fields[i]; +- if (os_strcmp(var, field->name) == 0) +- return field->writer(field, ssid); ++ if (os_strcmp(var, field->name) == 0) { ++ char *ret = field->writer(field, ssid); ++ ++ if (ret && has_newline(ret)) { ++ wpa_printf(MSG_ERROR, ++ "Found newline in value for %s; not returning it", ++ var); ++ os_free(ret); ++ ret = NULL; ++ } ++ ++ return ret; ++ } + } + + return NULL; +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch new file mode 100644 index 0000000000..2dd38fee31 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch @@ -0,0 +1,62 @@ +From b166cd84a77a6717be9600bf95378a0055d6f5a5 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 5 Apr 2016 23:33:10 +0300 +Subject: [PATCH 4/5] Reject SET_CRED commands with newline characters in the + string values + +Most of the cred block parameters are written as strings without +filtering and if there is an embedded newline character in the value, +unexpected configuration file data might be written. + +This fixes an issue where wpa_supplicant could have updated the +configuration file cred parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the credential value before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject almost arbitrary data +into the configuration file. Such configuration file could result in +wpa_supplicant trying to load a library (e.g., opensc_engine_path, +pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user +controlled location when starting again. This would allow code from that +library to be executed under the wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +--- + wpa_supplicant/config.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index eb97cd5..69152ef 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -2896,6 +2896,8 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var, + + if (os_strcmp(var, "password") == 0 && + os_strncmp(value, "ext:", 4) == 0) { ++ if (has_newline(value)) ++ return -1; + str_clear_free(cred->password); + cred->password = os_strdup(value); + cred->ext_password = 1; +@@ -2946,9 +2948,14 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var, + } + + val = wpa_config_parse_string(value, &len); +- if (val == NULL) { ++ if (val == NULL || ++ (os_strcmp(var, "excluded_ssid") != 0 && ++ os_strcmp(var, "roaming_consortium") != 0 && ++ os_strcmp(var, "required_roaming_consortium") != 0 && ++ has_newline(val))) { + wpa_printf(MSG_ERROR, "Line %d: invalid field '%s' string " + "value '%s'.", line, var, value); ++ os_free(val); + return -1; + } + +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch new file mode 100644 index 0000000000..5f42aa9219 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch @@ -0,0 +1,50 @@ +From 2a3f56502b52375c3bf113cf92adfa99bad6b488 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 5 Apr 2016 23:55:48 +0300 +Subject: [PATCH 5/5] Reject SET commands with newline characters in the + string values + +Many of the global configuration parameters are written as strings +without filtering and if there is an embedded newline character in the +value, unexpected configuration file data might be written. + +This fixes an issue where wpa_supplicant could have updated the +configuration file global parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the value of a parameter before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject almost arbitrary data +into the configuration file. Such configuration file could result in +wpa_supplicant trying to load a library (e.g., opensc_engine_path, +pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user +controlled location when starting again. This would allow code from that +library to be executed under the wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +--- + wpa_supplicant/config.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index 69152ef..d9a1603 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -3764,6 +3764,12 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data, + return -1; + } + ++ if (has_newline(pos)) { ++ wpa_printf(MSG_ERROR, "Line %d: invalid %s value with newline", ++ line, data->name); ++ return -1; ++ } ++ + tmp = os_strdup(pos); + if (tmp == NULL) + return -1; +-- +1.9.1 + -- cgit v1.2.3 From a8f3424b25cbbc585126420bcc1434c4a2398588 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 2 May 2016 08:59:57 +0200 Subject: syscalls: Wrap TCSA* constants in 'tcsetattr-action' macro. * guix/build/syscalls.scm (tcsetattr-action): New macro. (TCSANOW, TCSADRAIN, TCSAFLUSH): Remove. (tcsetattr): Adjust docstring accordingly. * tests/syscalls.scm ("tcsetattr"): Adjust accordingly. --- guix/build/syscalls.scm | 16 ++++++++-------- tests/syscalls.scm | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 4e543d70d8..a9cd6e93c8 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -110,9 +110,7 @@ (define-module (guix build syscalls) termios-input-speed termios-output-speed local-flags - TCSANOW - TCSADRAIN - TCSAFLUSH + tcsetattr-action tcgetattr tcsetattr @@ -1059,9 +1057,11 @@ (define IEXTEN #o0100000) (define EXTPROC #o0200000)) ;; "Actions" values for 'tcsetattr'. -(define TCSANOW 0) -(define TCSADRAIN 1) -(define TCSAFLUSH 2) +(define-bits tcsetattr-action + %unused-tcsetattr-action->symbols + (define TCSANOW 0) + (define TCSADRAIN 1) + (define TCSAFLUSH 2)) (define-record-type (termios input-flags output-flags control-flags local-flags @@ -1107,8 +1107,8 @@ (define tcgetattr (define tcsetattr (let ((proc (syscall->procedure int "tcsetattr" (list int int '*)))) (lambda (fd actions termios) - "Use TERMIOS for the tty at FD. ACTIONS is one of 'TCSANOW', -'TCSADRAIN', or 'TCSAFLUSH'; see tcsetattr(3) for details." + "Use TERMIOS for the tty at FD. ACTIONS is one of of the values +produced by 'tcsetattr-action'; see tcsetattr(3) for details." (define bv (make-bytevector sizeof-termios)) diff --git a/tests/syscalls.scm b/tests/syscalls.scm index ab1e13984d..0b73fb4b0c 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -281,7 +281,7 @@ (define perform-container-tests? (test-assert "tcsetattr" (let ((first (tcgetattr 0))) - (tcsetattr 0 TCSANOW first) + (tcsetattr 0 (tcsetattr-action TCSANOW) first) (equal? first (tcgetattr 0)))) (test-assert "terminal-window-size ENOTTY" -- cgit v1.2.3 From efc4eb147512fa7a2c6d74d9b296cfc22b1ef198 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 29 Apr 2016 17:12:22 +0200 Subject: gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/gcc-cross-environment-variables.patch: Also use CROSS_ variants: CROSS_C_INCLUDE_PATH, CROSS_CPLUS_INCLUDE_PATH, CROSS_OBJC_INCLUDE_PATH, CROSS_OBJCPLUS_INCLUDE_PATH to be used for system libraries, see https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00620.html. * gnu/packages/cross-base.scm (cross-gcc, cross-gcc-arguments, cross-libc): Use CROSS_*_INCLUDE_PATH (WAS: CPATH). Signed-off-by: Ludovic Courtès --- gnu/packages/cross-base.scm | 71 ++++++++++++++-------- .../patches/gcc-cross-environment-variables.patch | 51 ++++++++++------ 2 files changed, 79 insertions(+), 43 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index aa67d21c19..7c76f60a4f 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver +;;; Copyright © 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -166,36 +167,40 @@ (define (cross-gcc-arguments target libc) `(alist-cons-before 'configure 'set-cross-path (lambda* (#:key inputs #:allow-other-keys) - ;; Add the cross Linux headers to CROSS_CPATH, and remove them - ;; from CPATH. + ;; Add the cross Linux headers to CROSS_C_*_INCLUDE_PATH, + ;; and remove them from C_*INCLUDE_PATH. (let ((libc (assoc-ref inputs "libc")) (linux (assoc-ref inputs "xlinux-headers"))) (define (cross? x) ;; Return #t if X is a cross-libc or cross Linux. (or (string-prefix? libc x) (string-prefix? linux x))) - - (setenv "CROSS_CPATH" - (string-append libc "/include:" - linux "/include")) + (let ((cpath (string-append + libc "/include" + ":" linux "/include"))) + (for-each (cut setenv <> cpath) + '("CROSS_C_INCLUDE_PATH" + "CROSS_CPLUS_INCLUDE_PATH" + "CROSS_OBJC_INCLUDE_PATH" + "CROSS_OBJCPLUS_INCLUDE_PATH"))) (setenv "CROSS_LIBRARY_PATH" (string-append libc "/lib")) - - (let ((cpath (search-path-as-string->list - (getenv "C_INCLUDE_PATH"))) - (libpath (search-path-as-string->list - (getenv "LIBRARY_PATH")))) - (setenv "CPATH" - (list->search-path-as-string - (remove cross? cpath) ":")) - (for-each unsetenv - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH")) - (setenv "LIBRARY_PATH" - (list->search-path-as-string - (remove cross? libpath) ":")) - #t))) - ,phases) - phases))))))) + (for-each + (lambda (var) + (and=> (getenv var) + (lambda (value) + (let* ((path (search-path-as-string->list value)) + (native-path (list->search-path-as-string + (remove cross? path) ":"))) + (setenv var native-path))))) + '("C_INCLUDE_PATH" + "CPLUS_INCLUDE_PATH" + "OBJC_INCLUDE_PATH" + "OBJCPLUS_INCLUDE_PATH" + "LIBRARY_PATH")) + #t)) + ,phases)) + (else phases))))))) (define (cross-gcc-patches target) "Return GCC patches needed for TARGET." @@ -259,9 +264,19 @@ (define* (cross-gcc target (inputs '()) ;; Only search target inputs, not host inputs. + ;; Note: See for why not 'CPATH'. (search-paths (list (search-path-specification - (variable "CROSS_CPATH") + (variable "CROSS_C_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "CROSS_CPLUS_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "CROSS_OBJC_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "CROSS_OBJCPLUS_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "CROSS_LIBRARY_PATH") @@ -316,9 +331,13 @@ (define xlinux-headers `(alist-cons-before 'configure 'set-cross-linux-headers-path (lambda* (#:key inputs #:allow-other-keys) - (let ((linux (assoc-ref inputs "linux-headers"))) - (setenv "CROSS_CPATH" - (string-append linux "/include")) + (let* ((linux (assoc-ref inputs "linux-headers")) + (cpath (string-append linux "/include"))) + (for-each (cut setenv <> cpath) + '("CROSS_C_INCLUDE_PATH" + "CROSS_CPLUS_INCLUDE_PATH" + "CROSS_OBJC_INCLUDE_PATH" + "CROSS_OBJCPLUS_INCLUDE_PATH")) #t)) ,phases)))) diff --git a/gnu/packages/patches/gcc-cross-environment-variables.patch b/gnu/packages/patches/gcc-cross-environment-variables.patch index 0bd0be5984..ec4378e2d2 100644 --- a/gnu/packages/patches/gcc-cross-environment-variables.patch +++ b/gnu/packages/patches/gcc-cross-environment-variables.patch @@ -1,9 +1,23 @@ Search path environment variables for cross-compilers. See the discussion at . ---- gcc-4.7.2/gcc/incpath.c 2012-01-27 00:34:58.000000000 +0100 -+++ gcc-4.7.2/gcc/incpath.c 2013-02-12 10:11:27.000000000 +0100 -@@ -452,7 +452,7 @@ register_include_chains (cpp_reader *pfi +Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed +at . + +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -461,8 +461,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + int stdinc, int cxx_stdinc, int verbose) + { + static const char *const lang_env_vars[] = +- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", +- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; ++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH", ++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + +@@ -473,7 +473,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, /* CPATH and language-dependent environment variables may add to the include chain. */ @@ -12,20 +26,22 @@ at . add_env_var_paths (lang_env_vars[idx], SYSTEM); target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); - ---- gcc-4.7.2/gcc/system.h 2012-02-17 00:16:28.000000000 +0100 -+++ gcc-4.7.2/gcc/system.h 2013-02-12 10:22:17.000000000 +0100 -@@ -1023,4 +1023,6 @@ helper_const_non_const_cast (const char - #define DEBUG_VARIABLE - #endif +diff --git a/gcc/system.h b/gcc/system.h +index 42bc509..af3b9ad 100644 +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -1063,4 +1063,6 @@ helper_const_non_const_cast (const char *p) + /* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */ + #include "hwint.h" +#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH" + #endif /* ! GCC_SYSTEM_H */ - ---- gcc-4.7.2/gcc/tlink.c 2012-02-11 09:50:23.000000000 +0100 -+++ gcc-4.7.2/gcc/tlink.c 2013-05-23 22:06:19.000000000 +0200 -@@ -461,7 +461,7 @@ recompile_files (void) +diff --git a/gcc/tlink.c b/gcc/tlink.c +index bc358b8..ad6242f 100644 +--- a/gcc/tlink.c ++++ b/gcc/tlink.c +@@ -458,7 +458,7 @@ recompile_files (void) file *f; putenv (xstrdup ("COMPILER_PATH=")); @@ -34,10 +50,11 @@ at . while ((f = file_pop ()) != NULL) { - ---- gcc-4.7.3/gcc/gcc.c 2013-03-08 08:25:09.000000000 +0100 -+++ gcc-4.7.3/gcc/gcc.c 2013-05-24 08:58:16.000000000 +0200 -@@ -3726,7 +3726,7 @@ process_command (unsigned int decoded_op +diff --git a/gcc/gcc.c b/gcc/gcc.c +index adbf0c4..70448c6 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -3853,7 +3853,7 @@ process_command (unsigned int decoded_options_count, } temp = getenv (LIBRARY_PATH_ENV); -- cgit v1.2.3 From e760ec4187244c0960f21803abef1849c97a8203 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 3 May 2016 17:34:54 +0200 Subject: gnu: gcc: Add 6.1.0. * gnu/packages/gcc.scm (gcc-6): New variable. * gnu/packages/commencement.scm (gcc-toolchain-6): New variable. --- gnu/packages/commencement.scm | 3 +++ gnu/packages/gcc.scm | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 6dfe5c9cb7..c52b6e8389 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -879,4 +879,7 @@ (define-public gcc-toolchain-4.9 (define-public gcc-toolchain-5 (gcc-toolchain gcc-5)) +(define-public gcc-toolchain-6 + (gcc-toolchain gcc-6)) + ;;; commencement.scm ends here diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index a2b8126872..c390a6659b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge @@ -354,6 +354,19 @@ (define-public gcc-5 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq")) (patches (search-patches "gcc-5.0-libvtv-runpath.patch")))))) +(define-public gcc-6 + (package + (inherit gcc-5) + (version "6.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "0ld3y4rgimyqgx1nwvzqyl5gr4wzc0ch4akkvsqp3fgbmdfcii09")) + (patches (search-patches "gcc-5.0-libvtv-runpath.patch")))))) + ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions accordingly. (define-public gcc gcc-4.9) -- cgit v1.2.3 From 3c1d2981ff0cc63c74d10e78fe9e2b056e9f4ac0 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 3 May 2016 13:06:00 -0400 Subject: gnu: openssl: Replace with 1.0.2h [security fixes]. Fixes CVE-2016-{2105,2106,2107,2109,2176}. * gnu/packages/tls.scm (openssl)[replacement]: New field. (openssl/fixed): New variable. --- gnu/packages/tls.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 0f4441d70c..6685ee0349 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -198,6 +198,7 @@ (define-public openssl (package (name "openssl") (version "1.0.2g") + (replacement openssl/fixed) (source (origin (method url-fetch) (uri (list (string-append "ftp://ftp.openssl.org/source/" @@ -298,6 +299,25 @@ (define-public openssl (license license:openssl) (home-page "http://www.openssl.org/"))) +(define openssl/fixed + (package + (inherit openssl) + (source + (let ((name "openssl") + (version "1.0.2h")) + (origin + (method url-fetch) + (uri (list (string-append "ftp://ftp.openssl.org/source/" + name "-" version ".tar.gz") + (string-append "ftp://ftp.openssl.org/source/old/" + (string-trim-right version char-set:letter) + "/" name "-" version ".tar.gz"))) + (sha256 + (base32 + "06996ds1rk8xhnyb5y273a7xkcxhggp4bq1g02rab55d7bjhfh0x")) + (patches (search-patches "openssl-runpath.patch" + "openssl-c-rehash-in.patch"))))))) + (define-public libressl (package (name "libressl") -- cgit v1.2.3 From 5b8a85431dd746eb975d70fe31aeb05609946d80 Mon Sep 17 00:00:00 2001 From: Kei Yamashita Date: Tue, 3 May 2016 12:04:38 -0400 Subject: gnu: Rename redeclipse package to red-eclipse. * gnu/packages/games.scm (redeclipse): Rename to... (red-eclipse): ...this. Signed-off-by: Andreas Enge --- gnu/packages/games.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 34998cea28..52a7f9b73e 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2133,7 +2133,7 @@ (define-public redeclipse ("weapons" "1ghn6nfcnd5lyl8dnj22csldvf9hrb32wjzpab4sjjz3iyv0zmr3") ("wicked" "0q9badvg6ix5rhl05s83kw2v6a49jpnbkqk4ls89qahaddfagi8g")))) (package - (name "redeclipse") + (name "red-eclipse") (version "1.5.3") (source (origin (method url-fetch) -- cgit v1.2.3 From 5ef819cc01126fd28938ec5d148ae4c1a3f6a912 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 3 May 2016 21:25:31 +0200 Subject: gnu: redeclipse: Rename to red-eclipse. * gnu/packages/games.scm (redeclipse): Rename to... (red-eclipse): ...this. This is a follow-up to commit 5b8a85431dd746eb975d70fe31aeb05609946d80, which changed only the name field of the package. --- gnu/packages/games.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 52a7f9b73e..55bffe9539 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2097,7 +2097,7 @@ (define-public powwow http://lavachat.symlynx.com/unix/") (license license:gpl2+))) -(define-public redeclipse +(define-public red-eclipse (let ((data-sources '(("acerspyro" "0gxxr6nbac918b49x1cp72nw951hqm5m4iyi2shb1612ly384w8q") ("actors" "1jq9q82m6nx07nwpb5cnpdcwa33jrcgg0j2yir8zk6zpnxdmp0il") -- cgit v1.2.3 From 1b39a196f82a4ce2d2e93b244c278e55650f65c5 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 3 May 2016 14:30:25 +0200 Subject: gnu: Add nlopt. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (nlopt): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/maths.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d37897da20..9ba7138f88 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -59,6 +59,7 @@ (define-module (gnu packages maths) #:use-module (gnu packages less) #:use-module (gnu packages lisp) #:use-module (gnu packages gnome) + #:use-module (gnu packages guile) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) #:use-module (gnu packages m4) @@ -430,6 +431,44 @@ (define-public hdf5 (license (license:x11-style "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) +(define-public nlopt + (package + (name "nlopt") + (version "2.4.2") + (source (origin + (method url-fetch) + (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-" + version ".tar.gz")) + (sha256 + (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0")))) + (build-system gnu-build-system) + (arguments + `(;; Shared libraries are not built by default. They are required to + ;; build the Guile, Octave, and Python bindings. + #:configure-flags '("--enable-shared") + + #:phases + (modify-phases %standard-phases + (add-before 'configure 'set-libnlopt-file-name + (lambda* (#:key outputs #:allow-other-keys) + ;; Make sure the Scheme module refers to the library by its + ;; absolute file name (we cannot do that from a snippet + ;; because the expansion of @libdir@ contains + ;; ${exec_prefix}.) + (let ((out (assoc-ref outputs "out"))) + (substitute* "swig/nlopt.scm.in" + (("libnlopt") + (string-append out "/lib/libnlopt"))) + #t)))))) + (inputs `(("guile" ,guile-2.0))) + (native-inputs `(("pkg-config" ,pkg-config))) + (home-page "http://ab-initio.mit.edu/wiki/") + (synopsis "Library for nonlinear optimization") + (description "NLopt is a library for nonlinear optimization, providing a +common interface for a number of different free optimization routines available +online as well as original implementations of various other algorithms.") + (license license:lgpl2.1+))) + ;; For a fully featured Octave, users are strongly recommended also to install ;; the following packages: texinfo, less, ghostscript, gnuplot. -- cgit v1.2.3 From 0a0884c9916d2d4632c6b86a917ce1fa038cf7a7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 3 May 2016 23:43:49 +0200 Subject: gnu: cross: Fix typo. * gnu/packages/cross-base.scm (cross-gcc-arguments): Remove erroneous 'else' introduced in efc4eb147512fa7a2c6d74d9b296cfc22b1ef198. --- gnu/packages/cross-base.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 7c76f60a4f..73ac76a48a 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -199,8 +199,8 @@ (define (cross? x) "OBJCPLUS_INCLUDE_PATH" "LIBRARY_PATH")) #t)) - ,phases)) - (else phases))))))) + ,phases) + phases))))))) (define (cross-gcc-patches target) "Return GCC patches needed for TARGET." -- cgit v1.2.3 From 940f8d39a5a39a7ef1a67323d6a4070440402ab6 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 28 Apr 2016 05:20:45 +0300 Subject: gnu: pinentry: Rename to pinentry-gtk2. * gnu/packages/gnupg.scm (pinentry): Rename to pinentry-gtk2. Define pinentry as pinentry-gtk2. --- gnu/packages/gnupg.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index d447007260..6e16429126 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -568,9 +568,9 @@ (define-public signing-party (license license:gpl2) (home-page "http://pgp-tools.alioth.debian.org/"))) -(define-public pinentry +(define-public pinentry-gtk2 (package - (name "pinentry") + (name "pinentry-gtk2") (version "0.9.7") (source (origin (method url-fetch) @@ -595,6 +595,10 @@ (define-public pinentry enter a passphrase when `gpg' or `gpg2' is run and needs it.") (license license:gpl2+))) +(define-public pinentry + (package (inherit pinentry-gtk2) + (name "pinentry"))) + (define-public paperkey (package (name "paperkey") -- cgit v1.2.3 From c607b7011c55932b46c2279b6fe013d730b78a50 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 26 Apr 2016 16:29:21 +0300 Subject: gnu: Add pinentry-tty. * gnu/packages/gnupg.scm (pinentry-tty): New variable. [arguments]: Add pinentry-tty flag. (pinentry-gtk2): Inherit from pinentry-tty. [inputs]: Use gtk+-2, glib for pinentry-gtk2 only. [description]: Modify description based on inputs. --- gnu/packages/gnupg.scm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 6e16429126..28ab67ce17 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -568,9 +568,9 @@ (define-public signing-party (license license:gpl2) (home-page "http://pgp-tools.alioth.debian.org/"))) -(define-public pinentry-gtk2 +(define-public pinentry-tty (package - (name "pinentry-gtk2") + (name "pinentry-tty") (version "0.9.7") (source (origin (method url-fetch) @@ -580,21 +580,33 @@ (define-public pinentry-gtk2 (base32 "1cp7wjqr6nx31mdclr61s2h84ijqjl0ph99kgj4vyawpjj1j1633")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-pinentry-tty"))) (inputs `(("ncurses" ,ncurses) ("libassuan" ,libassuan) - ("libsecret" ,libsecret "out") - ("gtk+" ,gtk+-2) - ("glib" ,glib))) + ("libsecret" ,libsecret "out"))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://gnupg.org/aegypten2/") (synopsis "GnuPG's interface to passphrase input") (description - "Pinentry provides a console and a GTK+ GUI that allows users to -enter a passphrase when `gpg' or `gpg2' is run and needs it.") + "Pinentry provides a console that allows users to enter a passphrase when +@code{gpg} or @code{gpg2} is run and needs it.") (license license:gpl2+))) +(define-public pinentry-gtk2 + (package + (inherit pinentry-tty) + (name "pinentry-gtk2") + (inputs + `(("gtk+" ,gtk+-2) + ("glib" ,glib) + ,@(package-inputs pinentry-tty))) + (description + "Pinentry provides a console and a GTK+ GUI that allows users to enter a +passphrase when @code{gpg} or @code{gpg2} is run and needs it."))) + (define-public pinentry (package (inherit pinentry-gtk2) (name "pinentry"))) -- cgit v1.2.3 From 54df75582f224d896bb39eb37c9243971fa607bc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 26 Apr 2016 16:39:31 +0300 Subject: gnu: Add pinentry-qt. * gnu/packages/gnupg.scm (pinentry-qt): New variable. --- gnu/packages/gnupg.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 28ab67ce17..b7c661257c 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -31,6 +31,7 @@ (define-module (gnu packages gnupg) #:use-module (gnu packages perl) #:use-module (gnu packages pth) #:use-module (gnu packages python) + #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages compression) #:use-module (gnu packages databases) @@ -607,6 +608,17 @@ (define-public pinentry-gtk2 "Pinentry provides a console and a GTK+ GUI that allows users to enter a passphrase when @code{gpg} or @code{gpg2} is run and needs it."))) +(define-public pinentry-qt + (package + (inherit pinentry-tty) + (name "pinentry-qt") + (inputs + `(("qt" ,qt) + ,@(package-inputs pinentry-tty))) + (description + "Pinentry provides a console and a Qt GUI that allows users to enter a +passphrase when @code{gpg} or @code{gpg2} is run and needs it."))) + (define-public pinentry (package (inherit pinentry-gtk2) (name "pinentry"))) -- cgit v1.2.3 From 83b84fa8122352ef77348e540b9bc8fcc94914b8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 4 May 2016 16:44:55 +0200 Subject: gnu: edirect: Update to 4.10. * gnu/packages/bioinformatics.scm (edirect): Update to 4.10. --- gnu/packages/bioinformatics.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 079fd467cc..5c1ad57a80 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1535,14 +1535,14 @@ (define-public diamond (define-public edirect (package (name "edirect") - (version "3.50") + (version "4.10") (source (origin (method url-fetch) - ;; Note: older versions are not retained. - (uri "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.tar.gz") + (uri (string-append "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/" + "versions/2016-05-03/edirect.tar.gz")) (sha256 (base32 - "1cr3gzcs3flmgnnbj5iz93vh9w0fca1ilzi2q82cl63ln3mwvpz0")))) + "15zsprak5yh8c1yrz4r1knmb5s8qcmdid4xdhkh3lqcv64l60hli")))) (build-system perl-build-system) (arguments `(#:tests? #f ;no "check" target -- cgit v1.2.3 From ac47ad99a4045262e235b7ae0b6f868944aad071 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 20 Apr 2016 09:38:46 +0200 Subject: gnu: bitlbee: Update to 3.4.2. * gnu/packages/messaging.scm (bitlbee): Update to 3.4.2. --- gnu/packages/messaging.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index fbe84f58b2..f094f8537d 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -94,13 +94,13 @@ (define-public libotr (define-public bitlbee (package (name "bitlbee") - (version "3.4.1") + (version "3.4.2") (source (origin (method url-fetch) (uri (string-append "https://get.bitlbee.org/src/bitlbee-" version ".tar.gz")) (sha256 - (base32 "1qf0ypa9ba5jvsnpg9slmaran16hcc5fnfzbb1sdch1hjhchn2jh")))) + (base32 "0mza8lnfwibmklz8hdzg4f7p83hblf4h6fbf7d732kzpvra5bj39")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("check" ,check))) -- cgit v1.2.3 From 11057c4b58d766f358bc439690b9765bee735772 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 20 Apr 2016 10:17:28 +0200 Subject: gnu: bitlbee: Incorporate upstream pre-release patches. * gnu/packages/messaging.scm (%bitlbee-buddy-nick-change-patch): (%bitlbee-always-use-nicks-patch): New variables. (bitlbee): Add new patches. --- gnu/packages/messaging.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index f094f8537d..a79efc3366 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -91,6 +91,24 @@ (define-public libotr (home-page "https://otr.cypherpunks.ca/") (license (list lgpl2.1 gpl2)))) +;; These patches together fix https://github.com/bitlbee/bitlbee/pull/55, are +;; already upstream, and should be unnecessary when the next bitlbee comes +;; out. +(define %bitlbee-buddy-nick-change-patch + (origin + (method url-fetch) + (uri "https://github.com/bitlbee/bitlbee/commit/a42fda42.patch") + (sha256 + (base32 + "1mzjhcdn0rxir5mzgqz9kv142ai38p1iq2lajqx89wb7x0bp51zx")))) +(define %bitlbee-always-use-nicks-patch + (origin + (method url-fetch) + (uri "https://github.com/bitlbee/bitlbee/commit/3320d6d9.patch") + (sha256 + (base32 + "14d9kb5zdzh5hzakdvrbviz83rix0j2lq9rzb58b2fn92fp8yixd")))) + (define-public bitlbee (package (name "bitlbee") @@ -100,7 +118,10 @@ (define-public bitlbee (uri (string-append "https://get.bitlbee.org/src/bitlbee-" version ".tar.gz")) (sha256 - (base32 "0mza8lnfwibmklz8hdzg4f7p83hblf4h6fbf7d732kzpvra5bj39")))) + (base32 "0mza8lnfwibmklz8hdzg4f7p83hblf4h6fbf7d732kzpvra5bj39")) + (patches + (list %bitlbee-buddy-nick-change-patch + %bitlbee-always-use-nicks-patch)))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("check" ,check))) -- cgit v1.2.3