Hello community,

here is the log from the commit of package 
kiwi-instsource-plugins-openSUSE-12-1 for openSUSE:Factory checked in at 
2013-08-28 13:38:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiwi-instsource-plugins-openSUSE-12-1 (Old)
 and      /work/SRC/openSUSE:Factory/.kiwi-instsource-plugins-openSUSE-12-1.new 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kiwi-instsource-plugins-openSUSE-12-1"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/kiwi-instsource-plugins-openSUSE-12-1/kiwi-instsource-plugins-openSUSE-12-1.changes
      2013-02-26 15:15:20.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.kiwi-instsource-plugins-openSUSE-12-1.new/kiwi-instsource-plugins-openSUSE-12-1.changes
 2013-08-28 13:38:29.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Aug 27 11:22:07 UTC 2013 - [email protected]
+
+- avoid usage of _legacy code
+
+-------------------------------------------------------------------

Old:
----
  kiwi-instsource-plugins-openSUSE-12-1.diff

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

Other differences:
------------------
++++++ kiwi-instsource-plugins-openSUSE-12-1.spec ++++++
--- /var/tmp/diff_new_pack.jW0Ald/_old  2013-08-28 13:38:30.000000000 +0200
+++ /var/tmp/diff_new_pack.jW0Ald/_new  2013-08-28 13:38:30.000000000 +0200
@@ -25,7 +25,6 @@
 Version:        0.9
 Release:        0
 Source:         %{name}.tar.bz2
-Patch0:         kiwi-instsource-plugins-openSUSE-12-1.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{suse_version} > 1210
 Requires:       extract-appdata-icons
@@ -47,7 +46,6 @@
 
 %prep
 %setup -q -n kiwi-instsource-plugins-openSUSE-12-1
-%patch0 -p0
 
 %build
 # empty because of rpmlint warning rpm-buildroot-usage

++++++ kiwi-instsource-plugins-openSUSE-12-1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIBasePlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIBasePlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIBasePlugin.pm 2011-05-23 
15:59:55.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIBasePlugin.pm 2013-08-26 
15:20:59.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -20,7 +20,7 @@
 #================
 # FILE          : KIWIInstSourceBasePlugin.pm
 #----------------
-# PROJECT       : OpenSUSE Build-Service
+# PROJECT       : openSUSE Build-Service
 # COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
 #               :
 # AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIContentPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIContentPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIContentPlugin.pm      
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIContentPlugin.pm      
2013-08-26 15:20:59.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -20,7 +20,7 @@
 #================
 # FILE          : KIWIContentPlugin.pm
 #----------------
-# PROJECT       : OpenSUSE Build-Service
+# PROJECT       : openSUSE Build-Service
 # COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
 #               :
 # AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.ini 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.ini
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.ini       
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.ini       
2013-08-26 15:20:59.000000000 +0200
@@ -21,7 +21,6 @@
 [options]
 parameter = -P
 parameter = -Z
-parameter = -C
 parameter = -D
 parameter = -K
 parameter = -M 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm        
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm        
2013-08-26 15:56:44.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -103,6 +103,15 @@
     $params .= "$p ";
   }
 
+  # add local kwd files as argument
+  use Cwd 'abs_path';
+  my $extrafile = abs_path($this->collect()->{m_xml}->{xmlOrigFile});
+  $extrafile =~ s/.kiwi$/.kwd/;
+  if (-f $extrafile) {
+    $this->logMsg("W", "Found extra tags file $extrafile.");
+    $params .= "-T $extrafile ";
+  }
+
   $this->name($name);
   $this->order($order);
   $this->{m_tool} = $tool;
@@ -230,6 +239,25 @@
         return 1;
      }
   }
+  # one more time for english to insert possible EULAs
+  my $cmd = "/usr/bin/translate_packages.pl en < $targetdir/packages.en > 
$targetdir/packages.en.new && mv $targetdir/packages.en.new 
$targetdir/packages.en";
+  my $data = qx( $cmd );
+  if($? >> 8) {
+     $this->logMsg("E", "Calling <translate_packages.pl en > 
failed:\n$data\n");
+     return 1;
+  }
+
+  if (-x "/usr/bin/extract-appdata-icons" && -s "$targetdir/appdata.xml") {
+     my $cmd = "/usr/bin/extract-appdata-icons $targetdir/appdata.xml 
$targetdir";
+     my $data = qx( $cmd );
+     if($? >> 8) {
+       $this->logMsg("E", "Calling <extract-appdata-icons 
$targetdir/appdata.xml $targetdir> failed:\n$data\n");
+       return 1;
+     }
+     if($this->{m_compress} =~ m{yes}i) {
+         system("gzip", "--rsyncable", "$targetdir/appdata.xml");
+     }
+  }
 
   if($this->{m_compress} =~ m{yes}i) {
       foreach my $pfile(glob("$targetdir/packages*")) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm.orig 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm.orig
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm.orig   
1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIDescrPlugin.pm.orig   
2013-08-26 15:20:59.000000000 +0200
@@ -0,0 +1,259 @@
+################################################################
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file LICENSE); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
+#================
+# FILE          : KIWIDescrPlugin.pm
+#----------------
+#               :
+# AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
+#               :
+# BELONGS TO    : Operating System images
+#               :
+# DESCRIPTION   : Module calling create_package_descr
+#               :
+# STATUS        : Development
+#----------------
+
+package KIWIDescrPlugin;
+
+use strict;
+
+use File::Basename;
+use base "KIWIBasePlugin";
+use Config::IniFiles;
+use Data::Dumper;
+
+
+sub new
+{
+  # ...
+  # Create a new KIWIDescrPlugin object
+  # creates patterns file
+  # ---
+  my $class   = shift;
+  my $handler = shift;
+  my $config  = shift;
+
+  my $this = new KIWIBasePlugin($handler);
+  bless ($this, $class);
+
+  $config =~ m{(.*)/([^/]+)$};
+  my $configpath = $1;
+  my $configfile = $2;
+  if(not defined($configpath) or not defined($configfile)) {
+    $this->logMsg("E", "wrong parameters in plugin initialisation");
+    return undef;
+  }
+
+  my $ini = new Config::IniFiles( -file => "$configpath/$configfile" );
+  my $name       = $ini->val('base', 'name'); # scalar value
+  my $order      = $ini->val('base', 'order'); # scalar value
+  my $tool       = $ini->val('base', 'tool'); # scalar value
+  my $createrepo = $ini->val('base', 'createrepo'); # scalar value
+  my $rezip      = $ini->val('base', 'rezip'); # scalar value
+  my $tdir       = $ini->val('base', 'tooldir'); # scalar value
+  my $tpack      = $ini->val('base', 'toolpack'); # scalar value
+  my $enable     = $ini->val('base', 'defaultenable'); # scalar value
+
+  my @params    = $ini->val('options', 'parameter');
+
+  my $gzip       = $ini->val('target', 'compress');
+
+  # if any of those isn't set, complain!
+  if(not defined($name)
+     or not defined($order)
+     or not defined($tool)
+     or not defined($createrepo)
+     or not defined($rezip)
+     or not defined($tdir)
+     or not defined($tpack)
+     or not defined($enable)
+     or not defined($gzip)
+     or not (@params)) {
+    $this->logMsg("E", "Plugin ini file <$config> seems broken!");
+    return undef;
+  }
+
+  # sanity check for tools' existence:
+  if(not( -f "$tdir/$tool" and -x "$tdir/$tool")) {
+    $this->logMsg("E", "Plugin <$name>: tool <$tdir/$tool> is not 
executable!");
+    $this->logMsg("I", "Check if package <$tpack> is installed.");
+    return undef;
+  }
+
+  my $params = "";
+  foreach my $p(@params) {
+    $p = $this->collect()->productData()->_substitute("$p");
+    $params .= "$p ";
+  }
+
+  # add local kwd files as argument
+  use Cwd 'abs_path';
+  my $extrafile = abs_path($this->collect()->{m_xml}->{xmlOrigFile});
+  $extrafile =~ s/.kiwi$/.kwd/;
+  if (-f $extrafile) {
+    $this->logMsg("W", "Found extra tags file $extrafile.");
+    $params .= "-T $extrafile ";
+  }
+
+  $this->name($name);
+  $this->order($order);
+  $this->{m_tool} = $tool;
+  $this->{m_tooldir} = $tdir;
+  $this->{m_toolpack} = $tpack;
+  $this->{m_createrepo} = $createrepo;
+  $this->{m_rezip} = $rezip;
+  $this->{m_params} = $params;
+  $this->{m_compress} = $gzip;
+  if($enable != 0) {
+    $this->ready(1);
+  }
+
+  return $this;
+}
+# /constructor
+
+
+
+sub execute
+{
+  my $this = shift;
+  if(not ref($this)) {
+    return undef;
+  }
+  my $retval = 0;
+  # sanity check:
+  if($this->{m_ready} == 0) {
+    return $retval;
+  }
+
+  my $coll = $this->{m_collect};
+  my $basesubdirs = $coll->basesubdirs();
+  if(not defined($basesubdirs)) {
+    ## prevent crash when dereferencing
+    $this->logMsg("E", "<basesubdirs> is undefined! Skipping <$this->name()>");
+    return $retval;
+  }
+
+  foreach my $dirlist($this->getSubdirLists()) {
+    my ($s,$m) = $this->executeDir(sort @{$dirlist});
+  }
+#  if( $coll->productData()->getVar("FLAVOR") =~ m{ftp}i ) {
+#    foreach my $d(values %{$basesubdirs}) {
+#      my @a;
+#      push @a, $d;
+#      $retval += $this->executeDir( @a );
+#    }
+#  }
+#  else {
+#    my @paths = values(%{$basesubdirs});
+#    @paths = grep { $_ =~ /[^0]$/ } @paths; # remove Media0
+#    @paths = sort @paths; # sort it
+#    $retval += $this->executeDir( @paths );
+#  }
+  return $retval;
+}
+
+
+
+sub executeDir
+{
+  my $this     = shift;
+  my @paths    = @_;
+  my $retval   = 0;
+  if(!@paths) {
+    $this->logMsg("W", "Empty path list!");
+    return $retval;
+  }
+
+  my $coll  = $this->{m_collect};
+  my $datadir  = $coll->productData()->getInfo("DATADIR");
+  my $descrdir = $coll->productData()->getInfo("DESCRDIR");
+  my $createrepomd = $coll->productData()->getVar("CREATE_REPOMD");
+
+  my $targetdir = $paths[0]."/".$descrdir;
+
+  ## this ugly bit creates a parameter string from a list of directories:
+  # param = -d <dir1> -d <dir2> ...
+  # the order is important. Idea: use map to make hash <dir> => -d for all 
subdirs not ending with "0"
+  # (those are for metafile unpacking only). The result is evaluated in list 
context be reverse, so there's a list
+  # looking like "<dir_N> -d ... <dir1> -d" which is reversed again, making 
the result
+  # '-d', '<dir1>', ..., '-d', '<dir_N>'", after the join as string.
+  my $pathlist = "-d ".join(' -d ', map{$_."/".$datadir}(@paths));
+
+  $this->logMsg("I", "Calling ".$this->name()." for directories <@paths>:");
+
+  my $cmd = "$this->{m_tooldir}/$this->{m_tool} $pathlist $this->{m_params} -o 
".$paths[0]."/".$descrdir;
+  $this->logMsg("I", "Executing command <$cmd>");
+  my $data = qx( $cmd );
+  my $status = $? >> 8;
+  if($status) {
+    $this->logMsg("E", "Calling <$cmd> exited with code <$status> and the 
following output:\n$data\n");
+    return $retval;
+  }
+
+  if ( $createrepomd eq "true" ) {
+    foreach my $p (@paths) {
+      my $cmd = "$this->{m_createrepo} $p/$datadir ";
+      $this->logMsg("I", "Executing command <$cmd>");
+      my $data = qx( $cmd );
+      my $status = $? >> 8;
+      if($status) {
+        $this->logMsg("E", "Calling <$cmd> exited with code <$status> and the 
following output:\n$data\n");
+        return $retval;
+      }
+      $cmd = "$this->{m_rezip} $p/$datadir ";
+      $this->logMsg("I", "Executing command <$cmd>");
+      my $data = qx( $cmd );
+      my $status = $? >> 8;
+      if($status) {
+        $this->logMsg("E", "Calling <$cmd> exited with code <$status> and the 
following output:\n$data\n");
+        return $retval;
+      }
+    }
+  }
+
+  foreach my $trans 
(glob('/usr/share/locale/en_US/LC_MESSAGES/package-translations-*.mo')) {
+     $trans = basename($trans, ".mo");
+     $trans =~ s,.*-,,;
+     my $cmd = "/usr/bin/translate_packages.pl $trans < $targetdir/packages.en 
> $targetdir/packages.$trans";
+     my $data = qx( $cmd );
+     if($? >> 8) {
+        $this->logMsg("E", "Calling <translate_packages.pl $trans > 
failed:\n$data\n");
+        return 1;
+     }
+  }
+
+  if($this->{m_compress} =~ m{yes}i) {
+      foreach my $pfile(glob("$targetdir/packages*")) {
+         if(system("gzip", "--rsyncable", "$pfile") == 0) {
+             unlink "$targetdir/$pfile";
+         }
+         else {
+             $this->logMsg("W", "Can't compress file <$targetdir/$pfile>!");
+         }
+      }
+  }
+
+  return 1;
+}
+
+
+1;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.ini 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.ini
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.ini   
1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.ini   
2013-08-26 15:56:44.000000000 +0200
@@ -0,0 +1,5 @@
+[base]
+name = KIWIFinishEFIPlugin
+order = 10
+defaultenable = 1
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.pm    
1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIFinishEFIPlugin.pm    
2013-08-26 16:06:21.000000000 +0200
@@ -0,0 +1,145 @@
+################################################################
+# Copyright (c) 2012 SUSE
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file LICENSE); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
+#================
+# FILE          : KIWIFinishEFIPlugin.pm
+#----------------
+# PROJECT       : OpenSUSE Build-Service
+# COPYRIGHT     : (c) 2012 SUSE LINUX Products GmbH, Germany
+#               :
+# AUTHOR        : Stephan Kulow <[email protected]>
+#               :
+# BELONGS TO    : Operating System images
+#               :
+# DESCRIPTION   : Module patching mini iso builds
+#               :
+# STATUS        : Development
+#----------------
+
+package KIWIFinishEFIPlugin;
+
+use strict;
+
+use base "KIWIBasePlugin";
+use Data::Dumper;
+use Config::IniFiles;
+use File::Find;
+use File::Basename;
+use KIWIQX qw (qxx);
+
+
+sub new
+{
+  # ...
+  # Create a new KIWIFinishEFIPlugin object
+  # ---
+  my $class   = shift;
+  my $handler = shift;
+  my $config  = shift;
+
+  my $this = new KIWIBasePlugin($handler);
+  bless ($this, $class);
+
+  $config =~ m{(.*)/([^/]+)$};
+  my $configpath = $1;
+  my $configfile = $2;
+  if(not defined($configpath) or not defined($configfile)) {
+    $this->logMsg("E", "wrong parameters in plugin initialisation\n");
+    return undef;
+  }
+
+  ## now gather all necessary information from the inifile:
+  #===
+  # Issue: why duplicate code here? Why not put it into the base class?
+  # Answer: Each plugin may have different options. Some only need a target 
filename,
+  # whilst some others may need much more. I don't want to specify a 
complicated framework
+  # for the plugin, it shall just be a simple straightforward way to get 
information
+  # into the plugin. The idea is that the people who decide on the metadata 
write
+  # the plugin, and therefore damn well know what it needs and what not.
+  # I'm definitely not bothering PMs with Yet Another File Specification (tm)
+  #---
+
+  ## plugin content:
+  #-----------------
+  #[base]
+  #name = KIWIEulaPlugin
+  #order = 3
+  #defaultenable = 1
+  #
+  #[target]
+  #targetfile = content
+  #targetdir = $PRODUCT_DIR
+  #media = (list of numbers XOR "all")
+  #
+  my $ini = new Config::IniFiles( -file => "$configpath/$configfile" );
+  my $name     = $ini->val('base', 'name'); # scalar value
+  my $order    = $ini->val('base', 'order'); # scalar value
+  my $enable   = $ini->val('base', 'defaultenable'); # scalar value
+
+  # if any of those isn't set, complain!
+  if(not defined($name)
+     or not defined($order)
+     or not defined($enable)
+    ) {
+    $this->logMsg("E", "Plugin ini file <$config> seems broken!\n");
+    return undef;
+  }
+
+  $this->name($name);
+  $this->order($order);
+  if($enable != 0) {
+    $this->ready(1);
+  }
+  return $this;
+}
+# /constructor
+
+# returns: number of patched gfxboot files
+sub execute
+{
+  my $this = shift;
+  if(not ref($this)) {
+    return undef;
+  }
+  my $retval = 0;
+  # sanity check:
+  if($this->{m_ready} == 0) {
+    return $retval;
+  }
+  my $cd = 1;
+
+  my $type = $this->collect()->{m_xml}->getImageType();
+  return 0 unless $type;
+
+  my $firmware = $type->getFirmwareType();
+  if ($firmware eq "efi" || $firmware eq "uefi") {
+    my $dir = $this->collect()->basesubdirs()->{$cd};
+
+    my $efi = "$dir/boot/x86_64/efi";
+    $this->logMsg("I", "creating $efi");
+    qxx("dd if=/dev/zero of=$efi bs=1M count=4");
+    qxx("/usr/sbin/mkdosfs -n 'BOOT' $efi");
+    qxx("mcopy -Do -s -i $efi $dir/EFI ::");
+  }
+
+  return $retval;
+}
+
+1;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWILiveTreePlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWILiveTreePlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWILiveTreePlugin.pm     
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWILiveTreePlugin.pm     
2013-08-26 15:56:44.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -20,7 +20,7 @@
 #================
 # FILE          : KIWILiveTreePlugin.pm
 #----------------
-# PROJECT       : OpenSUSE Build-Service
+# PROJECT       : openSUSE Build-Service
 # COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
 #               :
 # AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
@@ -109,16 +109,6 @@
 }
 # /constructor
 
-sub logandrename($$$$)
-{
-  my $this = shift;
-  my $dname = shift;
-  my $oname = shift;
-  my $nname = shift;
-  $this->logMsg("I", "Renaming $dname/$oname to $dname/$nname");
-  rename("$dname/$oname", "$dname/$nname") || die "no such file!";
-}
-
 # returns: number of patched gfxboot files
 sub execute
 {
@@ -141,24 +131,22 @@
     return $retval;
   }
 
-  my $x11cd = undef;
-  find( sub { if (m/kiwi-profiled-livecd-kde.i586.iso/) { $x11cd = 
$File::Find::name; }  }, $this->handler()->collect()->basedir());
-  if (!$x11cd) {
+  my $medium = $this->collect()->productData()->getVar("MEDIUM_NAME");
+  my $cd = undef;
+  find( sub { if (m/.iso/) { $cd = $File::Find::name; }  }, 
$this->handler()->collect()->basedir());
+  if (!$cd) {
        $this->logMsg("E", "Initial CD not found\n");
        exit(1);
   }
-  print "$x11cd\n";
-  my $dname = dirname($x11cd);
-  print "$dname\n";
-  my $base = basename($dname);
-  $base =~ s,openSUSE-Live-Tree-i586-x86_64,,;
-
-  #logandrename($this, $dname, "kiwi-profiled-livecd-x11.i586.iso", 
"openSUSE-X11-LiveCD-i686-$base.iso");
-  #logandrename($this, $dname, "kiwi-profiled-livecd-x11.x86_64.iso", 
"openSUSE-X11-LiveCD-x86_64-$base.iso");
-  logandrename($this, $dname, "kiwi-profiled-livecd-kde.i586.iso", 
"openSUSE-KDE-LiveCD-i686$base.iso");
-  logandrename($this, $dname, "kiwi-profiled-livecd-kde.x86_64.iso", 
"openSUSE-KDE-LiveCD-x86_64$base.iso");
-  logandrename($this, $dname, "kiwi-profiled-livecd-gnome.i586.iso", 
"openSUSE-GNOME-LiveCD-i686$base.iso");
-  logandrename($this, $dname, "kiwi-profiled-livecd-gnome.x86_64.iso", 
"openSUSE-GNOME-LiveCD-x86_64$base.iso");
+  $this->logMsg("I", "$cd $medium");
+  my $dname = dirname($cd);
+  $this->logMsg("I", "$dname");
+
+  my $nname = "$medium.iso";
+  $nname =~ s,-i586-,-i686-,;
+
+  $this->logMsg("I", "Renaming $cd to $dname/$nname");
+  rename($cd, "$dname/$nname") || $this->logMsg("E", "could not rename $cd");
 
   return $retval;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIMiniIsoPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIMiniIsoPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIMiniIsoPlugin.pm      
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIMiniIsoPlugin.pm      
2013-08-26 15:56:44.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -20,7 +20,7 @@
 #================
 # FILE          : KIWIMiniIsoPlugin.pm
 #----------------
-# PROJECT       : OpenSUSE Build-Service
+# PROJECT       : openSUSE Build-Service
 # COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
 #               :
 # AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
@@ -41,6 +41,7 @@
 use Config::IniFiles;
 use File::Find;
 
+use KIWIQX qw (qxx);
 
 sub new
 {
@@ -225,6 +226,29 @@
     close(F);
     $retval++;
   }
+
+  my $grubcfg = $this->collect()->basesubdirs()->{1} . "/EFI/BOOT/grub.cfg";
+  if ( -f $grubcfg ) {
+    $this->logMsg("I", "editing <$grubcfg>");
+    open(IN, $grubcfg) || die "oops";
+    open(OUT, ">", "$grubcfg.new") || die "can't open output";
+    while( <IN> ) {
+      my $line = $_;
+      chomp $line;
+      $this->logMsg("I", "-$line");
+      $line =~ s,(linuxefi /boot/x86_64/loader/linux),$1 install=$repoloc,;
+      $this->logMsg("I", "+$line");
+      print OUT "$line\n";
+    }
+    close(OUT);
+    close(IN); 
+    qxx("diff -u $grubcfg $grubcfg.new");
+    rename("$grubcfg.new", $grubcfg);
+  } else {
+    $this->logMsg("I", "no grub.cfg at <$grubcfg>");
+  }
+ 
+
   return $retval;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPatternsPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPatternsPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPatternsPlugin.pm     
2011-05-23 15:59:57.000000000 +0200
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPatternsPlugin.pm     
2013-08-26 15:20:59.000000000 +0200
@@ -1,5 +1,5 @@
 ################################################################
-# Copyright (c) 2008 Jan-Christoph Bornschlegel, Novell Inc.
+# Copyright (c) 2008 Jan-Christoph Bornschlegel, SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -20,7 +20,7 @@
 #================
 # FILE          : KIWIPatternsPlugin.pm
 #----------------
-# PROJECT       : OpenSUSE Build-Service
+# PROJECT       : openSUSE Build-Service
 # COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH, Germany
 #               :
 # AUTHOR        : Jan-Christoph Bornschlegel <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.ini 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.ini
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.ini    
1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.ini    
2013-08-26 15:56:44.000000000 +0200
@@ -0,0 +1,5 @@
+[base]
+name = KIWIPromoDVDPlugin
+order = 7
+defaultenable = 1
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.pm 
new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.pm
--- old/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.pm     
1970-01-01 01:00:00.000000000 +0100
+++ new/kiwi-instsource-plugins-openSUSE-12-1/KIWIPromoDVDPlugin.pm     
2013-08-26 15:56:44.000000000 +0200
@@ -0,0 +1,149 @@
+################################################################
+# Copyright (c) 2012 SUSE
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file LICENSE); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
+#================
+# FILE          : KIWIPromoDVDPlugin.pm
+#----------------
+# PROJECT       : OpenSUSE Build-Service
+# COPYRIGHT     : (c) 2012 SUSE LINUX Products GmbH, Germany
+#               :
+# AUTHOR        : Stephan Kulow <[email protected]>
+#               :
+# BELONGS TO    : Operating System images
+#               :
+# DESCRIPTION   : Module patching mini iso builds
+#               :
+# STATUS        : Development
+#----------------
+
+package KIWIPromoDVDPlugin;
+
+use strict;
+
+use base "KIWIBasePlugin";
+use Data::Dumper;
+use Config::IniFiles;
+use File::Find;
+use File::Basename;
+
+
+sub new
+{
+  # ...
+  # Create a new KIWIPromoDVDPlugin object
+  # ---
+  my $class   = shift;
+  my $handler = shift;
+  my $config  = shift;
+
+  my $this = new KIWIBasePlugin($handler);
+  bless ($this, $class);
+
+  $config =~ m{(.*)/([^/]+)$};
+  my $configpath = $1;
+  my $configfile = $2;
+  if(not defined($configpath) or not defined($configfile)) {
+    $this->logMsg("E", "wrong parameters in plugin initialisation\n");
+    return undef;
+  }
+
+  ## now gather all necessary information from the inifile:
+  #===
+  # Issue: why duplicate code here? Why not put it into the base class?
+  # Answer: Each plugin may have different options. Some only need a target 
filename,
+  # whilst some others may need much more. I don't want to specify a 
complicated framework
+  # for the plugin, it shall just be a simple straightforward way to get 
information
+  # into the plugin. The idea is that the people who decide on the metadata 
write
+  # the plugin, and therefore damn well know what it needs and what not.
+  # I'm definitely not bothering PMs with Yet Another File Specification (tm)
+  #---
+
+  ## plugin content:
+  #-----------------
+  #[base]
+  #name = KIWIEulaPlugin
+  #order = 3
+  #defaultenable = 1
+  #
+  #[target]
+  #targetfile = content
+  #targetdir = $PRODUCT_DIR
+  #media = (list of numbers XOR "all")
+  #
+  my $ini = new Config::IniFiles( -file => "$configpath/$configfile" );
+  my $name     = $ini->val('base', 'name'); # scalar value
+  my $order    = $ini->val('base', 'order'); # scalar value
+  my $enable   = $ini->val('base', 'defaultenable'); # scalar value
+
+  # if any of those isn't set, complain!
+  if(not defined($name)
+     or not defined($order)
+     or not defined($enable)
+    ) {
+    $this->logMsg("E", "Plugin ini file <$config> seems broken!\n");
+    return undef;
+  }
+
+  $this->name($name);
+  $this->order($order);
+  if($enable != 0) {
+    $this->ready(1);
+  }
+  return $this;
+}
+# /constructor
+
+# returns: number of patched gfxboot files
+sub execute
+{
+  my $this = shift;
+  if(not ref($this)) {
+    return undef;
+  }
+  my $retval = 0;
+  # sanity check:
+  if($this->{m_ready} == 0) {
+    return $retval;
+  }
+
+  my $ismini = $this->collect()->productData()->getVar("FLAVOR");
+  if(not defined($ismini)) {
+    $this->logMsg("W", "FLAVOR not set?");
+    return $retval;
+  }
+  if($ismini !~ m{dvd-promo}i) {
+    return $retval;
+  }
+
+  my $medium = $this->collect()->productData()->getVar("MEDIUM_NAME");
+  find( sub { 
+     if (m/initrd.liv/) { 
+       my $cd = $File::Find::name; 
+       system("mkdir -p boot; echo $medium > boot/mbrid");
+       system("echo boot/mbrid | cpio --create --format=newc --quiet | gzip -9 
-f >> $cd");
+       system("rm boot/mbrid; rmdir boot");
+       $this->logMsg("I", "updated $cd");
+      }  
+     }, $this->handler()->collect()->basedir());
+
+  return $retval;
+}
+
+1;
+

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

Reply via email to