Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jzerebecki:branches:openSUSE:Factory
product-builder-plugin-Tumbleweed
0001-make-CHECKSUMS-file-reproducible.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-make-CHECKSUMS-file-reproducible.patch of Package product-builder-plugin-Tumbleweed
From 36f06826637a904b9593741fa6897479d1ca5da0 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki <jan.suse@zerebecki.de> Date: Fri, 11 Aug 2023 14:14:33 +0200 Subject: [PATCH] make CHECKSUMS file reproducible as the order in which the filesystem returns entries does not work for reproducible builds, sort entries --- KIWIChecksumPlugin.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/KIWIChecksumPlugin.pm b/KIWIChecksumPlugin.pm index 6c71d9a..8e1df6f 100644 --- a/KIWIChecksumPlugin.pm +++ b/KIWIChecksumPlugin.pm @@ -102,6 +102,11 @@ sub add_checksum KIWIQX::qxx("sha256sum $file >> CHECKSUMS"); } +sub sort_checksum { + # fix that the order in which the filesystem returns entries does not work for reproducible builds + sort(@_); +} + sub execute { my $this = shift; if(not ref($this)) { @@ -118,10 +123,10 @@ sub execute { my $dir = $this->collect()->basesubdirs()->{$cd}; $this->logMsg("I", "Creating checksum file on medium <$cd>: $dir"); chdir($dir); - find({wanted => \&add_checksum, no_chdir=>1}, "boot") if -d "boot"; - find({wanted => \&add_checksum, no_chdir=>1}, "EFI") if -d "EFI"; - find({wanted => \&add_checksum, no_chdir=>1}, "docu") if -d "docu"; - find({wanted => \&add_checksum, no_chdir=>1}, "media.1") if -d "media.1"; + find({ preprocess => \&sort_checksum, wanted => \&add_checksum, no_chdir=>1}, "boot") if -d "boot"; + find({ preprocess => \&sort_checksum, wanted => \&add_checksum, no_chdir=>1}, "EFI") if -d "EFI"; + find({ preprocess => \&sort_checksum, wanted => \&add_checksum, no_chdir=>1}, "docu") if -d "docu"; + find({ preprocess => \&sort_checksum, wanted => \&add_checksum, no_chdir=>1}, "media.1") if -d "media.1"; if (-e "CHECKSUMS") { my $cmd = "sign -d CHECKSUMS"; -- 2.30.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor