From 0091853199bc31775c66c638a0b5b06ef0d7aec3 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Thu, 10 Oct 2019 06:58:27 +0200 Subject: gnu: emacs-org-ql: Patch for Helm users. The package has a Helm component that is missing the relevant `require` statements. * gnu/packages/patches/emacs-helm-org-ql.patch: Add. * gnu/local.mk (emacs-helm-org-ql): Add entry. * gnu/packages/emacs-xyz.scm: Update and add dependencies. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 39b8e009b2..99f2cfd772 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -791,6 +791,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ + %D%/packages/patches/emacs-helm-org-ql.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ -- cgit v1.2.3 From d1eb423478b455e31935c238d6f17992f0e229b2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 10 Oct 2019 17:05:11 +0200 Subject: gnu: strace: Update to 5.3. * gnu/packages/patches/strace-ipc-tests.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/linux.scm (strace): Update to 5.3. [source](patches): Remove. [arguments]: Remove obsolete phase. --- gnu/local.mk | 1 - gnu/packages/linux.scm | 16 +++------------ gnu/packages/patches/strace-ipc-tests.patch | 30 ----------------------------- 3 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 gnu/packages/patches/strace-ipc-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 99f2cfd772..e768c3cefb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1327,7 +1327,6 @@ dist_patch_DATA = \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ %D%/packages/patches/steghide-fixes.patch \ - %D%/packages/patches/strace-ipc-tests.patch \ %D%/packages/patches/streamlink-update-test.patch \ %D%/packages/patches/stumpwm-fix-broken-read-one-line.patch \ %D%/packages/patches/supercollider-boost-1.70-build-fix.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index e4abeadaa0..88db31ee7e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1459,18 +1459,15 @@ Zerofree requires the file system to be unmounted or mounted read-only.") (define-public strace (package (name "strace") - (version "5.2") + (version "5.3") (home-page "https://strace.io") (source (origin (method url-fetch) (uri (string-append home-page "/files/" version "/strace-" version ".tar.xz")) - ;; XXX Remove the 'regenerate-tests' phase below when - ;; "strace-ipc-tests.patch" is no longer applied. - (patches (search-patches "strace-ipc-tests.patch")) (sha256 (base32 - "1li49i75wrdw91hchyyd8spnzfcmxcfyfb5g9zbaza89aq4bq4ym")))) + "0ix06z4vnc49mv76f22kixz8dsh7daqv9mpgwcgl0mlnfjc124vc")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1479,14 +1476,7 @@ Zerofree requires the file system to be unmounted or mounted read-only.") (lambda _ (substitute* "strace.c" (("/bin/sh") (which "sh"))) - #t)) - (add-before 'configure 'regenerate-tests - ;; XXX Remove this phase when "strace-ipc-tests.patch" is no longer - ;; applied in the 'source' field above. This phase is needed to - ;; regenerate many other files from tests/gen_tests.in, which is - ;; modified by the aforementioned patch. - (lambda _ - (invoke "tests/gen_tests.sh")))) + #t))) ;; Don't fail if the architecture doesn't support different personalities. #:configure-flags '("--enable-mpers=check") ;; See . diff --git a/gnu/packages/patches/strace-ipc-tests.patch b/gnu/packages/patches/strace-ipc-tests.patch deleted file mode 100644 index 49341765ca..0000000000 --- a/gnu/packages/patches/strace-ipc-tests.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix a test failure on some systems. - -Taken from upstream: -https://github.com/strace/strace/commit/4377e3a1535a0ec3a42da8a1366ad6943f4efa0e - -diff --git a/tests/gen_tests.in b/tests/gen_tests.in -index 4a506b94c..4fdf4722c 100644 ---- a/tests/gen_tests.in -+++ b/tests/gen_tests.in -@@ -168,16 +168,16 @@ ipc_msg-Xabbrev +ipc.sh -Xabbrev -a26 - ipc_msg-Xraw +ipc.sh -Xraw -a16 - ipc_msg-Xverbose +ipc.sh -Xverbose -a34 - ipc_msgbuf-Xabbrev +ipc_msgbuf.test -Xabbrev --ipc_msgbuf-Xraw +ipc_msgbuf.test -Xraw -a22 -+ipc_msgbuf-Xraw +ipc_msgbuf.test -Xraw -a20 - ipc_msgbuf-Xverbose +ipc_msgbuf.test -Xverbose - ipc_sem +ipc.sh -a29 - ipc_sem-Xabbrev +ipc.sh -Xabbrev -a29 - ipc_sem-Xraw +ipc.sh -Xraw -a19 - ipc_sem-Xverbose +ipc.sh -Xverbose -a36 --ipc_shm +ipc.sh -a29 --ipc_shm-Xabbrev +ipc.sh -Xabbrev -a29 -+ipc_shm +ipc.sh -a26 -+ipc_shm-Xabbrev +ipc.sh -Xabbrev -a26 - ipc_shm-Xraw +ipc.sh -Xraw -a19 --ipc_shm-Xverbose +ipc.sh -Xverbose -a36 -+ipc_shm-Xverbose +ipc.sh -Xverbose -a34 - kcmp -a22 - kcmp-y -a22 -y -e trace=kcmp - kern_features -a16 -- cgit v1.2.3 From f7b3d9104e7149d1aca0ac257932eb759956b790 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Fri, 11 Oct 2019 02:41:21 +0200 Subject: gnu: emacs-helm-org-ql: Remove patch file. * gnu/local.mk (emacs-helm-org-ql): Remove entry. * gnu/packages/emacs-xyz.scm: Remove patch file. * gnu/packages/patches/emacs-helm-org-ql.patch: Delete file. --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 15 ++++++---- gnu/packages/patches/emacs-helm-org-ql.patch | 42 ---------------------------- 3 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 gnu/packages/patches/emacs-helm-org-ql.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e768c3cefb..2451698503 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -791,7 +791,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ - %D%/packages/patches/emacs-helm-org-ql.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index bc74e8fb4c..6893711d87 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -11753,7 +11753,7 @@ according to a parsing expression grammar.") (define-public emacs-org-ql (let ((commit "949a06c3ab50482b749fd2d4350837a197660d96") - (revision "2")) + (revision "3")) (package (name "emacs-org-ql") (version (git-version "0.3.1" revision commit)) @@ -11765,9 +11765,6 @@ according to a parsing expression grammar.") (sha256 (base32 "0apcg63xm0242mjgsgw0jrcda4p4iqj7fy3sgh0p7khi4hrs5ch0")) - (patches - (search-patches - "emacs-helm-org-ql.patch")) (file-name (git-file-name name version)))) (build-system emacs-build-system) (propagated-inputs @@ -11784,7 +11781,15 @@ according to a parsing expression grammar.") (native-inputs `(("emacs-buttercup" ,emacs-buttercup))) (arguments - `(#:tests? #t + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'require-helm + (lambda _ + (substitute* "helm-org-ql.el" + (("^;;;; Requirements") + ";;;; Requirements\n(require 'helm)\n(require 'helm-org)")) + #t))) + #:tests? #t #:test-command '("buttercup" "-L" "."))) (home-page "https://github.com/alphapapa/org-ql/") (synopsis "Query language for Org buffers") diff --git a/gnu/packages/patches/emacs-helm-org-ql.patch b/gnu/packages/patches/emacs-helm-org-ql.patch deleted file mode 100644 index 362e3d7d15..0000000000 --- a/gnu/packages/patches/emacs-helm-org-ql.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3918944856834ef4a7ed613243a1612424d2daba Mon Sep 17 00:00:00 2001 -From: Brian Leung -Date: Thu, 10 Oct 2019 06:54:33 +0200 -Subject: [PATCH] Use require statements. - ---- - helm-org-ql.el | 19 ++----------------- - 1 file changed, 2 insertions(+), 17 deletions(-) - -diff --git a/helm-org-ql.el b/helm-org-ql.el -index 26beab9..113b7f2 100644 ---- a/helm-org-ql.el -+++ b/helm-org-ql.el -@@ -35,23 +35,8 @@ - (require 'org-ql) - (require 'org-ql-search) - --;; (require 'helm) --;; (require 'helm-org) -- --;;;; Compatibility -- --;; Declare Helm functions since Helm may not be installed. --(declare-function helm "ext:helm") --(declare-function helm-run-after-exit "ext:helm") --(declare-function helm-window "ext:helm-lib") --(declare-function helm-buffer-get "ext:helm-lib") --(declare-function helm-make-source "ext:helm-source") --(declare-function helm-org-goto-marker "ext:helm-org") -- --;; Silence byte-compiler about variables. --(defvar helm-map) --(defvar helm-pattern) --(defvar helm-input-idle-delay) -+(require 'helm) -+(require 'helm-org) - - ;;;; Variables - --- -2.23.0 - -- cgit v1.2.3 From e214a22007450187c3db5d9fdef6ee021be6e953 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 11 Sep 2019 15:43:19 -0400 Subject: gnu: Add nsis-x86_64 and nsis-i686. * guix/build-system/scons.scm (scons-build): Add build-targets and install-targets parameters. * guix/build/scons-build-system.scm (build, install): Adjust accordingly. * doc/guix.texi (Build Systems): Document it. * gnu/packages/installers.scm: New file, (make-nsis): New procedure, (nsis-x86_64, nsis-i686): New variables. * gnu/packages/patches/nsis-env-passthru.patch: New file. * gnu/local.mk (dist_patch_DATA, GNU_SYSTEM_MODULES): Adjust accordingly. --- doc/guix.texi | 8 +- gnu/local.mk | 2 + gnu/packages/installers.scm | 116 +++++++++++++++++++++++++++ gnu/packages/patches/nsis-env-passthru.patch | 12 +++ guix/build-system/scons.scm | 4 + guix/build/scons-build-system.scm | 9 ++- 6 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/installers.scm create mode 100644 gnu/packages/patches/nsis-env-passthru.patch (limited to 'gnu/local.mk') diff --git a/doc/guix.texi b/doc/guix.texi index 97d797c13f..6703c2756c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6405,9 +6405,11 @@ tool. This build system runs @code{scons} to build the package, the package. Additional flags to be passed to @code{scons} can be specified with the -@code{#:scons-flags} parameter. The version of Python used to run SCons -can be specified by selecting the appropriate SCons package with the -@code{#:scons} parameter. +@code{#:scons-flags} parameter. The default build and install targets +can be overridden with @code{#:build-targets} and +@code{#:install-targets} respectively. The version of Python used to +run SCons can be specified by selecting the appropriate SCons package +with the @code{#:scons} parameter. @end defvr @defvr {Scheme Variable} haskell-build-system diff --git a/gnu/local.mk b/gnu/local.mk index 2451698503..0a4ee7c986 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -261,6 +261,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/imagemagick.scm \ %D%/packages/inklingreader.scm \ %D%/packages/inkscape.scm \ + %D%/packages/installers.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/iso-codes.scm \ @@ -1145,6 +1146,7 @@ dist_patch_DATA = \ %D%/packages/patches/nfs-utils-missing-headers.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/nm-plugin-path.patch \ + %D%/packages/patches/nsis-env-passthru.patch \ %D%/packages/patches/nss-freebl-stubs.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm new file mode 100644 index 0000000000..3a5f08b95a --- /dev/null +++ b/gnu/packages/installers.scm @@ -0,0 +1,116 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Carl Dong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages installers) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages python-xyz) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system scons) + #:use-module (guix utils)) + +(define(make-nsis machine target-arch nsis-target-type) + (let ((triplet (string-append machine "-" "w64-mingw32"))) + (package + (name (string-append "nsis-" machine)) + (version "3.04") + (source (origin + (method url-fetch) + (uri (string-append "http://prdownloads.sourceforge.net/nsis/nsis-" + version "-src.tar.bz2")) + (sha256 + (base32 + "1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0")) + (patches (search-patches "nsis-env-passthru.patch")))) + (build-system scons-build-system) + (native-inputs `(("xgcc" ,(cross-gcc triplet #:libc (cross-libc triplet))) + ("xbinutils" ,(cross-binutils triplet)) + ("mingw-w64" ,(cross-libc triplet)))) + (inputs `(("zlib" ,zlib))) + (arguments + `(#:scons ,scons-python2 + #:modules ((srfi srfi-1) + (guix build utils) + (guix build scons-build-system)) + #:tests? #f + #:scons-flags `("UNICODE=yes" + "SKIPUTILS=MakeLangId,Makensisw,NSIS Menu,SubStart,zip2exe" + "SKIPDOC=COPYING" + "STRIP_CP=no" + ,(string-append "PREFIX=" %output) + ,(string-append "TARGET_ARCH=" ,target-arch) + ,(string-append "XGCC_W32_PREFIX=" ,triplet "-") + ,(string-append "PREFIX_PLUGINAPI_INC=" (assoc-ref %build-inputs "mingw-w64") "/include/") + ,(string-append "PREFIX_PLUGINAPI_LIB=" (assoc-ref %build-inputs "mingw-w64") "/lib/")) + #:build-targets '("makensis" + "stubs" + "plugins" + "utils") + #:install-targets '("install-stubs" + "install-plugins" + "install-data" + "install-utils" + "install-compiler" + "install-conf") + #:phases (modify-phases %standard-phases + (add-before 'build 'fix-env + (lambda _ + (define* (filter-delimited-string delimited-string predicate #:optional (delimiter #\:)) + ;; Given a DELIMITED-STRING delimited by DELIMITER, + ;; only keep items that satisfy PREDICATE + (string-join + (filter predicate (string-split delimited-string delimiter)) + (string delimiter))) + (define (mingw-path? path) + (string-prefix? (assoc-ref %build-inputs "mingw-w64") path)) + (for-each + (lambda (env-name) + (let ((env-val (getenv env-name))) + ;; Remove all mingw-w64 paths from env vars meant + ;; for native toolchain + (setenv env-name + (filter-delimited-string env-val (negate mingw-path?))) + ;; Add the removed paths back into + ;; CROSS_-prefixed version of env vars + (setenv (string-append "CROSS_" env-name) + (filter-delimited-string env-val mingw-path?)))) + '("CPLUS_INCLUDE_PATH" "LIBRARY_PATH" "C_INCLUDE_PATH")))) + (add-before 'build 'fix-target-detection + (lambda _ + ;; NSIS target detection is screwed up, manually + ;; change it ourselves + (substitute* "Source/build.cpp" (("m_target_type=TARGET_X86ANSI") + (string-append "m_target_type=" ,nsis-target-type)))))))) + (home-page "http://nsis.sourceforge.net/") + (synopsis "A professional open source system to create Windows installers") + (description + "NSIS (Nullsoft Scriptable Install System) is a professional open +source system to create Windows installers. It is designed to be as small and +flexible as possible and is therefore very suitable for internet +distribution.") + (license (license:non-copyleft "file://COPYING" + "See COPYING in the distribution."))))) + +(define-public nsis-x86_64 + (make-nsis "x86_64" "amd64" "TARGET_AMD64")) + +(define-public nsis-i686 + (make-nsis "i686" "x86" "TARGET_X86UNICODE")) diff --git a/gnu/packages/patches/nsis-env-passthru.patch b/gnu/packages/patches/nsis-env-passthru.patch new file mode 100644 index 0000000000..36b4092230 --- /dev/null +++ b/gnu/packages/patches/nsis-env-passthru.patch @@ -0,0 +1,12 @@ +--- nsis-3.04-src/SConstruct 2019-05-30 14:53:30.276775332 -0400 ++++ nsis-3.04-src/SConstruct 2019-05-30 14:54:17.901232914 -0400 +@@ -77,6 +77,9 @@ + if not toolset and not path: + defenv = Environment(TARGET_ARCH = arch) + ++import os; ++defenv['ENV'] = os.environ ++ + Export('defenv') + + ###################################################################### diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 5e76d64180..aad455c419 100644 --- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -76,7 +76,9 @@ #:key (tests? #t) (scons-flags ''()) + (build-targets ''()) (test-target "test") + (install-targets ''("install")) (phases '(@ (guix build scons-build-system) %standard-phases)) (outputs '("out")) @@ -101,8 +103,10 @@ provides a 'SConstruct' file as its build system." source)) #:scons-flags ,scons-flags #:system ,system + #:build-targets ,build-targets #:test-target ,test-target #:tests? ,tests? + #:install-targets ,install-targets #:phases ,phases #:outputs %outputs #:search-paths ',(map search-path-specification->sexp diff --git a/guix/build/scons-build-system.scm b/guix/build/scons-build-system.scm index eb013f03b6..17a0b7b877 100644 --- a/guix/build/scons-build-system.scm +++ b/guix/build/scons-build-system.scm @@ -29,7 +29,7 @@ ;; ;; Code: -(define* (build #:key outputs (scons-flags '()) (parallel-build? #t) #:allow-other-keys) +(define* (build #:key outputs (build-targets '()) (scons-flags '()) (parallel-build? #t) #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (mkdir-p out) (apply invoke "scons" @@ -37,7 +37,8 @@ (list "-j" (number->string (parallel-job-count))) (list)) - scons-flags)))) + scons-flags + build-targets)))) (define* (check #:key tests? test-target (scons-flags '()) #:allow-other-keys) "Run the test suite of a given SCons application." @@ -46,9 +47,9 @@ (format #t "test suite not run~%")) #t) -(define* (install #:key outputs (scons-flags '()) #:allow-other-keys) +(define* (install #:key outputs (install-targets '("install")) (scons-flags '()) #:allow-other-keys) "Install a given SCons application." - (apply invoke "scons" "install" scons-flags)) + (apply invoke "scons" (append scons-flags install-targets))) (define %standard-phases (modify-phases gnu:%standard-phases -- cgit v1.2.3 From 20e015733361033667a730e09af94939aef8873a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 13 Oct 2019 12:48:26 +0200 Subject: gnu: parted: Complete the 3.3 update. Fixes . Reported by Jesse Gibbons . This is a follow-up to commit 6ad7e3578b6ec924ceddabc908decdab8e453eca. * gnu/packages/patches/parted-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/disk.scm (parted)[source](patches): Remove. [native-inputs]: Add E2FSPROGS. --- gnu/local.mk | 1 - gnu/packages/disk.scm | 2 +- gnu/packages/patches/parted-glibc-compat.patch | 17 ----------------- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 gnu/packages/patches/parted-glibc-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0a4ee7c986..912e9c67e3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1187,7 +1187,6 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ - %D%/packages/patches/parted-glibc-compat.patch \ %D%/packages/patches/patchelf-page-size.patch \ %D%/packages/patches/patchelf-rework-for-arm.patch \ %D%/packages/patches/patchutils-test-perms.patch \ diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index eb3934155f..c00df73a22 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -83,7 +83,6 @@ (method url-fetch) (uri (string-append "mirror://gnu/parted/parted-" version ".tar.xz")) - (patches (search-patches "parted-glibc-compat.patch")) (sha256 (base32 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp")))) @@ -105,6 +104,7 @@ (native-inputs `(("gettext" ,gettext-minimal) ;; For the tests. + ("e2fsprogs" ,e2fsprogs) ("perl" ,perl) ("python" ,python-2))) (home-page "https://www.gnu.org/software/parted/") diff --git a/gnu/packages/patches/parted-glibc-compat.patch b/gnu/packages/patches/parted-glibc-compat.patch deleted file mode 100644 index edf4afb0d1..0000000000 --- a/gnu/packages/patches/parted-glibc-compat.patch +++ /dev/null @@ -1,17 +0,0 @@ -Include for "major" and "minor". - -Taken from upstream: -https://git.savannah.gnu.org/cgit/parted.git/commit/?id=ba5e0451b51c983e40afd123b6e0d3eddb55e610 - -diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 31b98ab..7e86b51 100644 ---- a/libparted/arch/linux.c -+++ b/libparted/arch/linux.c -@@ -41,6 +41,7 @@ - #include /* for uname() */ - #include - #include -+#include - #ifdef ENABLE_DEVICE_MAPPER - #include - #endif -- cgit v1.2.3 From b5f6700fb454edad46e84cc46edb3654e42b5172 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 12 Oct 2019 22:29:18 +0100 Subject: gnu: id3lib: Apply patch for UTF16 writing bug. * gnu/packages/patches/id3lib-UTF16-writing-bug.patch: New file. * gnu/packages/mp3.scm (id3lib)[source](patches): Add it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/mp3.scm | 5 +-- .../patches/id3lib-UTF16-writing-bug.patch | 39 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/id3lib-UTF16-writing-bug.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 912e9c67e3..3caaec4046 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -975,6 +975,7 @@ dist_patch_DATA = \ %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ + %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index a218071edb..9a1cf60c2e 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017 Thomas Danckaert -;;; Copyright © 2017 Pierre Langlois +;;; Copyright © 2017, 2019 Pierre Langlois ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -123,7 +123,8 @@ versions of ID3v2.") (modules '((guix build utils))) ;; Don't use bundled zlib (snippet '(begin (delete-file-recursively "zlib") #t)) - (patches (search-patches "id3lib-CVE-2007-4460.patch")))) + (patches (search-patches "id3lib-CVE-2007-4460.patch" + "id3lib-UTF16-writing-bug.patch")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) (arguments diff --git a/gnu/packages/patches/id3lib-UTF16-writing-bug.patch b/gnu/packages/patches/id3lib-UTF16-writing-bug.patch new file mode 100644 index 0000000000..4a8f69b321 --- /dev/null +++ b/gnu/packages/patches/id3lib-UTF16-writing-bug.patch @@ -0,0 +1,39 @@ +diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog +--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100 +@@ -1,3 +1,8 @@ ++2006-02-17 Jerome Couderc ++ ++ * Patch from Spoon to fix UTF-16 writing bug ++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ + 2003-03-02 Sunday 17:38 Thijmen Klok + + * THANKS (1.20): added more people +diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp +--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100 ++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100 +@@ -363,11 +363,22 @@ + // Write the BOM: 0xFEFF + unicode_t BOM = 0xFEFF; + writer.writeChars((const unsigned char*) &BOM, 2); ++ // Patch from Spoon : 2004-08-25 14:17 ++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979 ++ // Wrong code ++ //for (size_t i = 0; i < size; i += 2) ++ //{ ++ // unicode_t ch = (data[i] << 8) | data[i+1]; ++ // writer.writeChars((const unsigned char*) &ch, 2); ++ //} ++ // Right code ++ unsigned char *pdata = (unsigned char *) data.c_str(); + for (size_t i = 0; i < size; i += 2) + { +- unicode_t ch = (data[i] << 8) | data[i+1]; ++ unicode_t ch = (pdata[i] << 8) | pdata[i+1]; + writer.writeChars((const unsigned char*) &ch, 2); + } ++ // End patch + } + return writer.getCur() - beg; + } -- cgit v1.2.3