Bugzilla – Bug 1211261
'zypper targetos' produces just an empty output line
Last modified: 2023-07-28 15:40:13 UTC
Created attachment 866893 [details] Log of commands collecting system info Bug 977052 is similar, but that was fixed. Attached is a log of commands showing that the info zypper needs for 'targetos' is available, yet it outputs nothing. This time, the fix should include a check by zypper for null data, and an error message in that case, please.
The reason here is the same as in bug #977052 , the producs file does not define a string in xpath:/product/register/target, and this is what zypper would display when running zypper tos without extra options. @Dominique Were the strings removed again? Seems in bug #977052 that was fixed.
@Ludwig, looks like xpath:/product/register/target was again removed from the .prod file. For zypp this value is meaningless, but AFAIK it's consumed by suseconnect. I don't know if we can simply invent some string if the product dies not define one.
I stand corrected, it's not that meaningless for zypp: A RepoIndexService may refer to this value to filter out repositories which are not appropriate for the system.
JFYI: https://github.com/openSUSE/zypper/pull/487/files will add an error note if XPath:/product/register/target is not defined in the product file.
(In reply to Benjamin Zeller from comment #1) > The reason here is the same as in bug #977052 , the producs file does not > define a string in xpath:/product/register/target, and this is what zypper > would display when running zypper tos without extra options. > > @Dominique Were the strings removed again? Seems in bug #977052 that was > fixed. At least openSUSE.product still has: <productline>openSUSE</productline> <!-- Ensure we have valid distrotarget - used by "zypper tos" - boo#977052 --> <register> <updates> <distrotarget arch="x86_64">openSUSE-Tumbleweed-x86_64</distrotarget> <distrotarget arch="s390x">openSUSE-Tumbleweed-s390x</distrotarget> <distrotarget arch="ppc64le">openSUSE-Tumbleweed-ppc64le</distrotarget> <distrotarget arch="aarch64">openSUSE-Tumbleweed-aarch64</distrotarget> </updates> </register> zypper targetos returns nothing, targets -l returns > zypper targetos -l Distribution Label: openSUSE Tumbleweed Short Label: openSUSE
This is added 1:! into the final .prod as: <register> <pool> </pool> <updates> <distrotarget arch="x86_64">openSUSE-Tumbleweed-x86_64</distrotarget> <distrotarget arch="s390x">openSUSE-Tumbleweed-s390x</distrotarget> <distrotarget arch="ppc64le">openSUSE-Tumbleweed-ppc64le</distrotarget> <distrotarget arch="aarch64">openSUSE-Tumbleweed-aarch64</distrotarget> </updates> </register> So seems like the original bug was actually never really fixed (code snipped added does not correspond to what is expected?)
(In reply to Dominique Leuenberger from comment #6) > So seems like the original bug was actually never really fixed (code snipped > added does not correspond to what is expected?) Status from ZYPP's POV is: `zypper tos` returns the targetDistribution defined by the baseproducts XPath:/product/register/target entry. <register> <target>openSUSE-Leap-15.2-x86_64</target> <pool>... As I wrote above, the strings value has no special meaning to zypp. Nothing else below XPath:/product/register is known, parsed or used by ZYPP. - The targetDistribution is/was used to register the system (AFAIK passed to SCC by suseConnect, at least in SLE12). Maybe they meanwhile parse the <register> section on their own and don't use `tos` anymore. Zypper could fallback to soemthign else. - RIS services (e.g. provided by SCC) may tag listed repositories with a targetDistro string. So tagged repositories are added to the system IFF the tag matches the systems targetDistribution. The service-repo-filtering is the only thing which must not break. We can't tell whether Service providers are actually using this feature, but since SLE12 a RIS service has to use the baseproducts XPath:/product/register/target entry to add distro specific repos.
(In reply to Dominique Leuenberger from comment #5) > > zypper targetos -l > Distribution Label: openSUSE Tumbleweed > Short Label: openSUSE Where is the '-l' option for targetos documented? It is not in the zypper man page.
(In reply to Robert Webb from comment #8) > Where is the '-l' option for targetos documented? It is not in the zypper > man page. I'll review the man page. 'zypper help targetos' shows the option.
JFYI: An empty XPath:/product/register/target entry may lead to a http user agent string with a trailing space in ZYPP. We find an increasing number of servers being updated to versions that enforce a part of the http2 protocol, that does not allow spaces at the end of fields (section 8.2.1 of HTTP/2 RFC 9113). Both together leads to `Curl error 92: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)`. Fixed in libzypp-17.31.13.
The same (no XPath:/product/register/target) is apparently true for some of the Leap product files as well. I think zypp will simply create some fallback. Anything's better than an empty string.
Fixed in Tumbleweed - Leap is tracked in sep bug 1212361
JFYI: For zypper-1.14.61 tos behavior and manpage are updated. An error string is written, if XPath:/product/register/target is not defined. targetos (tos) Shows the ID string of the target operating system. The string is defined by the XPath:/product/register/target entry in (current-rootdir)/etc/products.d/baseproduct. If the baseproduct does not provide this entry, or if no baseproduct is installed at all, the value is empty if the --terse global option is used. In not-terse mode the distribution label is shown instead of an empty value, if a baseproduct is installed. -l, --label Show the baseproducts distribution and short label instead.
SUSE-RU-2023:2644-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1211261, 1212187, 1212222 Sources used: SUSE Linux Enterprise Server 15 SP1 (src): libzypp-17.31.14-150100.3.112.1 SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): libzypp-17.31.14-150100.3.112.1, zypper-1.14.61-150100.3.79.1 SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): libzypp-17.31.14-150100.3.112.1, zypper-1.14.61-150100.3.79.1 SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): libzypp-17.31.14-150100.3.112.1, zypper-1.14.61-150100.3.79.1 SUSE CaaS Platform 4.0 (src): libzypp-17.31.14-150100.3.112.1, zypper-1.14.61-150100.3.79.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.
SUSE-RU-2023:2742-1: An update that has five recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1202234, 1209565, 1211261, 1212187, 1212222 Sources used: openSUSE Leap Micro 5.3 (src): protobuf-3.9.2-150200.4.21.1 openSUSE Leap 15.4 (src): protobuf-3.9.2-150200.4.21.1 openSUSE Leap 15.5 (src): protobuf-3.9.2-150200.4.21.1 SUSE Linux Enterprise Server 15 SP2 (src): libzypp-17.31.14-150200.70.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.2.16-150200.3.19.1 SUSE Linux Enterprise Server 15 SP3 (src): libzypp-17.31.14-150200.70.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Linux Enterprise Micro for Rancher 5.3 (src): protobuf-3.9.2-150200.4.21.1 SUSE Linux Enterprise Micro 5.3 (src): protobuf-3.9.2-150200.4.21.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): protobuf-3.9.2-150200.4.21.1 SUSE Linux Enterprise Micro 5.4 (src): protobuf-3.9.2-150200.4.21.1 Basesystem Module 15-SP4 (src): protobuf-3.9.2-150200.4.21.1 Basesystem Module 15-SP5 (src): protobuf-3.9.2-150200.4.21.1 Development Tools Module 15-SP4 (src): protobuf-3.9.2-150200.4.21.1 Development Tools Module 15-SP5 (src): protobuf-3.9.2-150200.4.21.1 SUSE Package Hub 15 15-SP4 (src): protobuf-3.9.2-150200.4.21.1 SUSE Package Hub 15 15-SP5 (src): protobuf-3.9.2-150200.4.21.1 Public Cloud Module 15-SP2 (src): protobuf-3.9.2-150200.4.21.1 Public Cloud Module 15-SP3 (src): protobuf-3.9.2-150200.4.21.1 Public Cloud Module 15-SP4 (src): protobuf-3.9.2-150200.4.21.1 Public Cloud Module 15-SP5 (src): protobuf-3.9.2-150200.4.21.1 SUSE Manager Server 4.2 Module 4.2 (src): protobuf-3.9.2-150200.4.21.1 SUSE Manager Server 4.3 Module 4.3 (src): protobuf-3.9.2-150200.4.21.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.2.16-150200.3.19.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Linux Enterprise Real Time 15 SP3 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.2.16-150200.3.19.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.2.16-150200.3.19.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Manager Proxy 4.2 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Manager Retail Branch Server 4.2 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Manager Server 4.2 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Enterprise Storage 7.1 (src): libzypp-17.31.14-150200.70.1, yast2-update-4.3.5-150300.3.9.1, zypper-1.14.61-150200.54.1, autoyast2-4.3.106-150300.3.56.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.3.12-150300.3.3.2 SUSE Enterprise Storage 7 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2, yast2-pkg-bindings-4.2.16-150200.3.19.1 SUSE Linux Enterprise Micro 5.1 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2 SUSE Linux Enterprise Micro 5.2 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2 SUSE Linux Enterprise Micro for Rancher 5.2 (src): libzypp-17.31.14-150200.70.1, zypper-1.14.61-150200.54.1, protobuf-3.9.2-150200.4.21.1, libsolv-0.7.24-150200.20.2 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.
SUSE-RU-2023:2772-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 1211261, 1212187, 1212222 Sources used: openSUSE Leap Micro 5.3 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 openSUSE Leap 15.4 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 openSUSE Leap 15.5 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 SUSE Linux Enterprise High Performance Computing 15 SP4 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Server 15 SP4 (src): libzypp-17.31.14-150400.3.35.1 SUSE Manager Server 4.3 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Desktop 15 SP4 (src): libzypp-17.31.14-150400.3.35.1 SUSE Manager Retail Branch Server 4.3 (src): libzypp-17.31.14-150400.3.35.1 SUSE Manager Proxy 4.3 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise High Performance Computing 15 SP5 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Server 15 SP5 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Server for SAP Applications 15 SP5 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Desktop 15 SP5 (src): libzypp-17.31.14-150400.3.35.1 SUSE Linux Enterprise Micro for Rancher 5.3 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 SUSE Linux Enterprise Micro 5.3 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 SUSE Linux Enterprise Micro 5.4 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 Basesystem Module 15-SP4 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.1 Basesystem Module 15-SP5 (src): libzypp-17.31.14-150400.3.35.1, zypper-1.14.61-150400.3.24.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.