Bug 1181622

Summary: Enhance the man page and help text for addlock command
Product: [openSUSE] openSUSE Distribution Reporter: Peter Möller <gorgonz>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: gorgonz, ma
Version: Leap 15.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST2 log extraction
The lock file og zypp

Description Peter Möller 2021-01-31 23:21:02 UTC
I locked the kernel version "kernel-default-5.3.18-lp152.60.1-x86_64" with zypper command
zypper al kernel-default-5.3.18-lp152.60.1-x86_64
Verified it positively with 
zypper ll

Opened YaST2 GUI
selected software -> install software
searched for kernel-default
selected the entry and activated tab "versions"
The version *60 was marked for update

Second run: Activated SW updater App and asked for new updates
=> kernel *60 was suggested

Of course, this is a normal bug, but since kernel *60 kills the graphics driver mod. somehow I really must control any update pretty carefully, because I will not have a display of the desktop with the next boot ;-)

Hint: booting did not change the situation
Comment 1 Peter Möller 2021-02-02 16:44:29 UTC
Additoanl info: On order to know, whether the kernel is only marked for update, but maybe not installed I did:
- Start YaST
- click submit

=> the kernel *60 gets installed
Comment 2 Peter Möller 2021-02-03 11:28:48 UTC
Another hint: I noticed, that *60 kernel update is marked as a security patch. Maybe this implies some kind if dependencies, that I can't figure out ;-).

Anyway the base situation is:
- kernel version *60 was explicitly uninstalled in YaST
- Verified it positively, that no *60 files are in /boot
Comment 3 Lukas Ocilka 2021-02-03 11:41:02 UTC
Could you attach YaST and zypp logs please?

https://en.opensuse.org/openSUSE:Report_a_YaST_bug
Comment 4 Peter Möller 2021-02-03 12:57:13 UTC
Created attachment 845788 [details]
YaST2 log extraction
Comment 5 Peter Möller 2021-02-03 12:58:27 UTC
Created attachment 845789 [details]
The lock file og zypp
Comment 6 Peter Möller 2021-02-03 12:59:22 UTC
Started YaST (I always mean YaST2)
- selected "Online Updates"
- shows the tab "patches" and "summary" "security update for the linux kernel, next to a blue icon with a plus sign.
- now I extracted from /var/log/YaST2/y2log the last line before today and all following lines
- the web page suggests the zypp log at /var/log/zypp, there is only a history file dating from yesterday.
- also add /etc/zypp/locks
Comment 7 Peter Möller 2021-02-03 13:08:35 UTC
the only zypp report of today, that I found was in /var/log/pk_backend_zypp. It is one line:
2021-02-03 10:30:54 <1> linux.fritz.box(3561) [zypp] PathInfo.cc(recursive_rmdir):435 recursive_rmdir /var/tmp/zypp.HFae6i
Comment 8 Lukas Ocilka 2021-02-03 13:12:57 UTC
So it's like `zypper patch`, could you try that too?
What does it print?
Comment 9 Lukas Ocilka 2021-02-03 13:17:20 UTC
Just found this in the YaST log:

[zypp] HardLocksFile.cc(load):46 Read /etc/zypp/locks{- 0644 0/0 size 207}

[zypp] PoolImpl.h(reapplyHardLocks):292 Re-apply 2 HardLockQueries
[zypp] PoolImpl.h(reapplyHardLocks):298 HardLockQueries match 0 Solvables.

[zconfig] ZConfig.cc(getSpec):734 MultiversionSpec '/' = {
[zconfig] ZConfig.cc(getSpec):734   provides:multiversion(kernel)
[zconfig] ZConfig.cc(getSpec):734 }

[zypp::solver] SATResolver.cc(setLocks):1992 Locked 0 installed items and 0 NOT installed items.

Michael, what do you think?
Comment 10 Michael Andres 2021-02-03 16:45:49 UTC
(In reply to Peter Möller from comment #0)
> zypper al kernel-default-5.3.18-lp152.60.1-x86_64

The command adds a lock for a package _named_ 'kernel-default-5.3.18-lp152.60.1-x86_64':

    addlock (al) [OPTIONS] <PACKAGENAME> ...

    Add a package lock. Specify packages to lock by exact name or 
    by a glob pattern using '*' and '?' wildcard characters.

Such a package does not exist. 'zypper ll --matches' (or --solvables) will tell that this lock does not match any package (same in the YAST log 'HardLockQueries match 0 Solvables').

To lock kernel-default (all versions):
    zypper al kernel-default

To lock kernel-default in a specific version or version range:
    zypper al 'kernel-default = 5.3.18-lp152.60.1'
    zypper al 'kernel-default = 5.3.18'   # all releases of 5.3.18
  or
    zypper al 'kernel-default < 5.3.18-lp152.60.1'
  or <=, >, >=, !=

Check the result with:
    zypper ll --matches' (or --solvables)
Comment 11 Lukas Ocilka 2021-02-03 16:48:33 UTC
Thanks Michael!

So, Peter, does that help? Do we need a better documentation or something?
Comment 12 Michael Andres 2021-02-03 16:53:13 UTC
If YAST does not need this report anymore, feel free to reassign it to component  libzypp: As a request to enhance the man page and help text.
Comment 13 Peter Möller 2021-02-05 16:03:03 UTC
Yes, thanks Michael for pointing this out :-)

You are right, after locking with 'kernel-default = 5.3.18-lp152.60.1' the results are different now.

Before this the column 'matches' showed '0' and afterwards the new entry gets '1'.

Calling YaST then will offer multiple choices like 'not install' and 'install and remove lock'.

That's perfect.

I will redirect it.

My suggestion for the man page is:
add a second possibility for specific versions with syntax pkg = name

No one could suppose this without the description that exists at the moment ;-)
Comment 14 Michael Andres 2021-02-19 16:04:28 UTC
       A lock-spec is formed by "NAME [OP EDITION]", where NAME may
       also be a glob pattern using * and ? wildcard characters.
       Non-package types may to have their kind-string prepended (e.g.
       patch:foo or product:baa) or use the commands --type option.

       The basic form will lock all editions of the matching items. You
       can optionally restrict the lock to match a specific edition or
       edition range using =, <, <=, >, >= or != followed by the
       edition.

           Note
           If you use blanks around the operator you need to quote the
           string or escape the blanks according to the rules of the
           shell you are using.

Fixed man page (accordingly help text) for zypper-1.14.43.
Comment 17 Swamp Workflow Management 2021-03-11 23:19:06 UTC
SUSE-SU-2021:0770-1: An update that solves one vulnerability and has 15 fixes is now available.

Category: security (moderate)
Bug References: 1050625,1174016,1177238,1177275,1177427,1177583,1178910,1178966,1179083,1179222,1179415,1179847,1179909,1181328,1181622,1182629
CVE References: CVE-2017-9271
JIRA References: 
Sources used:
SUSE Linux Enterprise Server for SAP 15 (src):    libsolv-0.7.17-3.40.1, libzypp-17.25.8-3.66.1, yast2-installation-4.0.77-3.22.5, zypper-1.14.43-3.49.1
SUSE Linux Enterprise Server 15-LTSS (src):    libsolv-0.7.17-3.40.1, libzypp-17.25.8-3.66.1, yast2-installation-4.0.77-3.22.5, zypper-1.14.43-3.49.1
SUSE Linux Enterprise Installer 15 (src):    libsolv-0.7.17-3.40.1, libzypp-17.25.8-3.66.1, yast2-installation-4.0.77-3.22.5, zypper-1.14.43-3.49.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    libsolv-0.7.17-3.40.1, libzypp-17.25.8-3.66.1, yast2-installation-4.0.77-3.22.5, zypper-1.14.43-3.49.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    libsolv-0.7.17-3.40.1, libzypp-17.25.8-3.66.1, yast2-installation-4.0.77-3.22.5, zypper-1.14.43-3.49.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 18 Swamp Workflow Management 2021-03-18 14:17:23 UTC
SUSE-RU-2021:0874-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1179847,1181328,1181622,1182629
CVE References: 
JIRA References: 
Sources used:
SUSE MicroOS 5.0 (src):    libsolv-0.7.17-3.17.1, libzypp-17.25.8-3.31.1, zypper-1.14.43-3.20.1
SUSE Linux Enterprise Module for Development Tools 15-SP2 (src):    libsolv-0.7.17-3.17.1
SUSE Linux Enterprise Module for Basesystem 15-SP2 (src):    libsolv-0.7.17-3.17.1, libzypp-17.25.8-3.31.1, zypper-1.14.43-3.20.1
SUSE Linux Enterprise Installer 15-SP2 (src):    libsolv-0.7.17-3.17.1, libzypp-17.25.8-3.31.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 19 Swamp Workflow Management 2021-03-21 17:17:31 UTC
openSUSE-RU-2021:0456-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1179847,1181328,1181622,1182629
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    libsolv-0.7.17-lp152.2.16.1, libzypp-17.25.8-lp152.2.22.1, zypper-1.14.43-lp152.2.18.1
Comment 20 Swamp Workflow Management 2021-03-25 23:18:59 UTC
SUSE-SU-2021:0956-1: An update that solves one vulnerability, contains one feature and has 18 fixes is now available.

Category: security (moderate)
Bug References: 1050625,1174016,1177238,1177275,1177427,1177583,1178910,1178966,1179083,1179222,1179816,1179847,1179909,1180077,1180663,1180721,1181328,1181622,1182629
CVE References: CVE-2017-9271
JIRA References: SLE-8482
Sources used:
SUSE Manager Server 4.0 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Manager Retail Branch Server 4.0 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Manager Proxy 4.0 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Linux Enterprise Installer 15-SP1 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE Enterprise Storage 6 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1
SUSE CaaS Platform 4.0 (src):    libsigc++2-2.10.0-3.7.1, libsolv-0.7.17-3.32.1, libyui-ncurses-pkg-2.48.9-7.7.1, libyui-ncurses-pkg-doc-2.48.9-7.7.1, libyui-qt-pkg-2.45.28-3.10.1, libyui-qt-pkg-doc-2.45.28-3.10.1, libzypp-17.25.8-3.48.1, yast2-pkg-bindings-4.1.3-3.10.3, zypper-1.14.43-3.34.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.