Commit Graph

6676 Commits

Author SHA1 Message Date
Phaedrus Leeds
b2e577afdb Merge pull request #4555 from gostsdmitry/patch-1
Update hi.po
2021-11-09 10:27:34 -08:00
Dmitry
dbd1ad634a Update hi.po
Corrections.
2021-11-10 01:18:32 +07:00
Phaedrus Leeds
f7e2aa12cb Merge pull request #4553 from gostsdmitry/patch-1
Update hi.po
2021-11-09 08:06:36 -08:00
Dmitry
7f29f17aa5 Update hi.po
Minor fixes
2021-11-09 22:31:22 +07:00
Phaedrus Leeds
9074761391 Merge pull request #4548 from flatpak/hi-translation
Add Hindi translation
2021-11-08 18:49:30 -08:00
gostsdmitry
3a836e6568 Add Hindi translation 2021-11-08 17:54:14 -08:00
Phaedrus Leeds
85ce22cba3 Merge pull request #4546 from flatpak/issue-template-mention-flathub-repos
Add checkbox to issue template
2021-11-08 16:46:29 -08:00
Phaedrus Leeds
e9933b0022 Add checkbox to issue template 2021-11-08 11:41:59 -08:00
Phaedrus Leeds
998a300b29 dir: Fix a return of FALSE rather than NULL 2021-11-05 14:58:55 -07:00
Philip Withnall
cd2f796ba9 Merge pull request #4487 from flatpak/dont-mask-noenumerate-main-refs
dir: Don't mask the main ref of a noenumerate remote
2021-11-02 11:14:37 +00:00
Phaedrus Leeds
4da815f3b9 Merge pull request #4531 from smcv/session-helper-header
session-helper: Move FlatpakHostCommandFlags to header file
2021-11-01 13:01:49 -07:00
Simon McVittie
8c84823d56 session-helper: Add FLATPAK_HOST_COMMAND_FLAGS_NONE
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-11-01 15:15:40 +00:00
Simon McVittie
ccaa3ceacc session-helper: Move FlatpakHostCommandFlags to header file
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-11-01 15:14:44 +00:00
Phaedrus Leeds
684e68be09 Merge pull request #4517 from haaninjo/l10n-sv
Update Swedish translation
2021-10-28 10:36:11 -07:00
Phaedrus Leeds
89876b1a8d test-update-portal: Fix warn_unused_result warning 2021-10-27 10:58:38 +01:00
Phaedrus Leeds
f4d94d81a8 Merge pull request #4518 from pwithnall/http-wakeup
flatpak-utils-http: Ensure to wake up the main context on error
2021-10-26 17:37:17 -07:00
Philip Withnall
8ff02c0e5b flatpak-utils-http: Ensure to wake up the main context on error
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>
2021-10-26 23:24:52 +01:00
Anders Jonsson
a9921eae9e Update Swedish translation 2021-10-26 21:24:36 +02:00
Phaedrus Leeds
d870def5aa Merge pull request #4505 from smcv/seccomp-test-coverage
Add test coverage for our seccomp filter
2021-10-26 12:19:55 -07:00
Simon McVittie
7c5aec474c tests: Add basic test coverage for our seccomp filters
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>
2021-10-25 23:33:46 +01:00
Simon McVittie
4ce251882c tests: Add try-syscall helper
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>
2021-10-25 23:32:00 +01:00
Phaedrus Leeds
2181f4f171 .gitignore: Update for recent changes 2021-10-25 23:30:05 +01:00
Phaedrus Leeds
71a09d47d5 doc/flatpakrepo: Fix a typo 2021-10-25 14:10:43 -07:00
Phaedrus Leeds
01c2b79ad0 Merge pull request #4501 from gasinvein/build-init-sdk-ext-arch
build-init: Use SDK arch for SDK extensions...
2021-10-25 10:39:19 -07:00
Phaedrus Leeds
2ae3631fc2 Merge pull request #4504 from smcv/regen-test-matrix
tests: Generate Makefile-test-matrix.am.inc in $(srcdir)
2021-10-22 18:37:05 -07:00
Phaedrus Leeds
93d3cb4704 Pedantic typo fix 2021-10-21 17:30:01 -07:00
Phaedrus Leeds
df3d85e753 testlibrary: Add test for remote nodeps option
Always good to expand the test coverage
2021-10-21 11:32:05 -07:00
Phaedrus Leeds
6de22f0e62 Include extensions in listing origin remote refs
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.
2021-10-21 11:32:05 -07:00
Phaedrus Leeds
7f3556d92c Fix implementation of xa.noenumerate remote option
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.
2021-10-21 11:32:05 -07:00
Phaedrus Leeds
ef05925700 dir: Don't mask the main ref of a noenumerate remote
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.
2021-10-21 11:32:05 -07:00
Phaedrus Leeds
f6da902b38 common: Improve a few REF_NOT_FOUND error messages
This would have been helpful in my work on #4453
2021-10-21 18:16:13 +01:00
Phaedrus Leeds
dd48e78652 testlibrary: Make remote existence assertions more friendly
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.
2021-10-21 18:14:21 +01:00
Phaedrus Leeds
f753dd214c testlibrary: Add missing cleanup
It's easier to reason about the tests if they don't leave state behind.
2021-10-21 18:14:21 +01:00
Phaedrus Leeds
8f85f77ff9 testlibrary: Tweak some helper functions
This will make the next commit simpler, and in my opinion this makes the
code more readable.
2021-10-21 18:14:21 +01:00
Phaedrus Leeds
0258fc82bb testlibrary: Don't use g_assert()
Per the documentation, g_assert_null() is meant for unit tests.
2021-10-21 18:14:21 +01:00
Simon McVittie
647c51380c tests: Generate Makefile-test-matrix.am.inc in $(srcdir)
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>
2021-10-21 17:44:44 +01:00
gasinvein
30964d2bac build-init: Use SDK arch for SDK extensions...
...instead of the app we're building arch.
2021-10-21 13:03:45 +03:00
Phaedrus Leeds
14b375e09a Merge pull request #4496 from jtojnar/test-exports-binary-path
tests: Allow FLATPAK_BINARY=flatpak for exports
2021-10-19 17:13:00 -07:00
Phaedrus Leeds
cd023ed091 README: update documentation of subdirectories 2021-10-19 16:31:49 -07:00
Phaedrus Leeds
179b45928c CI: Add 1.12 branch 2021-10-19 10:57:06 -07:00
Phaedrus Leeds
5f868aa312 Merge pull request #4494 from piotrdrag/piotrdrag/pl-update-211017-master
Update Polish translation 211017 for the main branch
2021-10-18 18:31:46 -07:00
Jan Tojnar
96dbe28cfa tests: Allow FLATPAK_BINARY=flatpak for exports
a99b748931 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.
2021-10-17 20:49:22 +02:00
Piotr Drąg
968cfbe29f Update Polish translation 2021-10-17 13:06:21 +02:00
Phaedrus Leeds
b098191252 Fix capitalization of "false" in flatpakref keyfiles
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.
2021-10-15 00:38:15 +01:00
Phaedrus Leeds
f94721bef2 doc: Clarify default setting of noenumerate/nodeps options 2021-10-14 01:31:13 +01:00
Phaedrus Leeds
4f6c13e751 Merge pull request #4327 from ericcurtin/warn_unused_result
Fix some warn_unused_result warnings
2021-10-12 14:31:43 -07:00
Eric Curtin
c6845ad70b Fix some warn_unused_result warnings
While building on gcc 9.3.0
2021-10-12 13:50:14 -07:00
Phaedrus Leeds
0a8d217750 Merge pull request #4480 from TheEvilSkeleton/github-forms
Switch to GitHub forms
2021-10-12 11:55:17 -07:00
Simon McVittie
80a0a2ebe4 Merge NEWS from tag '1.12.2'
flatpak 1.12.2

Git-EVTag-v0-SHA512: 5e6e119c2d8f39bdbc55735a5819235de430712a049793b1a64a94bcd2a8a7a7ade5dedaf5098c51b25366cf0d3b3029302cc8f8b42821f76b6db493142ac7ea
2021-10-12 18:10:57 +01:00
Simon McVittie
96aafda476 Regenerate .po files for release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.12.2
2021-10-12 11:16:30 +01:00