Bug 55636 - Updater does not take the url prefix specified in UCRV repository/online/component/$comp/server
Updater does not take the url prefix specified in UCRV repository/online/comp...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 5.0
All Linux
: P5 normal (vote)
: UCS 5.0-3-errata
Assigned To: Peter Stoll
Dirk Wiesenthal
:
Depends on: 55044
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-01 13:46 CET by Peter Stoll
Modified: 2023-03-01 14:55 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.229
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023022321000442,2023022621000321
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Stoll univentionstaff 2023-02-01 13:46:22 CET
When specifying a prefix in the UCRV repository/online/component/$comp/server the updater does not consider this prefix resulting in error entries in 20_ucs-online-component.list where the prefix is missing in the uri
Comment 1 Peter Stoll univentionstaff 2023-02-24 12:40:14 CET
79ab9ad8a4 Bug #55636: Fix updater not to ignore the url path for component repositories
Comment 2 Peter Stoll univentionstaff 2023-02-24 15:12:06 CET
Package: univention-updater
Version: 15.0.6-5A~5.0.0.202302241506
Branch: ucs_5.0-0
Scope: errata5.0-3
Comment 3 Mirac Erdemiroglu univentionstaff 2023-02-24 15:36:28 CET
Customer effected Ticket#2023022321000442
SUBJECT: OX App Suite Aktualisierungen
UCS VERSION: 5.0.3 errata 588


Workaround from Dirk W.

Immediate “fix” would be to copy the correct repository lines in /etc/apt/sources.list.d/20_ucs-online-component.list that refer to the specific OX repos from your 5.0-2 machines and put them into the same file in your 5.0-3 machine. I am not sure when the updater overwrites these files. So if you want to install updates, do it quickly via apt. We are working on a fix, though. I am quite confident that changing two lines of code would be more sustainable than changing the repository file:

In /usr/lib/python3/dist-packages/univention/updater/tools.py
you could change two lines of code around line 1032:
Before

        c_url.path = ''
        prefix = self["prefix"]

After

        prefix = c_url.path or self["prefix"]
        c_url.path = ''

This should work. Do a ucr commit /etc/apt/sources.list.d/20_ucs-online-component.list afterwards.
Comment 5 Mirac Erdemiroglu univentionstaff 2023-02-27 09:16:50 CET
Another customer effected Ticket#2023022621000321
Comment 6 Mirac Erdemiroglu univentionstaff 2023-03-01 06:42:51 CET
Customer Ticket#2023022621000321 on UCS 5.0-3

############################### Start 65_check_repository_config ##############################
## Check failed: 65_check_repository_config - Check repository configuration for correctness ##
Some UCR variables for the repository configuration are deprecated.
As these variables should be no longer used, this check has been added to check for the existence of these variables.
Use the {appcenter:components} to correct these values by once saving the General repository settings 
as well as saving the settings for all Additional repositories or press the Button ADJUST ALL COMPONENTS 
to correct these settings and delete the obsolete variables.
Furthermore, it is checked if the scheme of the server variable is either http or https
The variable 'repository/online/component/backend7106/username' is deprecated and should no longer be used.
The variable 'repository/online/component/frontend7106/username' is deprecated and should no longer be used.
The variable 'repository/online/component/mobileapi1143/username' is deprecated and should no longer be used.
The variable 'repository/online/component/mobileapirestricted211/username' is deprecated and should no longer be used.
The variable 'repository/online/component/oxdocconv7106/username' is deprecated and should no longer be used.
Comment 7 Dirk Wiesenthal univentionstaff 2023-03-01 08:56:37 CET
OX: OK
Tests: OK
Code review: OK
YAML: OK