Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

feat: ease customization by reading flatpaks and rpms to install from a recipe.yml. #79

Merged
merged 13 commits into from
Feb 28, 2023

Conversation

xynydev
Copy link
Member

@xynydev xynydev commented Feb 26, 2023

This leverages shell scripting and https://github.com/TomWright/dasel to read the list of packages to install in ublue-firstboot and the containerfile.

If in the future another firstboot solution is used it could either read from this recipe.yml or just the firstboot-related things be split off.

Of course if desired this recipe.yml could also host other configuration options.

Copy link
Member Author

@xynydev xynydev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the point of setup-flatpaks is but I kept in intact instead of replacing it.

Copy link
Member

@castrojo castrojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! I need some time to test this in a VM, and I think by default we don't want the user to end up with layered packages though. We should probably have the rpm-ostree install command do an external list so that they end up with a complete image, but that can be done later.

Containerfile Outdated Show resolved Hide resolved
Containerfile Show resolved Hide resolved
etc/justfile Outdated Show resolved Hide resolved
ublue-firstboot Show resolved Hide resolved
@marcoceppi marcoceppi changed the title Ease customization by reading flatpaks and rpms to install from a recipe.yml. feat: ease customization by reading flatpaks and rpms to install from a recipe.yml. Feb 26, 2023
xynydev and others added 2 commits February 27, 2023 20:09
This original pass was wonderful. For brevity of time and speed to land this I've made a few tweaks that would normally go in a review cycle - lets get this in asap.
@marcoceppi
Copy link
Contributor

I've made a few tweaks to this PR - mainly using yq to simplify looping logic and some file name preferences. Love this approach - thanks for the contribution!

@castrojo castrojo added the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@marcoceppi marcoceppi removed the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@castrojo castrojo added ok-to-build This PR is okay to build and publish and removed ok-to-build This PR is okay to build and publish labels Feb 28, 2023
@castrojo castrojo added the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@castrojo
Copy link
Member

(sorry for all the noise, this has forced us to figure out how to do builds with PRs, in progress)

@marcoceppi marcoceppi removed the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@castrojo castrojo added the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@marcoceppi marcoceppi removed the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@marcoceppi marcoceppi added the ok-to-build This PR is okay to build and publish label Feb 28, 2023
@xynydev
Copy link
Member Author

xynydev commented Feb 28, 2023

I've made a few tweaks to this PR - mainly using yq to simplify looping logic and some file name preferences. Love this approach - thanks for the contribution!

Cheers! I thought dasel would be better/easier to install as yq uses python, but I'm fine with either. Your small change to the looping logic could have probably been done using dasel's all() func, but I'm not familiar enough with shellscripting to say for sure.

@marcoceppi
Copy link
Contributor

Cheers! I thought dasel would be better/easier to install as yq uses python, but I'm fine with either.

yq is built in go and doesn't have any python packaged requirements

been done using dasel's all() func

I didn't see that originally, I'd have to look to make sure. I'm far more familiar with jq/yq style jmespath lookup syntax

@marcoceppi marcoceppi added ok-to-build This PR is okay to build and publish and removed ok-to-build This PR is okay to build and publish labels Feb 28, 2023
@marcoceppi
Copy link
Contributor

Okay, a PR build is available. Going to do some quick tests and wait for @castrojo's feedback https://github.com/ublue-os/base/pkgs/container/base/73834831?tag=pr-79

@xynydev
Copy link
Member Author

xynydev commented Feb 28, 2023

yq is built in go and doesn't have any python packaged requirements

wh- ahh both go then.
Apparently there's two projects called yq,
https://github.com/kislyuk/yq and https://github.com/mikefarah/yq. I must have been confused by that.

Copy link
Member

@castrojo castrojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in a clean VM, everything works just as before and the final state is what we want, nice work everyone!

@castrojo castrojo merged commit a5e90a5 into ublue-os:main Feb 28, 2023
@xynydev xynydev deleted the recipe-initial branch February 28, 2023 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ok-to-build This PR is okay to build and publish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants