Commit graph

56 commits

Author SHA1 Message Date
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
fiftydinar
fe9cd68c6a
fix(default-flatpaks): Install/uninstall system flatpaks regardless i… (#100)
* fix(default-flatpaks): Install/uninstall system flatpaks regardless if current user has permissions or not

Fixes: https://github.com/ublue-os/bling/pull/93

To make notify-send working for --system systemd units, I have to thank @gerblesh for his code & idea in ublue-updater.

I tested this in Silverblue & it works.
However, I would like this to be tested in other DEs like Kinoite too, to see if it's working correctly.

Feel free to improve code if you find some space for that.

@lorduskordus

* Use json parser instead as a more reliable solution on fetching values

* There is no need for echo when parsing json

* Fetch DISPLAY environment variable from printenv

* Make functions for notify-sends, to make script clearer

* Whiteline fixes
2024-01-20 16:38:51 +00:00
Nick Saika
17bacbe3da
fix: Fix flag ordering in set calls in scripts (#99)
The README for scripts has an incorrect use of the `set`. Where it says
to use:

	set -oue pipefail

it should be:

	set -euo pipefail

since `pipefail` is an option consumed by `set -o`.

More information: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
2024-01-16 06:12:08 +00:00
fiftydinar
f08f1b26d1
Update README.md 2023-12-29 02:18:35 +01:00
fiftydinar
d32dc2ed2d fix(default-flatpaks): Clarify branched flatpaks support better 2023-12-28 21:24:55 +01:00
fiftydinar
ec020cd2ca
fix(default-flatpaks): Missing notification for system flatpaks (#87)
* fix:(default-flatpaks): Missing notification for system flatpaks

This approach, while more fragmented, it's cleaner, as there is a clearer separation of root & non-root operations done by flatpak-setup service. This should probably increase security too (but I'm not the expert to talk seriously about that). It also gets rid of some non-harming error for /var data, can't remember it fully.

While it may be confusing for users that they have to type:

`systemctl status --user system-flatpak-setup`

instead of previous:

`systemctl status system-flatpak-setup`

It is something worth sacrificing for the important user-experience fix.
2023-12-27 09:12:49 +00:00
xyny
8d59b2a3ec
fix(default-flatpaks): (again) do the yq notify step right
for real this time
2023-12-22 11:30:06 +00:00
xyny
f67cfce6d5
fix(default-flatpaks): get notify config from right var? 2023-12-22 05:04:57 +00:00
fiftydinar
bd92e7e5c5
feat(default-flatpaks): Add info about which flatpaks are installed (#85)
* feat(default-flatpaks): Add info about which flatpaks are installed & uninstalled in notification. Also implement notification enable/disable config support.

* feat(default-flatpaks): Add support for configuring notifications in recipe file

* fix(default-flatpaks): Formatting fixes

* fix(default-flatpaks): Fix "enabling" typo instead of "configuring" notifications

* chore(default-flatpaks): Remove unused yq command

* fix(default-flatpaks): There is no need for 2 double quotes
2023-12-21 20:34:33 +00:00
fiftydinar
dbc867ff55 Indicate that module skips flatpak install/uninstall if no changes are detected 2023-12-20 11:24:00 +01:00
fiftydinar
07f1797838 Delete some README misinformation
It will loop on every boot to install & uninstall
2023-12-20 10:15:14 +01:00
fiftydinar
09af3b3602 Tiny README fix 2023-12-20 09:59:50 +01:00
fiftydinar
bf753ad0b6 Update README information to reflect these changes 2023-12-20 09:54:12 +01:00
Patrick Csikos
f0c0192e10
feat(default-flatpaks): Better handle multiple uses of module (#74)
* fix(default-flatpaks): Always enable systemd services

Ensures that the module always removes Fedora Flatpaks, even if a
system-wide flatpak remote isn't configured for the module.

* chore(default-flatpaks): Add output for result of repo config

* fix(default-flatpaks): Better handle multiple uses of module

* chore(default-flatpaks): Add label to output of existing config

* docs(default-flatpaks): Mention that Flatpak remote can be re-configured

* docs(default-flatpaks): Add second example to README

* docs(default-flatpaks): Clarify repo config in second example
2023-11-18 12:43:55 +00:00
Patrick Csikos
d83d721c18
docs(default-flatpaks): Make example config match other modules (#65)
* docs(default-flatpaks): Make example config match other modules

* docs(default-flatpaks): Indent list items in example config

Does seem to work if they aren't indented, but this way matches other
modules and seems to be best practice
2023-10-22 09:16:42 +00:00
zelikos
66d2ba8d94
fix(default-flatpaks): Set BLING_DIRECTORY fallback value
...instead of overriding
2023-10-21 16:08:22 -04:00
zelikos
ee196a0528
fix(default-flatpaks): Intialize BLING_DIRECTORY variable 2023-10-21 15:53:06 -04:00
xyny
5e6bc4c7ae
docs(default-flatpaks): put essential function first 2023-10-21 10:24:09 +00:00
zelikos
1c203cb6dd
fix(default-flatpaks): Only enable system/user services if respective repo is configured 2023-10-14 13:08:51 -04:00
zelikos
8bc41e6077
fix(default-flatpaks): Check that system/user configuration is present 2023-10-14 12:50:47 -04:00
zelikos
8251083a5c
style: Improve readability of default-flatpaks functions 2023-10-14 11:56:49 -04:00
zelikos
a4b8151e28
docs: Clarify default-flatpaks remote configuration 2023-10-14 11:44:44 -04:00
zelikos
30931ed9c2
fix: Use Flathub as default remote for default-flatpaks 2023-10-14 11:43:13 -04:00
zelikos
c02b399bf6
fix(default-flatpaks): Check if repo-info already exists before creating 2023-10-14 11:32:55 -04:00
xyny
a774b670a9
docs: explain default-flatpaks /etc/flatpak/ structure 2023-10-14 09:39:53 +00:00
zelikos
edbbd0b349
fix: Use location argument in configure_lists output 2023-10-05 12:18:44 -04:00
zelikos
5ed4c73a90
refactor: Use functions for flatpak config steps
...instead of having duplicated code between system flatpaks and user
flatpaks configuration.
2023-10-05 12:00:53 -04:00
zelikos
3250cdc8aa
docs: Explain flatpak module files and how they work 2023-10-04 13:05:00 -04:00
zelikos
98a71af459
docs: Show that flatpak remotes can be added without installing flatpaks from them 2023-10-02 21:22:53 -04:00
zelikos
d0e1434b1d
docs: Mention that Fedora Flatpaks remote is removed 2023-10-02 21:20:23 -04:00