summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-22 21:43:45 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-22 21:43:45 +0000
commitb577f65eedd59aecb2cb2d0b955614ff90ca4599 (patch)
treef9f5f537e7111160ddf93d587fe313f723a7e537
parent3c7a7f31dd1a39b86f223974c969fcfc1aecdea4 (diff)
Allow user to select which checksums are generated and support sha3-512.
-rw-r--r--NEWS2
-rw-r--r--examples/gui/config/build.cfg1
-rw-r--r--examples/minimal/config/build.cfg1
-rw-r--r--examples/xfce/config/build.cfg1
-rw-r--r--lib/MGA/DrakISO/BuildISO.pm8
5 files changed, 10 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 1d730d4..d5e5c66 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- support generation of sha3-512 checksum
+- allow user to select which checksum files are generated
- bootloader: tweak grub.cfg for use with multibootusb
- drakclassic: show package dependencies at verbose level > 4
diff --git a/examples/gui/config/build.cfg b/examples/gui/config/build.cfg
index a33cff3..0571673 100644
--- a/examples/gui/config/build.cfg
+++ b/examples/gui/config/build.cfg
@@ -200,5 +200,6 @@ my $config = {
copy_from_repo => [
'isolinux/memtest' => 'boot/memtest',
],
+# checksums => [ qw(md5 sha1 sha2 sha3) ],
},
};
diff --git a/examples/minimal/config/build.cfg b/examples/minimal/config/build.cfg
index 0627bd6..b767371 100644
--- a/examples/minimal/config/build.cfg
+++ b/examples/minimal/config/build.cfg
@@ -178,5 +178,6 @@ my $config = {
copy_from_repo => [
'isolinux/memtest' => 'boot/memtest',
],
+# checksums => [ qw(md5 sha1 sha2 sha3) ],
},
};
diff --git a/examples/xfce/config/build.cfg b/examples/xfce/config/build.cfg
index b8ddc75..613e48e 100644
--- a/examples/xfce/config/build.cfg
+++ b/examples/xfce/config/build.cfg
@@ -249,5 +249,6 @@ my $config = {
copy_from_repo => [
'isolinux/memtest' => 'boot/memtest',
],
+# checksums => [ qw(md5 sha1 sha2 sha3) ],
},
};
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm
index 2711e4c..eb89965 100644
--- a/lib/MGA/DrakISO/BuildISO.pm
+++ b/lib/MGA/DrakISO/BuildISO.pm
@@ -148,9 +148,11 @@ sub build_iso_image {
) or die "ERROR: unable to run xorrisofs\n";
run_("mgaiso-addmd5 $dest > /dev/null 2> /dev/null");
- run_("cd $build_dir && md5sum $iso_name > $iso_name.md5");
- run_("cd $build_dir && sha1sum $iso_name > $iso_name.sha1");
- run_("cd $build_dir && sha512sum $iso_name > $iso_name.sha512");
+ my $checksums = $build->{media}{checksums};
+ member('md5', @$checksums) and run_("cd $build_dir && md5sum $iso_name > $iso_name.md5");
+ member('sha1', @$checksums) and run_("cd $build_dir && sha1sum $iso_name > $iso_name.sha1");
+ member('sha2', @$checksums) and run_("cd $build_dir && sha512sum $iso_name > $iso_name.sha512");
+ member('sha3', @$checksums) and run_("cd $build_dir && sha3-512sum $iso_name > $iso_name.sha3");
if (my $suffix = $build->get_set_suffix) {
if (my ($prefix, $ext) = $dest =~ /(.*)(\.[^.]+)$/) {
my $link = $prefix . $suffix . $ext;