Matthew Leeds
25d88477c5
builder: Allow git sources to be specified as paths
...
Currently to use a local copy of a git repo you have to specify the url
as "file:///path/to/repo". This commit allows you to specify a path directly
as "/path/to/repo", which is faster and more space-efficient because
git-clone will hardlink the objects rather than copying them.
2016-07-29 16:01:30 -04:00
Matthias Clasen
75218c4a65
Fix license headers
...
We were referring to the nonexisting "version 2" of the
Lesser GPL. It should be "version 2.1".
2016-07-29 14:27:49 -04:00
Matthias Clasen
3a281d0782
Add locations to some error messages
...
When a file is not found, mention where we looked for it.
This provides useful context for understanding the error.
2016-07-29 14:16:31 -04:00
Matthias Clasen
91b7b0a419
Mention app dir in output
...
This can help making sense out of error messages when something
goes wrong.
2016-07-29 14:15:46 -04:00
Matthew Leeds
b051571de8
builder: Fix a few memory leaks
...
These changes fix some memory leaks that valgrind pointed out.
2016-07-28 16:03:42 -04:00
Matthew Leeds
fcd6da2fa3
builder: Print a message when running flatpak build-finish
...
This commit makes flatpak-builder print the flatpak build-finish command
it constructs before executing it in a subprocess, which matches the
behavior for flatpak build-init and flatpak build.
2016-07-18 14:29:41 -04:00
Christophe Fergeau
2b609c6624
Add RPM archive support
2016-07-15 11:13:28 +02:00
Christophe Fergeau
543d81c2fe
Factor some zip uncompression code in a helper func
2016-07-15 11:13:28 +02:00
Alexander Larsson
b5204c908d
builder: Clear mtime to 1, not 0, to match what new ostree does
2016-07-01 14:25:22 +02:00
Alexander Larsson
eaeb132a5a
builder: Set the new extension properties
...
Set autodelete=true on locale and debug extensions.
Set no-autodownload=true on debug extensions.
Thats what will happen anyway, but its nice to be explicit.
Also, remove subdirectories=true on the locale extensions, as
we're not using that anymore.
2016-06-30 16:55:32 +02:00
Alexander Larsson
9558d7d6ae
builder: Strip "." from locale names too
...
For instance, "C.utf8" => "C" or "en.utf8" => "en".
Mostly this was already handled for e.g. "en_US.utf8" though...
2016-06-30 11:47:45 +02:00
Alexander Larsson
de8d8a36c2
Merge pull request #158 from hadess/wip/use-git-patch
...
Add "use-git" option for patch source types
2016-06-28 15:24:49 +02:00
Alexander Larsson
b00dbed3bd
builder: Report errors to stderr, not stdout
2016-06-28 15:08:09 +02:00
Bastien Nocera
c646f386eb
builder: Add "use-git" option for patch source type
...
Closes #6
2016-06-28 14:24:16 +02:00
Matthias Clasen
d3629b8e72
builder: Add support for a var runtime
...
flatpak build-init as a --var option - support this as a
"var" key in the json.
2016-06-23 10:01:40 +02:00
Alexander Larsson
bd485fbc01
builder: Report error details when failing to checkout cache.
2016-06-09 17:45:44 +02:00
Alexander Larsson
5eb671aac4
builder: Warn for duplicate module names
2016-06-09 12:43:31 +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
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
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
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
matthiasclasen
5e2be3cb10
builder: Some consistency fixes for output ( #64 )
...
* builder: Some consistency fixes for output
Capitalize all error messages.
2016-06-02 08:50:58 +02:00
Matthias Clasen
7794a70f50
builder: Check that command exists after build
...
This keeps us from creating a non-working flatpak.
2016-06-01 23:31:57 -04:00
Matthias Clasen
c7594e5515
Add another status message to flatpak-builder
...
Add a message for the 'rewriting the desktop file' step.
This helps in providing context for error messages when something
goes wrong.
2016-06-01 16:21:25 -04:00
Alexander Larsson
c7c9505e90
Always initialize autofree variable
2016-05-27 09:19:45 +02:00
Alexander Larsson
8362d9cafe
Merge pull request #36 from matthiasclasen/module-errors
...
flatpak-builder: Print name of failed module on error
2016-05-27 09:02:44 +02:00
Alexander Larsson
f9cbcc3996
Merge pull request #49 from jsoref/spelling
...
spelling fixes
2016-05-27 09:02:14 +02:00
Josh Soref
37409c4095
spelling: sections
2016-05-27 06:46:23 +00:00
Alexander Larsson
6b65972434
Merge pull request #47 from matthiasclasen/build-error
...
builder: Avoid a confusing error
2016-05-27 08:45:21 +02:00
Matthias Clasen
5f928b30ac
builder: Prefix module errors
...
Sprinkle g_prefix_error calls in builder-module.c, to make
sure that module-specific errors get a "module foo:" prefix.
This is not quite perfect, since callers tend to impose their
own prefix as well, but at least it clearly identifies the
module in which the error ocurred.
2016-05-27 00:25:28 -04:00
Matthias Clasen
6d1d9724c5
builder: Warn about bad module names
...
Putting spaces or slashes in module names is a recipe for
cryptic error from one of the many constructed flatpak
commandlines. Better warn early on, as soon as we see such
a name.
2016-05-27 00:05:55 -04:00
Matthias Clasen
c89a610a91
builder: Avoid a confusing error
...
When the sdk is not specified in the manifest, we get a confusing
error from running flatpak info with an invalid commandline.
Avoid that by checking for the the sdk string beforehand.
2016-05-26 23:35:41 -04:00
Alexander Larsson
e9e92b79fe
builder: Support argument to the command with --run
...
For instance, this lets you do:
flatpak-builder app foo.json ls -l
Without flatpak-builder complaining about not knowing "-l".
2016-05-26 12:44:51 +02:00
Alexander Larsson
33c0d49212
builder: Support permission ops with --run
2016-05-26 12:24:43 +02:00
Alexander Larsson
f6b4e8ead6
builder: Make the options and help output for --run a bit nicer
...
We now pre-process for the --run argument in order to only show
related arguments.
2016-05-26 11:20:23 +02:00
Stephan Bergmann
3b6b0da108
exec* returns -1 on error
...
...so use the == -1 idiom as already used in common/flatpak-run.c
(another fix would be to drop the if completely, as exec* doesn't
return on success)
2016-05-24 17:44:33 +02:00
Simon McVittie
a4641280a7
Fix various spelling mistakes
...
Mostly detected by Debian's Lintian tool.
Signed-off-by: Simon McVittie <smcv@debian.org >
2016-05-17 11:43:32 +01:00
Alexander Larsson
9d6bc99649
builder: Untar with --no-same-owner
...
Without this if you run as root (which is generally a poor idea) it will
extract the sources with the user/group specified on the archive, which
is never what you want when building code.
2016-05-12 19:35:32 +02:00
Alexander Larsson
28c1c65d8f
Builder: Support disabled=true to not build a module
...
This is a simple way to "comment out" a module.
2016-05-09 17:24:42 +02:00
Alexander Larsson
8abbc0186e
Rename everything but the on-disk location to flatpak
2016-05-09 11:11:55 +02:00
Alexander Larsson
ba37b22d78
Rename library to libflatpak
2016-05-09 09:46:26 +02:00
Alexander Larsson
c24528d369
Rename source files to flatpak
2016-05-09 09:00:20 +02:00