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

env: Fix so built shipped/provided packages are Pinned #30

Open
wdoekes opened this issue Nov 13, 2024 · 1 comment
Open

env: Fix so built shipped/provided packages are Pinned #30

wdoekes opened this issue Nov 13, 2024 · 1 comment

Comments

@wdoekes
Copy link
Member

wdoekes commented Nov 13, 2024

Description

Once an image has been created it is still writable: apt/dpkg works. This is nice. We can install additional tooling.

However, there is a problem with the versioning of certain provided packages:

  • a bash-5.1 is built, but it has the same name/version as the upstream original
  • additionally, a newer bash might be available and we can apt-get upgrade to it (breaking any specifics patches added here)

A solution:;

  • a good start could be to also update the changelog with a new version (<upstream_version>+sonic)
  • and then we'd like to Pin the packages;
    • this could be done through a repository -- which is a PITA, but
    • it could also be done through a local repository (file-based, like a cdrom). and the files do not need to be there, as long as the Pin-prio can get high enough that you cannot accidentally replace the package

Maybe check:
https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository

Which build are we running (if any)

Upstream issues/PRs

@wdoekes
Copy link
Member Author

wdoekes commented Nov 13, 2024

Looks like we need:
/etc/apt/preferences.d/sonic.pref

With this content:

Package: bash
Pin: version 5.1-2
Pin-Priority: 800

...
  • Priority < 0: prevents the installation of a package version
  • Priority value between 1 and 99: causes a version to be installed only if there is no installed version of the package.
  • Priority between 100 and 499: causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent
  • Priority between 500 and 989: causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent
  • Priority between 990 and 999: causes a version to be installed even if it does not come from the target release, unless the installed version is more recent
  • Priority > 1000: causes a version to be installed even if this constitutes a downgrade of the package.

With this, we won't even need #deb [trusted=yes] file:/usr/local/mydebs ./, I think.

Needs confirmation when two equal-named packages are available..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant