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
Alexander Larsson
67de92042b
apps: Use "branch", not "version" when talking about app branches
2015-12-17 20:07:14 +01:00
Alexander Larsson
619adeb74c
builder: Add cleanup-command property
...
This allows you to do some custom cleanup operations
2015-12-16 14:50:05 +01:00
Alexander Larsson
ef3582325d
builder: Store the cache in BARE_USER mode
...
This has two advantages:
1) If building as non-root, then we can't modify xattrs, such as
selinux ones, yet selinux will write then, making a bare repo
not match the checksums (it has unexpected xattrs that selinux made)
2) We check out as MODE_NONE, not MODE_USER, which in combination with
BARE_USER forces the files to be copied out of the cache, rather
than using hardlinks into the cache which could mutate the cache.
2015-12-16 11:56:56 +01:00
Alexander Larsson
46558798a2
builder: Don't fsync on cache checkouts
2015-12-16 11:18:05 +01:00
Alexander Larsson
739b5ab6db
builder: Support writable-sdk option
2015-12-15 19:36:10 +01:00
Alexander Larsson
a0885d4576
builder: Allow specifying custom prefix
2015-12-15 19:36:06 +01:00
Alexander Larsson
43a09b3646
Fix unused variable warnings
2015-12-15 14:34:52 +01:00
Alexander Larsson
efe378f46c
builder: Fix typo in patch applying
...
It was using git, not patch
2015-12-15 08:14:20 +01:00
Alexander Larsson
a66da8e53c
builder: Fix build with old glib
2015-12-14 14:49:31 +01:00
Alexander Larsson
2c92fcb1d6
builder: After fetching the mirrored git repo, set back the right origin
...
This is nice if you want to later pull new data into the repo.
2015-12-09 21:32:18 +01:00
Alexander Larsson
873492af62
builder: Remove accidental leftover spew
2015-12-09 21:21:48 +01:00
Alexander Larsson
54c52d9363
builder: Add --keep-build-dirs option
...
This is useful if you want to later make changes to the built stuff.
2015-12-09 21:10:22 +01:00
Alexander Larsson
b716e0d8eb
Builder: Add a resolved version of the manifest to the built app
2015-12-09 14:26:41 +01:00
Alexander Larsson
dfc11d5e87
builder: Support specifying commit ids as git branches
2015-12-09 14:07:33 +01:00
Alexander Larsson
6a82dd4ee3
builder: Support specifying revision in bzr sources
2015-12-09 14:06:59 +01:00
Alexander Larsson
5b6f3749d5
builder: Support data: uri for files
2015-12-09 13:00:30 +01:00
Alexander Larsson
f16cc44a30
builder: Use SoupRequest to simplify download helpers
...
Also, this allows us to support data: uris, etc
2015-12-09 12:55:10 +01:00
Alexander Larsson
3fdfef7e40
builder: Allow optionally specifying remote file sources
2015-12-09 12:01:55 +01:00
Alexander Larsson
e39192b3d6
builder: Break out download_uri helper function in SourceFile
2015-12-09 11:42:04 +01:00
Alexander Larsson
3fb4226c81
builder: Make the builder manifest objects serializable to json
2015-12-09 10:33:54 +01:00
Alexander Larsson
237fd57cd0
builder: Allow git uris to be relative to the base directory
...
This allows you to use ".git" as the git uri, thus building from the
current source directory.
2015-12-08 14:34:34 +01:00