adoptium / installer

Installer scripts for Eclipse Temurin binaries
Apache License 2.0
145 stars 71 forks source link

Origin/Label for Debian repositories #912

Open TobiX opened 1 month ago

TobiX commented 1 month ago

Please provide a brief summary of the bug

Tools like apt (https://manpages.debian.org/bookworm/apt/apt_preferences.5.en.html) or unattended-upgrades (https://github.com/mvo5/unattended-upgrades/blob/master/data/50unattended-upgrades.Debian) rely on repository metadata for packages selection. Unfortunately, the default values for all repositories hosted on Artifactory is just "Artifactory".

According to https://jfrog.atlassian.net/browse/RTFACT-9208 it is possible to override those values. It would be nice if the value for https://packages.adoptium.net/artifactory/deb/ would be changed to something like "Adoptium".

Be aware that modern versions of apt warn the user every time this value is changed:

E: Repository 'https://artifactory.company.example/artifactory/local-deb-repo any InRelease' changed its 'Origin' value from 'Artifactory' to 'NewValue'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N]

(This might prevent automatic updates until the user has manually accepted this change)

Did you test with the latest update version?

Please provide steps to reproduce where possible

See the output of apt policy. This is especially problematic if you are using an company-internal mirror, since you cannot distinguish repositories by hostname anymore... Example output:

# apt policy
Package files:
[...]
 500 https://artifactory.company.example/artifactory/deb-adoptium bookworm/main amd64 Packages
     release o=Artifactory,a=bookworm,n=bookworm,l=Artifactory,c=main,b=amd64
     origin artifactory.company.example

Expected Results

apt-policy shows something other then o=Artifactory,l=Artifactory for the Adoptium repository.

Actual Results

apt-policy shows o=Artifactory,l=Artifactory for the Adoptium repository.

What Java Version are you using?

openjdk 17.0.11 2024-04-16 OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9) OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode, sharing)

What is your operating system and platform?

Debian GNU/Linux 12 (bookworm)

How did you install Java?

deb package from repository

Did it work before?

No

Did you test with other Java versions?

No response

Relevant log output

No response