In order for the logic to work properly, the flatpak list needs to be
filtered down before checking for empty. Otherwise, in the `if` clause,
the list would become empty, and would cause the flatpak call to fail.
Signed-off-by: Brad P. Crochet <brad@crochet.net>
fix: add check for empty flatpak list
Adds a check when `flatpak list` for the apps and runtimes is empty.
Fixes an issue where the flatpaks wouldn't install when no runtimes or apps where installed in user-space, due to an empty input being piped into `empty columns`
Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com>
* feat: initial draft of default-flatpaks v2
this version just sets up the config file but nothing to read it and install the flatpaks after boot
* chore: streamline logging
* chore: replace json with yaml as generated config format
* feat: set up groundwork for post boot scripts
* feat: rename installations -> configurations, initial implementation of post-boot part
* fix: put executable files into /usr/libexec/
* fix: improve fedora remote detection and removal
* feat: implement notifications for system flatpak setup
* chore(default-flatpaks): No need to expose `DISPLAY` for notify-send
* chore(default-flatpaks): Update service & add timers to match v1
* chore(default-flatpaks): Copy & enable timers instead of services
* chore(default-flatpaks): Fix typo for copying `user-flatpak-setup` timer
* chore(default-flatpaks): Copy post-boot files directly instead of placing them in `/usr/share/...`
* chore(default-flatpaks): Forgot to remove copying step of post-boot files to `/usr/share/...`
* chore: update to be in accordance with cli support for nushell
* feat: allow usage of fedora flatpak remote, remove fedora flatpaks and runtimes
* feat: refactor schema to support multiple versions of the module
* docs: separate docs for separate module versions
* fix: copy user-flatpak-setup.timer to correct directory
* chore: correctly document default values in schema
* fix: better flathub package checking
- use API url
- check everything before erroring out
* feat: warn users when giving this module v1 configuration
* fix: prevent addition of http get result into unavailablePackages list
* fix: mkdir before cp
* chore: fix () semantics problems highlighted by debugger
* feat: bluebuild-flatpak-manager CLI
* feat: alert user when trying to use module with old configuration
* docs: write basic documentation page and rewrite example
* fix: attempt to use configFile variable without dollar sign
* fix: no such things as .configurations
(the file is the array)
* fix: ensure no empty list is printed
* docs: add a quick note about learning to use the flatpak manager tool
* fix(schema): distinquish between versions
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
* fix: add noninteractive flag to flatpak install commands
* fix: ensure repo to be used is enabled
* chore: ignore errors in notify wrapper just in case
* chore: add link to announcement
* docs: run through languagetool
---------
Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
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.
* 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>
* fix(default-flatpaks): Allow usage of Fedora flatpak remote
* docs(default-flatpaks): Some further clarifications for retaining Fedora flatpak remote
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.
* 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
* 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>
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.
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.