Bug 50425 - Migrate management/univention-appcenter to dh_python2
Migrate management/univention-appcenter to dh_python2
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
All Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Johannes Keiser
Dirk Wiesenthal
:
Depends on: 49140 49145 49147 49161
Blocks: 28497
  Show dependency treegraph
 
Reported: 2019-10-29 08:47 CET by Florian Best
Modified: 2019-11-13 16:04 CET (History)
2 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:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (8.12 KB, patch)
2019-10-29 08:47 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-10-29 08:47:54 CET
Created attachment 10222 [details]
patch

Further adaptions regarding dh-python for the univention-appcenter are necessary.

+++ This bug was initially created as a clone of Bug #49145 +++

The package management/univention-appcenter should be migrated to use dh_python instead of python-support.

Migration-Guide: https://hutten.knut.univention.de/mediawiki/index.php/Python_DebHelper_Migration
Comment 1 Johannes Keiser univentionstaff 2019-11-01 10:59:55 CET
Successful build
Package: univention-appcenter
Version: 8.0.11-76A~4.4.0.201911011048

----

the appcenter/app udm handler is still installed under pyshared.
Need to wait for Bug #49147
Comment 2 Florian Best univentionstaff 2019-11-01 14:53:45 CET
Why do you keep an empty postinst?
Please stick to my patch: Fix the versioned dependencies, fix the installation path of the UDM handler.

→ git cherry-pick fbest/50425-dh-python-appcenter

Maybe additionally it would be good to ship a python3-univention-appcenter package, as we are doing for every other python-univention package. This helps to resolve dependencies later when we migrate fully to python3.
Comment 3 Johannes Keiser univentionstaff 2019-11-01 15:24:16 CET
as discussed with qa only deleting postinst

68d1007473 Bug #50425: yaml
de82f8ff76 Bug #50425: debian changelog
dafbb7820c Bug #50425: remove empty postinst

Successful build
Package: univention-appcenter
Version: 8.0.11-77A~4.4.0.201911011520
Comment 4 Florian Best univentionstaff 2019-11-02 11:35:34 CET
(In reply to Johannes Keiser from comment #3)
> as discussed with qa only deleting postinst
And why?
This causes that the UDM module doesn't exists if the older UDM version is installed. And this might happens later during errata-updates if we release more packages as the update order then is arbitrary.
Comment 5 Florian Best univentionstaff 2019-11-05 12:01:28 CET
It happened as I said:
(In reply to Florian Best from comment #4)
> (In reply to Johannes Keiser from comment #3)
> > as discussed with qa only deleting postinst
> And why?
> This causes that the UDM module doesn't exists if the older UDM version is
> installed. And this might happens later during errata-updates if we release
> more packages as the update order then is arbitrary.

All appcenter tests failed:
[2019-11-04 23:51:00.816444] /usr/lib/python2.7/contextlib.py:17: in __enter__
[2019-11-04 23:51:00.816490]     return self.gen.next()
[2019-11-04 23:51:00.816553] 100_settings.py:71: in install_app
[2019-11-04 23:51:00.816600]     install.call(app=app, username=username, password=ucr_get('tests/domainadmin/pwd'), noninteractive=True)
[2019-11-04 23:51:00.816672] /usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py:220: in call
[2019-11-04 23:51:00.816718]     return obj.call_with_namespace(namespace)
[2019-11-04 23:51:00.816784] /usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py:226: in call_with_namespace
[2019-11-04 23:51:00.816859]     result = self.main(namespace)
[2019-11-04 23:51:00.816927] /usr/lib/python2.7/dist-packages/univention/appcenter/actions/install.py:84: in main
[2019-11-04 23:51:00.816970]     return self.do_it(args)
[2019-11-04 23:51:00.817039] /usr/lib/python2.7/dist-packages/univention/appcenter/actions/install_base.py:101: in do_it
[2019-11-04 23:51:00.817085]     errors, warnings = app.check(action)
[2019-11-04 23:51:00.817156] /usr/lib/python2.7/dist-packages/univention/appcenter/app.py:1621: in check
[2019-11-04 23:51:00.817201]     result = requirement.test(self, function, package_manager)
[2019-11-04 23:51:00.817266] /usr/lib/python2.7/dist-packages/univention/appcenter/app.py:92: in test
[2019-11-04 23:51:00.817308]     return method(**kwargs)
[2019-11-04 23:51:00.817376] /usr/lib/python2.7/dist-packages/univention/appcenter/app.py:1491: in must_have_no_unmet_dependencies
[2019-11-04 23:51:00.817418]     apps_info = domain.to_dict(apps)
[2019-11-04 23:51:00.817485] /usr/lib/python2.7/dist-packages/univention/appcenter/actions/domain.py:104: in to_dict
[2019-11-04 23:51:00.817530]     app_ldap_objects = search_objects('appcenter/app', lo, pos)
[2019-11-04 23:51:00.817594] /usr/lib/python2.7/dist-packages/univention/appcenter/udm.py:120: in search_objects
[2019-11-04 23:51:00.817639]     module = _get_module(_module, _lo, _pos)
[2019-11-04 23:51:00.817704] /usr/lib/python2.7/dist-packages/univention/appcenter/udm.py:69: in _get_module
[2019-11-04 23:51:00.817747]     udm_modules.init(lo, pos, mod)
[2019-11-04 23:51:00.817809] /usr/lib/python2.7/dist-packages/univention/admin/modules.py:186: in init
[2019-11-04 23:51:00.817864]     univention.admin.ucr_overwrite_properties(module, lo)
[2019-11-04 23:51:00.817942] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[2019-11-04 23:51:00.817969] 
[2019-11-04 23:51:00.818050] module = None, lo = <univention.admin.uldap.access instance at 0x7f171d709c20>
[2019-11-04 23:51:00.818075] 
[2019-11-04 23:51:00.818121]     def ucr_overwrite_properties(module, lo):
[2019-11-04 23:51:00.818163]     	"""
[2019-11-04 23:51:00.818206]     	Overwrite properties in property_descriptions by UCR variables
[2019-11-04 23:51:00.818247]     	"""
[2019-11-04 23:51:00.818290] >   	ucr_prefix = ucr_property_prefix % module.module
[2019-11-04 23:51:00.818349] E    AttributeError: 'NoneType' object has no attribute 'module'

https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-2/job/AutotestUpgrade/49/SambaVersion=no-samba,Systemrolle=master-part-II/testReport/20_appcenter/100_settings/master070/
Comment 6 Johannes Keiser univentionstaff 2019-11-05 16:16:26 CET
a2816bcf1e Bug #50425: yaml                                                                                                                                                                                                                  
67c261133a Bug #50425: debian changelog
db3d9d9fac Bug #50425: migrate univention-appcenter to dh-python

Successful build
Package: univention-appcenter
Version: 8.0.11-80A~4.4.0.201911051611
Comment 7 Florian Best univentionstaff 2019-11-05 18:55:03 CET
Please add a python3-univention-appcenter package which installs /usr/lib/python3/univention/appcenter/.
We need this for the python3 migration, which we now start with Owen.
Comment 8 Johannes Keiser univentionstaff 2019-11-11 14:05:25 CET
b60185dedd Bug #50425: yaml
bb311f4273 Bug #50425: debian changelog
480a882501 Bug #50425: fix typo
8221daf750 Bug #50425: debian changelog
61ac2e8053 Bug #50425: fix open encoding
5ee4c177fa Bug #50425: yaml
b717aaa8e9 Bug #50425: add python3 binary packages

Successful build
Package: univention-appcenter
Version: 8.0.11-83A~4.4.0.201911111401
Comment 9 Dirk Wiesenthal univentionstaff 2019-11-12 15:20:08 CET
OK: New packages are in maintained and installed automatically
OK: New packages ship the python files just like before
OK: Old packages ship the rest
OK: Python3 packages exist (no QA on functions)
Comment 10 Erik Damrose univentionstaff 2019-11-13 16:04:39 CET
<http://errata.software-univention.de/ucs/4.4/345.html>