GNU bug report logs - #37720
[PATCH 0/2] gnu: easytag: Fix mp3 support.

Previous Next

Package: guix-patches;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sat, 12 Oct 2019 21:26:03 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37720 in the body.
You can then email your comments to 37720 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#37720; Package guix-patches. (Sat, 12 Oct 2019 21:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 12 Oct 2019 21:26:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: guix-patches <at> gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 0/2] gnu: easytag: Fix mp3 support.
Date: Sat, 12 Oct 2019 22:25:31 +0100
Hello Guix!

EasyTag hasn't been working for mp3 files and I couldn't work out why for a
long time. I've finally got around to looking into it properly and it turns
the hack with the temporary .pc file I added back then didn't work because
it's missing some fields.

With that fixed though, EasyTag warns you with a popup that id3lib is buggy
and needs patching. It's something about UTF16 being broken:
https://sourceforge.net/p/id3lib/patches/64/, I checked, ArchLinux also
applies the same patch.

WDYT?

Pierre Langlois (2):
  gnu: id3lib: Apply patch for UTF16 writing bug.
  gnu: easytag: Fix mp3 support.

 gnu/local.mk                                  |  1 +
 gnu/packages/mp3.scm                          |  5 ++-
 gnu/packages/music.scm                        | 12 ++++--
 .../patches/id3lib-UTF16-writing-bug.patch    | 39 +++++++++++++++++++
 4 files changed, 52 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/id3lib-UTF16-writing-bug.patch

--
2.23.0




Information forwarded to guix-patches <at> gnu.org:
bug#37720; Package guix-patches. (Sat, 12 Oct 2019 21:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 37720 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 37720 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 1/2] gnu: id3lib: Apply patch for UTF16 writing bug.
Date: Sat, 12 Oct 2019 22:29:18 +0100
* gnu/packages/mp3.scm (id3lib)[patches]: Add
"id3lib-UTF16-writing-bug.patch".
* gnu/packages/patches/id3lib-UTF16-writing-bug.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
 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

diff --git a/gnu/local.mk b/gnu/local.mk
index 0a4ee7c986..f99711e1ac 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 <mhw <at> netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
-;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2017, 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;;
 ;;; 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..b05d2cf298
--- /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 <thijmen <at> id3lib.org>
+
+ 	* 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;
+ }
--
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#37720; Package guix-patches. (Sat, 12 Oct 2019 21:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 37720 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 37720 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 2/2] gnu: easytag: Fix mp3 support.
Date: Sat, 12 Oct 2019 22:30:08 +0100
* gnu/packages/music.scm (easytag)[arguments]: Add 'Name', 'Description' and
'Version' entries to temporary id3tag.pc pkg-config file. Terminate phases
with #t.
---
 gnu/packages/music.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index ac4333168c..4c74ae5ffa 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
 ;;; Copyright © 2017 Rodger Fox <thylakoid <at> openmailbox.org>
 ;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
-;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2017, 2018, 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 nee <nee.git <at> hidamari.blue>
@@ -593,12 +593,17 @@ enable professional yet simple and intuitive pattern-based drum programming.")
                      "prefix=~@*~a~@
                       libdir=${prefix}/lib~@
                       includedir=${prefix}/include~@
+
+                      Name: libid3tag~@
+                      Description:~@
+                      Version:~@
                       Libs: -L${libdir} -lid3tag -lz~@
                       Cflags: -I${includedir}~%"
                      libid3tag)))
                (setenv "PKG_CONFIG_PATH"
                  (string-append (getenv "PKG_CONFIG_PATH")
-                   ":" (getcwd) "/pkgconfig")))))
+                   ":" (getcwd) "/pkgconfig"))
+               #t)))
          (add-after 'unpack 'patch-makefile
            (lambda _
              (substitute* "Makefile.in"
@@ -606,7 +611,8 @@ enable professional yet simple and intuitive pattern-based drum programming.")
                ;; script with /bin/sh hard-coded.
                (("/bin/sh") (which "sh"))
                ;; Don't create 'icon-theme.cache'.
-               (("gtk-update-icon-cache") "true")))))))
+               (("gtk-update-icon-cache") "true"))
+             #t)))))
     (home-page "https://wiki.gnome.org/Apps/EasyTAG")
     (synopsis "Simple application for viewing and editing tags in audio files")
     (description
--
2.23.0





Reply sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
You have taken responsibility. (Sun, 13 Oct 2019 12:10:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
bug acknowledged by developer. (Sun, 13 Oct 2019 12:10:02 GMT) Full text and rfc822 format available.

Message #16 received at 37720-done <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 37720-done <at> debbugs.gnu.org
Subject: Re: [bug#37720] [PATCH 0/2] gnu: easytag: Fix mp3 support.
Date: Sun, 13 Oct 2019 14:09:24 +0200
[Message part 1 (text/plain, inline)]
Hi Pierre,

On Sat, 12 Oct 2019 22:25:31 +0100
Pierre Langlois <pierre.langlois <at> gmx.com> wrote:

> WDYT?

Looks good to me, so I pushed the patchset to guix master.

(It's unfortunately that char signedness is unspecified in the C standard.
That maybe made sense in 1980--not today.  Sigh)
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Nov 2019 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.