Hello community, here is the log from the commit of package yast2-product-creator checked in at Fri Sep 14 16:10:26 CEST 2007. -------- --- yast2-product-creator/yast2-product-creator.changes 2007-08-27 12:01:02.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yast2-product-creator/yast2-product-creator.changes 2007-09-14 12:40:01.116680000 +0200 @@ -1,0 +2,16 @@ +Sun Sep 2 21:20:26 CEST 2007 - jsuchome@suse.cz + +- write schemeversion to config.xml +- save new kiwi image configurations to vardir/product-creator +- do not import already imported and modified configuration +- enable modifications of configurations without creating images +- require root for running yast2 kiwi (#309456) +- 2.15.7 + +------------------------------------------------------------------- +Tue Aug 28 11:00:31 CEST 2007 - jsuchome@suse.cz + +- include the package from "post-packages" section of autoyast + profile (#291776) + +------------------------------------------------------------------- Old: ---- yast2-product-creator-2.15.6.tar.bz2 New: ---- yast2-product-creator-2.15.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-product-creator.spec ++++++ --- /var/tmp/diff_new_pack.J31331/_old 2007-09-14 16:10:13.000000000 +0200 +++ /var/tmp/diff_new_pack.J31331/_new 2007-09-14 16:10:13.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-product-creator (Version 2.15.6) +# spec file for package yast2-product-creator (Version 2.15.7) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,19 +11,19 @@ # norootforbuild Name: yast2-product-creator -Version: 2.15.6 +Version: 2.15.7 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-product-creator-2.15.6.tar.bz2 -prefix: /usr +Source0: yast2-product-creator-2.15.7.tar.bz2 +Prefix: /usr BuildRequires: autoyast2-installation perl-XML-Writer update-desktop-files yast2-devtools yast2-packager yast2-security yast2-testsuite Requires: yast2-packager autoyast2-installation yast2-security # GPG.ycp and GPGWidgets.ycp Requires: yast2 >= 2.15.2 BuildRequires: yast2 >= 2.15.2 -BuildArchitectures: noarch +BuildArch: noarch Summary: YaST2 - Module for Creating New Products %description @@ -33,7 +33,7 @@ %prep -%setup -n yast2-product-creator-2.15.6 +%setup -n yast2-product-creator-2.15.7 %build %{prefix}/bin/y2tool y2autoconf @@ -76,6 +76,16 @@ /usr/lib/YaST2/servers_non_y2/ag_* %changelog +* Sun Sep 02 2007 - jsuchome@suse.cz +- write schemeversion to config.xml +- save new kiwi image configurations to vardir/product-creator +- do not import already imported and modified configuration +- enable modifications of configurations without creating images +- require root for running yast2 kiwi (#309456) +- 2.15.7 +* Tue Aug 28 2007 - jsuchome@suse.cz +- include the package from "post-packages" section of autoyast + profile (#291776) * Mon Aug 27 2007 - jsuchome@suse.cz - do not require packages with image descriptions, include required files (originally created by ms@suse.de for kiwi-desc-buildservice ++++++ yast2-product-creator-2.15.6.tar.bz2 -> yast2-product-creator-2.15.7.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/agent-kiwi/ag_kiwi new/yast2-product-creator-2.15.7/agent-kiwi/ag_kiwi --- old/yast2-product-creator-2.15.6/agent-kiwi/ag_kiwi 2007-07-04 15:20:10.000000000 +0200 +++ new/yast2-product-creator-2.15.7/agent-kiwi/ag_kiwi 2007-08-30 09:06:53.000000000 +0200 @@ -59,8 +59,8 @@ } } my $prefs = $optionsNodeList -> get_node(1); - foreach my $tag ("packagemanager", "version", "rpm-check-signatures", "rpm-force", - "size") { + foreach my $tag ("packagemanager", "version", "rpm-check-signatures", + "rpm-force", "size", "defaultdestination") { my $element = $prefs -> getElementsByTagName ($tag); $retmap{$tag} = $element-> get_node(1)->textContent () if ($element); } @@ -98,6 +98,9 @@ my $image_name = $image -> getAttribute ("name"); $retmap{"name"} = $image_name if $image_name; + my $scheme_ver = $image -> getAttribute ("schemeversion"); + $retmap{"schemeversion"} = $scheme_ver if $scheme_ver; + $retmap{"users"} = {}; foreach my $usernode ($usrdataNodeList -> get_nodelist()) { my $group = $usernode -> getAttribute("group"); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/data/kiwi_templates/iso/config.xml new/yast2-product-creator-2.15.7/src/data/kiwi_templates/iso/config.xml --- old/yast2-product-creator-2.15.6/src/data/kiwi_templates/iso/config.xml 2007-08-27 11:15:54.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/data/kiwi_templates/iso/config.xml 2007-09-14 10:04:26.000000000 +0200 @@ -7,7 +7,6 @@ <preferences> <version>1</version> <size unit="M">2700</size> - <packagemanager>smart</packagemanager> <rpm-check-signatures>False</rpm-check-signatures> <rpm-force>True</rpm-force> </preferences> @@ -18,9 +17,7 @@ <opensusePattern name="base"/> <opensusePattern name="x11"/> <opensusePattern name="apparmor"/> - <opensusePattern name="imaging"/> <opensusePattern name="kde"/> - <opensusePattern name="kde_imaging"/> <ignore name="smtp_daemon"/> <ignore name="pfscalibratio"/> <ignore name="jaf-demo"/> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/data/kiwi_templates/xen/config.xml new/yast2-product-creator-2.15.7/src/data/kiwi_templates/xen/config.xml --- old/yast2-product-creator-2.15.6/src/data/kiwi_templates/xen/config.xml 2007-08-27 11:15:54.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/data/kiwi_templates/xen/config.xml 2007-09-14 10:04:28.000000000 +0200 @@ -7,7 +7,6 @@ <preferences> <version>1</version> <size unit="M">2700</size> - <packagemanager>smart</packagemanager> <rpm-check-signatures>False</rpm-check-signatures> <rpm-force>True</rpm-force> </preferences> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/kiwi_dialogs.ycp new/yast2-product-creator-2.15.7/src/kiwi_dialogs.ycp --- old/yast2-product-creator-2.15.6/src/kiwi_dialogs.ycp 2007-08-27 08:59:43.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/kiwi_dialogs.ycp 2007-09-13 11:20:10.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Dialogs for kiwi configuration * Authors: Jiri Suchomel <jsuchome@suse.cz> * - * $Id: kiwi_dialogs.ycp 40173 2007-08-10 11:47:11Z jsuchome $ + * $Id: kiwi_dialogs.ycp 40494 2007-08-27 10:13:26Z jsuchome $ */ { textdomain "product-creator"; @@ -30,9 +30,6 @@ // what are we configuring now ("iso"/"xen"/...) string kiwi_task = ""; - // directory with kiwi images - string images_dir = ""; - // return the id of actual widget for boot image string boot_image_widget () { return kiwi_task + "boot"; @@ -42,11 +39,13 @@ list<term> GetAvailableImages (string subdir) { list<term> ret = []; - map out = (map) SCR::Execute (.target.bash_output, sformat ("ls %1/%2", images_dir, subdir)); + string dir = "/usr/share/kiwi/image/"; + map out = (map) SCR::Execute (.target.bash_output, + sformat ("ls %1/%2", dir, subdir)); if (out["exit"]:0 != 0) return ret; foreach (string file, splitstring (out["stdout"]:"", "\n"), { - if (file != "" && FileUtils::IsDirectory (sformat ("%1/%2/%3", images_dir, subdir, file))) + if (file != "" && FileUtils::IsDirectory (sformat ("%1/%2/%3", dir, subdir, file))) { ret = add (ret, `item (`id(file), file, file == KiwiConfig[subdir]:"")); } @@ -624,7 +623,6 @@ define boolean CreateImage (string key, map event) { if (event["ID"]:nil != `next) return true; - boolean ret = false; map question = $[ // popup question @@ -657,9 +655,10 @@ directory."), ]; + Kiwi::WriteConfigXML (KiwiConfig, kiwi_task); if (Popup::YesNo (question[kiwi_task]:"")) { - if (Kiwi::WriteConfigXML (KiwiConfig, kiwi_task)) + if (true) { string out_dir = KiwiConfig["iso-directory"]:""; if (FileUtils::CheckAndCreatePath (out_dir) && Kiwi::PrepareAndCreate (out_dir)) @@ -677,19 +676,15 @@ { Popup::Message (sformat (success[kiwi_task]:"", out_dir)); } - ret = true; } } } - if (ret) + string dir = Kiwi::SaveConfiguration (KiwiConfig, kiwi_task); + if (dir != nil && dir != "") { - string dir = Kiwi::SaveConfiguration (KiwiConfig, kiwi_task); - if (dir != nil && dir != "") - { - ProductCreator::Config["kiwi_configuration_" + kiwi_task] = dir; - } + ProductCreator::Config["kiwi_configuration_" + kiwi_task] = dir; } - return ret; + return true; } /** @@ -699,7 +694,7 @@ define void InitImageConfiguration () { kiwi_task = ProductCreator::kiwi_task; - images_dir = Kiwi::images_dir; + string kiwi_dir = "/usr/share/kiwi/image/"; // read the information from the base product integer src_id = ProductCreator::checkProductDependency (); @@ -710,10 +705,10 @@ Popup::ShowFeedback (_("Reading current live image configuration..."), _("Please wait...")); map default_dirmap = $[ - "iso" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), - "xen" : sformat ("%1/buildhost-suse-SLES10", images_dir), - "usb" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), - "vmx" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), + "iso" : sformat ("%1/kwliveDVD-suse-10.3", kiwi_dir), + "xen" : sformat ("%1/buildhost-suse-SLES10", kiwi_dir), + "usb" : sformat ("%1/kwliveDVD-suse-10.3", kiwi_dir), + "vmx" : sformat ("%1/kwliveDVD-suse-10.3", kiwi_dir), ]; // path to current config directory @@ -755,10 +750,11 @@ KiwiConfig[file] = contents; } }); - KiwiConfig = (map<string,any>)union(KiwiConfig, Kiwi::ReadConfigXML (kiwi_configuration)); + map<string,any> read_config = Kiwi::ReadConfigXML (kiwi_configuration); if (!KiwiConfig["_imported"]:false) { + KiwiConfig = (map<string,any>) union (KiwiConfig, read_config); // for new configuration, do not read all from the template y2milestone ("product-creator based configuration..."); foreach (string key, ["addons", "packages", "sources"], { @@ -768,6 +764,13 @@ else { y2milestone ("imported configuration..."); + // ignore options already set earlier... + foreach (string key, any val, read_config, { + if (!contains (["name", "iso-directory", "sources"], key)) + { + KiwiConfig[key] = val; + } + }); // "sources" are already there... foreach (string key, ["addons", "packages"], { ProductCreator::Config[key] = KiwiConfig[key]:[]; @@ -954,71 +957,6 @@ "validate_function" : CreateImage, "no_help" : true, ], - // widgets for config.xml tab - "isoboot" : $[ - "widget" : `combobox, - "opt" : [ `hstretch, `notify ], - // combo box label - "label" : _("C&D Boot Image"), - // help text for "C&D Boot Image", %1/%2 is path (on extra line) - "help" : sformat (_("<p>Choose one <b>CD Boot Image</b> from the<br> -<tt>%1/%2</tt><br> -directory.</p> -"), - Kiwi::images_dir, boot_image_widget ()), - "items" : [], - "init" : InitBootCombo, - "store" : StoreBootCombo, - "handle" : HandleBootCombo, - ], - "xenboot" : $[ - "widget" : `combobox, - "opt" : [ `hstretch, `notify ], - // combo box label - "label" : _("&Xen Boot Image"), - // help text for "XEN Boot Image" - "help" : sformat (_("<p>Choose one <b>Xen Boot Image</b> from the<br> -<tt>%1/%2</tt><br> -directory.</p> -"), - Kiwi::images_dir, boot_image_widget ()), - "items" : [], - "init" : InitBootCombo, - "store" : StoreBootCombo, - "handle" : HandleBootCombo, - ], - "usbboot" : $[ - "widget" : `combobox, - "opt" : [ `hstretch, `notify ], - // combo box label - "label" : _("&USB Stick Boot Image"), - // help text for "XEN Boot Image" - "help" : sformat (_("<p>Choose one <b>USB stick Boot Image</b> from the<br> -<tt>%1/%2</tt><br> -directory.</p> -"), - Kiwi::images_dir, boot_image_widget ()), - "items" : [], - "init" : InitBootCombo, - "store" : StoreBootCombo, - "handle" : HandleBootCombo, - ], - "vmxboot" : $[ - "widget" : `combobox, - "opt" : [ `hstretch, `notify ], - // combo box label - "label" : _("&Virtual Disk Boot Image"), - // help text for "XEN Boot Image" - "help" : sformat (_("<p>Choose one <b>Virtual Disk Boot Image</b> from the<br> -<tt>%1/%2</tt><br> -directory.</p> -"), - Kiwi::images_dir, boot_image_widget ()), - "items" : [], - "init" : InitBootCombo, - "store" : StoreBootCombo, - "handle" : HandleBootCombo, - ], "configure_boot" : $[ "widget" : `push_button, // pusbutton label @@ -1383,7 +1321,8 @@ "contents" : contents, "caption" : caption[kiwi_task]:"", "back_button" : Label::BackButton (), - "next_button" : next_button[kiwi_task]:Label::NextButton (), +// "next_button" : next_button[kiwi_task]:Label::NextButton (), + "next_button" : Label::FinishButton (), ]); y2milestone("Returning %1", ret); return ret; @@ -1678,8 +1617,8 @@ UI::SetFocus (`id (`out_dir)); continue; } - break; kiwi_task = (string) UI::QueryWidget (`id (`type), `Value); + break; } } string boot = Config["type",kiwi_task,"boot"]:""; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/kiwi.ycp new/yast2-product-creator-2.15.7/src/kiwi.ycp --- old/yast2-product-creator-2.15.6/src/kiwi.ycp 2007-07-19 13:52:47.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/kiwi.ycp 2007-09-13 13:31:37.000000000 +0200 @@ -15,6 +15,7 @@ include "product-creator/kiwi_dialogs.ycp"; import "CommandLine"; +import "Confirm"; import "PackageCallbacksInit"; import "Sequencer"; @@ -41,8 +42,15 @@ ]; Wizard::CreateDialog(); - Wizard::SetDesktopIcon("cd-creator"); - if (!Package::Install ("kiwi")) + Wizard::SetDesktopIcon("kiwi"); + + if (!Confirm::MustBeRoot ()) + { + UI::CloseDialog (); + return false; + } + + if (!Package::InstallAll (["kiwi", "yast2-instserver"])) { Popup::Error(_("Installation of required packages failed.")); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/Kiwi.ycp new/yast2-product-creator-2.15.7/src/Kiwi.ycp --- old/yast2-product-creator-2.15.6/src/Kiwi.ycp 2007-08-27 08:45:30.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/Kiwi.ycp 2007-09-14 10:12:48.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Data for kiwi configuration, input and output functions. * Authors: Jiri Suchomel <jsuchome@suse.cz> * - * $Id: Kiwi.ycp 39888 2007-08-02 09:50:37Z jsuchome $ + * $Id: Kiwi.ycp 40494 2007-08-27 10:13:26Z jsuchome $ */ { module "Kiwi"; @@ -23,10 +23,14 @@ import "String"; string encryption_method = nil; + global string tmp_dir = ""; - global string images_dir = "/usr/share/kiwi/image"; + global string images_dir = Directory::vardir + "/product-creator/images"; + + global string default_packagemanager = "smart"; + // all repositories of current configuration list<map> all_sources = []; // where the kiwi configuration files are stored @@ -98,7 +102,7 @@ * generate the name of directory with kiwi configuration */ string get_config_dir (string name, string task) { - return "/kw" + task + "-YaST-" + deletechars (name, " \t"); + return deletechars (name, " \t"); } /** @@ -106,11 +110,14 @@ */ map get_type_value (map config, string task) { + string boot_image = sformat ("%1boot/%2", task, config[task + "boot"]:"suse-10.2"); + if (config["type",task,"boot"]:"" != "") + boot_image = config["type",task,"boot"]:""; map ret = $[ "__key" : "type", "__value" : task, "primary" : "true", - "boot" : sformat ("%1boot/%2", task, config[task + "boot"]:"suse-10.2"), + "boot" : boot_image, //FIXME (KiwiConfig["compressed"]:false ? ",compressed" : ""), ]; if (task != "iso") @@ -223,13 +230,16 @@ ret["xen_memory"] = tointeger (packages["xen","memory"]:"512"); foreach (string key, [ "author", "contact", "specification", "packagemanager", "version", "rpm-check-signatures", "rpm-force", - "sizeunit", "type", "name", "repository" ], + "sizeunit", "type", "name", "repository", "defaultdestination", + "schemeversion"], { if (config[key]:nil != nil) ret[key] = config[key]:nil; }); if (haskey (config, "size")) ret["size"] = tointeger (config["size"]:"2700"); + if (haskey (config, "defaultdestination")) + ret["iso-directory"] = config["defaultdestination"]:""; foreach (string user, map usermap, (map<string,map>) config["users"]:$[], { if (!haskey (ret, "users")) ret["users"] = $[]; @@ -319,6 +329,7 @@ list write_list = [ $[ "__key" : "image", "name" : KiwiConfig["name"]:"", + "schemeversion" : KiwiConfig["schemeversion"]:"1.4", "__children" : [ $[ "__key" : "description", @@ -353,8 +364,7 @@ ], $[ "__key" : "packagemanager", -// "__value" : "zypper", FIXME still not working for SLES10SP1... - "__value" : "smart", + "__value" : KiwiConfig["packagemanager"]:default_packagemanager ], $[ "__key" : "rpm-check-signatures", @@ -364,6 +374,10 @@ "__key" : "rpm-force", "__value" : KiwiConfig["rpm-force"]:"True", ], + $[ + "__key" : "defaultdestination", + "__value" : KiwiConfig["iso-directory"]:"", + ], ], ], ], @@ -411,7 +425,8 @@ } string write_string = Map2XML (write_list[0]:$[], 0); - config_dir = tmp_dir + get_config_dir (KiwiConfig["name"]:"", kiwi_task); + config_dir = tmp_dir + "/" + + get_config_dir (KiwiConfig["name"]:"", kiwi_task); SCR::Execute (.target.mkdir, config_dir); SCR::Write (.target.string, config_dir + "/config.xml", write_string); foreach (string dir, ["root_dir", "config_dir"], { @@ -563,6 +578,8 @@ global string SaveConfiguration (map KiwiConfig, string kiwi_task) { if (config_dir == "" || !FileUtils::Exists (config_dir)) return nil; + if (!FileUtils::Exists (images_dir)) + SCR::Execute (.target.mkdir, images_dir); SCR::Execute (.target.bash, sformat ("cp -ar %1 %2/", config_dir, images_dir)); return (images_dir + get_config_dir (KiwiConfig["name"]:"", kiwi_task)); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/src/ProductCreator.ycp new/yast2-product-creator-2.15.7/src/ProductCreator.ycp --- old/yast2-product-creator-2.15.6/src/ProductCreator.ycp 2007-08-09 14:41:53.000000000 +0200 +++ new/yast2-product-creator-2.15.7/src/ProductCreator.ycp 2007-09-13 09:36:17.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Data for configuration of product-creator, input and output functions. * Authors: Anas Nashif <nashif@suse.de> * - * $Id: ProductCreator.ycp 39888 2007-08-02 09:50:37Z jsuchome $ + * $Id: ProductCreator.ycp 40525 2007-08-28 09:12:00Z jsuchome $ * * Representation of the configuration of product-creator. * Input and output routines. @@ -2292,6 +2292,18 @@ PackageAI::toinstall = software["packages"]:[]; Config["packages"] = AutoinstSoftware::autoinstPackages(); + + // add "post-packages" + list post_packages = software["post-packages"]:[]; + if (size(post_packages) > 0) + { + y2milestone("Adding \"post-packages\": %1", post_packages); + Config["packages"] = union(Config["packages"]:[], post_packages); + } + + // TODO: remove also "remove-packages" from the list? + // Is it safe to remove them due to possible dependencies?? + y2milestone("Config: %1", Config ); profile_parsed = true; return true; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-product-creator-2.15.6/VERSION new/yast2-product-creator-2.15.7/VERSION --- old/yast2-product-creator-2.15.6/VERSION 2007-08-27 11:19:06.000000000 +0200 +++ new/yast2-product-creator-2.15.7/VERSION 2007-09-02 21:20:58.000000000 +0200 @@ -1 +1 @@ -2.15.6 +2.15.7 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de