Commit Graph

191 Commits (6a613d1fabce5e93656cfbcb6815cc9bc98f437b)

Author SHA1 Message Date
Alexander Larsson cd13e9e21d bundles: Don't lock during pull
There is no need for that
2016-02-25 15:41:37 +01:00
Alexander Larsson f89e004fa3 Remove origin repos on uninstall 2016-02-25 11:44:23 +01:00
Alexander Larsson eadb10cba7 common: Move part of bundle install to helper functions 2016-02-25 11:31:22 +01:00
Alexander Larsson e66e7e3f15 bundles: Verify that the header metadata matches the deployed one at install
Otherwise the bundle can lie about requested permissions.
2016-02-24 15:48:33 +01:00
Alexander Larsson 4c6a05aba1 common: Break out bundle loader to helper utility 2016-02-24 14:16:52 +01:00
Alexander Larsson 8c81746a3e build-bundle: Add metadata file as metadata element
This way you can get info about the file before installing it
2016-02-24 13:41:38 +01:00
Alexander Larsson 5f96507913 Add a file header to bundles 2016-02-23 09:44:18 +01:00
Alexander Larsson abdbb17a72 Remove all appstream checkouts and mirrored refs when deleting remote 2016-02-18 12:54:40 +01:00
Alexander Larsson be97206c7b build-init: Support --tag=FOO 2016-02-17 14:50:34 +01:00
Alexander Larsson 83d71fb110 info: Fix support for system installed runtimes (typo) 2016-02-12 14:07:04 +01:00
Alexander Larsson 0bfb064030 Update exports on uninstall too 2016-02-09 14:50:20 +01:00
Alexander Larsson 32e9502675 Fix some g_propagate_error typos 2016-02-08 16:16:38 +01:00
Alexander Larsson dd1e967b60 Don't export app-info files
Also, pick up the non-exported files when updating the appdata branch
2016-02-08 10:19:30 +01:00
Alexander Larsson 74b7779cde install-app: Actually look for apps, not runtimes 2016-02-03 14:03:42 +01:00
Alexander Larsson 1d5fb6438b Add xdg-app info command 2016-02-02 17:51:10 +01:00
Alexander Larsson bd174d90bc install: Only set current for apps, not for runtimes 2016-01-29 15:54:54 +01:00
Alexander Larsson 4ac5befb7f Support a proxy on the system bus similar to the one on the session bus 2016-01-29 08:50:11 +01:00
Alexander Larsson 6349b3ffc1 helper: Make user namespace support vs setuid a runtime, not build-time option
We now check at runtime if we have raised privs, and only if not so do we try
to use unprivileged user namespaces. This means you can build xdg-app however,
and then setuid/setcap the binary however you want afterwards.
2016-01-28 09:43:45 +01:00
Alexander Larsson 7f05ac562c update: Make both branch and name optional
We know what is installed, so we just update everything
that you don't specify the details for.
2016-01-22 15:21:20 +01:00
Alexander Larsson 62c0d3ad3d build-export: Never export files you can't read
It makes no sense to have these in a runtime or an app, it just
causes issues.
2016-01-22 12:21:49 +01:00
Alexander Larsson 03905e181a build-init: Also use the new cp_a for sdk extensions 2016-01-22 11:58:35 +01:00
Alexander Larsson c2eea29cde build-init: Don't copy uid/gid when initializing a writable sdk
This is not permitted if the sdk is system installed.
2016-01-22 11:45:01 +01:00
Alexander Larsson 22ec9837bf build: When using a writable /usr, don't use runtime extensions
These are readonly and writes there will fail. Instead you need
to pass the --sdk-extensions you want explicitly to build-init.
2016-01-22 10:34:47 +01:00
Alexander Larsson 8d0d4636c5 build-finish: Export app-info, not appdata 2016-01-21 17:11:22 +01:00
Alexander Larsson 022b9876f7 build-init: Add --sdk-extension 2016-01-20 14:00:53 +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 2abe3ff911 Fix possible read of uninitialized variable 2016-01-19 12:38:03 +01:00
Alexander Larsson 071561637a Remove unused variables 2016-01-19 12:37:51 +01:00
Alexander Larsson 2c08cdc4e0 override: Fix warning 2016-01-19 12:32:04 +01:00
Alexander Larsson 9e8ca412f5 build-update-repo: Add --prune and --prune-depth options 2016-01-19 12:26:45 +01:00
Alexander Larsson 24ec8445a3 override: Fix error if override file doesn't already exist 2016-01-19 12:09:54 +01:00
Alexander Larsson 6e204a4d2e Add support to gpg sign summaries and appstream 2016-01-18 21:36:57 +01:00
Alexander Larsson de7e19e40f The plural of appdata is appstream 2016-01-18 21:06: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 efad98815a build-export: Add --include option 2016-01-18 11:22:25 +01:00
Alexander Larsson 51e9fa2b8d build-update-repo: Add --appdata update option 2016-01-15 15:59:22 +01:00
Alexander Larsson cd2c5af974 build-repo-update: Update appdata branch using appdata-builder 2016-01-15 14:39:11 +01:00
Alexander Larsson cb971722fe Better handling of the title in the summary
Now we store the title in the repo config and re-apply it every time
we regenerate the summary.
2016-01-14 21:26:51 +01:00
Alexander Larsson 5a12157add remote-ls: Regularize --runtime and --app user 2016-01-13 17:21:08 +01:00
Alexander Larsson 025fa4e4d6 Merge list-apps and list-runtimes into single list command 2016-01-13 17:02:15 +01:00
Alexander Larsson 123626b36f xdg-app: Update the command names and make nicer usage output
All the *-remote commands are changed to remote-* and otherwise made
more regulare.

The usage output is split into titled subsections and has per-command
descriptions.
2016-01-13 16:09:30 +01:00
Alexander Larsson f7a1fdaa99 xdg-app: Deprecate install/update/uninstall-app/runtime
We just have install/updata/uninstall and have --app and --runtime
options if you really want to specify the type. Otherwise we just
automatically chose the right thing.
2016-01-13 15:34:08 +01:00
Alexander Larsson 46ef2824dd build-finish: Export appdata files 2016-01-12 16:33:20 +01:00
Alexander Larsson 0823d1960c install: Fix printing of NULL in already-installed error message 2016-01-12 15:13:02 +01:00
Alexander Larsson e1cb723c55 build: Add --bind-mount and --build-dir arguments 2016-01-12 10:42:04 +01:00
Alexander Larsson 1934562ca2 run: Be more flexible with --runtime option, and add --runtime-version
This makes it easier to experiment with running an app with a
different runtime.
2016-01-12 09:57:20 +01:00
Alexander Larsson 6701207ca7 build-finish: Don't leave empty directories in the exports dir 2016-01-12 09:22:52 +01:00
Alexander Larsson 13d07d6a6f builder: Add support for exporting with --repo=foo 2016-01-11 15:35:17 +01:00
Alexander Larsson 1fb39381b2 export: Allow custom source for "files" and "metadata" 2016-01-11 14:37:51 +01:00
Alexander Larsson 33f634ec67 export: Support --exclude 2016-01-11 13:57:59 +01:00
Alexander Larsson fc5ded5b3c builder: Clean up how the commit filters work
Now we do the path filtering manually and just rewrite the info in the
filter.
2016-01-11 13:06:37 +01:00
Alexander Larsson e0af4441b3 build-export: FLAGS_GENERATE_SIZES when commiting 2015-12-23 14:58:28 +01:00
Alexander Larsson 9a41938a1b add-remote: Fix typo in no-enumerate handling 2015-12-21 22:43:08 +01:00
Alexander Larsson b510465e31 add-remote: Fix typo in prio handling 2015-12-21 22:40:31 +01:00
Alexander Larsson 116ae4f440 build-export: Look in the right keyfile group when exporting runtimes 2015-12-21 22:22:00 +01:00
Alexander Larsson 6ddee9905b build-export: Add --runtime commit support 2015-12-21 15:38:42 +01:00
Alexander Larsson 3adb84e368 build-finish: Add --no-exports 2015-12-21 15:37:26 +01:00
Alexander Larsson cd490d12a7 XdgAppDir: Touch .changes file each time something changes 2015-12-21 11:12:25 +01:00
Alexander Larsson ea543c8f93 lib/app: Add support for repo priorities
New repos default to prio 1, bundle repos default to prio 0.
Listing repos returns in sorted order, with add order as secondary
sort key.
2015-12-21 10:28:15 +01:00
Alexander Larsson 22c1229ea8 install-bundle: Make the repo title shorter 2015-12-21 10:19:22 +01:00
Alexander Larsson 8a6cee3e46 list-remotes: Default to list only system remotes
This matches what install-* would use and also makes the bash completion
more sane.
2015-12-21 10:02:48 +01:00
Alexander Larsson cad13521fe apps: Make it more obvious that system repo is default
In the install-* and other commands where the dir is initialized from
the args, document that the system repo is the default in the usage
help.
2015-12-21 10:01:00 +01:00
Alexander Larsson e87e2b7736 common: Add xdg_app_dir_read_latest helper 2015-12-18 11:54:12 +01:00
Alexander Larsson b9b9ad9ccc app: Support --no-pull and --no-deploy in the install and update commands
This adds general support for the local app branch to be further ahead
of the active deployement, including showing this in list-app and
list-runtime commands.
2015-12-18 11:41:07 +01:00
Alexander Larsson dd210ed6cc app: Use space, not tab to delimit columns
Tabs were using way to much space
2015-12-18 11:18:24 +01:00
Alexander Larsson 1f059c9f5f app: Limit commit id output to 12 chars 2015-12-18 11:17:19 +01:00
Alexander Larsson c3522e7a65 list-*: Show active commit ids 2015-12-18 11:11:14 +01:00
Alexander Larsson 80c6a8b66c ls-remote: Support showing remote commit ids 2015-12-18 11:04:41 +01:00
Alexander Larsson f9b9f70fad common: Add xdg_app_strcmp0_ptr and use it in all g_ptr_array_sort calls 2015-12-18 10:41:34 +01:00
Alexander Larsson 1baa77f107 build-init: Allow writable sdk 2015-12-15 19:36:06 +01:00
Alexander Larsson 8b5208a995 Add lock file for each xdg-app dir.
This protects the stuff outside the repo (such as deploys, exports,
active checkout, current branch, etc). However, we rely on ostree
concurrency handling for handling concurrent pulls and prunes.

For reading (e.g. list-apps, etc), we don't do any locking, as these
all writes are essentially updated atomically (last change is atomic) and
any once you return such information it could be out of date anyway.
2015-12-15 16:20:28 +01:00
Alexander Larsson be4f0d86d8 common: Add and use xdg_app_dir_deploy_update() 2015-12-15 15:21:00 +01:00
Alexander Larsson 604f71937a Use xdg_app_compose_ref helper 2015-12-15 14:58:12 +01:00
Alexander Larsson 6cdbf400b2 lib: Add xdg_app_dir_undeploy_all and xdg_app_dir_remove_ref helpers 2015-12-15 14:36:17 +01:00
Alexander Larsson 43a09b3646 Fix unused variable warnings 2015-12-15 14:34:52 +01:00
Alexander Larsson 4531c91519 app: Clean up leftover removes after updates too 2015-12-15 12:43:22 +01:00
Alexander Larsson 9285d055ab lib: Add xdg_app_installation_install 2015-12-15 12:26:59 +01:00
Alexander Larsson f8e9b74d1f XdgAppDir: Add set_origin helper function 2015-12-15 09:25:02 +01:00
Alexander Larsson 6eea2d4fb1 app: Fix warning if building with --disable-userns 2015-12-15 08:44:26 +01:00
Alexander Larsson 67e52e8278 common: Clean up xdg_app_run_app()
This breaks things out into helper functions to make things easier
to read.
2015-12-07 13:04:45 +01:00
Alexander Larsson 03ae229751 Move most of builtins-run to xdg_app_run_app helper
This is in preparation for letting the library start apps.
2015-12-07 12:27:53 +01:00
Alexander Larsson ad7b379398 Add no-enumerate flag to remote and set if for bundle origin remotes 2015-12-04 11:40:51 +01:00
Alexander Larsson 704300e1b4 Add xdg_app_dir_fetch_remote_title and remote old custom summary fetcher 2015-12-04 11:09:00 +01:00
Alexander Larsson 4cdec26264 list/ls-remotes: Use the new remote helpers 2015-12-04 10:48:26 +01:00
Alexander Larsson f2c9663169 ls-remote: Remove unnecessary code
Summary refs never have a remote prefix
2015-12-03 22:40:55 +01:00
Alexander Larsson 3ce0c6f7f9 document portal: Add AddNamed method for host-side use
This is needed for the "save as" file selector portal
2015-12-02 15:55:41 +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 f4eefa7e04 Create xdg-app-info file in user runtime dir with effective state
This shows the name of the app, the runtime in use and the permissions
that the app has. This is useful for a client to know if e.g. it needs
to use a portal of some sort.
2015-11-26 19:15:49 +01:00
Alexander Larsson 7e1a645f99 build: Set fs access before applying args so you can override it
With this applied you can do:
     xdg-app build  --nofilesystem=host --filesystem=/source/dir appdir
2015-11-25 13:43:37 +01:00
Alexander Larsson ff63e21073 Always make it possible to talk to the built in portals
Unless this is explicitly overrided, it should be safe for anyone
to access the portals. Thats the point of them after all.
2015-11-11 11:26:03 +01:00
Alexander Larsson d9a03f4f4d Drop dump-runtime command for now
This idea was not fully baked, so we should not expose it. We can
ressurect it later when we know better how this would be used.
2015-11-11 10:59:59 +01:00
Alexander Larsson 13b3f19acc Add install-bundle command 2015-11-11 09:38:39 +01:00
Alexander Larsson a418641892 add build-bundle command 2015-11-10 11:57:30 +01:00
Christian Hergert ed6867fe68 build-export: add human readable format to "Content Bytes Written"
It's nice to get a general idea of the size quickly from the build-export
command without counting the number of digits.
2015-10-26 09:07:04 +01:00
Alexander Larsson 477de4c217 Always remove all leftover app/runtime traces on uninstall
Even if there is no deploy directory we make sure to remove any
refs with the same name in the repo, and purge the repo.
2015-10-19 10:41:47 +02:00
Alexander Larsson a4ff61526c uninstall: Don't fail if there is no origin
This could happen if we install from a bundle with no origin
2015-10-19 10:41:47 +02:00
Alexander Larsson 607e3b1849 Always regenerate summary after export-build 2015-10-05 13:05:15 +02:00
Alexander Larsson 7791ea130f build-export: Add support for signing build 2015-10-05 11:13:36 +02:00
Alexander Larsson c66f09b6b6 build-export: Strip out uid/gid and xattrs
These are not important anyway as we ignore them on checkout.
2015-09-30 12:48:50 +02:00