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

[Feature Request] Add timestamp filter in update process #2128

Closed
lucamosca1 opened this issue Sep 3, 2024 · 1 comment
Closed

[Feature Request] Add timestamp filter in update process #2128

lucamosca1 opened this issue Sep 3, 2024 · 1 comment

Comments

@lucamosca1
Copy link

One issue we have is to roll out update between integration, staging and production.
It's difficult to perform a dnf (or yum in the past) update on integration to test the new packages, then to do the same on staging and than on production since the more time pass, the more updates are released.

I don't know the repository structure but in my mind I would do something like:
dnf update --> OUTPUT: ok done at this timestamp on integration
dnf update --timestamp on staging and production

@ppisar
Copy link
Contributor

ppisar commented Sep 6, 2024

If I understand you correctly, you want DNF to be able to update to a state of packages as they were at the given timestamp in the repositories.

That's unfortunately impossible because of how the repositories are structured: A repository usually has a time stamp when it was generated, but once the repository is updated, the old state is lost and there is only the new timestamp and the new set of packages (those may and may not retain old packages). That means DNF has no way of retrieving the previous content of the repository, especially at an arbitrary timestamp.

Your problem is usually solved on another level:

  • You manage a content of the repository with a versioning system and directs specific versions of it to specific systems. There was Spacewalk software for it replaced with https://theforeman.org/, https://pulpproject.org/, https://www.candlepinproject.org/ tools.

  • You archive the installed file system into a tar ball and distributes the tar balls instead of separate packages. This is what containers (Docker, Podman) do.

  • You list exact versions of installed RPM packages (rpm -qa) on one system, copy the list to a target system and there you command DNF to install them (dnf distro-sync $(<FILE_WITH_THE_LIST)). That assumes that you keep all historical packages in the repository.

The last option is popular among other software ecosystems, usually called a "lock file". We already have a request to automate it in DNF5 rpm-software-management/dnf5#833 and a dedicated library for handling these lock files in DNF/DNF5 is under development https://github.com/rpm-software-management/libpkgmanifest

I will close your request as this not something what can be achieved with current format of YUM (RPM) repositories.

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

3 participants