openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2018
- 1 participants
- 1679 discussions
Hello community,
here is the log from the commit of package yast2-printer for openSUSE:Factory checked in at 2018-04-26 13:29:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-printer (Old)
and /work/SRC/openSUSE:Factory/.yast2-printer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-printer"
Thu Apr 26 13:29:58 2018 rev:140 rq:598948 version:4.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-printer/yast2-printer.changes 2016-06-13 21:50:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-printer.new/yast2-printer.changes 2018-04-26 13:29:59.833742678 +0200
@@ -1,0 +2,19 @@
+Thu Apr 19 15:51:26 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Fix help texts so they can be properly translated (bsc#1082257).
+- 4.0.1
+
+-------------------------------------------------------------------
+Fri Apr 6 18:52:50 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
+Mon Jan 23 08:26:53 UTC 2017 - lslezak(a)suse.cz
+
+- Dropped yast2-core-devel build dependency, it is not needed
+ anymore, fix up for the documentation removal (fate#320356)
+- 3.2.0
+
+-------------------------------------------------------------------
Old:
----
yast2-printer-3.1.6.tar.bz2
New:
----
yast2-printer-4.0.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.YI1UrW/_old 2018-04-26 13:30:00.329724510 +0200
+++ /var/tmp/diff_new_pack.YI1UrW/_new 2018-04-26 13:30:00.329724510 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-printer
#
-# Copyright (c) 2016 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,7 +17,7 @@
Name: yast2-printer
-Version: 3.1.6
+Version: 4.0.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -26,7 +26,6 @@
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-libX11-devel
BuildRequires: yast2
-BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-testsuite
++++++ yast2-printer-3.1.6.tar.bz2 -> yast2-printer-4.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/.travis.yml new/yast2-printer-4.0.1/.travis.yml
--- old/yast2-printer-3.1.6/.travis.yml 2016-06-09 17:23:20.436945064 +0200
+++ new/yast2-printer-4.0.1/.travis.yml 2018-04-20 08:31:44.000000000 +0200
@@ -1,16 +1,11 @@
-language: cpp
-compiler:
- - gcc
+sudo: required
+language: bash
+services:
+ - docker
+
before_install:
- # disable rvm, use system Ruby
- - rvm reset
- - wget https://raw.githubusercontent.com/yast/yast-devtools/SLE-12-GA/travis-tools…
- - sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 libx11-dev" -g "yast-rake gettext"
+ - docker build -t yast-printer-image .
script:
- - rake check:syntax
- - rake check:pot
- - make -f Makefile.cvs
- - make
- - sudo make install
- - make check
-
+ # the "yast-travis-ruby" script is included in the base yastdevel/ruby image
+ # see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
+ - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-printer-image yast-travis-ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/.yardopts new/yast2-printer-4.0.1/.yardopts
--- old/yast2-printer-3.1.6/.yardopts 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-printer-4.0.1/.yardopts 2018-04-20 08:31:44.000000000 +0200
@@ -0,0 +1,7 @@
+--no-private
+--markup markdown
+--protected
+--readme README.md
+--output-dir ./doc/autodocs
+--files *.md
+src/**/*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/CONTRIBUTING.md new/yast2-printer-4.0.1/CONTRIBUTING.md
--- old/yast2-printer-3.1.6/CONTRIBUTING.md 2016-06-09 17:23:20.468945064 +0200
+++ new/yast2-printer-4.0.1/CONTRIBUTING.md 2018-04-20 08:31:44.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…
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-printer-3.1.6/Dockerfile new/yast2-printer-4.0.1/Dockerfile
--- old/yast2-printer-3.1.6/Dockerfile 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-printer-4.0.1/Dockerfile 2018-04-20 08:31:44.000000000 +0200
@@ -0,0 +1,6 @@
+FROM yastdevel/ruby
+RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
+ xorg-x11-libX11-devel
+
+COPY . /usr/src/app
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/package/yast2-printer.changes new/yast2-printer-4.0.1/package/yast2-printer.changes
--- old/yast2-printer-3.1.6/package/yast2-printer.changes 2016-06-09 17:23:20.552945064 +0200
+++ new/yast2-printer-4.0.1/package/yast2-printer.changes 2018-04-20 08:31:44.000000000 +0200
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Thu Apr 19 15:51:26 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Fix help texts so they can be properly translated (bsc#1082257).
+- 4.0.1
+
+-------------------------------------------------------------------
+Fri Apr 6 18:52:50 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
+Mon Jan 23 08:26:53 UTC 2017 - lslezak(a)suse.cz
+
+- Dropped yast2-core-devel build dependency, it is not needed
+ anymore, fix up for the documentation removal (fate#320356)
+- 3.2.0
+
+-------------------------------------------------------------------
Wed Jun 1 15:49:01 UTC 2016 - igonzalezsosa(a)suse.com
- Drop yast2-printer-devel-doc package (fate#320356)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/package/yast2-printer.spec new/yast2-printer-4.0.1/package/yast2-printer.spec
--- old/yast2-printer-3.1.6/package/yast2-printer.spec 2016-06-09 17:23:20.552945064 +0200
+++ new/yast2-printer-4.0.1/package/yast2-printer.spec 2018-04-20 08:31:44.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-printer
-Version: 3.1.6
+Version: 4.0.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -27,7 +27,6 @@
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-libX11-devel
BuildRequires: yast2
-BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-testsuite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-printer-3.1.6/src/include/printer/helps.rb new/yast2-printer-4.0.1/src/include/printer/helps.rb
--- old/yast2-printer-3.1.6/src/include/printer/helps.rb 2016-06-09 17:23:20.648945064 +0200
+++ new/yast2-printer-4.0.1/src/include/printer/helps.rb 2018-04-20 08:31:44.000000000 +0200
@@ -560,8 +560,6 @@
"Devices which are connected via USB\n" +
"are autodetected and the appropriate device URI is autogenerated.\n" +
"For example:<br>\n" +
- # Disabled legacy "Parallel Port" help text:
- #"parallel:/dev/lp0<br>\n" +
"usb://ACME/Fun%20Printer?serial=A1B2C3<br>\n" +
"hp:/usb/HP_LaserJet?serial=1234<br>\n" +
"Usually only the autogenerated device URIs work.\n" +
@@ -572,12 +570,6 @@
"The package provides HP's printing and scanning software HPLIP.<br>\n" +
"In contrast devices which are connected via bluetooth\n" +
"are not autodetected so that the device URI must be manually specified.\n" +
- # Disabled legacy "Serial Port" help text:
- #"The serial device URI parameters must comply with\n" +
- #"what the serial port in the printer requires,\n" +
- #"see the manual of your serial printer.\n" +
- #"Example device URIs:<br>\n" +
- #"serial:/dev/ttyS9?baud=9600+bits=8+parity=none+flow=soft+stop=1<br>\n" +
"bluetooth://1A2B3C4D5E6F<br>\n" +
"To access a device via bluetooth, the RPM package bluez-cups must be installed.\n" +
"The package provides the CUPS backend 'bluetooth' which actually sends the data\n" +
@@ -695,19 +687,6 @@
"The official IANA port for IPP is 631.\n" +
"The matching device URI is:<br>\n" +
"ipp://ip-address:631/printers/queue<br>\n" +
- # Disabled legacy "Novell Netware Print Server (IPX)" help text:
- #"<b>Novell Netware Print Server (IPX)</b><br>\n" +
- #"To access print queues on a Novell Netware print server,\n" +
- #"the RPM package ncpfs must be installed.\n" +
- #"The package provides the CUPS backend 'novell' which runs\n" +
- #"the <tt>nprint</tt> program which actually sends the data\n" +
- #"to a Novell Netware print queue.\n" +
- #"A server name and a printer queue name is needed to access it.\n" +
- #"Furthermore a user name and a password may be required to get access.\n" +
- #"The matching device URI is:<br>\n" +
- #"novell://username:password@server/queue<br>\n" +
- #"For <b>more information</b> have a look at <tt>man nprint</tt> and\n" +
- #"the other documentation in the RPM package ncpfs.\n" +
"</p>"
) +
# ConnectionWizardDialog help 7/7:
1
0
Hello community,
here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2018-04-26 13:29:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
and /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation"
Thu Apr 26 13:29:49 2018 rev:401 rq:598569 version:4.0.50
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2018-04-07 20:52:17.724731124 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes 2018-04-26 13:29:51.746038921 +0200
@@ -1,0 +2,40 @@
+Thu Apr 19 13:05:23 UTC 2018 - lslezak(a)suse.cz
+
+- Log more details when unmounting the target partition fails
+ (to debug bsc#1090018)
+- 4.0.50
+
+-------------------------------------------------------------------
+Tue Apr 17 12:37:12 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Installer Updates does not overwrite Driver Updates
+ (bsc#1088685).
+- 4.0.49
+
+-------------------------------------------------------------------
+Mon Apr 16 12:50:00 UTC 2018 - mvidner(a)suse.com
+
+- Don't hard-code the role text color (bsc#1087399).
+- 4.0.48
+
+-------------------------------------------------------------------
+Mon Apr 16 11:08:57 UTC 2018 - jreidinger(a)suse.com
+
+- Ensure proper patterns are selected when going back to system
+ role and switch to different role (bsc#1088883)
+- 4.0.47
+
+-------------------------------------------------------------------
+Tue Apr 10 16:37:15 CEST 2018 - schubi(a)suse.de
+
+- Set Add-On products for installation again after the base
+ product has been selected (bnc#1086846).
+- 4.0.46
+
+-------------------------------------------------------------------
+Fri Apr 6 17:25:51 UTC 2018 - jlopez(a)suse.com
+
+- Use AbortException when user aborts (part of fate#318196).
+- 4.0.45
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-4.0.44.tar.bz2
New:
----
yast2-installation-4.0.50.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.4Xf519/_old 2018-04-26 13:29:52.366016212 +0200
+++ /var/tmp/diff_new_pack.4Xf519/_new 2018-04-26 13:29:52.370016065 +0200
@@ -17,15 +17,15 @@
Name: yast2-installation
-Version: 4.0.44
+Version: 4.0.50
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Url: http://github.com/yast/yast-installation
-# new y2start script
-Requires: yast2-ruby-bindings >= 3.2.10
+# for AbortException and handle direct abort
+Requires: yast2-ruby-bindings >= 4.0.6
Summary: YaST2 - Installation Parts
License: GPL-2.0
@@ -36,6 +36,8 @@
BuildRequires: update-desktop-files
BuildRequires: yast2-devtools >= 3.1.10
+# for AbortException and handle direct abort
+BuildRequires: yast2-ruby-bindings >= 4.0.6
# needed for xml agent reading about products
BuildRequires: yast2-xml
BuildRequires: rubygem(rspec)
@@ -63,8 +65,8 @@
# Mouse-related scripts moved to yast2-mouse
Conflicts: yast2-mouse < 2.18.0
-# Yast::Packages.check_remote_installation_packages
-Requires: yast2-packager >= 4.0.9
+# Yast::AddOnProduct.selected_installation_products
+Requires: yast2-packager >= 4.0.56
# use in startup scripts
Requires: initviocons
++++++ yast2-installation-4.0.44.tar.bz2 -> yast2-installation-4.0.50.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/package/yast2-installation.changes new/yast2-installation-4.0.50/package/yast2-installation.changes
--- old/yast2-installation-4.0.44/package/yast2-installation.changes 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/package/yast2-installation.changes 2018-04-19 16:07:10.000000000 +0200
@@ -1,4 +1,44 @@
-------------------------------------------------------------------
+Thu Apr 19 13:05:23 UTC 2018 - lslezak(a)suse.cz
+
+- Log more details when unmounting the target partition fails
+ (to debug bsc#1090018)
+- 4.0.50
+
+-------------------------------------------------------------------
+Tue Apr 17 12:37:12 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Installer Updates does not overwrite Driver Updates
+ (bsc#1088685).
+- 4.0.49
+
+-------------------------------------------------------------------
+Mon Apr 16 12:50:00 UTC 2018 - mvidner(a)suse.com
+
+- Don't hard-code the role text color (bsc#1087399).
+- 4.0.48
+
+-------------------------------------------------------------------
+Mon Apr 16 11:08:57 UTC 2018 - jreidinger(a)suse.com
+
+- Ensure proper patterns are selected when going back to system
+ role and switch to different role (bsc#1088883)
+- 4.0.47
+
+-------------------------------------------------------------------
+Tue Apr 10 16:37:15 CEST 2018 - schubi(a)suse.de
+
+- Set Add-On products for installation again after the base
+ product has been selected (bnc#1086846).
+- 4.0.46
+
+-------------------------------------------------------------------
+Fri Apr 6 17:25:51 UTC 2018 - jlopez(a)suse.com
+
+- Use AbortException when user aborts (part of fate#318196).
+- 4.0.45
+
+-------------------------------------------------------------------
Fri Apr 6 12:26:45 UTC 2018 - mvidner(a)suse.com
- Start web VNC for the installation process (bsc#1078785)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/package/yast2-installation.spec new/yast2-installation-4.0.50/package/yast2-installation.spec
--- old/yast2-installation-4.0.44/package/yast2-installation.spec 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/package/yast2-installation.spec 2018-04-19 16:07:10.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-installation
-Version: 4.0.44
+Version: 4.0.50
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -25,8 +25,8 @@
Group: System/YaST
License: GPL-2.0
Url: http://github.com/yast/yast-installation
-# new y2start script
-Requires: yast2-ruby-bindings >= 3.2.10
+# for AbortException and handle direct abort
+Requires: yast2-ruby-bindings >= 4.0.6
Summary: YaST2 - Installation Parts
@@ -35,6 +35,8 @@
BuildRequires: update-desktop-files
BuildRequires: yast2-devtools >= 3.1.10
+# for AbortException and handle direct abort
+BuildRequires: yast2-ruby-bindings >= 4.0.6
# needed for xml agent reading about products
BuildRequires: yast2-xml
BuildRequires: rubygem(rspec)
@@ -62,8 +64,8 @@
# Mouse-related scripts moved to yast2-mouse
Conflicts: yast2-mouse < 2.18.0
-# Yast::Packages.check_remote_installation_packages
-Requires: yast2-packager >= 4.0.9
+# Yast::AddOnProduct.selected_installation_products
+Requires: yast2-packager >= 4.0.56
# use in startup scripts
Requires: initviocons
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/src/lib/installation/clients/inst_system_analysis.rb new/yast2-installation-4.0.50/src/lib/installation/clients/inst_system_analysis.rb
--- old/yast2-installation-4.0.44/src/lib/installation/clients/inst_system_analysis.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/src/lib/installation/clients/inst_system_analysis.rb 2018-04-19 16:07:10.000000000 +0200
@@ -32,11 +32,6 @@
class InstSystemAnalysisClient < Client
include Yast::Logger
- # Custom exception class to indicate the user (or the AutoYaST profile)
- # decided to abort the installation due to a libstorage-ng error
- class AbortError < RuntimeError
- end
-
def main
Yast.import "UI"
@@ -142,7 +137,7 @@
begin
ret = run_function.call
Builtins.y2milestone("Function %1 returned %2", run_function, ret)
- rescue AbortError
+ rescue AbortException
return :abort
end
@@ -179,7 +174,7 @@
# Hard disks initialization
#
- # @raise [AbortError] if an error is found and the installation must
+ # @raise [AbortException] if an error is found and the installation must
# be aborted because of such error
def ActionHDDProbe
init_storage
@@ -285,7 +280,7 @@
# Reprobing ensures we don't bring bug#806454 back and invalidates cached
# proposal, so we are also safe from bug#865579.
#
- # @raise [AbortError] if an error is found and the installation must
+ # @raise [AbortException] if an error is found and the installation must
# be aborted because of such error
def init_storage
success = storage_manager.activate(activate_callbacks)
@@ -293,7 +288,7 @@
return if success
log.info "A storage error was raised and the installation must be aborted."
- raise AbortError, "User aborted"
+ raise AbortException, "User aborted"
end
# @return [Y2Storage::StorageManager]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/src/lib/installation/clients/umount_finish.rb new/yast2-installation-4.0.50/src/lib/installation/clients/umount_finish.rb
--- old/yast2-installation-4.0.44/src/lib/installation/clients/umount_finish.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/src/lib/installation/clients/umount_finish.rb 2018-04-19 16:07:10.000000000 +0200
@@ -30,6 +30,7 @@
require "y2storage"
require "pathname"
+require "shellwords"
module Yast
class UmountFinishClient < Client
@@ -158,6 +159,14 @@
WFM.Execute(path(".local.umount"), umount_this)
)
if umount_result != true
+ # run "fuser" to get the details about open files
+ # (the details are printed on STDERR, redirect it)
+ fuser = begin
+ `LC_ALL=C fuser -v -m #{Shellwords.escape(umount_this)} 2>&1`
+ rescue => e
+ "fuser failed: #{e}"
+ end
+ log.warn("Running processes using #{umount_this}: #{fuser}")
# bnc #395034
# Don't remount them read-only!
if Builtins.contains(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/src/lib/installation/driver_update.rb new/yast2-installation-4.0.50/src/lib/installation/driver_update.rb
--- old/yast2-installation-4.0.44/src/lib/installation/driver_update.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/src/lib/installation/driver_update.rb 2018-04-19 16:07:10.000000000 +0200
@@ -55,8 +55,16 @@
def find(update_dirs)
dirs = Array(update_dirs)
log.info("Searching for Driver Updates at #{dirs.map(&:to_s)}")
- globs = dirs.map { |d| d.join("dud_*") }
- Pathname.glob(globs).map do |path|
+
+ # DUD as directories
+ duds_globs = dirs.map { |d| d.join("*", "dud.config") }
+ duds = Pathname.glob(duds_globs).map(&:dirname)
+
+ # DUD as files (squashfs filesystems)
+ archives_globs = dirs.map { |d| d.join("dud_*") }
+ archives = Pathname.glob(archives_globs)
+
+ (duds + archives).uniq.map do |path|
log.info("Found a Driver Update at #{path}")
new(path)
end
@@ -97,7 +105,7 @@
private
# LOSETUP command
- LOSETUP_CMD = "/sbin/losetup".freeze
+ LOSETUP_CMD = "/sbin/losetup -j '%<file>s'".freeze
# Returns the instsys_path for updates of type :archive
#
@@ -106,10 +114,10 @@
#
# @return [Pathname] Update's mountpoint
def archive_instsys_path
- out = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), LOSETUP_CMD)
+ cmd = format(LOSETUP_CMD, file: path.to_s)
+ out = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), cmd)
log.info("Reading loopback devices: #{out}")
- regexp = %r{(/dev/loop\d+)[^\n]+#{path.to_s}\n}
- lodevice = out["stdout"][regexp, 1]
+ lodevice = out["stdout"].split(":").first
mount = Yast::SCR.Read(Yast::Path.new(".proc.mounts")).find { |m| m["spec"] == lodevice }
if mount.nil?
log.warn("Driver Update at #{path} is not mounted")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/src/lib/installation/select_system_role.rb new/yast2-installation-4.0.50/src/lib/installation/select_system_role.rb
--- old/yast2-installation-4.0.44/src/lib/installation/select_system_role.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/src/lib/installation/select_system_role.rb 2018-04-19 16:07:10.000000000 +0200
@@ -24,6 +24,8 @@
require "installation/system_role"
Yast.import "GetInstArgs"
+Yast.import "Packages"
+Yast.import "Pkg"
Yast.import "Popup"
Yast.import "ProductControl"
Yast.import "ProductFeatures"
@@ -191,6 +193,19 @@
log.info "Applying system role '#{role.id}'"
role.overlay_features
adapt_services(role)
+
+ # Reset pkg and pattern selection as many roles define own roles
+ # so ensure when going back that it will properly set (bsc#1088883)
+ reset_patterns
+ end
+
+ def reset_patterns
+ Yast::Pkg::ResolvableProperties("", :pattern, "").each do |pattern|
+ next if pattern["status"] != :selected
+ Yast::Pkg.ResolvableNeutral(pattern["name"], :pattern, false)
+ end
+ Yast::Packages.SelectSystemPatterns(false)
+ Yast::Pkg.PkgSolve(false)
end
# for given role sets in {::Installation::Services} list of services to enable
@@ -273,8 +288,7 @@
bullet = selected ? BUTTON_ON : BUTTON_OFF
end
widget = "#{bullet} #{CGI.escape_html(label)}"
- color = installation ? "white" : "black"
- enabled_widget = "<a style='text-decoration:none; color:#{color}' href=\"#{id}\">#{widget}</a>"
+ enabled_widget = "<a class='dontlooklikealink' href=\"#{id}\">#{widget}</a>"
"<p>#{enabled_widget}</p>"
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/src/lib/installation/widgets/product_selector.rb new/yast2-installation-4.0.50/src/lib/installation/widgets/product_selector.rb
--- old/yast2-installation-4.0.44/src/lib/installation/widgets/product_selector.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/src/lib/installation/widgets/product_selector.rb 2018-04-19 16:07:10.000000000 +0200
@@ -1,6 +1,7 @@
require "yast"
Yast.import "Pkg"
Yast.import "Popup"
+Yast.import "AddOnProduct"
require "cwm/common_widgets"
@@ -49,6 +50,12 @@
Yast::Pkg.PkgApplReset
Yast::Pkg.PkgReset
@product.select
+
+ # Reselecting existing add-on-products for installation again
+ Yast::AddOnProduct.selected_installation_products.each do |product|
+ log.info "Reselecting add-on product #{product} for installation"
+ Yast::Pkg.ResolvableInstall(product, :product, "")
+ end
end
def validate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/driver_update_test.rb new/yast2-installation-4.0.50/test/driver_update_test.rb
--- old/yast2-installation-4.0.44/test/driver_update_test.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/test/driver_update_test.rb 2018-04-19 16:07:10.000000000 +0200
@@ -9,16 +9,14 @@
describe Installation::DriverUpdate do
subject(:update) { Installation::DriverUpdate.new(update_path) }
- let(:update_path) { FIXTURES_DIR.join("updates", "dud_000") }
+ let(:update_path) { FIXTURES_DIR.join("self-update", "update", "000") }
let(:losetup_content) do
- "NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE\n" \
- "/dev/loop5 0 0 0 0 /download/dud_000\n" \
- "/dev/loop6 0 0 0 0 #{FIXTURES_DIR.join("updates", "dud_002")}\n"
+ "/dev/loop6: [0017]:63402 (#{update_path})\n"
end
before do
allow(Yast::SCR).to receive(:Execute)
- .with(Yast::Path.new(".target.bash_output"), "/sbin/losetup")
+ .with(Yast::Path.new(".target.bash_output"), String)
.and_return("exit" => 0, "stdout" => losetup_content)
allow(Yast::SCR).to receive(:Read)
.with(Yast::Path.new(".proc.mounts"))
@@ -34,7 +32,9 @@
context "when updates exist" do
it "returns an array of driver updates" do
- updates = described_class.find([FIXTURES_DIR.join("updates")])
+ updates = described_class.find(
+ [FIXTURES_DIR.join("self-update/update"), FIXTURES_DIR.join("self-update/download")]
+ )
expect(updates).to all(be_an(described_class))
expect(updates.size).to eq(3)
end
@@ -53,7 +53,7 @@
describe "#kind" do
context "when is a driver update disk" do
- let(:update_path) { FIXTURES_DIR.join("updates", "dud_000") }
+ let(:update_path) { FIXTURES_DIR.join("self-update", "update", "000") }
it "returns :dud" do
expect(update.kind).to eq(:dud)
@@ -61,13 +61,35 @@
end
context "when is an archive" do
- let(:update_path) { FIXTURES_DIR.join("updates", "dud_002") }
+ let(:update_path) { FIXTURES_DIR.join("self-update", "download", "dud_0000") }
it "returns :archive" do
expect(update.kind).to eq(:archive)
end
end
end
+
+ describe "#instsys_path" do
+ context "when is a driver update disk" do
+ let(:update_path) { FIXTURES_DIR.join("self-update", "update", "000") }
+
+ it "returns the path to the 'inst-sys' directory within the update" do
+ expect(update.instsys_path)
+ .to eq(FIXTURES_DIR.join("self-update", "update", "000", "inst-sys"))
+ end
+ end
+
+ context "when is an archive" do
+ let(:update_path) { FIXTURES_DIR.join("self-update", "download", "dud_0000") }
+
+ it "returns the path where the DUD is mounted on" do
+ expect(Yast::SCR).to receive(:Execute)
+ .with(Yast::Path.new(".target.bash_output"), "/sbin/losetup -j '#{update_path}'")
+ .and_return("exit" => 0, "stdout" => losetup_content)
+ expect(update.instsys_path).to eq(Pathname.new("/mounts/mp_0005"))
+ end
+ end
+ end
describe "#path" do
it "returns the path where the DUD is located" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/fixtures/self-update/update/000/install/update.pre new/yast2-installation-4.0.50/test/fixtures/self-update/update/000/install/update.pre
--- old/yast2-installation-4.0.44/test/fixtures/self-update/update/000/install/update.pre 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-4.0.50/test/fixtures/self-update/update/000/install/update.pre 2018-04-19 16:07:10.000000000 +0200
@@ -0,0 +1,3 @@
+#! /usr/bin/perl
+
+print "Just a testing script.\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/fixtures/updates/dud_000/install/update.pre new/yast2-installation-4.0.50/test/fixtures/updates/dud_000/install/update.pre
--- old/yast2-installation-4.0.44/test/fixtures/updates/dud_000/install/update.pre 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/test/fixtures/updates/dud_000/install/update.pre 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-#! /usr/bin/perl
-
-print "Just a testing script.\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/lib/clients/inst_system_analysis_test.rb new/yast2-installation-4.0.50/test/lib/clients/inst_system_analysis_test.rb
--- old/yast2-installation-4.0.44/test/lib/clients/inst_system_analysis_test.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/test/lib/clients/inst_system_analysis_test.rb 2018-04-19 16:07:10.000000000 +0200
@@ -66,19 +66,17 @@
context "when activation fails and the error is not recovered" do
let(:activate_result) { false }
- it "does not probe and raises AbortError" do
+ it "does not probe and raises AbortException" do
expect(storage).to_not receive(:probe)
- expect { client.ActionHDDProbe }
- .to raise_error Yast::InstSystemAnalysisClient::AbortError
+ expect { client.ActionHDDProbe }.to raise_error Yast::AbortException
end
end
context "when probing fails and the error is not recovered" do
let(:probe_result) { false }
- it "raises AbortError" do
- expect { client.ActionHDDProbe }
- .to raise_error Yast::InstSystemAnalysisClient::AbortError
+ it "raises AbortException" do
+ expect { client.ActionHDDProbe }.to raise_error Yast::AbortException
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/select_system_role_test.rb new/yast2-installation-4.0.50/test/select_system_role_test.rb
--- old/yast2-installation-4.0.44/test/select_system_role_test.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/test/select_system_role_test.rb 2018-04-19 16:07:10.000000000 +0200
@@ -25,6 +25,7 @@
allow(Yast::ProductFeatures).to receive(:ClearOverlay)
allow(Yast::ProductFeatures).to receive(:SetOverlay) # .with
+ allow(Yast::Packages).to receive(:SelectSystemPatterns)
end
context "when no roles are defined" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.0.44/test/widgets/product_selector_test.rb new/yast2-installation-4.0.50/test/widgets/product_selector_test.rb
--- old/yast2-installation-4.0.44/test/widgets/product_selector_test.rb 2018-04-06 16:34:09.000000000 +0200
+++ new/yast2-installation-4.0.50/test/widgets/product_selector_test.rb 2018-04-19 16:07:10.000000000 +0200
@@ -57,11 +57,13 @@
before do
allow(Yast::Pkg).to receive(:PkgApplReset)
allow(Yast::Pkg).to receive(:PkgReset)
+ allow(Yast::AddOnProduct).to receive(:selected_installation_products)
+ .and_return(["add-on-product"])
+ # mock selecting the first product
+ allow(subject).to receive(:value).and_return("test1")
end
it "resets previous package configuration" do
- # mock selecting the first product
- allow(subject).to receive(:value).and_return("test1")
allow(product1).to receive(:select)
expect(Yast::Pkg).to receive(:PkgApplReset)
expect(Yast::Pkg).to receive(:PkgReset)
@@ -69,12 +71,16 @@
end
it "selects the product to install" do
- # mock selecting the first product
- allow(subject).to receive(:value).and_return("test1")
-
expect(product1).to receive(:select)
expect(product2).to_not receive(:select)
subject.store
end
+
+ it "reselect add-on products for installation" do
+ allow(product1).to receive(:select)
+ expect(Yast::Pkg).to receive(:ResolvableInstall)
+ .with("add-on-product", :product, "")
+ subject.store
+ end
end
end
1
0
Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2018-04-26 13:29:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
and /work/SRC/openSUSE:Factory/.yast2-packager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager"
Thu Apr 26 13:29:40 2018 rev:351 rq:598497 version:4.0.59
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2018-04-07 20:51:42.382010291 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2018-04-26 13:29:42.218387903 +0200
@@ -1,0 +2,31 @@
+Fri Apr 19 08:26:41 UTC 2018 - gsouza(a)suse.com
+
+- Added warning to inform the user that changes in a repository
+ managed by a service will be lost in the next refresh of the
+ service (bsc#1078323).
+- 3.2.26
+
+-------------------------------------------------------------------
+Mon Apr 16 16:48:14 UTC 2018 - igonzalezsosa(a)suse.com
+
+- In AutoYaST, skip base product license dialog when the same
+ license was already accepted (fate#325461).
+- 4.0.58
+
+-------------------------------------------------------------------
+Mon Apr 16 13:46:16 UTC 2018 - lslezak(a)suse.cz
+
+- The Advanced Systems Management Module has been moved to the
+ Basesystem module, added the product change into the list
+ (related to bsc#1089477)
+- 4.0.57
+
+-------------------------------------------------------------------
+Tue Apr 10 16:21:29 CEST 2018 - schubi(a)suse.de
+
+- Error: Add-On products has been reset during the installation
+ workflow (bnc#1086846). Set it again while setting the base
+ product.
+- 4.0.56
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-4.0.55.tar.bz2
New:
----
yast2-packager-4.0.59.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.McZQu1/_old 2018-04-26 13:29:42.746368564 +0200
+++ /var/tmp/diff_new_pack.McZQu1/_new 2018-04-26 13:29:42.750368417 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.0.55
+Version: 4.0.59
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-packager-4.0.55.tar.bz2 -> yast2-packager-4.0.59.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/package/yast2-packager.changes new/yast2-packager-4.0.59/package/yast2-packager.changes
--- old/yast2-packager-4.0.55/package/yast2-packager.changes 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/package/yast2-packager.changes 2018-04-19 12:55:10.000000000 +0200
@@ -1,4 +1,35 @@
-------------------------------------------------------------------
+Fri Apr 19 08:26:41 UTC 2018 - gsouza(a)suse.com
+
+- Added warning to inform the user that changes in a repository
+ managed by a service will be lost in the next refresh of the
+ service (bsc#1078323).
+- 3.2.26
+
+-------------------------------------------------------------------
+Mon Apr 16 16:48:14 UTC 2018 - igonzalezsosa(a)suse.com
+
+- In AutoYaST, skip base product license dialog when the same
+ license was already accepted (fate#325461).
+- 4.0.58
+
+-------------------------------------------------------------------
+Mon Apr 16 13:46:16 UTC 2018 - lslezak(a)suse.cz
+
+- The Advanced Systems Management Module has been moved to the
+ Basesystem module, added the product change into the list
+ (related to bsc#1089477)
+- 4.0.57
+
+-------------------------------------------------------------------
+Tue Apr 10 16:21:29 CEST 2018 - schubi(a)suse.de
+
+- Error: Add-On products has been reset during the installation
+ workflow (bnc#1086846). Set it again while setting the base
+ product.
+- 4.0.56
+
+-------------------------------------------------------------------
Thu Apr 5 15:32:19 UTC 2018 - knut.anderssen(a)suse.com
- Given a license, remember whether another one with the same
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/package/yast2-packager.spec new/yast2-packager-4.0.59/package/yast2-packager.spec
--- old/yast2-packager-4.0.55/package/yast2-packager.spec 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/package/yast2-packager.spec 2018-04-19 12:55:10.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.0.55
+Version: 4.0.59
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/src/lib/packager/clients/repositories.rb new/yast2-packager-4.0.59/src/lib/packager/clients/repositories.rb
--- old/yast2-packager-4.0.55/src/lib/packager/clients/repositories.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/src/lib/packager/clients/repositories.rb 2018-04-19 12:55:10.000000000 +0200
@@ -43,12 +43,17 @@
NO_SERVICE = :no_service
NO_SERVICE_ITEM = :no_service_item
- def main
- textdomain "packager"
+ def import_modules
+ Yast.import "Pkg"
+ Yast.import "UI"
Yast.include self, "packager/inst_source_dialogs.rb"
Yast.include self, "packager/key_manager_dialogs.rb"
Yast.include self, "packager/repositories_include.rb"
+ end
+
+ def initialize
+ textdomain "packager"
@full_mode = false
@@ -87,6 +92,14 @@
"guihandler" => fun_ref(method(:StartInstSource), "symbol ()")
}
+ # list of repositories that was already informed to the user that they are
+ # managed by service
+ @services_repos = []
+ end
+
+ def main
+ import_modules
+
if WFM.Args == [:sw_single_mode]
Builtins.y2milestone("Started from sw_single, switching the mode")
@@ -1660,6 +1673,7 @@
return
end
+ warn_service_repository(sourceState)
state = !sourceState["enabled"]
# corresponds to the "Enable/Disable" button
state_symbol = state ? UI.Glyph(:CheckMark) : ""
@@ -1701,6 +1715,8 @@
src_data = Pkg.SourceGeneralData(source_id)
return if !plugin_service_check(sourceState["service"], repo_change_msg)
+ warn_service_repository(sourceState)
+
type = src_data["type"]
state = !sourceState["autorefresh"]
@@ -1743,6 +1759,7 @@
def repo_priority_handler(sourceState, global_current, current)
return if !plugin_service_check(sourceState["service"], repo_change_msg)
+ warn_service_repository(sourceState)
# refresh the value in the table
new_priority = UI.QueryWidget(Id(:priority), :Value)
log.debug("New priority: #{new_priority}")
@@ -1762,6 +1779,8 @@
def repo_keeppackages_handler(sourceState, global_current)
return if !plugin_service_check(sourceState["service"], repo_change_msg)
+ warn_service_repository(sourceState)
+
# refresh the value in the table
new_keep = UI.QueryWidget(Id(:keeppackages), :Value)
log.info("New keep packages option: #{new_keep}")
@@ -1921,6 +1940,8 @@
new_name = SourceDialogs.GetRepoName
if new_name != Ops.get_string(sourceState, "name", "")
+ warn_service_repository(sourceState)
+
Ops.set(sourceState, "name", new_name)
Ops.set(@sourceStatesOut, global_current, sourceState)
@@ -2056,5 +2077,17 @@
Popup.Message(msg)
false
end
+
+ # Shows a warning message when repository managed by a service
+ # @param [Hash] source_state the current state of the repository or service
+ def warn_service_repository(source_state)
+ msg = _("Repository '%{name}' is managed by service '%{service}'.\n"\
+ "Your manual changes might be reset by the next service refresh!") %
+ { name: source_state["name"], service: source_state["service"] }
+ if source_state["service"] != "" && !(a)services_repos.include?(source_state["SrcId"])
+ Popup.Warning(msg)
+ @services_repos.push(source_state["SrcId"])
+ end
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/src/lib/y2packager/clients/inst_product_license.rb new/yast2-packager-4.0.59/src/lib/y2packager/clients/inst_product_license.rb
--- old/yast2-packager-4.0.55/src/lib/y2packager/clients/inst_product_license.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/src/lib/y2packager/clients/inst_product_license.rb 2018-04-19 12:55:10.000000000 +0200
@@ -15,24 +15,32 @@
require "y2packager/product"
Yast.import "Language"
Yast.import "GetInstArgs"
+Yast.import "Mode"
module Y2Packager
module Clients
# This client shows a license confirmation dialog for the base selected product
#
- # The client will be skipped (returning `:auto`) in these situations:
+ # The client will be skipped (returning `:auto` or `:next`) in these
+ # situations:
#
# * There is no license available for the selected base product.
- # * There is only 1 base product (not a multi-product media at all). In
- # that case, the license is supposed to has been already accepted in the
- # welcome screen.
+ # * Running AutoYaST but the license has been already confirmed.
+ # * Running a normal installation but there is only 1 base product
+ # (not a multi-product media at all). In that case, the license is
+ # supposed to has been already confirmed in the welcome screen.
class InstProductLicense
include Yast::I18n
include Yast::Logger
def main
textdomain "installation"
- return :auto unless multi_product_media? && available_license?
+
+ if Yast::Mode.auto
+ return :next if !available_license? || license_confirmed?
+ else
+ return :auto unless available_license? && multi_product_media?
+ end
Yast::Wizard.EnableAbortButton
disable_buttons = !Yast::GetInstArgs.enable_back ? [:back] : []
@@ -47,7 +55,10 @@
# @return [Y2Packager::Product]
# @see Y2Packager::Product.selected_base
def product
- @product ||= Y2Packager::Product.selected_base
+ return @product if @product
+ @product = Y2Packager::Product.selected_base
+ log.warn "No base product is selected for installation" unless @product
+ @product
end
# Determines whether a multi-product media is being used
@@ -64,13 +75,16 @@
# @return [Boolean] true if the license is available; false otherwise.
def available_license?
return true if product && product.license?
- if product.nil?
- log.warn "No base product is selected for installation"
- else
- log.warn "No license for product '#{product.label}' was found"
- end
+ log.warn "No license for product '#{product.label}' was found" if product
false
end
+
+ # Determine whether the product's license has been already confirmed
+ #
+ # @return [Boolean] true if the license was confirmed; false otherwise.
+ def license_confirmed?
+ product && product.license_confirmed?
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/src/modules/AddOnProduct.rb new/yast2-packager-4.0.59/src/modules/AddOnProduct.rb
--- old/yast2-packager-4.0.55/src/modules/AddOnProduct.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/src/modules/AddOnProduct.rb 2018-04-19 12:55:10.000000000 +0200
@@ -12,33 +12,38 @@
# @return [Hash] Product renames default map. Used when information is not
# found elsewhere.
DEFAULT_PRODUCT_RENAMES = {
- "SUSE_SLES" => ["SLES"],
+ "SUSE_SLES" => ["SLES"],
# SLED or Workstation extension
- "SUSE_SLED" => ["SLED", "sle-we"],
+ "SUSE_SLED" => ["SLED", "sle-we"],
# SLE11 HA has been renamed since SLE12
- "sle-hae" => ["sle-ha"],
+ "sle-hae" => ["sle-ha"],
# SLE11 HA GEO is now included in SLE15 HA
- "sle-haegeo" => ["sle-ha"],
+ "sle-haegeo" => ["sle-ha"],
# SLE12 HA GEO is now included in SLE15 HA
- "sle-ha-geo" => ["sle-ha"],
- "SUSE_SLES_SAP" => ["SLES_SAP"],
+ "sle-ha-geo" => ["sle-ha"],
+ "SUSE_SLES_SAP" => ["SLES_SAP"],
# SLES-12 with HPC module can be replaced by SLES_HPC-15
- "SLES" => ["SLES_HPC"],
+ "SLES" => ["SLES_HPC"],
# this is an internal product so far...
- "SLE-HPC" => ["SLES_HPC"],
+ "SLE-HPC" => ["SLES_HPC"],
# SMT is now integrated into the base SLES
- "sle-smt" => ["SLES"],
+ "sle-smt" => ["SLES"],
# Live patching is a module now (bsc#1074154)
- "sle-live-patching" => ["sle-module-live-patching"],
+ "sle-live-patching" => ["sle-module-live-patching"],
+ # The Advanced Systems Management Module has been moved to the Basesystem module
+ "sle-module-adv-systems-management" => ["sle-module-basesystem"],
# Toolchain and SDK are now included in the Development Tools SLE15 module
- "sle-module-toolchain" => ["sle-module-development-tools"],
- "sle-sdk" => ["sle-module-development-tools"]
+ "sle-module-toolchain" => ["sle-module-development-tools"],
+ "sle-sdk" => ["sle-module-development-tools"]
}.freeze
# @return [Hash] Product renames added externally through the #add_rename method
attr_accessor :external_product_renames
private :external_product_renames, :external_product_renames=
+ # Products which are selected for installation in libzypp.
+ attr_reader :selected_installation_products
+
def main
Yast.import "UI"
Yast.import "Pkg"
@@ -154,6 +159,13 @@
# additional product renames needed for detecting the product update
# @see #add_rename
@external_product_renames = {}
+
+ # Products which are selected for installation in libzypp.
+ # Due the "buddy" libzypp functionality also the release packages will
+ # be regarded.
+ # E.g.: product:sle-module-basesystem-15-0.x86_64 has buddy
+ # sle-module-basesystem-release-15-91.2.x86_64
+ @selected_installation_products = [] # e.g.: ["sle-module-basesystem"]
end
# Downloads a requested file, caches it and returns path to that cached file.
@@ -1237,7 +1249,15 @@
"Selecting product '%1' for installation",
one_prod
)
- Pkg.ResolvableInstall(one_prod, :product)
+ if !Pkg.ResolvableInstall(one_prod, :product)
+ Report.Error(
+ # TRANSLATORS: Product cannot be set for installation.
+ # %1 is the product name.
+ Builtins.sformat(_("Product %1 not found on media."), one_prod)
+ )
+ else
+ @selected_installation_products << one_prod
+ end
end
# install all products from the destination
@@ -1253,9 +1273,12 @@
"Selecting product '%1' for installation",
Ops.get_string(p, "name", "")
)
- Pkg.ResolvableInstall(Ops.get_string(p, "name", ""), :product)
+ one_prod = p["name"] || ""
+ Pkg.ResolvableInstall(one_prod, :product)
+ @selected_installation_products << one_prod
end
end
+ @selected_installation_products.uniq!
nil
end
@@ -1470,6 +1493,7 @@
# adding the product to the list of products (BNC #269625)
prod = Pkg.SourceProductData(repo_id)
log.info "Repository (#{repo_id} product data: #{prod})"
+ @selected_installation_products = []
InstallProductsFromRepository(one_product.fetch("install_products", []), repo_id)
new_add_on_product = {
"media" => repo_id,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/test/addon_product_test.rb new/yast2-packager-4.0.59/test/addon_product_test.rb
--- old/yast2-packager-4.0.55/test/addon_product_test.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/test/addon_product_test.rb 2018-04-19 12:55:10.000000000 +0200
@@ -290,6 +290,48 @@
end
end
+ context "when install_products is given in the add-on description" do
+ let(:repo_id) { 1 }
+ let(:repo) do
+ ADDON_REPO.merge("install_products" => ["available_product",
+ "not_available_product"])
+ end
+
+ before do
+ allow(subject).to receive(:AcceptedLicenseAndInfoFile).and_return(true)
+ allow(Yast::Pkg).to receive(:SourceProductData).with(repo_id)
+ allow(Yast::Pkg).to receive(:ResolvableInstall).with("available_product",
+ :product).and_return(true)
+ allow(Yast::Pkg).to receive(:ResolvableInstall).with("not_available_product",
+ :product).and_return(false)
+ allow(subject).to receive(:ReIntegrateFromScratch)
+ allow(subject).to receive(:Integrate)
+ allow(subject).to receive(:AddRepo).with(repo["url"], repo["path"], repo["priority"])
+ .and_return(repo_id)
+ end
+
+ it "adds the repository" do
+ subject.AddPreselectedAddOnProducts(filelist)
+ expect(subject.add_on_products).to_not be_empty
+ end
+
+ it "tries to install given products" do
+ expect(Yast::Pkg).to receive(:ResolvableInstall).with("available_product",
+ :product).and_return(true)
+ expect(Yast::Pkg).to receive(:ResolvableInstall).with("not_available_product",
+ :product).and_return(false)
+ subject.AddPreselectedAddOnProducts(filelist)
+ expect(subject.selected_installation_products).to eq(["available_product"])
+ end
+
+ it "reports an error for none existing products" do
+ expect(Yast::Report).to receive(:Error)
+ .with(format(_("Product %s not found on media."), "not_available_product"))
+ subject.AddPreselectedAddOnProducts(filelist)
+ end
+
+ end
+
context "when the add-on is on a CD/DVD" do
let(:repo_id) { 1 }
let(:cd_url) { "cd:///?device=/dev/sr0" }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/test/lib/clients/inst_product_license_test.rb new/yast2-packager-4.0.59/test/lib/clients/inst_product_license_test.rb
--- old/yast2-packager-4.0.55/test/lib/clients/inst_product_license_test.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/test/lib/clients/inst_product_license_test.rb 2018-04-19 12:55:10.000000000 +0200
@@ -23,12 +23,14 @@
let(:confirmation_required?) { true }
let(:license_confirmed?) { false }
let(:language) { double("Yast::Language", language: "en_US") }
+ let(:auto) { false }
before do
allow(Y2Packager::Dialogs::InstProductLicense).to receive(:new)
.and_return(dialog)
allow(Y2Packager::Product).to receive(:selected_base).and_return(product)
allow(Y2Packager::Product).to receive(:available_base_products).and_return(products)
+ allow(Yast::Mode).to receive(:auto).and_return(auto)
stub_const("Yast::Language", language)
end
@@ -81,14 +83,6 @@
end
end
- context "when only one base product is found" do
- let(:products) { [product] }
-
- it "returns :auto" do
- expect(client.main).to eq(:auto)
- end
- end
-
context "when no license is found for the selected base product" do
let(:license?) { false }
@@ -98,8 +92,60 @@
client.main
end
- it "returns :auto" do
- expect(client.main).to eq(:auto)
+ context "and running during normal installation" do
+ let(:auto) { false }
+
+ it "returns :auto" do
+ expect(client.main).to eq(:auto)
+ end
+ end
+
+ context "and running during autoinstallation" do
+ let(:auto) { true }
+
+ it "returns :next" do
+ expect(client.main).to eq(:next)
+ end
+ end
+ end
+
+ context "during normal installation" do
+ let(:auto) { false }
+
+ context "when only one base product is found" do
+ let(:products) { [product] }
+
+ it "returns :auto" do
+ expect(client.main).to eq(:auto)
+ end
+ end
+
+ context "when more than one product is found" do
+ it "opens the license dialog" do
+ expect(Y2Packager::Dialogs::InstProductLicense).to receive(:new)
+ client.main
+ end
+ end
+ end
+
+ context "during autoinstallation" do
+ let(:auto) { true }
+
+ context "when the license has been accepted" do
+ let(:license_confirmed?) { true }
+
+ it "returns :next" do
+ expect(client.main).to eq(:next)
+ end
+ end
+
+ context "when the license has not been accepted" do
+ let(:license_confirmed?) { false }
+
+ it "opens the license dialog" do
+ expect(Y2Packager::Dialogs::InstProductLicense).to receive(:new)
+ client.main
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.0.55/test/lib/clients/repositories_test.rb new/yast2-packager-4.0.59/test/lib/clients/repositories_test.rb
--- old/yast2-packager-4.0.55/test/lib/clients/repositories_test.rb 2018-04-06 09:15:23.000000000 +0200
+++ new/yast2-packager-4.0.59/test/lib/clients/repositories_test.rb 2018-04-19 12:55:10.000000000 +0200
@@ -84,4 +84,25 @@
end
end
end
+
+ describe "#warn_service_repository" do
+ context "when the repository is managed by a service" do
+ let(:source_state) { { "name" => "repo", "service" => "some-service", "SrcId" => "1" } }
+
+ it "shows a warning message only once" do
+ expect(Yast::Popup).to receive(:Warning).with(/manual changes might be reset/).once
+ client.warn_service_repository(source_state)
+ client.warn_service_repository(source_state)
+ end
+ end
+
+ context "when the repository is not managed by a service" do
+ let(:source_state) { { "name" => "repo", "service" => "", "SrcId" => "1" } }
+
+ it "shows no warning message" do
+ expect(Yast::Popup).to_not receive(:Warning)
+ client.warn_service_repository(source_state)
+ end
+ end
+ end
end
1
0
Hello community,
here is the log from the commit of package yast2-ntp-client for openSUSE:Factory checked in at 2018-04-26 13:29:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-ntp-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ntp-client"
Thu Apr 26 13:29:31 2018 rev:105 rq:598034 version:4.0.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes 2018-03-26 12:15:09.288825318 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ntp-client.new/yast2-ntp-client.changes 2018-04-26 13:29:33.302714465 +0200
@@ -1,0 +2,14 @@
+Thu Apr 19 08:56:08 CEST 2018 - schubi(a)suse.de
+
+- Fix in checking installed chrony package while writing ntp
+ settings. (bnc#1089962)
+- 4.0.12
+
+-------------------------------------------------------------------
+Fri Apr 13 10:34:33 CEST 2018 - schubi(a)suse.de
+
+- Improved robustness if chrony has not been installed.
+ (bnc#1072345, bnc#1061035)
+- 4.0.11
+
+-------------------------------------------------------------------
Old:
----
yast2-ntp-client-4.0.10.tar.bz2
New:
----
yast2-ntp-client-4.0.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.SW1kBc/_old 2018-04-26 13:29:33.874693515 +0200
+++ /var/tmp/diff_new_pack.SW1kBc/_new 2018-04-26 13:29:33.878693369 +0200
@@ -17,7 +17,7 @@
Name: yast2-ntp-client
-Version: 4.0.10
+Version: 4.0.12
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0+
++++++ yast2-ntp-client-4.0.10.tar.bz2 -> yast2-ntp-client-4.0.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.changes new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.changes 2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.changes 2018-04-19 09:40:05.000000000 +0200
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Thu Apr 19 08:56:08 CEST 2018 - schubi(a)suse.de
+
+- Fix in checking installed chrony package while writing ntp
+ settings. (bnc#1089962)
+- 4.0.12
+
+-------------------------------------------------------------------
+Fri Apr 13 10:34:33 CEST 2018 - schubi(a)suse.de
+
+- Improved robustness if chrony has not been installed.
+ (bnc#1072345, bnc#1061035)
+- 4.0.11
+
+-------------------------------------------------------------------
Thu Mar 22 08:16:37 UTC 2018 - knut.anderssen(a)suse.com
- Permitted the use of 'listentry' element or 'ntp_server' and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.spec new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.spec 2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.spec 2018-04-19 09:40:05.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ntp-client
-Version: 4.0.10
+Version: 4.0.12
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.0.10/src/clients/ntp-client_proposal.rb new/yast2-ntp-client-4.0.12/src/clients/ntp-client_proposal.rb
--- old/yast2-ntp-client-4.0.10/src/clients/ntp-client_proposal.rb 2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/clients/ntp-client_proposal.rb 2018-04-19 09:40:05.000000000 +0200
@@ -19,6 +19,7 @@
Yast.import "String"
Yast.import "Stage"
Yast.import "PackageSystem"
+ Yast.import "Pkg"
Yast.import "Popup"
Yast.import "Progress"
Yast.import "Report"
@@ -348,20 +349,18 @@
WriteNtpSettings(ntp_servers, ntp_server, run_service)
return :success if param["write_only"]
- required_package = "chrony"
-
# In 1st stage, schedule packages for installation
if Stage.initial
Yast.import "Packages"
- Packages.addAdditionalPackage(required_package)
+ Packages.addAdditionalPackage(NtpClientClass::REQUIRED_PACKAGE)
# Otherwise, prompt user for confirming pkg installation
- elsif !PackageSystem.CheckAndInstallPackages([required_package])
+ elsif !PackageSystem.CheckAndInstallPackages([NtpClientClass::REQUIRED_PACKAGE])
Report.Error(
Builtins.sformat(
_(
"Synchronization with NTP server is not possible\nwithout package %1 installed."
),
- required_package
+ NtpClientClass::REQUIRED_PACKAGE
)
)
end
@@ -406,6 +405,19 @@
Report.Error(_("Connection to selected NTP server failed."))
end
end
+ if ui == :accept && Stage.initial
+ # checking if chrony is available for installation.
+ if UI.QueryWidget(Id(:ntp_save), :Value) == true &&
+ !Pkg.IsAvailable(NtpClientClass::REQUIRED_PACKAGE)
+ Report.Error(Builtins.sformat(
+ # TRANSLATORS: Popup message. %1 is the missing package name.
+ _("Cannot save NTP configuration because the package %1 is not available."),
+ NtpClientClass::REQUIRED_PACKAGE
+ ))
+ UI.ChangeWidget(Id(:ntp_save), :Value, false)
+ redraw = true
+ end
+ end
redraw ? :redraw : nil
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.0.10/src/lib/y2ntp_client/client/finish.rb new/yast2-ntp-client-4.0.12/src/lib/y2ntp_client/client/finish.rb
--- old/yast2-ntp-client-4.0.10/src/lib/y2ntp_client/client/finish.rb 2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/lib/y2ntp_client/client/finish.rb 2018-04-19 09:40:05.000000000 +0200
@@ -4,6 +4,7 @@
require "installation/finish_client"
Yast.import "NtpClient"
+Yast.import "Package"
module Y2NtpClient
module Client
@@ -24,6 +25,17 @@
end
def write
+ unless Package.Installed(NtpClientClass::REQUIRED_PACKAGE)
+ # Not using Pkg.PkgInstalled because it is not working correctly here.
+ # (bnc#1089962)
+ Report.Error(Builtins.sformat(
+ # TRANSLATORS: Popup message. %1 is the missing package name.
+ _("Cannot save NTP configuration because the package %1 is not installed."),
+ NtpClientClass::REQUIRED_PACKAGE
+ ))
+ return false
+ end
+
# bnc#449615, must merge the configs which Export/Import fails to do.
# User config from installation time:
# fortunately so far we only have the server address(es)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.0.10/src/modules/NtpClient.rb new/yast2-ntp-client-4.0.12/src/modules/NtpClient.rb
--- old/yast2-ntp-client-4.0.10/src/modules/NtpClient.rb 2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/modules/NtpClient.rb 2018-04-19 09:40:05.000000000 +0200
@@ -48,6 +48,9 @@
"synchronize_time"
].freeze
+ # Package which is needed for saving NTP configuration into system
+ REQUIRED_PACKAGE = "chrony".freeze
+
def main
textdomain "ntp-client"
@@ -100,7 +103,7 @@
@ad_controller = ""
# Required packages
- @required_packages = ["chrony"]
+ @required_packages = [REQUIRED_PACKAGE]
# List of known NTP servers
# server address -> information
1
0
Hello community,
here is the log from the commit of package yast2-theme for openSUSE:Factory checked in at 2018-04-26 13:29:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-theme (Old)
and /work/SRC/openSUSE:Factory/.yast2-theme.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-theme"
Thu Apr 26 13:29:22 2018 rev:156 rq:597333 version:4.0.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-theme/yast2-theme.changes 2017-10-13 14:04:43.670200338 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-theme.new/yast2-theme.changes 2018-04-26 13:29:24.459038386 +0200
@@ -1,0 +2,6 @@
+Mon Apr 16 12:58:49 UTC 2018 - mvidner(a)suse.com
+
+- Don't hard-code the role text color (bsc#1087399).
+- 4.0.4
+
+-------------------------------------------------------------------
Old:
----
yast2-theme-4.0.3.tar.bz2
New:
----
yast2-theme-4.0.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-theme.spec ++++++
--- /var/tmp/diff_new_pack.4Mrvd2/_old 2018-04-26 13:29:25.267008793 +0200
+++ /var/tmp/diff_new_pack.4Mrvd2/_new 2018-04-26 13:29:25.271008646 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-theme
#
-# 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
@@ -19,7 +19,7 @@
# YaST Oxygen icons maintained by Martin Schlander <martin.schlander () gmail ! com>
Name: yast2-theme
-Version: 4.0.3
+Version: 4.0.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-theme-4.0.3.tar.bz2 -> yast2-theme-4.0.4.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/yast2-theme/yast2-theme-4.0.3.tar.bz2 /work/SRC/openSUSE:Factory/.yast2-theme.new/yast2-theme-4.0.4.tar.bz2 differ: char 11, line 1
1
0
Hello community,
here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2018-04-26 13:29:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
and /work/SRC/openSUSE:Factory/.yast2-registration.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration"
Thu Apr 26 13:29:11 2018 rev:17 rq:597320 version:4.0.34
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2018-04-07 20:51:52.697636936 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-registration.new/yast2-registration.changes 2018-04-26 13:29:14.443405229 +0200
@@ -1,0 +2,20 @@
+Mon Apr 16 11:39:41 UTC 2018 - lslezak(a)suse.cz
+
+- Reimplemented AutoYaST autoupgrade, use the same API and workflow
+ like in a manual upgrade (bsc#1087206)
+- 4.0.34
+
+-------------------------------------------------------------------
+Tue Apr 10 13:43:12 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Select wanted release packages during SCC based offline
+ migration (bsc#1086818)
+- 4.0.33
+
+-------------------------------------------------------------------
+Mon Apr 9 09:47:09 UTC 2018 - jsrain(a)suse.cz
+
+- do not build on 32-bit architectures (bsc#1088552)
+- 4.0.32
+
+-------------------------------------------------------------------
Old:
----
yast2-registration-4.0.31.tar.bz2
New:
----
yast2-registration-4.0.34.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.onWoc6/_old 2018-04-26 13:29:14.983385451 +0200
+++ /var/tmp/diff_new_pack.onWoc6/_new 2018-04-26 13:29:14.987385305 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.0.31
+Version: 4.0.34
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -58,6 +58,9 @@
BuildRequires: yast2-update >= 3.1.36
BuildArch: noarch
+# SUSEConnect does not build for i586 and s390 and is not supported on those architectures
+# bsc#1088552
+ExcludeArch: %ix86 s390
# FIXME: it seems can we cannot move it to macros.yast, the yast-rake-ci is not
# installed into the chroot, the build fails...
++++++ yast2-registration-4.0.31.tar.bz2 -> yast2-registration-4.0.34.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/.travis.yml new/yast2-registration-4.0.34/.travis.yml
--- old/yast2-registration-4.0.31/.travis.yml 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/.travis.yml 2018-04-17 08:58:29.000000000 +0200
@@ -12,3 +12,4 @@
# the "yast-travis-ruby" script is included in the base yastdevel/ruby image
# see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-registration-image yast-travis-ruby
+ - docker run -it yast-registration-image rake check:doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/package/yast2-registration.changes new/yast2-registration-4.0.34/package/yast2-registration.changes
--- old/yast2-registration-4.0.31/package/yast2-registration.changes 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/package/yast2-registration.changes 2018-04-17 08:58:29.000000000 +0200
@@ -1,4 +1,24 @@
-------------------------------------------------------------------
+Mon Apr 16 11:39:41 UTC 2018 - lslezak(a)suse.cz
+
+- Reimplemented AutoYaST autoupgrade, use the same API and workflow
+ like in a manual upgrade (bsc#1087206)
+- 4.0.34
+
+-------------------------------------------------------------------
+Tue Apr 10 13:43:12 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Select wanted release packages during SCC based offline
+ migration (bsc#1086818)
+- 4.0.33
+
+-------------------------------------------------------------------
+Mon Apr 9 09:47:09 UTC 2018 - jsrain(a)suse.cz
+
+- do not build on 32-bit architectures (bsc#1088552)
+- 4.0.32
+
+-------------------------------------------------------------------
Thu Apr 5 16:36:49 UTC 2018 - knut.anderssen(a)suse.com
- Given a license, remember whether another one with the same
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/package/yast2-registration.spec new/yast2-registration-4.0.34/package/yast2-registration.spec
--- old/yast2-registration-4.0.31/package/yast2-registration.spec 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/package/yast2-registration.spec 2018-04-17 08:58:29.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.0.31
+Version: 4.0.34
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -61,6 +61,9 @@
BuildRequires: yast2-update >= 3.1.36
BuildArch: noarch
+# SUSEConnect does not build for i586 and s390 and is not supported on those architectures
+# bsc#1088552
+ExcludeArch: %ix86 s390
# FIXME: it seems can we cannot move it to macros.yast, the yast-rake-ci is not
# installed into the chroot, the build fails...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/src/clients/scc_auto.rb new/yast2-registration-4.0.34/src/clients/scc_auto.rb
--- old/yast2-registration-4.0.31/src/clients/scc_auto.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/src/clients/scc_auto.rb 2018-04-17 08:58:29.000000000 +0200
@@ -26,6 +26,7 @@
#
#
+require "fileutils"
require "yast/suse_connect"
require "registration/storage"
@@ -38,6 +39,7 @@
require "registration/ssl_certificate"
require "registration/url_helpers"
require "registration/ui/autoyast_config_workflow"
+require "registration/ui/offline_migration_workflow"
require "registration/erb_renderer.rb"
module Yast
@@ -187,9 +189,15 @@
# update the registration in AutoUpgrade mode if the old system was registered
if Mode.update && old_system_registered?
- updated = update_registration
- log.info "Registration updated: #{updated}"
- return updated
+ # drop all obsolete repositories and services (manual upgrade contains a dialog
+ # where the old repositories are deleted, in AY we need to do it automatically here)
+ # Note: the Update module creates automatically a backup which is restored
+ # when upgrade is aborted or crashes.
+ repo_cleanup
+
+ ret = ::Registration::UI::OfflineMigrationWorkflow.new.main
+ log.info "Migration result: #{ret}"
+ return ret == :next
end
ret = ::Registration::ConnectHelpers.catch_registration_errors do
@@ -204,6 +212,17 @@
true
end
+ # delete all previous services and repositories
+ def repo_cleanup
+ # we cannot use pkg-bindings here because loading services would trigger
+ # service and repository refresh which we want to avoid (it might easily fail)
+ old = Dir[File.join(Installation.destdir, "/etc/zypp/repos.d/*")] +
+ Dir[File.join(Installation.destdir, "/etc/zypp/services.d/*")]
+
+ log.info "Removing #{old}"
+ ::FileUtils.rm_rf(old)
+ end
+
# finish the registration process
def finish_registration
# save the registered repositories
@@ -298,10 +317,8 @@
# update the registration (system, the base product, the installed extensions)
def update_registration
return false unless update_system_registration
- return false unless update_base_product
- return false unless update_addons
- # register additional addons (e.g. originally not present in SLE11)
+ # register additional addons (e.g. originally not present in SLE11/SLE12)
register_addons
end
@@ -346,12 +363,6 @@
registration_ui.update_system
end
- # update the base product registration
- # @return [Boolean] true on success
- def update_base_product
- handle_product_service { registration_ui.update_base_product }
- end
-
# @yieldreturn [Boolean, SUSE::Connect::Remote::Product] success flag and
# remote product pair
# @return [Boolean] true on success
@@ -364,15 +375,6 @@
registration_ui.disable_update_repos(product_service)
end
-
- # @return [Boolean] true on success
- # FIXME: share with inst_scc.rb
- def update_addons
- addons = registration_ui.get_available_addons
-
- failed_addons = registration_ui.update_addons(addons, enable_updates: @config.install_updates)
- failed_addons.empty?
- end
end unless defined?(SccAutoClient)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/src/lib/registration/registration_ui.rb new/yast2-registration-4.0.34/src/lib/registration/registration_ui.rb
--- old/yast2-registration-4.0.31/src/lib/registration/registration_ui.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/src/lib/registration/registration_ui.rb 2018-04-17 08:58:29.000000000 +0200
@@ -353,7 +353,7 @@
# Register those of *selected_addons* that we can without asking
# the user for a reg code. The remaining ones are returned.
- # @param product [Array<Addon>]
+ # @param selected_addons [Array<Addon>]
# @param known_reg_codes [Hash{String => String}] addon id -> reg code
# @return [Array<Addon>] the remaining addons
def try_register_addons(selected_addons, known_reg_codes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/src/lib/registration/sw_mgmt.rb new/yast2-registration-4.0.34/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-4.0.31/src/lib/registration/sw_mgmt.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/src/lib/registration/sw_mgmt.rb 2018-04-17 08:58:29.000000000 +0200
@@ -123,7 +123,7 @@
# products use the same version and arch.
#
# @param self_update_id [String] product name to be used for get the installer updates
- # @return product [Hash,nil] with pkg-binding format; return nil if the
+ # @return [Hash,nil] with pkg-binding format; return nil if the
# given self_update_id is empty or there is no base product available
def self.installer_update_base_product(self_update_id)
return if self_update_id.empty?
@@ -508,9 +508,12 @@
end
# select products for new added extensions/modules
+ #
+ # @param addon_services [Array<SUSE::Connect::Remote::Service] List of services
+ # If it is not specified, it falls back to {Registration::Storage::Cache#addon_services}.
# @return [Boolean] true on success
- def self.select_addon_products
- addon_services = ::Registration::Storage::Cache.instance.addon_services
+ def self.select_addon_products(addon_services = nil)
+ addon_services ||= ::Registration::Storage::Cache.instance.addon_services
log.info "New addon services: #{addon_services}"
new_repos = addon_services.reduce([]) do |acc, service|
@@ -530,13 +533,18 @@
ret = products.all? { |product| Pkg.ResolvableInstall(product, :product) }
+ select_default_product_patterns unless Mode.update
+
+ ret
+ end
+
+ # Select default product patterns
+ def self.select_default_product_patterns
# preselect the default product patterns (FATE#320199)
# note: must be called *after* selecting the products
product_patterns = ProductPatterns.new
log.info "Selecting the default product patterns: #{product_patterns.names}"
product_patterns.select
-
- ret
end
# select remote addons matching the product resolvables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/src/lib/registration/ui/migration_repos_workflow.rb new/yast2-registration-4.0.34/src/lib/registration/ui/migration_repos_workflow.rb
--- old/yast2-registration-4.0.31/src/lib/registration/ui/migration_repos_workflow.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/src/lib/registration/ui/migration_repos_workflow.rb 2018-04-17 08:58:29.000000000 +0200
@@ -84,6 +84,7 @@
"register_migration_products" => [->() { register_migration_products }, true],
"activate_migration_repos" => [->() { activate_migration_repos }, true],
"select_migration_repos" => ->() { select_migration_repos },
+ "select_products" => ->() { select_products },
"store_repos_state" => ->() { store_repos_state }
}
@@ -138,12 +139,15 @@
abort: :rollback,
cancel: :rollback,
repo_selection: "select_migration_repos",
- next: "store_repos_state"
+ next: "select_products"
},
"select_migration_repos" => {
abort: :rollback,
cancel: :rollback,
- next: "store_repos_state"
+ next: "select_products"
+ },
+ "select_products" => {
+ next: "store_repos_state"
},
"store_repos_state" => {
next: :next
@@ -154,11 +158,8 @@
# if the system is not registered
# @return [Symbol] workflow symbol, :next if registered, :abort when not
def registration_check
- # handle system upgrade (fate#323163)
- if Yast::Stage.initial && Yast::Mode.update
- log.info "System upgrade mode detected"
- return system_upgrade_check
- end
+ ret = registration_check_at_installation
+ return ret if ret
return :next if Registration.is_registered?
@@ -174,6 +175,23 @@
register_system
end
+ # check the current registration status
+ # @return [nil, Symbol] the workflow symbol (:next, :skip) or nil if not
+ # in an installation
+ def registration_check_at_installation
+ # handle system upgrade (fate#323163)
+ return nil unless Yast::Stage.initial
+ # test autoupgrade first, Mode.update covers the autoupgrade as well
+ return registration_check_at_autoupgrade if Yast::Mode.autoupgrade
+ return system_upgrade_check if Yast::Mode.update
+
+ nil
+ end
+
+ def registration_check_at_autoupgrade
+ Registration.is_registered? ? :next : :skip
+ end
+
# run the registration module to register the system
# @return [Symbol] the registration result
def register_system
@@ -246,9 +264,11 @@
addons =
Addon.registered_not_installed.each_with_object([]) do |addon, result|
- if Yast::Popup.YesNoHeadline(addon.friendly_name, (msg % addon.friendly_name))
- result << SwMgmt.remote_product(addon.to_h)
- end
+ next unless Yast::Mode.auto || Yast::Popup.YesNoHeadline(
+ addon.friendly_name, (msg % addon.friendly_name)
+ )
+
+ result << SwMgmt.remote_product(addon.to_h)
end
products.concat(addons)
@@ -307,6 +327,10 @@
release_type: nil
)
+ load_migrations_for_products(products, remote_product)
+ end
+
+ def load_migrations_for_products(products, remote_product)
log.info "Loading offline migrations for target product: #{remote_product.inspect}"
log.info "Installed products: #{products.inspect}"
self.migrations = registration_ui.offline_migration_products(products, remote_product)
@@ -314,7 +338,7 @@
if migrations.empty?
# TRANSLATORS: Error message
Yast::Report.Error(_("No migration product found."))
- return :empty
+ return Yast::Mode.auto ? :abort : :empty
end
:next
@@ -350,6 +374,8 @@
# run the migration target selection dialog
# @return [Symbol] workflow symbol (:next or :abort)
def select_migration_products
+ return select_migration_products_autoyast if Yast::Mode.auto
+
log.info "Displaying migration target selection dialog"
dialog = MigrationSelectionDialog.new(migrations, SwMgmt.installed_products)
ret = dialog.run
@@ -363,6 +389,20 @@
ret
end
+ # Select the migration product in the AutoYaST mode
+ # @return [Symbol] workflow symbol (:next)
+ def select_migration_products_autoyast
+ # TODO: for now simply select the first found migration (bsc#1087206#c7)
+ # later we can improve this (either choose the migration with higher product versions
+ # or allow selecting the migration in the AY profile)
+ self.selected_migration = migrations.first
+ self.manual_repo_selection = false
+ log.warn "More than one migration available, using the first one" if migrations.size > 1
+ log.info "Selected migration: #{selected_migration}"
+
+ :next
+ end
+
# collect products to migrate
# @return [Array<Hash>] installed or registered products
def products_to_migrate
@@ -451,7 +491,9 @@
migration_repos.services << service
end
- if migration_repos.service_with_update_repo?
+ if Yast::Mode.auto
+ migration_repos.install_updates = ::Registration::Storage::Config.instance.install_updates
+ elsif migration_repos.service_with_update_repo?
migration_repos.install_updates = registration_ui.install_updates?
end
@@ -466,6 +508,15 @@
UI::MigrationReposSelectionDialog.run
end
+ # Select products for migration
+ #
+ # It causes the *-release packages to be installed (see bsc#1086818 for
+ # further details).
+ def select_products
+ SwMgmt.select_addon_products(registered_services)
+ :next
+ end
+
def store_repos_state
RepoStateStorage.instance.write
:next
@@ -491,6 +542,7 @@
# (unregistered system or explicitly requested by user), :next =>
# continue with the SCC/SMT based upgrade
def system_upgrade_check
+ log.info "System upgrade mode detected"
# media based upgrade requested by user
if Yast::Linuxrc.InstallInf("MediaUpgrade") == "1"
explicit_media_upgrade
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/src/lib/registration/ui/regservice_selection_dialog.rb new/yast2-registration-4.0.34/src/lib/registration/ui/regservice_selection_dialog.rb
--- old/yast2-registration-4.0.31/src/lib/registration/ui/regservice_selection_dialog.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/src/lib/registration/ui/regservice_selection_dialog.rb 2018-04-17 08:58:29.000000000 +0200
@@ -85,7 +85,7 @@
# It's needed because the "scc" option is not a proper service, just a
# special value.
#
- # @param [SlpServiceClass::Service,String] Service to describe
+ # @param service [SlpServiceClass::Service,String] Service to describe
# @return [String] Service description
#
# @see Yast::Dialogs::ServiceSelection#service_to_description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/test/migration_repos_workflow_spec.rb new/yast2-registration-4.0.34/test/migration_repos_workflow_spec.rb
--- old/yast2-registration-4.0.31/test/migration_repos_workflow_spec.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/test/migration_repos_workflow_spec.rb 2018-04-17 08:58:29.000000000 +0200
@@ -151,6 +151,15 @@
expect(subject.run_sequence).to eq(:next)
end
+ it "selects products to install" do
+ set_success_expectations
+ expect(Registration::SwMgmt).to receive(:select_addon_products) do |services|
+ expect(services.first.id).to eq(1311)
+ end
+
+ subject.run_sequence
+ end
+
it "displays the custom repository selection if required" do
set_success_expectations
@@ -238,6 +247,23 @@
allow(Registration::UrlHelpers).to receive(:registration_url)
end
+ context "no migration product found" do
+ before do
+ expect(Y2Packager::ProductUpgrade).to receive(:new_base_product).and_return(nil)
+ allow(Yast::Report).to receive(:Error)
+ end
+
+ it "displays a warning popup" do
+ expect(Yast::Report).to receive(:Error).with(/Cannot find a base product/)
+ subject.send(:load_migration_products_offline, activated_products)
+ end
+
+ it "returns :empty" do
+ ret = subject.send(:load_migration_products_offline, activated_products)
+ expect(ret).to eq(:empty)
+ end
+ end
+
it "loads the possible migrations from the server" do
subject.send(:load_migration_products_offline, activated_products)
expect(subject.send(:migrations)).to_not be_empty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.31/test/sw_mgmt_spec.rb new/yast2-registration-4.0.34/test/sw_mgmt_spec.rb
--- old/yast2-registration-4.0.31/test/sw_mgmt_spec.rb 2018-04-06 09:27:49.000000000 +0200
+++ new/yast2-registration-4.0.34/test/sw_mgmt_spec.rb 2018-04-17 08:58:29.000000000 +0200
@@ -268,13 +268,12 @@
end
describe ".select_addon_products" do
+ let(:legacy_services) { load_yaml_fixture("legacy_module_services.yml") }
+
before do
allow_any_instance_of(Yast::ProductPatterns).to receive(:names).and_return([])
allow_any_instance_of(Yast::ProductPatterns).to receive(:select)
- legacy_services = load_yaml_fixture("legacy_module_services.yml")
- allow(::Registration::Storage::Cache).to receive(:instance)
- .and_return(double("addon_services" => legacy_services))
allow(subject).to receive(:service_repos).with(legacy_services.first)
.and_return(load_yaml_fixture("legacy_module_repositories.yml"))
allow(Yast::Pkg).to receive(:ResolvableProperties)
@@ -285,13 +284,38 @@
it "selects new addon products for installation" do
expect(Yast::Pkg).to receive(:ResolvableInstall).with("sle-module-legacy", :product)
- subject.select_addon_products
+ subject.select_addon_products(legacy_services)
end
it "selects the default patterns for the selected products" do
expect_any_instance_of(Yast::ProductPatterns).to receive(:select)
- subject.select_addon_products
+ subject.select_addon_products(legacy_services)
+ end
+
+ context "when no services list is given" do
+ before do
+ allow(::Registration::Storage::Cache).to receive(:instance)
+ .and_return(double("addon_services" => legacy_services))
+ end
+
+ it "defaults to the cached list of addon services" do
+ expect(Yast::Pkg).to receive(:ResolvableInstall).with("sle-module-legacy", :product)
+
+ subject.select_addon_products
+ end
+ end
+
+ context "during update" do
+ before do
+ allow(Yast::Mode).to receive(:update).and_return(true)
+ end
+
+ it "does not select default patterns for the selected products" do
+ expect(Yast::ProductPatterns).to_not receive(:new)
+
+ subject.select_addon_products(legacy_services)
+ end
end
end
1
0
Hello community,
here is the log from the commit of package yast2-vm for openSUSE:Factory checked in at 2018-04-26 13:29:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-vm (Old)
and /work/SRC/openSUSE:Factory/.yast2-vm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-vm"
Thu Apr 26 13:29:03 2018 rev:79 rq:597119 version:4.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-vm/yast2-vm.changes 2018-02-13 10:24:09.180444061 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-vm.new/yast2-vm.changes 2018-04-26 13:29:04.195780563 +0200
@@ -1,0 +2,27 @@
+Fri Apr 13 08:34:25 UTC 2018 - knut.anderssen(a)suse.com
+
+- Use the new firewalld API (bsc#1083455)
+- 4.0.1
+
+-------------------------------------------------------------------
+Thu Apr 12 15:22:44 MDT 2018 - carnold(a)suse.com
+
+- bsc#1086487 - YaST2 segfault when virt-manager is installed but
+ not yast2-vm
+- bsc#1083455 - Internal error in yast configuration part
+ "Relocation Server Configuration" - "Service with name
+ 'libvirtd-relocation-server' does not exist"
+- bsc#1089255 - yast install hypervisor and tools not working
+ correctly
+- bsc#1088338 - yast2 vm tries to install
+ patterns-openSUSE-kvm_server
+- Remove all xend code from Relocation Server. It is no longer
+ supported.
+
+-------------------------------------------------------------------
+Fri Apr 6 18:54:53 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
Old:
----
yast2-vm-3.2.5.tar.bz2
New:
----
yast2-vm-4.0.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-vm.spec ++++++
--- /var/tmp/diff_new_pack.lTN53D/_old 2018-04-26 13:29:04.655763715 +0200
+++ /var/tmp/diff_new_pack.lTN53D/_new 2018-04-26 13:29:04.659763569 +0200
@@ -17,13 +17,12 @@
Name: yast2-vm
-Version: 3.2.5
+Version: 4.0.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
-ExclusiveArch: aarch64 %ix86 x86_64 s390x
BuildRequires: perl-XML-Writer
BuildRequires: update-desktop-files
BuildRequires: yast2
++++++ yast2-vm-3.2.5.tar.bz2 -> yast2-vm-4.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/package/yast2-vm.changes new/yast2-vm-4.0.1/package/yast2-vm.changes
--- old/yast2-vm-3.2.5/package/yast2-vm.changes 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/package/yast2-vm.changes 2018-04-13 15:02:28.000000000 +0200
@@ -1,4 +1,31 @@
-------------------------------------------------------------------
+Fri Apr 13 08:34:25 UTC 2018 - knut.anderssen(a)suse.com
+
+- Use the new firewalld API (bsc#1083455)
+- 4.0.1
+
+-------------------------------------------------------------------
+Thu Apr 12 15:22:44 MDT 2018 - carnold(a)suse.com
+
+- bsc#1086487 - YaST2 segfault when virt-manager is installed but
+ not yast2-vm
+- bsc#1083455 - Internal error in yast configuration part
+ "Relocation Server Configuration" - "Service with name
+ 'libvirtd-relocation-server' does not exist"
+- bsc#1089255 - yast install hypervisor and tools not working
+ correctly
+- bsc#1088338 - yast2 vm tries to install
+ patterns-openSUSE-kvm_server
+- Remove all xend code from Relocation Server. It is no longer
+ supported.
+
+-------------------------------------------------------------------
+Fri Apr 6 18:54:53 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
Fri Feb 9 12:19:42 MST 2018 - carnold(a)suse.com
- The check for TextMode was in the wrong place and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/package/yast2-vm.spec new/yast2-vm-4.0.1/package/yast2-vm.spec
--- old/yast2-vm-3.2.5/package/yast2-vm.spec 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/package/yast2-vm.spec 2018-04-13 15:02:28.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-vm
#
-# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX Products 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,14 +17,13 @@
Name: yast2-vm
-Version: 3.2.5
+Version: 4.0.1
Release: 0
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
-ExclusiveArch: aarch64 %ix86 x86_64 s390x
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-testsuite
BuildRequires: yast2-bootloader >= 3.1.35
Requires: yast2-bootloader >= 3.1.35
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/include/relocation-server/complex.rb new/yast2-vm-4.0.1/src/include/relocation-server/complex.rb
--- old/yast2-vm-3.2.5/src/include/relocation-server/complex.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/include/relocation-server/complex.rb 2018-04-13 15:02:28.000000000 +0200
@@ -69,164 +69,6 @@
ret ? :next : :abort
end
- def InitGlobalState
- server_stat = Convert.to_boolean(
- UI.QueryWidget(Id("xend-relocation-server"), :Value)
- )
- ssl_server_stat = Convert.to_boolean(
- UI.QueryWidget(Id("xend-relocation-ssl-server"), :Value)
- )
- stat = server_stat || ssl_server_stat
- UI.ChangeWidget(Id("xend-relocation-address"), :Enabled, stat)
- UI.ChangeWidget(Id("xend-relocation-hosts-allow"), :Enabled, stat)
- if stat
- CWMFirewallInterfaces.EnableOpenFirewallWidget
- else
- CWMFirewallInterfaces.DisableOpenFirewallWidget
- end
- stat = server_stat && ssl_server_stat
- UI.ChangeWidget(Id("xend-relocation-ssl"), :Enabled, stat)
-
- nil
- end
-
- def InitServerState
- stat = Convert.to_boolean(
- UI.QueryWidget(Id("xend-relocation-server"), :Value)
- )
- UI.ChangeWidget(Id("xend-relocation-port"), :Enabled, stat)
- InitGlobalState()
-
- nil
- end
-
- def InitSSLServerState
- stat = Convert.to_boolean(
- UI.QueryWidget(Id("xend-relocation-ssl-server"), :Value)
- )
- UI.ChangeWidget(Id("xend-relocation-ssl-port"), :Enabled, stat)
- UI.ChangeWidget(Id("xend-relocation-server-ssl-key-file"), :Enabled, stat)
- UI.ChangeWidget(
- Id("xend-relocation-server-ssl-cert-file"),
- :Enabled,
- stat
- )
- UI.ChangeWidget(Id("browse_ssl_key_file"), :Enabled, stat)
- UI.ChangeWidget(Id("browse_ssl_cert_file"), :Enabled, stat)
- InitGlobalState()
-
- nil
- end
-
- def InitXendConfigurationDialog(id)
- Builtins.foreach(
- [
- "xend-relocation-server",
- "xend-relocation-ssl-server",
- "xend-relocation-ssl"
- ]
- ) do |key|
- UI.ChangeWidget(
- Id(key),
- :Value,
- RelocationServer.GetXendOption(key) == "yes"
- )
- end
-
- Builtins.foreach(
- [
- "xend-relocation-server-ssl-key-file",
- "xend-relocation-server-ssl-cert-file",
- "xend-relocation-address",
- "xend-relocation-hosts-allow"
- ]
- ) do |key|
- UI.ChangeWidget(Id(key), :Value, RelocationServer.GetXendOption(key))
- end
-
- Builtins.foreach(["xend-relocation-port", "xend-relocation-ssl-port"]) do |key|
- UI.ChangeWidget(
- Id(key),
- :Value,
- Builtins.tointeger(RelocationServer.GetXendOption(key))
- )
- end
-
- InitServerState()
- InitSSLServerState()
-
- nil
- end
-
- def HandleXendConfigurationDialog(id, event)
- event = deep_copy(event)
- action = Ops.get(event, "ID")
-
- if action == "browse_ssl_key_file"
- new_filename = UI.AskForExistingFile("", "", _("Select SSL Key File"))
- if new_filename != nil && new_filename != ""
- UI.ChangeWidget(
- Id("xend-relocation-server-ssl-key-file"),
- :Value,
- new_filename
- )
- end
- elsif action == "browse_ssl_cert_file"
- new_filename = UI.AskForExistingFile("", "", _("Select SSL Cert File"))
- if new_filename != nil && new_filename != ""
- UI.ChangeWidget(
- Id("xend-relocation-server-ssl-cert-file"),
- :Value,
- new_filename
- )
- end
- elsif action == "xend-relocation-server"
- InitServerState()
- elsif action == "xend-relocation-ssl-server"
- InitSSLServerState()
- end
- nil
- end
-
- def StoreXendConfigurationDialog(id, event)
- event = deep_copy(event)
- RelocationServer.SetModified
-
- Builtins.foreach(
- [
- "xend-relocation-server",
- "xend-relocation-ssl-server",
- "xend-relocation-ssl"
- ]
- ) do |key|
- value = Convert.to_boolean(UI.QueryWidget(Id(key), :Value)) == true ? "yes" : "no"
- if value != RelocationServer.GetXendOption(key)
- RelocationServer.SetXendOption(key, value)
- end
- end
-
- Builtins.foreach(
- [
- "xend-relocation-server-ssl-key-file",
- "xend-relocation-server-ssl-cert-file",
- "xend-relocation-address",
- "xend-relocation-hosts-allow",
- "xend-relocation-port",
- "xend-relocation-ssl-port"
- ]
- ) do |key|
- value = Builtins.tostring(UI.QueryWidget(Id(key), :Value))
- if value != RelocationServer.GetXendOption(key)
- RelocationServer.SetXendOption(
- key,
- Builtins.tostring(UI.QueryWidget(Id(key), :Value))
- )
- end
- end
-
- nil
- end
-
def InitLibvirtFireWall
tunneled_migration = Convert.to_boolean(
UI.QueryWidget(Id("tunneled_migration"), :Value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/include/relocation-server/dialogs.rb new/yast2-vm-4.0.1/src/include/relocation-server/dialogs.rb
--- old/yast2-vm-3.2.5/src/include/relocation-server/dialogs.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/include/relocation-server/dialogs.rb 2018-04-13 15:02:28.000000000 +0200
@@ -37,100 +37,6 @@
Yast.include include_target, "relocation-server/helps.rb"
end
- def XendConfigurationDialogContent
- VBox(
- Frame(
- _("Global Settings"),
- VBox(
- Left(
- InputField(
- Id("xend-relocation-address"),
- Opt(:hstretch),
- _("Relocation Address:")
- )
- ),
- Left(
- InputField(
- Id("xend-relocation-hosts-allow"),
- Opt(:hstretch),
- _("Allowed Hosts:")
- )
- ),
- Left(CheckBox(Id("xend-relocation-ssl"), _("Use SSL as Default"))),
- HStretch(),
- VStretch()
- )
- ),
- Frame(
- _("non-SSL Server"),
- VBox(
- Left(
- HSquash(
- IntField(Id("xend-relocation-port"), _("Port:"), 1, 65535, 1)
- )
- ),
- Left(
- CheckBox(Id("xend-relocation-server"), Opt(:notify), _("Enable"))
- ),
- VStretch()
- )
- ),
- Frame(
- _("SSL Server"),
- VBox(
- Left(
- HSquash(
- IntField(
- Id("xend-relocation-ssl-port"),
- _("Port:"),
- 1,
- 65535,
- 1
- )
- )
- ),
- Left(
- HBox(
- InputField(
- Id("xend-relocation-server-ssl-key-file"),
- Opt(:hstretch),
- _("SSL Key File:")
- ),
- HSpacing(1),
- VBox(
- Label(""),
- PushButton(Id("browse_ssl_key_file"), Label.BrowseButton)
- )
- )
- ),
- Left(
- HBox(
- InputField(
- Id("xend-relocation-server-ssl-cert-file"),
- Opt(:hstretch),
- _("SSL Cert File:")
- ),
- HSpacing(1),
- VBox(
- Label(""),
- PushButton(Id("browse_ssl_cert_file"), Label.BrowseButton)
- )
- )
- ),
- Left(
- CheckBox(
- Id("xend-relocation-ssl-server"),
- Opt(:notify),
- _("Enable")
- )
- ),
- VStretch()
- )
- ),
- Frame(_("Firewall"), VBox("fw-xend", VStretch()))
- )
- end
-
def LibvirtConfigurationDialogContent
VBox(
Frame(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/include/relocation-server/helps.rb new/yast2-vm-4.0.1/src/include/relocation-server/helps.rb
--- old/yast2-vm-3.2.5/src/include/relocation-server/helps.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/include/relocation-server/helps.rb 2018-04-13 15:02:28.000000000 +0200
@@ -51,14 +51,6 @@
"An additional dialog informs whether it is safe to do so.\n" +
"</p>\n"
),
- "xend_configuration" => _(
- "<p><b>Relocation Address</b><br>\n" +
- "Address xend should listen on for relocation-socket connections</p>\n" +
- "<p><b>Allowed Hosts</b><br>\n" +
- "The hosts allowed to talk to the relocation port. If this is empty, then all connections are allowed. Otherwise, this should be a space-separated sequence of regular expressions. Any host with a fully-qualified domain name or an IP address that matches one of these regular expressions will be accepted.</p>\n" +
- "<p><b>SSL Key File/SSL Cert File</b><br>\n" +
- "SSL key and certificate to use for the ssl relocation interface</p>"
- ),
"libvirt_configuration" => _(
"<p><b><big>Tunneled migration</big></b><br>\n" +
"The source host libvirtd opens a direct connection to the destination host libvirtd for sending migration data. This allows the option of encrypting the data stream.</p>\n" +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/include/relocation-server/wizards.rb new/yast2-vm-4.0.1/src/include/relocation-server/wizards.rb
--- old/yast2-vm-3.2.5/src/include/relocation-server/wizards.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/include/relocation-server/wizards.rb 2018-04-13 15:02:28.000000000 +0200
@@ -48,29 +48,6 @@
# @return sequence result
def MainSequence
widgets = {
- "fw-xend" => CWMFirewallInterfaces.CreateOpenFirewallWidget(
- {
- "services" => ["service:xend-relocation-server"],
- "display_details" => true
- }
- ),
- "xend" => {
- "widget" => :custom,
- "help" => Ops.get_string(@HELPS, "xend_configuration", ""),
- "custom_widget" => XendConfigurationDialogContent(),
- "handle" => fun_ref(
- method(:HandleXendConfigurationDialog),
- "symbol (string, map)"
- ),
- "init" => fun_ref(
- method(:InitXendConfigurationDialog),
- "void (string)"
- ),
- "store" => fun_ref(
- method(:StoreXendConfigurationDialog),
- "void (string, map)"
- )
- },
"libvirt" => {
"widget" => :custom,
"help" => Ops.get_string(@HELPS, "libvirt_configuration", ""),
@@ -91,8 +68,8 @@
"fw-libvirt" => CWMFirewallInterfaces.CreateOpenFirewallWidget(
{
"services" => [
- "service:libvirtd-relocation-server",
- "service:sshd"
+ "libvirtd-relocation-server",
+ "ssh"
],
"display_details" => true
}
@@ -100,11 +77,6 @@
}
tabs = {
- "xend_configuration" => {
- "header" => _("&Xend"),
- "widget_names" => ["xend", "fw-xend"],
- "contents" => XendConfigurationDialogContent()
- },
"kvm_configuration" => {
"header" => _("&KVM"),
"widget_names" => ["libvirt", "fw-libvirt"],
@@ -117,32 +89,22 @@
}
}
- if !RelocationServer.is_xend()
- Builtins.remove(tabs, "xend_configuration")
- if !Arch.is_kvm
- Builtins.remove(tabs, "kvm_configuration")
- else
- Builtins.remove(tabs, "libxl_configuration")
- end
- else
+ if !Arch.is_kvm
Builtins.remove(tabs, "kvm_configuration")
+ else
+ Builtins.remove(tabs, "libxl_configuration")
end
wd_arg = {
- "tab_order" => ["xend_configuration"],
+ "tab_order" => ["libxl_configuration"],
"tabs" => tabs,
"widget_descr" => widgets,
- "initial_tab" => "xend_configuration"
+ "initial_tab" => "libxl_configuration"
}
- if !RelocationServer.is_xend()
- if Arch.is_kvm
- Ops.set(wd_arg, "tab_order", ["kvm_configuration"])
- Ops.set(wd_arg, "initial_tab", "kvm_configuration")
- else
- Ops.set(wd_arg, "tab_order", ["libxl_configuration"])
- Ops.set(wd_arg, "initial_tab", "libxl_configuration")
- end
+ if Arch.is_kvm
+ Ops.set(wd_arg, "tab_order", ["kvm_configuration"])
+ Ops.set(wd_arg, "initial_tab", "kvm_configuration")
end
wd = { "tab" => CWMTab.CreateWidget(wd_arg) }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/modules/RelocationServer.rb new/yast2-vm-4.0.1/src/modules/RelocationServer.rb
--- old/yast2-vm-3.2.5/src/modules/RelocationServer.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/modules/RelocationServer.rb 2018-04-13 15:02:28.000000000 +0200
@@ -29,9 +29,11 @@
# Representation of the configuration of relocation-server.
# Input and output routines.
require "yast"
+require "y2firewall/firewalld"
module Yast
class RelocationServerClass < Module
+ include Yast::Logger
def main
Yast.import "UI"
textdomain "relocation-server"
@@ -44,30 +46,10 @@
Yast.import "Message"
Yast.import "Service"
Yast.import "FileUtils"
- Yast.import "SuSEFirewall"
- Yast.import "SuSEFirewallServices"
# Data was modified?
@modified = false
- # map of xend settings
- @SETTINGS = {}
-
- @DEFAULT_CONFIG = {
- "xend-relocation-server" => "no",
- "xend-relocation-ssl-server" => "no",
- "xend-relocation-port" => "8002",
- "xend-relocation-ssl-port" => "8003",
- "xend-relocation-server-ssl-key-file" => "xmlrpc.key",
- "xend-relocation-server-ssl-cert-file" => "xmlrpc.cert",
- "xend-relocation-ssl" => "no",
- "xend-relocation-address" => "",
- "xend-relocation-hosts-allow" => "^localhost$ ^localhost\\.localdomain$"
- }
-
- # Describes whether the daemon is running
- @xend_is_running = false
-
@libvirtd_default_ports = "49152:49215"
@libvirtd_ports = []
@@ -83,6 +65,13 @@
}
end
+ # Convenience method for obtaining a firewalld singleton instance
+ #
+ # @return [Y2Firewall::Firewalld] singleton instance
+ def firewalld
+ Y2Firewall::Firewalld.instance
+ end
+
# Returns whether the configuration has been modified.
def GetModified
@modified
@@ -95,15 +84,6 @@
nil
end
- # Determine if we are using the libxl toolstack
- def is_xend
- if !Arch.is_xen0 || !FileUtils.Exists("/etc/vm/xend-config.sxp") || !FileUtils.Exists("/usr/sbin/xend")
- return false
- end
-
- true
- end
-
# Returns a confirmation popup dialog whether user wants to really abort.
def Abort
Popup.ReallyAbort(GetModified())
@@ -119,103 +99,6 @@
false
end
- # Returns the Xend Option as a list of strings.
- #
- # @param [String] option_key of the xend configuration
- # @return [String] with option_values
- def GetXendOption(option_key)
- Ops.get(@SETTINGS, option_key, Ops.get(@DEFAULT_CONFIG, option_key, ""))
- end
-
- # Returns default Xend Option as a list of strings.
- #
- # @param [String] option_key of the Xend configuration
- # @return [String] with option_values
-
- def GetDefaultXendOption(option_key)
- Ops.get(@DEFAULT_CONFIG, option_key, "")
- end
-
- # Sets values for an option.
- #
- # @param [String] option_key with the Xend configuration key
- # @param string option_values with the Xend configuration values
- def SetXendOption(option_key, option_vals)
- Ops.set(@SETTINGS, option_key, option_vals)
-
- nil
- end
-
- # Reads current xend configuration
- def ReadXendSettings
- Builtins.foreach(SCR.Dir(path(".etc.xen.xend-config"))) do |key|
- val = Convert.to_string(
- SCR.Read(Builtins.add(path(".etc.xen.xend-config"), key))
- )
- Ops.set(@SETTINGS, key, val) if val != nil
- end
-
- Builtins.y2milestone("Xend configuration has been read: %1", @SETTINGS)
- true
- end
-
- # Writes current xend configuration
- def WriteXendSettings
- Builtins.y2milestone("Writing Xend configuration: %1", @SETTINGS)
-
- Builtins.foreach(@SETTINGS) do |option_key, option_val|
- SCR.Write(
- Builtins.add(path(".etc.xen.xend-config"), option_key),
- option_val
- )
- end
- # This is very important
- # it flushes the cache, and stores the configuration on the disk
- SCR.Write(path(".etc.xen.xend-config"), nil)
-
- port = GetXendOption("xend-relocation-port")
- ssl_port = GetXendOption("xend-relocation-ssl-port")
- ports_list = [port, ssl_port]
- SuSEFirewallServices.SetNeededPortsAndProtocols(
- "service:xend-relocation-server",
- { "tcp_ports" => ports_list }
- )
-
- true
- end
-
- # Reads current xend status
- def ReadXendService
- xend = "/usr/sbin/xend"
- retval = 1
- if FileUtils.Exists(xend)
- retval = Convert.to_integer(SCR.Execute(path(".target.bash_output"), Builtins.sformat("%1 status", xend)))
- end
- if retval == 0
- @xend_is_running = true
- Builtins.y2milestone("Xend is running")
- else
- @xend_is_running = false
- Builtins.y2milestone("Xend is not running")
- end
-
- true
- end
-
- # Restarts the xend when the daemon was running when starting the configuration
- def WriteXendService
- all_ok = true
-
- if @xend_is_running
- Builtins.y2milestone("Restarting xend daemon")
- all_ok = Service.Restart("xend")
- else
- Builtins.y2milestone("Xend is not running - leaving...")
- end
-
- all_ok
- end
-
def GetLibVirtdPorts
deep_copy(@libvirtd_ports)
end
@@ -237,6 +120,8 @@
nil
end
+ FWD_LIBVIRTD_SERVICE = "libvirtd-relocation-server".freeze
+
def ReadLibvirtServices
if !Package.Installed("libvirt-daemon")
Builtins.y2milestone("libvirt is not installed")
@@ -245,14 +130,14 @@
@libvirtd_enabled = Service.Enabled("libvirtd")
@sshd_enabled = Service.Enabled("sshd")
- if Service.Status("libvirtd") == 0
+ if Service.active?("libvirtd")
@libvirtd_is_running = true
Builtins.y2milestone("libvirtd is running")
else
@libvirtd_is_running = false
Builtins.y2milestone("libvirtd is not running")
end
- if Service.Status("sshd") == 0
+ if Service.active?("sshd")
@sshd_is_running = true
Builtins.y2milestone("sshd is running")
else
@@ -260,9 +145,13 @@
Builtins.y2milestone("sshd is not running")
end
- ports = SuSEFirewallServices.GetNeededTCPPorts(
- "service:libvirtd-relocation-server"
- )
+ begin
+ fwd_libvirt = firewalld.find_service(FWD_LIBVIRTD_SERVICE)
+ ports = fwd_libvirt.tcp_ports
+ rescue Y2Firewall::Firewalld::Service::NotFound
+ ports = []
+ end
+
@libvirtd_ports = Builtins.filter(ports) do |s|
s != @libvirtd_default_ports
end
@@ -291,10 +180,11 @@
)
end
end
- SuSEFirewallServices.SetNeededPortsAndProtocols(
- "service:libvirtd-relocation-server",
- { "tcp_ports" => @libvirtd_ports }
- )
+ begin
+ Y2Firewall::Firewalld::Service.modify_ports(name: FWD_LIBVIRTD_SERVICE, tcp_ports: @libvirtd_ports)
+ rescue Y2Firewall::Firewalld::Service::NotFound
+ y2error("Firewalld '#{FWD_LIBVIRTD_SERVICE}' service is not available.")
+ end
end
all_ok
@@ -306,32 +196,11 @@
# RelocationServer read dialog caption
caption = _("Initializing relocation-server Configuration")
- xen_steps = 3
libvirt_steps = 2
sl = 500
Builtins.sleep(sl)
- xen_stg = [
- # Progress stage 1/3
- _("Read the current xend configuration"),
- # Progress stage 2/3
- _("Read the current xend state"),
- # Progress stage 3/3
- _("Read firewall settings")
- ]
-
- xen_tits = [
- # Progress step 1/3
- _("Reading the current xend configuration..."),
- # Progress step 2/3
- _("Reading the current xend state..."),
- # Progress step 3/3
- _("Reading firewall settings..."),
- # Progress finished
- Message.Finished
- ]
-
libvirt_stg = [
# Progress stage 1/2
_("Read firewall settings"),
@@ -348,47 +217,25 @@
Message.Finished
]
- if is_xend()
- Progress.New(caption, " ", xen_steps, xen_stg, xen_tits, "")
- else
- Progress.New(caption, " ", libvirt_steps, libvirt_stg, libvirt_tits, "")
- end
-
- if is_xend()
- return false if PollAbort()
- Progress.NextStage
- # Error message
- Report.Error(Message.CannotReadCurrentSettings) if !ReadXendSettings()
- Builtins.sleep(sl)
-
- return false if PollAbort()
- Progress.NextStage
- # Error message
- if !ReadXendService()
- Report.Error(_("Cannot read the current Xend state."))
- end
- Builtins.sleep(sl)
- end
+ Progress.New(caption, " ", libvirt_steps, libvirt_stg, libvirt_tits, "")
return false if PollAbort()
Progress.NextStage
progress_state = Progress.set(false)
# Error message
- Report.Warning(_("Cannot read firewall settings.")) if !SuSEFirewall.Read
+ Report.Warning(_("Cannot read firewall settings.")) if !firewalld.read
Progress.set(progress_state)
Builtins.sleep(sl)
- if Arch.is_kvm || !is_xend()
- return false if PollAbort()
- Progress.NextStage
- # Error message
- if !ReadLibvirtServices()
- Report.Error(_("Cannot read the current libvirtd/sshd state."))
- Report.Error(Message.CannotContinueWithoutPackagesInstalled)
- return false
- end
- Builtins.sleep(sl)
+ return false if PollAbort()
+ Progress.NextStage
+ # Error message
+ if !ReadLibvirtServices()
+ Report.Error(_("Cannot read the current libvirtd/sshd state."))
+ Report.Error(Message.CannotContinueWithoutPackagesInstalled)
+ return false
end
+ Builtins.sleep(sl)
return false if PollAbort()
# Progress finished
@@ -406,31 +253,11 @@
# RelocationServer read dialog caption
caption = _("Saving relocation-server Configuration")
- xen_steps = 3
libvirt_steps = 2
sl = 500
Builtins.sleep(sl)
- xen_stg = [
- # Progress stage 1
- _("Write the Xend settings"),
- # Progress stage 2
- _("Adjust the Xend service"),
- # Progress stage 3
- _("Write firewall settings")
- ]
-
- xen_tits = [
- # Progress step 1
- _("Writing the Xend settings..."),
- # Progress step 2
- _("Adjusting the Xend service..."),
- # Progress step 3
- _("Writing firewall settings..."),
- Message.Finished
- ]
-
libvirt_stg = [
# Progress stage 1
_("Adjust the libvirtd/sshd service"),
@@ -446,39 +273,19 @@
Message.Finished
]
- if is_xend()
- Progress.New(caption, " ", xen_steps, xen_stg, xen_tits, "")
- else
- Progress.New(caption, " ", libvirt_steps, libvirt_stg, libvirt_tits, "")
- end
-
- if is_xend()
- return false if PollAbort()
- Progress.NextStage
- # Error message
- if !WriteXendSettings()
- Report.Error(_("Cannot write the xend settings."))
- end
- Builtins.sleep(sl)
+ Progress.New(caption, " ", libvirt_steps, libvirt_stg, libvirt_tits, "")
- return false if PollAbort()
- Progress.NextStage
- # Error message
- Report.Error(Message.CannotAdjustService("xend")) if !WriteXendService()
- Builtins.sleep(sl)
- else
- return false if PollAbort()
- Progress.NextStage
- # Error message
- Report.Error(Message.CannotAdjustService("xend")) if !WriteLibvirtServices()
- Builtins.sleep(sl)
- end
+ return false if PollAbort()
+ Progress.NextStage
+ # Error message
+ Report.Error(Message.CannotAdjustService("libvirt")) if !WriteLibvirtServices()
+ Builtins.sleep(sl)
return false if PollAbort()
Progress.NextStage
progress_state = Progress.set(false)
# Error message
- Report.Error(_("Cannot write firewall settings.")) if !SuSEFirewall.Write
+ Report.Error(_("Cannot write firewall settings.")) if !firewalld.write
Progress.set(progress_state)
Builtins.sleep(sl)
@@ -495,9 +302,6 @@
publish :function => :SetModified, :type => "void ()"
publish :function => :Abort, :type => "boolean ()"
publish :function => :PollAbort, :type => "boolean ()"
- publish :function => :GetXendOption, :type => "string (string)"
- publish :function => :GetDefaultXendOption, :type => "string (string)"
- publish :function => :SetXendOption, :type => "void (string, string)"
publish :function => :GetLibVirtdPorts, :type => "list <string> ()"
publish :function => :SetLibvirtdPorts, :type => "void (list <string>)"
publish :function => :GetLibvirtdOption, :type => "boolean (string)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vm-3.2.5/src/modules/VirtConfig.rb new/yast2-vm-4.0.1/src/modules/VirtConfig.rb
--- old/yast2-vm-3.2.5/src/modules/VirtConfig.rb 2018-02-12 18:44:06.000000000 +0100
+++ new/yast2-vm-4.0.1/src/modules/VirtConfig.rb 2018-04-13 15:02:28.000000000 +0200
@@ -29,22 +29,17 @@
module Yast
class VirtConfigClass < Module
-
include Yast::Logger
def main
Yast.import "UI"
-
textdomain "vm"
-
-
Yast.import "Arch"
Yast.import "OSRelease"
Yast.import "Package"
Yast.import "Progress"
Yast.import "Popup"
Yast.import "Report"
- Yast.import "SuSEFirewall"
Yast.import "Wizard"
Yast.import "Label"
Yast.import "Bootloader"
@@ -54,42 +49,6 @@
@net_path = "/sys/class/net/"
end
- def ConfigureFirewall
- Builtins.y2milestone("VirtConfig::ConfigureFirewall() started")
- ret = true
-
- # check whether the firewall option exists
- firewall_configured = false
- if Builtins.contains(
- SCR.Dir(path(".sysconfig.SuSEfirewall2")),
- "FW_FORWARD_ALWAYS_INOUT_DEV"
- )
- xen_bridge = "xenbr+"
- # read the current value
- forward = Convert.to_string(
- SCR.Read(path(".sysconfig.SuSEfirewall2.FW_FORWARD_ALWAYS_INOUT_DEV"))
- )
- Builtins.y2milestone("FW_FORWARD_ALWAYS_INOUT_DEV=%1", forward)
- if Builtins.contains(Builtins.splitstring(forward, " "), xen_bridge)
- Builtins.y2milestone("Firewall already configured!")
- firewall_configured = true # xenbr+ already exists
- end
- end
-
- if firewall_configured == false
- # add xenbr+ to the firewall configuration
- Builtins.y2milestone("Configuring firewall to allow Xen bridge...")
- progress_orig = Progress.set(false)
- SuSEFirewall.Read
- SuSEFirewall.AddXenSupport
- ret = ret && SuSEFirewall.Write
- Progress.set(progress_orig)
- end
-
- Builtins.y2milestone("VirtConfig::ConfigureFirewall returned: %1", ret)
- ret
- end
-
def isOpenSuse
Builtins.y2milestone("Checking to see if this is openSUSE ...")
distro = OSRelease.ReleaseName
@@ -360,25 +319,27 @@
log.info "VirtConfig::ConfigureDom0: Checking for Installed Patterns and Packages"
if isOpenSuse
- if isTumbleweed
- UI.ChangeWidget(Id(:xen_server), :Enabled, !Package.Installed("patterns-server-xen_server"))
- else
- UI.ChangeWidget(Id(:xen_server), :Enabled, !Package.Installed("patterns-openSUSE-xen_server"))
- end
- # On openSUSE there are no 'tools' patterns for Xen and KVM
- if Package.Installed("xen-tools") && Package.Installed("xen-libs") &&
- Package.Installed("libvirt-daemon-xen") && Package.Installed("tigervnc") &&
- Package.Installed("virt-manager")
- UI.ChangeWidget(Id(:xen_tools), :Enabled, false)
- end
- if isTumbleweed
- UI.ChangeWidget(Id(:kvm_server), :Enabled, !Package.Installed("patterns-server-kvm_server"))
- else
- UI.ChangeWidget(Id(:kvm_server), :Enabled, !Package.Installed("patterns-openSUSE-kvm_server"))
- end
- if Package.Installed("libvirt-daemon-qemu") || Package.Installed("tigervnc") ||
- Package.Installed("virt-manager")
- UI.ChangeWidget(Id(:kvm_tools), :Enabled, false)
+ UI.ChangeWidget(Id(:xen_server), :Enabled, !Package.Installed("patterns-server-xen_server"))
+ if isTumbleweed
+ # On Tumbleweed there is not a 'tools' pattern for Xen. Check for a few minimal RPMs
+ if Package.Installed("xen-tools") && Package.Installed("xen-libs") &&
+ Package.Installed("libvirt-daemon-xen") && Package.Installed("tigervnc") &&
+ Package.Installed("virt-manager")
+ UI.ChangeWidget(Id(:xen_tools), :Enabled, false)
+ end
+ else
+ UI.ChangeWidget(Id(:kvm_server), :Enabled, !Package.Installed("patterns-server-xen_tools"))
+ end
+
+ UI.ChangeWidget(Id(:kvm_server), :Enabled, !Package.Installed("patterns-server-kvm_server"))
+ if isTumbleweed
+ # On Tumbleweed there is not a 'tools' pattern for KVM. Check for a few minimal RPMs
+ if Package.Installed("libvirt-daemon-qemu") && Package.Installed("virt-manager") &&
+ Package.Installed("tigervnc")
+ UI.ChangeWidget(Id(:kvm_tools), :Enabled, false)
+ end
+ else
+ UI.ChangeWidget(Id(:kvm_tools), :Enabled, !Package.Installed("patterns-server-kvm_tools"))
end
elsif isSLES
UI.ChangeWidget(Id(:xen_server), :Enabled, !Package.Installed("patterns-server-xen_server"))
@@ -446,18 +407,19 @@
common_vm_packages = ["libvirt-client", "vm-install", "virt-install"]
end
- if isTumbleweed == true
- packages = ["patterns-server-xen_server"] if install_xen_server
- else
- packages = ["patterns-openSUSE-xen_server"] if install_xen_server
- end
- packages = packages + ["xen-tools", "xen-libs", "libvirt-daemon-xen", "libvirt-daemon-config-network", "tigervnc", "virt-manager"] if install_xen_tools
- if isTumbleweed == true
- packages = packages + ["patterns-server-kvm_server"] if install_kvm_server
- else
- packages = packages + ["patterns-openSUSE-kvm_server"] if install_kvm_server
- end
- packages = packages + ["libvirt-daemon-qemu", "libvirt-daemon-config-network", "tigervnc", "virt-manager"] if install_kvm_tools
+ packages = ["patterns-server-xen_server"] if install_xen_server
+ if isTumbleweed
+ packages = packages + ["xen-tools", "xen-libs", "libvirt-daemon-xen", "libvirt-daemon-config-network", "tigervnc", "virt-manager"] if install_xen_tools
+ else
+ packages = ["patterns-server-xen_tools"] if install_xen_tools
+ end
+
+ packages = packages + ["patterns-server-kvm_server"] if install_kvm_server
+ if isTumbleweed
+ packages = packages + ["libvirt-daemon-qemu", "libvirt-daemon-config-network", "tigervnc", "virt-manager"] if install_kvm_tools
+ else
+ packages = ["patterns-server-kvm_tools"] if install_kvm_tools
+ end
packages = packages + ["libvirt-daemon-lxc", "libvirt-daemon-config-network"] if install_lxc
result = Package.DoInstall(common_vm_packages + packages)
if result == false
@@ -610,17 +572,6 @@
Builtins.y2milestone("Start virtlogd.socket: %1", cmd)
SCR.Execute(path(".target.bash"), cmd)
- # Firewall stage - modify the firewall setting, add the xen bridge to FW_FORWARD_ALWAYS_INOUT_DEV
- # Progress::NextStage();
-
- # Configure firewall to allow xenbr+
- # success = success && ConfigureFirewall();
- # if ( success == false ) {
- # // error popup
- # Report::Error(_("Failed to configure the firewall to allow the Xen bridge") + "\n" + abortmsg);
- # return false;
- # }
-
Progress.Finish
message_kvm_ready = _(
@@ -671,7 +622,6 @@
success
end
- publish :function => :ConfigureFirewall, :type => "boolean ()"
publish :function => :isOpenSuse, :type => "boolean ()"
publish :function => :isPAEKernel, :type => "boolean ()"
publish :function => :isX86_64, :type => "boolean ()"
1
0
Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2018-04-26 13:28:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Thu Apr 26 13:28:54 2018 rev:425 rq:597095 version:4.0.71
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2018-04-07 20:51:59.053406901 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2018-04-26 13:28:56.540060962 +0200
@@ -1,0 +2,43 @@
+Mon Apr 16 13:47:10 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Do not crash when reading trying to determine available locales
+ for some licenses (bsc#1089610).
+- 4.0.71
+
+-------------------------------------------------------------------
+Mon Apr 16 14:48:27 CEST 2018 - snwint(a)suse.de
+
+- save_y2logs: save kernel messages and udev log (bsc#1089647,
+ bsc#1085212)
+- 4.0.70
+
+-------------------------------------------------------------------
+Thu Apr 12 13:38:26 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Handle input/output errors in the DoneProvide package callback
+ (bsc#1088682).
+- 4.0.69
+
+-------------------------------------------------------------------
+Thu Apr 12 12:01:49 UTC 2018 - knut.anderssen(a)suse.com
+
+- Wizard: Fall back to smaller and/or hicolor icon if the icon for
+ the launched module cannot be found (bsc#1087224)
+- 4.0.68
+
+-------------------------------------------------------------------
+Tue Apr 10 11:38:23 UTC 2018 - lslezak(a)suse.cz
+
+- Do not use the solver for finding the best product upgrade
+ candidate, it does not work correctly in the SLES + sle-module-hpc
+ => SLES_HPC case (bsc#1086734)
+- 4.0.67
+
+-------------------------------------------------------------------
+Tue Apr 10 07:25:08 UTC 2018 - jreidinger(a)suse.com
+
+- Fix early exit of installation when initial install url is
+ invalid and later fixed (bsc#1086840)
+- 4.0.66
+
+-------------------------------------------------------------------
Old:
----
yast2-4.0.65.tar.bz2
New:
----
yast2-4.0.71.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.AS9JUL/_old 2018-04-26 13:28:57.668019649 +0200
+++ /var/tmp/diff_new_pack.AS9JUL/_new 2018-04-26 13:28:57.672019503 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 4.0.65
+Version: 4.0.71
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
++++++ yast2-4.0.65.tar.bz2 -> yast2-4.0.71.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/cwm/src/modules/CWMServiceStart.rb new/yast2-4.0.71/library/cwm/src/modules/CWMServiceStart.rb
--- old/yast2-4.0.65/library/cwm/src/modules/CWMServiceStart.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/cwm/src/modules/CWMServiceStart.rb 2018-04-16 16:35:04.000000000 +0200
@@ -21,16 +21,13 @@
# you may find current contact information at www.novell.com
#
# ***************************************************************************
-# File: modules/CWMServiceStart.ycp
-# Package: Common widget manipulation, service start widget
-# Summary: Routines for service start widget handling
-# Authors: Jiri Srain <jsrain(a)suse.cz>
-#
-# $Id$
-#
+
require "yast"
module Yast
+ # Routines for service start widget handling.
+ #
+ # NOTE: a modern API for this is {::UI::ServiceStatus}
class CWMServiceStartClass < Module
def main
Yast.import "UI"
@@ -274,6 +271,9 @@
# Get the widget description map of the widget for service auto starting
# settings
+ #
+ # NOTE: a modern API for this is {::UI::ServiceStatus}
+ #
# @param [Hash{String => Object}] settings a map of all parameters needed to create the widget properly
# <pre>
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/src/lib/y2packager/license.rb new/yast2-4.0.71/library/packages/src/lib/y2packager/license.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/license.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/license.rb 2018-04-16 16:35:04.000000000 +0200
@@ -126,8 +126,9 @@
# Return license's available locales
#
- # @return [String] List of available locales
+ # @return [Array<String>] List of available locales
def locales
+ return [DEFAULT_LANG] unless fetcher
fetcher.locales
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/src/lib/y2packager/product_reader.rb new/yast2-4.0.71/library/packages/src/lib/y2packager/product_reader.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/product_reader.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/product_reader.rb 2018-04-16 16:35:04.000000000 +0200
@@ -27,15 +27,17 @@
# This map contains the correspondence between products and the
# installation package for each product.
#
- # The information is read only once and cached for further queries.
+ # The information is always read again. Reason is that that url can be invalid,
+ # but user fix it later. This way it cache invalid result. See bsc#1086840
+ # ProductReader instance cache it properly, but caching for installation life-time
+ # should be prevented.
#
# @return [Hash<String,String>] product name -> installation package name
def installation_package_mapping
- return @installation_package_mapping if @installation_package_mapping
installation_packages = Yast::Pkg.PkgQueryProvides("system-installation()")
log.info "Installation packages: #{installation_packages.inspect}"
- @installation_package_mapping = {}
+ installation_package_mapping = {}
installation_packages.each do |list|
pkg_name = list.first
# There can be more instances of same package in different version. We except that one
@@ -49,10 +51,10 @@
# `system-installation() = <product_name>`
product_name = install_provide["provides"][/system-installation\(\)\s*=\s*(\S+)/, 1]
log.info "package #{pkg_name} install product #{product_name}"
- @installation_package_mapping[product_name] = pkg_name
+ installation_package_mapping[product_name] = pkg_name
end
- @installation_package_mapping
+ installation_package_mapping
end
end
@@ -161,7 +163,7 @@
end
def installation_package_mapping
- self.class.installation_package_mapping
+ @installation_package_mapping ||= self.class.installation_package_mapping
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/src/lib/y2packager/product_upgrade.rb new/yast2-4.0.71/library/packages/src/lib/y2packager/product_upgrade.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/product_upgrade.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/product_upgrade.rb 2018-04-16 16:35:04.000000000 +0200
@@ -20,8 +20,8 @@
Yast.import "Pkg"
- # fallback mapping with upgraded products to handle some corner cases,
- # maps installed products to a new base product
+ # mapping with upgraded products to handle some corner cases,
+ # maps installed products to a new available base product
MAPPING = {
# SLES12 + HPC module => SLESHPC15
# (a bit tricky, the module became a new base product!)
@@ -33,7 +33,12 @@
# SLED11 => SLED15
["SUSE_SLED"] => "SLED",
# SLES4SAP11 => SLES4SAP15
- ["SUSE_SLES_SAP"] => "SLES_SAP"
+ ["SUSE_SLES_SAP"] => "SLES_SAP",
+ # (installed) openSUSE => (available) SLES,
+ # this one is used when openSUSE is not available, e.g. booting SLE medium
+ # (moreover the openSUSE medium should contain only one product so that
+ # product should be used unconditionally)
+ ["openSUSE"] => "SLES"
}.freeze
class << self
@@ -44,19 +49,15 @@
# 1) If there is only one available base product then just use it,
# there are no other options than to upgrade to this product.
#
- # 2) Let the solver to evaluate the product versions, their dependencies,
- # Obsoletes/Provides, ... and find the correct upgrade candidate.
+ # 2) TODO: Somehow evaluate the available and installed products and
+ # find the best upgrade candidate.
#
- # However, this step is quite fragile as the solver evaluates *all*
- # packages, not just the products. That means the solver might fail
- # because of some unrelated package dependency issue and cannot
- # find the correct upgrade candidate. That's more likely when using
- # custom or 3rd party packages.
+ # Note: We cannot use the solver here because it evaluates *all*
+ # packages, not just the products. Moreover some products
+ # (modules/extensions) might be added later which could change
+ # the best upgrade candidate.
#
- # If the solver fails then we try some fallback mechanisms for finding
- # the new product.
- #
- # 3) Use a harcoded fallback mapping with the list of installed products
+ # 3) Use a harcoded mapping with the list of installed products
# mapped to a new base product product. The static mapping is needed to
# handle some corner cases properly. This includes product renames or
# changing a module to a base product.
@@ -77,10 +78,6 @@
product = find_by_count(available)
return product if product
- # found by solver?
- product = find_by_solver
- return product if product
-
# found by hardcoded mapping?
product = find_by_mapping(available)
return product if product
@@ -102,31 +99,6 @@
available.first
end
- # We do not know which available product might upgrade the installed product
- # if the installation medium contains several products.
- # Temporarily turn on the update mode to let the solver select the product for upgrade,
- # this will correctly handle possible product renames specified via Obsoletes/Provides.
- # @return [Y2Packager::Product,nil] the new upgraded product
- def find_by_solver
- # store the current resolvable states
- Yast::Pkg.SaveState
-
- # run the solver in the upgrade mode
- Yast::Pkg.PkgUpdateAll({})
- log_products
-
- product = Y2Packager::Product.selected_base
- # save the solver test case for easier debugging if no product upgrade was found
- Yast::Pkg.CreateSolverTestCase("/var/log/YaST2/solver-product-upgrade") unless product
-
- # restore the original resolvable states
- Yast::Pkg.RestoreState
- log_products
-
- log.info("Upgraded base product found by solver: #{product.inspect}")
- product
- end
-
# find the upgrade product from the fallback mapping
# @param available [Array<Y2Packager::Product>] the available base products
# @return [Y2Packager::Product,nil] the new upgraded product
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/src/modules/PackageCallbacks.rb new/yast2-4.0.71/library/packages/src/modules/PackageCallbacks.rb
--- old/yast2-4.0.65/library/packages/src/modules/PackageCallbacks.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/modules/PackageCallbacks.rb 2018-04-16 16:35:04.000000000 +0200
@@ -215,13 +215,23 @@
return "C"
end
- # INVALID
- if error == 3
+ # https://github.com/openSUSE/libzypp/blob/8dda46306f06440e1acaefb36fb60f6ce9…
+ message =
+ case error
+ when 1
+ # NOT_FOUND (error = 1) is handled via MediaChange callback.
+ nil
+ when 2
+ Builtins.sformat(_("Package %1 could not be downloaded (input/output error)."), name)
+ when 3
+ Builtins.sformat(_("Package %1 is broken, integrity check has failed."), name)
+ else
+ log.warn "DoneProvide: unknown error '#{error}'"
+ end
+
+ # IO/INVALID
+ if message
# error message, %1 is a package name
- message = Builtins.sformat(
- _("Package %1 is broken, integrity check has failed."),
- name
- )
if Mode.commandline
CommandLine.Print(message)
@@ -286,9 +296,8 @@
if @showLongInfo
error_symbol = "ERROR"
- if error == 1
- error_symbol = "NOT_FOUND"
- elsif error == 2
+ # https://github.com/openSUSE/libzypp/blob/8dda46306f06440e1acaefb36fb60f6ce9…
+ if error == 2
error_symbol = "IO"
elsif error == 3
error_symbol = "INVALID"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/test/package_callbacks_test.rb new/yast2-4.0.71/library/packages/test/package_callbacks_test.rb
--- old/yast2-4.0.65/library/packages/test/package_callbacks_test.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/package_callbacks_test.rb 2018-04-16 16:35:04.000000000 +0200
@@ -253,4 +253,82 @@
end
end
end
+
+ describe "#DoneProvide" do
+ let(:error) { 2 }
+ let(:reason) { "Some reason" }
+ let(:name) { "yast2-packager" }
+ let(:user_input) { [:abort] }
+
+ before do
+ allow(Yast::UI).to receive(:UserInput).and_return(*user_input)
+ end
+
+ context "when error is 2 (IO)" do
+ let(:error) { 2 }
+
+ it "reports the error to the user" do
+ expect(subject).to receive(:layout_popup)
+ .with(/Package yast2-packager could not be downloaded/, *any_args)
+ subject.DoneProvide(error, reason, name)
+ end
+ end
+
+ context "when error is 3 (INVALID)" do
+ let(:error) { 3 }
+
+ it "reports the error to the user" do
+ expect(subject).to receive(:layout_popup)
+ .with(/Package yast2-packager is broken/, *any_args)
+ subject.DoneProvide(error, reason, name)
+ end
+ end
+
+ context "when error is unknown" do
+ let(:error) { 256 }
+
+ it "returns 'I'" do
+ expect(subject.DoneProvide(error, reason, name)).to eq("I")
+ end
+
+ it "logs the unknown error code" do
+ expect(subject.log).to receive(:warn).with("DoneProvide: unknown error '256'")
+ subject.DoneProvide(error, reason, name)
+ end
+ end
+
+ context "when user asks to abort" do
+ let(:user_input) { [:abort] }
+
+ it "returns 'C'" do
+ expect(subject.DoneProvide(error, reason, name)).to eq("C")
+ end
+ end
+
+ context "when user asks to retry" do
+ let(:user_input) { [:retry] }
+
+ it "returns 'R'" do
+ expect(subject.DoneProvide(error, reason, name)).to eq("R")
+ end
+ end
+
+ context "when user asks to ignore" do
+ let(:user_input) { [:ignore] }
+
+ it "returns 'I'" do
+ expect(subject.DoneProvide(error, reason, name)).to eq("I")
+ end
+ end
+
+ context "when the user asks to show more details" do
+ let(:user_input) { [:show, :ignore] }
+
+ it "shows the reason" do
+ allow(subject).to receive(:show_log_info).and_return(true)
+ expect(subject).to receive(:RichText).with(anything, /#{reason}/)
+ subject.DoneProvide(error, reason, name)
+ end
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/test/y2packager/license_test.rb new/yast2-4.0.71/library/packages/test/y2packager/license_test.rb
--- old/yast2-4.0.65/library/packages/test/y2packager/license_test.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/y2packager/license_test.rb 2018-04-16 16:35:04.000000000 +0200
@@ -169,6 +169,14 @@
it "returns list of available translations for the license" do
expect(license.locales).to eq(["en_US", "cz_CZ"])
end
+
+ context "when the license was initialized using some content" do
+ subject(:license) { Y2Packager::License.new(content: "Some content") }
+
+ it "returns a list containing the default language" do
+ expect(license.locales).to eq([described_class::DEFAULT_LANG])
+ end
+ end
end
describe "#accept!" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/packages/test/y2packager/product_upgrade_test.rb new/yast2-4.0.71/library/packages/test/y2packager/product_upgrade_test.rb
--- old/yast2-4.0.65/library/packages/test/y2packager/product_upgrade_test.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/y2packager/product_upgrade_test.rb 2018-04-16 16:35:04.000000000 +0200
@@ -6,12 +6,6 @@
require "y2packager/product"
describe Y2Packager::ProductUpgrade do
- before do
- allow(Yast::Pkg).to receive(:SaveState)
- allow(Yast::Pkg).to receive(:RestoreState)
- allow(Yast::Pkg).to receive(:CreateSolverTestCase)
- end
-
let(:product1) { Y2Packager::Product.new(name: "testing_product1") }
let(:product2) { Y2Packager::Product.new(name: "testing_product2") }
let(:product3) { Y2Packager::Product.new(name: "testing_product3") }
@@ -25,11 +19,6 @@
it "returns nil" do
expect(described_class.new_base_product).to be_nil
end
-
- it "does not run the solver" do
- expect(Yast::Pkg).to_not receive(:PkgUpdateAll)
- described_class.new_base_product
- end
end
context "only one base product is available" do
@@ -41,77 +30,45 @@
it "returns that product" do
expect(described_class.new_base_product).to be(product1)
end
-
- it "does not run the solver" do
- expect(Yast::Pkg).to_not receive(:PkgUpdateAll)
- described_class.new_base_product
- end
end
context "several base products are available" do
+ let(:sles) { Y2Packager::Product.new(name: "SLES") }
+ let(:sles_hpc) { Y2Packager::Product.new(name: "SLES_HPC") }
+ let(:hpc_module) { Y2Packager::Product.new(name: "sle-module-hpc") }
+ let(:sles11) { Y2Packager::Product.new(name: "SUSE_SLES") }
+
before do
- allow(Yast::Pkg).to receive(:PkgUpdateAll)
+ expect(Y2Packager::Product).to receive(:available_base_products)
+ .and_return([product1, product2, sles, sles_hpc]).at_least(:once)
end
- context "solver selects a product" do
- before do
- expect(Y2Packager::Product).to receive(:available_base_products)
- .and_return([product1, product2, product3]).at_least(:once)
- allow(Yast::Pkg).to receive(:ResolvableProperties)
- .and_return(["name" => product1.name, "status" => :selected]).at_least(:once)
- end
-
- it "runs the solver" do
- expect(Yast::Pkg).to receive(:PkgUpdateAll)
- described_class.new_base_product
+ context "the new base product is found in the fallback mapping" do
+ it "returns SLES for SLES11" do
+ expect(Y2Packager::Product).to receive(:installed_products).and_return([sles11])
+ expect(described_class.new_base_product).to be(sles)
end
- it "returns the selected product" do
- expect(Yast::Pkg).to receive(:ResolvableProperties)
- .and_return(["name" => product1.name, "status" => :selected]).at_least(:once)
- expect(described_class.new_base_product).to be(product1)
+ it "returns SLES_HPC for SLES and HPC module installed" do
+ expect(Y2Packager::Product).to receive(:installed_products)
+ .and_return([sles, hpc_module])
+ expect(described_class.new_base_product).to be(sles_hpc)
end
end
- # the solver might fail because of some dependency issues
- context "the solver does not select any base product to install" do
- let(:sles) { Y2Packager::Product.new(name: "SLES") }
- let(:sles_hpc) { Y2Packager::Product.new(name: "SLES_HPC") }
- let(:hpc_module) { Y2Packager::Product.new(name: "sle-module-hpc") }
- let(:sles11) { Y2Packager::Product.new(name: "SUSE_SLES") }
-
- before do
- expect(Y2Packager::Product).to receive(:available_base_products)
- .and_return([product1, product2, sles, sles_hpc]).at_least(:once)
- end
-
- context "the new base product is found in the fallback mapping" do
- it "returns SLES for SLES11" do
- expect(Y2Packager::Product).to receive(:installed_products).and_return([sles11])
- expect(described_class.new_base_product).to be(sles)
- end
-
- it "returns SLES_HPC for SLES and HPC module installed" do
- expect(Y2Packager::Product).to receive(:installed_products)
- .and_return([sles, hpc_module])
- expect(described_class.new_base_product).to be(sles_hpc)
- end
- end
-
- context "the base product if found by name" do
- it "returns SLES for installed SLES" do
- expect(Y2Packager::Product).to receive(:installed_base_product)
- .and_return(sles)
- expect(described_class.new_base_product).to be(sles)
- end
- end
-
- it "returns nil if no upgrade product is found" do
+ context "the base product if found by name" do
+ it "returns SLES for installed SLES" do
expect(Y2Packager::Product).to receive(:installed_base_product)
- .and_return(product3)
- expect(described_class.new_base_product).to be_nil
+ .and_return(sles)
+ expect(described_class.new_base_product).to be(sles)
end
end
+
+ it "returns nil if no upgrade product is found" do
+ expect(Y2Packager::Product).to receive(:installed_base_product)
+ .and_return(product3)
+ expect(described_class.new_base_product).to be_nil
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/library/wizard/src/modules/Wizard.rb new/yast2-4.0.71/library/wizard/src/modules/Wizard.rb
--- old/yast2-4.0.65/library/wizard/src/modules/Wizard.rb 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/wizard/src/modules/Wizard.rb 2018-04-16 16:35:04.000000000 +0200
@@ -32,6 +32,9 @@
module Yast
class WizardClass < Module
+ DEFAULT_ICON_NAME = "yast".freeze
+ FALLBACK_ICON_DIR = "/usr/share/icon/hicolor".freeze
+
def main
Yast.import "UI"
textdomain "base"
@@ -64,9 +67,8 @@
@relnotes_button_label = ""
@relnotes_button_id = ""
- @icon_dir = File.join(Directory.themedir, "current", "icons",
- "64x64", "apps")
- @icon_name = "yast"
+ # Current icon name to set.
+ @icon_name = DEFAULT_ICON_NAME
end
def haveFancyUI
@@ -1158,17 +1160,13 @@
# SetDesktopIcon ("lan")
def SetDesktopIcon(file)
description = Desktop.ParseSingleDesktopFile(file)
-
return false unless description
- icon = description["icon"]
-
- return false unless icon
+ icon = description["Icon"].to_s
+ return false if icon.empty?
@icon_name = icon
set_icon
-
- true
end
# Convenience function to avoid 2 calls if application needs to set
@@ -1193,7 +1191,6 @@
Builtins.y2debug("Set dialog title: %1", name)
SetDialogTitle(name)
-
SetDesktopIcon(file)
Builtins.haskey(description, "Name")
@@ -1867,9 +1864,31 @@
#
# This should be called only immediately before opening a dialog; premature
# UI calls can interfere with the CommandLine mode.
+ #
+ # @return [Boolean] true if the application icon was set; false otherwise
def set_icon
- icon_path = File.join(@icon_dir, "#{(a)icon_name}.png")
+ icon_path = paths_for((a)icon_name).first.to_s
+
+ if icon_path.empty?
+ Builtins.y2warning("Cannot set application icon to \"%1.png\"", @icon_name)
+ @icon_name = DEFAULT_ICON_NAME
+ return false
+ end
+
UI.SetApplicationIcon(icon_path)
+ true
+ end
+
+ # Convenience method that returns all the available icon paths for a given
+ # icon name
+ #
+ # @param name [String] icon name
+ # @return [Array<String>] list with the available icon paths
+ def paths_for(icon_name)
+ icon_dirs = "{#{Directory.icondir}, #{FALLBACK_ICON_DIR}}"
+ sizes = "{64x64,48x48,32x32,22x22,16x16}"
+
+ Dir.glob(File.join(icon_dirs, sizes, "apps", "#{icon_name}.png"))
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/package/yast2.changes new/yast2-4.0.71/package/yast2.changes
--- old/yast2-4.0.65/package/yast2.changes 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/package/yast2.changes 2018-04-16 16:35:04.000000000 +0200
@@ -1,4 +1,47 @@
-------------------------------------------------------------------
+Mon Apr 16 13:47:10 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Do not crash when reading trying to determine available locales
+ for some licenses (bsc#1089610).
+- 4.0.71
+
+-------------------------------------------------------------------
+Mon Apr 16 14:48:27 CEST 2018 - snwint(a)suse.de
+
+- save_y2logs: save kernel messages and udev log (bsc#1089647,
+ bsc#1085212)
+- 4.0.70
+
+-------------------------------------------------------------------
+Thu Apr 12 13:38:26 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Handle input/output errors in the DoneProvide package callback
+ (bsc#1088682).
+- 4.0.69
+
+-------------------------------------------------------------------
+Thu Apr 12 12:01:49 UTC 2018 - knut.anderssen(a)suse.com
+
+- Wizard: Fall back to smaller and/or hicolor icon if the icon for
+ the launched module cannot be found (bsc#1087224)
+- 4.0.68
+
+-------------------------------------------------------------------
+Tue Apr 10 11:38:23 UTC 2018 - lslezak(a)suse.cz
+
+- Do not use the solver for finding the best product upgrade
+ candidate, it does not work correctly in the SLES + sle-module-hpc
+ => SLES_HPC case (bsc#1086734)
+- 4.0.67
+
+-------------------------------------------------------------------
+Tue Apr 10 07:25:08 UTC 2018 - jreidinger(a)suse.com
+
+- Fix early exit of installation when initial install url is
+ invalid and later fixed (bsc#1086840)
+- 4.0.66
+
+-------------------------------------------------------------------
Fri Apr 6 09:19:55 UTC 2018 - jreidinger(a)suse.com
- improve wayland support (bsc#1083907)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/package/yast2.spec new/yast2-4.0.71/package/yast2.spec
--- old/yast2-4.0.65/package/yast2.spec 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/package/yast2.spec 2018-04-16 16:35:04.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2
-Version: 4.0.65
+Version: 4.0.71
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.0.65/scripts/save_y2logs new/yast2-4.0.71/scripts/save_y2logs
--- old/yast2-4.0.65/scripts/save_y2logs 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/scripts/save_y2logs 2018-04-16 16:35:04.000000000 +0200
@@ -118,6 +118,7 @@
zypper.log zypp/history* pk_backend_zypp \
pbl.log linuxrc.log wickedd.log \
evms-engine.* \
+ boot.msg messages udev.log \
'
cd /var/log
for i in $VAR_LOG_FILES ; do
1
0
Hello community,
here is the log from the commit of package yast2-scanner for openSUSE:Factory checked in at 2018-04-26 13:28:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-scanner (Old)
and /work/SRC/openSUSE:Factory/.yast2-scanner.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-scanner"
Thu Apr 26 13:28:45 2018 rev:51 rq:596215 version:4.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-scanner/yast2-scanner.changes 2017-04-12 17:09:33.255845587 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-scanner.new/yast2-scanner.changes 2018-04-26 13:28:46.820416949 +0200
@@ -1,0 +2,14 @@
+Thu Apr 12 06:21:10 UTC 2018 - knut.anderssen(a)suse.com
+
+- bnc#859353
+ - Adapted setup_network_scanner_config using the systemd sane
+ socket unit when exists.
+- 4.0.1
+
+-------------------------------------------------------------------
+Fri Apr 6 18:53:38 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
Old:
----
yast2-scanner-3.2.1.tar.bz2
New:
----
yast2-scanner-4.0.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-scanner.spec ++++++
--- /var/tmp/diff_new_pack.DnMaqn/_old 2018-04-26 13:28:47.344397758 +0200
+++ /var/tmp/diff_new_pack.DnMaqn/_new 2018-04-26 13:28:47.344397758 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-scanner
#
-# 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,7 +17,7 @@
Name: yast2-scanner
-Version: 3.2.1
+Version: 4.0.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-scanner-3.2.1.tar.bz2 -> yast2-scanner-4.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-scanner-3.2.1/package/yast2-scanner.changes new/yast2-scanner-4.0.1/package/yast2-scanner.changes
--- old/yast2-scanner-3.2.1/package/yast2-scanner.changes 2017-04-05 09:50:16.103259943 +0200
+++ new/yast2-scanner-4.0.1/package/yast2-scanner.changes 2018-04-13 10:16:59.000000000 +0200
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Thu Apr 12 06:21:10 UTC 2018 - knut.anderssen(a)suse.com
+
+- bnc#859353
+ - Adapted setup_network_scanner_config using the systemd sane
+ socket unit when exists.
+- 4.0.1
+
+-------------------------------------------------------------------
+Fri Apr 6 18:53:38 UTC 2018 - mfilka(a)suse.com
+
+- bnc#1087957 - version bump
+- 4.0.0
+
+-------------------------------------------------------------------
Tue Apr 4 08:22:53 UTC 2017 - mfilka(a)suse.com
- bnc#1026027
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-scanner-3.2.1/package/yast2-scanner.spec new/yast2-scanner-4.0.1/package/yast2-scanner.spec
--- old/yast2-scanner-3.2.1/package/yast2-scanner.spec 2017-04-05 09:50:16.103259943 +0200
+++ new/yast2-scanner-4.0.1/package/yast2-scanner.spec 2018-04-13 10:16:59.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-scanner
-Version: 3.2.1
+Version: 4.0.1
Release: 0
Group: System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-scanner-3.2.1/tools/setup_network_scanner_config new/yast2-scanner-4.0.1/tools/setup_network_scanner_config
--- old/yast2-scanner-3.2.1/tools/setup_network_scanner_config 2017-04-05 09:50:16.135259943 +0200
+++ new/yast2-scanner-4.0.1/tools/setup_network_scanner_config 2018-04-13 10:16:59.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/bash
-# Johannes Meixner <jsmeix(a)suse.de>, 2004, 2005, 2006, 2007, 2008, 2010, 2014
+# Johannes Meixner <jsmeix(a)suse.de>, 2004, 2005, 2006, 2007, 2008, 2010, 2014, 2018
#
# Copyright (c) 2010 Novell, Inc.
# All Rights Reserved.
@@ -40,6 +40,8 @@
XINETD_CONFIG_FILE="/etc/xinetd.d/sane-port"
XINETD_SYSTEMD_UNIT="xinetd.service"
XINETD_SYSTEMD_UNIT_FILE="/usr/lib/systemd/system/$XINETD_SYSTEMD_UNIT"
+SANED_SYSTEMD_UNIT="saned.socket"
+SANED_SYSTEMD_UNIT_FILE="/usr/lib/systemd/system/$SANED_SYSTEMD_UNIT"
# Function to remove old entries and append new entries to a SANE config file:
ReWrite()
@@ -69,25 +71,47 @@
# Enable the saned if "$SANED_CONFIG" is not the empty string otherwise disable the saned
# and do the appropriate stuff regarding the xinetd:
if [ -n "$SANED_CONFIG" ]
-then sed -i -e 's/^.*disable.*$/\tdisable = no/' $XINETD_CONFIG_FILE || { echo "Failed to enable saned in $XINETD_CONFIG_FILE" 1>&2 ; exit 6 ; }
+then # First try the newest way (i.e. reload or start and enable SANED_SYSTEMD_UNIT)
+ # otherwise fall back to the older ways (i.e via xinetd):
+ if test -e $SANED_SYSTEMD_UNIT_FILE
+ then if systemctl --quiet is-active $SANED_SYSTEMD_UNIT && systemctl --quiet is-enabled $SANED_SYSTEMD_UNIT
+ then systemctl --quiet reload $SANED_SYSTEMD_UNIT || { echo "Failed to reload $SANED_SYSTEMD_UNIT" 1>&2 ; exit 7 ; }
+ else systemctl --quiet start $SANED_SYSTEMD_UNIT || { echo "Failed to start $SANED_SYSTEMD_UNIT" 1>&2 ; exit 8 ; }
+ systemctl --quiet enable $SANED_SYSTEMD_UNIT || { echo "Failed to enable $SANED_SYSTEMD_UNIT" 1>&2 ; exit 9 ; }
+ fi
+ exit 0
+ fi
+ echo "Cannot reload or start and enable $SANED_SYSTEMD_UNIT (no $SANED_SYSTEMD_UNIT_FILE)." 1>&2
+ echo "Falling back to reload or start and enable $XINETD_SYSTEMD_UNIT." 1>&2
+ sed -i -e 's/^.*disable.*$/\tdisable = no/' $XINETD_CONFIG_FILE || { echo "Failed to enable saned in $XINETD_CONFIG_FILE" 1>&2 ; exit 6 ; }
if test -e $XINETD_SYSTEMD_UNIT_FILE
then if systemctl --quiet is-active $XINETD_SYSTEMD_UNIT && systemctl --quiet is-enabled $XINETD_SYSTEMD_UNIT
- then systemctl --quiet reload $XINETD_SYSTEMD_UNIT || { echo "Failed to reload xinetd" 1>&2 ; exit 7 ; }
- else systemctl --quiet start $XINETD_SYSTEMD_UNIT || { echo "Failed to start xinetd" 1>&2 ; exit 8 ; }
- systemctl --quiet enable $XINETD_SYSTEMD_UNIT || { echo "Failed to enable xinetd" 1>&2 ; exit 9 ; }
+ then systemctl --quiet reload $XINETD_SYSTEMD_UNIT || { echo "Failed to reload $XINETD_SYSTEMD_UNIT" 1>&2 ; exit 7 ; }
+ else systemctl --quiet start $XINETD_SYSTEMD_UNIT || { echo "Failed to start $XINETD_SYSTEMD_UNIT" 1>&2 ; exit 8 ; }
+ systemctl --quiet enable $XINETD_SYSTEMD_UNIT || { echo "Failed to enable $XINETD_SYSTEMD_UNIT" 1>&2 ; exit 9 ; }
fi
exit 0
fi
- echo "Cannot reload or start and enable xinetd (no $XINETD_SYSTEMD_UNIT_FILE)." 1>&2
+ echo "Cannot reload or start and enable $XINETD_SYSTEMD_UNIT (no $XINETD_SYSTEMD_UNIT_FILE)." 1>&2
exit 11
-else sed -i -e 's/^.*disable.*$/\tdisable = yes/' $XINETD_CONFIG_FILE || { echo "Failed to disable saned in $XINETD_CONFIG_FILE" 1>&2 ; exit 10 ; }
+else # First try the newest way (i.e. stop and disable SANED_SYSTEMD_UNIT)
+ # otherwise fall back to the older ways (i.e via xinetd):
+ if test -e $SANED_SYSTEMD_UNIT_FILE
+ then # Do not error out if stop and/or disable SANED_SYSTEMD_UNIT does not work, perhaps it is already stopped and/or disabled:
+ systemctl --quiet stop $SANED_SYSTEMD_UNIT || echo "Could not stop $SANED_SYSTEMD_UNIT" 1>&2
+ systemctl --quiet disable $SANED_SYSTEMD_UNIT || echo "Could not disable $SANED_SYSTEMD_UNIT" 1>&2
+ exit 0
+ fi
+ echo "Cannot stop and disable $SANED_SYSTEMD_UNIT (no $SANED_SYSTEMD_UNIT_FILE)." 1>&2
+ echo "Falling back to disable saned for xinetd and reload $XINETD_SYSTEMD_UNIT." 1>&2
+ sed -i -e 's/^.*disable.*$/\tdisable = yes/' $XINETD_CONFIG_FILE || { echo "Failed to disable saned in $XINETD_CONFIG_FILE" 1>&2 ; exit 10 ; }
if test -e $XINETD_SYSTEMD_UNIT_FILE
then if systemctl --quiet is-active $XINETD_SYSTEMD_UNIT
- then systemctl --quiet reload $XINETD_SYSTEMD_UNIT || { echo "Failed to reload xinetd" 1>&2 ; exit 7 ; }
+ then systemctl --quiet reload $XINETD_SYSTEMD_UNIT || { echo "Failed to reload $XINETD_SYSTEMD_UNIT" 1>&2 ; exit 7 ; }
fi
exit 0
fi
- echo "Cannot reload xinetd (no $XINETD_SYSTEMD_UNIT_FILE)." 1>&2
+ echo "Cannot reload $XINETD_SYSTEMD_UNIT (no $XINETD_SYSTEMD_UNIT_FILE)." 1>&2
exit 11
fi
1
0
Hello community,
here is the log from the commit of package yast2-add-on for openSUSE:Factory checked in at 2018-04-26 13:28:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-add-on (Old)
and /work/SRC/openSUSE:Factory/.yast2-add-on.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-add-on"
Thu Apr 26 13:28:36 2018 rev:91 rq:596189 version:4.0.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-add-on/yast2-add-on.changes 2018-03-26 12:15:41.307677387 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-add-on.new/yast2-add-on.changes 2018-04-26 13:28:37.844745684 +0200
@@ -1,0 +2,7 @@
+Thu Apr 12 06:44:36 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Allow the user to change the CD/DVD when using addon=dvd:///
+ (bsc#1082789).
+- 4.0.8
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-4.0.7.tar.bz2
New:
----
yast2-add-on-4.0.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on.spec ++++++
--- /var/tmp/diff_new_pack.Qaa1MX/_old 2018-04-26 13:28:38.748712576 +0200
+++ /var/tmp/diff_new_pack.Qaa1MX/_new 2018-04-26 13:28:38.748712576 +0200
@@ -17,7 +17,7 @@
Name: yast2-add-on
-Version: 4.0.7
+Version: 4.0.8
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0
@@ -62,6 +62,9 @@
%defattr(-,root,root)
%dir %{yast_yncludedir}/add-on
%{yast_yncludedir}/add-on/*
+%dir %{yast_libdir}/add-on
+%dir %{yast_libdir}/add-on/clients
+%{yast_libdir}/add-on/clients/*.rb
%{yast_clientdir}/add-on.rb
%{yast_clientdir}/add-on_*.rb
%{yast_clientdir}/inst_add-on*.rb
++++++ yast2-add-on-4.0.7.tar.bz2 -> yast2-add-on-4.0.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.0.7/package/yast2-add-on.changes new/yast2-add-on-4.0.8/package/yast2-add-on.changes
--- old/yast2-add-on-4.0.7/package/yast2-add-on.changes 2018-03-22 14:52:06.000000000 +0100
+++ new/yast2-add-on-4.0.8/package/yast2-add-on.changes 2018-04-13 09:23:34.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Apr 12 06:44:36 UTC 2018 - igonzalezsosa(a)suse.com
+
+- Allow the user to change the CD/DVD when using addon=dvd:///
+ (bsc#1082789).
+- 4.0.8
+
+-------------------------------------------------------------------
Thu Mar 22 13:24:31 CET 2018 - schubi(a)suse.de
- AutoYaST: Reporting missing AY configuration file entries.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.0.7/package/yast2-add-on.spec new/yast2-add-on-4.0.8/package/yast2-add-on.spec
--- old/yast2-add-on-4.0.7/package/yast2-add-on.spec 2018-03-22 14:52:06.000000000 +0100
+++ new/yast2-add-on-4.0.8/package/yast2-add-on.spec 2018-04-13 09:23:34.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-add-on
-Version: 4.0.7
+Version: 4.0.8
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0
@@ -62,6 +62,9 @@
%defattr(-,root,root)
%dir %{yast_yncludedir}/add-on
%{yast_yncludedir}/add-on/*
+%dir %{yast_libdir}/add-on
+%dir %{yast_libdir}/add-on/clients
+%{yast_libdir}/add-on/clients/*.rb
%{yast_clientdir}/add-on.rb
%{yast_clientdir}/add-on_*.rb
%{yast_clientdir}/inst_add-on*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.0.7/src/clients/inst_add-on.rb new/yast2-add-on-4.0.8/src/clients/inst_add-on.rb
--- old/yast2-add-on-4.0.7/src/clients/inst_add-on.rb 2018-03-22 14:52:06.000000000 +0100
+++ new/yast2-add-on-4.0.8/src/clients/inst_add-on.rb 2018-04-13 09:23:34.000000000 +0200
@@ -1,167 +1,3 @@
-# encoding: utf-8
-
-# File: clients/inst_add-on.ycp
-# Package: yast2-add-on
-# Summary: Select add-on products for installation
-# Authors: Jiri Srain <jsrain(a)suse.de>
-#
-
-require "tempfile"
-
-module Yast
- # @note This client should not be called from other clients directly
- # via WFM.call (only from the control.xml file), it can restart the workflow
- # from the next step and return to the caller AFTER the complete workflow
- # is finished (or aborted)
- class InstAddOnClient < Client
- include Yast::Logger
-
- def main
- Yast.import "UI"
- Yast.import "Pkg"
- textdomain "add-on"
-
- Yast.import "AddOnProduct"
- Yast.import "GetInstArgs"
- Yast.import "Packages"
- Yast.import "PackageCallbacks"
- Yast.import "Popup"
- Yast.import "ProductControl"
- Yast.import "Report"
- Yast.import "Wizard"
- Yast.import "Label"
- Yast.import "Installation"
- Yast.import "Linuxrc"
- Yast.import "String"
- Yast.import "URL"
-
- Yast.include self, "add-on/add-on-workflow.rb"
- Yast.include self, "packager/repositories_include.rb"
-
- if AddOnProduct.skip_add_ons
- Builtins.y2milestone("Skipping add-ons (as requested before)")
- return :auto
- end
-
- @argmap = GetInstArgs.argmap
-
- Packages.SelectProduct
-
- PackageCallbacks.SetMediaCallbacks
-
- # add add-ons specified on the kernel command line
- addon_opt = Linuxrc.InstallInf("addon")
-
- # the "addon" boot option is present
- if addon_opt != nil
- missing_addons = addon_opt.split(",") - current_addons
-
- # add the add-ons just once, skip adding if all add-ons are
- # already present (handle going back and forth properly)
- if missing_addons.empty?
- log.info("All kernel cmdline addons already present")
- else
- # do not reveal the URL passwords in the log
- missing_addons_log = missing_addons.map { |a| URL.HidePassword(a) }
- log.info("Adding extra add-ons from kernel cmdline: #{missing_addons_log}")
-
- # network setup is needed when installing from a local medium (DVD) with remote Add-ons
- ret = NetworkSetupForAddons(missing_addons)
- return ret if Builtins.contains([:back, :abort], ret)
-
- plaindir, download, name, alias_ = false, true, "", ""
- missing_addons.each do |url|
- sources_before = Pkg.SourceGetCurrent(false)
- Builtins.y2milestone("Sources before adding new one: %1", sources_before)
-
- createSourceImpl(url, plaindir, download, name, alias_)
-
- activate_addon_changes(sources_before)
- end
- InstallProduct()
- end
- end
-
- # the module was started because of the kernel command line option
- # so finish it after adding the add-ons, no UI is actually needed
- return :auto if Installation.add_on_selected == false
-
- @ret = RunAddOnMainDialog(
- GetInstArgs.enable_back,
- GetInstArgs.enable_next,
- true,
- Label.BackButton,
- Label.NextButton,
- Label.AbortButton,
- true
- )
-
- if @ret == :next
- # be careful when calling this client from other modules, this will
- # start the workflow from the next step and THEN return back
- # to the caller
- @ret = ProductControl.RunFrom(
- Ops.add(ProductControl.CurrentStep, 1),
- true
- )
- @ret = :finish if @ret == :next
- end
-
- @ret
-
- # EOF
- end
-
- # Ask to user to configure network for installing remote addons.
- # User is aske when there is a remote add-on found and the network
- # is not running yet.
- #
- # @param addon_urls list of URLs
- # @return symbol user input result (`next, `back or `abort)
- def NetworkSetupForAddons(addon_urls)
- addon_urls = deep_copy(addon_urls)
- # protocols locally available (no network needed)
- local_protocols = ["cd", "dvd", "hd"]
-
- # is this CD/DVD/HDD installation?
- if Builtins.contains(
- local_protocols,
- Builtins.tolower(Linuxrc.InstallInf("InstMode"))
- )
- # is there any remote addon requiring network setup?
- network_needed = false
- Builtins.foreach(addon_urls) do |url|
- # is it a remote protocol?
- if !Builtins.contains(
- local_protocols,
- Builtins.tolower(Ops.get_string(URL.Parse(url), "scheme", ""))
- )
- network_needed = true
- raise Break
- end
- end
-
-
- if network_needed
- # check and setup network
- ret = Convert.to_symbol(WFM.CallFunction("inst_network_check", []))
- Builtins.y2milestone("inst_network_check ret: %1", ret)
-
- return ret if Builtins.contains([:back, :abort], ret)
- end
- end
-
- :next
- end
-
- # get the URLs of the all present add-ons
- # @return [Array<String>] list of URLs (empty list if no add-on defined)
- def current_addons
- AddOnProduct.add_on_products.map do |addon|
- Pkg.SourceURL(addon["media"])
- end
- end
- end
-end
+require "add-on/clients/inst_add-on"
Yast::InstAddOnClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.0.7/src/lib/add-on/clients/inst_add-on.rb new/yast2-add-on-4.0.8/src/lib/add-on/clients/inst_add-on.rb
--- old/yast2-add-on-4.0.7/src/lib/add-on/clients/inst_add-on.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-add-on-4.0.8/src/lib/add-on/clients/inst_add-on.rb 2018-04-13 09:23:34.000000000 +0200
@@ -0,0 +1,212 @@
+# encoding: utf-8
+
+# File: clients/inst_add-on.ycp
+# Package: yast2-add-on
+# Summary: Select add-on products for installation
+# Authors: Jiri Srain <jsrain(a)suse.de>
+#
+
+require "tempfile"
+
+module Yast
+ # @note This client should not be called from other clients directly
+ # via WFM.call (only from the control.xml file), it can restart the workflow
+ # from the next step and return to the caller AFTER the complete workflow
+ # is finished (or aborted)
+ class InstAddOnClient < Client
+ include Yast::Logger
+
+ def main
+ Yast.import "UI"
+ Yast.import "Pkg"
+ textdomain "add-on"
+
+ Yast.import "AddOnProduct"
+ Yast.import "GetInstArgs"
+ Yast.import "Packages"
+ Yast.import "PackageCallbacks"
+ Yast.import "Popup"
+ Yast.import "ProductControl"
+ Yast.import "Report"
+ Yast.import "Wizard"
+ Yast.import "Label"
+ Yast.import "Installation"
+ Yast.import "Linuxrc"
+ Yast.import "String"
+ Yast.import "URL"
+
+ Yast.include self, "add-on/add-on-workflow.rb"
+ Yast.include self, "packager/repositories_include.rb"
+
+ if AddOnProduct.skip_add_ons
+ Builtins.y2milestone("Skipping add-ons (as requested before)")
+ return :auto
+ end
+
+ @argmap = GetInstArgs.argmap
+
+ Packages.SelectProduct
+
+ PackageCallbacks.SetMediaCallbacks
+
+ # add add-ons specified on the kernel command line
+ addon_opt = Linuxrc.InstallInf("addon")
+
+ # the "addon" boot option is present
+ if addon_opt != nil
+ missing_addons = addon_opt.split(",") - current_addons
+
+ # add the add-ons just once, skip adding if all add-ons are
+ # already present (handle going back and forth properly)
+ if missing_addons.empty?
+ log.info("All kernel cmdline addons already present")
+ else
+ # do not reveal the URL passwords in the log
+ missing_addons_log = missing_addons.map { |a| URL.HidePassword(a) }
+ log.info("Adding extra add-ons from kernel cmdline: #{missing_addons_log}")
+
+ # network setup is needed when installing from a local medium (DVD) with remote Add-ons
+ ret = NetworkSetupForAddons(missing_addons)
+ return ret if Builtins.contains([:back, :abort], ret)
+
+ plaindir, download, name, alias_ = false, true, "", ""
+ missing_addons.each do |url|
+ sources_before = Pkg.SourceGetCurrent(false)
+ Builtins.y2milestone("Sources before adding new one: %1", sources_before)
+
+ next if instsys_dvd?(url) && !AddOnProduct.AskForCD(url, name)
+ createSourceImpl(url, plaindir, download, name, alias_)
+
+ activate_addon_changes(sources_before)
+ end
+ InstallProduct()
+ end
+ end
+
+ # the module was started because of the kernel command line option
+ # so finish it after adding the add-ons, no UI is actually needed
+ return :auto if Installation.add_on_selected == false
+
+ @ret = RunAddOnMainDialog(
+ GetInstArgs.enable_back,
+ GetInstArgs.enable_next,
+ true,
+ Label.BackButton,
+ Label.NextButton,
+ Label.AbortButton,
+ true
+ )
+
+ if @ret == :next
+ # be careful when calling this client from other modules, this will
+ # start the workflow from the next step and THEN return back
+ # to the caller
+ @ret = ProductControl.RunFrom(
+ Ops.add(ProductControl.CurrentStep, 1),
+ true
+ )
+ @ret = :finish if @ret == :next
+ end
+
+ @ret
+
+ # EOF
+ end
+
+ # Ask to user to configure network for installing remote addons.
+ # User is aske when there is a remote add-on found and the network
+ # is not running yet.
+ #
+ # @param addon_urls list of URLs
+ # @return symbol user input result (`next, `back or `abort)
+ def NetworkSetupForAddons(addon_urls)
+ addon_urls = deep_copy(addon_urls)
+ # protocols locally available (no network needed)
+ local_protocols = ["cd", "dvd", "hd"]
+
+ # is this CD/DVD/HDD installation?
+ if Builtins.contains(
+ local_protocols,
+ Builtins.tolower(Linuxrc.InstallInf("InstMode"))
+ )
+ # is there any remote addon requiring network setup?
+ network_needed = false
+ Builtins.foreach(addon_urls) do |url|
+ # is it a remote protocol?
+ if !Builtins.contains(
+ local_protocols,
+ Builtins.tolower(Ops.get_string(URL.Parse(url), "scheme", ""))
+ )
+ network_needed = true
+ raise Break
+ end
+ end
+
+
+ if network_needed
+ # check and setup network
+ ret = Convert.to_symbol(WFM.CallFunction("inst_network_check", []))
+ Builtins.y2milestone("inst_network_check ret: %1", ret)
+
+ return ret if Builtins.contains([:back, :abort], ret)
+ end
+ end
+
+ :next
+ end
+
+ # get the URLs of the all present add-ons
+ # @return [Array<String>] list of URLs (empty list if no add-on defined)
+ def current_addons
+ AddOnProduct.add_on_products.map do |addon|
+ Pkg.SourceURL(addon["media"])
+ end
+ end
+
+ # URL schemas to be considered as CD/DVD
+ DVD_SCHEMES = ["cd", "dvd"].freeze
+
+ # Determine whether the URL points to the installation CD/DVD
+ #
+ # @param url [String] Add-on URL
+ # @return [Boolean] true if it points to the installation CD/DVD
+ def instsys_dvd?(url)
+ scheme = URL.Parse(url)["scheme"]
+ return false unless DVD_SCHEMES.include?(scheme.downcase)
+
+ addon_devices = devices_from_url(url)
+ addon_devices.include?(instsys_device)
+ end
+
+ # instsys device
+ #
+ # @return [String] instsys device; nil if the device could not be
+ # determined (for instance, when using a network based installation media)
+ def instsys_device
+ return @instsys_device if @instsys_device
+ @instsys_device = devices_from_url(InstURL.installInf2Url).first
+ end
+
+ # Real device from an URL
+ #
+ # Symbolic links are resolved, so real devices are returned.
+ #
+ # @param url [String] URL
+ # @return [Array<String>] Paths to the devices. If no valid devices are found,
+ # it will return an empty array.
+ def devices_from_url(url)
+ parsed = URL.Parse(url)
+ params = URL.MakeMapFromParams(parsed["query"])
+ return [] unless params["devices"]
+ devices = params["devices"].split(",") # MakeMapFromParams unescapes %2C
+
+ devices.each_with_object([]) do |device, all|
+ begin
+ # File.realpath resolves symlinks (e.g. /dev/by-* to real devices like /dev/srX)
+ all << File.realpath(device)
+ rescue Errno::ENOENT
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.0.7/test/y2add_on/clients/inst_add-on_test.rb new/yast2-add-on-4.0.8/test/y2add_on/clients/inst_add-on_test.rb
--- old/yast2-add-on-4.0.7/test/y2add_on/clients/inst_add-on_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-add-on-4.0.8/test/y2add_on/clients/inst_add-on_test.rb 2018-04-13 09:23:34.000000000 +0200
@@ -0,0 +1,169 @@
+require_relative "../../test_helper"
+require "add-on/clients/inst_add-on"
+
+Yast.import "Packages"
+Yast.import "Linuxrc"
+Yast.import "Installation"
+Yast.import "AddOnProduct"
+
+describe Yast::InstAddOnClient do
+ describe "#main" do
+ let(:addons) { "dvd:///?devices=/dev/sr0" }
+ let(:inst_url) { "dvd:///?devices=/dev/disk/by-id/ata-QEMU_DVD-ROM_QM00001" }
+ let(:skip_add_ons) { false }
+ let(:add_on_selected) { false }
+
+ before do
+ allow(Yast::Packages).to receive(:SelectProduct)
+ allow(Yast::Linuxrc).to receive(:InstallInf).with("addon").and_return(addons)
+ allow(subject).to receive(:NetworkSetupForAddons).and_return(:next)
+ allow(subject).to receive(:InstallProduct)
+ allow(Yast::AddOnProduct).to receive(:skip_add_ons).and_return(skip_add_ons)
+ allow(Yast::Installation).to receive(:add_on_selected).and_return(add_on_selected)
+ allow(Yast::InstURL).to receive(:installInf2Url).and_return(inst_url)
+ allow(subject).to receive(:RunAddOnMainDialog).and_return(:next)
+ end
+
+ context "when add-on products selection should be skipped" do
+ let(:skip_add_ons) { true }
+
+ it "returns :auto" do
+ expect(subject.main).to eq(:auto)
+ end
+ end
+
+ context "when no add-ons are given" do
+ let(:addons) { nil }
+
+ it "returns :next" do
+ expect(subject.main).to eq(:auto)
+ end
+ end
+
+ context "when an add-on is given" do
+ let(:addons) { "dvd:///?devices=/dev/sr0" }
+ let(:instsys_realpath) { "/dev/sr0" }
+
+ before do
+ allow(File).to receive(:realpath).with("/dev/sr0").and_return("/dev/sr0")
+ allow(File).to receive(:realpath).with("/dev/disk/by-id/ata-QEMU_DVD-ROM_QM00001")
+ .and_return(instsys_realpath)
+ allow(subject).to receive(:createSourceImpl)
+ end
+
+ context "and it is using the same CD/DVD than instsys" do
+ let(:accept_dialog) { true }
+
+ before do
+ allow(Yast::AddOnProduct).to receive(:AskForCD).and_return(accept_dialog)
+ end
+
+ it "asks the user to change the media" do
+ expect(Yast::AddOnProduct).to receive(:AskForCD).with(addons, "")
+ .and_return(true)
+ subject.main
+ end
+
+ it "adds the given add-on" do
+ expect(subject).to receive(:createSourceImpl).with(addons, *any_args)
+ subject.main
+ end
+
+ context "and the user rejects the dialog" do
+ let(:accept_dialog) { false }
+
+ it "does not add the add-on" do
+ expect(subject).to_not receive(:createSourceImpl)
+ subject.main
+ end
+ end
+ end
+
+ context "and it is using a different CD/DVD than instsys" do
+ let(:instsys_realpath) { "/dev/sr1" }
+
+ it "does not ask the user to change the media" do
+ expect(Yast::AddOnProduct).to_not receive(:AskForCD)
+ subject.main
+ end
+
+ it "adds the given add-on" do
+ expect(subject).to receive(:createSourceImpl).with(addons, *any_args)
+ subject.main
+ end
+ end
+
+ context "and the device does not exist" do
+ before do
+ allow(File).to receive(:realpath).with("/dev/sr0").and_raise(Errno::ENOENT)
+ end
+
+ it "does not ask the user to change the media" do
+ expect(Yast::AddOnProduct).to_not receive(:AskForCD)
+ subject.main
+ end
+ end
+
+ context "and it is not using a CD/DVD" do
+ let(:addons) { "http://example.net/add-on" }
+
+ it "does not ask the user to change the media" do
+ expect(Yast::AddOnProduct).to_not receive(:AskForCD)
+ subject.main
+ end
+
+ it "adds the given add-on" do
+ expect(subject).to receive(:createSourceImpl).with(addons, *any_args)
+ subject.main
+ end
+ end
+
+ context "and it is not installing from a CD/DVD" do
+ let(:inst_url) { "http://example.net/sle/DVD1" }
+
+ it "does not ask the user to change the media" do
+ expect(Yast::AddOnProduct).to_not receive(:AskForCD)
+ subject.main
+ end
+
+ it "adds the given add-on" do
+ expect(subject).to receive(:createSourceImpl).with(addons, *any_args)
+ subject.main
+ end
+ end
+
+ context "when a list of devices is given for an add-on" do
+ let(:addons) { "dvd:///?devices=/dev/sr0%2C/dev/sr1" }
+ let(:instsys_realpath) { "/dev/sr1" }
+
+ before do
+ allow(File).to receive(:realpath).with("/dev/sr1").and_return("/dev/sr1")
+ end
+
+ context "and some device matches the instsys media" do
+ it "asks the user to change the media" do
+ expect(Yast::AddOnProduct).to receive(:AskForCD).with(addons, "")
+ .and_return(true)
+ subject.main
+ end
+ end
+
+ context "and none of the device matches the instsys media" do
+ let(:instsys_realpath) { "/dev/sr2" }
+
+ it "does not ask the user to change the media" do
+ expect(Yast::AddOnProduct).to_not receive(:AskForCD)
+ subject.main
+ end
+ end
+ end
+ end
+
+ context "when UI is actually needed" do
+ let(:add_on_selected) { true }
+
+ it "runs add-on main dialog"
+ it "starts workflow"
+ end
+ end
+end
1
0