Hello community, here is the log from the commit of package yast2-ftp-server for openSUSE:Factory checked in at 2016-09-21 18:49:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-ftp-server (Old) and /work/SRC/openSUSE:Factory/.yast2-ftp-server.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ftp-server" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-ftp-server/yast2-ftp-server.changes 2016-06-07 23:50:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-ftp-server.new/yast2-ftp-server.changes 2016-09-21 18:50:01.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Sep 20 10:40:22 UTC 2016 - [email protected] + +- reduce rpm build time (bsc#999203) +- 3.1.10 + +------------------------------------------------------------------- Old: ---- yast2-ftp-server-3.1.9.tar.bz2 New: ---- yast2-ftp-server-3.1.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ftp-server.spec ++++++ --- /var/tmp/diff_new_pack.Mrj5UC/_old 2016-09-21 18:50:03.000000000 +0200 +++ /var/tmp/diff_new_pack.Mrj5UC/_new 2016-09-21 18:50:03.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-ftp-server -Version: 3.1.9 +Version: 3.1.10 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -26,12 +26,11 @@ # Wizard::SetDesktopTitleAndIcon Requires: yast2 >= 2.21.22 Requires: yast2-inetd -BuildRequires: perl-XML-Writer BuildRequires: update-desktop-files BuildRequires: yast2 BuildRequires: yast2-devtools >= 3.1.10 -BuildRequires: yast2-inetd -BuildRequires: yast2-testsuite +BuildRequires: rubygem(%rb_default_ruby_abi:rspec) +BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) BuildArch: noarch @@ -48,11 +47,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-ftp-server-3.1.9.tar.bz2 -> yast2-ftp-server-3.1.10.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/.travis.yml new/yast2-ftp-server-3.1.10/.travis.yml --- old/yast2-ftp-server-3.1.9/.travis.yml 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/.travis.yml 2016-09-20 13:06:29.000000000 +0200 @@ -5,12 +5,10 @@ # disable rvm, use system Ruby - rvm reset - wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh - - sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 yast2-inetd ruby-rspec" -g "yast-rake gettext" + - sh ./travis_setup.sh -p "rake yast2-devtools yast2 ruby-rspec" -g "yast-rake gettext" script: - rake check:syntax - rake check:pot - - make -f Makefile.cvs - - make - - sudo make install - - make check + - rake test:unit + - sudo rake install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/CONTRIBUTING.md new/yast2-ftp-server-3.1.10/CONTRIBUTING.md --- old/yast2-ftp-server-3.1.9/CONTRIBUTING.md 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/CONTRIBUTING.md 2016-09-20 13:06:29.000000000 +0200 @@ -3,7 +3,7 @@ YaST is an open source project and as such it welcomes all kinds of contributions. If you decide to contribute, please follow these guidelines to -ensure the process is effective and pleasant both for you and YaST maintainers. +ensure the process is effective and pleasant both for you and the YaST maintainers. There are two main forms of contribution: reporting bugs and performing code changes. @@ -17,13 +17,11 @@ registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp) if you don't have an account yet.) -If you find a problem, please report it either using -[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee -that every bug will be fixed, but we'll try. - When creating a bug report, please follow our [bug reporting guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug). +We can't guarantee that every bug will be fixed, but we'll try. + Code Changes ------------ @@ -44,15 +42,22 @@ to the [Ruby style guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md). - 4. Make sure your change didn't break anything by building the RPM package + 4. Update the package version (in `packages/*.spec`, usually by + `rake version:bump`) and add a new entry to the `package/*.changes` file + (by `osc vc package`). + For bigger changes or changes which need longer discussion it is advised to + add this as a separate last commit so it can be easily updated when another + change is merged in the meantime. + + 5. Make sure your change didn't break anything by building the RPM package (`rake osc:build`). The build process includes running the full testsuite. - 5. Publish the branch and create a pull request. + 6. Publish the branch and create a pull request. - 6. YaST developers will review your change and possibly point out issues. + 7. YaST developers will review your change and possibly point out issues. Adapt the code under their guidance until they are all resolved. - 7. Finally, the pull request will get merged or rejected. + 8. Finally, the pull request will get merged or rejected. See also [GitHub's guide on contributing](https://help.github.com/articles/fork-a-repo). @@ -60,9 +65,6 @@ If you want to do multiple unrelated changes, use separate branches and pull requests. -Do not change the `VERSION` and `*.changes` files as this could lead to -conflicts. - ### Commits Each commit in the pull request should do only one thing, which is clearly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/Makefile.cvs new/yast2-ftp-server-3.1.10/Makefile.cvs --- old/yast2-ftp-server-3.1.9/Makefile.cvs 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/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-ftp-server-3.1.9/configure.in.in new/yast2-ftp-server-3.1.10/configure.in.in --- old/yast2-ftp-server-3.1.9/configure.in.in 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/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-ftp-server-3.1.9/package/yast2-ftp-server.changes new/yast2-ftp-server-3.1.10/package/yast2-ftp-server.changes --- old/yast2-ftp-server-3.1.9/package/yast2-ftp-server.changes 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/package/yast2-ftp-server.changes 2016-09-20 13:06:29.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Sep 20 10:40:22 UTC 2016 - [email protected] + +- reduce rpm build time (bsc#999203) +- 3.1.10 + +------------------------------------------------------------------- Tue Jun 7 11:24:46 UTC 2016 - [email protected] - Stop generating autodocs (fate#320356) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/package/yast2-ftp-server.spec new/yast2-ftp-server-3.1.10/package/yast2-ftp-server.spec --- old/yast2-ftp-server-3.1.9/package/yast2-ftp-server.spec 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/package/yast2-ftp-server.spec 2016-09-20 13:06:29.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package yast2-ftp-server # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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,25 +17,28 @@ Name: yast2-ftp-server -Version: 3.1.9 +Version: 3.1.10 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 -Group: System/YaST -License: GPL-2.0 # Wizard::SetDesktopTitleAndIcon Requires: yast2 >= 2.21.22 -Requires: yast2-inetd -BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-testsuite yast2-inetd +Requires: yast2-inetd +BuildRequires: update-desktop-files +BuildRequires: yast2 BuildRequires: yast2-devtools >= 3.1.10 +BuildRequires: rubygem(%rb_default_ruby_abi:rspec) +BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) -BuildArchitectures: noarch +BuildArch: noarch Requires: yast2-ruby-bindings >= 1.0.0 -Summary: YaST2 - FTP configuration +Summary: YaST2 - FTP configuration +License: GPL-2.0 +Group: System/YaST %description This package contains the YaST2 component for FTP configuration. It can @@ -44,12 +47,13 @@ %prep %setup -n %{name}-%{version} +%check +rake test:unit + %build -%yast_build %install -%yast_install - +rake install DESTDIR="%{buildroot}" %files %defattr(-,root,root) @@ -62,3 +66,5 @@ %{yast_schemadir}/autoyast/rnc/ftp-server.rnc %{yast_scrconfdir}/*.scr %doc %{yast_docdir} + +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/src/Makefile.am new/yast2-ftp-server-3.1.10/src/Makefile.am --- old/yast2-ftp-server-3.1.9/src/Makefile.am 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/src/Makefile.am 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -# Sources for ftp-server - -module_DATA = \ - modules/FtpServer.rb - -client_DATA = \ - clients/ftp-server_auto.rb \ - clients/ftp-server.rb - -yncludedir = @yncludedir@/ftp-server -ynclude_DATA = \ - include/ftp-server/wid_functions.rb \ - include/ftp-server/wizards.rb \ - include/ftp-server/dialogs.rb \ - include/ftp-server/write_load.rb \ - include/ftp-server/complex.rb \ - include/ftp-server/helps.rb - -scrconf_DATA = \ - scrconf/pure-ftpd.scr \ - scrconf/vsftpd.scr - -schemafilesdir = $(schemadir)/autoyast/rnc -schemafiles_DATA = \ - autoyast-rnc/ftp-server.rnc - -desktop_DATA = \ - desktop/ftp-server.desktop - -EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) $(schemafiles_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-ftp-server-3.1.9/test/ftpserver_test.rb new/yast2-ftp-server-3.1.10/test/ftpserver_test.rb --- old/yast2-ftp-server-3.1.9/test/ftpserver_test.rb 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/test/ftpserver_test.rb 2016-09-20 13:06:29.000000000 +0200 @@ -4,6 +4,14 @@ require "yast" +# stub module to prevent its Import +# Useful for modules from different yast packages, to avoid build dependencies +def stub_module(name) + Yast.const_set name.to_sym, Class.new { def self.fake_method; end } +end + +stub_module("Users") + Yast.import "FtpServer" VS_CONFIG_PATH = Yast::Path.new(".vsftpd") @@ -67,30 +75,60 @@ } describe "Yast::FtpServer" do + describe ".Modified" do + it "returns false if no modification happens" do + expect(Yast::FtpServer.Modified).to eq false + end + end + + describe ".GetPassivePortRangeBoundaries" do + it "can read boundaries when separated by colon" do + Yast::FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024:4201" } + + expected_boundaries = ["1024", "4201"] + + expect(Yast::FtpServer.GetPassivePortRangeBoundaries).to eq expected_boundaries + end + + it "can read boundaries when separated by whitespace" do + Yast::FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024 \t 4201" } + + expected_boundaries = ["1024", "4201"] + + expect(Yast::FtpServer.GetPassivePortRangeBoundaries).to eq expected_boundaries + end + + it "returns nil if boundaries is spearated by invalid delimeter" do + Yast::FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024::4201" } + + expect(Yast::FtpServer.GetPassivePortRangeBoundaries).to eq nil + end + end + describe ".ValueUI" do context "'VerboseLogging' when getting vsftpd settings" do before do Yast::FtpServer.vsftpd_edit = true end - + it "returns default value 'YES' if 'log_ftp_protocol' missing in config file" do mock_config(VS_CONFIG_PATH, VS_SETTINGS) Yast::FtpServer.ReadVSFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "YES" end - + it "returns value from config file 'NO' if 'log_ftp_protocol = NO' in config file" do mock_config(VS_CONFIG_PATH, VS_SETTINGS.merge("log_ftp_protocol" => "NO")) Yast::FtpServer.ReadVSFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "NO" end it "returns value from config file 'YES' if 'log_ftp_protocol = YES' in config file" do mock_config(VS_CONFIG_PATH, VS_SETTINGS.merge("log_ftp_protocol" => "YES")) Yast::FtpServer.ReadVSFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "YES" end end @@ -99,25 +137,25 @@ before do Yast::FtpServer.vsftpd_edit = false end - + it "returns default value 'NO' if config file empty" do mock_config(PURE_CONFIG_PATH, {}) Yast::FtpServer.ReadPUREFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "NO" end it "returns value from config file 'NO' if 'VerboseLog = no' in config file" do mock_config(PURE_CONFIG_PATH, PURE_SETTINGS) Yast::FtpServer.ReadPUREFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "NO" end - + it "returns value from config file 'YES' if 'VerboseLog = yes' in config file" do mock_config(PURE_CONFIG_PATH, PURE_SETTINGS.merge("VerboseLog" => "YES")) Yast::FtpServer.ReadPUREFTPDSettings() - + expect(Yast::FtpServer.ValueUI("VerboseLogging", false)).to eql "YES" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/testsuite/Makefile.am new/yast2-ftp-server-3.1.10/testsuite/Makefile.am --- old/yast2-ftp-server-3.1.9/testsuite/Makefile.am 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/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-ftp-server-3.1.9/testsuite/tests/FtpServer.out new/yast2-ftp-server-3.1.10/testsuite/tests/FtpServer.out --- old/yast2-ftp-server-3.1.9/testsuite/tests/FtpServer.out 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/testsuite/tests/FtpServer.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -Dump FtpServer::Modified -Return false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/testsuite/tests/FtpServer.rb new/yast2-ftp-server-3.1.10/testsuite/tests/FtpServer.rb --- old/yast2-ftp-server-3.1.9/testsuite/tests/FtpServer.rb 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/testsuite/tests/FtpServer.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -# encoding: utf-8 - -module Yast - class FtpServerClient < Client - def main - # testedfiles: FtpServer.ycp - - Yast.include self, "testsuite.rb" - TESTSUITE_INIT([], nil) - - Yast.import "FtpServer" - - DUMP("FtpServer::Modified") - TEST(lambda { FtpServer.Modified }, [], nil) - - nil - end - end -end - -Yast::FtpServerClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ftp-server-3.1.9/testsuite/tests/PassivePortRange.rb new/yast2-ftp-server-3.1.10/testsuite/tests/PassivePortRange.rb --- old/yast2-ftp-server-3.1.9/testsuite/tests/PassivePortRange.rb 2016-06-07 14:11:46.000000000 +0200 +++ new/yast2-ftp-server-3.1.10/testsuite/tests/PassivePortRange.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -# encoding: utf-8 - -module Yast - class PassivePortRangeClient < Client - def main - Yast.import "Assert" - Yast.import "FtpServer" - - # colon as delimiter - FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024:4201" } - - @expected_boundaries = ["1024", "4201"] - - Assert.Equal( - @expected_boundaries, - FtpServer.GetPassivePortRangeBoundaries - ) - - # at least one whitespace as delimiter - FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024 \t 4201" } - - Assert.Equal( - @expected_boundaries, - FtpServer.GetPassivePortRangeBoundaries - ) - - # invalid delimiter - FtpServer.PURE_SETTINGS = { "PassivePortRange" => "1024::4201" } - - Assert.Equal(nil, FtpServer.GetPassivePortRangeBoundaries) - - nil - end - end -end - -Yast::PassivePortRangeClient.new.main
