Hello community,

here is the log from the commit of package yast2-drbd for openSUSE:Factory 
checked in at 2018-01-29 14:59:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-drbd (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-drbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-drbd"

Mon Jan 29 14:59:13 2018 rev:25 rq:570454 version:4.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-drbd/yast2-drbd.changes    2017-11-22 
11:22:25.361351337 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-drbd.new/yast2-drbd.changes       
2018-01-29 15:00:47.945155020 +0100
@@ -1,0 +2,6 @@
+Fri Jan 26 06:58:42 UTC 2018 - [email protected]
+
+- SuSEFirewall2 replace by firewalld(fate#323460)
+- Version 4.0.1
+
+-------------------------------------------------------------------

Old:
----
  drbd-cluster.fwd
  yast2-drbd-4.0.0.tar.bz2

New:
----
  drbd.firewalld.xml
  yast2-drbd-4.0.1.tar.bz2

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

Other differences:
------------------
++++++ yast2-drbd.spec ++++++
--- /var/tmp/diff_new_pack.Bl0jct/_old  2018-01-29 15:00:48.481129979 +0100
+++ /var/tmp/diff_new_pack.Bl0jct/_new  2018-01-29 15:00:48.485129792 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-drbd
 #
-# 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,23 +17,25 @@
 
 
 Name:           yast2-drbd
-Version:        4.0.0
+Version:        4.0.1
 Release:        0
 
-%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
+%define _fwdefdir %{_libexecdir}/firewalld/services
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        %{name}-%{version}.tar.bz2
-Source1:        drbd-cluster.fwd
+Source1:        drbd.firewalld.xml
 
 BuildRequires:  perl-XML-Writer
 BuildRequires:  ruby
 BuildRequires:  update-desktop-files
-BuildRequires:  yast2
-BuildRequires:  yast2-devtools
+# SuSEFirewall2 replaced by Firewalld(fate#323460)
+BuildRequires:  firewall-macros
+BuildRequires:  yast2 >= 4.0.39
 BuildRequires:  yast2-devtools >= 3.1.10
 BuildRequires:  yast2-testsuite
+# SuSEFirewall2 replaced by Firewalld(fate#323460)
 Requires:       drbd >= 9.0
-Requires:       yast2
+Requires:       yast2 >= 4.0.39
 BuildArch:      noarch
 Requires:       yast2-ruby-bindings >= 1.0.0
 
@@ -56,7 +58,10 @@
 %yast_install
 
 mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
-install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_fwdefdir}/drbd
+install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_fwdefdir}/drbd.xml
+
+%post
+%firewalld_reload
 
 %files
 %defattr(-,root,root)
@@ -69,6 +74,8 @@
 %{yast_agentdir}/ag_drbd
 %{yast_agentdir}/drbd.rb.yy
 %doc %{yast_docdir}
-%config %{_fwdefdir}/drbd
+%dir %{_libexecdir}/firewalld
+%dir %{_fwdefdir}
+%{_fwdefdir}/drbd.xml
 
 %changelog

++++++ drbd.firewalld.xml ++++++
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>SUSE YaST DRBD</short>
  <description>This allows you to open various ports related to SUSE YaST DRBD. 
Port 7788 and higher is recommend.</description>
  <port protocol="tcp" port="7788"/>
</service>
++++++ yast2-drbd-4.0.0.tar.bz2 -> yast2-drbd-4.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/package/drbd-cluster.fwd 
new/yast2-drbd-4.0.1/package/drbd-cluster.fwd
--- old/yast2-drbd-4.0.0/package/drbd-cluster.fwd       2017-11-21 
16:18:52.793353100 +0100
+++ new/yast2-drbd-4.0.1/package/drbd-cluster.fwd       1970-01-01 
01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-## Name: Drbd
-## Description: Opens ports for DRBD.
-##   Port 7788 and higher is recommend.
-
-# space separated list of allowed TCP ports
-TCP="7788"
-
-# space separated list of allowed UDP ports
-UDP=""
-
-# space separated list of allowed RPC services
-RPC=""
-
-# space separated list of allowed IP protocols
-IP=""
-
-# space separated list of allowed UDP broadcast ports
-BROADCAST=""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/package/drbd.firewalld.xml 
new/yast2-drbd-4.0.1/package/drbd.firewalld.xml
--- old/yast2-drbd-4.0.0/package/drbd.firewalld.xml     1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-drbd-4.0.1/package/drbd.firewalld.xml     2018-01-29 
09:25:36.000000000 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<service>
+  <short>SUSE YaST DRBD</short>
+  <description>This allows you to open various ports related to SUSE YaST 
DRBD. Port 7788 and higher is recommend.</description>
+  <port protocol="tcp" port="7788"/>
+</service>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/package/yast2-drbd.changes 
new/yast2-drbd-4.0.1/package/yast2-drbd.changes
--- old/yast2-drbd-4.0.0/package/yast2-drbd.changes     2017-11-21 
16:18:52.793353100 +0100
+++ new/yast2-drbd-4.0.1/package/yast2-drbd.changes     2018-01-29 
09:25:36.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Jan 26 06:58:42 UTC 2018 - [email protected]
+
+- SuSEFirewall2 replace by firewalld(fate#323460)
+- Version 4.0.1
+
+-------------------------------------------------------------------
 Tue Nov 21 15:06:43 UTC 2017 - [email protected]
 
 - Merge fixes of bsc#1069131 and bsc#1069132 to openSUSE TW and SLE15.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/package/yast2-drbd.spec 
new/yast2-drbd-4.0.1/package/yast2-drbd.spec
--- old/yast2-drbd-4.0.0/package/yast2-drbd.spec        2017-11-21 
16:18:52.793353100 +0100
+++ new/yast2-drbd-4.0.1/package/yast2-drbd.spec        2018-01-29 
09:25:36.000000000 +0100
@@ -17,22 +17,24 @@
 
 
 Name:           yast2-drbd
-Version:        4.0.0
+Version:        4.0.1
 Release:        0
 
-%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
+%define _fwdefdir %{_libexecdir}/firewalld/services
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        %{name}-%{version}.tar.bz2
-Source1:        drbd-cluster.fwd
+Source1:        drbd.firewalld.xml
 
 BuildRequires:  perl-XML-Writer
 BuildRequires:  ruby
 BuildRequires:  update-desktop-files
-BuildRequires:  yast2
-BuildRequires:  yast2-devtools
+# SuSEFirewall2 replaced by Firewalld(fate#323460)
+BuildRequires:  yast2 >= 4.0.39
 BuildRequires:  yast2-devtools >= 3.1.10
 BuildRequires:  yast2-testsuite
-Requires:       yast2
+BuildRequires:  firewall-macros
+# SuSEFirewall2 replaced by Firewalld(fate#323460)
+Requires:       yast2 >= 4.0.39
 Requires:       drbd >= 9.0
 BuildArch:      noarch
 Requires:       yast2-ruby-bindings >= 1.0.0
@@ -56,7 +58,10 @@
 %yast_install
 
 mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
-install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_fwdefdir}/drbd
+install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_fwdefdir}/drbd.xml
+
+%post
+%firewalld_reload
 
 %files
 %defattr(-,root,root)
@@ -69,6 +74,8 @@
 %{yast_agentdir}/ag_drbd
 %{yast_agentdir}/drbd.rb.yy
 %doc %{yast_docdir}
-%config %{_fwdefdir}/drbd
+%dir %{_libexecdir}/firewalld
+%dir %{_fwdefdir}
+%{_fwdefdir}/drbd.xml
 
 %changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/src/include/drbd/startup_conf.rb 
new/yast2-drbd-4.0.1/src/include/drbd/startup_conf.rb
--- old/yast2-drbd-4.0.0/src/include/drbd/startup_conf.rb       2017-11-21 
16:18:52.797353100 +0100
+++ new/yast2-drbd-4.0.1/src/include/drbd/startup_conf.rb       2018-01-29 
09:25:36.000000000 +0100
@@ -74,9 +74,9 @@
       # Just a dialog
       firewall_widget = CWMFirewallInterfaces.CreateOpenFirewallWidget(
         {
-          #servie:drbd is the  name of 
/etc/sysconfig/SuSEfirewall2.d/services/drbd
+          #drbd is the name of /usr/lib/firewalld.d/services/drbd.xml
           "services"        => [
-            "service:drbd"
+            "drbd"
           ],
           "display_details" => true
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-drbd-4.0.0/src/modules/Drbd.rb 
new/yast2-drbd-4.0.1/src/modules/Drbd.rb
--- old/yast2-drbd-4.0.0/src/modules/Drbd.rb    2017-11-21 16:18:52.801353100 
+0100
+++ new/yast2-drbd-4.0.1/src/modules/Drbd.rb    2018-01-29 09:25:36.000000000 
+0100
@@ -29,6 +29,7 @@
 # Representation of the configuration of drbd.
 # Input and output routines.
 require "yast"
+require "y2firewall/firewalld"
 
 module Yast
   class DrbdClass < Module
@@ -40,8 +41,6 @@
       Yast.import "Report"
       Yast.import "Summary"
       Yast.import "Service"
-      Yast.import "SuSEFirewall"
-      Yast.import "SuSEFirewallServices"
 
       Yast.import "Mode"
       Yast.import "PackageSystem"
@@ -198,14 +197,14 @@
           _("Read resources"),
           _("Read LVM configurations"),
           _("Read daemon status"),
-          _("Read SuSEFirewall Settings")
+          _("Read Firewall Settings")
         ],
         [
           _("Reading global settings..."),
           _("Reading resources..."),
           _("Reading LVM configurations..."),
           _("Reading daemon status..."),
-          _("Read SuSEFirewall Settings"),
+          _("Read Firewall Settings"),
           _("Finished")
         ],
         ""
@@ -428,8 +427,8 @@
 
       Progress.NextStage
 
-      # read the SuSEfirewall2
-      SuSEFirewall.Read
+      # read the firewall
+      firewalld.read
 
       # Progress finished
       Progress.NextStage
@@ -653,14 +652,14 @@
           _("Write resources"),
           _("Write LVM configurations"),
           _("Set daemon status"),
-          _("Write the SuSEfirewall settings")
+          _("Write the firewall settings")
         ],
         [
           _("Writing global settings..."),
           _("Writing resources..."),
           _("Writing LVM configurations..."),
           _("Setting daemon status..."),
-          _("Writing the SuSEFirewall settings"),
+          _("Writing the Firewall settings"),
           _("Finished")
         ],
         ""
@@ -771,12 +770,13 @@
       finding_local("port")
 
       # DRBD only use TCP port
-      SuSEFirewallServices.SetNeededPortsAndProtocols(
-        "service:drbd",
-        { "tcp_ports" => @local_ports }
-      )
+      begin
+        Y2Firewall::Firewalld::Service.modify_ports(name: "drbd", tcp_ports: 
@local_ports)
+      rescue Y2Firewall::Firewalld::Service::NotFound
+        y2error("Firewalld 'drbd' service is not available.")
+      end
 
-      SuSEFirewall.Write
+      firewalld.write
 
       # Progress finished
       Progress.NextStage
@@ -798,6 +798,13 @@
     publish :variable => :global_error, :type => "string"
     publish :function => :Read, :type => "boolean ()"
     publish :function => :Write, :type => "boolean ()"
+
+  private
+
+    def firewalld
+      Y2Firewall:Firewalld.instance
+    end
+
   end
 
   Drbd = DrbdClass.new


Reply via email to