Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package product-builder for openSUSE:Factory
checked in at 2022-12-15 19:24:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/product-builder (Old)
and /work/SRC/openSUSE:Factory/.product-builder.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "product-builder"
Thu Dec 15 19:24:20 2022 rev:42 rq:1042919 version:1.4.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/product-builder/product-builder.changes
2021-09-30 23:43:35.500482865 +0200
+++
/work/SRC/openSUSE:Factory/.product-builder.new.1835/product-builder.changes
2022-12-15 19:24:24.627785004 +0100
@@ -1,0 +2,10 @@
+Wed Dec 14 12:39:26 UTC 2022 - Adrian Schröter <[email protected]>
+
+- 1.4.12
+ * RedHat media support
+ * SLSA provenance file support
+ * support to set DVD volumeid manual
+ * fix hybrid ISO creation
+ * support modulemd filtering
+
+-------------------------------------------------------------------
Old:
----
product-builder-1.4.6.obscpio
New:
----
product-builder-1.4.12.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ product-builder.spec ++++++
--- /var/tmp/diff_new_pack.4B5yVg/_old 2022-12-15 19:24:25.159788031 +0100
+++ /var/tmp/diff_new_pack.4B5yVg/_new 2022-12-15 19:24:25.163788054 +0100
@@ -1,7 +1,7 @@
#
# spec file for package product-builder
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
Name: product-builder
Conflicts: kiwi
Conflicts: kiwi-instsource
-Version: 1.4.6
+Version: 1.4.12
Release: 0
Provides: kiwi-schema = 6.2
Source: product-builder-%version.tar.xz
++++++ _service ++++++
--- /var/tmp/diff_new_pack.4B5yVg/_old 2022-12-15 19:24:25.203788281 +0100
+++ /var/tmp/diff_new_pack.4B5yVg/_new 2022-12-15 19:24:25.203788281 +0100
@@ -1,8 +1,8 @@
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/openSUSE/product-builder.git</param>
- <param name="revision">1.4.6</param>
- <param name="version">1.4.6</param>
+ <param name="revision">1.4.12</param>
+ <param name="version">1.4.12</param>
<param name="scm">git</param>
<param name="extract">rpm/product-builder.spec</param>
</service>
++++++ product-builder-1.4.6.obscpio -> product-builder-1.4.12.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWICollect.pm
new/product-builder-1.4.12/modules/KIWICollect.pm
--- old/product-builder-1.4.6/modules/KIWICollect.pm 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWICollect.pm 2022-05-03
09:46:16.000000000 +0200
@@ -304,6 +304,7 @@
$attr{source} = $package -> getSourceLocation();
$attr{script} = $package -> getScriptPath();
$attr{medium} = $package -> getMediaID();
+ $attr{module} = $package -> getModule();
$instPacks{$name} = \%attr;
}
$this->logMsg('I', "KIWICollect::Init: querying instsource package list");
@@ -764,13 +765,19 @@
my $volid_maxlen = 32;
my $vname = $name;
$vname =~ s/-Media//;
- $vname =~ s/-Build// if length($vname) > ($volid_maxlen - 4);
+ $vname =~ s/-Build\d\S+// if length($vname) > ($volid_maxlen - 4);
+ if (defined($this->{m_proddata}->getVar("VOLUME_ID"))) {
+ $vname = $this->{m_proddata}->getVar("VOLUME_ID");
+ }
my $vid = substr($vname,0,($volid_maxlen));
if ($this->{m_proddata}->getVar("MULTIPLE_MEDIA", "true") eq "true") {
- $vid = sprintf(
- "%s.%03d",
- substr($vname,0,($volid_maxlen - 4)), $cd
- );
+ # we do not extend the volume id on the first medium if manualy
specified
+ if (!defined($this->{m_proddata}->getVar("VOLUME_ID")) || $cd > 1)
{
+ $vid = sprintf(
+ "%s.%03d",
+ substr($vname,0,($volid_maxlen - 4)), $cd
+ );
+ }
}
my $attr = "-r"; # RockRidge
$attr .= " -pad"; # pad image by 150 sectors - needed for Linux
@@ -797,7 +804,7 @@
);
# Just the first media is usually bootable at SUSE
my $is_bootable = 0;
- if(-d "$this->{m_basesubdir}->{$cd}/boot") {
+ if(-d "$this->{m_basesubdir}->{$cd}/boot" || -d
"$this->{m_basesubdir}->{$cd}/isolinux") {
if(!$iso->callBootMethods()) {
my $msg = 'Creating boot methods failed, medium maybe '
. 'not be bootable';
@@ -1020,6 +1027,8 @@
# need to get added in addition in any case)
my $found_package;
my $found_modularity_package;
+ my @requested_modules;
+ @requested_modules = split(/\s*,\s*/, $packOptions->{module}) if
$packOptions->{module};
PACKKEY:
for my $packKey(@sorted_keys) {
@@ -1029,10 +1038,22 @@
$this->logMsg('I', " check $packKey ");
}
- next if ($found_package && !%require_version);
-
my $arch;
my $packPointer = $poolPackages->{$packKey};
+ my $modularity_context = $packPointer->{modularity_context};
+
+ next if ($found_package && !$modularity_context &&
!%require_version);
+
+ if (@requested_modules) {
+ if ($requested_modules[0] eq 'none') {
+ next if $modularity_context;
+ } elsif ($requested_modules[0] eq 'all') {
+ next unless $modularity_context;
+ } else {
+ next unless $modularity_context && grep
{"$modularity_context:" =~ /^\Q$_\E:/} @requested_modules;
+ }
+ }
+
for my $checkarch(@fallbacklist) {
if ($this->{m_debug} >= 5) {
$this->logMsg('I', " check architecture $checkarch
");
@@ -1084,12 +1105,14 @@
# process package
my $medium = $packOptions->{'medium'} || 1;
- $packOptions->{$requestedArch}->{'newfile'} =
+ my $name_base =
"$packName-"
.$packPointer->{'version'}
.'-'
.$packPointer->{'release'}
- .".$packPointer->{'arch'}.rpm";
+ .".$packPointer->{'arch'}";
+ $packOptions->{$requestedArch}->{'newfile'} = $name_base .
".rpm";
+ $packOptions->{$requestedArch}->{'slsa_file'} = $name_base .
".slsa_provenance.json";
$packOptions->{$requestedArch}->{'newpath'} =
"$this->{m_basesubdir}->{$medium}"
."/$packPointer->{'arch'}";
@@ -1103,22 +1126,20 @@
}
# link it:
my $item =
$packOptions->{$requestedArch}->{'newpath'}."/$packOptions->{$requestedArch}->{'newfile'}";
- if ((! -e $item) && (! link (
- $packPointer->{'localfile'},
- "$packOptions->{$requestedArch}->{'newpath'}"
- ."/$packOptions->{$requestedArch}->{'newfile'}"))) {
- my $msg = " linking file $packPointer->{'localfile'} "
- . "to $packOptions->{$requestedArch}->{'newpath'}/"
- . "$packOptions->{$requestedArch}->{'newfile'} "
- . 'failed';
+ my $item_slsa =
$packOptions->{$requestedArch}->{'newpath'}."/$packOptions->{$requestedArch}->{'slsa_file'}";
+ if ((! -e $item) && (! link($packPointer->{'localfile'},
$item))) {
+ my $msg = " linking file $packPointer->{'localfile'} to
$item failed";
$this->logMsg('E', $msg);
} else {
- my $lnkTarget =
- $packOptions->{$requestedArch}->{'newpath'}
- . "/$packOptions->{$requestedArch}->{'newfile'}";
$this->addToTrackFile(
- $packName, $packPointer, $medium, $lnkTarget
+ $packName, $packPointer, $medium, $item
);
+ if ($packPointer->{'slsa_uri'} && ! -e $item_slsa) {
+ if (! link($packPointer->{'slsa_uri'}, $item_slsa)) {
+ my $msg = " linking file
$packPointer->{'slsa_uri'} to $item_slsa failed: $!";
+ $this->logMsg('E', $msg);
+ }
+ }
if ($this->{m_debug} >= 4) {
my $lnkTarget =
$packOptions->{$requestedArch}->{'newpath'};
my $msg = " linked file
$packPointer->{'localfile'}"
@@ -1185,7 +1206,7 @@
}
}
- if ($packPointer->{modularity_context}) {
+ if ($modularity_context) {
$found_modularity_package = 1;
} else {
$found_package = 1;
@@ -1616,6 +1637,7 @@
qx(cp -a $tmp/usr/lib/skelcd/CD$_/*
$this->{m_basesubdir}->{$_});
# .treeinfo for virt-installer:
qx(cp -a $tmp/usr/lib/skelcd/CD$_/.treeinfo
$this->{m_basesubdir}->{$_}) if (-f "$tmp/usr/lib/skelcd/CD$_/.treeinfo");
+ qx(cp -a $tmp/usr/lib/skelcd/CD$_/.discinfo
$this->{m_basesubdir}->{$_}) if (-f "$tmp/usr/lib/skelcd/CD$_/.discinfo");
$this->logMsg('I', "Unpack CD$_");
$packageFound = 1;
} elsif (-d "$tmp/CD$_"
@@ -1631,6 +1653,7 @@
qx(cp -a $tmp/usr/lib/skelcd/NET/*
$this->{m_basesubdir}->{$_});
# .treeinfo for virt-installer:
qx(cp -a $tmp/usr/lib/skelcd/NET/.treeinfo
$this->{m_basesubdir}->{$_}) if (-f "$tmp/usr/lib/skelcd/NET/.treeinfo");
+ qx(cp -a $tmp/usr/lib/skelcd/NET/.discinfo
$this->{m_basesubdir}->{$_}) if (-f "$tmp/usr/lib/skelcd/NET/.discinfo");
$this->logMsg('I', "Unpack NET");
$packageFound = 1;
} else {
@@ -1824,6 +1847,8 @@
$count_files++;
# skip all files without rpm suffix
next URI unless( $uri =~ /\.rpm$/);
+ my $slsa_uri = $uri;
+ $slsa_uri =~ s/\.rpm$/.slsa_provenance.json/;
if ($this->{m_debug} >= 1) {
# show progress every 30 seconds
if ($last_progress_time < time()) {
@@ -1885,6 +1910,7 @@
$package->{'arch'} = $arch;
$package->{'repo'} = $this->{m_repos}->{$r};
$package->{'localfile'} = $uri;
+ $package->{'slsa_uri'} = $slsa_uri if -e $slsa_uri;
$package->{'disturl'} = $flags{'DISTURL'}[0];
$package->{'license'} = $flags{'LICENSE'}[0];
$package->{'epoch'} = $flags{'EPOCH'}[0];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWIIsoLinux.pm
new/product-builder-1.4.12/modules/KIWIIsoLinux.pm
--- old/product-builder-1.4.6/modules/KIWIIsoLinux.pm 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWIIsoLinux.pm 2022-05-03
09:46:16.000000000 +0200
@@ -80,6 +80,7 @@
my $sort;
my $ldir;
my $tool;
+ my $tool_type;
my $check = 0;
#==========================================
# create log object if not done
@@ -102,16 +103,26 @@
my $genTool = $locator -> getExecPath('genisoimage');
if ($genTool && -x $genTool) {
$tool = $genTool;
+ $tool_type = "genisoimage";
} else {
my $mkTool = $locator -> getExecPath('mkisofs');
if ($mkTool && -x $mkTool) {
$tool = $mkTool;
+ $tool_type = "mkisofs";
} else {
$kiwi -> error ("No ISO creation tool found");
$kiwi -> failed ();
return;
}
}
+ #==========================================
+ # Hybrid mode?
+ #------------------------------------------
+ my $hybrid;
+ if ($xml) {
+ my $type = $xml -> getImageType();
+ $hybrid = $type -> getHybrid();
+ }
#=======================================
# path setup for supported archs
#---------------------------------------
@@ -128,9 +139,16 @@
$base{ix86}{loader} = "boot/i386/loader/isolinux.bin";
$base{ix86}{efi} = "boot/i386/efi";
# x86_64
- $base{x86_64}{boot} = "boot/x86_64";
- $base{x86_64}{loader}= "boot/x86_64/loader/isolinux.bin";
- $base{x86_64}{efi} = "boot/x86_64/efi";
+ if(-f "$source/isolinux/isolinux.bin") {
+ $base{x86_64}{boot} = "isolinux";
+ $base{x86_64}{loader}= "isolinux/isolinux.bin";
+ $base{x86_64}{efi} = "images/efiboot.img";
+ }
+ else {
+ $base{x86_64}{boot} = "boot/x86_64";
+ $base{x86_64}{loader}= "boot/x86_64/loader/isolinux.bin";
+ $base{x86_64}{efi} = "boot/x86_64/efi";
+ }
# ia64
$base{ia64}{boot} = "boot/ia64";
$base{ia64}{loader} = "undef";
@@ -159,7 +177,7 @@
# 1) search for legacy boot
#---------------------------------------
foreach my $arch (sort keys %base) {
- if (-d $source."/".$base{$arch}{boot}) {
+ if ($base{$arch}{boot} && -d $source."/".$base{$arch}{boot}) {
if ($arch eq "x86_64") {
$catalog[0] = "x86_64_legacy";
}
@@ -251,11 +269,14 @@
$this -> {tmpdir} = $ldir;
$this -> {catalog} = \@catalog;
$this -> {tool} = $tool;
+ $this -> {tool_type} = $tool_type;
$this -> {check} = $mediacheck;
$this -> {gdata} = $global -> getKiwiConfig();
$this -> {cmdL} = $cmdL;
+ $this -> {hybrid} = $hybrid;
$this -> {xml} = $xml;
$this -> {magicID} = '7984fc91-a43f-4e45-bf27-6d3aa08b24cf';
+ $this -> {media_type} = -f "$source/.discinfo" ? 'rh' : 'suse';
return $this;
}
@@ -281,16 +302,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $sort = $this -> createLegacySortFile ("x86_64");
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{loader};
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot -boot-load-size 4 -boot-info-table";
$para.= " -b $loader -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$this -> {params} = $para;
+
$this -> createISOLinuxConfig ($boot);
+
return $this;
}
@@ -301,19 +325,23 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $sort = $this -> createLegacySortFile ("ix86");
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{loader};
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot -boot-load-size 4 -boot-info-table";
$para.= " -b $loader -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$this -> {params} = $para;
+
$this -> createISOLinuxConfig ($boot);
+
return $this;
}
+
#==========================================
# x86_64_efi
#------------------------------------------
@@ -321,26 +349,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $magicID= $this -> {magicID};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
- my $sort = $this -> createLegacySortFile ("x86_64");
- my $src = $this -> {source};
- KIWIQX::qxx ("echo $src/boot/$arch/efi 1000001 >> $sort");
- #==========================================
- # add end-of-header marker
- #------------------------------------------
- KIWIQX::qxx ("echo $magicID > ".$this->{tmpdir}."/glump");
- KIWIQX::qxx ("echo ".$this->{tmpdir}."/glump 1000000 >> $sort") if $sort;
- $para.= " -hide glump -hide-joliet glump";
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -eltorito-alt-boot";
- $para.= " -eltorito-platform efi";
+ $para.= " -eltorito-platform efi" if $this->{tool_type} eq "mkisofs";
$para.= " -no-emul-boot";
$para.= " -boot-load-size ".$this->block_size($this->{source}."/".$loader);
- $para.= " -b $loader";
+ $para.= ($this->{tool_type} eq "mkisofs" ? " -b " : " -e ") . $loader;
$this -> {params} = $para;
+
return $this;
}
@@ -351,16 +372,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
+ my $para = $this -> {params};
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -eltorito-alt-boot";
- $para.= " -eltorito-platform efi";
+ $para.= " -eltorito-platform efi" if $this->{tool_type} eq "mkisofs";
$para.= " -no-emul-boot";
$para.= " -boot-load-size ".$this->block_size($this->{source}."/".$loader);
- $para.= " -b $loader";
+ $para.= ($this->{tool_type} eq "mkisofs" ? " -b " : " -e ") . $loader;
$this -> {params} = $para;
+
return $this;
}
@@ -371,19 +395,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
- my $sort = $this -> createLegacySortFile ("ia64");
+ my $para = $this -> {params};
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot";
$para.= " -boot-load-size ".$this->block_size($this->{source}."/".$loader);
- $para.= " -sort $sort" if $sort;
$para.= " -b $loader";
$para.= " -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
-
$this -> {params} = $para;
+
return $this;
}
@@ -394,14 +418,18 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $boot = $base{$arch}{boot};
my $ikr = $this -> createS390CDLoader($boot);
+ my $para = $this -> {params};
+
+ # s390 ISOs additionally have an x86_64 boot setup - this will trigger
hybrid mode
+
$para.= " -eltorito-alt-boot";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$para.= " -no-emul-boot";
$para.= " -b $ikr";
$this -> {params} = $para;
+
return $this;
}
@@ -412,14 +440,18 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $boot = $base{$arch}{boot};
my $ikr = $this -> createS390CDLoader($boot);
+ my $para = $this -> {params};
+
+ # s390x ISOs additionally have an x86_64 boot setup - this will trigger
hybrid mode
+
$para.= " -eltorito-alt-boot";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$para.= " -no-emul-boot";
$para.= " -b $ikr";
$this -> {params} = $para;
+
return $this;
}
@@ -430,10 +462,12 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $src = $this -> {source};
my $boot = $base{$arch}{boot};
my $volid = $this -> createVolumeID();
+ my $para = $this -> {params};
+
+ # ppc64 doesn't need an extra isohybrid call
$para.= " -chrp-boot";
$para.= " -hfs-bless $src/$boot/grub2-ieee1275";
@@ -446,18 +480,20 @@
$para.= " -part";
$para.= " -U";
$this -> {params} = $para;
+
return $this;
}
sub ppc64le_default {
my $this = shift;
my $arch = shift;
-
my %base = %{$this->{base}};
- my $para = $this -> {params};
my $src = $this -> {source};
my $boot = $base{$arch}{boot};
my $volid = $this -> createVolumeID();
+ my $para = $this -> {params};
+
+ # ppc64le doesn't need an extra isohybrid call
$para.= " -chrp-boot";
$para.= " -hfs-bless $src/$boot/grub2-ieee1275";
@@ -466,6 +502,7 @@
$para.= " -part";
$para.= " -U";
$this -> {params} = $para;
+
return $this;
}
@@ -476,26 +513,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $magicID= $this -> {magicID};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
- my $sort = $this -> createLegacySortFile ("aarch64");
- my $src = $this -> {source};
- KIWIQX::qxx ("echo $src/boot/$arch/efi 1000001 >> $sort");
- #==========================================
- # add end-of-header marker
- #------------------------------------------
- KIWIQX::qxx ("echo $magicID > ".$this->{tmpdir}."/glump");
- KIWIQX::qxx ("echo ".$this->{tmpdir}."/glump 1000000 >> $sort") if $sort;
- $para.= " -hide glump -hide-joliet glump";
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot";
# do not add -boot-load-size 1 here
- $para.= " -b $loader";
+ $para.= ($this->{tool_type} eq "mkisofs" ? " -b " : " -e ") . $loader;
$para.= " -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$this -> {params} = $para;
+
return $this;
}
@@ -506,26 +536,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $magicID= $this -> {magicID};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
- my $sort = $this -> createLegacySortFile ("armv7l");
- my $src = $this -> {source};
- KIWIQX::qxx ("echo $src/boot/$arch/efi 1000001 >> $sort");
- #==========================================
- # add end-of-header marker
- #------------------------------------------
- KIWIQX::qxx ("echo $magicID > ".$this->{tmpdir}."/glump");
- KIWIQX::qxx ("echo ".$this->{tmpdir}."/glump 1000000 >> $sort") if $sort;
- $para.= " -hide glump -hide-joliet glump";
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot";
# do not add -boot-load-size 1 here
$para.= " -b $loader";
$para.= " -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$this -> {params} = $para;
+
return $this;
}
@@ -536,25 +559,19 @@
my $this = shift;
my $arch = shift;
my %base = %{$this->{base}};
- my $para = $this -> {params};
- my $magicID= $this -> {magicID};
my $boot = $base{$arch}{boot};
my $loader= $base{$arch}{efi};
- my $sort = $this -> createLegacySortFile ("riscv64");
- my $src = $this -> {source};
- KIWIQX::qxx ("echo $src/boot/$arch/efi 1000001 >> $sort");
- #==========================================
- # add end-of-header marker
- #------------------------------------------
- KIWIQX::qxx ("echo $magicID > ".$this->{tmpdir}."/glump");
- KIWIQX::qxx ("echo ".$this->{tmpdir}."/glump 1000000 >> $sort") if $sort;
- $para.= " -sort $sort" if $sort;
+ my $para = $this -> {params};
+
+ $para.= $this -> createSortFile ($arch);
+ $para.= $this -> prepare_for_hybrid ();
$para.= " -no-emul-boot";
# do not add -boot-load-size 1 here
$para.= " -b $loader";
$para.= " -c $boot/boot.catalog";
$para.= " -hide $boot/boot.catalog -hide-joliet $boot/boot.catalog";
$this -> {params} = $para;
+
return $this;
}
@@ -585,9 +602,11 @@
}
#==========================================
-# createLegacySortFile
+# createSortFile
#------------------------------------------
-sub createLegacySortFile {
+sub createSortFile {
+ # Create sort file for mkisofs and return a command line parameter
+ # suitable for mkisofs.
my $this = shift;
my $arch = shift;
my $kiwi = $this->{kiwi};
@@ -596,30 +615,29 @@
my $sort = $this->{tmpfile};
my $ldir = $this->{tmpdir};
my $FD;
- if (! -d $src."/".$base{$arch}{boot}) {
- return;
- }
- my @list = ();
- my $wref = $this -> __generateWanted (\@list);
+
+ return "" if ! -d $src."/".$base{$arch}{boot};
+
if (! open $FD, '>', "$sort") {
$kiwi -> error ("Failed to open sort file: $!");
$kiwi -> failed ();
$this -> cleanISO();
- return;
+ return "";
}
- if ($arch ne "aarch64" && $arch ne "armv7l" && $arch ne "riscv64") {
- find ({wanted => $wref,follow => 0
},$src."/".$base{$arch}{boot}."/loader");
- }
- print $FD "$ldir/".$base{$arch}{boot}."/boot.catalog 3"."\n";
- print $FD $base{$arch}{boot}."/boot.catalog 3"."\n";
- print $FD "$src/".$base{$arch}{boot}."/boot.catalog 3"."\n";
- foreach my $file (@list) {
- print $FD "$file 1"."\n";
+
+ if ($base{$arch}{loader}) {
+ print $FD "$src/$base{$arch}{loader} 2\n";
+ (my $loader_dir = $base{$arch}{loader}) =~ s#/[^/]+$##;
+ print $FD "$src/$loader_dir 1\n";
}
- print $FD $src."/".$base{$arch}{boot}."/loader/isolinux.bin 2"."\n";
+
+ print $FD "$src/$base{$arch}{efi} 1000001\n" if $base{$arch}{efi};
+ print $FD "$src/$base{$arch}{boot}/boot.catalog 3\n";
+ print $FD "$ldir/$base{$arch}{boot}/boot.catalog 3\n";
+ print $FD "$ldir/glump 1000000\n";
close $FD;
- $this->{sortfile} = $sort;
- return $sort;
+
+ return " -sort $sort";
}
#==========================================
@@ -837,6 +855,10 @@
my $boot = shift;
my $kiwi = $this -> {kiwi};
my $src = $this -> {source};
+
+ # standard location, isolinux-config not needed
+ return $this if -f "$src/isolinux/isolinux.bin";
+
my $isox = "/usr/bin/isolinux-config";
if (! -x $isox) {
$kiwi -> error ("Can't find isolinux-config binary");
@@ -957,11 +979,11 @@
my $cmdL = $this -> {cmdL};
my $xml = $this -> {xml};
my $magicID = $this -> {magicID};
+ my $hybrid = $this -> {hybrid};
my $firmware = 'efi';
my $ldir_cnt = 0;
my %type;
my $cmdln;
- my $hybrid;
#==========================================
# Lookup firmware setup
#------------------------------------------
@@ -971,7 +993,6 @@
if ($xmlFirmWare) {
$firmware = $xmlFirmWare;
}
- $hybrid = $type -> getHybrid();
}
#==========================================
# check for pre bootloader install
@@ -1002,6 +1023,10 @@
#==========================================
# Call mkisofs first stage
#------------------------------------------
+ # log sort file
+ $kiwi -> info ("[I] Sort file $this->{tmpfile}:");
+ $kiwi -> info (" $_") for (`cat $this->{tmpfile}`);
+
if ($this -> isEmptyDir ($ldir)) {
$cmdln = "$prog $para -o $dest $src 2>&1";
} else {
@@ -1145,10 +1170,22 @@
my $dest = $this -> {dest};
my $check= $this -> {check};
my $data;
- if (defined $this->{check}) {
- $data = KIWIQX::qxx ("tagmedia --digest sha256 --check --pad 150 $dest
2>&1");
- } else {
- $data = KIWIQX::qxx ("tagmedia --digest sha256 $dest 2>&1");
+ if ($this->{media_type} eq 'rh') {
+ $data = KIWIQX::qxx ("tagmedia --digest md5 --style rh $dest 2>&1");
+ my $code = $? >> 8;
+ if ($code != 0) {
+ $kiwi -> error ("Failed to call tagmedia: $data");
+ $kiwi -> failed ();
+ return;
+ }
+ $data = KIWIQX::qxx ("tagmedia --import-signature /dev/null $dest
2>&1");
+ }
+ else {
+ if (defined $this->{check}) {
+ $data = KIWIQX::qxx ("tagmedia --digest sha256 --check --pad 150
$dest 2>&1");
+ } else {
+ $data = KIWIQX::qxx ("tagmedia --digest sha256 $dest 2>&1");
+ }
}
my $code = $? >> 8;
if ($code != 0) {
@@ -1160,6 +1197,24 @@
}
#==========================================
+# prepare_for_hybrid
+#------------------------------------------
+sub prepare_for_hybrid {
+ # Create file with magic id and return additional mkisofs options needed
+ # for hybrid mode.
+ my $this = shift;
+ my $magicID = $this -> {magicID};
+
+ if ($this->{hybrid}) {
+ KIWIQX::qxx ("echo $magicID > $this->{tmpdir}/glump");
+ return " -hide glump -hide-joliet glump";
+ }
+
+ return "";
+}
+
+
+#==========================================
# createHybrid
#------------------------------------------
sub createHybrid {
@@ -1232,7 +1287,10 @@
#==========================================
# Create partition table on iso
#------------------------------------------
- my $cmd = "$isoHybrid $offsetOpt $offset";
+ my $cmd = $isoHybrid;
+ if ($this->{media_type} eq 'suse') {
+ $cmd .= " $offsetOpt $offset";
+ }
if ($mbrid) {
$cmd.= " $idOpt $mbrid $typeOpt 0x83";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWIRepoMetaHandler.pm
new/product-builder-1.4.12/modules/KIWIRepoMetaHandler.pm
--- old/product-builder-1.4.6/modules/KIWIRepoMetaHandler.pm 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWIRepoMetaHandler.pm 2022-05-03
09:46:16.000000000 +0200
@@ -160,7 +160,7 @@
my $this = shift;
my $retval = 0;
my $file = shift;
- if ($file =~ m{^.*/[a-zA-Z_-]+$}) {
+ if ($file =~ m{^.*/[a-zA-Z0-9_-]+$}) {
$file .= ".pm";
}
if (not(defined($file) and -f $file)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWISchema.rnc
new/product-builder-1.4.12/modules/KIWISchema.rnc
--- old/product-builder-1.4.6/modules/KIWISchema.rnc 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWISchema.rnc 2022-05-03
09:46:16.000000000 +0200
@@ -1295,6 +1295,10 @@
## Specifies that the package with
## the given arch should be used in any case
attribute onlyarch { text }
+ k.repopackage.module.attribute =
+ ## Specifies that the package must
+ ## come from the given module(s)
+ attribute module { text }
k.repopackage.medium.attribute =
## Specifies that the package will be put
## to the specific medium number (CD1, DVD7, ...)
@@ -1308,6 +1312,7 @@
k.repopackage.addarch.attribute? &
k.repopackage.removearch.attribute? &
k.repopackage.onlyarch.attribute? &
+ k.repopackage.module.attribute? &
k.repopackage.source.attribute? &
k.repopackage.script.attribute? &
k.repopackage.medium.attribute?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWISchema.rng
new/product-builder-1.4.12/modules/KIWISchema.rng
--- old/product-builder-1.4.6/modules/KIWISchema.rng 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWISchema.rng 2022-05-03
09:46:16.000000000 +0200
@@ -1647,6 +1647,12 @@
the given arch should be used in any case</a:documentation>
</attribute>
</define>
+ <define name="k.repopackage.module.attribute">
+ <attribute name="module">
+ <a:documentation>Specifies that the package must
+come from the given module(s)</a:documentation>
+ </attribute>
+ </define>
<define name="k.repopackage.medium.attribute">
<attribute name="medium">
<a:documentation>Specifies that the package will be put
@@ -1679,6 +1685,9 @@
<ref name="k.repopackage.onlyarch.attribute"/>
</optional>
<optional>
+ <ref name="k.repopackage.module.attribute"/>
+ </optional>
+ <optional>
<ref name="k.repopackage.source.attribute"/>
</optional>
<optional>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/product-builder-1.4.6/modules/KIWIXML.pm
new/product-builder-1.4.12/modules/KIWIXML.pm
--- old/product-builder-1.4.6/modules/KIWIXML.pm 2021-09-20
15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWIXML.pm 2022-05-03
09:46:16.000000000 +0200
@@ -3732,6 +3732,7 @@
name => $pckgNd -> getAttribute('name'),
onlyarch => $pckgNd -> getAttribute('onlyarch'),
removearch => $pckgNd -> getAttribute('removearch'),
+ module => $pckgNd -> getAttribute('module'),
script => $pckgNd -> getAttribute('script'),
source => $pckgNd -> getAttribute('source')
);
@@ -3869,6 +3870,7 @@
name => $pkgNd -> getAttribute('name'),
onlyarch => $pkgNd -> getAttribute('onlyarch'),
removearch => $pkgNd -> getAttribute('removearch'),
+ module => $pkgNd -> getAttribute('module'),
script => $pkgNd -> getAttribute('script'),
source => $pkgNd -> getAttribute('source')
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/product-builder-1.4.6/modules/KIWIXMLProductPackageData.pm
new/product-builder-1.4.12/modules/KIWIXMLProductPackageData.pm
--- old/product-builder-1.4.6/modules/KIWIXMLProductPackageData.pm
2021-09-20 15:12:29.000000000 +0200
+++ new/product-builder-1.4.12/modules/KIWIXMLProductPackageData.pm
2022-05-03 09:46:16.000000000 +0200
@@ -49,6 +49,7 @@
medium
onlyarch
removearch
+ module
script
source
);
@@ -65,6 +66,7 @@
$this->{medium} = $init->{medium};
$this->{onlyarch} = $init->{onlyarch};
$this->{removearch} = $init->{removearch};
+ $this->{module} = $init->{module};
$this->{script} = $init->{script};
$this->{source} = $init->{source};
return $this;
@@ -129,6 +131,17 @@
}
#==========================================
+# getModule
+#------------------------------------------
+sub getModule {
+ # ...
+ # Return the module value, if any
+ # ---
+ my $this = shift;
+ return $this->{module};
+}
+
+#==========================================
# getScriptPath
#------------------------------------------
sub getScriptPath {
@@ -179,6 +192,10 @@
if ($rarch) {
$elem -> setAttribute('removearch', $rarch);
}
+ my $module = $this -> getModule();
+ if ($module) {
+ $elem -> setAttribute('module', $module);
+ }
my $script = $this -> getScriptPath();
if ($script) {
$elem -> setAttribute('script', $script);
++++++ product-builder.obsinfo ++++++
--- /var/tmp/diff_new_pack.4B5yVg/_old 2022-12-15 19:24:25.403789419 +0100
+++ /var/tmp/diff_new_pack.4B5yVg/_new 2022-12-15 19:24:25.407789442 +0100
@@ -1,6 +1,5 @@
name: product-builder
-version: 1.4.6
-mtime: 1632143549
-commit: 8fb531cf6023254d7809be93064b2d60952923b6
-
+version: 1.4.12
+mtime: 1651563976
+commit: 141ec79eef800213fc9f05145c53ba5490eeda80