summaryrefslogtreecommitdiff
path: root/debian/patches/changes-to-generation-of-pytsk3.c-for-re.patch
blob: e74d7a33e888848bb838bc687f832c2d90f1e8e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Chris Lamb <chris@chris-lamb.co.uk>
Date: Tue, 10 Aug 2021 11:57:34 +0100
X-Dgit-Generated: 20200117-3.1 986f3e5bd0dd74f93dca15637e2c1242c6546d76
Subject: Changes to generation of pytsk3.c for reproducible build

(Closes: #992060)

Merged upstream as
https://github.com/py4n6/pytsk/commit/f2b9ffa642a83127eb0e517a1f0ed4a22a99199a
in pull request https://github.com/py4n6/pytsk/pull/81

---

--- pytsk-20200117.orig/class_parser.py
+++ pytsk-20200117/class_parser.py
@@ -913,8 +913,9 @@ uint64_t integer_object_copy_to_uint64(P
         for class_name in self.classes.keys():
             self.initialise_class(class_name, out, done)
 
-        # Add the constants in here
-        for constant, type in self.constants:
+        # Add the constants here. Make sure they are sorted so builds
+        # of pytsk3.c are reproducible.
+        for constant, type in sorted(self.constants):
             if type == "integer":
                 out.write(
                     "    tmp = PyLong_FromUnsignedLongLong((uint64_t) {0:s});\n".format(constant))