Commit Graph

254 Commits

Author SHA1 Message Date
Alexander Larsson
68706eca21 Bump version to 1.6.3 2020-03-30 15:50:20 +02:00
Alexander Larsson
609217650d Bump version to 1.6.2 2020-02-13 14:57:27 +01:00
Alexander Larsson
50fc19daf1 Bump version to 1.6.1 2020-01-23 13:35:25 +01:00
Alexander Larsson
6056e4c235 Bump version to 1.6.0 2019-12-20 11:22:11 +01:00
Alexander Larsson
b9a3f06c4a Bump version to 1.5.2 2019-12-13 10:24:49 +01:00
Alexander Larsson
7a47c9df87 Bump bubblewrap to 0.4.0
This updates both the internal copy and the required version
for using the system copy.

We will need this for reusing existing user and pid namespaces
2019-11-27 14:21:25 +01:00
Alexander Larsson
6df104837c Require bubblewrap 0.3.1 for --bind-try support
We want to use this to work around some stuff for flatpak enter to work.
2019-11-20 13:17:43 +01:00
Philip Withnall
ab5c0968e6 flatpak-run: Add parental controls support for filtering apps
Prevent the user from running a flatpak app if that app is filtered by
the parental controls applied to the user.

If flatpak is running as a system user (UID < 1000), ignore failure to
load the app filter. This could happen if a flatpak is run in the
gnome-initial-setup session, before the user’s account is created.

Includes contributions by André Magalhães.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://github.com/flatpak/flatpak/pull/2797
2019-10-03 10:42:04 +02:00
Alexander Larsson
da66eddd26 Post release version bump to 1.5.1 2019-10-03 10:02:17 +02:00
Alexander Larsson
0a3963b479 Only define GLIB_VERSION_MIN_REQUIRED if we detect a new glib
Otherwise the build failed on older glib version, but with this setup
we still disable all the GTimeVal deprecation warnings.

Closes: #3122
Approved by: alexlarsson
2019-09-20 13:58:46 +00:00
Alexander Larsson
8e9e134446 configure: Fix detection of archive_read_support_filter_all
This got broken with the dependency split-outs.

Closes: #3119
Approved by: alexlarsson
2019-09-19 16:53:11 +00:00
Alexander Larsson
8227224c84 Ignore glib deprecations past 2.60
We generally want to avoid using deprecated stuff as much as we
can, while still depending on an old glib version. However, the GTimeVal
deprecation in 2.62 just is impossible to work around without bumping
the requirements, so ignore newer deprecations.

Closes: #3119
Approved by: alexlarsson
2019-09-19 16:53:11 +00:00
Debarshi Ray
cde7934041 build: Link against libxml only when necessary
The libxml API is used in a relatively few places inside the 'common'
sub-directory. It's definitely not as widespread as GLib. A subsequent
commit will leverage this to prevent unused shared libraries from
being linked to the session helper.

Closes: #3052
Approved by: alexlarsson
2019-08-16 09:13:43 +00:00
Debarshi Ray
ebf5d08f47 build: Link against libarchive only when necessary
The libarchive API is used in a relatively few places inside the
'common' sub-directory. It's definitely not as widespread as GLib. A
subsequent commit will leverage this to prevent unused shared
libraries from being linked to the session helper.

Closes: #3052
Approved by: alexlarsson
2019-08-16 09:13:43 +00:00
Alexander Larsson
57a6887352 Bump version to 1.5.0, 1.4.x is on flatpak-1.4.x branch 2019-05-28 15:47:12 +02:00
Alexander Larsson
3e8c42c823 Bump version to 1.4.0 2019-05-28 14:55:02 +02:00
Alexander Larsson
ef470d54b4 Bump version to 1.3.4 2019-05-09 15:49:39 +02:00
Alexander Larsson
bb04fb4063 Bump version to 1.3.3 2019-04-26 12:22:24 +02:00
Alexander Larsson
d85b3cb0e9 Bump release to 1.3.2 (post release) 2019-04-09 14:55:40 +02:00
Alexander Larsson
bb46c1dbd6 Add selinux module to allow system-helper to work with revokefs
Historycally the system helper has been running in a generic
unconfined_service_t domain. However, this caused problems with the
new revokefs support, because passing the revokefs unix domain socket
over the system bus got it kicked of the bus, because to do this
dbus-daemon needs rw rights to the socket.

So, this module creates a custom domain flatpak_helper_t, which
allows us to add special permissions to dbus-daemon to allow
access to its sockets.

The domain is otherwise uncontained just like before. I did try
to make it contained, but that is a lot of work as the permissions
it needs are very complex.

Note to packagers on selinux systems, for flatpak to work well
you need to install this module and relabel the system-helper
binary.

In my testing on fedora I used something like this:

%post
%selinux_modules_install %{_datadir}/selinux/packages/flatpak.pp.bz2

%postun
if [ $1 -eq 0 ]; then
    %selinux_modules_uninstall %{_datadir}/selinux/packages/flatpak.pp.bz2
fi

With these new files:
%{_datadir}/selinux/packages/flatpak.pp.bz2
%{_datadir}/selinux/devel/include/contrib/flatpak.if

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Umang Jain
cad8d8a599 system-helper: Integrate --system pull with revokefs-fuse
This adds a new helper method "GetRevokefsFd" which is responsible
for spawning the backend part of the revokefs filesystem. It takes care
of creating a cache location for the backing directory in repo/tmp.
This cache location is transferred over D-Bus to the client with the
other end socket fd.

The client on receiving the socket fd creates a mountpoint directory and
spawns the revokefs-fuse filesystem. It then creates a child repo for the
pull. In any case of failure, it fallbacks on the current code path
(which causes temporary duplication of files on disk).

The backing dir itself and all files written to it by the revokefs-fuse
backend process are owned by the "flatpak" user. After the pull in the
child repo is completed, it's ownership is then canoncalized with owner=root
and permissions as per bare-user-only in Deploy().

Now we have fulfilled all the criteria to hardlink the child repo into
the system one and avoid duplication. See [1].

If there is existing cache directory available in repo/tmp, it will be
mounted using revokefs-fuse for the current pull. Hence, it is possible
to recover the previous partial pull which might have failed due to some
error.

[1] https://github.com/ostreedev/ostree/pull/1776

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
4716ce8f2e revokefs: Initial non-revoking version
This is just a copy of rofiles-fuse with the write limits removed.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00
Alexander Larsson
c9198af3f0 Bump version to 1.3.1 2019-03-27 10:40:10 +01:00
Matthew Leeds
61f44231fe Unstable version should be 1.3.0 not 1.3.1
1.3.0 hasn't been released, so that should be the next unstable version.

Closes: #2688
Approved by: matthiasclasen
2019-02-08 15:50:10 +00:00
Alexander Larsson
24398ad1c2 Change version to 1.3.1, do stable work on flatpak-1.2.x branch 2019-02-05 14:19:00 +01:00
Alexander Larsson
8928a60876 Bump version to 1.2.1 2019-02-05 11:35:49 +01:00
Alexander Larsson
7a4f36b5fb Make dconf optional on dconf 0.26
This is needed, because e.g. xenial only has dconf 0.24 which doesn't
have the API needed.

Closes: #2643
Approved by: matthiasclasen
2019-01-28 16:33:06 +00:00
Alexander Larsson
5ebcecf244 Bump version to 1.2.0 2019-01-28 11:48:50 +01:00
Matthias Clasen
730dab95f5 Add a utility to validate icons
This is copied from xdg-desktop-portal.

Closes: #2523
Approved by: alexlarsson
2019-01-17 07:27:31 +00:00
Alexander Larsson
38d6e1673a Bump version to 1.1.3 2019-01-14 18:07:17 +01:00
Matthias Clasen
f2303ee4c5 Export dconf data
We want to move away from using dconf inside the sandbox,
and instead use the keyfile backend for GSettings, which
has gained the capability to read defaults and locks.

This change makes the dconf database contents and locks
available in a suitable format. The files appear inside
the sandbox in the /etc/glib-2.0/settings directory.

We only export the default values for keys in the dconf
subtree whose path matches the app id, as well as prefixes
listed in paths key from the X-DConf group in metadata.

This commit adds a new dependency, since we're now linking
against libdconf.

Closes: #2295
Approved by: alexlarsson
2019-01-14 15:34:11 +00:00
Matthias Clasen
adb288d19a Add an environment generator
This is a script that program that gets run by systemd
before every user service to set up the environment.

See systemd.environment-generator(7) for details.

Closes: #2122
Approved by: matthiasclasen
2019-01-08 00:26:17 +00:00
Alexander Larsson
f1e1586841 Bump version to 1.1.2 2018-12-21 10:37:10 +01:00
Alexander Larsson
6b1acf9029 Bump version to 1.1.1 2018-12-10 11:18:03 +01:00
Matthias Clasen
d44eb141c1 cli: Work on the console
Install a polkit text agent that can ask for
authorization when we are on the console.

This brings us closer to best practice for polkit use.

Closes: #2379
Approved by: alexlarsson
2018-12-06 15:01:14 +00:00
Umang Jain
94969d5057 Installation: Add flatpak_installation_get_min_free_space_bytes
A convenience wrapper around ostree_repo_get_min_free_space_bytes().
Clients programs like gnome-software can get the value of minimum free
space as defined in the OSTree repo. This can be useful in various
disk-space checks these client program can implement.

At Endless, we have downstream heuristics in gnome-software which
determine the success/failure likelihood of an install/update
operation to some extend. Depending upon the likelihood of the
success/failure we dispatch install/update/auto-update operations.

With client programs gaining features such as auto-updates, it makes
sense to have a min-free-space API so that these programs can check
free-space availablity vs minimum free space defined by user inside
OSTree's repo before auto-updating. Although, OSTree will certainly
fail operations over-stepping min-free-space's value; It's just a
matter of convenience to provide a way to query the value to client
programs as well.

Closes: #2274
Approved by: matthiasclasen
2018-11-07 12:02:14 +00:00
Matthias Clasen
afc87ad1e5 Add a history command
The history command pulls the transaction log entries
out of the journal, and presents them nicely.

We use the sd-journal api for this, so we need to
link against libsystemd now, but we make the dependency
optional. If libsystemd is not available, the history
command will simply print an error.
2018-10-11 14:51:51 +02:00
Alexander Larsson
873c56d279 Bump version to 1.1.0 on master 2018-10-08 10:33:49 +02:00
Matthias Clasen
1e5e57051d Add lcov support
This adds a --enable-coverage configure option and a
coverage target to generate coverage testing for
the testsuite. The generated html ends up in the
coverage/ directory.

Closes: #2187
Approved by: alexlarsson
2018-10-05 13:34:49 +00:00
Alexander Larsson
1196ff54bf Update version to 1.0.3 2018-10-04 11:08:16 +02:00
Alexander Larsson
c53b127048 Bump version to 1.0.2 2018-09-13 10:53:55 +02:00
Alexander Larsson
1959f6bf75 Allow building with system version of xdg-dbus-proxy
Closes: #2092
Approved by: alexlarsson
2018-09-13 07:58:36 +00:00
Alexander Larsson
8d5df23e85 Update version to 1.0.1 2018-08-28 11:32:00 +02:00
Alexander Larsson
c95605962e Bump version to 1.0.0 2018-08-20 11:23:01 +02:00
Alexander Larsson
95d0e47617 Post release version bump
Closes: #1949
Approved by: alexlarsson
2018-08-08 15:41:49 +00:00
Umang Jain
13610e3ed3 common/dir: Port to min-free-space-size
Use min-free-space-size as a replacement for min-free-space-percent.

Previously, flatpak used to disable min-free-space-percent by re-writing
the config with min-free-space-percent=0. As the new version of ostree (2018.7)
now supports min-free-space-size, we should use that and migrate from -percent
option in existing repos to -size=500MB.

Config is rewritten with min-free-space-size in case of:
1) It has min-free-space-percent=0 only. (That is probably from the
   previous re-writes).
2) If there are no min-free-space-* options.

Other than that, the config remains unchanged and the co-existence(if any)
of these options is governed by ostree.

https://github.com/flatpak/flatpak/issues/1826

Closes: #1912
Approved by: alexlarsson
2018-08-08 14:29:45 +00:00
Richard Hughes
b133d286d9 Post release version bump 2018-07-10 19:25:44 +02:00
Alexander Larsson
313d566f46 Update version to 0.99.2 2018-06-27 14:21:22 +02:00
Matthew Leeds
f8577e0791 Remove outdated ostree version check
Now that flatpak depends on ostree 2018.6 we don't need to check if we
have 2018.5. Remove the check and update a comment.

Closes: #1813
Approved by: alexlarsson
2018-06-23 11:26:26 +00:00
Alexander Larsson
fc941c6212 Update version to 0.99.1 2018-06-20 11:23:56 +02:00