View previous topic :: View next topic |
Author |
Message |
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 286
|
Posted: Mon Dec 16, 2024 11:25 pm Post subject: Rebuild packages with missing binpkg |
|
|
I set up a build server which creates (and signs) binary packages. Due to a binary package update, the signed binpkg had been removed again before the respective client had run its latest world update. This led to a situation where the client wanted to build the package itself, because the binary package was not available anymore.
I found a thread on this forum (https://forums.gentoo.org/viewtopic-p-8813589.html#8813589) and this commit (https://github.com/gentoo/portage/commit/a7bbb4fc4d38f770fc943f3b856c5de56e315fe4) which discussed to re-generate the signature, but the approach was dismissed. Instead the binpkg are deleted and the commit proposes the following way out Quote: | Simply dropping these binpkgs seems like the best solution and to allow the binhost to re-sign it on updating instead. | Unfortunately, if the timing is bad, this does not always work. The binpkg might have been deleted, no newer package has yet been emerged and the client which still uses on an even older package might try to fetch the current, but missing package.
Hence, I am wondering if there is an option to mitigate the problem on the binhost at least, by identifying missing binary packages and re-emerge the relevant packages, before the client falls into that trap.
Here is what happened (the affected package were llvm:18, llvm:19, mesa, firefox, wine and some other):- The binhost and the clients were all in snyc
- The server synchronized its package list (emerge --sync)
- The server run a world upgrade and built binary packages
- The server synchronized its package list again some days later
- A binary update came in and hence the affected binary packages on the binhost were deleted
- The client synchronized its package list
- The client attempted to run a world upgrade, but some binary package on the binhost were already missing
Unfortunately, a simple "emerge --deep --newuse --update @world" on the binhost did not solve the problem, because from the perspective of the server the packages were installed and up-to-date (only the binary packages were missing). I has to manually re-emerge the affected packages via "emerge --oneshot <package 1> <package 2> ...". Can this process be automated? |
|
Back to top |
|
|
nox23 n00b
Joined: 15 Jul 2012 Posts: 42
|
Posted: Tue Dec 17, 2024 7:00 am Post subject: |
|
|
You can use the command quickpkg to manually create a binpkg from an existing installed package, see :
To achieve it automatically, you'll need to create a script that compare the content of the /var/db/pkg to the directory /var/cache/binpkgs, for example ou via command output, ... |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1036 Location: Somewhere in Denmark
|
Posted: Tue Dec 17, 2024 7:50 am Post subject: |
|
|
nox23 wrote: | You can use the command quickpkg to manually create a binpkg from an existing installed package, see :
To achieve it automatically, you'll need to create a script that compare the content of the /var/db/pkg to the directory /var/cache/binpkgs, for example ou via command output, ... |
Be aware that quickpkg may generate empty files (/etc/) - may not be a problem if the package is already emerged/just being updated on the client, but if the package is a new install on the client you may end up missing files.
https://forums.gentoo.org/viewtopic-t-1171977-highlight-quickpkg.html |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|