Bug 51374 - Circular build dependency: univention-join univention-admin-diary
Circular build dependency: univention-join univention-admin-diary
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 4.4-4-errata
Assigned To: Philipp Hahn
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-29 12:23 CEST by Philipp Hahn
Modified: 2020-06-24 12:53 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:
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 2020-05-29 12:23:50 CEST
Source: univention-join
  Package: univention-join
    Depends: univention-admin-diary-client
    Ships: /usr/bin/univention-install-joinscript

Source: univention-admin-diary
  Package: univention-admin-diary-client
    Ships: /usr/sbin/univention-admin-diary-entry-create
  Package: univention-admin-diary-backend
    Build-Depends: univention-join

Make admin diary optional by downgrading the dependency to a recommends: univention-join is essential, which the diary is useless without the optional backend.
Comment 2 Philipp Hahn univentionstaff 2020-05-29 13:06:37 CEST
There is a 2nd dependency circle:

univention-join
 univention-directory-manager-tools
  python-univention-directory-manager
   univention-admin-diary-client
   (python-support)
Comment 3 Philipp Hahn univentionstaff 2020-05-29 13:20:51 CEST
univention-install-joinscript was introduced by Bug #32525.
The problem here is that the script is quiet low-level, but included in the high-level package "univention-join", which pulls in many other packages through dependencies.

It it currently only used by 3 packages in UCS:
 management/univention-appcenter/debian/rules:58:
 management/univention-portal/debian/rules:37:
 services/univention-admin-diary/debian/rules:35:

There also is a check in ucslint:
 packaging/ucslint/univention/ucslint/0001-CheckJoinScript.py

The simplest solution is to
- move the script into a separate source package like "univention-debhelper"
- (move other scripts there too - they MUST NOT have large dependencies!)
- declare a dependency from univention-join on it for backward compatibility
- optionally update the 3 packages to use the new package instead
- update ucslint to check the new package.
Comment 4 Philipp Hahn univentionstaff 2020-05-29 14:41:43 CEST
[4.4-4] 2206d7a213 Bug #51374 join: Split into univention-debhelper
 management/univention-appcenter/debian/control     |  2 +-
 .../univention-join/debian/univention-join.install |  1 -
 management/univention-portal/debian/control        |  2 +-
 packaging/univention-debhelper/debian/changelog    |  5 ++++
 packaging/univention-debhelper/debian/compat       |  1 +
 packaging/univention-debhelper/debian/control      | 28 +++++++++++++++++++
 packaging/univention-debhelper/debian/copyright    | 29 ++++++++++++++++++++
 packaging/univention-debhelper/debian/rules        | 31 ++++++++++++++++++++++
 .../univention-debhelper/debian/source/format      |  1 +
 .../debian/univention-debhelper.install            |  1 +
 ...
 12 files changed, 99 insertions(+), 4 deletions(-)

[4.4-4] 5c438129dc Bug #51374 join: Make Admin diary optional
 management/univention-join/debian/changelog            | 6 ++++++
 management/univention-join/debian/control              | 3 ++-
 management/univention-join/univention-join             | 3 +++
 management/univention-join/univention-run-join-scripts | 1 +
 4 files changed, 12 insertions(+), 1 deletion(-)


Package: univention-debhelper
Version: 1.0.0-1A~4.4.0.202005291425
Branch: ucs_4.4-0
Scope: errata4.4-4

Package: univention-join
Version: 11.0.1-30A~4.4.0.202005291427
Branch: ucs_4.4-0
Scope: errata4.4-4


[4.4-4] ac6bcfe92c Bug #51374: univention-join 11.0.1-30A~4.4.0.202005291427
 doc/errata/staging/univention-debhelper.yaml | 14 ++++++++++++++
 doc/errata/staging/univention-join.yaml      | 13 +++++++++++++
 2 files changed, 27 insertions(+)


QA: The 3 depending packages have been successfully rebuild internally by GitLab-CI, but as this is an internal change to the build process, they must not be re-announced: <https://git.knut.univention.de/univention/ucs/pipelines/4886>


FYI: There is no dependency from `univention-join` → `univention-debhelper`, so packages having `univention-join` as a Build-Depends will no longer build when they use `univention-install-joinscript`; they must update the dependency to `univention-debhelper`.
This could be avoided be having `univention-join Depends: univention-debhelper`, which currently is no problem, but if more tools are moved to `univention-debhelper` this will clutter all systems, as `univention-join` is installed on every system role.
`Recommends` (or `Suggests`) does not work as they would not be installed when resolving build dependencies by default.
Comment 5 Philipp Hahn univentionstaff 2020-05-29 18:35:07 CEST
[4.4-4] d15cf7794f Bug #51374: Split univention.debhelper into separate package
 base/univention-config-registry/debian/changelog   |  6 +++
 base/univention-config-registry/debian/control     |  4 ++
 .../python-univention-config-registry.install      |  9 ----
 .../python-univention-config-registry.pyinstall    |  6 +++
 .../python3-univention-config-registry.install     |  5 --
 .../python3-univention-config-registry.pyinstall   |  4 ++
 base/univention-config-registry/debian/rules       |  9 ++--
 packaging/univention-debhelper/debian/changelog    |  6 +++
 packaging/univention-debhelper/debian/control      | 54 +++++++++++++++++++++-
 .../debian/python-univention-debhelper.pyinstall   |  1 +
 ...
 16 files changed, 146 insertions(+), 28 deletions(-)

Package: univention-debhelper
Version: 1.0.0-2A~4.4.0.202005291810
Branch: ucs_4.4-0
Scope: errata4.4-4

Package: univention-config-registry
Version: 14.0.0-17A~4.4.0.202005291830
Branch: ucs_4.4-0
Scope: errata4.4-4

[4.4-4] a50485bfbf Bug #51374: univention-debhelper 1.0.0-2A~4.4.0.202005291810 Bug #51368: univention-config-registry 14.0.0-17A~4.4.0.202005291830
 doc/errata/staging/univention-config-registry.yaml | 8 +++++---
 doc/errata/staging/univention-debhelper.yaml       | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
Comment 6 Philipp Hahn univentionstaff 2020-05-30 09:04:15 CEST
[4.4-4] 713ac69acb Bug #51374: Fix univention.debhelper split
 packaging/univention-debhelper/debian/control | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

> Package: python-univention-debhelper
                 ^
> Breaks:
>  python3-univention-config-registry (<< 14.0.0-17),
         ^
> Replaces:
>  python3-univention-config-registry (<< 14.0.0-17),
         ^

Package: univention-debhelper
Version: 1.0.0-2A~4.4.0.202005300825
Branch: ucs_4.4-0
Scope: errata4.4-4

[4.4-4] 8fb110a71a Bug #51374: univention-debhelper 1.0.0-2A~4.4.0.202005300825
 doc/errata/staging/univention-debhelper.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

QA: univention-debhelper is marked as 'maintained: true'
QA: The maintained list has been re-cacluclated :
  <https://jenkins.knut.univention.de:8181/job/Mitarbeiter/job/phahn/job/CalculateMaintained/156/console> has been executed
QA: The package is in the maintained list:
  grep univention-debhelper /var/univention/buildsystem2/cd-contents/ucs_4.4-4_*
QA: The package has been mirrored to maintained:
  <https://jenkins.knut.univention.de:8181/view/Publish/job/UCS-4.4/job/PublishErrataTest/629/console>
  <https://jenkins.knut.univention.de:8181/view/Publish/job/UCS-4.4/job/PublishErrataTest/630/console>
QA: Package successfully upgradded:
  apt-get upgrade -t apt
QA: Package successfully upgradded:
  activate-errata-test-scope.sh
  apt-get upgrade
Comment 7 Philipp Hahn univentionstaff 2020-05-30 09:34:00 CEST
[4.4-4] 81964c8c45 Bug #51374: Fix amd64 build
 base/univention-config-registry/debian/rules | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Package: univention-config-registry
Version: 14.0.0-17A~4.4.0.202005300929
Branch: ucs_4.4-0
Scope: errata4.4-4

[4.4-4] 69a8f5354b Bug #51368: univention-config-registry 14.0.0-17A~4.4.0.202005300929
 doc/errata/staging/univention-config-registry.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

From our discussion:
- we could leave parseRfc822 in UCR as only UCR (and one ucs-test) uses it
- we could just clone doIt for univention-debhelper
For now we leave it as is.

QA: errata-announce -V --onyl univention-config-registry.yaml
QA: errata-announce -V --onyl univention-debhelper.yaml
Comment 8 Dirk Wiesenthal univentionstaff 2020-05-30 12:14:13 CEST
univention-join: OK
univention-admin-diary: OK


univention-debhelper: OK
python-univention-debhelper: OK


python-univention-config-registry: OK

apt dist-upgrade: OK
maintained: OK

Replacing build dependencies from univention-join to univention-debhelper: OK