Hello community, here is the log from the commit of package yast2-product-creator for openSUSE:Factory checked in at 2011-10-25 17:24:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-product-creator (Old) and /work/SRC/openSUSE:Factory/.yast2-product-creator.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-product-creator", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-product-creator/yast2-product-creator.changes 2011-10-04 18:02:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-product-creator.new/yast2-product-creator.changes 2011-10-28 15:33:13.000000000 +0200 @@ -1,0 +2,11 @@ +Tue Oct 25 09:58:49 CEST 2011 - [email protected] + +- added UI for disk encryption (fate#312486) +- 2.21.12 + +------------------------------------------------------------------- +Mon Oct 17 15:28:32 CEST 2011 - [email protected] + +- call SLEPOS specific XSL transformation (bnc#723031) + +------------------------------------------------------------------- Old: ---- yast2-product-creator-2.21.11.tar.bz2 New: ---- yast2-product-creator-2.21.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-product-creator.spec ++++++ --- /var/tmp/diff_new_pack.jrgYzV/_old 2011-10-28 15:33:17.000000000 +0200 +++ /var/tmp/diff_new_pack.jrgYzV/_new 2011-10-28 15:33:17.000000000 +0200 @@ -19,16 +19,14 @@ Name: yast2-product-creator -Version: 2.21.11 +Version: 2.21.12 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-product-creator-%{version}.tar.bz2 -Prefix: /usr - Group: System/YaST -License: GPL v2 or later +License: GPL-2.0+ BuildRequires: autoyast2-installation perl-XML-Writer update-desktop-files yast2 yast2-add-on-creator yast2-devtools yast2-packager yast2-security yast2-slp yast2-testsuite PreReq: %fillup_prereq @@ -67,23 +65,23 @@ %setup -n yast2-product-creator-%{version} %build -%{prefix}/bin/y2tool y2autoconf -%{prefix}/bin/y2tool y2automake +%{_prefix}/bin/y2tool y2autoconf +%{_prefix}/bin/y2tool y2automake autoreconf --force --install export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" %{?suse_update_config:%{suse_update_config -f}} -./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir} +./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir} # V=1: verbose build in case we used AM_SILENT_RULES(yes) # so that RPM_OPT_FLAGS check works make %{?jobs:-j%jobs} V=1 %install make install DESTDIR="$RPM_BUILD_ROOT" -[ -e "%{prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT" -for f in `find $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/ -name "*.desktop"` ; do +[ -e "%{_prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT" +for f in `find $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/ -name "*.desktop"` ; do d=${f##*/} %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop} done @@ -105,10 +103,10 @@ /usr/share/YaST2/clients/kiwi.ycp /usr/share/YaST2/modules/*.ycp /usr/share/YaST2/modules/*.ybc -%{prefix}/share/applications/YaST2/product-creator.desktop -%{prefix}/share/applications/YaST2/image-creator.desktop -%{prefix}/lib/YaST2/bin/y2mkiso -%doc %{prefix}/share/doc/packages/yast2-product-creator +%{_prefix}/share/applications/YaST2/product-creator.desktop +%{_prefix}/share/applications/YaST2/image-creator.desktop +%{_prefix}/lib/YaST2/bin/y2mkiso +%doc %{_prefix}/share/doc/packages/yast2-product-creator %dir /usr/share/YaST2/data/product-creator /usr/share/YaST2/data/product-creator/* #%dir /etc/YaST2/product-creator ++++++ yast2-product-creator-2.21.11.tar.bz2 -> yast2-product-creator-2.21.12.tar.bz2 ++++++ ++++ 2301 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-product-creator-2.21.11/VERSION new/yast2-product-creator-2.21.12/VERSION --- old/yast2-product-creator-2.21.11/VERSION 2011-09-27 15:00:33.000000000 +0200 +++ new/yast2-product-creator-2.21.12/VERSION 2011-10-18 11:11:10.000000000 +0200 @@ -1 +1 @@ -2.21.11 +2.21.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-product-creator-2.21.11/configure.in new/yast2-product-creator-2.21.12/configure.in --- old/yast2-product-creator-2.21.11/configure.in 2011-09-27 14:56:05.000000000 +0200 +++ new/yast2-product-creator-2.21.12/configure.in 2011-10-05 10:09:39.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-product-creator dnl -dnl -- This file is generated by y2autoconf 2.21.2 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.21.3 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-product-creator, 2.21.10, http://bugs.opensuse.org/, yast2-product-creator) +AC_INIT(yast2-product-creator, 2.21.11, 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.21.10" +VERSION="2.21.11" RPMNAME="yast2-product-creator" MAINTAINER="Jiri Suchomel <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-product-creator-2.21.11/src/Kiwi.ycp new/yast2-product-creator-2.21.12/src/Kiwi.ycp --- old/yast2-product-creator-2.21.11/src/Kiwi.ycp 2011-09-27 14:55:10.000000000 +0200 +++ new/yast2-product-creator-2.21.12/src/Kiwi.ycp 2011-10-18 11:09:07.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Data for kiwi configuration, input and output functions. * Authors: Jiri Suchomel <[email protected]> * - * $Id: Kiwi.ycp 64094 2011-05-24 08:34:00Z jsuchome $ + * $Id: Kiwi.ycp 66472 2011-10-18 09:09:06Z jsuchome $ */ { module "Kiwi"; @@ -219,6 +219,32 @@ return ret; } + /** + * Transform given XML file using given XSL transformation file + * Return path to new file if transformation was done and was successful + * @param config_path path to XML file + * @param xsl_file path to XSL file + */ + string XSLTTransform (string config_path, string xsl_file) { + string ret_path = config_path; + if (Package::Installed ("libxslt") && FileUtils::Exists (xsl_file)) + { + // new path identified by xsl file: + // config-usr-share-kiwi-xsl-convertSleposSp1toSp2-xsl.xml + ret_path = sformat ("%1/config%2.xml", + Directory::tmpdir, + mergestring (splitstring (xsl_file, "/ ."), "-")); + map out = (map) SCR::Execute (.target.bash_output, sformat ( + "/usr/bin/xsltproc '%1' '%2' > %3", + String::Quote (xsl_file), String::Quote (config_path), ret_path)); + if (out["exit"]:0 != 0) + { + y2error ("xslt transformation failed: %1", out); + ret_path = config_path; + } + } + return ret_path; + } /** * import the data from given config.xml @@ -234,16 +260,24 @@ return ret; } string file_path = base_path + "/config.xml"; - if (FileUtils::Exists ("/usr/share/kiwi/xsl/master.xsl")) + + // transformation to latest kiwi version + file_path = XSLTTransform (file_path, "/usr/share/kiwi/xsl/master.xsl"); + // transformation to latest SLEPOs version (bnc#723031) + string slepos_path = XSLTTransform (file_path, "/usr/share/kiwi/xsl/convertSleposSp1toSp2.xsl"); + // make a backup when SLEPOS transformation changed anything + if (slepos_path != file_path) { - file_path = Directory::tmpdir + "/transformed-config.xml"; map out = (map) SCR::Execute (.target.bash_output, sformat ( - "xsltproc /usr/share/kiwi/xsl/master.xsl %1/config.xml > %2", - base_path, file_path)); + "diff -1 '%1' '%2'", file_path, slepos_path)); if (out["exit"]:0 != 0) { - y2error ("xslt transformation failed: %1", out); + string backup = base_path + "/config.xml.POSsave"; + y2milestone ("creating backup of config file: %1", backup); + SCR::Execute (.target.bash, sformat ("cp -- '%1' '%2'", + String::Quote (file_path), String::Quote (backup))); } + file_path = slepos_path; } // read rest of config.xml using more generic agent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-product-creator-2.21.11/src/kiwi_dialogs.ycp new/yast2-product-creator-2.21.12/src/kiwi_dialogs.ycp --- old/yast2-product-creator-2.21.11/src/kiwi_dialogs.ycp 2011-09-27 14:55:10.000000000 +0200 +++ new/yast2-product-creator-2.21.12/src/kiwi_dialogs.ycp 2011-10-25 09:57:40.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Dialogs for kiwi configuration * Authors: Jiri Suchomel <[email protected]> * - * $Id: kiwi_dialogs.ycp 65497 2011-09-01 10:05:53Z jsuchome $ + * $Id: kiwi_dialogs.ycp 66483 2011-10-18 13:01:53Z jsuchome $ */ { textdomain "product-creator"; @@ -123,6 +123,54 @@ return nil; } + void InitDiskPassword (string id) { + + string disk_password = ""; + foreach (map typemap, (list<map>)KiwiConfig["preferences",0,"type"]:[], { + if (typemap["image"]:"" == kiwi_task) + { + disk_password = typemap["luks"]:disk_password; + } + }); + UI::ChangeWidget (`id (id), `Value, disk_password); + UI::ChangeWidget (`id (id), `Enabled, disk_password != ""); + UI::ChangeWidget (`id ("encrypt_disk"), `Value, disk_password != ""); + } + + void StoreDiskPassword (string key, map event) { + + string disk_password = (string) UI::QueryWidget (`id (key), `Value); + if (UI::QueryWidget (`id ("encrypt_disk"), `Value) == false) + disk_password = ""; + + KiwiConfig["preferences",0,"type"] = maplist (map typemap, + (list<map>)KiwiConfig["preferences",0,"type"]:[], + { + if (typemap["image"]:"" == kiwi_task) + { + if (disk_password == "") + { + if (haskey (typemap, "luks")) + typemap = remove (typemap, "luks"); + } + else + typemap["luks"] = disk_password; + } + return typemap; + }); + } + + symbol HandleDiskPassword (string key, map event) { + if (event["ID"]:nil == `next) StoreDiskPassword (key, event); + return nil; + } + + symbol HandleEncryptDisk (string key, map event) { + boolean value = (boolean) UI::QueryWidget (`id (key), `Value); + UI::ChangeWidget (`id ("disk_password"), `Enabled, value); + return nil; + } + /** * Initialize the widget with ignored packages */ @@ -1676,6 +1724,13 @@ show_compression ? `HWeight (1, "compression") : `HBox () ), `HBox ( + `VBox ( + `Label (""), + "encrypt_disk" + ), + "disk_password" + ), + `HBox ( `HWeight (2, `VBox ( "sw_selection", `Left (`Label (_("Installed Software"))), @@ -1689,6 +1744,7 @@ "widget_names" : [ "version", "size", "sizeunit", "additive", + "encrypt_disk", "disk_password", "sw_selection", "rt_sw", "configure_sw", "delete_sw", @@ -1884,6 +1940,24 @@ "label" : _("Additive"), "no_help" : true, ], + "encrypt_disk" : $[ + "widget" : `checkbox, + "opt" : [ `notify ], + // check box label + "label" : _("Encrypt Image with LUKS"), + // help text + "help" : _("<p>For creating encrypted file system, check <b>Encrypt Image with LUKS</b> and enter the password.</p>"), + "handle" : HandleEncryptDisk, + ], + "disk_password" : $[ + "widget" : `textentry, + // textentry label + "label" : _("Encrypted Image LUKS Password"), + "init" : InitDiskPassword, + "store" : StoreDiskPassword, + "handle" : HandleDiskPassword, + "no_help" : true, + ], // ---------------- widgtes for directory structure "general_scripts" : $[ "widget" : `empty, -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
