[Fai-commit] r5194 - people/michael/experimental/patches

mt at alioth.debian.org mt at alioth.debian.org
Wed Oct 15 06:19:41 UTC 2008


Author: mt
Date: 2008-10-15 06:19:40 +0000 (Wed, 15 Oct 2008)
New Revision: 5194

Removed:
   people/michael/experimental/patches/setup-storage_command-dependencies
   people/michael/experimental/patches/setup-storage_parted-error-msgs
   people/michael/experimental/patches/setup-storage_preserve-bugfixes
Modified:
   people/michael/experimental/patches/series
   people/michael/experimental/patches/setup-storage_disk-id-support
   people/michael/experimental/patches/setup-storage_large-partition-check
Log:
- removed patches integrated in trunk
- updated other patches as necessary


Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/series	2008-10-15 06:19:40 UTC (rev 5194)
@@ -1,7 +1,4 @@
-setup-storage_preserve-bugfixes
 setup-storage_large-partition-check
-setup-storage_parted-error-msgs
-setup-storage_command-dependencies
 setup-storage_opt-d
 setup-storage_crypto-bugfixes
 setup-storage_initramfs-lvm-raid

Deleted: people/michael/experimental/patches/setup-storage_command-dependencies
===================================================================
--- people/michael/experimental/patches/setup-storage_command-dependencies	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/setup-storage_command-dependencies	2008-10-15 06:19:40 UTC (rev 5194)
@@ -1,159 +0,0 @@
-2008-09-30  Michael Tautschnig  <mt at debian.org>
-
-	* bin/setup-storage: extended debug output of sorted commands
-	* lib/setup-storage/Commands.pm: Properly sort commands, fixed dependency
-		errors, use start_byte for new config instead of begin_byte
-Index: trunk/bin/setup-storage
-===================================================================
---- trunk.orig/bin/setup-storage
-+++ trunk/bin/setup-storage	
-@@ -163,7 +163,14 @@
- 
- # run all commands
- # debugging only: print the command script
--$FAI::debug and print "$_:" . $FAI::commands{$_}{cmd} . "\n" foreach (&numsort(keys %FAI::commands));
-+if ($FAI::debug) {
-+  foreach (&numsort(keys %FAI::commands)) {
-+    defined($FAI::commands{$_}{cmd}) or &FAI::internal_error("Missing command entry for $_");
-+    print "$_:" . $FAI::commands{$_}{cmd} . "\n";
-+    defined($FAI::commands{$_}{pre}) and print "\tpre: " . $FAI::commands{$_}{pre} . "\n";
-+    defined($FAI::commands{$_}{post}) and print "\tpost: " . $FAI::commands{$_}{post} . "\n";
-+  }
-+}
- 
- # run the commands (if $FAI::no_dry_run is set)
- &FAI::execute_command($FAI::commands{$_}{cmd}) foreach (&numsort(keys %FAI::commands));
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm	
-@@ -291,9 +291,10 @@
-     &FAI::push_command( "pvcreate $_", "pv_sigs_removed,exist_$_",
-       "pv_done_$_" ) foreach (@devices);
-     # create the volume group
--    my $pre_dev = join(",pv_done_", @devices);
-+    my $pre_dev = "";
-+    $pre_dev .= ",pv_done_$_" foreach (@devices);
-     $pre_dev =~ s/^,//;
--    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), "$pre_dev",
-+    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), "exist_$pre_dev",
-       "vg_created_$vg" );
-     # we are done
-     return;
-@@ -315,7 +316,8 @@
-   &FAI::push_command( "pvcreate $_", "exist_$_", "pv_done_$_" ) foreach (@new_devices);
- 
-   # extend the volume group by the new devices (includes the current ones)
--  my $pre_dev = join(",pv_done_", @new_devices);
-+  my $pre_dev = "";
-+  $pre_dev .= ",pv_done_$_" foreach (@new_devices);
-   $pre_dev =~ s/^,//;
-   &FAI::push_command( "vgextend $vg " . join (" ", @new_devices), "$pre_dev",
-     "vg_extended_$vg" );
-@@ -329,7 +331,8 @@
- 
-   # run vgreduce to get them removed
-   if (scalar (keys %rm_devs)) {
--    $pre_dev = join(",pv_done_", keys %rm_devs);
-+    $pre_dev = "";
-+    $pre_dev .= ",pv_done_$_" foreach (keys %rm_devs);
-     &FAI::push_command( "vgreduce $vg " . join (" ", keys %rm_devs),
-       "vg_extended_$vg$pre_dev", "vg_created_$vg" );
-   } else {
-@@ -436,7 +439,14 @@
-     # set proper partition types for LVM
-     &FAI::set_partition_type_on_phys_dev($_, "lvm")
-       foreach (keys %{ $FAI::configs{$config}{devices} });
--    my $type_pre = join(",type_lvm_", keys %{ $FAI::configs{$config}{devices} });
-+    my $type_pre = "";
-+    foreach my $d (keys %{ $FAI::configs{$config}{devices} }) {
-+      if ((&FAI::phys_dev($d))[0]) {
-+        $type_pre .= ",type_lvm_$d"
-+      } else {
-+        $type_pre .= ",exist_$d"
-+      }
-+    }
-     $type_pre =~ s/^,//;
-     # wait for udev to set up all devices
-     &FAI::push_command( "udevsettle --timeout=10", "$type_pre",
-@@ -622,15 +632,14 @@
-     $FAI::current_config{$disk}{partitions}{$mapped_id}{new_id} = $part_nr;
- 
-     my $post = "run_udev_" . &FAI::make_device_name($disk, $part_nr);
--    $post = "rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
-+    $post .= ",rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
-       $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
-     # build a parted command to create the partition
-     &FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B ${end}B",
-       "cleared1_$disk", $post );
--    &FAI::push_command( "udevsettle --timeout=10", "run_udev_" . 
-+    &FAI::push_command( "udevsettle --timeout=10", "run_udev_" .
-       &FAI::make_device_name($disk, $part_nr), "exist_" .
--      &FAI::make_device_name($disk, $part_nr) ) if 
--      $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
-+      &FAI::make_device_name($disk, $part_nr) );
-   }
- }
- 
-@@ -693,7 +702,7 @@
-       # get the intermediate partition id
-       my $p_other = $FAI::current_config{$disk}{partitions}{$mapped_id_other}{new_id};
-       # check for overlap
--      next if($part->{begin_byte} >
-+      next if($part->{start_byte} >
-         $FAI::current_config{$disk}{partitions}{$mapped_id_other}{end_byte});
-       next if($part->{end_byte} <
-         $FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte});
-@@ -701,7 +710,7 @@
-       # special care, even though this does not catch all cases (sometimes it
-       # will fail nevertheless
-       if ($part->{size}->{extended} && $part_other > 4) {
--        if($part->{begin_byte} >
-+        if($part->{start_byte} >
-           $FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte}) {
-           $deps .= ",resized_" . &FAI::make_device_name($disk, $p_other);
-         }
-@@ -711,7 +720,7 @@
-         }
-       }
-       elsif ($part_id > 4 && $part_other_ref->{size}->{extended}) {
--        if($part->{begin_byte} <
-+        if($part->{start_byte} <
-           $FAI::current_config{$disk}{partitions}{$mapped_id_other}{begin_byte}) {
-           $deps .= ",resized_" . &FAI::make_device_name($disk, $p_other);
-         }
-@@ -753,7 +762,7 @@
-         &FAI::make_device_name($disk, $p) );
-     } else {
-       &FAI::push_command( "parted -s $disk resize $p ${start}B ${end}B",
--        "rebuilt_" . &FAI::make_device_name($disk, $p), "resized_" .
-+        "rebuilt_" . &FAI::make_device_name($disk, $p) . $deps, "resized_" .
-         &FAI::make_device_name($disk, $p) );
-     }
- 
-@@ -911,10 +920,13 @@
- 
-   while ($i < $FAI::n_c_i) {
-     my $all_matched = 1;
--    foreach (split(/,/, $FAI::commands{$i}{pre})) {
--      next if scalar(grep(m{^$_$}, @pre_deps));
--      $all_matched = 0;
--      last;
-+    if (defined($FAI::commands{$i}{pre})) {
-+      foreach (split(/,/, $FAI::commands{$i}{pre})) {
-+        my $cur = $_;
-+        next if scalar(grep(m{^$cur$}, @pre_deps));
-+        $all_matched = 0;
-+        last;
-+      }
-     }
-     if ($all_matched) {
-       defined($FAI::commands{$i}{post}) and push @pre_deps, split(/,/, $FAI::commands{$i}{post});
-@@ -932,6 +944,7 @@
-     &FAI::push_command( $FAI::commands{$i}{cmd}, $FAI::commands{$i}{pre},
-       $FAI::commands{$i}{post} );
-     delete $FAI::commands{$i};
-+    $i++;
-   }
- }
- 

Modified: people/michael/experimental/patches/setup-storage_disk-id-support
===================================================================
--- people/michael/experimental/patches/setup-storage_disk-id-support	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/setup-storage_disk-id-support	2008-10-15 06:19:40 UTC (rev 5194)
@@ -17,7 +17,7 @@
  
    # prepend PHY_
    $FAI::device = "PHY_$disk";
-@@ -605,6 +609,8 @@
+@@ -606,6 +610,8 @@
                  $dev = "/dev/$dev";
                }
              }
@@ -26,7 +26,7 @@
              # options are only valid for RAID
              defined ($2) and ($FAI::device ne "RAID") and die "Option $2 invalid in a non-RAID context\n";
              if ($FAI::device eq "RAID") {
-@@ -615,6 +621,13 @@
+@@ -616,6 +622,13 @@
                  ($2 =~ /spare/) and $spare = 1;
                  ($2 =~ /missing/) and $missing = 1;
                }
@@ -40,7 +40,7 @@
                # each device may only appear once
                defined ($FAI::partition_pointer->{devices}->{$dev}) and 
                  die "$dev is already part of the RAID volume\n";
-@@ -624,6 +637,8 @@
+@@ -625,6 +638,8 @@
                  "missing" => $missing
                };
              } else {

Modified: people/michael/experimental/patches/setup-storage_large-partition-check
===================================================================
--- people/michael/experimental/patches/setup-storage_large-partition-check	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/setup-storage_large-partition-check	2008-10-15 06:19:40 UTC (rev 5194)
@@ -6,7 +6,7 @@
 ===================================================================
 --- trunk.orig/lib/setup-storage/Sizes.pm
 +++ trunk/lib/setup-storage/Sizes.pm	
-@@ -668,6 +668,10 @@
+@@ -680,6 +680,10 @@
          ($next_start, $min_req_total_space) = &FAI::do_partition_real($part_id, 
            $config, $current_disk, $next_start, $min_req_total_space, \@worklist);
  

Deleted: people/michael/experimental/patches/setup-storage_parted-error-msgs
===================================================================
--- people/michael/experimental/patches/setup-storage_parted-error-msgs	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/setup-storage_parted-error-msgs	2008-10-15 06:19:40 UTC (rev 5194)
@@ -1,162 +0,0 @@
-2008-09-30  Michael Tautschnig  <mt at debian.org>
-
-	* lib/setup-storage/Exec.pm: recent versions of parted log errors to stdout
-		instead of stderr + adaption of error messages to current ones
-	* lib/setup-storage/Volumes.pm: Handle new error message in case of missing
-		disk label
-Index: trunk/lib/setup-storage/Exec.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Exec.pm
-+++ trunk/lib/setup-storage/Exec.pm	
-@@ -52,13 +52,21 @@
- $FAI::error_codes = [
-   {
-     error   => "parted_1",
--    message => "Parted failed to remove the partition\n",
--    stderr_regex => "Error: Could not stat device rm - No such file or directory",
-+    message => "Parted failed to open the device\n",
-+    stderr_regex => "Error: Could not stat device .* - No such file or directory",
-     stdout_regex => "",
-     program      => "parted",
-     response     => "die",
-   },
-   {
-+    error   => "parted_1_new",
-+    message => "Parted failed to open the device\n",
-+    stderr_regex => "",
-+    stdout_regex => "Error: Could not stat device .* - No such file or directory",
-+    program      => "parted",
-+    response     => "die",
-+  },
-+  {
-     error        => "parted_2",
-     message      => "Parted could not read a disk label\n",
-     stderr_regex => "Error: Unable to open .* - unrecognised disk label",
-@@ -67,67 +75,83 @@
-     response     => "warn",
-   },
-   {
--    error   => "parted_3",
--    message => "Parted failed to open the device\n",
--    stderr_regex => "Error: Could not stat device .* - No such file or directory",
--    stdout_regex => "",
-+    error        => "parted_2_new",
-+    message      => "Parted could not read a disk label\n",
-+    stderr_regex => "",
-+    stdout_regex => "Error: .* unrecognised disk label",
-     program      => "parted",
--    response     => "die"
-+    response     => "warn",
-   },
-+  ## {
-+  ##   error        => "parted_3",
-+  ##   message      => "Parted was unable to create the partition\n",
-+  ##   stderr_regex => "Warning: You requested a partition from .* to .*\\.\$",
-+  ##   stdout_regex => "",
-+  ##   program      => "parted",
-+  ##   response     => \&FAI::restore_partition_table,
-+  ## },
-   {
--    error   => "parted_4",
--    message => "parted not found\n",
--    stderr_regex => "(parted: command not found|/sbin/parted: No such file or directory)",
-+    error        => "parted_4",
-+    message      => "Parted was unable to read the partition table\n",
-+    stderr_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
-     stdout_regex => "",
-     program      => "parted",
--    response     => "die"
-+    response     => "die",
-+  },
-+  {
-+    error        => "parted_4_new",
-+    message      => "Parted was unable to read the partition table\n",
-+    stderr_regex => "",
-+    stdout_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
-+    program      => "parted",
-+    response     => "die",
-   },
-   {
-     error        => "parted_5",
--    message      => "Parted was unable to create the partition\n",
--    stderr_regex => "Warning: You requested a partition from .* to .*\\.\$",
-+    message      => "Parted failed to resize due to a setup-storage internal error\n",
-+    stderr_regex => "Error: Can't have overlapping partitions",
-     stdout_regex => "",
-     program      => "parted",
--    response     => \&FAI::restore_partition_table,
-+    response     => "die",
-   },
-   {
--    error => "mkfs.xfs_1",
--    message => "mkfs.xfs refused to create a filesystem. Probably you should add -f to the mkfs options in your disk_config file.\n",
--    stderr_regex => "mkfs.xfs: /dev/.* appears to contain an existing filesystem",
--    stdout_regex => "",
--    program      => "mkfs.xfs",
-+    error        => "parted_5_new",
-+    message      => "Parted failed to resize due to a setup-storage internal error\n",
-+    stderr_regex => "",
-+    stdout_regex => "Error: Can't have overlapping partitions",
-+    program      => "parted",
-     response     => "die",
-   },
-   {
-     error        => "parted_6",
--    message      => "Parted was unable to read the partition table\n",
--    stderr_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
-+    message      => "Parted failed to resize the partition (is it too small?)\n",
-+    stderr_regex => "Error: Unable to satisfy all constraints on the partition",
-     stdout_regex => "",
-     program      => "parted",
-     response     => "die",
-   },
-   {
--    error        => "parted_7",
--    message      => "Parted doesn't support ntfs resizing\n",
--    stderr_regex => "No Implementation: Support for opening ntfs file systems is not implemented yet",
--    stdout_regex => "",
-+    error        => "parted_6_new",
-+    message      => "Parted failed to resize the partition (is it too small?)\n",
-+    stderr_regex => "",
-+    stdout_regex => "Error: Unable to satisfy all constraints on the partition",
-     program      => "parted",
-     response     => "die",
-   },
-   {
--    error        => "parted_8",
--    message      => "Parted failed to resize due to a setup-storage internal error\n",
--    stderr_regex => "Error: Can't have overlapping partitions",
-+    error   => "cmd_parted_1",
-+    message => "parted not found\n",
-+    stderr_regex => "(parted: command not found|/sbin/parted: No such file or directory)",
-     stdout_regex => "",
-     program      => "parted",
--    response     => "die",
-+    response     => "die"
-   },
-   {
--    error        => "parted_9",
--    message      => "Parted failed to resize the partition (is it too small?)\n",
--    stderr_regex => "Error: Unable to satisfy all constraints on the partition",
-+    error => "mkfs.xfs_1",
-+    message => "mkfs.xfs refused to create a filesystem. Probably you should add -f to the mkfs options in your disk_config file.\n",
-+    stderr_regex => "mkfs.xfs: /dev/.* appears to contain an existing filesystem",
-     stdout_regex => "",
--    program      => "parted",
-+    program      => "mkfs.xfs",
-     response     => "die",
-   },
-   {
-Index: trunk/lib/setup-storage/Volumes.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Volumes.pm
-+++ trunk/lib/setup-storage/Volumes.pm	
-@@ -66,7 +66,7 @@
- 
-     # parted_2 happens when the disk has no disk label, because parted then
-     # provides no information about the disk
--    if ($error eq "parted_2") {
-+    if ($error eq "parted_2" || $error eq "parted_2_new") {
-       $FAI::no_dry_run or die 
-         "Can't run on test-only mode on this system because there is no disklabel on $disk\n";
- 

Deleted: people/michael/experimental/patches/setup-storage_preserve-bugfixes
===================================================================
--- people/michael/experimental/patches/setup-storage_preserve-bugfixes	2008-10-14 15:46:15 UTC (rev 5193)
+++ people/michael/experimental/patches/setup-storage_preserve-bugfixes	2008-10-15 06:19:40 UTC (rev 5194)
@@ -1,56 +0,0 @@
-2008-10-10  Michael Tautschnig  <mt at debian.org>
-
-	* lib/setup-storage/Parser.pm, lib/setup-storage/Sizes.pm: Warn, if a
-		preserved partition does not match the size specified in the disk_config;
-		fail, if an extended partition is to be created in place of a
-		to-be-preserved partition (closes: #501772)
-Index: trunk/lib/setup-storage/Parser.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm
-+++ trunk/lib/setup-storage/Parser.pm	
-@@ -217,10 +217,11 @@
-       ($extended < 5)
-         or die "Too many primary partitions while creating extended\n";
- 
--      # initialize the entry
--      (\%FAI::configs)->{$FAI::device}->{partitions}->{$extended} = {
--        size => {}
--      };
-+      # initialize the entry, unless it already exists
-+      defined ($FAI::configs{$FAI::device}{partitions}{$extended})
-+        or (\%FAI::configs)->{$FAI::device}->{partitions}->{$extended} = {
-+          size => {}
-+        };
- 
-       my $part_size =
-         (\%FAI::configs)->{$FAI::device}->{partitions}->{$extended}->{size};
-Index: trunk/lib/setup-storage/Sizes.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm
-+++ trunk/lib/setup-storage/Sizes.pm	
-@@ -294,6 +294,13 @@
-   ($next_start > $curr_part->{begin_byte})
-     and die "Previous partitions overflow begin of preserved partition $part_id\n";
- 
-+  # get what the user desired
-+  my ($start, $end) = &FAI::make_range($part->{size}->{range},
-+    $current_disk->{size} . "B");
-+  ($start > $curr_part->{count_byte} || $end < $curr_part->{count_byte})
-+    and warn "Preserved partition $part_id retains size " .
-+      $curr_part->{count_byte} . "\n";
-+
-   # set the effective size to the value known already
-   $part->{size}->{eff_size} = $curr_part->{count_byte};
- 
-@@ -321,6 +328,11 @@
-     $min_req_total_space += $current_disk->{bios_sectors_per_track} *
-       $current_disk->{sector_size} if ($part_id > 4);
- 
-+    # make sure we don't change extended partitions to ordinary ones and
-+    # vice-versa
-+    ($part->{size}->{extended} == $curr_part->{is_extended})
-+      or die "Preserved partition $part_id can't change extended/normal setting\n";
-+
-     # extended partitions consume no space
-     if ($part->{size}->{extended}) {
- 




More information about the Fai-commit mailing list