Accepting request 393313 from home:StefanBruens:branches:GNOME:Factory

Both patches have been submitted upstream. Actually completely untested, but compiles ;-)

OBS-URL: https://build.opensuse.org/request/show/393313
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/appstream-glib?expand=0&rev=70
This commit is contained in:
Bjørn Lie 2016-05-19 11:58:37 +00:00 committed by Git OBS Bridge
parent 866ee9d3dc
commit d9ab2a8098
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 0a87006dee61a79498c4d428443340afea99fd82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Mon, 2 May 2016 15:28:47 +0200
Subject: [PATCH] Omit timestamp from gzip compressed files
---
libappstream-builder/asb-utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c
index c75fb43..be340b5 100644
--- a/libappstream-builder/asb-utils.c
+++ b/libappstream-builder/asb-utils.c
@@ -441,8 +441,10 @@ asb_utils_write_archive (const gchar *filename,
struct stat st;
a = archive_write_new ();
- if (g_str_has_suffix (filename, ".gz"))
+ if (g_str_has_suffix (filename, ".gz")) {
archive_write_add_filter_gzip (a);
+ archive_write_set_filter_option (a, "gz", "timestamp", NULL);
+ }
if (g_str_has_suffix (filename, ".bz2"))
archive_write_add_filter_bzip2 (a);
if (g_str_has_suffix (filename, ".xz"))
--
2.7.4

View File

@ -0,0 +1,26 @@
From e890e51fd330f48c2671eab4004749fa85cef966 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Mon, 2 May 2016 14:57:51 +0200
Subject: [PATCH] Sort archive contents by name for repeatable results
---
libappstream-builder/asb-utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c
index 616c40a..c75fb43 100644
--- a/libappstream-builder/asb-utils.c
+++ b/libappstream-builder/asb-utils.c
@@ -532,6 +532,9 @@ asb_utils_write_archive_dir (const gchar *filename,
if (files->len == 0)
return TRUE;
+ /* sort by filename for deterministic results */
+ g_ptr_array_sort (files, g_strcmp0);
+
/* write tar file */
return asb_utils_write_archive (filename, directory, files, error);
}
--
2.7.4

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 2 13:29:57 UTC 2016 - stefan.bruens@rwth-aachen.de
- Make output of appstream-builder repeatable (boo#977885)
* 0001-Sort-archive-contents-by-name-for-repeatable-results.patch
* 0001-Omit-timestamp-from-gzip-compressed-files.patch
-------------------------------------------------------------------
Tue Apr 26 09:05:41 UTC 2016 - zaitor@opensuse.org

View File

@ -30,6 +30,8 @@ Url: http://people.freedesktop.org/~hughsient/appstream-glib/
Source0: %{name}-%{version}.tar.xz
Source1: openSUSE-appstream-process
Patch0: 0001-Add-yast2-branding-openSUSE-if-an-app-depends-on-yas.patch
Patch1: 0001-Sort-archive-contents-by-name-for-repeatable-results.patch
Patch2: 0001-Omit-timestamp-from-gzip-compressed-files.patch
%if %{_build_from_vcs}
BuildRequires: gnome-common
%else
@ -167,6 +169,8 @@ for the repositories to be published
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%if %{_build_from_vcs}