Commit Graph

6567 Commits

Author SHA1 Message Date
Simon McVittie
33bb8a85ec build: Move Makefile-*.am.inc up one level
This takes them out of the directory that is "owned" by the subproject,
which will not be ignoring our Flatpak-specific generated files in
its .gitignore, and puts them in a directory that is "owned" by Flatpak,
which can ignore them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-26 11:50:05 +01:00
Simon McVittie
b246dc00e5 Fix spelling
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-25 16:58:10 +01:00
Simon McVittie
dd6b99d0d3 .gitignore: Ignore more generated files
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.11.3
2021-08-25 12:07:08 +01:00
Simon McVittie
1c44361956 Update translation files for v1.11.3 release
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-25 12:04:29 +01:00
Simon McVittie
009288eedd Prepare release 1.11.3
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-25 10:50:58 +01:00
Phaedrus Leeds
f268f4a870 install: Avoid a superfluous prompt to choose the only remote
The install command can search available remotes for a specified flatpak
when a remote wasn't specified. In case only one remote is configured,
or in case only one of the configured remotes matches the ref specified,
we currently prompt the user to confirm use of the remote anyway (unless
-y/--assumeyes was used). Skip this prompt even when -y/--assumeyes was
not used, since the remote to use will still effectively be confirmed
when the list of refs to be installed is presented for confirmation.

Fixes https://github.com/flatpak/flatpak/issues/4364
2021-08-24 13:57:04 +01:00
Simon McVittie
ab8605193d Update NEWS with pending changes
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-23 19:20:05 +01:00
a1346054
1f69e5b35c remove trailing whitespace
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-08-23 12:19:03 +02:00
a1346054
d6e93b7ee0 bash: fix issues identified through shellcheck
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-08-23 12:19:03 +02:00
a1346054
844ad9ad79 fix spelling
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-08-23 12:19:03 +02:00
a1346054
59e86dd754 completion: bash completion files are not supposed to be executable
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-08-23 12:19:03 +02:00
Rodhos
cfc577db5c Update es.po 2021-08-23 08:59:14 +02:00
Simon McVittie
47707560f5 Update bubblewrap to v0.5.0
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-23 08:58:36 +02:00
Simon McVittie
6e5b02e2d4 run: Don't let XDG_RUNTIME_DIR from user override the value we set
We use `bwrap --setenv XDG_RUNTIME_DIR` to set it to `/run/user/UID`,
regardless of what it is on the host system, but the changes made
to resolve CVE-2021-21261 unintentionally broke this by overwriting it
with the user's XDG_RUNTIME_DIR.

In practice this worked for most people, who either have
XDG_RUNTIME_DIR set to the same value we use (which is the conventional
setup from systemd-logind and elogind), or entirely unset (if they do not
have systemd-logind or elogind). However, it broke Wayland and other
XDG_RUNTIME_DIR-based protocols for people who intentionally set up an
XDG_RUNTIME_DIR that is different.

Fixes: 6d1773d2 "run: Convert all environment variables into bwrap arguments"
Resolves: https://github.com/flatpak/flatpak/issues/4372
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-20 15:28:58 +02:00
Simon McVittie
c392e5adf6 tests: Exercise attempting to export a nonexistent directory
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
0f755d9fa8 tests: Exercise refusal to export a self-recursive symlink
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
1297127eeb tests: Exercise exporting a directory whose parent is a symlink
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
a5047e7f8e tests: Test the special case for --filesystem=/tmp if /tmp is a symlink
If /tmp is a symlink, we mount the target directory on /tmp instead of
replicating the symlink, so that it will not interfere with "--dir /tmp".

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
2a61cfee5b tests: Exercise failure to export a non-absolute path
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
7fbb165c81 tests: Exercise failure to export a broken autofs
To achieve this, add a flag to FlatpakExports to make it fake a broken
autofs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
f59d28b4cf tests: Add a skeleton for testing unusual/corner-case situations
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
a232276191 exports: Make all filesystem accesses relative to the mock root fd
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
9f6ec548ab utils: Document that flatpak_canonicalize_filename() does not do I/O
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
bca0e65267 exports: Close mock host fd when destroyed
Previously this was leaked.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
Simon McVittie
4c8264fc0e tests: Add test coverage for a mock Fedora-like system
In particular this tests commit 3aaea7d2 "Expose /var/usrlocal if
"--filesystem=host" is specified" and checks that /var/usrlocal is
counted as part of --filesystem=host-usr.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-02 08:37:25 +02:00
gasinvein
0aa5ce45dd Update Russian translation 2021-08-02 08:18:53 +02:00
Phaedrus Leeds
a52c3e4fba .github: Add Sponsor button 2021-08-02 08:16:47 +02:00
Bruno Lopes
9819171709 Update Brazilian Portuguese translation 2021-08-02 08:16:20 +02:00
Yuri Chornoivan
9da4bc0c65 Update Ukrainian translation 2021-07-05 15:14:45 +02:00
Simon McVittie
6ebe33117c Update translation files for v1.11.2
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.11.2
2021-06-17 18:04:32 +01:00
Simon McVittie
b942b2c59c Prepare release 1.11.2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-17 17:27:01 +01:00
Simon McVittie
0f4296b5b5 build: Don't include gdbus-codegen-generated files in tarball
To be excluded from tarball releases, generated files need to be in
nodist_ lists of sources every time they appear.

Fixes: 412c1577 "portal: Add some test coverage"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-17 09:39:21 +01:00
Philip Withnall
879b632c58 flatpak-transaction: Fix finding runtime with non-default remote+arch
Fix an “The application foo requires the runtime bla which was not
found” error when using libflatpak (not the CLI) to install an
application whose runtime is provided by a different repo, and which is
for a non-default architecture.

This is a follow-up to commit f2ff664ff.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-06-16 17:59:45 +02:00
Philip Withnall
a7af60f498 flatpak-transaction: Squash error propagation and fix return value
It doesn’t look like this error path is taken very often. Spotted while
reading through the code.

This function is opportunistically looking for dependencies, so a
failure in one remote shouldn’t make the whole operation fail.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-06-16 17:59:45 +02:00
Simon McVittie
f2b4edc558 Improve release checklist
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-15 14:09:21 +01:00
Simon McVittie
74be057864 portal: Fix a typo in D-Bus API documentation
The client-side proposed for flatpak-spawn uses --app-path, but the
actual implementation on D-Bus uses file descriptor passing and an
option named app-fd, so the documentation of the D-Bus interface should
be written in terms of app-fd.

Fixes: 3ebf371f "run: Allow caller to replace /app and/or /usr"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-15 14:51:54 +02:00
Dennis Schridde
1bdbb80ac5 Reword to make it clearer how (not) to invoke flatpak 2021-06-15 10:06:50 +01:00
Dennis Schridde
11d66b4587 Fix grammar 2021-06-15 10:06:50 +01:00
Dennis Schridde
1fa898202a Improve error message for sudo flatpak run
Closes: https://github.com/flatpak/flatpak/issues/3963
2021-06-15 10:06:50 +01:00
Philip Withnall
c8cbf26316 flatpak-installation: Fix some typos in documentation comments
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-06-14 15:30:59 +01:00
Alexander Larsson
b6d5e20857 CI: Add mono apt repo to fix build
For whatever reason parts of mono is installed, but the repo is not
configured so there is a version conflict on update:

libglib2.0-cil is already the newest version (2.12.45-0xamarin19+ubuntu1604b1).
libglib2.0-cil set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libglib2.0-cil-dev : Depends: libglib2.0-cil (= 2.12.10-6) but 2.12.45-0xamarin19+ubuntu1604b1 is to be installed
E: Unable to correct problems, you have held broken packages.
2021-06-01 10:54:53 +02:00
Philip Withnall
ce6fdcf077 transaction: Don’t abort on uninstall if deploy metadata is missing
If the deploy metadata is missing for the locale runtime of an app which
is being uninstalled, flatpak will currently abort on an assertion
failure.

Prevent that abort, at the expense of not uninstalling the locale
runtime. A better fix could be found for this in future.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #3943
2021-06-01 09:51:59 +02:00
Kukuh Syafaat
25a577810a Update Indonesian translation 2021-06-01 09:34:39 +02:00
gasinvein
dca4b79604 Update Russian translation 2021-06-01 09:34:21 +02:00
Phaedrus Leeds
6f86a8ff42 README: Update chat room link
We've moved from Freenode to Matrix, see:
https://discourse.flathub.org/t/should-flathub-flatpak-move-to-another-communication-channel-if-so-where-and-why/1443
https://lists.freedesktop.org/archives/flatpak/2021-May/002127.html
2021-05-28 17:31:20 +01:00
Simon McVittie
412c15772f portal: Add some test coverage
This exercises Spawn() and reproduces #4286.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-05-25 11:11:03 +02:00
Simon McVittie
afd0cc4d18 portal: Add some design-for-test
During unit testing we don't have a complete Flatpak app or runtime
available, and `flatpak run` is not necessarily in FLATPAK_BINDIR yet;
but we can run the portal with this environment variable set, to
specify a mock implementation of Flatpak.

This helps to reproduce #4286.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-05-25 11:11:03 +02:00
Simon McVittie
e196efbf6b portal: Add NONE values for flags sets
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-05-25 11:11:03 +02:00
Simon McVittie
0a44aaff8d tests: Test environment block parsing
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-05-25 11:11:03 +02:00
Simon McVittie
10a4cd7e08 context: Factor out functions to parse an environment block
This makes them easier to test, and easier to use in related tests.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-05-25 11:11:03 +02:00