Hello community, here is the log from the commit of package perl-Bootloader checked in at Fri Sep 29 18:13:14 CEST 2006. -------- --- perl-Bootloader/perl-Bootloader.changes 2006-09-04 17:03:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2006-09-29 14:22:24.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Sep 29 12:41:55 CEST 2006 - jplack@suse.de + +- new interface for FATE#300732 + +------------------------------------------------------------------- +Thu Sep 28 15:47:23 CEST 2006 - aosthof@suse.de + +- added new interface script bootloader_entry + +------------------------------------------------------------------- +Tue Sep 19 17:29:38 CEST 2006 - jplack@suse.de + +- fix man page for update-bootloader + +------------------------------------------------------------------- +Mon Sep 4 17:15:19 CEST 2006 - jplack@suse.de + +- support new options no_os_chooser and optional (#202069, #202072) + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.2.27.tar.bz2 New: ---- bootloader_entry perl-Bootloader-0.3.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.g8d2js/_old 2006-09-29 18:11:50.000000000 +0200 +++ /var/tmp/diff_new_pack.g8d2js/_new 2006-09-29 18:11:50.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.2.27) +# spec file for package perl-Bootloader (Version 0.3.1) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,8 +11,8 @@ # norootforbuild Name: perl-Bootloader -Version: 0.2.27 -Release: 7 +Version: 0.3.1 +Release: 1 Requires: perl >= %{perl_version} Requires: perl-gettext Requires: mdadm e2fsprogs @@ -22,6 +22,7 @@ Summary: Library for Configuring Boot Loaders Source: perl-Bootloader-%{version}.tar.bz2 Source1: update-bootloader +Source2: bootloader_entry BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -47,6 +48,8 @@ %perl_process_packlist mkdir -p $RPM_BUILD_ROOT/sbin install -m 755 %_sourcedir/update-bootloader $RPM_BUILD_ROOT/sbin +install -d -m 711 $RPM_BUILD_ROOT/usr/lib/bootloader +install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader %files %defattr(-, root, root) @@ -56,8 +59,17 @@ %{perl_vendorlib}/Bootloader /var/adm/perl-modules/perl-Bootloader /sbin/update-bootloader +/usr/lib/bootloader %changelog -n perl-Bootloader +* Fri Sep 29 2006 - jplack@suse.de +- new interface for FATE#300732 +* Thu Sep 28 2006 - aosthof@suse.de +- added new interface script bootloader_entry +* Tue Sep 19 2006 - jplack@suse.de +- fix man page for update-bootloader +* Mon Sep 04 2006 - jplack@suse.de +- support new options no_os_chooser and optional (#202069, #202072) * Mon Sep 04 2006 - jplack@suse.de - remove braces when parsing device.map file (#203545) * Mon Aug 07 2006 - jplack@suse.de ++++++ perl-Bootloader-0.2.27.tar.bz2 -> perl-Bootloader-0.3.1.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.27/lib/Bootloader/Core/PowerLILO.pm new/perl-Bootloader-0.3.1/lib/Bootloader/Core/PowerLILO.pm --- old/perl-Bootloader-0.2.27/lib/Bootloader/Core/PowerLILO.pm 2006-05-22 18:11:08.000000000 +0200 +++ new/perl-Bootloader-0.3.1/lib/Bootloader/Core/PowerLILO.pm 2006-09-29 14:22:24.000000000 +0200 @@ -45,7 +45,7 @@ #module interface -sub getExports() { +sub GetMetaData() { my $loader = shift; # possible global entries: @@ -159,7 +159,7 @@ activate => "bool:Change boot-device in NV-RAM:true", timeout => "int:Timeout in 1/10th seconds:50:0:600", default => "string:Default boot section:Linux", - root => "select:Default root device::" . ":" . $root_devices, + root => "selectdevice:Default root device::" . ":" . $root_devices, append => "string:Append options for kernel command line", initrd => "path:Default initrd path" }; @@ -168,7 +168,7 @@ if ( "$arch" eq "chrp" ) { # pSeries only - $go->{clone} = "select:Partition for boot loader duplication::" . ":" . $boot_partitions; + $go->{clone} = "selectdevice:Partition for boot loader duplication::" . ":" . $boot_partitions; $go->{force_fat} = "bool:Always boot from FAT partition:false"; $go->{force} = "bool:Install boot loader even on errors:false"; @@ -179,21 +179,22 @@ # only on old prep machines $go->{bootfolder} = "string:Bootfolder path"; $go->{boot_prep_custom} - = "select:PReP partition::" . $boot_partitions; + = "selectdevice:PReP partition::" . $boot_partitions; } elsif ( "$arch" eq "iseries" ) { # only on legacy iseries $go->{boot_slot} = "select:Write to boot slot:B:" . "A:B:C:D"; $go->{boot_file} = "path:Create boot image in file:/tmp/suse_boot_image"; $go->{boot_iseries_custom} - = "select:PReP partition::" . $boot_partitions; + = "selectdevice:PReP partition::" . $boot_partitions; } elsif ( "$arch" eq "pmac" ) { # only on pmac_new and pmac_old $go->{bootfolder} = "string:Bootfolder path:"; $go->{boot_pmac_custom} = "select:HFS boot partition::" . $boot_partitions; - } + $go->{no_os_chooser} = "bool:Do not use os-chooser:false"; + } $exports{"section_options"} = { type_image => "bool:Kernel section", @@ -202,6 +203,7 @@ # image_label => "string:Name of section", # implicit image_append => "string:Optional kernel command line parameter", image_initrd => "path:Initial RAM disk:/boot/initrd", + image_optional => "bool:Skip section gracefully on errors:false", }; my $so = $exports{"section_options"}; @@ -226,6 +228,7 @@ } $loader->{"exports"}=\%exports; + return \%exports; } @@ -247,7 +250,7 @@ bless ($loader); - $loader->getExports(); + $loader->GetMetaData(); $loader->l_milestone ("PowerLILO::new: Created PowerLILO instance"); return $loader; } @@ -264,7 +267,6 @@ # map<string,any> GetSettings () sub GetSettings { my $self = shift; - $self->getExports(); return $self->SUPER::GetSettings(); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.27/lib/Bootloader/Core.pm new/perl-Bootloader-0.3.1/lib/Bootloader/Core.pm --- old/perl-Bootloader-0.2.27/lib/Bootloader/Core.pm 2006-07-11 18:51:45.000000000 +0200 +++ new/perl-Bootloader-0.3.1/lib/Bootloader/Core.pm 2006-09-29 14:22:24.000000000 +0200 @@ -1516,6 +1516,12 @@ return $ok; } +# +# map<string,any> GetMetaData () +# sub GetMetaData() { +# return undef; +# } +# # boolean InitializeBootloader () # sub InitializeBootloader { # return undef; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.27/lib/Bootloader/Library.pm new/perl-Bootloader-0.3.1/lib/Bootloader/Library.pm --- old/perl-Bootloader-0.2.27/lib/Bootloader/Library.pm 2006-06-02 14:38:57.000000000 +0200 +++ new/perl-Bootloader-0.3.1/lib/Bootloader/Library.pm 2006-09-29 14:22:24.000000000 +0200 @@ -19,7 +19,7 @@ C<< $obj_ref = Bootloader::Library->new (); >> -C<< $status = Bootloader::Library->Initialize ($bootloader); >> +C<< $status = Bootloader::Library->SetLoaderType ($bootloader); >> C<< $status = Bootloader::Library->DefineMountPoints (\%mountpoints); >> @@ -49,15 +49,17 @@ C<< $status Bootloader::Library->SetSettings ($settings_ref); >> -C<< $sections_ref = Bootloader::Library->GetSections (); >> +C<< $meta_ref = Bootloader::Library->GetMetaData (); >> C<< $global_ref = Bootloader::Library->GetGlobalSettings (); >> -C<< $device_map_ref = Bootloader::Library->GetDeviceMapping (); >> +C<< $status = Bootloader::Library->SetGlobalSettings ($global_settings_ref); >> + +C<< $sections_ref = Bootloader::Library->GetSections (); >> C<< $status = Bootloader::Library->SetSections ($sections_ref); >> -C<< $status = Bootloader::Library->SetGlobalSettings ($global_settings_ref); >> +C<< $device_map_ref = Bootloader::Library->GetDeviceMapping (); >> C<< $status = Bootloader::Library->SetDeviceMapping ($device_map_ref); >> @@ -103,7 +105,7 @@ } =item -C<< $status = Bootloader::Library->Initialize ($bootloader); >> +C<< $status = Bootloader::Library->SetLoaderType($bootloader); >> Initializes the library for the particular bootloader. Takes the name of the bootloader as parameter. @@ -111,7 +113,7 @@ EXAMPLE: - my $status = Bootloader::Library->Initialize ("lilo"); + my $status = Bootloader::Library->SetLoaderType ("lilo"); if (! defined ($status)) { die "Error occurred while initalizing for LILO"; @@ -119,7 +121,7 @@ =cut -sub Initialize { +sub SetLoaderType { my $self = shift; my $bootloader = shift; @@ -149,7 +151,7 @@ { # FIXME: handle case 'none' $loader = Bootloader::Core->new ($loader); - $loader->l_error ("Bootloader::Library::Initialize: Initializing for unknown bootloader $bootloader"); + $loader->l_error ("Bootloader::Library::SetLoaderType: Initializing for unknown bootloader $bootloader"); } $self->{"loader"} = $loader; @@ -626,6 +628,51 @@ } =item +C<< $meta_ref = Bootloader::Library->GetMetaData (); >> + +Gets the meta data of the bootloader describing possible setting in the config, +its data type, default value, etc. +Returns undef on fail. + +=cut + +sub GetMetaData { + my $self = shift; + + my $meta_ref = $self->GetMetaData(); + if (defined $meta_ref) { + return $meta_ref; + } + + my $settings_ref = $self->GetSettings (); + return undef unless defined $settings_ref; + + # copy the hash and add export tags + my %metadata=(); + if (defined $settings_ref->{"exports"}) { + while ((my $key, my $value) = each ( %{$settings_ref->{"exports"}} )) + { + if (ref($value)) { + if (ref($value) eq "HASH") { + foreach my $k (keys %$value) { + $metadata{"%" . $key . "%" . $k} = $value->{$k}; + } + } + elsif (ref($value) eq "ARRAY") { + foreach my $i (0 .. $#$value) { + $metadata{"#" . $key . "#" . $i} = $value->[$i]; + } + } + } + else { + $metadata{$key} = $value; + } + } + } + return \%metadata; +} + +=item C<< $global_ref = Bootloader::Library->GetGlobalSettings (); >> Gets the global settings of the bootloader. See the example map above TODO @@ -652,32 +699,9 @@ return undef; } - # copy the hash and add export tags + # copy the hash and return the ref to copy my %globals=%{$settings_ref->{"global"}|| {}}; - if (defined $settings_ref->{"exports"}) { - # $globals{"__exports"} = %{$settings_ref->{"exports"}}; - my @exports; - - while ((my $key, my $value) = each ( %{$settings_ref->{"exports"}} )) - { - if (ref($value)) { - if (ref($value) eq "HASH") { - foreach my $k (keys %$value) { - $globals{"__exports__%" . $key . "%" . $k} = $value->{$k}; - } - } - elsif (ref($value) eq "ARRAY") { - foreach my $i (0 .. $#$value) { - $globals{"__exports__#" . $key . "#" . $i} = $value->[$i]; - } - } - } - else { - $globals{"__exports__" . $key} = $value; - } - } - } return \%globals; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.2.27/lib/Bootloader/Tools.pm new/perl-Bootloader-0.3.1/lib/Bootloader/Tools.pm --- old/perl-Bootloader-0.2.27/lib/Bootloader/Tools.pm 2006-08-01 13:57:13.000000000 +0200 +++ new/perl-Bootloader-0.3.1/lib/Bootloader/Tools.pm 2006-09-29 14:22:24.000000000 +0200 @@ -288,7 +288,7 @@ my $part = ReadPartitions (); my $md = ReadRAID1Arrays (); - $lib_ref->Initialize (GetBootloader ()); + $lib_ref->SetLoaderType (GetBootloader ()); $lib_ref->DefineMountPoints ($mp); $lib_ref->DefinePartitions ($part); $lib_ref->DefineMDArrays ($md); ++++++ update-bootloader ++++++ --- perl-Bootloader/update-bootloader 2006-06-12 17:19:01.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Bootloader/update-bootloader 2006-09-19 17:32:10.000000000 +0200 @@ -60,6 +60,10 @@ specify path to kernel image +=item B<--initrd> F<file> + +specify path to initrd file + =item B<--xen> specify that you what to add a xen and not a regular image section ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de