Hello community, here is the log from the commit of package mksusecd for openSUSE:Factory checked in at 2017-04-12 17:37:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mksusecd (Old) and /work/SRC/openSUSE:Factory/.mksusecd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mksusecd" Wed Apr 12 17:37:37 2017 rev:35 rq:487326 version:1.50 Changes: -------- --- /work/SRC/openSUSE:Factory/mksusecd/mksusecd.changes 2017-04-07 13:55:58.484865701 +0200 +++ /work/SRC/openSUSE:Factory/.mksusecd.new/mksusecd.changes 2017-04-12 18:14:58.580476963 +0200 @@ -0,0 +1,9 @@ +-------------------------------------------------------------------- +Tue Apr 11 10:49:14 UTC 2017 - wfe...@opensuse.org + +- distinguish between repomd/classical repo types and allow to + specify the default repo location (fate#322983) +- merge gh#openSUSE/mksusecd#21 +- fix typo in help text +- 1.50 + Old: ---- mksusecd-1.49.tar.xz New: ---- mksusecd-1.50.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mksusecd.spec ++++++ --- /var/tmp/diff_new_pack.J7nVDl/_old 2017-04-12 18:14:59.124400050 +0200 +++ /var/tmp/diff_new_pack.J7nVDl/_new 2017-04-12 18:14:59.124400050 +0200 @@ -18,7 +18,7 @@ Name: mksusecd -Version: 1.49 +Version: 1.50 Release: 0 Summary: Create SUSE Linux installation ISOs License: GPL-3.0+ ++++++ mksusecd-1.49.tar.xz -> mksusecd-1.50.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.49/VERSION new/mksusecd-1.50/VERSION --- old/mksusecd-1.49/VERSION 2017-04-05 16:57:14.000000000 +0200 +++ new/mksusecd-1.50/VERSION 2017-04-11 12:49:14.000000000 +0200 @@ -1 +1 @@ -1.49 +1.50 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.49/changelog new/mksusecd-1.50/changelog --- old/mksusecd-1.49/changelog 2017-04-05 16:57:14.000000000 +0200 +++ new/mksusecd-1.50/changelog 2017-04-11 12:49:14.000000000 +0200 @@ -1,3 +1,7 @@ +2017-04-11: 1.50 + - fix typo in help text + - distinguish between repomd/classical repo types and allow to specify the default repo location + 2017-04-05: 1.49 - add support for disk images with FAT file system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.49/mksusecd new/mksusecd-1.50/mksusecd --- old/mksusecd-1.49/mksusecd 2017-04-05 16:57:14.000000000 +0200 +++ new/mksusecd-1.50/mksusecd 2017-04-11 12:49:14.000000000 +0200 @@ -199,6 +199,7 @@ sub prepare_addon; sub check_mksquashfs_comp; sub eval_size; +sub add_linuxrc_option; my %config; my $sudo; @@ -240,6 +241,9 @@ my $opt_addon_prio = 60; my $opt_rebuild_initrd; my $opt_size; +my $opt_net; +my $opt_instsys; +my $opt_defaultrepo; GetOptions( @@ -280,6 +284,9 @@ 'micro' => sub { $opt_type = 'micro' }, 'nano' => sub { $opt_type = 'nano' }, 'pico' => sub { $opt_type = 'pico' }, + 'net=s' => \$opt_net, + 'instsys' => \$opt_instsys, + 'defaultrepo' => \$opt_defaultrepo, 'volume=s' => \$opt_volume, 'vendor=s' => \$opt_vendor, 'preparer=s' => \$opt_preparer, @@ -365,6 +372,8 @@ my $mksquashfs_has_comp; my $image_size; my $syslinux_config; +my $linuxrc_options; +my $has_content; my $progress_start = 0; my $progress_end = 100; @@ -430,6 +439,34 @@ build_filelist \@sources; $boot = analyze_boot; get_initrd_format; + + # assume repomd layout if 'content' file is missing + $has_content = 1 if fname "content"; + if(!$has_content) { + print "assuming repo-md sources\n"; + if(!$opt_instsys) { + my $x = get_kernel_initrd; + die "oops: no initrd?\n" unless $x; + if($x->{initrd} =~ m#(boot/[^/]+)/#) { + $opt_instsys = "disk:/$1/root"; + } + } + + exclude_files [ "README", "net" ]; + } + + if($opt_instsys) { + add_linuxrc_option "InstSys", $opt_instsys; + } + + if($opt_net && !$opt_defaultrepo) { + $opt_defaultrepo = "cd:/,hd:/,$opt_net"; + } + + if($opt_defaultrepo) { + add_linuxrc_option "DefaultRepo", $opt_defaultrepo; + } + if($opt_sign && ( # we are going to change '/content' in one way or another @opt_initrds || @opt_kernel_rpms || $opt_boot_options || $opt_new_boot_entry || update_content) @@ -615,6 +652,12 @@ --nano Create an ISO with just enough files to test the boot process. --pico Even less than --nano. Keep just the bootloader. + --net URL Use URL as default network repository url. + See Repository notes below. + --instsys URL Load the installation system from the specified URL. + See Repository notes below. + --defaultrepo URL_LIST List of comma (',') separated URLs. The installer will try each URL + in turn for an installation repository. --volume Set ISO volume id. --vendor Set ISO publisher id. --preparer Set ISO data preparer id. @@ -680,6 +723,35 @@ default installation repositories (99) and the repositories created by driver updates (50). +Repository notes: + + The installer supports two types of repositories: + (a) the 'classical' variant and + (b) a repo-md repository. + + (a) has a 'content' file at the repo location and package meta data + in a sub-directory 'suse/setup/descr', while + (b) does not require a 'content' file and has package meta data + in a 'suse/repodata' sub-directory. + + (a) contains the to-be-installed packages together with the installation + system (the installer itself, in a 'boot/<ARCH>' sub-directory), while + (b) contains just the to-be-installed packages. + + This means that for (a) the installer can just be loaded from the repository, + while for (b) the installer must be loaded from somewhere else. + mksusecd normally assumes that it can be loaded from a local disk or dvd. + But you can override this using the --instsys option. + Please look at the linuxrc documentation at https://en.opensuse.org/SDB:Linuxrc + for details before using this option. + + The installer normally uses an internal list of repository locations that are + tried in turn. You can change it using the --defaultrepo option. For example, + --defaultrepo=cd:/,http://foo/bar means to check the local dvd drive first and + then try via network at http://foo/bar. + + The --net option is just a short hand for --defaultrepo=cd:/,hd:/,<NET_URL>. + Configuration file: \$HOME/.mksusecdrc @@ -2571,8 +2643,8 @@ { my $changed = 0; - # don't modify content if we're not going to re-sign it - return $changed if !$opt_sign; + # don't modify content if it doesn't exist or we're not going to re-sign it + return $changed if !$has_content || !$opt_sign; my $content_file = fname "content"; @@ -3569,3 +3641,41 @@ return $size; } + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# add_linuxrc_option(key, value) +# +# Add linxurc config option. +# - key: option name +# - value: option value +# +# Options are stored in /etc/linuxrc.d/60_mksusecd in the initrd. +# +sub add_linuxrc_option +{ + my ($key, $value) = @_; + + my $linuxrc_cfg = "etc/linuxrc.d/60_mksusecd"; + + unpack_orig_initrd if !$orig_initrd; + + if(!$linuxrc_options) { + $linuxrc_options = $tmp->dir(); + push @opt_initrds, $linuxrc_options; + + mkdir "$linuxrc_options/etc", 0755; + mkdir "$linuxrc_options/etc/linuxrc.d", 0755; + + if($orig_initrd && -f "$orig_initrd/$linuxrc_cfg") { + system "cp $orig_initrd/$linuxrc_cfg $linuxrc_options/$linuxrc_cfg"; + } + } + + if(open my $f, ">>$linuxrc_options/$linuxrc_cfg") { + print $f "$key:\t\"$value\"\n"; + close $f; + } + + print "added linuxrc option $key=\"$value\"\n" if $opt_verbose >= 1; +} +