Bug 53209 - umc debhelper adds join debhelper to all binary packages not just umc packages
umc debhelper adds join debhelper to all binary packages not just umc packages
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Dirk Wiesenthal
Jürn Brodersen
: interim-1
Depends on: 52211
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-03 11:15 CEST by Jürn Brodersen
Modified: 2021-05-25 16:02 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 Jürn Brodersen univentionstaff 2021-05-03 11:15:47 CEST
umc debhelper adds join debhelper to all binary packages not just umc packages

umc.pm always adds dh-univention-join-install. While the umc debhelper adds nothing to non umc binary packages, univention-join adds a join script execution snippet to all binary packages.

At least for me that is unexpected behavior.

Currently this breaks "univention-self-service-master.postinst" there the join script execution is not expected at the beginning of the script and "self-service/ldap_attributes" won't be set.

"univention-saml.postinst" also calls the join script later, but nothing seems to be broken.
Comment 1 Philipp Hahn univentionstaff 2021-05-03 11:38:08 CEST
management/univention-management-console/dev/umc.pm:
 34 remove_command("dh-univention-join-install");
 35 insert_before("dh_auto_install", "dh-univention-join-install");

management/univention-join/univention_join.pm
 33 insert_before("dh_auto_install", "dh-univention-join-install");

management/univention-join/dh-univention-join-install
 63 »···»···call_joinscript {script} ||


Bug #52211 introducted the new dh-helper for UCS join scripts.
Most of our packages where converted to use it.

For management/univention-self-service/debian/univention-self-service-master.postinst the fix is to remove
48 call_joinscript 35univention-self-service-master.inst
and move
36 . /usr/share/univention-lib/base.sh

PS: Can be removed
38 eval "$(univention-config-registry shell)"

PPS: The join script should do this
50 systemctl try-restart univention-directory-listener
Comment 2 Dirk Wiesenthal univentionstaff 2021-05-06 14:24:08 CEST
These packages have "call_joinscript" in their postinst and a file debian/*.umc-modules exists:

base/univention-quota
base/univention-updater
management/univention-join
management/univention-management-console
management/univention-self-service
saml/univention-saml
services/univention-ad-connector
services/univention-pkgdb
services/univention-printserver
Comment 3 Dirk Wiesenthal univentionstaff 2021-05-06 14:54:29 CEST
base/univention-quota
  call_joinscript 71univention-quota.inst
=> does not exist?!

base/univention-updater
  call_joinscript 41univention-updater.inst
=> does not exist?!
Comment 4 Dirk Wiesenthal univentionstaff 2021-05-06 14:55:16 CEST
These packages lack "--with univention-join" in their debian/rules and a file debian/*.umc-modules exists:

base/univention-quota
base/univention-system-setup
base/univention-updater
management/univention-join
management/univention-management-console
management/univention-management-console-module-adtakeover
management/univention-management-console-module-diagnostic
management/univention-management-console-module-ipchange
management/univention-management-console-module-lib
management/univention-management-console-module-reboot
management/univention-management-console-module-services
management/univention-management-console-module-top
management/univention-management-console-module-ucr
management/univention-management-console-module-udm
management/univention-management-console-module-welcome
management/univention-self-service
management/univention-server-overview
management/univention-system-info
saml/univention-saml
services/univention-ad-connector
services/univention-pkgdb
services/univention-printserver
test/ucs-test
Comment 5 Dirk Wiesenthal univentionstaff 2021-05-06 15:48:13 CEST
(In reply to Dirk Wiesenthal from comment #4)
> These packages lack "--with univention-join" in their debian/rules and a
> file debian/*.umc-modules exists:
> 
> base/univention-quota

OK, only UMC join script

> base/univention-system-setup

OK, only UMC join script

> base/univention-updater

univention-updater referenced a join script that does not exist

commit d8f8a935deaf897c2dc4528bff52f3b11bc5e988 (HEAD -> 5.0-0, origin/5.0-0)
Author: Dirk Wiesenthal <wiesenthal@univention.de>
Date:   Thu May 6 15:36:08 2021 +0200

    Bug #53209: univention-updater: Fix join script handling (univention-join debhelper)



> management/univention-join

OK, does not use a deb helper. Needs umc-dev to build, though. And umc-dev needs univention-join-dev. Don't know how this is supposed to work.

> management/univention-management-console

TODO

> management/univention-management-console-module-adtakeover
> management/univention-management-console-module-diagnostic
> management/univention-management-console-module-ipchange
> management/univention-management-console-module-lib
> management/univention-management-console-module-reboot
> management/univention-management-console-module-services
> management/univention-management-console-module-top
> management/univention-management-console-module-ucr
> management/univention-management-console-module-udm
> management/univention-management-console-module-welcome

OK, they are all UMC modules

> management/univention-self-service

TODO

> management/univention-server-overview

[5.0-0 b70fb5868e] Bug #53209: univention-server-overview: Fix join script handling (univention-join debhelper)
 3 files changed, 8 insertions(+), 1 deletion(-)

> management/univention-system-info

OK, only UMC join script

> saml/univention-saml

TODO

> services/univention-ad-connector

TODO

> services/univention-pkgdb

TODO

> services/univention-printserver

TODO

> test/ucs-test

OK, does not have a joinscript at all
Comment 6 Dirk Wiesenthal univentionstaff 2021-05-06 22:09:12 CEST
(In reply to Dirk Wiesenthal from comment #5)
> > management/univention-management-console

OK, does not have umc deb helper.

> > management/univention-self-service

commit 4ce735975f4e2c94b5974f3afb09de02eb28d802 (HEAD -> 5.0-0, origin/5.0-0)
Author: Dirk Wiesenthal <wiesenthal@univention.de>
Date:   Thu May 6 17:30:01 2021 +0200

    Bug #53209: univention-self-service: Fix join script handling (univention-join debhelper)


> > saml/univention-saml

[5.0-0 0a9f62b7ee] Bug #53209: univention-saml: Fix join script handling (univention-join debhelper)
 7 files changed, 13 insertions(+), 55 deletions(-)

> > services/univention-ad-connector

[5.0-0 6d902d617e] Bug #53209: univention-ad-connector: Fix join script handling (univention-join debhelper)
 11 files changed, 9 insertions(+), 116 deletions(-)

> > services/univention-pkgdb

[5.0-0 998bf79048] Bug #53209: univention-pkgdb: Fix join script handling (univention-join debhelper)
 17 files changed, 13 insertions(+), 273 deletions(-)
[5.0-0 e2624f7d66] Bug #53209: univention-pkgdb: Fix join script handling (univention-join debhelper) (2)
 2 files changed, 1 insertion(+), 16 deletions(-)

> > services/univention-printserver

[5.0-0 79010935b9] Bug #53209: univention-printserver: Fix join script handling (univention-join debhelper)
 10 files changed, 15 insertions(+), 73 deletions(-)


Seemed easier, or at least wiser, to fix it by improving those packages. The alternative would be adjusting umc-dev and then check all packages that may have relied on the new behaviour.


Package: univention-server-overview
Version: 3.0.1-4A~5.0.0.202105061549

Package: univention-updater
Version: 15.0.3-55A~5.0.0.202105061552

Package: univention-self-service
Version: 5.0.1-10A~5.0.0.202105061730

Package: univention-saml
Version: 7.0.4-14A~5.0.0.202105062108

Package: univention-pkgdb
Version: 13.0.1-7A~5.0.0.202105062150

Package: univention-printserver
Version: 13.0.2-10A~5.0.0.202105062153

Package: univention-ad-connector
Version: 14.0.7-5A~5.0.0.202105062204
Comment 7 Florian Best univentionstaff 2021-05-07 10:40:51 CEST
REOPEN: Please address the 8 comments for your commits in gitlab.
Comment 8 Florian Best univentionstaff 2021-05-07 10:44:56 CEST
Also: the packages where joinscripts are renamed need a `/debian/$package.maintscript` with a rm_conffile instruction.
Comment 9 Philipp Hahn univentionstaff 2021-05-07 11:32:42 CEST
(In reply to Florian Best from comment #8)
> Also: the packages where joinscripts are renamed need a
> `/debian/$package.maintscript` with a rm_conffile instruction.

`rm_conffiles` is only needed for *conf*-files, which live below /etc/.
But join-scripts live below /usr/lib/univention-install/ and /usr/lib/univention-uninstall/

So why do you think this `rm_conffiles` needed and for what?
Comment 10 Florian Best univentionstaff 2021-05-07 11:38:19 CEST
(In reply to Philipp Hahn from comment #9)
> (In reply to Florian Best from comment #8)
> > Also: the packages where joinscripts are renamed need a
> > `/debian/$package.maintscript` with a rm_conffile instruction.
> 
> `rm_conffiles` is only needed for *conf*-files, which live below /etc/.
> But join-scripts live below /usr/lib/univention-install/ and
> /usr/lib/univention-uninstall/
> 
> So why do you think this `rm_conffiles` needed and for what?

Oh right, I confused them with UCR templates.
Comment 11 Dirk Wiesenthal univentionstaff 2021-05-07 12:51:40 CEST
(In reply to Florian Best from comment #7)
> REOPEN: Please address the 8 comments for your commits in gitlab.

Addressed the issues in
  Commit 1fa4a4fd (univention-pkgdb)
  Commit fd1f246e (univention-self-service)
  Commit 661d9d5b (univention-ad-connector)

univention-printserver is fine AFAICS.
Comment 12 Jürn Brodersen univentionstaff 2021-05-11 10:33:15 CEST
Additional commits:
[5.0-0 62af8277ca] Bug #53209: univention-self-service: Fix join script handling (univention-join debhelper) (3)
[5.0-0 dd5b1f7c62] Bug #53209: Update 83_self_servic tests
[5.0-0 5814fccc9f] Bug #53209: univention-self-service: Fix join script handling (univention-join debhelper) (4)



What I tested:
Changes -> OK
jenkins -> OK
Installation -> OK
purge of self-service -> OK
purge of pkgdb -> OK
purge of print-server -> OK
purge of ad-connector -> OK
self-service works out of the box after installation -> OK

Bug 52211 already has a changelog and this bug introduces no new behavior -> no changelog needed -> OK

-> Verified
Comment 13 Florian Best univentionstaff 2021-05-25 16:02:06 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".