Alexander Larsson
ea176cd63a
builder: Put all builds in a .xdg-app-builder/build subdir
...
I.e. instead of .xdg-app-builder/build-foo it will be
.xdg-app-builder/build/foo. This makes it easier to separate these
out, and it allows you to symlink this directory to /run/build to pick
up all sources when you use --keep-build-dirs.
2016-02-10 10:15:25 +01:00
Alexander Larsson
9c6d6242a9
builder: Avoid reusing set GError
...
my_error was used twice, without clearing inbetween, which can
cause issues.
2016-02-08 16:21:28 +01:00
Alexander Larsson
32e9502675
Fix some g_propagate_error typos
2016-02-08 16:16:38 +01:00
Alexander Larsson
1cc94f4f04
builder: Use predictable names for build dirs
...
Instead of random hex, we use a pure counter
2016-02-08 11:30:48 +01:00
Alexander Larsson
43ac6421f9
builder: Store exact sdk commit id in the build cache and manifest
...
This means we rebuild everything if the sdk changes, and you can also
see what version an app was built against.
2016-02-03 10:57:50 +01:00
Alexander Larsson
9f2769e0ce
builder: Use non-parallel-make option instead of looking at .NONPARALLEL
2016-02-01 21:40:22 +01:00
Alexander Larsson
913eccd30f
builder: Add shell source
...
This lets you run shell commands to modify the source
2016-02-01 21:26:20 +01:00
Alexander Larsson
3a70dcf430
builder: Style fixes
2016-01-28 21:52:45 +01:00
Michael Spencer
ba5b5bc6b8
builder: Skip checking out disabled submodules
2016-01-28 12:46:40 -06:00
Alexander Larsson
225c359128
Fix include order to build with older libsoup versions
2016-01-28 14:35:46 +01:00
Alexander Larsson
20d16625a8
builder: support using appstream-compose to create appstream files
2016-01-22 15:33:03 +01:00
Alexander Larsson
e8adcc0eb5
builder: Add spew when commiting to cache
2016-01-22 14:08:43 +01:00
Alexander Larsson
5c89d5a4e9
builder: Add some spew before build-init
2016-01-22 12:30:00 +01:00
Alexander Larsson
472405ff7f
builder: Add platform-extensions
2016-01-20 14:41:09 +01:00
Alexander Larsson
6d2aa7b29e
builder: Support sdk-extensions
2016-01-20 14:11:29 +01:00
Alexander Larsson
622adf88d0
builder: Put debuginfo in the right place for runtimes
2016-01-20 14:00:49 +01:00
Alexander Larsson
6189fd3f7a
build-finish: Fix exports
...
This was reading an unintialized variable
2016-01-19 16:53:11 +01:00
Alexander Larsson
1a4f257cbd
builder: Remove leftover debug spew
2016-01-19 13:08:15 +01:00
Alexander Larsson
2f3e790651
builder: Fix error with va_start use
2016-01-19 12:38:16 +01:00
Alexander Larsson
071561637a
Remove unused variables
2016-01-19 12:37:51 +01:00
Alexander Larsson
8b3cc77955
builder: Handle modules with invalid refname characters in the cache
2016-01-19 11:57:37 +01:00
Alexander Larsson
496cbac3db
cache: Don't fail to create cache if parent dir is not created
2016-01-18 17:17:04 +01:00
Alexander Larsson
87ad85116e
builder: Fix random crash due to uninitialized memory
2016-01-18 16:14:42 +01:00
Alexander Larsson
e91a4c79e0
Builder: Support commiting a platform
2016-01-18 15:22:56 +01:00
Alexander Larsson
3341fb08ad
builder: Allow building runtime sdks (based on existing sdk)
...
This includes a few different changes:
* Add build-runtime boolean property
* Rename "app-id" property to "id"
* Add metadata property to use a custom base metadata file
* Default to writable-sdk to TRUE for runtimes
* Default prefix to /usr for runtimes
* Put manifest in usr for runtimes
* Pick up debuginfo from usr for runtimes
* Make build-finish work on runtimes, but only export appdata
2016-01-18 11:43:02 +01:00
Alexander Larsson
701d800059
builder: Correctly handling non-existing app dir when applying cache
2016-01-18 11:36:24 +01:00
Alexander Larsson
f2853a460b
cache: Remove target directory before checking out cache
...
This will be empty anyway, and if its there the checkout fails.
2016-01-17 21:23:03 +01:00
Sam Thursfield
d5c176f440
builder: Don't delete the APPDIR directory
...
A new user might think that APPDIR is the location of the app to be
built, and run something like `xdg-app-builder . ./manifest`. This
could silently the user's entire project that they are trying to
package, which is not acceptable at all! Even if you think it is their
fault for not reading the manual first!
This commit means that APPDIR is no longer deleted. Instead,
xdg-app-builder checks whether it is empty and, if it is not, it asks
the user to delete the contents and then rerun it.
This means you now have to do `rm -Rf APPDIR; xdg-app-builder APPDIR
MANIFEST` when developing your manifest, but I think that's better than
having a build tool that can optionally delete your whole project.
2016-01-17 18:16:05 +00:00
Alexander Larsson
93e8d8bd78
builder: Add some spew when downloading files
2016-01-14 16:45:44 +01:00
Alexander Larsson
f3bf30334c
builder: Also apply cleanup to changes in usr
2016-01-14 11:16:17 +01:00
Alexander Larsson
f8894af8d7
builder: Change the way the cache is indexed
...
Instead of a single ref we use one ref per stage (init, build module X,
cleanup, finish). This means we don't have to iterate in the cache
lookup, and it also means we get clean refs for each stage so one
can easily inspect the differences between the stages.
2016-01-13 09:50:15 +01:00
Alexander Larsson
d43e797b4b
builder: Add support for rename-appdata-file option
2016-01-12 16:30:20 +01:00
Alexander Larsson
f56d6a7290
builder: Fix up cleanup matching
2016-01-12 16:06:53 +01:00
Alexander Larsson
55e934ee76
builder: Fix handling of builddir
2016-01-12 14:25:41 +01:00
Alexander Larsson
4c47951cbd
builder: Add some more spew when exporting
2016-01-12 12:36:07 +01:00
Alexander Larsson
a6eab3e732
builder: Don't break if ccache not enabled.
2016-01-12 12:32:44 +01:00
Alexander Larsson
689c36aa8f
builder: Pass --body, --subject and --gpg-sign to build-export
2016-01-12 12:25:45 +01:00
Alexander Larsson
f95cd2d029
builder: Add option to enable ccache use in build
2016-01-12 12:09:09 +01:00
Alexander Larsson
59c8c49bdd
builder: Run builds in /run/build/$modulename
...
This creates repeatable builds for anything that leaves the build
dir in the resulting files, such as debug info.
2016-01-12 11:05:37 +01:00
Alexander Larsson
13d07d6a6f
builder: Add support for exporting with --repo=foo
2016-01-11 15:35:17 +01:00
Alexander Larsson
69d489bbef
builder: Create metadata.debuginfo if debug info exists
2016-01-11 14:37:30 +01:00
Alexander Larsson
b4fbb84f0a
common: Move path_match_prefix to common
2016-01-11 13:56:07 +01:00
Alexander Larsson
d3e1ffb4f7
builder: Match debuginfo files against regular cleanup patterns
...
I.e. if /lib/foo is cleaned, also clean /lib/debug/lib/foo.debug
2016-01-11 11:41:50 +01:00
Alexander Larsson
1b2ed4fe09
builder: Pass down global cleanups via BuildContext
2016-01-11 11:40:46 +01:00
Alexander Larsson
5896b5ae08
builder: Pass down keep-build-dirs via BuildContext
2016-01-11 11:40:46 +01:00
Alexander Larsson
825611a758
builder: Break out helpers for path matching
2016-01-11 11:40:46 +01:00
Alexander Larsson
98a7d731ad
builder: Add support for separating out debuginfo
2016-01-11 11:40:46 +01:00
Alexander Larsson
62b4ffaa72
builder: Use libelf to detect elf files
...
This additionally looks for already stripped files
2016-01-11 11:40:46 +01:00
Alexander Larsson
8be0031355
builder: Print all files removed by cleanup
2016-01-11 11:40:46 +01:00
Alexander Larsson
1264335458
builder: Add --disable-updates
...
Download sources, but never update existing sources (like git or bzr).
2015-12-21 10:39:23 +01:00