diff --git a/Makefile-boot.am b/Makefile-boot.am index b51928f0..9a04bbdb 100644 --- a/Makefile-boot.am +++ b/Makefile-boot.am @@ -65,7 +65,7 @@ endif EXTRA_DIST += src/boot/dracut/module-setup.sh \ src/boot/dracut/ostree.conf \ - src/boot/mkinitcpio/ostree \ + src/boot/mkinitcpio \ src/boot/ostree-prepare-root.service \ src/boot/ostree-finalize-staged.path \ src/boot/ostree-remount.service \ diff --git a/Makefile-libostree.am b/Makefile-libostree.am index ce784aff..dd396974 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -66,6 +66,8 @@ libostree_1_la_SOURCES = \ src/libostree/ostree-checksum-input-stream.h \ src/libostree/ostree-chain-input-stream.c \ src/libostree/ostree-chain-input-stream.h \ + src/libostree/ostree-content-writer.c \ + src/libostree/ostree-content-writer.h \ src/libostree/ostree-lzma-common.c \ src/libostree/ostree-lzma-common.h \ src/libostree/ostree-lzma-compressor.c \ @@ -147,14 +149,6 @@ libostree_1_la_SOURCES += \ src/libostree/ostree-tls-cert-interaction.h \ $(NULL) endif -libostree_experimental_headers = \ - $(NULL) -if !ENABLE_EXPERIMENTAL_API -libostree_1_la_SOURCES += $(libostree_experimental_headers) -else # if ENABLE_EXPERIMENTAL_API -libostree_1_la_SOURCES += \ - $(NULL) -endif if USE_AVAHI libostree_1_la_SOURCES += \ @@ -281,13 +275,9 @@ OSTree-1.0.gir: libostree-1.la Makefile OSTree_1_0_gir_EXPORT_PACKAGES = ostree-1 OSTree_1_0_gir_INCLUDES = Gio-2.0 OSTree_1_0_gir_CFLAGS = $(libostree_1_la_CFLAGS) -if ENABLE_EXPERIMENTAL_API -# When compiling this is set via config.h, but g-ir-scanner can't use that -OSTree_1_0_gir_CFLAGS += -DOSTREE_ENABLE_EXPERIMENTAL_API=1 -endif OSTree_1_0_gir_LIBS = libostree-1.la OSTree_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Ostree --symbol-prefix=ostree $(GI_SCANNERFLAGS) -OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h $(libostree_experimental_headers),$(libostree_1_la_SOURCES)) +OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h,$(libostree_1_la_SOURCES)) INTROSPECTION_GIRS += OSTree-1.0.gir gir_DATA += OSTree-1.0.gir typelib_DATA += OSTree-1.0.typelib diff --git a/Makefile-ostree.am b/Makefile-ostree.am index e5767641..fd5ec9de 100644 --- a/Makefile-ostree.am +++ b/Makefile-ostree.am @@ -60,11 +60,6 @@ nodist_ostree_SOURCES = \ src/ostree/parse-datetime.c \ $(NULL) -if ENABLE_EXPERIMENTAL_API -ostree_SOURCES += \ - $(NULL) -endif - if USE_GPGME ostree_SOURCES += \ src/ostree/ot-builtin-gpg-sign.c \ diff --git a/Makefile-tests.am b/Makefile-tests.am index 257b4a5d..c99a7ede 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -156,8 +156,6 @@ _installed_or_uninstalled_test_scripts += \ $(NULL) endif -experimental_test_scripts = \ - $(NULL) test_extra_programs = \ tests/get-byte-order \ tests/repo-finder-mount \ @@ -171,12 +169,6 @@ tests_repo_finder_mount_SOURCES = tests/repo-finder-mount.c tests_repo_finder_mount_CFLAGS = $(common_tests_cflags) tests_repo_finder_mount_LDADD = $(common_tests_ldadd) libostreetest.la -if ENABLE_EXPERIMENTAL_API -_installed_or_uninstalled_test_scripts += $(experimental_test_scripts) -else -EXTRA_DIST += $(experimental_test_scripts) -endif - if BUILDOPT_FUSE _installed_or_uninstalled_test_scripts += tests/test-rofiles-fuse.sh uninstalled_test_data += tests/rofiles-fuse-symlink-stamp @@ -439,8 +431,11 @@ if ENABLE_INSTALLED_TESTS_EXCLUSIVE dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts) installed_test_programs = $(_installed_or_uninstalled_test_programs) check-local: + echo "NOTE: Run the Rust installed tests (uninstalled) with ./tests/run-installed" echo "NOTE: Exclusive installed tests are enabled; to run them, make install, then: gnome-desktop-testing-runner -p 0 libostree/" else +check-local: + echo "NOTE: Run the Rust installed tests (uninstalled) with ./tests/run-installed" dist_test_scripts += $(_installed_or_uninstalled_test_scripts) test_programs += $(_installed_or_uninstalled_test_programs) endif diff --git a/Makefile.am b/Makefile.am index b2588ad7..2f3cb53f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,6 +46,9 @@ GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in gtk-doc.make # Generated by coreos-assembler build-fast and kola GITIGNOREFILES += fastbuild-*.qcow2 _kola_temp/ +# Rust stuff +GITIGNOREFILES += target/ Cargo.lock + SUBDIRS += . if ENABLE_GTK_DOC diff --git a/Makefile.in b/Makefile.in index 8673c858..fa2cc2c2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -386,7 +386,7 @@ libexec_PROGRAMS = 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) \ +TESTS = $(am__EXEEXT_8) $(am__EXEEXT_25) \ $(dist_uninstalled_test_scripts) $(am__EXEEXT_13) installed_test_PROGRAMS = $(am__EXEEXT_15) check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) @@ -431,33 +431,29 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ src/libostree/ostree-tls-cert-interaction.h \ @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ $(NULL) -@ENABLE_EXPERIMENTAL_API_FALSE@am__append_18 = $(libostree_experimental_headers) -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_19 = \ -@ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) - -@USE_AVAHI_TRUE@am__append_20 = \ +@USE_AVAHI_TRUE@am__append_18 = \ @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) -@USE_GPGME_TRUE@am__append_21 = \ +@USE_GPGME_TRUE@am__append_19 = \ @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_22 = \ +@USE_GPGME_FALSE@am__append_20 = \ @USE_GPGME_FALSE@ src/libostree/ostree-gpg-verify-result-dummy.c \ @USE_GPGME_FALSE@ $(NULL) -@USE_LIBARCHIVE_TRUE@am__append_23 = $(OT_DEP_LIBARCHIVE_CFLAGS) -@USE_LIBARCHIVE_TRUE@am__append_24 = $(OT_DEP_LIBARCHIVE_LIBS) -@USE_AVAHI_TRUE@am__append_25 = $(OT_DEP_AVAHI_CFLAGS) -@USE_AVAHI_TRUE@am__append_26 = $(OT_DEP_AVAHI_LIBS) -@BUILDOPT_SYSTEMD_TRUE@am__append_27 = $(LIBSYSTEMD_CFLAGS) -@BUILDOPT_SYSTEMD_TRUE@am__append_28 = $(LIBSYSTEMD_LIBS) -@USE_CURL_OR_SOUP_TRUE@am__append_29 = \ +@USE_LIBARCHIVE_TRUE@am__append_21 = $(OT_DEP_LIBARCHIVE_CFLAGS) +@USE_LIBARCHIVE_TRUE@am__append_22 = $(OT_DEP_LIBARCHIVE_LIBS) +@USE_AVAHI_TRUE@am__append_23 = $(OT_DEP_AVAHI_CFLAGS) +@USE_AVAHI_TRUE@am__append_24 = $(OT_DEP_AVAHI_LIBS) +@BUILDOPT_SYSTEMD_TRUE@am__append_25 = $(LIBSYSTEMD_CFLAGS) +@BUILDOPT_SYSTEMD_TRUE@am__append_26 = $(LIBSYSTEMD_LIBS) +@USE_CURL_OR_SOUP_TRUE@am__append_27 = \ @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 \ @@ -466,45 +462,40 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) @USE_CURL_OR_SOUP_TRUE@ src/libostree/ostree-metalink.c \ @USE_CURL_OR_SOUP_TRUE@ $(NULL) -@USE_CURL_TRUE@am__append_30 = src/libostree/ostree-fetcher-curl.c \ +@USE_CURL_TRUE@am__append_28 = 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_31 = $(OT_DEP_CURL_CFLAGS) -@USE_CURL_TRUE@am__append_32 = $(OT_DEP_CURL_LIBS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_33 = src/libostree/ostree-fetcher-soup.c -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_34 = $(OT_INTERNAL_SOUP_CFLAGS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_35 = $(OT_INTERNAL_SOUP_LIBS) -@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__append_36 = src/libostree/ostree-soup-uri.h \ +@USE_CURL_TRUE@am__append_29 = $(OT_DEP_CURL_CFLAGS) +@USE_CURL_TRUE@am__append_30 = $(OT_DEP_CURL_LIBS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_31 = src/libostree/ostree-fetcher-soup.c +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_32 = $(OT_INTERNAL_SOUP_CFLAGS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_33 = $(OT_INTERNAL_SOUP_LIBS) +@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__append_34 = 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_37 = $(OT_DEP_LIBMOUNT_CFLAGS) -@USE_LIBMOUNT_TRUE@am__append_38 = $(OT_DEP_LIBMOUNT_LIBS) -@USE_SELINUX_TRUE@am__append_39 = $(OT_DEP_SELINUX_CFLAGS) -@USE_SELINUX_TRUE@am__append_40 = $(OT_DEP_SELINUX_LIBS) -@USE_LIBSODIUM_TRUE@am__append_41 = $(OT_DEP_LIBSODIUM_CFLAGS) -@USE_LIBSODIUM_TRUE@am__append_42 = $(OT_DEP_LIBSODIUM_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 = \ -@ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) - -@USE_GPGME_TRUE@am__append_49 = \ +@USE_LIBMOUNT_TRUE@am__append_35 = $(OT_DEP_LIBMOUNT_CFLAGS) +@USE_LIBMOUNT_TRUE@am__append_36 = $(OT_DEP_LIBMOUNT_LIBS) +@USE_SELINUX_TRUE@am__append_37 = $(OT_DEP_SELINUX_CFLAGS) +@USE_SELINUX_TRUE@am__append_38 = $(OT_DEP_SELINUX_LIBS) +@USE_LIBSODIUM_TRUE@am__append_39 = $(OT_DEP_LIBSODIUM_CFLAGS) +@USE_LIBSODIUM_TRUE@am__append_40 = $(OT_DEP_LIBSODIUM_LIBS) +@BUILDOPT_INTROSPECTION_TRUE@am__append_41 = OSTree-1.0.gir +@BUILDOPT_INTROSPECTION_TRUE@am__append_42 = OSTree-1.0.gir +@BUILDOPT_INTROSPECTION_TRUE@am__append_43 = OSTree-1.0.typelib +@BUILDOPT_INTROSPECTION_TRUE@am__append_44 = $(gir_DATA) $(typelib_DATA) +@USE_GPGME_TRUE@am__append_45 = \ @USE_GPGME_TRUE@ src/ostree/ot-builtin-gpg-sign.c \ @USE_GPGME_TRUE@ $(NULL) -@USE_GPGME_TRUE@am__append_50 = \ +@USE_GPGME_TRUE@am__append_46 = \ @USE_GPGME_TRUE@ src/ostree/ot-remote-builtin-gpg-import.c \ @USE_GPGME_TRUE@ $(NULL) -@USE_CURL_OR_SOUP_TRUE@am__append_51 = src/ostree/ot-remote-builtin-add-cookie.c \ +@USE_CURL_OR_SOUP_TRUE@am__append_47 = 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 \ @@ -512,20 +503,20 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) @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_52 = src/ostree/ot-builtin-trivial-httpd.c -@USE_LIBSOUP_TRUE@am__append_53 = ostree-trivial-httpd +@USE_LIBSOUP_TRUE@am__append_48 = src/ostree/ot-builtin-trivial-httpd.c +@USE_LIBSOUP_TRUE@am__append_49 = ostree-trivial-httpd # This is necessary for the cookie jar bits -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_54 = $(OT_INTERNAL_SOUP_CFLAGS) -@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_55 = $(OT_INTERNAL_SOUP_LIBS) -@USE_LIBARCHIVE_TRUE@am__append_56 = $(OT_DEP_LIBARCHIVE_CFLAGS) -@USE_LIBARCHIVE_TRUE@am__append_57 = $(OT_DEP_LIBARCHIVE_LIBS) -@USE_LIBSODIUM_TRUE@am__append_58 = $(OT_DEP_LIBSODIUM_CFLAGS) -@USE_LIBSODIUM_TRUE@am__append_59 = $(OT_DEP_LIBSODIUM_LIBS) -@BUILDOPT_SYSTEMD_TRUE@am__append_60 = ostree-remount +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_50 = $(OT_INTERNAL_SOUP_CFLAGS) +@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_51 = $(OT_INTERNAL_SOUP_LIBS) +@USE_LIBARCHIVE_TRUE@am__append_52 = $(OT_DEP_LIBARCHIVE_CFLAGS) +@USE_LIBARCHIVE_TRUE@am__append_53 = $(OT_DEP_LIBARCHIVE_LIBS) +@USE_LIBSODIUM_TRUE@am__append_54 = $(OT_DEP_LIBSODIUM_CFLAGS) +@USE_LIBSODIUM_TRUE@am__append_55 = $(OT_DEP_LIBSODIUM_LIBS) +@BUILDOPT_SYSTEMD_TRUE@am__append_56 = 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_61 = ostree-remount +@BUILDOPT_SYSTEMD_FALSE@am__append_57 = ostree-remount # ostree-prepare-root can be used as init in a system without a populated /lib. # To support this use case we need to link statically as we will be unable to @@ -537,66 +528,64 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) # to get autotools to install this as an executable but without generating rules # to make it itself which we have specified manually. See # https://lists.gnu.org/archive/html/help-gnu-utils/2007-01/msg00007.html -@BUILDOPT_USE_STATIC_COMPILER_TRUE@am__append_62 = ostree-prepare-root -@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_63 = ostree-prepare-root -@BUILDOPT_SYSTEMD_TRUE@am__append_64 = -DHAVE_SYSTEMD=1 +@BUILDOPT_USE_STATIC_COMPILER_TRUE@am__append_58 = ostree-prepare-root +@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_59 = ostree-prepare-root +@BUILDOPT_SYSTEMD_TRUE@am__append_60 = -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_65 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_66 = -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_62 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT) -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_67 = $(systemdsystemgenerator_PROGRAMS) +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_63 = $(systemdsystemgenerator_PROGRAMS) # Allow the distcheck install under $prefix test to pass -@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 = \ +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_64 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators' +@BUILDOPT_FUSE_TRUE@am__append_65 = rofiles-fuse +@BUILDOPT_ASAN_TRUE@am__append_66 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc +@USE_GPGME_TRUE@am__append_67 = \ @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 = \ +@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_GPGME_TRUE@am__append_76 = \ @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_AVAHI_TRUE@am__append_77 = tests/test-repo-finder-avahi +@USE_LIBARCHIVE_TRUE@am__append_78 = tests/test-libarchive-import +@USE_GPGME_TRUE@am__append_79 = \ @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 +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_80 = $(_installed_or_uninstalled_test_scripts) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_81 = $(_installed_or_uninstalled_test_programs) +@ENABLE_INSTALLED_TESTS_TRUE@am__append_82 = install-installed-tests-extra # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_TRUE@am__append_89 = --with-systemdsystemunitdir='$${libdir}/systemd/system' +@BUILDOPT_SYSTEMD_TRUE@am__append_83 = --with-systemdsystemunitdir='$${libdir}/systemd/system' # We're using the system grub2-mkconfig generator -@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_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_84 = src/boot/grub2/grub2-15_ostree +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_85 = install-grub2-config-hook # We're using our internal generator -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@am__append_92 = src/boot/grub2/ostree-grub-generator -@ENABLE_MAN_TRUE@@USE_LIBSOUP_TRUE@am__append_93 = ostree-trivial-httpd.1 +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@am__append_86 = src/boot/grub2/ostree-grub-generator +@ENABLE_MAN_TRUE@@USE_LIBSOUP_TRUE@am__append_87 = ostree-trivial-httpd.1 # We still want to distribute the source, even if we are not building it -@ENABLE_MAN_TRUE@@USE_LIBSOUP_FALSE@am__append_94 = man/ostree-trivial-httpd.xml -@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_95 = rofiles-fuse.1 -@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_96 = ostree-gpg-sign.1 -@ENABLE_MAN_TRUE@am__append_97 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) -@ENABLE_MAN_TRUE@am__append_98 = \ +@ENABLE_MAN_TRUE@@USE_LIBSOUP_FALSE@am__append_88 = man/ostree-trivial-httpd.xml +@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_89 = rofiles-fuse.1 +@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_90 = ostree-gpg-sign.1 +@ENABLE_MAN_TRUE@am__append_91 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) +@ENABLE_MAN_TRUE@am__append_92 = \ @ENABLE_MAN_TRUE@ $(man1_MANS) \ @ENABLE_MAN_TRUE@ $(man5_MANS) \ @ENABLE_MAN_TRUE@ $(NULL) @@ -786,6 +775,8 @@ am__libostree_1_la_SOURCES_DIST = \ src/libostree/ostree-checksum-input-stream.h \ src/libostree/ostree-chain-input-stream.c \ src/libostree/ostree-chain-input-stream.h \ + src/libostree/ostree-content-writer.c \ + src/libostree/ostree-content-writer.h \ src/libostree/ostree-lzma-common.c \ src/libostree/ostree-lzma-common.h \ src/libostree/ostree-lzma-compressor.c \ @@ -881,26 +872,23 @@ am__libostree_1_la_SOURCES_DIST = \ @USE_LIBARCHIVE_TRUE@ $(am__objects_1) @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@am__objects_3 = src/libostree/libostree_1_la-ostree-tls-cert-interaction.lo \ @HAVE_LIBSOUP_CLIENT_CERTS_TRUE@ $(am__objects_1) -am__objects_4 = $(am__objects_1) -@ENABLE_EXPERIMENTAL_API_FALSE@am__objects_5 = $(am__objects_4) -@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_4 = src/libostree/libostree_1_la-ostree-repo-finder-avahi-parser.lo \ @USE_AVAHI_TRUE@ $(am__objects_1) -@USE_GPGME_TRUE@am__objects_8 = src/libostree/libostree_1_la-ostree-gpg-verifier.lo \ +@USE_GPGME_TRUE@am__objects_5 = 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_6 = 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@am__objects_7 = 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_11 = src/libostree/libostree_1_la-ostree-fetcher-curl.lo \ +@USE_CURL_TRUE@am__objects_8 = 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_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_CURL_FALSE@@USE_LIBSOUP_TRUE@am__objects_9 = src/libostree/libostree_1_la-ostree-fetcher-soup.lo +@USE_AVAHI_TRUE@@USE_CURL_FALSE@@USE_LIBSOUP_FALSE@am__objects_10 = 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 = \ @@ -911,6 +899,7 @@ am_libostree_1_la_OBJECTS = \ src/libostree/libostree_1_la-ostree-dummy-enumtypes.lo \ src/libostree/libostree_1_la-ostree-checksum-input-stream.lo \ src/libostree/libostree_1_la-ostree-chain-input-stream.lo \ + src/libostree/libostree_1_la-ostree-content-writer.lo \ src/libostree/libostree_1_la-ostree-lzma-common.lo \ src/libostree/libostree_1_la-ostree-lzma-compressor.lo \ src/libostree/libostree_1_la-ostree-lzma-decompressor.lo \ @@ -959,10 +948,9 @@ am_libostree_1_la_OBJECTS = \ 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_12) $(am__objects_13) \ - src/libostree/libostree_1_la-ostree-sign.lo \ + $(am__objects_4) $(am__objects_5) $(am__objects_6) \ + $(am__objects_7) $(am__objects_8) $(am__objects_9) \ + $(am__objects_10) src/libostree/libostree_1_la-ostree-sign.lo \ src/libostree/libostree_1_la-ostree-sign-dummy.lo \ src/libostree/libostree_1_la-ostree-sign-ed25519.lo \ $(am__objects_1) @@ -1004,7 +992,7 @@ am__libotutil_la_SOURCES_DIST = src/libotutil/ot-checksum-utils.c \ 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@am__objects_11 = \ @USE_GPGME_TRUE@ src/libotutil/libotutil_la-ot-gpg-utils.lo \ @USE_GPGME_TRUE@ $(am__objects_1) am_libotutil_la_OBJECTS = \ @@ -1018,7 +1006,7 @@ am_libotutil_la_OBJECTS = \ src/libotutil/libotutil_la-ot-variant-builder.lo \ src/libotutil/libotutil_la-ot-gio-utils.lo \ src/libotutil/libotutil_la-ot-tool-util.lo $(am__objects_1) \ - $(am__objects_14) + $(am__objects_11) 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) \ @@ -1092,17 +1080,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_GPGME_TRUE@am__objects_15 = src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT) \ +@USE_GPGME_TRUE@am__objects_12 = 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_13 = 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@am__objects_14 = 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_18 = src/ostree/ostree-ot-builtin-trivial-httpd.$(OBJEXT) +@USE_LIBSOUP_TRUE@am__objects_15 = 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) \ @@ -1131,7 +1119,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_15) \ + $(am__objects_12) \ 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) \ @@ -1157,8 +1145,8 @@ am_ostree_OBJECTS = src/ostree/ostree-main.$(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_16) $(am__objects_17) \ - $(am__objects_18) + $(am__objects_1) $(am__objects_13) $(am__objects_14) \ + $(am__objects_15) nodist_ostree_OBJECTS = src/ostree/ostree-parse-datetime.$(OBJEXT) \ $(am__objects_1) ostree_OBJECTS = $(am_ostree_OBJECTS) $(nodist_ostree_OBJECTS) @@ -1214,9 +1202,9 @@ rofiles_fuse_OBJECTS = $(am_rofiles_fuse_OBJECTS) rofiles_fuse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rofiles_fuse_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am__objects_19 = \ +am__objects_16 = \ libglnx/tests/test_libglnx_errors-libglnx-testlib.$(OBJEXT) -am_test_libglnx_errors_OBJECTS = $(am__objects_19) \ +am_test_libglnx_errors_OBJECTS = $(am__objects_16) \ libglnx/tests/test_libglnx_errors-test-libglnx-errors.$(OBJEXT) test_libglnx_errors_OBJECTS = $(am_test_libglnx_errors_OBJECTS) test_libglnx_errors_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1224,9 +1212,9 @@ test_libglnx_errors_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_errors_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_20 = \ +am__objects_17 = \ libglnx/tests/test_libglnx_fdio-libglnx-testlib.$(OBJEXT) -am_test_libglnx_fdio_OBJECTS = $(am__objects_20) \ +am_test_libglnx_fdio_OBJECTS = $(am__objects_17) \ libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.$(OBJEXT) test_libglnx_fdio_OBJECTS = $(am_test_libglnx_fdio_OBJECTS) test_libglnx_fdio_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1234,9 +1222,9 @@ test_libglnx_fdio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_fdio_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ -am__objects_21 = \ +am__objects_18 = \ libglnx/tests/test_libglnx_macros-libglnx-testlib.$(OBJEXT) -am_test_libglnx_macros_OBJECTS = $(am__objects_21) \ +am_test_libglnx_macros_OBJECTS = $(am__objects_18) \ libglnx/tests/test_libglnx_macros-test-libglnx-macros.$(OBJEXT) test_libglnx_macros_OBJECTS = $(am_test_libglnx_macros_OBJECTS) test_libglnx_macros_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1244,9 +1232,9 @@ test_libglnx_macros_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_macros_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_22 = \ +am__objects_19 = \ libglnx/tests/test_libglnx_shutil-libglnx-testlib.$(OBJEXT) -am_test_libglnx_shutil_OBJECTS = $(am__objects_22) \ +am_test_libglnx_shutil_OBJECTS = $(am__objects_19) \ libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.$(OBJEXT) test_libglnx_shutil_OBJECTS = $(am_test_libglnx_shutil_OBJECTS) test_libglnx_shutil_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1254,9 +1242,9 @@ test_libglnx_shutil_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_shutil_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_23 = \ +am__objects_20 = \ libglnx/tests/test_libglnx_xattrs-libglnx-testlib.$(OBJEXT) -am_test_libglnx_xattrs_OBJECTS = $(am__objects_23) \ +am_test_libglnx_xattrs_OBJECTS = $(am__objects_20) \ libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.$(OBJEXT) test_libglnx_xattrs_OBJECTS = $(am_test_libglnx_xattrs_OBJECTS) test_libglnx_xattrs_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1550,6 +1538,7 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-chain-input-stream.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-checksum-input-stream.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-cmdprivate.Plo \ + src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-core.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-date-utils.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-deployment.Plo \ @@ -2033,12 +2022,10 @@ RECHECK_LOGS = $(TEST_LOGS) @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 \ +am__EXEEXT_21 = 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_24 = $(js_tests) $(am__EXEEXT_23) -am__EXEEXT_25 = tests/test-basic.sh tests/test-basic-user.sh \ +@BUILDOPT_GJS_TRUE@am__EXEEXT_22 = $(js_tests) $(am__EXEEXT_21) +am__EXEEXT_23 = 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 \ @@ -2093,11 +2080,11 @@ am__EXEEXT_25 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-signed-commit.sh tests/test-signed-pull.sh \ tests/test-pre-signed-pull.sh \ tests/test-signed-pull-summary.sh $(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) + $(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) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) @@ -2394,21 +2381,21 @@ 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_68) \ - $(am__append_89) \ + --disable-maintainer-mode $(NULL) $(am__append_64) \ + $(am__append_83) \ 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_44) \ 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_98) + tests/rofiles-fuse $(am__append_92) EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ COPYING README.md libglnx/README.md libglnx/COPYING \ libglnx/libglnx.m4 $(NULL) libglnx/Makefile-libglnx.am \ @@ -2423,35 +2410,34 @@ 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_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 \ + tests/ostree.supp $(NULL) $(am__append_70) $(am__append_73) \ + tests/libtest.sh $(am__append_74) $(am__append_79) \ + tests/libostreetest.h tests/libtest.sh $(NULL) \ + src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \ + src/boot/mkinitcpio 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_94) \ - $(am__append_97) + src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_88) \ + $(am__append_91) bin_SCRIPTS = lib_LTLIBRARIES = libostree-1.la -pkglibexec_SCRIPTS = $(am__append_90) +pkglibexec_SCRIPTS = $(am__append_84) noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \ libotutil.la libbupsplit.la 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_41) girdir = $(datadir)/gir-1.0 -gir_DATA = $(am__append_45) +gir_DATA = $(am__append_42) typelibdir = $(libdir)/girepository-1.0 -typelib_DATA = $(am__append_46) +typelib_DATA = $(am__append_43) gsettings_SCHEMAS = ostree_bootdir = $(prefix)/lib/ostree -ostree_boot_SCRIPTS = $(am__append_62) $(am__append_92) +ostree_boot_SCRIPTS = $(am__append_58) $(am__append_86) # We should probably consider flipping the default for DEBUG. Also, # include the builddir in $PATH so we find our just-built ostree @@ -2468,7 +2454,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_70) + $(NULL) $(am__append_66) 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) @@ -2508,16 +2494,19 @@ 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_88) \ - $(am__append_91) +INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_82) \ + $(am__append_85) 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} # Generated by coreos-assembler build-fast and kola + +# Rust stuff GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \ - gtk-doc.make fastbuild-*.qcow2 _kola_temp/ $(am__append_67) + gtk-doc.make fastbuild-*.qcow2 _kola_temp/ target/ Cargo.lock \ + $(am__append_63) 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) @@ -2661,6 +2650,8 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \ src/libostree/ostree-checksum-input-stream.h \ src/libostree/ostree-chain-input-stream.c \ src/libostree/ostree-chain-input-stream.h \ + src/libostree/ostree-content-writer.c \ + src/libostree/ostree-content-writer.h \ src/libostree/ostree-lzma-common.c \ src/libostree/ostree-lzma-common.h \ src/libostree/ostree-lzma-compressor.c \ @@ -2725,16 +2716,12 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \ src/libostree/ostree-kernel-args.h \ src/libostree/ostree-kernel-args.c $(NULL) $(am__append_16) \ $(am__append_17) $(am__append_18) $(am__append_19) \ - $(am__append_20) $(am__append_21) $(am__append_22) \ - $(am__append_29) $(am__append_30) $(am__append_33) \ - $(am__append_36) src/libostree/ostree-sign.c \ + $(am__append_20) $(am__append_27) $(am__append_28) \ + $(am__append_31) $(am__append_34) src/libostree/ostree-sign.c \ src/libostree/ostree-sign.h src/libostree/ostree-sign-dummy.c \ src/libostree/ostree-sign-dummy.h \ src/libostree/ostree-sign-ed25519.c \ src/libostree/ostree-sign-ed25519.h $(NULL) -libostree_experimental_headers = \ - $(NULL) - symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym # Uncomment this include when adding new development symbols. @@ -2751,17 +2738,17 @@ 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_23) $(am__append_25) $(am__append_27) \ - $(am__append_31) $(am__append_34) $(am__append_37) \ - $(am__append_39) $(am__append_41) + extern' $(am__append_21) $(am__append_23) $(am__append_25) \ + $(am__append_29) $(am__append_32) $(am__append_35) \ + $(am__append_37) $(am__append_39) libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64 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) \ - $(bupsplitpath) $(am__append_24) $(am__append_26) \ - $(am__append_28) $(am__append_32) $(am__append_35) \ - $(am__append_38) $(am__append_40) $(am__append_42) + $(bupsplitpath) $(am__append_22) $(am__append_24) \ + $(am__append_26) $(am__append_30) $(am__append_33) \ + $(am__append_36) $(am__append_38) $(am__append_40) EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files) # XXX: work around clang being passed -fstack-clash-protection which it doesn't understand @@ -2769,12 +2756,10 @@ EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files) 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@OSTree_1_0_gir_CFLAGS = $(libostree_1_la_CFLAGS) @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)) +@BUILDOPT_INTROSPECTION_TRUE@OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h,$(libostree_1_la_SOURCES)) gpgreadme_DATA = src/libostree/README-gpg gpgreadmedir = $(datadir)/ostree/trusted.gpg.d @@ -2800,8 +2785,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) \ - $(am__append_49) src/ostree/ot-admin-builtin-init-fs.c \ + src/ostree/parse-datetime.h $(NULL) $(am__append_45) \ + 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 \ @@ -2829,7 +2814,7 @@ ostree_SOURCES = src/ostree/main.c src/ostree/ot-builtin-admin.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_50) $(am__append_51) $(am__append_52) + $(am__append_46) $(am__append_47) $(am__append_48) nodist_ostree_SOURCES = \ src/ostree/parse-datetime.c \ $(NULL) @@ -2841,11 +2826,11 @@ 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_54) \ - $(am__append_56) $(am__append_58) +ostree_CFLAGS = $(ostree_bin_shared_cflags) $(am__append_50) \ + $(am__append_52) $(am__append_54) ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la \ - $(LIBSYSTEMD_LIBS) $(am__append_55) $(am__append_57) \ - $(am__append_59) + $(LIBSYSTEMD_LIBS) $(am__append_51) $(am__append_53) \ + $(am__append_55) @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) @@ -2854,8 +2839,8 @@ ostree_prepare_root_SOURCES = \ src/switchroot/ostree-prepare-root.c \ $(NULL) -ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_64) \ - $(am__append_65) +ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_60) \ + $(am__append_61) @BUILDOPT_USE_STATIC_COMPILER_FALSE@ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot ostree_remount_SOURCES = \ src/switchroot/ostree-mount-util.h \ @@ -2864,7 +2849,7 @@ ostree_remount_SOURCES = \ ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) \ $(OT_INTERNAL_GIO_UNIX_CFLAGS) -Isrc/switchroot \ - -I$(srcdir)/libglnx $(am__append_66) + -I$(srcdir)/libglnx $(am__append_62) ostree_remount_LDADD = $(AM_LDFLAGS) $(OT_INTERNAL_GIO_UNIX_LIBS) libglnx.la @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 \ @@ -2881,7 +2866,7 @@ ostree_remount_LDADD = $(AM_LDFLAGS) $(OT_INTERNAL_GIO_UNIX_LIBS) libglnx.la @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_75) + tests/ostree-remount-symlink-stamp $(am__append_69) dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh # This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below. @@ -2889,10 +2874,10 @@ 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_86) +dist_test_scripts = $(NULL) $(am__append_80) test_programs = tests/test-bloom tests/test-repo-finder-config \ - tests/test-repo-finder-mount $(NULL) $(am__append_83) \ - $(am__append_87) + tests/test-repo-finder-mount $(NULL) $(am__append_77) \ + $(am__append_81) _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 \ @@ -2948,12 +2933,8 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-pull-collections.sh tests/test-config.sh \ tests/test-signed-commit.sh tests/test-signed-pull.sh \ tests/test-pre-signed-pull.sh \ - tests/test-signed-pull-summary.sh $(NULL) $(am__append_71) \ - $(am__append_72) $(am__append_74) $(am__append_77) \ - $(am__append_78) -experimental_test_scripts = \ - $(NULL) - + tests/test-signed-pull-summary.sh $(NULL) $(am__append_67) \ + $(am__append_68) $(am__append_71) $(am__append_72) test_extra_programs = \ tests/get-byte-order \ tests/repo-finder-mount \ @@ -3029,7 +3010,7 @@ libreaddir_rand_la_LIBADD = \ $(NULL) libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \ - $(am__append_81) + $(am__append_75) _installed_or_uninstalled_test_programs = tests/test-varint \ tests/test-ot-unix-utils tests/test-bsdiff \ tests/test-mutable-tree tests/test-keyfile-utils \ @@ -3037,7 +3018,7 @@ _installed_or_uninstalled_test_programs = tests/test-varint \ 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 \ - tests/test-rfc2616-dates $(am__append_82) $(am__append_84) + tests/test-rfc2616-dates $(am__append_76) $(am__append_78) 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 @@ -3164,8 +3145,8 @@ tests_test_rfc2616_dates_LDADD = $(TESTS_LDADD) @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-sign.1 ostree-summary.1 \ -@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_93) \ -@ENABLE_MAN_TRUE@ $(am__append_95) $(am__append_96) +@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_87) \ +@ENABLE_MAN_TRUE@ $(am__append_89) $(am__append_90) @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)) @@ -3801,6 +3782,9 @@ src/libostree/libostree_1_la-ostree-checksum-input-stream.lo: \ src/libostree/libostree_1_la-ostree-chain-input-stream.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) +src/libostree/libostree_1_la-ostree-content-writer.lo: \ + src/libostree/$(am__dirstamp) \ + src/libostree/$(DEPDIR)/$(am__dirstamp) src/libostree/libostree_1_la-ostree-lzma-common.lo: \ src/libostree/$(am__dirstamp) \ src/libostree/$(DEPDIR)/$(am__dirstamp) @@ -4803,6 +4787,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-chain-input-stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-checksum-input-stream.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-cmdprivate.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-core.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-date-utils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-deployment.Plo@am__quote@ # am--include-marker @@ -5138,6 +5123,13 @@ src/libostree/libostree_1_la-ostree-chain-input-stream.lo: src/libostree/ostree- @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-chain-input-stream.lo `test -f 'src/libostree/ostree-chain-input-stream.c' || echo '$(srcdir)/'`src/libostree/ostree-chain-input-stream.c +src/libostree/libostree_1_la-ostree-content-writer.lo: src/libostree/ostree-content-writer.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-content-writer.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Tpo -c -o src/libostree/libostree_1_la-ostree-content-writer.lo `test -f 'src/libostree/ostree-content-writer.c' || echo '$(srcdir)/'`src/libostree/ostree-content-writer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-content-writer.c' object='src/libostree/libostree_1_la-ostree-content-writer.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-content-writer.lo `test -f 'src/libostree/ostree-content-writer.c' || echo '$(srcdir)/'`src/libostree/ostree-content-writer.c + src/libostree/libostree_1_la-ostree-lzma-common.lo: src/libostree/ostree-lzma-common.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-lzma-common.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Tpo -c -o src/libostree/libostree_1_la-ostree-lzma-common.lo `test -f 'src/libostree/ostree-lzma-common.c' || echo '$(srcdir)/'`src/libostree/ostree-lzma-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-lzma-common.Plo @@ -9083,7 +9075,6 @@ distcleancheck: distclean || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@check-local: check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LTLIBRARIES) \ $(check_SCRIPTS) $(check_DATA) @@ -9199,6 +9190,7 @@ distclean: distclean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-chain-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-checksum-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-cmdprivate.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-core.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-date-utils.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-deployment.Plo @@ -9477,6 +9469,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-chain-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-checksum-input-stream.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-cmdprivate.Plo + -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-content-writer.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-core.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-date-utils.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-deployment.Plo @@ -9827,7 +9820,10 @@ tests/%-symlink-stamp: % Makefile ln -sf "$${real_bin}" tests/$*; \ touch $@ @ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@check-local: +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@ echo "NOTE: Run the Rust installed tests (uninstalled) with ./tests/run-installed" @ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@ echo "NOTE: Exclusive installed tests are enabled; to run them, make install, then: gnome-desktop-testing-runner -p 0 libostree/" +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@check-local: +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ echo "NOTE: Run the Rust installed tests (uninstalled) with ./tests/run-installed" @USE_LIBSOUP_FALSE@no-soup-for-you-warning: @USE_LIBSOUP_FALSE@ @echo "WARNING: $(PACKAGE) was built without libsoup, which is currently" 1>&2 diff --git a/apidoc/Makefile.am b/apidoc/Makefile.am index 98a84d5f..f8aa5998 100644 --- a/apidoc/Makefile.am +++ b/apidoc/Makefile.am @@ -122,7 +122,13 @@ include $(top_srcdir)/gtk-doc.make EXTRA_DIST += \ version.xml \ ostree-sections.txt \ - ostree-experimental-sections.txt \ + $(NULL) + +# These only get included in the generated .gitignore when building with +# --enable-gtk-doc, so ensure they're always added. +GITIGNOREFILES = \ + ostree-overrides.txt \ + version.xml \ $(NULL) -include $(top_srcdir)/git.mk diff --git a/apidoc/Makefile.in b/apidoc/Makefile.in index 022dabe5..e3958357 100644 --- a/apidoc/Makefile.in +++ b/apidoc/Makefile.in @@ -540,7 +540,7 @@ SETUP_FILES = \ # This includes the standard gtk-doc make rules, copied by gtkdocize. EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml \ - ostree-sections.txt ostree-experimental-sections.txt $(NULL) + ostree-sections.txt $(NULL) DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp @@ -594,6 +594,14 @@ GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; + +# These only get included in the generated .gitignore when building with +# --enable-gtk-doc, so ensure they're always added. +GITIGNOREFILES = \ + ostree-overrides.txt \ + version.xml \ + $(NULL) + all: all-am .SUFFIXES: diff --git a/apidoc/html/index.html b/apidoc/html/index.html index 307015cb..60a23947 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2021.1

+

for OSTree 2021.2


diff --git a/apidoc/html/ostree-Core-repository-independent-functions.html b/apidoc/html/ostree-Core-repository-independent-functions.html index ddbae104..f4401e34 100644 --- a/apidoc/html/ostree-Core-repository-independent-functions.html +++ b/apidoc/html/ostree-Core-repository-independent-functions.html @@ -62,6 +62,14 @@ +gboolean + + +ostree_validate_collection_id () + + + + guchar * @@ -630,6 +638,56 @@ is a valid checksum string, FALSE otherwise


+

ostree_validate_collection_id ()

+
gboolean
+ostree_validate_collection_id (const char *collection_id,
+                               GError **error);
+

Check whether the given collection_id + is valid. Return an error if it is +invalid or NULL.

+

Valid collection IDs are reverse DNS names:

+
+

(This makes their format identical to D-Bus interface names, for consistency.)

+
+

Parameters

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

collection_id

A collection ID.

[nullable]

error

Error

 
+
+
+

Returns

+

TRUE if collection_id +is a valid collection ID, FALSE if it is invalid +or NULL

+
+

Since: 2018.6

+
+
+

ostree_checksum_to_bytes ()

guchar *
 ostree_checksum_to_bytes (const char *checksum);
diff --git a/apidoc/html/ostree-OstreeRepo.html b/apidoc/html/ostree-OstreeRepo.html index 420f24ed..192ace2a 100644 --- a/apidoc/html/ostree-OstreeRepo.html +++ b/apidoc/html/ostree-OstreeRepo.html @@ -139,6 +139,13 @@ const gchar * +ostree_repo_get_collection_id () + + + +const gchar * + + ostree_repo_get_bootloader () @@ -250,6 +257,14 @@ gboolean +ostree_repo_remote_list_collection_refs () + + + + +gboolean + + ostree_repo_remote_get_url () @@ -386,6 +401,14 @@ void +ostree_repo_transaction_set_collection_ref () + + + + +void + + ostree_repo_transaction_set_ref () @@ -418,6 +441,22 @@ gboolean +ostree_repo_set_collection_id () + + + + +gboolean + + +ostree_repo_set_collection_ref_immediate () + + + + +gboolean + + ostree_repo_sign_delta () @@ -479,6 +518,30 @@ +OstreeContentWriter * + + +ostree_repo_write_regfile () + + + + +char * + + +ostree_repo_write_regfile_inline () + + + + +char * + + +ostree_repo_write_symlink () + + + + gboolean @@ -554,6 +617,14 @@ gboolean +ostree_repo_list_collection_refs () + + + + +gboolean + + ostree_repo_remote_list_refs () @@ -562,6 +633,14 @@ gboolean +ostree_repo_resolve_collection_ref () + + + + +gboolean + + ostree_repo_load_variant () @@ -1332,7 +1411,7 @@ control of the curator of the collection, so they can demonstrate ownership of the collection. The later elements in the reverse DNS name can be used to disambiguate between multiple collections from the same curator. For example, org.exampleos.Main and org.exampleos.Apps. For the complete format of -collection IDs, see ostree_validate_collection_id().

+collection IDs, see ostree_validate_collection_id().

@@ -1746,6 +1825,34 @@ this function on a repository initialized via +

ostree_repo_get_collection_id ()

+
const gchar *
+ostree_repo_get_collection_id (OstreeRepo *self);
+

Get the collection ID of this repository. See collection IDs.

+
+

Parameters

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

self

an OstreeRepo

 
+
+
+

Returns

+

collection ID for the repository.

+

[nullable]

+
+

Since: 2018.6

+
+
+

ostree_repo_get_bootloader ()

const gchar *
 ostree_repo_get_bootloader (OstreeRepo *self);
@@ -2223,6 +2330,64 @@ array of remote names.


+

ostree_repo_remote_list_collection_refs ()

+
gboolean
+ostree_repo_remote_list_collection_refs
+                               (OstreeRepo *self,
+                                const char *remote_name,
+                                GHashTable **out_all_refs,
+                                GCancellable *cancellable,
+                                GError **error);
+

List refs advertised by remote_name +, including refs which are part of +collections. If the repository at remote_name + has a collection ID set, its +refs will be returned with that collection ID; otherwise, they will be returned +with a NULL collection ID in each OstreeCollectionRef key in out_all_refs +. +Any refs for other collections stored in the repository will also be returned. +No filtering is performed.

+
+

Parameters

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

self

Repo

 

remote_name

Name of the remote.

 

out_all_refs

Mapping from collection–ref to checksum.

[out][element-type OstreeCollectionRef utf8][transfer container]

cancellable

Cancellable

 

error

Error

 
+
+

Since: 2018.6

+
+
+

ostree_repo_remote_get_url ()

gboolean
 ostree_repo_remote_get_url (OstreeRepo *self,
@@ -3136,6 +3301,55 @@ arguments.


+

ostree_repo_transaction_set_collection_ref ()

+
void
+ostree_repo_transaction_set_collection_ref
+                               (OstreeRepo *self,
+                                const OstreeCollectionRef *ref,
+                                const char *checksum);
+

If checksum + is not NULL, then record it as the target of local ref named +ref +.

+

Otherwise, if checksum + is NULL, then record that the ref should +be deleted.

+

The change will not be written out immediately, but when the transaction +is completed with ostree_repo_commit_transaction(). If the transaction +is instead aborted with ostree_repo_abort_transaction(), no changes will +be made to the repository.

+

Multithreading: Since v2017.15 this function is MT safe.

+
+

Parameters

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

self

An OstreeRepo

 

ref

The collection–ref to write

 

checksum

The checksum to point it to.

[nullable]
+
+

Since: 2018.6

+
+
+

ostree_repo_transaction_set_ref ()

void
 ostree_repo_transaction_set_ref (OstreeRepo *self,
@@ -3364,6 +3578,105 @@ write permissions in the repo, where the cache is normally stored.


+

ostree_repo_set_collection_id ()

+
gboolean
+ostree_repo_set_collection_id (OstreeRepo *self,
+                               const gchar *collection_id,
+                               GError **error);
+

Set or clear the collection ID of this repository. See collection IDs. +The update will be made in memory, but must be written out to the repository +configuration on disk using ostree_repo_write_config().

+
+

Parameters

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

self

an OstreeRepo

 

collection_id

new collection ID, or NULL to unset it.

[nullable]

error

return location for a GError, or NULL

 
+
+
+

Returns

+

TRUE on success, FALSE otherwise

+
+

Since: 2018.6

+
+
+
+

ostree_repo_set_collection_ref_immediate ()

+
gboolean
+ostree_repo_set_collection_ref_immediate
+                               (OstreeRepo *self,
+                                const OstreeCollectionRef *ref,
+                                const char *checksum,
+                                GCancellable *cancellable,
+                                GError **error);
+

This is like ostree_repo_transaction_set_collection_ref(), except it may be +invoked outside of a transaction. This is presently safe for the +case where we're creating or overwriting an existing ref.

+
+

Parameters

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

self

An OstreeRepo

 

ref

The collection–ref to write

 

checksum

The checksum to point it to, or NULL to unset.

[nullable]

cancellable

GCancellable

 

error

GError

 
+
+
+

Returns

+

TRUE on success, FALSE otherwise

+
+

Since: 2018.6

+
+
+

ostree_repo_sign_delta ()

gboolean
 ostree_repo_sign_delta (OstreeRepo *self,
@@ -3828,6 +4141,238 @@ be returned as out_csum
 

+

ostree_repo_write_regfile ()

+
OstreeContentWriter *
+ostree_repo_write_regfile (OstreeRepo *self,
+                           const char *expected_checksum,
+                           guint32 uid,
+                           guint32 gid,
+                           guint32 mode,
+                           guint64 content_len,
+                           GVariant *xattrs,
+                           GError **error);
+

Create an OstreeContentWriter that allows streaming output into +the repository.

+
+

Parameters

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

self

Repo,

 

expected_checksum

Expected checksum (SHA-256 hex string).

[allow-none]

uid

user id

 

gid

group id

 

mode

Unix file mode

 

content_len

Expected content length

 

xattrs

Extended attributes (GVariant type (ayay)).

[allow-none]

error

Error

 
+
+
+

Returns

+

A new writer, or NULL on error.

+

[transfer full]

+
+

Since: 2021.2

+
+
+
+

ostree_repo_write_regfile_inline ()

+
char *
+ostree_repo_write_regfile_inline (OstreeRepo *self,
+                                  const char *expected_checksum,
+                                  guint32 uid,
+                                  guint32 gid,
+                                  guint32 mode,
+                                  GVariant *xattrs,
+                                  const guint8 *buf,
+                                  gsize len,
+                                  GCancellable *cancellable,
+                                  GError **error);
+

Synchronously create a file object from the provided content. This API +is intended for small files where it is reasonable to buffer the entire +content in memory.

+

Unlike ostree_repo_write_content(), if expected_checksum + is provided, +this function will not check for the presence of the object beforehand.

+
+

Parameters

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

self

repo

 

expected_checksum

The expected checksum.

[allow-none]

uid

User id

 

gid

Group id

 

mode

File mode

 

xattrs

Extended attributes, GVariant of type (ayay).

[allow-none]

buf

File contents.

[array length=len][element-type guint8]

cancellable

Cancellable

 

error

Error

 
+
+
+

Returns

+

Checksum (as a hex string) of the committed file.

+

[transfer full]

+
+

Since: 2021.2

+
+
+
+

ostree_repo_write_symlink ()

+
char *
+ostree_repo_write_symlink (OstreeRepo *self,
+                           const char *expected_checksum,
+                           guint32 uid,
+                           guint32 gid,
+                           GVariant *xattrs,
+                           const char *symlink_target,
+                           GCancellable *cancellable,
+                           GError **error);
+

Synchronously create a symlink object.

+

Unlike ostree_repo_write_content(), if expected_checksum + is provided, +this function will not check for the presence of the object beforehand.

+
+

Parameters

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

self

repo

 

expected_checksum

The expected checksum.

[allow-none]

uid

User id

 

gid

Group id

 

xattrs

Extended attributes, GVariant of type (ayay).

[allow-none]

symlink_target

Target of the symbolic link

 

cancellable

Cancellable

 

error

Error

 
+
+
+

Returns

+

Checksum (as a hex string) of the committed file.

+

[transfer full]

+
+

Since: 2021.2

+
+
+

ostree_repo_write_metadata_trusted ()

gboolean
 ostree_repo_write_metadata_trusted (OstreeRepo *self,
@@ -4355,6 +4900,79 @@ remote name) to checksums. Differently from 
+

ostree_repo_list_collection_refs ()

+
gboolean
+ostree_repo_list_collection_refs (OstreeRepo *self,
+                                  const char *match_collection_id,
+                                  GHashTable **out_all_refs,
+                                  OstreeRepoListRefsExtFlags flags,
+                                  GCancellable *cancellable,
+                                  GError **error);
+

List all local, mirrored, and remote refs, mapping them to the commit +checksums they currently point to in out_all_refs +. If match_collection_id + +is specified, the results will be limited to those with an equal collection +ID.

+

OstreeCollectionRefs are guaranteed to be returned with their collection ID +set to a non-NULL value; so no refs from refs/heads will be listed if no +collection ID is configured for the repository +(ostree_repo_get_collection_id()).

+

If you want to exclude refs from refs/remotes, use +OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in flags +. Similarly use +OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS to exclude refs from +refs/mirrors.

+
+

Parameters

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

self

Repo

 

match_collection_id

If non-NULL, only list refs from this collection.

[nullable]

out_all_refs

Mapping from collection–ref to checksum.

[out][element-type OstreeCollectionRef utf8][transfer container]

flags

Options controlling listing behavior

 

cancellable

Cancellable

 

error

Error

 
+
+
+

Returns

+

TRUE on success, FALSE otherwise

+
+

Since: 2018.6

+
+
+

ostree_repo_remote_list_refs ()

gboolean
 ostree_repo_remote_list_refs (OstreeRepo *self,
@@ -4402,6 +5020,91 @@ ostree_repo_remote_list_refs (
+

ostree_repo_resolve_collection_ref ()

+
gboolean
+ostree_repo_resolve_collection_ref (OstreeRepo *self,
+                                    const OstreeCollectionRef *ref,
+                                    gboolean allow_noent,
+                                    OstreeRepoResolveRevExtFlags flags,
+                                    char **out_rev,
+                                    GCancellable *cancellable,
+                                    GError **error);
+

Look up the checksum for the given collection–ref, returning it in out_rev +. +This will search through the mirrors and remote refs.

+

If allow_noent + is TRUE and the given ref + cannot be found, TRUE will be +returned and out_rev + will be set to NULL. If allow_noent + is FALSE and +the given ref + cannot be found, a G_IO_ERROR_NOT_FOUND error will be +returned.

+

If you want to check only local refs, not remote or mirrored ones, use the +flag OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY. This is analogous to using +ostree_repo_resolve_rev_ext() but for collection-refs.

+
+

Parameters

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

self

an OstreeRepo

 

ref

a collection–ref to resolve

 

allow_noent

TRUE to not throw an error if ref +doesn’t exist

 

flags

options controlling behaviour

 

out_rev

return location for +the checksum corresponding to ref +, or NULL if allow_noent +is TRUE and +the ref +could not be found.

[out][transfer full][optional][nullable]

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
+
+
+

Returns

+

TRUE on success, FALSE on failure

+
+

Since: 2018.6

+
+
+

ostree_repo_load_variant ()

gboolean
 ostree_repo_load_variant (OstreeRepo *self,
@@ -4517,7 +5220,9 @@ ostree_repo_load_variant_if_exists (out_variant
 .  If it doesn't exist,
-NULL is returned.

+out_variant + will be set to NULL and the function will still +return TRUE.

Parameters

@@ -4545,7 +5250,7 @@ exists, storing the result in out_variant - + @@ -6524,7 +7229,7 @@ repository, returning its result in out_indexes

out_variant

Metadata.

[out][transfer full][out][nullable][transfer full]

error

-

Since: 2020.7

+

Since: 2020.8


@@ -6580,6 +7285,7 @@ are reachable by an existing delta (if opt_to_commit
+

Since: 2020.8


diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2 index 23f1d5e2..e114b181 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -24,6 +24,7 @@ + @@ -103,6 +104,7 @@ + @@ -117,6 +119,7 @@ + @@ -134,10 +137,13 @@ + + + @@ -146,6 +152,9 @@ + + + @@ -155,7 +164,9 @@ + + @@ -199,8 +210,8 @@ - - + + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index 052e4007..6b944de0 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -369,6 +369,10 @@ ostree_collection_ref_new, function in ostree-ref
+ostree_content_writer_finish, function in ostree-content-writer +
+
+
ostree_create_directory_metadata, function in Core repository-independent functions
@@ -655,7 +659,7 @@ ostree_kernel_args_to_strv, function in ostree-kernel-args
-OSTREE_META_KEY_DEPLOY_COLLECTION_ID, macro in ostree-repo-experimental +OSTREE_META_KEY_DEPLOY_COLLECTION_ID, macro in ostree-repo-remote-finder
@@ -1130,11 +1134,11 @@ ostree_repo_finder_result_new, function in ostree-repo-finder
-ostree_repo_find_remotes_async, function in ostree-repo-experimental +ostree_repo_find_remotes_async, function in ostree-repo-remote-finder
-ostree_repo_find_remotes_finish, function in ostree-repo-experimental +ostree_repo_find_remotes_finish, function in ostree-repo-remote-finder
@@ -1146,7 +1150,7 @@ ostree_repo_find_remotes_finish, function in ostree-repo-experimental
-ostree_repo_get_collection_id, function in ostree-misc-experimental +ostree_repo_get_collection_id, function in OstreeRepo
@@ -1230,7 +1234,7 @@ ostree_repo_get_collection_id, function in ostree-misc-experimental
-ostree_repo_list_collection_refs, function in ostree-misc-experimental +ostree_repo_list_collection_refs, function in OstreeRepo
@@ -1290,7 +1294,7 @@ ostree_repo_list_collection_refs, function in ostree-misc-experimental
-OSTREE_REPO_METADATA_REF, macro in ostree-repo-experimental +OSTREE_REPO_METADATA_REF, macro in ostree-repo-remote-finder
@@ -1342,11 +1346,11 @@ OSTREE_REPO_METADATA_REF, macro in ostree-repo-experimental
-ostree_repo_pull_from_remotes_async, function in ostree-repo-experimental +ostree_repo_pull_from_remotes_async, function in ostree-repo-remote-finder
-ostree_repo_pull_from_remotes_finish, function in ostree-repo-experimental +ostree_repo_pull_from_remotes_finish, function in ostree-repo-remote-finder
@@ -1418,7 +1422,7 @@ ostree_repo_pull_from_remotes_finish, function in ostree-repo-experimental
-ostree_repo_remote_list_collection_refs, function in ostree-misc-experimental +ostree_repo_remote_list_collection_refs, function in OstreeRepo
@@ -1426,11 +1430,11 @@ ostree_repo_remote_list_collection_refs, function in ostree-misc-experimental
-ostree_repo_resolve_collection_ref, function in ostree-misc-experimental +ostree_repo_resolve_collection_ref, function in OstreeRepo
-ostree_repo_resolve_keyring_for_collection, function in ostree-repo-experimental +ostree_repo_resolve_keyring_for_collection, function in ostree-repo-remote-finder
@@ -1454,11 +1458,11 @@ ostree_repo_resolve_keyring_for_collection, function in ostree-repo-experimental
-ostree_repo_set_collection_id, function in ostree-misc-experimental +ostree_repo_set_collection_id, function in OstreeRepo
-ostree_repo_set_collection_ref_immediate, function in ostree-misc-experimental +ostree_repo_set_collection_ref_immediate, function in OstreeRepo
@@ -1498,7 +1502,7 @@ ostree_repo_set_collection_ref_immediate, function in ostree-misc-experimental
-ostree_repo_transaction_set_collection_ref, function in ostree-misc-experimental +ostree_repo_transaction_set_collection_ref, function in OstreeRepo
@@ -1625,6 +1629,18 @@ ostree_repo_transaction_set_collection_ref, function in ostree-misc-experimental ostree_repo_write_mtree, function in OstreeRepo
+
+ostree_repo_write_regfile, function in OstreeRepo +
+
+
+ostree_repo_write_regfile_inline, function in OstreeRepo +
+
+
+ostree_repo_write_symlink, function in OstreeRepo +
+

S

OstreeSePolicy, typedef in SELinux policy management @@ -2013,7 +2029,7 @@ ostree_repo_transaction_set_collection_ref, function in ostree-misc-experimental
-ostree_validate_collection_id, function in ostree-misc-experimental +ostree_validate_collection_id, function in Core repository-independent functions
diff --git a/apidoc/ostree-experimental-sections.txt b/apidoc/ostree-experimental-sections.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index e4954c70..b09ba6f9 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -107,6 +107,7 @@ OSTREE_SUMMARY_GVARIANT_STRING OSTREE_SUMMARY_GVARIANT_FORMAT ostree_metadata_variant_type ostree_validate_checksum_string +ostree_validate_collection_id ostree_checksum_to_bytes ostree_checksum_to_bytes_v ostree_checksum_from_bytes @@ -164,6 +165,12 @@ ostree_check_version ostree_commit_sizes_entry_get_type +
+ostree-content-writer +ostree_content_writer_get_type +ostree_content_writer_finish +
+
ostree-deployment OstreeDeployment @@ -304,6 +311,7 @@ ostree_repo_is_system ostree_repo_is_writable ostree_repo_create_at ostree_repo_create +ostree_repo_get_collection_id ostree_repo_get_bootloader ostree_repo_get_path ostree_repo_get_mode @@ -319,6 +327,7 @@ ostree_repo_remote_delete OstreeRepoRemoteChange ostree_repo_remote_change ostree_repo_remote_list +ostree_repo_remote_list_collection_refs ostree_repo_remote_get_url ostree_repo_remote_get_gpg_verify ostree_repo_remote_get_gpg_verify_summary @@ -337,10 +346,13 @@ ostree_repo_prepare_transaction ostree_repo_commit_transaction ostree_repo_abort_transaction ostree_repo_transaction_set_refspec +ostree_repo_transaction_set_collection_ref ostree_repo_transaction_set_ref ostree_repo_set_ref_immediate ostree_repo_set_alias_ref_immediate ostree_repo_set_cache_dir +ostree_repo_set_collection_id +ostree_repo_set_collection_ref_immediate ostree_repo_sign_delta ostree_repo_has_object ostree_repo_mark_commit_partial @@ -349,6 +361,9 @@ ostree_repo_write_metadata ostree_repo_write_metadata_async ostree_repo_write_metadata_finish ostree_repo_write_content +ostree_repo_write_regfile +ostree_repo_write_regfile_inline +ostree_repo_write_symlink ostree_repo_write_metadata_trusted ostree_repo_write_metadata_stream_trusted ostree_repo_write_content_trusted @@ -360,7 +375,9 @@ ostree_repo_resolve_rev_ext ostree_repo_list_refs OstreeRepoListRefsExtFlags ostree_repo_list_refs_ext +ostree_repo_list_collection_refs ostree_repo_remote_list_refs +ostree_repo_resolve_collection_ref ostree_repo_load_variant OstreeRepoCommitState ostree_repo_load_commit @@ -619,7 +636,7 @@ ostree_remote_get_type
-ostree-repo-experimental +ostree-repo-remote-finder ostree_repo_find_remotes_async ostree_repo_find_remotes_finish ostree_repo_pull_from_remotes_async @@ -683,18 +700,6 @@ ostree_repo_finder_override_add_uri ostree_repo_finder_override_get_type
-
-ostree-misc-experimental -ostree_repo_get_collection_id -ostree_repo_set_collection_id -ostree_validate_collection_id -ostree_repo_list_collection_refs -ostree_repo_remote_list_collection_refs -ostree_repo_set_collection_ref_immediate -ostree_repo_transaction_set_collection_ref -ostree_repo_resolve_collection_ref -
-
ostree-kernel-args OstreeKernelArgs diff --git a/apidoc/ostree.types b/apidoc/ostree.types index d9a4dbf4..0f4007c7 100644 --- a/apidoc/ostree.types +++ b/apidoc/ostree.types @@ -5,6 +5,7 @@ ostree_chain_input_stream_get_type ostree_checksum_input_stream_get_type ostree_collection_ref_get_type ostree_commit_sizes_entry_get_type +ostree_content_writer_get_type ostree_deployment_get_type ostree_diff_item_get_type ostree_gpg_verify_result_get_type diff --git a/apidoc/version.xml b/apidoc/version.xml index 3ad13fe7..c24c13a2 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2021.1 \ No newline at end of file +2021.2 \ No newline at end of file diff --git a/config.h.in b/config.h.in index 1957881f..2e8e0224 100644 --- a/config.h.in +++ b/config.h.in @@ -141,9 +141,6 @@ /* Define to disable internal GPGME support */ #undef OSTREE_DISABLE_GPGME -/* Define if experimental API should be enabled */ -#undef OSTREE_ENABLE_EXPERIMENTAL_API - /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff --git a/configure b/configure index 5602ec3d..138ba0e4 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 2021.1. +# Generated by GNU Autoconf 2.69 for libostree 2021.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2021.1' -PACKAGE_STRING='libostree 2021.1' +PACKAGE_VERSION='2021.2' +PACKAGE_STRING='libostree 2021.2' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -637,8 +637,6 @@ LTLIBOBJS LIBOBJS BUILDOPT_IS_DEVEL_BUILD_FALSE BUILDOPT_IS_DEVEL_BUILD_TRUE -ENABLE_EXPERIMENTAL_API_FALSE -ENABLE_EXPERIMENTAL_API_TRUE BUILDOPT_GJS_FALSE BUILDOPT_GJS_TRUE GJS @@ -956,7 +954,6 @@ with_modern_grub with_builtin_grub2_mkconfig with_grub2_mkconfig_path with_static_compiler -enable_experimental_api ' ac_precious_vars='build_alias host_alias @@ -1554,7 +1551,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 2021.1 to adapt to many kinds of systems. +\`configure' configures libostree 2021.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1624,7 +1621,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2021.1:";; + short | recursive ) echo "Configuration of libostree 2021.2:";; esac cat <<\_ACEOF @@ -1671,9 +1668,6 @@ Optional Features: --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] --enable-man generate man pages [default=auto] --enable-rofiles-fuse generate rofiles-fuse helper [default=yes] - --enable-experimental-api - Enable unstable experimental API in libostree - [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1889,7 +1883,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2021.1 +libostree configure 2021.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2361,7 +2355,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 2021.1, which was +It was created by libostree $as_me 2021.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3229,7 +3223,7 @@ fi # Define the identity of the package. PACKAGE='libostree' - VERSION='2021.1' + VERSION='2021.2' # Some tools Automake needs. @@ -5963,9 +5957,9 @@ test -n "$YACC" || YACC="yacc" YEAR_VERSION=2021 -RELEASE_VERSION=1 +RELEASE_VERSION=2 -PACKAGE_VERSION=2021.1 +PACKAGE_VERSION=2021.2 if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : @@ -18148,34 +18142,6 @@ else fi -# Do we enable building experimental (non-stable) API? -# The OSTREE_ENABLE_EXPERIMENTAL_API #define is used internally and in public -# headers, so any consumer of libostree who wants to use experimental API must -# #define OSTREE_ENABLE_EXPERIMENTAL_API 1 -# before including libostree headers. This means the name in the AC_DEFINE below -# is public API. -# Check whether --enable-experimental-api was given. -if test "${enable_experimental_api+set}" = set; then : - enableval=$enable_experimental_api; -else - enable_experimental_api=no -fi - -if test x$enable_experimental_api = xyes; then : - -$as_echo "#define OSTREE_ENABLE_EXPERIMENTAL_API 1" >>confdefs.h - - OSTREE_FEATURES="$OSTREE_FEATURES experimental" - -fi - if test x$enable_experimental_api = xyes; then - ENABLE_EXPERIMENTAL_API_TRUE= - ENABLE_EXPERIMENTAL_API_FALSE='#' -else - ENABLE_EXPERIMENTAL_API_TRUE='#' - ENABLE_EXPERIMENTAL_API_FALSE= -fi - if test x$is_release_build != xyes; then BUILDOPT_IS_DEVEL_BUILD_TRUE= BUILDOPT_IS_DEVEL_BUILD_FALSE='#' @@ -18487,10 +18453,6 @@ if test -z "${BUILDOPT_GJS_TRUE}" && test -z "${BUILDOPT_GJS_FALSE}"; then as_fn_error $? "conditional \"BUILDOPT_GJS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${ENABLE_EXPERIMENTAL_API_TRUE}" && test -z "${ENABLE_EXPERIMENTAL_API_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_EXPERIMENTAL_API\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${BUILDOPT_IS_DEVEL_BUILD_TRUE}" && test -z "${BUILDOPT_IS_DEVEL_BUILD_FALSE}"; then as_fn_error $? "conditional \"BUILDOPT_IS_DEVEL_BUILD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18892,7 +18854,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 2021.1, which was +This file was extended by libostree $as_me 2021.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18958,7 +18920,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 2021.1 +libostree config.status 2021.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20676,8 +20638,7 @@ echo " gjs-based tests: $have_gjs dracut: $with_dracut mkinitcpio: $with_mkinitcpio - Static compiler for ostree-prepare-root: $with_static_compiler - Experimental API $enable_experimental_api" + Static compiler for ostree-prepare-root: $with_static_compiler" if test x$with_builtin_grub2_mkconfig = xyes; then : echo " builtin grub2-mkconfig (instead of system): $with_builtin_grub2_mkconfig" diff --git a/configure.ac b/configure.ac index 26713077..e8108732 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. m4_define([year_version], [2021]) -m4_define([release_version], [1]) +m4_define([release_version], [2]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes @@ -560,21 +560,6 @@ AS_IF([test "x$found_introspection" = xyes && test x$using_asan != xyes], [ ], [have_gjs=no]) AM_CONDITIONAL(BUILDOPT_GJS, test x$have_gjs = xyes) -# Do we enable building experimental (non-stable) API? -# The OSTREE_ENABLE_EXPERIMENTAL_API #define is used internally and in public -# headers, so any consumer of libostree who wants to use experimental API must -# #define OSTREE_ENABLE_EXPERIMENTAL_API 1 -# before including libostree headers. This means the name in the AC_DEFINE below -# is public API. -AC_ARG_ENABLE([experimental-api], - [AS_HELP_STRING([--enable-experimental-api], - [Enable unstable experimental API in libostree [default=no]])],, - [enable_experimental_api=no]) -AS_IF([test x$enable_experimental_api = xyes], - [AC_DEFINE([OSTREE_ENABLE_EXPERIMENTAL_API],[1],[Define if experimental API should be enabled]) - OSTREE_FEATURES="$OSTREE_FEATURES experimental"] -) -AM_CONDITIONAL([ENABLE_EXPERIMENTAL_API],[test x$enable_experimental_api = xyes]) AM_CONDITIONAL([BUILDOPT_IS_DEVEL_BUILD],[test x$is_release_build != xyes]) AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD], AC_DEFINE([BUILDOPT_IS_DEVEL_BUILD], [1], [Define if doing a development build]) @@ -622,8 +607,7 @@ echo " gjs-based tests: $have_gjs dracut: $with_dracut mkinitcpio: $with_mkinitcpio - Static compiler for ostree-prepare-root: $with_static_compiler - Experimental API $enable_experimental_api" + Static compiler for ostree-prepare-root: $with_static_compiler" AS_IF([test x$with_builtin_grub2_mkconfig = xyes], [ echo " builtin grub2-mkconfig (instead of system): $with_builtin_grub2_mkconfig" ], [ diff --git a/src/boot/mkinitcpio/ostree-mkinitcpio.conf b/src/boot/mkinitcpio/ostree-mkinitcpio.conf new file mode 100644 index 00000000..75d26eb7 --- /dev/null +++ b/src/boot/mkinitcpio/ostree-mkinitcpio.conf @@ -0,0 +1 @@ +HOOKS="base systemd ostree autodetect modconf block filesystems keyboard fsck" diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym index e2d6efc4..e3cd14a4 100644 --- a/src/libostree/libostree-devel.sym +++ b/src/libostree/libostree-devel.sym @@ -26,8 +26,8 @@ * edit this other than to update the year. This is just a copy/paste * source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION * with whatever the next version with new symbols will be. -LIBOSTREE_2020.$NEWVERSION { +LIBOSTREE_2021.$NEWVERSION { global: someostree_symbol_deleteme; -} LIBOSTREE_2020.$LASTSTABLE; +} LIBOSTREE_2021.$LASTSTABLE; */ diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym index f1c773b3..9a45c0d8 100644 --- a/src/libostree/libostree-released.sym +++ b/src/libostree/libostree-released.sym @@ -644,6 +644,15 @@ global: ostree_sysroot_require_booted_deployment; } LIBOSTREE_2020.8; +LIBOSTREE_2021.2 { +global: + ostree_repo_write_regfile_inline; + ostree_repo_write_symlink; + ostree_repo_write_regfile; + ostree_content_writer_get_type; + ostree_content_writer_finish; +} LIBOSTREE_2021.1; + /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. */ diff --git a/src/libostree/ostree-content-writer.c b/src/libostree/ostree-content-writer.c new file mode 100644 index 00000000..2e375307 --- /dev/null +++ b/src/libostree/ostree-content-writer.c @@ -0,0 +1,144 @@ +/* + * 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-content-writer.h" +#include "ostree-repo-private.h" +#include "ostree-autocleanups.h" + +struct _OstreeContentWriter +{ + GOutputStream parent_instance; + + OstreeRepo *repo; + OstreeRepoBareContent output; +}; + +G_DEFINE_TYPE (OstreeContentWriter, ostree_content_writer, G_TYPE_OUTPUT_STREAM) + +static void ostree_content_writer_finalize (GObject *object); +static gssize ostree_content_writer_write (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error); +static gboolean ostree_content_writer_close (GOutputStream *stream, + GCancellable *cancellable, + GError **error); + +static void +ostree_content_writer_class_init (OstreeContentWriterClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GOutputStreamClass *stream_class = G_OUTPUT_STREAM_CLASS (klass); + + gobject_class->finalize = ostree_content_writer_finalize; + + stream_class->write_fn = ostree_content_writer_write; + stream_class->close_fn = ostree_content_writer_close; +} + +static void +ostree_content_writer_finalize (GObject *object) +{ + OstreeContentWriter *stream; + + stream = (OstreeContentWriter*)(object); + + g_clear_object (&stream->repo); + _ostree_repo_bare_content_cleanup (&stream->output); + + G_OBJECT_CLASS (ostree_content_writer_parent_class)->finalize (object); +} + +static void +ostree_content_writer_init (OstreeContentWriter *self) +{ + self->output.initialized = FALSE; + } + +OstreeContentWriter * +_ostree_content_writer_new (OstreeRepo *repo, + const char *checksum, + guint uid, + guint gid, + guint mode, + guint64 content_len, + GVariant *xattrs, + GError **error) +{ + g_autoptr(OstreeContentWriter) stream = g_object_new (OSTREE_TYPE_CONTENT_WRITER, NULL); + stream->repo = g_object_ref (repo); + if (!_ostree_repo_bare_content_open (stream->repo, checksum, content_len, uid, gid, mode, xattrs, + &stream->output, NULL, error)) + return NULL; + return g_steal_pointer (&stream); +} + +static gssize +ostree_content_writer_write (GOutputStream *stream, + const void *buffer, + gsize count, + GCancellable *cancellable, + GError **error) +{ + OstreeContentWriter *self = (OstreeContentWriter*) stream; + + if (g_cancellable_set_error_if_cancelled (cancellable, error)) + return -1; + + if (!_ostree_repo_bare_content_write (self->repo, &self->output, + buffer, count, cancellable, error)) + return -1; + return count; +} + +static gboolean +ostree_content_writer_close (GOutputStream *stream, + GCancellable *cancellable, + GError **error) +{ + /* We don't expect people to invoke close() - they need to call finish() + * to get the checksum. We'll clean up in finalize anyways if need be. + */ + return TRUE; +} + +/** + * ostree_content_writer_finish: + * @self: Writer + * @cancellable: Cancellable + * @error: Error + * + * Complete the object write and return the checksum. + * Returns: (transfer full): Checksum, or %NULL on error + */ +char * +ostree_content_writer_finish (OstreeContentWriter *self, + GCancellable *cancellable, + GError **error) +{ + char actual_checksum[OSTREE_SHA256_STRING_LEN+1]; + if (!_ostree_repo_bare_content_commit (self->repo, &self->output, actual_checksum, + sizeof (actual_checksum), cancellable, error)) + return NULL; + + return g_strdup (actual_checksum); +} diff --git a/src/libostree/ostree-content-writer.h b/src/libostree/ostree-content-writer.h new file mode 100644 index 00000000..87a85aa0 --- /dev/null +++ b/src/libostree/ostree-content-writer.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2021 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. + */ + +#pragma once + +#include + +G_BEGIN_DECLS + +#define OSTREE_TYPE_CONTENT_WRITER (ostree_content_writer_get_type ()) +_OSTREE_PUBLIC G_DECLARE_FINAL_TYPE (OstreeContentWriter, ostree_content_writer, OSTREE, CONTENT_WRITER, GOutputStream) + +_OSTREE_PUBLIC +char * ostree_content_writer_finish (OstreeContentWriter *self, + GCancellable *cancellable, + GError **error); + +G_END_DECLS diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index f822101a..83f409ba 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -391,24 +391,18 @@ variant_to_lenprefixed_buffer (GVariant *variant) const guint32 variant_size_u32_be = GUINT32_TO_BE((guint32) variant_size); g_string_append_len (buf, (char*)&variant_size_u32_be, sizeof (variant_size_u32_be)); - const gsize alignment_offset = sizeof (variant_size_u32_be); /* Write NULs for alignment. At the moment this is a constant 4 bytes (i.e. - * align to 8, since the length is 4 bytes). For now, I decided to keep some - * of the (now legacy) more generic logic here in case we want to revive it - * later. + * align to 8, since the length is 4 bytes). If we ever change this, the + * logic is here: */ - const guint alignment = 8; - const guchar padding_nuls[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - guint bits; - if (alignment == 8) - bits = alignment_offset & 7; /* mod 8 */ - else - bits = alignment_offset & 3; /* mod 4 */ - const guint padding_len = alignment - bits; - - if (bits > 0) - g_string_append_len (buf, (char*)padding_nuls, padding_len); + // const gsize alignment_offset = sizeof (variant_size_u32_be); + // const guint bits = alignment_offset & 7; /* mod 8 */ + // const guint padding_len = alignment - bits; + #define padding_len sizeof(guint32) + const guchar padding_nuls[padding_len] = {0, 0, 0, 0}; + g_string_append_len (buf, (char*)padding_nuls, padding_len); + #undef padding_len g_string_append_len (buf, (char*)g_variant_get_data (variant), g_variant_get_size (variant)); return g_string_free_to_bytes (g_steal_pointer (&buf)); @@ -418,18 +412,12 @@ variant_to_lenprefixed_buffer (GVariant *variant) * header_and_input_to_stream: * @file_header: A file header * @input: File raw content stream - * @out_input: (out): Serialized object stream - * @cancellable: Cancellable - * @error: Error * * Combines @file_header and @input into a single stream. */ -static gboolean +static GInputStream * header_and_input_to_stream (GBytes *file_header, - GInputStream *input, - GInputStream **out_input, - GCancellable *cancellable, - GError **error) + GInputStream *input) { /* Our result stream chain */ g_autoptr(GPtrArray) streams = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref); @@ -444,10 +432,7 @@ header_and_input_to_stream (GBytes *file_header, g_ptr_array_add (streams, g_object_ref (input)); /* Return the result stream */ - g_autoptr(GInputStream) ret_input = (GInputStream*)ostree_chain_input_stream_new (streams); - ot_transfer_out_value (out_input, &ret_input); - - return TRUE; + return (GInputStream*)ostree_chain_input_stream_new (streams); } /* Convert file metadata + file content into an archive-format stream. */ @@ -468,11 +453,8 @@ _ostree_raw_file_to_archive_stream (GInputStream *input, zlib_input = g_converter_input_stream_new (input, zlib_compressor); } g_autoptr(GBytes) file_header = _ostree_zlib_file_header_new (file_info, xattrs); - return header_and_input_to_stream (file_header, - zlib_input, - out_input, - cancellable, - error); + *out_input = header_and_input_to_stream (file_header, zlib_input); + return TRUE; } /** @@ -566,12 +548,7 @@ ostree_raw_file_to_content_stream (GInputStream *input, GError **error) { g_autoptr(GBytes) file_header = _ostree_file_header_new (file_info, xattrs); - if (!header_and_input_to_stream (file_header, - input, - out_input, - cancellable, - error)) - return FALSE; + *out_input = header_and_input_to_stream (file_header, input); if (out_length) *out_length = g_bytes_get_size (file_header) + g_file_info_get_size (file_info); return TRUE; diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 9d5c6d3b..1ac53259 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2769,6 +2769,126 @@ ostree_repo_write_content (OstreeRepo *self, cancellable, error); } +/** + * ostree_repo_write_regfile_inline: + * @self: repo + * @expected_checksum: (allow-none): The expected checksum + * @uid: User id + * @gid: Group id + * @mode: File mode + * @xattrs: (allow-none): Extended attributes, GVariant of type (ayay) + * @buf: (array length=len) (element-type guint8): File contents + * @cancellable: Cancellable + * @error: Error + * + * Synchronously create a file object from the provided content. This API + * is intended for small files where it is reasonable to buffer the entire + * content in memory. + * + * Unlike `ostree_repo_write_content()`, if @expected_checksum is provided, + * this function will not check for the presence of the object beforehand. + * + * Returns: (transfer full): Checksum (as a hex string) of the committed file + * Since: 2021.2 + */ +_OSTREE_PUBLIC +char * +ostree_repo_write_regfile_inline (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + guint32 mode, + GVariant *xattrs, + const guint8* buf, + gsize len, + GCancellable *cancellable, + GError **error) +{ + g_autoptr(GInputStream) memin = g_memory_input_stream_new_from_data (buf, len, NULL); + g_autoptr(GFileInfo) finfo = _ostree_mode_uidgid_to_gfileinfo (mode, uid, gid); + g_file_info_set_size (finfo, len); + g_autofree guint8* csum = NULL; + if (!write_content_object (self, expected_checksum, + memin, finfo, xattrs, &csum, + cancellable, error)) + return NULL; + return ostree_checksum_from_bytes (csum); +} + +/** + * ostree_repo_write_symlink: + * @self: repo + * @expected_checksum: (allow-none): The expected checksum + * @uid: User id + * @gid: Group id + * @xattrs: (allow-none): Extended attributes, GVariant of type (ayay) + * @symlink_target: Target of the symbolic link + * @cancellable: Cancellable + * @error: Error + * + * Synchronously create a symlink object. + * + * Unlike `ostree_repo_write_content()`, if @expected_checksum is provided, + * this function will not check for the presence of the object beforehand. + * + * Returns: (transfer full): Checksum (as a hex string) of the committed file + * Since: 2021.2 + */ +char * +ostree_repo_write_symlink (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + GVariant *xattrs, + const char *symlink_target, + GCancellable *cancellable, + GError **error) +{ + g_assert (symlink_target != NULL); + + g_autoptr(GFileInfo) finfo = _ostree_mode_uidgid_to_gfileinfo (S_IFLNK | 0777, uid, gid); + g_file_info_set_attribute_byte_string (finfo, "standard::symlink-target", symlink_target); + g_autofree guint8* csum = NULL; + if (!write_content_object (self, expected_checksum, + NULL, finfo, xattrs, &csum, + cancellable, error)) + return NULL; + return ostree_checksum_from_bytes (csum); +} + +/** + * ostree_repo_write_regfile: + * @self: Repo, + * @expected_checksum: (allow-none): Expected checksum (SHA-256 hex string) + * @uid: user id + * @gid: group id + * @mode: Unix file mode + * @content_len: Expected content length + * @xattrs: (allow-none): Extended attributes (GVariant type `(ayay)`) + * @error: Error + * + * Create an `OstreeContentWriter` that allows streaming output into + * the repository. + * + * Returns: (transfer full): A new writer, or %NULL on error + * Since: 2021.2 + */ +OstreeContentWriter * +ostree_repo_write_regfile (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + guint32 mode, + guint64 content_len, + GVariant *xattrs, + GError **error) +{ + if (self->mode == OSTREE_REPO_MODE_ARCHIVE) + return glnx_null_throw (error, "Cannot currently use ostree_repo_write_regfile() on an archive mode repository"); + + return _ostree_content_writer_new (self, expected_checksum, uid, gid, mode, content_len, xattrs, error); +} + typedef struct { OstreeRepo *repo; char *expected_checksum; diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 6c01bc6b..14b29c0b 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -462,6 +462,16 @@ _ostree_repo_bare_content_commit (OstreeRepo *self, GCancellable *cancellable, GError **error); +OstreeContentWriter * +_ostree_content_writer_new (OstreeRepo *repo, + const char *checksum, + guint uid, + guint gid, + guint mode, + guint64 content_len, + GVariant *xattrs, + GError **error); + gboolean _ostree_repo_load_file_bare (OstreeRepo *self, const char *checksum, diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c index c2536724..e4280af0 100644 --- a/src/libostree/ostree-repo-static-delta-core.c +++ b/src/libostree/ostree-repo-static-delta-core.c @@ -178,7 +178,7 @@ ostree_repo_list_static_delta_names (OstreeRepo *self, * This function synchronously enumerates all static delta indexes in the * repository, returning its result in @out_indexes. * - * Since: 2020.7 + * Since: 2020.8 */ gboolean ostree_repo_list_static_delta_indexes (OstreeRepo *self, @@ -1254,6 +1254,8 @@ file_has_content (OstreeRepo *repo, * This is normally called automatically when the summary is updated in ostree_repo_regenerate_summary(). * * Locking: shared + * + * Since: 2020.8 */ gboolean ostree_repo_static_delta_reindex (OstreeRepo *repo, diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 0c045c41..b2347b47 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -3686,6 +3686,10 @@ load_metadata_internal (OstreeRepo *self, g_return_val_if_fail (OSTREE_OBJECT_TYPE_IS_META (objtype), FALSE); g_return_val_if_fail (objtype == OSTREE_OBJECT_TYPE_COMMIT || out_state == NULL, FALSE); + /* Ensure this is set to NULL if we didn't find the object */ + if (out_variant) + *out_variant = NULL; + /* Special caching for dirmeta objects, since they're commonly referenced many * times. */ @@ -4452,12 +4456,13 @@ ostree_repo_query_object_storage_size (OstreeRepo *self, * @self: Repo * @objtype: Object type * @sha256: ASCII checksum - * @out_variant: (out) (transfer full): Metadata + * @out_variant: (out) (nullable) (transfer full): Metadata * @error: Error * * Attempt to load the metadata object @sha256 of type @objtype if it * exists, storing the result in @out_variant. If it doesn't exist, - * %NULL is returned. + * @out_variant will be set to %NULL and the function will still + * return TRUE. */ gboolean ostree_repo_load_variant_if_exists (OstreeRepo *self, diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index e64c3230..f94d70be 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -423,6 +423,38 @@ gboolean ostree_repo_write_content (OstreeRepo *self, GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC +char * ostree_repo_write_regfile_inline (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + guint32 mode, + GVariant *xattrs, + const guint8* buf, + gsize len, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC +OstreeContentWriter * ostree_repo_write_regfile (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + guint32 mode, + guint64 content_len, + GVariant *xattrs, + GError **error); + +_OSTREE_PUBLIC +char * ostree_repo_write_symlink (OstreeRepo *self, + const char *expected_checksum, + guint32 uid, + guint32 gid, + GVariant *xattrs, + const char *symlink_target, + GCancellable *cancellable, + GError **error); + _OSTREE_PUBLIC gboolean ostree_repo_write_metadata_trusted (OstreeRepo *self, OstreeObjectType objtype, diff --git a/src/libostree/ostree-types.h b/src/libostree/ostree-types.h index bbc6ca64..c6f9cba1 100644 --- a/src/libostree/ostree-types.h +++ b/src/libostree/ostree-types.h @@ -38,6 +38,7 @@ typedef struct OstreeSysroot OstreeSysroot; typedef struct OstreeSysrootUpgrader OstreeSysrootUpgrader; typedef struct OstreeMutableTree OstreeMutableTree; typedef struct OstreeRepoFile OstreeRepoFile; +typedef struct _OstreeContentWriter OstreeContentWriter; typedef struct OstreeRemote OstreeRemote; G_END_DECLS diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h index ce426ebc..be4250d9 100644 --- a/src/libostree/ostree-version.h +++ b/src/libostree/ostree-version.h @@ -43,7 +43,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (1) +#define OSTREE_RELEASE_VERSION (2) /** * OSTREE_VERSION @@ -52,7 +52,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2021.1) +#define OSTREE_VERSION (2021.2) /** * OSTREE_VERSION_S: @@ -62,7 +62,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2021.1" +#define OSTREE_VERSION_S "2021.2" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) @@ -100,4 +100,4 @@ * * Since: 2019.3 */ -#define OSTREE_BUILT_FEATURES "libsoup gpgme ex-fsverity libarchive selinux libmount systemd release p2p" +#define OSTREE_BUILT_FEATURES "libcurl libsoup gpgme ex-fsverity libarchive selinux openssl libmount systemd release p2p" diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c index 4033caa4..7ace1af0 100644 --- a/src/rofiles-fuse/main.c +++ b/src/rofiles-fuse/main.c @@ -533,14 +533,29 @@ static int callback_setxattr (const char *path, const char *name, const char *value, size_t size, int flags) { - return -ENOTSUP; + PATH_WRITE_ENTRYPOINT (path); + + char buf[PATH_MAX]; + snprintf (buf, sizeof (buf), "/proc/self/fd/%d/%s", basefd, path); + + if (setxattr (buf, name, value, size, flags) == -1) + return -errno; + return 0; } static int callback_getxattr (const char *path, const char *name, char *value, size_t size) { - return -ENOTSUP; + path = ENSURE_RELPATH (path); + + char buf[PATH_MAX]; + snprintf (buf, sizeof (buf), "/proc/self/fd/%d/%s", basefd, path); + + ssize_t n = getxattr (buf, name, value, size); + if (n == -1) + return -errno; + return n; } /* @@ -549,8 +564,15 @@ callback_getxattr (const char *path, const char *name, char *value, static int callback_listxattr (const char *path, char *list, size_t size) { - return -ENOTSUP; + path = ENSURE_RELPATH (path); + char buf[PATH_MAX]; + snprintf (buf, sizeof (buf), "/proc/self/fd/%d/%s", basefd, path); + + ssize_t n = llistxattr (buf, list, size); + if (n == -1) + return -errno; + return n; } /* @@ -559,8 +581,14 @@ callback_listxattr (const char *path, char *list, size_t size) static int callback_removexattr (const char *path, const char *name) { - return -ENOTSUP; + path = ENSURE_RELPATH (path); + char buf[PATH_MAX]; + snprintf (buf, sizeof (buf), "/proc/self/fd/%d/%s", basefd, path); + + if (lremovexattr (buf, name) == -1) + return -errno; + return 0; } struct fuse_operations callback_oper = { diff --git a/tests/libtest.sh b/tests/libtest.sh index ffb05c7b..eda3b921 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -637,12 +637,6 @@ skip_without_fuse () { [ -e /etc/mtab ] || skip "no /etc/mtab" } -skip_without_experimental () { - if ! ostree --version | grep -q -e '- experimental'; then - skip "No experimental API is compiled in" - fi -} - has_gpgme () { local ret ${CMD_PREFIX} ostree --version > version.txt diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 08921838..5e719bf8 100644 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -196,7 +196,7 @@ if ! skip_one_without_user_xattrs; then # Preserve user.ostreemeta xattr cp -a ${path}{,.new} (dd if=${path} conv=swab) > ${path}.new - mv ${path}{.new,} + mv -f ${path}{.new,} if ${CMD_PREFIX} ostree --repo=cacherepo fsck 2>err.txt; then fatal "corrupt repo fsck?" fi @@ -631,12 +631,12 @@ if has_gpgme; then objpath=objects/${csum::2}/${csum:2}.commitmeta remotesig=ostree-srv/gnomerepo/$objpath localsig=repo/$objpath - mv $remotesig $remotesig.bak + mv -f $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 + mv -f $remotesig.bak $remotesig ${CMD_PREFIX} ostree --repo=repo pull origin main echo "ok pull signed commit" rm $localsig diff --git a/tests/test-core.js b/tests/test-core.js index a9ef8919..2c7162be 100755 --- a/tests/test-core.js +++ b/tests/test-core.js @@ -19,6 +19,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +const ByteArray = imports.byteArray; const Gio = imports.gi.Gio; const OSTree = imports.gi.OSTree; @@ -27,6 +28,22 @@ function assertEquals(a, b) { throw new Error("assertion failed " + JSON.stringify(a) + " == " + JSON.stringify(b)); } +function assertThrows(s, f) { + let success = false; + try { + f(); + success = true; + } catch(e) { + let msg = e.toString(); + if (msg.indexOf(s) == -1) { + throw new Error("Error message didn't match '" + s + "': " + msg) + } + } + if (success) { + throw new Error("Function was expected to throw, but didn't") + } +} + print('1..1') let testDataDir = Gio.File.new_for_path('test-data'); @@ -49,6 +66,36 @@ let [,dirTree] = repo.write_mtree(mtree, null); let [,commit] = repo.write_commit(null, 'Some subject', 'Some body', null, dirTree, null); print("commit => " + commit); +// Test direct write APIs +let inline_content = "default 0.0.0.0\nloopback 127.0.0.0\nlink-local 169.254.0.0\n"; +let networks_checksum = "8aaa9dc13a0c5839fe4a277756798c609c53fac6fa2290314ecfef9041065873"; +let regfile_mode = 33188; // 0o100000 | 0o644 (but in decimal so old gjs works) +let inline_checksum = repo.write_regfile_inline(null, 0, 0, regfile_mode, null, inline_content, null); +assertEquals(inline_checksum, networks_checksum); +assertThrows("Corrupted file object", function() { + // Changed an a to b from above to make the checksum not match + repo.write_regfile_inline("8baa9dc13a0c5839fe4a277756798c609c53fac6fa2290314ecfef9041065873", 0, 0, regfile_mode, null, inline_content, null); +}); + +{ + let [_, instream, info, xattrs] = repo.load_file(networks_checksum, null); + // Read the whole content into a string via this amazing rube goldberg machine + let datain = Gio.DataInputStream.new(instream); + let bufw = Gio.MemoryOutputStream.new_resizable(); + bufw.splice(datain, 0, null); + bufw.close(null); + let contents = bufw.steal_as_bytes(); + let contentsStr = ByteArray.toString(contents.get_data()) + assertEquals(contentsStr, inline_content); + + let uid = info.get_attribute_uint32("unix::uid"); + assertEquals(uid, 0); + let mode = info.get_attribute_uint32("unix::mode"); + assertEquals(mode, regfile_mode); + + assertEquals(xattrs.n_children(), 0); +} + repo.commit_transaction(null, null); let [,root,checksum] = repo.read_commit(commit, null); @@ -70,4 +117,21 @@ repo.commit_transaction(null, null); [,readCommit] = repo.resolve_rev('someref', true); assertEquals(readCommit, null); +// Test direct write API for regular files +let clen = inline_content.length; +assertThrows("Cannot currently use", function() { + let w = repo.write_regfile(null, 0, 0, regfile_mode, clen, null); +}); + +let bareRepoPath = Gio.File.new_for_path('repo'); +let repo_bareu = OSTree.Repo.new(Gio.File.new_for_path('repo-bare')); +repo_bareu.create(OSTree.RepoMode.BARE_USER_ONLY, null); +let w = repo_bareu.write_regfile(null, 0, 0, regfile_mode, clen, null); +// Test multiple write() calls +w.write(inline_content.slice(0, 4), null) +w.write(inline_content.slice(4, 10), null) +w.write(inline_content.slice(10), null) +let actual_checksum = w.finish(null) +assertEquals(actual_checksum, networks_checksum) + print("ok test-core"); diff --git a/tests/test-libarchive-import.c b/tests/test-libarchive-import.c index 75b298bc..821a8869 100644 --- a/tests/test-libarchive-import.c +++ b/tests/test-libarchive-import.c @@ -510,6 +510,7 @@ test_libarchive_xattr_import_skip_xattr (gconstpointer data) GError *error = NULL; g_autoptr(OtAutoArchiveRead) a = archive_read_new (); OstreeRepoImportArchiveOptions opts = { 0 }; + g_autoptr(OstreeRepoCommitModifier) modifier = NULL; if (skip_if_no_xattr (td)) goto out; @@ -524,7 +525,7 @@ test_libarchive_xattr_import_skip_xattr (gconstpointer data) opts.ignore_unsupported_content = TRUE; - g_autoptr(OstreeRepoCommitModifier) modifier = ostree_repo_commit_modifier_new ( + modifier = ostree_repo_commit_modifier_new ( OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS, NULL, NULL, NULL); if (!import_write_and_ref (td->repo, &opts, a, "baz", modifier, &error)) goto out; diff --git a/tests/test-repo.c b/tests/test-repo.c index 9857228e..9337ac3b 100644 --- a/tests/test-repo.c +++ b/tests/test-repo.c @@ -197,6 +197,58 @@ test_repo_get_min_free_space (Fixture *fixture, } } +static void +test_write_regfile_api (Fixture *fixture, + gconstpointer test_data) +{ + g_autoptr (GKeyFile) config = NULL; + g_autoptr(GError) error = NULL; + + g_autoptr(OstreeRepo) repo = ostree_repo_create_at (fixture->tmpdir.fd, ".", + OSTREE_REPO_MODE_ARCHIVE, + NULL, + NULL, &error); + g_assert_no_error (error); + + g_auto(GVariantBuilder) xattrs_builder; + g_variant_builder_init (&xattrs_builder, (GVariantType*)"a(ayay)"); + g_variant_builder_add (&xattrs_builder, "(^ay^ay)", "security.selinux", "system_u:object_r:etc_t:s0"); + g_autoptr(GVariant) xattrs = g_variant_ref_sink (g_variant_builder_end (&xattrs_builder)); + + // Current contents of /etc/networks in Fedora + static const char contents[] = "default 0.0.0.0\nloopback 127.0.0.0\nlink-local 169.254.0.0\n"; + // First with no xattrs + g_autofree char *checksum = ostree_repo_write_regfile_inline (repo, NULL, 0, 0, S_IFREG | 0644, NULL, (const guint8*)contents, sizeof (contents)-1, NULL, &error); + g_assert_no_error (error); + g_assert_cmpstr (checksum, ==, "8aaa9dc13a0c5839fe4a277756798c609c53fac6fa2290314ecfef9041065873"); + g_clear_pointer (&checksum, g_free); + + // Invalid checksum + checksum = ostree_repo_write_regfile_inline (repo, "3272139f889f6a7007b3d64adc74be9e2979bf6bbe663d1512e5bd43f4de24a1", + 0, 0, S_IFREG | 0644, NULL, (const guint8*)contents, sizeof (contents)-1, NULL, &error); + g_assert (checksum == NULL); + g_assert (error != NULL); + g_clear_error (&error); + + // Now with xattrs + g_clear_pointer (&checksum, g_free); + checksum = ostree_repo_write_regfile_inline (repo, NULL, 0, 0, S_IFREG | 0644, xattrs, (const guint8*)contents, sizeof (contents)-1, NULL, &error); + g_assert_no_error (error); + g_assert_cmpstr (checksum, ==, "4f600d252338f93279c51c964915cb2c26f0d09082164c54890d1a3c78cdeb1e"); + g_clear_pointer (&checksum, g_free); + + // Test symlinks + g_clear_pointer (&xattrs, g_variant_unref); + g_variant_builder_init (&xattrs_builder, (GVariantType*)"a(ayay)"); + g_variant_builder_add (&xattrs_builder, "(^ay^ay)", "security.selinux", "system_u:object_r:bin_t:s0"); + xattrs = g_variant_ref_sink (g_variant_builder_end (&xattrs_builder)); + + g_clear_pointer (&checksum, g_free); + checksum = ostree_repo_write_symlink (repo, NULL, 0, 0, xattrs, "bash", NULL, &error); + g_assert_no_error (error); + g_assert_cmpstr (checksum, ==, "23a2e97d21d960ac7a4e39a8721b1baff7b213e00e5e5641334f50506012fcff"); +} + int main (int argc, char **argv) @@ -212,7 +264,8 @@ main (int argc, test_repo_equal, teardown); g_test_add ("/repo/get_min_free_space", Fixture, NULL, setup, test_repo_get_min_free_space, teardown); - + g_test_add ("/repo/write_regfile_api", Fixture, NULL, setup, + test_write_regfile_api, teardown); return g_test_run (); } diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh index 1e09711c..55816899 100755 --- a/tests/test-rofiles-fuse.sh +++ b/tests/test-rofiles-fuse.sh @@ -28,7 +28,7 @@ skip_without_user_xattrs setup_test_repository "bare" -echo "1..11" +echo "1..12" cd ${test_tmpdir} mkdir mnt @@ -75,6 +75,10 @@ fi assert_file_has_content err.txt "chown:.*Read-only file system" echo "ok failed mutation chmod + chown" +if setfattr -n user.foo -v bar mnt/firstfile-link; then + assert_not_reached "set xattr on linked file" +fi + # Test creating new files, using chown + chmod on them as well echo anewfile-for-fuse > mnt/anewfile-for-fuse assert_file_has_content mnt/anewfile-for-fuse anewfile-for-fuse @@ -94,8 +98,14 @@ for i in $(seq 5); do chown $(id -u) mnt/newfusedir/test-morenewfuse.${i} done assert_file_has_content checkout-test2/newfusedir/test-morenewfuse.3 3-morenewfuse-3 + echo "ok new content" +setfattr -n user.foo -v bar mnt/anewfile-for-fuse +getfattr -d -m . mnt/anewfile-for-fuse > out.txt +assert_file_has_content_literal out.txt 'user.foo="bar"' +echo "ok new xattrs" + rm mnt/baz/cow assert_not_has_file checkout-test2/baz/cow rm mnt/baz/another -rf @@ -152,6 +162,16 @@ firstfile_new_inode=$(stat -c %i checkout-test2/firstfile) assert_not_streq "${firstfile_orig_inode}" "${firstfile_new_inode}" assert_test_file -f checkout-test2/firstfile +# Test xattr modifications +copyup_reset +firstfile_orig_inode=$(stat -c %i checkout-test2/firstfile) +setfattr -n user.foo -v bar mnt/firstfile +getfattr -d -m . mnt/firstfile > out.txt +assert_file_has_content_literal out.txt 'user.foo="bar"' +firstfile_new_inode=$(stat -c %i checkout-test2/firstfile) +assert_not_streq "${firstfile_orig_inode}" "${firstfile_new_inode}" +assert_test_file -f checkout-test2/firstfile + copyup_reset firstfile_link_orig_inode=$(stat -c %i checkout-test2/firstfile-link) firstfile_orig_inode=$(stat -c %i checkout-test2/firstfile) diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 77f07c4d..14adc867 100755 --- a/tests/test-symbols.sh +++ b/tests/test-symbols.sh @@ -31,16 +31,9 @@ if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "devel"; then else devel_syms= fi -if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "experimental"; then - experimental_sym="${G_TEST_SRCDIR}/src/libostree/libostree-experimental.sym" - experimental_sections="${G_TEST_SRCDIR}/apidoc/ostree-experimental-sections.txt" -else - experimental_sym="" - experimental_sections="" -fi echo "Verifying all expected symbols are actually exported..." -grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${released_syms} ${devel_syms} ${experimental_sym} | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt +grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${released_syms} ${devel_syms} | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt eu-readelf -a ${G_TEST_BUILDDIR}/.libs/libostree-1.so | grep 'FUNC.*GLOBAL.*DEFAULT.*@@LIBOSTREE_' | sed -e 's,^.* \(ostree_[A-Za-z0-9_]*\)@@LIBOSTREE_[0-9A-Z_.]*,\1,' |sort -u > found-symbols.txt diff -u expected-symbols.txt found-symbols.txt @@ -48,9 +41,6 @@ echo "Checking that the example symbol wasn't copy-pasted..." if test -f ${devel_syms}; then assert_file_has_content_once ${devel_syms} "someostree_symbol_deleteme" fi -if test -f ${experimental_sym}; then - assert_not_file_has_content ${experimental_sym} "someostree_symbol_deleteme" -fi assert_not_file_has_content ${released_syms} "someostree_symbol_deleteme" echo "ok exports" @@ -59,14 +49,14 @@ echo "ok exports" grep -E -v '(ostree_cmd__private__)|(ostree_fetcher_config_flags_get_type)' found-symbols.txt > expected-documented.txt echo "Verifying all public symbols are documented:" -grep --no-filename '^ostree_' ${G_TEST_SRCDIR}/apidoc/ostree-sections.txt $experimental_sections |sort -u > found-documented.txt +grep --no-filename '^ostree_' ${G_TEST_SRCDIR}/apidoc/ostree-sections.txt |sort -u > found-documented.txt diff -u expected-documented.txt found-documented.txt echo 'ok documented symbols' # ONLY update this checksum in release commits! cat > released-sha256.txt <