[Fai-commit] r6404 - branches/experimental/patches
Michael Tautschnig
mt at alioth.debian.org
Fri Apr 15 12:49:35 UTC 2011
Author: mt
Date: 2011-04-15 12:49:28 +0000 (Fri, 15 Apr 2011)
New Revision: 6404
Removed:
branches/experimental/patches/setup-storage_user-100-percent
Modified:
branches/experimental/patches/make-fai-nfsroot_add-keys
branches/experimental/patches/series
branches/experimental/patches/setup-storage_hardcode-63-sectors
branches/experimental/patches/setup-storage_internals-cleanup
branches/experimental/patches/setup-storage_no-cylinder-boundaries
branches/experimental/patches/setup-storage_preserve-format-all
Log:
setup-storage_user-100-percent was merged into trunk
Modified: branches/experimental/patches/make-fai-nfsroot_add-keys
===================================================================
--- branches/experimental/patches/make-fai-nfsroot_add-keys 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/make-fai-nfsroot_add-keys 2011-04-15 12:49:28 UTC (rev 6404)
@@ -7,7 +7,7 @@
===================================================================
--- trunk.orig/bin/make-fai-nfsroot
+++ trunk/bin/make-fai-nfsroot
-@@ -380,6 +380,17 @@
+@@ -383,6 +383,17 @@
mount -t proc /proc $NFSROOT/proc
mount -t sysfs /sys $NFSROOT/sys
mount -t devpts devpts $NFSROOT/dev/pts
Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/series 2011-04-15 12:49:28 UTC (rev 6404)
@@ -8,7 +8,6 @@
fix-eval_cmdline
ainsl_man-page-return-codes
setup-storage_preserve-format-all
-setup-storage_user-100-percent
bugfix-498412
ftar_rm-fix
fcopy_symlinks
Modified: branches/experimental/patches/setup-storage_hardcode-63-sectors
===================================================================
--- branches/experimental/patches/setup-storage_hardcode-63-sectors 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/setup-storage_hardcode-63-sectors 2011-04-15 12:49:28 UTC (rev 6404)
@@ -7,7 +7,7 @@
===================================================================
--- trunk.orig/lib/setup-storage/Sizes.pm
+++ trunk/lib/setup-storage/Sizes.pm
-@@ -641,15 +641,11 @@
+@@ -640,15 +640,11 @@
my $next_start = 0;
if ($FAI::configs{$config}{disklabel} eq "msdos") {
Modified: branches/experimental/patches/setup-storage_internals-cleanup
===================================================================
--- branches/experimental/patches/setup-storage_internals-cleanup 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/setup-storage_internals-cleanup 2011-04-15 12:49:28 UTC (rev 6404)
@@ -96,7 +96,7 @@
}
################################################################################
-@@ -431,17 +424,15 @@
+@@ -431,16 +424,15 @@
# @param $disk This disk
# @param $next_start Start of the next partition
# @param $block_size Requested alignment
@@ -110,13 +110,12 @@
################################################################################
sub do_partition_real {
-- my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space,
-- $max_avail, $worklist) = @_;
+- my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space, $max_avail, $worklist) = @_;
+ my ($part_id, $config, $disk, $next_start, $block_size, $max_avail, $worklist) = @_;
# reference to the current disk config
my $current_disk = $FAI::current_config{$disk};
-@@ -452,15 +443,8 @@
+@@ -451,15 +443,8 @@
# compute the effective start location on the disk
# msdos specific offset for logical partitions
@@ -134,7 +133,7 @@
# partition starts at where we currently are + requested alignment, or remains
# fixed in case of resized ntfs
-@@ -568,13 +552,10 @@
+@@ -567,13 +552,10 @@
# write the end byte to the configuration
$part->{end_byte} = $end_byte;
@@ -149,7 +148,7 @@
}
################################################################################
-@@ -634,9 +615,6 @@
+@@ -633,9 +615,6 @@
}
}
@@ -159,7 +158,7 @@
# the start byte for the next partition
my $next_start = 0;
-@@ -644,7 +622,6 @@
+@@ -643,7 +622,6 @@
# on msdos disk labels, the first partitions starts at head #1; well,
# enforce a 63-sectors-per-track layout
$next_start = 63 * $current_disk->{sector_size};
@@ -167,7 +166,7 @@
} elsif ($FAI::configs{$config}{disklabel} eq "gpt") {
# on GPT-EFI disk labels the first 34 and last 33 sectors must be left alone
-@@ -653,31 +630,24 @@
+@@ -652,31 +630,24 @@
# modify the disk to claim the space for the second partition table
$current_disk->{end_byte} -= 33 * $current_disk->{sector_size};
@@ -201,7 +200,7 @@
my ($s, $e) = &FAI::make_range("1-1", $current_disk->{size} . "B");
# enter the range into the hash
$FAI::partition_pointer->{size}->{range} = "$s-$s";
-@@ -685,7 +655,6 @@
+@@ -684,7 +655,6 @@
$FAI::partition_pointer->{start_byte} = $next_start;
$FAI::partition_pointer->{end_byte} = $next_start + $s - 1;
$next_start += $s;
@@ -209,7 +208,7 @@
# set proper defaults
$FAI::partition_pointer->{encrypt} = 0;
$FAI::partition_pointer->{filesystem} = "-";
-@@ -693,7 +662,7 @@
+@@ -692,7 +662,7 @@
}
# the size of a 100% partition (the 100% available to the user)
@@ -218,7 +217,7 @@
# expressed in bytes
$max_avail = "${max_avail}B";
-@@ -747,15 +716,14 @@
+@@ -746,14 +716,14 @@
shift @worklist;
# the partition $part_id must be preserved
} elsif ($part->{size}->{preserve}) {
@@ -231,14 +230,13 @@
shift @worklist;
} else {
- ($next_start, $min_req_total_space) = &FAI::do_partition_real($part_id,
-- $config, $disk, $next_start, $block_size, $min_req_total_space,
-- $max_avail, \@worklist);
+- $config, $disk, $next_start, $block_size, $min_req_total_space, $max_avail, \@worklist);
+ $next_start = &FAI::do_partition_real($part_id, $config, $disk,
+ $next_start, $block_size, $max_avail, \@worklist);
# msdos does not support partitions larger than 2TiB
($part->{size}->{eff_size} > (&FAI::convert_unit("2TiB") * 1024.0 *
-@@ -767,8 +735,8 @@
+@@ -765,8 +735,8 @@
}
# check, whether there is sufficient space on the disk
Modified: branches/experimental/patches/setup-storage_no-cylinder-boundaries
===================================================================
--- branches/experimental/patches/setup-storage_no-cylinder-boundaries 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/setup-storage_no-cylinder-boundaries 2011-04-15 12:49:28 UTC (rev 6404)
@@ -66,21 +66,21 @@
# @param $next_start Start of the next partition
+# @param $block_size Requested alignment
# @param $min_req_total_space Minimum space required on disk
+ # @param $max_avail The maximum size of a partition on this disk
# @param $worklist Reference to the remaining partitions
- #
-@@ -440,7 +438,7 @@
+@@ -441,7 +439,7 @@
################################################################################
sub do_partition_real {
-- my ($part_id, $config, $disk, $next_start, $min_req_total_space, $worklist) = @_;
-+ my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space, $worklist) = @_;
+- my ($part_id, $config, $disk, $next_start, $min_req_total_space, $max_avail, $worklist) = @_;
++ my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space, $max_avail, $worklist) = @_;
# reference to the current disk config
my $current_disk = $FAI::current_config{$disk};
@@ -450,6 +448,34 @@
- my ($start, $end) = &FAI::make_range($part->{size}->{range},
- $current_disk->{size} . "B");
+ my ($start, $end) = &FAI::make_range($part->{size}->{range}, $max_avail);
+
+ # compute the effective start location on the disk
+ # msdos specific offset for logical partitions
+ if (($FAI::configs{$config}{disklabel} eq "msdos")
@@ -121,13 +121,13 @@
- $end_of_range -= $current_disk->{bios_sectors_per_track} *
- $current_disk->{sector_size};
- }
-+ $end_of_range -= 2 * $current_disk->{sector_size}
++ $end_of_range -= 2 * $current_disk->{sector_size}
+ if (($FAI::configs{$config}{disklabel} eq "msdos") && ($p > 4));
last;
} elsif ($FAI::configs{$config}{partitions}{$p}{size}{extended}) {
next;
-@@ -491,13 +514,11 @@
- $current_disk->{size} . "B");
+@@ -490,13 +513,11 @@
+ $FAI::configs{$config}{partitions}{$p}{size}{range}, $max_avail);
# logical partitions require the space for the EPBR to be left
- # out
@@ -144,7 +144,7 @@
}
$min_req_space += $min_size;
-@@ -529,48 +550,9 @@
+@@ -528,48 +549,9 @@
$end = $start;
}
@@ -195,7 +195,7 @@
# set $start and $end to the effective values
$start = $end_byte - $next_start + 1;
-@@ -619,6 +601,21 @@
+@@ -618,6 +600,21 @@
# reference to the current disk config
my $current_disk = $FAI::current_config{$disk};
@@ -236,12 +236,12 @@
# apparently parted insists in having some space left at the end too
# modify the disk to claim the space for the second partition table
-@@ -755,7 +751,7 @@
+@@ -760,7 +756,7 @@
shift @worklist;
} else {
($next_start, $min_req_total_space) = &FAI::do_partition_real($part_id,
-- $config, $disk, $next_start, $min_req_total_space, \@worklist);
-+ $config, $disk, $next_start, $block_size, $min_req_total_space, \@worklist);
+- $config, $disk, $next_start, $min_req_total_space, $max_avail, \@worklist);
++ $config, $disk, $next_start, $block_size, $min_req_total_space, $max_avail, \@worklist);
# msdos does not support partitions larger than 2TiB
($part->{size}->{eff_size} > (&FAI::convert_unit("2TiB") * 1024.0 *
Modified: branches/experimental/patches/setup-storage_preserve-format-all
===================================================================
--- branches/experimental/patches/setup-storage_preserve-format-all 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/setup-storage_preserve-format-all 2011-04-15 12:49:28 UTC (rev 6404)
@@ -470,7 +470,7 @@
===================================================================
--- trunk.orig/lib/setup-storage/Sizes.pm
+++ trunk/lib/setup-storage/Sizes.pm
-@@ -318,7 +318,8 @@
+@@ -319,7 +319,8 @@
my $curr_part = $current_disk->{partitions}->{$part_id};
($next_start > $curr_part->{begin_byte})
@@ -479,4 +479,4 @@
+ unless (defined($FAI::configs{$config}{opts_all}{preserve}));
# get what the user desired
- my ($start, $end) = &FAI::make_range($part->{size}->{range},
+ my ($start, $end) = &FAI::make_range($part->{size}->{range}, $max_avail);
Deleted: branches/experimental/patches/setup-storage_user-100-percent
===================================================================
--- branches/experimental/patches/setup-storage_user-100-percent 2011-04-15 12:45:46 UTC (rev 6403)
+++ branches/experimental/patches/setup-storage_user-100-percent 2011-04-15 12:49:28 UTC (rev 6404)
@@ -1,109 +0,0 @@
-2010-09-17 Michael Tautschnig <mt at debian.org>
-
- * setup-storage/Sizes.pm: A partition with size 100% will be as large as truly
- feasible, not the size of the entire disk (MBR etc. aren't available to the
- user).
-Index: trunk/lib/setup-storage/Sizes.pm
-===================================================================
---- 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
- # @param $min_req_total_space Minimum space required on disk
-+# @param $max_avail The maximum size of a partition on this disk
- #
- # @return Updated values of ($next_start, $min_req_total_space)
- #
- ################################################################################
- sub do_partition_preserve {
-
-- my ($part_id, $config, $disk, $next_start, $min_req_total_space) = @_;
-+ my ($part_id, $config, $disk, $next_start, $min_req_total_space, $max_avail) = @_;
- # reference to the current disk config
- my $current_disk = $FAI::current_config{$disk};
-
-@@ -322,8 +323,7 @@
- unless (defined($FAI::configs{$config}{opts_all}{preserve}));
-
- # get what the user desired
-- my ($start, $end) = &FAI::make_range($part->{size}->{range},
-- $current_disk->{size} . "B");
-+ my ($start, $end) = &FAI::make_range($part->{size}->{range}, $max_avail);
- ($start > $curr_part->{count_byte} || $end < $curr_part->{count_byte})
- and warn "Preserved partition $part_dev_name retains size " .
- $curr_part->{count_byte} . "B\n";
-@@ -432,6 +432,7 @@
- # @param $next_start Start of the next partition
- # @param $block_size Requested alignment
- # @param $min_req_total_space Minimum space required on disk
-+# @param $max_avail The maximum size of a partition on this disk
- # @param $worklist Reference to the remaining partitions
- #
- # @return Updated values of ($next_start, $min_req_total_space)
-@@ -439,15 +440,15 @@
- ################################################################################
- sub do_partition_real {
-
-- my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space, $worklist) = @_;
-+ my ($part_id, $config, $disk, $next_start, $block_size, $min_req_total_space,
-+ $max_avail, $worklist) = @_;
- # reference to the current disk config
- my $current_disk = $FAI::current_config{$disk};
-
- # reference to the current partition
- my $part = (\%FAI::configs)->{$config}->{partitions}->{$part_id};
-
-- my ($start, $end) = &FAI::make_range($part->{size}->{range},
-- $current_disk->{size} . "B");
-+ my ($start, $end) = &FAI::make_range($part->{size}->{range}, $max_avail);
-
- # compute the effective start location on the disk
- # msdos specific offset for logical partitions
-@@ -511,8 +512,7 @@
- next;
- } else {
- my ($min_size, $max_size) = &FAI::make_range(
-- $FAI::configs{$config}{partitions}{$p}{size}{range},
-- $current_disk->{size} . "B");
-+ $FAI::configs{$config}{partitions}{$p}{size}{range}, $max_avail);
-
- # logical partitions require the space for the EPBR to be left
- # out; in fact, even alignment constraints would have to be considered
-@@ -644,6 +644,7 @@
- # on msdos disk labels, the first partitions starts at head #1
- $next_start = $current_disk->{bios_sectors_per_track} *
- $current_disk->{sector_size};
-+ $min_req_total_space += $next_start;
-
- # the MBR requires space, too
- $min_req_total_space += $current_disk->{bios_sectors_per_track} *
-@@ -695,6 +696,11 @@
- $FAI::partition_pointer->{mountpoint} = "-";
- }
-
-+ # the size of a 100% partition (the 100% available to the user)
-+ my $max_avail = $current_disk->{size} - $min_req_total_space;
-+ # expressed in bytes
-+ $max_avail = "${max_avail}B";
-+
- # the list of partitions that we need to find start and end bytes for
- my @worklist = (&numsort(keys %{ $FAI::configs{$config}{partitions} }));
-
-@@ -746,13 +752,14 @@
- # the partition $part_id must be preserved
- } elsif ($part->{size}->{preserve}) {
- ($next_start, $min_req_total_space) = &FAI::do_partition_preserve($part_id,
-- $config, $disk, $next_start, $min_req_total_space);
-+ $config, $disk, $next_start, $min_req_total_space, $max_avail);
-
- # partition done
- shift @worklist;
- } else {
- ($next_start, $min_req_total_space) = &FAI::do_partition_real($part_id,
-- $config, $disk, $next_start, $block_size, $min_req_total_space, \@worklist);
-+ $config, $disk, $next_start, $block_size, $min_req_total_space,
-+ $max_avail, \@worklist);
-
- # msdos does not support partitions larger than 2TiB
- ($part->{size}->{eff_size} > (&FAI::convert_unit("2TiB") * 1024.0 *
More information about the Fai-commit
mailing list