Commit Graph

2262 Commits

Author SHA1 Message Date
Bartłomiej Piotrowski
751cae4639 builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
2017-01-20 15:28:27 +01:00
Matt Watson
ee83b5a70d install: handle arch when installing from a flatpakref
Before this commit
$ flatpak install --arch someArch --from some.flatpakref
Would completely ignore the arch argument and only install for the
default flatpak architecture. Since flatpakref files don't include
an arch field, there's no reason we can't attempt to install the
arch specified on the command line.
2017-01-20 15:28:11 +01:00
Simon McVittie
1d6834db4d flatpak-system-helper: remove dangling reference to EXTERNAL_INSTALL_DIR
If EXTERNAL_INSTALL_DIR wasn't defined (which is likely, since nothing
in the build system does), then we would tell the system helper
to search /exports/share, which is not Flatpak's territory
(but is a semi-commonly-used path for site-specific NFS shares,
which might have contents that are inappropriate to search here).

Installations that do define an external installation directory
(Endless OS?) can easily override the Environment to include it
by placing a drop-in in
/etc/systemd/user/flatpak-system-helper.service.d/external.conf
or similar.
2017-01-20 15:05:28 +01:00
Juan Pablo Ugarte
cc0c6354a2 --device=dri added support for Mali drivers 2017-01-20 15:03:56 +01:00
Alexander Larsson
c329e60d73 Create the homedir last to avoid symlink issues
If the homedir is on a symlink (say /home -> /var/home) but the homedir
is in /home, then we shouldn't create a directory in /home because
then the symlink creation will fail. Instead we move the homedir
creation to the end, where we will create it in the symlink if needed.

This should fix https://github.com/flatpak/flatpak/issues/493
2017-01-19 15:36:06 +01:00
Alexander Larsson
58a5e146d3 Run: Handle dependencies when exposing symlinks
If you are exposing a symlink, say /link (-> /target) and
also a child of it, say /link/child, then we run into dependency
issues. For instance, the /link symlink is created, pointing to /target,
but then we try to to create /link/child before the /target
bind mount is setup, which will fail.

We work around this by adding a level, and the dependency of a symlink
(/target in the above case) will always be handled first. This isn't
a perfect solution, but is likely to be good enough in practice.
2017-01-19 15:36:06 +01:00
Alexander Larsson
b2c7137e73 run: Create symlinks as relative paths to make them work during bwrap setup
During setup the new root is in /newroot, so absolute symlinks don't work.
We make them realtive so that we can resolve the symlinks during setup.
2017-01-19 15:36:06 +01:00
Alexander Larsson
27031df5bf flatpak_resolve_symlink: Properly make paths absolute
We need to use g_build_filename, g_build_path takes a separator
as the first arg, not a path!
2017-01-19 15:36:06 +01:00
Roman Kharin
a111e8b8ed ru translations file 2017-01-19 11:49:34 +01:00
Alexander Larsson
592bea2b2e Don't break if exporting paths or symlinks to files in the runtime
For instance like in https://github.com/flatpak/flatpak/issues/494
if there is a /linuxrc -> /bin/busybox symlink, and /bin/busybox
is not in the runtime then we will fail creating it as a mountpoint
for the bind mount.

Fixes https://github.com/flatpak/flatpak/issues/494
2017-01-19 10:43:17 +01:00
Ikey Doherty
605c7ee87b Fix compiler warnings with uninitialised cleanup pointers
This change fixes GCC compiler warnings where a cleanup function was
specified on an uninitialised pointer, which in the view of GCC could
result in an errornous free of uninitialised memory, if the functions
that initialise them do not return NULL.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Ikey Doherty
3b64fbc4f5 profile: Support alternative profile.d locations
Typically Linux distributions employ /etc/profile.d for system wide
environment manipulation prior to multi-user initialisation. Modern
distribution efforts split the vendor configuration from the local
sysadmin configuration and data, by not using the /etc/ directories,
for example.

To enable this stateless pattern, this change adds a new --with-profile-dir
option to use an alternative location, such as within /usr/share/. This
ensures that the data (not configuration) is owned through the update
process, and does not conflict with changes made locally to the system,
enforcing domains of ownership.

To preserve backwards compatible behaviour, the default directory remains
set to /etc/profile.d.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Ikey Doherty
ca107ebb16 system-helper: Allow configuration of dbus configuration directory
Newer versions of dbus support stateless directories, and many distributions
now use /usr/share/dbus-1/system.d for the vendor configuration files, as
opposed to the legacy /etc/dbus-1/system.d directory.

To enable this, we add a new --with-dbus-config-dir option to control the
configuration directory, whilst retaining backwards compatibility for those
still using older versions of dbus.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Alexander Larsson
afda4e6900 Update to version 0.9.1 for unstable branch 2017-01-18 17:06:42 +01:00
Alexander Larsson
87e56ed0ef Update po-files 0.8.1 2017-01-18 16:53:17 +01:00
Alexander Larsson
4344b3d085 Update NEWS for release 2017-01-18 16:44:38 +01:00
Alexander Larsson
84f0b90af7 Bump version to 0.8.1 2017-01-18 16:34:26 +01:00
Alexander Larsson
f497abee73 Update bubblewrap to final 0.1.7 release 2017-01-18 16:26:01 +01:00
Alexander Larsson
a2810186b8 appstream update: Allow component ids not ending in .desktop
This is needed for runtimes
2017-01-18 13:22:56 +01:00
Alexander Larsson
9791268c6b document portal: Support access() on directories 2017-01-18 11:32:44 +01:00
Alexander Larsson
4be202442d document portal: Add some debug spew 2017-01-18 11:32:44 +01:00
Alexander Larsson
8909b5437d document-portal: Treat newly created files (EXCL) as truncated ones
The EXCL pretty much guarantees it is a new file.
2017-01-18 11:32:44 +01:00
Alexander Larsson
13b0c78fe5 document portal: Report right error for setattr 2017-01-18 11:32:44 +01:00
Simon McVittie
dd96ac54f1 tests: Install testpython.py executable
The test that uses this file executes it. Install it as an extra
script rather than data to ensure that it can work.
2017-01-18 08:41:03 +01:00
Simon McVittie
63daf2bb95 testlibrary: ensure that contents_array is NULL-terminated
Otherwise g_strjoinv() wanders off the end into uninitialized memory.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-01-18 08:41:03 +01:00
Alexander Larsson
902fb71399 Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty.
2017-01-17 16:36:56 +01:00
Alexander Larsson
455b681cd7 Update to latest bubblewrap version 2017-01-17 16:30:06 +01:00
Matthias Clasen
16bdb672a9 Document RuntimeRepo key
Not being documented makes it hard to know that this actually
takes the url of a flatpakrepo file, as opposed to the other url
key in this file, which takes the url to a remote.
2017-01-16 13:38:15 +01:00
Matthias Clasen
165129070a Document the DefaultBranch key
This can be set in .flatpakrepo files for a while.
It just wasn't documented.
2017-01-16 13:38:15 +01:00
Piotr Drąg
920def9f76 Update POTFILES.in 2017-01-16 13:36:36 +01:00
Alexander Larsson
8152331bd0 Make sure /var/tmp is not on tmpfs
Apps may rely on /var/tmp not being in ram, for instance when
downloading large files. See for instance:

  http://0pointer.net/blog/projects/tmp.html

We make /var/tmp point to ~/.var/app/cache/tmp so that each app get
its own instane, and so that its cleared whe removing xdg-cache-dir
for the app.
2017-01-16 13:04:55 +01:00
Alexander Larsson
c4f0f3245d Fix update of standalone bundle
We regressed on being able to install a bundle twice to update it.

This fixes https://github.com/flatpak/flatpak/issues/462
2017-01-16 11:51:14 +01:00
Alexander Larsson
5c2999fe20 Initilize MAINTAINERCLEANFILES so sub-makefiles can append to it 2017-01-16 11:37:44 +01:00
Cosimo Cecchi
78c3391b78 system-helper: make sure to run with XDG_DATA_DIRS set
Otherwise we can see in the log that update-mime-database will complain
about it not being set when installing an application using the system
helper.
2017-01-16 11:36:48 +01:00
Alexander Larsson
0fd0978987 Fix test crash introduced with error message 2017-01-16 11:20:47 +01:00
Alexander Larsson
da0970e290 Remove accidentally added generated files (from pt_BR.po) 2017-01-12 14:58:21 +01:00
Michal Rostecki
2860c0c4ad configure: Look for the libdwarf headers also in /usr/include/libdwarf
Before this change, configure script looked for them only in
$includedir, which doesn't work well with jhbuild.

Fixes #471
2017-01-12 11:52:05 +01:00
Alexander Larsson
4e1bf67bff Print a warning if the remote metadata cache is not found 2017-01-12 10:45:44 +01:00
Fábio Nogueira
1dc4701404 pt_BR translations file 2017-01-12 10:05:49 +01:00
Fábio Nogueira
1c3b173309 19% 2017-01-12 10:05:49 +01:00
Fábio Nogueira
0f7f9bae04 pt_BR translations file 2017-01-12 10:05:49 +01:00
Alexander Larsson
b12feb5968 Update bubblewrap to 0.1.6 2017-01-12 00:34:27 +01:00
Joaquim Rocha
5dd952e68e Fix downloading extra data when run from a different thread
The main loop that is initiated while the extra data is being downloaded
needs a different context to be the thread-default one, otherwise the
operations just hang when running from a different thread.
2017-01-12 00:23:39 +01:00
Alexander Larsson
d09f5ea072 tests: Add oci-over-http tests. 2017-01-12 00:08:00 +01:00
Alexander Larsson
0fb2f362a8 tests: Move the test repo to a subdirectory (repos/test)
This makes the ostree trivial-httpd --autoexit feature work better,
because it seems to exit whenever the root directory changes (i.e. not
only when its deleted).

This means the root dir can't be the repo (because then we can't
update the repo), or the base testdir (because we create files there
too), so instead we make the repo $testdir/repos/test and
$testdir/repos as the httpd root.
2017-01-12 00:04:36 +01:00
Alexander Larsson
4c686332a3 OCI: Create all-readable layer blobs
Otherwise we can't export these via http
2017-01-11 22:37:26 +01:00
matthiasclasen
e1bf947be2 Merge pull request #470 from kinvolk/nhlfr/man5-gitignore
Add all man5 files to .gitignore
2017-01-04 11:58:38 -05:00
Michal Rostecki
b9401590f6 Add all man5 files to .gitignore
flatpak-flatpakref.5 and flatpak-flatpakrepo.5 were not included
in .gitignore.
2017-01-04 15:34:54 +01:00
Patrick Griffis
a410e86fff builder: Error when failing to include modules
Currently it can silently fail if an included file is invalid
or missing. This makes that fatal.
2016-12-22 14:39:41 +01:00
Simon McVittie
6d930d8fd0 flatpak-builder(1): fix typo
Found by Debian's Lintian tool.
2016-12-22 09:28:25 +01:00