Hello community,
here is the log from the commit of package kiwi
checked in at Wed Nov 14 12:13:30 CET 2007.
--------
--- arch/i386/kiwi/kiwi.changes 2007-11-09 17:00:59.000000000 +0100
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2007-11-14 10:52:08.841805000 +0100
@@ -1,0 +2,22 @@
+Wed Nov 14 10:49:39 CET 2007 - ms@suse.de
+
+- v1.87
+- fixed oemboot initrd to be able to reboot the system (#341310)
+
+-------------------------------------------------------------------
+Mon Nov 12 09:53:33 CET 2007 - ms@suse.de
+
+- v1.87
+- added warning message to check the architecture / repository
+ combination if a pattern match results in an empty list (#340263)
+- changed oemboot initrd to reboot the system (#341310)
+- added faster md5sum check. A fixed blocksize is used. Patch
+ by Peter Stark (#341240)
+- fixed removal of cache dir in case of interrupt
+- fixed shell wait call to provide the correct exit code of the
+ process which wait is waiting for
+- better local and remote pattern file check
+- better USB stick detection, wait until device is ready
+ remove static sleep
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.z26834/_old 2007-11-14 12:08:41.000000000 +0100
+++ /var/tmp/diff_new_pack.z26834/_new 2007-11-14 12:08:41.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package kiwi (Version 1.86)
+# spec file for package kiwi (Version 1.87)
#
# 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.86
+Version: 1.87
Release: 1
Group: System/Management
License: GPL v2 or later
@@ -353,6 +353,22 @@
%doc %{_datadir}/kiwi/image/oemboot/README
%{_datadir}/kiwi/image/oemboot/suse*
%changelog
+* Wed Nov 14 2007 - ms@suse.de
+- v1.87
+- fixed oemboot initrd to be able to reboot the system (#341310)
+* Mon Nov 12 2007 - ms@suse.de
+- v1.87
+- added warning message to check the architecture / repository
+ combination if a pattern match results in an empty list (#340263)
+- changed oemboot initrd to reboot the system (#341310)
+- added faster md5sum check. A fixed blocksize is used. Patch
+ by Peter Stark (#341240)
+- fixed removal of cache dir in case of interrupt
+- fixed shell wait call to provide the correct exit code of the
+ process which wait is waiting for
+- better local and remote pattern file check
+- better USB stick detection, wait until device is ready
+ remove static sleep
* Fri Nov 09 2007 - ms@suse.de
- v1.86
- fixed date string in usage information (#340224)
++++++ 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-09 16:52:55.000000000 +0100
+++ new/kiwi/kiwi.pl 2007-11-14 09:28:47.000000000 +0100
@@ -39,7 +39,7 @@
#============================================
# Globals (Version)
#--------------------------------------------
-our $Version = "1.86";
+our $Version = "1.87";
our $openSUSE = "http://download.opensuse.org/repositories/";
our $ConfigFile = "$ENV{'HOME'}/.kiwirc";
our $ConfigStatus = 0;
@@ -653,6 +653,7 @@
$kiwi -> done ();
my $pwd = crypt ($word1, $salt);
$kiwi -> info ("Your password:\n\t$pwd\n");
+ my $code = kiwiExit (0); return $code;
}
#==========================================
@@ -1155,9 +1156,10 @@
$boot -> cleanLoop ();
}
if (defined $root) {
- $root -> cleanManager();
+ $root -> cleanLock ();
$root -> cleanMount ();
$root -> cleanSource ();
+ $root -> cleanManager();
}
if (defined $image) {
$image -> cleanMount ();
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-09 16:52:51.000000000 +0100
+++ new/kiwi/modules/KIWIConfig.sh 2007-11-14 09:28:46.000000000 +0100
@@ -426,7 +426,7 @@
udevsettle udevtrigger mknod stat path_id hwup scsi_id scsi_tur
usb_id ata_id vol_id edd_id setctsid
"
- tools="$tools $1"
+ tools="$tools $@"
for path in /sbin /usr/sbin /usr/bin /bin;do
baseStripTools "$path" "$tools"
done
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-09 16:52:51.000000000 +0100
+++ new/kiwi/modules/KIWILinuxRC.sh 2007-11-14 09:28:46.000000000 +0100
@@ -827,8 +827,11 @@
}
function USBStickDevice {
stickFound=0
- for device in /sys/bus/usb/drivers/usb-storage/*;do
- if [ -L $device ];then
+ for redo in 1 2 3 4 5;do
+ for device in /sys/bus/usb/drivers/usb-storage/*;do
+ if [ ! -L $device ];then
+ continue
+ fi
descriptions=$device/host*/target*/*/block*
for description in $descriptions;do
if [ ! -d $description ];then
@@ -862,7 +865,9 @@
return
fi
done
- fi
+ done
+ Echo "Waiting for USB devices to settle..."
+ sleep 2
done
}
#======================================
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-10-31 16:38:45.000000000 +0100
+++ new/kiwi/modules/KIWIManager.pm 2007-11-14 09:28:46.000000000 +0100
@@ -638,9 +638,9 @@
print $fd "echo 1 > $screenCall.exit; exit 1; }\n";
print $fd "trap clean INT TERM\n";
print $fd "@smart update @channelList &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "test \$? = 0 && @smart download @pacs @loadOpts &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "echo \$? > $screenCall.exit\n";
print $fd "rm -f $root/etc/smart/channels/*\n";
$fd -> close();
@@ -695,13 +695,13 @@
if (defined $addPacks) {
my @addonPackages = @{$addPacks};
print $fd "chroot $root smart upgrade -y & ";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "test \$? = 0 && chroot $root smart install -y ";
print $fd "@addonPackages &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
} else {
print $fd "chroot $root smart upgrade -y &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
}
print $fd "echo \$? > $screenCall.exit\n";
$fd -> close();
@@ -721,13 +721,13 @@
if (defined $addPacks) {
my @addonPackages = @{$addPacks};
print $fd "chroot $root @zypper update & ";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "test \$? = 0 && chroot $root @zypper install ";
print $fd "@addonPackages &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
} else {
print $fd "chroot $root @zypper update &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
}
print $fd "echo \$? > $screenCall.exit\n";
$fd -> close();
@@ -788,9 +788,9 @@
print $fd "trap clean INT TERM\n";
print $fd "touch $lock\n";
print $fd "@smart update @channelList &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "test \$? = 0 && @smart install @packs @installOpts &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "echo \$? > $screenCall.exit\n";
print $fd "rm -f $root/etc/smart/channels/*\n";
print $fd "rm -f $lock\n";
@@ -829,10 +829,10 @@
print $fd "echo 1 > $screenCall.exit;exit 1; }\n";
print $fd "trap clean INT TERM\n";
print $fd "chroot $root smart update &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "test \$? = 0 && chroot $root smart install @install ";
print $fd "@installOpts &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "echo \$? > $screenCall.exit\n";
}
$fd -> close();
@@ -869,7 +869,7 @@
print $fd "trap clean INT TERM\n";
print $fd "touch $lock\n";
print $fd "@zypper --root $root install @installOpts @packs &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "echo \$? > $screenCall.exit\n";
print $fd "rm -f $lock\n";
} else {
@@ -902,7 +902,7 @@
print $fd "trap clean INT TERM\n";
print $fd "ZYPP_MODALIAS_SYSFS=/tmp\n";
print $fd "chroot $root @zypper install @installOpts @install &\n";
- print $fd "SPID=\$!;wait\n";
+ print $fd "SPID=\$!;wait \$SPID\n";
print $fd "echo \$? > $screenCall.exit\n";
}
$fd -> close();
@@ -1057,6 +1057,8 @@
sub setLock {
my $this = shift;
my $lock = $this->{lock};
+ my $kiwi = $this->{kiwi};
+ $kiwi -> loginfo ("Set package manager lock\n");
qx ( touch $lock );
}
@@ -1066,6 +1068,8 @@
sub freeLock {
my $this = shift;
my $lock = $this->{lock};
+ my $kiwi = $this->{kiwi};
+ $kiwi -> loginfo ("Release package manager lock\n");
qx ( rm -f $lock );
}
@@ -1075,10 +1079,12 @@
sub removeCacheDir {
my $this = shift;
my $dataDir = $this->{dataDir};
+ my $kiwi = $this->{kiwi};
+ $this -> freeLock();
if (defined $this->{child}) {
- $this -> freeLock();
kill 15,$this->{child};
}
+ $kiwi -> loginfo ("Removing cache directory: $dataDir\n");
qx (rm -rf $dataDir);
return $this;
}
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-02 16:20:46.000000000 +0100
+++ new/kiwi/modules/KIWIPattern.pm 2007-11-14 09:28:46.000000000 +0100
@@ -129,7 +129,7 @@
if ($load[0]) {
$result .= $load[0];
}
- push (@errors,$load[1]);
+ push (@errors,"[$url] -> $load[1]");
}
if (! $result) {
if ($printinfo) {
@@ -217,6 +217,8 @@
my $arch = $this->{arch};
my $kiwi = $this->{kiwi};
my $content;
+ my $pfile;
+ my $message;
if (defined $this->{cache}{$pattern}) {
return $this->{cache}{$pattern};
}
@@ -225,20 +227,21 @@
# local pattern check
#------------------------------------------
my $cfile = $url."/content";
- if (! -f $cfile) {
- return (undef,
- "Couldn't find content file: $cfile"
- );
+ if (-f $cfile) {
+ #==========================================
+ # check content file
+ #------------------------------------------
if (! open (FD,$cfile)) {
- return (undef,"Couldn't open content file: $cfile: $!");
+ $message = "couldn't open \$url/content file";
+ return (undef,"local[content]: $message: $!");
}
local $/; $content .= <FD>; close FD;
- }
- #==========================================
- # check content file
- #------------------------------------------
- my $pfile = $this -> checkContentData ($url,$content,$pattern);
- if (! defined $pfile) {
+ $pfile = $this -> checkContentData ($url,$content,$pattern);
+ if (! defined $pfile) {
+ $message = "pattern match or DESCRDIR search in content failed";
+ return (undef, "local[content]: $message: $pattern");
+ }
+ } else {
#===========================================
# no content file but local, try glob search
#-------------------------------------------
@@ -248,9 +251,8 @@
@file = bsd_glob ("$path/$pattern-*.$arch.pat.gz");
}
if (! @file) {
- return (undef,
- "Pattern glob match failed: $pattern"
- );
+ $message = "pattern glob match in dirlist failed";
+ return (undef,"local[glob]: $message: $pattern");
}
$pfile = $file[0];
}
@@ -258,12 +260,14 @@
# finally get the pattern
#------------------------------------------
if ($pfile =~ /\.gz$/) {
- if (! open (FD,"cat $pfile | gzip -cd|")) {
- return (undef,"Couldn't uncompress pattern: $pfile: $!");
+ if ((! -e $pfile) || (! open (FD,"cat $pfile | gzip -cd|"))) {
+ $message = "couldn't uncompress pattern";
+ return (undef,"local[gzip]: $message: $pfile: $!");
}
} else {
if (! open (FD,$pfile)) {
- return (undef,"Couldn't open pattern: $pfile: $!");
+ $message = "couldn't open pattern";
+ return (undef,"local[open]: $message: $pfile: $!");
}
}
local $/; $content .= <FD>;
@@ -283,17 +287,56 @@
my $request = HTTP::Request->new (GET => $location);
my $response = $browser -> request ( $request );
$content = $response -> content ();
- if (! defined $content) {
- return (undef,"Failed to load content file: $location");
- }
- #==========================================
- # check content file
- #------------------------------------------
- $location = $this -> checkContentData ($publics_url,$content,$pattern);
- if (! defined $location) {
- return (undef,
- "Pattern match or DESCRDIR search failed: $pattern"
+ if ((defined $content) && ($content ne "")) {
+ #==========================================
+ # check content file
+ #------------------------------------------
+ $location = $this -> checkContentData (
+ $publics_url,$content,$pattern
);
+ if (! defined $location) {
+ $message = "pattern match or DESCRDIR search in content failed";
+ return (undef, "remote[content]: $message: $pattern");
+ }
+ } else {
+ #==========================================
+ # no content file try remote file listing
+ #------------------------------------------
+ # Note:
+ # some firewalls block active FTP access which will cause
+ # download problems with LWP. This can be fixed by using
+ # export FTP_PASSIVE=1 in your shell environment
+ # ----
+ $location = $publics_url."//suse/setup/descr";
+ $request = HTTP::Request->new (GET => $location);
+ #$request -> header(Accept => "text/html");
+ $response = $browser -> request ( $request );
+ $content = $response -> content ();
+ if ((! defined $content) || ($content eq "")) {
+ $message = "couldn't get directory listing: ";
+ $message.= $response->status_line;
+ return (undef, "remote[dirlist]: $message: $location");
+ }
+ my $perr = 1;
+ my @plines = split (/\n/,$content);
+ foreach my $line (@plines) {
+ if ($line =~ /[\" ]($pattern-.*$arch\.pat\.gz)(\"|$)/) {
+ $location = $location."/".$1;
+ $this->{pzip} = 1;
+ $perr = 0;
+ last;
+ }
+ if ($line =~ /[\" ]($pattern-.*$arch\.pat)(\"|$)/) {
+ $location = $location."/".$1;
+ $this->{pzip} = 0;
+ $perr = 0;
+ last;
+ }
+ }
+ if ($perr) {
+ $message = "pattern glob match in dirlist failed";
+ return (undef, "remote[glob]: $message: $pattern");
+ }
}
#==========================================
# finally get the pattern
@@ -306,17 +349,20 @@
my $result = $? >> 8;
chomp $tmpdir;
if ($result != 0) {
- return (undef,"Couldn't create tmpdir: $!");
+ $message = "couldn't create tmpdir";
+ return (undef,"remote[tmpdir] $message: $!");
}
if (! open (FD,">$tmpdir/pattern")) {
rmdir ($tmpdir);
- return (undef,"Couldn't create: $tmpdir/pattern: $!");
+ $message = "couldn't create";
+ return (undef,"remote[open] $message: $tmpdir/pattern: $!");
}
print FD $content; close FD;
if (! open (FD,"cat $tmpdir/pattern | gzip -cd|")) {
unlink ($tmpdir."/pattern");
rmdir ($tmpdir);
- return (undef,"Couldn't uncompress pattern: $!");
+ $message = "couldn't uncompress pattern";
+ return (undef,"remote[gzip] $message: $!");
}
local $/; $content .= <FD>; close FD;
unlink ($tmpdir."/pattern");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIRoot.pm new/kiwi/modules/KIWIRoot.pm
--- old/kiwi/modules/KIWIRoot.pm 2007-11-08 13:53:59.000000000 +0100
+++ new/kiwi/modules/KIWIRoot.pm 2007-11-14 09:28:46.000000000 +0100
@@ -750,4 +750,17 @@
return $this;
}
+#==========================================
+# cleanLock
+#------------------------------------------
+sub cleanLock {
+ # ...
+ # remove stale lock files
+ # ---
+ my $this = shift;
+ my $manager = $this->{manager};
+ $manager -> freeLock();
+ return $this;
+}
+
1;
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-07 10:59:22.000000000 +0100
+++ new/kiwi/modules/KIWIXML.pm 2007-11-14 09:28:46.000000000 +0100
@@ -1379,6 +1379,15 @@
$pattr{patternType},$pattr{patternPackageType}
);
if (! defined $psolve) {
+ $kiwi -> warning (
+ "Pattern match failed for arch: $this->{arch}\n"
+ );
+ $kiwi -> warning (
+ " a) Check if the pattern is written correctly?\n"
+ );
+ $kiwi -> warning (
+ " b) Check if the arch is provided by the repo(s)?\n"
+ );
return ();
}
my @packageList = $psolve -> getPackages();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/.revision new/kiwi/.revision
--- old/kiwi/.revision 2007-11-09 17:00:40.000000000 +0100
+++ new/kiwi/.revision 2007-11-14 10:51:50.000000000 +0100
@@ -1 +1 @@
-801
\ No newline at end of file
+809
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/isoboot/suse-linuxrc new/kiwi/system/boot/isoboot/suse-linuxrc
--- old/kiwi/system/boot/isoboot/suse-linuxrc 2007-11-08 13:53:56.000000000 +0100
+++ new/kiwi/system/boot/isoboot/suse-linuxrc 2007-11-14 09:28:45.000000000 +0100
@@ -123,7 +123,8 @@
fi
Echo "Loading $imageName [$imageDevice]..."
gzip -cd $gzippName | dd of=$imageDevice >/dev/null 2>&1
- dd if=$imageDevice count=$blocks bs=$blocksize 2>/dev/null |\
+ dd if=$imageDevice bs=1024 2>/dev/null |\
+ head --bytes=$((blocks * blocksize)) |\
md5sum - > /etc/ireal.md5
read sum2 dumy < /etc/ireal.md5
if test $sum1 = $sum2;then
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-08 13:53:54.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-linuxrc 2007-11-14 09:28:44.000000000 +0100
@@ -406,7 +406,8 @@
# check the md5sum of the downloaded data records
# ----
Echo "Download complete, checking data..."
- dd if=$imageDevice count=$blocks bs=$blocksize 2>/dev/null |\
+ dd if=$imageDevice bs=1024 2>/dev/null |\
+ tail --bytes=$((blocks * blocksize)) |\
md5sum - > /etc/ireal.md5
read sum2 dumy < /etc/ireal.md5
if test $sum1 = $sum2;then
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-08 13:53:52.000000000 +0100
+++ new/kiwi/system/boot/oemboot/suse-linuxrc 2007-11-14 10:44:53.000000000 +0100
@@ -593,7 +593,7 @@
/mnt/sbin/pivot_root . mnt >/dev/null 2>&1
if test $? != 0;then
PIVOT=false
- cleanInitrd && mount --move . / && chroot . ./preinit
+ mount --move . / && chroot . ./preinit
chroot . rm -f ./preinit
chroot . rm -f ./include
chroot . rm -rf ./image
@@ -613,14 +613,7 @@
#======================================
# 21) Unmount initrd / system init
#--------------------------------------
-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
-
+Echo "Rebooting System to activate setup..."
+/sbin/reboot -f -i &>/dev/null
+Echo "Failed to reboot system"
+/bin/sh
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/usbboot/suse-linuxrc new/kiwi/system/boot/usbboot/suse-linuxrc
--- old/kiwi/system/boot/usbboot/suse-linuxrc 2007-11-09 16:52:49.000000000 +0100
+++ new/kiwi/system/boot/usbboot/suse-linuxrc 2007-11-14 09:28:45.000000000 +0100
@@ -75,8 +75,6 @@
for module in ehci-hcd uhci-hcd usb_storage sg sd_mod;do
modprobe $module &>/dev/null
done
-Echo "Waiting for USB devices to settle..."
-sleep 10
#======================================
# 7) Search USB stick device
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org