Hello community,
here is the log from the commit of package yast2
checked in at Sat Mar 3 14:38:53 CET 2007.
--------
--- yast2/yast2.changes 2007-02-23 13:03:57.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2/yast2.changes 2007-03-02 09:18:06.877018000 +0100
@@ -1,0 +2,53 @@
+Fri Mar 2 08:54:41 CET 2007 - lslezak@suse.cz
+
+- install Xen paravirtual drivers (xen-kmp-* package) if running in
+ a fully virtualized guest (#241564)
+- register new yast agents when a patch or a package has been
+ installed (#250179)
+- 2.15.15
+
+-------------------------------------------------------------------
+Thu Mar 1 17:58:14 CET 2007 - kmachalkova@suse.cz
+
+- Added checking for root user into ncurses menu. If the user is not
+ root, show notify popup and list only the modules that do not need
+ root privileges (#246015)
+
+-------------------------------------------------------------------
+Thu Mar 1 16:43:01 CET 2007 - jsuchome@suse.cz
+
+- Added command line help text describing format of the [string]
+ type options (#248201)
+
+-------------------------------------------------------------------
+Wed Feb 28 15:20:00 CET 2007 - locilka@suse.cz
+
+- Making yast2.rpm independent on SuSEfirewall2. The package is
+ checked and installed in SuSEFirewall::Read() function. If user
+ decides not to install it, Firewall functionality is disabled.
+ Installing the SuSEfirewall2 package is possible only on the
+ running system (#245506).
+- Checking for firewall definitions installed during one YaST run.
+ This check is forced when something tries to use unknown service
+ definition.
+- Disabling possibility to configure firewall in Installation in
+ Network proposal when SuSEfirewall2 package is not installed.
+- Changing directory of service definitions to
+ /etc/sysconfig/SuSEfirewall2.d/services (bugzilla #247352
+ comment #13).
+
+-------------------------------------------------------------------
+Wed Feb 28 11:26:14 CET 2007 - lslezak@suse.cz
+
+- ProductControl::Run() - return `abort also in the firstboot
+ stage (#247552)
+- 2.15.14
+
+-------------------------------------------------------------------
+Tue Feb 27 12:47:36 CET 2007 - locilka@suse.cz
+
+- Added and fixed support for Firewall Custom Rules (FATE #100068,
+ FATE #120042).
+- 2.15.13
+
+-------------------------------------------------------------------
Old:
----
yast2-2.15.12.tar.bz2
New:
----
yast2-2.15.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.R27750/_old 2007-03-03 14:38:43.000000000 +0100
+++ /var/tmp/diff_new_pack.R27750/_new 2007-03-03 14:38:43.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2 (Version 2.15.12)
+# spec file for package yast2 (Version 2.15.15)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,16 +11,16 @@
# norootforbuild
Name: yast2
-Version: 2.15.12
+Version: 2.15.15
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.15.12.tar.bz2
+Source0: yast2-2.15.15.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-pkg-bindings yast2-testsuite
-# UI::RunInTerminal builtin
-Requires: yast2-core >= 2.15.1
+# SCR::RegisterNewAgents()
+Requires: yast2-core >= 2.15.4
# Pkg::Callback*ScanDb()
Requires: yast2-pkg-bindings >= 2.15.10
Requires: yast2_ui yast2_theme
@@ -29,7 +29,6 @@
# for ag_tty (/bin/stty)
Requires: coreutils
Requires: yast2-xml yast2-hardware-detection
-Requires: SuSEfirewall2
# moved cfg_security.scr
Conflicts: yast2-security <= 2.13.2
# moved ag_netd, cfg_netd.scr, cfg_xinetd.scr
@@ -97,7 +96,7 @@
Steffen Winterfeldt
%prep
-%setup -n yast2-2.15.12
+%setup -n yast2-2.15.15
%build
%{prefix}/bin/y2tool y2autoconf
@@ -202,6 +201,41 @@
%doc %{prefix}/share/doc/packages/yast2/wizard
%changelog
+* Fri Mar 02 2007 - lslezak@suse.cz
+- install Xen paravirtual drivers (xen-kmp-* package) if running in
+ a fully virtualized guest (#241564)
+- register new yast agents when a patch or a package has been
+ installed (#250179)
+- 2.15.15
+* Thu Mar 01 2007 - kmachalkova@suse.cz
+- Added checking for root user into ncurses menu. If the user is not
+ root, show notify popup and list only the modules that do not need
+ root privileges (#246015)
+* Thu Mar 01 2007 - jsuchome@suse.cz
+- Added command line help text describing format of the [string]
+ type options (#248201)
+* Wed Feb 28 2007 - locilka@suse.cz
+- Making yast2.rpm independent on SuSEfirewall2. The package is
+ checked and installed in SuSEFirewall::Read() function. If user
+ decides not to install it, Firewall functionality is disabled.
+ Installing the SuSEfirewall2 package is possible only on the
+ running system (#245506).
+- Checking for firewall definitions installed during one YaST run.
+ This check is forced when something tries to use unknown service
+ definition.
+- Disabling possibility to configure firewall in Installation in
+ Network proposal when SuSEfirewall2 package is not installed.
+- Changing directory of service definitions to
+ /etc/sysconfig/SuSEfirewall2.d/services (bugzilla #247352
+ comment #13).
+* Wed Feb 28 2007 - lslezak@suse.cz
+- ProductControl::Run() - return `abort also in the firstboot
+ stage (#247552)
+- 2.15.14
+* Tue Feb 27 2007 - locilka@suse.cz
+- Added and fixed support for Firewall Custom Rules (FATE #100068,
+ FATE #120042).
+- 2.15.13
* Fri Feb 23 2007 - lslezak@suse.cz
- error handling in Package::Available*() - return nil if no
installation source is available (#225484)
++++++ yast2-2.15.12.tar.bz2 -> yast2-2.15.15.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/configure new/yast2-2.15.15/configure
--- old/yast2-2.15.12/configure 2007-02-23 13:02:16.000000000 +0100
+++ new/yast2-2.15.15/configure 2007-03-02 09:10:54.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2 2.15.12.
+# Generated by GNU Autoconf 2.60 for yast2 2.15.15.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2'
PACKAGE_TARNAME='yast2'
-PACKAGE_VERSION='2.15.12'
-PACKAGE_STRING='yast2 2.15.12'
+PACKAGE_VERSION='2.15.15'
+PACKAGE_STRING='yast2 2.15.15'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1183,7 +1183,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 2.15.12 to adapt to many kinds of systems.
+\`configure' configures yast2 2.15.15 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1254,7 +1254,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2 2.15.12:";;
+ short | recursive ) echo "Configuration of yast2 2.15.15:";;
esac
cat <<\_ACEOF
@@ -1332,7 +1332,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2 configure 2.15.12
+yast2 configure 2.15.15
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1346,7 +1346,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 $as_me 2.15.12, which was
+It was created by yast2 $as_me 2.15.15, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2147,7 +2147,7 @@
# Define the identity of the package.
PACKAGE='yast2'
- VERSION='2.15.12'
+ VERSION='2.15.15'
cat >>confdefs.h <<_ACEOF
@@ -2374,7 +2374,7 @@
-VERSION="2.15.12"
+VERSION="2.15.15"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
@@ -3366,7 +3366,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2 $as_me 2.15.12, which was
+This file was extended by yast2 $as_me 2.15.15, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3409,7 +3409,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2 config.status 2.15.12
+yast2 config.status 2.15.15
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/configure.in new/yast2-2.15.15/configure.in
--- old/yast2-2.15.12/configure.in 2007-02-23 13:02:11.000000000 +0100
+++ new/yast2-2.15.15/configure.in 2007-03-02 09:10:45.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.15.12, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.15.15, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.15.12"
+VERSION="2.15.15"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/commandline/src/CommandLine.ycp new/yast2-2.15.15/library/commandline/src/CommandLine.ycp
--- old/yast2-2.15.12/library/commandline/src/CommandLine.ycp 2007-01-05 15:34:59.000000000 +0100
+++ new/yast2-2.15.15/library/commandline/src/CommandLine.ycp 2007-03-02 08:55:21.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Command line interface for YaST2 modules
* Author: Stanislav Visnovsky
*
- * $Id: CommandLine.ycp 26744 2006-01-03 14:23:45Z visnov $
+ * $Id: CommandLine.ycp 36623 2007-03-01 15:46:16Z jsuchome $
*/
{
@@ -422,7 +422,7 @@
if (commandhelp == nil) {
commandhelp = _("No help available");
}
-
+ boolean has_string_option = false;
/* Process <command> "help" */
// translators: %1 is the command name
Print(sformat(_("Command '%1'"), action));
@@ -459,7 +459,8 @@
foreach( any opt, opts, ``{
map op = allopts[opt]:$[];
string t = op["type"]:"";
-
+ if (t == "string")
+ has_string_option = true;
if ( t != "regex" && t != "enum" && t != "" ) t = "["+t+"]";
else if( t == "enum" ) {
t = "\[ ";
@@ -515,6 +516,11 @@
}
} );
+ if (has_string_option)
+ {
+ // additional help for using command line
+ Print(_("\n Options of the [string] type must be written in the form 'option=value'."));
+ }
if( haskey( command, "example" ) ) {
// translators: example title for command line
Print( _("\n Example:"));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/control/src/ProductControl.ycp new/yast2-2.15.15/library/control/src/ProductControl.ycp
--- old/yast2-2.15.12/library/control/src/ProductControl.ycp 2007-01-05 15:34:52.000000000 +0100
+++ new/yast2-2.15.15/library/control/src/ProductControl.ycp 2007-02-28 13:33:55.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Product Control routines
* Authors: Anas Nashif
*
- * $Id: ProductControl.ycp 33822 2006-10-30 08:53:52Z locilka $
+ * $Id: ProductControl.ycp 36558 2007-02-28 12:33:53Z lslezak $
*/
{
textdomain "base";
@@ -1014,7 +1014,8 @@
{
// FATE #300422
// handling when user aborts the second stage installation
- if (Stage::cont ()) {
+ // or firstboot (bug #247552)
+ if (Stage::cont () || Stage::firstboot()) {
final_result = result;
}
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/desktop/src/menu.ycp new/yast2-2.15.15/library/desktop/src/menu.ycp
--- old/yast2-2.15.12/library/desktop/src/menu.ycp 2007-02-12 09:37:17.000000000 +0100
+++ new/yast2-2.15.15/library/desktop/src/menu.ycp 2007-03-02 08:55:21.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: NCurses Control Center
* Authors: Michal Svec
*
- * $Id: menu.ycp 35963 2007-02-08 10:21:04Z kmachalkova $
+ * $Id: menu.ycp 36635 2007-03-01 17:02:27Z kmachalkova $
*
* Provides a list of available yast2 modules. This module is inteded for use
* with ncurses, for X the yast2 control center should be used.
@@ -22,6 +22,7 @@
map Groups = $[];
map Modules = $[];
+boolean root = false;
string restart_file = Directory::vardir + "/restart_menu";
@@ -39,6 +40,11 @@
/**
*/
define void OpenMenu() {
+
+ //check if user is root (#246015)
+ map output = (map) SCR::Execute (.target.bash_output, "/usr/bin/id --user");
+ root = output["stdout"]:"" == "0\n";
+
UI::OpenDialog(`opt(`defaultsize), `VBox(
`HBox(
`HSpacing(1),
@@ -77,6 +83,12 @@
),
`VSpacing(1)
));
+
+ //show popup when running as non-root
+ if (!root)
+ Popup::Notify(_("YaST2 Control Center is not running as root.
+You will only see modules which do not require root privileges."));
+
}
/**
@@ -190,6 +202,7 @@
"X-SuSE-YaST-Call",
"X-SuSE-YaST-Group",
"X-SuSE-YaST-SortKey",
+ "X-SuSE-YaST-RootOnly",
"Hidden",
];
@@ -199,6 +212,15 @@
y2debug("Groups=%1", Groups);
y2debug("Modules=%1", Modules);
+list <string> non_root_modules = [];
+
+//create the list of modules available to non-root users
+foreach (string name, map params, (map ) Modules,{
+ if ( !( params["X-SuSE-YaST-RootOnly"]:"false" == "true" ))
+ non_root_modules = add(non_root_modules,name);
+});
+y2debug("non-root modules: %1", non_root_modules);
+
if (FileUtils::Exists (restart_file))
{
SCR::Execute (.target.remove, restart_file);
@@ -220,8 +242,18 @@
y2debug("groups=%1", groups);
map modules = listmap(string gr, groups, ``{
- return $[ gr : Desktop::ModuleList(gr) ];
+ list <term> all_modules = Desktop::ModuleList(gr);
+
+ //filter out root-only stuff if the user is not root (#246015)
+ if (!root)
+ {
+ all_modules = filter(term t, all_modules,{
+ return ( contains(non_root_modules, (string) t[0,0]:"") );
+ });
+ }
+ return $[ gr : all_modules ];
});
+
y2debug("modules=%1", modules);
string first = groups[0]:nil;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/modules/Version.ycp new/yast2-2.15.15/library/modules/Version.ycp
--- old/yast2-2.15.12/library/modules/Version.ycp 2007-02-23 13:02:42.000000000 +0100
+++ new/yast2-2.15.15/library/modules/Version.ycp 2007-03-02 09:11:37.000000000 +0100
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.15.12";
+global string yast2 = "2.15.15";
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/network/src/SuSEFirewallExpertRules.ycp new/yast2-2.15.15/library/network/src/SuSEFirewallExpertRules.ycp
--- old/yast2-2.15.12/library/network/src/SuSEFirewallExpertRules.ycp 2007-01-05 15:35:02.000000000 +0100
+++ new/yast2-2.15.15/library/network/src/SuSEFirewallExpertRules.ycp 2007-02-28 11:41:26.000000000 +0100
@@ -290,7 +290,7 @@
if (params["sport"]:"" != "") remove_rule = remove_rule + "," + params["sport"]:"";
// Filtering out the record
- list <string> current_rules_list = splitstring (current_rules, " ");
+ list <string> current_rules_list = splitstring (current_rules, " \n");
current_rules_list = filter (string one_rule, current_rules_list, {
return (one_rule != remove_rule && one_rule != "" && one_rule != ",");
});
@@ -299,5 +299,41 @@
return SuSEFirewall::SetAcceptExpertRules(zone, current_rules);
}
+ /**
+ * Deletes Custom Rule defined by the ID of the rule.
+ * The ID is an order of list returned by GetListOfAcceptRules().
+ * ID starts at number 0.
+ * Every time you delete some rule, the list is, of course, regenerated.
+ *
+ * @example
+ * DeleteRuleID (0) -> true
+ *
+ * @see GetListOfAcceptRules()
+ */
+ global boolean DeleteRuleID (string zone, integer rule_id) {
+ // Check the zone
+ if (! contains(SuSEFirewall::GetKnownFirewallZones(), zone)) {
+ y2error("Unknown firewall zone: %1", zone);
+ return nil;
+ }
+
+ string current_rules = SuSEFirewall::GetAcceptExpertRules(zone);
+ if (current_rules == nil) {
+ y2error("Impossible remove any AcceptExpertRule for zone %1", zone);
+ return false;
+ }
+
+ list <string> current_rules_list = splitstring (current_rules, " \n");
+ if (current_rules_list[rule_id]:nil != nil) {
+ current_rules_list = remove (current_rules_list, rule_id);
+ current_rules = mergestring (current_rules_list, " ");
+ SuSEFirewall::SetAcceptExpertRules (zone, current_rules);
+ return true;
+ } else {
+ y2error ("Cannot remove %1, such entry does not exist.", rule_id);
+ return false;
+ }
+ }
+
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/network/src/SuSEFirewallProposal.ycp new/yast2-2.15.15/library/network/src/SuSEFirewallProposal.ycp
--- old/yast2-2.15.12/library/network/src/SuSEFirewallProposal.ycp 2007-01-05 15:35:02.000000000 +0100
+++ new/yast2-2.15.15/library/network/src/SuSEFirewallProposal.ycp 2007-03-01 11:30:13.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Functional interface for SuSEFirewall installation proposal
* Authors: Lukas Ocilka
*
- * $Id: SuSEFirewallProposal.ycp 33164 2006-09-27 08:42:24Z jsrain $
+ * $Id: SuSEFirewallProposal.ycp 36588 2007-02-28 16:23:15Z locilka $
*
* This module provides a functional API for Installation proposal of SuSEfirewall2
*/
@@ -338,6 +338,13 @@
* @return void
*/
global define void Propose () {
+ // No proposal when SuSEfirewall2 is not installed
+ if (! SuSEFirewall::SuSEFirewallIsInstalled()) {
+ SuSEFirewall::SetEnableService (false);
+ SuSEFirewall::SetStartService (false);
+ return nil;
+ }
+
// Not changed by user - Propose from scratch
if (! GetChangedByUser()) {
y2milestone("Calling firewall configuration proposal");
@@ -364,6 +371,19 @@
string output = "";
string warning = "";
+ // SuSEfirewall2 package needn't be installed
+ if (! SuSEFirewall::SuSEFirewallIsInstalled()) {
+ // TRANSLATORS: Proposal informative text
+ output = "<ul>" + _("SuSEfirewall2 package is not installed, firewall will be disabled.") + "</ul>";
+
+ return $[
+ "output" : output,
+ "warning" : warning,
+ ];
+ }
+
+ // SuSEfirewall2 is installed...
+
boolean firewall_is_enabled = (SuSEFirewall::GetEnableService() == true);
output = output + "<ul>\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/network/src/SuSEFirewallServices.ycp new/yast2-2.15.15/library/network/src/SuSEFirewallServices.ycp
--- old/yast2-2.15.12/library/network/src/SuSEFirewallServices.ycp 2007-02-23 10:10:55.000000000 +0100
+++ new/yast2-2.15.15/library/network/src/SuSEFirewallServices.ycp 2007-03-02 08:55:21.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Definition of Supported Firewall Services and Port Aliases.
* Authors: Lukas Ocilka
*
- * $Id: SuSEFirewallServices.ycp 36307 2007-02-20 12:37:07Z locilka $
+ * $Id: SuSEFirewallServices.ycp 36624 2007-03-01 15:51:31Z locilka $
*
* Global Definition of Firewall Services
* Defined using TCP, UDP and RPC ports and IP protocols and Broadcast UDP
@@ -21,7 +21,7 @@
//
// PLEASE, DO NOT ADD MORE SERVICES.
// ADD THE SERVICE DEFINITION TO THE PACKAGE TO WHICH IT BELONGS.
- // USE /usr/share/SuSEfirewall2/services/TEMPLATE FOR THAT.
+ // USE /etc/sysconfig/SuSEfirewall2.d/services/TEMPLATE FOR THAT.
// MORE INFORMATION IN FEATURE #300687: Ports for SuSEfirewall added via packages.
// ANOTHER REFERENCE: Bugzilla #246911.
//
@@ -55,7 +55,7 @@
*
*/
- string services_definitions_in = "/usr/share/SuSEfirewall2/services/";
+ string services_definitions_in = "/etc/sysconfig/SuSEfirewall2.d/services/";
map known_services_features = $[
"TCP" : "tcp_ports",
@@ -305,6 +305,13 @@
foreach (string filename, all_definitions, {
// "service:abc_server" to distinguis between dynamic definition and the static one
one_definition = "service:" + filename;
+
+ // Do not read already defined service
+ // Just read only new definitions
+ if (SERVICES[one_definition]:$[] != $[]) {
+ return;
+ }
+
filefullpath = services_definitions_in + filename;
SERVICES[one_definition] = $[];
@@ -463,6 +470,13 @@
global define map GetNeededPortsAndProtocols (string service) {
map needed = $[];
+ // Service defined by package, not known now
+ // Reading new definitions
+ if (ServiceDefinedByPackage (service) && ! IsKnownService (service)) {
+ y2milestone ("Service %1 is not known, searching for new definitions...", service);
+ ReadServicesDefinedByRPMPackages ();
+ }
+
if (! IsKnownService(service)) {
y2error("Uknown service '%1'", service);
return nil;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/network/src/SuSEFirewall.ycp new/yast2-2.15.15/library/network/src/SuSEFirewall.ycp
--- old/yast2-2.15.12/library/network/src/SuSEFirewall.ycp 2007-02-12 09:37:17.000000000 +0100
+++ new/yast2-2.15.15/library/network/src/SuSEFirewall.ycp 2007-03-01 11:30:13.000000000 +0100
@@ -24,9 +24,12 @@
import "Message";
import "Progress";
import "PortRanges";
+ import "PackageSystem";
# <!-- SuSEFirewall VARIABLES //-->
+ string susefirewall_package = "SuSEfirewall2";
+
/**
* configuration hasn't been read for the default
* this should reduce the readings to only ONE
@@ -926,6 +929,22 @@
# <!-- SuSEFirewall GLOBAL FUNCTIONS //-->
+ /* Are needed packages (SuSEfirewall2) installed? */
+ boolean needed_packages_installed = false;
+
+ /**
+ * Returns whether all needed packages are installed.
+ *
+ * @return boolean whether SuSEfirewall2 is installed
+ */
+ global boolean SuSEFirewallIsInstalled () {
+ if (! needed_packages_installed) y2milestone ("SuSEfirewall2 is not installed, skipping...");
+ return needed_packages_installed;
+ }
+
+ // Configuration has been read and it's useful
+ boolean fw_service_can_be_configured = false;
+
/**
* Functions returns if any firewall's configuration was modified
* or wasn't
@@ -1081,6 +1100,11 @@
* @see GetStartService()
*/
global define void SetStartService (boolean start_service) {
+ if (! SuSEFirewall::SuSEFirewallIsInstalled()) {
+ y2warning ("Cannot set SetStartService");
+ return nil;
+ }
+
if (GetStartService() != start_service) {
SetModified();
@@ -1112,6 +1136,11 @@
* @param boolean start_service at Write() process
*/
global define void SetEnableService (boolean enable_service) {
+ if (! SuSEFirewall::SuSEFirewallIsInstalled()) {
+ y2warning ("Cannot set SetEnableService");
+ return nil;
+ }
+
if (GetEnableService() != enable_service) {
SetModified();
@@ -2173,13 +2202,48 @@
global define boolean Read () {
// Don't fill up the logs with tones of Check-logs
// Turn on for debugging
- // NetworkDevices::report_every_check = false;
+ NetworkDevices::report_every_check = false;
+ // Do not read it again and again
+ // to avoid rewriting changes already made
if (configuration_has_been_read) {
- y2milestone("SuSEfirewall2 configuration has been read already.");
- return true;
+ y2milestone ("SuSEfirewall2 configuration has been read already.");
+ return fw_service_can_be_configured;
+ }
+
+ // bugzilla #245506
+ boolean package_installed = false;
+
+ // In mode normal, package can be installed on request
+ if (Mode::normal()) {
+ package_installed = PackageSystem::CheckAndInstallPackages ([susefirewall_package]);
+ y2milestone ("CheckAndInstallPackages -> %1", package_installed);
+ // In mode install/update network might be down
+ } else {
+ package_installed = PackageSystem::Installed (susefirewall_package);
+ y2milestone ("Installed -> %1", package_installed);
}
+ if (! package_installed) {
+ y2warning ("Package not installed, disabling SuSEfirewall2-related functions.");
+ // do not call it again
+ configuration_has_been_read = true;
+
+ // Default settings, services are disabled
+ SETTINGS = DEFAULT_SETTINGS;
+ SETTINGS["enable_firewall"] = false;
+ SETTINGS["start_firewall"] = false;
+
+ // Cannot be configured, packages weren't installed
+ fw_service_can_be_configured = false;
+ needed_packages_installed = false;
+ return fw_service_can_be_configured;
+ }
+
+ // Can be configured, packages were installed
+ fw_service_can_be_configured = true;
+ needed_packages_installed = true;
+
// Progress only for normal configuration
boolean have_progress = (Mode::normal());
@@ -2294,6 +2358,9 @@
* @return boolean if successful
*/
global define boolean ActivateConfiguration () {
+ // just disabled
+ if (! SuSEFirewallIsInstalled()) return true;
+
// Firewall should start after Write()
if (GetStartService()) {
// Not started - start it
@@ -2340,6 +2407,9 @@
* @return boolean if successful
*/
global define boolean WriteConfiguration () {
+ // just disabled
+ if (! SuSEFirewallIsInstalled()) return true;
+
// Progress only for normal configuration and command line
boolean have_progress = (Mode::normal());
@@ -2425,6 +2495,9 @@
*/
global define boolean Write () {
+ // just disabled
+ if (! SuSEFirewallIsInstalled()) return true;
+
if (! WriteConfiguration()) return false;
if (! ActivateConfiguration()) return false;
@@ -2998,6 +3071,7 @@
}
SETTINGS["FW_SERVICES_ACCEPT_" + zone] = expert_rules;
+ SetModified();
return true;
}
@@ -3053,6 +3127,38 @@
SetModified();
}
+ map protocol_translations = $[
+ // protocol name
+ "tcp" : _("TCP"),
+ // protocol name
+ "udp" : _("UDP"),
+ // protocol name
+ "_rpc_" : _("RPC"),
+ // protocol name
+ "ip" : _("IP"),
+ ];
+
+ /**
+ * Returns translated protocol name. Translation is provided from
+ * SuSEfirewall2 sysconfig format to l10n format.
+ *
+ * @param string string from sysconfig (e.g., _rpc_)
+ * @return string translated string (e.g., RPC)
+ */
+ global string GetProtocolTranslatedName (string protocol) {
+ protocol = tolower (protocol);
+
+ if (protocol == "") {
+ return "";
+ } else if (protocol_translations[protocol]:nil == nil) {
+ y2error ("Unknown protocol: %1", protocol);
+ // table item, %1 stands for the buggy protocol name
+ return sformat (_("Unknown protocol (%1)"), protocol);
+ } else {
+ return protocol_translations[protocol]:"";
+ }
+ }
+
# <!-- SuSEFirewall GLOBAL FUNCTIONS //-->
/* EOF */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/packages/src/PackageSystem.ycp new/yast2-2.15.15/library/packages/src/PackageSystem.ycp
--- old/yast2-2.15.12/library/packages/src/PackageSystem.ycp 2007-02-23 13:01:32.000000000 +0100
+++ new/yast2-2.15.15/library/packages/src/PackageSystem.ycp 2007-03-02 09:10:38.000000000 +0100
@@ -6,7 +6,7 @@
* Michal Svec
* Flags: Stable
*
- * $Id: PackageSystem.ycp 36445 2007-02-23 12:01:29Z lslezak $
+ * $Id: PackageSystem.ycp 36639 2007-03-02 08:10:36Z lslezak $
*
* The documentation is maintained at
* <a href="../index.html">.../docs/index.html</a>.
@@ -174,6 +174,9 @@
}
}
+ // is a package or a patch selected for installation?
+ boolean any_to_install = Pkg::IsAnyResolvable(`package, `to_install) || Pkg::IsAnyResolvable(`patch, `to_install);
+
//[int successful, list failed, list remaining, list srcremaining]
list result = Pkg::PkgCommit (0);
y2debug ("PkgCommit: %1", result);
@@ -202,6 +205,13 @@
RunSUSEconfig ();
}
+ // a package or a patch was installed, may be that there is a new yast agent
+ if (any_to_install)
+ {
+ // register the new agents
+ SCR::RegisterNewAgents();
+ }
+
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/library/system/src/Kernel.ycp new/yast2-2.15.15/library/system/src/Kernel.ycp
--- old/yast2-2.15.12/library/system/src/Kernel.ycp 2007-02-15 09:30:56.000000000 +0100
+++ new/yast2-2.15.15/library/system/src/Kernel.ycp 2007-03-02 08:56:28.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Klaus Kaempf
* Arvin Schnell
*
- * $Id: Kernel.ycp 36167 2007-02-15 08:25:19Z aosthof $
+ * $Id: Kernel.ycp 36638 2007-03-02 07:56:26Z lslezak $
*
* <ul>
* <li>determine kernel rpm</li>
@@ -344,6 +344,10 @@
{
kernel_packages = ["kernel-default"];
+ // add Xen paravirtualized drivers to a full virtualized host
+ boolean xen = (boolean)SCR::Read(.probe.is_xen);
+ y2milestone("Detected XEN: %1", xen);
+
if (Arch::is_uml ())
{
y2milestone ("ProbeKernel: UML");
@@ -384,6 +388,30 @@
{
y2milestone ("Kernel switch: mem >= 4GB && PAE");
kernel_packages = ["kernel-bigsmp"];
+
+ // add PV drivers
+ if (xen)
+ {
+ y2milestone("Adding Xen PV drivers: xen-kmp-bigsmp");
+ kernel_packages = add(kernel_packages, "xen-kmp-bigsmp");
+ }
+ }
+ else
+ {
+ // add PV drivers
+ if (xen)
+ {
+ y2milestone("Adding Xen PV drivers: xen-kmp-default");
+ kernel_packages = add(kernel_packages, "xen-kmp-default");
+ }
+ }
+ }
+ else if (Arch::x86_64())
+ {
+ if (xen)
+ {
+ y2milestone("Adding Xen PV drivers: xen-kmp-default");
+ kernel_packages = add(kernel_packages, "xen-kmp-default");
}
}
else if (Arch::ppc ())
@@ -520,6 +548,7 @@
global list<string> ComputePackagesForBase (string base, boolean check_avail) {
// Note: kernel-*-nongpl packages have been dropped, use base only
list<string> ret = [ base ];
+
y2milestone ("Packages for base %1: %2", base, ret);
return ret;
}
@@ -530,7 +559,33 @@
*/
global list <string> ComputePackages () {
string kernel = ComputePackage ();
- return ComputePackagesForBase (kernel, true);
+
+ list<string> ret = ComputePackagesForBase (kernel, true);
+
+ if (size(kernel_packages) > 1)
+ {
+ // get the extra packages
+ list<string> extra_pkgs = remove(kernel_packages, 0);
+
+ // add available extra packages
+ foreach(string pkg, extra_pkgs,
+ {
+ if (Pkg::IsAvailable(pkg))
+ {
+ ret = add(ret, pkg);
+ y2milestone("Added extra kernel package: %1", pkg);
+ }
+ else
+ {
+ y2warning("Extra kernel package '%1' is not available", pkg);
+ }
+ }
+ );
+ }
+
+ y2milestone("Computed kernel packages: %1", ret);
+
+ return ret;
}
// functions related to kernel's modules loaded on boot
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.15.12/VERSION new/yast2-2.15.15/VERSION
--- old/yast2-2.15.12/VERSION 2007-02-23 12:54:41.000000000 +0100
+++ new/yast2-2.15.15/VERSION 2007-03-01 11:31:11.000000000 +0100
@@ -1 +1 @@
-2.15.12
+2.15.15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org