Bug 53313 - Automatically remove OX default master packages during update
Automatically remove OX default master packages during update
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: General
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Jürn Brodersen
Florian Best
: interim-9
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-21 12:18 CEST by Sönke Schwardt-Krummrich
Modified: 2021-06-01 10:31 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Development Internal
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:
Flags outvoted (downgraded) after PO Review:
Ticket number:
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 Sönke Schwardt-Krummrich univentionstaff 2021-05-21 12:18:52 CEST
In Bug 46736 the OX default master packages have been made obsolete.
According to the bug, the default master packages are not purged automatically. But they still contain Python2 code within the subtemplate for slapd.conf, which prevents the start of slapd during/after the update to UCS 5.

Solution:

Check if one of the packages
- univention-ox-dependencies-master
- univention-ox-directory-integration
are installed.
If the UCRV "ox/master/42/registered_ldap_acls" is set to "yes", then purge the packages automatically, since the LDAP schema is registered in LDAP.
If not, block the update (→ refer to a help-article?)
Comment 1 Jürn Brodersen univentionstaff 2021-05-31 10:24:19 CEST
WIP on "juern/preupsh"
[juern/preupsh 76196bbc3f] Bug #53313: add check for ox schema

TODO: Check how to deploy a new check.sh and preup.sh
Comment 2 Jürn Brodersen univentionstaff 2021-05-31 11:47:48 CEST
For QA:
You can install the packages (univention-ox-dependencies-master, univention-ox-directory-integration) by adding the following to the sources.list:

deb [trusted=yes] http://192.168.0.10/build2/ ucs_4.1-0-oxse4ucs/all/
deb [trusted=yes] http://192.168.0.10/build2/ ucs_4.1-0-oxse4ucs/$(ARCH)/
Comment 3 Jürn Brodersen univentionstaff 2021-05-31 18:00:30 CEST
[5.0-0 d0025f401d] Bug #53336: check if testparm is executable

preup.sh and preup.sh.gpg have been copied to
apt.knut.univention.de (http://apt.knut.univention.de/dists/ucs500/)
updates-test.software-univention.de (https://updates-test.software-univention.de/dists/ucs500/)

pre-update-checks-5.0-0 is only available on apt.knut.univention.de (updates-test has no download folder)
http://apt.knut.univention.de/download/univention-update-checks/

Please reopen if ready for copy to production mirror
Comment 4 Florian Best univentionstaff 2021-05-31 18:11:33 CEST
OK: check: unregistered

Starting check.sh (Mo 31. Mai 18:07:43 CEST 2021):
 The package univention-ox-directory-integration is installed. This package is
 incompatible with UCS 5.0-0.

 As the package contains a LDAP schema extension, this extension (a) has to
 registered in the LDAP database or (b) has to be removed before the update
 to UCS 5.0 is possible.

 (a) Register LDAP schema files from univention-ox-directory-integration:
     To register the LDAP schema, run the following commands:
     "/usr/share/univention-server-master/reregister_ox_ldap_schema.sh"

 or (b) Remove the LDAP schema extension:
        Please visit https://help.univention.com/t/6443 for how to remove LDAP schema extensions
        (remove all attributes and objectclasses from that schema from the LDAP database).

 After either a) or b) has been completed, the package has to be removed from this server:
  univention-remove --purge univention-ox-directory-integration

OK: check: registered

(In reply to Jürn Brodersen from comment #3)
> Please reopen if ready for copy to production mirror
REOPEN:
Comment 5 Jürn Brodersen univentionstaff 2021-05-31 18:47:07 CEST
Copied preup.sh & preup.sh.gpg to production download server:
https://updates.software-univention.de/dists/ucs500/

Copied pre-update-checks-5.0-0 & pre-update-checks-5.0-0.gpg to production download server:
https://updates.software-univention.de/download/univention-update-checks/

I did a quick check:
upgrade can be started and new srcipt is used.

and this snippet from the release notes:
"""
# download
curl -OOf https://updates.software-univention.de/download/univention-update-checks/pre-update-checks-5.0-0{.gpg,}

# verify and run script
apt-key verify pre-update-checks-5.0-0{.gpg,} &&
  bash pre-update-checks-5.0-0
"""
Comment 6 Florian Best univentionstaff 2021-06-01 10:26:57 CEST
OK
Comment 7 Florian Best univentionstaff 2021-06-01 10:31:52 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".