Commit Graph

224 Commits

Author SHA1 Message Date
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
Alexander Larsson
8cd95d2621 Make sure we build against older ostree (without gpg import)
This means we work on the f22 ostree version at least.
2015-09-29 16:12:37 +02:00
Alexander Larsson
279558b6bf cleanup: Simplify code using xdg_app_fail 2015-09-28 16:54:24 +02:00
Alexander Larsson
472a71cdc3 cleanup: Remove unused variables 2015-09-28 16:42:14 +02:00
Alexander Larsson
e4920a8e7e cleanup: Remove trivial use of goto out 2015-09-28 16:40:19 +02:00
Alexander Larsson
b25830d8f9 Add xdg-app dump-runtime command
This creates a tar of the runtime as set up by xdg-app
2015-09-28 10:48:47 +02:00
Alexander Larsson
7af7d61fa0 Make usage_error return FALSE
This allows us to shorten code when returning these errors.
2015-09-25 17:36:38 +02:00
Alexander Larsson
64dae1d7db Accept -d as --show-details in all commands that support it 2015-09-25 09:28:49 +02:00
Alexander Larsson
afda9d54c4 list-apps/runtimes: User table printer 2015-09-24 21:36:35 +02:00
Alexander Larsson
66e61764f3 list-remotes: Add support for listing both user and system remotes 2015-09-24 21:36:35 +02:00
Alexander Larsson
c40f2ad74e Move table printer to xdg-app-utils.c 2015-09-24 21:36:35 +02:00
Alexander Larsson
41af86dc69 Add xdg-app enter command
This lets you enter a sandbox and run a command there, which is useful
for debugging purposes.
2015-09-24 19:23:24 +02:00
Alexander Larsson
ee0cf9a247 add-remote: Allow specifying local pathname instead of uri 2015-09-23 14:55:12 +02:00
Alexander Larsson
75b4f557b4 run: Add /var/config and /var/data to sandbox
These point to the per-app data subdirectories. They are useful alternatives
to the $HOME based names because they have fixed names, and can be used
in e.g. symlinks.
2015-09-23 14:46:20 +02:00
Alexander Larsson
727f50e923 xdg-app build: Support extensions 2015-09-22 13:57:20 +02:00
Alexander Larsson
7240f410ca Support version= in extension metadata 2015-09-18 16:34:34 +02:00
Alexander Larsson
5065e431a2 run: Allow perf and ptrace in debug and build mode.
Without this you can't e.g. run a debugger or profiler in the sandbox.
2015-09-18 14:11:15 +02:00
Alexander Larsson
eec8798f5e document portal: Add support for transient documents
These are useful for passing temporary files.
2015-09-17 20:09:50 +02:00