Bug 41166 - Broken auto-detection for local repository prefix
Broken auto-detection for local repository prefix
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-1-errata
Assigned To: Philipp Hahn
Felix Botner
:
Depends on: 40148
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-27 16:29 CEST by Philipp Hahn
Modified: 2016-05-04 18:18 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Don't use default prefix when only server is given. (1.43 KB, patch)
2016-04-27 16:29 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-04-27 16:29:27 CEST
Created attachment 7627 [details]
Don't use default prefix when only server is given.

If a local repository server is used (for a PXE installation), UCRV "repository/online/server" gets set to the FQDN of the local repository server, but not "repository/online/prefix". The updater then tries at access the local repository without the required prefix "univention-repository/".

This is due modules/univention/updater/repo_url.py:
42:    DEFAULT = 'https://updates.software-univention.de/'
44:    def __init__(self, ucr, prefix, default=None):
61:        if url.scheme:
68:        else:
69:            if default is None:
70:                default = self.DEFAULT
73:            default = urlsplit(default)
85:            prefix = ucrv('prefix', default.path)
as 'repo/online/prefix' is not set, we get the '/' from the DEFAULT
87:        if prefix:
88:            prefix = prefix.strip('/')
89:            if prefix:
90:                self.path = '/%s/' % (prefix,)
91:            else:
92:                self.path = '/'
93:        else:
94:            self.path = ''
Comment 1 Philipp Hahn univentionstaff 2016-04-27 19:51:09 CEST
r68972 | Bug #41166 up: Fix local repository prefix detection

Package: univention-updater
Version: 11.0.9-6.1468.201604271907
Branch: ucs_4.1-0
Scope: errata4.1-1

r68979 | Bug #41083,Bug #41165,Bug #41166: updater YAML
 univention-updater.yaml
Comment 2 Felix Botner univentionstaff 2016-05-03 14:38:02 CEST
OK - univention-updater detection of the local repository prefix
OK - univention-updater.yaml
Comment 3 Janek Walkenhorst univentionstaff 2016-05-04 18:18:13 CEST
<http://errata.software-univention.de/ucs/4.1/172.html>