Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2013-01-22 18:17:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2012-10-26 17:39:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2013-01-22 18:17:04.000000000 +0100 @@ -1,0 +2,12 @@ +Sun Jan 21 14:41:39 UTC 2013 - [email protected] + +- added support for specifying add-on repo alias name (fate#313144) +- 2.23.1 + +------------------------------------------------------------------- +Mon Jan 21 07:53:09 UTC 2013 - [email protected] + +- added support to optionally set the mount options for NFS + repositories (fate#313208) + +------------------------------------------------------------------- Old: ---- yast2-packager-2.23.0.tar.bz2 New: ---- yast2-packager-2.23.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.XUkdzy/_old 2013-01-22 18:17:07.000000000 +0100 +++ /var/tmp/diff_new_pack.XUkdzy/_new 2013-01-22 18:17:07.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-packager # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 2.23.0 +Version: 2.23.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-2.23.0.tar.bz2 -> yast2-packager-2.23.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/Makefile.in new/yast2-packager-2.23.1/Makefile.in --- old/yast2-packager-2.23.0/Makefile.in 2012-10-26 12:50:56.000000000 +0200 +++ new/yast2-packager-2.23.1/Makefile.in 2013-01-21 15:00:35.000000000 +0100 @@ -684,7 +684,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/VERSION new/yast2-packager-2.23.1/VERSION --- old/yast2-packager-2.23.0/VERSION 2012-10-26 12:50:42.000000000 +0200 +++ new/yast2-packager-2.23.1/VERSION 2013-01-21 14:06:53.000000000 +0100 @@ -1 +1 @@ -2.23.0 +2.23.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/configure new/yast2-packager-2.23.1/configure --- old/yast2-packager-2.23.0/configure 2012-10-26 12:50:55.000000000 +0200 +++ new/yast2-packager-2.23.1/configure 2013-01-21 15:00:34.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-packager 2.23.0. +# Generated by GNU Autoconf 2.69 for yast2-packager 2.23.1. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-packager' PACKAGE_TARNAME='yast2-packager' -PACKAGE_VERSION='2.23.0' -PACKAGE_STRING='yast2-packager 2.23.0' +PACKAGE_VERSION='2.23.1' +PACKAGE_STRING='yast2-packager 2.23.1' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,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-packager 2.23.0 to adapt to many kinds of systems. +\`configure' configures yast2-packager 2.23.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1318,7 +1318,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-packager 2.23.0:";; + short | recursive ) echo "Configuration of yast2-packager 2.23.1:";; esac cat <<\_ACEOF @@ -1398,7 +1398,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-packager configure 2.23.0 +yast2-packager configure 2.23.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1415,7 +1415,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-packager $as_me 2.23.0, which was +It was created by yast2-packager $as_me 2.23.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2354,7 +2354,7 @@ # Define the identity of the package. PACKAGE='yast2-packager' - VERSION='2.23.0' + VERSION='2.23.1' cat >>confdefs.h <<_ACEOF @@ -2477,7 +2477,7 @@ -VERSION="2.23.0" +VERSION="2.23.1" RPMNAME="yast2-packager" MAINTAINER="Ladislav Slezak <[email protected]>" @@ -3403,7 +3403,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-packager $as_me 2.23.0, which was +This file was extended by yast2-packager $as_me 2.23.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3456,7 +3456,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-packager config.status 2.23.0 +yast2-packager config.status 2.23.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/configure.in new/yast2-packager-2.23.1/configure.in --- old/yast2-packager-2.23.0/configure.in 2012-10-26 12:50:53.000000000 +0200 +++ new/yast2-packager-2.23.1/configure.in 2013-01-21 15:00:31.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for yast2-packager dnl -dnl -- This file is generated by y2autoconf 2.23.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-packager, 2.23.0, http://bugs.opensuse.org/, yast2-packager) +AC_INIT(yast2-packager, 2.23.1, http://bugs.opensuse.org/, yast2-packager) 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.23.0" +VERSION="2.23.1" RPMNAME="yast2-packager" MAINTAINER="Ladislav Slezak <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/src/modules/AddOnProduct.ycp new/yast2-packager-2.23.1/src/modules/AddOnProduct.ycp --- old/yast2-packager-2.23.0/src/modules/AddOnProduct.ycp 2012-10-26 11:37:58.000000000 +0200 +++ new/yast2-packager-2.23.1/src/modules/AddOnProduct.ycp 2013-01-21 14:06:37.000000000 +0100 @@ -1462,19 +1462,68 @@ ]; } +/* + * Create URL with required alias from a URL. + * If alias is empty the name is used as a fallback. + * If both are empty the URL is not modified. + * If alias is already included in the URL then it is modified + * only if the requested alias is not empty otherwise it is kept unchanged. +*/ +global string SetRepoUrlAlias(string url, string alias, string name) +{ + if (url == nil || url == "") { + y2error("Invalid 'url' parameter: %1", url); + return url; + } + + // set repository alias to product name or alias if specified + if ((name != nil && name != "") || (alias != nil && alias != "")) { + map url_p = URL::Parse(url); + map<string, string> params = URL::MakeMapFromParams(url_p["query"]:""); + string new_alias = ""; + + if (alias != nil && alias != "") { + new_alias = alias; + y2milestone("Using repository alias: '%1'", new_alias); + } + else { + // no alias present in the URL, use the product name + if (params["alias"]:"" != "") { + new_alias = name; + y2milestone("Using product name '%1' as repository alias", new_alias); + } + // keep the alias from URL + else { + y2milestone("Keeping the original alias set in the URL: %1", params["alias"]:""); + return url; + } + } + + params["alias"] = new_alias; + url_p["query"] = URL::MakeParamsFromMap(params); + url = URL::Build(url_p); + } + + return url; +} + global boolean Import (map settings) { add_on_products = settings["add_on_products"]:[]; modified = false; if (Mode::config ()) { foreach (map prod, add_on_products, { - string media = prod["media_url"]:""; + y2milestone("Add-on product: %1", prod); string pth = prod["product_dir"]:"/"; - integer src = Pkg::SourceCreate (media, pth); + string url = SetRepoUrlAlias(prod["media_url"]:"", prod["alias"]:"", prod["name"]:""); + + integer src = Pkg::SourceCreate(url, pth); + if (src != -1) { if (prod["product"]:"" != "") { map <string, any> repo = $["SrcId":src, "name":prod["product"]:""]; if (prod["priority"]:-1 > -1) repo["priority"] = prod["priority"]:-1; + y2milestone("Setting new repo properties: %1", repo); Pkg::SourceEditSet ([repo]); } mode_config_sources = add (mode_config_sources, src); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/src/modules/SourceDialogs.ycp new/yast2-packager-2.23.1/src/modules/SourceDialogs.ycp --- old/yast2-packager-2.23.0/src/modules/SourceDialogs.ycp 2012-10-26 11:37:58.000000000 +0200 +++ new/yast2-packager-2.23.1/src/modules/SourceDialogs.ycp 2013-01-21 13:55:22.000000000 +0100 @@ -176,7 +176,7 @@ * @param url string URL in the original form * @return string postprocessed URL */ -string PosprocessISOURL (string url) { +string PostprocessISOURL (string url) { y2milestone ("Updating ISO URL %1", URL::HidePassword(url)); integer last = findlastof (url, "/") + 1; string onlydir = substring (url, 0, last); @@ -426,7 +426,19 @@ // checkbox label `Left (`CheckBox ( `id (`ch_iso), _("&ISO Image"))), // checkbox label - `Left (`CheckBox ( `id (`ch_nfs4), _("N&FS v4 Protocol"))) + `Left (`CheckBox ( `id (`ch_nfs4), _("N&FS v4 Protocol"))), + + `VSpacing(0.4), + + `Left(`ComboBox(`id(`mount_options), `opt(`editable), _("Mount Options"), + [ + // TRANSLATORS: "(default)" - is a combobox value and means default libzypp + // NFS mount option (users can change it to anything else, the field is editable) + `item(`id(`default), _("(default)"), true), + "ro,nolock,soft,timeo=300", + "ro,nolock,soft,timeo=300,sec=krb5p" + ] + )) ); term nfs_complete_content = `InputField(`id(`complete_url), `opt(`hstretch), _("URL of the Repository")); @@ -457,8 +469,13 @@ UI::ChangeWidget (`id (`ch_iso), `Value, iso); UI::SetFocus (`server); - boolean nfs4 = tolower(parsed["scheme"]:"nfs") == "nfs4" || - URL::MakeMapFromParams(parsed["query"]:"")["type"]:"" == "nfs4"; + map query_map = URL::MakeMapFromParams(parsed["query"]:""); + + boolean nfs4 = tolower(parsed["scheme"]:"nfs") == "nfs4" || query_map["type"]:"" == "nfs4"; + + if (parsed["query"]:"" != "") { + UI::ChangeWidget(`id(`mount_options), `Value, query_map["mountoptions"]:""); + } y2milestone("NFSv4: %1", nfs4); @@ -504,7 +521,12 @@ } if (iso) - _url = PosprocessISOURL (_url); + _url = PostprocessISOURL (_url); + + if (UI::QueryWidget(`id(`mount_options), `Value) != `default) { + string mount_opts = (string)UI::QueryWidget(`id(`mount_options), `Value); + _url = _url + "?mountoptions=" + URL::EscapeString(mount_opts, URL::transform_map_filename); + } } void NFSStoreComplete() @@ -609,7 +631,10 @@ "help" : _("<p><big><b>NFS Server</b></big><br> Use <b>Server Name</b> and <b>Path to Directory or ISO Image</b> to specify the NFS server host name and path on the server.</p>") -+ multi_cd_help, ++ multi_cd_help + _("<p><big><b>Mount Options</b></big><br> +You can specify extra options used for mounting the NFS volume. +This is an expert option, keeping the default value is recommened. See <b>man 5 nfs</b> +for details and the list of supported options."), ]; } @@ -724,7 +749,7 @@ ]; _url = URL::Build(parsed); - _url = PosprocessISOURL(_url); + _url = PostprocessISOURL(_url); } /** @@ -1367,7 +1392,7 @@ { boolean iso = (boolean)UI::QueryWidget (`id (`ch_iso), `Value); if (iso) - _url = PosprocessISOURL (_url); + _url = PostprocessISOURL (_url); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/src/modules/WebpinPackageSearch.ycp new/yast2-packager-2.23.1/src/modules/WebpinPackageSearch.ycp --- old/yast2-packager-2.23.0/src/modules/WebpinPackageSearch.ycp 2012-10-26 11:37:58.000000000 +0200 +++ new/yast2-packager-2.23.1/src/modules/WebpinPackageSearch.ycp 2013-01-21 13:36:44.000000000 +0100 @@ -23,7 +23,6 @@ import "Directory"; import "FileUtils"; import "URL"; -import "XML"; import "Arch"; import "Report"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/testsuite/tests/AddOnProduct_test.out new/yast2-packager-2.23.1/testsuite/tests/AddOnProduct_test.out --- old/yast2-packager-2.23.0/testsuite/tests/AddOnProduct_test.out 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-2.23.1/testsuite/tests/AddOnProduct_test.out 2013-01-21 14:00:30.000000000 +0100 @@ -0,0 +1,20 @@ +Read .target.tmpdir "/tmp" +Read .target.stat "/y2update/control.xml" $["isreg":true] +Read .target.size "/y2update/control.xml" 1 +Read .xml "/y2update/control.xml" $[] +Read .sysconfig.console.CONSOLE_ENCODING "UTF-8" +Execute .target.bash_output "locale -k charmap" $["exit":0, "stdout":"charmap=\"UTF-8\"\n"] +Read .sysconfig.language.RC_LANG "en_US.UTF-8" +Read .target.size "/etc/sysconfig/language" 1 +Read .sysconfig.language.ROOT_USES_LANG "ctype" +Read .sysconfig.language.RC_LANG "en_US.UTF-8" +Read .sysconfig.language.INSTALLED_LANGUAGES "" +Log Invalid 'url' parameter: nil +Return nil +Return http://example.com/repos/SLES11SP2 +Return http://example.com/repos/SLES11SP2 +Return http://example.com/repos/SLES11SP2 +Return http://example.com/repos/SLES11SP2?alias=SLES +Return http://example.com/repos/SLES11SP2?alias=mySLES +Return http://example.com/repos/SLES11SP2?alias=SLES-11-SP2 +Return http://example.com/repos/SLES11SP2?alias=SLES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.23.0/testsuite/tests/AddOnProduct_test.ycp new/yast2-packager-2.23.1/testsuite/tests/AddOnProduct_test.ycp --- old/yast2-packager-2.23.0/testsuite/tests/AddOnProduct_test.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-packager-2.23.1/testsuite/tests/AddOnProduct_test.ycp 2013-01-21 14:00:30.000000000 +0100 @@ -0,0 +1,73 @@ +/** + * Testsuite for Addon.ycp module + * + */ + +{ + +include "testsuite.ycp"; + +// huh, we need to mock too much paths because of some module constructor... :-( +map READ = $[ + "target" : $[ + "tmpdir" : "/tmp", + "size" : 1, + "stat" : $["isreg": true], + "string" : "SUSE Linux Enterprise Server 11 (x86_64)\nVERSION = 11\nPATCHLEVEL = 1\n" + ], + "xml" : $[], + "sysconfig" : $[ + "language" : $[ + "RC_LANG" : "en_US.UTF-8", + "ROOT_USES_LANG" : "ctype", + "RC_LANG" : "en_US.UTF-8", + "INSTALLED_LANGUAGES" : "" + ], + "console" : $[ + "CONSOLE_ENCODING" : "UTF-8" + ] + ] +]; + +map EXEC = $[ + "target" : $[ + "bash_output" : $[ "exit" : 0, "stdout" : "charmap=\"UTF-8\"\n"] + ] +]; + +TESTSUITE_INIT ([READ, $[], EXEC], nil); + +import "AddOnProduct"; + +string url = "http://example.com/repos/SLES11SP2"; + +// invalid input +TEST(``(AddOnProduct::SetRepoUrlAlias(nil, nil, nil)), [], nil); + +// keep the url untouched +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "", "")), [], nil); +TEST(``(AddOnProduct::SetRepoUrlAlias(url, nil, nil)), [], nil); + +// set name as alias, alias is empty +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "", "SLES-11-SP2")), [], nil); + +// set name as alias, alias is empty +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "SLES", "SLES-11-SP2")), [], nil); + + + +// an alias is already set in URL + +url = "http://example.com/repos/SLES11SP2?alias=mySLES"; + +// keep the url untouched +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "", "")), [], nil); + +// keep the original alias +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "", "SLES-11-SP2")), [], nil); + +// set alias +TEST(``(AddOnProduct::SetRepoUrlAlias(url, "SLES", "SLES-11-SP2")), [], nil); + +} + -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
