diff --git a/doc/ostree-summary.xml b/doc/ostree-summary.xml index f193be85..3fa287eb 100644 --- a/doc/ostree-summary.xml +++ b/doc/ostree-summary.xml @@ -76,6 +76,23 @@ Boston, MA 02111-1307, USA. Update the summary file. + + + =KEYID + + + GPG Key ID to sign the delta with. + + + + + =HOMEDIR + + + GPG Homedir to use when looking for keyrings. + + + diff --git a/src/ostree/ot-builtin-summary.c b/src/ostree/ot-builtin-summary.c index ed167b7c..4622ceef 100644 --- a/src/ostree/ot-builtin-summary.c +++ b/src/ostree/ot-builtin-summary.c @@ -26,9 +26,13 @@ #include "otutil.h" static gboolean opt_update; +static char **opt_key_ids; +static char *opt_gpg_homedir; static GOptionEntry options[] = { { "update", 'u', 0, G_OPTION_ARG_NONE, &opt_update, "Update the summary", NULL }, + { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"}, + { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, { NULL } }; @@ -51,6 +55,16 @@ ostree_builtin_summary (int argc, char **argv, GCancellable *cancellable, GError if (!ostree_repo_regenerate_summary (repo, NULL, cancellable, error)) goto out; + + if (opt_key_ids) + { + if (!ostree_repo_add_gpg_signature_summary (repo, + (const gchar **) opt_key_ids, + opt_gpg_homedir, + cancellable, + error)) + goto out; + } } else {