Hello community,
here is the log from the commit of package kiwi
checked in at Mon Nov 26 20:46:14 CET 2007.
--------
--- arch/i386/kiwi/kiwi.changes 2007-11-22 14:21:46.000000000 +0100
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2007-11-26 18:33:57.511300000 +0100
@@ -1,0 +2,31 @@
+Mon Nov 26 10:58:02 CET 2007 - ms@suse.de
+
+- v1.96
+- fixed block count used with sparse files (#343845)
+- fixed md5sum check, use head not tail (#341240)
+- added better error checking for setupSplashForGrub()
+- udevtrigger and udevsettle are links to udevadm
+- added device wait check for storage device to appear
+- make gzip a configurable command, default is gzip -9
+- fixed parted partition setup
+- fixed package query call
+
+-------------------------------------------------------------------
+Fri Nov 23 10:55:28 CET 2007 - ms@suse.de
+
+- v1.95
+- fixed oemboot repartition code for small disks
+- fixed oemboot fstab setup to check whether there is already
+ a non empty /home directory which would become covered by
+ the mount of the extra home partition. If such a /home directory
+ exists we will prevent the partition from being mounted
+ automatically
+- patch by Nat Friedman which adds an argument
+ to kiwi, --ignore-repos, which causes Kiwi to Ignore all repositories
+ specified so-far, in XML or otherwise. This option should be used in
+ conjunction with subsequent calls to --add-repo to specify repositories
+ at the command-line that override previous specifications.
+- patch by Nat Friedman which makes Kiwi's log files
+ include seconds, which is very useful when you're optimizing.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.mQ1162/_old 2007-11-26 20:44:35.000000000 +0100
+++ /var/tmp/diff_new_pack.mQ1162/_new 2007-11-26 20:44:35.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package kiwi (Version 1.94)
+# spec file for package kiwi (Version 1.96)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -18,7 +18,7 @@
%endif
Requires: perl perl-XML-LibXML perl-libwww-perl screen coreutils
Summary: OpenSuSE - KIWI Image System
-Version: 1.94
+Version: 1.96
Release: 1
Group: System/Management
License: GPL v2 or later
@@ -354,6 +354,31 @@
%{_datadir}/kiwi/image/oemboot/suse*
%changelog
+* Mon Nov 26 2007 - ms@suse.de
+- v1.96
+- fixed block count used with sparse files (#343845)
+- fixed md5sum check, use head not tail (#341240)
+- added better error checking for setupSplashForGrub()
+- udevtrigger and udevsettle are links to udevadm
+- added device wait check for storage device to appear
+- make gzip a configurable command, default is gzip -9
+- fixed parted partition setup
+- fixed package query call
+* Fri Nov 23 2007 - ms@suse.de
+- v1.95
+- fixed oemboot repartition code for small disks
+- fixed oemboot fstab setup to check whether there is already
+ a non empty /home directory which would become covered by
+ the mount of the extra home partition. If such a /home directory
+ exists we will prevent the partition from being mounted
+ automatically
+- patch by Nat Friedman which adds an argument
+ to kiwi, --ignore-repos, which causes Kiwi to Ignore all repositories
+ specified so-far, in XML or otherwise. This option should be used in
+ conjunction with subsequent calls to --add-repo to specify repositories
+ at the command-line that override previous specifications.
+- patch by Nat Friedman which makes Kiwi's log files
+ include seconds, which is very useful when you're optimizing.
* Wed Nov 21 2007 - ms@suse.de
- v1.94
- added option --createhash to create a description md5sum
++++++ kiwi.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/kiwi.pl new/kiwi/kiwi.pl
--- old/kiwi/kiwi.pl 2007-11-22 14:13:05.000000000 +0100
+++ new/kiwi/kiwi.pl 2007-11-26 18:23:05.000000000 +0100
@@ -39,7 +39,7 @@
#============================================
# Globals (Version)
#--------------------------------------------
-our $Version = "1.94";
+our $Version = "1.96";
our $openSUSE = "http://download.opensuse.org/repositories/";
our $ConfigFile = "$ENV{'HOME'}/.kiwirc";
our $ConfigStatus = 0;
@@ -69,9 +69,13 @@
our $JabberRessource; # configurable jabber ressource
our $JabberComponent; # configurable jabber component
our $LogServerPort; # configurable log server port
+our $Gzip; # configurable gzip command
if (! defined $LogServerPort) {
$LogServerPort = 9000;
}
+if (! defined $Gzip) {
+ $Gzip = "gzip -9";
+}
if (! defined $JabberPort) {
$JabberPort = 5223;
}
@@ -118,6 +122,7 @@
our @AddRepository; # add repository for building physical extend
our @AddRepositoryType; # add repository type
our @AddPackage; # add packages to the image package list
+our $IgnoreRepos; # ignore repositories specified so far
our $SetRepository; # set first repository for building physical extend
our $SetRepositoryType; # set firt repository type
our $SetImageType; # set image type to use, default is primary type
@@ -131,6 +136,7 @@
our $BaseRootMode; # specify base-root mode copy | union
our $NoColor; # do not used colored output (done/failed messages)
our $LogPort; # specify alternative log server port
+our $GzipCmd; # command to run to gzip things
our $PrebuiltBootImage; # directory where a prepared boot image may be found
our $listXMLInfo; # list XML information for this operation
@@ -297,6 +303,12 @@
}
}
#==========================================
+ # Check for ignore-repos option
+ #------------------------------------------
+ if (defined $IgnoreRepos) {
+ $xml -> ignoreRepositories ();
+ }
+ #==========================================
# Check for set-repo option
#------------------------------------------
if (defined $SetRepository) {
@@ -575,6 +587,12 @@
}
}
#==========================================
+ # Check for ignore-repos option
+ #------------------------------------------
+ if (defined $IgnoreRepos) {
+ $xml -> ignoreRepositories ();
+ }
+ #==========================================
# Check for set-repo option
#------------------------------------------
if (defined $SetRepository) {
@@ -841,6 +859,7 @@
"list|l" => \&listImage,
"create|c=s" => \$Create,
"create-instsource=s" => \$CreateInstSource,
+ "ignore-repos" => \$IgnoreRepos,
"add-repo=s" => \@AddRepository,
"add-repotype=s" => \@AddRepositoryType,
"add-package=s" => \@AddPackage,
@@ -872,6 +891,7 @@
"base-root-mode=s" => \$BaseRootMode,
"nocolor" => \$NoColor,
"log-port=i" => \$LogPort,
+ "gzip-cmd=s" => \$GzipCmd,
"prebuiltbootimage=s" => \$PrebuiltBootImage,
"listxmlinfo|x=s" => \$listXMLInfo,
"help|h" => \&usage,
@@ -919,6 +939,11 @@
$LogServerPort = $LogPort;
$kiwi -> done ();
}
+ if (defined $GzipCmd) {
+ $kiwi -> info ("Setting gzip command to: $GzipCmd");
+ $Gzip = $GzipCmd;
+ $kiwi -> done ();
+ }
if ((defined $BaseRootMode) && (! defined $BaseRoot)) {
$kiwi -> info ("base root mode specified but no base root tree");
$kiwi -> failed ();
@@ -1034,11 +1059,18 @@
print " makes only sense in combination with --create\n";
print "\n";
print " [ --add-repo <repo-path> --add-repotype <type> ]\n";
- print " Add the given repository and type for this run of an\n";
+ print " Add the given repository and type for this run of an\n";
print " image prepare or upgrade process.\n";
print " Multiple --add-repo/--add-repotype options are possible\n";
print " The change will not be written to the config.xml file\n";
print "\n";
+ print " [ --ignore-repos ]\n";
+ print " Ignore all repositories specified so-far, in XML or\n";
+ print " otherwise. This option should be used in conjunction\n";
+ print " with subsequent calls to --add-repo to specify\n";
+ print " repositories at the command-line that override previous\n";
+ print " specifications.\n";
+ print "\n";
print " [ --set-repo <repo-path> [ --set-repotype <type> ]]\n";
print " set the given repository and optional type for the first\n";
print " repository entry within the config.xml. The change will not\n";
@@ -1054,6 +1086,10 @@
print " Write to the log file \`<filename>' instead of\n";
print " the terminal.\n";
print "\n";
+ print " [ --gzip-cmd <cmd> ]\n";
+ print " Specify an alternate command to run when compressing boot\n";
+ print " and system images. Command must accept gzip options.\n";
+ print "\n";
print " [ --force-new-root ]\n";
print " Force creation of new root directory. If the directory\n";
print " already exists, it is deleted.\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIBoot.pm new/kiwi/modules/KIWIBoot.pm
--- old/kiwi/modules/KIWIBoot.pm 2007-11-19 15:17:37.000000000 +0100
+++ new/kiwi/modules/KIWIBoot.pm 2007-11-26 18:23:03.000000000 +0100
@@ -267,7 +267,7 @@
# Import grub stages
#------------------------------------------
my $stages = "'usr/lib/grub/*'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$kiwi -> info ("Importing grub stages for stick boot");
$status = qx ($unzip | (cd $tmpdir && cpio -di $stages 2>&1));
$result = $? >> 8;
@@ -426,7 +426,7 @@
# check for message file in initrd
#------------------------------------------
my $message = "'image/loader/message'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$status = qx ($unzip | (cd /mnt/ && cpio -d -i $message 2>&1));
$result = $? >> 8;
if ($result != 0) {
@@ -634,7 +634,7 @@
my $stage1 = "'usr/lib/grub/stage1'";
my $stage2 = "'usr/lib/grub/stage2_eltorito'";
my $message= "'image/loader/message'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$status = qx ($unzip | (cd $tmpdir && cpio -d -i $message 2>&1));
$result = $? >> 8;
if ($result == 0) {
@@ -844,7 +844,7 @@
# Import grub stages
#------------------------------------------
my $stages = "'usr/lib/grub/*'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$kiwi -> info ("Importing grub stages for VM boot");
$status = qx ($unzip | (cd $tmpdir && cpio -di $stages 2>&1));
$result = $? >> 8;
@@ -1017,7 +1017,7 @@
return undef;
}
my $message = "'image/loader/message'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$status = qx ($unzip | ( cd /mnt/ && cpio -di $message 2>&1));
$result = $? >> 8;
if ($result != 0) {
@@ -1198,7 +1198,7 @@
#------------------------------------------
my $stages = "'usr/lib/grub/*'";
my $message= "'image/loader/message'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$kiwi -> info ("Importing grub stages for VM boot");
$status = qx ($unzip | (cd $tmpdir && cpio -di $message 2>&1));
$result = $? >> 8;
@@ -1530,7 +1530,7 @@
# check for message file in initrd
#------------------------------------------
my $message = "'image/loader/message'";
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
$status = qx ($unzip | (cd /mnt/ && cpio -di $message 2>&1));
$result = $? >> 8;
if ($result != 0) {
@@ -1691,7 +1691,7 @@
#==========================================
# unpack initrd files
#------------------------------------------
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
my $status = qx ($unzip | (cd $irddir && cpio -di 2>&1));
my $result = $? >> 8;
if ($result != 0) {
@@ -1742,7 +1742,9 @@
#------------------------------------------
$newird = $initrd;
$newird =~ s/\.gz/\.install\.gz/;
- $status = qx ((cd $irddir && find|cpio --quiet -oH newc|gzip -9) > $newird);
+ $status = qx (
+ (cd $irddir && find|cpio --quiet -oH newc | $main::Gzip) > $newird
+ );
$result = $? >> 8;
if ($result != 0) {
$kiwi -> error ("Failed to re-create initrd: $status");
@@ -1777,7 +1779,7 @@
#==========================================
# unpack initrd files
#------------------------------------------
- my $unzip = "gzip -cd $initrd 2>&1";
+ my $unzip = "$main::Gzip -cd $initrd 2>&1";
my $status = qx ($unzip | (cd $irddir && cpio -di 2>&1));
my $result = $? >> 8;
if ($result != 0) {
@@ -1804,19 +1806,31 @@
#------------------------------------------
while (my $splash = glob("$newspl/*.spl")) {
mkdir "$splash.dir";
- qx (gzip -cd $splash > $splash.bob);
+ qx ($main::Gzip -cd $splash > $splash.bob);
my $count = $this -> extractCPIO ( $splash.".bob" );
for (my $id=1; $id <= $count; $id++) {
qx (cat $splash.bob.$id |(cd $splash.dir && cpio -i 2>&1));
}
qx (cp -a $splash.dir/etc $newspl);
- qx (cat $splash.dir/bootsplash >> $newspl/bootsplash);
+ $result = 1;
+ if (-e "$splash.dir/bootsplash") {
+ qx (cat $splash.dir/bootsplash >> $newspl/bootsplash);
+ $result = $? >> 8;
+ }
qx (rm -rf $splash.dir);
qx (rm -f $splash.bob*);
qx (rm -f $splash);
+ if ($result != 0) {
+ my $splfile = basename ($splash);
+ $kiwi -> skipped ();
+ $kiwi -> warning ("No bootsplash file found in $splfile cpio");
+ $kiwi -> skipped ();
+ qx (rm -rf $spldir);
+ return $initrd;
+ }
}
- qx ((cd $newspl && find|cpio --quiet -oH newc | gzip -9) > $spldir/all.spl);
- qx ((cd $irddir && find|cpio --quiet -oH newc | gzip -9) > $newird);
+ qx ((cd $newspl && find|cpio --quiet -oH newc|$main::Gzip)>$spldir/all.spl);
+ qx ((cd $irddir && find|cpio --quiet -oH newc|$main::Gzip)>$newird);
#==========================================
# create splash initrd
#------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIConfig.sh new/kiwi/modules/KIWIConfig.sh
--- old/kiwi/modules/KIWIConfig.sh 2007-11-16 16:09:15.000000000 +0100
+++ new/kiwi/modules/KIWIConfig.sh 2007-11-26 18:23:03.000000000 +0100
@@ -425,7 +425,7 @@
blockdev posbios ping killall killall5 udevcontrol udevd
udevsettle udevtrigger mknod stat path_id hwup scsi_id scsi_tur
usb_id ata_id vol_id edd_id setctsid dumpe2fs debugreiserfs
- fuser
+ fuser udevadm
"
tools="$tools $@"
for path in /sbin /usr/sbin /usr/bin /bin;do
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIImage.pm new/kiwi/modules/KIWIImage.pm
--- old/kiwi/modules/KIWIImage.pm 2007-11-18 11:20:30.000000000 +0100
+++ new/kiwi/modules/KIWIImage.pm 2007-11-26 18:23:03.000000000 +0100
@@ -290,7 +290,7 @@
if ($dest !~ /^\//) {
$dest = $pwd."/".$dest;
}
- my $data = qx (cd $tree && find . | cpio @cpio | gzip -9 -f > $dest);
+ my $data = qx (cd $tree && find . | cpio @cpio | $main::Gzip -f > $dest);
my $code = $? >> 8;
if ($code != 0) {
$kiwi -> error ("Couldn't create cpio archive");
@@ -928,7 +928,9 @@
$kiwi -> done();
$kiwi -> info ("Extracting pre-built boot image");
$data = qx (mkdir -p $main::Create);
- $data = qx (gzip -cd $pinitrd|(cd $main::Create && cpio -di 2>&1));
+ $data = qx (
+ $main::Gzip -cd $pinitrd|(cd $main::Create && cpio -di 2>&1)
+ );
$code = $? >> 8;
if ($code != 0) {
$kiwi -> failed();
@@ -1958,7 +1960,7 @@
return undef;
}
my @bsc = getBlocks ( $size );
- my $seek = $bsc[2];
+ my $seek = $bsc[2] - 1;
#==========================================
# Create logical extend storage and FS
#------------------------------------------
@@ -2187,7 +2189,9 @@
$kiwi -> failed ();
return undef;
}
- my $kernel = qx (gzip -dc $gzfile | strings | grep $lx | cut $sp);
+ my $kernel = qx (
+ $main::Gzip -dc $gzfile | strings | grep $lx | cut $sp
+ );
chomp $kernel;
qx (rm -f $file.$kernel);
qx (mv $file $file.$kernel && ln -s $file.$kernel $file );
@@ -2479,7 +2483,7 @@
# Compress image using gzip
#------------------------------------------
$kiwi -> info ("Compressing image...");
- my $data = qx (gzip -9 -f $imageDest/$name);
+ my $data = qx ($main::Gzip -f $imageDest/$name);
my $code = $? >> 8;
if ($code != 0) {
$kiwi -> failed ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh
--- old/kiwi/modules/KIWILinuxRC.sh 2007-11-20 15:19:42.000000000 +0100
+++ new/kiwi/modules/KIWILinuxRC.sh 2007-11-26 18:23:03.000000000 +0100
@@ -267,6 +267,7 @@
Echo "Error logging enabled on $ELOG_CONSOLE"
echo "Error Log:" >$ELOG_CONSOLE
exec 2>$ELOG_CONSOLE
+ set -x 1>&2
}
#======================================
# udevStart
@@ -1310,7 +1311,7 @@
"reboot"
fi
p_opts="-s $DISK unit s print"
- p_size=`/usr/sbin/parted $p_opts | grep "Disk" | cut -f2 -d: | cut -f1 -ds`
+ p_size=`/usr/sbin/parted $p_opts | grep "^Disk" | cut -f2 -d: | cut -f1 -ds`
p_size=`echo $p_size`
p_size=`expr $p_size - 1`
p_cmd="/usr/sbin/parted -s $DISK unit s"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWILog.pm new/kiwi/modules/KIWILog.pm
--- old/kiwi/modules/KIWILog.pm 2007-10-31 16:38:44.000000000 +0100
+++ new/kiwi/modules/KIWILog.pm 2007-11-26 10:36:04.000000000 +0100
@@ -455,7 +455,7 @@
my $this = shift;
my $level = shift;
my $date;
- $date = qx ( LANG=POSIX /bin/date "+%h-%d %H:%M"); chomp $date;
+ $date = qx ( LANG=POSIX /bin/date "+%h-%d %H:%M:%S"); chomp $date;
$this->{date} = $date;
$this->{level}= $level;
$date .= " <$level> : ";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIManager.pm new/kiwi/modules/KIWIManager.pm
--- old/kiwi/modules/KIWIManager.pm 2007-11-21 14:35:43.000000000 +0100
+++ new/kiwi/modules/KIWIManager.pm 2007-11-26 18:23:03.000000000 +0100
@@ -972,7 +972,6 @@
my $lock = $this->{lock};
my $data;
my $code;
- my $opts;
#==========================================
# smart
#------------------------------------------
@@ -981,13 +980,12 @@
$this -> checkExclusiveLock();
$kiwi -> info ("Checking for package: $pack");
$this -> setLock();
- $data = qx ( @smart query --installed $pack | grep -qi $pack 2>&1 );
+ $data = qx ( @smart query --installed $pack 2>&1 );
$code = $? >> 8;
$this -> freeLock();
} else {
$kiwi -> info ("Checking for package: $pack");
- $opts = "--installed $pack";
- $data = qx ( chroot $root smart query $opts | grep -qi $pack 2>&1 );
+ $data = qx ( chroot $root smart query --installed $pack 2>&1 );
$code = $? >> 8;
}
if ($code != 0) {
@@ -1008,13 +1006,13 @@
$this -> checkExclusiveLock();
$kiwi -> info ("Checking for package: $pack");
$this -> setLock();
- $data = qx ( zypper info $pack | grep -qi $str 2>&1 );
+ $data = qx ( zypper info $pack 2>&1 | grep -qi $str 2>&1 );
$code = $? >> 8;
$this -> freeLock();
} else {
$kiwi -> info ("Checking for package: $pack");
- $data = qx ( chroot $root @zypper info $pack | grep -qi $str 2>&1 );
- $code = $? >> 8;
+ $data= qx (chroot $root @zypper info $pack 2>&1|grep -qi $str 2>&1);
+ $code= $? >> 8;
}
if ($code == 0) {
$kiwi -> failed ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIPattern.pm new/kiwi/modules/KIWIPattern.pm
--- old/kiwi/modules/KIWIPattern.pm 2007-11-20 15:19:43.000000000 +0100
+++ new/kiwi/modules/KIWIPattern.pm 2007-11-26 18:23:03.000000000 +0100
@@ -260,7 +260,7 @@
# finally get the pattern
#------------------------------------------
if ($pfile =~ /\.gz$/) {
- if ((! -e $pfile) || (! open (FD,"cat $pfile | gzip -cd|"))) {
+ if ((! -e $pfile) || (! open (FD,"cat $pfile|$main::Gzip -cd|"))) {
$message = "couldn't uncompress pattern";
return (undef,"local[gzip]: $message: $pfile: $!");
}
@@ -358,7 +358,7 @@
return (undef,"remote[open] $message: $tmpdir/pattern: $!");
}
print FD $content; close FD;
- if (! open (FD,"cat $tmpdir/pattern | gzip -cd|")) {
+ if (! open (FD,"cat $tmpdir/pattern | $main::Gzip -cd|")) {
unlink ($tmpdir."/pattern");
rmdir ($tmpdir);
$message = "couldn't uncompress pattern";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIXML.pm new/kiwi/modules/KIWIXML.pm
--- old/kiwi/modules/KIWIXML.pm 2007-11-22 14:13:04.000000000 +0100
+++ new/kiwi/modules/KIWIXML.pm 2007-11-26 10:36:04.000000000 +0100
@@ -1036,6 +1036,18 @@
}
#==========================================
+# ignoreRepositories
+#------------------------------------------
+sub ignoreRepositories {
+ # ...
+ # Ignore all the repositories in the XML file.
+ # ---
+ my $this = shift;
+ $this->{repositNodeList} = new XML::LibXML::NodeList;
+ return $this;
+}
+
+#==========================================
# setRepository
#------------------------------------------
sub setRepository {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/.revision new/kiwi/.revision
--- old/kiwi/.revision 2007-11-22 14:20:52.000000000 +0100
+++ new/kiwi/.revision 2007-11-26 18:31:29.000000000 +0100
@@ -1 +1 @@
-835
\ No newline at end of file
+842
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-linuxrc new/kiwi/system/boot/netboot/suse-linuxrc
--- old/kiwi/system/boot/netboot/suse-linuxrc 2007-11-20 15:19:38.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-linuxrc 2007-11-26 18:23:01.000000000 +0100
@@ -275,6 +275,21 @@
esac
done
count=1
+ check=0
+ while true;do
+ sfdisk -s $DISK &>/dev/null
+ if [ $? = 0 ] || [ $check -eq 4 ];then
+ break
+ fi
+ Echo "Waiting for disk $DISK to settle..."
+ check=`expr $check + 1`
+ sleep 2
+ done
+ if ! sfdisk -s $DISK &>/dev/null;then
+ systemException \
+ "Disk $DISK doesn't appear... fatal !" \
+ "reboot"
+ fi
updateNeeded initialize
if linuxPartition $DISK;then
mountSystem $imageDevice
@@ -359,7 +374,7 @@
-r $imageMD5s -l /etc/image.md5 $imageServer 2>&1`
if ! loadOK "$loadStatus";then
systemException \
- "Failed to load image MD5: $imageName -> no such image MD5" \
+ "Failed to load image MD5: $imageName -> no such file" \
"reboot"
fi
IFS=" "
@@ -409,7 +424,7 @@
# ----
Echo "Download complete, checking data..."
dd if=$imageDevice bs=1024 2>/dev/null |\
- tail --bytes=$((blocks * blocksize)) |\
+ head --bytes=$((blocks * blocksize)) |\
md5sum - > /etc/ireal.md5
read sum2 dumy < /etc/ireal.md5
if test $sum1 = $sum2;then
@@ -808,5 +823,5 @@
if [ $PIVOT = "true" ];then
exec umount -n -l /mnt
else
- exec /bin/chroot . /sbin/init $@
+ exec chroot . /sbin/init $@
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/oemboot/suse-linuxrc new/kiwi/system/boot/oemboot/suse-linuxrc
--- old/kiwi/system/boot/oemboot/suse-linuxrc 2007-11-20 15:19:38.000000000 +0100
+++ new/kiwi/system/boot/oemboot/suse-linuxrc 2007-11-26 10:36:02.000000000 +0100
@@ -317,6 +317,7 @@
"reboot"
fi
fi
+
#======================================
# 10) repartition the disk device
#--------------------------------------
@@ -363,13 +364,15 @@
diskXMBytes=`expr $diskXMBytes / 1024`
if [ $disk1MBytes -gt $diskXMBytes ];then
# /.../
- # Very small disk, we use half of the size for root and
- # assume the rest is ok for /home and /. Additionally we set
- # the swap space to 50MB. All this could fail if the disk
- # is really small so that / doesn't fit into half of
- # $diskXMBytes
+ # Very small disk, we use the size of the root partition (/)
+ # plus 200MB, we assume the rest is ok for /home and a
+ # 50MB swap space. All this could fail if the disk
+ # is so small that only / without any additional space
+ # fits on it
# ----
- disk1MBytes=`expr $diskXMBytes / 2`
+ disk1MBytes=`sfdisk -s $deviceRoot`
+ disk1MBytes=`expr $disk1MBytes / 1024`
+ disk1MBytes=`expr $disk1MBytes + 200`
swapsize=50
fi
for cmd in \
@@ -542,8 +545,14 @@
setupDefaultFstab /config
updateSwapDeviceFstab /config $deviceSwap
if [ -z "$UNIONFS_CONFIG" ]; then
- echo "$deviceRoot / $FSTYPE defaults 0 0" >> /config/etc/fstab
- echo "$deviceHome /home ext3 defaults 0 0" >> /config/etc/fstab
+ echo "$deviceRoot / $FSTYPE defaults 0 0" >> /config/etc/fstab
+ if [ ! -d /mnt/home/* ];then
+ echo "$deviceHome /home ext3 defaults 0 0" >> /config/etc/fstab
+ else
+ Echo "Found non empty home/ directory !"
+ Echo "Will not activate home partition $deviceHome in fstab"
+ echo "#$deviceHome /home ext3 defaults 0 0" >> /config/etc/fstab
+ fi
else
mkdir -p /config/kiwiboot
echo "$deviceBoot /kiwiboot ext2 defaults 0 0" >> /config/etc/fstab
@@ -604,7 +613,7 @@
/mnt/sbin/pivot_root . mnt >/dev/null 2>&1
if test $? != 0;then
PIVOT=false
- mount --move . / && chroot . ./preinit
+ cleanInitrd && mount --move . / && chroot . ./preinit
chroot . rm -f ./preinit
chroot . rm -f ./include
chroot . rm -rf ./image
@@ -619,7 +628,14 @@
#======================================
# 22 Unmount initrd / system init
#--------------------------------------
-Echo "Rebooting System to activate setup..."
-reboot -f -i &>/dev/null
-Echo "Failed to reboot system"
-/bin/sh
+echo " "
+echo "Booting into final System..."
+echo "----------------------------"
+export IFS=$IFS_ORIG
+mount -n -o remount,rw / 2>/dev/null
+if [ $PIVOT = "true" ];then
+ exec umount -n -l /mnt
+else
+ exec chroot . /sbin/init $@
+fi
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org