Accepting request 583619 from GNOME:Next

Scripted push of project GNOME:Next

OBS-URL: https://build.opensuse.org/request/show/583619
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/file-roller?expand=0&rev=262
This commit is contained in:
Dominique Leuenberger 2018-03-09 10:11:11 +00:00 committed by Git OBS Bridge
parent 1072a20f2e
commit 390bcc7ac0
7 changed files with 79 additions and 195 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e677b8e1c2f19aead69cf4fc419a19fc3373aaf5d7bf558b4f077f10bbba8a5
size 1436760

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cb843109c766973a3225869f3c9e0d04f21325e292faab49d9dd5857846791d
size 1367480

View File

@ -2,7 +2,7 @@ Index: src/fr-init.c
=================================================================== ===================================================================
--- src/fr-init.c.orig --- src/fr-init.c.orig
+++ src/fr-init.c +++ src/fr-init.c
@@ -350,6 +350,7 @@ register_archives (void) @@ -364,6 +364,7 @@ register_archives (void)
register_archive (FR_TYPE_COMMAND_TAR); register_archive (FR_TYPE_COMMAND_TAR);
register_archive (FR_TYPE_COMMAND_CFILE); register_archive (FR_TYPE_COMMAND_CFILE);
@ -10,9 +10,9 @@ Index: src/fr-init.c
register_archive (FR_TYPE_COMMAND_7Z); register_archive (FR_TYPE_COMMAND_7Z);
register_archive (FR_TYPE_COMMAND_DPKG); register_archive (FR_TYPE_COMMAND_DPKG);
@@ -364,7 +365,6 @@ register_archives (void) @@ -379,7 +380,6 @@ register_archives (void)
register_archive (FR_TYPE_COMMAND_RAR);
register_archive (FR_TYPE_COMMAND_RPM); register_archive (FR_TYPE_COMMAND_RPM);
register_archive (FR_TYPE_COMMAND_UNSQUASHFS);
register_archive (FR_TYPE_COMMAND_UNSTUFF); register_archive (FR_TYPE_COMMAND_UNSTUFF);
- register_archive (FR_TYPE_COMMAND_ZIP); - register_archive (FR_TYPE_COMMAND_ZIP);
register_archive (FR_TYPE_COMMAND_LRZIP); register_archive (FR_TYPE_COMMAND_LRZIP);

View File

@ -1,131 +0,0 @@
From f1e74492e765a3e055e0bed61cc5b2b930de12ad Mon Sep 17 00:00:00 2001
From: Paolo Bacchilega <paobac@src.gnome.org>
Date: Sun, 19 Nov 2017 16:49:32 +0100
Subject: [PATCH] rar archives: wrong file date when using rar 5.30 or higher
adapt to the new format
[bug #758121]
---
src/fr-command-rar.c | 78 +++++++++++++++++++++++++++++++++++++++++++++-------
src/fr-command-rar.h | 1 +
2 files changed, 69 insertions(+), 10 deletions(-)
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index adfc3daa..8f31f7a3 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -84,6 +84,61 @@ mktime_from_string (const char *date_s,
return mktime (&tm);
}
+
+static time_t
+mktime_from_string_rar_5_30 (const char *date_s,
+ const char *time_s)
+{
+ struct tm tm = {0, };
+ char **fields;
+
+ tm.tm_isdst = -1;
+
+ /* date */
+
+ fields = g_strsplit (date_s, "-", 3);
+ if (fields[0] != NULL) {
+ tm.tm_year = atoi (fields[0]) - 1900;
+ if (fields[1] != NULL) {
+ tm.tm_mon = atoi (fields[1]) - 1;
+ if (fields[2] != NULL)
+ tm.tm_mday = atoi (fields[2]);
+ }
+ }
+ g_strfreev (fields);
+
+ /* time */
+
+ fields = g_strsplit (time_s, ":", 2);
+ if (fields[0] != NULL) {
+ tm.tm_hour = atoi (fields[0]);
+ if (fields[1] != NULL)
+ tm.tm_min = atoi (fields[1]);
+ }
+ g_strfreev (fields);
+
+ return mktime (&tm);
+}
+
+
+/*
+ * Sample rar 5.30 or higher output:
+ *
+
+RAR 5.30 Copyright (c) 1993-2017 Alexander Roshal 11 Aug 2017
+Trial version Type 'rar -?' for help
+
+Archive: test.rar
+Details: RAR 5
+
+ Attributes Size Packed Ratio Date Time Checksum Name
+----------- --------- -------- ----- ---------- ----- -------- ----
+ -rw-r--r-- 51 47 92% 2017-11-19 16:20 80179DAB loremipsum.txt
+----------- --------- -------- ----- ---------- ----- -------- ----
+ 51 47 92% 1
+
+ */
+
/* Sample rar-5 listing output:
RAR 5.00 beta 8 Copyright (c) 1993-2013 Alexander Roshal 22 Aug 2013
@@ -187,15 +242,17 @@ process_line (char *line,
g_return_if_fail (line != NULL);
if (! rar_comm->list_started) {
- if (strncmp (line, "RAR ", 4) == 0) {
- int version;
- sscanf (line, "RAR %d.", &version);
- rar_comm->rar5 = (version >= 5);
- }
- else if (strncmp (line, "UNRAR ", 6) == 0) {
- int version;
- sscanf (line, "UNRAR %d.", &version);
- rar_comm->rar5 = (version >= 5);
+ if ((strncmp (line, "RAR ", 4) == 0) || (strncmp (line, "UNRAR ", 6) == 0)) {
+ int major_version;
+ int minor_version;
+
+ if (strncmp (line, "RAR ", 4) == 0)
+ sscanf (line, "RAR %d.%d", &major_version, &minor_version);
+ else
+ sscanf (line, "UNRAR %d.%d", &major_version, &minor_version);
+
+ rar_comm->rar5 = (major_version >= 5);
+ rar_comm->rar5_30 = ((major_version == 5) && (minor_version >= 30)) || (major_version >= 6);
}
else if (strncmp (line, "--------", 8) == 0) {
rar_comm->list_started = TRUE;
@@ -259,7 +316,8 @@ process_line (char *line,
}
else {
fdata->size = g_ascii_strtoull (size_field, NULL, 10);
- fdata->modified = mktime_from_string (date_field, time_field);
+
+ fdata->modified = rar_comm->rar5_30 ? mktime_from_string_rar_5_30 (date_field, time_field) : mktime_from_string (date_field, time_field);
if (attr_field_is_dir (attr_field, rar_comm)) {
char *tmp;
diff --git a/src/fr-command-rar.h b/src/fr-command-rar.h
index 09ed2709..2a6e671d 100644
--- a/src/fr-command-rar.h
+++ b/src/fr-command-rar.h
@@ -44,6 +44,7 @@ struct _FrCommandRar
gboolean list_started;
gboolean rar4_odd_line;
gboolean rar5;
+ gboolean rar5_30;
FileData *fdata;
};
--
2.15.0

View File

@ -1,30 +0,0 @@
From fe422f7c6b42a0d618b2b49999cfb2210f9ceca5 Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com>
Date: Mon, 11 Dec 2017 21:34:40 -0600
Subject: [PATCH] unarchiver: check that XADFileSize is set before reading it
Lsar does not set XADFileSize for directories, so we would output a
critical when encountering one.
https://bugzilla.gnome.org/show_bug.cgi?id=791505
---
src/fr-command-unarchiver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/fr-command-unarchiver.c b/src/fr-command-unarchiver.c
index a7cdb834..5e8fd705 100644
--- a/src/fr-command-unarchiver.c
+++ b/src/fr-command-unarchiver.c
@@ -91,7 +91,8 @@ list_command_completed (gpointer data)
entry = json_array_get_object_element (content, i);
fdata = file_data_new ();
- fdata->size = json_object_get_int_member (entry, "XADFileSize");
+ if (json_object_has_member (entry, "XADFileSize"))
+ fdata->size = json_object_get_int_member (entry, "XADFileSize");
fdata->modified = mktime_from_string (json_object_get_string_member (entry, "XADLastModificationDate"));
if (json_object_has_member (entry, "XADIsEncrypted"))
fdata->encrypted = json_object_get_int_member (entry, "XADIsEncrypted") == 1;
--
2.15.0

View File

@ -1,3 +1,57 @@
-------------------------------------------------------------------
Mon Mar 5 20:19:53 UTC 2018 - dimstar@opensuse.org
- Update to version 3.27.91:
+ Updated translations.
-------------------------------------------------------------------
Wed Feb 28 16:25:22 UTC 2018 - dimstar@opensuse.org
- Modernize spec-file by calling spec-cleaner
-------------------------------------------------------------------
Sat Feb 24 20:47:54 UTC 2018 - bjorn.lie@gmail.com
- No longer suggest lha and lrzip, they are no longer available in
openSUSE.
-------------------------------------------------------------------
Tue Feb 13 00:00:45 UTC 2018 - luc14n0@linuxmail.org
- Update to version 3.27.90:
+ Bug fixed: File roller installs dbus service files to wrong
location.
- Add pkgconfig(gthread-2.0) BuildRequires to avoid implicit
dependency.
- Drop file-roller-fix-install.patch: fixed upstream.
- Drop update-desktop-files BuildRequires and its macro: they are
not required anymore.
- Point fdupes to the data directory instead of the build root,
which is a practice that must be avoided.
-------------------------------------------------------------------
Wed Feb 7 11:03:05 UTC 2018 - dimstar@opensuse.org
- Update to version 3.27.1:
+ Ported to meson.
+ unarchiver: check that XADFileSize is set before reading it.
Lsar does not set XADFileSize for directories, so we would
output a critical when encountering one (bgo#791505).
+ nautilus-fileroller: Avoid the use of g_dgettext.
+ rar archives: wrong file date when using rar 5.30 or higher.
adapt to the new format (bgo#758121).
+ Support squashfs filesystems and .snap files (bgo#662519).
+ Updated translations.
- Drop file-roller-rar-file-date.patch and
file-roller-unar-dir-critical.patch: fixed upstream.
- Rebase file-roller-3.4-change-archiver-priority.patch.
- Convert to meson build system:
+ Add meson BuildRequires.
+ Replace configure/make/make_install macros with
meson/meson_build/meson_install.
- Add file-roller-fix-install.patch: Fix installation location for
dbus service files (bgo#793248).
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 13 19:02:07 UTC 2017 - mgorse@suse.com Wed Dec 13 19:02:07 UTC 2017 - mgorse@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package file-roller # spec file for package file-roller
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,31 +17,28 @@
Name: file-roller Name: file-roller
Version: 3.26.2 Version: 3.27.91
Release: 0 Release: 0
Summary: An Archive Manager for GNOME Summary: An Archive Manager for GNOME
License: GPL-2.0+ License: GPL-2.0-or-later
Group: Productivity/Archiving/Compression Group: Productivity/Archiving/Compression
Url: https://wiki.gnome.org/Apps/FileRoller URL: https://wiki.gnome.org/Apps/FileRoller
Source: https://download.gnome.org/sources/file-roller/3.26/%{name}-%{version}.tar.xz Source: http://download.gnome.org/sources/file-roller/3.27/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE file-roller-3.4-change-archiver-priority.patch bnc#767386 gankov@opensuse.org -- Give unzip a higher priority than 7z when unpackging zip files. Gives better results for non-latin charsets. # PATCH-FIX-OPENSUSE file-roller-3.4-change-archiver-priority.patch bnc#767386 gankov@opensuse.org -- Give unzip a higher priority than 7z when unpackging zip files. Gives better results for non-latin charsets.
Patch0: file-roller-3.4-change-archiver-priority.patch Patch0: file-roller-3.4-change-archiver-priority.patch
# PATCH-FEATURE-OPENSUSE file-roller-pkg-match.patch bnc#696530 dimstar@opensuse.org -- List package match names for automatic installation using PK. # PATCH-FEATURE-OPENSUSE file-roller-pkg-match.patch bnc#696530 dimstar@opensuse.org -- List package match names for automatic installation using PK.
Patch1: file-roller-pkg-match.patch Patch1: file-roller-pkg-match.patch
# PATCH-FIX-OPENSUSE file-roller-ignore-unrar-if-wrapper.patch bsc#1072118 mgorse@suse.com -- if unrar is a wrapper script for unar, then ignore it, and use unar instead. # PATCH-FIX-OPENSUSE file-roller-ignore-unrar-if-wrapper.patch bsc#1072118 mgorse@suse.com -- if unrar is a wrapper script for unar, then ignore it, and use unar instead.
Patch2: file-roller-ignore-unrar-if-wrapper.patch Patch2: file-roller-ignore-unrar-if-wrapper.patch
# PATCH-FIX-UPSTREAM file-roller-rar-file-date.patch bgo#758121 mgorse@suse.com -- fix wrong file date when using rar 5.30 or higher.
Patch3: file-roller-rar-file-date.patch
# PATCH-FIX-UPSTREAM file-roller-unar-dir-critical.patch bgo#791505 mgorse@suse.com -- fix warning when parsing lsar output.
Patch4: file-roller-unar-dir-critical.patch
# Needed for directory ownership # Needed for directory ownership
BuildRequires: dbus-1 BuildRequires: dbus-1
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: file-devel BuildRequires: file-devel
BuildRequires: intltool BuildRequires: meson
BuildRequires: update-desktop-files BuildRequires: pkgconfig
BuildRequires: yelp-tools BuildRequires: yelp-tools
BuildRequires: pkgconfig(glib-2.0) >= 2.36.0 BuildRequires: pkgconfig(glib-2.0) >= 2.36.0
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.13.2 BuildRequires: pkgconfig(gtk+-3.0) >= 3.13.2
BuildRequires: pkgconfig(json-glib-1.0) >= 0.14.0 BuildRequires: pkgconfig(json-glib-1.0) >= 0.14.0
BuildRequires: pkgconfig(libarchive) >= 3.0.0 BuildRequires: pkgconfig(libarchive) >= 3.0.0
@ -58,14 +55,14 @@ Recommends: unzip
Recommends: xz Recommends: xz
Recommends: zip Recommends: zip
# Additional formats that are supported # Additional formats that are supported
Suggests: lha
Suggests: lrzip
Suggests: lzip Suggests: lzip
Suggests: lzop Suggests: lzop
Suggests: rzip Suggests: rzip
Suggests: zoo Suggests: zoo
# FIXME: Formats for which we don't have packages. Some are free software that # FIXME: Formats for which we don't have packages. Some are free software that
# we could package. # we could package.
#Suggests: lha
#Suggests: lrzip
#Suggests: arj #Suggests: arj
#Suggests: ncompress #Suggests: ncompress
#Suggests: rar #Suggests: rar
@ -91,32 +88,27 @@ contained in the archive, and extract files from the archive.
%patch0 %patch0
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%patch4 -p1
%if !0%{?is_opensuse} %if !0%{?is_opensuse}
translation-update-upstream translation-update-upstream
%endif %endif
%build %build
%configure\ %meson \
--enable-magic \ -D notification=true \
--enable-libarchive \ -D libarchive=true \
--enable-notification -D magic=true \
make %{?_smp_mflags} %meson_build
%install %install
%make_install %meson_install
%suse_update_desktop_file org.gnome.FileRoller
%find_lang %{name} %{?no_lang_C} %find_lang %{name} %{?no_lang_C}
find %{buildroot} -type f -name "*.la" -delete -print %fdupes %{buildroot}%{_datadir}
%fdupes %{buildroot}
%files %files
%defattr(-, root, root) %license COPYING
%doc AUTHORS NEWS README COPYING %doc AUTHORS NEWS README
%{_bindir}/file-roller %{_bindir}/file-roller
%{_libexecdir}/file-roller/ %{_libexecdir}/file-roller/
%{_datadir}/GConf/gsettings/file-roller.convert
%dir %{_datadir}/metainfo %dir %{_datadir}/metainfo
%{_datadir}/metainfo/org.gnome.FileRoller.appdata.xml %{_datadir}/metainfo/org.gnome.FileRoller.appdata.xml
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop
@ -128,6 +120,5 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/apps/*
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-, root, root)
%changelog %changelog