blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
21 stars 27 forks source link

module idea: `brew` #230

Closed fiftydinar closed 3 weeks ago

fiftydinar commented 1 month ago

Thanks to the effort spent by Bluefin maintainer @m2Giles, installing brew & its packages in build-time is possible.

The benefit of using brew is very big collection of CLI apps, where good fraction of those are not available in Fedora repos. Another potential benefit is possibility of using different versions of same package (not sure, just a thought).

This feature landed very recently in Bluefin, so it's good to monitor how the implementation will behave like & act according to that.

m2Giles commented 1 month ago

Correction. We did not go image based updates due to brew formulas being tied to the image.

This will act exactly like if you had brew installed via the ujust brew command.

We added automatic updates and upgrades via systemd timers that run as what is expected to be the brew user, UID 1000.

Additionally this is only for Bazzite and Bluefin/Aurora.

fiftydinar commented 1 month ago

Correction. We did not go image based updates due to brew formulas being tied to the image.

Thanks for correction, removed the sentence.

Additionally this is only for Bazzite and Bluefin/Aurora.

Which Bazzite & Bluefin/Aurora exclusive feature is stopping other images from implementing it?

fiftydinar commented 1 month ago

Expecting UID 1000 for brew updates will be problematic for multi-user setup I believe.

However, that can be noted as unsupported operation if this module is made.

m2Giles commented 1 month ago

Nothing stopping being in main. To have it update as another user, you will need to do a systemctl edit brew-update.service and systemctl edit brew-upgrade.service and change the user to the desired user.

Brew recommends having a single user be able to run the brew command and to switch to that user for upgrades, installs and etc. Since the default user is 1000, it's the assumption we've made to have it work properly. Otherwise, brew refuses to run as root.

There is nothing stopping a module being a series of COPY's or curls to get all of the files onto disk and enabling the services.

fiftydinar commented 1 month ago

Nothing stopping being in main.

There is nothing stopping a module being a series of COPY's or curls to get all of the files onto disk and enabling the services.

I misunderstood the previous sentence, this is great!

Brew recommends having a single user be able to run the brew command and to switch to that user for upgrades, installs and etc. Since the default user is 1000, it's the assumption we've made to have it work properly. Otherwise, brew refuses to run as root.

Yeah, understandable. Can't do a better workaround than this. Thanks for explanation.