opensearch-build icon indicating copy to clipboard operation
opensearch-build copied to clipboard

Improve Debian Releases File

Open marcohald opened this issue 11 months ago • 2 comments

Is your feature request related to a problem? Please describe

I would like to cache the Debian Repo and Use APT Pinning to pin it to a specific priority. The Problem is the only String I could use now is stable, which is not really a viable solution I did not found the place where the Releases File is generated, but it looks now like this:

Origin: . stable
Label: . stable
Suite: stable
Codename: stable
Date: Tue, 20 Feb 2024 22:49:26 UTC
Architectures: amd64 arm64
Components: main
Description: Generated by aptly

Describe the solution you'd like

more usable Values for Opensearch and Opensearch-Dashboards Repo for Example

Origin: opensearch.org
Label: Opensearch
Suite: stable
Codename: 1.x
Date: Tue, 20 Feb 2024 22:49:26 UTC
Architectures: amd64 arm64
Components: main
Description: Opensearch Repository

Describe alternatives you've considered

No response

Additional context

No response

marcohald avatar Feb 29 '24 13:02 marcohald

Hi @marcohald, thank you for reaching out to discuss improving OpenSearch. If I understand correctly, you're considering pre-downloading several versions of the OpenSearch package locally. Are you planning to use APT Pinning with Pin-Priority to determine which version of the OpenSearch package should be used?

Even without the Release file, I believe you can still create an opensearch file (for example) at /etc/apt/preferences.d, similar to the following example, and then run sudo apt update to apply it. Would that be correct?

Package: opensearch
Pin: release a=local
Pin-Priority: 400 

jordarlu avatar Mar 14 '24 19:03 jordarlu

Hi @jordarlu, I'm caching the Repo with approx otherwise i could use origin (the hostname of the repo, not the Origin from the Release File) as pin parameter. Yes the Pinning is to control the Version opensearch that is installed. In theory there could be multiple Repos on the approx with the same origin that could contain a opensearch package.

As far as i understand the only option that is not from the Release File is the origin to pin. As found here https://unix.stackexchange.com/a/84812 and here https://manpages.debian.org/bookworm/apt/apt_preferences.5.en.html

marcohald avatar Mar 18 '24 09:03 marcohald

It looks like these repository InRelease changes have been deployed lately and since then an apt-get update returns the following errors and updates are not proposed:

# apt-get update
[...]
Get:5 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable InRelease [7554 B]                                                                                          
[...]
Reading package lists... Done
E: Repository 'https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable InRelease' changed its 'Origin' value from '. stable' to 'artifacts.opensearch.org'
E: Repository 'https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable InRelease' changed its 'Label' value from '. stable' to 'opensearch'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

As these changes looks legit, one must then run an apt-get update --allow-releaseinfo-change to force the new repository origins/labels to be taken into account.

eguaj avatar Jun 26 '24 06:06 eguaj

@peterzhuamazon Hi, Please also consider adding a short notice here for someone who experience the above label change conflict in the future: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/debian/#install-opensearch-from-an-apt-repository

Much thanks.

sino1641 avatar Aug 07 '24 14:08 sino1641