Hello community, here is the log from the commit of package autoyast2 for openSUSE:Leap:15.2 checked in at 2020-05-12 11:31:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/autoyast2 (Old) and /work/SRC/openSUSE:Leap:15.2/.autoyast2.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2" Tue May 12 11:31:46 2020 rev:142 rq:801267 version:4.2.35 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/autoyast2/autoyast2.changes 2020-04-08 12:47:50.966326304 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.autoyast2.new.2738/autoyast2.changes 2020-05-12 11:32:03.615701499 +0200 @@ -1,0 +2,9 @@ +Wed May 6 08:47:13 UTC 2020 - Knut Anderssen <[email protected]> + +- ayast_setup: Do not add a 'networking' section to the profile + when it is not defined explicitly as it is not needed anymore + since keeping the configured network is the default option during + autoconfiguration (bsc#1170821) +- 4.2.35 + +------------------------------------------------------------------- Old: ---- autoyast2-4.2.34.tar.bz2 New: ---- autoyast2-4.2.35.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.GZREq2/_old 2020-05-12 11:32:04.039702390 +0200 +++ /var/tmp/diff_new_pack.GZREq2/_new 2020-05-12 11:32:04.039702390 +0200 @@ -1,7 +1,7 @@ # # spec file for package autoyast2 # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -22,12 +22,12 @@ %endif Name: autoyast2 -Version: 4.2.34 +Version: 4.2.35 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only Group: System/YaST -Url: https://github.com/yast/yast-autoinstallation +URL: https://github.com/yast/yast-autoinstallation Source0: autoyast2-%{version}.tar.bz2 Source1: autoyast_en_html.tar.bz2 ++++++ autoyast2-4.2.34.tar.bz2 -> autoyast2-4.2.35.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/CONTRIBUTING.md new/autoyast2-4.2.35/CONTRIBUTING.md --- old/autoyast2-4.2.34/CONTRIBUTING.md 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,89 +0,0 @@ -YaST Contribution Guidelines -============================ - -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 the YaST maintainers. - -There are two main forms of contribution: reporting bugs and performing code -changes. - -Bug Reports ------------ - -If you find a problem, please report it either using -[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2) -or [GitHub issues](../../issues). (For Bugzilla, use the [simplified -registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp) -if you don't have an account yet.) - -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 ------------- - -We welcome all kinds of code contributions, from simple bug fixes to significant -refactorings and implementation of new features. However, before making any -non-trivial contribution, get in touch with us first — this can prevent wasted -effort on both sides. Also, have a look at our [development -documentation](http://en.opensuse.org/openSUSE:YaST_development). - -To send us your code change, use GitHub pull requests. The workflow is as -follows: - - 1. Fork the project. - - 2. Create a topic branch based on `master`. - - 3. Implement your change, including tests (if possible). Make sure you adhere - to the [Ruby style - guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md). - - 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. - - 6. Publish the branch and create a pull request. - - 7. YaST developers will review your change and possibly point out issues. - Adapt the code under their guidance until they are all resolved. - - 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). - -If you want to do multiple unrelated changes, use separate branches and pull -requests. - -### Commits - -Each commit in the pull request should do only one thing, which is clearly -described by its commit message. Especially avoid mixing formatting changes and -functional changes into one commit. When writing commit messages, adhere to -[widely used -conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). - -If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure -you mention it in the commit message for cross-reference. Use format like -bnc#775814 or gh#yast/yast-foo#42. See also [GitHub -autolinking](https://help.github.com/articles/github-flavored-markdown#references) -and [openSUSE abbreviation -reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations). - -Additional Information ----------------------- - -If you have any question, feel free to ask at the [development mailing -list](http://lists.opensuse.org/yast-devel/) or at the -[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode. -We'll do our best to provide a timely and accurate answer. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/Dockerfile new/autoyast2-4.2.35/Dockerfile --- old/autoyast2-4.2.34/Dockerfile 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/Dockerfile 2020-05-06 12:00:54.000000000 +0200 @@ -1,4 +1,4 @@ -FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest +FROM registry.opensuse.org/yast/sle-15/sp2/containers/yast-ruby RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ trang \ libxml2-tools \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/Rakefile new/autoyast2-4.2.35/Rakefile --- old/autoyast2-4.2.34/Rakefile 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/Rakefile 2020-05-06 12:00:54.000000000 +0200 @@ -1,5 +1,7 @@ require "yast/rake" +Yast::Tasks.submit_to :sle15sp2 + AUTOINST_DIR = Packaging::Configuration::DESTDIR + "/usr/share/autoinstall/" Yast::Tasks.configuration do |conf| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/package/autoyast2.changes new/autoyast2-4.2.35/package/autoyast2.changes --- old/autoyast2-4.2.34/package/autoyast2.changes 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/package/autoyast2.changes 2020-05-06 12:00:54.000000000 +0200 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Wed May 6 08:47:13 UTC 2020 - Knut Anderssen <[email protected]> + +- ayast_setup: Do not add a 'networking' section to the profile + when it is not defined explicitly as it is not needed anymore + since keeping the configured network is the default option during + autoconfiguration (bsc#1170821) +- 4.2.35 + +------------------------------------------------------------------- Tue Apr 1 11:51:35 UTC 2020 - [email protected] - Service for init scripts: Try to start "network-online.target" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/package/autoyast2.spec new/autoyast2-4.2.35/package/autoyast2.spec --- old/autoyast2-4.2.34/package/autoyast2.spec 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/package/autoyast2.spec 2020-05-06 12:00:54.000000000 +0200 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.2.34 +Version: 4.2.35 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/src/lib/autoinstall/clients/ayast_setup.rb new/autoyast2-4.2.35/src/lib/autoinstall/clients/ayast_setup.rb --- old/autoyast2-4.2.34/src/lib/autoinstall/clients/ayast_setup.rb 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/src/lib/autoinstall/clients/ayast_setup.rb 2020-05-06 12:00:54.000000000 +0200 @@ -34,6 +34,8 @@ module Clients module AyastSetup include Yast::Logger + include Yast::I18n + Ops = Yast::Ops SCR = Yast::SCR WFM = Yast::WFM @@ -57,6 +59,7 @@ ["software", "post-packages"], [] ) + postPackages = Builtins.filter(postPackages) do |p| !Yast::PackageSystem.Installed(p) end @@ -68,27 +71,13 @@ [] ) - # the following is needed since 10.3 - # otherwise the already configured network gets removed - if !Builtins.haskey(Profile.current, "networking") - Profile.current = Builtins.add( - Profile.current, - "networking", - "keep_install_network" => true - ) - end - if @dopackages Yast::Pkg.TargetInit("/", false) WFM.CallFunction("inst_rpmcopy", []) end WFM.CallFunction("inst_autoconfigure", []) - # Restarting autoyast-initscripts.service in order to run - # init-scripts in the installed system. - cmd = "systemctl restart autoyast-initscripts.service" - ret = SCR.Execute(path(".target.bash_output"), cmd) - log.info "command \"#{cmd}\" returned #{ret}" + restart_initscripts nil end @@ -119,6 +108,16 @@ Setup() true end + + private + + def restart_initscripts + # Restarting autoyast-initscripts.service in order to run + # init-scripts in the installed system. + cmd = "systemctl restart autoyast-initscripts.service" + ret = SCR.Execute(path(".target.bash_output"), cmd) + log.info "command \"#{cmd}\" returned #{ret}" + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.2.34/test/lib/clients/ayast_setup_test.rb new/autoyast2-4.2.35/test/lib/clients/ayast_setup_test.rb --- old/autoyast2-4.2.34/test/lib/clients/ayast_setup_test.rb 2020-04-01 16:20:29.000000000 +0200 +++ new/autoyast2-4.2.35/test/lib/clients/ayast_setup_test.rb 2020-05-06 12:00:54.000000000 +0200 @@ -21,7 +21,23 @@ require_relative "../../test_helper" require "autoinstall/clients/ayast_setup" -describe Y2Autoinstall::Clients::AyastSetup do +require "yast" + +module Yast + class DummyClient < Module + include Y2Autoinstall::Clients::AyastSetup + attr_accessor :dopackages + end +end + +Yast.import "Profile" + +describe "Y2Autoinstall::Clients::AyastSetup" do + let(:subject) { Yast::DummyClient.new } + let(:profile) { { "software" => { "post-packages" => packages } } } + let(:packages) { ["vim"] } + let(:dopackages) { false } + let(:client) do instance_double(Y2Autoinstall::Clients::AyastSetup, Setup: true) end @@ -31,4 +47,68 @@ expect(client.Setup).to eq true end end + + describe "#Setup" do + before do + Yast::Profile.current = profile + allow(Yast::AutoInstall).to receive(:Save) + allow(Yast::WFM).to receive(:CallFunction) + allow(Yast::Mode).to receive(:SetMode) + allow(Yast::Stage).to receive(:Set) + allow(Yast::PackageSystem).to receive(:Installed).and_return(true) + allow(Yast::Pkg).to receive(:TargetInit) + allow(subject).to receive(:restart_initscripts) + subject.dopackages = dopackages + end + + it "saves the current profile if modified" do + expect(Yast::AutoInstall).to receive(:Save) + + subject.Setup + end + + it "calls the inst_autopost client" do + expect(Yast::WFM).to receive(:CallFunction).with("inst_autopost", []) + + subject.Setup + end + + context "when dopackages is enabled" do + let(:dopackages) { true } + + it "installs given post installation packages / patterns when not installed yet" do + expect(Yast::PackageSystem).to receive(:Installed).and_return(false) + expect(Yast::AutoinstSoftware).to receive(:addPostPackages).with(["vim"]) + expect(Yast::WFM).to receive(:CallFunction).with("inst_rpmcopy", []) + + subject.Setup + end + end + + context "when dopackages is disabled" do + it "does not try to install given post installation packages / patterns" do + expect(Yast::WFM).to_not receive(:CallFunction).with("inst_rpmcopy", []) + + subject.Setup + end + end + + it "runs inst_autoconfigure client" do + expect(Yast::WFM).to receive(:CallFunction).with("inst_autoconfigure", []) + + subject.Setup + end + + it "restarts AutoYaST initscripts" do + expect(subject).to receive(:restart_initscripts) + + subject.Setup + end + + it "does not add a networking section when it is not defined in the profile" do + expect(Yast::Profile.current.keys).to_not include("networking") + subject.Setup + expect(Yast::Profile.current.keys).to_not include("networking") + end + end end
