89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
10.15k stars 419 forks source link

[Suggestion] Allow custom upgrade commands #1110

Open Pyro57000 opened 11 months ago

Pyro57000 commented 11 months ago

Is your feature request related to a problem? Please describe. I use distrobox to automatically create new containers for each pentest engagement I work on keeping the client files and data separate from each other. I primarily use arch linux for these boxes, and most of my tools can be upgraded via pacman, but there's a handful that rely on the AUR. I would like to replace pacman in this case with yay to upgrade both pacman and the AUR and also add the pipx upgrade command to upgrade all the pipx packages as well.

Describe the solution you'd like I would like the ability to set a custom upgrade command for containers so that when I run distrobox-upgrade all it'll actually upgrade all of my packages for all of my distroboxes.

Describe alternatives you've considered Manually entering each distrobox and running my upgrade commands. This is what I currently do, but I feel like it defeats the purpose of the distrobox upgrade command and is not very convenient

boredsquirrel commented 7 months ago

Silly recommendation but

echo "alias pacman=yay" >> ~/.bashrc

Is a good workaround. If you always use a different package manager you might just alias it.

Pyro57000 commented 6 months ago

That's true, I can't believe I didn't think consider that. Still an official way to adjust the config of distrobox to do something similar would be nice, especially if you wanted to integrate other package managers into the update process like for example pipx, rustup, flatpak, nix, etc. having the ability to set the upgrade command to either a custom script or bash one liner would be great.