Commit Graph

1463 Commits

Author SHA1 Message Date
Alexander Larsson
c81e43fa09 tests/test-builder: Test recursive modules 2016-06-09 12:10:52 +02:00
Alexander Larsson
1ddd173507 lib: Fix NOT_INSTALLED error when updating 2016-06-09 12:04:45 +02:00
Alexander Larsson
b7ae30a77e Merge pull request #100 from matthiasclasen/return-value
Fix a case of NULL<>FALSE confusion
2016-06-09 11:46:16 +02:00
Alexander Larsson
375565e567 Merge pull request #101 from matthiasclasen/recursive-modules
Support recursive modules
2016-06-09 11:38:11 +02:00
Matthias Clasen
99e4f83e33 Allow inclusions in the module list
When we see a string in the modules array, parse it as a json
file and use the resulting BuilderModule object.
2016-06-09 01:01:37 -04:00
Matthias Clasen
5225e7b1d0 manifest: Prepare expand_modules to report errors
Move the expand_modules call from the modules setter to
builder_manifest_start, where we have a chance to report
errors.
2016-06-09 00:29:02 -04:00
Matthias Clasen
e25e379a2a manifest: expand module list
Linearize the tree of modules and submodules when the modules
are set on the manifest, while filtering out disabled modules
at the same time.

Skip source-less modules when building; this makes it possible
to have modules that only contain submodules.

With this approach, we use the tree structure of modules for
serializing and deserializing to and from json, while using
a linear list of modules for building.
2016-06-08 23:56:38 -04:00
Matthias Clasen
2757c63fea Add a modules property to BuilderModule
This will let us load modules recursively.
2016-06-08 23:56:38 -04:00
Matthias Clasen
9a8eef8597 manifest: Skip source-less modules when building
Building such modules won't produce anything. And future
commits will make source-less modules useful to support.
2016-06-08 23:56:38 -04:00
Matthias Clasen
914b841481 module: Be a bit more robust
When we call builder_module_cleanup_collect on a module that
has no changes, we shouldn't crash.
2016-06-08 23:55:57 -04:00
Matthias Clasen
26b083333a Fix a case of NULL<>FALSE confusion
This causes a compiler warning.
2016-06-08 20:05:26 -04:00
Alexander Larsson
70093d426f lib: Fix crash on install/update due to uninitialized dir->repo 2016-06-08 13:49:01 +02:00
Alexander Larsson
bd66da0dad builder: Add support for patching mtime in python bytecode headers
This makes them work at runtime (as the mtime will then be 0) and
makes builds more repeatable.
2016-06-08 13:28:27 +02:00
Alexander Larsson
959fec1cd3 Zero out mtime when commiting
This means we get the same behaviour as if we checked out of
the cache. Also, its the same as the final behaviour will be
when running in flatpak.
2016-06-08 13:14:09 +02:00
Alexander Larsson
4990dd5f86 builder: Manually zero mtime of cache checkout
This works around an ostree bug where this didn't happen in the
mismatched mode (regular checkout, user repo) we're using.
2016-06-08 11:11:24 +02:00
Alexander Larsson
cc08083543 common: Add flatpak_zero_mtime helper
This recursively sets the mtime to 0.
2016-06-08 11:11:01 +02:00
Alexander Larsson
1bebedea8a lib: Add install/update_full() versions that allow you to specify subpaths
Also, we add a (yet unused) flags field for installation if we
want to extend this in the future.
2016-06-08 09:26:31 +02:00
Alexander Larsson
bfe20c246e lib: Better checking for pre-existing installs
We don't just check for a deploy dir, because it may exist from
a failed install.
2016-06-08 09:25:40 +02:00
Alexander Larsson
e3e9c6559e tests: Test changing the subpaths on update 2016-06-07 22:12:51 +02:00
Alexander Larsson
cfef57e343 Properly handle subpaths on update 2016-06-07 22:12:51 +02:00
Alexander Larsson
77f1d7660c Don't abort on errors when pruning
This could happen for local partial pulls, due to a bug in ostree
where it didn't create commitpartial state files during local pulls.
2016-06-07 22:12:51 +02:00
Alexander Larsson
20a737dc90 tests: Pull things via http instead of local pulls
This causes us to use the same codepaths as in real use.
Also, there seems to be an issue with partial pulls for local remotes.
2016-06-07 22:12:51 +02:00
Alexander Larsson
3639601848 Merge pull request #73 from matthiasclasen/logo
Add the logo to README.md
2016-06-07 15:19:57 +02:00
Alexander Larsson
1e5a42aff7 Fix build
The --disable-system-helper flag addition lacked a $
2016-06-07 10:10:30 +02:00
Alexander Larsson
f9e171a618 Merge pull request #92 from matthiasclasen/optional-system-helper
library-only build
2016-06-07 09:38:37 +02:00
Alexander Larsson
007df6eb44 Merge pull request #94 from smcv/no-system-fonts
flatpak-run: don't fail if there are no system fonts
2016-06-07 09:36:22 +02:00
Simon McVittie
9b7c339ca6 flatpak-run: don't fail if there are no system fonts
In a minimal environment (like the one where we run installed-tests
in Debian), we might not have /usr/share/fonts.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-04 22:38:32 +01:00
Matthias Clasen
9b22b1f167 Make system helper build optional
This lets us avoid the polkit dependency when just building
flatpak for its library.
2016-06-04 14:56:59 -04:00
Alexander Larsson
1bf2998352 Add tests for subpaths 2016-06-03 18:03:43 +02:00
Alexander Larsson
a0358c8785 Handle non-existing dirs when deploying a subpath 2016-06-03 18:03:23 +02:00
Alexander Larsson
1667f988de Add test-bundle-system
This tests installing a bundle via the system-helper.
2016-06-03 16:04:10 +02:00
Alexander Larsson
e769af8661 system-helper: Handle installing bundles 2016-06-03 16:04:10 +02:00
Alexander Larsson
1eeaecf0a3 Merge pull request #88 from matthiasclasen/builder-command-docs
Improve an error message
2016-06-03 15:24:12 +02:00
Matthias Clasen
6d1837ce4b Make an error message more helpful
When we see somebody trying to use a command with spaces, we
should be helpful and point out how to do what they want to do.
2016-06-03 09:22:21 -04:00
Matthias Clasen
a512da2592 Recommend a shell script wrapper for passing arguments
This has come up as a question, so document it.
2016-06-03 09:08:55 -04:00
Alexander Larsson
3f0cbf74b4 Update gitignore 2016-06-03 14:30:25 +02:00
Alexander Larsson
95dfd2f459 Add test for bundles 2016-06-03 14:30:25 +02:00
Alexander Larsson
8ef84cc3d1 Move shared bundle install code to flatpak_dir_install_bundle 2016-06-03 14:30:25 +02:00
Alexander Larsson
21ab14b19a Improve deployment of appstream data
This has several improvements:
 * Writes to a temporary location and renames at the end, so
   we never end up with partial checkouts.
 * Don't fsync each file during checkout, instead syncfs() at
   the end
 * Pre-create the target deployment directory so that we get the right
   permissions for it.
2016-06-03 14:30:25 +02:00
Alexander Larsson
4d38055840 Merge pull request #69 from matthiasclasen/bundle-doc
Document --oci
2016-06-03 12:37:21 +02:00
Matthias Clasen
0ea33a7e35 Add the logo to README.md 2016-06-02 18:05:22 -04:00
Matthias Clasen
db540a15e7 Document the --oci option of flatpak build-import-bundle 2016-06-02 15:02:49 -04:00
Matthias Clasen
b4d5ec76a8 Document the --oci option of flatpak build-bundle 2016-06-02 14:53:22 -04:00
Alexander Larsson
72118a40b6 Merge pull request #67 from smspillaz/fix-gh-56
completion: Don't show one-time switches already in use
2016-06-02 17:23:01 +02:00
Sam Spilsbury
7bd6c9b277 completion: Don't show one-time switches already in use 2016-06-02 21:38:16 +08:00
Sam Spilsbury
082821288e completion: Store original argv and argc
We deep-free the original argv here, since it isn't modified.
2016-06-02 21:38:16 +08:00
Alexander Larsson
13707f6b18 system-helper: Support directly pulling local remotes
For a local (file:// uri) remote, do an (untrusted) direct pull instead
of pulling into the users cached repo first. This way we do less copies,
as well as guaranteeing the source of the data. The later means its
mostly safe to also allow this for non-gpg signed remotes.
2016-06-02 15:30:08 +02:00
Alexander Larsson
d950ed338f Merge pull request #65 from matthiasclasen/builder-messages
Add another status message to flatpak-builder
2016-06-02 09:12:08 +02:00
Alexander Larsson
4805d49bdf Merge pull request #37 from matthiasclasen/command-check
flatpak-builder: Ensure after build that the binary listed in "command" is installed
2016-06-02 08:58:30 +02:00
Alexander Larsson
71be0b2977 Merge pull request #62 from matthiasclasen/build-docs
Some fixed for flatpak-build(1)
2016-06-02 08:53:59 +02:00