[Bug 1187425] New: zypper resolves OBS URLs wrongly
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Bug ID: 1187425 Summary: zypper resolves OBS URLs wrongly Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.3 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: marius.kittler@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 850320 --> http://bugzilla.opensuse.org/attachment.cgi?id=850320&action=edit How to reproduce & expected behavior # problem It is possible to use an URL with the scheme `obs://` to point to an OBS project. This worked in Leap 15.2 but seems to be broken in Leap 15.3. Apparently the `obs://` URLs are resolved by `zypper` which wrongly omits the `openSUSE_`-prefix when determining the actual download URL. # steps to reproduce and expected behavior The problem can be reproduced using the container image of Leap 15.3. Checkout the attached file for the command to reproduce. I have also appended a version using Leap 15.2 to show how it is actually supposed to behave. # further details This breaks openQA's bootstrapping script: https://progress.opensuse.org/issues/93609 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Andreas Stieger <Andreas.Stieger@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Basesystem |libzypp Assignee|screening-team-bugs@suse.de |zypp-maintainers@suse.de -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Oliver Kurz <okurz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |okurz@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Dominik Heidler <dheidler@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dheidler@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c1 Benjamin Zeller <bzeller@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bzeller@suse.com --- Comment #1 from Benjamin Zeller <bzeller@suse.com> --- This was broken by a change in the /etc/products.d/baseproduct file. When there is no obs platform configured in the zypper.conf, zypper tries to guess the correct one. This is done by parsing the /etc/products.d/baseproduct file, in 15.2 we have:
<vendor>openSUSE</vendor> <name>openSUSE</name> <productline>Leap</productline>
Zypper used the "name" and productline here to build the URL. However in 15.3 we have
<vendor>openSUSE</vendor> <name>Leap</name> <productline>Leap</productline>
breaking the logic. Not sure if the right place to fix that is the baseproduct file or zypp though. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c2 --- Comment #2 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1187425) was mentioned in https://build.opensuse.org/request/show/901354 Backports:SLE-15-SP3 / openQA -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c3 --- Comment #3 from Oliver Kurz <okurz@suse.com> --- (In reply to OBSbugzilla Bot from comment #2)
This is an autogenerated message for OBS integration: This bug (1187425) was mentioned in https://build.opensuse.org/request/show/901354 Backports:SLE-15-SP3 / openQA
Just to explain, this SR does not fix the issue, just mention the bug in the changelog with workaround -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c4 --- Comment #4 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1187425) was mentioned in https://build.opensuse.org/request/show/901704 Backports:SLE-15-SP3 / perl-Cpanel-JSON-XS+perl-Mojolicious+perl-Mojolicious-Plugin-AssetPack -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c5 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|zypp-maintainers@suse.de |adrian.schroeter@suse.com Summary|zypper resolves OBS URLs |Add some <obsplatform> hint |wrongly |to the product file (zypper | |resolves OBS URLs wrongly) --- Comment #5 from Michael Andres <ma@suse.com> --- (In reply to Marius Kittler from comment #0)
Created attachment 850320 [details] How to reproduce & expected behavior
# problem It is possible to use an URL with the scheme `obs://` to point to an OBS project. This worked in Leap 15.2 but seems to be broken in Leap 15.3.
Not really a zypper issue: These URIs have the form of obs://project/[platform] , where project is the name of the OBS project and platform is the target platform (OS) for which the repository is intended. Anyway, the guessed platform is is formed as productname_$releasever. There are a few exceptions for products named 'openSUSE' (e.g. using openSUSE_Leap_$releasever if productline is Leap). If we now change the product name to 'Leap' but OBS still sticks to the old openSUSE_Leap schema for the repos, the guessed values don't match. If guessing fails you have to add the platform on the command line: 'obs://project/openSUSE_Leap_$releasever' (or configure it in /ect/zyp/zypper.conf) In bug#1153687#c5 ff. we suggested that OBS adds a <obsplatform> hint to the product file, so we don't have to guess and fail if obs changes the schema. But there's no result so far. Reassigning it to Adrian, maybe we find a way to add some obsplatform hint to the .prod files. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ma@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c6 Adrian Schr�ter <adrian.schroeter@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|adrian.schroeter@suse.com |ma@suse.com --- Comment #6 from Adrian Schr�ter <adrian.schroeter@suse.com> --- I added the default_obs_repository_name element inside of 'installconfig' element. Please note that this obs stands for the definition of the use OBS instance, while zypper has hardcoded obs to build.opensuse.org afaik. This requires new product converter 1.4.6 and update in obs code: https://github.com/openSUSE/open-build-service/pull/11309 back to zypp people .... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c7 --- Comment #7 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1187425) was mentioned in https://build.opensuse.org/request/show/903167 Factory / obs-service-product_converter -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c8 --- Comment #8 from Michael Andres <ma@suse.com> --- (In reply to Adrian Schr�ter from comment #6)
I added the
default_obs_repository_name
element inside of 'installconfig' element.
Please note that this obs stands for the definition of the use OBS instance, while zypper has hardcoded obs to build.opensuse.org afaik.
Adrian; How does the element look like? In bug#1153687#c9 you suggested to add definition of both, hostname and platform: So I would recommend something like <default_repository_name>openSUSE_Tumbleweed</default_repository_name> Also a <default_obs_url>obs://build.opensuse.org</default_obs_url> may make sense, since in OBS the url syntax is define as obs://$hostname/$project/... What zypper needs to guess is the _final_URL_ for the $project repository. So if in a obs://[$hostname/]$project passed to zypper the hostname is missing or "build.opensuse.org", we replace it by "https://download.opensuse.org/repositories/" For $hostname we do not know, the user had to configure the obs_baseUrl in the zypper.conf because we can't know where it is. If the .product file defines hints for zypper, the easiest for us would be: <>https://download.opensuse.org/repositories/%PROJECT%/openSUSE_Leap_15.3<\> so we can just replace the %PROJECT%. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adrian.schroeter@suse.com Flags| |needinfo?(adrian.schroeter@ | |suse.com) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c9 Adrian Schr�ter <adrian.schroeter@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(adrian.schroeter@ | |suse.com) | --- Comment #9 from Adrian Schr�ter <adrian.schroeter@suse.com> --- okay, I add also the default prefix in another element. note for the release managers, they need manually to add the default_obs_repository_name element, the other one will be filled automatically. I will send a submitrequest to factory once this is deployed. The spec file template will look like this: ... <installconfig> <defaultlang>en_US</defaultlang> <default_obs_repository_name>openSUSE_Tumbleweed</default_obs_repository_name> <default_obs_download_url>%{_download_url}</default_obs_download_url> ... %_download_url will be expanded to https://download.opensuse.org/repositories in build.opensuse.org case. (note: this leaves still unclear cases when specific configurations for certain projects exist or when project maintainers opted for different repository names. I do not want to add the generic template URL here, since the correct way to figure out the name would be to ask the OBS api.) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c10 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo? --- Comment #10 from Michael Andres <ma@suse.com> --- (In reply to Adrian Schr�ter from comment #9) Thanks!
(note: this leaves still unclear cases when specific configurations for certain projects exist or when project maintainers opted for different repository names. I do not want to add the generic template URL here, since the correct way to figure out the name would be to ask the OBS api.)
That's ok. Zypper's obs:// is just a convenience. It does not need to cover 100%. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c11 --- Comment #11 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1187425) was mentioned in https://build.opensuse.org/request/show/903181 Factory / obs-service-product_converter -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c12 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo? | --- Comment #12 from Michael Andres <ma@suse.com> --- @Marius/Oliver: Quick fix is applied in zypper-1.14.47, just in case opernQA needs it. The hints Adrian implemented will be evaluated in a later version. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1187425 http://bugzilla.opensuse.org/show_bug.cgi?id=1187425#c14 --- Comment #14 from Oliver Kurz <okurz@suse.com> --- Thanks a lot. We have applied a workaround to use explicit download.opensuse.org repos for now. But as every user can be affected by this I appreciate the quick fix. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com