From 6e35bad0a9d00f1eb94bb427ad856c219655e95d Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Mon, 12 Nov 2018 01:55:05 +0800 Subject: [PATCH 01/15] gnu: Add pnglite. * gnu/packages/image.scm (pnglite): New variable. --- gnu/packages/image.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index e88609a7ca..8168a225fc 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Pierre-Antoine Rouby +;;; Copyright © 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -253,6 +254,61 @@ files. It can compress them as much as 40% losslessly.") ;; This package used to be wrongfully name "pngcrunch". (deprecated-package "pngcrunch" pngcrush)) +(define-public pnglite + (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38") + (revision "1")) + (package + (name "pnglite") + ;; The project was moved from sourceforge to github. + ;; The latest version in sourceforge was 0.1.17: + ;; https://sourceforge.net/projects/pnglite/files/pnglite/ + ;; No releases are made in github. + (version (git-version "0.1.17" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dankar/pnglite") + (commit commit))) + (sha256 + (base32 + "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + ;; common build flags for building shared libraries + (let ((cflags '("-O2" "-g" "-fPIC")) + (ldflags '("-shared"))) + (apply invoke + `("gcc" + "-o" "libpnglite.so" + ,@cflags + ,@ldflags + "pnglite.c")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/")) + (include (string-append out "/include/")) + (doc (string-append out "/share/doc/" + ,name "-" ,version "/"))) + (install-file "libpnglite.so" lib) + (install-file "pnglite.h" include) + (install-file "README.md" doc) + #t)))))) + (inputs `(("zlib" ,zlib))) + (home-page "https://github.com/dankar/pnglite") + (synopsis "Pretty small png library") + (description "A pretty small png library. +Currently all documentation resides in @file{pnglite.h}.") + (license license:zlib)))) + (define-public libjpeg (package (name "libjpeg") From 078e2edf1d3ce8e208dbb891ae662a0db3376c1e Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Mon, 12 Nov 2018 02:23:27 +0800 Subject: [PATCH 02/15] gnu: Add json-parser. * gnu/packages/web.scm (json-parser): New variable. --- gnu/packages/web.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 73219c864f..eeaaa85702 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2018 Gábor Boskovits ;;; Copyright © 2018 Mădălin Ionel Patrașcu +;;; Copyright © 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -582,6 +583,37 @@ It aims to conform to RFC 7159.") (("-Werror") "")) #t)))))) +(define-public json-parser + (package + (name "json-parser") + (version "1.1.0") + (source (origin + ;; do not use auto-generated tarballs + (method git-fetch) + (uri (git-reference + (url "https://github.com/udp/json-parser.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ls7z4fx0sq633s5bc0j1gh36sv087gmrgr7rza22wjq2d4606yf")))) + ;; FIXME: we should build the python bindings in a separate package + (build-system gnu-build-system) + ;; the tests are written for the python bindings which are not built here + (arguments '(#:tests? #f)) + (home-page "https://github.com/udp/json-parser") + (synopsis "JSON parser written in ANSI C") + (description "This package provides a very low footprint JSON parser +written in portable ANSI C. + +@itemize +@item BSD licensed with no dependencies (i.e. just drop the C file into your +project) +@item Never recurses or allocates more memory than it needs +@item Very simple API with operator sugar for C++ +@end itemize") + (license l:bsd-2))) + (define-public qjson (package (name "qjson") From 53367e17b66e84eee0deb77e18df77c1108b3177 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 8 Nov 2018 10:53:43 +0800 Subject: [PATCH 03/15] gnu: bam: Update to 0.5.1. * gnu/packages/build-tools.scm (bam): Update to 0.5.1. [source]: Switch to git-fetch. [arguments]: Use newly provided Makefile. [inputs]: Add lua. --- gnu/packages/build-tools.scm | 37 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 42de56f8c3..a52ee480ac 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Tomáš Čech ;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,6 +31,7 @@ #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages compression) + #:use-module (gnu packages lua) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) @@ -40,33 +42,30 @@ (define-public bam (package (name "bam") - (version "0.4.0") + (version "0.5.1") (source (origin - (method url-fetch) - (uri (string-append "http://github.com/downloads/matricks/" - "bam/bam-" version ".tar.bz2")) + ;; do not use auto-generated tarballs + (method git-fetch) + (uri (git-reference + (url "https://github.com/matricks/bam.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn")))) + "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:make-flags `("CC=gcc" + ,(string-append "INSTALL_PREFIX=" + (assoc-ref %outputs "out"))) + #:test-target "test" + #:phases (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda _ - (zero? (system* "bash" "make_unix.sh")))) - (replace 'check - (lambda _ - (zero? (system* "python" "scripts/test.py")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) - (mkdir-p bin) - (install-file "bam" bin) - #t)))))) + (delete 'configure)))) (native-inputs `(("python" ,python-2))) + (inputs + `(("lua" ,lua))) (home-page "https://matricks.github.io/bam/") (synopsis "Fast and flexible build system") (description "Bam is a fast and flexible build system. Bam uses Lua to From f9e5caf9bae93fdafbaa6732b3b4eb45f0126656 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Mon, 12 Nov 2018 02:42:25 +0800 Subject: [PATCH 04/15] gnu: teeworlds: Update to 0.7.0 [fixes CVE-2018-18541]. * gnu/packages/games.scm (teeworlds): Update to 0.7.0. [source]: Switch to git-fetch. Remove all bundled libraries except md5. [arguments]: Adjust accordingly. [inputs]: Use sdl2 instead of sdl and python-wrapper instead of python-2. Add json-parser and pnglite. * gnu/packages/patches/teeworlds-use-latest-wavpack.patch: Update it. --- gnu/packages/games.scm | 116 ++++++++++++------ .../teeworlds-use-latest-wavpack.patch | 72 ++++++++--- 2 files changed, 136 insertions(+), 52 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index bc5d3d581b..b025dfe232 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2018 Tim Gesthuizen ;;; Copyright © 2018 Madalin Ionel-Patrascu ;;; Copyright © 2018 Benjamin Slade +;;; Copyright © 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -4139,31 +4140,54 @@ small robot living in the nano world, repair its maker.") (define-public teeworlds (package (name "teeworlds") - (version "0.6.4") + (version "0.7.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/teeworlds/teeworlds/" - "archive/" version "-release.tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + ;; do not use auto-generated tarballs + (method git-fetch) + (uri (git-reference + (url "https://github.com/teeworlds/teeworlds.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1mqhp6xjl75l49050cid36wxyjn1qr0vjx1c709dfg1lkvmgs6l3")) - (modules '((guix build utils))) - (snippet - '(begin - (for-each delete-file-recursively - '("src/engine/external/wavpack/" - "src/engine/external/zlib/")) + "0jigg2yikihbivzs7hpljr0mghx1l9v4f1cdr8fbmqv2wb51ah8q")) + (modules '((guix build utils) + (ice-9 ftw) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26))) + (snippet ; remove bundled libraries except md5 + '(let ((base-dir "src/engine/external/")) + (for-each (compose (cut delete-file-recursively <>) + (cut string-append base-dir <>)) + (remove (cut string-match "(^.)|(^md5$)" <>) + (scandir base-dir))) #t)) (patches (search-patches "teeworlds-use-latest-wavpack.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests included + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) + ;; The bundled json-parser uses an old API. + ;; To use the latest non-bundled version, we need to pass the + ;; length of the data in all 'json_parse_ex' calls. + (define (use-latest-json-parser file) + (substitute* file + (("engine/external/json-parser/json\\.h") + "json-parser/json.h") + (("json_parse_ex\\(&JsonSettings, pFileData, aError\\);") + "json_parse_ex(&JsonSettings, + pFileData, + strlen(pFileData), + aError);"))) + ;; Embed path to assets. (substitute* "src/engine/shared/storage.cpp" (("#define DATA_DIR.*") @@ -4173,50 +4197,68 @@ small robot living in the nano world, repair its maker.") "\""))) ;; Bam expects all files to have a recent time stamp. - (for-each (lambda (file) - (utime file 1 1)) + (for-each (cut utime <> 1 1) (find-files ".")) ;; Do not use bundled libraries. (substitute* "bam.lua" - (("if config.zlib.value == 1 then") - "if true then") - (("wavpack = .*") - "wavpack = {} -settings.link.libs:Add(\"wavpack\")\n")) + (("local json = Compile.+$") + "local json = nil +settings.link.libs:Add(\"jsonparser\")") + (("local png = Compile.+$") + "local png = nil +settings.link.libs:Add(\"pnglite\")") + (("local wavpack = Compile.+$") + "local wavpack = nil +settings.link.libs:Add(\"wavpack\")") + (("if config\\.zlib\\.value == 1") + "if config.zlib.value")) + (substitute* "src/engine/client/graphics_threaded.cpp" + (("engine/external/pnglite/pnglite\\.h") + "pnglite.h")) (substitute* "src/engine/client/sound.cpp" - (("#include ") - "#include ")) + (("engine/external/wavpack/wavpack\\.h") + "wavpack/wavpack.h")) + (for-each use-latest-json-parser + '("src/game/client/components/countryflags.cpp" + "src/game/client/components/menus_settings.cpp" + "src/game/client/components/skins.cpp" + "src/game/client/localization.cpp" + "src/game/editor/auto_map.h" + "src/game/editor/editor.cpp")) #t)) (replace 'build (lambda _ - (zero? (system* "bam" "-a" "-v" "release")))) + (invoke "bam" "-a" "-v" "conf=release"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (data (string-append out "/share/teeworlds/data"))) - (mkdir-p bin) - (mkdir-p data) - (for-each (lambda (file) - (install-file file bin)) - '("teeworlds" "teeworlds_srv")) - (copy-recursively "data" data) + (let* ((arch ,(system->linux-architecture + (or (%current-target-system) + (%current-system)))) + (build (string-append "build/" arch "/release/")) + (data-built (string-append build "data/")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (data (string-append out "/share/teeworlds/data/"))) + (for-each (cut install-file <> bin) + (map (cut string-append build <>) + '("teeworlds" "teeworlds_srv"))) + (copy-recursively data-built data) #t)))))) - ;; FIXME: teeworlds bundles the sources of "pnglite", a two-file PNG - ;; library without a build system. (inputs `(("freetype" ,freetype) ("glu" ,glu) + ("json-parser" ,json-parser) ("mesa" ,mesa) - ("sdl-union" ,(sdl-union (list sdl - sdl-mixer - sdl-image))) + ("pnglite" ,pnglite) + ("sdl2" ,sdl2) + ("sdl2-image" ,sdl2-image) + ("sdl2-mixer" ,sdl2-mixer) ("wavpack" ,wavpack) ("zlib" ,zlib))) (native-inputs `(("bam" ,bam) - ("python" ,python-2) + ("python" ,python-wrapper) ("pkg-config" ,pkg-config))) (home-page "https://www.teeworlds.com") (synopsis "2D retro multiplayer shooter game") diff --git a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch index e9fd991087..3ad1340d2e 100644 --- a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch +++ b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch @@ -1,10 +1,20 @@ -Downloaded from https://anonscm.debian.org/cgit/pkg-games/teeworlds.git/plain/debian/patches/new-wavpack.patch. +Downloaded from https://salsa.debian.org/games-team/teeworlds/raw/master/debian/patches/new-wavpack.patch. -This patch lets us build teeworlds with wavpack 5.1.0. +From: Markus Koschany +Date: Thu, 25 Oct 2018 20:52:27 +0200 +Subject: new-wavpack +Make wavpack compatible with Debian's version. +--- + src/engine/client/sound.cpp | 33 +++++++++++++++------------------ + src/engine/client/sound.h | 4 ---- + 2 files changed, 15 insertions(+), 22 deletions(-) + +diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp +index 048ec24..80de3c5 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp -@@ -328,17 +328,14 @@ void CSound::RateConvert(int SampleID) +@@ -325,10 +325,6 @@ void CSound::RateConvert(int SampleID) pSample->m_NumFrames = NumFrames; } @@ -12,10 +22,10 @@ This patch lets us build teeworlds with wavpack 5.1.0. -{ - return io_read(ms_File, pBuffer, Size); -} -- - int CSound::LoadWV(const char *pFilename) + + ISound::CSampleHandle CSound::LoadWV(const char *pFilename) { - CSample *pSample; +@@ -336,6 +332,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) int SampleID = -1; char aError[100]; WavpackContext *pContext; @@ -24,17 +34,18 @@ This patch lets us build teeworlds with wavpack 5.1.0. // don't waste memory on sound when we are stress testing if(g_Config.m_DbgStress) -@@ -351,19 +348,23 @@ int CSound::LoadWV(const char *pFilename - if(!m_pStorage) - return -1; +@@ -349,25 +347,29 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + return CSampleHandle(); + lock_wait(m_SoundLock); - ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); - if(!ms_File) + File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL, aWholePath, sizeof(aWholePath)); + if(!File) { dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename); - return -1; + lock_unlock(m_SoundLock); + return CSampleHandle(); } + else + { @@ -43,7 +54,14 @@ This patch lets us build teeworlds with wavpack 5.1.0. SampleID = AllocID(); if(SampleID < 0) - return -1; + { +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } pSample = &m_aSamples[SampleID]; - pContext = WavpackOpenFileInput(ReadData, aError); @@ -51,7 +69,29 @@ This patch lets us build teeworlds with wavpack 5.1.0. if (pContext) { int m_aSamples = WavpackGetNumSamples(pContext); -@@ -419,9 +420,6 @@ int CSound::LoadWV(const char *pFilename +@@ -385,8 +387,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(pSample->m_Channels > 2) + { + dbg_msg("sound/wv", "file is not mono or stereo. filename='%s'", pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -401,8 +403,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(BitsPerSample != 16) + { + dbg_msg("sound/wv", "bps is %d, not 16, filname='%s'", BitsPerSample, pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -429,9 +431,6 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError); } @@ -61,14 +101,16 @@ This patch lets us build teeworlds with wavpack 5.1.0. if(g_Config.m_Debug) dbg_msg("sound/wv", "loaded %s", pFilename); -@@ -527,7 +525,5 @@ void CSound::StopAll() - lock_unlock(m_SoundLock); +@@ -560,7 +559,5 @@ bool CSound::IsPlaying(CSampleHandle SampleID) + return Ret; } -IOHANDLE CSound::ms_File = 0; - IEngineSound *CreateEngineSound() { return new CSound; } +diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h +index ff357c0..cec2cde 100644 --- a/src/engine/client/sound.h +++ b/src/engine/client/sound.h @@ -21,10 +21,6 @@ public: @@ -81,4 +123,4 @@ This patch lets us build teeworlds with wavpack 5.1.0. - virtual bool IsSoundEnabled() { return m_SoundEnabled != 0; } - virtual int LoadWV(const char *pFilename); + virtual CSampleHandle LoadWV(const char *pFilename); From aa9eb25983b0f5a7145e85843a436f7396778b57 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:23:47 +0100 Subject: [PATCH 05/15] gnu: feh: Update to 3.1. * gnu/packages/image-viewers.scm (feh): Update to 3.1. --- gnu/packages/image-viewers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm index 029d5b5443..fce2b021bd 100644 --- a/gnu/packages/image-viewers.scm +++ b/gnu/packages/image-viewers.scm @@ -60,7 +60,7 @@ (define-public feh (package (name "feh") - (version "3.0") + (version "3.1") (home-page "https://feh.finalrewind.org/") (source (origin (method url-fetch) @@ -68,7 +68,7 @@ name "-" version ".tar.bz2")) (sha256 (base32 - "00fwf8yz7k8vzd30ly5ndlj6ax9w85dkjzjnlk95vd0zdrf4wyxn")))) + "01rrl009m1kxwvqqr98y4wk8m1al18fkxwv8cds2k7n4qiv6xdb7")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases (delete 'configure)) From dca7d8a25cf6eb2e4c2c0c77a65002a4aaa58ea1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:24:35 +0100 Subject: [PATCH 06/15] gnu: git: Update to 2.19.2. * gnu/packages/version-control.scm (git): Update to 2.19.2. --- gnu/packages/version-control.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index e0ad6248a5..ecd5789397 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -146,14 +146,14 @@ as well as the classic centralized workflow.") (name "git") ;; XXX When updating Git, check if the special 'git-source' input to cgit ;; needs to be updated as well. - (version "2.19.1") + (version "2.19.2") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/software/scm/git/git-" version ".tar.xz")) (sha256 (base32 - "1dfv43lmdnxz42504jc89sihbv1d4d6kgqcz3c5ji140kfm5cl1l")))) + "1scbggzghkzzfqg4ky3qh7h9w87c3zya4ls5disz7dbx56is7sgw")))) (build-system gnu-build-system) (native-inputs `(("native-perl" ,perl) @@ -166,7 +166,7 @@ as well as the classic centralized workflow.") version ".tar.xz")) (sha256 (base32 - "1vn6pi9yvw7rnb9dvi1yjrvv39fqd1m9mwbaffqwizs3gaf91br7")))) + "1sqhllkabylm46paswg0j54fiar44fmcdmkjkysmjn2gj6hqpz95")))) ;; For subtree documentation. ("asciidoc" ,asciidoc) ("docbook-xsl" ,docbook-xsl) From da15325e3650bff11a17320fdbd5f4b1ca71598f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:24:51 +0100 Subject: [PATCH 07/15] gnu: webkitgtk: Update to 2.22.4. * gnu/packages/webkit.scm (webkitgtk-2.22): Update to 2.22.4. --- gnu/packages/webkit.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 82f03c7f94..b56cdd8938 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -168,14 +168,14 @@ HTML/CSS applications to full-fledged web browsers.") (define-public webkitgtk-2.22 (package/inherit webkitgtk (name "webkitgtk") - (version "2.22.3") + (version "2.22.4") (source (origin (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 - "0wnddhm2bihmmkmi919lyxskvjk2wrzx6azkiypyjfwm08lm9zcx")))) + "1f2335hjzsvjxjf6hy5cyypsn65wykpx2pbk1sp548w0hclbxdgs")))) (native-inputs `(("gcc" ,gcc-7) ; webkitgtk-2.22 requires gcc-6 or newer ,@(package-native-inputs webkitgtk))) From b96386501f24cd40c9c63f50fbb2704ffbf7565c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:42:25 +0100 Subject: [PATCH 08/15] gnu: python-numpy: Update to 1.14.6. * gnu/packages/python.scm (python-numpy): Update to 1.14.6. --- gnu/packages/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c3d3c02684..bf3a939570 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3004,7 +3004,7 @@ between language specification and implementation aspects.") (define-public python-numpy (package (name "python-numpy") - (version "1.14.5") + (version "1.14.6") (source (origin (method url-fetch) @@ -3013,7 +3013,7 @@ between language specification and implementation aspects.") version "/numpy-" version ".tar.gz")) (sha256 (base32 - "0admjpkih63lm19zbbilq8ck4f6ny5kqi03dk3m6b2mnixsh4jhv")))) + "1k426vnmmd4pds09zgn75g6w92823ry75zrzwjhzjvg7s63ipc31")))) (build-system python-build-system) (inputs `(("openblas" ,openblas) From afd90f8d62de252931be9c1fa3a5c6e3b1074b04 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:57:14 +0100 Subject: [PATCH 09/15] gnu: vte-ng: Add a home page. * gnu/packages/gnome.scm (vte-ng)[home-page]: New field. --- gnu/packages/gnome.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4a118fe0fc..1420a55f24 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2116,6 +2116,7 @@ editors, IDEs, etc.") (inherit vte) (name "vte-ng") (version "0.52.2.a") + (home-page "https://github.com/thestinger/vte-ng") (native-inputs `(("gtk-doc" ,gtk-doc) ("gperf" ,gperf) From 6bc00737b067617481ca207fc8e6aaa6fe441b3a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:57:48 +0100 Subject: [PATCH 10/15] gnu: vte-ng: Fetch source using git. * gnu/packages/gnome.scm (vte-ng)[source]: Rewrite in terms of GIT-FETCH. --- gnu/packages/gnome.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 1420a55f24..692e3dedef 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2117,6 +2117,13 @@ editors, IDEs, etc.") (name "vte-ng") (version "0.52.2.a") (home-page "https://github.com/thestinger/vte-ng") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1csmjrw3c2avh711xcrn3khqwp4cwz97c3fmyirq2rg0hndng4s3")))) (native-inputs `(("gtk-doc" ,gtk-doc) ("gperf" ,gperf) @@ -2124,14 +2131,6 @@ editors, IDEs, etc.") ("automake" ,automake) ("libtool" ,libtool) ,@(package-native-inputs vte))) - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/thestinger/" - name "/archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1fd65mk7c87k03vhnb2ixkjvv9nja04mfq813iyjji1b11f2sh7v")))) (arguments `(#:phases (modify-phases %standard-phases (replace 'bootstrap From b069c30b52c7c9e2609d3a2f93cc561119932d0d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 22:59:27 +0100 Subject: [PATCH 11/15] gnu: vte-ng: Update to 0.54.2.a. * gnu/packages/gnome.scm (vte-ng): Update to 0.54.2.a. --- gnu/packages/gnome.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 692e3dedef..06ec28b342 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2115,7 +2115,7 @@ editors, IDEs, etc.") (package (inherit vte) (name "vte-ng") - (version "0.52.2.a") + (version "0.54.2.a") (home-page "https://github.com/thestinger/vte-ng") (source (origin (method git-fetch) @@ -2123,7 +2123,7 @@ editors, IDEs, etc.") (file-name (git-file-name name version)) (sha256 (base32 - "1csmjrw3c2avh711xcrn3khqwp4cwz97c3fmyirq2rg0hndng4s3")))) + "1r7d9m07cpdr4f7rw3yx33hmp4jmsk0dn5byq5wgksb2qjbc4ags")))) (native-inputs `(("gtk-doc" ,gtk-doc) ("gperf" ,gperf) From b344a3a9376f01c45985392f200c90a2526e8479 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 23:01:38 +0100 Subject: [PATCH 12/15] gnu: termite: Update to 14. * gnu/packages/terminals.scm (termite): Update to 14. --- gnu/packages/terminals.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 116377c8fa..0f11fa650a 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -104,7 +104,7 @@ configurable through a graphical wizard.") (define-public termite (package (name "termite") - (version "13") + (version "14") (source (origin (method git-fetch) @@ -116,7 +116,7 @@ configurable through a graphical wizard.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj")))) + "0dmz9rpc2fdvcwhcmjnhb48ixn403gxpq03g334d1hgjw2hsyx7x")))) (build-system gnu-build-system) (arguments `(#:phases From d9f8e846b69fc89356d9497c0a51c53cb2e53a5e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Nov 2018 23:06:08 +0100 Subject: [PATCH 13/15] gnu: mbedtls-apache: Update to 2.14.0. * gnu/packages/tls.scm (mbedtls-apache): Update to 2.14.0. --- gnu/packages/tls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6c2c11501f..2da4874e79 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -842,7 +842,7 @@ then ported to the GNU / Linux environment.") (define-public mbedtls-apache (package (name "mbedtls-apache") - (version "2.13.0") + (version "2.14.0") (source (origin (method url-fetch) @@ -852,7 +852,7 @@ then ported to the GNU / Linux environment.") version "-apache.tgz")) (sha256 (base32 - "1nh6xfyxs3mnnpgc6pancvdhv6ihz9lhsxdlg90gqa8n5r6lwfsr")))) + "0bf8mf8w5dyikbwpckcxgdi0l086adk7pailqds10bkzrcg59y42")))) (build-system cmake-build-system) (arguments `(#:configure-flags From a29ce1f97dc8336e5a063f14d98d673b33b4bff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 21 Nov 2018 13:56:31 +0100 Subject: [PATCH 14/15] guix system: Fix 'init' again. Fixes a regression introduced in 52ee4479ef26826a53b9929cd00ca7738be687b1, whereby 'install' would now be passed a procedure instead of a lowerable object. * guix/scripts/system.scm (perform-action): Pass BOOTLOADER-SCRIPT as the #:bootloader-installer argument of 'install'. --- guix/scripts/system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 00d2fe4829..d92ec7d5a5 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -910,7 +910,7 @@ static checks." #:install-bootloader? install-bootloader? #:bootcfg bootcfg #:bootcfg-file bootcfg-file - #:bootloader-installer bootloader-installer)) + #:bootloader-installer bootloader-script)) (else ;; All we had to do was to build SYS and maybe register an ;; indirect GC root. From d422cbb3d6a1cc7e4553a2335b113475a05d68ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 21 Nov 2018 16:19:09 +0100 Subject: [PATCH 15/15] linux-initrd: 'expression->initrd' returns the complete file name. Previously 'expression->initrd' would return the directory that contains the 'initrd' file; now it returns the complete file name for that file. * gnu/system/linux-initrd.scm (expression->initrd)[builder]: Change output file name to "initrd.cpio.gz". Tail-call 'file-append' to return the complete file name. * gnu/system.scm (operating-system-initrd-file): Remove 'file-append' call. * gnu/build/linux-initrd.scm (write-cpio-archive): Check whether OUTPUT already has the ".gz" suffix; rename if before invoking GZIP if it does, and otherwise after. * gnu/system/vm.scm (expression->derivation-in-linux-vm)[builder]: Do not append "/initrd" to #$initrd. --- gnu/build/linux-initrd.scm | 22 +++++++++++++++++----- gnu/system.scm | 11 +++++------ gnu/system/linux-initrd.scm | 9 +++++---- gnu/system/vm.scm | 2 +- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm index fb8a1f5b2b..3aaa06d3a0 100644 --- a/gnu/build/linux-initrd.scm +++ b/gnu/build/linux-initrd.scm @@ -72,11 +72,23 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT." #:file->header cpio:file->cpio-header*))) (or (not compress?) - ;; Use '--no-name' so that gzip records neither a file name nor a time - ;; stamp in its output. - (and (zero? (system* gzip "--best" "--no-name" output)) - (rename-file (string-append output ".gz") - output)) + + ;; Gzip insists on adding a '.gz' suffix and does nothing if the input + ;; file already has that suffix. Shuffle files around to placate it. + (let* ((gz-suffix? (string-suffix? ".gz" output)) + (sans-gz (if gz-suffix? + (string-drop-right output 3) + output))) + (when gz-suffix? + (rename-file output sans-gz)) + ;; Use '--no-name' so that gzip records neither a file name nor a time + ;; stamp in its output. + (and (zero? (system* gzip "--best" "--no-name" sans-gz)) + (begin + (unless gz-suffix? + (rename-file (string-append output ".gz") output)) + output))) + output)) (define (cache-compiled-file-name file) diff --git a/gnu/system.scm b/gnu/system.scm index 1766c8f90f..a5a8f40d66 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -870,12 +870,11 @@ hardware-related operations as necessary when booting a Linux container." (define make-initrd (operating-system-initrd os)) - (let ((initrd (make-initrd boot-file-systems - #:linux (operating-system-kernel os) - #:linux-modules - (operating-system-initrd-modules os) - #:mapped-devices mapped-devices))) - (file-append initrd "/initrd"))) + (make-initrd boot-file-systems + #:linux (operating-system-kernel os) + #:linux-modules + (operating-system-initrd-modules os) + #:mapped-devices mapped-devices)) (define (locale-name->definition* name) "Variant of 'locale-name->definition' that raises an error upon failure." diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index a53d3cb106..983c6d81c8 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -91,16 +91,17 @@ the derivations referenced by EXP are automatically copied to the initrd." (lambda (port) (simple-format port "~A\n" #$guile))) - (build-initrd (string-append #$output "/initrd") + (build-initrd (string-append #$output "/initrd.cpio.gz") #:guile #$guile #:init #$init ;; Copy everything INIT refers to into the initrd. #:references-graphs '("closure") #:gzip (string-append #$gzip "/bin/gzip"))))) - (computed-file name builder - #:options - `(#:references-graphs (("closure" ,init))))) + (file-append (computed-file name builder + #:options + `(#:references-graphs (("closure" ,init)))) + "/initrd.cpio.gz")) (define (flat-linux-module-directory linux modules) "Return a flat directory containing the Linux kernel modules listed in diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 8e310a1607..9400e6310d 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -213,7 +213,7 @@ made available under the /xchg CIFS share." (let* ((inputs '#$(list qemu (canonical-package coreutils))) (linux (string-append #$linux "/" #$(system-linux-image-file-name))) - (initrd (string-append #$initrd "/initrd")) + (initrd #$initrd) (loader #$loader) (graphs '#$(match references-graphs (((graph-files . _) ...) graph-files)