diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-10 21:10:02 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:48:45 +0100 |
commit | 4b2fa040eb2414ace66feedac92c2b05a68e1143 (patch) | |
tree | 6ca2c06acbe21f57a95e482ee33a1e53cde751b2 /meta/recipes-gnome/librsvg | |
parent | b88709a5b9d46fb02543f8ea825a5c73f46ace6e (diff) | |
download | poky-4b2fa040eb2414ace66feedac92c2b05a68e1143.tar.gz |
librsvg: restore reproducibility
(From OE-Core rev: c6fbac3b1db14aa73b4161371dd49644f3cced74)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/librsvg')
-rw-r--r-- | meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch | 53 | ||||
-rw-r--r-- | meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch b/meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch new file mode 100644 index 0000000000..9fe11930d3 --- /dev/null +++ b/meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 9c20757ef8055535579ca3b7e69834e6917200e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Fri, 24 Sep 2021 16:20:40 +0200 | ||
4 | Subject: [PATCH] vendor/system-deps: sort dependencies before using them | ||
5 | |||
6 | Otherwise they come out in non-reproducible order, leaking into | ||
7 | target binaries. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | |||
12 | |||
13 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
14 | --- | ||
15 | vendor/system-deps/.cargo-checksum.json | 3 ++- | ||
16 | vendor/system-deps/src/lib.rs | 6 +++--- | ||
17 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
18 | |||
19 | diff --git a/vendor/system-deps/.cargo-checksum.json b/vendor/system-deps/.cargo-checksum.json | ||
20 | index aae6cb9..73155dc 100644 | ||
21 | --- a/vendor/system-deps/.cargo-checksum.json | ||
22 | +++ b/vendor/system-deps/.cargo-checksum.json | ||
23 | @@ -1 +1,2 @@ | ||
24 | -{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"594e5f14180590adc9ea0a8ba1cc35f9a8a260322d08de3037efac3ce1dc729b","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} | ||
25 | +{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae", | ||
26 | +"src/lib.rs":"d88593afdcb0cc3765bf427913ebb718ac6dcd9d62d1381d9afe44dddef3abbf","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} | ||
27 | diff --git a/vendor/system-deps/src/lib.rs b/vendor/system-deps/src/lib.rs | ||
28 | index af14348..5f0682e 100644 | ||
29 | --- a/vendor/system-deps/src/lib.rs | ||
30 | +++ b/vendor/system-deps/src/lib.rs | ||
31 | @@ -242,11 +242,11 @@ impl Dependencies { | ||
32 | self.libs.get(name) | ||
33 | } | ||
34 | |||
35 | - /// An iterator visiting all system dependencies in arbitrary order. | ||
36 | + /// An iterator visiting all system dependencies in sorted (for build reproducibility) order. | ||
37 | /// The first element of the tuple is the name of the `toml` key defining the | ||
38 | /// dependency in `Cargo.toml`. | ||
39 | pub fn iter(&self) -> impl Iterator<Item = (&str, &Library)> { | ||
40 | - self.libs.iter().map(|(k, v)| (k.as_str(), v)) | ||
41 | + self.libs.iter().map(|(k, v)| (k.as_str(), v)).sorted_by_key(|x| x.0) | ||
42 | } | ||
43 | |||
44 | fn aggregate_str<F: Fn(&Library) -> &Vec<String>>( | ||
45 | @@ -338,7 +338,7 @@ impl Dependencies { | ||
46 | let mut flags = BuildFlags::new(); | ||
47 | let mut include_paths = Vec::new(); | ||
48 | |||
49 | - for (name, lib) in self.libs.iter() { | ||
50 | + for (name, lib) in self.libs.iter().sorted_by_key(|x| x.0) { | ||
51 | include_paths.extend(lib.include_paths.clone()); | ||
52 | |||
53 | if lib.source == Source::EnvVariables | ||
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb b/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb index 50489453df..47d3880873 100644 --- a/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb +++ b/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | |||
@@ -23,6 +23,7 @@ SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.pat | |||
23 | file://0003-New-ToCairoARGB-trait.patch \ | 23 | file://0003-New-ToCairoARGB-trait.patch \ |
24 | file://0004-impl-ToPixel-for-CairoARGB.patch \ | 24 | file://0004-impl-ToPixel-for-CairoARGB.patch \ |
25 | file://0001-crossbeam-utils-check-only-the-architecture-not-the-.patch \ | 25 | file://0001-crossbeam-utils-check-only-the-architecture-not-the-.patch \ |
26 | file://0001-vendor-system-deps-sort-dependencies-before-using-th.patch \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | SRC_URI[archive.sha256sum] = "bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393" | 29 | SRC_URI[archive.sha256sum] = "bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393" |