Bug 52587 - Migrate ucs-school-umc-exam to dh_python
Migrate ucs-school-umc-exam to dh_python
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v9-errata
Assigned To: Florian Best
Tobias Wenzel
:
Depends on:
Blocks: 52578
  Show dependency treegraph
 
Reported: 2021-01-12 14:17 CET by Florian Best
Modified: 2021-07-12 15:23 CEST (History)
1 user (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 Florian Best univentionstaff 2021-01-12 14:17:11 CET
The package ucs-school-umc-exam needs to be migrated to dh_python.

See: https://hutten.knut.univention.de/mediawiki/index.php/Python_DebHelper_Migration
Comment 1 Florian Best univentionstaff 2021-06-03 00:30:24 CEST
ucs-school-umc-exam.yaml
c3b785f2b170 | Bug #52587: migrate ucs-school-umc-exam to dh_python

ucs-school-umc-exam (9.0.1-55)
c3b785f2b170 | Bug #52587: migrate ucs-school-umc-exam to dh_python
Comment 2 Tobias Wenzel univentionstaff 2021-06-04 13:06:05 CEST
QA: reopen

see:
- 6.2 UMC modules
- jenkins exam tests


tested in multi-server env

git log --grep='#52587' --stat
->  Package: ucs-school-umc-exam

grep Package:  ucs-school-umc-exam/debian/control 
Package: ucs-school-umc-exam
Package: ucs-school-umc-exam-master


dpkg -L ucs-school-umc-exam  > ucs-school-umc-exam-before.list

echo -e 'deb [trusted=yes] http://192.168.0.10/build2/ ucs_4.4-0-ucs-school-4.4/all/\ndeb [trusted=yes] http://192.168.0.10/build2/ ucs_4.4-0-ucs-school-4.4/$(ARCH)/' >> /etc/apt/sources.list.d/30_test.list
univention-upgrade --ignoreterm --ignoressh --noninteractive --updateto=4.4-99


dpkg -L ucs-school-umc-exam  > ucs-school-umc-exam-after.list

diff -U0 ucs-school-umc-exam-before.list ucs-school-umc-exam-after.list

--- ucs-school-umc-exam-before.list	2020-11-22 02:27:47.394854642 +0100
+++ ucs-school-umc-exam-after.list	2020-11-22 02:33:55.099655993 +0100
@@ -15,0 +16,18 @@

+/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam
+/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam/__init__.py
+/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam/util.py

+/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam
+/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam/__init__.py
+/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam/util.py
@@ -165,10 +182,0 @@

-/usr/share/pyshared/univention/management/console/modules/schoolexam/__init__.py
-/usr/share/pyshared/univention/management/console/modules/schoolexam/util.py

-/usr/share/python-support/ucs-school-umc-exam.public

-> no pyshared & python-support  OK
-> added python2 + 3  OK


 diff -U0 ucs-school-umc-exam-master.before ucs-school-umc-exam-master.after

diff -U0 ucs-school-umc-exam-master.before ucs-school-umc-exam-master.after
--- ucs-school-umc-exam-master.before	2020-11-22 03:43:42.124000000 +0100
+++ ucs-school-umc-exam-master.after	2020-11-22 03:48:46.724000000 +0100
@@ -15,0 +16,19 @@

+/usr/lib/python2.7/dist-packages/ucsschool/exam/exam_user_pyhook.py
+/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam-master/__init__.py

+/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam-master/__init__.py
@@ -27,12 +45,0 @@

-/usr/share/pyshared/ucsschool/exam/exam_user_pyhook.py
it__.py
-/usr/share/python-support/ucs-school-umc-exam-master.public

-> no pyshared & python-support  OK
-> added python2 + 3  (execpt for hook) OK

6. Manually test software:
6.1 Scripts

/usr/share/ucs-school-exam/exam-and-room-cleanup -> OK
/usr/share/ucs-school-exam/exam-backup -> OK

6.2 UMC modules

UMC-Exam
prepare exam OK
start exam
finish exam

in /var/log/univention/management-console-module-schoolexam-master.log 

  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/schoolexam-master/__init__.py", line 53, in <module>
    from ucsschool.exam.exam_user_pyhook import ExamUserPyHook
ImportError: No module named exam.exam_user_pyhook



6.3 UCR templates?

ucs-school-umc-exam/conffiles/etc/cron.d/ucs-school-umc-exam OK
ucs-school-umc-exam/conffiles/etc/cron.d/ucs-school-umc-exam-master OK

6.4 No Traceback in listener.log OK
Comment 3 Florian Best univentionstaff 2021-06-04 13:32:29 CEST
A replaces entry was missing.
The python3 ucsschool.exam library has been added.

ucs-school-umc-exam (9.0.1-55)
bfadf5943bfa | fixup! Bug #52587: migrate ucs-school-umc-exam to dh_python
Comment 4 Tobias Wenzel univentionstaff 2021-06-04 14:44:51 CEST
Thanks! 

There is no traceback in /var/log/univention/management-console-module-schoolexam-master.log any more.

I'm not sure if this fixes the jenkins tests, e.g.

http://jenkins.knut.univention.de:8080/job/UCSschool-4.4/job/Install%20Singleserver/lastCompletedBuild/Config=s4-all-components,TestGroup=base1,UCSRelease=public/testReport/90_ucsschool/101_exam_cleanup/master201/

anyway, I will wait until jenkins is happy to verify the bug.
Comment 5 Tobias Wenzel univentionstaff 2021-06-07 08:36:28 CEST
exam-tests now pass in jenkins
-> verify
Comment 6 Tobias Wenzel univentionstaff 2021-07-01 12:01:41 CEST
Errata updates for UCS@school 4.4 v9 have been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v9-de.html

If this error occurs again, please clone this bug.