summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: Add mechanism for skipping [ci skip]add-skip-ci-mechanismPhaedrus Leeds2021-11-081-12/+21
| | | | | | Now we can add [skip ci] to a commit message to skip CI when it's not needed, to avoid wasting resources. Thanks https://github.com/veggiemonk/skip-commit/issues/5
* dir: Fix a return of FALSE rather than NULLPhaedrus Leeds2021-11-051-1/+1
|
* Merge pull request #4487 from flatpak/dont-mask-noenumerate-main-refsPhilip Withnall2021-11-022-18/+312
|\ | | | | dir: Don't mask the main ref of a noenumerate remote
| * testlibrary: Add test for remote nodeps optiondont-mask-noenumerate-main-refsPhaedrus Leeds2021-10-211-0/+110
| | | | | | | | Always good to expand the test coverage
| * Include extensions in listing origin remote refsPhaedrus Leeds2021-10-212-20/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a recent commit I changed flatpak_dir_list_remote_refs() to make main refs (xa.main-ref) visible for noenumerate remotes (xa.noenumerate), meaning that an origin remote created for a flatpakref file can be used to get information about the ref from the file even before it is installed. This commit extends that work to include extensions of the main ref, and updates the unit test to check for this. The reasoning is that if GNOME Software wants to show the user information about, say, VLC from a flatpakref file before installing it, Software would want to also show the available plugins so the user can decide if they want to install those as well. I haven't checked if Software actually does that; I'm only focusing on making libflatpak do the right thing.
| * Fix implementation of xa.noenumerate remote optionPhaedrus Leeds2021-10-212-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the xa.noenumerate option on a remote is documented as causing the remote not to be used when presenting available apps/runtimes or when searching for dependencies. The idea is that the remote is only used for providing updates for things installed from it, and this functionality is used when creating an origin remote for something installed via a flatpakref file. However, the implementation of this in flatpak_dir_list_remote_refs() is buggy. It returns an empty set of refs even if something is both locally installed and available from the remote. This is because it is using hash table comparisons of FlatpkDecomposed objects (via flatpak_decomposed_hash()) which take into account both the ref (or refspec) and the collection ID, and the local refs' FlatpakDecomposed objects are created from a refspec whereas the remote refs' FlatpakDecomposed objects are created from a ref alone. We could fix this by having them both use refspecs, but it is better to use a collection-ref tuple for the following reasons: (1) Changing flatpak_dir_list_all_remote_refs() to use a refspec to create the FlatpakDecomposed objects would be a breaking change for the other users of that function. (2) Both the local and remote refs are from the same remote so we don't need to use the remote name to disambiguate them, even if no collection ID is configured. (3) The whole point of collection IDs is to make refs uniquely identifiable, so we're using them for the intended purpose. In addition to fixing this bug, this commit adds a unit test in testlibrary.c so it stays fixed.
| * dir: Don't mask the main ref of a noenumerate remotePhaedrus Leeds2021-10-212-1/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we create origin remotes for apps installed via .flatpakref files, we set xa.noenumerate=true and xa.main-ref=app/com.example.App/arch/branch so that the remote is only used for the app it was intended for. This is implemented in flatpak_dir_list_remote_refs() by only listing refs in the remote which are already installed. This works fine after the ref is installed but in the short timespan between when the origin remote is created and the app is installed from it, it means that the remote appears as empty. The use case where I ran into this is in attempting to use flatpak_installation_fetch_remote_ref_sync() in the gnome-software flatpak plugin, in the handling of flatpakref files, which is intended to just display information to the user and let them decide whether to install the app. But I was not able to create a FlatpakRemoteRef due to the behavior described above; see #4453 for more details. So, change the behavior so that the main ref for an origin remote is visible even before it is installed. This technically could be a breaking change for some consumer of libflatpak but that seems very unlikely, and the new behavior makes more sense. Also add a unit test for this behavior.
* | Merge pull request #4531 from smcv/session-helper-headerPhaedrus Leeds2021-11-012-5/+6
|\ \ | | | | | | session-helper: Move FlatpakHostCommandFlags to header file
| * | session-helper: Add FLATPAK_HOST_COMMAND_FLAGS_NONESimon McVittie2021-11-011-0/+1
| | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | session-helper: Move FlatpakHostCommandFlags to header fileSimon McVittie2021-11-012-5/+5
|/ / | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Merge pull request #4517 from haaninjo/l10n-svPhaedrus Leeds2021-10-281-1216/+903
|\ \ | | | | | | Update Swedish translation
| * | Update Swedish translationAnders Jonsson2021-10-261-1216/+903
| | |
* | | test-update-portal: Fix warn_unused_result warningPhaedrus Leeds2021-10-271-1/+3
| | |
* | | Merge pull request #4518 from pwithnall/http-wakeupPhaedrus Leeds2021-10-261-1/+4
|\ \ \ | |/ / |/| | flatpak-utils-http: Ensure to wake up the main context on error
| * | flatpak-utils-http: Ensure to wake up the main context on errorPhilip Withnall2021-10-261-1/+4
|/ / | | | | | | | | | | | | | | | | | | All the other code paths which set `data->done` or `data->error` ensure to wake up the main context so its loop exit conditions can be checked again — this code path was missing a wakeup though. Spotted by code inspection; I haven’t hit this in the wild. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | Merge pull request #4505 from smcv/seccomp-test-coveragePhaedrus Leeds2021-10-265-0/+275
|\ \ | | | | | | Add test coverage for our seccomp filter
| * | tests: Add basic test coverage for our seccomp filtersSimon McVittie2021-10-253-0/+96
| | | | | | | | | | | | | | | | | | | | | In particular, this checks that CVE-2017-5226, CVE-2019-10063 and CVE-2021-41133 are still prevented. Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | tests: Add try-syscall helperSimon McVittie2021-10-253-0/+179
|/ / | | | | | | | | | | | | | | | | This exercises various syscalls. It's heavily based on the one from <https://github.com/containers/bubblewrap/pull/459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | .gitignore: Update for recent changesPhaedrus Leeds2021-10-251-0/+16
| |
* | doc/flatpakrepo: Fix a typoPhaedrus Leeds2021-10-251-1/+1
| |
* | Merge pull request #4501 from gasinvein/build-init-sdk-ext-archPhaedrus Leeds2021-10-251-4/+7
|\ \ | | | | | | build-init: Use SDK arch for SDK extensions...
| * | build-init: Use SDK arch for SDK extensions...gasinvein2021-10-211-4/+7
| | | | | | | | | | | | ...instead of the app we're building arch.
* | | Merge pull request #4504 from smcv/regen-test-matrixPhaedrus Leeds2021-10-221-1/+1
|\ \ \ | | | | | | | | tests: Generate Makefile-test-matrix.am.inc in $(srcdir)
| * | | tests: Generate Makefile-test-matrix.am.inc in $(srcdir)Simon McVittie2021-10-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | Files that are generated manually by a maintainer and committed to git should be in the srcdir, not the builddir. Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | Pedantic typo fixPhaedrus Leeds2021-10-211-1/+1
| |/ |/|
* | common: Improve a few REF_NOT_FOUND error messagesPhaedrus Leeds2021-10-212-4/+6
| | | | | | | | This would have been helpful in my work on #4453
* | testlibrary: Make remote existence assertions more friendlyPhaedrus Leeds2021-10-211-13/+15
| | | | | | | | | | | | | | Currently the output produced when assert_remote_in_installation() or assert_remote_not_in_installation() fails is not helpful: it doesn't mention the remote name or where the assertion was called from. Fix those problems by rewriting it as a #define.
* | testlibrary: Add missing cleanupPhaedrus Leeds2021-10-211-24/+34
| | | | | | | | It's easier to reason about the tests if they don't leave state behind.
* | testlibrary: Tweak some helper functionsPhaedrus Leeds2021-10-211-24/+21
| | | | | | | | | | This will make the next commit simpler, and in my opinion this makes the code more readable.
* | testlibrary: Don't use g_assert()Phaedrus Leeds2021-10-211-1/+1
|/ | | | Per the documentation, g_assert_null() is meant for unit tests.
* Merge pull request #4496 from jtojnar/test-exports-binary-pathPhaedrus Leeds2021-10-192-2/+2
|\ | | | | tests: Allow FLATPAK_BINARY=flatpak for exports
| * tests: Allow FLATPAK_BINARY=flatpak for exportsJan Tojnar2021-10-172-2/+2
| | | | | | | | | | | | | | | | | | https://github.com/flatpak/flatpak/commit/a99b748931e6444dadb0d0c8c1565da23f755800 introduced an environment variable for changing the flatpak path for exports. On NixOS, we do not have a stable path we could use so we used to patch Flatpak to use `flatpak` program from `PATH`. With the recent change, we drop our downstream patch in favour of setting the environment variable to `flatpak` but the tests do not expect that. This is the test part of our former downstream patch so that tests can pass with exports using `flatpak` instead of an absolute path. It still expects the binary path to end with `flatpak` so arbitrary `$FLATPAK_BINARY` will not work but we do not pass the environment variable to tests so we cannot do much better.
* | README: update documentation of subdirectoriesPhaedrus Leeds2021-10-191-11/+15
| |
* | CI: Add 1.12 branchPhaedrus Leeds2021-10-191-0/+2
| |
* | Merge pull request #4494 from piotrdrag/piotrdrag/pl-update-211017-masterPhaedrus Leeds2021-10-181-58/+61
|\ \ | |/ |/| Update Polish translation 211017 for the main branch
| * Update Polish translationPiotr Drąg2021-10-171-58/+61
|/
* Fix capitalization of "false" in flatpakref keyfilesPhaedrus Leeds2021-10-152-5/+5
| | | | | | | | | | g_key_file_get_boolean() only accepts lower case "true" and "false", so correct some instances of "False" in key files. This makes no functional difference as long as the error pointer isn't checked since g_key_file_get_boolean() also returns false when it can't parse the value as a boolean. But it still seems good to be correct, and someone could interpret the existence of "IsRuntime=False" as implying that "IsRuntime=True" will work, which it doesn't.
* doc: Clarify default setting of noenumerate/nodeps optionsPhaedrus Leeds2021-10-141-3/+3
|
* Merge pull request #4327 from ericcurtin/warn_unused_resultPhaedrus Leeds2021-10-122-3/+19
|\ | | | | Fix some warn_unused_result warnings
| * Fix some warn_unused_result warningsEric Curtin2021-10-122-3/+19
| | | | | | | | While building on gcc 9.3.0
* | Merge pull request #4480 from TheEvilSkeleton/github-formsPhaedrus Leeds2021-10-123-4/+112
|\ \ | | | | | | Switch to GitHub forms
| * | Switch to GitHub formsTheEvilSkeleton2021-10-113-4/+112
| | | | | | | | | | | | | | | This MR switches to GitHub forms to improve user experience when opening an issue. It includes a bug template and a feature request template.
* | | Merge NEWS from tag '1.12.2'Simon McVittie2021-10-121-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | flatpak 1.12.2 Git-EVTag-v0-SHA512: 5e6e119c2d8f39bdbc55735a5819235de430712a049793b1a64a94bcd2a8a7a7ade5dedaf5098c51b25366cf0d3b3029302cc8f8b42821f76b6db493142ac7ea
| * | | Regenerate .po files for release1.12.2Simon McVittie2021-10-1219-1021/+1067
| | | | | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | | Set version number to 1.12.2Simon McVittie2021-10-122-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | po: Update Ukrainian translationYuri Chornoivan2021-10-111-60/+65
| | | |
* | | | Merge NEWS from branch 'flatpak-1.12.x'Simon McVittie2021-10-111-2/+22
|\ \ \ \ | |/ / /
| * | | NEWS: Add changes so far for 1.12.2Simon McVittie2021-10-111-0/+9
| | | | | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | | NEWS: Clarify the user-facing feature enabled by improved subsandboxingSimon McVittie2021-10-111-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
| * | | NEWS: Mention CVE-2021-41133Simon McVittie2021-10-111-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>