Commit Graph

3178 Commits (e24c2218f1e78efac5f091ffa2b328a45fdd721d)
 

Author SHA1 Message Date
Ryan Gonzalez e24c2218f1 Add YAML support as an alternative to JSON (closes #2)
Closes: #127
Approved by: alexlarsson
2018-04-19 12:44:38 +00:00
Sam Spilsbury 8eabc27920 manifest: Add support for "extension-tag"
This passes an --extension-tag to flatpak build-init which will
set the "tag" option on the ExtensionOf section in the metadata.

Closes: #126
Approved by: alexlarsson
2018-04-19 11:25:13 +00:00
Alexander Larsson cbca5b5dce Fix --install to not pass --subpath= to flatpak install
This isn't really right, as install doesn't handle an empty subpath
like that. In fact, doing so will break exports.

Closes: #124
Approved by: alexlarsson
2018-04-06 14:25:39 +00:00
Matthew Leeds d8e1ef8fb9 flatpak-builder(1): Add a missing comma 2018-03-30 18:32:00 -07:00
Alexander Larsson c844563f7d Don't warn for // and __ key prefixes
This means you can make valid json comments like so:

 "//": "Some comment",

Closes: #122
Approved by: alexlarsson
2018-03-27 14:12:39 +00:00
Alexander Larsson 1619ef1861 Add inherit-sdk-extensions property
This is similar to inherit-extensions, but the extensions
are not also inherited into the platform when it is created.

Closes: #121
Approved by: alexlarsson
2018-03-27 14:10:15 +00:00
Alexander Larsson 7b042c61e6 Add --no-shallow-clone for git mirroring
This is useful e.g. when doing mirroring only, or if your git
has issues with shallow clones.

Closes: #120
Approved by: alexlarsson
2018-03-27 13:41:42 +00:00
Alexander Larsson b9a143cc9c build options: Add prepend-*-path options
This is useful for example if you're using a sdk-extension that
is supposed to override some binaries from /usr/bin.

Closes: #119
Approved by: alexlarsson
2018-03-27 13:18:09 +00:00
Alexander Larsson cd32a386fb ccache: Enforce disabled if not enabled
This makes sure that ccache is disabled if you don't enable
it on the commandline. This makes sense, because we don't
have any persistant location for the ccache files anyway.

Additionally this is done to work around a race condition initializing
~/.ccache/ccache.conf that causes meson builds to error out.

Closes: #118
Approved by: alexlarsson
2018-03-27 12:54:11 +00:00
eyelash d329cef849 fix a typo 2018-02-19 13:49:15 +01:00
Alexander Larsson 1b9efca966 Update NEWS 2018-02-19 10:37:08 +01:00
Alexander Larsson 5aae9184f2 Update to latest libglnx with memfd_create build fix 2018-02-19 10:35:57 +01:00
Alexander Larsson dc05cd7999 Bump version to 0.10.9 2018-02-19 10:29:42 +01:00
Alexander Larsson fbebb8e672 Update NEWS for release 2018-02-19 10:29:30 +01:00
Alexander Larsson 099bb87b77 git: Look for the correct cache
When cloning a new repo the mirror_dir has a temporary basename, so
use real_mirror_dir when looking for the cached repo.
2018-02-16 11:39:09 +01:00
Alexander Larsson 52c17219eb Add support for -y, passed on to all install commands
This allows you to run --install-from-deps=foo -y to always install all
dependencies. Useful for auto-builders like flathub.

Closes: #107
Approved by: mwleeds
2018-02-16 07:49:17 +00:00
Matthew Leeds 86268f0cbc README: Fix docs link
Fixes https://github.com/flatpak/flatpak-builder/issues/104
2018-02-14 23:11:58 -08:00
Alexander Larsson a7ba67912a Bump to 0.10.8 2018-02-14 18:46:23 +01:00
Alexander Larsson 2b17cfea31 Update for release 2018-02-14 18:46:23 +01:00
Alexander Larsson dad7bc71ce configure: Call LIBGLNX_CONFIGURE
This includes the libglnx configure checks

This fixes detection of e.g. copy_file_range
2018-02-14 18:46:23 +01:00
Alexander Larsson 9f72237f3f Update to latest libglnx 2018-02-14 18:46:20 +01:00
Alexander Larsson 0632b550f9 Update version to 0.10.7 2018-02-14 11:56:49 +01:00
Alexander Larsson ab08050721 Update NEWS for release 2018-02-14 11:56:42 +01:00
Alexander Larsson 1f15907893 Add --socket=fallback-x11 support
This requires a recent flatpak to actually work.
2018-02-14 11:49:33 +01:00
Christian Hergert dce8981162 utils: use g_debug() for debug information
Closes: #100
Approved by: alexlarsson
2018-01-12 10:06:12 +00:00
Christian Hergert 551d245207 manifest: run flatpak on the host if inside of flatpak
This allows us to be run from inside of a flatpak application and
successfully build by proxying the flatpak commands to the host.

Closes: #100
Approved by: alexlarsson
2018-01-12 10:06:12 +00:00
Christian Hergert 1bb6925481 utils: don't pass stderr if silence was requested
Closes: #100
Approved by: alexlarsson
2018-01-12 10:06:12 +00:00
Christian Hergert 897fe1b768 utils: add GSubprocessFlags parameter
This allows us to pass it through in the case we're running in the same
pid namespace as the flatpak-builder process.

Closes: #100
Approved by: alexlarsson
2018-01-12 10:06:12 +00:00
Christian Hergert 1929fd1cc6 utils: clear GUnixFDList before entering main loop
If we do not clear the FDList before entering the main loop, the splice
async command may not complete because the pipe fd is still held. This
fixes an issue where builder_maybe_host_spawnv() hangs indefinitely when
run inside a Flatpak application.

Closes: #100
Approved by: alexlarsson
2018-01-12 10:06:12 +00:00
Alexander Larsson 63e0722cb0 git: When mirroring a new repo, use a temporary destination
This way, if anything fails during the initial pull we can remove it
and not be confused by a partial repo on the next run.

Closes: #98
Approved by: alexlarsson
2018-01-11 09:30:42 +00:00
Alexander Larsson 9b4f14cd45 Add flatpak_file_rename
Closes: #98
Approved by: alexlarsson
2018-01-11 09:30:42 +00:00
Alexander Larsson cd0c9da8f3 Fix --disable-updates for git sources
We lost the ability to not update if a git repo was already checked out.
This fixes that again.

Closes: #98
Approved by: alexlarsson
2018-01-11 09:30:42 +00:00
Will Thompson c06ee375c3 docs: fix "concatinated" and "inbetween" typos
"In between" is two separate words, but I think rewording it is clearer.

Closes: #94
Approved by: pwithnall
2018-01-08 10:54:53 +00:00
Alexander Larsson 543f25e8e3 --install: Fix path != NULL assertion when not using --repo
Closes: #86
Approved by: alexlarsson
2017-12-20 10:18:27 +00:00
Alexander Larsson d869c778ce --install: Fix double unref when --repo is not installed
export_repo is an autopr, so we have to ref it.

Closes: #86
Approved by: alexlarsson
2017-12-20 10:18:27 +00:00
Alexander Larsson 0ee2315818 Update NEWS for release 2017-12-15 14:32:30 +01:00
Alexander Larsson 48c504af8f Bump version to 0.10.6 2017-12-15 14:26:36 +01:00
Alexander Larsson 471adbaf21 Update requirements to flatpak 0.10.2 and ostree 2017.14 2017-12-15 14:25:02 +01:00
Alexander Larsson 5305a17915 --install: Always pass --reinstall
Otherwise the second --install failes

Closes: #85
Approved by: alexlarsson
2017-12-15 13:04:20 +00:00
Alexander Larsson 07240bf3a7 --install: Warn if --require-changes and --install interact badly
If there were no change we didn't export and there might be nothing
to install, so print a notice that we're ignoring the install.

Closes: #85
Approved by: alexlarsson
2017-12-15 13:04:20 +00:00
Alexander Larsson be191a57f1 --install: Don't pass relative path to flatpak install
That is parsed as a remote name, so ensure we pass the absolute pathname.

Closes: #85
Approved by: alexlarsson
2017-12-15 13:04:20 +00:00
Alexander Larsson 050feb1294 Add --install argument
This allows you to build and install the result in a single operation.
If a --repo is given the app is installed from there, otherwise we
build-export it to the flatpak-builder cache repo, which already has
all the objects that are needed in it, so this will not increase
disk-use.

Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
Alexander Larsson 2075da5919 docs: Fix spelling
Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
Alexander Larsson 39ad84c499 flatpak_compose_ref: Remove unused error argument
Closes: #81
Approved by: alexlarsson
2017-12-14 09:27:59 +00:00
Alexander Larsson 61ae14a6b8 Switch to bare-user-only cache repo mode
This means we can build without xattrs

This only affects new caches, old ones will work fine with the
bare-user repo though.

Closes: #80
Approved by: alexlarsson
2017-12-14 08:53:58 +00:00
Alexander Larsson 6a8e2af98f Store cache in canonical format
This stores the cache in the canonical format (i.e. uid/gid 0 and no
weird permissions). This has two advantages, first of all it matches
what flatpak build-export will produce, so diff:ing with the final
result will make things easier to read, shared repos will be smaller,
etc. Secondly, it will allow us to switch to bare-user-only mode which
means we don't need/use xattrs for the build filesystem.

Note: We bump the cache format as the cache will change affecting
e.g. ostree diff between different cachepoints, so this will rebuild
everything once.

Closes: #80
Approved by: alexlarsson
2017-12-14 08:53:58 +00:00
Alexander Larsson c421beb086 cache: Use force_copy instead of hack
We used to have a hack where we used a bare-user cache
and a non-user-mode checkout to force a copy. But these
days ostree has a force_copy mode, so lets just use that.

This doesn't really change anything for now, but it will allow
us later to canonicalize the uid/gid in the cache without then
failing to check out due to permission issues.

Closes: #80
Approved by: alexlarsson
2017-12-14 08:53:58 +00:00
Alexander Larsson 960c36ab88 appdata: Only rename complete matches of the id
We don't want to rename partial hits of the desktop id, nor
inside any other tag.

Fixes https://github.com/flatpak/flatpak/issues/1118

Closes: #83
Approved by: alexlarsson
2017-12-14 08:47:51 +00:00
Alexander Larsson 6529c39083 Support including json snippet for sources
This allows inclusion of sources from an external json source similar
to how we do it for modules.

For example, you can use:

"sources": [
    {
        "type": "shell",
        "commands": [ "echo BEFORE include" ]
    },
    "include.json",
    {
        "type": "shell",
        "commands": [ "echo AFTER include" ]
    }
]

with include.json containing:
[
    {
        "type": "shell",
        "commands": [ "echo Shell 1" ]
    },
    {
        "type": "shell",
        "commands": [ "echo Shell 2" ]
    }
]

This is very useful in the case where the included file is
auto-generated from some other source, such as an npm lockfile.

Closes: #77
Approved by: alexlarsson
2017-12-08 15:00:56 +00:00
Alexander Larsson c572831b21 Add g_autoptr(BuilderObjectList) support
This is a deeply freed GList of GObjects.

Closes: #77
Approved by: alexlarsson
2017-12-08 15:00:56 +00:00