Hello community, here is the log from the commit of package gcab for openSUSE:Factory checked in at 2020-01-10 17:47:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcab (Old) and /work/SRC/openSUSE:Factory/.gcab.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcab" Fri Jan 10 17:47:17 2020 rev:14 rq:761247 version:1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/gcab/gcab.changes 2019-10-10 11:52:31.899466723 +0200 +++ /work/SRC/openSUSE:Factory/.gcab.new.6675/gcab.changes 2020-01-10 17:47:23.494158020 +0100 @@ -1,0 +2,11 @@ +Mon Jan 6 12:20:32 UTC 2020 - Bjørn Lie <[email protected]> + +- Update to version 1.4: + + New Features: + - New GDateTime-based APIs. + - Allow comping as meson subproject. + + Bugfixes: + - build-sys fixes. + - MacOS/Windows build support. + +------------------------------------------------------------------- Old: ---- gcab-1.3.tar.xz New: ---- gcab-1.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gcab.spec ++++++ --- /var/tmp/diff_new_pack.OtLwKK/_old 2020-01-10 17:47:23.934157941 +0100 +++ /var/tmp/diff_new_pack.OtLwKK/_new 2020-01-10 17:47:23.938157940 +0100 @@ -1,7 +1,7 @@ # # spec file for package gcab # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,20 @@ Name: gcab -Version: 1.3 +Version: 1.4 Release: 0 Summary: Cabinet file library and tool License: LGPL-2.1-or-later Group: Productivity/Archiving/Compression URL: https://gitlab.gnome.org/GNOME/gcab -Source0: https://download.gnome.org/sources/gcab/1.3/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/gcab/%{version}/%{name}-%{version}.tar.xz BuildRequires: gtk-doc BuildRequires: meson BuildRequires: pkgconfig BuildRequires: vala >= 0.14 BuildRequires: zlib-devel -BuildRequires: pkgconfig(glib-2.0) >= 2.44.0 +BuildRequires: pkgconfig(glib-2.0) >= 2.62.0 BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.4 Recommends: %{name}-lang ++++++ gcab-1.3.tar.xz -> gcab-1.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/NEWS new/gcab-1.4/NEWS --- old/gcab-1.3/NEWS 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/NEWS 2020-01-06 12:25:54.000000000 +0100 @@ -1,8 +1,19 @@ +v1.4 +==== + +New Features: + - New GDateTime-based APIs + - Allow comping as meson subproject + +Bugfixes: + - build-sys fixes + - MacOS/Windows build support + v1.3 ==== New Features: - - Installed test support (Simon McVittie) + - Installed test support (Simon McVittie) Bugfixes: - Fix file corruption on LZX extract diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/RELEASE new/gcab-1.4/RELEASE --- old/gcab-1.3/RELEASE 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/RELEASE 2020-01-06 12:25:54.000000000 +0100 @@ -34,10 +34,3 @@ scp meson-dist/*.tar.xz [email protected]: ssh [email protected] ftpadmin install gcab-*.tar.xz - -7. Do post release version bump in meson.build - -8. Commit trivial changes: - -git commit -a -m "trivial: post release version bump" -git push diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/contrib/gcab.spec.in new/gcab-1.4/contrib/gcab.spec.in --- old/gcab-1.3/contrib/gcab.spec.in 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/contrib/gcab.spec.in 2020-01-06 12:25:54.000000000 +0100 @@ -15,6 +15,7 @@ BuildRequires: gobject-introspection-devel BuildRequires: zlib-devel BuildRequires: meson +BuildRequires: git Requires: libgcab1%{?_isa} = %{version}-%{release} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/docs/reference/gcab-docs.sgml new/gcab-1.4/docs/reference/gcab-docs.sgml --- old/gcab-1.3/docs/reference/gcab-docs.sgml 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/docs/reference/gcab-docs.sgml 2020-01-06 12:25:54.000000000 +0100 @@ -36,6 +36,10 @@ <title>Index of new symbols in 1.0</title> <xi:include href="xml/api-index-1.0.xml"><xi:fallback /></xi:include> </index> + <index id="api-index-1-4" role="1.4"> + <title>Index of new symbols in 1.4</title> + <xi:include href="xml/api-index-1.4.xml"><xi:fallback /></xi:include> + </index> <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> </book> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/docs/reference/gcab-sections.txt new/gcab-1.4/docs/reference/gcab-sections.txt --- old/gcab-1.3/docs/reference/gcab-sections.txt 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/docs/reference/gcab-sections.txt 2020-01-06 12:25:54.000000000 +0100 @@ -34,6 +34,8 @@ gcab_file_get_attributes gcab_file_get_date gcab_file_set_date +gcab_file_get_date_time +gcab_file_set_date_time gcab_file_get_extract_name gcab_file_get_file gcab_file_get_name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/docs/reference/meson.build new/gcab-1.4/docs/reference/meson.build --- old/gcab-1.3/docs/reference/meson.build 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/docs/reference/meson.build 2020-01-06 12:25:54.000000000 +0100 @@ -1,9 +1,22 @@ +glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix') +glib_docpath = glib_prefix / 'share' / 'gtk-doc' / 'html' + +datadir = get_option('prefix') / get_option('datadir') +docpath = datadir / 'gcab' / 'html' + gnome.gtkdoc( 'gcab', src_dir : [ join_paths(meson.source_root(), 'libgcab'), join_paths(meson.build_root(), 'libgcab'), ], + ignore_headers : ['decomp.h', 'cabinet.h', 'gcab-priv.h'], main_sgml : 'gcab-docs.sgml', + fixxref_args: [ + '--html-dir=@0@'.format(docpath), + '--extra-dir=@0@'.format(glib_docpath / 'glib'), + '--extra-dir=@0@'.format(glib_docpath / 'gobject'), + '--extra-dir=@0@'.format(glib_docpath / 'gio'), + ], install : true ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/libgcab/gcab-file.c new/gcab-1.4/libgcab/gcab-file.c --- old/gcab-1.3/libgcab/gcab-file.c 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/libgcab/gcab-file.c 2020-01-06 12:25:54.000000000 +0100 @@ -181,6 +181,30 @@ } /** + * gcab_file_set_date_time: + * @file: a #GCabFile + * @dt: a #GDateTime + * + * Sets the file modification date (instead of the date provided by the GFile) + * + * Since: 1.4 + **/ +void +gcab_file_set_date_time (GCabFile *self, GDateTime *dt) +{ + g_return_if_fail (GCAB_IS_FILE (self)); + g_return_if_fail (dt != NULL); + + self->cfile->date = ((g_date_time_get_year (dt) - 1980 ) << 9 ) + + ((g_date_time_get_month (dt)) << 5) + + (g_date_time_get_day_of_month (dt)); + self->cfile->time = ((g_date_time_get_hour (dt)) << 11) + + (g_date_time_get_minute (dt) << 5) + + (g_date_time_get_second (dt) / 2); +} + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +/** * gcab_file_set_date: * @file: a #GCabFile * @tv: a #GTimeVal @@ -193,25 +217,22 @@ gcab_file_set_date (GCabFile *self, const GTimeVal *tv) { g_autoptr(GDateTime) dt = g_date_time_new_from_timeval_utc (tv); - self->cfile->date = ((g_date_time_get_year (dt) - 1980 ) << 9 ) + - ((g_date_time_get_month (dt)) << 5) + - (g_date_time_get_day_of_month (dt)); - self->cfile->time = ((g_date_time_get_hour (dt)) << 11) + - (g_date_time_get_minute (dt) << 5) + - (g_date_time_get_second (dt) / 2); + + gcab_file_set_date_time (self, dt); } +G_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_INTERNAL gboolean gcab_file_update_info (GCabFile *self, GFileInfo *info) { - GTimeVal tv; + g_autoptr(GDateTime) dt = NULL; g_return_val_if_fail (GCAB_IS_FILE (self), FALSE); g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE); - g_file_info_get_modification_time (info, &tv); + dt = g_file_info_get_modification_date_time (info); if (self->cfile->date == 0) - gcab_file_set_date (self, &tv); + gcab_file_set_date_time (self, dt); self->cfile->usize = g_file_info_get_size (info); self->cfile->fattr = GCAB_FILE_ATTRIBUTE_ARCH; @@ -281,24 +302,22 @@ } /** - * gcab_file_get_date: + * gcab_file_get_date_time: * @file: a #GCabFile - * @result: a #GTimeVal to return date * - * Get the file date, in @result. + * Gets the file date and returns it as a #GDateTime.. * - * Since: 0.6 + * Since: 1.4 * - * Returns: %TRUE if @tv was set + * Returns: file date, or NULL if unknown. **/ -gboolean -gcab_file_get_date (GCabFile *self, GTimeVal *tv) +GDateTime * +gcab_file_get_date_time (GCabFile *self) { guint16 date, time; g_autoptr(GDateTime) dt = NULL; - g_return_val_if_fail (GCAB_IS_FILE (self), FALSE); - g_return_val_if_fail (tv != NULL, FALSE); + g_return_val_if_fail (GCAB_IS_FILE (self), NULL); date = self->cfile->date; time = self->cfile->time; @@ -308,10 +327,36 @@ (time >> 11), (time >> 5) & 0x3f, (time & 0x1f) * 2); + return g_steal_pointer (&dt); +} + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +/** + * gcab_file_get_date: + * @file: a #GCabFile + * @result: a #GTimeVal to return date + * + * Get the file date, in @result. + * + * Since: 0.6 + * + * Returns: %TRUE if @tv was set + **/ +gboolean +gcab_file_get_date (GCabFile *self, GTimeVal *tv) +{ + g_autoptr(GDateTime) dt = NULL; + + g_return_val_if_fail (GCAB_IS_FILE (self), FALSE); + g_return_val_if_fail (tv != NULL, FALSE); + + dt = gcab_file_get_date_time (self); if (dt == NULL) return FALSE; + return g_date_time_to_timeval (dt, tv); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * gcab_file_get_attributes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/libgcab/gcab-file.h new/gcab-1.4/libgcab/gcab-file.h --- old/gcab-1.3/libgcab/gcab-file.h 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/libgcab/gcab-file.h 2020-01-06 12:25:54.000000000 +0100 @@ -72,11 +72,18 @@ const gchar * gcab_file_get_name (GCabFile *file); guint32 gcab_file_get_size (GCabFile *file); guint32 gcab_file_get_attributes (GCabFile *file); -gboolean gcab_file_get_date (GCabFile *file, GTimeVal *result); const gchar * gcab_file_get_extract_name (GCabFile *file); void gcab_file_set_extract_name (GCabFile *file, const gchar *name); -void gcab_file_set_date (GCabFile *file, const GTimeVal *tv); void gcab_file_set_attributes (GCabFile *file, guint32 attr); +GDateTime * gcab_file_get_date_time (GCabFile *file); +void gcab_file_set_date_time (GCabFile *file, GDateTime *dt); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_DEPRECATED_FOR(gcab_file_get_date_time) +gboolean gcab_file_get_date (GCabFile *file, GTimeVal *result); +G_DEPRECATED_FOR(gcab_file_set_date_time) +void gcab_file_set_date (GCabFile *file, const GTimeVal *tv); +G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/libgcab/gcab-folder.c new/gcab-1.4/libgcab/gcab-folder.c --- old/gcab-1.3/libgcab/gcab-folder.c 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/libgcab/gcab-folder.c 2020-01-06 12:25:54.000000000 +0100 @@ -455,7 +455,7 @@ if (!g_seekable_seek (G_SEEKABLE (data), self->cfolder->offsetdata, G_SEEK_SET, cancellable, error)) return FALSE; - bzero(cdata, sizeof(cdata_t)); + memset(cdata, 0x0, sizeof(cdata_t)); cdata->reserved = reserved; nubytes = 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/libgcab/libgcab.syms new/gcab-1.4/libgcab/libgcab.syms --- old/gcab-1.3/libgcab/libgcab.syms 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/libgcab/libgcab.syms 2020-01-06 12:25:54.000000000 +0100 @@ -51,3 +51,8 @@ gcab_folder_get_comptype; gcab_folder_get_file_by_name; } LIBGCAB1_0.6; + +LIBGCAB1_1.4 { + gcab_file_get_date_time; + gcab_file_set_date_time; +} LIBGCAB1_1.0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/libgcab/meson.build new/gcab-1.4/libgcab/meson.build --- old/gcab-1.3/libgcab/meson.build 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/libgcab/meson.build 2020-01-06 12:25:54.000000000 +0100 @@ -39,8 +39,8 @@ 'cabinet.c', 'decomp.c', ], - soversion : lt_current, version : lt_version, + darwin_versions: darwin_versions, dependencies : [ gio, libz, @@ -50,11 +50,20 @@ include_directories('.'), include_directories('..'), ], - link_args : vflag, + link_args : cc.get_supported_link_arguments([vflag]), link_depends : mapfile, install : true ) +gcab_dep = declare_dependency( + link_with : libgcab, + include_directories : [ + include_directories('.'), + include_directories('..'), + ], + dependencies : gcab_deps +) + pkgg = import('pkgconfig') pkgg.generate( libraries : libgcab, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/meson.build new/gcab-1.4/meson.build --- old/gcab-1.3/meson.build 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/meson.build 2020-01-06 12:25:54.000000000 +0100 @@ -1,5 +1,5 @@ project('gcab', 'c', - version : '1.3', + version : '1.4', license : 'LGPL-2.1+', meson_version : '>=0.50.0', default_options : ['warning_level=2', 'c_std=c99'], @@ -12,14 +12,14 @@ endif # libtool versioning -lt_current = '0' -lt_revision = '0' -lt_age = '0' -lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision) +lt_current = 1 +lt_revision = 0 +lt_age = 1 +lt_version = '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision) +darwin_versions = [lt_current + 1, '@0@.@[email protected]'.format(lt_current + 1, lt_revision)] # get suported warning flags test_args = [ - '-fstack-protector-strong', '-Waggregate-return', '-Wunused', '-Warray-bounds', @@ -73,6 +73,10 @@ endif endforeach +if not meson.is_cross_build() + add_project_arguments('-fstack-protector-strong', language : 'c') +endif + # enable full RELRO where possible # FIXME: until https://github.com/mesonbuild/meson/issues/1140 is fixed global_link_args = [] @@ -85,14 +89,19 @@ global_link_args += arg endif endforeach -add_global_link_arguments( +add_project_link_arguments( global_link_args, language: 'c' ) -gio = dependency('gio-2.0', version : '>= 2.44.0') +gio = dependency('gio-2.0', version : '>= 2.62.0') libz = dependency('zlib') +gcab_deps = [ + gio, + libz, +] + gnome = import('gnome') i18n = import('i18n') @@ -110,7 +119,7 @@ conf.set_quoted('PACKAGE_NAME', meson.project_name()) conf.set_quoted('PACKAGE_STRING', package_string) conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) -conf.set_quoted('PACKAGE_BUGREPORT', 'https://bugzilla.gnome.org/enter_bug.cgi?product=msitools&component=gcab') +conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/gcab/issues/new') configure_file( output : 'config.h', configuration : conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/src/gcab.c new/gcab-1.4/src/gcab.c --- old/gcab-1.3/src/gcab.c 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/src/gcab.c 2020-01-06 12:25:54.000000000 +0100 @@ -193,13 +193,9 @@ for (l = files; l != NULL; l = l->next) { if (list_details) { - gchar date[32]; - struct tm *tm; - GTimeVal tv = {0}; - - gcab_file_get_date (GCAB_FILE (l->data), &tv); - tm = localtime (&tv.tv_sec); - strftime (date, sizeof (date), "%Y-%m-%d %H:%M:%S", tm); + g_autoptr(GDateTime) dt = gcab_file_get_date_time (GCAB_FILE (l->data)); + g_autoptr(GDateTime) dtl = g_date_time_to_local (dt); + g_autofree char *date = g_date_time_format (dtl, "%Y-%m-%d %H:%M:%S"); g_print ("%s %u %s 0x%X\n", gcab_file_get_name (GCAB_FILE (l->data)), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gcab-1.3/tests/gcab-self-test.c new/gcab-1.4/tests/gcab-self-test.c --- old/gcab-1.3/tests/gcab-self-test.c 2019-10-08 09:53:37.000000000 +0200 +++ new/gcab-1.4/tests/gcab-self-test.c 2020-01-06 12:25:54.000000000 +0100 @@ -35,8 +35,6 @@ static void gcab_test_file_func (void) { - gboolean ret; - GTimeVal tv; g_autofree gchar *fn = NULL; g_autoptr(GCabFile) cabfile = NULL; g_autoptr(GDateTime) dt = NULL; @@ -52,9 +50,7 @@ /* set the time */ dt_bday = g_date_time_new_utc (2017, 9, 15, 0, 0, 0.f); - ret = g_date_time_to_timeval (dt_bday, &tv); - g_assert (ret); - gcab_file_set_date (cabfile, &tv); + gcab_file_set_date_time (cabfile, dt_bday); /* verify */ g_assert (gcab_file_get_file (cabfile) == gfile); @@ -62,9 +58,7 @@ g_assert_cmpstr (gcab_file_get_extract_name (cabfile), ==, "tæst.bin"); g_assert_cmpint (gcab_file_get_size (cabfile), ==, 0); g_assert_cmpint (gcab_file_get_attributes (cabfile), ==, 0); - ret = gcab_file_get_date (cabfile, &tv); - g_assert (ret); - dt = g_date_time_new_from_timeval_utc (&tv); + dt = gcab_file_get_date_time (cabfile); g_assert_cmpint (g_date_time_get_year (dt), ==, 2017); g_assert_cmpint (g_date_time_get_month (dt), ==, 9); g_assert_cmpint (g_date_time_get_day_of_month (dt), ==, 15); @@ -283,10 +277,7 @@ /* set the time and attributes */ g_autoptr(GDateTime) dt = dt = g_date_time_new_utc (2017, 9, 15, 0, 0, 0.f); - GTimeVal tv; - ret = g_date_time_to_timeval (dt, &tv); - g_assert (ret); - gcab_file_set_date (cabfile, &tv); + gcab_file_set_date_time (cabfile, dt); gcab_file_set_attributes (cabfile, GCAB_FILE_ATTRIBUTE_ARCH); /* add file to folder */ @@ -536,13 +527,10 @@ g_autoptr(GFile) file = g_file_new_for_path (fn_tmp); g_autoptr(GCabFile) cabfile = gcab_file_new_with_file (files[j].fn, file); g_autoptr(GDateTime) dt = NULL; - GTimeVal tv; /* set the time so the checksums match */ dt = g_date_time_new_utc (2017, 9, 15, 0, 0, 0.f); - ret = g_date_time_to_timeval (dt, &tv); - g_assert (ret); - gcab_file_set_date (cabfile, &tv); + gcab_file_set_date_time (cabfile, dt); ret = gcab_folder_add_file (cabfolder, cabfile, FALSE, NULL, &error); g_assert_no_error (error);
