Commit graph

85 commits

Author SHA1 Message Date
Mr Sticky Piston
0a11642c79
Use api for flathub app id check to reduce build fails and speedup builds (#387) 2025-02-14 11:39:10 +01:00
fiftydinar
2586223b3e
chore(default-flatpaks): Print message about checking flatpak IDs only if they are inputted 2025-02-12 12:47:09 +01:00
fiftydinar
84264cafae
chore(default-flatpaks): Revert checking flatpak flathub IDs with curl instead of wget
It was not an issue with `curl` after all, it's an issue with flathub OBS page being down with status 500.
2025-02-12 12:45:46 +01:00
fiftydinar
b592ededde
fix(default-flatpaks): Checking flatpak IDs from FlatHub (#385)
For some reason, `curl` started to specifically fail for `com.obsproject.Studio` flatpak ID, which obviously exists.

I thought it's because of Flathub downtime at the moment, but it's not & is consistently reproducible.

Maybe it's a bug introduced with `curl` or something similar, so to solve this issue, `wget --spider` will be used instead.
2025-02-11 21:03:07 +01:00
Gerald Pinder
be0201ce76 fix: Separate models required for separate schema files 2025-01-31 18:28:33 -05:00
Gerald Pinder
d343201724
chore: Update schemas to version all types (#383) 2025-01-30 14:00:08 -05:00
fiftydinar
189048b119
chore: Remove usage of yq in favor of jq (#369)
* chore: Remove usage of `yq` in favor of `jq`

* fix: Missed bracket in `default-flatpaks`

* fix: `get_json_array` complaining about unpopulated arrays

* fix(files): Forgot to input `-r` flag for some `jq` calls

* fix(gschema-overrides): Use `try` in `get_json_array`

* chore(default-flatpaks): Replace `yq` with `jq` in run-time setup binaries

* chore: Switch to simplified `jq` syntax without brackets

* chore(default-flatpaks): Switch `repo-info` file from `yml` to `json`

* fix(default-flatpaks): Some `yq` calls

* chore: Revert back to bracket syntax for more reliable `jq` parsing

* chore(files): Missed bracket syntax

* chore: Approve bot suggestion about quoting

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update modules/files/files.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(yafti): Populating custom flatpaks

It's populated in reverse order compared to the format in recipe, but it works

* fix(fonts): Variable substitution is needed

* fix: Typo

* fix(fonts): Forgot to assign FONTS variable

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-02 19:02:13 +00:00
fiftydinar
9368c5dc5e
docs(default-flatpaks): Strictly specify how to add Fedora flatpak repo
It's easier for the user.
2024-11-12 17:14:46 +01:00
fiftydinar
1d7243782a
fix(default-flatpaks): Allow usage of Fedora flatpak remote (#359)
* fix(default-flatpaks): Allow usage of Fedora flatpak remote

* docs(default-flatpaks): Some further clarifications for retaining Fedora flatpak remote
2024-11-12 17:09:00 +01:00
fiftydinar
be9f17c96e
chore(default-flatpaks): Temporarily remove auto-restart of services (#355)
* chore(default-flatpaks): Remove auto-restart of `system-flatpak-setup`

* chore(default-flatpaks): Remove auto-restart of `user-flatpak-setup`
2024-10-28 12:40:20 +01:00
fiftydinar
ca84ec87eb
fix(default-flatpaks): Fix loginctl json parsing in F40 & less (systemd v255 & less) 2024-10-25 23:02:40 +02:00
fiftydinar
ccde6df956
fix(default-flatpaks): loginctl regression in parsing json output for notifications
On Fedora 41, which has systemd v256, `--output=json` no longer displays `json`, but classic output.

Using `-j` instead of `--output=json` fixes this issue.
2024-10-25 22:51:51 +02:00
fiftydinar
247a99e42a
fix(default-flatpaks): Make notifications be more reliable by delaying service start for 30s & cleaner internet-related logs 2024-10-25 19:13:53 +02:00
fiftydinar
ca9a840072
chore(default-flatpaks): Remove flatpaks first & then install 2024-10-23 20:15:54 +02:00
fiftydinar
f5d1e74361
chore(default-flatpaks): Fix outdated code comment 2024-10-23 18:47:16 +02:00
fiftydinar
95c17dcc23
chore(default-flatpaks): Increase connection attempts to 5 & print successful connection log 2024-10-23 18:26:06 +02:00
fiftydinar
2f2036db0b
fix(default-flatpaks): Couldn't resolve host name in some network setups (#352) 2024-10-23 17:53:39 +02:00
fiftydinar
89ea220f5e
chore(default-flatpaks): No need to query DISPLAY variable for notify-send
Notifications work without it & custom images without XWayland don't have `DISPLAY` variable at all (eg. secureblue & custom images based on it)
2024-10-23 11:42:06 +02:00
fiftydinar
17c6be78d6
chore(default-flatpaks): Improve detection of username & UID for rootful notify-send 2024-10-18 20:49:01 +02:00
fiftydinar
5cdfb9eeb1
Revert "fix(default-flatpaks): Couldn't resolve host name with some working internet connections" 2024-10-16 15:53:00 +02:00
fiftydinar
c6f76ddfcd
fix(default-flatpaks): Couldn't resolve host name with some working internet connections
Fixes: #346
2024-10-16 14:55:47 +02:00
fiftydinar
3ceb12a244
chore(default-flatpaks): Add no_title_modify=false at the start of the condition logic 2024-10-15 08:20:14 +02:00
fiftydinar
ae20a0278a
chore(default-flatpaks): Adjust log for removing fedora-testing remote 2024-10-15 08:13:44 +02:00
fiftydinar
ed67139d8e
fix(default-flatpaks): Check for Fedora testing repo 2024-10-14 23:49:42 +02:00
fiftydinar
d863d1bede
chore(default-flatpaks): Improve reliability of Fedora flatpaks removal & logging/debugging (#345) 2024-10-14 23:18:30 +02:00
fiftydinar
54d27a1f9d fix(default-flatpaks): Default notify value not properly set
Fixes:
https://github.com/blue-build/modules/issues/268
2024-09-17 09:10:15 +02:00
fiftydinar
59c7882785
chore: Put files in /etc/ instead in /usr/etc (#315)
* docs(files): Recommend to put files in `/etc/` instead in `

This also modifies build-time part of modules to work with `/etc/` instead of `/usr/etc/`

* docs(files): Revert the `/usr/etc/` & `/etc/` docs

* chore: Revert `signing` module transition due to upstream issue

* docs: Clarify note better regarding /etc
2024-08-11 17:07:55 +00:00
xyny
ea2720ba4e
feat: support versioning modules (#240)
* feat: add nu script that generates build matrix for github action

* chore: push initial version of new github action for testing

* fix: properly close github template sequence

* chore: screw this i'll write the whole build in nu (nu build script started, continue later)

* fix: individual misspellings and such

(yeah, i'm tired)

* fix: containerfile path

* fix: docker arg syntax

* fix: docker build path?

* feat: code structure, buildx, pushing to registry

* fix: tag image properly

* fix: split arguments properly

* fix: use registry properly

* refactor: move docker build to a separate par-each

* feat: correctly tag versioned modules

* feat: cosign signing, better logging

* fix: cosign syntax

* fix: differentiate log types with more expressive colors

* chore: fix cosign syntax in logs

* fix: capture errors, colocate logs while running paraller

* chore: partly revert "fix: capture errors, colocate logs while running paraller"

This reverts commit 9238a0f1d68183e712b567fc50849964cc964c78.

* chore: bring back capture errors, keep order in logs

apparently do --capture-errors is required for nushell to catch external commands errors

* chore: Revert "chore: bring back capture errors, keep order in logs"

These changes didn't do anything...
This reverts commit 020b9a1bce9456f2167397b49aa24a65f6bec8e6.

* fix: properly tag images in PRs and secondary branches

* fix: use tags-variable instead of "tags" string

* chore: change default-flatpaks module folder structure to be versioned

* fix: also log generated tags for versioned modules

* fix: don't add tags meant for latest image for every version of versioned module

* fix: better logging and inline docs

* fix: better logging pt2

* feat: build-unified for building the legacy modules container with just the latest versions

* fix: correct workflow names

* fix: add missing ansi resets

* chore: add nushell extension to recommendations

* fix: update unified job name

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>

* chore: remove matrix output left over from a previous version

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-08-11 11:20:10 +00:00
fiftydinar
37466a71cb chore(default-flatpaks): Don't modify the remote title if it's already modified
Wanting to avoid running unnecessary setup in logs as much as possible.

Unfortunately,
`flatpak remote-add` still runs even if repo exists, as it apparently modifies the URL, no matter if it's the same.

I tried to extract & compare input URL & flatpak URL to mitigate this as an condition, but it doesn't work, as flatpak lists repo URL, while we input flatpakref URLs, which are not the same.
2024-08-04 20:37:23 +02:00
xyny
e749fe71d3 chore: remove raw github URLs from module.ymls (unneeded after recent refactor) 2024-07-26 16:02:32 +03:00
Daniel Barenholz
d78597329d
docs(default-flatpaks): Fix typo (#297)
fix(default-flatpaks): Typo in module.yml
2024-07-26 12:26:56 +00:00
fiftydinar
bb3492b1e9 chore(default-flatpaks): Add ERROR: to the error log for verifying flatpak IDs from FlatHub
Makes it more readable & clearer at the start
2024-07-22 17:43:29 +02:00
fiftydinar
83ac1d446a style(default-flatpaks): Don't display note message twice 2024-07-20 23:38:50 +02:00
fiftydinar
657d75def6 fix(default-flatpaks): Unboundable variable error 2024-07-20 23:19:39 +02:00
fiftydinar
a1adac44af fix(default-flatpaks): Read repo-info.yml only when it's available 2024-07-20 23:13:30 +02:00
fiftydinar
a41e739d16
chore(default-flatpaks): Adjust echo formatting
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-07-20 23:08:17 +02:00
fiftydinar
fbb94b5d86 chore(default-flatpaks): Add safe-check for FlatHub flatpak IDs
Should avoid issues of users typing ID wrongly, which would fail the whole module on booted system, so nothing would get installed or removed.

Only FlatHub repo is supported as it's the most popular flatpak repo & it's easy to implement safe-check for it.
2024-07-20 23:02:03 +02:00
xyny
be6e4ba5bd
feat: add typespec schemas for modules (#233)
* feat: add typespec for bling and akmods for testing

* chore: temporarily change module source to dev branch

* feat: add missing module typespecs from blue-build/schema

* feat: add schemas for default-flatpaks module

* chore: annotate some parameters as optional

* fix: typo in default-flatpaks schema

* feat: add schema for files module

* feat: add script module schema

* feat: add signing module schema

* docs: add module.yml docs etc.

* fix(default-flatpaks): don't capitalize string in typespec

* feat: add schemas for gnome-extensions

* fix(files): properly declare string: string record type

* chore: add tsp for gschema-overrides

* chore: tsp for systemd module

* chore: add link to systemd tsp to module.yml

* chore: add tsp for yafti module

* feat: add docstrings for files module

* feat: add tsp for chezmoi module

* feat: docstrings for akmods tsp

* feat: docstrings for bling tsp

* feat: docstrings for default flatpaks tsp

* fix: link to files module docs page in files module tsp

* feat: docstrings for fonts module tsp

* feat: add docstrings for gnome extensions tsp

* feat: docstrings for gschema overrides tsp

* feat: docstrings for rpm ostree tsp

* feat: docstrings for script tsp

* feat: docstrings for signing module

* feat: docstrings for systemd tsp

* feat: docstrings for yafti module

* fix: typo in files tsp

* feat: typespec for brew module

* chore: update rpm ostree tsp for keys: prop

* fix: use typespec to declare default values

* fix: errors from previous commit

* docs: add typespec instructions

* docs: chore: add typespec docs link for docs syntax

* chore: switch to semicolon for ending property definitions

* docs: fix: typo inlude -> include

* feat: tsp for justfiles module

* chore: change links to reference main branch

---------

Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
2024-07-09 16:25:31 +00:00
fiftydinar
2c1fdca91f fix(default-flatpaks): Use separate if condition instead of elif when appending IDs to list 2024-06-19 16:59:11 +02:00
fiftydinar
e668d2ef02
fix(default-flatpaks): Last module definition overwrites the 1st one (#263) 2024-06-19 14:29:54 +00:00
fiftydinar
62232260b4 docs(default-flatpaks): Add known issue about https://github.com/blue-build/modules/issues/231 2024-05-17 09:03:21 +02:00
fiftydinar
2f304f0d71
docs(default-flatpaks): Add current known issues (#171)
I wanted to do this before, but forgot
2024-03-21 11:24:30 +00:00
xyny
52f6bdbfd2
refactor: migration PR 2024-02-25 16:48:55 +00:00
fiftydinar
fec6a76116
chore(default-flatpaks): Obtain flatpak list of apps without runtimes (#142)
Since runtimes are not supported in our module, we don't need them in a flatpak list inside binaries.
2024-02-25 07:41:26 +00:00
xynydev
c6aea9234c chore: replace URLs with ublue-os/bling 2024-02-21 16:39:34 +02:00
fiftydinar
1e1197dd0b
refactor(default-flatpaks): Switch to standardized BlueBuild location, implement useful docs into files & make flatpak detection + comparison more robust (#122)
* chore(default-flatpaks): Switch to standardized BlueBuild location

Use

`/usr/etc/bluebuild/default-flatpaks`

location instead of

`/usr/etc/flatpaks`

If possible, we should ideally use this location for system modifications:

`/usr/share/bluebuild/default-flatpaks`

While having user modifications in:

`/usr/etc/bluebuild/default-flatpaks`

But it needs to be figured out how the logic will work for separating system & user modifications this way.

I used this logic in unofficial `initramfs-setup` module & it works well, by merging both system & user files into 1 output.

However, this method can create duplicates if user specified it in it's modification, so I mentioned that user should look if the system entry has modifications they need. Perhaps, array diff can be done, which would circumvent this.

So merge this for start.

Only other module which has potential for migrating to standardized BlueBuild config is yafti (more details in other PR I'll do in some time).

* refactor(default-flatpaks): Make default-flatpaks more robust

Document in detail to user how he can change the config in files itself.

Also document what files do in `/usr/share/bluebuild/default-flatpaks` as well.

Refactor flatpak lists detection to be more reliable by excluding words starting with # symbols, whitelines & duplicate entries. Use `comm` for comparing flatpak list to existing flatpaks output instead of using `grep`, as it's easier to use & it's more reliable.

Separate user's & maintainer's modifications better by utilizing read-only `/usr/share/bluebuild/default-flatpaks` directory for maintainers, while for users we would use `(/usr)/etc/bluebuild/default-flatpaks` directory. Reverting to defaults is more reliable as it would avoid users from touching maintainer's modification directly.

I wouldn't modify repo-info.yml doc content, as we restrict it from user's modification & we wouldn't want to potentially ruin yaml parsing just for that.

Only thing that remains is to test this in a VM. And look to potentially make code cleaner.

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario

I have to figure out this part

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario pt.2

* draft(default-flatpaks): Avoid install/remove duplicate loop scenario pt.3

* fix(default-flatpaks): Avoid install/remove duplicate loop scenario

* chore(default-flatpaks): minor grammar adjustment

* draft(default-flatpaks): Account for scenario...

when user sets the same package in install list that is in maintainer's remove list & vice-versa

* fix(default-flatpaks): Account for scenario when user sets the same package in install list that is in maintainer's remove list & vice-versa

* fix(default-flatpaks): Typo in code for combined install list

* chore(default-flatpaks): Remove unnecessary echo

* chore(default-flatpaks): Make directory for user config

* chore(default-flatpaks): Explain user's vs maintainer's flatpak list situation better

* fix(default-flatpaks): Typo in user's configuration for system flatpaks install

* chore(default-flatpaks): There is no need to mkdir parent folder if child folder is created

* chore(default-flatpaks): Make config organization cleaner

Don't use echos for writing configs, use files instead for easier & more intuitive editing.

* fix(default-flatpaks): Copy notification file properly

Made a mistake in variable name

* docs: README fixes

- don't use ambiguous term "live-user"
- capitalize Flatpak
- grammar and phrasing changes

* docs: grammar and phrasing changes in configuration file docs

- replace "maintainer's config" with "image's default config"
- rewrite flatpak list format explanation

* docs: slightly reword local modification section again

* chore(default-flatpaks): Add a missing newline to system flatpak list

---------

Co-authored-by: xynydev
2024-02-11 09:33:05 +00:00
xynydev
03ac42e16f fix: switch urls to fetch main branch in module.ymls 2024-02-04 18:18:35 +02:00
xyny
5e455a1477
refactor: start using module.yml for module metadata (#116)
* feat: add initial module.yml for rpm-ostree

* chore: add shortdesc to module.yml

* feat: add missing module.ymls

* feat: add website rebuild action for module reference updates

* chore: remove old readme in modules dir

* refactor: switch to a hybrid module.yml + README arrangement

* chore: switch docs to use starlight aside syntax
2024-02-04 16:05:22 +00:00
fiftydinar
9b66c64563
feat(default-flatpaks): install & uninstall notifs (#109)
* feat(default-flatpaks): Support for notifications that inform the user before flatpak install/uninstall procedure begins

This can be implemented to be more readable maybe, but this should work.

* chore(default-flatpaks): There is no need to call notifications true statement twice

* chore(default-flatpaks): Make starting notifications consistent with finished ones

* chore(default-flatpaks): Use "listed" term rather than "some"

* chore(default-flatpaks): Use "some" notification only for uninstalling flatpaks
2024-01-30 17:06:25 +00:00
xynydev
53e8fb3e2b refactor: move default-flatpaks files to module directory 2024-01-24 17:55:51 +02:00