Hello community,

here is the log from the commit of package yast2-rdp for openSUSE:Factory 
checked in at 2018-02-07 18:37:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-rdp (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-rdp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-rdp"

Wed Feb  7 18:37:24 2018 rev:2 rq:573709 version:4.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-rdp/yast2-rdp.changes      2017-04-29 
10:53:08.423481995 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-rdp.new/yast2-rdp.changes 2018-02-07 
18:37:25.687383753 +0100
@@ -1,0 +2,6 @@
+Mon Feb  5 14:07:24 UTC 2018 - knut.anders...@suse.com
+
+- Replace SuSEFirewall2 by firewalld (fate#323460)
+- 4.0.0
+
+-------------------------------------------------------------------

Old:
----
  yast2-rdp-3.1.3.tar.bz2

New:
----
  yast2-rdp-4.0.0.tar.bz2

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

Other differences:
------------------
++++++ yast2-rdp.spec ++++++
--- /var/tmp/diff_new_pack.zrj8xw/_old  2018-02-07 18:37:26.135362766 +0100
+++ /var/tmp/diff_new_pack.zrj8xw/_new  2018-02-07 18:37:26.135362766 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-rdp
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX 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-rdp
-Version:        3.1.3
+Version:        4.0.0
 Release:        0
 Summary:        Setup Remote Desktop Protocol service for remote administration
 License:        GPL-2.0
@@ -25,13 +25,15 @@
 Url:            https://www.suse.com
 Source0:        %{name}-%{version}.tar.bz2
 BuildArch:      noarch
+# SuSEFirewall2 replaced by firewalld (fate#323460)
 BuildRequires:  perl-XML-Writer
 BuildRequires:  update-desktop-files
-BuildRequires:  yast2
+BuildRequires:  yast2 >= 4.0.39
 BuildRequires:  yast2-devtools
 BuildRequires:  yast2-network
 BuildRequires:  yast2-testsuite
-Requires:       yast2
+# SuSEFirewall2 replaced by firewalld (fate#323460)
+Requires:       yast2 >= 4.0.39
 Requires:       yast2-ruby-bindings
 
 %description

++++++ yast2-rdp-3.1.3.tar.bz2 -> yast2-rdp-4.0.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-rdp-3.1.3/.yardopts 
new/yast2-rdp-4.0.0/.yardopts
--- old/yast2-rdp-3.1.3/.yardopts       1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-rdp-4.0.0/.yardopts       2018-02-07 14:27:00.000000000 +0100
@@ -0,0 +1,7 @@
+--no-private
+--markup markdown
+--protected
+--readme README.md
+--output-dir ./doc/autodocs
+--files *.md
+src/**/*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-rdp-3.1.3/package/yast2-rdp.changes 
new/yast2-rdp-4.0.0/package/yast2-rdp.changes
--- old/yast2-rdp-3.1.3/package/yast2-rdp.changes       2016-09-19 
10:21:35.708473868 +0200
+++ new/yast2-rdp-4.0.0/package/yast2-rdp.changes       2018-02-07 
14:27:00.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Feb  5 14:07:24 UTC 2018 - knut.anders...@suse.com
+
+- Replace SuSEFirewall2 by firewalld (fate#323460)
+- 4.0.0
+
+-------------------------------------------------------------------
 Thu Aug  4 13:57:21 UTC 2016 - h...@suse.com
 
 - Remove unnecessary files from source archive and fix build errors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-rdp-3.1.3/package/yast2-rdp.spec 
new/yast2-rdp-4.0.0/package/yast2-rdp.spec
--- old/yast2-rdp-3.1.3/package/yast2-rdp.spec  2016-09-19 10:21:35.708473868 
+0200
+++ new/yast2-rdp-4.0.0/package/yast2-rdp.spec  2018-02-07 14:27:00.000000000 
+0100
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-rdp
-Version:        3.1.3
+Version:        4.0.0
 Release:        0
 License:        GPL-2.0
 Group:          System/YaST
@@ -24,9 +24,13 @@
 URL:            https://www.suse.com
 Source0:        %{name}-%{version}.tar.bz2
 BuildArch:      noarch
-BuildRequires:  perl-XML-Writer update-desktop-files yast2 yast2-testsuite 
yast2-network
+# SuSEFirewall2 replaced by firewalld (fate#323460)
+BuildRequires:  yast2 >= 4.0.39
+BuildRequires:  perl-XML-Writer update-desktop-files yast2-testsuite 
yast2-network
 BuildRequires:  yast2-devtools
-Requires:       yast2 yast2-ruby-bindings
+# SuSEFirewall2 replaced by firewalld (fate#323460)
+Requires:       yast2 >= 4.0.39
+Requires:       yast2-ruby-bindings
 
 %description
 Configure RDP (remote desktop protocol) daemon to allow remote system 
administration.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-rdp-3.1.3/src/modules/RDP.rb 
new/yast2-rdp-4.0.0/src/modules/RDP.rb
--- old/yast2-rdp-3.1.3/src/modules/RDP.rb      2016-09-19 10:21:35.712473891 
+0200
+++ new/yast2-rdp-4.0.0/src/modules/RDP.rb      2018-02-07 14:27:00.000000000 
+0100
@@ -8,9 +8,11 @@
 #              David Reveman <dav...@novell.com>
 #
 require "yast"
+require "y2firewall/firewalld"
 
 module Yast
   class RDPClass < Module
+    FW_ZONES = ["public", "external", "internal", "work", "home", 
"trusted"].freeze
     def main
       Yast.import "UI"
       textdomain "rdp"
@@ -20,7 +22,6 @@
       Yast.import "Package"
       Yast.import "PackageSystem"
       Yast.import "Service"
-      Yast.import "SuSEFirewall"
       Yast.import "Progress"
       Yast.import "Linuxrc"
 
@@ -36,9 +37,13 @@
       # True only if the port is open in all firewall zones
       @open_fw_port = false
     end
-    
+
     attr_accessor(:open_fw_port, :allow_administration)
 
+    def firewalld
+      Y2Firewall::Firewalld.instance
+    end
+
     # Reset all module data.
     def Reset
       @already_proposed = true
@@ -77,10 +82,9 @@
       @allow_administration = xrdp
 
       current_progress = Progress.set(false)
-      SuSEFirewall.Read
+      firewalld.read
       Progress.set(current_progress)
-      @open_fw_port = 
SuSEFirewall.IsServiceDefinedByPackageSupportedInZone('service:xrdp', 'EXT') &&
-                      
SuSEFirewall.IsServiceDefinedByPackageSupportedInZone('service:xrdp', 'INT')
+      @open_fw_port = firewalld.zones.any? { |z| z.services.include?("xrdp") }
       true
     end
 
@@ -109,17 +113,7 @@
       Progress.New(caption, " ", Builtins.size(steps), steps, [], "")
 
       ProgressNextStage(_("Writing firewall settings..."))
-      current_progress = Progress.set(false)
-
-      if @open_fw_port
-          SuSEFirewall.AddServiceDefinedByPackageIntoZone("service:xrdp", 
"EXT")
-          SuSEFirewall.AddServiceDefinedByPackageIntoZone("service:xrdp", 
"INT")
-      else
-          SuSEFirewall.RemoveServiceDefinedByPackageFromZone("service:xrdp", 
"EXT")
-          SuSEFirewall.RemoveServiceDefinedByPackageFromZone("service:xrdp", 
"INT")
-      end
-      SuSEFirewall.Write
-      Progress.set(current_progress)
+      write_firewall_setting
       Builtins.sleep(sl)
 
       ProgressNextStage(_("Configuring xrdp..."))
@@ -167,6 +161,21 @@
       end
     end
 
+    # Modify the firewall modifications if it is installed and the zones are
+    # available
+    def write_firewall_setting
+      return unless firewalld.installed?
+      FW_ZONES.each do |name|
+        zone = firewall.find_zone(name)
+        unless zone
+          Builtins.y2error("Firewalld zone #{name} is not available.")
+          next
+        end
+        @open_fw_port ? zone.add_service("xrdp") : zone.remove_service("xrdp")
+      end
+      firewalld.write
+    end
+
     publish :function => :Reset, :type => "void ()"
     publish :function => :Propose, :type => "void ()"
     publish :function => :Read, :type => "boolean ()"


Reply via email to