Hello community, here is the log from the commit of package yast2-rdp for openSUSE:Factory checked in at 2018-04-26 13:26:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-rdp (Old) and /work/SRC/openSUSE:Factory/.yast2-rdp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-rdp" Thu Apr 26 13:26:39 2018 rev:3 rq:595297 version:4.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-rdp/yast2-rdp.changes 2018-02-07 18:37:25.687383753 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-rdp.new/yast2-rdp.changes 2018-04-26 13:26:41.113020620 +0200 @@ -1,0 +2,6 @@ +Mon Mar 12 07:40:34 UTC 2018 - knut.anders...@suse.com + +- Use firewalld terminal server service definition (bsc#1079133). +- 4.0.1 + +------------------------------------------------------------------- Old: ---- yast2-rdp-4.0.0.tar.bz2 New: ---- yast2-rdp-4.0.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-rdp.spec ++++++ --- /var/tmp/diff_new_pack.r13Dhl/_old 2018-04-26 13:26:41.637001432 +0200 +++ /var/tmp/diff_new_pack.r13Dhl/_new 2018-04-26 13:26:41.641001285 +0200 @@ -17,7 +17,7 @@ Name: yast2-rdp -Version: 4.0.0 +Version: 4.0.1 Release: 0 Summary: Setup Remote Desktop Protocol service for remote administration License: GPL-2.0 @@ -32,6 +32,10 @@ BuildRequires: yast2-devtools BuildRequires: yast2-network BuildRequires: yast2-testsuite +# for install task +BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) +# for test:unit +BuildRequires: rubygem(%rb_default_ruby_abi:rspec) # SuSEFirewall2 replaced by firewalld (fate#323460) Requires: yast2 >= 4.0.39 Requires: yast2-ruby-bindings @@ -42,11 +46,13 @@ %prep %setup -n %{name}-%{version} +%check +rake test:unit + %build -%yast_build %install -%yast_install +rake install DESTDIR="%{buildroot}" %files %defattr(-,root,root) ++++++ yast2-rdp-4.0.0.tar.bz2 -> yast2-rdp-4.0.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/Makefile.cvs new/yast2-rdp-4.0.1/Makefile.cvs --- old/yast2-rdp-4.0.0/Makefile.cvs 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/Makefile.cvs 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -# -# Makefile.cvs -# -PREFIX = /usr - -LIB = $(shell y2tool get-lib) - -configure: all - ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB) - -all: - y2tool y2autoconf - y2tool y2automake - autoreconf --force --install - -install: configure - make - make install - -reconf: all - ./config.status --recheck - ./config.status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/README.md new/yast2-rdp-4.0.1/README.md --- old/yast2-rdp-4.0.0/README.md 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/README.md 2018-03-16 16:11:06.000000000 +0100 @@ -2,4 +2,6 @@ [![Travis Build](https://travis-ci.org/yast/yast-rdp.svg?branch=master)](https://travis-ci.org/yast/yast-rdp) [![Jenkins Build](http://img.shields.io/jenkins/s/https/ci.opensuse.org/yast-rdp-master.svg)](https://ci.opensuse.org/view/Yast/job/yast-rdp-master/) +[![Coverage +Status](https://coveralls.io/repos/github/yast/yast-rdp/badge.svg?branch=master)](https://coveralls.io/github/yast/yast-rdp?branch=master) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/configure.in.in new/yast2-rdp-4.0.1/configure.in.in --- old/yast2-rdp-4.0.0/configure.in.in 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/configure.in.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -## YCP module configure.in.in - -## Initialize -@YAST2-INIT-COMMON@ -@YAST2-INIT-YCP@ - -## some common checks -@YAST2-CHECKS-COMMON@ -@YAST2-CHECKS-YCP@ - -## and generate the output... -@YAST2-OUTPUT@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/doc/Makefile.am new/yast2-rdp-4.0.1/doc/Makefile.am --- old/yast2-rdp-4.0.0/doc/Makefile.am 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/doc/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -# Makefile.am for rdp/doc - -SUBDIRS = autodocs - -htmldir = $(docdir) - -doc_DATA = -html_DATA = - -EXTRA_DIST = $(doc_DATA) $(html_DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/doc/autodocs/Makefile.am new/yast2-rdp-4.0.1/doc/autodocs/Makefile.am --- old/yast2-rdp-4.0.0/doc/autodocs/Makefile.am 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/doc/autodocs/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -# Makefile.am for rdp/doc/autodocs - -include $(top_srcdir)/autodocs-ycp.ami diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/package/yast2-rdp.changes new/yast2-rdp-4.0.1/package/yast2-rdp.changes --- old/yast2-rdp-4.0.0/package/yast2-rdp.changes 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/package/yast2-rdp.changes 2018-03-16 16:11:06.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Mar 12 07:40:34 UTC 2018 - knut.anders...@suse.com + +- Use firewalld terminal server service definition (bsc#1079133). +- 4.0.1 + +------------------------------------------------------------------- Mon Feb 5 14:07:24 UTC 2018 - knut.anders...@suse.com - Replace SuSEFirewall2 by firewalld (fate#323460) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/package/yast2-rdp.spec new/yast2-rdp-4.0.1/package/yast2-rdp.spec --- old/yast2-rdp-4.0.0/package/yast2-rdp.spec 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/package/yast2-rdp.spec 2018-03-16 16:11:06.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2-rdp -Version: 4.0.0 +Version: 4.0.1 Release: 0 License: GPL-2.0 Group: System/YaST @@ -28,6 +28,10 @@ BuildRequires: yast2 >= 4.0.39 BuildRequires: perl-XML-Writer update-desktop-files yast2-testsuite yast2-network BuildRequires: yast2-devtools +# for install task +BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) +# for test:unit +BuildRequires: rubygem(%rb_default_ruby_abi:rspec) # SuSEFirewall2 replaced by firewalld (fate#323460) Requires: yast2 >= 4.0.39 Requires: yast2-ruby-bindings @@ -38,11 +42,13 @@ %prep %setup -n %{name}-%{version} +%check +rake test:unit + %build -%yast_build %install -%yast_install +rake install DESTDIR="%{buildroot}" %files %defattr(-,root,root) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/src/Makefile.am new/yast2-rdp-4.0.1/src/Makefile.am --- old/yast2-rdp-4.0.0/src/Makefile.am 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/src/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -# Sources for rdp - -module_DATA = \ - modules/RDP.rb - -client_DATA = \ - clients/rdp_proposal.rb \ - clients/rdp.rb - -yncludedir = @yncludedir@/rdp -ynclude_DATA = \ - include/rdp/dialogs.rb - -desktop_DATA = \ - desktop/rdp.desktop - -EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(desktop_DATA) - -include $(top_srcdir)/Makefile.am.common \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/src/modules/RDP.rb new/yast2-rdp-4.0.1/src/modules/RDP.rb --- old/yast2-rdp-4.0.0/src/modules/RDP.rb 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/src/modules/RDP.rb 2018-03-16 16:11:06.000000000 +0100 @@ -13,6 +13,8 @@ module Yast class RDPClass < Module FW_ZONES = ["public", "external", "internal", "work", "home", "trusted"].freeze + # Use firewalld remote desktop service + FW_SERVICE = "ms-wbt".freeze def main Yast.import "UI" textdomain "rdp" @@ -81,10 +83,8 @@ Builtins.y2milestone("xrdp: %1", xrdp) @allow_administration = xrdp - current_progress = Progress.set(false) firewalld.read - Progress.set(current_progress) - @open_fw_port = firewalld.zones.any? { |z| z.services.include?("xrdp") } + @open_fw_port = firewalld.zones.any? { |z| z.services.include?(FW_SERVICE) } true end @@ -113,7 +113,7 @@ Progress.New(caption, " ", Builtins.size(steps), steps, [], "") ProgressNextStage(_("Writing firewall settings...")) - write_firewall_setting + write_firewall_settings Builtins.sleep(sl) ProgressNextStage(_("Configuring xrdp...")) @@ -163,15 +163,15 @@ # Modify the firewall modifications if it is installed and the zones are # available - def write_firewall_setting + def write_firewall_settings return unless firewalld.installed? FW_ZONES.each do |name| - zone = firewall.find_zone(name) + zone = firewalld.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") + @open_fw_port ? zone.add_service(FW_SERVICE) : zone.remove_service(FW_SERVICE) end firewalld.write end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/test/rdp_test.rb new/yast2-rdp-4.0.1/test/rdp_test.rb --- old/yast2-rdp-4.0.0/test/rdp_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/test/rdp_test.rb 2018-03-16 16:11:06.000000000 +0100 @@ -0,0 +1,67 @@ +require_relative "test_helper" +require "y2firewall/firewalld" + +Yast.import "RDP" + +describe "Yast::RDP" do + subject { Yast::RDP } + let(:firewalld) { Y2Firewall::Firewalld.instance } + let(:firewalld_installed) { false } + let(:zones) { Yast::RDPClass::FW_ZONES.map { |z| Y2Firewall::Firewalld::Zone.new(name: z) } } + + before do + allow(subject).to receive(:firewalld).and_return(firewalld) + allow(firewalld).to receive(:installed?).and_return(firewalld_installed) + allow(firewalld).to receive(:write) + allow(firewalld).to receive(:zones).and_return(zones) + zones.each do |z| + allow(z).to receive(:add_service).with(Yast::RDPClass::FW_SERVICE) + allow(z).to receive(:remove_service).with(Yast::RDPClass::FW_SERVICE) + end + end + + describe "#write_firewall_settings" do + context "when the firewall is not installed" do + it "returns nil" do + expect(firewalld).to_not receive(:write) + + expect(subject.write_firewall_settings).to eq(nil) + end + end + + context "when the firewall is installed" do + let(:firewalld_installed) { true } + + context "and the service is set to be opened" do + it "opens the service in all the zones" do + subject.open_fw_port = true + zones.each do |zone| + expect(zone).to receive(:add_service).with(Yast::RDPClass::FW_SERVICE) + end + expect(subject.write_firewall_settings) + end + it "writes the modifed configuration" do + expect(firewalld).to receive(:write) + + subject.write_firewall_settings + end + end + + context "and the service is not set to be opened" do + it "removes the service from all the zones" do + subject.open_fw_port = false + zones.each do |zone| + expect(zone).to receive(:remove_service).with(Yast::RDPClass::FW_SERVICE) + end + expect(subject.write_firewall_settings) + end + + it "writes the modifed configuration" do + expect(firewalld).to receive(:write) + + subject.write_firewall_settings + end + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/test/test_helper.rb new/yast2-rdp-4.0.1/test/test_helper.rb --- old/yast2-rdp-4.0.0/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/test/test_helper.rb 2018-03-16 16:11:06.000000000 +0100 @@ -0,0 +1,46 @@ +# encoding: utf-8 + +# ------------------------------------------------------------------------------ +# Copyright (c) 2018 SUSE LLC +# +# +# 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 SUSE. +# +# To contact SUSE about this file by physical or electronic mail, you may find +# current contact information at www.suse.com. +# ------------------------------------------------------------------------------ + +# Set the paths +src_path = File.expand_path("../../src", __FILE__) +ENV["Y2DIR"] = src_path + +require "yast" +require "yast/rspec" + +if ENV["COVERAGE"] + require "simplecov" + SimpleCov.start do + add_filter "/test/" + end + + # for coverage we need to load all ruby files + Dir["#{src_path}/{modules,lib}/**/*.rb"].each { |f| require_relative f } + + # use coveralls for on-line code coverage reporting at Travis CI + if ENV["TRAVIS"] + require "coveralls" + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter + ] + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/testsuite/Makefile.am new/yast2-rdp-4.0.1/testsuite/Makefile.am --- old/yast2-rdp-4.0.0/testsuite/Makefile.am 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/testsuite/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -# -# Makefile.am for .../testsuite -# -# Do not edit this file (Makefile.am) as it will be overwritten! -# - -AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb) - -testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite - -all-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) - -clean-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean - -check-local: $(testsuite_prepare) - make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check - -# EOF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/testsuite/tests/Rdp.out new/yast2-rdp-4.0.1/testsuite/tests/Rdp.out --- old/yast2-rdp-4.0.0/testsuite/tests/Rdp.out 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/testsuite/tests/Rdp.out 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Dump RDP::Modified diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-rdp-4.0.0/testsuite/tests/Rdp.rb new/yast2-rdp-4.0.1/testsuite/tests/Rdp.rb --- old/yast2-rdp-4.0.0/testsuite/tests/Rdp.rb 2018-02-07 14:27:00.000000000 +0100 +++ new/yast2-rdp-4.0.1/testsuite/tests/Rdp.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -# encoding: utf-8 - -module Yast - class RdpClient < Client - def main - # testedfiles: RDP.ycp - - Yast.include self, "testsuite.rb" - TESTSUITE_INIT([], nil) - - Yast.import "RDP" - - DUMP("RDP::Modified") - #TEST(``(RDP::Modified()), [], nil); - - nil - end - end -end - -Yast::RdpClient.new.main