Hello community,
here is the log from the commit of package kiwi
checked in at Thu Apr 19 21:48:35 CEST 2007.
--------
--- kiwi/kiwi.changes 2007-04-06 15:03:31.000000000 +0200
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2007-04-19 14:16:31.614851000 +0200
@@ -1,0 +2,20 @@
+Thu Apr 19 17:05:53 CEST 2007 - ms@suse.de
+
+- v1.27
+- fixed xennetboot requirements, adapt .dot graph
+- added loop search while creating virtual disk
+- added --non-interactive option for zypper. Unfortunately there
+ are still questions in case of gpg keys or missing patterns
+- added pxe: target within <type> of config.xml
+ This allows you to create the system and boot image in one
+ creation run from the same source the system image used
+- added root log file which contains all data from kiwi and
+ the screen sessions
+- include enhancements for deploy section, allow server and
+ blocksize to be set, allow configuration files to be
+ included. fixed partition setup
+- fixed suseRemoveService to know about dependant services
+- added suseService/suseServiceDefaultOn by
+ Mike Veltman
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.c31760/_old 2007-04-19 21:48:24.000000000 +0200
+++ /var/tmp/diff_new_pack.c31760/_new 2007-04-19 21:48:24.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kiwi (Version 1.26)
+# spec file for package kiwi (Version 1.27)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -15,7 +15,7 @@
BuildRequires: module-init-tools perl perl-XML-LibXML perl-libwww-perl screen smart syslinux
Requires: perl perl-XML-LibXML perl-libwww-perl screen
Summary: OpenSuSE - KIWI Image System
-Version: 1.26
+Version: 1.27
Release: 1
Group: System/Management
License: GNU General Public License (GPL)
@@ -105,7 +105,7 @@
Marcus Schaefer
%package -n kiwi-desc-xennetboot
-Requires: kiwi smart
+Requires: kiwi smart kiwi-desc-netboot
Summary: OpenSuSE - KIWI Image System PXE Xen Network boot
Group: System/Management
@@ -288,6 +288,23 @@
%{_datadir}/kiwi/image/xenboot
%changelog
+* Thu Apr 19 2007 - ms@suse.de
+- v1.27
+- fixed xennetboot requirements, adapt .dot graph
+- added loop search while creating virtual disk
+- added --non-interactive option for zypper. Unfortunately there
+ are still questions in case of gpg keys or missing patterns
+- added pxe: target within <type> of config.xml
+ This allows you to create the system and boot image in one
+ creation run from the same source the system image used
+- added root log file which contains all data from kiwi and
+ the screen sessions
+- include enhancements for deploy section, allow server and
+ blocksize to be set, allow configuration files to be
+ included. fixed partition setup
+- fixed suseRemoveService to know about dependant services
+- added suseService/suseServiceDefaultOn by
+ Mike Veltman
* Fri Apr 06 2007 - ms@suse.de
- v1.26
- fixed logging to /var/log/kiwi
++++++ kiwi.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/deploy.tex new/kiwi/doc/deploy.tex
--- old/kiwi/doc/deploy.tex 2007-03-16 17:36:47.000000000 +0100
+++ new/kiwi/doc/deploy.tex 2007-04-19 14:10:16.000000000 +0200
@@ -33,7 +33,7 @@
some prebuild boot images.
If the plan is to use a system image for which no prebuild boot image
-exist, it is need to create a custom boot image before a system image
+exist, it is needed to create a custom boot image before a system image
could be deployed. Boot images consists of the image itself and
the appropriate kernel to that image. Both file must be stored in
the directory \textit{/var/lib/tftpboot/boot}. Assuming there is no
@@ -41,7 +41,8 @@
to create it are as follows:
\begin{Command}{13cm}
- kiwi --prepare netboot-suse-10.2 --root /tmp/myroot\\
+ cd /usr/share/kiwi/image
+ kiwi --prepare netboot/suse-10.2 --root /tmp/myroot\\
kiwi --create /tmp/myroot -d /tmp
\end{Command}
@@ -53,6 +54,21 @@
/tmp/initrd-netboot-suse-10.2.i686-2.1.1.kernel.2.6.18.2-31-default
\end{verbatim}
+If you don't want to prepare/create the boot image manually you
+can let kiwi do the job by setting up the \textbf{pxe} type in your
+system image config.xml file. For example:
+
+\begin{Command}{12cm}
+<preferences>\\
+\hspace*{1cm}<type>pxe:ext3:netboot/suse-10.2</type>\\
+\hspace*{1cm}...\\
+</preferences>
+\end{Command}
+
+In this case the boot image will be created automatically and from
+the same source as the system image as soon as the \textbf{creation}
+step is performed for the system image.
+
The next step is to make the boot image known to the TFTP server.
To do this the files must be copied to the \textit{/var/lib/tftpboot/boot}
directory. Optionally they can be renamed. For the following
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/image.tex new/kiwi/doc/image.tex
--- old/kiwi/doc/image.tex 2007-03-26 18:02:49.000000000 +0200
+++ new/kiwi/doc/image.tex 2007-04-19 14:10:16.000000000 +0200
@@ -79,7 +79,7 @@
options, and which packages make up the image. The structure of the
file corresponds to the format
- \begin{Command}{13cm}
+ \begin{Command}{15cm}
<image name="Name" inherit="optional-path">\\
\hspace*{1cm}<description type="boot|system">\\
\hspace*{2cm}<author>Marcus Schaefer</author>\\
@@ -102,6 +102,13 @@
\hspace*{1cm}<repository type="Type">\\
\hspace*{2cm}<source path="URL"/>\\
\hspace*{1cm}</repository>\\
+ \hspace*{1cm}\\
+ \hspace*{2cm}<partitions device="/dev/sda">\\
+ \hspace*{3cm}<partition type="swap" number="1" size="10"/>\\
+ \hspace*{3cm}\\
+ \hspace*{2cm}</partitions>\\
+ \hspace*{2cm}<configuration source="bob" dest="/etc/bob"/>\\
+ \hspace*{1cm}</deploy>\\
\hspace*{1cm}<packages type="Type">\\
\hspace*{2cm}<package name="Packagename" arch="Arch"/>\\
\hspace*{2cm}<opensusePattern name="Patternname"/>\\
@@ -173,6 +180,11 @@
as the xen configuration file. type specifies
one of ext2,ext3 or reiserfs and filename must
be the name of an appropriate xenboot boot image
+ \item pxe:type:filename\\
+ to create PXE boot and system image. type
+ specifies one of ext2,ext3 or reiserfs and
+ filename must be the name of an appropriate
+ netboot or xennetboot boot image
\item split:type-rw,type-ro\\
to create a splitted image into a read-only
and a read-write part. type-rw specifies one of
@@ -287,8 +299,9 @@
\begin{Command}{9cm}
\textbf{\#!/bin/sh}\\
-\textbf{echo -n "}Image [$<$name$>$]...\textbf{"}\\
+\textbf{test -f /.kconfig \&\& . /.kconfig}\\
\textbf{test -f /.profile \&\& . /.profile}\\
+\textbf{echo -n "}Image [$<$name$>$]...\textbf{"}\\
\\
... script code\\
\\
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/intro.tex new/kiwi/doc/intro.tex
--- old/kiwi/doc/intro.tex 2007-03-16 17:36:47.000000000 +0100
+++ new/kiwi/doc/intro.tex 2007-04-19 14:10:16.000000000 +0200
@@ -104,6 +104,11 @@
\item \textbf{\underline{xen:<fstype>:<boot-image-name>}}\\
Xen machine system image, which means an image plus boot image will
be created including the Xen configuration to start the image.
+ \item \textbf{\underline{pxe:<fstype>:<boot-image-name>}}\\
+ PXE system image, which means an image plus boot image will
+ be created. Additionally one can add a deploy section into the
+ config.xml which is used to created the config.<MAC> file for
+ the pxe network deployment of this image
\item \textbf{\underline{split: image support}}\\
Which means the image is splitted into a read-only and a
read-write part whereas each part can have a different
Files old/kiwi/doc/kiwi.pdf and new/kiwi/doc/kiwi.pdf differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/kiwi.tex new/kiwi/doc/kiwi.tex
--- old/kiwi/doc/kiwi.tex 2007-02-06 17:26:34.000000000 +0100
+++ new/kiwi/doc/kiwi.tex 2007-04-19 14:10:16.000000000 +0200
@@ -100,7 +100,7 @@
\vspace{2cm}
\begin{tabbing}
\hspace{2.6cm} Author: \quad\= Marcus Schaefer\\
- \hspace{2.6cm} Datum:\> \today\\
+ \hspace{2.6cm} Date:\> \today\\
\hspace{2.6cm} Revision:\> \input {Revision.txt}
\end{tabbing}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/doc/Revision.txt new/kiwi/doc/Revision.txt
--- old/kiwi/doc/Revision.txt 2007-03-26 18:02:49.000000000 +0200
+++ new/kiwi/doc/Revision.txt 2007-04-19 14:10:16.000000000 +0200
@@ -1 +1 @@
-3.1
+3.2
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/.kiwi.dot new/kiwi/.kiwi.dot
--- old/kiwi/.kiwi.dot 2007-04-04 11:39:41.000000000 +0200
+++ new/kiwi/.kiwi.dot 2007-04-19 14:10:16.000000000 +0200
@@ -25,6 +25,7 @@
"kiwi-desc-xennetboot" -> "kiwi"
"kiwi-desc-xennetboot" -> "smart"
+ "kiwi-desc-xennetboot" -> "kiwi-desc-netboot"
"kiwi-desc-xenboot" -> "kiwi"
"kiwi-desc-xenboot" -> "smart"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/kiwi.pl new/kiwi/kiwi.pl
--- old/kiwi/kiwi.pl 2007-04-06 15:00:49.000000000 +0200
+++ new/kiwi/kiwi.pl 2007-04-19 14:10:16.000000000 +0200
@@ -205,6 +205,10 @@
$ok = $image -> createImageXen ( $1 );
last SWITCH;
};
+ /^pxe:(.*)/ && do {
+ $ok = $image -> createImagePXE ( $1 );
+ last SWITCH;
+ };
$kiwi -> error ("Unsupported type: $type");
$kiwi -> failed ();
my $code = kiwiExit (1); return $code;
@@ -518,6 +522,15 @@
}
return $code;
}
+ my $rootLog = $kiwi -> getRootLog();
+ if (( -f $rootLog) && ($rootLog =~ /(.*)\/.*/)) {
+ my $logfile = $1;
+ $logfile =~ s/\/$//;
+ $logfile = "$logfile.log";
+ $kiwi -> info ("Logfile available at: $logfile");
+ $kiwi -> done ();
+ qx (mv $rootLog $logfile 2>&1);
+ }
if ($code != 0) {
$kiwi -> error ("KIWI exited with error(s)");
$kiwi -> done ();
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-04-04 11:39:41.000000000 +0200
+++ new/kiwi/modules/KIWIBoot.pm 2007-04-19 14:10:16.000000000 +0200
@@ -489,9 +489,30 @@
my $diskname = $system.".qemu";
my $vmdkname = $system.".vmdk";
my $loop = "/dev/loop0";
+ my $loopfound = 0;
my $result;
my $status;
#==========================================
+ # search free loop device
+ #------------------------------------------
+ $kiwi -> info ("Searching for free loop device...");
+ for (my $id=0;$id<=7;$id++) {
+ $status = qx ( /sbin/losetup /dev/loop$id 2>&1 );
+ $result = $? >> 8;
+ if ($result eq 1) {
+ $loopfound = 1;
+ $loop = "/dev/loop".$id;
+ last;
+ }
+ }
+ if (! $loopfound) {
+ $kiwi -> failed ();
+ $kiwi -> error ("Couldn't find free loop device");
+ $kiwi -> failed ();
+ return undef;
+ }
+ $kiwi -> done();
+ #==========================================
# create virtual disk
#------------------------------------------
$kiwi -> info ("Creating virtual disk...");
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-04-04 11:39:41.000000000 +0200
+++ new/kiwi/modules/KIWIConfig.sh 2007-04-19 14:10:16.000000000 +0200
@@ -47,10 +47,25 @@
#--------------------------------------
function suseRemoveService {
# /.../
- # Remove a service using insserv -r
+ # Remove a service and its dependant services
+ # using insserv -r
# ----
- local service=$1
- /sbin/insserv -r $service
+ local service=/etc/init.d/$1
+ while true;do
+ /sbin/insserv -r $service &>/dev/null
+ if [ $? = 0 ];then
+ echo "Service $service removed"
+ break
+ else
+ result=`/sbin/insserv -r $service 2>&1|tail -n 2|cut -f10 -d " "`
+ if [ -f /etc/init.d/$result ];then
+ suseRemoveService $result
+ else
+ echo "$service: $result not found...skipped"
+ break
+ fi
+ fi
+ done
}
#======================================
@@ -73,6 +88,53 @@
}
#======================================
+# suseService
+#--------------------------------------
+function suseService {
+ # /.../
+ # if a service exist then enable or disable it using chkconfig
+ # example : suseService apache2 on
+ # example : suseService apache2 off
+ # ----
+ local service=$1
+ local action=$2
+ if [ -x /etc/init.d/$i ] && [ -f /etc/init.d/$service ];then
+ if [ $action = on ];then
+ /sbin/chkconfig $service on
+ elif [ $action = off ];then
+ /sbin/chkconfig $service off
+ fi
+ fi
+}
+
+#======================================
+# suseServiceDefaultOn
+#--------------------------------------
+function suseServiceDefaultOn {
+ # /.../
+ # Some basic services that needs to be on.
+ # ----
+ services=(
+ boot.rootfsck
+ boot.cleanup
+ boot.localfs
+ boot.localnet
+ boot.clock
+ policykitd
+ haldaemon
+ network
+ atd
+ syslog
+ cron
+ )
+ for i in "${services[@]}";do
+ if [ -x /etc/init.d/$i ] && [ -f /etc/init.d/$i ];then
+ /sbin/chkconfig $i on
+ fi
+ done
+}
+
+#======================================
# baseSetupBoot
#--------------------------------------
function baseSetupBoot {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIConfigure.pm new/kiwi/modules/KIWIConfigure.pm
--- old/kiwi/modules/KIWIConfigure.pm 2007-03-26 18:02:49.000000000 +0200
+++ new/kiwi/modules/KIWIConfigure.pm 2007-04-19 14:10:16.000000000 +0200
@@ -176,7 +176,7 @@
my $file = "/screenrc.svn";
my $screenCall = $root.$file;
my $screenCtrl = $root."/screenrc.ctl";
- my $screenLogs = $root."/screenrc.log";
+ my $screenLogs = $kiwi -> getRootLog();
my $data;
my $code;
#==========================================
@@ -189,6 +189,7 @@
return undef;
}
print CD "logfile $screenLogs\n";
+ print CD "logfile flush 0\n";
close CD;
#==========================================
# Create screen call file
@@ -237,7 +238,6 @@
}
qx ( rm -f $screenCall* );
qx ( rm -f $screenCtrl );
- qx ( rm -f $screenLogs );
#==========================================
# check exit code from screen session
#------------------------------------------
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-04-05 16:01:52.000000000 +0200
+++ new/kiwi/modules/KIWIImage.pm 2007-04-19 14:10:16.000000000 +0200
@@ -76,6 +76,7 @@
$kiwi -> failed ();
return undef;
}
+ $kiwi -> setRootLog ($imageTree."/screenrc.log");
$arch = qx ( arch ); chomp ( $arch );
$arch = ".$arch";
return $this;
@@ -364,6 +365,34 @@
}
#==========================================
+# createImagePXE
+#------------------------------------------
+sub createImagePXE {
+ # ...
+ # Create Image usable within a PXE boot environment. The
+ # method will create the specified boot image (initrd) and
+ # the system image. In order to use this image via PXE the
+ # administration needs to provide the images via TFTP
+ #
+ # NOTE: Because the steps of creating
+ # a PXE image are the same as creating an usb stick image
+ # we make use of the usb code above to create the system and boot
+ # image
+ # ---
+ #==========================================
+ # Create PXE boot and system image
+ #------------------------------------------
+ my $this = shift;
+ my $para = shift;
+ my $name = createImageUSB ($this,$para,"PXE");
+ if (! defined $name) {
+ return undef;
+ }
+ $main::Survive = "default";
+ return $this;
+}
+
+#==========================================
# createImageVMX
#------------------------------------------
sub createImageVMX {
@@ -1066,7 +1095,7 @@
sub writeImageConfig {
my $name = shift;
my $configName = buildImageName() . ".config";
- my $device = $xml -> getImageDevice ();
+ my $device = $xml -> getDeployImageDevice ();
#==========================================
# create .config for types which needs it
@@ -1079,12 +1108,18 @@
return undef;
}
my $namecd = buildImageName(";");
- print FD "IMAGE=${device}2;$namecd\n";
+ my $server = $xml -> getDeployServer ();
+ my $blocks = $xml -> getDeployBlockSize ();
+ if ($xml->getCompressed()) {
+ print FD "IMAGE=${device}2;$namecd;$server;$blocks;compressed\n";
+ } else {
+ print FD "IMAGE=${device}2;$namecd;$server;$blocks\n";
+ }
print FD "DISK=${device}\n";
#==========================================
# PART information
#------------------------------------------
- my @parts = $xml -> getPartitions ();
+ my @parts = $xml -> getDeployPartitions ();
if ((scalar @parts) > 0) {
print FD "PART=";
for my $href (@parts) {
@@ -1093,17 +1128,28 @@
} else {
print FD $href->{size};
}
-
if ($href -> {type} eq "swap") {
print FD ";S;x,";
} else {
my $mountpoint = $href -> {mountpoint};
- print FD ";L;$mountpoint,";
+ my $type = $href -> {type};
+ print FD ";$type;$mountpoint,";
}
}
print FD "\n";
}
#==========================================
+ # CONF information
+ #------------------------------------------
+ my %confs = $xml -> getDeployConfiguration ();
+ if ((scalar keys %confs) > 0) {
+ print FD "CONF=";
+ foreach my $source (keys %confs) {
+ print FD "$source;$confs{$source};$server;$blocks,";
+ }
+ print FD "\n";
+ }
+ #==========================================
# COMBINED_IMAGE information
#------------------------------------------
if ($xml -> getImageType () =~ /^split:(.*)/) {
@@ -1117,6 +1163,8 @@
} else {
$kiwi -> skipped ();
}
+ # Reset main::ImageName...
+ buildImageName();
return $configName;
}
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-03-26 17:31:09.000000000 +0200
+++ new/kiwi/modules/KIWILog.pm 2007-04-19 14:10:16.000000000 +0200
@@ -26,9 +26,9 @@
#------------------------------------------
my @showLevel = (0,1,2,3,4,5);
my $channel = \*STDOUT;
+my $errorOk = 0;
+my $rootLog;
my $logfile;
-my $errorFile = "/var/log/kiwi";
-my $errorOk = 1;
#==========================================
# Constructor
@@ -41,11 +41,7 @@
# ---
my $this = {};
my $class = shift;
- bless $this,$class;
- if (! (open EFD,">$errorFile")) {
- warning ( $this,"Couldn't open error log channel: $!\n" );
- $errorOk = 0;
- }
+ bless $this,$class;
return $this;
}
@@ -277,6 +273,41 @@
}
#==========================================
+# setRootLog
+#------------------------------------------
+sub setRootLog {
+ # ...
+ # set a root log file which corresponds with the
+ # screen log file so that there is a complete log per
+ # image prepare/build process available
+ # ---
+ my $this = shift;
+ my $file = shift;
+ if ($errorOk) {
+ return;
+ }
+ info ( $this, "Setting up root log on: $file..." );
+ if (! (open EFD,">$file")) {
+ skipped ();
+ warning ( $this,"Couldn't open root log channel: $!\n" );
+ $errorOk = 0;
+ }
+ done ();
+ $rootLog = $file;
+ $errorOk = 1;
+}
+
+#==========================================
+# getRootLog
+#------------------------------------------
+sub getRootLog {
+ # ...
+ # return the current root log file name
+ # ---
+ return $rootLog;
+}
+
+#==========================================
# Destructor
#------------------------------------------
sub DESTROY {
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-03-23 13:51:22.000000000 +0100
+++ new/kiwi/modules/KIWIManager.pm 2007-04-19 14:10:16.000000000 +0200
@@ -279,7 +279,7 @@
push (@zopts,"--type $val");
}
}
- my $sadd = "service-add @zopts $alias";
+ my $sadd = "--non-interactive service-add @zopts $alias";
if (! $chroot) {
$kiwi -> info ("Adding local zypper service: $alias");
$data = qx (bash -c "yes | zypper --root $root $sadd 2>&1");
@@ -376,7 +376,7 @@
#------------------------------------------
my $screenCall = $root."/screenrc.smart";
my $screenCtrl = $root."/screenrc.ctrls";
- my $screenLogs = $root."/screenrc.log";
+ my $screenLogs = $kiwi -> getRootLog();
#==========================================
# Initiate screen call file
@@ -388,6 +388,7 @@
return undef;
}
print CD "logfile $screenLogs\n";
+ print CD "logfile flush 0\n";
close CD;
#==========================================
# smart
@@ -433,7 +434,6 @@
}
qx ( rm -f $screenCall* );
qx ( rm -f $screenCtrl );
- qx ( rm -f $screenLogs );
#==========================================
# check exit code from screen session
#------------------------------------------
@@ -466,7 +466,7 @@
#------------------------------------------
my $screenCall = $root."/screenrc.smart";
my $screenCtrl = $root."/screenrc.ctrls";
- my $screenLogs = $root."/screenrc.log";
+ my $screenLogs = $kiwi -> getRootLog();
#==========================================
# Initiate screen call file
@@ -479,6 +479,7 @@
return undef;
}
print CD "logfile $screenLogs\n";
+ print CD "logfile flush 0\n";
close CD;
#==========================================
# smart
@@ -492,6 +493,7 @@
"-o deb-root=$root",
"-o force-channels=$forceChannels",
"--explain",
+ "--log-level=error",
"-y"
);
#==========================================
@@ -524,6 +526,7 @@
}
my @installOpts = (
"--explain",
+ "--log-level=error",
"-y"
);
my $force = $xml -> getRPMForce();
@@ -586,7 +589,6 @@
}
qx ( rm -f $screenCall* );
qx ( rm -f $screenCtrl );
- qx ( rm -f $screenLogs );
#==========================================
# check exit code from screen session
#------------------------------------------
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-04-04 11:39:41.000000000 +0200
+++ new/kiwi/modules/KIWIRoot.pm 2007-04-19 14:10:16.000000000 +0200
@@ -160,6 +160,11 @@
return undef;
}
#==========================================
+ # Set root log file
+ #------------------------------------------
+ $kiwi -> setRootLog ($root."/screenrc.log");
+
+ #==========================================
# Get configured name of package manager
#------------------------------------------
$kiwi -> info ("Setting up package manager: ");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIScheme.tst new/kiwi/modules/KIWIScheme.tst
--- old/kiwi/modules/KIWIScheme.tst 2007-04-05 16:01:52.000000000 +0200
+++ new/kiwi/modules/KIWIScheme.tst 2007-04-19 14:10:16.000000000 +0200
@@ -28,11 +28,15 @@
<source path="/image/dist/full-10.2-i386"/>
</repository>
- <deploy>
+ <deploy server="192.168.1.1" blocksize="4096">
<partitions device="/dev/sda">
- <partition type="bla" number="2" size="200"/>
+ <partition type="swap" number="1" size="1000"/>
+ <partition type="L" number="2" size="10000" mountpoint="/"/>
+ <partition type="fd" number="3"/>
</partitions>
- </deploy>
+ <configuration source="bla1" dest="blub1"/>
+ <configuration source="lala" dest="/etc/lala"/>
+ </deploy>
<packages type="image" patternType="onlyRequired">
<package name="libgnomesu"/>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/modules/KIWIScheme.xsd new/kiwi/modules/KIWIScheme.xsd
--- old/kiwi/modules/KIWIScheme.xsd 2007-04-05 16:01:52.000000000 +0200
+++ new/kiwi/modules/KIWIScheme.xsd 2007-04-19 14:10:16.000000000 +0200
@@ -58,7 +58,10 @@
xs:complexType
xs:sequence
+
+
+
@@ -79,6 +82,13 @@
+
+ xs:complexType
+
+
+
+
+
xs:complexType
xs:sequence
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-04-05 16:01:52.000000000 +0200
+++ new/kiwi/modules/KIWIXML.pm 2007-04-19 14:10:16.000000000 +0200
@@ -34,7 +34,9 @@
my $repositNodeList;
my $packageNodeList;
my $imgnameNodeList;
+my $deploysNodeList;
my $partitionsNodeList;
+my $configfileNodeList;
my @urllist;
my $arch;
@@ -86,7 +88,11 @@
$repositNodeList = $systemTree -> getElementsByTagName ("repository");
$packageNodeList = $systemTree -> getElementsByTagName ("packages");
$imgnameNodeList = $systemTree -> getElementsByTagName ("image");
- $partitionsNodeList = $systemTree -> getElementsByTagName("partitions");
+ $deploysNodeList = $systemTree -> getElementsByTagName ("deploy");
+ $partitionsNodeList = $systemTree
+ -> getElementsByTagName ("partitions");
+ $configfileNodeList = $systemTree
+ -> getElementsByTagName("configuration");
};
if ($@) {
$kiwi -> failed ();
@@ -207,9 +213,9 @@
}
#==========================================
-# getImageDevice
+# getDeployImageDevice
#------------------------------------------
-sub getImageDevice {
+sub getDeployImageDevice {
# ...
# Get the device the image will be installed to
# ---
@@ -223,9 +229,41 @@
}
#==========================================
-# getPartitions
+# getDeployServer
#------------------------------------------
-sub getPartitions {
+sub getDeployServer {
+ # ...
+ # Get the server the config data is obtained from
+ # ---
+ my $this = shift;
+ my $node = $deploysNodeList -> get_node(1);
+ if (defined $node) {
+ return $node -> getAttribute ("server");
+ } else {
+ return "192.168.1.1";
+ }
+}
+
+#==========================================
+# getDeployBlockSize
+#------------------------------------------
+sub getDeployBlockSize {
+ # ...
+ # Get the block size the deploy server should use
+ # ---
+ my $this = shift;
+ my $node = $deploysNodeList -> get_node(1);
+ if (defined $node) {
+ return $node -> getAttribute ("blocksize");
+ } else {
+ return "4096";
+ }
+}
+
+#==========================================
+# getDeployPartitions
+#------------------------------------------
+sub getDeployPartitions {
# ...
# Get the partition configuration for this image
# ---
@@ -235,35 +273,48 @@
my @result = ();
for (my $i=1;$i<= $partitionNodes->size();$i++) {
my $node = $partitionNodes -> get_node($i);
-
my $number = $node -> getAttribute ("number");
my $type = $node -> getAttribute ("type");
- if (!defined $type) {
- $type = "linux";
+ if (! defined $type) {
+ $type = "L";
}
-
my $size = $node -> getAttribute ("size");
- if (!defined $size) {
+ if (! defined $size) {
$size = "x";
}
-
my $mountpoint = $node -> getAttribute ("mountpoint");
- if (!defined $mountpoint) {
+ if (! defined $mountpoint) {
$mountpoint = "x";
}
-
my %part = ();
$part{number} = $number;
$part{type} = $type;
$part{size} = $size;
$part{mountpoint} = $mountpoint;
-
push @result, { %part };
}
return sort { $a->{number} cmp $b->{number} } @result;
}
#==========================================
+# getDeployConfiguration
+#------------------------------------------
+sub getDeployConfiguration {
+ # ...
+ # Get the configuration file information for this image
+ # ---
+ my $this = shift;
+ my @node = $configfileNodeList -> get_nodelist();
+ my %result;
+ foreach my $element (@node) {
+ my $source = $element -> getAttribute("source");
+ my $dest = $element -> getAttribute("dest");
+ $result{$source} = $dest;
+ }
+ return %result;
+}
+
+#==========================================
# getCompressed
#------------------------------------------
sub getCompressed {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.1/config.xml new/kiwi/system/boot/netboot/suse-10.1/config.xml
--- old/kiwi/system/boot/netboot/suse-10.1/config.xml 2007-03-07 11:43:28.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-10.1/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -31,7 +31,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://SL-10.1"/>
<!--<source path="/image/dist/full-10.1-i386"/>-->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.1-smp/config.xml new/kiwi/system/boot/netboot/suse-10.1-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.1-smp/config.xml 2007-03-07 11:43:28.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-10.1-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -31,7 +31,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://SL-10.1"/>
<!-- <source path="/image/dist/full-10.1-i386"/> -->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.2/config.xml new/kiwi/system/boot/netboot/suse-10.2/config.xml
--- old/kiwi/system/boot/netboot/suse-10.2/config.xml 2007-03-07 11:43:28.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-10.2/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -32,7 +32,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://10.2"/>
<!--<source path="/image/dist/full-10.2-i386"/>-->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.2-smp/config.xml new/kiwi/system/boot/netboot/suse-10.2-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.2-smp/config.xml 2007-03-07 11:43:28.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-10.2-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -32,7 +32,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://10.2"/>
<!--<source path="/image/dist/full-10.2-i386"/>-->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.3/config.xml new/kiwi/system/boot/netboot/suse-10.3/config.xml
--- old/kiwi/system/boot/netboot/suse-10.3/config.xml 2007-04-04 11:39:41.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.3/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -36,7 +36,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<!--<source path="opensuse://10.3"/>-->
<source path="/image/CDs/full-i386"/>
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-10.3-smp/config.xml new/kiwi/system/boot/netboot/suse-10.3-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-10.3-smp/config.xml 2007-04-04 11:39:41.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-10.3-smp/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -36,7 +36,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<!--<source path="opensuse://10.3"/>-->
<source path="/image/CDs/full-i386"/>
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLED10/config.xml new/kiwi/system/boot/netboot/suse-SLED10/config.xml
--- old/kiwi/system/boot/netboot/suse-SLED10/config.xml 2007-03-07 11:43:28.000000000 +0100
+++ new/kiwi/system/boot/netboot/suse-SLED10/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -31,7 +31,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="/image/dist/full-sled10-i386"/>
</repository>
<repository type="rpm-dir">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml new/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml
--- old/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml 2007-03-26 17:32:43.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-SLES10-SP1/config.xml 2007-04-19 14:10:15.000000000 +0200
@@ -35,7 +35,7 @@
<repository type="rpm-dir">
<source path="this://repo"/>
</repository>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="/mounts/machcd2/dists/full-sle10-sp-%arch"/>
</repository>
<packages type="image">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml new/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml
--- old/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml 2007-03-26 17:33:02.000000000 +0200
+++ new/kiwi/system/boot/netboot/suse-SLES10-SP1-smp/config.xml 2007-04-19 14:10:14.000000000 +0200
@@ -35,7 +35,7 @@
<repository type="rpm-dir">
<source path="this://repo"/>
</repository>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="/mounts/machcd2/dists/full-sle10-sp-%arch"/>
</repository>
<packages type="image">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/xennetboot/suse-10.1/config.xml new/kiwi/system/boot/xennetboot/suse-10.1/config.xml
--- old/kiwi/system/boot/xennetboot/suse-10.1/config.xml 2007-03-16 17:23:06.000000000 +0100
+++ new/kiwi/system/boot/xennetboot/suse-10.1/config.xml 2007-04-19 14:10:14.000000000 +0200
@@ -31,7 +31,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://SL-10.1"/>
<!-- <source path="/image/dist/full-10.1-i386"/> -->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/xennetboot/suse-10.2/config.xml new/kiwi/system/boot/xennetboot/suse-10.2/config.xml
--- old/kiwi/system/boot/xennetboot/suse-10.2/config.xml 2007-03-16 17:23:06.000000000 +0100
+++ new/kiwi/system/boot/xennetboot/suse-10.2/config.xml 2007-04-19 14:10:14.000000000 +0200
@@ -32,7 +32,7 @@
<file name="drivers/message/fusion/*"/>
<file name="drivers/net/*"/>
</drivers>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="opensuse://10.2"/>
<!--<source path="/image/dist/full-10.2-i386"/>-->
</repository>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kiwi/system/boot/xennetboot/suse-SLES10-SP1/config.xml new/kiwi/system/boot/xennetboot/suse-SLES10-SP1/config.xml
--- old/kiwi/system/boot/xennetboot/suse-SLES10-SP1/config.xml 2007-03-26 17:33:21.000000000 +0200
+++ new/kiwi/system/boot/xennetboot/suse-SLES10-SP1/config.xml 2007-04-19 14:10:14.000000000 +0200
@@ -35,7 +35,7 @@
<repository type="rpm-dir">
<source path="this://repo"/>
</repository>
- <repository type="yast2">
+ <repository type="yast2" status="replaceable">
<source path="/mounts/machcd2/dists/full-sle10-sp-%arch"/>
</repository>
<packages type="image">
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org