diff --git a/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch b/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch new file mode 100644 index 0000000..be4d810 --- /dev/null +++ b/0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch @@ -0,0 +1,25 @@ +From 0a79a47489bf739d97d416bc740fc081704a13b1 Mon Sep 17 00:00:00 2001 +From: Rok Mandeljc +Date: Sun, 24 Feb 2013 20:25:17 +0100 +Subject: [PATCH] libMirage: READCD Parser: when verifying the file, don't + forget to seek to the beginning first. + +--- + libmirage/src/parsers/image-readcd/image-readcd-parser.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libmirage/src/parsers/image-readcd/image-readcd-parser.c b/libmirage/src/parsers/image-readcd/image-readcd-parser.c +index 39c0522..9b8a76b 100644 +--- a/libmirage/src/parsers/image-readcd/image-readcd-parser.c ++++ b/libmirage/src/parsers/image-readcd/image-readcd-parser.c +@@ -58,6 +58,7 @@ static gboolean mirage_parser_readcd_is_file_valid (MirageParserReadcd *self, GI + + /* First 4 bytes of TOC are its header; and first 2 bytes of that indicate + the length */ ++ g_seekable_seek(G_SEEKABLE(stream), 0, G_SEEK_SET, NULL, NULL); + if (g_input_stream_read(stream, &toc_len, sizeof(toc_len), NULL, NULL) != sizeof(toc_len)) { + g_set_error(error, MIRAGE_ERROR, MIRAGE_ERROR_CANNOT_HANDLE, "Parser cannot handle given image: failed to read 2-byte TOC length!"); + return FALSE; +-- +1.7.10.4 + diff --git a/libmirage.changes b/libmirage.changes index deef2aa..dde6b7e 100644 --- a/libmirage.changes +++ b/libmirage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 24 20:08:18 UTC 2013 - jengelh@inai.de + +- Add 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch + to make images created by readcd(1) usable again + ------------------------------------------------------------------- Sat Jan 5 21:47:42 UTC 2013 - jengelh@inai.de diff --git a/libmirage.spec b/libmirage.spec index 6ef166b..17dd453 100644 --- a/libmirage.spec +++ b/libmirage.spec @@ -30,6 +30,7 @@ Url: http://cdemu.sf.net/ #Git-Clone: git://git.code.sf.net/p/cdemu/code Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch +Patch2: 0001-libMirage-READCD-Parser-when-verifying-the-file-don-.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig >= 0.16 @@ -129,7 +130,7 @@ This package provides the GObject Introspection bindings for libmirage. %prep %setup -Tcqa0 -%patch -P 1 -p2 +%patch -P 1 -P 2 -p2 %build # gir is busted on 12.1