Alexander Larsson
bb4d67b086
builder: Support tags
2016-02-17 14:54:16 +01:00
Alexander Larsson
71259fa711
builder: Support local archives with path property
2016-02-17 14:50:01 +01:00
Alexander Larsson
6c5feb4e05
builder: Add support for --run to start a command in the build dir
2016-02-17 10:26:35 +01:00
Alexander Larsson
c07b1807d1
builder: Move CFLAGS/CXXFLAGS handling into BuilderOptions
2016-02-17 10:26:35 +01:00
Alexander Larsson
e233705379
builder: Add build_context_get_build_dir()
2016-02-17 10:26:32 +01:00
Alexander Larsson
393163200d
builder: Always create unversioned symlinks while building modules
...
This way if things go wrong you can always find the latest build
2016-02-17 08:43:29 +01:00
Alexander Larsson
faecde5da5
builder: Report errors if eu_strip fails
...
This was ignoring errors and causing "set-on-top-of-existing-GError"
messages.
2016-02-16 14:45:23 +01:00
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
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
Alexander Larsson
ab7699bb04
builder: Prune old branches when updating mirror
2015-12-04 08:51:14 +01:00
Alexander Larsson
374e7d1166
builder: Be a bit more verbose when pulling VCS
2015-12-04 08:51:08 +01:00
Alexander Larsson
e76da99cdc
builder: Merge spawn helpers to single base helper
2015-12-03 13:29:08 +01:00
Alexander Larsson
9fd6ce1779
builder: Don't use ":" in uri-as-filename
...
This confuses some versions of git, thinking the file is a uri
2015-12-02 14:07:09 +01:00
Alexander Larsson
44028aa273
builder: Error out if rename_error is set but not found
...
Also, ignore ENOENT during the traversal
2015-12-02 13:12:35 +01:00
Alexander Larsson
8dc06ba30c
builder: Add support for copy-icon option
2015-12-02 08:47:43 +01:00
Alexander Larsson
7176ca491a
builder: Consider the build_option when checksumming
2015-12-02 08:32:25 +01:00
Alexander Larsson
9dfcd4b452
builder: Fix build with g_autoptr backports
2015-12-01 16:40:45 +01:00
Alexander Larsson
5e96d10128
Fix some warnings
2015-12-01 16:39:01 +01:00
Alexander Larsson
83a59dd5a5
builder: Build with "make", not "make all"
...
This seems more compatible
2015-12-01 16:06:37 +01:00
Alexander Larsson
a8eefe6844
Remove stray semicolons
2015-12-01 12:31:20 +01:00
Alexander Larsson
6f9227d58f
builder: Support building from a subdirectory of the sources
2015-12-01 12:12:53 +01:00
Alexander Larsson
4cd2e1c993
Add script source type
2015-12-01 11:10:13 +01:00
Alexander Larsson
74e30c9b01
builder: Add post-install script support
2015-12-01 10:28:41 +01:00
Alexander Larsson
d6ae9e3d6c
builder: Add submodule support for git sources
2015-11-30 21:09:56 +01:00
Alexander Larsson
79c1f1246c
Remove leftover semicolon
2015-11-30 21:09:22 +01:00
Alexander Larsson
dd099f5769
builder: Fix typo in cmake support
2015-11-30 12:47:35 +01:00
Alexander Larsson
12d926ec65
builder: builddir != srcdir was broken becasue we never created the buildir
2015-11-27 10:23:17 +01:00
Alexander Larsson
2e0f34c435
builder: Add more headers around the spew for each new module
2015-11-27 10:23:17 +01:00
Alexander Larsson
56652c9ea1
builder: Add support for cmake and forced builddir
2015-11-27 10:23:14 +01:00
Alexander Larsson
106a5b06ec
Rename lib/ to common/ in preparation for public xdg-app library
2015-11-26 22:05:38 +01:00
Alexander Larsson
f710eb9322
Correct license, we're LGPL 2+, not 3+
...
Some files accidentally got the LGPL 3+ header, but we
want to be LGPL2+.
2015-11-26 14:50:21 +01:00