Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2022-03-11 21:41:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Fri Mar 11 21:41:08 2022 rev:529 rq:961100 version:4.4.47

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2022-02-17 
23:40:58.175700695 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new.25692/yast2.changes   2022-03-11 
21:41:14.182069231 +0100
@@ -1,0 +2,21 @@
+Fri Mar 11 13:05:14 UTC 2022 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Extend the Package module to force using PackageSystem or
+  PackageAI without having the mode into account.
+- AutoYaST: properly detect whether firewalld, bind and
+  yast2-dns-server packages are installed when cloning a system
+  (bsc#1196963).
+- 4.4.47
+
+-------------------------------------------------------------------
+Tue Mar  8 13:24:14 UTC 2022 - Stefan Hundhammer <shundham...@suse.com>
+
+- Reverted LD_PRELOAD change (GitHub PR#1236) (bsc#1196326)
+- 4.4.46
+
+-------------------------------------------------------------------
+Wed Mar  2 12:00:57 UTC 2022 - Stefan Hundhammer <shundham...@suse.com>
+
+- New doc: Invoking External Commands in YaST (in doc/)
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.4.45.tar.bz2

New:
----
  yast2-4.4.47.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.4rAYjk/_old  2022-03-11 21:41:16.118070716 +0100
+++ /var/tmp/diff_new_pack.4rAYjk/_new  2022-03-11 21:41:16.122070720 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.4.45
+Version:        4.4.47
 Release:        0
 
 Summary:        YaST2 Main Package

++++++ yast2-4.4.45.tar.bz2 -> yast2-4.4.47.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/doc/yast-invoking-external-commands.md 
new/yast2-4.4.47/doc/yast-invoking-external-commands.md
--- old/yast2-4.4.45/doc/yast-invoking-external-commands.md     1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-4.4.47/doc/yast-invoking-external-commands.md     2022-03-11 
15:55:52.000000000 +0100
@@ -0,0 +1,275 @@
+# Invoking External Commands in YaST
+
+## Best Practice: Yast::Execute
+
+_This is the method to use since about 2018. Don't use SCR .target.bash in new 
code._
+
+```Ruby
+Yast::Execute.on_target!("ls", "-l", arg)
+```
+
+or
+
+```Ruby
+Yast::Execute.locally!("ls", "-l", arg)
+```
+
+This does **not** use a shell to invoke the command, it does a simple `fork()`
+/ `execvp()`. It does use `$PATH`, though. See below for security
+considerations.
+
+Since this does not use a shell, there is no wildcard file globbing, no I/O
+redirection, no pipelined commands, no `||` or `&&`. But all that should be
+handled in Ruby code anyway; don't use `| grep | awk` etc. pipelines in YaST
+code; Ruby can do all that better and safer.
+
+Under the hood, _Yast::Execute_ uses the [Cheetah Ruby 
Gem](https://github.com/openSUSE/cheetah).
+
+See also the [Yast::Execute reference 
documentation](https://www.rubydoc.info/github/yast/yast-yast2/master/Yast/Execute)
+and 
[sources](https://github.com/yast/yast-yast2/blob/master/library/system/src/lib/yast2/execute.rb).
+
+
+## Legacy Method: SCR .target.bash
+
+Much of the existing YaST code still uses _SCR_ with _.target.bash_.
+_This should not be used in new code anymore._
+
+As the name implies, _.target.bash_ uses a bash shell, and it starts external
+programs on the _target_, i.e. in a _chroot_ environment (if needed,
+i.e. during installation or system upgrade) of the machine that is currently
+being installed or configured.
+
+
+### .target.bash in the Ruby Code
+
+```Ruby
+ret_code = SCR.Execute(path(".target.bash"), command)
+```
+
+or
+
+```Ruby
+result = SCR.Execute(path(".target.bash_output"), command)
+ret_code = result["exit"]
+stdout = result["stdout"]
+stderr = result["stderr"]
+```
+
+or
+
+```Ruby
+output = SCR.Execute(path(".target.bash_output"), command)["stdout"]
+```
+
+_(also available: .target.bash_background, .target.bash_input)_
+
+
+### .target.bash: The System Agent
+
+This uses the _system agent_ which is registered for all SCR _paths_ starting 
with `.target`.
+
+<details>
+
+`/usr/share/YaST2/scrconf/target.scr`:
+
+```
+.target
+`ag_system ()
+```
+
+https://github.com/yast/yast-core/blob/master/agent-system/conf/target.scr#L51
+
+This ultimately comes down to using the plain C stdlib `system()` function 
(`man 3 system`):
+
+https://github.com/yast/yast-core/blob/master/agent-system/src/ShellCommand.cc#L170
+
+In the inst-sys, this uses a _chroot_ jail:
+
+https://github.com/yast/yast-core/blob/master/agent-system/src/ShellCommand.cc#L155
+</details>
+
+
+### .target.bash: Called with a Shell
+
+`system()` executes the command with `/bin/sh` (not the user's login shell!) 
like this:
+
+```C
+execl("/bin/sh", "sh", "-c", command, (char *) 0);
+```
+(From `man 3 system`)
+
+As a consequence, common shell mechanisms work:
+
+- I/O redirection with `>somewhere` / `<somewhere`, `2>&1`
+- command pipelining with `|`
+- starting multiple commands with `;`
+- logical operators like `||` and `&&`
+- file globbing with wildcards
+etc.
+
+None of that would work if it were just `fork()` and `exec()` with the binary 
that is to be called.
+
+
+## Shell Startup Files
+
+No startup files like `~/.bashrc`, `~/.profile`, `/etc/profile` are executed
+because it's not an interactive or a login shell, so there is no danger of
+`$PATH` being modified.
+
+<details>
+
+Since `system()` uses `/bin/sh`, the shell that is used can be either _bash_
+or, in minimalistic environments, _dash_. It does _not_ take the user's login
+shell into account, so other shells like _zsh_, _tcsh_, _csh_, _ksh_ are
+irrelevant here.
+
+
+### Bash Startup Files
+
+_See `man bash`_
+
+For interactive login shells:
+
+- `/etc/profile`
+- `~/.bash_profile`
+- `~/.bash_login`
+- `~/.profile`
+
+For interactive shells:
+- `/etc/bash.bashrc`
+- `~/.bashrc`
+
+### Dash Startup Files
+
+_See `man dash`_
+
+For login shells:
+
+- `/etc/profile`
+- `~/.profile`
+
+
+### Shell Startup Files used from system()
+
+**None** since a shell started from `system()` is neither a login shell nor an 
interactive shell.
+</details>
+
+
+## Setting up a Safe $PATH
+
+In the main process, explicitly set the `PATH` environment variable to contain
+only known safe locations for executing commands:
+
+```
+/sbin:/usr/sbin:/bin:/usr/bin
+```
+
+In particular, this should never contain `.` (the current directory) or any
+path that _starts_ with `./` or any other relative path, and also no
+directories that commonly have write permissions for non-privileged users.
+
+
+## $PATH in the YaST Start-Up Scripts
+
+All YaST code is started from the `y2start` script (part of package
+`yast-ruby-bindings`) which sets up `$PATH` among the first things that it
+does:
+
+https://github.com/yast/yast-ruby-bindings/blob/master/src/y2start/y2start#L18
+https://github.com/yast/yast-ruby-bindings/blob/master/src/ruby/yast/y2start_helpers.rb#L17
+
+```Ruby
+ENV["PATH"] = "/sbin:/usr/sbin:/usr/bin:/bin"
+```
+
+This environment is inherited by all child processes, so we have a safe 
`$PATH` everywhere.
+
+
+## Verifying $PATH
+
+<details>
+This is a little YaST Ruby script to show the value of `$PATH` using different 
methods:
+
+```Ruby
+require "yast"
+
+p = ENV["PATH"]
+puts "env PATH: #{p}"
+
+result = Yast::SCR.Execute(Yast.path(".target.bash_output"), "echo $PATH")
+stdout = result["stdout"]
+puts "echo $PATH: #{stdout}"
+
+result = Yast::SCR.Execute(Yast.path(".target.bash_output"), "printenv | grep 
'^PATH'")
+stdout = result["stdout"]
+puts "printenv | grep '^PATH': #{stdout}"
+
+p = `echo $PATH`
+puts "with backticks: #{p}"
+```
+
+Notice that this intentionally does not have a shell she-bang and no execute
+permissions, just like other YaST clients. The way to start this is:
+
+```
+/usr/lib/YaST2/bin/y2start ./yast_path_target_bash.rb qt
+```
+
+The output:
+
+```
+env PATH: /sbin:/usr/sbin:/usr/bin:/bin
+echo $PATH: /sbin:/usr/sbin:/usr/bin:/bin
+printenv | grep '^PATH': PATH=/sbin:/usr/sbin:/usr/bin:/bin
+with backticks: /sbin:/usr/sbin:/usr/bin:/bin
+```
+
+Executing similar code in `irb` to show that the shell environment (without
+using `y2start`) does indeed have a different $PATH:
+
+```irb
+[sh @ balrog-tw-dev] ~ 2 % irb
+irb(main):001:0> require "yast"
+=> true
+irb(main):002:0> Yast::SCR.Execute(Yast.path(".target.bash_output"), "echo 
$PATH")["stdout"]
+=> 
".:/home/sh/util:/home/sh/perl:/usr/local/bin:/usr/lib64/qt5/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/gnome/bin:/usr/share/YaST2/data/devtools/bin"
+irb(main):003:0>
+```
+</details>
+
+
+## Use Absolute Paths or Rely on $PATH?
+
+For calling external programs that are in any of the well-known secure
+locations (`/bin`, `/usr/bin`, `/sbin`, `usr/sbin`), use only the name without
+the path: `cp`, not `/bin/cp`; `mkdir`, not `/bin/mkdir` etc.: That makes it
+safe against being moved from one directory to another, e.g. during the
+_usr-merge_ around 2022 where commands were moved from `/bin` to `/usr/bin` and
+from `/sbin` to `/usr/sbin`.
+
+Even if there are compatibility symlinks (e.g. `/bin/mkdir` -> `/usr/bin/mkdir`
+or in other releases `/bin` -> `/usr/bin`), there is no guarantee that they
+will be there forever.
+
+For calling external programs in other directories like
+`/usr/lib/YaST2/bin/y2start`, the full path still needs to be used, of course.
+
+
+## Other Methods of Calling External Programs
+
+The standard Ruby methods should not be used in any YaST code anyway to make
+sure it supports a _chroot_ environment that works inside the mounted
+installation target and affects paths there, not in the inst-sys (which is
+largely mounted read-only anyway).
+
+But still, those standard Ruby methods also get the same `$PATH`, so they are
+safe as well:
+
+- Using backticks (see example above)
+- Using Ruby `system()`
+- Ruby gems using any of those
+
+
+## Further Reading
+
+- [YaST Security Audit Lessons 
Learned](https://github.com/yast/yast.github.io/issues/172)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/src/lib/network/susefirewall.rb 
new/yast2-4.4.47/library/network/src/lib/network/susefirewall.rb
--- old/yast2-4.4.45/library/network/src/lib/network/susefirewall.rb    
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/src/lib/network/susefirewall.rb    
2022-03-11 15:55:52.000000000 +0100
@@ -557,7 +557,7 @@
         @needed_packages_installed = 
Package.CheckAndInstallPackages([@FIREWALL_PACKAGE])
         log.info "CheckAndInstallPackages -> #{@needed_packages_installed}"
       else
-        @needed_packages_installed = Package.Installed(@FIREWALL_PACKAGE)
+        @needed_packages_installed = Package.Installed(@FIREWALL_PACKAGE, 
target: :system)
         log.info "Installed -> #{@needed_packages_installed}"
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/src/lib/y2firewall/firewalld/api.rb 
new/yast2-4.4.47/library/network/src/lib/y2firewall/firewalld/api.rb
--- old/yast2-4.4.45/library/network/src/lib/y2firewall/firewalld/api.rb        
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/src/lib/y2firewall/firewalld/api.rb        
2022-03-11 15:55:52.000000000 +0100
@@ -91,7 +91,7 @@
       # @return [Boolean] true if the state is running; false otherwise
       def running?
         return false if Yast::Stage.initial
-        return false if !Yast::Package.Installed(PACKAGE)
+        return false if !Yast::Package.Installed(PACKAGE, target: :system)
 
         state == "running"
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/src/lib/y2firewall/firewalld.rb 
new/yast2-4.4.47/library/network/src/lib/y2firewall/firewalld.rb
--- old/yast2-4.4.45/library/network/src/lib/y2firewall/firewalld.rb    
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/src/lib/y2firewall/firewalld.rb    
2022-03-11 15:55:52.000000000 +0100
@@ -206,7 +206,7 @@
     def installed?
       return true if @installed
 
-      @installed = Yast::Package.Installed(PACKAGE)
+      @installed = Yast::Package.Installed(PACKAGE, target: :system)
     end
 
     # Check whether the firewalld service is enable or not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/src/modules/DnsServerAPI.pm 
new/yast2-4.4.47/library/network/src/modules/DnsServerAPI.pm
--- old/yast2-4.4.45/library/network/src/modules/DnsServerAPI.pm        
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/src/modules/DnsServerAPI.pm        
2022-03-11 15:55:52.000000000 +0100
@@ -52,7 +52,7 @@
 
 use YaST::YCP qw( sformat y2milestone y2error y2warning );
 YaST::YCP::Import ("DnsServer");
-YaST::YCP::Import ("Package");
+YaST::YCP::Import ("PackageSystem");
 YaST::YCP::Import ("Service");
 YaST::YCP::Import ("Progress");
 # for reporting errors
@@ -657,15 +657,15 @@
 sub Init {
     if (Mode->test ()) {
       $package_installed = 1;
-      y2milestone("TestMode -> Package->Installed: ", $package_installed);
+      y2milestone("TestMode -> PackageSystem->Installed: ", 
$package_installed);
     }
 
     if ($package_installed != -1){
         return $package_installed;
     }
 
-    $package_installed = Package->Installed('yast2-dns-server');
-    y2milestone("Package->Installed: ", $package_installed);
+    $package_installed = PackageSystem->Installed('yast2-dns-server');
+    y2milestone("PackageSystem->Installed: ", $package_installed);
     if ($package_installed == 0){
         y2warning("yast2-dns-server is not installed. Functions of 
DnsServerAPI will be disabled") 
     }
@@ -2761,7 +2761,7 @@
 
     my $service_enabled   = Service->Enabled         ("named");
     my $service_status    = Service->Status          ("named");
-    my $service_installed = Package->Installed ("bind");
+    my $service_installed = PackageSystem->Installed ("bind");
 
     y2milestone (
        "Enabled: ".$service_enabled.", ".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/src/modules/NetworkService.rb 
new/yast2-4.4.47/library/network/src/modules/NetworkService.rb
--- old/yast2-4.4.45/library/network/src/modules/NetworkService.rb      
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/src/modules/NetworkService.rb      
2022-03-11 15:55:52.000000000 +0100
@@ -124,7 +124,7 @@
 
     # Checks if given network backend is available in the system
     def backend_available?(backend)
-      Package.Installed(BACKEND_PKG_NAMES[backend])
+      Package.Installed(BACKEND_PKG_NAMES[backend], target: :system)
     end
 
     alias_method :is_backend_available, :backend_available?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.4.45/library/network/test/y2firewall/firewalld_test.rb 
new/yast2-4.4.47/library/network/test/y2firewall/firewalld_test.rb
--- old/yast2-4.4.45/library/network/test/y2firewall/firewalld_test.rb  
2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/network/test/y2firewall/firewalld_test.rb  
2022-03-11 15:55:52.000000000 +0100
@@ -43,14 +43,14 @@
 
     it "returns false it the firewalld is not installed" do
       allow(Yast::Package).to receive("Installed")
-        .with(described_class::PACKAGE).and_return(false)
+        .with(described_class::PACKAGE, target: :system).and_return(false)
 
       expect(firewalld.installed?).to eq(false)
     end
 
     it "returns true it the firewalld is installed" do
       allow(Yast::Package).to receive("Installed")
-        .with(described_class::PACKAGE).and_return true
+        .with(described_class::PACKAGE, target: :system).and_return true
 
       expect(firewalld.installed?).to eq(true)
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/library/packages/src/modules/Package.rb 
new/yast2-4.4.47/library/packages/src/modules/Package.rb
--- old/yast2-4.4.45/library/packages/src/modules/Package.rb    2022-02-17 
16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/packages/src/modules/Package.rb    2022-03-11 
15:55:52.000000000 +0100
@@ -38,30 +38,36 @@
 Yast.import "PackageSystem"
 
 module Yast
+  # This module implements support to query, install and remove packages.
+  #
+  # ## Prefer Package to PackageSystem
+  #
+  # Depending on the mode, this module decides if it should interact with 
PackageSystem (libzypp) or
+  # PackageAI (AutoYaST). For instance, if you open a module in the AutoYaST 
UI, calling to
+  # {CheckAndInstallPackages} does not install the package for real. Instead, 
it adds the package to
+  # the list of packages to include in the profile. However, when running on 
other modes (normal,
+  # installation, etc.), it just installs the package.
+  #
+  # ## Overriding default behavior
+  #
+  # There might a scenario where you want to force Package to work with the 
real packages. For
+  # instance, while reading the configuration during a `clone_system` 
operation: the mode is still
+  # `autoinst_config` but you are dealing with the underlying system. In those 
cases, you can force
+  # {Package} to work with {PackageSystem}.
+  #
+  # If you are accessing this module through YCP (for instance, using Perl), 
you cannot pass the
+  # :target option. If you need to specify this option, please consider using 
{PackageSystem} or
+  # {PackageAI} functions directly.
+  #
+  # @example Forcing to check for packages on the underlying system
+  #   Yast::Package.Installed("firewalld", target: :system)
+  #
+  # See https://bugzilla.suse.com/show_bug.cgi?id=1196963 for further details.
   class PackageClass < Module
     extend Forwardable
     include Yast::Logger
 
-    def_delegators :backend, :Installed, :Available, :PackageInstalled,
-      :PackageAvailable, :DoInstallAndRemove, :InstallKernel
-
-    # @!method Installed(package)
-    #   Determines whether the package is provided or not
-    #
-    #   This method checks whether any installed package provides the given 
"package".
-    #
-    #   @param package [String] Package name
-    #   @return [Boolean] true if the package exists; false otherwise
-    #   @see PackageInstalled
-
-    # @!method PackageInstalled(package)
-    #   Determines whether the package is installed or not
-    #
-    #   This method check just the package's name.
-    #
-    #   @param package [String] Package name
-    #   @return [Boolean] true if the package exists; false otherwise
-    #   @see Installed
+    def_delegators :backend, :Available, :PackageAvailable, 
:DoInstallAndRemove, :InstallKernel
 
     # @!method Available(package)
     #   Determines whether the package is available or not
@@ -103,6 +109,32 @@
       @removed_packages = []
     end
 
+    # Determines whether the package is provided or not
+    #
+    # This method checks whether any installed package provides the given 
"package".
+    #
+    # @param package [String] Package name
+    # @param target [Symbol,nil] :autoinst or :system. If it is nil,
+    #   it guesses the backend depending on the mode.
+    # @return [Boolean] true if the package exists; false otherwise
+    # @see PackageInstalled
+    def Installed(package, target: nil)
+      find_backend(target).Installed(package)
+    end
+
+    # Determines whether the package is installed or not
+    #
+    # This method check just the package's name.
+    #
+    # @param package [String] Package name
+    # @param target [Symbol,nil] :autoinst or :system. If it is nil,
+    #   it guesses the backend depending on the mode.
+    # @return [Boolean] true if the package exists; false otherwise
+    # @see Installed
+    def PackageInstalled(package, target: nil)
+      find_backend(target).PackageInstalled(package)
+    end
+
     # Check if packages are installed
     #
     # Install them if they are not and user approves installation
@@ -227,19 +259,23 @@
 
     # Are all of these packages installed?
     # @param [Array<String>] packages list of packages
+    # @param target [Symbol,nil] :autoinst or :system. If it is nil,
+    #   it guesses the backend depending on the mode.
     # @return [Boolean] true if yes
-    def InstalledAll(packages)
+    def InstalledAll(packages, target: nil)
       packages = deep_copy(packages)
-      which = Builtins.find(packages) { |p| !Installed(p) }
+      which = Builtins.find(packages) { |p| !Installed(p, target: target) }
       which.nil?
     end
 
     # Is any of these packages installed?
     # @param [Array<String>] packages list of packages
+    # @param target [Symbol,nil] :autoinst or :system. If it is nil,
+    #   it guesses the backend depending on the mode.
     # @return [Boolean] true if yes
-    def InstalledAny(packages)
+    def InstalledAny(packages, target: nil)
       packages = deep_copy(packages)
-      which = Builtins.find(packages) { |p| Installed(p) }
+      which = Builtins.find(packages) { |p| Installed(p, target: target) }
       !which.nil?
     end
 
@@ -428,6 +464,25 @@
     def backend
       Mode.config ? PackageAI : PackageSystem
     end
+
+    # Find the backend for the given target
+    #
+    # @param target [Symbol,nil] :autoinst or :system. If it is nil,
+    #   it guesses the backend depending on the mode.
+    def find_backend(target)
+      return backend if target.nil?
+
+      found_backend = case target
+      when :system
+        PackageSystem
+      when :autoinst
+        PackageAI
+      end
+
+      log.warn "select_backend: target '#{target}' is unknown." if 
found_backend.nil?
+
+      found_backend || backend
+    end
   end
 
   Package = PackageClass.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/library/packages/src/modules/Product.rb 
new/yast2-4.4.47/library/packages/src/modules/Product.rb
--- old/yast2-4.4.45/library/packages/src/modules/Product.rb    2022-02-17 
16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/packages/src/modules/Product.rb    2022-03-11 
15:55:52.000000000 +0100
@@ -41,7 +41,7 @@
       Yast.import "Stage"
       Yast.import "OSRelease"
       Yast.import "PackageLock"
-      Yast.import "Package"
+      Yast.import "PackageSystem"
     end
 
     # Loads and returns base product property
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/library/packages/test/package_test.rb 
new/yast2-4.4.47/library/packages/test/package_test.rb
--- old/yast2-4.4.45/library/packages/test/package_test.rb      2022-02-17 
16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/packages/test/package_test.rb      2022-03-11 
15:55:52.000000000 +0100
@@ -267,6 +267,13 @@
         expect(subject.InstalledAll(["yast2", "unknown"])).to eq(false)
       end
     end
+
+    context "when the target is set" do
+      it "asks for packages in the corresponding backend" do
+        expect(subject).to receive(:Installed).with("yast2", target: :system)
+        subject.InstalledAll(["yast2"], target: :system)
+      end
+    end
   end
 
   describe "#InstalledAny" do
@@ -289,6 +296,13 @@
         expect(subject.InstalledAny(["unknown"])).to eq(false)
       end
     end
+
+    context "when the target is set" do
+      it "asks for packages in the corresponding backend" do
+        expect(subject).to receive(:Installed).with("yast2", target: :system)
+        subject.InstalledAny(["yast2"], target: :system)
+      end
+    end
   end
 
   describe "#DoInstallAndRemove" do
@@ -470,6 +484,38 @@
       end
     end
   end
+
+  describe "#Installed" do
+    context "when the target is set to :system" do
+      it "delegates to the PackageSystem module" do
+        expect(Yast::PackageSystem).to receive(:Installed).with("firewalld")
+        subject.Installed("firewalld", target: :system)
+      end
+    end
+
+    context "when the target is set to :system" do
+      it "delegates to the PackageAI module" do
+        expect(Yast::PackageAI).to receive(:Installed).with("firewalld")
+        subject.Installed("firewalld", target: :autoinst)
+      end
+    end
+  end
+
+  describe "#PackageInstalled" do
+    context "when the target is set to :system" do
+      it "delegates to the PackageSystem module" do
+        expect(Yast::PackageSystem).to 
receive(:PackageInstalled).with("firewalld")
+        subject.PackageInstalled("firewalld", target: :system)
+      end
+    end
+
+    context "when the target is set to :system" do
+      it "delegates to the PackageAI module" do
+        expect(Yast::PackageAI).to receive(:PackageInstalled).with("firewalld")
+        subject.PackageInstalled("firewalld", target: :autoinst)
+      end
+    end
+  end
 
   describe "#InstallMsg" do
     it "asks to install a single package using a custom message" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/library/packages/test/product_test.rb 
new/yast2-4.4.47/library/packages/test/product_test.rb
--- old/yast2-4.4.45/library/packages/test/product_test.rb      2022-02-17 
16:28:49.000000000 +0100
+++ new/yast2-4.4.47/library/packages/test/product_test.rb      2022-03-11 
15:55:52.000000000 +0100
@@ -7,15 +7,6 @@
 # Important: Loads data in constructor
 Yast.import "Product"
 
-Yast.import "Mode"
-Yast.import "Stage"
-Yast.import "OSRelease"
-Yast.import "Package"
-Yast.import "Pkg"
-Yast.import "PackageLock"
-Yast.import "Mode"
-Yast.import "Stage"
-
 def load_zypp(file_name)
   file_name = File.join(PACKAGES_FIXTURES_PATH, "zypp", file_name)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/package/yast2.changes 
new/yast2-4.4.47/package/yast2.changes
--- old/yast2-4.4.45/package/yast2.changes      2022-02-17 16:28:49.000000000 
+0100
+++ new/yast2-4.4.47/package/yast2.changes      2022-03-11 15:55:52.000000000 
+0100
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Fri Mar 11 13:05:14 UTC 2022 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Extend the Package module to force using PackageSystem or
+  PackageAI without having the mode into account.
+- AutoYaST: properly detect whether firewalld, bind and
+  yast2-dns-server packages are installed when cloning a system
+  (bsc#1196963).
+- 4.4.47
+
+-------------------------------------------------------------------
+Tue Mar  8 13:24:14 UTC 2022 - Stefan Hundhammer <shundham...@suse.com>
+
+- Reverted LD_PRELOAD change (GitHub PR#1236) (bsc#1196326)
+- 4.4.46
+
+-------------------------------------------------------------------
+Wed Mar  2 12:00:57 UTC 2022 - Stefan Hundhammer <shundham...@suse.com>
+
+- New doc: Invoking External Commands in YaST (in doc/)
+
+-------------------------------------------------------------------
 Thu Feb 17 13:25:33 UTC 2022 - Steffen Winterfeldt <snw...@suse.com>
 
 - do not strip surrounding white space in CDATA XML elements (bsc#1195910)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/package/yast2.spec 
new/yast2-4.4.47/package/yast2.spec
--- old/yast2-4.4.45/package/yast2.spec 2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/package/yast2.spec 2022-03-11 15:55:52.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.4.45
+Version:        4.4.47
 
 Release:        0
 Summary:        YaST2 Main Package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.4.45/scripts/yast2 
new/yast2-4.4.47/scripts/yast2
--- old/yast2-4.4.45/scripts/yast2      2022-02-17 16:28:49.000000000 +0100
+++ new/yast2-4.4.47/scripts/yast2      2022-03-11 15:55:52.000000000 +0100
@@ -13,11 +13,6 @@
 # wise ncurses. It starts then the module 'menu' which implements
 # the configuration and administration menu.
 
-# bsc#1194996: workaround for "cannot allocate memory in static TLS block"
-if [ -f /usr/lib64/libsuseconnect.so ]; then
-  export LD_PRELOAD="/usr/lib64/libsuseconnect.so $LD_PRELOAD"
-fi
-
 # FATE#317637, bsc#877447: In installation system, we call the installer
 # script directly and then exit
 if [ -f /.instsys.config ]; then

Reply via email to