[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#889565: marked as done (libical3: please make the build reproducible)



Your message dated Sat, 22 Sep 2018 12:18:08 -0400
with message-id <4c91a775-5dd6-5150-0e30-99db24066756@babelouest.org>
and subject line Re: libical3: please make the build reproducible
has caused the Debian Bug report #889565,
regarding libical3: please make the build reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
889565: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889565
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: libical3
Version: 3.0.1-5
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness fileordering
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that libical3 could not be built reproducibly.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/0002-reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/0002-reproducible-build.patch	2018-02-04 14:23:38.286140899 +0000
@@ -0,0 +1,63 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2018-02-04
+
+--- libical3-3.0.1.orig/src/libical-glib/tools/generator.c
++++ libical3-3.0.1/src/libical-glib/tools/generator.c
+@@ -1096,6 +1096,7 @@ void generate_forward_declarations_heade
+     gchar *typeName;
+     gchar *typeKind;
+     GList *link;
++    GList *typeNamesList = NULL;
+     GHashTable *typeNames;
+     GHashTableIter iter_table;
+     gpointer key;
+@@ -1156,13 +1157,18 @@ void generate_forward_declarations_heade
+             if (g_strcmp0(buffer, "forward_declarations") == 0) {
+                 g_hash_table_iter_init(&iter_table, typeNames);
+                 while (g_hash_table_iter_next(&iter_table, &key, &value)) {
+-                    typeName = (gchar *)key;
++                    typeNamesList = g_list_prepend(typeNamesList, g_strdup(key));
++                }
++                typeNamesList = g_list_sort(typeNamesList, (GCompareFunc)g_strcmp0);
++                for (link = g_list_first(typeNamesList); link != NULL; link = g_list_next(link)) {
++                    typeName = link->data;
+                     write_str(out, "typedef struct _");
+                     write_str(out, typeName);
+                     write_str(out, " ");
+                     write_str(out, typeName);
+                     write_str(out, ";\n");
+                 }
++                g_list_free_full(typeNamesList, g_free);
+             } else if (g_strcmp0(buffer, "upperSnake") == 0) {
+                 write_str(out, "I_CAL_FORWARD_DECLARATIONS");
+             } else {
+@@ -2156,6 +2162,8 @@ static gint generate_library(const gchar
+     gchar *buffer;
+     GList *structures;
+     GList *iter_list;
++    GList *filenames;
++    GList *iter_filenames;
+     GDir *dir;
+     GError *local_error = NULL;
+     gint res = 0;
+@@ -2186,6 +2194,11 @@ static gint generate_library(const gchar
+ 
+     /* Parse the all the XML files into the Structure */
+     while (filename = g_dir_read_name(dir), filename) {
++        filenames = g_list_prepend(filenames, g_strdup(filename));
++    }
++    filenames = g_list_sort(filenames, (GCompareFunc)g_strcmp0);
++    for (iter_filenames = g_list_first(filenames); iter_filenames != NULL; iter_filenames = g_list_next(iter_filenames)) {
++        filename = iter_filenames->data;
+         gint len = (gint)strlen(filename);
+ 
+         if (len <= 4 || g_ascii_strncasecmp(filename + len - 4, ".xml", 4) != 0)
+@@ -2280,6 +2293,7 @@ static gint generate_library(const gchar
+     g_hash_table_destroy(type2structure);
+     g_hash_table_destroy(defaultValues);
+     g_list_free_full(structures, (GDestroyNotify)structure_free);
++    g_list_free_full(filenames, g_free);
+     g_free(buffer);
+ 
+     return res;
--- a/debian/patches/series	2018-02-04 13:36:45.872268239 +0000
--- b/debian/patches/series	2018-02-04 13:57:47.788970001 +0000
@@ -1 +1,2 @@
 0001-reproducible-build.patch
+0002-reproducible-build.patch

--- End Message ---
--- Begin Message ---
The patch has been applied updtream:
https://github.com/libical/libical/commit/6659ae7d5d4289068c5a61bb27b885a4fc600ca6

--- End Message ---

Reply to: