From 8cd95d262104869c2dfffd433abebd08e84b0e3f Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 29 Sep 2015 16:12:37 +0200 Subject: [PATCH] Make sure we build against older ostree (without gpg import) This means we work on the f22 ostree version at least. --- app/xdg-app-builtins-add-remote.c | 5 +++++ configure.ac | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/app/xdg-app-builtins-add-remote.c b/app/xdg-app-builtins-add-remote.c index 68d439e7..f4fa68fb 100644 --- a/app/xdg-app-builtins-add-remote.c +++ b/app/xdg-app-builtins-add-remote.c @@ -120,9 +120,14 @@ import_keys (XdgAppDir *dir, if (!open_source_stream (&input_stream, cancellable, error)) return FALSE; +#ifdef HAVE_OSTREE_REPO_REMOTE_GPG_IMPORT if (!ostree_repo_remote_gpg_import (xdg_app_dir_get_repo (dir), remote_name, input_stream, NULL, &imported, cancellable, error)) return FALSE; +#else + if (FALSE) + return xdg_app_fail (error, "gpg key import not supported by libostree, use --no-gpg-verify"); +#endif /* XXX If we ever add internationalization, use ngettext() here. */ g_print ("Imported %u GPG key%s to remote \"%s\"\n", diff --git a/configure.ac b/configure.ac index 4f16cb58..45f73d16 100644 --- a/configure.ac +++ b/configure.ac @@ -59,9 +59,15 @@ AC_SUBST(BASE_LIBS) PKG_CHECK_MODULES(SOUP, [libsoup-2.4]) AC_SUBST(SOUP_CFLAGS) AC_SUBST(SOUP_LIBS) + PKG_CHECK_MODULES(OSTREE, [libgsystem >= 2015.1 ostree-1 >= 2015.3]) AC_SUBST(OSTREE_CFLAGS) AC_SUBST(OSTREE_LIBS) +save_LIBS=$LIBS +LIBS=$OSTREE_LIBS +AC_CHECK_FUNCS(ostree_repo_remote_gpg_import) +LIBS=$save_LIBS + PKG_CHECK_MODULES(FUSE, [fuse]) AC_SUBST(FUSE_CFLAGS) AC_SUBST(FUSE_LIBS)