re-import sources as agreed with the maintainer

This commit is contained in:
Adam Samalik 2023-07-10 13:04:35 +02:00
parent bb4fea4654
commit 5df3f57ef5
3 changed files with 70 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/gcab-1.1.tar.xz
/gcab-*.tar.xz

View File

@ -0,0 +1,51 @@
From 3365b4bd58dd7f13e786caf3c7234cf8116263d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 25 Jul 2018 12:45:24 +0200
Subject: [PATCH] gcab: Fix regression from commit a15d91073fd5d6be25
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apparently, rewinding should reset the CDATA state.
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1608301
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
libgcab/gcab-folder.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index 1b09fa3..c0d6600 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -423,6 +423,7 @@ gcab_folder_extract (GCabFolder *self,
g_autoptr(GSList) files = NULL;
g_autoptr(cdata_t) cdata = g_new0 (cdata_t, 1);
guint32 nubytes = 0;
+ guint8 *reserved;
/* never loaded from a stream */
g_assert (self->cfolder != NULL);
@@ -433,7 +434,7 @@ gcab_folder_extract (GCabFolder *self,
files = g_slist_sort (g_slist_copy (self->files), (GCompareFunc)sort_by_offset);
/* this is allocated for every block, but currently unused */
- cdata->reserved = g_malloc (res_data);
+ cdata->reserved = reserved = g_malloc (res_data);
for (f = files; f != NULL; f = f->next) {
GCabFile *file = f->data;
@@ -454,6 +455,8 @@ gcab_folder_extract (GCabFolder *self,
if (!g_seekable_seek (G_SEEKABLE (data), self->cfolder->offsetdata,
G_SEEK_SET, cancellable, error))
return FALSE;
+ bzero(cdata, sizeof(cdata_t));
+ cdata->reserved = reserved;
nubytes = 0;
}
--
2.18.0.321.gffc6fa0e39

View File

@ -1,13 +1,15 @@
Name: gcab
Version: 1.1
Release: 1%{?dist}
Release: 5%{?dist}
Summary: Cabinet file library and tool
License: LGPLv2+
#VCS: git:git://git.gnome.org/gcab
URL: http://ftp.gnome.org/pub/GNOME/sources/gcab
Source0: http://ftp.gnome.org/pub/GNOME/sources/gcab/%{version}/%{name}-%{version}.tar.xz
Patch1: 0001-gcab-Fix-regression-from-commit-a15d91073fd5d6be25.patch
BuildRequires: git-core
BuildRequires: gettext
BuildRequires: gtk-doc
BuildRequires: vala-tools
@ -40,7 +42,7 @@ libgcab is a library to manipulate Cabinet archive.
Libraries, includes, etc. to compile with the gcab library.
%prep
%setup -q
%autosetup -S git_am
%build
%meson
@ -76,6 +78,20 @@ Libraries, includes, etc. to compile with the gcab library.
%{_libdir}/pkgconfig/libgcab-1.0.pc
%changelog
* Thu Aug 23 2018 Victor Toso <victortoso@redhat.com> - 1.1-5
- Remove ExclusiveArch to not break fwupd in RHEL 8
- Related: rhbz#1615874
* Tue Aug 14 2018 Victor Toso <victortoso@redhat.com> - 1.1-4
- ExclusiveArch: i686, x86_64
- Related: rhbz#1615874
* Thu Aug 2 2018 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.1-3
- fix 'rewind' regression rhbz#1608301
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Richard Hughes <richard@hughsie.com> - 1.1-1
- New upstream release
- Add git version in --version