[Fai-commit] r6300 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Thu Mar 10 00:35:45 UTC 2011


Author: mt
Date: 2011-03-10 00:35:44 +0000 (Thu, 10 Mar 2011)
New Revision: 6300

Modified:
   branches/experimental/patches/setup-storage_disklist-LOGDIR-defaults
   branches/experimental/patches/setup-storage_extended-is-not-last
   branches/experimental/patches/setup-storage_gpt-bios-fix
   branches/experimental/patches/setup-storage_hardcode-63-sectors
   branches/experimental/patches/setup-storage_no-cylinder-boundaries
   branches/experimental/patches/setup-storage_user-100-percent
Log:
- fixed bogus double-space-reservation for MBR probably introduced by some
  quilt-patch-merging
- added check for disk-info being in PATH if used


Modified: branches/experimental/patches/setup-storage_disklist-LOGDIR-defaults
===================================================================
--- branches/experimental/patches/setup-storage_disklist-LOGDIR-defaults	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_disklist-LOGDIR-defaults	2011-03-10 00:35:44 UTC (rev 6300)
@@ -29,7 +29,7 @@
  # include all subparts, which are part of the FAI perl package
  use lib "/usr/share/fai/setup-storage/";
  use Init;
-@@ -97,10 +83,26 @@
+@@ -97,10 +83,31 @@
  # enable debug mode, if requested using -d
  $opt_d and $FAI::debug = 1;
  
@@ -51,8 +51,13 @@
 +}
 +
 +# $disklist may be provided by the environment
-+ at FAI::disks = split( /\n/, defined ($ENV{disklist}) ? $ENV{disklist} :
-+  `disk-info | sort` );
++my $disklist = $ENV{disklist};
++if (! defined($disklist)) {
++  &FAI::in_path("disk-info") or die "disk-info not found in PATH\n";
++  $disklist = `disk-info | sort`;
++}
++
++ at FAI::disks = split( /\n/, $disklist);
 +if ($FAI::debug) {
 +  print "disklist: ";
 +  print "$_\n" foreach(@FAI::disks);
@@ -60,7 +65,7 @@
  
  # the config source file
  my $config_file = undef;
-@@ -211,23 +213,23 @@
+@@ -211,23 +218,23 @@
  # print fstab
  $FAI::debug and print "$_\n" foreach (@fstab);
  
@@ -90,7 +95,7 @@
    print DISK_VAR "$_=\${$_:-$FAI::disk_var{$_}}\n" foreach (keys %FAI::disk_var);
    close DISK_VAR;
  }
-@@ -235,10 +237,10 @@
+@@ -235,10 +242,10 @@
  # print crypttab
  $FAI::debug and print "$_\n" foreach (@FAI::crypttab);
  

Modified: branches/experimental/patches/setup-storage_extended-is-not-last
===================================================================
--- branches/experimental/patches/setup-storage_extended-is-not-last	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_extended-is-not-last	2011-03-10 00:35:44 UTC (rev 6300)
@@ -4,8 +4,8 @@
 		last primary partition.
 Index: trunk/lib/setup-storage/Sizes.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm	2011-02-11 11:27:02.684342413 +0100
-+++ trunk/lib/setup-storage/Sizes.pm	2011-02-11 11:27:11.688342830 +0100
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm	
 @@ -362,15 +362,9 @@
      ($part->{size}->{extended} == $curr_part->{is_extended})
        or die "Preserved partition $part_dev_name can't change extended/normal setting\n";

Modified: branches/experimental/patches/setup-storage_gpt-bios-fix
===================================================================
--- branches/experimental/patches/setup-storage_gpt-bios-fix	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_gpt-bios-fix	2011-03-10 00:35:44 UTC (rev 6300)
@@ -4,8 +4,8 @@
 		first one.
 Index: trunk/lib/setup-storage/Parser.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm	2011-02-11 11:27:19.048345780 +0100
-+++ trunk/lib/setup-storage/Parser.pm	2011-02-11 11:27:21.832346051 +0100
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm	
 @@ -615,6 +615,20 @@
            # supported by parted could be allowed, but others are not implemented
            # yet
@@ -29,8 +29,8 @@
          {
 Index: trunk/lib/setup-storage/Sizes.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm	2011-02-11 11:27:11.688342830 +0100
-+++ trunk/lib/setup-storage/Sizes.pm	2011-02-11 11:27:21.832346051 +0100
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm	
 @@ -682,19 +682,6 @@
  
        # the space required by the GPTs

Modified: branches/experimental/patches/setup-storage_hardcode-63-sectors
===================================================================
--- branches/experimental/patches/setup-storage_hardcode-63-sectors	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_hardcode-63-sectors	2011-03-10 00:35:44 UTC (rev 6300)
@@ -5,9 +5,9 @@
 		gap. Thanks Mathieu Alorent for extensive testing.
 Index: trunk/lib/setup-storage/Sizes.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm	2011-02-11 11:27:26.008342021 +0100
-+++ trunk/lib/setup-storage/Sizes.pm	2011-02-11 11:27:36.676344640 +0100
-@@ -650,9 +650,9 @@
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm	
+@@ -650,15 +650,11 @@
      my $next_start = 0;
  
      if ($FAI::configs{$config}{disklabel} eq "msdos") {
@@ -19,4 +19,10 @@
 +      $next_start = 63 * $current_disk->{sector_size};
        $min_req_total_space += $next_start;
  
-       # the MBR requires space, too
+-      # the MBR requires space, too
+-      $min_req_total_space += $current_disk->{bios_sectors_per_track} *
+-        $current_disk->{sector_size};
+-
+     } elsif ($FAI::configs{$config}{disklabel} eq "gpt") {
+       # on GPT-EFI disk labels the first 34 and last 33 sectors must be left alone
+       $next_start = 34 * $current_disk->{sector_size};

Modified: branches/experimental/patches/setup-storage_no-cylinder-boundaries
===================================================================
--- branches/experimental/patches/setup-storage_no-cylinder-boundaries	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_no-cylinder-boundaries	2011-03-10 00:35:44 UTC (rev 6300)
@@ -14,8 +14,8 @@
 	* setup-storage.8: Document new align-at option.
 Index: trunk/lib/setup-storage/Sizes.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm	2011-02-11 11:25:13.936859044 +0100
-+++ trunk/lib/setup-storage/Sizes.pm	2011-02-11 11:25:53.624346579 +0100
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm	
 @@ -436,8 +436,9 @@
  #
  # @param $part_id Partition id within $config
@@ -88,9 +88,9 @@
 +    my $block_size = $current_disk->{sector_size};
 +    # align to cylinder boundary for msdos disklabels, for backward compatibility
 +    if ($FAI::configs{$config}{disklabel} eq "msdos") {
-+	$block_size = $current_disk->{sector_size} *
-+	    $current_disk->{bios_sectors_per_track} *
-+	    $current_disk->{bios_heads};
++      $block_size = $current_disk->{sector_size} *
++        $current_disk->{bios_sectors_per_track} *
++        $current_disk->{bios_heads};
 +    }
 +    # but user-specified alignment wins no matter what
 +    defined ($FAI::configs{$config}{align_at}) and
@@ -102,7 +102,7 @@
      # at various points the following code highly depends on the desired disk label!
      # initialise variables
      # the id of the extended partition to be created, if required
-@@ -668,13 +674,12 @@
+@@ -668,13 +675,12 @@
        $min_req_total_space += (34 + 33) * $current_disk->{sector_size};
  
      } elsif ($FAI::configs{$config}{disklabel} eq "gpt-bios") {
@@ -121,7 +121,7 @@
  
        # apparently parted insists in having some space left at the end too
        # modify the disk to claim the space for the second partition table
-@@ -741,7 +746,7 @@
+@@ -741,7 +747,7 @@
          shift @worklist;
        } else {
          ($next_start, $min_req_total_space) = &FAI::do_partition_real($part_id, 
@@ -132,8 +132,8 @@
          ($part->{size}->{eff_size} > (&FAI::convert_unit("2TiB") * 1024.0 *
 Index: trunk/lib/setup-storage/Parser.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm	2011-02-11 11:25:13.924842314 +0100
-+++ trunk/lib/setup-storage/Parser.pm	2011-02-11 11:25:23.180842395 +0100
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm	
 @@ -590,6 +590,10 @@
          {
            $FAI::configs{$FAI::device}{partitions}{$_}{size}{always_format} = 1 foreach (split(",", $1));
@@ -174,8 +174,8 @@
  
 Index: trunk/man/setup-storage.8
 ===================================================================
---- trunk.orig/man/setup-storage.8	2011-02-11 11:25:13.916862776 +0100
-+++ trunk/man/setup-storage.8	2011-02-11 11:25:23.180842395 +0100
+--- trunk.orig/man/setup-storage.8
++++ trunk/man/setup-storage.8	
 @@ -284,6 +284,20 @@
  .br
             */

Modified: branches/experimental/patches/setup-storage_user-100-percent
===================================================================
--- branches/experimental/patches/setup-storage_user-100-percent	2011-02-22 15:06:52 UTC (rev 6299)
+++ branches/experimental/patches/setup-storage_user-100-percent	2011-03-10 00:35:44 UTC (rev 6300)
@@ -5,8 +5,8 @@
 		user).
 Index: trunk/lib/setup-storage/Sizes.pm
 ===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm	2011-02-11 11:27:21.832346051 +0100
-+++ trunk/lib/setup-storage/Sizes.pm	2011-02-11 11:27:26.008342021 +0100
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm	
 @@ -296,13 +296,14 @@
  # @param $current_disk Current config of this disk
  # @param $next_start Start of the next partition




More information about the Fai-commit mailing list