Hello community,

here is the log from the commit of package kiwi for openSUSE:Factory
checked in at Wed Mar 30 09:29:51 CEST 2011.



--------
--- kiwi/kiwi.changes   2011-03-25 14:52:15.000000000 +0100
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes      2011-03-29 
18:04:51.000000000 +0200
@@ -1,0 +2,28 @@
+Tue Mar 29 17:58:00 CEST 2011 - [email protected]
+  
+- dont't start udev using startproc (bnc #683126)
+  
+-------------------------------------------------------------------
+Tue Mar 29 12:14:37 CEST 2011 - [email protected]
+  
+- fixed boot path lookup if boot attribute contains an
+  absolute path (bnc #683135)
+  
+-------------------------------------------------------------------
+Mon Mar 28 17:21:31 CEST 2011 - [email protected]
+  
+- added fixupOverlayFilesOwnership() function which handles
+  all files from the overlay root tree and the image archives.
+  The function changes the ownership of all that files to
+  root:root if they don't belong to a user in the passwd file.
+  files which belongs to passwd users are not touched and
+  therefore must be added with the correct owner:group setup
+  in the overlay tree and/or archive
+  
+-------------------------------------------------------------------
+Mon Mar 28 11:12:35 CEST 2011 - [email protected]
+  
+- fixed perl warning (uninitialized variable) and a checker error
+  when building an ISO image without setting the 'flags' attribute.
+  
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.9Om685/_old  2011-03-30 09:28:19.000000000 +0200
+++ /var/tmp/diff_new_pack.9Om685/_new  2011-03-30 09:28:19.000000000 +0200
@@ -66,7 +66,7 @@
 %endif
 Summary:        OpenSuSE - KIWI Image System
 Version:        4.83
-Release:        1
+Release:        3
 Group:          System/Management
 License:        GPLv2
 Source:         %{name}.tar.bz2

++++++ kiwi.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision
--- old/kiwi/.revision  2011-03-25 14:47:34.000000000 +0100
+++ new/kiwi/.revision  2011-03-25 14:47:34.000000000 +0100
@@ -1 +1 @@
-8621cccfdfb696c71ba5811c847b7cb7588419a7
+33f5eead4f25d50af8cd2e600590a3b3f730fbfe
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       2011-03-25 14:47:34.000000000 +0100
+++ new/kiwi/modules/KIWIImage.pm       2011-03-29 18:00:22.000000000 +0200
@@ -293,10 +293,14 @@
        my $pblt = $type{checkprebuilt};
        my $boot = $type{boot};
        my $ok   = 0;
+       my $bootpath = $boot;
+       if (($boot !~ /^\//) && (! -d $boot)) {
+               $bootpath = $main::System."/".$boot;
+       }
        #==========================================
        # open boot image XML object
        #------------------------------------------
-       my $bxml = new KIWIXML ( $kiwi,$main::System."/".$boot );
+       my $bxml = new KIWIXML ( $kiwi,$bootpath );
        if (! $bxml) {
                return undef;
        }
@@ -313,7 +317,7 @@
        #==========================================
        # check path names for boot image
        #------------------------------------------
-       my $lookup = $main::System."/".$boot."-prebuilt/";
+       my $lookup = $bootpath."-prebuilt/";
        if (defined $main::PrebuiltBootImage) {
                $lookup = $main::PrebuiltBootImage."/";
        }
@@ -1000,7 +1004,11 @@
                #------------------------------------------
                $main::Survive  = "yes";
                $main::RootTree = "$tmpdir/kiwi-".$text."boot-$$";
-               $main::Prepare  = $main::System."/".$stype{boot};
+               if (($stype{boot} !~ /^\//) && (! -d $stype{boot})) {
+                       $main::Prepare = $main::System."/".$stype{boot};
+               } else {
+                       $main::Prepare = $stype{boot};
+               }
                $main::Create   = $main::RootTree;
                undef @main::Profiles;
                undef @main::AddPackage;
@@ -1467,7 +1475,11 @@
                #------------------------------------------
                $main::Survive  = "yes";
                $main::RootTree = "$tmpdir/kiwi-isoboot-$$";
-               $main::Prepare  = $main::System."/".$stype{boot};
+               if (($stype{boot} !~ /^\//) && (! -d $stype{boot})) {
+                       $main::Prepare = $main::System."/".$stype{boot};
+               } else {
+                       $main::Prepare = $stype{boot};
+               }
                $main::Create   = $main::RootTree;
                undef @main::Profiles;
                undef @main::AddPackage;
@@ -2498,7 +2510,11 @@
                #------------------------------------------
                $main::Survive  = "yes";
                $main::RootTree = "$tmpdir/kiwi-splitboot-$$";
-               $main::Prepare  = $main::System."/".$type{boot};
+               if (($type{boot} !~ /^\//) && (! -d $type{boot})) {
+                       $main::Prepare = $main::System."/".$type{boot};
+               } else {
+                       $main::Prepare = $type{boot};
+               }
                $main::Create   = $main::RootTree;
                undef @main::Profiles;
                undef @main::AddPackage;
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     2011-03-25 14:47:34.000000000 +0100
+++ new/kiwi/modules/KIWILinuxRC.sh     2011-03-29 18:00:22.000000000 +0200
@@ -583,7 +583,7 @@
        # load modules required before udev
        moduleLoadBeforeUdev
        # start the udev daemon
-       startproc /sbin/udevd --daemon
+       /sbin/udevd --daemon
        UDEVD_PID=$(pidof /sbin/udevd)
        echo UDEVD_PID=$UDEVD_PID >> /iprocs
        # trigger events for all devices
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        2011-03-21 16:02:02.000000000 +0100
+++ new/kiwi/modules/KIWIRoot.pm        2011-03-29 18:00:22.000000000 +0200
@@ -21,6 +21,8 @@
 use strict;
 use Carp qw (cluck);
 use File::Glob ':glob';
+use File::Find;
+use FileHandle;
 use KIWIURL;
 use KIWILog;
 use KIWIManager;
@@ -64,7 +66,7 @@
        if (! defined $kiwi) {
                $kiwi = new KIWILog("tiny");
        }
-       if (($imageDesc !~ /\//) && (! -d $imageDesc)) {
+       if (($imageDesc !~ /^\//) && (! -d $imageDesc)) {
                $imageDesc = $main::System."/".$imageDesc;
        }
        if (! defined $baseSystem) {
@@ -779,6 +781,7 @@
        my $this = shift;
        my $kiwi = $this->{kiwi};
        my $xml  = $this->{xml};
+       my $root = $this->{root};
        my $manager = $this->{manager};
        #==========================================
        # get image archive list
@@ -791,6 +794,120 @@
        if (! $manager -> setupArchives($this->{imageDesc},@archives)) {
                return undef;
        }
+       #==========================================
+       # Check ownership of archive files
+       #------------------------------------------
+       if (-f "$root/bootincluded_archives.filelist") {
+               $this -> fixupOverlayFilesOwnership 
("bootincluded_archives.filelist");
+       }
+       return $this;
+}
+
+#==========================================
+# fixupOverlayFilesOwnership
+#------------------------------------------
+sub fixupOverlayFilesOwnership {
+       # ...
+       # search for files and directories in the given path or
+       # table of contents (toc) file and make sure those files
+       # get the right ownership assigned
+       # ---
+       my $this  = shift;
+       my $path  = shift;
+       my $kiwi  = $this->{kiwi};
+       my $root  = $this->{root};
+       my $item  = $root."/".$path;
+       my $prefix= "FixupOwner";
+       my @files = ();
+       my %except= ();
+       if (-d $item) {
+               #==========================================
+               # got dir, search files there
+               #------------------------------------------
+               sub generateWanted {
+                       my $result = shift;
+                       my $base   = shift;
+                       return sub {
+                               my @names = 
($File::Find::name,$File::Find::dir);
+                               foreach my $name (@names) {
+                                       $name =~ s/^$base//; $name =~ s/^\///;
+                                       push @{$result},$name;
+                               }
+                       }
+               }
+               my $wref = generateWanted (\@files,$root);
+               find ({ wanted => $wref, follow => 0 }, $item);
+       } elsif (-f $item) {
+               #==========================================
+               # got archive, use archive toc file
+               #------------------------------------------
+               my $fd = new FileHandle;
+               if ($fd -> open ($item)) {
+                       while (my $line = <$fd>) {
+                               chomp $line; $line =~ s/^\///;
+                               push (@files,$line);
+                       }
+                       $fd -> close();
+               } else {
+                       $kiwi -> warning ("$prefix: Failed to open $item: $!");
+                       $kiwi -> skipped ();
+                       return undef;
+               }
+       } else {
+               $kiwi -> warning ("$prefix: No such file or directory: $item");
+               $kiwi -> skipped ();
+               return undef;
+       }
+       #==========================================
+       # check file list
+       #------------------------------------------
+       if (! @files) {
+               $kiwi -> warning ("$prefix: No files found in: $item");
+               $kiwi -> skipped ();
+               return undef;
+       }
+       #==========================================
+       # create passwd exception directories
+       #------------------------------------------
+       my $fd = new FileHandle;
+       if (! $fd -> open ($root."/etc/passwd")) {
+               $kiwi -> warning ("$prefix: No passwd file found in: $root");
+               $kiwi -> skipped ();
+               return undef;
+       }
+       while (my $line = <$fd>) {
+               chomp $line;
+               my $name = (split (/:/,$line))[5];
+               $name =~ s/\///;
+               if ($name =~ /^(bin|sbin|root)/) {
+                       next;
+               }
+               $except{$name} = 1;
+       }
+       $fd -> close();
+       #==========================================
+       # walk through all files
+       #------------------------------------------
+       foreach my $file (@files) {
+               my $ok = 1;
+               foreach my $exception (keys %except) {
+                       if ($file =~ /$exception/) {
+                               $kiwi -> loginfo (
+                                       "$prefix: $file belongs to passwd, 
leaving it untouched"
+                               );
+                               $ok = 0; last;
+                       }
+               }
+               next if ! $ok;
+               my $data = qxx ("chroot $root chown -c root:root $file 2>&1");
+               my $code = $? >> 8;
+               if ($code != 0) {
+                       $kiwi -> warning (
+                               "$prefix: Failed to fixup ownership of 
$root/$file: $data"
+                       );
+                       $kiwi -> skipped ();
+               }
+       }
        return $this;
 }
 
@@ -842,6 +959,9 @@
        #----------------------------------------
        if ((-d "$imageDesc/root") && (bsd_glob($imageDesc.'/root/*'))) {
                $kiwi -> info ("Copying user defined files to image tree");
+               #========================================
+               # copy user defined files to tmproot
+               #----------------------------------------
                mkdir $root."/tmproot";
                if ((-l "$imageDesc/root/linuxrc") || (-l 
"$imageDesc/root/include")) {
                        $data = qxx (
@@ -858,6 +978,13 @@
                        $kiwi -> info   ($data);
                        return undef;
                }
+               #========================================
+               # check tmproot ownership
+               #----------------------------------------
+               $this -> fixupOverlayFilesOwnership ("tmproot");
+               #========================================
+               # copy tmproot to real root (tar)
+               #----------------------------------------
                $data = qxx ("tar -cf - -C $root/tmproot . | tar -x -C $root 
2>&1");
                $code = $? >> 8;
                if ($code != 0) {
@@ -865,6 +992,9 @@
                        $kiwi -> info   ($data);
                        return undef;
                }
+               #========================================
+               # cleanup tmproot
+               #----------------------------------------
                qxx ("rm -rf $root/tmproot");
                $kiwi -> done();
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/modules/KIWIRuntimeChecker.pm 
new/kiwi/modules/KIWIRuntimeChecker.pm
--- old/kiwi/modules/KIWIRuntimeChecker.pm      2011-03-21 16:02:02.000000000 
+0100
+++ new/kiwi/modules/KIWIRuntimeChecker.pm      2011-03-29 18:00:22.000000000 
+0200
@@ -203,7 +203,7 @@
                        $haveTool = $this -> __isFsToolAvailable('squashfs');
                        $checkedFS = 'squashfs';
                }
-               if (! $haveTool) {
+               if (($flag) && (! $haveTool)) {
                        $toolError = 1;
                }
        } else {
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 2011-03-21 16:02:02.000000000 +0100
+++ new/kiwi/modules/KIWIXML.pm 2011-03-29 18:00:22.000000000 +0200
@@ -4093,7 +4093,7 @@
                my $image = $element -> getAttribute("image");
                my $flags = $element -> getAttribute("flags");
                if (($image eq "split") || 
-                       (($image eq "iso") && ($flags eq "compressed"))
+                       (($image eq "iso") && ($flags) && ($flags eq 
"compressed"))
                ) {
                        my @splitsections = $element -> getElementsByTagName 
("split");
                        if (! @splitsections) {


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to