Commit Graph

211 Commits

Author SHA1 Message Date
Arcitec
07642c2f43 fix!: move justfile to standardized location 2023-05-10 21:44:01 +03:00
Arcitec
077e7243f2 fix!: move recipe.yml to standardized location 2023-05-10 21:44:01 +03:00
ER
6ecd35bc91 docs: add section about creating scripts 2023-05-10 20:05:57 +03:00
ER
ce17069ecf docs: refactor: mv inline docs in autorun.sh
Moving most of the inline docs in autorun.sh to scripts/README.md.
This makes the documentation more discoverable and approachable
(no need to read source code).

This commit also removes redundancies from the inline docs,
clears up some phrasing,
and uses more standard formatting and phrasing such as:
- using `` instead of ""
- calling itself `autorun.sh`
- calling pre and post "execution phases"
2023-05-10 20:05:57 +03:00
ER
69c8b16abc docs: info about manually listed scripts & autorun
removed from recipe.yml in previous commit
2023-05-10 20:05:57 +03:00
ER
ef30c752c6 docs: simplify and clear scripts: section comments 2023-05-10 20:05:57 +03:00
ER
4f261a2e8b docs: refactor: create a seprte README for scripts 2023-05-10 20:05:57 +03:00
Arcitec
b49264711c chore: fix outdated references to old paths in readme
Removing leftovers from the old /etc/ paths that were used before issue #28 was solved.
2023-05-10 18:44:25 +03:00
Arcitec
f0946f74b9 fix: pre-generate empty "pre" and "post" script directories
This saves developers a bit of time by not having to type `mkdir scripts/pre/` anymore. Could things get any lazier than this? ;)
2023-05-10 18:44:25 +03:00
Arcitec
5cacb2fcd8 feat: ultimate laziness achieved with a powerful new script runner
It's so easy that even Homer Simpson could use it to automate the nuclear plant. Enjoy!
2023-05-10 18:44:25 +03:00
Arcitec
55ff6363be feat: implement a very flexible runner for "pre" and "post" scripts
This new functionality now makes it possible to execute scripts at the start or end of the build process, while also being super simple to expand to add further script stages in the future.

It also supports effortless reuse of scripts for multiple stages, since the scripts are now executed with the "current stage" as their 1st argument, to allow them to easily determine which stage they're running in.
2023-05-10 18:44:25 +03:00
Arcitec
f596f4c496 chore: move yafti's behavior explanation from recipe to readme 2023-05-10 18:44:25 +03:00
Arcitec
946f3d82ee fix: automatically determine current fedora version during build
This fixes the issue where someone specifies `fedora-version: latest`, which won't be known until build-time.

I also added a small "welcome" banner to the build log. It's really just there to retain a somewhat contrived use-case example for how to use `get_yaml_string()`, for other programmers who want to extend this in the future.
2023-05-10 18:44:25 +03:00
Arcitec
bd9104a0f2 chore: clarify comment regarding libadwaita and its use-cases 2023-05-10 18:44:25 +03:00
Arcitec
93ddf5e961 chore: update readme to reference the new rpm configuration 2023-05-10 18:44:25 +03:00
Arcitec
4ca33a3fe3 feat: streamlined YAML configuration for RPM-related settings
All RPM-related settings are now within their own YAML sub-category, to improve readability.
2023-05-10 18:44:25 +03:00
Arcitec
baa8c47ffa feat: automatic repo version selection via YAML configuration
You can now define your custom repos with the `%FEDORA_VERSION%` variable, to automatically use the correct repo version, so that you never have to maintain their custom URLs again in the future.
2023-05-10 18:44:25 +03:00
Arcitec
33ab88f794 feat: add function for reading individual YAML strings
The recipe file is now also moved to a separate variable, and we use `--` to ensure that yq never misinterprets any custom arguments as `-flags`.
2023-05-10 18:44:25 +03:00
Arcitec
bf19fa5eca feat: implement effortless RPM removal via YAML configuration
You can now easily remove RPMs from your custom image, without having to edit the build.sh script.

This also changes the old "rpms" config key, to "rpm-install", for consistency with the new setting.
2023-05-10 18:44:25 +03:00
Arcitec
0b63c7b454 chore: clean up recipe.yml to make it easier to understand
Makes the sentences easier to understand, and explains a few confusing concepts.
2023-05-10 18:44:25 +03:00
Arcitec
5f072b8b67 fix: faster installation of custom RPMs
Thanks to leveraging Bash arrays, we are now able to use parameter expansion to perform every package installation as one rpm-ostree operation instead of individual ones. This will give us a huge build speedup.

Bash properly expands every array element as safely quoted arguments, complete with support for spaces and special characters.
2023-05-10 18:44:25 +03:00
Arcitec
07cbe2cc08 fix: extremely robust handling for YAML data fetching
This new technique is way easier to use, more maintainable, and safely handles special characters and spaces in the YAML data. It will also enable other features, such as the rpm-ostree improvement coming in the next commit.

The function name is `get_yaml_array()` because it literally reads it into a Bash array, by the way. Don't change the function name in the future. We may need other functions to read values into strings, etc.
2023-05-10 18:44:25 +03:00
Arcitec
20e0a06588 fix: remove extremely verbose "x" flag
The debug "x" flag that prints every command is really excessive.
2023-05-10 18:44:25 +03:00
Arcitec
d09dd76243 feat: install repos first, so that they're available for scripting
This ensures that custom scripts have the flexibility to work with the repos that have been added.
2023-05-10 18:44:25 +03:00
Arcitec
f24c4072fd fix: use proper shebang line
This is the most portable shebang line and should always be used.
2023-05-10 18:44:25 +03:00
Arcitec
44660085eb chore: clean up sentences to make them easier to expand
Lowercase, run-on sentences are a nightmare to expand later, because the lack of sentence structure means you can't just add more lines and have a nice flow anymore.

Let's add some punctuation and grammar.
2023-05-10 18:44:25 +03:00
Arcitec
4b9fe0b05b fix: add flags to ensure that build aborts if there are errors 2023-05-10 18:44:25 +03:00
Eino Rauhala
cd5c6c33cb docs: clarify flatpaks in recipe (#68)
* docs: minor clarification of yafti/flatpak

* docs: clarify flatpaks not installed in image
2023-05-09 14:38:58 +00:00
plata
60ddd67713 feat: use Fedora 38 (#64)
* Update Containerfile

* Update recipe.yml

* Update recipe.yml

* Update README.md
2023-05-09 14:27:49 +00:00
Frederik Zorn
0a04aac233 docs: explain just nix-me-up and extrarepos: (and COPR) in README (#63)
* docs: add just nix-me-up command explanation

* docs: explain extrarepos in recipe.yml

* docs: explain copr and how repos work

* What is copr?
* Make clear that you nedd .repo files.
* Show what it does.

* docs: minor grammar & clarity improvements

* docs: restructure COPR section
no need for it to be too long
and copying from the COPR docs is not as useful
as explaining it in more simple terms

---------

Co-authored-by: @EinoHR
2023-05-02 13:52:26 +00:00
dependabot[bot]
7bcbf37cd7 build(deps): bump sigstore/cosign-installer from 3.0.2 to 3.0.3 (#62)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 10:06:04 +00:00
Jorge O. Castro
b67e70eb44 Merge pull request #61 from tunix/readme-fix
fix: corrected readme
2023-04-30 16:52:17 -04:00
Alper Kanat
9d831ac736 fix: corrected readme 2023-04-30 23:47:04 +03:00
Eino Rauhala
4a62e134a0 docs: clarify and clean the basic description (#58) 2023-04-30 12:30:04 +00:00
Eino Rauhala
1d208f6eae feat: add a just setup command for setting up nix (#48)
* feat: add nix install script from bluefin / dnkmmr

* feat: add nix-me-up just cmd from bluefin

* feat: just update nix if installed

* feat: add nix-app-icons.sh
enables desktop icon support by adding to XDG_DATA_DIRS

* chore: remove nix update for now
this will be added in a later PR
2023-04-29 11:08:17 +00:00
Eino Rauhala
c537104ba2 feat: add extra repos field to recipe (#52)
* feat: add extra repos field to recipe

* fix: semicolon before "done" keyword in shell

* fix: don't put repos in /usr/etc/
2023-04-28 13:55:37 +00:00
Eino Rauhala
5f4ac049a7 feat: add cosign.key to gitignore (#51)
wouldn't want somebody accidentally committing their private key into the public repo
2023-04-26 18:27:53 +00:00
Eino Rauhala
eecd78fbfb docs: add sections in README for scripts and a small explanation of /usr/etc/ (#50)
* docs: add section about scripts

* docs: add note about /usr/etc/
2023-04-26 17:28:22 +00:00
Eino Rauhala
1df862aae8 style!: change base-container to base-image (#49)
#34
2023-04-26 17:15:16 +00:00
Eino Rauhala
b3f7f07d6c fix: only create yafti grp when flatpaks defined (#46) 2023-04-26 16:49:26 +00:00
Eino Rauhala
95ff830b49 fix: moving recipe back to a directory available on the host (#47)
* fix: mv recipe to a dir available on the host

* docs: add notice for recipe editing on host

* fix: replace /tmp/ublue-recipe.yml with /usr/etc/.
2023-04-26 16:19:31 +00:00
Eino Rauhala
ec91345bc7 fix: add libadwaita (#45)
yafti is currently broken without libadwaita, #37
2023-04-26 15:39:51 +00:00
Eino Rauhala
085d26aa1a fix: prevent /etc/ merge issues (#43)
* fix: prevent /etc/ merge issues
discussed at length in #28
also including tons of comments about the issue

* fix: change references of /etc/ to /usr/etc
2023-04-26 15:23:43 +00:00
Emmett Wasik (Viv)
37143b0e23 feat: add per-recipe shell script support (#38) 2023-04-24 18:40:51 +00:00
Eino Rauhala
a9c15ac306 fix: chore: manual merge action updates from main (#41)
all changes from the main repo applied,
except those explicitly different in startingpoint
2023-04-24 18:06:27 +00:00
Jorge O. Castro
328595b77d refactor: avoid subshell, sign image with env. var (#30)
Works in main, propagating here.

Co-authored-by: xnasero@posteo.net
2023-04-24 17:31:03 +00:00
dependabot[bot]
56a1d24a83 build(deps): bump mikefarah/yq from 4.33.2 to 4.33.3 (#33)
Bumps [mikefarah/yq](https://github.com/mikefarah/yq) from 4.33.2 to 4.33.3.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.33.2...v4.33.3)

---
updated-dependencies:
- dependency-name: mikefarah/yq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-22 17:30:16 +00:00
Eino Rauhala
91d4c3877c fix: update cosign installer version (#32)
i hear there's problems with 3.0.1 that are fixed in 3.0.2
that can affect people using this repository as a template
2023-04-22 15:22:44 +00:00
Jorge O. Castro
693320df20 Merge pull request #26 from bpbeatty/recipe-arg
fix: use RECIPE arg
2023-04-13 13:49:46 -04:00
Brian Beatty
6d778859c8 fix: use RECIPE arg
The RECIPE arg in the Containerfile is empty when it is before the
FROM statement. This moves the arg so that it can be used.
2023-04-08 13:18:45 -05:00