Hello community,
here is the log from the commit of package yast2-product-creator
checked in at Thu Nov 20 01:59:58 CET 2008.
--------
--- yast2-product-creator/yast2-product-creator.changes 2008-11-18 00:13:28.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-product-creator/yast2-product-creator.changes 2008-11-19 17:41:58.065879000 +0100
@@ -1,0 +2,7 @@
+Wed Nov 19 17:38:36 CET 2008 - lslezak@suse.cz
+
+- fixed creating cross-arch PPC product (cross-ppc-binutils,
+ updated lilo and util-linux packages are needed) (bnc#443859)
+- 2.17.13
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-product-creator-2.17.12.tar.bz2
New:
----
yast2-product-creator-2.17.13.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-product-creator.spec ++++++
--- /var/tmp/diff_new_pack.r20444/_old 2008-11-20 01:58:39.000000000 +0100
+++ /var/tmp/diff_new_pack.r20444/_new 2008-11-20 01:58:39.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-product-creator (Version 2.17.12)
+# spec file for package yast2-product-creator (Version 2.17.13)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-product-creator
-Version: 2.17.12
+Version: 2.17.13
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-product-creator-2.17.12.tar.bz2
+Source0: yast2-product-creator-2.17.13.tar.bz2
Prefix: /usr
BuildRequires: autoyast2-installation perl-XML-Writer update-desktop-files yast2 yast2-add-on-creator yast2-devtools yast2-packager yast2-security yast2-testsuite
PreReq: %fillup_prereq
@@ -49,7 +49,7 @@
%prep
-%setup -n yast2-product-creator-2.17.12
+%setup -n yast2-product-creator-2.17.13
%build
%{prefix}/bin/y2tool y2autoconf
@@ -94,8 +94,11 @@
#%dir /etc/YaST2/product-creator
/usr/share/YaST2/scrconf/*.scr
/var/adm/fillup-templates/sysconfig.product-creator
-
%changelog
+* Wed Nov 19 2008 lslezak@suse.cz
+- fixed creating cross-arch PPC product (cross-ppc-binutils,
+ updated lilo and util-linux packages are needed) (bnc#443859)
+- 2.17.13
* Tue Nov 11 2008 lslezak@suse.cz
- fixed architecture check of CODE11 repositories (bnc#438732)
- 2.17.12
++++++ yast2-product-creator-2.17.12.tar.bz2 -> yast2-product-creator-2.17.13.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.17.12/configure new/yast2-product-creator-2.17.13/configure
--- old/yast2-product-creator-2.17.12/configure 2008-11-12 17:35:31.000000000 +0100
+++ new/yast2-product-creator-2.17.13/configure 2008-11-19 17:44:58.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-product-creator 2.17.12.
+# Generated by GNU Autoconf 2.63 for yast2-product-creator 2.17.13.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-product-creator'
PACKAGE_TARNAME='yast2-product-creator'
-PACKAGE_VERSION='2.17.12'
-PACKAGE_STRING='yast2-product-creator 2.17.12'
+PACKAGE_VERSION='2.17.13'
+PACKAGE_STRING='yast2-product-creator 2.17.13'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-product-creator 2.17.12 to adapt to many kinds of systems.
+\`configure' configures yast2-product-creator 2.17.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1346,7 +1346,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-product-creator 2.17.12:";;
+ short | recursive ) echo "Configuration of yast2-product-creator 2.17.13:";;
esac
cat <<\_ACEOF
@@ -1426,7 +1426,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-product-creator configure 2.17.12
+yast2-product-creator configure 2.17.13
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1440,7 +1440,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-product-creator $as_me 2.17.12, which was
+It was created by yast2-product-creator $as_me 2.17.13, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2287,7 +2287,7 @@
# Define the identity of the package.
PACKAGE='yast2-product-creator'
- VERSION='2.17.12'
+ VERSION='2.17.13'
cat >>confdefs.h <<_ACEOF
@@ -2511,7 +2511,7 @@
-VERSION="2.17.12"
+VERSION="2.17.13"
RPMNAME="yast2-product-creator"
MAINTAINER="Ladislav Slezak "
@@ -3452,7 +3452,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-product-creator $as_me 2.17.12, which was
+This file was extended by yast2-product-creator $as_me 2.17.13, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3502,7 +3502,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-product-creator config.status 2.17.12
+yast2-product-creator config.status 2.17.13
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.17.12/configure.in new/yast2-product-creator-2.17.13/configure.in
--- old/yast2-product-creator-2.17.12/configure.in 2008-11-12 17:35:26.000000000 +0100
+++ new/yast2-product-creator-2.17.13/configure.in 2008-11-19 17:44:53.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-product-creator, 2.17.12, http://bugs.opensuse.org/, yast2-product-creator)
+AC_INIT(yast2-product-creator, 2.17.13, http://bugs.opensuse.org/, yast2-product-creator)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.17.12"
+VERSION="2.17.13"
RPMNAME="yast2-product-creator"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.17.12/src/complex.ycp new/yast2-product-creator-2.17.13/src/complex.ycp
--- old/yast2-product-creator-2.17.12/src/complex.ycp 2008-10-31 14:08:48.000000000 +0100
+++ new/yast2-product-creator-2.17.13/src/complex.ycp 2008-11-19 17:44:46.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Dialogs definitions
* Authors: Anas Nashif
*
- * $Id: complex.ycp 52793 2008-10-31 13:07:48Z lslezak $
+ * $Id: complex.ycp 53450 2008-11-19 16:40:34Z lslezak $
*/
{
@@ -81,6 +81,21 @@
return true;
}
+ boolean checkNeededPackages()
+ {
+ // if the target is a PPC product and the system arch is not PPC we need to install
+ // cross-ppc-binutils package to update the initrd
+ if ((ProductCreator::Config["arch"]:"" == "ppc"
+ || ProductCreator::Config["arch"]:"" == "ppc64")
+ && !Arch::ppc())
+ {
+ y2milestone("cross-ppc-binutils is needed");
+ return Package::InstallAll(["cross-ppc-binutils"]);
+ }
+
+ return true;
+ }
+
/**
* Overview dialog
* @return dialog result
@@ -188,7 +203,8 @@
else if(ret == `create_button) {
string current = (string) UI::QueryWidget(`id(`table), `CurrentItem );
ProductCreator::Config = ProductCreator::Configs[current]:$[];
- // ProductCreator::EnableSource();
+ // check the needed packages
+ if (!checkNeededPackages()) continue;
ret = `create;
break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.17.12/src/ProductCreator.ycp new/yast2-product-creator-2.17.13/src/ProductCreator.ycp
--- old/yast2-product-creator-2.17.12/src/ProductCreator.ycp 2008-11-12 13:33:34.000000000 +0100
+++ new/yast2-product-creator-2.17.13/src/ProductCreator.ycp 2008-11-19 17:44:46.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Data for configuration of product-creator, input and output functions.
* Authors: Anas Nashif
*
- * $Id: ProductCreator.ycp 53195 2008-11-12 12:30:34Z lslezak $
+ * $Id: ProductCreator.ycp 53450 2008-11-19 16:40:34Z lslezak $
*
* Representation of the configuration of product-creator.
* Input and output routines.
@@ -2073,6 +2073,71 @@
return ret;
}
+string CreateMkzimageCommand()
+{
+ string ret = "";
+
+ if ((ProductCreator::Config["arch"]:"" == "ppc"
+ || ProductCreator::Config["arch"]:"" == "ppc64")
+ && !Arch::ppc())
+ {
+ // find the lilo package
+ list<map> ppc_lilo = Pkg::ResolvableProperties("lilo", `package, "");
+ y2milestone("found lilo packages: %1", ppc_lilo);
+
+ map lilo_pkg = ppc_lilo[0]:$[];
+
+ y2milestone("selected lilo package: %1", lilo_pkg);
+
+ if (lilo_pkg == nil || lilo_pkg == $[])
+ {
+ y2error("lilo package was not found");
+ return "";
+ }
+
+ // download the package
+ string downloaded_pkg = Pkg::SourceProvideFile(lilo_pkg["source"]:-1, lilo_pkg["medium_nr"]:-1, lilo_pkg["path"]:"lilo");
+
+ y2milestone("Downloaded lilo package: %1", downloaded_pkg);
+
+ if (downloaded_pkg == nil || downloaded_pkg == "")
+ {
+ y2error("Downloading package lilo failed");
+ return "";
+ }
+
+ // create a tmpdir
+ string tmp_dir = (string)SCR::Read(.target.tmpdir);
+ string tmp_lilo = tmp_dir + "/lilo-" + lilo_pkg["version"]:"";
+
+ // remove the directory if it already exists (e.g. from the previous run)
+ Exec("rm -rf " + tmp_lilo);
+
+ SCR::Execute(.target.mkdir, tmp_lilo);
+
+ // unpack the package into the tmpdir
+ string unpack_cmd = sformat("cd '%1' && /usr/bin/rpm2cpio '%2' | /usr/bin/cpio -i --make-directories", String::Quote(tmp_lilo), String::Quote(downloaded_pkg));
+
+ if (!Exec(unpack_cmd))
+ {
+ y2error("Unpacking lilo package failed");
+ return "";
+ }
+
+ // use the linker from cross-ppc-binutils,
+ // set --objdir option to the unpacked PPC lilo package
+ ret = "PATH=/opt/cross/powerpc-linux/bin:$PATH '" + String::Quote(tmp_lilo) + "/bin/mkzimage' --objdir '"
+ + String::Quote(tmp_lilo) + "/lib/lilo' --board chrp --vmlinux '%1' --initrd '%2' --output '%3/new_inst' --tmp '%3'";
+ }
+ else
+ {
+ ret = "/bin/mkzimage --board pmac --vmlinux '%1' --initrd '%2' --output '%3/new_inst' --tmp '%3'";
+ }
+
+ y2milestone("mkzimage command template: %1", ret);
+ return ret;
+}
+
global boolean InsertKeyToInitrds(string gpg_key, string base_dir)
{
// get initrd list
@@ -2158,49 +2223,61 @@
}
);
- // put the initrd back to the inst file
- foreach(string orig_inst, string tmp_initrd, inst_mapping,
- {
- y2milestone("%1 -> %2", tmp_initrd, orig_inst);
-
- if (orig_inst == "suseboot/inst32" || orig_inst == "suseboot/inst64")
- {
- // extract kernel
- string gzkernel = DumpKernelFromObjectFile(base_dir + "/" + orig_inst);
+ if (size(inst_mapping) > 0)
+ {
+ // create the template command if needed (download the needed lilo package just once)
+ string mkzimage_template = CreateMkzimageCommand();
- if (gzkernel != "")
+ if (mkzimage_template != "")
+ {
+ // put the initrd back to the inst file
+ foreach(string orig_inst, string tmp_initrd, inst_mapping,
{
- // unpack the kernel image - required by mkzimage
- string kernel = GunzipKernel(gzkernel);
- string tmp_dir = (string)SCR::Read( .target.tmpdir );
-
- string initrd_copy = sformat("%1/tmp_initrd", tmp_dir);
-
- // copy the initrd to a temp dir - mkzimage doesn't work properly
- // when there is a space in path
- ret = ret && Exec(sformat("mv '%1/%2' '%3'", String::Quote(base_dir), tmp_initrd, initrd_copy));
-
- // create new inst file
- // see mk_ppc_installation-images_bootbinaries.sh (installation-images)
- command = sformat("/bin/mkzimage --board chrp --vmlinux '%1' --initrd '%2' --output '%3/new_inst' --tmp '%3'",
- kernel, initrd_copy, tmp_dir);
- ret = ret && Exec(command);
+ y2milestone("%1 -> %2", tmp_initrd, orig_inst);
- // remove the temporary files
- command = sformat("rm -f '%1' '%2'", kernel, initrd_copy);
- ret = ret && Exec(command);
+ if (orig_inst == "suseboot/inst32" || orig_inst == "suseboot/inst64")
+ {
+ // extract kernel
+ string gzkernel = DumpKernelFromObjectFile(base_dir + "/" + orig_inst);
- // move the new file to the target directory
- command = sformat("mv '%1/new_inst' '%2/%3'", tmp_dir, String::Quote(base_dir), orig_inst);
- ret = ret && Exec(command);
+ if (gzkernel != "")
+ {
+ // unpack the kernel image - required by mkzimage
+ string kernel = GunzipKernel(gzkernel);
+ string tmp_dir = (string)SCR::Read( .target.tmpdir );
+
+ string initrd_copy = sformat("%1/tmp_initrd", tmp_dir);
+
+ // copy the initrd to a temp dir - mkzimage doesn't work properly
+ // when there is a space in path
+ ret = ret && Exec(sformat("mv '%1/%2' '%3'", String::Quote(base_dir), tmp_initrd, initrd_copy));
+
+ // create new inst file
+ // see mk_ppc_installation-images_bootbinaries.sh (installation-images)
+ command = sformat(mkzimage_template, kernel, initrd_copy, tmp_dir);
+ ret = ret && Exec(command);
+
+ // remove the temporary files
+ command = sformat("rm -f '%1' '%2'", kernel, initrd_copy);
+ ret = ret && Exec(command);
+
+ // move the new file to the target directory
+ command = sformat("mv '%1/new_inst' '%2/%3'", tmp_dir, String::Quote(base_dir), orig_inst);
+ ret = ret && Exec(command);
+ }
+ }
+ else
+ {
+ y2warning("Unsupported inst file: %1", orig_inst);
+ }
}
- }
- else
- {
- y2warning("Unsupported inst file: %1", orig_inst);
- }
+ );
}
- );
+ else
+ {
+ y2error("mkzimage command missing, not modifying initrd (%1)", inst_mapping);
+ }
+ }
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.17.12/VERSION new/yast2-product-creator-2.17.13/VERSION
--- old/yast2-product-creator-2.17.12/VERSION 2008-11-12 16:35:11.000000000 +0100
+++ new/yast2-product-creator-2.17.13/VERSION 2008-11-19 17:40:57.000000000 +0100
@@ -1 +1 @@
-2.17.12
+2.17.13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org