Mailinglist Archive: opensuse-commit (1082 mails)

< Previous Next >
commit kiwi
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Tue, 08 May 2007 20:09:02 +0200
  • Message-id: <20070508180902.69781678184@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package kiwi
checked in at Tue May 8 20:09:02 CEST 2007.

--------
--- arch/i386/kiwi/kiwi.changes 2007-05-07 15:13:47.000000000 +0200
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes      2007-05-08 10:29:06.193239000 +0200
@@ -1,0 +2,8 @@
+Mon May  7 17:12:11 CEST 2007 - ms@xxxxxxx
+
+- v1.32
+- use unionfs to implement read-only mounts. If unionfs mount
+  fails kiwi will use standard bind mount to access the data.
+  A warning message is printed on stdout in that case (#270945)
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.xYo987/_old  2007-05-08 20:08:51.000000000 +0200
+++ /var/tmp/diff_new_pack.xYo987/_new  2007-05-08 20:08:51.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package kiwi (Version 1.31)
+# spec file for package kiwi (Version 1.32)
 #
 # 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.31
+Version:        1.32
 Release:        1
 Group:          System/Management
 License:        GNU General Public License (GPL)
@@ -288,6 +288,11 @@
 %{_datadir}/kiwi/image/xenboot
 
 %changelog
+* Mon May 07 2007 - ms@xxxxxxx
+- v1.32
+- use unionfs to implement read-only mounts. If unionfs mount
+  fails kiwi will use standard bind mount to access the data.
+  A warning message is printed on stdout in that case (#270945)
 * Wed May 02 2007 - ms@xxxxxxx
 - v1.31
 - fixed option -c / -C clash

++++++ kiwi.tar.bz2 ++++++
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-05-07 11:40:25.000000000 +0200
+++ new/kiwi/modules/KIWIRoot.pm        2007-05-08 10:28:33.000000000 +0200
@@ -552,7 +552,7 @@
        # ---
        my $this   = shift;
        my $prefix = $root."/".$baseSystem;
-       $kiwi -> info ("Mounting local/NFS file systems");
+       $kiwi -> info ("Mounting required file systems");
        if (! -d $prefix) {
        if (! mkdir $prefix) {
                $kiwi -> failed ();
@@ -566,12 +566,6 @@
                $kiwi -> failed ();
                return undef;
        }
-       if (! open (FD,"cat /proc/mounts|")) {
-               $kiwi -> failed ();
-               $kiwi -> error ("Couldn't open mount table: $!");
-               $kiwi -> failed ();
-               return undef;
-       }
        if (! -f "$root/proc/mounts") {
                qx (mkdir -p $root/proc);
                qx (mount -t proc none $root/proc);
@@ -584,6 +578,7 @@
                push (@mountList,"$root/sys");
                push (@mountList,"$root/dev/pts");
        }
+       $kiwi -> done();
        foreach my $chl (keys %{$sourceChannel{private}}) {
                my @opts = @{$sourceChannel{private}{$chl}};
                my $path = $opts[2];
@@ -592,12 +587,31 @@
                } else {
                        next;
                }
-               my $mount= $prefix.$path;
+               $kiwi -> info ("Mounting local channel: $chl");
+               my $cache = "/var/cache/kiwi";
+               my $roopt = "dirs=$cache=rw:$path=ro,ro";
+               my $mount = $prefix.$path;
                push (@mountList,$mount);
+               if (! -d $cache) {
+                       qx ( mkdir -p $cache );
+               }
                qx (mkdir -p $mount);
-               qx (mount -o bind $path $mount 2>&1);
+               my $data = qx (mount -t unionfs -o $roopt unionfs $mount 2>&1);
+               my $code = $? >> 8;
+               if ($code != 0) {
+                       $kiwi -> skipped ();
+                       $kiwi -> warning ("Couldn't mount read-only, using bind mount");
+                       my $data = qx ( mount -o bind $path $mount 2>&1 );
+                       my $code = $? >> 8;
+                       if ($code != 0) {
+                               $kiwi -> failed();
+                               return undef;
+                       }
+                       $kiwi -> done();
+               } else {
+                       $kiwi -> done();
+               }
        }
-       $kiwi -> done();
        return $this;
 }
 
@@ -611,7 +625,7 @@
        my $this = shift;
        my $prefix = $root."/".$baseSystem;
        foreach my $item (reverse @mountList) {
-               $kiwi -> info ("Umounting path: $item\n");
+               #$kiwi -> info ("Umounting path: $item\n");
                qx (umount $item 2>/dev/null);
                if ($item =~ /^$prefix/) {
                        qx ( rmdir -p $item 2>&1 );


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



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >