diff --git a/Makefile-libostree-defines.am b/Makefile-libostree-defines.am index 77748a41..06035157 100644 --- a/Makefile-libostree-defines.am +++ b/Makefile-libostree-defines.am @@ -45,6 +45,7 @@ libostree_public_headers = \ src/libostree/ostree-repo-finder-config.h \ src/libostree/ostree-repo-finder-mount.h \ src/libostree/ostree-repo-finder-override.h \ + src/libostree/ostree-kernel-args.h \ $(NULL) # This one is generated via configure.ac, and the gtk-doc diff --git a/Makefile-libostree.am b/Makefile-libostree.am index dbc9ebb8..46984a75 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -21,8 +21,6 @@ include Makefile-libostree-defines.am -noinst_LTLIBRARIES += libostree-kernel-args.la - if ENABLE_RUST bupsplitpath = @abs_top_builddir@/target/@RUST_TARGET_SUBDIR@/libbupsplit_rs.a @@ -36,13 +34,6 @@ noinst_LTLIBRARIES += libbupsplit.la libbupsplit_la_SOURCES = src/libostree/bupsplit.h src/libostree/bupsplit.c endif # ENABLE_RUST -libostree_kernel_args_la_SOURCES = \ - src/libostree/ostree-kernel-args.h \ - src/libostree/ostree-kernel-args.c \ - $(NULL) -libostree_kernel_args_la_CFLAGS = -I$(srcdir)/libglnx $(OT_INTERNAL_GIO_UNIX_CFLAGS) -libostree_kernel_args_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS) - lib_LTLIBRARIES += libostree-1.la libostreeincludedir = $(includedir)/ostree-1 @@ -135,10 +126,6 @@ libostree_1_la_SOURCES = \ src/libostree/ostree-repo-static-delta-compilation.c \ src/libostree/ostree-repo-static-delta-compilation-analysis.c \ src/libostree/ostree-repo-static-delta-private.h \ - src/libostree/ostree-gpg-verifier.c \ - src/libostree/ostree-gpg-verifier.h \ - src/libostree/ostree-gpg-verify-result.c \ - src/libostree/ostree-gpg-verify-result-private.h \ src/libostree/ostree-autocleanups.h \ src/libostree/ostree-bloom.c \ src/libostree/ostree-bloom-private.h \ @@ -147,6 +134,8 @@ libostree_1_la_SOURCES = \ src/libostree/ostree-repo-finder-config.c \ src/libostree/ostree-repo-finder-mount.c \ src/libostree/ostree-repo-finder-override.c \ + src/libostree/ostree-kernel-args.h \ + src/libostree/ostree-kernel-args.c \ $(NULL) if USE_LIBARCHIVE libostree_1_la_SOURCES += src/libostree/ostree-libarchive-input-stream.h \ @@ -176,6 +165,19 @@ libostree_1_la_SOURCES += \ $(NULL) endif # USE_AVAHI +if USE_GPGME +libostree_1_la_SOURCES += \ + src/libostree/ostree-gpg-verifier.c \ + src/libostree/ostree-gpg-verifier.h \ + src/libostree/ostree-gpg-verify-result.c \ + src/libostree/ostree-gpg-verify-result-private.h \ + $(NULL) +else +libostree_1_la_SOURCES += \ + src/libostree/ostree-gpg-verify-result-dummy.c \ + $(NULL) +endif # USE_GPGME + symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym if BUILDOPT_IS_DEVEL_BUILD symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym @@ -191,7 +193,7 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$( $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_CRYPTO_CFLAGS) \ -fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern' libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) -libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la libostree-kernel-args.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ +libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64 if ENABLE_RUST @@ -258,6 +260,10 @@ libostree_1_la_CFLAGS += $(OT_DEP_SELINUX_CFLAGS) libostree_1_la_LIBADD += $(OT_DEP_SELINUX_LIBS) endif +# XXX: work around clang being passed -fstack-clash-protection which it doesn't understand +# See: https://bugzilla.redhat.com/show_bug.cgi?id=1672012 +INTROSPECTION_SCANNER_ENV = CC=gcc + if BUILDOPT_INTROSPECTION OSTree-1.0.gir: libostree-1.la Makefile OSTree_1_0_gir_EXPORT_PACKAGES = ostree-1 diff --git a/Makefile-man.am b/Makefile-man.am index 8ccbba8c..c27a9a55 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -28,7 +28,7 @@ ostree-admin-status.1 ostree-admin-set-origin.1 ostree-admin-switch.1 \ ostree-admin-undeploy.1 ostree-admin-upgrade.1 ostree-admin-unlock.1 \ ostree-admin-pin.1 \ ostree-admin.1 ostree-cat.1 ostree-checkout.1 ostree-checksum.1 \ -ostree-commit.1 ostree-create-usb.1 ostree-export.1 ostree-gpg-sign.1 \ +ostree-commit.1 ostree-create-usb.1 ostree-export.1 \ ostree-config.1 ostree-diff.1 ostree-find-remotes.1 ostree-fsck.1 \ ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \ ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \ @@ -45,6 +45,10 @@ if BUILDOPT_FUSE man1_files += rofiles-fuse.1 endif +if USE_GPGME +man1_files += ostree-gpg-sign.1 +endif + man5_files = ostree.repo.5 ostree.repo-config.5 man1_MANS = $(addprefix man/,$(man1_files)) diff --git a/Makefile-ostree.am b/Makefile-ostree.am index 8d352e38..76f39cad 100644 --- a/Makefile-ostree.am +++ b/Makefile-ostree.am @@ -34,7 +34,6 @@ ostree_SOURCES = src/ostree/main.c \ src/ostree/ot-builtin-export.c \ src/ostree/ot-builtin-find-remotes.c \ src/ostree/ot-builtin-fsck.c \ - src/ostree/ot-builtin-gpg-sign.c \ src/ostree/ot-builtin-init.c \ src/ostree/ot-builtin-pull-local.c \ src/ostree/ot-builtin-log.c \ @@ -65,6 +64,12 @@ ostree_SOURCES += \ $(NULL) endif +if USE_GPGME +ostree_SOURCES += \ + src/ostree/ot-builtin-gpg-sign.c \ + $(NULL) +endif + # Admin subcommand ostree_SOURCES += \ src/ostree/ot-admin-builtin-init-fs.c \ @@ -95,13 +100,18 @@ ostree_SOURCES += \ src/ostree/ot-remote-builtins.h \ src/ostree/ot-remote-builtin-add.c \ src/ostree/ot-remote-builtin-delete.c \ - src/ostree/ot-remote-builtin-gpg-import.c \ src/ostree/ot-remote-builtin-list.c \ src/ostree/ot-remote-builtin-show-url.c \ src/ostree/ot-remote-builtin-refs.c \ src/ostree/ot-remote-builtin-summary.c \ $(NULL) +if USE_GPGME +ostree_SOURCES += \ + src/ostree/ot-remote-builtin-gpg-import.c \ + $(NULL) +endif + if USE_CURL_OR_SOUP ostree_SOURCES += src/ostree/ot-remote-builtin-add-cookie.c \ @@ -125,7 +135,7 @@ ostree_bin_shared_ldadd = $(AM_LDFLAGS) libglnx.la libotutil.la libostree-1.la \ $(OT_INTERNAL_GIO_UNIX_LIBS) ostree_CFLAGS = $(ostree_bin_shared_cflags) -ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la libostree-kernel-args.la $(LIBSYSTEMD_LIBS) +ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la $(LIBSYSTEMD_LIBS) if USE_CURL_OR_SOUP diff --git a/Makefile-otutil.am b/Makefile-otutil.am index 5bafb2d0..e8901b57 100644 --- a/Makefile-otutil.am +++ b/Makefile-otutil.am @@ -40,11 +40,17 @@ libotutil_la_SOURCES = \ src/libotutil/ot-variant-builder.h \ src/libotutil/ot-gio-utils.c \ src/libotutil/ot-gio-utils.h \ - src/libotutil/ot-gpg-utils.c \ - src/libotutil/ot-gpg-utils.h \ src/libotutil/otutil.h \ src/libotutil/ot-tool-util.c \ src/libotutil/ot-tool-util.h \ $(NULL) + +if USE_GPGME +libotutil_la_SOURCES += \ + src/libotutil/ot-gpg-utils.c \ + src/libotutil/ot-gpg-utils.h \ + $(NULL) +endif + libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(LIBSYSTEMD_CFLAGS) libotutil_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) $(LIBSYSTEMD_LIBS) diff --git a/Makefile-tests.am b/Makefile-tests.am index 2c0916f6..5498fd43 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -68,7 +68,6 @@ _installed_or_uninstalled_test_scripts = \ tests/test-archivez.sh \ tests/test-remote-add.sh \ tests/test-remote-headers.sh \ - tests/test-remote-gpg-import.sh \ tests/test-commit-sign.sh \ tests/test-export.sh \ tests/test-help.sh \ @@ -91,7 +90,6 @@ _installed_or_uninstalled_test_scripts = \ tests/test-pull-localcache.sh \ tests/test-local-pull.sh \ tests/test-local-pull-depth.sh \ - tests/test-gpg-signed-commit.sh \ tests/test-admin-upgrade-unconfigured.sh \ tests/test-admin-upgrade-endoflife.sh \ tests/test-admin-upgrade-systemd-update.sh \ @@ -110,7 +108,6 @@ _installed_or_uninstalled_test_scripts = \ tests/test-admin-pull-deploy-split.sh \ tests/test-admin-locking.sh \ tests/test-admin-deploy-clean.sh \ - tests/test-admin-gpg.sh \ tests/test-reset-nonlinear.sh \ tests/test-oldstyle-partial.sh \ tests/test-delta.sh \ @@ -139,6 +136,14 @@ _installed_or_uninstalled_test_scripts = \ tests/test-config.sh \ $(NULL) +if USE_GPGME +_installed_or_uninstalled_test_scripts += \ + tests/test-remote-gpg-import.sh \ + tests/test-gpg-signed-commit.sh \ + tests/test-admin-gpg.sh \ + $(NULL) +endif + experimental_test_scripts = \ $(NULL) test_extra_programs = \ @@ -200,6 +205,7 @@ dist_test_extra_scripts = \ tests/ostree-grub-generator \ $(NULL) +if USE_GPGME # We can't use nobase_ as we need to strip off the tests/, can't # use plain installed_ as we do need the gpghome/ prefix. if ENABLE_INSTALLED_TESTS @@ -217,6 +223,7 @@ gpgvinsttestdir = $(installed_testdir)/gpg-verify-data dist_gpgvinsttest_DATA = $(addprefix tests/gpg-verify-data/, \ gpg.conf lgpl2 lgpl2.sig pubring.gpg secring.gpg trustdb.gpg) endif +endif js_installed_tests = \ tests/test-core.js \ @@ -245,8 +252,14 @@ endif _installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \ tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \ - tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \ - tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h + tests/test-checksum tests/test-lzma tests/test-rollsum \ + tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h tests/test-kargs + +if USE_GPGME +_installed_or_uninstalled_test_programs += \ + tests/test-gpg-verify-result \ + $(NULL) +endif if USE_AVAHI test_programs += tests/test-repo-finder-avahi @@ -295,6 +308,10 @@ tests_test_repo_finder_avahi_CFLAGS = $(TESTS_CFLAGS) tests_test_repo_finder_avahi_LDADD = $(TESTS_LDADD) endif +tests_test_kargs_SOURCES = src/libostree/ostree-kernel-args.c tests/test-kargs.c +tests_test_kargs_CFLAGS = $(TESTS_CFLAGS) +tests_test_kargs_LDADD = $(TESTS_LDADD) + tests_test_repo_finder_config_SOURCES = tests/test-repo-finder-config.c tests_test_repo_finder_config_CFLAGS = $(TESTS_CFLAGS) tests_test_repo_finder_config_LDADD = $(TESTS_LDADD) @@ -350,16 +367,21 @@ tests_test_lzma_SOURCES = src/libostree/ostree-lzma-common.c src/libostree/ostre tests_test_lzma_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_LZMA_CFLAGS) tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS) +if USE_GPGME tests_test_gpg_verify_result_SOURCES = \ src/libostree/ostree-gpg-verify-result-private.h \ tests/test-gpg-verify-result.c tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS) +EXTRA_DIST += \ + tests/gpg-verify-data/README.md \ + $(NULL) +endif + EXTRA_DIST += \ tests/libostreetest.h \ tests/libtest.sh \ - tests/gpg-verify-data/README.md \ $(NULL) tests/libreaddir-rand.so: Makefile diff --git a/Makefile.am b/Makefile.am index 4850cddd..cd04a055 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,8 +57,10 @@ OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS) OT_INTERNAL_SOUP_LIBS = $(OT_DEP_SOUP_LIBS) # This canonicalizes the PKG_CHECK_MODULES or AM_PATH_GPGME results +if USE_GPGME OT_INTERNAL_GPGME_CFLAGS = $(OT_DEP_GPGME_CFLAGS) $(GPGME_PTHREAD_CFLAGS) OT_INTERNAL_GPGME_LIBS = $(OT_DEP_GPGME_LIBS) $(GPGME_PTHREAD_LIBS) +endif if BUILDOPT_INTROSPECTION include $(INTROSPECTION_MAKEFILE) diff --git a/Makefile.in b/Makefile.in index c3f4ff27..ce89b39d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -383,13 +383,13 @@ host_triplet = @host@ bin_PROGRAMS = ostree$(EXEEXT) $(am__EXEEXT_1) sbin_PROGRAMS = libexec_PROGRAMS = -pkglibexec_PROGRAMS = $(am__EXEEXT_18) -noinst_PROGRAMS = $(am__EXEEXT_15) tests/test-rollsum-cli$(EXEEXT) -ostree_boot_PROGRAMS = $(am__EXEEXT_16) $(am__EXEEXT_17) -TESTS = $(am__EXEEXT_7) $(am__EXEEXT_25) \ - $(dist_uninstalled_test_scripts) $(am__EXEEXT_12) -installed_test_PROGRAMS = $(am__EXEEXT_14) -check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) +pkglibexec_PROGRAMS = $(am__EXEEXT_19) +noinst_PROGRAMS = $(am__EXEEXT_16) tests/test-rollsum-cli$(EXEEXT) +ostree_boot_PROGRAMS = $(am__EXEEXT_17) $(am__EXEEXT_18) +TESTS = $(am__EXEEXT_8) $(am__EXEEXT_27) \ + $(dist_uninstalled_test_scripts) $(am__EXEEXT_13) +installed_test_PROGRAMS = $(am__EXEEXT_15) +check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) @ENABLE_ALWAYS_BUILD_TESTS_TRUE@am__append_1 = $(all_test_ltlibs) @ENABLE_ALWAYS_BUILD_TESTS_TRUE@am__append_2 = $(all_test_programs) @ENABLE_ALWAYS_BUILD_TESTS_TRUE@am__append_3 = $(all_test_scripts) @@ -417,37 +417,53 @@ check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) @ENABLE_INSTALLED_TESTS_TRUE@am__append_13 = $(installed_test_meta_DATA) @ENABLE_GTK_DOC_TRUE@am__append_14 = apidoc @ENABLE_RUST_TRUE@am__append_15 = $(srcdir)/rust/Cargo.toml $(srcdir)/rust/cargo-vendor-config -@ENABLE_RUST_TRUE@am__append_16 = $(BUPSPLIT_RUST_SRCS) -@ENABLE_RUST_FALSE@am__append_17 = libbupsplit.la -@USE_LIBARCHIVE_TRUE@am__append_18 = src/libostree/ostree-libarchive-input-stream.h \ +@USE_GPGME_TRUE@am__append_16 = \ +@USE_GPGME_TRUE@ src/libotutil/ot-gpg-utils.c \ +@USE_GPGME_TRUE@ src/libotutil/ot-gpg-utils.h \ +@USE_GPGME_TRUE@ $(NULL) + +@ENABLE_RUST_TRUE@am__append_17 = $(BUPSPLIT_RUST_SRCS) +@ENABLE_RUST_FALSE@am__append_18 = libbupsplit.la +@USE_LIBARCHIVE_TRUE@am__append_19 = src/libostree/ostree-libarchive-input-stream.h \ @USE_LIBARCHIVE_TRUE@ src/libostree/ostree-libarchive-input-stream.c \ @USE_LIBARCHIVE_TRUE@ src/libostree/ostree-libarchive-private.h \ @USE_LIBARCHIVE_TRUE@ $(NULL) -@HAVE_LIBSOUP_CLIENT_CERTS_TRUE@am__append_19 = \ +@HAVE_LIBSOUP_CLIENT_CERTS_TRUE@am__append_20 = \ @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ src/libostree/ostree-tls-cert-interaction.c \ @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ src/libostree/ostree-tls-cert-interaction.h \ @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ $(NULL) -@ENABLE_EXPERIMENTAL_API_FALSE@am__append_20 = $(libostree_experimental_headers) -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_21 = \ +@ENABLE_EXPERIMENTAL_API_FALSE@am__append_21 = $(libostree_experimental_headers) +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_22 = \ @ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) -@USE_AVAHI_TRUE@am__append_22 = \ +@USE_AVAHI_TRUE@am__append_23 = \ @USE_AVAHI_TRUE@ src/libostree/ostree-repo-finder-avahi-parser.c \ @USE_AVAHI_TRUE@ src/libostree/ostree-repo-finder-avahi-private.h \ @USE_AVAHI_TRUE@ $(NULL) -@BUILDOPT_IS_DEVEL_BUILD_TRUE@am__append_23 = $(top_srcdir)/src/libostree/libostree-devel.sym +@USE_GPGME_TRUE@am__append_24 = \ +@USE_GPGME_TRUE@ src/libostree/ostree-gpg-verifier.c \ +@USE_GPGME_TRUE@ src/libostree/ostree-gpg-verifier.h \ +@USE_GPGME_TRUE@ src/libostree/ostree-gpg-verify-result.c \ +@USE_GPGME_TRUE@ src/libostree/ostree-gpg-verify-result-private.h \ +@USE_GPGME_TRUE@ $(NULL) + +@USE_GPGME_FALSE@am__append_25 = \ +@USE_GPGME_FALSE@ src/libostree/ostree-gpg-verify-result-dummy.c \ +@USE_GPGME_FALSE@ $(NULL) + +@BUILDOPT_IS_DEVEL_BUILD_TRUE@am__append_26 = $(top_srcdir)/src/libostree/libostree-devel.sym # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64 -@ENABLE_RUST_TRUE@am__append_24 = -ldl -@USE_LIBARCHIVE_TRUE@am__append_25 = $(OT_DEP_LIBARCHIVE_CFLAGS) -@USE_LIBARCHIVE_TRUE@am__append_26 = $(OT_DEP_LIBARCHIVE_LIBS) -@USE_AVAHI_TRUE@am__append_27 = $(OT_DEP_AVAHI_CFLAGS) -@USE_AVAHI_TRUE@am__append_28 = $(OT_DEP_AVAHI_LIBS) -@BUILDOPT_LIBSYSTEMD_TRUE@am__append_29 = $(LIBSYSTEMD_CFLAGS) -@BUILDOPT_LIBSYSTEMD_TRUE@am__append_30 = $(LIBSYSTEMD_LIBS) -@USE_CURL_OR_SOUP_TRUE@am__append_31 = \ +@ENABLE_RUST_TRUE@am__append_27 = -ldl +@USE_LIBARCHIVE_TRUE@am__append_28 = $(OT_DEP_LIBARCHIVE_CFLAGS) +@USE_LIBARCHIVE_TRUE@am__append_29 = $(OT_DEP_LIBARCHIVE_LIBS) +@USE_AVAHI_TRUE@am__append_30 = $(OT_DEP_AVAHI_CFLAGS) +@USE_AVAHI_TRUE@am__append_31 = $(OT_DEP_AVAHI_LIBS) +@BUILDOPT_LIBSYSTEMD_TRUE@am__append_32 = $(LIBSYSTEMD_CFLAGS) +@BUILDOPT_LIBSYSTEMD_TRUE@am__append_33 = $(LIBSYSTEMD_LIBS) +@USE_CURL_OR_SOUP_TRUE@am__append_34 = \ @USE_CURL_OR_SOUP_TRUE@ src/libostree/ostree-fetcher.h \ @USE_CURL_OR_SOUP_TRUE@ src/libostree/ostree-fetcher-util.h \ @USE_CURL_OR_SOUP_TRUE@ src/libostree/ostree-fetcher-util.c \ @@ -456,35 +472,43 @@ check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) @USE_CURL_OR_SOUP_TRUE@ src/libostree/ostree-metalink.c \ @USE_CURL_OR_SOUP_TRUE@ $(NULL) -@USE_CURL_TRUE@am__append_32 = src/libostree/ostree-fetcher-curl.c \ +@USE_CURL_TRUE@am__append_35 = src/libostree/ostree-fetcher-curl.c \ @USE_CURL_TRUE@ src/libostree/ostree-soup-uri.h src/libostree/ostree-soup-uri.c \ @USE_CURL_TRUE@ src/libostree/ostree-soup-form.c \ @USE_CURL_TRUE@ $(NULL) -@USE_CURL_TRUE@am__append_33 = $(OT_DEP_CURL_CFLAGS) -@USE_CURL_TRUE@am__append_34 = $(OT_DEP_CURL_LIBS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_35 = src/libostree/ostree-fetcher-soup.c -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_36 = $(OT_INTERNAL_SOUP_CFLAGS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_37 = $(OT_INTERNAL_SOUP_LIBS) -@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__append_38 = src/libostree/ostree-soup-uri.h \ +@USE_CURL_TRUE@am__append_36 = $(OT_DEP_CURL_CFLAGS) +@USE_CURL_TRUE@am__append_37 = $(OT_DEP_CURL_LIBS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_38 = src/libostree/ostree-fetcher-soup.c +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_39 = $(OT_INTERNAL_SOUP_CFLAGS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_40 = $(OT_INTERNAL_SOUP_LIBS) +@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__append_41 = src/libostree/ostree-soup-uri.h \ @USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@ src/libostree/ostree-soup-uri.c \ @USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@ src/libostree/ostree-soup-form.c \ @USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@ $(NULL) -@USE_LIBMOUNT_TRUE@am__append_39 = $(OT_DEP_LIBMOUNT_CFLAGS) -@USE_LIBMOUNT_TRUE@am__append_40 = $(OT_DEP_LIBMOUNT_LIBS) -@USE_SELINUX_TRUE@am__append_41 = $(OT_DEP_SELINUX_CFLAGS) -@USE_SELINUX_TRUE@am__append_42 = $(OT_DEP_SELINUX_LIBS) +@USE_LIBMOUNT_TRUE@am__append_42 = $(OT_DEP_LIBMOUNT_CFLAGS) +@USE_LIBMOUNT_TRUE@am__append_43 = $(OT_DEP_LIBMOUNT_LIBS) +@USE_SELINUX_TRUE@am__append_44 = $(OT_DEP_SELINUX_CFLAGS) +@USE_SELINUX_TRUE@am__append_45 = $(OT_DEP_SELINUX_LIBS) # When compiling this is set via config.h, but g-ir-scanner can't use that -@BUILDOPT_INTROSPECTION_TRUE@@ENABLE_EXPERIMENTAL_API_TRUE@am__append_43 = -DOSTREE_ENABLE_EXPERIMENTAL_API=1 -@BUILDOPT_INTROSPECTION_TRUE@am__append_44 = OSTree-1.0.gir -@BUILDOPT_INTROSPECTION_TRUE@am__append_45 = OSTree-1.0.gir -@BUILDOPT_INTROSPECTION_TRUE@am__append_46 = OSTree-1.0.typelib -@BUILDOPT_INTROSPECTION_TRUE@am__append_47 = $(gir_DATA) $(typelib_DATA) -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_48 = \ +@BUILDOPT_INTROSPECTION_TRUE@@ENABLE_EXPERIMENTAL_API_TRUE@am__append_46 = -DOSTREE_ENABLE_EXPERIMENTAL_API=1 +@BUILDOPT_INTROSPECTION_TRUE@am__append_47 = OSTree-1.0.gir +@BUILDOPT_INTROSPECTION_TRUE@am__append_48 = OSTree-1.0.gir +@BUILDOPT_INTROSPECTION_TRUE@am__append_49 = OSTree-1.0.typelib +@BUILDOPT_INTROSPECTION_TRUE@am__append_50 = $(gir_DATA) $(typelib_DATA) +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_51 = \ @ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) -@USE_CURL_OR_SOUP_TRUE@am__append_49 = src/ostree/ot-remote-builtin-add-cookie.c \ +@USE_GPGME_TRUE@am__append_52 = \ +@USE_GPGME_TRUE@ src/ostree/ot-builtin-gpg-sign.c \ +@USE_GPGME_TRUE@ $(NULL) + +@USE_GPGME_TRUE@am__append_53 = \ +@USE_GPGME_TRUE@ src/ostree/ot-remote-builtin-gpg-import.c \ +@USE_GPGME_TRUE@ $(NULL) + +@USE_CURL_OR_SOUP_TRUE@am__append_54 = src/ostree/ot-remote-builtin-add-cookie.c \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ot-remote-builtin-delete-cookie.c \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ot-remote-builtin-list-cookies.c \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ot-remote-cookie-util.h \ @@ -492,60 +516,75 @@ check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) @USE_CURL_OR_SOUP_TRUE@ $(NULL) src/ostree/ot-builtin-pull.c # Eventually once we stop things from using this, we should support disabling this -@USE_LIBSOUP_TRUE@am__append_50 = src/ostree/ot-builtin-trivial-httpd.c -@USE_LIBSOUP_TRUE@am__append_51 = ostree-trivial-httpd +@USE_LIBSOUP_TRUE@am__append_55 = src/ostree/ot-builtin-trivial-httpd.c +@USE_LIBSOUP_TRUE@am__append_56 = ostree-trivial-httpd # This is necessary for the cookie jar bits -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_52 = $(OT_INTERNAL_SOUP_CFLAGS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_53 = $(OT_INTERNAL_SOUP_LIBS) -@USE_LIBARCHIVE_TRUE@am__append_54 = $(OT_DEP_LIBARCHIVE_CFLAGS) -@USE_LIBARCHIVE_TRUE@am__append_55 = $(OT_DEP_LIBARCHIVE_LIBS) -@BUILDOPT_SYSTEMD_TRUE@am__append_56 = ostree-remount +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_57 = $(OT_INTERNAL_SOUP_CFLAGS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_58 = $(OT_INTERNAL_SOUP_LIBS) +@USE_LIBARCHIVE_TRUE@am__append_59 = $(OT_DEP_LIBARCHIVE_CFLAGS) +@USE_LIBARCHIVE_TRUE@am__append_60 = $(OT_DEP_LIBARCHIVE_LIBS) +@BUILDOPT_SYSTEMD_TRUE@am__append_61 = ostree-remount # It is built anyway as a side-effect of having the symlink in tests/, # and if we declare it here, it gets cleaned up properly -@BUILDOPT_SYSTEMD_FALSE@am__append_57 = ostree-remount -@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_58 = ostree-prepare-root -@BUILDOPT_SYSTEMD_TRUE@am__append_59 = -DHAVE_SYSTEMD=1 +@BUILDOPT_SYSTEMD_FALSE@am__append_62 = ostree-remount +@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_63 = ostree-prepare-root +@BUILDOPT_SYSTEMD_TRUE@am__append_64 = -DHAVE_SYSTEMD=1 # This is the "new mode" of using a generator for /var; see # https://github.com/ostreedev/ostree/issues/855 -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_61 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_65 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_66 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT) -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_62 = $(systemdsystemgenerator_PROGRAMS) +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_67 = $(systemdsystemgenerator_PROGRAMS) # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_63 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators' -@BUILDOPT_FUSE_TRUE@am__append_64 = rofiles-fuse -@BUILDOPT_ASAN_TRUE@am__append_65 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_66 = $(experimental_test_scripts) -@ENABLE_EXPERIMENTAL_API_FALSE@am__append_67 = $(experimental_test_scripts) -@BUILDOPT_FUSE_TRUE@am__append_68 = tests/test-rofiles-fuse.sh -@BUILDOPT_FUSE_TRUE@am__append_69 = tests/rofiles-fuse-symlink-stamp -@BUILDOPT_FUSE_FALSE@am__append_70 = tests/test-rofiles-fuse.sh -@USE_LIBSOUP_TRUE@am__append_71 = tests/test-remote-cookies.sh -@BUILDOPT_GJS_TRUE@am__append_72 = $(js_tests) $(js_installed_tests) -@BUILDOPT_GJS_FALSE@am__append_73 = $(js_tests) -@BUILDOPT_GJS_FALSE@am__append_74 = $(js_installed_tests) -@ENABLE_INSTALLED_TESTS_FALSE@am__append_75 = -rpath $(abs_builddir) -@USE_AVAHI_TRUE@am__append_76 = tests/test-repo-finder-avahi -@USE_LIBARCHIVE_TRUE@am__append_77 = tests/test-libarchive-import -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_78 = $(_installed_or_uninstalled_test_scripts) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_79 = $(_installed_or_uninstalled_test_programs) -@ENABLE_INSTALLED_TESTS_TRUE@am__append_80 = install-installed-tests-extra +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_68 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators' +@BUILDOPT_FUSE_TRUE@am__append_69 = rofiles-fuse +@BUILDOPT_ASAN_TRUE@am__append_70 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc +@USE_GPGME_TRUE@am__append_71 = \ +@USE_GPGME_TRUE@ tests/test-remote-gpg-import.sh \ +@USE_GPGME_TRUE@ tests/test-gpg-signed-commit.sh \ +@USE_GPGME_TRUE@ tests/test-admin-gpg.sh \ +@USE_GPGME_TRUE@ $(NULL) + +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_72 = $(experimental_test_scripts) +@ENABLE_EXPERIMENTAL_API_FALSE@am__append_73 = $(experimental_test_scripts) +@BUILDOPT_FUSE_TRUE@am__append_74 = tests/test-rofiles-fuse.sh +@BUILDOPT_FUSE_TRUE@am__append_75 = tests/rofiles-fuse-symlink-stamp +@BUILDOPT_FUSE_FALSE@am__append_76 = tests/test-rofiles-fuse.sh +@USE_LIBSOUP_TRUE@am__append_77 = tests/test-remote-cookies.sh +@BUILDOPT_GJS_TRUE@am__append_78 = $(js_tests) $(js_installed_tests) +@BUILDOPT_GJS_FALSE@am__append_79 = $(js_tests) +@BUILDOPT_GJS_FALSE@am__append_80 = $(js_installed_tests) +@ENABLE_INSTALLED_TESTS_FALSE@am__append_81 = -rpath $(abs_builddir) +@USE_GPGME_TRUE@am__append_82 = \ +@USE_GPGME_TRUE@ tests/test-gpg-verify-result \ +@USE_GPGME_TRUE@ $(NULL) + +@USE_AVAHI_TRUE@am__append_83 = tests/test-repo-finder-avahi +@USE_LIBARCHIVE_TRUE@am__append_84 = tests/test-libarchive-import +@USE_GPGME_TRUE@am__append_85 = \ +@USE_GPGME_TRUE@ tests/gpg-verify-data/README.md \ +@USE_GPGME_TRUE@ $(NULL) + +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_86 = $(_installed_or_uninstalled_test_scripts) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_87 = $(_installed_or_uninstalled_test_programs) +@ENABLE_INSTALLED_TESTS_TRUE@am__append_88 = install-installed-tests-extra # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_TRUE@am__append_81 = --with-systemdsystemunitdir='$${libdir}/systemd/system' +@BUILDOPT_SYSTEMD_TRUE@am__append_89 = --with-systemdsystemunitdir='$${libdir}/systemd/system' # We're using the system grub2-mkconfig generator -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_82 = src/boot/grub2/grub2-15_ostree -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_83 = install-grub2-config-hook -@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_84 = ostree-trivial-httpd.1 +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_90 = src/boot/grub2/grub2-15_ostree +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_91 = install-grub2-config-hook +@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_92 = ostree-trivial-httpd.1 # We still want to distribute the source, even if we are not building it -@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_85 = man/ostree-trivial-httpd.xml -@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_86 = rofiles-fuse.1 -@ENABLE_MAN_TRUE@am__append_87 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) -@ENABLE_MAN_TRUE@am__append_88 = \ +@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_93 = man/ostree-trivial-httpd.xml +@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_94 = rofiles-fuse.1 +@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_95 = ostree-gpg-sign.1 +@ENABLE_MAN_TRUE@am__append_96 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) +@ENABLE_MAN_TRUE@am__append_97 = \ @ENABLE_MAN_TRUE@ $(man1_MANS) \ @ENABLE_MAN_TRUE@ $(man5_MANS) \ @ENABLE_MAN_TRUE@ $(NULL) @@ -603,41 +642,42 @@ am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(libostreeincludedir)" am__EXEEXT_2 = @USE_AVAHI_TRUE@am__EXEEXT_3 = tests/test-repo-finder-avahi$(EXEEXT) -@USE_LIBARCHIVE_TRUE@am__EXEEXT_4 = \ +@USE_GPGME_TRUE@am__EXEEXT_4 = tests/test-gpg-verify-result$(EXEEXT) \ +@USE_GPGME_TRUE@ $(am__EXEEXT_2) +@USE_LIBARCHIVE_TRUE@am__EXEEXT_5 = \ @USE_LIBARCHIVE_TRUE@ tests/test-libarchive-import$(EXEEXT) -am__EXEEXT_5 = tests/test-varint$(EXEEXT) \ +am__EXEEXT_6 = tests/test-varint$(EXEEXT) \ tests/test-ot-unix-utils$(EXEEXT) tests/test-bsdiff$(EXEEXT) \ tests/test-mutable-tree$(EXEEXT) \ tests/test-keyfile-utils$(EXEEXT) \ tests/test-ot-opt-utils$(EXEEXT) \ - tests/test-ot-tool-util$(EXEEXT) \ - tests/test-gpg-verify-result$(EXEEXT) \ - tests/test-checksum$(EXEEXT) tests/test-lzma$(EXEEXT) \ - tests/test-rollsum$(EXEEXT) tests/test-basic-c$(EXEEXT) \ - tests/test-sysroot-c$(EXEEXT) tests/test-pull-c$(EXEEXT) \ - tests/test-repo$(EXEEXT) tests/test-include-ostree-h$(EXEEXT) \ - $(am__EXEEXT_4) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_6 = \ -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_5) -am__EXEEXT_7 = tests/test-bloom$(EXEEXT) \ + tests/test-ot-tool-util$(EXEEXT) tests/test-checksum$(EXEEXT) \ + tests/test-lzma$(EXEEXT) tests/test-rollsum$(EXEEXT) \ + tests/test-basic-c$(EXEEXT) tests/test-sysroot-c$(EXEEXT) \ + tests/test-pull-c$(EXEEXT) tests/test-repo$(EXEEXT) \ + tests/test-include-ostree-h$(EXEEXT) tests/test-kargs$(EXEEXT) \ + $(am__EXEEXT_4) $(am__EXEEXT_5) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_7 = \ +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_6) +am__EXEEXT_8 = tests/test-bloom$(EXEEXT) \ tests/test-repo-finder-config$(EXEEXT) \ tests/test-repo-finder-mount$(EXEEXT) $(am__EXEEXT_2) \ - $(am__EXEEXT_3) $(am__EXEEXT_6) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@am__EXEEXT_8 = $(am__EXEEXT_5) -am__EXEEXT_9 = tests/get-byte-order$(EXEEXT) \ + $(am__EXEEXT_3) $(am__EXEEXT_7) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@am__EXEEXT_9 = $(am__EXEEXT_6) +am__EXEEXT_10 = tests/get-byte-order$(EXEEXT) \ tests/repo-finder-mount$(EXEEXT) $(am__EXEEXT_2) -am__EXEEXT_10 = $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9) -@ENABLE_ALWAYS_BUILD_TESTS_FALSE@am__EXEEXT_11 = $(am__EXEEXT_10) -am__EXEEXT_12 = test-libglnx-xattrs$(EXEEXT) \ +am__EXEEXT_11 = $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) +@ENABLE_ALWAYS_BUILD_TESTS_FALSE@am__EXEEXT_12 = $(am__EXEEXT_11) +am__EXEEXT_13 = test-libglnx-xattrs$(EXEEXT) \ test-libglnx-fdio$(EXEEXT) test-libglnx-errors$(EXEEXT) \ test-libglnx-macros$(EXEEXT) test-libglnx-shutil$(EXEEXT) -@BUILDOPT_SYSTEMD_FALSE@am__EXEEXT_13 = ostree-remount$(EXEEXT) -@ENABLE_INSTALLED_TESTS_TRUE@am__EXEEXT_14 = $(am__EXEEXT_7) \ -@ENABLE_INSTALLED_TESTS_TRUE@ $(am__EXEEXT_8) $(am__EXEEXT_9) -@ENABLE_ALWAYS_BUILD_TESTS_TRUE@am__EXEEXT_15 = $(am__EXEEXT_10) -@BUILDOPT_SYSTEMD_TRUE@am__EXEEXT_16 = ostree-remount$(EXEEXT) -@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__EXEEXT_17 = ostree-prepare-root$(EXEEXT) -@USE_LIBSOUP_TRUE@am__EXEEXT_18 = ostree-trivial-httpd$(EXEEXT) +@BUILDOPT_SYSTEMD_FALSE@am__EXEEXT_14 = ostree-remount$(EXEEXT) +@ENABLE_INSTALLED_TESTS_TRUE@am__EXEEXT_15 = $(am__EXEEXT_8) \ +@ENABLE_INSTALLED_TESTS_TRUE@ $(am__EXEEXT_9) $(am__EXEEXT_10) +@ENABLE_ALWAYS_BUILD_TESTS_TRUE@am__EXEEXT_16 = $(am__EXEEXT_11) +@BUILDOPT_SYSTEMD_TRUE@am__EXEEXT_17 = ostree-remount$(EXEEXT) +@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__EXEEXT_18 = ostree-prepare-root$(EXEEXT) +@USE_LIBSOUP_TRUE@am__EXEEXT_19 = ostree-trivial-httpd$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(installed_test_PROGRAMS) \ $(libexec_PROGRAMS) $(noinst_PROGRAMS) $(ostree_boot_PROGRAMS) \ $(pkglibexec_PROGRAMS) $(sbin_PROGRAMS) \ @@ -704,7 +744,8 @@ libglnx_la_OBJECTS = $(am_libglnx_la_OBJECTS) libglnx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libglnx_la_CFLAGS) \ $(CFLAGS) $(libglnx_la_LDFLAGS) $(LDFLAGS) -o $@ -am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +@USE_GPGME_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \ +@USE_GPGME_TRUE@ $(am__DEPENDENCIES_1) @USE_LIBARCHIVE_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) @USE_AVAHI_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) @BUILDOPT_LIBSYSTEMD_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) @@ -714,13 +755,13 @@ am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @USE_LIBMOUNT_TRUE@am__DEPENDENCIES_9 = $(am__DEPENDENCIES_1) @USE_SELINUX_TRUE@am__DEPENDENCIES_10 = $(am__DEPENDENCIES_1) libostree_1_la_DEPENDENCIES = libotutil.la libglnx.la libbsdiff.la \ - libostree-kernel-args.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(bupsplitpath) $(am__DEPENDENCIES_4) \ - $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \ - $(am__DEPENDENCIES_7) $(am__DEPENDENCIES_8) \ - $(am__DEPENDENCIES_9) $(am__DEPENDENCIES_10) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(bupsplitpath) \ + $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \ + $(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7) \ + $(am__DEPENDENCIES_8) $(am__DEPENDENCIES_9) \ + $(am__DEPENDENCIES_10) am__libostree_1_la_SOURCES_DIST = \ src/libostree/ostree-async-progress.c \ src/libostree/ostree-cmdprivate.h \ @@ -781,10 +822,6 @@ am__libostree_1_la_SOURCES_DIST = \ src/libostree/ostree-repo-static-delta-compilation.c \ src/libostree/ostree-repo-static-delta-compilation-analysis.c \ src/libostree/ostree-repo-static-delta-private.h \ - src/libostree/ostree-gpg-verifier.c \ - src/libostree/ostree-gpg-verifier.h \ - src/libostree/ostree-gpg-verify-result.c \ - src/libostree/ostree-gpg-verify-result-private.h \ src/libostree/ostree-autocleanups.h \ src/libostree/ostree-bloom.c \ src/libostree/ostree-bloom-private.h \ @@ -793,6 +830,8 @@ am__libostree_1_la_SOURCES_DIST = \ src/libostree/ostree-repo-finder-config.c \ src/libostree/ostree-repo-finder-mount.c \ src/libostree/ostree-repo-finder-override.c \ + src/libostree/ostree-kernel-args.h \ + src/libostree/ostree-kernel-args.c \ src/libostree/ostree-libarchive-input-stream.h \ src/libostree/ostree-libarchive-input-stream.c \ src/libostree/ostree-libarchive-private.h \ @@ -800,6 +839,11 @@ am__libostree_1_la_SOURCES_DIST = \ src/libostree/ostree-tls-cert-interaction.h \ src/libostree/ostree-repo-finder-avahi-parser.c \ src/libostree/ostree-repo-finder-avahi-private.h \ + src/libostree/ostree-gpg-verifier.c \ + src/libostree/ostree-gpg-verifier.h \ + src/libostree/ostree-gpg-verify-result.c \ + src/libostree/ostree-gpg-verify-result-private.h \ + src/libostree/ostree-gpg-verify-result-dummy.c \ src/libostree/ostree-fetcher.h \ src/libostree/ostree-fetcher-util.h \ src/libostree/ostree-fetcher-util.c \ @@ -820,16 +864,21 @@ am__objects_4 = $(am__objects_1) @ENABLE_EXPERIMENTAL_API_TRUE@am__objects_6 = $(am__objects_1) @USE_AVAHI_TRUE@am__objects_7 = src/libostree/libostree_1_la-ostree-repo-finder-avahi-parser.lo \ @USE_AVAHI_TRUE@ $(am__objects_1) -@USE_CURL_OR_SOUP_TRUE@am__objects_8 = src/libostree/libostree_1_la-ostree-fetcher-util.lo \ +@USE_GPGME_TRUE@am__objects_8 = src/libostree/libostree_1_la-ostree-gpg-verifier.lo \ +@USE_GPGME_TRUE@ src/libostree/libostree_1_la-ostree-gpg-verify-result.lo \ +@USE_GPGME_TRUE@ $(am__objects_1) +@USE_GPGME_FALSE@am__objects_9 = src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo \ +@USE_GPGME_FALSE@ $(am__objects_1) +@USE_CURL_OR_SOUP_TRUE@am__objects_10 = src/libostree/libostree_1_la-ostree-fetcher-util.lo \ @USE_CURL_OR_SOUP_TRUE@ src/libostree/libostree_1_la-ostree-fetcher-uri.lo \ @USE_CURL_OR_SOUP_TRUE@ src/libostree/libostree_1_la-ostree-metalink.lo \ @USE_CURL_OR_SOUP_TRUE@ $(am__objects_1) -@USE_CURL_TRUE@am__objects_9 = src/libostree/libostree_1_la-ostree-fetcher-curl.lo \ +@USE_CURL_TRUE@am__objects_11 = src/libostree/libostree_1_la-ostree-fetcher-curl.lo \ @USE_CURL_TRUE@ src/libostree/libostree_1_la-ostree-soup-uri.lo \ @USE_CURL_TRUE@ src/libostree/libostree_1_la-ostree-soup-form.lo \ @USE_CURL_TRUE@ $(am__objects_1) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__objects_10 = src/libostree/libostree_1_la-ostree-fetcher-soup.lo -@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__objects_11 = src/libostree/libostree_1_la-ostree-soup-uri.lo \ +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__objects_12 = src/libostree/libostree_1_la-ostree-fetcher-soup.lo +@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__objects_13 = src/libostree/libostree_1_la-ostree-soup-uri.lo \ @USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@ src/libostree/libostree_1_la-ostree-soup-form.lo \ @USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@ $(am__objects_1) am_libostree_1_la_OBJECTS = \ @@ -875,18 +924,17 @@ am_libostree_1_la_OBJECTS = \ src/libostree/libostree_1_la-ostree-repo-static-delta-processing.lo \ src/libostree/libostree_1_la-ostree-repo-static-delta-compilation.lo \ src/libostree/libostree_1_la-ostree-repo-static-delta-compilation-analysis.lo \ - src/libostree/libostree_1_la-ostree-gpg-verifier.lo \ - src/libostree/libostree_1_la-ostree-gpg-verify-result.lo \ src/libostree/libostree_1_la-ostree-bloom.lo \ src/libostree/libostree_1_la-ostree-repo-finder.lo \ src/libostree/libostree_1_la-ostree-repo-finder-avahi.lo \ src/libostree/libostree_1_la-ostree-repo-finder-config.lo \ src/libostree/libostree_1_la-ostree-repo-finder-mount.lo \ src/libostree/libostree_1_la-ostree-repo-finder-override.lo \ + src/libostree/libostree_1_la-ostree-kernel-args.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) \ $(am__objects_8) $(am__objects_9) $(am__objects_10) \ - $(am__objects_11) + $(am__objects_11) $(am__objects_12) $(am__objects_13) nodist_libostree_1_la_OBJECTS = \ src/libostree/libostree_1_la-ostree-enumtypes.lo \ $(am__objects_1) @@ -896,16 +944,6 @@ libostree_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libostree_1_la_CFLAGS) $(CFLAGS) $(libostree_1_la_LDFLAGS) \ $(LDFLAGS) -o $@ -libostree_kernel_args_la_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_libostree_kernel_args_la_OBJECTS = \ - src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo \ - $(am__objects_1) -libostree_kernel_args_la_OBJECTS = \ - $(am_libostree_kernel_args_la_OBJECTS) -libostree_kernel_args_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libostree_kernel_args_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ am__DEPENDENCIES_11 = libglnx.la libotutil.la libostree-1.la \ $(am__DEPENDENCIES_2) am__DEPENDENCIES_12 = $(am__DEPENDENCIES_11) $(am__DEPENDENCIES_2) @@ -919,6 +957,25 @@ libostreetest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ -o $@ libotutil_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) +am__libotutil_la_SOURCES_DIST = src/libotutil/ot-checksum-utils.c \ + src/libotutil/ot-checksum-utils.h \ + src/libotutil/ot-checksum-instream.c \ + src/libotutil/ot-checksum-instream.h \ + src/libotutil/ot-fs-utils.c src/libotutil/ot-fs-utils.h \ + src/libotutil/ot-keyfile-utils.c \ + src/libotutil/ot-keyfile-utils.h src/libotutil/ot-opt-utils.c \ + src/libotutil/ot-opt-utils.h src/libotutil/ot-unix-utils.c \ + src/libotutil/ot-unix-utils.h src/libotutil/ot-variant-utils.c \ + src/libotutil/ot-variant-utils.h \ + src/libotutil/ot-variant-builder.c \ + src/libotutil/ot-variant-builder.h \ + src/libotutil/ot-gio-utils.c src/libotutil/ot-gio-utils.h \ + src/libotutil/otutil.h src/libotutil/ot-tool-util.c \ + src/libotutil/ot-tool-util.h src/libotutil/ot-gpg-utils.c \ + src/libotutil/ot-gpg-utils.h +@USE_GPGME_TRUE@am__objects_14 = \ +@USE_GPGME_TRUE@ src/libotutil/libotutil_la-ot-gpg-utils.lo \ +@USE_GPGME_TRUE@ $(am__objects_1) am_libotutil_la_OBJECTS = \ src/libotutil/libotutil_la-ot-checksum-utils.lo \ src/libotutil/libotutil_la-ot-checksum-instream.lo \ @@ -929,8 +986,8 @@ am_libotutil_la_OBJECTS = \ src/libotutil/libotutil_la-ot-variant-utils.lo \ src/libotutil/libotutil_la-ot-variant-builder.lo \ src/libotutil/libotutil_la-ot-gio-utils.lo \ - src/libotutil/libotutil_la-ot-gpg-utils.lo \ - src/libotutil/libotutil_la-ot-tool-util.lo $(am__objects_1) + src/libotutil/libotutil_la-ot-tool-util.lo $(am__objects_1) \ + $(am__objects_14) libotutil_la_OBJECTS = $(am_libotutil_la_OBJECTS) libotutil_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libotutil_la_CFLAGS) \ @@ -957,8 +1014,7 @@ am__ostree_SOURCES_DIST = src/ostree/main.c \ src/ostree/ot-builtin-create-usb.c \ src/ostree/ot-builtin-diff.c src/ostree/ot-builtin-export.c \ src/ostree/ot-builtin-find-remotes.c \ - src/ostree/ot-builtin-fsck.c src/ostree/ot-builtin-gpg-sign.c \ - src/ostree/ot-builtin-init.c \ + src/ostree/ot-builtin-fsck.c src/ostree/ot-builtin-init.c \ src/ostree/ot-builtin-pull-local.c src/ostree/ot-builtin-log.c \ src/ostree/ot-builtin-ls.c src/ostree/ot-builtin-prune.c \ src/ostree/ot-builtin-refs.c src/ostree/ot-builtin-remote.c \ @@ -968,7 +1024,7 @@ am__ostree_SOURCES_DIST = src/ostree/main.c \ src/ostree/ot-builtin-static-delta.c src/ostree/ot-main.h \ src/ostree/ot-main.c src/ostree/ot-dump.h src/ostree/ot-dump.c \ src/ostree/ot-editor.c src/ostree/ot-editor.h \ - src/ostree/parse-datetime.h \ + src/ostree/parse-datetime.h src/ostree/ot-builtin-gpg-sign.c \ src/ostree/ot-admin-builtin-init-fs.c \ src/ostree/ot-admin-builtin-diff.c \ src/ostree/ot-admin-builtin-deploy.c \ @@ -993,11 +1049,11 @@ am__ostree_SOURCES_DIST = src/ostree/main.c \ src/ostree/ot-remote-builtins.h \ src/ostree/ot-remote-builtin-add.c \ src/ostree/ot-remote-builtin-delete.c \ - src/ostree/ot-remote-builtin-gpg-import.c \ src/ostree/ot-remote-builtin-list.c \ src/ostree/ot-remote-builtin-show-url.c \ src/ostree/ot-remote-builtin-refs.c \ src/ostree/ot-remote-builtin-summary.c \ + src/ostree/ot-remote-builtin-gpg-import.c \ src/ostree/ot-remote-builtin-add-cookie.c \ src/ostree/ot-remote-builtin-delete-cookie.c \ src/ostree/ot-remote-builtin-list-cookies.c \ @@ -1005,13 +1061,17 @@ am__ostree_SOURCES_DIST = src/ostree/main.c \ src/ostree/ot-remote-cookie-util.c \ src/ostree/ot-builtin-pull.c \ src/ostree/ot-builtin-trivial-httpd.c -@USE_CURL_OR_SOUP_TRUE@am__objects_12 = src/ostree/ostree-ot-remote-builtin-add-cookie.$(OBJEXT) \ +@USE_GPGME_TRUE@am__objects_15 = src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT) \ +@USE_GPGME_TRUE@ $(am__objects_1) +@USE_GPGME_TRUE@am__objects_16 = src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT) \ +@USE_GPGME_TRUE@ $(am__objects_1) +@USE_CURL_OR_SOUP_TRUE@am__objects_17 = src/ostree/ostree-ot-remote-builtin-add-cookie.$(OBJEXT) \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ostree-ot-remote-builtin-delete-cookie.$(OBJEXT) \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ostree-ot-remote-builtin-list-cookies.$(OBJEXT) \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ostree-ot-remote-cookie-util.$(OBJEXT) \ @USE_CURL_OR_SOUP_TRUE@ $(am__objects_1) \ @USE_CURL_OR_SOUP_TRUE@ src/ostree/ostree-ot-builtin-pull.$(OBJEXT) -@USE_LIBSOUP_TRUE@am__objects_13 = src/ostree/ostree-ot-builtin-trivial-httpd.$(OBJEXT) +@USE_LIBSOUP_TRUE@am__objects_18 = src/ostree/ostree-ot-builtin-trivial-httpd.$(OBJEXT) am_ostree_OBJECTS = src/ostree/ostree-main.$(OBJEXT) \ src/ostree/ostree-ot-builtin-admin.$(OBJEXT) \ src/ostree/ostree-ot-builtin-cat.$(OBJEXT) \ @@ -1024,7 +1084,6 @@ am_ostree_OBJECTS = src/ostree/ostree-main.$(OBJEXT) \ src/ostree/ostree-ot-builtin-export.$(OBJEXT) \ src/ostree/ostree-ot-builtin-find-remotes.$(OBJEXT) \ src/ostree/ostree-ot-builtin-fsck.$(OBJEXT) \ - src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT) \ src/ostree/ostree-ot-builtin-init.$(OBJEXT) \ src/ostree/ostree-ot-builtin-pull-local.$(OBJEXT) \ src/ostree/ostree-ot-builtin-log.$(OBJEXT) \ @@ -1040,7 +1099,7 @@ am_ostree_OBJECTS = src/ostree/ostree-main.$(OBJEXT) \ src/ostree/ostree-ot-main.$(OBJEXT) \ src/ostree/ostree-ot-dump.$(OBJEXT) \ src/ostree/ostree-ot-editor.$(OBJEXT) $(am__objects_1) \ - $(am__objects_6) \ + $(am__objects_6) $(am__objects_15) \ src/ostree/ostree-ot-admin-builtin-init-fs.$(OBJEXT) \ src/ostree/ostree-ot-admin-builtin-diff.$(OBJEXT) \ src/ostree/ostree-ot-admin-builtin-deploy.$(OBJEXT) \ @@ -1062,18 +1121,18 @@ am_ostree_OBJECTS = src/ostree/ostree-main.$(OBJEXT) \ $(am__objects_1) \ src/ostree/ostree-ot-remote-builtin-add.$(OBJEXT) \ src/ostree/ostree-ot-remote-builtin-delete.$(OBJEXT) \ - src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT) \ src/ostree/ostree-ot-remote-builtin-list.$(OBJEXT) \ src/ostree/ostree-ot-remote-builtin-show-url.$(OBJEXT) \ src/ostree/ostree-ot-remote-builtin-refs.$(OBJEXT) \ src/ostree/ostree-ot-remote-builtin-summary.$(OBJEXT) \ - $(am__objects_1) $(am__objects_12) $(am__objects_13) + $(am__objects_1) $(am__objects_16) $(am__objects_17) \ + $(am__objects_18) nodist_ostree_OBJECTS = src/ostree/ostree-parse-datetime.$(OBJEXT) \ $(am__objects_1) ostree_OBJECTS = $(am_ostree_OBJECTS) $(nodist_ostree_OBJECTS) ostree_DEPENDENCIES = $(am__DEPENDENCIES_11) libbsdiff.la \ - libostree-kernel-args.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_8) $(am__DEPENDENCIES_4) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_8) \ + $(am__DEPENDENCIES_4) ostree_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ostree_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @@ -1211,12 +1270,14 @@ tests_test_checksum_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_test_checksum_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am_tests_test_gpg_verify_result_OBJECTS = \ - tests/test_gpg_verify_result-test-gpg-verify-result.$(OBJEXT) +am__tests_test_gpg_verify_result_SOURCES_DIST = \ + src/libostree/ostree-gpg-verify-result-private.h \ + tests/test-gpg-verify-result.c +@USE_GPGME_TRUE@am_tests_test_gpg_verify_result_OBJECTS = tests/test_gpg_verify_result-test-gpg-verify-result.$(OBJEXT) tests_test_gpg_verify_result_OBJECTS = \ $(am_tests_test_gpg_verify_result_OBJECTS) -tests_test_gpg_verify_result_DEPENDENCIES = $(am__DEPENDENCIES_13) \ - $(am__DEPENDENCIES_3) +@USE_GPGME_TRUE@tests_test_gpg_verify_result_DEPENDENCIES = \ +@USE_GPGME_TRUE@ $(am__DEPENDENCIES_13) $(am__DEPENDENCIES_3) tests_test_gpg_verify_result_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_test_gpg_verify_result_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -1230,6 +1291,15 @@ tests_test_include_ostree_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_test_include_ostree_h_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +am_tests_test_kargs_OBJECTS = \ + src/libostree/tests_test_kargs-ostree-kernel-args.$(OBJEXT) \ + tests/test_kargs-test-kargs.$(OBJEXT) +tests_test_kargs_OBJECTS = $(am_tests_test_kargs_OBJECTS) +tests_test_kargs_DEPENDENCIES = $(am__DEPENDENCIES_13) +tests_test_kargs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(tests_test_kargs_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ tests_test_keyfile_utils_SOURCES = tests/test-keyfile-utils.c tests_test_keyfile_utils_OBJECTS = \ tests/test_keyfile_utils-test-keyfile-utils.$(OBJEXT) @@ -1428,8 +1498,10 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-uri.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo \ + src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-impl-system-generator.Plo \ + src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-linuxfsutil.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Plo \ @@ -1469,9 +1541,9 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-tls-cert-interaction.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-varint.Plo \ - src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Plo \ src/libostree/$(DEPDIR)/tests_test_bloom-ostree-bloom.Po \ src/libostree/$(DEPDIR)/tests_test_checksum-ostree-core.Po \ + src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po \ src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-common.Po \ src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-compressor.Po \ src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-decompressor.Po \ @@ -1566,6 +1638,7 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \ tests/$(DEPDIR)/test_checksum-test-checksum.Po \ tests/$(DEPDIR)/test_gpg_verify_result-test-gpg-verify-result.Po \ tests/$(DEPDIR)/test_include_ostree_h-test-include-ostree-h.Po \ + tests/$(DEPDIR)/test_kargs-test-kargs.Po \ tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Po \ tests/$(DEPDIR)/test_libarchive_import-test-libarchive-import.Po \ tests/$(DEPDIR)/test_lzma-test-lzma.Po \ @@ -1603,12 +1676,11 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbsdiff_la_SOURCES) $(libbupsplit_la_SOURCES) \ $(libglnx_la_SOURCES) $(libostree_1_la_SOURCES) \ - $(nodist_libostree_1_la_SOURCES) \ - $(libostree_kernel_args_la_SOURCES) \ - $(libostreetest_la_SOURCES) $(libotutil_la_SOURCES) \ - $(libreaddir_rand_la_SOURCES) $(ostree_SOURCES) \ - $(nodist_ostree_SOURCES) $(ostree_prepare_root_SOURCES) \ - $(ostree_remount_SOURCES) $(ostree_system_generator_SOURCES) \ + $(nodist_libostree_1_la_SOURCES) $(libostreetest_la_SOURCES) \ + $(libotutil_la_SOURCES) $(libreaddir_rand_la_SOURCES) \ + $(ostree_SOURCES) $(nodist_ostree_SOURCES) \ + $(ostree_prepare_root_SOURCES) $(ostree_remount_SOURCES) \ + $(ostree_system_generator_SOURCES) \ $(ostree_trivial_httpd_SOURCES) $(rofiles_fuse_SOURCES) \ $(test_libglnx_errors_SOURCES) $(test_libglnx_fdio_SOURCES) \ $(test_libglnx_macros_SOURCES) $(test_libglnx_shutil_SOURCES) \ @@ -1618,7 +1690,7 @@ SOURCES = $(libbsdiff_la_SOURCES) $(libbupsplit_la_SOURCES) \ $(tests_test_checksum_SOURCES) \ $(tests_test_gpg_verify_result_SOURCES) \ $(tests_test_include_ostree_h_SOURCES) \ - tests/test-keyfile-utils.c \ + $(tests_test_kargs_SOURCES) tests/test-keyfile-utils.c \ $(tests_test_libarchive_import_SOURCES) \ $(tests_test_lzma_SOURCES) tests/test-mutable-tree.c \ tests/test-ot-opt-utils.c tests/test-ot-tool-util.c \ @@ -1631,11 +1703,10 @@ SOURCES = $(libbsdiff_la_SOURCES) $(libbupsplit_la_SOURCES) \ $(tests_test_varint_SOURCES) DIST_SOURCES = $(libbsdiff_la_SOURCES) \ $(am__libbupsplit_la_SOURCES_DIST) $(libglnx_la_SOURCES) \ - $(am__libostree_1_la_SOURCES_DIST) \ - $(libostree_kernel_args_la_SOURCES) \ - $(libostreetest_la_SOURCES) $(libotutil_la_SOURCES) \ - $(libreaddir_rand_la_SOURCES) $(am__ostree_SOURCES_DIST) \ - $(ostree_prepare_root_SOURCES) $(ostree_remount_SOURCES) \ + $(am__libostree_1_la_SOURCES_DIST) $(libostreetest_la_SOURCES) \ + $(am__libotutil_la_SOURCES_DIST) $(libreaddir_rand_la_SOURCES) \ + $(am__ostree_SOURCES_DIST) $(ostree_prepare_root_SOURCES) \ + $(ostree_remount_SOURCES) \ $(am__ostree_system_generator_SOURCES_DIST) \ $(am__ostree_trivial_httpd_SOURCES_DIST) \ $(am__rofiles_fuse_SOURCES_DIST) \ @@ -1645,9 +1716,9 @@ DIST_SOURCES = $(libbsdiff_la_SOURCES) \ $(tests_repo_finder_mount_SOURCES) tests/test-basic-c.c \ $(tests_test_bloom_SOURCES) tests/test-bsdiff.c \ $(tests_test_checksum_SOURCES) \ - $(tests_test_gpg_verify_result_SOURCES) \ + $(am__tests_test_gpg_verify_result_SOURCES_DIST) \ $(tests_test_include_ostree_h_SOURCES) \ - tests/test-keyfile-utils.c \ + $(tests_test_kargs_SOURCES) tests/test-keyfile-utils.c \ $(tests_test_libarchive_import_SOURCES) \ $(tests_test_lzma_SOURCES) tests/test-mutable-tree.c \ tests/test-ot-opt-utils.c tests/test-ot-tool-util.c \ @@ -1879,20 +1950,22 @@ am__set_TESTS_bases = \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) -am__EXEEXT_19 = $(am__EXEEXT_2) -@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_20 = $(am__EXEEXT_19) -am__EXEEXT_21 = tests/test-core.js tests/test-remotes-config-dir.js \ +@USE_GPGME_TRUE@am__EXEEXT_20 = tests/test-remote-gpg-import.sh \ +@USE_GPGME_TRUE@ tests/test-gpg-signed-commit.sh \ +@USE_GPGME_TRUE@ tests/test-admin-gpg.sh $(am__EXEEXT_2) +am__EXEEXT_21 = $(am__EXEEXT_2) +@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_22 = $(am__EXEEXT_21) +am__EXEEXT_23 = tests/test-core.js tests/test-remotes-config-dir.js \ tests/test-sizes.js tests/test-sysroot.js $(am__EXEEXT_2) -@BUILDOPT_GJS_TRUE@am__EXEEXT_22 = $(js_tests) $(am__EXEEXT_21) -am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \ +@BUILDOPT_GJS_TRUE@am__EXEEXT_24 = $(js_tests) $(am__EXEEXT_23) +am__EXEEXT_25 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-basic-user-only.sh tests/test-basic-root.sh \ tests/test-pull-subpath.sh tests/test-archivez.sh \ tests/test-remote-add.sh tests/test-remote-headers.sh \ - tests/test-remote-gpg-import.sh tests/test-commit-sign.sh \ - tests/test-export.sh tests/test-help.sh \ - tests/test-libarchive.sh tests/test-parent.sh \ - tests/test-pull-bare.sh tests/test-pull-bareuser.sh \ - tests/test-pull-bareuseronly.sh \ + tests/test-commit-sign.sh tests/test-export.sh \ + tests/test-help.sh tests/test-libarchive.sh \ + tests/test-parent.sh tests/test-pull-bare.sh \ + tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \ tests/test-pull2-bareuseronly.sh \ tests/test-pull-commit-only.sh tests/test-pull-depth.sh \ tests/test-pull-mirror-summary.sh \ @@ -1901,7 +1974,6 @@ am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ tests/test-pull-override-url.sh tests/test-pull-localcache.sh \ tests/test-local-pull.sh tests/test-local-pull-depth.sh \ - tests/test-gpg-signed-commit.sh \ tests/test-admin-upgrade-unconfigured.sh \ tests/test-admin-upgrade-endoflife.sh \ tests/test-admin-upgrade-systemd-update.sh \ @@ -1918,26 +1990,26 @@ am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-admin-pull-deploy-commit.sh \ tests/test-admin-pull-deploy-split.sh \ tests/test-admin-locking.sh tests/test-admin-deploy-clean.sh \ - tests/test-admin-gpg.sh tests/test-reset-nonlinear.sh \ - tests/test-oldstyle-partial.sh tests/test-delta.sh \ - tests/test-xattrs.sh tests/test-auto-summary.sh \ - tests/test-prune.sh tests/test-concurrency.py \ - tests/test-refs.sh tests/test-demo-buildsystem.sh \ - tests/test-switchroot.sh tests/test-pull-contenturl.sh \ - tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \ - tests/test-summary-view.sh tests/test-no-initramfs.sh \ - tests/test-create-usb.sh tests/test-find-remotes.sh \ - tests/test-fsck-collections.sh tests/test-init-collections.sh \ - tests/test-prune-collections.sh tests/test-refs-collections.sh \ + tests/test-reset-nonlinear.sh tests/test-oldstyle-partial.sh \ + tests/test-delta.sh tests/test-xattrs.sh \ + tests/test-auto-summary.sh tests/test-prune.sh \ + tests/test-concurrency.py tests/test-refs.sh \ + tests/test-demo-buildsystem.sh tests/test-switchroot.sh \ + tests/test-pull-contenturl.sh tests/test-pull-mirrorlist.sh \ + tests/test-summary-update.sh tests/test-summary-view.sh \ + tests/test-no-initramfs.sh tests/test-create-usb.sh \ + tests/test-find-remotes.sh tests/test-fsck-collections.sh \ + tests/test-init-collections.sh tests/test-prune-collections.sh \ + tests/test-refs-collections.sh \ tests/test-remote-add-collections.sh \ tests/test-repo-finder-mount-integration.sh \ tests/test-summary-collections.sh \ tests/test-pull-collections.sh tests/test-config.sh \ - $(am__EXEEXT_2) $(am__EXEEXT_20) $(am__append_68) \ - $(am__append_71) $(am__EXEEXT_22) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \ -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23) -am__EXEEXT_25 = $(am__EXEEXT_2) $(am__EXEEXT_24) + $(am__EXEEXT_2) $(am__EXEEXT_20) $(am__EXEEXT_22) \ + $(am__append_74) $(am__append_77) $(am__EXEEXT_24) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_26 = \ +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_25) +am__EXEEXT_27 = $(am__EXEEXT_2) $(am__EXEEXT_26) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) @@ -2233,27 +2305,27 @@ AM_CFLAGS = -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS) # Allow the distcheck install under $prefix test to pass AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \ - --disable-maintainer-mode $(NULL) $(am__append_63) \ - $(am__append_81) \ + --disable-maintainer-mode $(NULL) $(am__append_68) \ + $(am__append_89) \ BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions' SUBDIRS = . $(am__append_14) NULL = BUILT_SOURCES = $(nodist_libostree_1_la_SOURCES) MANPAGES = -CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_47) \ +CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_50) \ src/ostree/parse-datetime.c tests/libreaddir-rand.so \ tests/ostree-symlink-stamp \ tests/ostree-prepare-root-symlink-stamp \ tests/ostree-remount-symlink-stamp \ tests/rofiles-fuse-symlink-stamp tests/ostree \ tests/ostree-prepare-root tests/ostree-remount \ - tests/rofiles-fuse $(am__append_88) + tests/rofiles-fuse $(am__append_97) EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ COPYING README.md $(am__append_15) libglnx/README.md \ libglnx/COPYING libglnx/libglnx.m4 $(NULL) \ libglnx/Makefile-libglnx.am bsdiff/bsdiff.h bsdiff/bspatch.h \ bsdiff/LICENSE bsdiff/README.md bsdiff/Makefile-bsdiff.am \ - $(am__append_16) \ + $(am__append_17) \ $(top_srcdir)/src/libostree/libostree-devel.sym \ $(top_srcdir)/src/libostree/libostree-released.sym $(NULL) \ src/libostree/README-gpg src/libostree/bupsplit.h \ @@ -2263,34 +2335,32 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ src/libostree/ostree-repo-deprecated.h \ src/libostree/ostree-version.h src/ostree/parse-datetime.y \ buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \ - tests/ostree.supp $(NULL) $(am__append_67) $(am__append_70) \ - $(am__append_73) tests/libtest.sh $(am__append_74) \ - tests/libostreetest.h tests/libtest.sh \ - tests/gpg-verify-data/README.md $(NULL) \ - src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \ - src/boot/mkinitcpio/ostree \ + tests/ostree.supp $(NULL) $(am__append_73) $(am__append_76) \ + $(am__append_79) tests/libtest.sh $(am__append_80) \ + $(am__append_85) tests/libostreetest.h tests/libtest.sh \ + $(NULL) src/boot/dracut/module-setup.sh \ + src/boot/dracut/ostree.conf src/boot/mkinitcpio/ostree \ src/boot/ostree-prepare-root.service \ src/boot/ostree-finalize-staged.path \ src/boot/ostree-remount.service \ src/boot/ostree-finalize-staged.service \ src/boot/grub2/grub2-15_ostree \ - src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_85) \ - $(am__append_87) + src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_93) \ + $(am__append_96) bin_SCRIPTS = lib_LTLIBRARIES = libostree-1.la -pkglibexec_SCRIPTS = $(am__append_82) +pkglibexec_SCRIPTS = $(am__append_90) noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \ - libotutil.la libostree-kernel-args.la $(am__append_17) \ - libostreetest.la + libotutil.la $(am__append_18) libostreetest.la privlibdir = $(pkglibdir) privlib_LTLIBRARIES = pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = src/libostree/ostree-1.pc -INTROSPECTION_GIRS = $(am__append_44) +INTROSPECTION_GIRS = $(am__append_47) girdir = $(datadir)/gir-1.0 -gir_DATA = $(am__append_45) +gir_DATA = $(am__append_48) typelibdir = $(libdir)/girepository-1.0 -typelib_DATA = $(am__append_46) +typelib_DATA = $(am__append_49) gsettings_SCHEMAS = ostree_bootdir = $(prefix)/lib/ostree @@ -2309,7 +2379,7 @@ AM_TESTS_ENVIRONMENT = G_TEST_SRCDIR="$(abs_srcdir)" \ pwd)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}} PATH=$$(cd \ $(top_builddir)/tests && pwd):$${PATH} \ OSTREE_FEATURES="$(OSTREE_FEATURES)" PYTHONUNBUFFERED=1 \ - $(NULL) $(am__append_65) + $(NULL) $(am__append_70) LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/buildutil/tap-driver.sh LOG_COMPILER = $(top_srcdir)/buildutil/tap-test installed_test_LTLIBRARIES = $(am__append_12) @@ -2349,22 +2419,22 @@ all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installe # This initializes some more variables # This is a special facility to chain together hooks easily -INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_80) \ - $(am__append_83) +INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_88) \ + $(am__append_91) ALL_LOCAL_RULES = tests/libreaddir-rand.so shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||') OSTREE_GITREV = $(shell cd $(srcdir) && if command -v git >/dev/null 2>&1 && test -d .git; then git describe --abbrev=42 --tags --always HEAD; fi) ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS} GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \ - gtk-doc.make $(am__append_62) + gtk-doc.make $(am__append_67) OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS) OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS) OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS) OT_INTERNAL_SOUP_LIBS = $(OT_DEP_SOUP_LIBS) # This canonicalizes the PKG_CHECK_MODULES or AM_PATH_GPGME results -OT_INTERNAL_GPGME_CFLAGS = $(OT_DEP_GPGME_CFLAGS) $(GPGME_PTHREAD_CFLAGS) -OT_INTERNAL_GPGME_LIBS = $(OT_DEP_GPGME_LIBS) $(GPGME_PTHREAD_LIBS) +@USE_GPGME_TRUE@OT_INTERNAL_GPGME_CFLAGS = $(OT_DEP_GPGME_CFLAGS) $(GPGME_PTHREAD_CFLAGS) +@USE_GPGME_TRUE@OT_INTERNAL_GPGME_LIBS = $(OT_DEP_GPGME_LIBS) $(GPGME_PTHREAD_LIBS) @BUILDOPT_INTROSPECTION_TRUE@GIRS = @BUILDOPT_INTROSPECTION_TRUE@TYPELIBS = $(GIRS:.gir=.typelib) @ENABLE_RUST_TRUE@@RUST_DEBUG_FALSE@CARGO_RELEASE_ARGS = --release @@ -2430,32 +2500,21 @@ libbsdiff_la_SOURCES = \ $(NULL) libbsdiff_la_CFLAGS = $(AM_CFLAGS) -libotutil_la_SOURCES = \ - src/libotutil/ot-checksum-utils.c \ +libotutil_la_SOURCES = src/libotutil/ot-checksum-utils.c \ src/libotutil/ot-checksum-utils.h \ src/libotutil/ot-checksum-instream.c \ src/libotutil/ot-checksum-instream.h \ - src/libotutil/ot-fs-utils.c \ - src/libotutil/ot-fs-utils.h \ + src/libotutil/ot-fs-utils.c src/libotutil/ot-fs-utils.h \ src/libotutil/ot-keyfile-utils.c \ - src/libotutil/ot-keyfile-utils.h \ - src/libotutil/ot-opt-utils.c \ - src/libotutil/ot-opt-utils.h \ - src/libotutil/ot-unix-utils.c \ - src/libotutil/ot-unix-utils.h \ - src/libotutil/ot-variant-utils.c \ + src/libotutil/ot-keyfile-utils.h src/libotutil/ot-opt-utils.c \ + src/libotutil/ot-opt-utils.h src/libotutil/ot-unix-utils.c \ + src/libotutil/ot-unix-utils.h src/libotutil/ot-variant-utils.c \ src/libotutil/ot-variant-utils.h \ src/libotutil/ot-variant-builder.c \ src/libotutil/ot-variant-builder.h \ - src/libotutil/ot-gio-utils.c \ - src/libotutil/ot-gio-utils.h \ - src/libotutil/ot-gpg-utils.c \ - src/libotutil/ot-gpg-utils.h \ - src/libotutil/otutil.h \ - src/libotutil/ot-tool-util.c \ - src/libotutil/ot-tool-util.h \ - $(NULL) - + src/libotutil/ot-gio-utils.c src/libotutil/ot-gio-utils.h \ + src/libotutil/otutil.h src/libotutil/ot-tool-util.c \ + src/libotutil/ot-tool-util.h $(NULL) $(am__append_16) libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(LIBSYSTEMD_CFLAGS) libotutil_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) $(LIBSYSTEMD_LIBS) libostree_public_headers = \ @@ -2483,6 +2542,7 @@ libostree_public_headers = \ src/libostree/ostree-repo-finder-config.h \ src/libostree/ostree-repo-finder-mount.h \ src/libostree/ostree-repo-finder-override.h \ + src/libostree/ostree-kernel-args.h \ $(NULL) @@ -2493,13 +2553,6 @@ libostree_public_built_headers = src/libostree/ostree-version.h @ENABLE_RUST_TRUE@bupsplitpath = @abs_top_builddir@/target/@RUST_TARGET_SUBDIR@/libbupsplit_rs.a @ENABLE_RUST_TRUE@BUPSPLIT_RUST_SRCS = rust/src/bupsplit.rs @ENABLE_RUST_FALSE@libbupsplit_la_SOURCES = src/libostree/bupsplit.h src/libostree/bupsplit.c -libostree_kernel_args_la_SOURCES = \ - src/libostree/ostree-kernel-args.h \ - src/libostree/ostree-kernel-args.c \ - $(NULL) - -libostree_kernel_args_la_CFLAGS = -I$(srcdir)/libglnx $(OT_INTERNAL_GIO_UNIX_CFLAGS) -libostree_kernel_args_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS) libostreeincludedir = $(includedir)/ostree-1 libostreeinclude_HEADERS = $(libostree_public_headers) $(libostree_public_built_headers) ENUM_TYPES = $(NULL) $(srcdir)/src/libostree/ostree-fetcher.h @@ -2567,10 +2620,6 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \ src/libostree/ostree-repo-static-delta-compilation.c \ src/libostree/ostree-repo-static-delta-compilation-analysis.c \ src/libostree/ostree-repo-static-delta-private.h \ - src/libostree/ostree-gpg-verifier.c \ - src/libostree/ostree-gpg-verifier.h \ - src/libostree/ostree-gpg-verify-result.c \ - src/libostree/ostree-gpg-verify-result-private.h \ src/libostree/ostree-autocleanups.h \ src/libostree/ostree-bloom.c \ src/libostree/ostree-bloom-private.h \ @@ -2578,15 +2627,18 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \ src/libostree/ostree-repo-finder-avahi.c \ src/libostree/ostree-repo-finder-config.c \ src/libostree/ostree-repo-finder-mount.c \ - src/libostree/ostree-repo-finder-override.c $(NULL) \ - $(am__append_18) $(am__append_19) $(am__append_20) \ - $(am__append_21) $(am__append_22) $(am__append_31) \ - $(am__append_32) $(am__append_35) $(am__append_38) + src/libostree/ostree-repo-finder-override.c \ + src/libostree/ostree-kernel-args.h \ + src/libostree/ostree-kernel-args.c $(NULL) $(am__append_19) \ + $(am__append_20) $(am__append_21) $(am__append_22) \ + $(am__append_23) $(am__append_24) $(am__append_25) \ + $(am__append_34) $(am__append_35) $(am__append_38) \ + $(am__append_41) libostree_experimental_headers = \ $(NULL) symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym \ - $(am__append_23) + $(am__append_26) # http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html wl_versionscript_arg = -Wl,--version-script= libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff \ @@ -2596,23 +2648,26 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff \ $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) \ $(OT_DEP_CRYPTO_CFLAGS) -fvisibility=hidden \ '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) \ - extern' $(am__append_25) $(am__append_27) $(am__append_29) \ - $(am__append_33) $(am__append_36) $(am__append_39) \ - $(am__append_41) + extern' $(am__append_28) $(am__append_30) $(am__append_32) \ + $(am__append_36) $(am__append_39) $(am__append_42) \ + $(am__append_44) libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la \ - libostree-kernel-args.la $(OT_INTERNAL_GIO_UNIX_LIBS) \ - $(OT_INTERNAL_GPGME_LIBS) $(OT_DEP_LZMA_LIBS) \ - $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) $(am__append_24) \ - $(bupsplitpath) $(am__append_26) $(am__append_28) \ - $(am__append_30) $(am__append_34) $(am__append_37) \ - $(am__append_40) $(am__append_42) + $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ + $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) \ + $(am__append_27) $(bupsplitpath) $(am__append_29) \ + $(am__append_31) $(am__append_33) $(am__append_37) \ + $(am__append_40) $(am__append_43) $(am__append_45) EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files) + +# XXX: work around clang being passed -fstack-clash-protection which it doesn't understand +# See: https://bugzilla.redhat.com/show_bug.cgi?id=1672012 +INTROSPECTION_SCANNER_ENV = CC=gcc @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_EXPORT_PACKAGES = ostree-1 @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_INCLUDES = Gio-2.0 @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_CFLAGS = \ @BUILDOPT_INTROSPECTION_TRUE@ $(libostree_1_la_CFLAGS) \ -@BUILDOPT_INTROSPECTION_TRUE@ $(am__append_43) +@BUILDOPT_INTROSPECTION_TRUE@ $(am__append_46) @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_LIBS = libostree-1.la @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Ostree --symbol-prefix=ostree $(GI_SCANNERFLAGS) @BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h $(libostree_experimental_headers),$(libostree_1_la_SOURCES)) @@ -2631,8 +2686,7 @@ ostree_SOURCES = src/ostree/main.c src/ostree/ot-builtin-admin.c \ src/ostree/ot-builtin-create-usb.c \ src/ostree/ot-builtin-diff.c src/ostree/ot-builtin-export.c \ src/ostree/ot-builtin-find-remotes.c \ - src/ostree/ot-builtin-fsck.c src/ostree/ot-builtin-gpg-sign.c \ - src/ostree/ot-builtin-init.c \ + src/ostree/ot-builtin-fsck.c src/ostree/ot-builtin-init.c \ src/ostree/ot-builtin-pull-local.c src/ostree/ot-builtin-log.c \ src/ostree/ot-builtin-ls.c src/ostree/ot-builtin-prune.c \ src/ostree/ot-builtin-refs.c src/ostree/ot-builtin-remote.c \ @@ -2642,8 +2696,8 @@ ostree_SOURCES = src/ostree/main.c src/ostree/ot-builtin-admin.c \ src/ostree/ot-builtin-static-delta.c src/ostree/ot-main.h \ src/ostree/ot-main.c src/ostree/ot-dump.h src/ostree/ot-dump.c \ src/ostree/ot-editor.c src/ostree/ot-editor.h \ - src/ostree/parse-datetime.h $(NULL) $(am__append_48) \ - src/ostree/ot-admin-builtin-init-fs.c \ + src/ostree/parse-datetime.h $(NULL) $(am__append_51) \ + $(am__append_52) src/ostree/ot-admin-builtin-init-fs.c \ src/ostree/ot-admin-builtin-diff.c \ src/ostree/ot-admin-builtin-deploy.c \ src/ostree/ot-admin-builtin-finalize-staged.c \ @@ -2667,12 +2721,11 @@ ostree_SOURCES = src/ostree/main.c src/ostree/ot-builtin-admin.c \ src/ostree/ot-remote-builtins.h \ src/ostree/ot-remote-builtin-add.c \ src/ostree/ot-remote-builtin-delete.c \ - src/ostree/ot-remote-builtin-gpg-import.c \ src/ostree/ot-remote-builtin-list.c \ src/ostree/ot-remote-builtin-show-url.c \ src/ostree/ot-remote-builtin-refs.c \ src/ostree/ot-remote-builtin-summary.c $(NULL) \ - $(am__append_49) $(am__append_50) + $(am__append_53) $(am__append_54) $(am__append_55) nodist_ostree_SOURCES = \ src/ostree/parse-datetime.c \ $(NULL) @@ -2684,11 +2737,10 @@ ostree_bin_shared_cflags = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/sr ostree_bin_shared_ldadd = $(AM_LDFLAGS) libglnx.la libotutil.la libostree-1.la \ $(OT_INTERNAL_GIO_UNIX_LIBS) -ostree_CFLAGS = $(ostree_bin_shared_cflags) $(am__append_52) \ - $(am__append_54) +ostree_CFLAGS = $(ostree_bin_shared_cflags) $(am__append_57) \ + $(am__append_59) ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la \ - libostree-kernel-args.la $(LIBSYSTEMD_LIBS) $(am__append_53) \ - $(am__append_55) + $(LIBSYSTEMD_LIBS) $(am__append_58) $(am__append_60) @USE_LIBSOUP_TRUE@ostree_trivial_httpd_SOURCES = src/ostree/ostree-trivial-httpd.c @USE_LIBSOUP_TRUE@ostree_trivial_httpd_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_SOUP_CFLAGS) @USE_LIBSOUP_TRUE@ostree_trivial_httpd_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_SOUP_LIBS) @@ -2697,8 +2749,8 @@ ostree_prepare_root_SOURCES = \ src/switchroot/ostree-prepare-root.c \ $(NULL) -ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_59) \ - $(am__append_60) +ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_64) \ + $(am__append_65) # We're using our internal generator @BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator @@ -2720,7 +2772,7 @@ ostree_remount_SOURCES = \ $(NULL) ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \ - $(am__append_61) + $(am__append_66) @BUILDOPT_SYSTEMD_TRUE@ostree_prepare_root_LDADD = $(AM_LDFLAGS) $(LIBSYSTEMD_LIBS) @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ostree_system_generator_SOURCES = src/switchroot/ostree-mount-util.h \ @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ src/switchroot/ostree-system-generator.c @@ -2736,7 +2788,7 @@ ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \ @BUILDOPT_FUSE_TRUE@rofiles_fuse_LDADD = libglnx.la $(BUILDOPT_FUSE_LIBS) $(OT_INTERNAL_GIO_UNIX_LIBS) libostree-1.la uninstalled_test_data = tests/ostree-symlink-stamp \ tests/ostree-prepare-root-symlink-stamp \ - tests/ostree-remount-symlink-stamp $(am__append_69) + tests/ostree-remount-symlink-stamp $(am__append_75) dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh # This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below. @@ -2744,19 +2796,19 @@ dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh # tests *only* run installed, to avoid having to run them twice in CI. # This overrides the glib-tap.mk emphasis on doing both, if we'd # used e.g. `dist_test_scripts`. -dist_test_scripts = $(NULL) $(am__append_78) +dist_test_scripts = $(NULL) $(am__append_86) test_programs = tests/test-bloom tests/test-repo-finder-config \ - tests/test-repo-finder-mount $(NULL) $(am__append_76) \ - $(am__append_79) + tests/test-repo-finder-mount $(NULL) $(am__append_83) \ + $(am__append_87) _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-basic-user.sh tests/test-basic-user-only.sh \ tests/test-basic-root.sh tests/test-pull-subpath.sh \ tests/test-archivez.sh tests/test-remote-add.sh \ - tests/test-remote-headers.sh tests/test-remote-gpg-import.sh \ - tests/test-commit-sign.sh tests/test-export.sh \ - tests/test-help.sh tests/test-libarchive.sh \ - tests/test-parent.sh tests/test-pull-bare.sh \ - tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \ + tests/test-remote-headers.sh tests/test-commit-sign.sh \ + tests/test-export.sh tests/test-help.sh \ + tests/test-libarchive.sh tests/test-parent.sh \ + tests/test-pull-bare.sh tests/test-pull-bareuser.sh \ + tests/test-pull-bareuseronly.sh \ tests/test-pull2-bareuseronly.sh \ tests/test-pull-commit-only.sh tests/test-pull-depth.sh \ tests/test-pull-mirror-summary.sh \ @@ -2765,7 +2817,6 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ tests/test-pull-override-url.sh tests/test-pull-localcache.sh \ tests/test-local-pull.sh tests/test-local-pull-depth.sh \ - tests/test-gpg-signed-commit.sh \ tests/test-admin-upgrade-unconfigured.sh \ tests/test-admin-upgrade-endoflife.sh \ tests/test-admin-upgrade-systemd-update.sh \ @@ -2782,23 +2833,23 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-admin-pull-deploy-commit.sh \ tests/test-admin-pull-deploy-split.sh \ tests/test-admin-locking.sh tests/test-admin-deploy-clean.sh \ - tests/test-admin-gpg.sh tests/test-reset-nonlinear.sh \ - tests/test-oldstyle-partial.sh tests/test-delta.sh \ - tests/test-xattrs.sh tests/test-auto-summary.sh \ - tests/test-prune.sh tests/test-concurrency.py \ - tests/test-refs.sh tests/test-demo-buildsystem.sh \ - tests/test-switchroot.sh tests/test-pull-contenturl.sh \ - tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \ - tests/test-summary-view.sh tests/test-no-initramfs.sh \ - tests/test-create-usb.sh tests/test-find-remotes.sh \ - tests/test-fsck-collections.sh tests/test-init-collections.sh \ - tests/test-prune-collections.sh tests/test-refs-collections.sh \ + tests/test-reset-nonlinear.sh tests/test-oldstyle-partial.sh \ + tests/test-delta.sh tests/test-xattrs.sh \ + tests/test-auto-summary.sh tests/test-prune.sh \ + tests/test-concurrency.py tests/test-refs.sh \ + tests/test-demo-buildsystem.sh tests/test-switchroot.sh \ + tests/test-pull-contenturl.sh tests/test-pull-mirrorlist.sh \ + tests/test-summary-update.sh tests/test-summary-view.sh \ + tests/test-no-initramfs.sh tests/test-create-usb.sh \ + tests/test-find-remotes.sh tests/test-fsck-collections.sh \ + tests/test-init-collections.sh tests/test-prune-collections.sh \ + tests/test-refs-collections.sh \ tests/test-remote-add-collections.sh \ tests/test-repo-finder-mount-integration.sh \ tests/test-summary-collections.sh \ tests/test-pull-collections.sh tests/test-config.sh $(NULL) \ - $(am__append_66) $(am__append_68) $(am__append_71) \ - $(am__append_72) + $(am__append_71) $(am__append_72) $(am__append_74) \ + $(am__append_77) $(am__append_78) experimental_test_scripts = \ $(NULL) @@ -2838,19 +2889,19 @@ dist_test_extra_scripts = \ # We can't use nobase_ as we need to strip off the tests/, can't # use plain installed_ as we do need the gpghome/ prefix. -@ENABLE_INSTALLED_TESTS_TRUE@gpginsttestdir = $(installed_testdir)/gpghome -@ENABLE_INSTALLED_TESTS_TRUE@dist_gpginsttest_DATA = tests/gpghome/secring.gpg \ -@ENABLE_INSTALLED_TESTS_TRUE@ tests/gpghome/pubring.gpg \ -@ENABLE_INSTALLED_TESTS_TRUE@ tests/gpghome/trustdb.gpg \ -@ENABLE_INSTALLED_TESTS_TRUE@ tests/gpghome/key1.asc \ -@ENABLE_INSTALLED_TESTS_TRUE@ tests/gpghome/key2.asc \ -@ENABLE_INSTALLED_TESTS_TRUE@ tests/gpghome/key3.asc +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@gpginsttestdir = $(installed_testdir)/gpghome +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@dist_gpginsttest_DATA = tests/gpghome/secring.gpg \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ tests/gpghome/pubring.gpg \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ tests/gpghome/trustdb.gpg \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ tests/gpghome/key1.asc \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ tests/gpghome/key2.asc \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ tests/gpghome/key3.asc -@ENABLE_INSTALLED_TESTS_TRUE@gpginsttest_trusteddir = $(installed_testdir)/gpghome/trusted -@ENABLE_INSTALLED_TESTS_TRUE@dist_gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg -@ENABLE_INSTALLED_TESTS_TRUE@gpgvinsttestdir = $(installed_testdir)/gpg-verify-data -@ENABLE_INSTALLED_TESTS_TRUE@dist_gpgvinsttest_DATA = $(addprefix tests/gpg-verify-data/, \ -@ENABLE_INSTALLED_TESTS_TRUE@ gpg.conf lgpl2 lgpl2.sig pubring.gpg secring.gpg trustdb.gpg) +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@gpginsttest_trusteddir = $(installed_testdir)/gpghome/trusted +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@dist_gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@gpgvinsttestdir = $(installed_testdir)/gpg-verify-data +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@dist_gpgvinsttest_DATA = $(addprefix tests/gpg-verify-data/, \ +@ENABLE_INSTALLED_TESTS_TRUE@@USE_GPGME_TRUE@ gpg.conf lgpl2 lgpl2.sig pubring.gpg secring.gpg trustdb.gpg) js_installed_tests = \ tests/test-core.js \ @@ -2868,15 +2919,15 @@ libreaddir_rand_la_LIBADD = \ $(NULL) libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \ - $(am__append_75) + $(am__append_81) _installed_or_uninstalled_test_programs = tests/test-varint \ tests/test-ot-unix-utils tests/test-bsdiff \ tests/test-mutable-tree tests/test-keyfile-utils \ tests/test-ot-opt-utils tests/test-ot-tool-util \ - tests/test-gpg-verify-result tests/test-checksum \ - tests/test-lzma tests/test-rollsum tests/test-basic-c \ - tests/test-sysroot-c tests/test-pull-c tests/test-repo \ - tests/test-include-ostree-h $(am__append_77) + tests/test-checksum tests/test-lzma tests/test-rollsum \ + tests/test-basic-c tests/test-sysroot-c tests/test-pull-c \ + tests/test-repo tests/test-include-ostree-h tests/test-kargs \ + $(am__append_82) $(am__append_84) common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx common_tests_ldadd = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS) libostreetest_la_SOURCES = tests/libostreetest.c tests/test-mock-gio.c tests/test-mock-gio.h @@ -2902,6 +2953,9 @@ tests_test_include_ostree_h_LDADD = $(TESTS_LDADD) @USE_AVAHI_TRUE@tests_test_repo_finder_avahi_SOURCES = src/libostree/ostree-repo-finder-avahi-parser.c tests/test-repo-finder-avahi.c @USE_AVAHI_TRUE@tests_test_repo_finder_avahi_CFLAGS = $(TESTS_CFLAGS) @USE_AVAHI_TRUE@tests_test_repo_finder_avahi_LDADD = $(TESTS_LDADD) +tests_test_kargs_SOURCES = src/libostree/ostree-kernel-args.c tests/test-kargs.c +tests_test_kargs_CFLAGS = $(TESTS_CFLAGS) +tests_test_kargs_LDADD = $(TESTS_LDADD) tests_test_repo_finder_config_SOURCES = tests/test-repo-finder-config.c tests_test_repo_finder_config_CFLAGS = $(TESTS_CFLAGS) tests_test_repo_finder_config_LDADD = $(TESTS_LDADD) @@ -2942,12 +2996,12 @@ tests_test_lzma_SOURCES = src/libostree/ostree-lzma-common.c src/libostree/ostre tests_test_lzma_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_LZMA_CFLAGS) tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS) -tests_test_gpg_verify_result_SOURCES = \ - src/libostree/ostree-gpg-verify-result-private.h \ - tests/test-gpg-verify-result.c +@USE_GPGME_TRUE@tests_test_gpg_verify_result_SOURCES = \ +@USE_GPGME_TRUE@ src/libostree/ostree-gpg-verify-result-private.h \ +@USE_GPGME_TRUE@ tests/test-gpg-verify-result.c -tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) -tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS) +@USE_GPGME_TRUE@tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) +@USE_GPGME_TRUE@tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS) # See above comment on binding the tests to be either installed or not. @ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts) @@ -2983,15 +3037,15 @@ tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS) @ENABLE_MAN_TRUE@ ostree-cat.1 ostree-checkout.1 \ @ENABLE_MAN_TRUE@ ostree-checksum.1 ostree-commit.1 \ @ENABLE_MAN_TRUE@ ostree-create-usb.1 ostree-export.1 \ -@ENABLE_MAN_TRUE@ ostree-gpg-sign.1 ostree-config.1 \ -@ENABLE_MAN_TRUE@ ostree-diff.1 ostree-find-remotes.1 \ -@ENABLE_MAN_TRUE@ ostree-fsck.1 ostree-init.1 ostree-log.1 \ -@ENABLE_MAN_TRUE@ ostree-ls.1 ostree-prune.1 \ -@ENABLE_MAN_TRUE@ ostree-pull-local.1 ostree-pull.1 \ -@ENABLE_MAN_TRUE@ ostree-refs.1 ostree-remote.1 ostree-reset.1 \ -@ENABLE_MAN_TRUE@ ostree-rev-parse.1 ostree-show.1 \ -@ENABLE_MAN_TRUE@ ostree-summary.1 ostree-static-delta.1 \ -@ENABLE_MAN_TRUE@ $(am__append_84) $(am__append_86) +@ENABLE_MAN_TRUE@ ostree-config.1 ostree-diff.1 \ +@ENABLE_MAN_TRUE@ ostree-find-remotes.1 ostree-fsck.1 \ +@ENABLE_MAN_TRUE@ ostree-init.1 ostree-log.1 ostree-ls.1 \ +@ENABLE_MAN_TRUE@ ostree-prune.1 ostree-pull-local.1 \ +@ENABLE_MAN_TRUE@ ostree-pull.1 ostree-refs.1 ostree-remote.1 \ +@ENABLE_MAN_TRUE@ ostree-reset.1 ostree-rev-parse.1 \ +@ENABLE_MAN_TRUE@ ostree-show.1 ostree-summary.1 \ +@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_92) \ +@ENABLE_MAN_TRUE@ $(am__append_94) $(am__append_95) @ENABLE_MAN_TRUE@man5_files = ostree.repo.5 ostree.repo-config.5 @ENABLE_MAN_TRUE@man1_MANS = $(addprefix man/,$(man1_files)) @ENABLE_MAN_TRUE@man5_MANS = $(addprefix man/,$(man5_files)) @@ -3732,12 +3786,6 @@ src/libostree/libostree_1_la-ostree-repo-static-delta-compilation.lo: \ src/libostree/libostree_1_la-ostree-repo-static-delta-compilation-analysis.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) -src/libostree/libostree_1_la-ostree-gpg-verifier.lo: \ - src/libostree/$(am__dirstamp) \ - src/libostree/$(DEPDIR)/$(am__dirstamp) -src/libostree/libostree_1_la-ostree-gpg-verify-result.lo: \ - src/libostree/$(am__dirstamp) \ - src/libostree/$(DEPDIR)/$(am__dirstamp) src/libostree/libostree_1_la-ostree-bloom.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) @@ -3756,6 +3804,9 @@ src/libostree/libostree_1_la-ostree-repo-finder-mount.lo: \ src/libostree/libostree_1_la-ostree-repo-finder-override.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) +src/libostree/libostree_1_la-ostree-kernel-args.lo: \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) src/libostree/libostree_1_la-ostree-libarchive-input-stream.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) @@ -3765,6 +3816,15 @@ src/libostree/libostree_1_la-ostree-tls-cert-interaction.lo: \ src/libostree/libostree_1_la-ostree-repo-finder-avahi-parser.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) +src/libostree/libostree_1_la-ostree-gpg-verifier.lo: \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) +src/libostree/libostree_1_la-ostree-gpg-verify-result.lo: \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) +src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo: \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) src/libostree/libostree_1_la-ostree-fetcher-util.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) @@ -3792,12 +3852,6 @@ src/libostree/libostree_1_la-ostree-enumtypes.lo: \ libostree-1.la: $(libostree_1_la_OBJECTS) $(libostree_1_la_DEPENDENCIES) $(EXTRA_libostree_1_la_DEPENDENCIES) $(AM_V_CCLD)$(libostree_1_la_LINK) -rpath $(libdir) $(libostree_1_la_OBJECTS) $(libostree_1_la_LIBADD) $(LIBS) -src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo: \ - src/libostree/$(am__dirstamp) \ - src/libostree/$(DEPDIR)/$(am__dirstamp) - -libostree-kernel-args.la: $(libostree_kernel_args_la_OBJECTS) $(libostree_kernel_args_la_DEPENDENCIES) $(EXTRA_libostree_kernel_args_la_DEPENDENCIES) - $(AM_V_CCLD)$(libostree_kernel_args_la_LINK) $(libostree_kernel_args_la_OBJECTS) $(libostree_kernel_args_la_LIBADD) $(LIBS) tests/$(am__dirstamp): @$(MKDIR_P) tests @: > tests/$(am__dirstamp) @@ -3844,10 +3898,10 @@ src/libotutil/libotutil_la-ot-variant-builder.lo: \ src/libotutil/libotutil_la-ot-gio-utils.lo: \ src/libotutil/$(am__dirstamp) \ src/libotutil/$(DEPDIR)/$(am__dirstamp) -src/libotutil/libotutil_la-ot-gpg-utils.lo: \ +src/libotutil/libotutil_la-ot-tool-util.lo: \ src/libotutil/$(am__dirstamp) \ src/libotutil/$(DEPDIR)/$(am__dirstamp) -src/libotutil/libotutil_la-ot-tool-util.lo: \ +src/libotutil/libotutil_la-ot-gpg-utils.lo: \ src/libotutil/$(am__dirstamp) \ src/libotutil/$(DEPDIR)/$(am__dirstamp) @@ -3899,9 +3953,6 @@ src/ostree/ostree-ot-builtin-find-remotes.$(OBJEXT): \ src/ostree/ostree-ot-builtin-fsck.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) -src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT): \ - src/ostree/$(am__dirstamp) \ - src/ostree/$(DEPDIR)/$(am__dirstamp) src/ostree/ostree-ot-builtin-init.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) @@ -3943,6 +3994,9 @@ src/ostree/ostree-ot-dump.$(OBJEXT): src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) src/ostree/ostree-ot-editor.$(OBJEXT): src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) +src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT): \ + src/ostree/$(am__dirstamp) \ + src/ostree/$(DEPDIR)/$(am__dirstamp) src/ostree/ostree-ot-admin-builtin-init-fs.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) @@ -4003,9 +4057,6 @@ src/ostree/ostree-ot-remote-builtin-add.$(OBJEXT): \ src/ostree/ostree-ot-remote-builtin-delete.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) -src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT): \ - src/ostree/$(am__dirstamp) \ - src/ostree/$(DEPDIR)/$(am__dirstamp) src/ostree/ostree-ot-remote-builtin-list.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) @@ -4018,6 +4069,9 @@ src/ostree/ostree-ot-remote-builtin-refs.$(OBJEXT): \ src/ostree/ostree-ot-remote-builtin-summary.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) +src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT): \ + src/ostree/$(am__dirstamp) \ + src/ostree/$(DEPDIR)/$(am__dirstamp) src/ostree/ostree-ot-remote-builtin-add-cookie.$(OBJEXT): \ src/ostree/$(am__dirstamp) \ src/ostree/$(DEPDIR)/$(am__dirstamp) @@ -4185,6 +4239,15 @@ tests/test_include_ostree_h-test-include-ostree-h.$(OBJEXT): \ tests/test-include-ostree-h$(EXEEXT): $(tests_test_include_ostree_h_OBJECTS) $(tests_test_include_ostree_h_DEPENDENCIES) $(EXTRA_tests_test_include_ostree_h_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test-include-ostree-h$(EXEEXT) $(AM_V_CCLD)$(tests_test_include_ostree_h_LINK) $(tests_test_include_ostree_h_OBJECTS) $(tests_test_include_ostree_h_LDADD) $(LIBS) +src/libostree/tests_test_kargs-ostree-kernel-args.$(OBJEXT): \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) +tests/test_kargs-test-kargs.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/test-kargs$(EXEEXT): $(tests_test_kargs_OBJECTS) $(tests_test_kargs_DEPENDENCIES) $(EXTRA_tests_test_kargs_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/test-kargs$(EXEEXT) + $(AM_V_CCLD)$(tests_test_kargs_LINK) $(tests_test_kargs_OBJECTS) $(tests_test_kargs_LDADD) $(LIBS) tests/test_keyfile_utils-test-keyfile-utils.$(OBJEXT): \ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp) @@ -4570,8 +4633,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-uri.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-impl-system-generator.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-linuxfsutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Plo@am__quote@ # am--include-marker @@ -4611,9 +4676,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-tls-cert-interaction.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-varint.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_bloom-ostree-bloom.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_checksum-ostree-core.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-compressor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-decompressor.Po@am__quote@ # am--include-marker @@ -4708,6 +4773,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_checksum-test-checksum.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_gpg_verify_result-test-gpg-verify-result.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_include_ostree_h-test-include-ostree-h.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_kargs-test-kargs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_libarchive_import-test-libarchive-import.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_lzma-test-lzma.Po@am__quote@ # am--include-marker @@ -5126,20 +5192,6 @@ src/libostree/libostree_1_la-ostree-repo-static-delta-compilation-analysis.lo: s @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-repo-static-delta-compilation-analysis.lo `test -f 'src/libostree/ostree-repo-static-delta-compilation-analysis.c' || echo '$(srcdir)/'`src/libostree/ostree-repo-static-delta-compilation-analysis.c -src/libostree/libostree_1_la-ostree-gpg-verifier.lo: src/libostree/ostree-gpg-verifier.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-gpg-verifier.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Tpo -c -o src/libostree/libostree_1_la-ostree-gpg-verifier.lo `test -f 'src/libostree/ostree-gpg-verifier.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verifier.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-gpg-verifier.c' object='src/libostree/libostree_1_la-ostree-gpg-verifier.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-gpg-verifier.lo `test -f 'src/libostree/ostree-gpg-verifier.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verifier.c - -src/libostree/libostree_1_la-ostree-gpg-verify-result.lo: src/libostree/ostree-gpg-verify-result.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-gpg-verify-result.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Tpo -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result.lo `test -f 'src/libostree/ostree-gpg-verify-result.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-gpg-verify-result.c' object='src/libostree/libostree_1_la-ostree-gpg-verify-result.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result.lo `test -f 'src/libostree/ostree-gpg-verify-result.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result.c - src/libostree/libostree_1_la-ostree-bloom.lo: src/libostree/ostree-bloom.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-bloom.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-bloom.Tpo -c -o src/libostree/libostree_1_la-ostree-bloom.lo `test -f 'src/libostree/ostree-bloom.c' || echo '$(srcdir)/'`src/libostree/ostree-bloom.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-bloom.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-bloom.Plo @@ -5182,6 +5234,13 @@ src/libostree/libostree_1_la-ostree-repo-finder-override.lo: src/libostree/ostre @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-repo-finder-override.lo `test -f 'src/libostree/ostree-repo-finder-override.c' || echo '$(srcdir)/'`src/libostree/ostree-repo-finder-override.c +src/libostree/libostree_1_la-ostree-kernel-args.lo: src/libostree/ostree-kernel-args.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-kernel-args.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Tpo -c -o src/libostree/libostree_1_la-ostree-kernel-args.lo `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-kernel-args.c' object='src/libostree/libostree_1_la-ostree-kernel-args.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-kernel-args.lo `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c + src/libostree/libostree_1_la-ostree-libarchive-input-stream.lo: src/libostree/ostree-libarchive-input-stream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-libarchive-input-stream.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Tpo -c -o src/libostree/libostree_1_la-ostree-libarchive-input-stream.lo `test -f 'src/libostree/ostree-libarchive-input-stream.c' || echo '$(srcdir)/'`src/libostree/ostree-libarchive-input-stream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Plo @@ -5203,6 +5262,27 @@ src/libostree/libostree_1_la-ostree-repo-finder-avahi-parser.lo: src/libostree/o @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-repo-finder-avahi-parser.lo `test -f 'src/libostree/ostree-repo-finder-avahi-parser.c' || echo '$(srcdir)/'`src/libostree/ostree-repo-finder-avahi-parser.c +src/libostree/libostree_1_la-ostree-gpg-verifier.lo: src/libostree/ostree-gpg-verifier.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-gpg-verifier.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Tpo -c -o src/libostree/libostree_1_la-ostree-gpg-verifier.lo `test -f 'src/libostree/ostree-gpg-verifier.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verifier.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-gpg-verifier.c' object='src/libostree/libostree_1_la-ostree-gpg-verifier.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-gpg-verifier.lo `test -f 'src/libostree/ostree-gpg-verifier.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verifier.c + +src/libostree/libostree_1_la-ostree-gpg-verify-result.lo: src/libostree/ostree-gpg-verify-result.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-gpg-verify-result.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Tpo -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result.lo `test -f 'src/libostree/ostree-gpg-verify-result.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-gpg-verify-result.c' object='src/libostree/libostree_1_la-ostree-gpg-verify-result.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result.lo `test -f 'src/libostree/ostree-gpg-verify-result.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result.c + +src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo: src/libostree/ostree-gpg-verify-result-dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Tpo -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo `test -f 'src/libostree/ostree-gpg-verify-result-dummy.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result-dummy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-gpg-verify-result-dummy.c' object='src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-gpg-verify-result-dummy.lo `test -f 'src/libostree/ostree-gpg-verify-result-dummy.c' || echo '$(srcdir)/'`src/libostree/ostree-gpg-verify-result-dummy.c + src/libostree/libostree_1_la-ostree-fetcher-util.lo: src/libostree/ostree-fetcher-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-fetcher-util.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Tpo -c -o src/libostree/libostree_1_la-ostree-fetcher-util.lo `test -f 'src/libostree/ostree-fetcher-util.c' || echo '$(srcdir)/'`src/libostree/ostree-fetcher-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Plo @@ -5259,13 +5339,6 @@ src/libostree/libostree_1_la-ostree-enumtypes.lo: src/libostree/ostree-enumtypes @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_1_la-ostree-enumtypes.lo `test -f 'src/libostree/ostree-enumtypes.c' || echo '$(srcdir)/'`src/libostree/ostree-enumtypes.c -src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo: src/libostree/ostree-kernel-args.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_kernel_args_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Tpo -c -o src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Tpo src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-kernel-args.c' object='src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_kernel_args_la_CFLAGS) $(CFLAGS) -c -o src/libostree/libostree_kernel_args_la-ostree-kernel-args.lo `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c - tests/libostreetest_la-libostreetest.lo: tests/libostreetest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostreetest_la_CFLAGS) $(CFLAGS) -MT tests/libostreetest_la-libostreetest.lo -MD -MP -MF tests/$(DEPDIR)/libostreetest_la-libostreetest.Tpo -c -o tests/libostreetest_la-libostreetest.lo `test -f 'tests/libostreetest.c' || echo '$(srcdir)/'`tests/libostreetest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/libostreetest_la-libostreetest.Tpo tests/$(DEPDIR)/libostreetest_la-libostreetest.Plo @@ -5343,13 +5416,6 @@ src/libotutil/libotutil_la-ot-gio-utils.lo: src/libotutil/ot-gio-utils.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -c -o src/libotutil/libotutil_la-ot-gio-utils.lo `test -f 'src/libotutil/ot-gio-utils.c' || echo '$(srcdir)/'`src/libotutil/ot-gio-utils.c -src/libotutil/libotutil_la-ot-gpg-utils.lo: src/libotutil/ot-gpg-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -MT src/libotutil/libotutil_la-ot-gpg-utils.lo -MD -MP -MF src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Tpo -c -o src/libotutil/libotutil_la-ot-gpg-utils.lo `test -f 'src/libotutil/ot-gpg-utils.c' || echo '$(srcdir)/'`src/libotutil/ot-gpg-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Tpo src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libotutil/ot-gpg-utils.c' object='src/libotutil/libotutil_la-ot-gpg-utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -c -o src/libotutil/libotutil_la-ot-gpg-utils.lo `test -f 'src/libotutil/ot-gpg-utils.c' || echo '$(srcdir)/'`src/libotutil/ot-gpg-utils.c - src/libotutil/libotutil_la-ot-tool-util.lo: src/libotutil/ot-tool-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -MT src/libotutil/libotutil_la-ot-tool-util.lo -MD -MP -MF src/libotutil/$(DEPDIR)/libotutil_la-ot-tool-util.Tpo -c -o src/libotutil/libotutil_la-ot-tool-util.lo `test -f 'src/libotutil/ot-tool-util.c' || echo '$(srcdir)/'`src/libotutil/ot-tool-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libotutil/$(DEPDIR)/libotutil_la-ot-tool-util.Tpo src/libotutil/$(DEPDIR)/libotutil_la-ot-tool-util.Plo @@ -5357,6 +5423,13 @@ src/libotutil/libotutil_la-ot-tool-util.lo: src/libotutil/ot-tool-util.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -c -o src/libotutil/libotutil_la-ot-tool-util.lo `test -f 'src/libotutil/ot-tool-util.c' || echo '$(srcdir)/'`src/libotutil/ot-tool-util.c +src/libotutil/libotutil_la-ot-gpg-utils.lo: src/libotutil/ot-gpg-utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -MT src/libotutil/libotutil_la-ot-gpg-utils.lo -MD -MP -MF src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Tpo -c -o src/libotutil/libotutil_la-ot-gpg-utils.lo `test -f 'src/libotutil/ot-gpg-utils.c' || echo '$(srcdir)/'`src/libotutil/ot-gpg-utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Tpo src/libotutil/$(DEPDIR)/libotutil_la-ot-gpg-utils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libotutil/ot-gpg-utils.c' object='src/libotutil/libotutil_la-ot-gpg-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotutil_la_CFLAGS) $(CFLAGS) -c -o src/libotutil/libotutil_la-ot-gpg-utils.lo `test -f 'src/libotutil/ot-gpg-utils.c' || echo '$(srcdir)/'`src/libotutil/ot-gpg-utils.c + tests/libreaddir_rand_la-readdir-rand.lo: tests/readdir-rand.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libreaddir_rand_la_CFLAGS) $(CFLAGS) -MT tests/libreaddir_rand_la-readdir-rand.lo -MD -MP -MF tests/$(DEPDIR)/libreaddir_rand_la-readdir-rand.Tpo -c -o tests/libreaddir_rand_la-readdir-rand.lo `test -f 'tests/readdir-rand.c' || echo '$(srcdir)/'`tests/readdir-rand.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/libreaddir_rand_la-readdir-rand.Tpo tests/$(DEPDIR)/libreaddir_rand_la-readdir-rand.Plo @@ -5532,20 +5605,6 @@ src/ostree/ostree-ot-builtin-fsck.obj: src/ostree/ot-builtin-fsck.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-builtin-fsck.obj `if test -f 'src/ostree/ot-builtin-fsck.c'; then $(CYGPATH_W) 'src/ostree/ot-builtin-fsck.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-builtin-fsck.c'; fi` -src/ostree/ostree-ot-builtin-gpg-sign.o: src/ostree/ot-builtin-gpg-sign.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-builtin-gpg-sign.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo -c -o src/ostree/ostree-ot-builtin-gpg-sign.o `test -f 'src/ostree/ot-builtin-gpg-sign.c' || echo '$(srcdir)/'`src/ostree/ot-builtin-gpg-sign.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-builtin-gpg-sign.c' object='src/ostree/ostree-ot-builtin-gpg-sign.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-builtin-gpg-sign.o `test -f 'src/ostree/ot-builtin-gpg-sign.c' || echo '$(srcdir)/'`src/ostree/ot-builtin-gpg-sign.c - -src/ostree/ostree-ot-builtin-gpg-sign.obj: src/ostree/ot-builtin-gpg-sign.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-builtin-gpg-sign.obj -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo -c -o src/ostree/ostree-ot-builtin-gpg-sign.obj `if test -f 'src/ostree/ot-builtin-gpg-sign.c'; then $(CYGPATH_W) 'src/ostree/ot-builtin-gpg-sign.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-builtin-gpg-sign.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-builtin-gpg-sign.c' object='src/ostree/ostree-ot-builtin-gpg-sign.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-builtin-gpg-sign.obj `if test -f 'src/ostree/ot-builtin-gpg-sign.c'; then $(CYGPATH_W) 'src/ostree/ot-builtin-gpg-sign.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-builtin-gpg-sign.c'; fi` - src/ostree/ostree-ot-builtin-init.o: src/ostree/ot-builtin-init.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-builtin-init.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-builtin-init.Tpo -c -o src/ostree/ostree-ot-builtin-init.o `test -f 'src/ostree/ot-builtin-init.c' || echo '$(srcdir)/'`src/ostree/ot-builtin-init.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-builtin-init.Tpo src/ostree/$(DEPDIR)/ostree-ot-builtin-init.Po @@ -5756,6 +5815,20 @@ src/ostree/ostree-ot-editor.obj: src/ostree/ot-editor.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-editor.obj `if test -f 'src/ostree/ot-editor.c'; then $(CYGPATH_W) 'src/ostree/ot-editor.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-editor.c'; fi` +src/ostree/ostree-ot-builtin-gpg-sign.o: src/ostree/ot-builtin-gpg-sign.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-builtin-gpg-sign.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo -c -o src/ostree/ostree-ot-builtin-gpg-sign.o `test -f 'src/ostree/ot-builtin-gpg-sign.c' || echo '$(srcdir)/'`src/ostree/ot-builtin-gpg-sign.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-builtin-gpg-sign.c' object='src/ostree/ostree-ot-builtin-gpg-sign.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-builtin-gpg-sign.o `test -f 'src/ostree/ot-builtin-gpg-sign.c' || echo '$(srcdir)/'`src/ostree/ot-builtin-gpg-sign.c + +src/ostree/ostree-ot-builtin-gpg-sign.obj: src/ostree/ot-builtin-gpg-sign.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-builtin-gpg-sign.obj -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo -c -o src/ostree/ostree-ot-builtin-gpg-sign.obj `if test -f 'src/ostree/ot-builtin-gpg-sign.c'; then $(CYGPATH_W) 'src/ostree/ot-builtin-gpg-sign.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-builtin-gpg-sign.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Tpo src/ostree/$(DEPDIR)/ostree-ot-builtin-gpg-sign.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-builtin-gpg-sign.c' object='src/ostree/ostree-ot-builtin-gpg-sign.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-builtin-gpg-sign.obj `if test -f 'src/ostree/ot-builtin-gpg-sign.c'; then $(CYGPATH_W) 'src/ostree/ot-builtin-gpg-sign.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-builtin-gpg-sign.c'; fi` + src/ostree/ostree-ot-admin-builtin-init-fs.o: src/ostree/ot-admin-builtin-init-fs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-admin-builtin-init-fs.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-init-fs.Tpo -c -o src/ostree/ostree-ot-admin-builtin-init-fs.o `test -f 'src/ostree/ot-admin-builtin-init-fs.c' || echo '$(srcdir)/'`src/ostree/ot-admin-builtin-init-fs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-init-fs.Tpo src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-init-fs.Po @@ -6036,20 +6109,6 @@ src/ostree/ostree-ot-remote-builtin-delete.obj: src/ostree/ot-remote-builtin-del @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-delete.obj `if test -f 'src/ostree/ot-remote-builtin-delete.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-delete.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-delete.c'; fi` -src/ostree/ostree-ot-remote-builtin-gpg-import.o: src/ostree/ot-remote-builtin-gpg-import.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-gpg-import.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.o `test -f 'src/ostree/ot-remote-builtin-gpg-import.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-gpg-import.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-remote-builtin-gpg-import.c' object='src/ostree/ostree-ot-remote-builtin-gpg-import.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.o `test -f 'src/ostree/ot-remote-builtin-gpg-import.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-gpg-import.c - -src/ostree/ostree-ot-remote-builtin-gpg-import.obj: src/ostree/ot-remote-builtin-gpg-import.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-gpg-import.obj -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.obj `if test -f 'src/ostree/ot-remote-builtin-gpg-import.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-gpg-import.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-gpg-import.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-remote-builtin-gpg-import.c' object='src/ostree/ostree-ot-remote-builtin-gpg-import.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.obj `if test -f 'src/ostree/ot-remote-builtin-gpg-import.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-gpg-import.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-gpg-import.c'; fi` - src/ostree/ostree-ot-remote-builtin-list.o: src/ostree/ot-remote-builtin-list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-list.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-list.Tpo -c -o src/ostree/ostree-ot-remote-builtin-list.o `test -f 'src/ostree/ot-remote-builtin-list.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-list.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-list.Po @@ -6106,6 +6165,20 @@ src/ostree/ostree-ot-remote-builtin-summary.obj: src/ostree/ot-remote-builtin-su @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-summary.obj `if test -f 'src/ostree/ot-remote-builtin-summary.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-summary.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-summary.c'; fi` +src/ostree/ostree-ot-remote-builtin-gpg-import.o: src/ostree/ot-remote-builtin-gpg-import.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-gpg-import.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.o `test -f 'src/ostree/ot-remote-builtin-gpg-import.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-gpg-import.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-remote-builtin-gpg-import.c' object='src/ostree/ostree-ot-remote-builtin-gpg-import.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.o `test -f 'src/ostree/ot-remote-builtin-gpg-import.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-gpg-import.c + +src/ostree/ostree-ot-remote-builtin-gpg-import.obj: src/ostree/ot-remote-builtin-gpg-import.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-gpg-import.obj -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.obj `if test -f 'src/ostree/ot-remote-builtin-gpg-import.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-gpg-import.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-gpg-import.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-gpg-import.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-remote-builtin-gpg-import.c' object='src/ostree/ostree-ot-remote-builtin-gpg-import.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-remote-builtin-gpg-import.obj `if test -f 'src/ostree/ot-remote-builtin-gpg-import.c'; then $(CYGPATH_W) 'src/ostree/ot-remote-builtin-gpg-import.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-remote-builtin-gpg-import.c'; fi` + src/ostree/ostree-ot-remote-builtin-add-cookie.o: src/ostree/ot-remote-builtin-add-cookie.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-remote-builtin-add-cookie.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-add-cookie.Tpo -c -o src/ostree/ostree-ot-remote-builtin-add-cookie.o `test -f 'src/ostree/ot-remote-builtin-add-cookie.c' || echo '$(srcdir)/'`src/ostree/ot-remote-builtin-add-cookie.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-add-cookie.Tpo src/ostree/$(DEPDIR)/ostree-ot-remote-builtin-add-cookie.Po @@ -6484,6 +6557,34 @@ tests/test_include_ostree_h-test-include-ostree-h.obj: tests/test-include-ostree @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_test_include_ostree_h_CPPFLAGS) $(CPPFLAGS) $(tests_test_include_ostree_h_CFLAGS) $(CFLAGS) -c -o tests/test_include_ostree_h-test-include-ostree-h.obj `if test -f 'tests/test-include-ostree-h.c'; then $(CYGPATH_W) 'tests/test-include-ostree-h.c'; else $(CYGPATH_W) '$(srcdir)/tests/test-include-ostree-h.c'; fi` +src/libostree/tests_test_kargs-ostree-kernel-args.o: src/libostree/ostree-kernel-args.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -MT src/libostree/tests_test_kargs-ostree-kernel-args.o -MD -MP -MF src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Tpo -c -o src/libostree/tests_test_kargs-ostree-kernel-args.o `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Tpo src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-kernel-args.c' object='src/libostree/tests_test_kargs-ostree-kernel-args.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -c -o src/libostree/tests_test_kargs-ostree-kernel-args.o `test -f 'src/libostree/ostree-kernel-args.c' || echo '$(srcdir)/'`src/libostree/ostree-kernel-args.c + +src/libostree/tests_test_kargs-ostree-kernel-args.obj: src/libostree/ostree-kernel-args.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -MT src/libostree/tests_test_kargs-ostree-kernel-args.obj -MD -MP -MF src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Tpo -c -o src/libostree/tests_test_kargs-ostree-kernel-args.obj `if test -f 'src/libostree/ostree-kernel-args.c'; then $(CYGPATH_W) 'src/libostree/ostree-kernel-args.c'; else $(CYGPATH_W) '$(srcdir)/src/libostree/ostree-kernel-args.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Tpo src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-kernel-args.c' object='src/libostree/tests_test_kargs-ostree-kernel-args.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -c -o src/libostree/tests_test_kargs-ostree-kernel-args.obj `if test -f 'src/libostree/ostree-kernel-args.c'; then $(CYGPATH_W) 'src/libostree/ostree-kernel-args.c'; else $(CYGPATH_W) '$(srcdir)/src/libostree/ostree-kernel-args.c'; fi` + +tests/test_kargs-test-kargs.o: tests/test-kargs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -MT tests/test_kargs-test-kargs.o -MD -MP -MF tests/$(DEPDIR)/test_kargs-test-kargs.Tpo -c -o tests/test_kargs-test-kargs.o `test -f 'tests/test-kargs.c' || echo '$(srcdir)/'`tests/test-kargs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_kargs-test-kargs.Tpo tests/$(DEPDIR)/test_kargs-test-kargs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/test-kargs.c' object='tests/test_kargs-test-kargs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -c -o tests/test_kargs-test-kargs.o `test -f 'tests/test-kargs.c' || echo '$(srcdir)/'`tests/test-kargs.c + +tests/test_kargs-test-kargs.obj: tests/test-kargs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -MT tests/test_kargs-test-kargs.obj -MD -MP -MF tests/$(DEPDIR)/test_kargs-test-kargs.Tpo -c -o tests/test_kargs-test-kargs.obj `if test -f 'tests/test-kargs.c'; then $(CYGPATH_W) 'tests/test-kargs.c'; else $(CYGPATH_W) '$(srcdir)/tests/test-kargs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_kargs-test-kargs.Tpo tests/$(DEPDIR)/test_kargs-test-kargs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/test-kargs.c' object='tests/test_kargs-test-kargs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_kargs_CFLAGS) $(CFLAGS) -c -o tests/test_kargs-test-kargs.obj `if test -f 'tests/test-kargs.c'; then $(CYGPATH_W) 'tests/test-kargs.c'; else $(CYGPATH_W) '$(srcdir)/tests/test-kargs.c'; fi` + tests/test_keyfile_utils-test-keyfile-utils.o: tests/test-keyfile-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_keyfile_utils_CFLAGS) $(CFLAGS) -MT tests/test_keyfile_utils-test-keyfile-utils.o -MD -MP -MF tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Tpo -c -o tests/test_keyfile_utils-test-keyfile-utils.o `test -f 'tests/test-keyfile-utils.c' || echo '$(srcdir)/'`tests/test-keyfile-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Tpo tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Po @@ -7565,13 +7666,6 @@ tests/test-ot-tool-util.log: tests/test-ot-tool-util$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/test-gpg-verify-result.log: tests/test-gpg-verify-result$(EXEEXT) - @p='tests/test-gpg-verify-result$(EXEEXT)'; \ - b='tests/test-gpg-verify-result'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-checksum.log: tests/test-checksum$(EXEEXT) @p='tests/test-checksum$(EXEEXT)'; \ b='tests/test-checksum'; \ @@ -7628,6 +7722,20 @@ tests/test-include-ostree-h.log: tests/test-include-ostree-h$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-kargs.log: tests/test-kargs$(EXEEXT) + @p='tests/test-kargs$(EXEEXT)'; \ + b='tests/test-kargs'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-gpg-verify-result.log: tests/test-gpg-verify-result$(EXEEXT) + @p='tests/test-gpg-verify-result$(EXEEXT)'; \ + b='tests/test-gpg-verify-result'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-libarchive-import.log: tests/test-libarchive-import$(EXEEXT) @p='tests/test-libarchive-import$(EXEEXT)'; \ b='tests/test-libarchive-import'; \ @@ -7691,13 +7799,6 @@ tests/test-remote-headers.sh.log: tests/test-remote-headers.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/test-remote-gpg-import.sh.log: tests/test-remote-gpg-import.sh - @p='tests/test-remote-gpg-import.sh'; \ - b='tests/test-remote-gpg-import.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-commit-sign.sh.log: tests/test-commit-sign.sh @p='tests/test-commit-sign.sh'; \ b='tests/test-commit-sign.sh'; \ @@ -7852,13 +7953,6 @@ tests/test-local-pull-depth.sh.log: tests/test-local-pull-depth.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/test-gpg-signed-commit.sh.log: tests/test-gpg-signed-commit.sh - @p='tests/test-gpg-signed-commit.sh'; \ - b='tests/test-gpg-signed-commit.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-admin-upgrade-unconfigured.sh.log: tests/test-admin-upgrade-unconfigured.sh @p='tests/test-admin-upgrade-unconfigured.sh'; \ b='tests/test-admin-upgrade-unconfigured.sh'; \ @@ -7985,13 +8079,6 @@ tests/test-admin-deploy-clean.sh.log: tests/test-admin-deploy-clean.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -tests/test-admin-gpg.sh.log: tests/test-admin-gpg.sh - @p='tests/test-admin-gpg.sh'; \ - b='tests/test-admin-gpg.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-reset-nonlinear.sh.log: tests/test-reset-nonlinear.sh @p='tests/test-reset-nonlinear.sh'; \ b='tests/test-reset-nonlinear.sh'; \ @@ -8174,6 +8261,27 @@ tests/test-config.sh.log: tests/test-config.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-remote-gpg-import.sh.log: tests/test-remote-gpg-import.sh + @p='tests/test-remote-gpg-import.sh'; \ + b='tests/test-remote-gpg-import.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-gpg-signed-commit.sh.log: tests/test-gpg-signed-commit.sh + @p='tests/test-gpg-signed-commit.sh'; \ + b='tests/test-gpg-signed-commit.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-admin-gpg.sh.log: tests/test-admin-gpg.sh + @p='tests/test-admin-gpg.sh'; \ + b='tests/test-admin-gpg.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-rofiles-fuse.sh.log: tests/test-rofiles-fuse.sh @p='tests/test-rofiles-fuse.sh'; \ b='tests/test-rofiles-fuse.sh'; \ @@ -8609,8 +8717,10 @@ distclean: distclean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-uri.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-impl-system-generator.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-linuxfsutil.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Plo @@ -8650,9 +8760,9 @@ distclean: distclean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-tls-cert-interaction.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-varint.Plo - -rm -f src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Plo -rm -f src/libostree/$(DEPDIR)/tests_test_bloom-ostree-bloom.Po -rm -f src/libostree/$(DEPDIR)/tests_test_checksum-ostree-core.Po + -rm -f src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-common.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-compressor.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-decompressor.Po @@ -8747,6 +8857,7 @@ distclean: distclean-recursive -rm -f tests/$(DEPDIR)/test_checksum-test-checksum.Po -rm -f tests/$(DEPDIR)/test_gpg_verify_result-test-gpg-verify-result.Po -rm -f tests/$(DEPDIR)/test_include_ostree_h-test-include-ostree-h.Po + -rm -f tests/$(DEPDIR)/test_kargs-test-kargs.Po -rm -f tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Po -rm -f tests/$(DEPDIR)/test_libarchive_import-test-libarchive-import.Po -rm -f tests/$(DEPDIR)/test_lzma-test-lzma.Po @@ -8866,8 +8977,10 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-uri.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-util.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verifier.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result-dummy.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-gpg-verify-result.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-impl-system-generator.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-kernel-args.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-libarchive-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-linuxfsutil.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Plo @@ -8907,9 +9020,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-tls-cert-interaction.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-varint.Plo - -rm -f src/libostree/$(DEPDIR)/libostree_kernel_args_la-ostree-kernel-args.Plo -rm -f src/libostree/$(DEPDIR)/tests_test_bloom-ostree-bloom.Po -rm -f src/libostree/$(DEPDIR)/tests_test_checksum-ostree-core.Po + -rm -f src/libostree/$(DEPDIR)/tests_test_kargs-ostree-kernel-args.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-common.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-compressor.Po -rm -f src/libostree/$(DEPDIR)/tests_test_lzma-ostree-lzma-decompressor.Po @@ -9004,6 +9117,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f tests/$(DEPDIR)/test_checksum-test-checksum.Po -rm -f tests/$(DEPDIR)/test_gpg_verify_result-test-gpg-verify-result.Po -rm -f tests/$(DEPDIR)/test_include_ostree_h-test-include-ostree-h.Po + -rm -f tests/$(DEPDIR)/test_kargs-test-kargs.Po -rm -f tests/$(DEPDIR)/test_keyfile_utils-test-keyfile-utils.Po -rm -f tests/$(DEPDIR)/test_libarchive_import-test-libarchive-import.Po -rm -f tests/$(DEPDIR)/test_lzma-test-lzma.Po diff --git a/README.md b/README.md index aa7b23e0..a4146f04 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,36 @@ version of projects like [flatpak](https://github.com/flatpak/flatpak) which use libostree for applications, rather than hosts. -Projects using OSTree +Operating systems and distributions using OSTree --------------------- +[Endless OS](https://endlessos.com/) uses libostree for their host system as +well as flatpak. See +their [eos-updater](https://github.com/endlessm/eos-updater) +and [deb-ostree-builder](https://github.com/dbnicholson/deb-ostree-builder) +projects. + +Fedora derivatives use rpm-ostree (noted below); there are 3 variants using OSTree: + + - [Fedora CoreOS](https://getfedora.org/en/coreos/) + - [Fedora Silverblue](https://silverblue.fedoraproject.org/) + - [Fedora IoT](https://iot.fedoraproject.org/) + +Red Hat Enterprise Linux CoreOS is a derivative of Fedora CoreOS, used in [OpenShift 4](https://try.openshift.com/). +The [machine-config-operator](https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md) +manages upgrades. RHEL CoreOS is also the successor to RHEL Atomic Host, which +uses rpm-ostree as well. + +[GNOME Continuous](https://wiki.gnome.org/Projects/GnomeContinuous) is +where OSTree was born - as a high performance continuous delivery/testing +system for GNOME. + +[Liri OS](https://liri.io/download/silverblue/) has the option to install +their distribution using ostree. + +Distribution build tools +------------------------ + [meta-updater](https://github.com/advancedtelematic/meta-updater) is a layer available for [OpenEmbedded](http://www.openembedded.org/wiki/Main_Page) systems. @@ -46,37 +73,32 @@ systems. [QtOTA](http://doc.qt.io/QtOTA/) is Qt's over-the-air update framework which uses libostree. -[rpm-ostree](https://github.com/projectatomic/rpm-ostree) is a next-generation -hybrid package/image system for [Fedora](https://getfedora.org/) and [CentOS](https://www.centos.org/), -used by the [Atomic Host](http://www.projectatomic.io/) project. -By default it uses libostree to atomically replicate a base OS (all dependency -resolution is done on the server), but it supports "package layering", where +The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and +integration tool uses libostree as a caching system to store and share +built artifacts. + +Fedora [coreos-assembler](https://github.com/coreos/coreos-assembler) is +the build tool used to generate Fedora CoreOS derivatives. + +Projects linking to libostree +----------------------------- + +[rpm-ostree](https://github.com/projectatomic/rpm-ostree) is used by the +Fedora-derived operating systems listed above. It is a full hybrid +image/package system. By default it uses libostree to atomically replicate a base OS +(all dependency resolution is done on the server), but it supports "package layering", where additional RPMs can be layered on top of the base. This brings a "best of both worlds"" model for image and package systems. +[eos-updater](https://github.com/endlessm/eos-updater) is a daemon that implements updates +on EndlessOS. + [flatpak](https://github.com/flatpak/flatpak) uses libostree for desktop application containers. Unlike most of the other systems here, flatpak does not use the "libostree host system" aspects (e.g. bootloader management), just the "git-like hardlink dedup". For example, flatpak supports a per-user OSTree repository. -[Endless OS](https://endlessos.com/) uses libostree for their host system as -well as flatpak. See -their [eos-updater](https://github.com/endlessm/eos-updater) -and [deb-ostree-builder](https://github.com/dbnicholson/deb-ostree-builder) -projects. - -[GNOME Continuous](https://wiki.gnome.org/Projects/GnomeContinuous) is -where OSTree was born - as a high performance continuous delivery/testing -system for GNOME. - -The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and -integration tool uses libostree as a caching system to store and share -built artifacts. - -[Liri OS](https://liri.io/download/silverblue/) has the option to install -their distribution using ostree. - Language bindings ---- @@ -91,7 +113,7 @@ write higher level manual bindings on top; this is more common for statically compiled languages. Here's a list of such bindings: - [ostree-go](https://github.com/ostreedev/ostree-go/) - - [rust-libostree](https://gitlab.com/fkrull/rust-libostree/) + - [ostree-rs](https://gitlab.com/fkrull/ostree-rs/) Building -------- diff --git a/apidoc/Makefile.am b/apidoc/Makefile.am index d64ce451..98a84d5f 100644 --- a/apidoc/Makefile.am +++ b/apidoc/Makefile.am @@ -78,7 +78,6 @@ IGNORE_HFILES= \ ostree-fetcher.h \ ostree-gpg-verifier.h \ ostree-gpg-verify-result-private.h \ - ostree-kernel-args.h \ ostree-libarchive-input-stream.h \ ostree-lzma-compressor.h \ ostree-lzma-decompressor.h \ diff --git a/apidoc/Makefile.in b/apidoc/Makefile.in index 7e0c7614..e196f994 100644 --- a/apidoc/Makefile.in +++ b/apidoc/Makefile.in @@ -411,6 +411,7 @@ libostree_public_headers = \ src/libostree/ostree-repo-finder-config.h \ src/libostree/ostree-repo-finder-mount.h \ src/libostree/ostree-repo-finder-override.h \ + src/libostree/ostree-kernel-args.h \ $(NULL) @@ -474,7 +475,6 @@ IGNORE_HFILES = \ ostree-fetcher.h \ ostree-gpg-verifier.h \ ostree-gpg-verify-result-private.h \ - ostree-kernel-args.h \ ostree-libarchive-input-stream.h \ ostree-lzma-compressor.h \ ostree-lzma-decompressor.h \ diff --git a/apidoc/html/index.html b/apidoc/html/index.html index cc45450d..98f7ed38 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2019.2

+

for OSTree 2019.3


diff --git a/apidoc/html/ostree-Core-repository-independent-functions.html b/apidoc/html/ostree-Core-repository-independent-functions.html index d2b7615b..f5a7ffe6 100644 --- a/apidoc/html/ostree-Core-repository-independent-functions.html +++ b/apidoc/html/ostree-Core-repository-independent-functions.html @@ -848,6 +848,7 @@ ostree_checksum_b64_from_bytes (const [transfer full]

+

Since: 2016.8


@@ -875,6 +876,7 @@ ostree_checksum_b64_to_bytes (const [transfer full][array fixed-size=32]

+

Since: 2016.8


@@ -1578,6 +1580,7 @@ OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.

+

Since: 2016.6


@@ -2379,6 +2382,7 @@ root "dirmeta" checksum (both in binary form, not hexadecimal).

is not well-formed.

[nullable]

+

Since: 2018.2


@@ -2412,6 +2416,7 @@ ostree_check_version (guint

Returns

TRUE if current libostree has at least the requested version, FALSE otherwise

+

Since: 2017.4

diff --git a/apidoc/html/ostree-GPG-signature-verification-results.html b/apidoc/html/ostree-GPG-signature-verification-results.html index 86830c70..a6ea520b 100644 --- a/apidoc/html/ostree-GPG-signature-verification-results.html +++ b/apidoc/html/ostree-GPG-signature-verification-results.html @@ -514,6 +514,7 @@ it will handle the NULL NULL and had at least one signature from trusted keyring, otherwise FALSE

+

Since: 2016.6

@@ -676,6 +677,24 @@ The attribute's GVariantType is shown in brackets.

  + +

OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP

+ +

[G_VARIANT_TYPE_INT64] Key expiration Unix timestamp (0 if no + expiration or if the key is missing)

+ +  + + +

OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY

+ +

[G_VARIANT_TYPE_INT64] Key expiration Unix timestamp of the signing key's + primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP + if the signing key is the primary key and 0 if no expiration or if the key + is missing)

+ +  +
diff --git a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html index 39c58c38..e3387de8 100644 --- a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html +++ b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html @@ -242,6 +242,7 @@ and checksums. The data will be loaded from the repo lazily as needed.

A new tree.

[transfer full]

+

Since: 2018.7


@@ -358,6 +359,7 @@ does not exist in the tree

+

Since: 2018.9


@@ -412,6 +414,43 @@ ostree_mutable_tree_lookup (char **out_file_checksum, OstreeMutableTree **out_subdir, GError **error); +
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

self

Tree

 

name

name

 

out_file_checksum

checksum.

[out][transfer full]

out_subdir

subdirectory.

[out][transfer full]

error

a GError

 
+

@@ -569,6 +608,7 @@ if it was not possible.

checksums are not loaded or checked when this function is called. Instead the contents will be loaded only when needed.

+

Since: 2018.7

diff --git a/apidoc/html/ostree-OstreeRepo.html b/apidoc/html/ostree-OstreeRepo.html index b815c6e3..490f498b 100644 --- a/apidoc/html/ostree-OstreeRepo.html +++ b/apidoc/html/ostree-OstreeRepo.html @@ -770,6 +770,14 @@ gboolean +ostree_repo_write_archive_to_mtree_from_fd () + + + + +gboolean + + ostree_repo_write_mtree () @@ -1279,6 +1287,33 @@ collection IDs, see ostree_validate_collection_id()const char *mode, OstreeRepoMode *out_mode, GError **error); +
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mode

a repo mode as a string

 

out_mode

the corresponding OstreeRepoMode.

[out]

error

a GError if the string is not a valid mode

 
+

@@ -1320,6 +1355,7 @@ already extant repository. If you want to create one, use

[transfer full]

+

Since: 2017.10


@@ -1598,6 +1634,7 @@ the mode or configuration (repo/config) of an exist

A new OSTree repository reference.

[transfer full]

+

Since: 2017.10


@@ -1721,6 +1758,43 @@ ostree_repo_get_mode (OstreeRepo *self, guint64 *out_reserved_bytes, GError **error); +

Determine the number of bytes of free disk space that are reserved according +to the repo config and return that number in out_reserved_bytes +. See the +documentation for the core.min-free-space-size and +core.min-free-space-percent repo config options.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

Repo

 

out_reserved_bytes

Location to store the result.

[out]

error

Return location for a GError

 
+
+
+

Returns

+

TRUE on success, FALSE otherwise.

+
+

Since: 2018.9


@@ -1762,6 +1836,7 @@ repository (to see whether a ref was written).

File descriptor for repository root - owned by self

+

Since: 2016.4


@@ -2283,18 +2358,18 @@ from the remote named name

source_stream

a GInputStream, or NULL.

-[allow-none] +[nullable]

key_ids

a NULL-terminated array of GPG key IDs, or NULL.

-[array zero-terminated=1][element-type utf8][allow-none] +[array zero-terminated=1][element-type utf8][nullable]

out_imported

return location for the number of imported keys, or NULL.

-[allow-none] +[out][optional]

cancellable

@@ -2464,6 +2539,7 @@ signature data, or NULL.

Returns

TRUE on success, FALSE on failure

+

Since: 2016.6


@@ -2501,6 +2577,7 @@ own repo/config data. This API can be used to reload it.

+

Since: 2017.2


@@ -2569,6 +2646,7 @@ is not present

TRUE on success, otherwise FALSE with error set

+

Since: 2016.5


@@ -2630,6 +2708,7 @@ of strings. The list should be freed with

TRUE on success, otherwise FALSE with error set

+

Since: 2016.5


@@ -2696,6 +2775,7 @@ is not present.

TRUE on success, otherwise FALSE with error set

+

Since: 2016.5


@@ -3170,6 +3250,7 @@ ostree_repo_set_alias_ref_immediate (
+

Since: 2017.10


@@ -3222,6 +3303,7 @@ write permissions in the repo, where the cache is normally stored.

+

Since: 2016.5


@@ -4032,6 +4114,7 @@ is true and it does not exist.

+

Since: 2016.7



@@ -4668,6 +4752,7 @@ this will simply be a fast Unix hard link operation.

+

Since: 2016.5


@@ -5357,6 +5442,70 @@ file structure to mtree

+

ostree_repo_write_archive_to_mtree_from_fd ()

+
gboolean
+ostree_repo_write_archive_to_mtree_from_fd
+                               (OstreeRepo *self,
+                                int fd,
+                                OstreeMutableTree *mtree,
+                                OstreeRepoCommitModifier *modifier,
+                                gboolean autocreate_parents,
+                                GCancellable *cancellable,
+                                GError **error);
+

Read an archive from fd + and import it into the repository, writing +its file structure to mtree +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

self

An OstreeRepo

 

fd

A file descriptor to read the archive from

 

mtree

The OstreeMutableTree to write to

 

modifier

Optional commit modifier.

[allow-none]

autocreate_parents

Autocreate parent directories

 

cancellable

Cancellable

 

error

Error

 
+
+
+
+

ostree_repo_write_mtree ()

gboolean
 ostree_repo_write_mtree (OstreeRepo *self,
@@ -5708,6 +5857,7 @@ ostree_repo_checkout_at_options_set_devino
 
 
+

Since: 2017.13


@@ -5919,6 +6069,7 @@ cache.

+

Since: 2016.8


@@ -7029,6 +7180,7 @@ statistics on objects that would be deleted, without actually deleting them.

+

Since: 2017.1


@@ -7535,6 +7687,7 @@ the verifications using GPG keys in the keyrings of all remotes.

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

+

Since: 2016.6


@@ -7713,6 +7866,7 @@ configured for remote

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

+

Since: 2016.14


diff --git a/apidoc/html/ostree-Root-partition-mount-point.html b/apidoc/html/ostree-Root-partition-mount-point.html index dbbf84ba..492aef96 100644 --- a/apidoc/html/ostree-Root-partition-mount-point.html +++ b/apidoc/html/ostree-Root-partition-mount-point.html @@ -493,6 +493,39 @@ ostree_sysroot_load_if_changed (gboolean *out_changed, GCancellable *cancellable, GError **error); +
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

self

OstreeSysroot

 

out_changed

.

[out caller-allocates]

cancellable

Cancellable

 

error

Error

 
+
+

Since: 2016.4


@@ -1103,6 +1136,7 @@ has been invoked successfully.

.

[transfer none]

+

Since: 2017.7


@@ -1178,6 +1212,7 @@ ostree_sysroot_get_staged_deployment (NULL if none.

[transfer none]

+

Since: 2018.5


@@ -1222,6 +1257,7 @@ is required for generating a deployment.

+

Since: 2016.4


@@ -1376,6 +1412,7 @@ across reboots.

+

Since: 2016.4


@@ -1526,6 +1563,7 @@ if for example you want to control pruning of the repository.

+

Since: 2017.4


@@ -1653,6 +1691,7 @@ shutdown time.

+

Since: 2018.5


diff --git a/apidoc/html/ostree-SELinux-policy-management.html b/apidoc/html/ostree-SELinux-policy-management.html index 10b40ada..fe61c781 100644 --- a/apidoc/html/ostree-SELinux-policy-management.html +++ b/apidoc/html/ostree-SELinux-policy-management.html @@ -218,6 +218,7 @@ ostree_sepolicy_new_at (int

[transfer full]

+

Since: 2017.4


@@ -310,6 +311,7 @@ ostree_sepolicy_get_csum ([transfer none]

+

Since: 2016.5


diff --git a/apidoc/html/ostree-ostree-deployment.html b/apidoc/html/ostree-ostree-deployment.html index a8702f31..1d09aa04 100644 --- a/apidoc/html/ostree-ostree-deployment.html +++ b/apidoc/html/ostree-ostree-deployment.html @@ -403,6 +403,7 @@ or concatenate it with the full

ostree_deployment_get_unlocked ()

OstreeDeploymentUnlockedState
 ostree_deployment_get_unlocked (OstreeDeployment *self);
+

Since: 2016.4




@@ -237,6 +269,38 @@ ostree_repo_file_tree_find_child (const char *name, gboolean *is_dir, GVariant **out_container); +
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

self

OstreeRepoFile

 

name

name of the child

 

is_dir

.

[out caller-allocates]

out_container

.

[out]
+

@@ -249,6 +313,38 @@ ostree_repo_file_tree_query_child (GFileInfo **out_info, GCancellable *cancellable, GError **error); +
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

self

OstreeRepoFile

 

out_info

.

[out]

cancellable

Cancellable

 

error

Error

 
+
diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2 index 3e7910ad..6804d47e 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -31,8 +31,8 @@ - - + + @@ -49,7 +49,7 @@ - + @@ -68,8 +68,8 @@ - - + + @@ -85,7 +85,7 @@ - + @@ -94,14 +94,14 @@ - + - + - + @@ -115,11 +115,11 @@ - - - - - + + + + + @@ -129,8 +129,8 @@ - - + + @@ -144,9 +144,9 @@ - + - + @@ -155,7 +155,7 @@ - + @@ -175,15 +175,16 @@ + - + - + @@ -207,7 +208,7 @@ - + @@ -215,10 +216,10 @@ - + - + @@ -242,27 +243,27 @@ - + - + - + - + @@ -281,18 +282,18 @@ - + - - + + - + - + - + @@ -315,11 +316,11 @@ - + - + @@ -346,7 +347,7 @@ - + @@ -376,7 +377,7 @@ - + @@ -385,12 +386,12 @@ - + - + @@ -497,6 +498,8 @@ + + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index bc87ed00..b2b92571 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -525,6 +525,83 @@ ostree_collection_ref_new, function in ostree-ref ostree_hash_object_name, function in Core repository-independent functions
+

K

+
+OstreeKernelArgs, struct in ostree-kernel-args +
+
+
+ostree_kernel_args_append, function in ostree-kernel-args +
+
+
+ostree_kernel_args_append_argv, function in ostree-kernel-args +
+
+
+ostree_kernel_args_append_argv_filtered, function in ostree-kernel-args +
+
+
+ostree_kernel_args_append_proc_cmdline, function in ostree-kernel-args +
+
+
+ostree_kernel_args_cleanup, function in ostree-kernel-args +
+
+
+ostree_kernel_args_delete, function in ostree-kernel-args +
+
+
+ostree_kernel_args_delete_key_entry, function in ostree-kernel-args +
+
+
+ostree_kernel_args_free, function in ostree-kernel-args +
+
+
+ostree_kernel_args_from_string, function in ostree-kernel-args +
+
+
+ostree_kernel_args_get_last_value, function in ostree-kernel-args +
+
+
+ostree_kernel_args_new, function in ostree-kernel-args +
+
+
+ostree_kernel_args_new_replace, function in ostree-kernel-args +
+
+
+ostree_kernel_args_parse_append, function in ostree-kernel-args +
+
+
+ostree_kernel_args_replace, function in ostree-kernel-args +
+
+
+ostree_kernel_args_replace_argv, function in ostree-kernel-args +
+
+
+ostree_kernel_args_replace_take, function in ostree-kernel-args +
+
+
+ostree_kernel_args_to_string, function in ostree-kernel-args +
+
+
+ostree_kernel_args_to_strv, function in ostree-kernel-args +
+

M

OSTREE_MAX_METADATA_SIZE, macro in Core repository-independent functions @@ -1414,6 +1491,10 @@ ostree_repo_transaction_set_collection_ref, function in ostree-misc-experimental
+ostree_repo_write_archive_to_mtree_from_fd, function in OstreeRepo +
+
+
ostree_repo_write_commit, function in OstreeRepo
diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index 1a26e1eb..e8faeb10 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -380,6 +380,7 @@ ostree_repo_devino_cache_get_type ostree_repo_write_directory_to_mtree ostree_repo_write_dfd_to_mtree ostree_repo_write_archive_to_mtree +ostree_repo_write_archive_to_mtree_from_fd ostree_repo_write_mtree ostree_repo_write_commit ostree_repo_write_commit_with_time @@ -668,3 +669,26 @@ ostree_repo_set_collection_ref_immediate ostree_repo_transaction_set_collection_ref ostree_repo_resolve_collection_ref + +
+ostree-kernel-args +OstreeKernelArgs +ostree_kernel_args_free +ostree_kernel_args_new +ostree_kernel_args_cleanup +ostree_kernel_args_replace_take +ostree_kernel_args_replace +ostree_kernel_args_replace_argv +ostree_kernel_args_append +ostree_kernel_args_append_argv +ostree_kernel_args_append_argv_filtered +ostree_kernel_args_new_replace +ostree_kernel_args_delete +ostree_kernel_args_delete_key_entry +ostree_kernel_args_append_proc_cmdline +ostree_kernel_args_parse_append +ostree_kernel_args_get_last_value +ostree_kernel_args_from_string +ostree_kernel_args_to_strv +ostree_kernel_args_to_string +
diff --git a/apidoc/version.xml b/apidoc/version.xml index 8684c64d..506ed987 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2019.2 \ No newline at end of file +2019.3 \ No newline at end of file diff --git a/bash/ostree b/bash/ostree index 5ba3d475..fc429983 100644 --- a/bash/ostree +++ b/bash/ostree @@ -952,6 +952,7 @@ _ostree_refs() { --collections -c --delete --list + --force " local options_with_args=" diff --git a/build-aux/compile b/build-aux/compile index b89c278e..99e50524 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC diff --git a/build-aux/config.guess b/build-aux/config.guess index b5d7a0f3..b33c9e89 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. diff --git a/build-aux/config.sub b/build-aux/config.sub index be4dc6e5..b51fb8cd 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. diff --git a/build-aux/depcomp b/build-aux/depcomp index 4e0ae31b..65cbf709 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC diff --git a/build-aux/install-sh b/build-aux/install-sh index defb86ae..8175c640 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh # install - install a program, script, or datafile scriptversion=2018-03-11.20; # UTC diff --git a/build-aux/missing b/build-aux/missing index ab658ed5..625aeb11 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC diff --git a/build-aux/test-driver b/build-aux/test-driver index d1ef0647..b8521a48 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC diff --git a/config.h.in b/config.h.in index eb13556a..1eef9ff2 100644 --- a/config.h.in +++ b/config.h.in @@ -132,6 +132,9 @@ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR +/* Define to disable internal GPGME support */ +#undef OSTREE_DISABLE_GPGME + /* Define if experimental API should be enabled */ #undef OSTREE_ENABLE_EXPERIMENTAL_API diff --git a/configure b/configure index 04914bbb..83fd8af5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libostree 2019.2. +# Generated by GNU Autoconf 2.69 for libostree 2019.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2019.2' -PACKAGE_STRING='libostree 2019.2' +PACKAGE_VERSION='2019.3' +PACKAGE_STRING='libostree 2019.3' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -721,6 +721,8 @@ GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK_PATH GTKDOC_CHECK +USE_GPGME_FALSE +USE_GPGME_TRUE GPG_ERROR_CONFIG OT_DEP_GPG_ERROR_LIBS OT_DEP_GPG_ERROR_CFLAGS @@ -933,6 +935,7 @@ with_soup enable_libsoup_client_certs enable_trivial_httpd_cmdline enable_introspection +with_gpgme with_gpgme_prefix with_html_dir enable_gtk_doc @@ -1553,7 +1556,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libostree 2019.2 to adapt to many kinds of systems. +\`configure' configures libostree 2019.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1623,7 +1626,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2019.2:";; + short | recursive ) echo "Configuration of libostree 2019.3:";; esac cat <<\_ACEOF @@ -1689,6 +1692,7 @@ Optional Packages: compiler's sysroot if not specified). --with-curl Use libcurl [default=no] --with-soup Use libsoup [default=yes] + --with-gpgme Use gpgme [default=yes] --with-gpgme-prefix=PFX prefix where GPGME is installed (optional) --with-html-dir=PATH path to installed docs --without-libarchive Do not use libarchive @@ -1881,7 +1885,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2019.2 +libostree configure 2019.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2353,7 +2357,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2019.2, which was +It was created by libostree $as_me 2019.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3221,7 +3225,7 @@ fi # Define the identity of the package. PACKAGE='libostree' - VERSION='2019.2' + VERSION='2019.3' # Some tools Automake needs. @@ -5955,9 +5959,9 @@ test -n "$YACC" || YACC="yacc" YEAR_VERSION=2019 -RELEASE_VERSION=2 +RELEASE_VERSION=3 -PACKAGE_VERSION=2019.2 +PACKAGE_VERSION=2019.3 if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : @@ -15531,6 +15535,13 @@ fi LIBGPGME_DEPENDENCY="1.1.8" +# Check whether --with-gpgme was given. +if test "${with_gpgme+set}" = set; then : + withval=$with_gpgme; +else + with_gpgme=yes +fi + # Check whether --with-gpgme-prefix was given. if test "${with_gpgme_prefix+set}" = set; then : @@ -15611,6 +15622,8 @@ fi gpgme_version_micro=`echo $gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` +if test x$with_gpgme != xno; then : + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPGME" >&5 @@ -15672,7 +15685,7 @@ fi - tmp=$LIBGPGME_DEPENDENCY + tmp=$LIBGPGME_DEPENDENCY if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` @@ -15768,7 +15781,7 @@ elif test $pkg_failed = untried; then $as_echo "no" >&6; } - tmp=$LIBGPGME_DEPENDENCY + tmp=$LIBGPGME_DEPENDENCY if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` @@ -15866,12 +15879,12 @@ else $as_echo "yes" >&6; } have_gpgme=yes fi -if test x$have_gpgme = xno ; then : + if test x$have_gpgme = xno ; then : - as_fn_error $? "Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later" "$LINENO" 5 + as_fn_error $? "Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later" "$LINENO" 5 fi -OSTREE_FEATURES="$OSTREE_FEATURES gpgme" + OSTREE_FEATURES="$OSTREE_FEATURES gpgme" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPG_ERROR" >&5 @@ -15932,7 +15945,7 @@ fi echo "$OT_DEP_GPG_ERROR_PKG_ERRORS" >&5 - # Extract the first word of "gpg-error-config", so it can be a program name with args. + # Extract the first word of "gpg-error-config", so it can be a program name with args. set dummy gpg-error-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -15973,14 +15986,14 @@ $as_echo "no" >&6; } fi - OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" - OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" + OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" + OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - # Extract the first word of "gpg-error-config", so it can be a program name with args. + # Extract the first word of "gpg-error-config", so it can be a program name with args. set dummy gpg-error-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -16021,8 +16034,8 @@ $as_echo "no" >&6; } fi - OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" - OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" + OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" + OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" else OT_DEP_GPG_ERROR_CFLAGS=$pkg_cv_OT_DEP_GPG_ERROR_CFLAGS @@ -16031,8 +16044,26 @@ else $as_echo "yes" >&6; } fi -OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}" -OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}" + OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}" + OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}" + +else + + +$as_echo "#define OSTREE_DISABLE_GPGME 1" >>confdefs.h + + with_gpgme=no + + +fi + if test "x$have_gpgme" = xyes; then + USE_GPGME_TRUE= + USE_GPGME_FALSE='#' +else + USE_GPGME_TRUE='#' + USE_GPGME_FALSE= +fi + LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0" # What's in RHEL7.2. @@ -18095,6 +18126,9 @@ OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type" # P2P API is public in OSTree >= 2018.6 OSTREE_FEATURES="$OSTREE_FEATURES p2p" +# Strip leading whitespace +OSTREE_FEATURES=$(echo ${OSTREE_FEATURES}) + ac_config_files="$ac_config_files Makefile apidoc/Makefile src/libostree/ostree-1.pc src/libostree/ostree-version.h" cat >confcache <<\_ACEOF @@ -18286,6 +18320,10 @@ if test -z "${BUILDOPT_INTROSPECTION_TRUE}" && test -z "${BUILDOPT_INTROSPECTION as_fn_error $? "conditional \"BUILDOPT_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${USE_GPGME_TRUE}" && test -z "${USE_GPGME_FALSE}"; then + as_fn_error $? "conditional \"USE_GPGME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18795,7 +18833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libostree $as_me 2019.2, which was +This file was extended by libostree $as_me 2019.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18861,7 +18899,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libostree config.status 2019.2 +libostree config.status 2019.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index e6e145db..15c60bb4 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl update libostree-released.sym from libostree-devel.sym, and update the check dnl in test-symbols.sh, and also set is_release_build=yes below. Then make dnl another post-release commit to bump the version, and set is_release_build=no. m4_define([year_version], [2019]) -m4_define([release_version], [2]) +m4_define([release_version], [3]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes @@ -210,25 +210,35 @@ m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ AM_CONDITIONAL(BUILDOPT_INTROSPECTION, test "x$found_introspection" = xyes) LIBGPGME_DEPENDENCY="1.1.8" - -PKG_CHECK_MODULES(OT_DEP_GPGME, gpgme-pthread >= $LIBGPGME_DEPENDENCY, have_gpgme=yes, [ - m4_ifdef([AM_PATH_GPGME_PTHREAD], [ - AM_PATH_GPGME_PTHREAD($LIBGPGME_DEPENDENCY, have_gpgme=yes, have_gpgme=no) - ],[ have_gpgme=no ]) -]) -AS_IF([ test x$have_gpgme = xno ], [ - AC_MSG_ERROR([Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later]) -]) -OSTREE_FEATURES="$OSTREE_FEATURES gpgme" -PKG_CHECK_MODULES(OT_DEP_GPG_ERROR, [gpg-error], [], [ +AC_ARG_WITH(gpgme, + AS_HELP_STRING([--with-gpgme], [Use gpgme @<:@default=yes@:>@]), + [], [with_gpgme=yes]) +AS_IF([test x$with_gpgme != xno], [ + PKG_CHECK_MODULES(OT_DEP_GPGME, gpgme-pthread >= $LIBGPGME_DEPENDENCY, have_gpgme=yes, [ + m4_ifdef([AM_PATH_GPGME_PTHREAD], [ + AM_PATH_GPGME_PTHREAD($LIBGPGME_DEPENDENCY, have_gpgme=yes, have_gpgme=no) + ],[ have_gpgme=no ]) + ]) + AS_IF([ test x$have_gpgme = xno ], [ + AC_MSG_ERROR([Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later]) + ]) + OSTREE_FEATURES="$OSTREE_FEATURES gpgme" + PKG_CHECK_MODULES(OT_DEP_GPG_ERROR, [gpg-error], [], [ dnl This apparently doesn't ship a pkg-config file either, and we need dnl to link to it directly. - AC_PATH_PROG(GPG_ERROR_CONFIG, [gpg-error-config], [AC_MSG_ERROR([Missing gpg-error-config])]) - OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" - OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" -]) -OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}" -OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}" + AC_PATH_PROG(GPG_ERROR_CONFIG, [gpg-error-config], [AC_MSG_ERROR([Missing gpg-error-config])]) + OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )" + OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" + ]) + OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}" + OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}" + ], + [ + AC_DEFINE([OSTREE_DISABLE_GPGME], 1, [Define to disable internal GPGME support]) + with_gpgme=no + ] +) +AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes) LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0" # What's in RHEL7.2. @@ -584,6 +594,9 @@ OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type" # P2P API is public in OSTree >= 2018.6 OSTREE_FEATURES="$OSTREE_FEATURES p2p" +# Strip leading whitespace +OSTREE_FEATURES=$(echo ${OSTREE_FEATURES}) + AC_CONFIG_FILES([ Makefile apidoc/Makefile diff --git a/man/ostree-commit.xml b/man/ostree-commit.xml index 4131d607..c64a7a00 100644 --- a/man/ostree-commit.xml +++ b/man/ostree-commit.xml @@ -102,7 +102,7 @@ Boston, MA 02111-1307, USA. ="dir=PATH" or "tar=TARFILE" or "ref=COMMIT" - Overlay the given argument as a tree. + Overlay the given argument as a tree. When committing an archive, the TARFILE can be specified as - to read the archive from standard input. diff --git a/man/ostree-refs.xml b/man/ostree-refs.xml index 8d5a1d23..0ba6b1d7 100644 --- a/man/ostree-refs.xml +++ b/man/ostree-refs.xml @@ -126,6 +126,16 @@ Boston, MA 02111-1307, USA. PREFIX are deleted. + + + + + + When creating NEWREF with + , allow an existing ref to be + updated instead of erroring. + + diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym index 8d9a7bfc..9339c0fd 100644 --- a/src/libostree/libostree-devel.sym +++ b/src/libostree/libostree-devel.sym @@ -18,8 +18,6 @@ ***/ /* Add new symbols here. Release commits should copy this section into -released.sym. */ -LIBOSTREE_2019.3 { -} LIBOSTREE_2018.9; /* Stub section for the stable release *after* this development one; don't * edit this other than to update the year. This is just a copy/paste diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym index a4daaf1c..fbcb2d56 100644 --- a/src/libostree/libostree-released.sym +++ b/src/libostree/libostree-released.sym @@ -548,6 +548,28 @@ LIBOSTREE_2019.2 { ostree_repo_get_bootloader; } LIBOSTREE_2018.9; +LIBOSTREE_2019.3 { +global: + ostree_repo_write_archive_to_mtree_from_fd; + ostree_kernel_args_free; + ostree_kernel_args_new; + ostree_kernel_args_cleanup; + ostree_kernel_args_replace_take; + ostree_kernel_args_replace; + ostree_kernel_args_replace_argv; + ostree_kernel_args_append; + ostree_kernel_args_append_argv; + ostree_kernel_args_append_argv_filtered; + ostree_kernel_args_new_replace; + ostree_kernel_args_delete; + ostree_kernel_args_delete_key_entry; + ostree_kernel_args_append_proc_cmdline; + ostree_kernel_args_parse_append; + ostree_kernel_args_get_last_value; + ostree_kernel_args_from_string; + ostree_kernel_args_to_strv; + ostree_kernel_args_to_string; +} LIBOSTREE_2018.9; /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. diff --git a/src/libostree/ostree-autocleanups.h b/src/libostree/ostree-autocleanups.h index 9a54aee7..c07f88a8 100644 --- a/src/libostree/ostree-autocleanups.h +++ b/src/libostree/ostree-autocleanups.h @@ -51,6 +51,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeAsyncProgress, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeBootconfigParser, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeDeployment, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeGpgVerifyResult, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeKernelArgs, ostree_kernel_args_free) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeMutableTree, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepo, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFile, g_object_unref) diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c index 87a93806..4cd955d5 100644 --- a/src/libostree/ostree-bootloader-uboot.c +++ b/src/libostree/ostree-bootloader-uboot.c @@ -78,8 +78,8 @@ append_system_uenv (OstreeBootloaderUboot *self, const char *uenv_path = NULL; const char *ostree_arg = NULL; - kargs = _ostree_kernel_args_from_string (bootargs); - ostree_arg = _ostree_kernel_args_get_last_value (kargs, "ostree"); + kargs = ostree_kernel_args_from_string (bootargs); + ostree_arg = ostree_kernel_args_get_last_value (kargs, "ostree"); if (!ostree_arg) { g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, diff --git a/src/libostree/ostree-core-private.h b/src/libostree/ostree-core-private.h index dd2cbc7e..43cf22c4 100644 --- a/src/libostree/ostree-core-private.h +++ b/src/libostree/ostree-core-private.h @@ -190,9 +190,11 @@ _ostree_repo_mode_is_bare (OstreeRepoMode mode) mode == OSTREE_REPO_MODE_BARE_USER_ONLY; } +#ifndef OSTREE_DISABLE_GPGME GVariant * _ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata, GBytes *signature_bytes); +#endif GFile * _ostree_get_default_sysroot_path (void); diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 4e1a67e0..3d16757e 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -485,6 +485,8 @@ _ostree_raw_file_to_archive_stream (GInputStream *input, * * Convert from a "bare" file representation into an * OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull. + * + * Since: 2016.6 */ gboolean ostree_raw_file_to_archive_z2_stream (GInputStream *input, @@ -581,7 +583,7 @@ ostree_raw_file_to_content_stream (GInputStream *input, * @input_length: Length of stream * @trusted: If %TRUE, assume the content has been validated * @out_input: (out): The raw file content stream - * @out_file_info: (out): Normal metadata + * @out_file_info: (out): Normal metadata * @out_xattrs: (out): Extended attributes * @cancellable: Cancellable * @error: Error @@ -680,7 +682,7 @@ ostree_content_stream_parse (gboolean compressed, * @path: Subpath * @trusted: If %TRUE, assume the content has been validated * @out_input: (out): The raw file content stream - * @out_file_info: (out): Normal metadata + * @out_file_info: (out): Normal metadata * @out_xattrs: (out): Extended attributes * @cancellable: Cancellable * @error: Error @@ -730,7 +732,7 @@ ostree_content_file_parse_at (gboolean compressed, * @content_path: Path to file containing content * @trusted: If %TRUE, assume the content has been validated * @out_input: (out): The raw file content stream - * @out_file_info: (out): Normal metadata + * @out_file_info: (out): Normal metadata * @out_xattrs: (out): Extended attributes * @cancellable: Cancellable * @error: Error @@ -1068,7 +1070,7 @@ checksum_file_async_data_free (gpointer datap) g_free (data->csum); g_free (data); } - + /** * ostree_checksum_file_async: * @f: File path @@ -1098,7 +1100,7 @@ ostree_checksum_file_async (GFile *f, res = g_simple_async_result_new (G_OBJECT (f), callback, user_data, ostree_checksum_file_async); g_simple_async_result_set_op_res_gpointer (res, data, (GDestroyNotify)checksum_file_async_data_free); - + g_simple_async_result_run_in_thread (res, checksum_file_async_thread, io_priority, cancellable); g_object_unref (res); } @@ -1323,7 +1325,7 @@ ostree_hash_object_name (gconstpointer a) const char *checksum; OstreeObjectType objtype; gint objtype_int; - + ostree_object_name_deserialize (variant, &checksum, &objtype); objtype_int = (gint) objtype; return g_str_hash (checksum) + g_int_hash (&objtype_int); @@ -1472,6 +1474,8 @@ ostree_checksum_to_bytes_v (const char *checksum) * @checksum: An ASCII checksum * * Returns: (transfer full) (array fixed-size=32): Binary version of @checksum. + * + * Since: 2016.8 */ guchar * ostree_checksum_b64_to_bytes (const char *checksum) @@ -1571,6 +1575,8 @@ ostree_checksum_from_bytes_v (GVariant *csum_v) * * The "modified" term refers to the fact that instead of '/', the '_' * character is used. + * + * Since: 2016.8 */ char * ostree_checksum_b64_from_bytes (const guchar *csum) @@ -1849,7 +1855,7 @@ _ostree_get_relative_static_delta_path (const char *from, g_string_append_c (ret, '/'); g_string_append (ret, target); } - + return g_string_free (ret, FALSE); } @@ -2174,7 +2180,7 @@ _ostree_verify_metadata_object (OstreeObjectType objtype, * ostree_validate_structureof_commit: * @commit: A commit object, %OSTREE_OBJECT_TYPE_COMMIT * @error: Error - * + * * Use this to validate the basic structure of @commit, independent of * any other objects it references. * @@ -2214,7 +2220,7 @@ ostree_validate_structureof_commit (GVariant *commit, * ostree_validate_structureof_dirtree: * @dirtree: A dirtree object, %OSTREE_OBJECT_TYPE_DIR_TREE * @error: Error - * + * * Use this to validate the basic structure of @dirtree, independent of * any other objects it references. * @@ -2326,7 +2332,7 @@ ostree_validate_structureof_file_mode (guint32 mode, * ostree_validate_structureof_dirmeta: * @dirmeta: A dirmeta object, %OSTREE_OBJECT_TYPE_DIR_META * @error: Error - * + * * Use this to validate the basic structure of @dirmeta. * * Returns: %TRUE if @dirmeta is structurally valid @@ -2340,7 +2346,7 @@ ostree_validate_structureof_dirmeta (GVariant *dirmeta, if (!validate_variant (dirmeta, OSTREE_DIRMETA_GVARIANT_FORMAT, error)) return FALSE; - g_variant_get_child (dirmeta, 2, "u", &mode); + g_variant_get_child (dirmeta, 2, "u", &mode); mode = GUINT32_FROM_BE (mode); if (!S_ISDIR (mode)) @@ -2395,6 +2401,8 @@ ostree_commit_get_timestamp (GVariant *commit_variant) * root "dirmeta" checksum (both in binary form, not hexadecimal). * * Returns: (nullable): A SHA-256 hex string, or %NULL if @commit_variant is not well-formed + * + * Since: 2018.2 */ gchar * ostree_commit_get_content_checksum (GVariant *commit_variant) @@ -2454,6 +2462,7 @@ _ostree_compare_timestamps (const char *current_rev, } +#ifndef OSTREE_DISABLE_GPGME GVariant * _ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata, GBytes *signature_bytes) @@ -2479,6 +2488,7 @@ _ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata, return g_variant_dict_end (&metadata_dict); } +#endif /* OSTREE_DISABLE_GPGME */ /** * _ostree_get_default_sysroot_path: @@ -2513,6 +2523,8 @@ _ostree_get_default_sysroot_path (void) * @required_release: Release version required * * Returns: %TRUE if current libostree has at least the requested version, %FALSE otherwise + * + * Since: 2017.4 */ gboolean ostree_check_version (guint required_year, guint required_release) diff --git a/src/libostree/ostree-deployment.c b/src/libostree/ostree-deployment.c index 820c2632..6532a973 100644 --- a/src/libostree/ostree-deployment.c +++ b/src/libostree/ostree-deployment.c @@ -302,6 +302,11 @@ ostree_deployment_get_origin_relpath (OstreeDeployment *self) ostree_deployment_get_deployserial (self)); } +/** + * ostree_deployment_unlocked_state_to_string: + * + * Since: 2016.4 + */ const char * ostree_deployment_unlocked_state_to_string (OstreeDeploymentUnlockedState state) { @@ -317,6 +322,11 @@ ostree_deployment_unlocked_state_to_string (OstreeDeploymentUnlockedState state) g_assert_not_reached (); } +/** + * ostree_deployment_get_unlocked: + * + * Since: 2016.4 + */ OstreeDeploymentUnlockedState ostree_deployment_get_unlocked (OstreeDeployment *self) { diff --git a/src/libostree/ostree-diff.c b/src/libostree/ostree-diff.c index 92b0227c..da018db4 100644 --- a/src/libostree/ostree-diff.c +++ b/src/libostree/ostree-diff.c @@ -239,6 +239,8 @@ ostree_diff_dirs (OstreeDiffFlags flags, * * Compute the difference between directory @a and @b as 3 separate * sets of #OstreeDiffItem in @modified, @removed, and @added. + * + * Since: 2017.4 */ gboolean ostree_diff_dirs_with_options (OstreeDiffFlags flags, @@ -305,7 +307,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, { OstreeRepoFile *a_repof = (OstreeRepoFile*) a; OstreeRepoFile *b_repof = (OstreeRepoFile*) b; - + if (strcmp (ostree_repo_file_tree_get_contents_checksum (a_repof), ostree_repo_file_tree_get_contents_checksum (b_repof)) == 0) { @@ -317,7 +319,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, g_clear_object (&child_a_info); g_clear_object (&child_b_info); - dir_enum = g_file_enumerate_children (a, OSTREE_GIO_FAST_QUERYINFO, + dir_enum = g_file_enumerate_children (a, OSTREE_GIO_FAST_QUERYINFO, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, error); if (!dir_enum) @@ -368,7 +370,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, { OstreeDiffItem *diff_item = diff_item_new (child_a, child_a_info, child_b, child_b_info, NULL, NULL); - + g_ptr_array_add (modified, diff_item); } else @@ -378,7 +380,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, if (!diff_files (flags, child_a, child_a_info, child_b, child_b_info, &diff_item, cancellable, error)) goto out; - + if (diff_item) g_ptr_array_add (modified, diff_item); /* Transfer ownership */ @@ -391,7 +393,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, } } } - + g_clear_object (&child_a_info); } if (temp_error != NULL) @@ -401,7 +403,7 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, } g_clear_object (&dir_enum); - dir_enum = g_file_enumerate_children (b, OSTREE_GIO_FAST_QUERYINFO, + dir_enum = g_file_enumerate_children (b, OSTREE_GIO_FAST_QUERYINFO, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, error); if (!dir_enum) diff --git a/src/libostree/ostree-fetcher-util.c b/src/libostree/ostree-fetcher-util.c index ef02ba1e..a9bd60a5 100644 --- a/src/libostree/ostree-fetcher-util.c +++ b/src/libostree/ostree-fetcher-util.c @@ -219,9 +219,9 @@ _ostree_fetcher_should_retry_request (const GError *error, } /* Convert a HTTP status code representing an error from libsoup or libcurl to - * a #GIOError. This will return %G_IO_ERROR_FAILED if the status code is + * a #GIOErrorEnum. This will return %G_IO_ERROR_FAILED if the status code is * unknown or otherwise unhandled. */ -GIOError +GIOErrorEnum _ostree_fetcher_http_status_code_to_io_error (guint status_code) { switch (status_code) diff --git a/src/libostree/ostree-fetcher-util.h b/src/libostree/ostree-fetcher-util.h index 1cade068..46935402 100644 --- a/src/libostree/ostree-fetcher-util.h +++ b/src/libostree/ostree-fetcher-util.h @@ -78,7 +78,7 @@ void _ostree_fetcher_journal_failure (const char *remote_name, gboolean _ostree_fetcher_should_retry_request (const GError *error, guint n_retries_remaining); -GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code); +GIOErrorEnum _ostree_fetcher_http_status_code_to_io_error (guint status_code); G_END_DECLS diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c index a279348e..95ed36ee 100644 --- a/src/libostree/ostree-gpg-verifier.c +++ b/src/libostree/ostree-gpg-verifier.c @@ -87,6 +87,7 @@ verify_result_finalized_cb (gpointer data, * finalize() method, but I didn't want this keyring hack * bleeding into multiple classes. */ + ot_gpgme_kill_agent (tmp_dir); (void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL); } diff --git a/src/libostree/ostree-gpg-verify-result-dummy.c b/src/libostree/ostree-gpg-verify-result-dummy.c new file mode 100644 index 00000000..a62ff915 --- /dev/null +++ b/src/libostree/ostree-gpg-verify-result-dummy.c @@ -0,0 +1,303 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * Copyright (C) 2019 Collabora Ltd. + * + * SPDX-License-Identifier: LGPL-2.0+ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" + +#include "libglnx.h" + +#include "ostree-gpg-verify-result.h" + +/** + * SECTION: ostree-gpg-verify-result + * @title: GPG signature verification results + * @short_description: Dummy functions for detached GPG signatures + * + * This file contain dummy functions for GPG signatures checks to + * provide API backward compatibility. + */ + +#ifndef OSTREE_DISABLE_GPGME +#error This file should not be compiled if GPG support is enabled +#endif + +/** + * OstreeGpgVerifyResult: + * + * Private instance structure. + */ +struct OstreeGpgVerifyResult { + GObject parent; +}; + + +typedef struct { + GObjectClass parent_class; +} OstreeGpgVerifyResultClass; + +static void ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface); + +G_DEFINE_TYPE_WITH_CODE (OstreeGpgVerifyResult, + ostree_gpg_verify_result, + G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, + ostree_gpg_verify_result_initable_iface_init)) + +static void +ostree_gpg_verify_result_class_init (OstreeGpgVerifyResultClass *class) +{ +} + +static void +ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface) +{ +} + +static void +ostree_gpg_verify_result_init (OstreeGpgVerifyResult *result) +{ +} + +/** + * ostree_gpg_verify_result_count_all: + * @result: an #OstreeGpgVerifyResult + * + * Counts all the signatures in @result. + * + * Returns: signature count + */ +guint +ostree_gpg_verify_result_count_all (OstreeGpgVerifyResult *result) +{ + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + return 0; +} + +/** + * ostree_gpg_verify_result_count_valid: + * @result: an #OstreeGpgVerifyResult + * + * Counts only the valid signatures in @result. + * + * Returns: valid signature count + */ +guint +ostree_gpg_verify_result_count_valid (OstreeGpgVerifyResult *result) +{ + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + return 0; +} + +/** + * ostree_gpg_verify_result_lookup: + * @result: an #OstreeGpgVerifyResult + * @key_id: a GPG key ID or fingerprint + * @out_signature_index: (out): return location for the index of the signature + * signed by @key_id, or %NULL + * + * Searches @result for a signature signed by @key_id. If a match is found, + * the function returns %TRUE and sets @out_signature_index so that further + * signature details can be obtained through ostree_gpg_verify_result_get(). + * If no match is found, the function returns %FALSE and leaves + * @out_signature_index unchanged. + * + * Returns: %TRUE on success, %FALSE on failure + **/ +gboolean +ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result, + const gchar *key_id, + guint *out_signature_index) +{ + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + return FALSE; +} + +/** + * ostree_gpg_verify_result_get: + * @result: an #OstreeGpgVerifyResult + * @signature_index: which signature to get attributes from + * @attrs: (array length=n_attrs): Array of requested attributes + * @n_attrs: Length of the @attrs array + * + * Builds a #GVariant tuple of requested attributes for the GPG signature at + * @signature_index in @result. See the #OstreeGpgSignatureAttr description + * for the #GVariantType of each available attribute. + * + * It is a programmer error to request an invalid #OstreeGpgSignatureAttr or + * an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to + * find the number of signatures in @result. + * + * Returns: a new, floating, #GVariant tuple + **/ +GVariant * +ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, + guint signature_index, + OstreeGpgSignatureAttr *attrs, + guint n_attrs) +{ + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + return NULL; +} + +/** + * ostree_gpg_verify_result_get_all: + * @result: an #OstreeGpgVerifyResult + * @signature_index: which signature to get attributes from + * + * Builds a #GVariant tuple of all available attributes for the GPG signature + * at @signature_index in @result. + * + * The child values in the returned #GVariant tuple are ordered to match the + * #OstreeGpgSignatureAttr enumeration, which means the enum values can be + * used as index values in functions like g_variant_get_child(). See the + * #OstreeGpgSignatureAttr description for the #GVariantType of each + * available attribute. + * + * + * + * The #OstreeGpgSignatureAttr enumeration may be extended in the future + * with new attributes, which would affect the #GVariant tuple returned by + * this function. While the position and type of current child values in + * the #GVariant tuple will not change, to avoid backward-compatibility + * issues please do not depend on the tuple's overall size or + * type signature. + * + * + * + * It is a programmer error to request an invalid @signature_index. Use + * ostree_gpg_verify_result_count_all() to find the number of signatures in + * @result. + * + * Returns: a new, floating, #GVariant tuple + **/ +GVariant * +ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result, + guint signature_index) +{ + g_return_val_if_fail (OSTREE_IS_GPG_VERIFY_RESULT (result), NULL); + + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + return NULL; +} + +/** + * ostree_gpg_verify_result_describe: + * @result: an #OstreeGpgVerifyResult + * @signature_index: which signature to describe + * @output_buffer: a #GString to hold the description + * @line_prefix: (allow-none): optional line prefix string + * @flags: flags to adjust the description format + * + * Appends a brief, human-readable description of the GPG signature at + * @signature_index in @result to the @output_buffer. The description + * spans multiple lines. A @line_prefix string, if given, will precede + * each line of the description. + * + * The @flags argument is reserved for future variations to the description + * format. Currently must be 0. + * + * It is a programmer error to request an invalid @signature_index. Use + * ostree_gpg_verify_result_count_all() to find the number of signatures in + * @result. + */ +void +ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result, + guint signature_index, + GString *output_buffer, + const gchar *line_prefix, + OstreeGpgSignatureFormatFlags flags) +{ + g_autoptr(GVariant) variant = NULL; + + g_return_if_fail (OSTREE_IS_GPG_VERIFY_RESULT (result)); + + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); + + variant = ostree_gpg_verify_result_get_all (result, signature_index); + + ostree_gpg_verify_result_describe_variant (variant, output_buffer, line_prefix, flags); +} + +/** + * ostree_gpg_verify_result_describe_variant: + * @variant: a #GVariant from ostree_gpg_verify_result_get_all() + * @output_buffer: a #GString to hold the description + * @line_prefix: (allow-none): optional line prefix string + * @flags: flags to adjust the description format + * + * Similar to ostree_gpg_verify_result_describe() but takes a #GVariant of + * all attributes for a GPG signature instead of an #OstreeGpgVerifyResult + * and signature index. + * + * The @variant MUST have been created by + * ostree_gpg_verify_result_get_all(). + */ +void +ostree_gpg_verify_result_describe_variant (GVariant *variant, + GString *output_buffer, + const gchar *line_prefix, + OstreeGpgSignatureFormatFlags flags) +{ + const char *type_string; + + g_return_if_fail (variant != NULL); + g_return_if_fail (output_buffer != NULL); + + /* Verify the variant's type string. This code is + * not prepared to handle just any random GVariant. */ + type_string = g_variant_get_type_string (variant); + g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssssxx)") == 0); + + g_string_append (output_buffer, + "GPG feature is disabled in a build time\n"); + + g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__); +} + +/** + * ostree_gpg_verify_result_require_valid_signature: + * @result: (nullable): an #OstreeGpgVerifyResult + * @error: A #GError + * + * Checks if the result contains at least one signature from the + * trusted keyring. You can call this function immediately after + * ostree_repo_verify_summary() or ostree_repo_verify_commit_ext() - + * it will handle the %NULL @result and filled @error too. + * + * Returns: %TRUE if @result was not %NULL and had at least one + * signature from trusted keyring, otherwise %FALSE + * + * Since: 2016.6 + */ +gboolean +ostree_gpg_verify_result_require_valid_signature (OstreeGpgVerifyResult *result, + GError **error) +{ + if (result == NULL) + return FALSE; + + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return FALSE; +} + +G_DEFINE_QUARK (OstreeGpgError, ostree_gpg_error) diff --git a/src/libostree/ostree-gpg-verify-result.c b/src/libostree/ostree-gpg-verify-result.c index e3c5edec..d4d1cef6 100644 --- a/src/libostree/ostree-gpg-verify-result.c +++ b/src/libostree/ostree-gpg-verify-result.c @@ -65,7 +65,9 @@ static OstreeGpgSignatureAttr all_signature_attrs[] = { OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME, OSTREE_GPG_SIGNATURE_ATTR_USER_NAME, OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL, - OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY + OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY, + OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP, + OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY, }; static void ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface); @@ -331,7 +333,9 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, { if (attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_USER_NAME || attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL || - attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY) + attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY || + attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP || + attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY) { (void) gpgme_get_key (result->context, signature->fpr, &key, 0); break; @@ -345,6 +349,7 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, GVariant *child; gboolean v_boolean; const char *v_string = NULL; + gint64 v_int64; switch (attrs[ii]) { @@ -423,6 +428,29 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, child = g_variant_new_string (v_string); break; + case OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP: + v_int64 = 0; + if (key != NULL) + { + gpgme_subkey_t subkey = key->subkeys; + + while (subkey != NULL && (g_strcmp0 (subkey->fpr, signature->fpr) != 0)) + subkey = subkey->next; + + if (subkey != NULL) + v_int64 = subkey->expires; + } + child = g_variant_new_int64 (v_int64); + break; + + case OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY: + if (key != NULL && key->subkeys != NULL) + v_int64 = key->subkeys->expires; + else + v_int64 = 0; + child = g_variant_new_int64 (v_int64); + break; + default: g_critical ("Invalid signature attribute (%d)", attrs[ii]); g_variant_builder_clear (&builder); @@ -513,6 +541,49 @@ ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result, ostree_gpg_verify_result_describe_variant (variant, output_buffer, line_prefix, flags); } +static void +append_expire_info (GString *output_buffer, + const gchar *line_prefix, + const gchar *exp_type, + gint64 exp_timestamp, + gboolean expired) +{ + g_autoptr(GDateTime) date_time_utc = NULL; + g_autoptr(GDateTime) date_time_local = NULL; + g_autofree char *formatted_date_time = NULL; + + if (line_prefix != NULL) + g_string_append (output_buffer, line_prefix); + + date_time_utc = g_date_time_new_from_unix_utc (exp_timestamp); + if (date_time_utc == NULL) + { + g_string_append_printf (output_buffer, + "%s expiry timestamp (%" G_GINT64_FORMAT ") is invalid\n", + exp_type, + exp_timestamp); + return; + } + + date_time_local = g_date_time_to_local (date_time_utc); + formatted_date_time = g_date_time_format (date_time_local, "%c"); + + if (expired) + { + g_string_append_printf (output_buffer, + "%s expired %s\n", + exp_type, + formatted_date_time); + } + else + { + g_string_append_printf (output_buffer, + "%s expires %s\n", + exp_type, + formatted_date_time); + } +} + /** * ostree_gpg_verify_result_describe_variant: * @variant: a #GVariant from ostree_gpg_verify_result_get_all() @@ -538,6 +609,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, g_autofree char *formatted_date_time = NULL; gint64 timestamp; gint64 exp_timestamp; + gint64 key_exp_timestamp; + gint64 key_exp_timestamp_primary; const char *type_string; const char *fingerprint; const char *fingerprint_primary; @@ -547,6 +620,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, const char *key_id; gboolean valid; gboolean sig_expired; + gboolean key_expired; + gboolean key_revoked; gboolean key_missing; gsize len; @@ -556,7 +631,7 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, /* Verify the variant's type string. This code is * not prepared to handle just any random GVariant. */ type_string = g_variant_get_type_string (variant); - g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssss)") == 0); + g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssssxx)") == 0); /* The default format roughly mimics the verify output generated by * check_sig_and_print() in gnupg/g10/mainproc.c, though obviously @@ -566,6 +641,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, "b", &valid); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED, "b", &sig_expired); + g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED, + "b", &key_expired); + g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED, + "b", &key_revoked); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING, "b", &key_missing); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT, @@ -582,6 +661,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, "&s", &user_name); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL, "&s", &user_email); + g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP, + "x", &key_exp_timestamp); + g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY, + "x", &key_exp_timestamp_primary); len = strlen (fingerprint); key_id = (len > 16) ? fingerprint + len - 16 : fingerprint; @@ -623,6 +706,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, "Good signature from \"%s <%s>\"\n", user_name, user_email); } + else if (key_revoked) + { + g_string_append (output_buffer, "Key revoked\n"); + } else if (sig_expired) { g_string_append_printf (output_buffer, @@ -652,35 +739,14 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, } if (exp_timestamp > 0) - { - if (line_prefix != NULL) - g_string_append (output_buffer, line_prefix); - - date_time_utc = g_date_time_new_from_unix_utc (exp_timestamp); - if (date_time_utc == NULL) - { - g_string_append_printf (output_buffer, - "Signature expiry timestamp (%" G_GINT64_FORMAT ") is invalid\n", - exp_timestamp); - return; - } - - date_time_local = g_date_time_to_local (date_time_utc); - formatted_date_time = g_date_time_format (date_time_local, "%c"); - - if (sig_expired) - { - g_string_append_printf (output_buffer, - "Signature expired %s\n", - formatted_date_time); - } - else - { - g_string_append_printf (output_buffer, - "Signature expires %s\n", - formatted_date_time); - } - } + append_expire_info (output_buffer, line_prefix, "Signature", exp_timestamp, + sig_expired); + if (key_exp_timestamp > 0) + append_expire_info (output_buffer, line_prefix, "Key", key_exp_timestamp, + key_expired); + if (key_exp_timestamp_primary > 0 && (g_strcmp0 (fingerprint, fingerprint_primary) != 0)) + append_expire_info (output_buffer, line_prefix, "Primary key", + key_exp_timestamp_primary, key_expired); } /** @@ -695,6 +761,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, * * Returns: %TRUE if @result was not %NULL and had at least one * signature from trusted keyring, otherwise %FALSE + * + * Since: 2016.6 */ gboolean ostree_gpg_verify_result_require_valid_signature (OstreeGpgVerifyResult *result, diff --git a/src/libostree/ostree-gpg-verify-result.h b/src/libostree/ostree-gpg-verify-result.h index fc1fe991..7c71ecdc 100644 --- a/src/libostree/ostree-gpg-verify-result.h +++ b/src/libostree/ostree-gpg-verify-result.h @@ -70,6 +70,14 @@ typedef struct OstreeGpgVerifyResult OstreeGpgVerifyResult; * (will be the same as OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT if the * the signature is already from the primary key rather than a subkey, * and will be the empty string if the key is missing.) + * @OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP: + * [#G_VARIANT_TYPE_INT64] Key expiration Unix timestamp (0 if no + * expiration or if the key is missing) + * @OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY: + * [#G_VARIANT_TYPE_INT64] Key expiration Unix timestamp of the signing key's + * primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP + * if the signing key is the primary key and 0 if no expiration or if the key + * is missing) * * Signature attributes available from an #OstreeGpgVerifyResult. * The attribute's #GVariantType is shown in brackets. @@ -88,6 +96,8 @@ typedef enum { OSTREE_GPG_SIGNATURE_ATTR_USER_NAME, OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL, OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY, + OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP, + OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY, } OstreeGpgSignatureAttr; _OSTREE_PUBLIC @@ -161,6 +171,11 @@ typedef enum { OSTREE_GPG_ERROR_MISSING_KEY, } OstreeGpgError; +/** + * ostree_gpg_error_quark: + * + * Since: 2017.10 + */ _OSTREE_PUBLIC GQuark ostree_gpg_error_quark (void); #define OSTREE_GPG_ERROR (ostree_gpg_error_quark ()) diff --git a/src/libostree/ostree-kernel-args.c b/src/libostree/ostree-kernel-args.c index ac4014fa..dbf2ec8a 100644 --- a/src/libostree/ostree-kernel-args.c +++ b/src/libostree/ostree-kernel-args.c @@ -21,6 +21,7 @@ #include "ostree-kernel-args.h" #include "libglnx.h" +#include "otutil.h" #include @@ -60,8 +61,24 @@ _arg_has_prefix (const char *arg, return FALSE; } +static gboolean +strcmp0_equal (gconstpointer v1, + gconstpointer v2) +{ + return g_strcmp0 (v1, v2) == 0; +} + +/** + * ostree_kernel_args_new: (skip) + * + * Initializes a new OstreeKernelArgs structure and returns it + * + * Returns: (transfer full): A newly created #OstreeKernelArgs for kernel arguments + * + * Since: 2019.3 + **/ OstreeKernelArgs * -_ostree_kernel_args_new (void) +ostree_kernel_args_new (void) { OstreeKernelArgs *ret; ret = g_new0 (OstreeKernelArgs, 1); @@ -71,8 +88,16 @@ _ostree_kernel_args_new (void) return ret; } +/** + * ostree_kernel_args_free: + * @kargs: An OstreeKernelArgs that represents kernel arguments + * + * Frees the kargs structure + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_free (OstreeKernelArgs *kargs) +ostree_kernel_args_free (OstreeKernelArgs *kargs) { if (!kargs) return; @@ -81,9 +106,238 @@ _ostree_kernel_args_free (OstreeKernelArgs *kargs) g_free (kargs); } +/** + * ostree_kernel_args_cleanup: + * @loc: Address of an OstreeKernelArgs pointer + * + * Frees the OstreeKernelArgs structure pointed by *loc + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, - char *arg) +ostree_kernel_args_cleanup (void *loc) +{ + ostree_kernel_args_free (*((OstreeKernelArgs**)loc)); +} + +/** + * _ostree_kernel_arg_get_kargs_table: + * @kargs: An OstreeKernelArgs that represents kernel arguments + * + * Returns: (transfer none): #GHashTable that associates with the @kargs + * + * Note: this function is private for now, since the data structures underneath might be changed + * + * Since: 2019.3 + **/ +GHashTable* +_ostree_kernel_arg_get_kargs_table (OstreeKernelArgs *kargs) +{ + if (kargs != NULL) + return kargs->table; + return NULL; +} + +/** + * _ostree_kernel_arg_get_key_array: + * @kargs: An OstreeKernelArgs that represents kernel arguments + * + * Returns: (transfer none) (element-type utf8): #GPtrArray that associates with @kargs + * + * Note: this function is private for now, since the data structures underneath might be changed + * + * Since: 2019.3 + **/ +GPtrArray* +_ostree_kernel_arg_get_key_array (OstreeKernelArgs *kargs) +{ + if (kargs != NULL) + return kargs->order; + return NULL; +} + +/** + * ostree_kernel_args_new_replace: + * @kargs: OstreeKernelArgs instance + * @arg: a string argument + * @error: error instance + * + * This function implements the basic logic behind key/value pair + * replacement. Do note that the arg need to be properly formatted + * + * When replacing key with exact one value, the arg can be in + * the form: + * key, key=new_val, or key=old_val=new_val + * The first one swaps the old_val with the key to an empty value + * The second and third replace the old_val into the new_val + * + * When replacing key with multiple values, the arg can only be + * in the form of: + * key=old_val=new_val. Unless there is a special case where + * there is an empty value associated with the key, then + * key=new_val will work because old_val is empty. The empty + * val will be swapped with the new_val in that case + * + * Returns: %TRUE on success, %FALSE on failure (and in some other instances such as: + * 1. key not found in @kargs + * 2. old value not found when @arg is in the form of key=old_val=new_val + * 3. multiple old values found when @arg is in the form of key=old_val) + * + * Since: 2019.3 + **/ +gboolean +ostree_kernel_args_new_replace (OstreeKernelArgs *kargs, + const char *arg, + GError **error) +{ + g_autofree char *arg_owned = g_strdup (arg); + const char *key = arg_owned; + const char *val = split_keyeq (arg_owned); + + GPtrArray *values = g_hash_table_lookup (kargs->table, key); + if (!values) + return glnx_throw (error, "No key '%s' found", key); + g_assert_cmpuint (values->len, >, 0); + + /* first handle the case where the user just wants to replace an old value */ + if (val && strchr (val, '=')) + { + g_autofree char *old_val = g_strdup (val); + const char *new_val = split_keyeq (old_val); + g_assert (new_val); + + guint i = 0; + if (!ot_ptr_array_find_with_equal_func (values, old_val, strcmp0_equal, &i)) + return glnx_throw (error, "No karg '%s=%s' found", key, old_val); + + g_clear_pointer (&values->pdata[i], g_free); + values->pdata[i] = g_strdup (new_val); + return TRUE; + } + + /* can't know which val to replace without the old_val=new_val syntax */ + if (values->len > 1) + return glnx_throw (error, "Multiple values for key '%s' found", key); + + g_clear_pointer (&values->pdata[0], g_free); + values->pdata[0] = g_strdup (val); + return TRUE; +} + +/** + * ostree_kernel_args_delete_key_entry + * @kargs: an OstreeKernelArgs instance + * @key: the key to remove + * @error: an GError instance + * + * This function removes the key entry from the hashtable + * as well from the order pointer array inside kargs + * + * Note: since both table and order inside kernel args + * are with free function, no extra free functions are + * being called as they are done automatically by GLib + * + * Returns: %TRUE on success, %FALSE on failure + * + * Since: 2019.3 + **/ +gboolean +ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs, + const char *key, + GError **error) +{ + if (!g_hash_table_remove (kargs->table, key)) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Failed to find kernel argument '%s'", + key); + return FALSE; + } + + /* Then remove the key from order table */ + guint key_index; + g_assert (ot_ptr_array_find_with_equal_func (kargs->order, key, g_str_equal, &key_index)); + g_assert (g_ptr_array_remove_index (kargs->order, key_index)); + return TRUE; +} + +/** + * ostree_kernel_args_delete: + * @kargs: a OstreeKernelArgs instance + * @arg: key or key/value pair for deletion + * @error: an GError instance + * + * There are few scenarios being handled for deletion: + * + * 1: for input arg with a single key(i.e without = for split), + * the key/value pair will be deleted if there is only + * one value that is associated with the key + * + * 2: for input arg wth key/value pair, the specific key + * value pair will be deleted from the pointer array + * if those exist. + * + * 3: If the found key has only one value + * associated with it, the key entry in the table will also + * be removed, and the key will be removed from order table + * + * Returns: %TRUE on success, %FALSE on failure + * + * Since: 2019.3 + **/ +gboolean +ostree_kernel_args_delete (OstreeKernelArgs *kargs, + const char *arg, + GError **error) +{ + g_autofree char *arg_owned = g_strdup (arg); + const char *key = arg_owned; + const char *val = split_keyeq (arg_owned); + + GPtrArray *values = g_hash_table_lookup (kargs->table, key); + if (!values) + return glnx_throw (error, "No key '%s' found", key); + g_assert_cmpuint (values->len, >, 0); + + /* special-case: we allow deleting by key only if there's only one val */ + if (values->len == 1) + { + /* but if a specific val was passed, check that it's the same */ + if (val && !strcmp0_equal (val, values->pdata[0])) + return glnx_throw (error, "No karg '%s=%s' found", key, val); + return ostree_kernel_args_delete_key_entry (kargs, key, error); + } + + /* note val might be NULL here, in which case we're looking for `key`, not `key=` or + * `key=val` */ + guint i = 0; + if (!ot_ptr_array_find_with_equal_func (values, val, strcmp0_equal, &i)) + { + if (!val) + /* didn't find NULL -> only key= key=val1 key=val2 style things left, so the user + * needs to be more specific */ + return glnx_throw (error, "Multiple values for key '%s' found", arg); + return glnx_throw (error, "No karg '%s' found", arg); + } + + g_ptr_array_remove_index (values, i); + return TRUE; +} + +/** + * ostree_kernel_args_replace_take: + * @kargs: a OstreeKernelArgs instance + * @arg: (transfer full): key or key/value pair for replacement + * + * Finds and replaces the old key if @arg is already in the hash table, + * otherwise adds @arg as new key and split_keyeq (arg) as value. + * Note that when replacing old key, the old values are freed. + * + * Since: 2019.3 + **/ +void +ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, + char *arg) { gboolean existed; GPtrArray *values = g_ptr_array_new_with_free_func (g_free); @@ -105,16 +359,38 @@ _ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, } } +/** + * ostree_kernel_args_replace: + * @kargs: a OstreeKernelArgs instance + * @arg: key or key/value pair for replacement + * + * Finds and replaces the old key if @arg is already in the hash table, + * otherwise adds @arg as new key and split_keyeq (arg) as value. + * Note that when replacing old key value pair, the old values are freed. + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_replace (OstreeKernelArgs *kargs, - const char *arg) +ostree_kernel_args_replace (OstreeKernelArgs *kargs, + const char *arg) { - _ostree_kernel_args_replace_take (kargs, g_strdup (arg)); + ostree_kernel_args_replace_take (kargs, g_strdup (arg)); } +/** + * ostree_kernel_args_append: + * @kargs: a OstreeKernelArgs instance + * @arg: key or key/value pair to be added + * + * Appends @arg which is in the form of key=value pair to the hash table kargs->table + * (appends to the value list if key is already in the hash table) + * and appends key to kargs->order if it is not in the hash table already. + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_append (OstreeKernelArgs *kargs, - const char *arg) +ostree_kernel_args_append (OstreeKernelArgs *kargs, + const char *arg) { gboolean existed = TRUE; GPtrArray *values; @@ -141,23 +417,44 @@ _ostree_kernel_args_append (OstreeKernelArgs *kargs, } } +/** + * ostree_kernel_args_replace_argv: + * @kargs: a OstreeKernelArgs instance + * @argv: an array of key or key/value pairs + * + * Finds and replaces each non-null arguments of @argv in the hash table, + * otherwise adds individual arg as new key and split_keyeq (arg) as value. + * Note that when replacing old key value pair, the old values are freed. + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs, - char **argv) +ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs, + char **argv) { char **strviter; for (strviter = argv; strviter && *strviter; strviter++) { const char *arg = *strviter; - _ostree_kernel_args_replace (kargs, arg); + ostree_kernel_args_replace (kargs, arg); } } +/** + * ostree_kernel_args_append_argv_filtered: + * @kargs: a OstreeKernelArgs instance + * @argv: an array of key=value argument pairs + * @prefixes: an array of prefix strings + * + * Appends each argument that does not have one of the @prefixes as prefix to the @kargs + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs, - char **argv, - char **prefixes) +ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs, + char **argv, + char **prefixes) { char **strviter; @@ -166,21 +463,44 @@ _ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs, const char *arg = *strviter; if (!_arg_has_prefix (arg, prefixes)) - _ostree_kernel_args_append (kargs, arg); + ostree_kernel_args_append (kargs, arg); } } +/** + * ostree_kernel_args_append_argv: + * @kargs: a OstreeKernelArgs instance + * @argv: an array of key=value argument pairs + * + * Appends each value in @argv to the corresponding value array and + * appends key to kargs->order if it is not in the hash table already. + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_append_argv (OstreeKernelArgs *kargs, - char **argv) +ostree_kernel_args_append_argv (OstreeKernelArgs *kargs, + char **argv) { - _ostree_kernel_args_append_argv_filtered (kargs, argv, NULL); + ostree_kernel_args_append_argv_filtered (kargs, argv, NULL); } +/** + * ostree_kernel_args_append_proc_cmdline: + * @kargs: a OstreeKernelArgs instance + * @cancellable: optional GCancellable object, NULL to ignore + * @error: an GError instance + * + * Appends the command line arguments in the file "/proc/cmdline" + * that does not have "BOOT_IMAGE=" and "initrd=" as prefixes to the @kargs + * + * Returns: %TRUE on success, %FALSE on failure + * + * Since: 2019.3 + **/ gboolean -_ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs, - GCancellable *cancellable, - GError **error) +ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs, + GCancellable *cancellable, + GError **error) { g_autoptr(GFile) proc_cmdline_path = g_file_new_for_path ("/proc/cmdline"); g_autofree char *proc_cmdline = NULL; @@ -202,44 +522,76 @@ _ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs, g_strchomp (proc_cmdline); proc_cmdline_args = g_strsplit (proc_cmdline, " ", -1); - _ostree_kernel_args_append_argv_filtered (kargs, proc_cmdline_args, + ostree_kernel_args_append_argv_filtered (kargs, proc_cmdline_args, filtered_prefixes); return TRUE; } +/** + * ostree_kernel_args_parse_append: + * @kargs: a OstreeKernelArgs instance + * @options: a string representing command line arguments + * + * Parses @options by separating it by whitespaces and appends each argument to @kargs + * + * Since: 2019.3 + **/ void -_ostree_kernel_args_parse_append (OstreeKernelArgs *kargs, - const char *options) +ostree_kernel_args_parse_append (OstreeKernelArgs *kargs, + const char *options) { char **args = NULL; char **iter; if (!options) return; - + args = g_strsplit (options, " ", -1); for (iter = args; *iter; iter++) { char *arg = *iter; - _ostree_kernel_args_append (kargs, arg); + ostree_kernel_args_append (kargs, arg); } g_strfreev (args); } +/** + * ostree_kernel_args_from_string: (skip) + * @options: a string representing command line arguments + * + * Initializes a new OstreeKernelArgs then parses and appends @options + * to the empty OstreeKernelArgs + * + * Returns: (transfer full): newly allocated #OstreeKernelArgs with @options appended + * + * Since: 2019.3 + **/ OstreeKernelArgs * -_ostree_kernel_args_from_string (const char *options) +ostree_kernel_args_from_string (const char *options) { OstreeKernelArgs *ret; - ret = _ostree_kernel_args_new (); - _ostree_kernel_args_parse_append (ret, options); + ret = ostree_kernel_args_new (); + ostree_kernel_args_parse_append (ret, options); return ret; } +/** + * ostree_kernel_args_to_strv: + * @kargs: a OstreeKernelArgs instance + * + * Extracts all key value pairs in @kargs and appends to a temporary + * array in forms of "key=value" or "key" if value is NULL, and returns + * the temporary array with the GPtrArray wrapper freed + * + * Returns: (transfer full): an array of "key=value" pairs or "key" if value is NULL + * + * Since: 2019.3 + **/ char ** -_ostree_kernel_args_to_strv (OstreeKernelArgs *kargs) +ostree_kernel_args_to_strv (OstreeKernelArgs *kargs) { GPtrArray *strv = g_ptr_array_new (); guint i; @@ -266,8 +618,25 @@ _ostree_kernel_args_to_strv (OstreeKernelArgs *kargs) return (char**)g_ptr_array_free (strv, FALSE); } +/** + * ostree_kernel_args_to_string: + * @kargs: a OstreeKernelArgs instance + * + * Extracts all key value pairs in @kargs and appends to a temporary + * GString in forms of "key=value" or "key" if value is NULL separated + * by a single whitespace, and returns the temporary string with the + * GString wrapper freed + * + * Note: the application will be terminated if one of the values array + * in @kargs is NULL + * + * Returns: (transfer full): a string of "key=value" pairs or "key" if value is NULL, + * separated by single whitespaces + * + * Since: 2019.3 + **/ char * -_ostree_kernel_args_to_string (OstreeKernelArgs *kargs) +ostree_kernel_args_to_string (OstreeKernelArgs *kargs) { GString *buf = g_string_new (""); gboolean first = TRUE; @@ -302,8 +671,22 @@ _ostree_kernel_args_to_string (OstreeKernelArgs *kargs) return g_string_free (buf, FALSE); } +/** + * ostree_kernel_args_get_last_value: + * @kargs: a OstreeKernelArgs instance + * @key: a key to look for in @kargs hash table + * + * Finds and returns the last element of value array + * corresponding to the @key in @kargs hash table. Note that the application + * will be terminated if the @key is found but the value array is empty + * + * Returns: NULL if @key is not found in the @kargs hash table, + * otherwise returns last element of value array corresponding to @key + * + * Since: 2019.3 + **/ const char * -_ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key) +ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key) { GPtrArray *values = g_hash_table_lookup (kargs->table, key); diff --git a/src/libostree/ostree-kernel-args.h b/src/libostree/ostree-kernel-args.h index 0bc43704..3975ae5c 100644 --- a/src/libostree/ostree-kernel-args.h +++ b/src/libostree/ostree-kernel-args.h @@ -19,41 +19,88 @@ #pragma once -#include "libglnx.h" +#include +#include +#include +#include "ostree-types.h" G_BEGIN_DECLS typedef struct _OstreeKernelArgs OstreeKernelArgs; -void _ostree_kernel_args_free (OstreeKernelArgs *kargs); -G_DEFINE_AUTOPTR_CLEANUP_FUNC(OstreeKernelArgs, _ostree_kernel_args_free); -OstreeKernelArgs *_ostree_kernel_args_new (void); -void _ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, - char *key); -void _ostree_kernel_args_replace (OstreeKernelArgs *kargs, - const char *key); -void _ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs, - char **argv); -void _ostree_kernel_args_append (OstreeKernelArgs *kargs, - const char *key); -void _ostree_kernel_args_append_argv (OstreeKernelArgs *kargs, - char **argv); -void _ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs, - char **argv, - char **prefixes); +GHashTable *_ostree_kernel_arg_get_kargs_table (OstreeKernelArgs *kargs); -gboolean _ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs, - GCancellable *cancellable, - GError **error); +GPtrArray *_ostree_kernel_arg_get_key_array (OstreeKernelArgs *kargs); -void _ostree_kernel_args_parse_append (OstreeKernelArgs *kargs, - const char *options); +_OSTREE_PUBLIC +void ostree_kernel_args_free (OstreeKernelArgs *kargs); -const char *_ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key); +_OSTREE_PUBLIC +OstreeKernelArgs *ostree_kernel_args_new (void); -OstreeKernelArgs * _ostree_kernel_args_from_string (const char *options); +_OSTREE_PUBLIC +void ostree_kernel_args_cleanup (void *loc); -char ** _ostree_kernel_args_to_strv (OstreeKernelArgs *kargs); -char * _ostree_kernel_args_to_string (OstreeKernelArgs *kargs); +_OSTREE_PUBLIC +void ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, + char *arg); + +_OSTREE_PUBLIC +void ostree_kernel_args_replace (OstreeKernelArgs *kargs, + const char *arg); + +_OSTREE_PUBLIC +void ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs, + char **argv); + +_OSTREE_PUBLIC +void ostree_kernel_args_append (OstreeKernelArgs *kargs, + const char *arg); + +_OSTREE_PUBLIC +void ostree_kernel_args_append_argv (OstreeKernelArgs *kargs, + char **argv); + +_OSTREE_PUBLIC +void ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs, + char **argv, + char **prefixes); + +_OSTREE_PUBLIC +gboolean ostree_kernel_args_new_replace (OstreeKernelArgs *kargs, + const char *arg, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_kernel_args_delete (OstreeKernelArgs *kargs, + const char *arg, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs, + const char *key, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC +void ostree_kernel_args_parse_append (OstreeKernelArgs *kargs, + const char *options); + +_OSTREE_PUBLIC +const char *ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, + const char *key); + +_OSTREE_PUBLIC +OstreeKernelArgs *ostree_kernel_args_from_string (const char *options); + +_OSTREE_PUBLIC +char **ostree_kernel_args_to_strv (OstreeKernelArgs *kargs); + +_OSTREE_PUBLIC +char *ostree_kernel_args_to_string (OstreeKernelArgs *kargs); G_END_DECLS diff --git a/src/libostree/ostree-libarchive-private.h b/src/libostree/ostree-libarchive-private.h index 4a98b6d1..46da3e18 100644 --- a/src/libostree/ostree-libarchive-private.h +++ b/src/libostree/ostree-libarchive-private.h @@ -44,9 +44,9 @@ typedef struct archive OtAutoArchiveRead; G_DEFINE_AUTOPTR_CLEANUP_FUNC(OtAutoArchiveRead, archive_read_free) static inline OtAutoArchiveRead * -ot_open_archive_read (const char *path, GError **error) +ot_archive_read_new (void) { - g_autoptr(OtAutoArchiveRead) a = archive_read_new (); + OtAutoArchiveRead *a = archive_read_new (); #ifdef HAVE_ARCHIVE_READ_SUPPORT_FILTER_ALL archive_read_support_filter_all (a); @@ -54,10 +54,34 @@ ot_open_archive_read (const char *path, GError **error) archive_read_support_compression_all (a); #endif archive_read_support_format_all (a); + + return a; +} + +static inline OtAutoArchiveRead * +ot_open_archive_read (const char *path, GError **error) +{ + g_autoptr(OtAutoArchiveRead) a = ot_archive_read_new (); + if (archive_read_open_filename (a, path, 8192) != ARCHIVE_OK) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "%s", archive_error_string (a)); + "archive_read_open_filename: %s", archive_error_string (a)); + return NULL; + } + + return g_steal_pointer (&a); +} + +static inline OtAutoArchiveRead * +ot_open_archive_read_fd (int fd, GError **error) +{ + g_autoptr(OtAutoArchiveRead) a = ot_archive_read_new (); + + if (archive_read_open_fd (a, fd, 8192) != ARCHIVE_OK) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "archive_read_open_fd: %s", archive_error_string (a)); return NULL; } diff --git a/src/libostree/ostree-mutable-tree.c b/src/libostree/ostree-mutable-tree.c index f6577210..8509d156 100644 --- a/src/libostree/ostree-mutable-tree.c +++ b/src/libostree/ostree-mutable-tree.c @@ -331,6 +331,8 @@ ostree_mutable_tree_replace_file (OstreeMutableTree *self, * @error: a #GError * * Remove the file or subdirectory named @name from the mutable tree @self. + * + * Since: 2018.9 */ gboolean ostree_mutable_tree_remove (OstreeMutableTree *self, @@ -399,6 +401,14 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self, return TRUE; } +/** + * ostree_mutable_tree_lookup: + * @self: Tree + * @name: name + * @out_file_checksum: (out) (transfer full): checksum + * @out_subdir: (out) (transfer full): subdirectory + * @error: a #GError + */ gboolean ostree_mutable_tree_lookup (OstreeMutableTree *self, const char *name, @@ -494,6 +504,8 @@ const char empty_tree_csum[] = "6e340b9cffb37a989ca544e6bb780a2c78901d3fb3373876 * This function enables optimisations when composing trees. The provided * checksums are not loaded or checked when this function is called. Instead * the contents will be loaded only when needed. + * + * Since: 2018.7 */ gboolean ostree_mutable_tree_fill_empty_from_dirtree (OstreeMutableTree *self, @@ -585,7 +597,7 @@ ostree_mutable_tree_walk (OstreeMutableTree *self, /** * ostree_mutable_tree_get_subdirs: * @self: - * + * * Returns: (transfer none) (element-type utf8 OstreeMutableTree): All children directories */ GHashTable * @@ -598,7 +610,7 @@ ostree_mutable_tree_get_subdirs (OstreeMutableTree *self) /** * ostree_mutable_tree_get_files: * @self: - * + * * Returns: (transfer none) (element-type utf8 utf8): All children files (the value is a checksum) */ GHashTable * @@ -654,6 +666,8 @@ ostree_mutable_tree_new (void) * and checksums. The data will be loaded from the repo lazily as needed. * * Returns: (transfer full): A new tree + * + * Since: 2018.7 */ OstreeMutableTree * ostree_mutable_tree_new_from_checksum (OstreeRepo *repo, diff --git a/src/libostree/ostree-ref.c b/src/libostree/ostree-ref.c index 35fd5821..ea372b84 100644 --- a/src/libostree/ostree-ref.c +++ b/src/libostree/ostree-ref.c @@ -47,7 +47,7 @@ G_DEFINE_BOXED_TYPE (OstreeCollectionRef, ostree_collection_ref, * refspec; no remote name is included), which can be used for non-P2P * operations. * - * Returns: (transfer full): a new #OstreeCollectionRef + * Returns: (transfer full) (nullable): a new #OstreeCollectionRef * Since: 2018.6 */ OstreeCollectionRef * @@ -69,7 +69,7 @@ ostree_collection_ref_new (const gchar *collection_id, /** * ostree_collection_ref_dup: - * @ref: an #OstreeCollectionRef + * @ref: (not nullable): an #OstreeCollectionRef * * Create a copy of the given @ref. * @@ -104,7 +104,7 @@ ostree_collection_ref_free (OstreeCollectionRef *ref) /** * ostree_collection_ref_hash: - * @ref: an #OstreeCollectionRef + * @ref: (not nullable): an #OstreeCollectionRef * * Hash the given @ref. This function is suitable for use with #GHashTable. * @ref must be non-%NULL. @@ -125,8 +125,8 @@ ostree_collection_ref_hash (gconstpointer ref) /** * ostree_collection_ref_equal: - * @ref1: an #OstreeCollectionRef - * @ref2: another #OstreeCollectionRef + * @ref1: (not nullable): an #OstreeCollectionRef + * @ref2 : (not nullable): another #OstreeCollectionRef * * Compare @ref1 and @ref2 and return %TRUE if they have the same collection ID and * ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL. diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c index e190a14a..49ec995f 100644 --- a/src/libostree/ostree-repo-checkout.c +++ b/src/libostree/ostree-repo-checkout.c @@ -771,7 +771,7 @@ checkout_one_file_at (OstreeRepo *repo, */ g_mutex_lock (&repo->cache_lock); { - gpointer key = GUINT_TO_POINTER ((g_ascii_xdigit_value (checksum[0]) << 4) + + gpointer key = GUINT_TO_POINTER ((g_ascii_xdigit_value (checksum[0]) << 4) + g_ascii_xdigit_value (checksum[1])); if (repo->updated_uncompressed_dirs == NULL) repo->updated_uncompressed_dirs = g_hash_table_new (NULL, NULL); @@ -1321,6 +1321,8 @@ ostree_repo_checkout_tree_at (OstreeRepo *self, * Note in addition that unlike ostree_repo_checkout_tree(), the * default is not to use the repository-internal uncompressed objects * cache. + * + * Since: 2016.8 */ gboolean ostree_repo_checkout_at (OstreeRepo *self, @@ -1391,6 +1393,8 @@ ostree_repo_checkout_at (OstreeRepo *self, * * Note that cache does *not* have its refcount incremented - the lifetime of * @cache must be equal to or greater than that of @opts. + * + * Since: 2017.13 */ void ostree_repo_checkout_at_options_set_devino (OstreeRepoCheckoutAtOptions *opts, @@ -1418,7 +1422,7 @@ devino_equal (gconstpointer a, /** * ostree_repo_devino_cache_new: - * + * * OSTree has support for pairing ostree_repo_checkout_tree_at() using * hardlinks in combination with a later * ostree_repo_write_directory_to_mtree() using a (normally modified) diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index f44446ca..e7bc9820 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2065,6 +2065,8 @@ ostree_repo_set_ref_immediate (OstreeRepo *self, * @error: GError * * Like ostree_repo_set_ref_immediate(), but creates an alias. + * + * Since: 2017.10 */ gboolean ostree_repo_set_alias_ref_immediate (OstreeRepo *self, diff --git a/src/libostree/ostree-repo-file.c b/src/libostree/ostree-repo-file.c index 740b4624..7ad11529 100644 --- a/src/libostree/ostree-repo-file.c +++ b/src/libostree/ostree-repo-file.c @@ -292,6 +292,13 @@ ostree_repo_file_ensure_resolved (OstreeRepoFile *self, return TRUE; } +/** + * ostree_repo_file_get_xattrs: + * @self: #OstreeRepoFile + * @out_xattrs: (out) (optional): the extended attributes + * @cancellable: Cancellable + * @error: Error + */ gboolean ostree_repo_file_get_xattrs (OstreeRepoFile *self, GVariant **out_xattrs, @@ -724,6 +731,13 @@ query_child_info_dir (OstreeRepo *repo, return TRUE; } +/** + * ostree_repo_file_tree_find_child: + * @self: #OstreeRepoFile + * @name: name of the child + * @is_dir: (out caller-allocates): + * @out_container: (out): + */ int ostree_repo_file_tree_find_child (OstreeRepoFile *self, const char *name, @@ -769,6 +783,16 @@ ostree_repo_file_tree_find_child (OstreeRepoFile *self, return i; } +/** + * ostree_repo_file_tree_query_child: + * @self: #OstreeRepoFile + * @n: + * @attributes: + * @flags: + * @out_info: (out): + * @cancellable: Cancellable + * @error: Error + */ gboolean ostree_repo_file_tree_query_child (OstreeRepoFile *self, int n, diff --git a/src/libostree/ostree-repo-finder.h b/src/libostree/ostree-repo-finder.h index 7c9be300..f9c26199 100644 --- a/src/libostree/ostree-repo-finder.h +++ b/src/libostree/ostree-repo-finder.h @@ -111,6 +111,8 @@ GPtrArray *ostree_repo_finder_resolve_all_finish (GAsyncResult *result, * which allow ostree_repo_pull_from_remotes_async() (for example) to prioritise * how to pull the refs. * + * An #OstreeRepoFinderResult is immutable after construction. + * * The @priority is used as one input of many to ordering functions like * ostree_repo_finder_result_compare(). * diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c index 2852e78e..1850f99f 100644 --- a/src/libostree/ostree-repo-libarchive.c +++ b/src/libostree/ostree-repo-libarchive.c @@ -901,6 +901,37 @@ ostree_repo_import_archive_to_mtree (OstreeRepo *self, #endif } +#ifdef HAVE_LIBARCHIVE +static gboolean +write_archive_to_mtree (OstreeRepo *self, + OtAutoArchiveRead *archive, + OstreeMutableTree *mtree, + OstreeRepoCommitModifier *modifier, + gboolean autocreate_parents, + GCancellable *cancellable, + GError **error) +{ + gboolean ret = FALSE; + OstreeRepoImportArchiveOptions opts = { 0, }; + + opts.autocreate_parents = !!autocreate_parents; + + if (!ostree_repo_import_archive_to_mtree (self, &opts, archive, mtree, modifier, cancellable, error)) + goto out; + + if (archive_read_close (archive) != ARCHIVE_OK) + { + propagate_libarchive_error (error, archive); + goto out; + } + + ret = TRUE; + out: + (void)archive_read_close (archive); + return ret; +} +#endif + /** * ostree_repo_write_archive_to_mtree: * @self: An #OstreeRepo @@ -924,31 +955,46 @@ ostree_repo_write_archive_to_mtree (OstreeRepo *self, GError **error) { #ifdef HAVE_LIBARCHIVE - gboolean ret = FALSE; - g_autoptr(OtAutoArchiveRead) a = archive_read_new (); - OstreeRepoImportArchiveOptions opts = { 0, }; - - a = ot_open_archive_read (gs_file_get_path_cached (archive), error); - if (!a) - goto out; - opts.autocreate_parents = !!autocreate_parents; - - if (!ostree_repo_import_archive_to_mtree (self, &opts, a, mtree, modifier, cancellable, error)) - goto out; - - if (archive_read_close (a) != ARCHIVE_OK) - { - propagate_libarchive_error (error, a); - goto out; - } - - ret = TRUE; - out: + g_autoptr(OtAutoArchiveRead) a = ot_open_archive_read (gs_file_get_path_cached (archive), error); if (a) - { - (void)archive_read_close (a); - } - return ret; + return write_archive_to_mtree (self, a, mtree, modifier, autocreate_parents, cancellable, error); + + return FALSE; +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "This version of ostree is not compiled with libarchive support"); + return FALSE; +#endif +} + +/** + * ostree_repo_write_archive_to_mtree_from_fd: + * @self: An #OstreeRepo + * @fd: A file descriptor to read the archive from + * @mtree: The #OstreeMutableTree to write to + * @modifier: (allow-none): Optional commit modifier + * @autocreate_parents: Autocreate parent directories + * @cancellable: Cancellable + * @error: Error + * + * Read an archive from @fd and import it into the repository, writing + * its file structure to @mtree. + */ +gboolean +ostree_repo_write_archive_to_mtree_from_fd (OstreeRepo *self, + int fd, + OstreeMutableTree *mtree, + OstreeRepoCommitModifier *modifier, + gboolean autocreate_parents, + GCancellable *cancellable, + GError **error) +{ +#ifdef HAVE_LIBARCHIVE + g_autoptr(OtAutoArchiveRead) a = ot_open_archive_read_fd (fd, error); + if (a) + return write_archive_to_mtree (self, a, mtree, modifier, autocreate_parents, cancellable, error); + + return FALSE; #else g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "This version of ostree is not compiled with libarchive support"); diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 6bc74c2d..b57ad799 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -332,6 +332,7 @@ _ostree_repo_commit_modifier_apply (OstreeRepo *self, gboolean _ostree_repo_remote_name_is_file (const char *remote_name); +#ifndef OSTREE_DISABLE_GPGME OstreeGpgVerifyResult * _ostree_repo_gpg_verify_with_metadata (OstreeRepo *self, GBytes *signed_data, @@ -350,6 +351,7 @@ _ostree_repo_verify_commit_internal (OstreeRepo *self, GFile *extra_keyring, GCancellable *cancellable, GError **error); +#endif /* OSTREE_DISABLE_GPGME */ typedef enum { _OSTREE_REPO_IMPORT_FLAGS_NONE, diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index 7ab9dc8d..0b953628 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -473,6 +473,8 @@ ostree_repo_prune (OstreeRepo *self, * statistics on objects that would be deleted, without actually deleting them. * * Locking: exclusive + * + * Since: 2017.1 */ gboolean ostree_repo_prune_from_reachable (OstreeRepo *self, diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 48935523..3adaa477 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -104,9 +104,9 @@ typedef struct { gint n_scanned_metadata; gboolean gpg_verify; + gboolean gpg_verify_summary; gboolean require_static_deltas; gboolean disable_static_deltas; - gboolean gpg_verify_summary; gboolean has_tombstone_commits; GBytes *summary_data; @@ -114,7 +114,7 @@ typedef struct { GVariant *summary; GHashTable *summary_deltas_checksums; GHashTable *ref_original_commits; /* Maps checksum to commit, used by timestamp checks */ - GHashTable *gpg_verified_commits; /* Set of commits that have been verified */ + GHashTable *verified_commits; /* Set of commits that have been verified */ GHashTable *ref_keyring_map; /* Maps OstreeCollectionRef to keyring remote name */ GPtrArray *static_delta_superblocks; GHashTable *expected_commit_sizes; /* Maps commit checksum to known size */ @@ -261,14 +261,13 @@ static gboolean scan_one_metadata_object (OtPullData *pull_data, GError **error); static void scan_object_queue_data_free (ScanObjectQueueData *scan_data); static gboolean -gpg_verify_unwritten_commit (OtPullData *pull_data, - const char *checksum, - GVariant *commit, - GVariant *detached_metadata, - const OstreeCollectionRef *ref, - GCancellable *cancellable, - GError **error); - +ostree_verify_unwritten_commit (OtPullData *pull_data, + const char *checksum, + GVariant *commit, + GVariant *detached_metadata, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error); static gboolean update_progress (gpointer user_data) @@ -1063,7 +1062,7 @@ content_fetch_on_write_complete (GObject *object, static void content_fetch_on_complete (GObject *object, GAsyncResult *result, - gpointer user_data) + gpointer user_data) { OstreeFetcher *fetcher = (OstreeFetcher *)object; FetchObjectData *fetch_data = user_data; @@ -1167,7 +1166,7 @@ on_metadata_written (GObject *object, g_autofree guchar *csum = NULL; g_autofree char *stringified_object = NULL; - if (!ostree_repo_write_metadata_finish ((OstreeRepo*)object, result, + if (!ostree_repo_write_metadata_finish ((OstreeRepo*)object, result, &csum, error)) goto out; @@ -1294,22 +1293,22 @@ meta_fetch_on_complete (GObject *object, if (!_ostree_verify_metadata_object (objtype, checksum, metadata, error)) goto out; - /* For commit objects, check the GPG signature before writing to the repo, + /* For commit objects, check the signature before writing to the repo, * and also write the .commitpartial to say that we're still processing * this commit. */ if (objtype == OSTREE_OBJECT_TYPE_COMMIT) { - /* Do GPG verification. `detached_data` may be NULL if no detached + /* Do signature verification. `detached_data` may be NULL if no detached * metadata was found during pull; that's handled by - * gpg_verify_unwritten_commit(). If we ever change the pull code to + * ostree_ostree_verify_unwritten_commit(). If we ever change the pull code to * not always fetch detached metadata, this bit will have to learn how * to look up from the disk state as well, or insert the on-disk * metadata into this hash. */ GVariant *detached_data = g_hash_table_lookup (pull_data->fetched_detached_metadata, checksum); - if (!gpg_verify_unwritten_commit (pull_data, checksum, metadata, detached_data, - fetch_data->requested_ref, pull_data->cancellable, error)) + if (!ostree_verify_unwritten_commit (pull_data, checksum, metadata, detached_data, + fetch_data->requested_ref, pull_data->cancellable, error)) goto out; if (!ostree_repo_mark_commit_partial (pull_data->repo, checksum, TRUE, error)) @@ -1433,6 +1432,7 @@ static_deltapart_fetch_on_complete (GObject *object, g_clear_pointer (&fetch_data, fetch_static_delta_data_free); } +#ifndef OSTREE_DISABLE_GPGME static gboolean process_verify_result (OtPullData *pull_data, const char *checksum, @@ -1458,26 +1458,28 @@ process_verify_result (OtPullData *pull_data, * the case of "written but not verified". But we also don't want to check * twice, as that'd result in duplicate signals. */ - g_hash_table_add (pull_data->gpg_verified_commits, g_strdup (checksum)); + g_hash_table_add (pull_data->verified_commits, g_strdup (checksum)); return TRUE; } +#endif /* OSTREE_DISABLE_GPGME */ static gboolean -gpg_verify_unwritten_commit (OtPullData *pull_data, - const char *checksum, - GVariant *commit, - GVariant *detached_metadata, - const OstreeCollectionRef *ref, - GCancellable *cancellable, - GError **error) +ostree_verify_unwritten_commit (OtPullData *pull_data, + const char *checksum, + GVariant *commit, + GVariant *detached_metadata, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error) { +#ifndef OSTREE_DISABLE_GPGME if (pull_data->gpg_verify) { const char *keyring_remote = NULL; /* Shouldn't happen, but see comment in process_verify_result() */ - if (g_hash_table_contains (pull_data->gpg_verified_commits, checksum)) + if (g_hash_table_contains (pull_data->verified_commits, checksum)) return TRUE; if (ref != NULL) @@ -1494,6 +1496,7 @@ gpg_verify_unwritten_commit (OtPullData *pull_data, if (!process_verify_result (pull_data, checksum, result, error)) return FALSE; } +#endif /* OSTREE_DISABLE_GPGME */ return TRUE; } @@ -1702,6 +1705,7 @@ ostree_repo_resolve_keyring_for_collection (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME gsize i; g_auto(GStrv) remotes = NULL; g_autoptr(OstreeRemote) keyring_remote = NULL; @@ -1763,6 +1767,12 @@ ostree_repo_resolve_keyring_for_collection (OstreeRepo *self, collection_id); return NULL; } +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return NULL; +#endif /* OSTREE_DISABLE_GPGME */ } #ifdef HAVE_LIBCURL_OR_LIBSOUP @@ -1792,11 +1802,12 @@ scan_commit_object (OtPullData *pull_data, GINT_TO_POINTER (depth)); } +#ifndef OSTREE_DISABLE_GPGME /* See comment in process_verify_result() - we now gpg check before writing, * but also ensure we've done it here if not already. */ if (pull_data->gpg_verify && - !g_hash_table_contains (pull_data->gpg_verified_commits, checksum)) + !g_hash_table_contains (pull_data->verified_commits, checksum)) { g_autoptr(OstreeGpgVerifyResult) result = NULL; const char *keyring_remote = NULL; @@ -1814,6 +1825,7 @@ scan_commit_object (OtPullData *pull_data, if (!process_verify_result (pull_data, checksum, result, error)) return FALSE; } +#endif /* OSTREE_DISABLE_GPGME */ /* If we found a legacy transaction flag, assume we have to scan. * We always do a scan of dirtree objects; see @@ -2401,8 +2413,8 @@ process_one_static_delta (OtPullData *pull_data, g_autofree char *detached_path = _ostree_get_relative_static_delta_path (from_revision, to_revision, "commitmeta"); g_autoptr(GVariant) detached_data = g_variant_lookup_value (metadata, detached_path, G_VARIANT_TYPE("a{sv}")); - if (!gpg_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data, - ref, cancellable, error)) + if (!ostree_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data, + ref, cancellable, error)) return FALSE; if (detached_data && !ostree_repo_write_commit_detached_metadata (pull_data->repo, @@ -2742,6 +2754,7 @@ on_superblock_fetched (GObject *src, ot_checksum_update_bytes (&hasher, delta_superblock_data); ot_checksum_get_digest (&hasher, actual_summary_digest, sizeof (actual_summary_digest)); +#ifndef OSTREE_DISABLE_GPGME /* At this point we've GPG verified the data, so in theory * could trust that they provided the right data, but let's * make this a hard error. @@ -2752,6 +2765,7 @@ on_superblock_fetched (GObject *src, "GPG verification enabled, but no summary signatures found (use gpg-verify-summary=false in remote config to disable)"); goto out; } +#endif /* OSTREE_DISABLE_GPGME */ if (expected_summary_digest && memcmp (expected_summary_digest, actual_summary_digest, sizeof (actual_summary_digest))) { @@ -2868,7 +2882,7 @@ _ostree_repo_load_cache_summary_if_same_sig (OstreeRepo *self, if (prev_fd < 0) return TRUE; /* Note early return */ - g_autoptr(GBytes) old_sig_contents = glnx_fd_readall_bytes (prev_fd, cancellable, error); + g_autoptr(GBytes) old_sig_contents = ot_fd_readall_or_mmap (prev_fd, 0, error); if (!old_sig_contents) return FALSE; @@ -3618,6 +3632,17 @@ ostree_repo_pull_with_options (OstreeRepo *self, pull_data->remote_name = g_strdup (pull_data->remote_refspec_name); } +#ifdef OSTREE_DISABLE_GPGME + /* Explicitly fail here if gpg verification is requested and we have no GPG support */ + if (opt_gpg_verify_set || opt_gpg_verify_summary_set) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + goto out; + } +#endif + g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE); g_return_val_if_fail (pull_data->maxdepth >= -1, FALSE); g_return_val_if_fail (!pull_data->timestamp_check || pull_data->maxdepth == 0, FALSE); @@ -3671,8 +3696,8 @@ ostree_repo_pull_with_options (OstreeRepo *self, pull_data->ref_original_commits = g_hash_table_new_full (ostree_collection_ref_hash, ostree_collection_ref_equal, (GDestroyNotify)NULL, (GDestroyNotify)g_free); - pull_data->gpg_verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal, - (GDestroyNotify)g_free, NULL); + pull_data->verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify)g_free, NULL); pull_data->ref_keyring_map = g_hash_table_new_full (ostree_collection_ref_hash, ostree_collection_ref_equal, (GDestroyNotify)ostree_collection_ref_free, (GDestroyNotify)g_free); pull_data->scanned_metadata = g_hash_table_new_full (ostree_hash_object_name, g_variant_equal, @@ -3745,6 +3770,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, g_free (pull_data->remote_name); pull_data->remote_name = g_strdup (remote_name_or_baseurl); +#ifndef OSTREE_DISABLE_GPGME /* Fetch GPG verification settings from remote if it wasn't already * explicitly set in the options. */ if (!opt_gpg_verify_set) @@ -3756,6 +3782,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name, &pull_data->gpg_verify_summary, error)) goto out; +#endif /* OSTREE_DISABLE_GPGME */ /* NOTE: If changing this, see the matching implementation in * ostree-sysroot-upgrader.c @@ -4060,12 +4087,14 @@ ostree_repo_pull_with_options (OstreeRepo *self, goto out; } +#ifndef OSTREE_DISABLE_GPGME if (!bytes_summary && pull_data->gpg_verify_summary) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "GPG verification enabled, but no summary found (use gpg-verify-summary=false in remote config to disable)"); goto out; } +#endif /* OSTREE_DISABLE_GPGME */ if (!bytes_summary && pull_data->require_static_deltas) { @@ -4074,6 +4103,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, goto out; } +#ifndef OSTREE_DISABLE_GPGME if (!bytes_sig && pull_data->gpg_verify_summary) { g_set_error (error, OSTREE_GPG_ERROR, OSTREE_GPG_ERROR_NO_SIGNATURE, @@ -4132,6 +4162,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, } } } +#endif /* OSTREE_DISABLE_GPGME */ if (bytes_summary) { @@ -4334,62 +4365,62 @@ ostree_repo_pull_with_options (OstreeRepo *self, GLNX_HASH_TABLE_FOREACH_KV (requested_refs_to_fetch, const OstreeCollectionRef*, ref, const char*, override_commitid) { - g_autofree char *contents = NULL; + g_autofree char *checksum = NULL; + g_autoptr(OstreeCollectionRef) ref_with_collection = NULL; /* Support specifying "" for an override commitid */ if (override_commitid && *override_commitid) { - g_hash_table_replace (updated_requested_refs_to_fetch, ostree_collection_ref_dup (ref), g_strdup (override_commitid)); + ref_with_collection = ostree_collection_ref_dup (ref); + checksum = g_strdup (override_commitid); } else { - g_autoptr(OstreeCollectionRef) ref_with_collection = NULL; - if (pull_data->summary) { gsize commit_size = 0; guint64 *malloced_size; g_autofree gchar *collection_id = NULL; - if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &contents, &commit_size, &collection_id, error)) + if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &checksum, &commit_size, &collection_id, error)) goto out; ref_with_collection = ostree_collection_ref_new (collection_id, ref->ref_name); malloced_size = g_new0 (guint64, 1); *malloced_size = commit_size; - g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (contents), malloced_size); + g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (checksum), malloced_size); } else { - if (!fetch_ref_contents (pull_data, main_collection_id, ref, &contents, cancellable, error)) + if (!fetch_ref_contents (pull_data, main_collection_id, ref, &checksum, cancellable, error)) goto out; ref_with_collection = ostree_collection_ref_dup (ref); } - - /* If we have timestamp checking enabled, find the current value of - * the ref, and store its timestamp in the hash map, to check later. - */ - if (pull_data->timestamp_check) - { - g_autofree char *from_rev = NULL; - if (!ostree_repo_resolve_rev (pull_data->repo, ref_with_collection->ref_name, TRUE, - &from_rev, error)) - goto out; - /* Explicitly store NULL if there's no previous revision. We do - * this so we can assert() if we somehow didn't find a ref in the - * hash at all. Note we don't copy the collection-ref, so the - * lifetime of this hash must be equal to `requested_refs_to_fetch`. - */ - g_hash_table_insert (pull_data->ref_original_commits, ref_with_collection, - g_steal_pointer (&from_rev)); - } - - g_hash_table_replace (updated_requested_refs_to_fetch, - g_steal_pointer (&ref_with_collection), - g_steal_pointer (&contents)); } + + /* If we have timestamp checking enabled, find the current value of + * the ref, and store its timestamp in the hash map, to check later. + */ + if (pull_data->timestamp_check) + { + g_autofree char *from_rev = NULL; + if (!ostree_repo_resolve_rev (pull_data->repo, ref_with_collection->ref_name, TRUE, + &from_rev, error)) + goto out; + /* Explicitly store NULL if there's no previous revision. We do + * this so we can assert() if we somehow didn't find a ref in the + * hash at all. Note we don't copy the collection-ref, so the + * lifetime of this hash must be equal to `requested_refs_to_fetch`. + */ + g_hash_table_insert (pull_data->ref_original_commits, ref_with_collection, + g_steal_pointer (&from_rev)); + } + + g_hash_table_replace (updated_requested_refs_to_fetch, + g_steal_pointer (&ref_with_collection), + g_steal_pointer (&checksum)); } g_hash_table_unref (requested_refs_to_fetch); @@ -4613,17 +4644,23 @@ ostree_repo_pull_with_options (OstreeRepo *self, g_string_append_printf (msg, "libostree pull from '%s' for %u refs complete", pull_data->remote_name, g_hash_table_size (requested_refs_to_fetch)); - const char *gpg_verify_state; + const char *verify_state; +#ifndef OSTREE_DISABLE_GPGME if (pull_data->gpg_verify_summary) { if (pull_data->gpg_verify) - gpg_verify_state = "summary+commit"; + verify_state = "summary+commit"; else - gpg_verify_state = "summary-only"; + verify_state = "summary-only"; } else - gpg_verify_state = (pull_data->gpg_verify ? "commit" : "disabled"); - g_string_append_printf (msg, "\nsecurity: GPG: %s ", gpg_verify_state); + verify_state = (pull_data->gpg_verify ? "commit" : "disabled"); + g_string_append_printf (msg, "\nsecurity: GPG: %s ", verify_state); +#else + verify_state = "disabled"; + g_string_append_printf (msg, "\nsecurity: %s ", verify_state); +#endif /* OSTREE_DISABLE_GPGME */ + OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0]; g_autofree char *first_scheme = _ostree_fetcher_uri_get_scheme (first_uri); if (g_str_has_prefix (first_scheme, "http")) @@ -4658,7 +4695,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, ot_journal_send ("MESSAGE=%s", msg->str, "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_MESSAGE_FETCH_COMPLETE_ID), "OSTREE_REMOTE=%s", pull_data->remote_name, - "OSTREE_GPG=%s", gpg_verify_state, + "OSTREE_GPG=%s", verify_state, "OSTREE_SECONDS=%u", n_seconds, "OSTREE_XFER_SIZE=%s", formatted_xferred, NULL); @@ -4718,7 +4755,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, g_clear_pointer (&pull_data->fetched_detached_metadata, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&pull_data->summary_deltas_checksums, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&pull_data->ref_original_commits, (GDestroyNotify) g_hash_table_unref); - g_clear_pointer (&pull_data->gpg_verified_commits, (GDestroyNotify) g_hash_table_unref); + g_clear_pointer (&pull_data->verified_commits, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&pull_data->ref_keyring_map, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&pull_data->requested_content, (GDestroyNotify) g_hash_table_unref); g_clear_pointer (&pull_data->requested_fallback_content, (GDestroyNotify) g_hash_table_unref); @@ -5970,7 +6007,11 @@ ostree_repo_pull_from_remotes_async (OstreeRepo *self, g_variant_dict_insert (&local_options_dict, "flags", "i", OSTREE_REPO_PULL_FLAGS_UNTRUSTED | flags); g_variant_dict_insert_value (&local_options_dict, "collection-refs", g_variant_builder_end (&refs_to_pull_builder)); +#ifndef OSTREE_DISABLE_GPGME g_variant_dict_insert (&local_options_dict, "gpg-verify", "b", TRUE); +#else + g_variant_dict_insert (&local_options_dict, "gpg-verify", "b", FALSE); +#endif /* OSTREE_DISABLE_GPGME */ g_variant_dict_insert (&local_options_dict, "gpg-verify-summary", "b", FALSE); g_variant_dict_insert (&local_options_dict, "inherit-transaction", "b", TRUE); if (result->remote->refspec_name != NULL) @@ -6103,6 +6144,8 @@ ostree_repo_pull_from_remotes_finish (OstreeRepo *self, * means return errors without retrying * * Returns: %TRUE on success, %FALSE on failure + * + * Since: 2016.6 */ gboolean ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self, @@ -6116,8 +6159,10 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self, g_autofree char *metalink_url_string = NULL; g_autoptr(GBytes) summary = NULL; g_autoptr(GBytes) signatures = NULL; - gboolean ret = FALSE; +#ifndef OSTREE_DISABLE_GPGME gboolean gpg_verify_summary; +#endif + gboolean ret = FALSE; gboolean summary_is_from_cache; g_return_val_if_fail (OSTREE_REPO (self), FALSE); @@ -6138,6 +6183,7 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self, error)) goto out; +#ifndef OSTREE_DISABLE_GPGME if (!ostree_repo_remote_get_gpg_verify_summary (self, name, &gpg_verify_summary, error)) goto out; @@ -6191,6 +6237,10 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self, } } +#else + g_message ("%s: GPG feature is disabled in a build time", __FUNCTION__); +#endif /* OSTREE_DISABLE_GPGME */ + if (out_summary != NULL) *out_summary = g_steal_pointer (&summary); diff --git a/src/libostree/ostree-repo-refs.c b/src/libostree/ostree-repo-refs.c index c512787a..536a763a 100644 --- a/src/libostree/ostree-repo-refs.c +++ b/src/libostree/ostree-repo-refs.c @@ -482,6 +482,8 @@ ostree_repo_resolve_rev (OstreeRepo *self, * * The flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY is implied so * using it has no effect. + * + * Since: 2016.7 */ gboolean ostree_repo_resolve_rev_ext (OstreeRepo *self, @@ -856,6 +858,8 @@ ostree_repo_list_refs (OstreeRepo *self, * @out_all_refs will be returned as a mapping from refspecs (including the * remote name) to checksums. Differently from ostree_repo_list_refs(), the * @refspec_prefix will not be removed from the refspecs in the hash table. + * + * Since: 2016.4 */ gboolean ostree_repo_list_refs_ext (OstreeRepo *self, diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 9ffa103f..eb652bef 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -139,9 +139,11 @@ G_STATIC_ASSERT(sizeof(OstreeRepoPruneOptions) == typedef struct { GObjectClass parent_class; +#ifndef OSTREE_DISABLE_GPGME void (*gpg_verify_result) (OstreeRepo *self, const char *checksum, OstreeGpgVerifyResult *result); +#endif } OstreeRepoClass; enum { @@ -157,7 +159,9 @@ enum { LAST_SIGNAL }; +#ifndef OSTREE_DISABLE_GPGME static guint signals[LAST_SIGNAL] = { 0 }; +#endif G_DEFINE_TYPE (OstreeRepo, ostree_repo, G_TYPE_OBJECT) @@ -786,6 +790,8 @@ _ostree_repo_remote_name_is_file (const char *remote_name) * option name. If an error is returned, @out_value will be set to %NULL. * * Returns: %TRUE on success, otherwise %FALSE with @error set + * + * Since: 2016.5 */ gboolean ostree_repo_get_remote_option (OstreeRepo *self, @@ -864,6 +870,8 @@ ostree_repo_get_remote_option (OstreeRepo *self, * to %NULL. * * Returns: %TRUE on success, otherwise %FALSE with @error set + * + * Since: 2016.5 */ gboolean ostree_repo_get_remote_list_option (OstreeRepo *self, @@ -939,6 +947,8 @@ ostree_repo_get_remote_list_option (OstreeRepo *self, * error is returned, @out_value will be set to %FALSE. * * Returns: %TRUE on success, otherwise %FALSE with @error set + * + * Since: 2016.5 */ gboolean ostree_repo_get_remote_boolean_option (OstreeRepo *self, @@ -1161,6 +1171,7 @@ ostree_repo_class_init (OstreeRepoClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); +#ifndef OSTREE_DISABLE_GPGME /** * OstreeRepo::gpg-verify-result: * @self: an #OstreeRepo @@ -1183,23 +1194,27 @@ ostree_repo_class_init (OstreeRepoClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, OSTREE_TYPE_GPG_VERIFY_RESULT); +#endif /* OSTREE_DISABLE_GPGME */ } static void ostree_repo_init (OstreeRepo *self) { - static gsize gpgme_initialized; const GDebugKey test_error_keys[] = { { "pre-commit", OSTREE_REPO_TEST_ERROR_PRE_COMMIT }, { "invalid-cache", OSTREE_REPO_TEST_ERROR_INVALID_CACHE }, }; +#ifndef OSTREE_DISABLE_GPGME + static gsize gpgme_initialized; + if (g_once_init_enter (&gpgme_initialized)) { gpgme_check_version (NULL); gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL)); g_once_init_leave (&gpgme_initialized, 1); } +#endif self->test_error_flags = g_parse_debug_string (g_getenv ("OSTREE_REPO_TEST_ERROR"), test_error_keys, G_N_ELEMENTS (test_error_keys)); @@ -1255,6 +1270,8 @@ repo_open_at_take_fd (int *dfd, * already extant repository. If you want to create one, use ostree_repo_create_at(). * * Returns: (transfer full): An accessor object for an OSTree repository located at @dfd + @path + * + * Since: 2017.10 */ OstreeRepo* ostree_repo_open_at (int dfd, @@ -2009,8 +2026,17 @@ ostree_repo_remote_get_gpg_verify (OstreeRepo *self, return TRUE; } - return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify", +#ifndef OSTREE_DISABLE_GPGME + return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify", TRUE, out_gpg_verify, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + if (out_gpg_verify != NULL) + *out_gpg_verify = FALSE; + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -2032,17 +2058,26 @@ ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self, gboolean *out_gpg_verify_summary, GError **error) { +#ifndef OSTREE_DISABLE_GPGME return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify-summary", FALSE, out_gpg_verify_summary, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + if (out_gpg_verify_summary != NULL) + *out_gpg_verify_summary = FALSE; + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } /** * ostree_repo_remote_gpg_import: * @self: Self * @name: name of a remote - * @source_stream: (allow-none): a #GInputStream, or %NULL - * @key_ids: (array zero-terminated=1) (element-type utf8) (allow-none): a %NULL-terminated array of GPG key IDs, or %NULL - * @out_imported: (allow-none): return location for the number of imported + * @source_stream: (nullable): a #GInputStream, or %NULL + * @key_ids: (array zero-terminated=1) (element-type utf8) (nullable): a %NULL-terminated array of GPG key IDs, or %NULL + * @out_imported: (out) (optional): return location for the number of imported * keys, or %NULL * @cancellable: a #GCancellable * @error: a #GError @@ -2066,6 +2101,7 @@ ostree_repo_remote_gpg_import (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME OstreeRemote *remote; g_auto(gpgme_ctx_t) source_context = NULL; g_auto(gpgme_ctx_t) target_context = NULL; @@ -2292,15 +2328,25 @@ out: if (remote != NULL) ostree_remote_unref (remote); - if (source_tmp_dir != NULL) + if (source_tmp_dir != NULL) { + ot_gpgme_kill_agent (source_tmp_dir); (void) glnx_shutil_rm_rf_at (AT_FDCWD, source_tmp_dir, NULL, NULL); + } - if (target_tmp_dir != NULL) + if (target_tmp_dir != NULL) { + ot_gpgme_kill_agent (target_tmp_dir); (void) glnx_shutil_rm_rf_at (AT_FDCWD, target_tmp_dir, NULL, NULL); + } g_prefix_error (error, "GPG: "); return ret; +#else /* OSTREE_DISABLE_GPGME */ + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -2377,6 +2423,12 @@ ostree_repo_mode_to_string (OstreeRepoMode mode, return TRUE; } +/** + * ostree_repo_mode_from_string: + * @mode: a repo mode as a string + * @out_mode: (out): the corresponding #OstreeRepoMode + * @error: a #GError if the string is not a valid mode + */ gboolean ostree_repo_mode_from_string (const char *mode, OstreeRepoMode *out_mode, @@ -2570,6 +2622,8 @@ ostree_repo_create (OstreeRepo *self, * - collection-id: s: Set as collection ID in repo/config (Since 2017.9) * * Returns: (transfer full): A new OSTree repository reference + * + * Since: 2017.10 */ OstreeRepo * ostree_repo_create_at (int dfd, @@ -3149,6 +3203,8 @@ reload_sysroot_config (OstreeRepo *self, * * By default, an #OstreeRepo will cache the remote configuration and its * own repo/config data. This API can be used to reload it. + * + * Since: 2017.2 */ gboolean ostree_repo_reload_config (OstreeRepo *self, @@ -3313,6 +3369,8 @@ ostree_repo_set_disable_fsync (OstreeRepo *self, * per-remote summary caches. Setting this manually is useful when * doing operations on a system repo as a user because you don't have * write permissions in the repo, where the cache is normally stored. + * + * Since: 2016.5 */ gboolean ostree_repo_set_cache_dir (OstreeRepo *self, @@ -3394,6 +3452,7 @@ ostree_repo_get_path (OstreeRepo *self) * repository (to see whether a ref was written). * * Returns: File descriptor for repository root - owned by @self + * Since: 2016.4 */ int ostree_repo_get_dfd (OstreeRepo *self) @@ -3466,12 +3525,15 @@ ostree_repo_get_mode (OstreeRepo *self) } /** - * ostree_repo_get_min_free_space: + * ostree_repo_get_min_free_space_bytes: * @self: Repo * @out_reserved_bytes: (out): Location to store the result * @error: Return location for a #GError * - * It can be used to query the value (in bytes) of min-free-space-* config option. + * Determine the number of bytes of free disk space that are reserved according + * to the repo config and return that number in @out_reserved_bytes. See the + * documentation for the core.min-free-space-size and + * core.min-free-space-percent repo config options. * * Returns: %TRUE on success, %FALSE otherwise. * Since: 2018.9 @@ -3576,7 +3638,7 @@ list_loose_objects_at (OstreeRepo *self, if (objtype != OSTREE_OBJECT_TYPE_COMMIT) continue; - /* commit checksum does not match "starting with", do not add to array */ + /* commit checksum does not match "starting with", do not add to array */ if (!g_str_has_prefix (buf, commit_starting_with)) continue; } @@ -4334,6 +4396,8 @@ ostree_repo_import_object_from (OstreeRepo *self, * this will simply be a fast Unix hard link operation. * * Otherwise, a copy will be performed. + * + * Since: 2016.5 */ gboolean ostree_repo_import_object_from_with_trust (OstreeRepo *self, @@ -4446,7 +4510,7 @@ ostree_repo_load_variant (OstreeRepo *self, */ gboolean ostree_repo_load_commit (OstreeRepo *self, - const char *checksum, + const char *checksum, GVariant **out_variant, OstreeRepoCommitState *out_state, GError **error) @@ -4874,6 +4938,7 @@ ostree_repo_append_gpg_signature (OstreeRepo *self, error)) return FALSE; +#ifndef OSTREE_DISABLE_GPGME g_autoptr(GVariant) new_metadata = _ostree_detached_metadata_append_gpg_sig (metadata, signature_bytes); @@ -4885,8 +4950,15 @@ ostree_repo_append_gpg_signature (OstreeRepo *self, return FALSE; return TRUE; +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } +#ifndef OSTREE_DISABLE_GPGME static gboolean sign_data (OstreeRepo *self, GBytes *input_data, @@ -4947,6 +5019,7 @@ sign_data (OstreeRepo *self, *out_signature = g_mapped_file_get_bytes (signature_file); return TRUE; } +#endif /* OSTREE_DISABLE_GPGME */ /** * ostree_repo_sign_commit: @@ -4967,6 +5040,7 @@ ostree_repo_sign_commit (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME g_autoptr(GBytes) commit_data = NULL; g_autoptr(GBytes) signature = NULL; @@ -5030,6 +5104,10 @@ ostree_repo_sign_commit (OstreeRepo *self, return FALSE; return TRUE; +#else + /* FIXME: Return false until refactoring */ + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -5076,6 +5154,7 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME glnx_autofd int fd = -1; if (!glnx_openat_rdonly (self->repo_dir_fd, "summary", TRUE, &fd, error)) return FALSE; @@ -5118,8 +5197,15 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self, return FALSE; return TRUE; +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } +#ifndef OSTREE_DISABLE_GPGME /* Special remote for _ostree_repo_gpg_verify_with_metadata() */ static const char *OSTREE_ALL_REMOTES = "__OSTREE_ALL_REMOTES__"; @@ -5353,6 +5439,7 @@ _ostree_repo_verify_commit_internal (OstreeRepo *self, keyringdir, extra_keyring, cancellable, error); } +#endif /* OSTREE_DISABLE_GPGME */ /** * ostree_repo_verify_commit: @@ -5376,6 +5463,7 @@ ostree_repo_verify_commit (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME g_autoptr(OstreeGpgVerifyResult) result = NULL; result = ostree_repo_verify_commit_ext (self, commit_checksum, @@ -5385,6 +5473,13 @@ ostree_repo_verify_commit (OstreeRepo *self, if (!ostree_gpg_verify_result_require_valid_signature (result, error)) return glnx_prefix_error (error, "Commit %s", commit_checksum); return TRUE; +#else + /* FIXME: Return false until refactoring */ + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return FALSE; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -5409,6 +5504,7 @@ ostree_repo_verify_commit_ext (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME return _ostree_repo_verify_commit_internal (self, commit_checksum, NULL, @@ -5416,6 +5512,12 @@ ostree_repo_verify_commit_ext (OstreeRepo *self, extra_keyring, cancellable, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return NULL; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -5431,6 +5533,8 @@ ostree_repo_verify_commit_ext (OstreeRepo *self, * configured for @remote. * * Returns: (transfer full): an #OstreeGpgVerifyResult, or %NULL on error + * + * Since: 2016.14 */ OstreeGpgVerifyResult * ostree_repo_verify_commit_for_remote (OstreeRepo *self, @@ -5439,6 +5543,7 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self, GCancellable *cancellable, GError **error) { +#ifndef OSTREE_DISABLE_GPGME return _ostree_repo_verify_commit_internal (self, commit_checksum, remote_name, @@ -5446,6 +5551,12 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self, NULL, cancellable, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return NULL; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -5466,6 +5577,8 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self, * the verifications using GPG keys in the keyrings of all remotes. * * Returns: (transfer full): an #OstreeGpgVerifyResult, or %NULL on error + * + * Since: 2016.6 */ OstreeGpgVerifyResult * ostree_repo_gpg_verify_data (OstreeRepo *self, @@ -5481,6 +5594,7 @@ ostree_repo_gpg_verify_data (OstreeRepo *self, g_return_val_if_fail (data != NULL, NULL); g_return_val_if_fail (signatures != NULL, NULL); +#ifndef OSTREE_DISABLE_GPGME return _ostree_repo_gpg_verify_data_internal (self, (remote_name != NULL) ? remote_name : OSTREE_ALL_REMOTES, data, @@ -5489,6 +5603,12 @@ ostree_repo_gpg_verify_data (OstreeRepo *self, extra_keyring, cancellable, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return NULL; +#endif /* OSTREE_DISABLE_GPGME */ } /** @@ -5523,6 +5643,7 @@ ostree_repo_verify_summary (OstreeRepo *self, signatures_variant = g_variant_new_from_bytes (OSTREE_SUMMARY_SIG_GVARIANT_FORMAT, signatures, FALSE); +#ifndef OSTREE_DISABLE_GPGME return _ostree_repo_gpg_verify_with_metadata (self, summary, signatures_variant, @@ -5530,6 +5651,12 @@ ostree_repo_verify_summary (OstreeRepo *self, NULL, NULL, cancellable, error); +#else + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "'%s': GPG feature is disabled in a build time", + __FUNCTION__); + return NULL; +#endif /* OSTREE_DISABLE_GPGME */ } /* Add an entry for a @ref ↦ @checksum mapping to an `a(s(t@ay@a{sv}))` @@ -6098,10 +6225,10 @@ ostree_repo_get_default_repo_finders (OstreeRepo *self) /** * ostree_repo_get_bootloader: * @self: an #OstreeRepo - * + * * Get the bootloader configured. See the documentation for the * "sysroot.bootloader" config key. - * + * * Returns: bootloader configuration for the sysroot * Since: 2019.2 */ diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index afa33155..038bbd41 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -199,18 +199,6 @@ gboolean ostree_repo_remote_get_url (OstreeRepo *self, char **out_url, GError **error); -_OSTREE_PUBLIC -gboolean ostree_repo_remote_get_gpg_verify (OstreeRepo *self, - const char *name, - gboolean *out_gpg_verify, - GError **error); - -_OSTREE_PUBLIC -gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self, - const char *name, - gboolean *out_gpg_verify_summary, - GError **error); - _OSTREE_PUBLIC gboolean ostree_repo_get_remote_option (OstreeRepo *self, const char *remote_name, @@ -234,14 +222,6 @@ gboolean ostree_repo_get_remote_boolean_option (OstreeRepo *self, gboolean *out_value, GError **error); -_OSTREE_PUBLIC -gboolean ostree_repo_remote_gpg_import (OstreeRepo *self, - const char *name, - GInputStream *source_stream, - const char * const *key_ids, - guint *out_imported, - GCancellable *cancellable, - GError **error); _OSTREE_PUBLIC gboolean ostree_repo_remote_fetch_summary (OstreeRepo *self, @@ -737,6 +717,16 @@ gboolean ostree_repo_write_archive_to_mtree (OstreeRepo * GCancellable *cancellable, GError **error); + +_OSTREE_PUBLIC +gboolean ostree_repo_write_archive_to_mtree_from_fd (OstreeRepo *self, + int fd, + OstreeMutableTree *mtree, + OstreeRepoCommitModifier *modifier, + gboolean autocreate_parents, + GCancellable *cancellable, + GError **error); + /** * OstreeRepoImportArchiveTranslatePathname: * @repo: Repo @@ -1327,20 +1317,6 @@ gboolean ostree_repo_sign_delta (OstreeRepo *self, GCancellable *cancellable, GError **error); -_OSTREE_PUBLIC -gboolean -ostree_repo_add_gpg_signature_summary (OstreeRepo *self, - const gchar **key_id, - const gchar *homedir, - GCancellable *cancellable, - GError **error); - -_OSTREE_PUBLIC -gboolean ostree_repo_append_gpg_signature (OstreeRepo *self, - const gchar *commit_checksum, - GBytes *signature_bytes, - GCancellable *cancellable, - GError **error); _OSTREE_PUBLIC gboolean ostree_repo_verify_commit (OstreeRepo *self, @@ -1350,6 +1326,40 @@ gboolean ostree_repo_verify_commit (OstreeRepo *self, GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC +gboolean ostree_repo_remote_get_gpg_verify (OstreeRepo *self, + const char *name, + gboolean *out_gpg_verify, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self, + const char *name, + gboolean *out_gpg_verify_summary, + GError **error); +_OSTREE_PUBLIC +gboolean ostree_repo_remote_gpg_import (OstreeRepo *self, + const char *name, + GInputStream *source_stream, + const char * const *key_ids, + guint *out_imported, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_repo_add_gpg_signature_summary (OstreeRepo *self, + const gchar **key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC +gboolean ostree_repo_append_gpg_signature (OstreeRepo *self, + const gchar *commit_checksum, + GBytes *signature_bytes, + GCancellable *cancellable, + GError **error); + _OSTREE_PUBLIC OstreeGpgVerifyResult * ostree_repo_verify_commit_ext (OstreeRepo *self, const gchar *commit_checksum, diff --git a/src/libostree/ostree-sepolicy.c b/src/libostree/ostree-sepolicy.c index 4f8223b3..e6b9a0e1 100644 --- a/src/libostree/ostree-sepolicy.c +++ b/src/libostree/ostree-sepolicy.c @@ -351,7 +351,7 @@ initable_init (GInitable *initable, if (g_str_has_prefix (line, selinuxtype_prefix)) { - policytype = g_strstrip (g_strdup (line + strlen (selinuxtype_prefix))); + policytype = g_strstrip (g_strdup (line + strlen (selinuxtype_prefix))); policy_root = g_file_get_child (etc_selinux_dir, policytype); } else if (g_str_has_prefix (line, selinux_prefix)) @@ -430,6 +430,8 @@ ostree_sepolicy_new (GFile *path, * @error: Error * * Returns: (transfer full): An accessor object for SELinux policy in root located at @rootfs_dfd + * + * Since: 2017.4 */ OstreeSePolicy* ostree_sepolicy_new_at (int rootfs_dfd, @@ -472,6 +474,8 @@ ostree_sepolicy_get_name (OstreeSePolicy *self) * @self: * * Returns: (transfer none): Checksum of current policy + * + * Since: 2016.5 */ const char * ostree_sepolicy_get_csum (OstreeSePolicy *self) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 3ca6c148..9de5464a 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -1374,7 +1374,7 @@ fsfreeze_thaw_cycle (OstreeSysroot *self, * the filesystem is already frozen (EBUSY). * OK, let's just do a syncfs. */ - if (G_IN_SET (errno, EOPNOTSUPP, EPERM, EBUSY)) + if (G_IN_SET (errno, EOPNOTSUPP, ENOSYS, EPERM, EBUSY)) { /* Warn if the filesystem was already frozen */ if (errno == EBUSY) @@ -1759,7 +1759,7 @@ install_deployment_kernel (OstreeSysroot *sysroot, ostree_bootconfig_parser_set (bootconfig, "linux", boot_relpath); val = ostree_bootconfig_parser_get (bootconfig, "options"); - g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_from_string (val); + g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_from_string (val); if (kernel_layout->initramfs_namever) { @@ -1772,7 +1772,7 @@ install_deployment_kernel (OstreeSysroot *sysroot, prepare_root_arg = g_strdup_printf ("init=/ostree/boot.%d/%s/%s/%d/usr/lib/ostree/ostree-prepare-root", new_bootversion, osname, bootcsum, ostree_deployment_get_bootserial (deployment)); - _ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg)); + ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg)); } if (kernel_layout->devicetree_namever) @@ -1785,9 +1785,9 @@ install_deployment_kernel (OstreeSysroot *sysroot, g_autofree char *ostree_kernel_arg = g_strdup_printf ("ostree=/ostree/boot.%d/%s/%s/%d", new_bootversion, osname, bootcsum, ostree_deployment_get_bootserial (deployment)); - _ostree_kernel_args_replace_take (kargs, g_steal_pointer (&ostree_kernel_arg)); + ostree_kernel_args_replace_take (kargs, g_steal_pointer (&ostree_kernel_arg)); - g_autofree char *options_key = _ostree_kernel_args_to_string (kargs); + g_autofree char *options_key = ostree_kernel_args_to_string (kargs); ostree_bootconfig_parser_set (bootconfig, "options", options_key); glnx_autofd int bootconf_dfd = -1; @@ -1895,9 +1895,9 @@ get_deployment_nonostree_kargs (OstreeDeployment *deployment) /* pick up kernel arguments but filter out ostree= */ OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (deployment); const char *boot_options = ostree_bootconfig_parser_get (bootconfig, "options"); - g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_from_string (boot_options); - _ostree_kernel_args_replace (kargs, "ostree"); - return _ostree_kernel_args_to_string (kargs); + g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_from_string (boot_options); + ostree_kernel_args_replace (kargs, "ostree"); + return ostree_kernel_args_to_string (kargs); } static char* @@ -2170,6 +2170,8 @@ write_deployments_finish (OstreeSysroot *self, * ostree_sysroot_cleanup() at some point after the transaction, or specify * `do_postclean` in @opts. Skipping the post-transaction cleanup is useful * if for example you want to control pruning of the repository. + * + * Since: 2017.4 */ gboolean ostree_sysroot_write_deployments_with_options (OstreeSysroot *self, @@ -2461,9 +2463,9 @@ _ostree_deployment_set_bootconfig_from_kargs (OstreeDeployment *deployment, */ if (override_kernel_argv) { - g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_append_argv (kargs, override_kernel_argv); - g_autofree char *new_options = _ostree_kernel_args_to_string (kargs); + g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new (); + ostree_kernel_args_append_argv (kargs, override_kernel_argv); + g_autofree char *new_options = ostree_kernel_args_to_string (kargs); ostree_bootconfig_parser_set (bootconfig, "options", new_options); } } @@ -2756,6 +2758,8 @@ _ostree_sysroot_deserialize_deployment_from_variant (GVariant *v, * * Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS * shutdown time. + * + * Since: 2018.5 */ gboolean ostree_sysroot_stage_tree (OstreeSysroot *self, @@ -3000,9 +3004,9 @@ ostree_sysroot_deployment_set_kargs (OstreeSysroot *self, g_autoptr(OstreeDeployment) new_deployment = ostree_deployment_clone (deployment); OstreeBootconfigParser *new_bootconfig = ostree_deployment_get_bootconfig (new_deployment); - g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_append_argv (kargs, new_kargs); - g_autofree char *new_options = _ostree_kernel_args_to_string (kargs); + g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new (); + ostree_kernel_args_append_argv (kargs, new_kargs); + g_autofree char *new_options = ostree_kernel_args_to_string (kargs); ostree_bootconfig_parser_set (new_bootconfig, "options", new_options); g_autoptr(GPtrArray) new_deployments = g_ptr_array_new_with_free_func (g_object_unref); diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h index e4b2039e..858673c5 100644 --- a/src/libostree/ostree-sysroot-private.h +++ b/src/libostree/ostree-sysroot-private.h @@ -23,7 +23,6 @@ #include "libglnx.h" #include "ostree.h" -#include "ostree-kernel-args.h" #include "ostree-bootloader.h" G_BEGIN_DECLS diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index 21ea1734..b3ad2498 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -855,6 +855,15 @@ _ostree_sysroot_reload_staged (OstreeSysroot *self, return TRUE; } +/** + * ostree_sysroot_load_if_changed: + * @self: #OstreeSysroot + * @out_changed: (out caller-allocates): + * @cancellable: Cancellable + * @error: Error + * + * Since: 2016.4 + */ gboolean ostree_sysroot_load_if_changed (OstreeSysroot *self, gboolean *out_changed, @@ -1033,6 +1042,8 @@ ostree_sysroot_get_booted_deployment (OstreeSysroot *self) * @self: Sysroot * * Returns: (transfer none): The currently staged deployment, or %NULL if none + * + * Since: 2018.5 */ OstreeDeployment * ostree_sysroot_get_staged_deployment (OstreeSysroot *self) @@ -1144,6 +1155,8 @@ ostree_sysroot_get_repo (OstreeSysroot *self, * has been invoked successfully. * * Returns: (transfer none): The OSTree repository in sysroot @self. + * + * Since: 2017.7 */ OstreeRepo * ostree_sysroot_repo (OstreeSysroot *self) @@ -1475,6 +1488,8 @@ ostree_sysroot_lock_finish (OstreeSysroot *self, * Initialize the directory structure for an "osname", which is a * group of operating system deployments, with a shared `/var`. One * is required for generating a deployment. + * + * Since: 2016.4 */ gboolean ostree_sysroot_init_osname (OstreeSysroot *self, @@ -1673,12 +1688,12 @@ clone_deployment (OstreeSysroot *sysroot, /* Copy the bootloader config options */ OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (merge_deployment); g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1); - g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_append_argv (kargs, previous_args); + g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new (); + ostree_kernel_args_append_argv (kargs, previous_args); /* Deploy the copy */ g_autoptr(OstreeDeployment) new_deployment = NULL; - g_auto(GStrv) kargs_strv = _ostree_kernel_args_to_strv (kargs); + g_auto(GStrv) kargs_strv = ostree_kernel_args_to_strv (kargs); if (!ostree_sysroot_deploy_tree (sysroot, ostree_deployment_get_osname (target_deployment), ostree_deployment_get_csum (target_deployment), @@ -1729,6 +1744,8 @@ static gboolean mkdir_unmasked (int dfd, * * The `OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX` state is persistent * across reboots. + * + * Since: 2016.4 */ gboolean ostree_sysroot_deployment_unlock (OstreeSysroot *self, diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h index 852a3245..82a50373 100644 --- a/src/libostree/ostree-version.h +++ b/src/libostree/ostree-version.h @@ -43,7 +43,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (2) +#define OSTREE_RELEASE_VERSION (3) /** * OSTREE_VERSION @@ -52,7 +52,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2019.2) +#define OSTREE_VERSION (2019.3) /** * OSTREE_VERSION_S: @@ -62,7 +62,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2019.2" +#define OSTREE_VERSION_S "2019.3" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) @@ -91,3 +91,13 @@ #define OSTREE_CHECK_VERSION(year,release) \ (OSTREE_YEAR_VERSION > (year) || \ (OSTREE_YEAR_VERSION == (year) && OSTREE_RELEASE_VERSION >= (release))) + +/** + * OSTREE_BUILT_FEATURES: + * + * Whitespace separated set of features this libostree was configured with at build time. + * Consult the source code in configure.ac (or the CLI `ostree --version`) for examples. + * + * Since: 2019.3 + */ +#define OSTREE_BUILT_FEATURES "libcurl libsoup gpgme libarchive selinux openssl libmount release p2p" diff --git a/src/libostree/ostree-version.h.in b/src/libostree/ostree-version.h.in index 8edb9116..2c7ecdec 100644 --- a/src/libostree/ostree-version.h.in +++ b/src/libostree/ostree-version.h.in @@ -91,3 +91,13 @@ #define OSTREE_CHECK_VERSION(year,release) \ (OSTREE_YEAR_VERSION > (year) || \ (OSTREE_YEAR_VERSION == (year) && OSTREE_RELEASE_VERSION >= (release))) + +/** + * OSTREE_BUILT_FEATURES: + * + * Whitespace separated set of features this libostree was configured with at build time. + * Consult the source code in configure.ac (or the CLI `ostree --version`) for examples. + * + * Since: 2019.3 + */ +#define OSTREE_BUILT_FEATURES "@OSTREE_FEATURES@" diff --git a/src/libostree/ostree.h b/src/libostree/ostree.h index cbeb99b2..49ca919c 100644 --- a/src/libostree/ostree.h +++ b/src/libostree/ostree.h @@ -39,5 +39,6 @@ #include #include #include +#include #include #include diff --git a/src/libotutil/ot-gpg-utils.c b/src/libotutil/ot-gpg-utils.c index cc5b0ae4..cf5ce3ea 100644 --- a/src/libotutil/ot-gpg-utils.c +++ b/src/libotutil/ot-gpg-utils.c @@ -437,3 +437,29 @@ ot_gpgme_new_ctx (const char *homedir, return g_steal_pointer (&context); } + +void +ot_gpgme_kill_agent (const char *homedir) +{ + g_return_if_fail (homedir != NULL); + + /* Run gpg-connect-agent killagent /bye */ + g_autoptr(GError) local_error = NULL; + g_autoptr(GSubprocess) proc = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_SILENCE, + &local_error, + "gpg-connect-agent", + "--homedir", + homedir, + "killagent", + "/bye", + NULL); + if (proc == NULL) { + g_debug ("Spawning gpg-connect-agent failed: %s", local_error->message); + return; + } + if (!g_subprocess_wait_check (proc, NULL, &local_error)) { + g_debug ("Killing GPG agent with gpg-connect-agent failed: %s", + local_error->message); + return; + } +} diff --git a/src/libotutil/ot-gpg-utils.h b/src/libotutil/ot-gpg-utils.h index 65ae55e4..e8a240b5 100644 --- a/src/libotutil/ot-gpg-utils.h +++ b/src/libotutil/ot-gpg-utils.h @@ -46,4 +46,6 @@ gpgme_data_t ot_gpgme_data_output (GOutputStream *output_stream); gpgme_ctx_t ot_gpgme_new_ctx (const char *homedir, GError **error); +void ot_gpgme_kill_agent (const char *homedir); + G_END_DECLS diff --git a/src/libotutil/ot-tool-util.c b/src/libotutil/ot-tool-util.c index d6f37bc9..35e6a343 100644 --- a/src/libotutil/ot-tool-util.c +++ b/src/libotutil/ot-tool-util.c @@ -62,3 +62,55 @@ ot_parse_keyvalue (const char *keyvalue, *out_value = g_strdup (eq + 1); return TRUE; } + +/** + * Note: temporarily copied from GLib: https://github.com/GNOME/glib/blob/a419146578a42c760cff684292465b38df855f75/glib/garray.c#L1664 + * See documentation at: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-find-with-equal-func + * + * ot_ptr_array_find_with_equal_func: (skip) + * @haystack: pointer array to be searched + * @needle: pointer to look for + * @equal_func: (nullable): the function to call for each element, which should + * return %TRUE when the desired element is found; or %NULL to use pointer + * equality + * @index_: (optional) (out caller-allocates): return location for the index of + * the element, if found + * + * Checks whether @needle exists in @haystack, using the given @equal_func. + * If the element is found, %TRUE is returned and the element’s index is + * returned in @index_ (if non-%NULL). Otherwise, %FALSE is returned and @index_ + * is undefined. If @needle exists multiple times in @haystack, the index of + * the first instance is returned. + * + * @equal_func is called with the element from the array as its first parameter, + * and @needle as its second parameter. If @equal_func is %NULL, pointer + * equality is used. + * + * Returns: %TRUE if @needle is one of the elements of @haystack + * Since: 2.54 + */ +gboolean +ot_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_) +{ + guint i; + + g_return_val_if_fail (haystack != NULL, FALSE); + + if (equal_func == NULL) + equal_func = g_direct_equal; + + for (i = 0; i < haystack->len; i++) + { + if (equal_func (g_ptr_array_index (haystack, i), needle)) + { + if (index_ != NULL) + *index_ = i; + return TRUE; + } + } + + return FALSE; +} diff --git a/src/libotutil/ot-tool-util.h b/src/libotutil/ot-tool-util.h index e3381730..70f7d55d 100644 --- a/src/libotutil/ot-tool-util.h +++ b/src/libotutil/ot-tool-util.h @@ -34,5 +34,10 @@ ot_parse_keyvalue (const char *keyvalue, char **out_key, char **out_value, GError **error); +gboolean +ot_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_); G_END_DECLS diff --git a/src/libotutil/ot-unix-utils.c b/src/libotutil/ot-unix-utils.c index 7778ca11..17016ae1 100644 --- a/src/libotutil/ot-unix-utils.c +++ b/src/libotutil/ot-unix-utils.c @@ -43,6 +43,8 @@ gboolean ot_util_filename_validate (const char *name, GError **error) { + if (name == NULL) + return glnx_throw (error, "Invalid NULL filename"); if (strcmp (name, ".") == 0) return glnx_throw (error, "Invalid self-referential filename '.'"); if (strcmp (name, "..") == 0) diff --git a/src/libotutil/otutil.h b/src/libotutil/otutil.h index eced95f9..cd312365 100644 --- a/src/libotutil/otutil.h +++ b/src/libotutil/otutil.h @@ -60,5 +60,9 @@ #include #include #include -#include #include +#include + +#ifndef OSTREE_DISABLE_GPGME +#include +#endif diff --git a/src/ostree/main.c b/src/ostree/main.c index c5b45012..a523ff9a 100644 --- a/src/ostree/main.c +++ b/src/ostree/main.c @@ -72,9 +72,11 @@ static OstreeCommand commands[] = { { "fsck", OSTREE_BUILTIN_FLAG_NONE, ostree_builtin_fsck, "Check the repository for consistency" }, +#ifndef OSTREE_DISABLE_GPGME { "gpg-sign", OSTREE_BUILTIN_FLAG_NONE, ostree_builtin_gpg_sign, "Sign a commit" }, +#endif /* OSTREE_DISABLE_GPGME */ { "init", OSTREE_BUILTIN_FLAG_NO_CHECK, ostree_builtin_init, "Initialize a new empty repository" }, diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c index 38ec923f..c1c3353d 100644 --- a/src/ostree/ot-admin-builtin-deploy.c +++ b/src/ostree/ot-admin-builtin-deploy.c @@ -29,8 +29,6 @@ #include "ostree.h" #include "otutil.h" -#include "../libostree/ostree-kernel-args.h" - #include static gboolean opt_retain; @@ -133,20 +131,20 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat g_autoptr(OstreeKernelArgs) kargs = NULL; if (opt_kernel_arg_none) { - kargs = _ostree_kernel_args_new (); + kargs = ostree_kernel_args_new (); } else if (opt_kernel_proc_cmdline) { - kargs = _ostree_kernel_args_new (); - if (!_ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error)) + kargs = ostree_kernel_args_new (); + if (!ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error)) return FALSE; } else if (merge_deployment && (opt_kernel_argv || opt_kernel_argv_append)) { OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (merge_deployment); g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1); - kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_append_argv (kargs, previous_args); + kargs = ostree_kernel_args_new (); + ostree_kernel_args_append_argv (kargs, previous_args); } /* Now replace/extend the above set. Note that if no options are specified, @@ -156,19 +154,19 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat if (opt_kernel_argv) { if (!kargs) - kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_replace_argv (kargs, opt_kernel_argv); + kargs = ostree_kernel_args_new (); + ostree_kernel_args_replace_argv (kargs, opt_kernel_argv); } if (opt_kernel_argv_append) { if (!kargs) - kargs = _ostree_kernel_args_new (); - _ostree_kernel_args_append_argv (kargs, opt_kernel_argv_append); + kargs = ostree_kernel_args_new (); + ostree_kernel_args_append_argv (kargs, opt_kernel_argv_append); } g_autoptr(OstreeDeployment) new_deployment = NULL; - g_auto(GStrv) kargs_strv = kargs ? _ostree_kernel_args_to_strv (kargs) : NULL; + g_auto(GStrv) kargs_strv = kargs ? ostree_kernel_args_to_strv (kargs) : NULL; if (opt_stage) { if (opt_retain_pending || opt_retain_rollback) diff --git a/src/ostree/ot-admin-builtin-init-fs.c b/src/ostree/ot-admin-builtin-init-fs.c index cca63a62..cb1e1b69 100644 --- a/src/ostree/ot-admin-builtin-init-fs.c +++ b/src/ostree/ot-admin-builtin-init-fs.c @@ -30,7 +30,10 @@ #include +static gboolean opt_modern; + static GOptionEntry options[] = { + { "modern", 0, 0, G_OPTION_ARG_NONE, &opt_modern, "Only create /boot and /ostree", NULL }, { NULL } }; @@ -58,26 +61,39 @@ ot_admin_builtin_init_fs (int argc, char **argv, OstreeCommandInvocation *invoca if (!glnx_opendirat (AT_FDCWD, sysroot_path, TRUE, &root_dfd, error)) return FALSE; - const char *normal_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"}; - for (guint i = 0; i < G_N_ELEMENTS (normal_toplevels); i++) + /* It's common to want to mount this outside of a deployment as well */ + if (!glnx_shutil_mkdir_p_at (root_dfd, "boot", 0755, cancellable, error)) + return FALSE; + + /* See https://github.com/coreos/coreos-assembler/pull/688 + * For Fedora CoreOS at least, we have this now to the point where we don't + * need this stuff in the physical sysroot. I'm not sure we ever really did, + * but to be conservative, make it opt-in to the new model of just boot/ and ostree/. + */ + if (!opt_modern) { - if (!glnx_shutil_mkdir_p_at (root_dfd, normal_toplevels[i], 0755, - cancellable, error)) + const char *traditional_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"}; + for (guint i = 0; i < G_N_ELEMENTS (traditional_toplevels); i++) + { + if (!glnx_shutil_mkdir_p_at (root_dfd, traditional_toplevels[i], 0755, + cancellable, error)) + return FALSE; + } + + if (!glnx_shutil_mkdir_p_at (root_dfd, "root", 0700, + cancellable, error)) return FALSE; + + if (!glnx_shutil_mkdir_p_at (root_dfd, "tmp", 01777, + cancellable, error)) + return FALSE; + if (fchmodat (root_dfd, "tmp", 01777, 0) == -1) + { + glnx_set_prefix_error_from_errno (error, "chmod: %s", "tmp"); + return FALSE; + } } - if (!glnx_shutil_mkdir_p_at (root_dfd, "root", 0700, - cancellable, error)) - return FALSE; - - if (!glnx_shutil_mkdir_p_at (root_dfd, "tmp", 01777, - cancellable, error)) - return FALSE; - if (fchmodat (root_dfd, "tmp", 01777, 0) == -1) - { - glnx_set_prefix_error_from_errno (error, "chmod: %s", "tmp"); - return FALSE; - } g_autoptr(GFile) dir = g_file_new_for_path (sysroot_path); g_autoptr(OstreeSysroot) sysroot = ostree_sysroot_new (dir); if (!ostree_sysroot_ensure_initialized (sysroot, cancellable, error)) diff --git a/src/ostree/ot-admin-builtin-pin.c b/src/ostree/ot-admin-builtin-pin.c index f110983b..ced0fcf3 100644 --- a/src/ostree/ot-admin-builtin-pin.c +++ b/src/ostree/ot-admin-builtin-pin.c @@ -52,24 +52,39 @@ ot_admin_builtin_pin (int argc, char **argv, OstreeCommandInvocation *invocation return FALSE; } - const char *deploy_index_str = argv[1]; - const int deploy_index = atoi (deploy_index_str); - - g_autoptr(OstreeDeployment) target_deployment = ot_admin_get_indexed_deployment (sysroot, deploy_index, error); - if (!target_deployment) - return FALSE; - - - gboolean current_pin = ostree_deployment_is_pinned (target_deployment); - const gboolean desired_pin = !opt_unpin; - if (current_pin == desired_pin) - g_print ("Deployment is already %s\n", current_pin ? "pinned" : "unpinned"); - else + unsigned int nsuccess = 0; + for (unsigned int i = 1; i < argc; i++) { - if (!ostree_sysroot_deployment_set_pinned (sysroot, target_deployment, desired_pin, error)) - return FALSE; - g_print ("Deployment is now %s\n", desired_pin ? "pinned" : "unpinned"); + const char *deploy_index_str = argv[i]; + const int deploy_index = atoi (deploy_index_str); + + g_autoptr(GError) e = NULL; + g_autoptr(OstreeDeployment) target_deployment = ot_admin_get_indexed_deployment (sysroot, deploy_index, &e); + if (!target_deployment) + { + g_print ("Invalid deployment %s: %s\n", deploy_index_str, e->message); + continue; + } + + gboolean current_pin = ostree_deployment_is_pinned (target_deployment); + const gboolean desired_pin = !opt_unpin; + if (current_pin == desired_pin) + { + g_print ("Deployment %s is already %s\n", deploy_index_str, current_pin ? "pinned" : "unpinned"); + nsuccess++; + } + else + { + g_autoptr(GError) e = NULL; + if (ostree_sysroot_deployment_set_pinned (sysroot, target_deployment, desired_pin, &e)) + { + g_print ("Deployment %s is now %s\n", deploy_index_str, desired_pin ? "pinned" : "unpinned"); + nsuccess++; + } + else + g_print ("Failed to %s deployment %s: %s\n", desired_pin ? "pin" : "unpin", deploy_index_str, e->message); + } } - return TRUE; + return nsuccess > 0; } diff --git a/src/ostree/ot-admin-builtin-set-origin.c b/src/ostree/ot-admin-builtin-set-origin.c index 07453a87..9d96512e 100644 --- a/src/ostree/ot-admin-builtin-set-origin.c +++ b/src/ostree/ot-admin-builtin-set-origin.c @@ -25,7 +25,6 @@ #include "ot-admin-builtins.h" #include "ot-admin-functions.h" #include "ostree.h" -#include "ot-tool-util.h" #include "otutil.h" #include diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c index e625a927..c6c52382 100644 --- a/src/ostree/ot-admin-builtin-status.c +++ b/src/ostree/ot-admin-builtin-status.c @@ -35,6 +35,7 @@ static GOptionEntry options[] = { { NULL } }; +#ifndef OSTREE_DISABLE_GPGME static gboolean deployment_get_gpg_verify (OstreeDeployment *deployment, OstreeRepo *repo) @@ -61,6 +62,7 @@ deployment_get_gpg_verify (OstreeDeployment *deployment, return gpg_verify; } +#endif /* OSTREE_DISABLE_GPGME */ static gboolean @@ -136,6 +138,7 @@ deployment_print_status (OstreeSysroot *sysroot, g_print (" `- %s\n", source_title); } +#ifndef OSTREE_DISABLE_GPGME if (deployment_get_gpg_verify (deployment, repo)) { g_autoptr(GString) output_buffer = g_string_sized_new (256); @@ -168,6 +171,7 @@ deployment_print_status (OstreeSysroot *sysroot, g_print ("%s", output_buffer->str); } +#endif /* OSTREE_DISABLE_GPGME */ return TRUE; } diff --git a/src/ostree/ot-admin-builtin-unlock.c b/src/ostree/ot-admin-builtin-unlock.c index f0efa44a..cd466183 100644 --- a/src/ostree/ot-admin-builtin-unlock.c +++ b/src/ostree/ot-admin-builtin-unlock.c @@ -27,8 +27,6 @@ #include "ostree.h" #include "otutil.h" -#include "../libostree/ostree-kernel-args.h" - #include #include diff --git a/src/ostree/ot-admin-instutil-builtin-set-kargs.c b/src/ostree/ot-admin-instutil-builtin-set-kargs.c index 666e5369..fb5c7d2d 100644 --- a/src/ostree/ot-admin-instutil-builtin-set-kargs.c +++ b/src/ostree/ot-admin-instutil-builtin-set-kargs.c @@ -26,8 +26,7 @@ #include "ot-admin-instutil-builtins.h" #include "otutil.h" - -#include "../libostree/ostree-kernel-args.h" +#include "ostree.h" static gboolean opt_proc_cmdline; static gboolean opt_merge; @@ -69,14 +68,14 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat } first_deployment = deployments->pdata[0]; - kargs = _ostree_kernel_args_new (); + kargs = ostree_kernel_args_new (); /* If they want the current kernel's args, they very likely don't * want the ones from the merge. */ if (opt_proc_cmdline) { - if (!_ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error)) + if (!ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error)) goto out; } else if (opt_merge) @@ -84,24 +83,24 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (first_deployment); g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1); - _ostree_kernel_args_append_argv (kargs, previous_args); + ostree_kernel_args_append_argv (kargs, previous_args); } if (opt_replace) { - _ostree_kernel_args_replace_argv (kargs, opt_replace); + ostree_kernel_args_replace_argv (kargs, opt_replace); } if (opt_append) { - _ostree_kernel_args_append_argv (kargs, opt_append); + ostree_kernel_args_append_argv (kargs, opt_append); } for (i = 1; i < argc; i++) - _ostree_kernel_args_append (kargs, argv[i]); + ostree_kernel_args_append (kargs, argv[i]); { - g_auto(GStrv) kargs_strv = _ostree_kernel_args_to_strv (kargs); + g_auto(GStrv) kargs_strv = ostree_kernel_args_to_strv (kargs); if (!ostree_sysroot_deployment_set_kargs (sysroot, first_deployment, kargs_strv, diff --git a/src/ostree/ot-builtin-checkout.c b/src/ostree/ot-builtin-checkout.c index 1519e34e..a0fe4be4 100644 --- a/src/ostree/ot-builtin-checkout.c +++ b/src/ostree/ot-builtin-checkout.c @@ -30,7 +30,6 @@ #include "ot-builtins.h" #include "ostree.h" #include "otutil.h" -#include "ot-tool-util.h" static gboolean opt_user_mode; static gboolean opt_allow_noent; diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c index b7c61a9e..43eb18b3 100644 --- a/src/ostree/ot-builtin-commit.c +++ b/src/ostree/ot-builtin-commit.c @@ -28,7 +28,6 @@ #include "ot-editor.h" #include "ostree.h" #include "otutil.h" -#include "ot-tool-util.h" #include "parse-datetime.h" #include "ostree-repo-private.h" #include "ostree-libarchive-private.h" @@ -61,8 +60,10 @@ static char **opt_trees; static gint opt_owner_uid = -1; static gint opt_owner_gid = -1; static gboolean opt_table_output; +#ifndef OSTREE_DISABLE_GPGME static char **opt_key_ids; static char *opt_gpg_homedir; +#endif static gboolean opt_generate_sizes; static gboolean opt_disable_fsync; static char *opt_timestamp; @@ -115,8 +116,10 @@ static GOptionEntry options[] = { { "skip-list", 0, 0, G_OPTION_ARG_FILENAME, &opt_skiplist_file, "File containing list of files to skip", "PATH" }, { "consume", 0, 0, G_OPTION_ARG_NONE, &opt_consume, "Consume (delete) content after commit (for local directories)", NULL }, { "table-output", 0, 0, G_OPTION_ARG_NONE, &opt_table_output, "Output more information in a KEY: VALUE format", NULL }, +#ifndef OSTREE_DISABLE_GPGME { "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_FILENAME, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, +#endif { "generate-sizes", 0, 0, G_OPTION_ARG_NONE, &opt_generate_sizes, "Generate size information along with commit metadata", NULL }, { "disable-fsync", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL }, { "fsync", 0, 0, G_OPTION_ARG_CALLBACK, parse_fsync_cb, "Specify how to invoke fsync()", "POLICY" }, @@ -636,11 +639,22 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio { if (!opt_tar_pathname_filter) { - object_to_commit = g_file_new_for_path (tree); - if (!ostree_repo_write_archive_to_mtree (repo, object_to_commit, mtree, modifier, - opt_tar_autocreate_parents, - cancellable, error)) - goto out; + if (strcmp (tree, "-") == 0) + { + if (!ostree_repo_write_archive_to_mtree_from_fd (repo, STDIN_FILENO, mtree, modifier, + opt_tar_autocreate_parents, + cancellable, error)) + goto out; + } + else + { + object_to_commit = g_file_new_for_path (tree); + + if (!ostree_repo_write_archive_to_mtree (repo, object_to_commit, mtree, modifier, + opt_tar_autocreate_parents, + cancellable, error)) + goto out; + } } else { @@ -666,7 +680,13 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio goto out; } opts.translate_pathname_user_data = &tpdata; - g_autoptr(OtAutoArchiveRead) archive = ot_open_archive_read (tree, error); + + g_autoptr(OtAutoArchiveRead) archive; + if (strcmp (tree, "-") == 0) + archive = ot_open_archive_read_fd (STDIN_FILENO, error); + else + archive = ot_open_archive_read (tree, error); + if (!archive) goto out; if (!ostree_repo_import_archive_to_mtree (repo, &opts, archive, mtree, @@ -797,6 +817,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio goto out; } +#ifndef OSTREE_DISABLE_GPGME if (opt_key_ids) { char **iter; @@ -814,6 +835,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio goto out; } } +#endif if (opt_branch) ostree_repo_transaction_set_ref (repo, NULL, opt_branch, commit_checksum); diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index c68cbc46..1fae0a38 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -77,6 +77,7 @@ static GOptionEntry options[] = { { NULL } }; +#ifndef OSTREE_DISABLE_GPGME static void gpg_verify_result_cb (OstreeRepo *repo, const char *checksum, @@ -93,6 +94,7 @@ gpg_verify_result_cb (OstreeRepo *repo, glnx_console_lock (console); } +#endif /* OSTREE_DISABLE_GPGME */ static gboolean printed_console_progress; @@ -360,9 +362,11 @@ ostree_builtin_pull (int argc, char **argv, OstreeCommandInvocation *invocation, if (console.is_tty) { +#ifndef OSTREE_DISABLE_GPGME signal_handler_id = g_signal_connect (repo, "gpg-verify-result", G_CALLBACK (gpg_verify_result_cb), &console); +#endif /* OSTREE_DISABLE_GPGME */ } options = g_variant_ref_sink (g_variant_builder_end (&builder)); diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c index 630605a0..1e0b1011 100644 --- a/src/ostree/ot-builtin-refs.c +++ b/src/ostree/ot-builtin-refs.c @@ -32,6 +32,7 @@ static gboolean opt_list; static gboolean opt_alias; static char *opt_create; static gboolean opt_collections; +static gboolean opt_force; /* ATTENTION: * Please remember to update the bash-completion script (bash/ostree) and @@ -44,6 +45,7 @@ static GOptionEntry options[] = { { "alias", 'A', 0, G_OPTION_ARG_NONE, &opt_alias, "If used with --create, create an alias, otherwise just list aliases", NULL }, { "create", 0, 0, G_OPTION_ARG_STRING, &opt_create, "Create a new ref for an existing commit", "NEWREF" }, { "collections", 'c', 0, G_OPTION_ARG_NONE, &opt_collections, "Enable listing collection IDs for refs", NULL }, + { "force", 0, 0, G_OPTION_ARG_NONE, &opt_force, "Overwrite existing refs when creating", NULL }, { NULL } }; @@ -89,7 +91,7 @@ do_ref_with_collections (OstreeRepo *repo, else goto out; } - if (checksum_existing != NULL) + if (!opt_force && checksum_existing != NULL) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "--create specified but ref %s already exists", opt_create); @@ -205,9 +207,11 @@ static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellab else goto out; } - /* We want to allow replacing an existing alias */ + /* We want to allow replacing an existing alias or a normal ref when + * forced + */ gboolean replacing_alias = opt_alias && g_hash_table_contains (ref_aliases, opt_create); - if (!replacing_alias && checksum_existing != NULL) + if (!replacing_alias && !opt_force && checksum_existing != NULL) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "--create specified but ref %s already exists", opt_create); diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c index 0712d5bf..6b3f6a26 100644 --- a/src/ostree/ot-builtin-remote.c +++ b/src/ostree/ot-builtin-remote.c @@ -40,9 +40,11 @@ static OstreeCommand remote_subcommands[] = { { "list", OSTREE_BUILTIN_FLAG_NONE, ot_remote_builtin_list, "List remote repository names" }, +#ifndef OSTREE_DISABLE_GPGME { "gpg-import", OSTREE_BUILTIN_FLAG_NONE, ot_remote_builtin_gpg_import, "Import GPG keys" }, +#endif /* OSTREE_DISABLE_GPGME */ #ifdef HAVE_LIBCURL_OR_LIBSOUP { "add-cookie", OSTREE_BUILTIN_FLAG_NONE, ot_remote_builtin_add_cookie, diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c index aca2cddd..5091a93c 100644 --- a/src/ostree/ot-builtin-show.c +++ b/src/ostree/ot-builtin-show.c @@ -164,6 +164,7 @@ print_object (OstreeRepo *repo, flags |= OSTREE_DUMP_UNSWAPPED; ot_dump_object (objtype, checksum, variant, flags); +#ifndef OSTREE_DISABLE_GPGME if (objtype == OSTREE_OBJECT_TYPE_COMMIT) { g_autoptr(OstreeGpgVerifyResult) result = NULL; @@ -207,6 +208,7 @@ print_object (OstreeRepo *repo, g_print ("%s", buffer->str); } } +#endif /* OSTREE_DISABLE_GPGME */ return TRUE; } diff --git a/src/ostree/ot-builtin-summary.c b/src/ostree/ot-builtin-summary.c index c95c6df0..0f70f071 100644 --- a/src/ostree/ot-builtin-summary.c +++ b/src/ostree/ot-builtin-summary.c @@ -193,6 +193,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati if (!ostree_repo_regenerate_summary (repo, additional_metadata, cancellable, error)) return FALSE; +#ifndef OSTREE_DISABLE_GPGME if (opt_key_ids) { if (!ostree_repo_add_gpg_signature_summary (repo, @@ -202,6 +203,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati error)) return FALSE; } +#endif } else if (opt_view || opt_raw) { diff --git a/src/ostree/ot-builtins.h b/src/ostree/ot-builtins.h index 7a7d41bc..12a99b45 100644 --- a/src/ostree/ot-builtins.h +++ b/src/ostree/ot-builtins.h @@ -41,7 +41,9 @@ BUILTINPROTO(diff); BUILTINPROTO(export); BUILTINPROTO(find_remotes); BUILTINPROTO(create_usb); +#ifndef OSTREE_DISABLE_GPGME BUILTINPROTO(gpg_sign); +#endif BUILTINPROTO(init); BUILTINPROTO(log); BUILTINPROTO(pull); diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index a1449aef..4b72f399 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -152,11 +152,6 @@ ostree_run (int argc, } } - else if (g_str_equal (argv[in], "--")) - { - break; - } - argv[out] = argv[in]; } @@ -348,6 +343,22 @@ ostree_option_context_parse (GOptionContext *context, if (!g_option_context_parse (context, argc, argv, error)) return FALSE; + /* Filter out the first -- we see; g_option_context_parse() leaves it in */ + int in, out; + gboolean removed_double_dashes = FALSE; + for (in = 1, out = 1; in < *argc; in++, out++) + { + if (g_str_equal ((*argv)[in], "--") && !removed_double_dashes) + { + removed_double_dashes = TRUE; + out--; + continue; + } + + (*argv)[out] = (*argv)[in]; + } + *argc = out; + if (opt_version) { /* This should now be YAML, like `docker version`, so it's both nice to read @@ -491,6 +502,7 @@ ostree_ensure_repo_writable (OstreeRepo *repo, return TRUE; } +#ifndef OSTREE_DISABLE_GPGME void ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result) { @@ -511,6 +523,7 @@ ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result) g_print ("%s", buffer->str); } +#endif /* OSTREE_DISABLE_GPGME */ gboolean ot_enable_tombstone_commits (OstreeRepo *repo, GError **error) diff --git a/src/ostree/ot-remote-builtin-add.c b/src/ostree/ot-remote-builtin-add.c index f81f7580..cea0b274 100644 --- a/src/ostree/ot-remote-builtin-add.c +++ b/src/ostree/ot-remote-builtin-add.c @@ -22,7 +22,6 @@ #include "config.h" #include "otutil.h" -#include "ot-tool-util.h" #include "ot-main.h" #include "ot-remote-builtins.h" @@ -134,10 +133,12 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio subkey, g_variant_new_variant (g_variant_new_string (subvalue))); } +#ifndef OSTREE_DISABLE_GPGME if (opt_no_gpg_verify) g_variant_builder_add (optbuilder, "{s@v}", "gpg-verify", g_variant_new_variant (g_variant_new_boolean (FALSE))); +#endif /* OSTREE_DISABLE_GPGME */ if (opt_collection_id != NULL) g_variant_builder_add (optbuilder, "{s@v}", "collection-id", @@ -158,6 +159,7 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio cancellable, error)) goto out; +#ifndef OSTREE_DISABLE_GPGME /* This is just a convenience option and is not as flexible as the full * "ostree remote gpg-import" command. It imports all keys from a file, * which is likely the most common case. @@ -184,6 +186,7 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio g_print ("Imported %u GPG key%s to remote \"%s\"\n", imported, (imported == 1) ? "" : "s", remote_name); } +#endif /* OSTREE_DISABLE_GPGME */ ret = TRUE; out: diff --git a/src/ostree/ot-remote-builtin-summary.c b/src/ostree/ot-remote-builtin-summary.c index bf50b9bc..bd4d026d 100644 --- a/src/ostree/ot-remote-builtin-summary.c +++ b/src/ostree/ot-remote-builtin-summary.c @@ -51,7 +51,9 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc g_autoptr(GBytes) summary_bytes = NULL; g_autoptr(GBytes) signature_bytes = NULL; OstreeDumpFlags flags = OSTREE_DUMP_NONE; +#ifndef OSTREE_DISABLE_GPGME gboolean gpg_verify_summary; +#endif gboolean ret = FALSE; context = g_option_context_new ("NAME"); @@ -92,6 +94,7 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc ot_dump_summary_bytes (summary_bytes, flags); +#ifndef OSTREE_DISABLE_GPGME if (!ostree_repo_remote_get_gpg_verify_summary (repo, remote_name, &gpg_verify_summary, error)) @@ -124,6 +127,7 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc g_print ("\n"); ostree_print_gpg_verify_result (result); } +#endif /* OSTREE_DISABLE_GPGME */ ret = TRUE; out: diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c index 15d49963..3d6e7833 100644 --- a/src/switchroot/ostree-prepare-root.c +++ b/src/switchroot/ostree-prepare-root.c @@ -182,7 +182,7 @@ main(int argc, char *argv[]) mount_var = true; /* Link to the deployment's /var */ - if (mount_var && mount ("../../var", "var", NULL, MS_MGC_VAL|MS_BIND, NULL) < 0) + if (mount_var && mount ("../../var", "var", NULL, MS_BIND, NULL) < 0) err (EXIT_FAILURE, "failed to bind mount ../../var to var"); char srcpath[PATH_MAX]; diff --git a/tests/admin-test.sh b/tests/admin-test.sh index 31e969c2..0defebc0 100644 --- a/tests/admin-test.sh +++ b/tests/admin-test.sh @@ -21,7 +21,15 @@ set -euo pipefail -echo "1..$((26 + ${extra_admin_tests:-0}))" +echo "1..$((27 + ${extra_admin_tests:-0}))" + +mkdir sysrootmin +${CMD_PREFIX} ostree admin init-fs --modern sysrootmin +assert_has_dir sysrootmin/boot +assert_has_dir sysrootmin/ostree/repo +assert_not_has_dir sysrootmin/home +rm sysrootmin -rf +echo "ok init-fs --modern" function validate_bootloader() { cd ${test_tmpdir}; @@ -48,7 +56,7 @@ orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) export rev -# This initial deployment gets kicked off with some kernel arguments +# This initial deployment gets kicked off with some kernel arguments ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) assert_not_streq "${orig_mtime}" "${new_mtime}" diff --git a/tests/libtest.sh b/tests/libtest.sh index e0022512..8832e63c 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -34,13 +34,24 @@ else fi . ${test_srcdir}/libtest-core.sh +# Array of expressions to execute when exiting. Each expression should +# be a single string (quoting if necessary) that will be eval'd. To add +# a command to run on exit, append to the libtest_exit_cmds array like +# libtest_exit_cmds+=(expr). +libtest_exit_cmds=() +run_exit_cmds() { + for expr in "${libtest_exit_cmds[@]}"; do + eval "${expr}" || true + done +} +trap run_exit_cmds EXIT + save_core() { if [ -e core ]; then cp core "$test_srcdir/core" fi } - -trap save_core EXIT; +libtest_exit_cmds+=(save_core) test_tmpdir=$(pwd) @@ -594,15 +605,58 @@ skip_without_experimental () { } has_gpgme () { + local ret ${CMD_PREFIX} ostree --version > version.txt - assert_file_has_content version.txt '- gpgme' + grep -q -e '- gpgme' version.txt + ret=$? rm -f version.txt - true + return ${ret} +} + +skip_without_gpgme() { + if ! has_gpgme; then + skip "no gpg support compiled in" + fi +} + +# Find an appropriate gpg program to use. We want one that has the +# --generate-key, --quick-set-expire and --quick-add-key options. The +# gpg program to use is returend. +which_gpg () { + local gpg + local gpg_options + local needed_options=( + --generate-key + --quick-set-expire + --quick-add-key + ) + local opt + + # Prefer gpg2 in case gpg refers to gpg1 + if which gpg2 &>/dev/null; then + gpg=gpg2 + elif which gpg &>/dev/null; then + gpg=gpg + else + # Succeed but don't return anything. + return 0 + fi + + # Make sure all the needed options are available + gpg_options=$(${gpg} --dump-options) || return 0 + for opt in ${needed_options[*]}; do + grep -q -x -e "${opt}" <<< "${gpg_options}" || return 0 + done + + # Found an appropriate gpg + echo ${gpg} } libtest_cleanup_gpg () { - gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true + local gpg_homedir=${1:-${test_tmpdir}/gpghome} + gpg-connect-agent --homedir "${gpg_homedir}" killagent /bye || true } +libtest_exit_cmds+=(libtest_cleanup_gpg) is_bare_user_only_repo () { grep -q 'mode=bare-user-only' $1/config diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 9d51b151..0a97a119 100644 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -54,7 +54,12 @@ function verify_initial_contents() { assert_file_has_content baz/cow '^moo$' } -echo "1..34" +if has_gpgme; then + echo "1..34" +else + # 3 tests needs GPG support + echo "1..31" +fi # Try both syntaxes repo_init --no-gpg-verify @@ -334,6 +339,12 @@ if ${CMD_PREFIX} ostree --repo=repo pull -T origin main 2>err.txt; then fi assert_file_has_content err.txt "Upgrade.*is chronologically older" assert_streq ${newrev} "$(${CMD_PREFIX} ostree --repo=repo rev-parse main)" +# And also check we can't pull it when using overrides +if ${CMD_PREFIX} ostree --repo=repo pull -T origin main@${newrev2} 2>err.txt; then + fatal "pulled older commit override with timestamp checking enabled?" +fi +assert_file_has_content err.txt "Upgrade.*is chronologically older" +assert_streq ${newrev} "$(${CMD_PREFIX} ostree --repo=repo rev-parse main)" # But we can pull it without timestamp checking ${CMD_PREFIX} ostree --repo=repo pull origin main echo "ok pull timestamp checking" @@ -537,13 +548,15 @@ fi assert_file_has_content err.txt "404" echo "ok pull repo 404" -cd ${test_tmpdir} -repo_init --set=gpg-verify=true -if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin main 2>err.txt; then - assert_not_reached "pull repo 404 succeeded?" +if has_gpgme; then + cd ${test_tmpdir} + repo_init --set=gpg-verify=true + if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin main 2>err.txt; then + assert_not_reached "pull repo 404 succeeded?" + fi + assert_file_has_content err.txt "GPG verification enabled, but no signatures found" + echo "ok pull repo 404 (gpg)" fi -assert_file_has_content err.txt "GPG verification enabled, but no signatures found" -echo "ok pull repo 404 (gpg)" cd ${test_tmpdir} find ostree-srv/gnomerepo/objects -name '*.dirtree' | while read f; do mv ${f}{,.orig}; done @@ -555,29 +568,31 @@ assert_file_has_content err.txt "404" find ostree-srv/gnomerepo/objects -name '*.dirtree.orig' | while read f; do mv ${f} $(dirname $f)/$(basename ${f} .orig); done echo "ok pull repo 404 on dirtree object" -cd ${test_tmpdir} -repo_init --set=gpg-verify=true -${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo commit ${COMMIT_ARGS} \ - --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} -b main \ - -s "A signed commit" --tree=ref=main -${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo summary -u -# make sure gpg verification is correctly on -csum=$(${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo rev-parse main) -objpath=objects/${csum::2}/${csum:2}.commitmeta -remotesig=ostree-srv/gnomerepo/$objpath -localsig=repo/$objpath -mv $remotesig $remotesig.bak -if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin main; then - assert_not_reached "pull with gpg-verify unexpectedly succeeded?" +if has_gpgme; then + cd ${test_tmpdir} + repo_init --set=gpg-verify=true + ${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo commit ${COMMIT_ARGS} \ + --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} -b main \ + -s "A signed commit" --tree=ref=main + ${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo summary -u + # make sure gpg verification is correctly on + csum=$(${CMD_PREFIX} ostree --repo=ostree-srv/gnomerepo rev-parse main) + objpath=objects/${csum::2}/${csum:2}.commitmeta + remotesig=ostree-srv/gnomerepo/$objpath + localsig=repo/$objpath + mv $remotesig $remotesig.bak + if ${CMD_PREFIX} ostree --repo=repo --depth=0 pull origin main; then + assert_not_reached "pull with gpg-verify unexpectedly succeeded?" + fi + # ok now check that we can pull correctly + mv $remotesig.bak $remotesig + ${CMD_PREFIX} ostree --repo=repo pull origin main + echo "ok pull signed commit" + rm $localsig + ${CMD_PREFIX} ostree --repo=repo pull origin main + test -f $localsig + echo "ok re-pull signature for stored commit" fi -# ok now check that we can pull correctly -mv $remotesig.bak $remotesig -${CMD_PREFIX} ostree --repo=repo pull origin main -echo "ok pull signed commit" -rm $localsig -${CMD_PREFIX} ostree --repo=repo pull origin main -test -f $localsig -echo "ok re-pull signature for stored commit" cd ${test_tmpdir} repo_init --no-gpg-verify diff --git a/tests/test-admin-deploy-2.sh b/tests/test-admin-deploy-2.sh index 3e68ecf3..0fa2df9b 100755 --- a/tests/test-admin-deploy-2.sh +++ b/tests/test-admin-deploy-2.sh @@ -102,8 +102,7 @@ ${CMD_PREFIX} ostree admin pin -u 0 assert_n_pinned 0 echo "ok pin unpin" -${CMD_PREFIX} ostree admin pin 0 -${CMD_PREFIX} ostree admin pin 1 +${CMD_PREFIX} ostree admin pin 0 1 assert_n_pinned 2 assert_n_deployments 2 os_repository_new_commit diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh index d789d2fb..e9e7a6da 100755 --- a/tests/test-commit-sign.sh +++ b/tests/test-commit-sign.sh @@ -140,4 +140,3 @@ assert_not_file_has_content show.txt 'Found.*signature' echo "ok pull sig deleted" rm -rf repo gnomerepo-files -libtest_cleanup_gpg diff --git a/tests/test-config.sh b/tests/test-config.sh index 7e913d32..2f44c30b 100755 --- a/tests/test-config.sh +++ b/tests/test-config.sh @@ -66,9 +66,11 @@ fi assert_file_has_content err.txt "error: Too many arguments given" echo "ok config set" -# Check that "ostree config unset" works +# Check that using `--` works and that "ostree config unset" works ${CMD_PREFIX} ostree config --repo=repo set core.lock-timeout-secs 60 assert_file_has_content repo/config "lock-timeout-secs=60" +${CMD_PREFIX} ostree config --repo=repo -- set core.lock-timeout-secs -1 +assert_file_has_content repo/config "lock-timeout-secs=-1" ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs assert_not_file_has_content repo/config "lock-timeout-secs=" diff --git a/tests/test-create-usb.sh b/tests/test-create-usb.sh index 8040ed9c..8187ea75 100755 --- a/tests/test-create-usb.sh +++ b/tests/test-create-usb.sh @@ -26,6 +26,8 @@ set -euo pipefail . $(dirname $0)/libtest.sh +skip_without_gpgme + echo "1..5" cd ${test_tmpdir} diff --git a/tests/test-find-remotes.sh b/tests/test-find-remotes.sh index 226053ce..5dd880f0 100755 --- a/tests/test-find-remotes.sh +++ b/tests/test-find-remotes.sh @@ -23,6 +23,8 @@ set -euo pipefail . $(dirname $0)/libtest.sh +skip_without_gpgme + echo '1..1' # Create two upstream collection repositories with some example commits diff --git a/tests/test-gpg-signed-commit.sh b/tests/test-gpg-signed-commit.sh index 992a2ba1..090b4bfe 100755 --- a/tests/test-gpg-signed-commit.sh +++ b/tests/test-gpg-signed-commit.sh @@ -29,7 +29,16 @@ if ! has_gpgme; then exit 0 fi -echo "1..1" +num_tests=1 + +# Run some more tests if an appropriate GPG is available +num_gpg_tests=8 +GPG=$(which_gpg) +if [ -n "${GPG}" ]; then + let num_tests+=num_gpg_tests +fi + +echo "1..${num_tests}" setup_test_repository "archive" @@ -80,6 +89,241 @@ if ${OSTREE} show test2 | grep -o 'Found [[:digit:]] signature'; then assert_not_reached fi -libtest_cleanup_gpg - echo "ok" + +# Remaining tests require gpg +if [ -z "${GPG}" ]; then + exit 0 +fi + +# Although we have the gpg --set-expire option, we want to use it to set +# the expiration date for subkeys below. That was only added in gnupg +# 2.1.22. Check if SUBKEY-FPRS is in the usage output. +# (https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=NEWS;hb=HEAD) +if (${GPG} --quick-set-expire 2>&1 || :) | grep -q SUBKEY-FPRS; then + GPG_CAN_EXPIRE_SUBKEYS=true +else + GPG_CAN_EXPIRE_SUBKEYS=false +fi + +# Create a temporary GPG homedir +tmpgpg_home=${test_tmpdir}/tmpgpghome +mkdir -m700 ${tmpgpg_home} + +# Wire up an exit hook to kill the gpg-agent in it +cleanup_tmpgpg_home() { + libtest_cleanup_gpg ${tmpgpg_home} +} +libtest_exit_cmds+=(cleanup_tmpgpg_home) + +# Create an temporary trusted GPG directory +tmpgpg_trusted=${test_tmpdir}/tmpgpgtrusted +tmpgpg_trusted_keyring=${tmpgpg_trusted}/keyring.gpg +export OSTREE_GPG_HOME=${tmpgpg_trusted} +mkdir -p ${tmpgpg_trusted} + +# Create one normal signing key and one signing key with a subkey. See +# https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html. +${GPG} --homedir=${tmpgpg_home} --batch --generate-key <<"EOF" +Key-Type: RSA +Key-Length: 2048 +Key-Usage: sign +Name-Real: Test Key 1 +Expire-Date: 0 +%no-protection +%transient-key +%commit +Key-Type: RSA +Key-Length: 2048 +Key-Usage: sign +Subkey-Type: RSA +Subkey-Length: 2048 +Subkey-Usage: sign +Name-Real: Test Key 2 +Expire-Date: 0 +%no-protection +%transient-key +%commit +EOF + +# Figure out the key IDs and fingerprints. Assume that the order of the +# keys matches those specified in the generation. +# +# https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS +key1_id= +key1_fpr= +key2_id= +key2_fpr= +key2_sub_id= +key2_sub_fpr= +gpg_seckey_listing=$(${GPG} --homedir=${tmpgpg_home} --list-secret-keys --with-colons) +while IFS=: read -a fields; do + if [ "${fields[0]}" = sec ]; then + # Secret key - key ID is in field 5 + if [ -z "${key1_id}" ]; then + key1_id=${fields[4]} + else + key2_id=${fields[4]} + fi + elif [ "${fields[0]}" = ssb ]; then + # Secret subkey - key ID is in field 5 + key2_sub_id=${fields[4]} + elif [ "${fields[0]}" = fpr ]; then + # Fingerprint record - the fingerprint ID is in field 10 + if [ -z "${key1_fpr}" ]; then + key1_fpr=${fields[9]} + elif [ -z "${key2_fpr}" ]; then + key2_fpr=${fields[9]} + else + key2_sub_fpr=${fields[9]} + fi + fi +done <<< "${gpg_seckey_listing}" + +# Create a commit and sign it with both key1 and key2_sub +${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" \ + --tree=dir=files --gpg-homedir=${tmpgpg_home} \ + --gpg-sign=${key1_id} --gpg-sign=${key2_sub_id} +${OSTREE} show test2 > test2-show +assert_file_has_content test2-show '^Found 2 signatures' +assert_file_has_content test2-show 'public key not found' +assert_file_has_content test2-show "${key1_id}" +assert_file_has_content test2-show "${key2_sub_id}" + +echo "ok signed with both generated keys" + +# Export the public keys and check again +${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} +${OSTREE} show test2 > test2-show +assert_file_has_content test2-show '^Found 2 signatures' +assert_not_file_has_content test2-show 'public key not found' +assert_file_has_content test2-show "${key1_id}" +assert_file_has_content test2-show "${key2_sub_id}" +assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' +assert_file_has_content test2-show 'Good signature from "Test Key 2 <>"' +assert_file_has_content test2-show "Primary key ID ${key2_id}" + +echo "ok verified both generated keys" + +# Make key1 expired, wait until it's expired, export the public keys and check +# again +${GPG} --homedir=${tmpgpg_home} --quick-set-expire ${key1_fpr} seconds=1 +sleep 2 +${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} +${OSTREE} show test2 > test2-show +assert_file_has_content test2-show '^Found 2 signatures' +assert_not_file_has_content test2-show 'public key not found' +assert_file_has_content test2-show "${key1_id}" +assert_file_has_content test2-show "${key2_sub_id}" +assert_file_has_content test2-show 'BAD signature from "Test Key 1 <>"' +assert_file_has_content test2-show 'Key expired' +assert_file_has_content test2-show 'Good signature from "Test Key 2 <>"' +assert_file_has_content test2-show "Primary key ID ${key2_id}" + +echo "ok verified with key1 expired" + +# Unexpire key1, expire key2 primary, wait until it's expired, export the +# public keys and check again +${GPG} --homedir=${tmpgpg_home} --quick-set-expire ${key1_fpr} seconds=0 +${GPG} --homedir=${tmpgpg_home} --quick-set-expire ${key2_fpr} seconds=1 +sleep 2 +${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} +${OSTREE} show test2 > test2-show +assert_file_has_content test2-show '^Found 2 signatures' +assert_not_file_has_content test2-show 'public key not found' +assert_file_has_content test2-show "${key1_id}" +assert_file_has_content test2-show "${key2_sub_id}" +assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' +assert_file_has_content test2-show 'BAD signature from "Test Key 2 <>"' +assert_not_file_has_content test2-show 'Key expired' +assert_file_has_content test2-show "Primary key ID ${key2_id}" +assert_file_has_content test2-show 'Primary key expired' + +echo "ok verified with key2 primary expired" + +# If subkey expiration is available, expire key2 subkey, wait until it's +# expired, export the public keys and check again +if ${GPG_CAN_EXPIRE_SUBKEYS}; then + ${GPG} --homedir=${tmpgpg_home} --quick-set-expire ${key2_fpr} seconds=1 ${key2_sub_fpr} + sleep 2 + ${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} + ${OSTREE} show test2 > test2-show + assert_file_has_content test2-show '^Found 2 signatures' + assert_not_file_has_content test2-show 'public key not found' + assert_file_has_content test2-show "${key1_id}" + assert_file_has_content test2-show "${key2_sub_id}" + assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' + assert_file_has_content test2-show 'BAD signature from "Test Key 2 <>"' + assert_file_has_content test2-show 'Key expired' + assert_file_has_content test2-show "Primary key ID ${key2_id}" + assert_file_has_content test2-show 'Primary key expired' + + echo "ok verified with key2 primary and subkey expired" +else + echo "ok # SKIP gpg --quick-set-expire does not support expiring subkeys" +fi + +# Unexpire key2 primary and export the public keys +${GPG} --homedir=${tmpgpg_home} --quick-set-expire ${key2_fpr} seconds=0 +${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} + +# This test expects the subkey to be expired, so skip it if that didn't happen +if ${GPG_CAN_EXPIRE_SUBKEYS}; then + ${OSTREE} show test2 > test2-show + assert_file_has_content test2-show '^Found 2 signatures' + assert_not_file_has_content test2-show 'public key not found' + assert_file_has_content test2-show "${key1_id}" + assert_file_has_content test2-show "${key2_sub_id}" + assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' + assert_file_has_content test2-show 'BAD signature from "Test Key 2 <>"' + assert_file_has_content test2-show 'Key expired' + assert_file_has_content test2-show "Primary key ID ${key2_id}" + assert_not_file_has_content test2-show 'Primary key expired' + + echo "ok verified with key2 subkey expired" +else + echo "ok # SKIP gpg --quick-set-expire does not support expiring subkeys" +fi + +# Add a second subkey but don't export it to the trusted keyring so that a new +# commit signed with fails. +${GPG} --homedir=${tmpgpg_home} --batch --passphrase '' \ + --quick-add-key ${key2_fpr} rsa2048 sign never +gpg_seckey_listing=$(${GPG} --homedir=${tmpgpg_home} --list-secret-keys --with-colons) +key2_sub2_id=$(awk -F: '{if ($1 == "ssb") print $5}' <<< "${gpg_seckey_listing}" | tail -n1) +key2_sub2_fpr=$(awk -F: '{if ($1 == "fpr") print $10}' <<< "${gpg_seckey_listing}" | tail -n1) +${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" \ + --tree=dir=files --gpg-homedir=${tmpgpg_home} \ + --gpg-sign=${key1_id} --gpg-sign=${key2_sub2_id} +${OSTREE} show test2 > test2-show +assert_file_has_content test2-show '^Found 2 signatures' +assert_file_has_content test2-show "${key1_id}" +assert_file_has_content test2-show "${key2_sub2_id}" +assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' +assert_file_has_content test2-show 'public key not found' + +echo "ok verified with key2 sub2 missing" + +# Revoke key1 by importing the revocation certificate created when generating +# the key. The cert should be in $homedir/openpgp-revocs.d/$fpr.rev with +# recent gnupg. However, it tries to prevent you from accidentally revoking +# things by adding a : before the block, so it needs to be stripped. +key1_rev=${tmpgpg_home}/openpgp-revocs.d/${key1_fpr}.rev +if [ -f ${key1_rev} ]; then + sed -i '/BEGIN PGP PUBLIC KEY BLOCK/s/^://' ${key1_rev} + ${GPG} --homedir=${tmpgpg_home} --import ${key1_rev} + # Export both keys again + ${GPG} --homedir=${tmpgpg_home} --export ${key1_id} ${key2_id} > ${tmpgpg_trusted_keyring} + ${OSTREE} show test2 > test2-show + assert_file_has_content test2-show '^Found 2 signatures' + assert_not_file_has_content test2-show 'public key not found' + assert_file_has_content test2-show "${key1_id}" + assert_file_has_content test2-show "${key2_sub2_id}" + assert_file_has_content test2-show 'Key revoked' + assert_file_has_content test2-show 'Good signature from "Test Key 2 <>"' + assert_file_has_content test2-show "Primary key ID ${key2_id}" + + echo "ok verified with key1 revoked" +else + echo "ok # SKIP could not find key revocation certificate" +fi diff --git a/tests/test-gpg-verify-result.c b/tests/test-gpg-verify-result.c index 19d6f71e..95de1873 100644 --- a/tests/test-gpg-verify-result.c +++ b/tests/test-gpg-verify-result.c @@ -45,7 +45,8 @@ static OstreeGpgSignatureAttr some_attributes[] = { OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED, OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED, - OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING + OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING, + OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP, }; static void @@ -174,7 +175,7 @@ test_attribute_basics (TestFixture *fixture, tuple = ostree_gpg_verify_result_get_all (fixture->result, ii); type_string = g_variant_get_type_string (tuple); - g_assert_cmpstr (type_string, ==, "(bbbbbsxxsssss)"); + g_assert_cmpstr (type_string, ==, "(bbbbbsxxsssssxx)"); /* Check attributes which should be common to all signatures. */ @@ -221,24 +222,27 @@ test_valid_signature (TestFixture *fixture, gboolean key_expired; gboolean key_revoked; gboolean key_missing; + gint64 key_exp_timestamp; tuple = ostree_gpg_verify_result_get (fixture->result, signature_index, some_attributes, G_N_ELEMENTS (some_attributes)); - g_variant_get (tuple, "(bbbbb)", + g_variant_get (tuple, "(bbbbbx)", &valid, &sig_expired, &key_expired, &key_revoked, - &key_missing); + &key_missing, + &key_exp_timestamp); g_assert_true (valid); g_assert_false (sig_expired); g_assert_false (key_expired); g_assert_false (key_revoked); g_assert_false (key_missing); + g_assert_cmpint (key_exp_timestamp, ==, 0); } static void @@ -252,24 +256,27 @@ test_expired_key (TestFixture *fixture, gboolean key_expired; gboolean key_revoked; gboolean key_missing; + gint64 key_exp_timestamp; tuple = ostree_gpg_verify_result_get (fixture->result, signature_index, some_attributes, G_N_ELEMENTS (some_attributes)); - g_variant_get (tuple, "(bbbbb)", + g_variant_get (tuple, "(bbbbbx)", &valid, &sig_expired, &key_expired, &key_revoked, - &key_missing); + &key_missing, + &key_exp_timestamp); g_assert_false (valid); g_assert_false (sig_expired); g_assert_true (key_expired); g_assert_false (key_revoked); g_assert_false (key_missing); + g_assert_cmpint (key_exp_timestamp, ==, 1426782201); } static void @@ -283,24 +290,27 @@ test_revoked_key (TestFixture *fixture, gboolean key_expired; gboolean key_revoked; gboolean key_missing; + gint64 key_exp_timestamp; tuple = ostree_gpg_verify_result_get (fixture->result, signature_index, some_attributes, G_N_ELEMENTS (some_attributes)); - g_variant_get (tuple, "(bbbbb)", + g_variant_get (tuple, "(bbbbbx)", &valid, &sig_expired, &key_expired, &key_revoked, - &key_missing); + &key_missing, + &key_exp_timestamp); g_assert_false (valid); g_assert_false (sig_expired); g_assert_false (key_expired); g_assert_true (key_revoked); g_assert_false (key_missing); + g_assert_cmpint (key_exp_timestamp, ==, 0); } static void @@ -314,24 +324,27 @@ test_missing_key (TestFixture *fixture, gboolean key_expired; gboolean key_revoked; gboolean key_missing; + gint64 key_exp_timestamp; tuple = ostree_gpg_verify_result_get (fixture->result, signature_index, some_attributes, G_N_ELEMENTS (some_attributes)); - g_variant_get (tuple, "(bbbbb)", + g_variant_get (tuple, "(bbbbbx)", &valid, &sig_expired, &key_expired, &key_revoked, - &key_missing); + &key_missing, + &key_exp_timestamp); g_assert_false (valid); g_assert_false (sig_expired); g_assert_false (key_expired); g_assert_false (key_revoked); g_assert_true (key_missing); + g_assert_cmpint (key_exp_timestamp, ==, 0); } static void @@ -345,24 +358,27 @@ test_expired_signature (TestFixture *fixture, gboolean key_expired; gboolean key_revoked; gboolean key_missing; + gint64 key_exp_timestamp; tuple = ostree_gpg_verify_result_get (fixture->result, signature_index, some_attributes, G_N_ELEMENTS (some_attributes)); - g_variant_get (tuple, "(bbbbb)", + g_variant_get (tuple, "(bbbbbx)", &valid, &sig_expired, &key_expired, &key_revoked, - &key_missing); + &key_missing, + &key_exp_timestamp); g_assert_true (valid); g_assert_true (sig_expired); g_assert_false (key_expired); g_assert_false (key_revoked); g_assert_false (key_missing); + g_assert_cmpint (key_exp_timestamp, ==, 0); } int diff --git a/tests/test-kargs.c b/tests/test-kargs.c new file mode 100644 index 00000000..8d34f73c --- /dev/null +++ b/tests/test-kargs.c @@ -0,0 +1,251 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * + * SPDX-License-Identifier: LGPL-2.0+ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" +#include "ostree-kernel-args.h" +#include "otutil.h" + +static gboolean +check_string_existance (OstreeKernelArgs *karg, + const char *string_to_find) +{ + g_autofree gchar* string_with_spaces = ostree_kernel_args_to_string (karg); + g_auto(GStrv) string_list = g_strsplit (string_with_spaces, " ", -1); + return g_strv_contains ((const char* const*) string_list, string_to_find); +} + +static void +test_kargs_delete (void) +{ + g_autoptr(GError) error = NULL; + gboolean ret; + __attribute__((cleanup(ostree_kernel_args_cleanup))) OstreeKernelArgs *karg = ostree_kernel_args_new (); + + ostree_kernel_args_append (karg, "single_key=test"); + ostree_kernel_args_append (karg, "test=firstval"); + ostree_kernel_args_append (karg, "test=secondval"); + ostree_kernel_args_append (karg, "test="); + ostree_kernel_args_append (karg, "test"); + + /* Delete a non-existant key should fail */ + ret = ostree_kernel_args_delete (karg, "non_existant_key", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Delete a key with multiple values when only specifying key should work if a no-value + * variant exists */ + ret = ostree_kernel_args_delete (karg, "test", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test")); + + /* Trying again now should fail since there are only kargs with various values */ + ret = ostree_kernel_args_delete (karg, "test", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Delete a key with a non existant value should fail */ + ret = ostree_kernel_args_delete (karg, "test=non_existant_value", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Delete a key with only one value should fail if the value doesn't match */ + ret = ostree_kernel_args_delete (karg, "single_key=non_existent_value", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Delete a key with only one value should succeed by only specifying key */ + ret = ostree_kernel_args_delete (karg, "single_key", &error); + g_assert_no_error (error); + g_assert (ret); + /* verify the value array is properly updated */ + GPtrArray *kargs_array = _ostree_kernel_arg_get_key_array (karg); + g_assert (!ot_ptr_array_find_with_equal_func (kargs_array, "single_key", g_str_equal, NULL)); + g_assert (!check_string_existance (karg, "single_key")); + + /* Delete specific key/value pair */ + ret = ostree_kernel_args_delete (karg, "test=secondval", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test=secondval")); + + /* Delete key/value pair with empty string value */ + ret = ostree_kernel_args_delete (karg, "test=", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test=")); + + ret = ostree_kernel_args_delete (karg, "test=firstval", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test=firstval")); + + /* Check that we can delete duplicate keys */ + ostree_kernel_args_append (karg, "test=foo"); + ostree_kernel_args_append (karg, "test=foo"); + check_string_existance (karg, "test=foo"); + ret = ostree_kernel_args_delete (karg, "test=foo", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (check_string_existance (karg, "test=foo")); + ret = ostree_kernel_args_delete (karg, "test=foo", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test=foo")); + + /* Make sure we also gracefully do this for key-only args */ + ostree_kernel_args_append (karg, "nosmt"); + ostree_kernel_args_append (karg, "nosmt"); + check_string_existance (karg, "nosmt"); + ret = ostree_kernel_args_delete (karg, "nosmt", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (check_string_existance (karg, "nosmt")); + ret = ostree_kernel_args_delete (karg, "nosmt", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "nosmt")); +} + +static void +test_kargs_replace (void) +{ + g_autoptr(GError) error = NULL; + gboolean ret; + __attribute__((cleanup(ostree_kernel_args_cleanup))) OstreeKernelArgs *karg = ostree_kernel_args_new (); + + ostree_kernel_args_append (karg, "single_key"); + ostree_kernel_args_append (karg, "test=firstval"); + ostree_kernel_args_append (karg, "test=secondval"); + + /* Replace when the input key is non-existant should fail */ + ret = ostree_kernel_args_new_replace (karg, "nonexistantkey", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Replace non-existant value with input key=nonexistantvalue=newvalue should fail */ + ret = ostree_kernel_args_new_replace (karg, "single_key=nonexistantval=newval", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Replace with input key=value will fail for a key with multiple values */ + ret = ostree_kernel_args_new_replace (karg, "test=newval", &error); + g_assert (!ret); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); + g_clear_error (&error); + + /* Replace with input key=value for a key with single value should succeed + * Also note, we also allow ''(empty string) valid to be a value + */ + ret = ostree_kernel_args_new_replace (karg, "single_key=newvalue", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "single_key")); + g_assert (check_string_existance (karg, "single_key=newvalue")); + + /* Replace with input key=value=newvalue if key and value both + * exist, the action should succeed + */ + ret = ostree_kernel_args_new_replace (karg, "test=firstval=newval", &error); + g_assert_no_error (error); + g_assert (ret); + g_assert (!check_string_existance (karg, "test=firstval")); + g_assert (check_string_existance (karg, "test=newval")); +} + +static gboolean +strcmp0_equal (gconstpointer v1, + gconstpointer v2) +{ + return g_strcmp0 (v1, v2) == 0; +} + +/* In this function, we want to verify that ostree_kernel_args_append + * and ostree_kernel_args_to_string is correct. After that + * we will use these two functions(append and tostring) in other tests: delete and replace + */ +static void +test_kargs_append (void) +{ + __attribute__((cleanup(ostree_kernel_args_cleanup))) OstreeKernelArgs *append_arg = ostree_kernel_args_new (); + /* Some valid cases (key=value) pair */ + ostree_kernel_args_append (append_arg, "test=valid"); + ostree_kernel_args_append (append_arg, "test=secondvalid"); + ostree_kernel_args_append (append_arg, "test="); + ostree_kernel_args_append (append_arg, "test"); + ostree_kernel_args_append (append_arg, "second_test"); + + /* We loops through the kargs inside table to verify + * the functionality of append because at this stage + * we have yet to find the conversion kargs to string fully "functional" + */ + GHashTable *kargs_table = _ostree_kernel_arg_get_kargs_table (append_arg); + GLNX_HASH_TABLE_FOREACH_KV (kargs_table, const char*, key, GPtrArray*, value_array) + { + if (g_str_equal (key, "test")) + { + g_assert (ot_ptr_array_find_with_equal_func (value_array, "valid", strcmp0_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, "secondvalid", strcmp0_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, "", strcmp0_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, strcmp0_equal, NULL)); + } + else + { + g_assert_cmpstr (key, ==, "second_test"); + g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, strcmp0_equal, NULL)); + } + } + + /* verify the value array is properly updated */ + GPtrArray *kargs_array = _ostree_kernel_arg_get_key_array (append_arg); + g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "test", g_str_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "second_test", g_str_equal, NULL)); + + /* Up till this point, we verified that the above was all correct, we then + * check ostree_kernel_args_to_string has the right result + */ + g_autofree gchar* kargs_str = ostree_kernel_args_to_string (append_arg); + g_auto(GStrv) kargs_list = g_strsplit(kargs_str, " ", -1); + g_assert (g_strv_contains ((const char* const *)kargs_list, "test=valid")); + g_assert (g_strv_contains ((const char* const *)kargs_list, "test=secondvalid")); + g_assert (g_strv_contains ((const char* const *)kargs_list, "test=")); + g_assert (g_strv_contains ((const char* const *)kargs_list, "test")); + g_assert (g_strv_contains ((const char* const *)kargs_list, "second_test")); + g_assert_cmpint (5, ==, g_strv_length (kargs_list)); +} + +int +main (int argc, + char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/kargs/kargs_append", test_kargs_append); + g_test_add_func ("/kargs/kargs_delete", test_kargs_delete); + g_test_add_func ("/kargs/kargs_replace", test_kargs_replace); + return g_test_run (); +} diff --git a/tests/test-libarchive.sh b/tests/test-libarchive.sh index 0a51d442..24de55b2 100755 --- a/tests/test-libarchive.sh +++ b/tests/test-libarchive.sh @@ -28,7 +28,7 @@ fi . $(dirname $0)/libtest.sh -echo "1..13" +echo "1..17" setup_test_repository "bare" @@ -75,6 +75,16 @@ $OSTREE commit -s "from cpio" -b test-cpio \ --skip-list=skiplist.txt \ --tree=tar=foo.cpio echo "ok cpio commit" +cat foo.tar.gz | $OSTREE commit -s "from tar" -b test-tar-stdin \ + --statoverride=statoverride.txt \ + --skip-list=skiplist.txt \ + --tree=tar=- +echo "ok tar commit from stdin" +cat foo.cpio | $OSTREE commit -s "from cpio" -b test-cpio-stdin \ + --statoverride=statoverride.txt \ + --skip-list=skiplist.txt \ + --tree=tar=- +echo "ok cpio commit from stdin" assert_valid_checkout () { ref=$1 @@ -124,6 +134,10 @@ assert_valid_checkout tar echo "ok tar contents" assert_valid_checkout cpio echo "ok cpio contents" +assert_valid_checkout tar-stdin +echo "ok tar contents from stdin" +assert_valid_checkout cpio-stdin +echo "ok cpio contents from stdin" cd ${test_tmpdir} mkdir multicommit-files diff --git a/tests/test-local-pull.sh b/tests/test-local-pull.sh index 8168486c..97bb9954 100755 --- a/tests/test-local-pull.sh +++ b/tests/test-local-pull.sh @@ -28,7 +28,12 @@ unset OSTREE_GPG_HOME skip_without_user_xattrs -echo "1..8" +if has_gpgme; then + echo "1..8" +else + # Only some tests doesn't need GPG support + echo "1..5" +fi setup_test_repository "archive" echo "ok setup" @@ -63,6 +68,20 @@ cmp checkout1.files checkout2.files cmp checkout1.files checkout3.files echo "ok checkouts same" +mkdir repo7 +ostree_repo_init repo7 --mode="archive" +${CMD_PREFIX} ostree --repo=repo7 pull-local repo +${CMD_PREFIX} ostree --repo=repo7 fsck +for src_object in `find repo/objects -name '*.filez'`; do + dst_object=${src_object/repo/repo7} + assert_files_hardlinked "$src_object" "$dst_object" +done +echo "ok pull-local z2 to z2 default hardlink" + +if ! has_gpgme; then + exit 0 +fi + mkdir repo4 ostree_repo_init repo4 --mode="archive" ${CMD_PREFIX} ostree --repo=repo4 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo @@ -97,13 +116,3 @@ ${OSTREE} summary --update --gpg-sign=${TEST_GPG_KEYID_1} --gpg-homedir=${TEST_G ${CMD_PREFIX} ostree --repo=repo6 pull-local --remote=origin --gpg-verify-summary repo test2 2>&1 echo "ok --gpg-verify-summary" - -mkdir repo7 -ostree_repo_init repo7 --mode="archive" -${CMD_PREFIX} ostree --repo=repo7 pull-local repo -${CMD_PREFIX} ostree --repo=repo7 fsck -for src_object in `find repo/objects -name '*.filez'`; do - dst_object=${src_object/repo/repo7} - assert_files_hardlinked "$src_object" "$dst_object" -done -echo "ok pull-local z2 to z2 default hardlink" diff --git a/tests/test-parent.sh b/tests/test-parent.sh index a9a3494c..b62b9557 100755 --- a/tests/test-parent.sh +++ b/tests/test-parent.sh @@ -25,6 +25,8 @@ set -euo pipefail skip_without_user_xattrs +skip_without_gpgme + echo '1..2' setup_test_repository "archive" diff --git a/tests/test-pull-collections.sh b/tests/test-pull-collections.sh index fd782af9..d1de5f88 100755 --- a/tests/test-pull-collections.sh +++ b/tests/test-pull-collections.sh @@ -34,7 +34,11 @@ do_commit() { mkdir -p files pushd files - ${CMD_PREFIX} ostree --repo="../${repo}" commit -s "Test ${repo} commit for branch ${branch}" -b "${branch}" --gpg-homedir="${TEST_GPG_KEYHOME}" --gpg-sign="${TEST_GPG_KEYID_1}" "$@" > "../${branch}-checksum" + local GPG_ARGS="" + if has_gpgme; then + GPG_ARGS="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" + fi + ${CMD_PREFIX} ostree --repo="../${repo}" commit -s "Test ${repo} commit for branch ${branch}" -b "${branch}" ${GPG_ARGS} "$@" > "../${branch}-checksum" popd } @@ -42,7 +46,11 @@ do_summary() { local repo=$1 shift 1 - ${CMD_PREFIX} ostree "--repo=${repo}" summary --update --gpg-homedir="${TEST_GPG_KEYHOME}" --gpg-sign="${TEST_GPG_KEYID_1}" + local GPG_ARGS="" + if has_gpgme; then + GPG_ARGS="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" + fi + ${CMD_PREFIX} ostree "--repo=${repo}" summary --update ${GPG_ARGS} } do_collection_ref_show() { @@ -96,7 +104,11 @@ do_remote_add() { local remote_repo=$2 shift 2 - ${CMD_PREFIX} ostree "--repo=${repo}" remote add "${remote_repo}-remote" "file://$(pwd)/${remote_repo}" "$@" --gpg-import="${test_tmpdir}/gpghome/key1.asc" + local GPG_ARGS="" + if has_gpgme; then + GPG_ARGS="--gpg-import=${test_tmpdir}/gpghome/key1.asc" + fi + ${CMD_PREFIX} ostree "--repo=${repo}" remote add "${remote_repo}-remote" "file://$(pwd)/${remote_repo}" "$@" ${GPG_ARGS} } do_pull() { diff --git a/tests/test-pull-mirror-summary.sh b/tests/test-pull-mirror-summary.sh index cc3c6a2c..a2a98bad 100755 --- a/tests/test-pull-mirror-summary.sh +++ b/tests/test-pull-mirror-summary.sh @@ -23,9 +23,15 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo "1..5" +COMMIT_SIGN="" +if has_gpgme; then + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" + echo "1..5" +else + # Only one test don't need GPG support + echo "1..1" +fi -COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}" # Now, setup multiple branches @@ -120,5 +126,3 @@ echo "ok pull mirror with invalid summary sig and no verification" # assert_file_has_content deltas.txt "${origmain}-${newmain}" # echo "ok pull mirror with signed summary covering static deltas" - -libtest_cleanup_gpg diff --git a/tests/test-pull-repeated.sh b/tests/test-pull-repeated.sh index a2707d6d..237a863c 100755 --- a/tests/test-pull-repeated.sh +++ b/tests/test-pull-repeated.sh @@ -23,9 +23,12 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo "1..4" +COMMIT_SIGN="" +if has_gpgme; then + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" +fi -COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" +echo "1..4" # Test pulling from a repo which gives error 500 (internal server error) a lot of the time. setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}" --random-500s=50 diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh index e2864beb..821ae953 100755 --- a/tests/test-pull-summary-sigs.sh +++ b/tests/test-pull-summary-sigs.sh @@ -23,9 +23,15 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo "1..10" +COMMIT_SIGN="" +if has_gpgme; then + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" + echo "1..10" +else + # Only one test don't need GPG support + echo "1..1" +fi -COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}" # Now, setup multiple branches @@ -274,5 +280,3 @@ cmp repo/tmp/cache/summaries/origin ${test_tmpdir}/ostree-srv/gnomerepo/summary. cmp repo/tmp/cache/summaries/origin.sig ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig.2 >&2 echo "ok pull with signed summary broken cache" - -libtest_cleanup_gpg diff --git a/tests/test-refs.sh b/tests/test-refs.sh index 83da04ff..d0f8e7da 100755 --- a/tests/test-refs.sh +++ b/tests/test-refs.sh @@ -90,6 +90,11 @@ if ${CMD_PREFIX} ostree --repo=repo refs foo/ctest --create=ctest; then assert_not_reached "refs --create unexpectedly succeeded in overwriting an existing prefix!" fi +# Force overwriting ctest and check the revision got updated +foo_ctest_rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse foo/ctest) +${CMD_PREFIX} ostree --repo=repo refs foo/ctest --create=ctest --force +assert_ref repo ctest ${foo_ctest_rev} + # https://github.com/ostreedev/ostree/issues/1285 # One tool was creating .latest_rsync files in each dir, let's ignore stuff like # that. diff --git a/tests/test-remote-gpg-import.sh b/tests/test-remote-gpg-import.sh index 1bb42d82..4d73fa11 100755 --- a/tests/test-remote-gpg-import.sh +++ b/tests/test-remote-gpg-import.sh @@ -280,5 +280,3 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u --gpg ${OSTREE} pull --require-static-deltas R1:main echo "ok gpg trusted signed commit for delta upgrades" - -libtest_cleanup_gpg diff --git a/tests/test-repo-finder-config.c b/tests/test-repo-finder-config.c index a87e3f4b..0a2e9e60 100644 --- a/tests/test-repo-finder-config.c +++ b/tests/test-repo-finder-config.c @@ -308,7 +308,6 @@ static void test_repo_finder_config_find_remotes (Fixture *fixture, gconstpointer test_data) { - g_autoptr(OstreeRepoFinder) finder = NULL; g_autoptr(GMainContext) context = NULL; g_autoptr(GAsyncResult) result = NULL; g_auto(OstreeRepoFinderResultv) results = NULL; diff --git a/tests/test-repo-finder-mount-integration.sh b/tests/test-repo-finder-mount-integration.sh index 243df591..9ecc4cd6 100755 --- a/tests/test-repo-finder-mount-integration.sh +++ b/tests/test-repo-finder-mount-integration.sh @@ -55,7 +55,7 @@ _mount_cleanup () { case "${TEST_SKIP_CLEANUP:-}" in no|"") - trap _mount_cleanup EXIT + libtest_exit_cmds+=(_mount_cleanup) ;; err) trap _mount_cleanup ERR diff --git a/tests/test-repo-finder-mount.c b/tests/test-repo-finder-mount.c index 55eb47fb..847f4bec 100644 --- a/tests/test-repo-finder-mount.c +++ b/tests/test-repo-finder-mount.c @@ -557,10 +557,13 @@ int main (int argc, char **argv) g_test_add_func ("/repo-finder-mount/init", test_repo_finder_mount_init); g_test_add ("/repo-finder-mount/no-mounts", Fixture, NULL, setup, test_repo_finder_mount_no_mounts, teardown); +#ifndef OSTREE_DISABLE_GPGME + /*`ostree_repo_resolve_keyring_for_collection()` fail the tests if no GPG support is compiled in. */ g_test_add ("/repo-finder-mount/mixed-mounts", Fixture, NULL, setup, test_repo_finder_mount_mixed_mounts, teardown); g_test_add ("/repo-finder-mount/well-known", Fixture, NULL, setup, test_repo_finder_mount_well_known, teardown); +#endif /* OSTREE_DISABLE_GPGME */ return g_test_run(); } diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh index 7b7474d0..1e09711c 100755 --- a/tests/test-rofiles-fuse.sh +++ b/tests/test-rofiles-fuse.sh @@ -41,7 +41,7 @@ rofiles-fuse checkout-test2 mnt cleanup_fuse() { fusermount -u ${test_tmpdir}/mnt || true } -trap cleanup_fuse EXIT +libtest_exit_cmds+=(cleanup_fuse) assert_file_has_content mnt/firstfile first echo "ok mount" diff --git a/tests/test-sizes.js b/tests/test-sizes.js index 5114dd64..73b179c5 100755 --- a/tests/test-sizes.js +++ b/tests/test-sizes.js @@ -53,7 +53,7 @@ let [,dirTree] = repo.write_mtree(mtree, null); let [,commit] = repo.write_commit(null, 'Some subject', 'Some body', null, dirTree, null); print("commit => " + commit); -repo.commit_transaction(null, null); +repo.commit_transaction(null); // Test the sizes metadata let [,commitVariant] = repo.load_variant(OSTree.ObjectType.COMMIT, commit); @@ -64,10 +64,10 @@ assertEquals(nSizes, 2); let expectedUncompressedSizes = [12, 18]; let foundExpectedUncompressedSizes = 0; for (let i = 0; i < nSizes; i++) { - let sizeEntry = sizes.get_child_value(i).deep_unpack(); - assertEquals(sizeEntry.length, 34); - let compressedSize = sizeEntry[32]; - let uncompressedSize = sizeEntry[33]; + let sizeEntry = sizes.get_child_value(i); + assertEquals(sizeEntry.n_children(), 34); + let compressedSize = sizeEntry.get_child_value(32).get_byte(); + let uncompressedSize = sizeEntry.get_child_value(33).get_byte(); print("compressed = " + compressedSize); print("uncompressed = " + uncompressedSize); for (let j = 0; j < expectedUncompressedSizes.length; j++) { diff --git a/tests/test-summary-update.sh b/tests/test-summary-update.sh index 062d5bd4..ceaa5409 100755 --- a/tests/test-summary-update.sh +++ b/tests/test-summary-update.sh @@ -28,6 +28,12 @@ set -euo pipefail echo "1..2" +COMMIT_SIGN="" +if has_gpgme; then + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" +fi + + cd ${test_tmpdir} mkdir repo ostree_repo_init repo @@ -45,7 +51,7 @@ done ${CMD_PREFIX} ostree --repo=repo summary --update # Generate a signed summary file. -${CMD_PREFIX} ostree --repo=repo summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} +${CMD_PREFIX} ostree --repo=repo summary --update ${COMMIT_SIGN} # Try various ways of adding additional data. ${CMD_PREFIX} ostree --repo=repo summary --update --add-metadata key="'value'" --add-metadata=key2=true @@ -77,7 +83,7 @@ done ${CMD_PREFIX} ostree --repo=repo summary --update # Generate a signed summary file. -${CMD_PREFIX} ostree --repo=repo summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} +${CMD_PREFIX} ostree --repo=repo summary --update ${COMMIT_SIGN} # Try various ways of adding additional data. ${CMD_PREFIX} ostree --repo=repo summary --update --add-metadata key="'value'" --add-metadata=key2=true diff --git a/tests/test-summary-view.sh b/tests/test-summary-view.sh index a5ddf93e..14de0294 100755 --- a/tests/test-summary-view.sh +++ b/tests/test-summary-view.sh @@ -28,7 +28,11 @@ set -euo pipefail echo "1..2" -COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" +COMMIT_SIGN="" +if has_gpgme; then + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" +fi + setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}" # Set up a second branch. @@ -62,5 +66,3 @@ assert_file_has_content_literal raw-summary.txt "('main', (" assert_file_has_content_literal raw-summary.txt "('other', (" assert_file_has_content_literal raw-summary.txt "{'ostree.summary.last-modified': released-sha256.txt <