Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base image to ubuntu-base:9.0.4 #491

Merged
merged 4 commits into from
Mar 22, 2024
Merged

Conversation

cfergeau
Copy link
Contributor

@cfergeau cfergeau commented Feb 27, 2024

Proposed Changes

This switches from ubuntu-base:8 to ubuntu-base:9 as the base image (ie ubuntu 20.04 to ubuntu 22.04).

The main complication is mongodb, it's now installed from mongodb community servers as it's gone from newer ubuntu repositories. Beware of the licence change, previously the addon used mongodb version 3.6.9 released under the AGPL, while 4.0.3 and newer are released under the non-free SSPL
https://en.wikipedia.org/wiki/MongoDB#Licensing

Installing mongodb 4.4 which is compatible with the unifi package requires some hackish install of the appropriate libssl.
mongodb 7.0 is easier to install, but requires the use of --ignore-depends=mongodb-org-server when installing the unifi package.

I couldn't make my mind regarding which option is best, so it's easy to pick one or the other by keeping/removing the last commit in this PR.

@cfergeau
Copy link
Contributor Author

@renewoensdregt I made progress on the work we shortly discussed in 0f20525#r1453695818 :)

@frenck frenck added the refactor Improvement of existing code, not introducing new features. label Mar 20, 2024
unifi/Dockerfile Outdated Show resolved Hide resolved
unifi/Dockerfile Outdated Show resolved Hide resolved
unifi/Dockerfile Outdated Show resolved Hide resolved
unifi/Dockerfile Outdated Show resolved Hide resolved
@cfergeau cfergeau force-pushed the base9 branch 2 times, most recently from 9c8ec6f to 3a413b1 Compare March 20, 2024 16:39
@cfergeau cfergeau changed the title Update base image to ubuntu-base:9.0.3 Update base image to ubuntu-base:9.0.4 Mar 20, 2024
unifi/Dockerfile Show resolved Hide resolved
unifi/build.yaml Outdated Show resolved Hide resolved
Signed-off-by: Christophe Fergeau <[email protected]>
This installs latest mongodb-org-server 4.4 version as the unifi package
requires a version << 5.0.0

Beware of the licence change, previous mongodb version was 3.6.9
released under the AGPL, 4.0.3 and newer releases are released under the
non-free SSPL
https://en.wikipedia.org/wiki/MongoDB#Licensing

This commit is in preparation for switching to a more recent base
image/ubuntu version, where mongodb is no longer available in the
official repositories.

Signed-off-by: Christophe Fergeau <[email protected]>
This switches the base image to ubuntu-base:9.0.4, ie ubuntu 22.04.
The base deps versions need to be updated.
libcap2 is already installed in the base image, so it's removed from the
list of packages to install

Only the 6.0 and 7.0 repositories contain 'mongodb-org-server' packages
for ubuntu 22.04, so we are forced to use one of these versions.
However, the unifi package requires a mongodb-org-server version <<
5.0.0 so we need to ignore the mongodb-org-server dependency when
installing the unifi package.

Signed-off-by: Christophe Fergeau <[email protected]>
unifi/Dockerfile Outdated Show resolved Hide resolved
unifi/Dockerfile Outdated Show resolved Hide resolved
While there are no mongodb-org-server 4.4 builds available in mongodb's
ubuntu 22.04 repos, there are such builds in the 20.04 repos.
We need to manually install the older libssl version mongodb-server
requires.

This reuses what is done in glennr unifi install scripts.

Signed-off-by: Christophe Fergeau <[email protected]>
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @cfergeau 👍

../Frenck

@frenck frenck merged commit 7135ed9 into hassio-addons:main Mar 22, 2024
10 checks passed
@cfergeau cfergeau deleted the base9 branch March 22, 2024 10:54
frenck added a commit that referenced this pull request Mar 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor Improvement of existing code, not introducing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants