Commit Graph

125 Commits (9a6bf9505402df3e15541106ecf82dd48187d43b)

Author SHA1 Message Date
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
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
Alexander Larsson e9f1054e9c Update docs for new/changes interface 2015-09-17 16:22:52 +02:00
Alexander Larsson 4eeea231e8 Rename repo-contents to ls-remote
This matches the other command names
2015-09-17 15:55:10 +02:00
Alexander Larsson 1ce71f4f60 list-remotes: Use --show-details instead of --details
This makes it consisten with e.g. repo-contents
2015-09-17 15:42:42 +02:00
Alexander Larsson d42bef8f3f list-remotes: Separate columns with tab
Since the title column can often have spaces in it.
2015-09-17 15:39:28 +02:00
Alexander Larsson 0e08979493 add/modify-remote: Support importing trusted gpg keys 2015-09-17 15:27:49 +02:00
Alexander Larsson eb06ade783 Fix unused label warning 2015-09-17 14:55:50 +02:00
Alexander Larsson 4816f95f1e list-remotes: Add more details to remotes list 2015-09-17 12:18:22 +02:00
Alexander Larsson 7bf535ad25 add modify-remote command 2015-09-17 11:37:29 +02:00
Alexander Larsson 7ef861cedf Add new override builtin to override app permissions 2015-09-11 16:07:31 +02:00
Alexander Larsson c87e7e4e4f create dirs with 755, not 777 2015-09-11 15:30:39 +02:00
Alexander Larsson 9d1cfd7688 run: Support system overrides as well as per-user 2015-09-11 13:01:39 +02:00
Alexander Larsson 931922c49d build-finish: Don't export hidden or backup files 2015-09-11 11:00:10 +02:00
Alexander Larsson 90718549ee run: Read per-app override metadata file 2015-09-09 16:31:49 +02:00
Alexander Larsson 6abfb68faf run: Correctly report errors talking to document portal 2015-09-09 15:37:45 +02:00
Alexander Larsson fa3eb15580 export-file: Print the full document pathname 2015-09-08 14:52:43 +02:00
Alexander Larsson ed2763a0da export-file: Fix leak 2015-09-07 16:03:45 +02:00
Alexander Larsson 4be7bdc0f5 export-files: Allow specifying app permissions 2015-09-04 15:39:03 +02:00
Alexander Larsson 7ad47c74ea document-portals: Support unique documents
These document id will not be shared for multiple users. The main
difference is this this makes it safe for the creating app to delete
the document if he wants to (i.e. for temporary docs), and thus we can
grant this additional permission for the calling app.
2015-09-04 14:46:02 +02:00
Alexander Larsson 1f81b81b1a Add xdg-app export-file to export files with the document portal 2015-09-03 22:17:00 +02:00
Alexander Larsson 6775dc1002 Use g_auto(GStrv) instead of glnx_strfreev 2015-08-31 09:51:48 +02:00
Alexander Larsson 52525f46fd Remove ununsed variables reported by clang 2015-08-27 16:13:15 +02:00
Alexander Larsson 2238cc44c3 Change dbus name of session helper to org.freedesktop.XdgApp 2015-08-18 13:33:03 +02:00
Alexander Larsson 08d05a30a3 Automatically start and mount document portal in sandbox 2015-07-10 17:49:59 +02:00
Alexander Larsson 302f88e69d Restructure directories and build
This moves a all source code into separate subdirs per binary. The
helper and the generic stuff goes into lib/ which is then used by all
the others. For now this is a completely internal library, but at
some point we will probably clean it up and expose some subset.

Also, we move the dbus proxy to libexecdir.
2015-07-10 12:15:45 +02:00