diff options
Diffstat (limited to 'lib/MGA')
| -rw-r--r-- | lib/MGA/DrakISO/BuildISO.pm | 5 | ||||
| -rw-r--r-- | lib/MGA/DrakISO/BuildMedia.pm | 2 | ||||
| -rw-r--r-- | lib/MGA/DrakISO/BuildRoot.pm | 20 |
3 files changed, 16 insertions, 11 deletions
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm index eb89965..5040f29 100644 --- a/lib/MGA/DrakISO/BuildISO.pm +++ b/lib/MGA/DrakISO/BuildISO.pm @@ -1,6 +1,6 @@ # Copyright (C) 2005 Mandriva # Olivier Blin <oblin@mandriva.com> -# Copyright (C) 2017-2018 Mageia +# Copyright (C) 2017-2025 Mageia # Martin Whitaker <mageia@martin-whitaker.me.uk> # # This program is free software; you can redistribute it and/or modify @@ -97,6 +97,8 @@ sub build_iso_image { my $iso_name = $build->get_name . '.iso'; + my $iso_level = $build->{media}{iso_level} || '3'; + my $iso_part_start = $build->{media}{iso_part_start} || 0; $iso_part_start == 0 || $iso_part_start == 1 or die "ERROR: unsupported start sector for ISO protective partition\n"; @@ -114,6 +116,7 @@ sub build_iso_image { run_('xorrisofs', if_($::verbose < 2, '-quiet'), '-pad', '-l', '-R', '-J', + '-iso-level', $iso_level, '-publisher', $build->{settings}{vendor}, '-preparer', 'drakiso', '-sysid', 'Linux', diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm index 8d589b4..f59c1de 100644 --- a/lib/MGA/DrakISO/BuildMedia.pm +++ b/lib/MGA/DrakISO/BuildMedia.pm @@ -481,7 +481,7 @@ sub build_installer_media { copy_or_link($src_path, $dst_path); member($name, @{$build->{biarch_packages}}) or next; - my $xarch = $arch eq 'x86_64' ? 'i586' : 'x86_64'; + my $xarch = $build->{settings}{arch2}; # Here we take a shortcut, and assume the identical package exists # for the other arch. $src_path =~ s/$arch/$xarch/g; diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm index 995b419..dd978d4 100644 --- a/lib/MGA/DrakISO/BuildRoot.pm +++ b/lib/MGA/DrakISO/BuildRoot.pm @@ -76,7 +76,7 @@ sub install_live_system { run_as_root('rm', '-rf', $live_root); } mkdir_p($live_root); - run_as_root('chown', 'root.root', $live_root); + run_as_root('chown', 'root:root', $live_root); my $Xserver_pid; my $error_message; @@ -114,7 +114,8 @@ sub install_live_system { symlinkf('media/' . $arch, $chroot . '/tmp/image'); # Because the installer uses the above symlink, relative paths in # the urpmi configuration don't work unless we add this extra link. - symlinkf('media/i586', $chroot . '/tmp/i586') if $arch eq 'x86_64'; + my $xarch = $build->{settings}{arch2}; + symlinkf("media/$xarch", $chroot . "/tmp/$xarch") if $xarch; # If the user has provided an auto-install configuration file, use it, # otherwise construct one. @@ -378,17 +379,18 @@ sub build_local_repo { print "Building local repository\n" if $::verbose > 1; - my $root = $build->get_live_root; - my $arch = $build->{settings}{arch}; + my $root = $build->get_live_root; + my $arch = $build->{settings}{arch}; + my $xarch = $build->{settings}{arch2}; # We aren't going to run in the chroot, so we need to adjust the paths # in the urpmi configuration. - my $base_repository = $build->{settings}{repository}; - my $arch_repository = $base_repository . '/' . $arch; - my $i586_repository = $base_repository . '/' . 'i586'; + my $base_repository = $build->{settings}{repository}; + my $arch_repository = $base_repository . '/' . $arch; + my $xarch_repository = $base_repository . '/' . $xarch; run_as_root('sed', '-i', "s!/tmp/image!$arch_repository!", glob($root . '/etc/urpmi/mediacfg.d/*/url')); run_as_root('sed', '-i', "s!/tmp/image!$arch_repository!", $root . '/etc/urpmi/urpmi.cfg'); - run_as_root('sed', '-i', "s!/tmp/i586!$i586_repository!", $root . '/etc/urpmi/urpmi.cfg') if $arch eq 'x86_64'; + run_as_root('sed', '-i', "s!/tmp/$xarch!$xarch_repository!", $root . '/etc/urpmi/urpmi.cfg') if $xarch; # When we pass a chroot directory to urpmi, it wants a /dev/null in # that root. @@ -451,7 +453,7 @@ sub build_local_repo { $classes{$class} = 1; member($pkg->name, @{$build->{system}{local_repo_biarch_packages}}) or next; - my $xarch = $arch eq 'x86_64' ? 'i586' : 'x86_64'; + my $xarch = $build->{settings}{arch2}; # Here we take a shortcut, and assume the identical package exists # for the other arch. $src_path =~ s/$arch/$xarch/g; |
