From 068d5e0fa63e897fb7b81e02fc2ff46bcc6ea3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 00:43:40 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/gcab#33403e2fa856da2861f893ae303e7f5c28a911df --- .gitignore | 1 + ...ssion-from-commit-a15d91073fd5d6be25.patch | 51 +++++ ...comp-fix-gcc-warning-strict-overflow.patch | 52 +++++ gcab.spec | 195 ++++++++++++++++++ sources | 1 + 5 files changed, 300 insertions(+) create mode 100644 0001-gcab-Fix-regression-from-commit-a15d91073fd5d6be25.patch create mode 100644 0002-Revert-decomp-fix-gcc-warning-strict-overflow.patch create mode 100644 gcab.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..f97469d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/gcab-*.tar.xz diff --git a/0001-gcab-Fix-regression-from-commit-a15d91073fd5d6be25.patch b/0001-gcab-Fix-regression-from-commit-a15d91073fd5d6be25.patch new file mode 100644 index 0000000..4f02701 --- /dev/null +++ b/0001-gcab-Fix-regression-from-commit-a15d91073fd5d6be25.patch @@ -0,0 +1,51 @@ +From 3365b4bd58dd7f13e786caf3c7234cf8116263d9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +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 +--- + 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 + diff --git a/0002-Revert-decomp-fix-gcc-warning-strict-overflow.patch b/0002-Revert-decomp-fix-gcc-warning-strict-overflow.patch new file mode 100644 index 0000000..a936280 --- /dev/null +++ b/0002-Revert-decomp-fix-gcc-warning-strict-overflow.patch @@ -0,0 +1,52 @@ +From 5619f4cd2ca3108c8dea17ba656b5ce44a60ca29 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Fri, 11 Jan 2019 19:42:40 +0400 +Subject: [PATCH] Revert "decomp: fix gcc warning strict-overflow" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The warning doesn't happen with current build-sys. + +The overlapping behaviour is undefined with memcpy. memmove doesn't +have the same semantic either than the loop. Let's revert! + +Fixes: +https://gitlab.gnome.org/GNOME/gcab/issues/12 + +This reverts commit e48074952743f53d8ac529d4debc421e7e0f6937. + +Signed-off-by: Marc-André Lureau +--- + libgcab/decomp.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/libgcab/decomp.c b/libgcab/decomp.c +index 64d97f8..0c2b184 100644 +--- a/libgcab/decomp.c ++++ b/libgcab/decomp.c +@@ -1015,9 +1015,7 @@ int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state) { + window_posn += match_length; + + /* copy match data - no worries about destination wraps */ +- memcpy(rundest, runsrc, match_length); +- rundest += match_length; +- runsrc += match_length; ++ while (match_length-- > 0) *rundest++ = *runsrc++; + } + } + break; +@@ -1106,9 +1104,7 @@ int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state) { + window_posn += match_length; + + /* copy match data - no worries about destination wraps */ +- memcpy(rundest, runsrc, match_length); +- rundest += match_length; +- runsrc += match_length; ++ while (match_length-- > 0) *rundest++ = *runsrc++; + } + } + break; +-- +2.20.1.98.gecbdaf0899 + diff --git a/gcab.spec b/gcab.spec new file mode 100644 index 0000000..5bc04db --- /dev/null +++ b/gcab.spec @@ -0,0 +1,195 @@ +Name: gcab +Version: 1.4 +Release: 3%{?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 + +BuildRequires: git-core +BuildRequires: gettext +BuildRequires: gtk-doc +BuildRequires: vala +BuildRequires: glib2-devel +BuildRequires: gobject-introspection-devel +BuildRequires: zlib-devel +BuildRequires: meson +BuildRequires: git + +Requires: libgcab1%{?_isa} = %{version}-%{release} + +%description +gcab is a tool to manipulate Cabinet archive. + +%package -n libgcab1 +Summary: Library to create Cabinet archives + +%description -n libgcab1 +libgcab is a library to manipulate Cabinet archive using GIO/GObject. + +%package -n libgcab1-devel +Summary: Development files to create Cabinet archives +Requires: libgcab1%{?_isa} = %{version}-%{release} +Requires: glib2-devel +Requires: pkgconfig + +%description -n libgcab1-devel +libgcab is a library to manipulate Cabinet archive. + +Libraries, includes, etc. to compile with the gcab library. + +%prep +%autosetup -S git_am + +%build +%meson +%meson_build + +%check +%meson_test + +%install +%meson_install + +%find_lang %{name} + +%ldconfig_scriptlets -n libgcab1 + +%files +%doc COPYING NEWS +%{_bindir}/gcab +%{_mandir}/man1/gcab.1* + +%files -n libgcab1 -f %{name}.lang +%doc COPYING NEWS +%{_libdir}/girepository-1.0/GCab-1.0.typelib +%{_libdir}/libgcab-1.0.so.* + +%files -n libgcab1-devel +%{_datadir}/gir-1.0/GCab-1.0.gir +%{_datadir}/gtk-doc/html/gcab/* +%{_datadir}/vala/vapi/libgcab-1.0.vapi +%{_datadir}/vala/vapi/libgcab-1.0.deps +%{_includedir}/libgcab-1.0/* +%{_libdir}/libgcab-1.0.so +%{_libdir}/pkgconfig/libgcab-1.0.pc + +%changelog +* Mon Jul 27 2020 Fedora Release Engineering - 1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 06 2020 Marc-André Lureau - 1.4-1 +- New upstream release + +* Tue Oct 08 2019 Marc-André Lureau - 1.3-1 +- New upstream release + +* Thu Jul 25 2019 Fedora Release Engineering - 1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Feb 04 2019 Kalev Lember - 1.1-6 +- Update BRs for vala packaging changes + +* Thu Jan 31 2019 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 11 2019 Marc-André Lureau - 1.1-4 +- Fix LZX decompression corruption regression. + +* Thu Aug 2 2018 Marc-André Lureau - 1.1-3 +- fix 'rewind' regression rhbz#1608301 + +* Fri Jul 13 2018 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Richard Hughes - 1.1-1 +- New upstream release +- Add git version in --version +- Fix list of new symbols in index page + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.0-2 +- Switch to %%ldconfig_scriptlets + +* Tue Jan 23 2018 Richard Hughes - 1.0-1 +- New upstream release +- This fixes the security bug known as CVE-2018-5345 +- Add new API for fwupd +- Do not encode timezone in generated files +- Fix countless memory leaks when parsing corrupt files +- Fix the calculation of the checksum on big endian machines +- Switch to the Meson buildsystem + +* Wed Aug 02 2017 Fedora Release Engineering - 0.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Mar 09 2016 Marc-André Lureau - 0.7-1 +- 0.7 release update. + +* Wed Feb 03 2016 Fedora Release Engineering - 0.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Dec 01 2015 Fabiano Fidêncio - 0.6-5 +- Bump NVR and rebuild due to a mistakenly deleted build + +* Thu Jul 30 2015 Marc-André Lureau - 0.6-4 +- Fix wrong file modification date when creating cab. + +* Wed Jun 17 2015 Fedora Release Engineering - 0.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 23 2015 Kalev Lember - 0.6-2 +- Pull in the base library package when installing -devel + +* Tue Mar 17 2015 Marc-André Lureau - 0.6-1 +- Update to upstream release v0.6 + +* Tue Jan 06 2015 Marc-André Lureau - 0.4-7 +- Avoid directory traversal CVE-2015-0552. rhbz#1179126 + +* Sat Aug 16 2014 Fedora Release Engineering - 0.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 0.4-5 +- Rebuilt for gobject-introspection 1.41.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Feb 12 2013 Simone Caronni - 0.4-2 +- Removed rpm 4.5 macros/tags, it cannot be built with the vala in el5/el6. +- Removed redundant requirement on libgcab1%%{_isa}, added automatically by rpm. + +* Fri Feb 8 2013 Marc-André Lureau - 0.4-1 +- Update to upstream v0.4. + +* Fri Feb 8 2013 Marc-André Lureau - 0.3-3 +- Align more fields. +- Use double percentage in comment. +- Include COPYING file in gcab package too. + +* Fri Feb 8 2013 Marc-André Lureau - 0.3-2 +- Untabify. +- Use %%{buildroot} consitantly. +- Do not use -1.0 in package names. +- Add more tags based on the el5 spec template. +- Re-add --enable-fast-install trick, to make gcab relink. + +* Sun Jan 26 2013 Marc-André Lureau - 0.3-1 +- Initial package (rhbz#895757) diff --git a/sources b/sources new file mode 100644 index 0000000..4d3a25c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gcab-1.4.tar.xz) = 66a2e0d0a5888c555153356ce808f602053e71b76af19794db7e3bbf9516fe791805068838b4e208698cd645ada7a08610ac95f846fa81e00a9b955016306299