Bug 55069 - Local repository server broken with customer components
Local repository server broken with customer components
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Repository administration
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Philipp Hahn
Nikola Radovanovic
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-04 13:34 CEST by Philipp Hahn
Modified: 2022-10-04 23:00 CEST (History)
6 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?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022050221000335
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2022-08-04 13:34:28 CEST
`univention-repository-update net` fails on a local repository server when customer components from https://service.software-univention.de/apt/ are enabled:

> Configuration error: non-existing component prefix: http://updates.software-univention.de/apt/10568/

It happens when the `{pre,post}up.sh[.gpg]` are downloaded and can be triggered by running
> python3 -c 'from univention.updater.mirror import UniventionMirror;m=UniventionMirror();m.run()'

> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/python3/dist-packages/univention/updater/mirror.py", line 217, in run
>     self.mirror_update_scripts()
>   File "/usr/lib/python3/dist-packages/univention/updater/mirror.py", line 172, in mirror_update_scripts
>     for server, struct, phase, path, script in scripts:
>   File "/usr/lib/python3/dist-packages/univention/updater/tools.py", line 1749, in get_sh_files
>     for server, struct, critical in all_repos():
>   File "/usr/lib/python3/dist-packages/univention/updater/tools.py", line 1744, in all_repos
>     for server, struct in comp.versions(start, end, mirror):
>   File "/usr/lib/python3/dist-packages/univention/updater/tools.py", line 1116, in versions
>     server = self.server(for_mirror_list=for_mirror_list)
>   File "/usr/lib/python3/dist-packages/univention/updater/tools.py", line 1098, in server
>     raise ConfigurationError(uri, 'non-existing component prefix: %s' % (uri,))
> univention.updater.errors.ConfigurationError: Configuration error: non-existing component prefix: http://updates.software-univention.de/apt/10568/

Patch:
@/usr/lib/python3/dist-packages/univention/updater/mirror.py:171
-        scripts = self.get_sh_files(self.version_start, self.version_end)
+        scripts = self.get_sh_files(self.version_start, self.version_end, mirror=True)

Most likely introduced by git:release-5.0-0~1560^2~13
Comment 1 Philipp Hahn univentionstaff 2022-08-04 16:25:23 CEST
[5.0-2] 9852227fa5 fix[updater]: repo-up net with components
 base/univention-updater/conftest.py                          | 12 ++++++-----
 base/univention-updater/debian/changelog                     |  7 +++++++
 base/univention-updater/modules/univention/updater/mirror.py |  2 +-
 base/univention-updater/tests/test_mirror.py                 | 36 ++++++++++++++++++++++++++++++++
 doc/errata/staging/univention-updater.yaml                   | 14 +++++++++++++
 5 files changed, 65 insertions(+), 6 deletions(-)

Package: univention-updater
Version: 15.0.4-3A~5.0.0.202208041621
Branch: ucs_5.0-0
Scope: errata5.0-2

[5.0-2] 48173cda4f Bug #55069: univention-updater 15.0.4-3A~5.0.0.202208041621
 doc/errata/staging/univention-updater.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)