Hello community, here is the log from the commit of package yast2-instserver for openSUSE:Factory checked in at 2018-02-09 15:51:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-instserver (Old) and /work/SRC/openSUSE:Factory/.yast2-instserver.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-instserver" Fri Feb 9 15:51:23 2018 rev:51 rq:574255 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-instserver/yast2-instserver.changes 2018-02-06 16:49:10.352016767 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-instserver.new/yast2-instserver.changes 2018-02-09 15:51:26.430999355 +0100 @@ -1,0 +2,7 @@ +Thu Feb 8 11:54:52 UTC 2018 - [email protected] + +- Drop xinetd configuration and use systemd sockets instead. + (fate#323373) +- 4.0.2 + +------------------------------------------------------------------- Old: ---- yast2-instserver-4.0.1.tar.bz2 New: ---- yast2-instserver-4.0.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-instserver.spec ++++++ --- /var/tmp/diff_new_pack.UyMkGf/_old 2018-02-09 15:51:26.994979099 +0100 +++ /var/tmp/diff_new_pack.UyMkGf/_new 2018-02-09 15:51:26.994979099 +0100 @@ -17,7 +17,7 @@ Name: yast2-instserver -Version: 4.0.1 +Version: 4.0.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-instserver-4.0.1.tar.bz2 -> yast2-instserver-4.0.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-instserver-4.0.1/package/yast2-instserver.changes new/yast2-instserver-4.0.2/package/yast2-instserver.changes --- old/yast2-instserver-4.0.1/package/yast2-instserver.changes 2018-02-05 15:00:46.000000000 +0100 +++ new/yast2-instserver-4.0.2/package/yast2-instserver.changes 2018-02-08 14:54:20.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Feb 8 11:54:52 UTC 2018 - [email protected] + +- Drop xinetd configuration and use systemd sockets instead. + (fate#323373) +- 4.0.2 + +------------------------------------------------------------------- Mon Feb 5 13:39:28 UTC 2018 - [email protected] - Replace SuSEFirewall2 by firewalld (fate#323460) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-instserver-4.0.1/package/yast2-instserver.spec new/yast2-instserver-4.0.2/package/yast2-instserver.spec --- old/yast2-instserver-4.0.1/package/yast2-instserver.spec 2018-02-05 15:00:46.000000000 +0100 +++ new/yast2-instserver-4.0.2/package/yast2-instserver.spec 2018-02-08 14:54:20.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-instserver -Version: 4.0.1 +Version: 4.0.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-instserver-4.0.1/src/modules/Instserver.rb new/yast2-instserver-4.0.2/src/modules/Instserver.rb --- old/yast2-instserver-4.0.1/src/modules/Instserver.rb 2018-02-05 15:00:46.000000000 +0100 +++ new/yast2-instserver-4.0.2/src/modules/Instserver.rb 2018-02-08 14:54:20.000000000 +0100 @@ -23,6 +23,7 @@ Yast.import "Package" Yast.import "Call" Yast.import "Service" + Yast.import "SystemdSocket" Yast.import "IP" Yast.import "Message" Yast.import "String" @@ -311,7 +312,7 @@ "The FTP installation server requires an FTP server package. The vsftpd package\nwill now be installed.\n" ) if !Package.InstalledAll( - ["xinetd", "vsftpd", "openslp-server", "yast2-inetd"] + ["vsftpd", "openslp-server"] ) Builtins.y2milestone("some packages are not installed") else @@ -319,7 +320,7 @@ end if !Package.InstallAll( - ["xinetd", "vsftpd", "openslp-server", "yast2-inetd"] + ["vsftpd", "openslp-server"] ) Report.Error(Message.CannotContinueWithoutPackagesInstalled) Builtins.y2error("Error while installing packages") @@ -370,60 +371,10 @@ else Service.Start("vsftpd") end - else - Builtins.y2milestone("Configuring FTP service in xinetd mode") - # read the current configuration - resource = Convert.to_map(ReadServiceSettings("inetd_auto")) - netdconf = [] - - # replace vsftpd config - ftpdenabled = false - servicefound = false - Builtins.foreach(Ops.get_list(resource, "netd_conf", [])) do |conf| - # the service is ftp with vsftpd server - if Ops.get_string(conf, "service", "") == "ftp" && - Ops.get_string(conf, "script", "") == "vsftpd" - servicefound = true - - # enable disabled service - if Ops.get_boolean(conf, "enabled", false) != true - Ops.set(conf, "enabled", true) - else - ftpdenabled = true - end - end - # add the configuration to the list - netdconf = Builtins.add(netdconf, conf) - end - - - if servicefound == false - # the FTP service config was not found, add it - vsftpdconf = { - "protocol" => "tcp", - "script" => "vsftpd", - "server" => "/usr/sbin/vsftpd", - "service" => "ftp" - } - netdconf = Builtins.add(netdconf, vsftpdconf) - end - - # ftp service was not enabled/configured - if ftpdenabled == false - # update the configuration - Ops.set(resource, "netd_conf", netdconf) - - # write the configuration - ConfigureService("inetd_auto", resource) - end - - # enable/start the service - Service.Enable("xinetd") - if Service.Status("xinetd") == 0 - Service.Reload("xinetd") - else - Service.Start("xinetd") - end + elsif socket + Builtins.y2milestone("Enabling vsftpd socket") + socket.enable unless socket.enabled? + socket.start unless socket.listening? end firewalld.write @@ -1079,37 +1030,7 @@ return ret2 end - # read the current configuration - resource = Convert.to_map(ReadServiceSettings("inetd_auto")) - - # check vsftpd config - ftpdenabled = false - servicefound = false - - Builtins.foreach(Ops.get_list(resource, "netd_conf", [])) do |conf| - # the service is ftp with vsftpd server - if Ops.get_string(conf, "service", "") == "ftp" && - Ops.get_string(conf, "script", "") == "vsftpd" - servicefound = true - # the default is true: missing tag means the service is enabled (!) - ftpdenabled = Ops.get_boolean(conf, "enabled", true) - end - end - - - Builtins.y2milestone( - "FTP service check: found: %1, enabled: %2", - servicefound, - ftpdenabled - ) - - return false if servicefound == false || ftpdenabled == false - - # is the service running? - ret = Service.Status("xinetd") == 0 - Builtins.y2milestone("FTP server running: %1", ret) - - ret + socket && socket.listening? end def HTTPValid(config) @@ -1477,6 +1398,11 @@ nil end + # Convenience method for optaining the vsftpd systemd socket + def socket + Yast::SystemdSocket.find("vsftpd.socket") + end + publish :variable => :is_service_pack, :type => "boolean" publish :variable => :test, :type => "boolean" publish :variable => :Config, :type => "map <string, any>"
