Mailinglist Archive: yast-devel (224 mails)

< Previous Next >
[yast-devel] [ci_new_pac] JFYI yast2-network -> sle12
Script 'mail_helper' called by ro
Hello packager,

This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.

Here comes the log...

---------------------------%<------------------------------
Hi,

here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-network ->
sle12



## BNC# 859181 : "yast2-network: remove smpppd bits" (RESOLVED/FIXED)
## BNC# 846950 : "JJ: Use custom polici at DNS tab doesn't work"
(RESOLVED/FIXED)

Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-network/yast2-network.changes
2014-01-17 14:16:31.000000000 +0100
+++ /mounts/work_src_done/SLE12/yast2-network/yast2-network.changes
2014-01-21 13:44:52.000000000 +0100
@@ -1,0 +2,23 @@
+Tue Jan 21 10:30:13 UTC 2014 - mfilka@xxxxxxxx
+
+- bnc#859181
+ - dropped code related to smpppd (ifcfg: USERCONTROL)
+- 3.1.15
+
+-------------------------------------------------------------------
+Wed Jan 15 07:49:36 UTC 2014 - mfilka@xxxxxxxx
+
+- bnc#846950
+ - change in resolv conf policy detected and stored properly
+- 3.1.14
+
+-------------------------------------------------------------------
+Thu Jan 9 11:11:08 UTC 2014 - mfilka@xxxxxxxx
+
+- Don't show the Add button for network devices during the
+ installation: configuring undetected ones is considered an
+ advanced operation that should be postponed to the installed
+ system.
+- 3.1.13
+
+-------------------------------------------------------------------

calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
- yast2-network
- at least 17 other packages
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-network (Old)
and /mounts/work_src_done/SLE12/yast2-network (BS:build ID:31191
MAIL:yast-devel@xxxxxxxxxxxx) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network", Maintainer is "yast-devel@xxxxxxxxxxxx"


Old:
----
yast2-network-3.1.12.tar.bz2

New:
----
yast2-network-3.1.15.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.wWJI2U/_old 2014-01-27 12:51:09.000000000 +0100
+++ /var/tmp/diff_new_pack.wWJI2U/_new 2014-01-27 12:51:09.000000000 +0100
@@ -17,21 +17,21 @@


Name: yast2-network
-Version: 3.1.12
+Version: 3.1.15
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2

+Group: System/YaST
+License: GPL-2.0
# should be required by devtools
-BuildRequires: perl-XML-Writer
-BuildRequires: pkgconfig
-BuildRequires: rpm
+BuildRequires: perl-XML-Writer pkgconfig rpm
BuildRequires: update-desktop-files
+BuildRequires: yast2-testsuite
+BuildRequires: yast2-devtools >= 3.1.15
BuildRequires: yast2-country
-BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-installation >= 2.15.27
-BuildRequires: yast2-testsuite

# yast2 v3.1.11: wicked support
BuildRequires: yast2 >= 3.1.11
@@ -57,12 +57,10 @@
Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Network Configuration
-License: GPL-2.0
-Group: System/YaST

%package devel-doc
-Summary: YaST2 - Developer documentation for yast2-network
Group: System/YaST
+Summary: YaST2 - Developer documentation for yast2-network

%description
This package contains the YaST2 component for network configuration.
@@ -87,6 +85,7 @@
/bin/rm -f $RPM_BUILD_ROOT/%{yast_desktopdir}/network.desktop
/bin/rm -f $RPM_BUILD_ROOT/%{yast_desktopdir}/provider.desktop

+
%post -p /bin/bash
# This fixes the files that were touched when #24842 was in effect.
# #42990: shut up when no wlan files are there.
@@ -109,8 +108,8 @@
%{yast_agentdir}/ag_udev_persistent
%{yast_schemadir}/autoyast/rnc/networking.rnc
%{yast_schemadir}/autoyast/rnc/host.rnc
-%dir %{_datadir}/YaST2/lib/
-%{_datadir}/YaST2/lib/network/
+%dir %{yast_libdir}/network
+%{yast_libdir}/network

%dir %{yast_docdir}
%{yast_docdir}/COPYING

++++++ yast2-network-3.1.12.tar.bz2 -> yast2-network-3.1.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/package/yast2-network.changes
new/yast2-network-3.1.15/package/yast2-network.changes
--- old/yast2-network-3.1.12/package/yast2-network.changes 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/package/yast2-network.changes 2014-01-27
11:39:48.000000000 +0100
@@ -1,4 +1,27 @@
-------------------------------------------------------------------
+Tue Jan 21 10:30:13 UTC 2014 - mfilka@xxxxxxxx
+
+- bnc#859181
+ - dropped code related to smpppd (ifcfg: USERCONTROL)
+- 3.1.15
+
+-------------------------------------------------------------------
+Wed Jan 15 07:49:36 UTC 2014 - mfilka@xxxxxxxx
+
+- bnc#846950
+ - change in resolv conf policy detected and stored properly
+- 3.1.14
+
+-------------------------------------------------------------------
+Thu Jan 9 11:11:08 UTC 2014 - mfilka@xxxxxxxx
+
+- Don't show the Add button for network devices during the
+ installation: configuring undetected ones is considered an
+ advanced operation that should be postponed to the installed
+ system.
+- 3.1.13
+
+-------------------------------------------------------------------
Fri Dec 13 11:03:05 UTC 2013 - mfilka@xxxxxxxx

- wicked support - initial implementation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/package/yast2-network.spec
new/yast2-network-3.1.15/package/yast2-network.spec
--- old/yast2-network-3.1.12/package/yast2-network.spec 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/package/yast2-network.spec 2014-01-27
11:39:48.000000000 +0100
@@ -17,7 +17,7 @@


Name: yast2-network
-Version: 3.1.12
+Version: 3.1.15
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -29,7 +29,7 @@
BuildRequires: perl-XML-Writer pkgconfig rpm
BuildRequires: update-desktop-files
BuildRequires: yast2-testsuite
-BuildRequires: yast2-devtools >= 3.1.10
+BuildRequires: yast2-devtools >= 3.1.15
BuildRequires: yast2-country
BuildRequires: yast2-installation >= 2.15.27

@@ -108,8 +108,8 @@
%{yast_agentdir}/ag_udev_persistent
%{yast_schemadir}/autoyast/rnc/networking.rnc
%{yast_schemadir}/autoyast/rnc/host.rnc
-%dir %{_datadir}/YaST2/lib/
-%{_datadir}/YaST2/lib/network/
+%dir %{yast_libdir}/network
+%{yast_libdir}/network

%dir %{yast_docdir}
%{yast_docdir}/COPYING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/Makefile.am
new/yast2-network-3.1.15/src/Makefile.am
--- old/yast2-network-3.1.12/src/Makefile.am 2013-12-17 13:48:08.000000000
+0100
+++ new/yast2-network-3.1.15/src/Makefile.am 2014-01-27 11:39:48.000000000
+0100
@@ -106,7 +106,7 @@
desktop/remote.desktop \
desktop/lan.desktop

-ylibdir = "${yast2dir}/lib/network"
+ylibdir = @ylibdir@/network
ylib_DATA = \
lib/network/edit_nic_name.rb \
lib/network/confirm_virt_proposal.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/autoyast-rnc/networking.rnc
new/yast2-network-3.1.15/src/autoyast-rnc/networking.rnc
--- old/yast2-network-3.1.12/src/autoyast-rnc/networking.rnc 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/autoyast-rnc/networking.rnc 2014-01-27
11:39:48.000000000 +0100
@@ -45,6 +45,7 @@
bootproto? &
startmode? &
ifplugd_priority? &
+ # ignored, present for backward compatibility
usercontrol? &

# address
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/clients/inst_do_net_test.rb
new/yast2-network-3.1.15/src/clients/inst_do_net_test.rb
--- old/yast2-network-3.1.12/src/clients/inst_do_net_test.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/clients/inst_do_net_test.rb 2014-01-27
11:39:48.000000000 +0100
@@ -459,35 +459,6 @@
Builtins.y2error("Command '%1' failed -> %2", run_command, ret_command)
end

- if Internet.logfile != ""
- # label of combobox where the log is selected
- @logs = Builtins.add(
- @logs,
- {
- :menuname => _("PPP Daemon"),
- :filename => "smpppd.log",
- :prio => 20
- }
- )
- run_command = Ops.add(
- Ops.add(
- Ops.add(Ops.add("/bin/cp '", String.Quote(Internet.logfile)), "'
'"),
- String.Quote(@logdir)
- ),
- "/smpppd.log'"
- )
- ret_command = Convert.to_integer(
- SCR.Execute(path(".target.bash"), run_command)
- )
- if ret_command != 0
- Builtins.y2error(
- "Command '%1' failed -> %2",
- run_command,
- ret_command
- )
- end
- end
-
nil
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/clients/lan_proposal.rb
new/yast2-network-3.1.15/src/clients/lan_proposal.rb
--- old/yast2-network-3.1.12/src/clients/lan_proposal.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/clients/lan_proposal.rb 2014-01-27
11:39:48.000000000 +0100
@@ -116,7 +116,6 @@
@dev = Ops.get(@match, 0, "")
# unescape colons
@dev = Builtins.mergestring(Builtins.splitstring(@dev, "/"), ":")
- # Lan::Edit (dev);

Builtins.foreach(LanItems.Items) do |row, value|
LanItems.current = row
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-network-3.1.12/src/include/network/installation/dialogs.rb
new/yast2-network-3.1.15/src/include/network/installation/dialogs.rb
--- old/yast2-network-3.1.12/src/include/network/installation/dialogs.rb
2013-12-17 13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/installation/dialogs.rb
2014-01-27 11:39:48.000000000 +0100
@@ -111,15 +111,6 @@
Internet.capi_isdn = Ops.get_string(Provider.Current, "PPPMODE",
"ippp") == "capi-isdn"
end

- # Set logfile
- if Internet.type == "dsl" || Internet.type == "modem" ||
- Internet.type == "isdn" && Internet.capi_isdn
- Internet.logfile = Ops.add(
- Ops.add("/var/log/smpppd/ifcfg-", Internet.device),
- ".log"
- )
- end
-
nil
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-network-3.1.12/src/include/network/lan/address.rb
new/yast2-network-3.1.15/src/include/network/lan/address.rb
--- old/yast2-network-3.1.12/src/include/network/lan/address.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/lan/address.rb 2014-01-27
11:39:48.000000000 +0100
@@ -1266,7 +1266,6 @@
"STARTMODE" => LanItems.startmode(
),
"IFPLUGD_PRIORITY" => LanItems.ifplugd_priority,
- "USERCONTROL" => LanItems.usercontrol,
# problems when renaming the interface?
"FWZONE" => fwzone,
"MTU" => LanItems.mtu,
@@ -1541,8 +1540,6 @@
VSpacing(0.4),
Frame(_("Firewall Zone"), HBox("FWZONE", HStretch())),
VSpacing(0.4),
- Frame(_("Device Control"), HBox("USERCONTROL",
HStretch())),
- VSpacing(0.4),
Frame(
_("Maximum Transfer Unit (MTU)"),
HBox("MTU", HStretch())
@@ -1654,7 +1651,6 @@
)
LanItems.ifplugd_priority = ifp_prio if ifp_prio != nil
end
- LanItems.usercontrol = Ops.get_boolean(@settings, "USERCONTROL", false)

if fw_is_installed
zone = Ops.get_string(@settings, "FWZONE", "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-network-3.1.12/src/include/network/lan/complex.rb
new/yast2-network-3.1.15/src/include/network/lan/complex.rb
--- old/yast2-network-3.1.12/src/include/network/lan/complex.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/lan/complex.rb 2014-01-27
11:39:48.000000000 +0100
@@ -121,9 +121,7 @@
),
VWeight(1, RichText(Id(:_hw_sum), "")),
HBox(
- PushButton(Id(:add), Label.AddButton),
- PushButton(Id(:edit), Label.EditButton),
- PushButton(Id(:delete), Label.DeleteButton),
+ *overview_buttons.map { |k,v| PushButton( Id(k), v) },
HStretch()
)
),
@@ -186,12 +184,6 @@
:next
end

- # Display finished popup
- # @return dialog result
- # define symbol FinishDialog() ``{
- # return FinishPopup(Modified(), "lan", "", "mail", ["permanent"]);
- # }
-
# Read settings dialog
# @return `abort if aborted and `next otherwise
def ReadDialog
@@ -275,9 +267,8 @@
end
end

- # this is one of 3 places to install packages :-(
+ # this is one of 2 places to install packages :-(
# - kernel modules (InstallKernel): before loaded
- # - smpppd & qinternet: before net start
# - wlan firmware: here, just because it is copied from modems
# #45960
if LanItems.Requires != [] && LanItems.Requires != nil
@@ -418,9 +409,7 @@

if !Mode.config && Lan.HaveXenBridge # #196479
# #178848
- Builtins.foreach([:add, :edit, :delete]) do |b|
- UI.ChangeWidget(Id(b), :Enabled, false)
- end
+ overview_buttons.keys.each { |b| UI.ChangeWidget(Id(b), :Enabled,
false) }
end

nil
@@ -499,7 +488,7 @@
UI.ChangeWidget(Id(:_hw_items), :Items, term_items)

if !@shown
- disableItemsIfNM([:_hw_items, :_hw_sum, :add, :edit, :delete], true)
+ disableItemsIfNM([:_hw_items, :_hw_sum] + overview_buttons.keys, true)
@shown = true
else
enableDisableButtons
@@ -512,7 +501,7 @@

def handleOverview(key, event)
event = deep_copy(event)
- if !disableItemsIfNM([:_hw_items, :_hw_sum, :add, :edit, :delete], false)
+ if !disableItemsIfNM([:_hw_items, :_hw_sum] + overview_buttons.keys,
false)
enableDisableButtons
end
UI.ChangeWidget(:_hw_sum, :Value, LanItems.GetItemDescription)
@@ -679,4 +668,20 @@
nil
end
end
+
+ private
+ def overview_buttons
+ ret = {}
+
+ # User should be able to configure existing devices during installation.
+ # This can be achieved via "Edit" button on automatically detected
+ # devices. Advanced configuration should be postponed to installed system.
+ # Therefor adding devices is not available during installation
+ ret[:add] = Label.AddButton if !Mode.installation
+ ret[:edit] = Label.EditButton
+ ret[:delete] = Label.DeleteButton
+
+ ret
+ end
+
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/include/network/runtime.rb
new/yast2-network-3.1.15/src/include/network/runtime.rb
--- old/yast2-network-3.1.12/src/include/network/runtime.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/runtime.rb 2014-01-27
11:39:48.000000000 +0100
@@ -69,42 +69,5 @@
true
end

- # Are there interfaces controlled by smpppd and qinternet?
- # They are the ones with USERCONTROL=yes (#44303)
- # @return true/false
- def HaveDialupLikeInterfaces
- devs = NetworkInterfaces.Locate("USERCONTROL", "yes")
- Builtins.y2milestone("user controlled interfaces: %1", devs)
- return true if devs != []
-
- devs != []
- end
-
- # Setup smpppd(8)
- # @return true if success
- def SetupSMPPPD(install_force)
- ret = true
- # Stop and disable
- if !HaveDialupLikeInterfaces()
- ret = Service.Disable("smpppd") && ret
- ret = Service.Stop("smpppd") && ret
- else
- # (#299033) - if not forced, user can continue also without packages
- ret = PackageSystem.CheckAndInstallPackagesInteractive(["smpppd"])
-
- ret = Service.Enable("smpppd") && ret
-
- # Installation?
- if Mode.normal
- if Service.Status("smpppd") == 0
- ret = Service.Reload("smpppd") && ret
- else
- ret = Service.Start("smpppd") && ret
- end
- end
- end
-
- ret
- end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-network-3.1.12/src/include/network/services/dns.rb
new/yast2-network-3.1.15/src/include/network/services/dns.rb
--- old/yast2-network-3.1.12/src/include/network/services/dns.rb
2013-12-17 13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/services/dns.rb
2014-01-27 11:39:48.000000000 +0100
@@ -28,6 +28,13 @@
#
module Yast
module NetworkServicesDnsInclude
+
+ # CWM wants id-value pairs
+ CUSTOM_RESOLV_POLICIES = {
+ "STATIC" => "STATIC",
+ "STATIC_FALLBACK" => "STATIC_FALLBACK"
+ }
+
def initialize_network_services_dns(include_target)
textdomain "network"

@@ -160,10 +167,7 @@
"widget" => :combobox,
"label" => _("&Custom Policy Rule"),
"opt" => [:editable],
- "items" => [
- [:static, "STATIC"],
- [:static_fallback, "STATIC_FALLBACK"]
- ],
+ "items" => CUSTOM_RESOLV_POLICIES.to_a,
"init" => fun_ref(method(:initPolicy), "void (string)"),
"handle" => fun_ref(method(:handlePolicy), "symbol (string, map)"),
"help" => ""
@@ -294,7 +298,8 @@
"HOSTNAME" => DNS.hostname,
"DOMAIN" => DNS.domain,
"DHCP_HOSTNAME" => DNS.dhcp_hostname,
- "WRITE_HOSTNAME" => DNS.write_hostname
+ "WRITE_HOSTNAME" => DNS.write_hostname,
+ "PLAIN_POLICY" => DNS.resolv_conf_policy
}
# the rest is not so straightforward,
# because we have list variables but non-list widgets
@@ -335,6 +340,7 @@
DNS.searchlist = NonEmpty(searchlist)
DNS.dhcp_hostname = Ops.get_boolean(settings, "DHCP_HOSTNAME", false)
DNS.write_hostname = Ops.get_boolean(settings, "WRITE_HOSTNAME", true)
+ DNS.resolv_conf_policy = settings["PLAIN_POLICY"]

# update modified flag
DNS.modified = DNS.modified || settings != @settings_orig
@@ -552,7 +558,6 @@
true
end

-
def initPolicy(key)
#first initialize correctly
Builtins.y2milestone(
@@ -578,30 +583,35 @@
event = deep_copy(event)
Builtins.y2milestone("handlePolicy")

- if UI.QueryWidget(Id("MODIFY_RESOLV"), :Value) == :custom
- DNS.resolv_conf_policy = Convert.to_string(
- UI.QueryWidget(Id("PLAIN_POLICY"), :Value)
- )
- elsif UI.QueryWidget(Id("MODIFY_RESOLV"), :Value) == :auto
- DNS.resolv_conf_policy = "auto"
- else
- DNS.resolv_conf_policy = ""
+ case UI.QueryWidget(Id("MODIFY_RESOLV"), :Value)
+ when :custom
+ SetHnItem("PLAIN_POLICY", UI.QueryWidget(Id("PLAIN_POLICY"), :Value))
+ when :auto
+ SetHnItem("PLAIN_POLICY", "auto")
+ else
+ SetHnItem("PLAIN_POLICY", "")
end

nil
end

- def initModifyResolvPolicy(key)
- Builtins.y2milestone("initModifyResolvPolicy")
- #first initialize correctly
+ def modify_resolv_default
if DNS.resolv_conf_policy == nil || DNS.resolv_conf_policy == ""
- UI.ChangeWidget(Id("MODIFY_RESOLV"), :Value, Id(:nomodify))
- elsif DNS.resolv_conf_policy == "auto" ||
- DNS.resolv_conf_policy == "STATIC *"
- UI.ChangeWidget(Id("MODIFY_RESOLV"), :Value, Id(:auto))
+ Id(:nomodify)
+ elsif DNS.resolv_conf_policy == "auto" || DNS.resolv_conf_policy ==
"STATIC *"
+ Id(:auto)
else
- UI.ChangeWidget(Id("MODIFY_RESOLV"), :Value, Id(:custom))
+ Id(:custom)
end
+ end
+
+ def initModifyResolvPolicy(key)
+ Builtins.y2milestone("initModifyResolvPolicy")
+
+ #first initialize correctly
+ default = modify_resolv_default
+
+ UI.ChangeWidget(Id("MODIFY_RESOLV"), :Value, default)
#then disable if needed
disableItemsIfNM(["MODIFY_RESOLV"], false)

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/include/network/widgets.rb
new/yast2-network-3.1.15/src/include/network/widgets.rb
--- old/yast2-network-3.1.12/src/include/network/widgets.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/include/network/widgets.rb 2014-01-27
11:39:48.000000000 +0100
@@ -45,24 +45,6 @@
Yast.include include_target, "network/complex.rb"

@widget_descr = {
- "USERCONTROL" => {
- "widget" => :checkbox,
- # CheckBox label
- # is the interface administrable by users (as opposed to root)
- "label" => _(
- "E&nable Device Control for Non-root User Via QInternet"
- ),
- "opt" => [:notify],
- "help" =>
- # Details dialog help
- _(
- "<p><b><big>Device Control</big></b></p>\n" +
- "<p>Usually, only the system administrator is allowed to
activate and\n" +
- "deactivate a network interface. With <b>Enable Device Control
for Non-root User\n" +
- "Via QInternet</b>, any user may control the interface via
QInternet.This will require\n" +
- "<b>smpppd</b> installed and running.</p>\n"
- )
- },
# #23315
"DIALPREFIXREGEX" => {
"widget" => :textentry,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/modules/InternetDevices.rb
new/yast2-network-3.1.15/src/modules/InternetDevices.rb
--- old/yast2-network-3.1.12/src/modules/InternetDevices.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/modules/InternetDevices.rb 2014-01-27
11:39:48.000000000 +0100
@@ -83,15 +83,6 @@
Internet.capi_isdn = Ops.get_string(Provider.Current, "PPPMODE",
"ippp") == "capi-isdn"
end

- # Set logfile
- if Internet.type == "dsl" || Internet.type == "modem" ||
- Internet.type == "isdn" && Internet.capi_isdn
- Internet.logfile = Ops.add(
- Ops.add("/var/log/smpppd/ifcfg-", Internet.device),
- ".log"
- )
- end
-
nil
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/modules/Lan.rb
new/yast2-network-3.1.15/src/modules/Lan.rb
--- old/yast2-network-3.1.12/src/modules/Lan.rb 2013-12-17 13:48:08.000000000
+0100
+++ new/yast2-network-3.1.15/src/modules/Lan.rb 2014-01-27 11:39:48.000000000
+0100
@@ -546,11 +546,6 @@
end
# Progress stage 10
step_labels = Builtins.add(step_labels, _("Update configuration"))
- if !NetworkService.is_network_manager &&
- !@write_only #(boolean) SCR::Read(.init.scripts.exists, "smpppd") &&
- # Progress stage 11
- step_labels = Builtins.add(step_labels, _("Set up smpppd"))
- end

Progress.New(
caption,
@@ -672,15 +667,6 @@
RunSuSEconfig() if !@write_only
Builtins.sleep(sl)

- if !NetworkService.is_network_manager && !@write_only
- return false if Abort()
- # Progress step 11
- ProgressNextStage(_("Setting up smpppd(8)..."))
- # takes care of autoinst by itself
- SetupSMPPPD(false)
- Builtins.sleep(sl)
- end
-
if NetworkService.is_network_manager
network = false
timeout = 15
@@ -920,16 +906,6 @@
true
end

- # Edit the given device
- # @param [String] name device to edit
- # @return true if success
- def Edit(name)
- LanItems.operation = nil
- return false if LanItems.Select(name) != true
- NetworkInterfaces.Edit(name)
- LanItems.operation = :edit
- true
- end
# Delete the given device
# @param name device to delete
# @return true if success
@@ -1523,7 +1499,6 @@
publish :function => :Summary, :type => "list (string)"
publish :function => :SummaryGeneral, :type => "list ()"
publish :function => :Add, :type => "boolean ()"
- publish :function => :Edit, :type => "boolean (string)"
publish :function => :Delete, :type => "boolean ()"
publish :function => :ProposeInterfaces, :type => "boolean ()"
publish :function => :ProposeRoutesAndResolver, :type => "boolean ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/src/modules/LanItems.rb
new/yast2-network-3.1.15/src/modules/LanItems.rb
--- old/yast2-network-3.1.12/src/modules/LanItems.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/src/modules/LanItems.rb 2014-01-27
11:39:48.000000000 +0100
@@ -84,7 +84,6 @@

@startmode = "auto"
@ifplugd_priority = "0"
- @usercontrol = false
@mtu = ""
@ethtool_options = ""

@@ -225,7 +224,6 @@
"NAME" => "",
"STARTMODE" => "manual",
"IFPLUGD_PRIORITY" => "0",
- "USERCONTROL" => "no",
"WIRELESS_MODE" => "Managed",
"WIRELESS_ESSID" => "",
"WIRELESS_NWID" => "",
@@ -1607,11 +1605,6 @@
# must be in sync with {#SetDefaultsForHW}
def GetDefaultsForHW
ret = {}
- if @type == "wlan"
- ret = Builtins.union(
- ret, # #63767
- { "USERCONTROL" => "yes" }
- )
# LCS eth interfaces on s390 need the MTU of 1492. #81815.
# TODO: lcs, or eth?
# will eth not get mapped to lcs?
@@ -1620,7 +1613,7 @@
# #93798: limit to s390 to minimize regressions. Probably it could
# be also done by only testing for lcs and not eth but that
# would need more testing.
- elsif Arch.s390 && Builtins.contains(["lcs", "eth"], @type)
+ if Arch.s390 && Builtins.contains(["lcs", "eth"], @type)
Builtins.y2milestone("Adding LCS: setting MTU")
ret = Builtins.add(ret, "MTU", "1492")
end
@@ -1630,16 +1623,9 @@
# must be in sync with {#GetDefaultsForHW}
def SetDefaultsForHW
Builtins.y2milestone("SetDefaultsForHW type %1", @type)
- if @type == "wlan"
- @usercontrol = true
- elsif Arch.s390 && Builtins.contains(["lcs", "eth"], @type)
+ if Arch.s390 && Builtins.contains(["lcs", "eth"], @type)
@mtu = "1492"
end
- # if (!needHwcfg(hw)){
- # nm_name_old = nm_name;
- # nm_name = "";
- # }
- # y2milestone("hwcfg name %1", nm_name);

nil
end
@@ -1670,7 +1656,6 @@
@ethtool_options = GetDeviceVar(devmap, defaults, "ETHTOOL_OPTIONS")
@startmode = GetDeviceVar(devmap, defaults, "STARTMODE")
@ifplugd_priority = GetDeviceVar(devmap, defaults, "IFPLUGD_PRIORITY")
- @usercontrol = GetDeviceVar(devmap, defaults, "USERCONTROL") == "yes"
@description = GetDeviceVar(devmap, defaults, "NAME")
@bond_option = GetDeviceVar(devmap, defaults, "BONDING_MODULE_OPTS")
@vlan_etherdevice = GetDeviceVar(devmap, defaults, "ETHERDEVICE")
@@ -1817,6 +1802,47 @@
nil
end

+ def hotplug_usable?
+ true unless Ops.get_string(@Items, [@current, "hwinfo", "hotplug"],
"").empty?
+ end
+
+ def replace_ifplugd?
+ return true if !Arch.is_laptop
+ return true if NetworkService.is_network_manager
+ return true if ["bond", "vlan", "br"].include? type
+
+ return false
+ end
+
+ # returns default startmode for a new device
+ #
+ # startmode is returned according product, Arch and current device type
+ def new_device_startmode
+ product_startmode = ProductFeatures.GetStringFeature(
+ "network",
+ "startmode"
+ )
+
+ Builtins.y2milestone("Startmode by product: #{product_startmode}")
+
+ case product_startmode
+ when "ifplugd"
+ if replace_ifplugd?
+ startmode = hotplug_usable? ? "hotplug" : "auto"
+ else
+ startmode = product_startmode
+ end
+ when "auto"
+ startmode = "auto"
+ else
+ startmode = hotplug_usable? ? "hotplug" : "auto"
+ end
+
+ Builtins.y2milestone("New device startmode: #{startmode}")
+
+ startmode
+ end
+
# Select the given device
# @param [String] dev device to select ("" for new device, default values)
# @return true if success
@@ -1825,46 +1851,14 @@
devmap = {}
# defaults for a new device
devmap = {
- # for hotplug devices set STARTMODE=hotplug (#132583)
- "STARTMODE" => IsNotEmpty(
- Ops.get_string(@Items, [@current, "hwinfo", "hotplug"], "")
- ) ? "hotplug" : "auto", # #115448, #156388
"NETMASK" => Ops.get_string(
NetHwDetection.result,
"NETMASK",
"255.255.255.0"
)
} # #31369
- product_startmode = ProductFeatures.GetStringFeature(
- "network",
- "startmode"
- )
- if Builtins.contains(["auto", "ifplugd"], product_startmode)
- Builtins.y2milestone("Product startmode: %1", product_startmode)
- if product_startmode == "ifplugd" && !Arch.is_laptop
- # #164816
- Builtins.y2milestone("Not a laptop, will not prefer ifplugd")
- product_startmode = IsNotEmpty(
- Ops.get_string(@Items, [@current, "hwinfo", "hotplug"], "")
- ) ? "hotplug" : "auto"
- end
- if product_startmode == "ifplugd" && NetworkService.is_network_manager
- Builtins.y2milestone("For NetworkManager will not prefer ifplugd")
- product_startmode = IsNotEmpty(
- Ops.get_string(@Items, [@current, "hwinfo", "hotplug"], "")
- ) ? "hotplug" : "auto"
- end
- if product_startmode == "ifplugd" &&
- Builtins.contains(["bond", "vlan", "br"], @type)
- Builtins.y2milestone(
- "For virtual networktypes (bond, bridge, vlan) will not prefer
ifplugd"
- )
- product_startmode = IsNotEmpty(
- Ops.get_string(@Items, [@current, "hwinfo", "hotplug"], "")
- ) ? "hotplug" : "auto"
- end
- Ops.set(devmap, "STARTMODE", product_startmode)
- end
+
+ devmap[ "STARTMODE"] = new_device_startmode

@type = Ops.get_string(@Items, [@current, "hwinfo", "type"], "eth")
@device = NetworkInterfaces.GetFreeDevice(@type)
@@ -1948,7 +1942,6 @@
)
end
end
- Ops.set(newdev, "USERCONTROL", @usercontrol ? "yes" : "no")
Ops.set(newdev, "BOOTPROTO", @bootproto)
end
Ops.set(newdev, "NAME", @description)
@@ -2559,7 +2552,6 @@
publish :variable => :prefix, :type => "string"
publish :variable => :startmode, :type => "string"
publish :variable => :ifplugd_priority, :type => "string"
- publish :variable => :usercontrol, :type => "boolean"
publish :variable => :mtu, :type => "string"
publish :variable => :ethtool_options, :type => "string"
publish :variable => :wl_mode, :type => "string"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/test/Makefile.am
new/yast2-network-3.1.15/test/Makefile.am
--- old/yast2-network-3.1.12/test/Makefile.am 2013-12-17 13:48:08.000000000
+0100
+++ new/yast2-network-3.1.15/test/Makefile.am 2014-01-27 11:39:48.000000000
+0100
@@ -3,7 +3,8 @@
edit_nic_name_test.rb \
lan_udev_auto_test.rb \
bridge_test.rb \
- routing_test.rb
+ routing_test.rb \
+ new_device_startmode_test.rb

TEST_EXTENSIONS = .rb
RB_LOG_COMPILER = rspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-network-3.1.12/test/new_device_startmode_test.rb
new/yast2-network-3.1.15/test/new_device_startmode_test.rb
--- old/yast2-network-3.1.12/test/new_device_startmode_test.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-network-3.1.15/test/new_device_startmode_test.rb 2014-01-27
11:39:48.000000000 +0100
@@ -0,0 +1,104 @@
+#!rspec
+
+ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
+
+require "yast"
+
+Yast.import "ProductFeatures"
+Yast.import "LanItems"
+
+describe "LanItemsClass#new_device_startmode" do
+
+ DEVMAP_STARTMODE_INVALID = {
+ "STARTMODE" => "invalid"
+ }
+
+ ["hotplug", ""].each do |hwinfo_hotplug|
+
+ expected_startmode = hwinfo_hotplug == "hotplug" ? "hotplug" : "auto"
+ hotplug_desc = hwinfo_hotplug == "hotplug" ? "can hotplug" : "cannot
hotplug"
+
+ context "When product_startmode is auto and device " + hotplug_desc do
+
+ it "results to auto" do
+ expect(Yast::ProductFeatures)
+ .to receive(:GetStringFeature)
+ .with("network", "startmode") { "auto" }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql "auto"
+ end
+ end
+
+ context "When product_startmode is ifplugd and device " + hotplug_desc do
+
+ before( :each) do
+ expect(Yast::ProductFeatures)
+ .to receive(:GetStringFeature)
+ .with("network", "startmode") { "ifplugd" }
+ Yast::LanItems.stub(:hotplug_usable?) { hwinfo_hotplug == "hotplug" }
+ # setup stubs by default at results which doesn't need special handling
+ Yast::Arch.stub(:is_laptop) { true }
+ Yast::NetworkService.stub(:is_network_manager) { false }
+ end
+
+ it "results to #{expected_startmode} when not running on laptop" do
+ expect(Yast::Arch)
+ .to receive(:is_laptop) { false }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql expected_startmode
+ end
+
+ it "results to ifplugd when running on laptop" do
+ expect(Yast::Arch)
+ .to receive(:is_laptop) { true }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql "ifplugd"
+ end
+
+ it "results to #{expected_startmode} when running NetworkManager" do
+ expect(Yast::NetworkService)
+ .to receive(:is_network_manager) { true }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql expected_startmode
+ end
+
+ it "results to #{expected_startmode} when current device is virtual one"
do
+ # check for virtual device type is done via Builtins.contains. I don't
+ # want to stub it because it requires default stub value definition for
+ # other calls of the function. It might have unexpected inpacts.
+ Yast::LanItems.stub(:type) { "bond" }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql expected_startmode
+ end
+ end
+
+ context "When product_startmode is not auto neither ifplugd" do
+
+ AVAILABLE_PRODUCT_STARTMODES = [
+ "hotplug",
+ "manual",
+ "off",
+ "nfsroot"
+ ]
+
+ AVAILABLE_PRODUCT_STARTMODES.each do |product_startmode|
+
+ it "for #{product_startmode} it results to #{expected_startmode} if
device " + hotplug_desc do
+ expect(Yast::ProductFeatures)
+ .to receive(:GetStringFeature)
+ .with("network", "startmode") { product_startmode }
+ expect(Yast::LanItems)
+ .to receive(:hotplug_usable?) { hwinfo_hotplug == "hotplug" }
+
+ result = Yast::LanItems.new_device_startmode
+ expect(result).to be_eql expected_startmode
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/testsuite/tests/runtime.out
new/yast2-network-3.1.15/testsuite/tests/runtime.out
--- old/yast2-network-3.1.12/testsuite/tests/runtime.out 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/testsuite/tests/runtime.out 1970-01-01
01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-Dump RunSuSEconfig
-Execute .target.bash "/usr/lib/sendmail.d/update 2>/dev/null" 0
-Execute .target.bash "/usr/sbin/config.postfix 2>/dev/null" 0
-Return true
-Execute .target.bash "/usr/lib/sendmail.d/update 2>/dev/null" 1
-Execute .target.bash "/usr/sbin/config.postfix 2>/dev/null" 1
-Return true
-Dump SetupSMPPPD
-Return true
-Return false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-network-3.1.12/testsuite/tests/runtime.rb
new/yast2-network-3.1.15/testsuite/tests/runtime.rb
--- old/yast2-network-3.1.12/testsuite/tests/runtime.rb 2013-12-17
13:48:08.000000000 +0100
+++ new/yast2-network-3.1.15/testsuite/tests/runtime.rb 1970-01-01
01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-# encoding: utf-8
-
-#***************************************************************************
-#
-# Copyright (c) 2012 Novell, Inc.
-# All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of version 2 of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, contact Novell, Inc.
-#
-# To contact Novell about this file by physical or electronic mail,
-# you may find current contact information at www.novell.com
-#
-#**************************************************************************
-module Yast
- class RuntimeClient < Client
- def main
-
- # testedfiles: runtime.ycp Testsuite.ycp
-
- Yast.include self, "testsuite.rb"
-
- @READ = {
- "init" => { "scripts" => { "exists" => true } },
- "probe" => { "system" => [] },
- "product" => {
- "features" => {
- "USE_DESKTOP_SCHEDULER" => "0",
- "ENABLE_AUTOLOGIN" => "0",
- "EVMS_CONFIG" => "0",
- "IO_SCHEDULER" => "cfg",
- "UI_MODE" => "expert"
- }
- },
- "sysconfig" => {
- "language" => {
- "RC_LANG" => "",
- "DEFAULT_LANGUAGE" => "",
- "ROOT_USES_LANG" => "no"
- },
- "console" => { "CONSOLE_ENCODING" => "UTF-8" }
- },
- "target" => { "size" => 1, "stat" => { "dummy" => true } }
- }
-
- @EXEC = { "target" => { "bash_output" => {} } }
-
- TESTSUITE_INIT([@READ, {}, @EXEC], nil)
- Yast.include self, "network/runtime.rb"
-
- @EXEC0 = {
- "target" => {
- "bash" => 0,
- "bash_background" => 0,
- "bash_output" => { "exit" => 0, "stdout" => "", "stderr" => "" }
- }
- }
-
- @EXEC1 = {
- "target" => {
- "bash" => 1,
- "bash_background" => 1,
- "bash_output" => {
- "exit" => 1,
- "stdout" => "",
- "stderr" => "Dummy error message"
- }
- }
- }
-
- DUMP("RunSuSEconfig")
- TEST(lambda { RunSuSEconfig() }, [{}, {}, @EXEC0], nil)
- TEST(lambda { RunSuSEconfig() }, [{}, {}, @EXEC1], nil)
-
- Yast.import "NetworkInterfaces"
- NetworkInterfaces.instance_variable_set(:@Devices, { "dsl" => { "0" =>
{} } })
-
- DUMP("SetupSMPPPD")
- TEST(lambda { SetupSMPPPD(true) }, [@READ, {}, @EXEC0], nil)
- TEST(lambda { SetupSMPPPD(false) }, [@READ, {}, @EXEC1], nil)
-
- nil
- end
- end
-end
-
-Yast::RuntimeClient.new.main

continue with "q"...


Checked in at Mon Jan 27 12:52:29 CET 2014 by ro

Remember to have fun...

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread