Restore READCD support

OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=10
This commit is contained in:
Jan Engelhardt 2013-02-24 20:10:53 +00:00 committed by Git OBS Bridge
parent 4da90b984e
commit b3e5d2eca1
3 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 0a79a47489bf739d97d416bc740fc081704a13b1 Mon Sep 17 00:00:00 2001
From: Rok Mandeljc <rok.mandeljc@gmail.com>
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

View File

@ -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 Sat Jan 5 21:47:42 UTC 2013 - jengelh@inai.de

View File

@ -30,6 +30,7 @@ Url: http://cdemu.sf.net/
#Git-Clone: git://git.code.sf.net/p/cdemu/code #Git-Clone: git://git.code.sf.net/p/cdemu/code
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2 Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
Patch1: 0001-libMirage-CMake-fix-SOVERSION-which-should-be-set-to.patch 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 BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake >= 2.8.5 BuildRequires: cmake >= 2.8.5
BuildRequires: pkgconfig >= 0.16 BuildRequires: pkgconfig >= 0.16
@ -129,7 +130,7 @@ This package provides the GObject Introspection bindings for libmirage.
%prep %prep
%setup -Tcqa0 %setup -Tcqa0
%patch -P 1 -p2 %patch -P 1 -P 2 -p2
%build %build
# gir is busted on 12.1 # gir is busted on 12.1