diff --git a/Makefile-boot.am b/Makefile-boot.am
index ec10a0d6..e42e5180 100644
--- a/Makefile-boot.am
+++ b/Makefile-boot.am
@@ -38,6 +38,7 @@ endif
if BUILDOPT_SYSTEMD
systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
src/boot/ostree-remount.service \
+ src/boot/ostree-boot-complete.service \
src/boot/ostree-finalize-staged.service \
src/boot/ostree-finalize-staged.path \
$(NULL)
@@ -64,6 +65,7 @@ endif
EXTRA_DIST += src/boot/dracut/module-setup.sh \
src/boot/dracut/ostree.conf \
src/boot/mkinitcpio \
+ src/boot/ostree-boot-complete.service \
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 f125adb8..b58106aa 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -221,8 +221,6 @@ endif
if USE_CURL
libostree_1_la_SOURCES += src/libostree/ostree-fetcher-curl.c \
- src/libostree/ostree-soup-uri.h src/libostree/ostree-soup-uri.c \
- src/libostree/ostree-soup-form.c \
$(NULL)
libostree_1_la_CFLAGS += $(OT_DEP_CURL_CFLAGS)
libostree_1_la_LIBADD += $(OT_DEP_CURL_LIBS)
@@ -231,13 +229,6 @@ if USE_LIBSOUP
libostree_1_la_SOURCES += src/libostree/ostree-fetcher-soup.c
libostree_1_la_CFLAGS += $(OT_INTERNAL_SOUP_CFLAGS)
libostree_1_la_LIBADD += $(OT_INTERNAL_SOUP_LIBS)
-else
-if USE_AVAHI
-libostree_1_la_SOURCES += src/libostree/ostree-soup-uri.h \
- src/libostree/ostree-soup-uri.c \
- src/libostree/ostree-soup-form.c \
- $(NULL)
-endif
endif
endif
diff --git a/Makefile-man.am b/Makefile-man.am
index 78025fff..5c7f2413 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -19,6 +19,8 @@
if ENABLE_MAN
+# If you add a new man page here, add a reference to it in index.xml and
+# ostree.xml.
man1_files = ostree.1 ostree-admin-cleanup.1 \
ostree-admin-config-diff.1 ostree-admin-deploy.1 \
ostree-admin-init-fs.1 ostree-admin-instutil.1 ostree-admin-os-init.1 \
@@ -52,9 +54,25 @@ man5_files = ostree.repo.5 ostree.repo-config.5
man1_MANS = $(addprefix man/,$(man1_files))
man5_MANS = $(addprefix man/,$(man5_files))
-EXTRA_DIST += $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
+manhtml_files = \
+ man/html/index.html \
+ $(addprefix man/html/,$(man1_files:.1=.html)) \
+ $(addprefix man/html/,$(man5_files:.5=.html)) \
+ $(NULL)
-XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+if ENABLE_MAN_HTML
+noinst_DATA += $(manhtml_files)
+
+# Convenience target for building the just the HTML man pages
+manhtml: $(manhtml_files)
+.PHONY: manhtml
+endif
+
+EXTRA_DIST += man/index.xml $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
+
+XSLT_MAN_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+XSLT_HTML_STYLESHEET = man/html.xsl
+EXTRA_DIST += $(XSLT_HTML_STYLESHEET)
XSLTPROC_FLAGS = \
--nonet \
@@ -67,14 +85,19 @@ XSLTPROC_FLAGS = \
XSLTPROC_MAN = $(XSLTPROC) $(XSLTPROC_FLAGS)
%.1: %.xml
- $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
+ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
%.5: %.xml
- $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
+ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
+
+man/html/%.html: man/%.xml
+ @mkdir -p man/html
+ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_HTML_STYLESHEET) $<
CLEANFILES += \
$(man1_MANS) \
$(man5_MANS) \
+ $(manhtml_files) \
$(NULL)
endif
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
index 82af1681..0fe2c5f8 100644
--- a/Makefile-ostree.am
+++ b/Makefile-ostree.am
@@ -70,6 +70,7 @@ ostree_SOURCES += \
src/ostree/ot-admin-builtin-diff.c \
src/ostree/ot-admin-builtin-deploy.c \
src/ostree/ot-admin-builtin-finalize-staged.c \
+ src/ostree/ot-admin-builtin-boot-complete.c \
src/ostree/ot-admin-builtin-undeploy.c \
src/ostree/ot-admin-builtin-instutil.c \
src/ostree/ot-admin-builtin-cleanup.c \
diff --git a/Makefile-tests.am b/Makefile-tests.am
index 5d39ee5e..29de6c7a 100644
--- a/Makefile-tests.am
+++ b/Makefile-tests.am
@@ -202,7 +202,7 @@ dist_installed_test_data = tests/archive-test.sh \
tests/ostree-path-traverse.tar.gz \
tests/pre-signed-pull-data.tar.gz \
tests/libtest-core.sh \
- tests/fixtures/bare-split-xattrs/basic.tar.xz \
+ tests/bare-split-xattrs-basic.tar.xz \
$(NULL)
EXTRA_DIST += tests/libtest.sh
diff --git a/Makefile.am b/Makefile.am
index ce90ca45..6eb88388 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
-DOSTREE_COMPILATION \
-DG_LOG_DOMAIN=\"OSTree\" \
-DOSTREE_GITREV='"$(OSTREE_GITREV)"' \
- -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44 '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \
+ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66 '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,70)' \
-DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 '-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)'
# For strict aliasing, see https://bugzilla.gnome.org/show_bug.cgi?id=791622
AM_CFLAGS += -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS)
diff --git a/Makefile.in b/Makefile.in
index 1e0cc49f..095ccdc4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -442,8 +442,6 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14)
@USE_CURL_OR_SOUP_TRUE@ $(NULL)
@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_29 = $(OT_DEP_CURL_CFLAGS)
@@ -451,31 +449,26 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14)
@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_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)
+@USE_LIBMOUNT_TRUE@am__append_34 = $(OT_DEP_LIBMOUNT_CFLAGS)
+@USE_LIBMOUNT_TRUE@am__append_35 = $(OT_DEP_LIBMOUNT_LIBS)
+@USE_SELINUX_TRUE@am__append_36 = $(OT_DEP_SELINUX_CFLAGS)
+@USE_SELINUX_TRUE@am__append_37 = $(OT_DEP_SELINUX_LIBS)
+@USE_LIBSODIUM_TRUE@am__append_38 = $(OT_DEP_LIBSODIUM_CFLAGS)
+@USE_LIBSODIUM_TRUE@am__append_39 = $(OT_DEP_LIBSODIUM_LIBS)
+@BUILDOPT_INTROSPECTION_TRUE@am__append_40 = OSTree-1.0.gir
@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 = \
+@BUILDOPT_INTROSPECTION_TRUE@am__append_42 = OSTree-1.0.typelib
+@BUILDOPT_INTROSPECTION_TRUE@am__append_43 = $(gir_DATA) $(typelib_DATA)
+@USE_GPGME_TRUE@am__append_44 = \
@USE_GPGME_TRUE@ src/ostree/ot-builtin-gpg-sign.c \
@USE_GPGME_TRUE@ $(NULL)
-@USE_GPGME_TRUE@am__append_46 = \
+@USE_GPGME_TRUE@am__append_45 = \
@USE_GPGME_TRUE@ src/ostree/ot-remote-builtin-gpg-import.c \
@USE_GPGME_TRUE@ src/ostree/ot-remote-builtin-gpg-list-keys.c \
@USE_GPGME_TRUE@ $(NULL)
-@USE_CURL_OR_SOUP_TRUE@am__append_47 = src/ostree/ot-remote-builtin-add-cookie.c \
+@USE_CURL_OR_SOUP_TRUE@am__append_46 = 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 \
@@ -483,20 +476,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_48 = src/ostree/ot-builtin-trivial-httpd.c
-@USE_LIBSOUP_TRUE@am__append_49 = ostree-trivial-httpd
+@USE_LIBSOUP_TRUE@am__append_47 = src/ostree/ot-builtin-trivial-httpd.c
+@USE_LIBSOUP_TRUE@am__append_48 = ostree-trivial-httpd
# This is necessary for the cookie jar bits
-@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
+@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_49 = $(OT_INTERNAL_SOUP_CFLAGS)
+@USE_CURL_FALSE@@USE_LIBSOUP_TRUE@am__append_50 = $(OT_INTERNAL_SOUP_LIBS)
+@USE_LIBARCHIVE_TRUE@am__append_51 = $(OT_DEP_LIBARCHIVE_CFLAGS)
+@USE_LIBARCHIVE_TRUE@am__append_52 = $(OT_DEP_LIBARCHIVE_LIBS)
+@USE_LIBSODIUM_TRUE@am__append_53 = $(OT_DEP_LIBSODIUM_CFLAGS)
+@USE_LIBSODIUM_TRUE@am__append_54 = $(OT_DEP_LIBSODIUM_LIBS)
+@BUILDOPT_SYSTEMD_TRUE@am__append_55 = ostree-remount
# It is built anyway as a side-effect of having the symlink in tests/,
# and if we declare it here, it gets cleaned up properly
-@BUILDOPT_SYSTEMD_FALSE@am__append_57 = ostree-remount
+@BUILDOPT_SYSTEMD_FALSE@am__append_56 = 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
@@ -508,67 +501,70 @@ 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_58 = ostree-prepare-root
-@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_59 = ostree-prepare-root
-@BUILDOPT_SYSTEMD_TRUE@am__append_60 = -DHAVE_SYSTEMD=1
+@BUILDOPT_USE_STATIC_COMPILER_TRUE@am__append_57 = ostree-prepare-root
+@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_58 = ostree-prepare-root
+@BUILDOPT_SYSTEMD_TRUE@am__append_59 = -DHAVE_SYSTEMD=1
# This is the "new mode" of using a generator for /var; see
# https://github.com/ostreedev/ostree/issues/855
+@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_61 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
-@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_62 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT)
-@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_63 = $(systemdsystemgenerator_PROGRAMS)
+@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_62 = $(systemdsystemgenerator_PROGRAMS)
# Allow the distcheck install under $prefix test to pass
-@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 = \
+@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_63 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators'
+@BUILDOPT_FUSE_TRUE@am__append_64 = rofiles-fuse
+@BUILDOPT_ASAN_TRUE@am__append_65 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc
+@USE_GPGME_TRUE@am__append_66 = \
@USE_GPGME_TRUE@ tests/test-remote-gpg-import.sh \
@USE_GPGME_TRUE@ tests/test-remote-gpg-list-keys.sh \
@USE_GPGME_TRUE@ tests/test-gpg-signed-commit.sh \
@USE_GPGME_TRUE@ tests/test-admin-gpg.sh \
@USE_GPGME_TRUE@ $(NULL)
-@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 = \
+@BUILDOPT_FUSE_TRUE@am__append_67 = tests/test-rofiles-fuse.sh
+@BUILDOPT_FUSE_TRUE@am__append_68 = tests/rofiles-fuse-symlink-stamp
+@BUILDOPT_FUSE_FALSE@am__append_69 = tests/test-rofiles-fuse.sh
+@USE_LIBSOUP_TRUE@am__append_70 = tests/test-remote-cookies.sh
+@BUILDOPT_GJS_TRUE@am__append_71 = $(js_tests) $(js_installed_tests)
+@BUILDOPT_GJS_FALSE@am__append_72 = $(js_tests)
+@BUILDOPT_GJS_FALSE@am__append_73 = $(js_installed_tests)
+@ENABLE_INSTALLED_TESTS_FALSE@am__append_74 = -rpath $(abs_builddir)
+@USE_GPGME_TRUE@am__append_75 = \
@USE_GPGME_TRUE@ tests/test-gpg-verify-result \
@USE_GPGME_TRUE@ $(NULL)
-@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_AVAHI_TRUE@am__append_76 = tests/test-repo-finder-avahi
+@USE_LIBARCHIVE_TRUE@am__append_77 = tests/test-libarchive-import
+@USE_GPGME_TRUE@am__append_78 = \
@USE_GPGME_TRUE@ tests/gpg-verify-data/README.md \
@USE_GPGME_TRUE@ $(NULL)
-@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
+@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_79 = $(_installed_or_uninstalled_test_scripts)
+@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_80 = $(_installed_or_uninstalled_test_programs)
+@ENABLE_INSTALLED_TESTS_TRUE@am__append_81 = install-installed-tests-extra
# Allow the distcheck install under $prefix test to pass
-@BUILDOPT_SYSTEMD_TRUE@am__append_83 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
+@BUILDOPT_SYSTEMD_TRUE@am__append_82 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
# We're using the system grub2-mkconfig generator
-@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
+@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_83 = src/boot/grub2/grub2-15_ostree
+@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_84 = install-grub2-config-hook
# We're using our internal generator
-@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
+@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@am__append_85 = src/boot/grub2/ostree-grub-generator
+@ENABLE_MAN_TRUE@@USE_LIBSOUP_TRUE@am__append_86 = 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_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@@USE_LIBSOUP_FALSE@am__append_87 = man/ostree-trivial-httpd.xml
+@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_88 = rofiles-fuse.1
+@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_89 = ostree-gpg-sign.1
+@ENABLE_MAN_HTML_TRUE@@ENABLE_MAN_TRUE@am__append_90 = $(manhtml_files)
+@ENABLE_MAN_TRUE@am__append_91 = man/index.xml $(man1_MANS:.1=.xml) \
+@ENABLE_MAN_TRUE@ $(man5_MANS:.5=.xml) $(XSLT_HTML_STYLESHEET)
@ENABLE_MAN_TRUE@am__append_92 = \
@ENABLE_MAN_TRUE@ $(man1_MANS) \
@ENABLE_MAN_TRUE@ $(man5_MANS) \
+@ENABLE_MAN_TRUE@ $(manhtml_files) \
@ENABLE_MAN_TRUE@ $(NULL)
subdir = .
@@ -840,9 +836,6 @@ am__libostree_1_la_SOURCES_DIST = \
src/libostree/ostree-metalink.h \
src/libostree/ostree-metalink.c \
src/libostree/ostree-fetcher-curl.c \
- src/libostree/ostree-soup-uri.h \
- src/libostree/ostree-soup-uri.c \
- src/libostree/ostree-soup-form.c \
src/libostree/ostree-fetcher-soup.c \
src/libostree/ostree-sign.c src/libostree/ostree-sign.h \
src/libostree/ostree-sign-dummy.c \
@@ -865,13 +858,8 @@ am__libostree_1_la_SOURCES_DIST = \
@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_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_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 = \
src/libostree/libostree_1_la-ostree-async-progress.lo \
src/libostree/libostree_1_la-ostree-cmdprivate.lo \
@@ -931,7 +919,7 @@ am_libostree_1_la_OBJECTS = \
$(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(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.lo \
src/libostree/libostree_1_la-ostree-sign-dummy.lo \
src/libostree/libostree_1_la-ostree-sign-ed25519.lo \
$(am__objects_1)
@@ -974,7 +962,7 @@ am__libotutil_la_SOURCES_DIST = src/libotutil/ot-checksum-utils.c \
src/libotutil/ot-tool-util.h src/libotutil/ot-gpg-utils.c \
src/libotutil/ot-gpg-utils.h src/libotutil/zbase32.c \
src/libotutil/zbase32.h
-@USE_GPGME_TRUE@am__objects_11 = \
+@USE_GPGME_TRUE@am__objects_10 = \
@USE_GPGME_TRUE@ src/libotutil/libotutil_la-ot-gpg-utils.lo \
@USE_GPGME_TRUE@ src/libotutil/libotutil_la-zbase32.lo \
@USE_GPGME_TRUE@ $(am__objects_1)
@@ -989,7 +977,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_11)
+ $(am__objects_10)
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) \
@@ -1031,6 +1019,7 @@ am__ostree_SOURCES_DIST = src/ostree/main.c \
src/ostree/ot-admin-builtin-diff.c \
src/ostree/ot-admin-builtin-deploy.c \
src/ostree/ot-admin-builtin-finalize-staged.c \
+ src/ostree/ot-admin-builtin-boot-complete.c \
src/ostree/ot-admin-builtin-undeploy.c \
src/ostree/ot-admin-builtin-instutil.c \
src/ostree/ot-admin-builtin-cleanup.c \
@@ -1064,18 +1053,18 @@ 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_12 = src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT) \
+@USE_GPGME_TRUE@am__objects_11 = src/ostree/ostree-ot-builtin-gpg-sign.$(OBJEXT) \
@USE_GPGME_TRUE@ $(am__objects_1)
-@USE_GPGME_TRUE@am__objects_13 = src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT) \
+@USE_GPGME_TRUE@am__objects_12 = src/ostree/ostree-ot-remote-builtin-gpg-import.$(OBJEXT) \
@USE_GPGME_TRUE@ src/ostree/ostree-ot-remote-builtin-gpg-list-keys.$(OBJEXT) \
@USE_GPGME_TRUE@ $(am__objects_1)
-@USE_CURL_OR_SOUP_TRUE@am__objects_14 = src/ostree/ostree-ot-remote-builtin-add-cookie.$(OBJEXT) \
+@USE_CURL_OR_SOUP_TRUE@am__objects_13 = 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_15 = src/ostree/ostree-ot-builtin-trivial-httpd.$(OBJEXT)
+@USE_LIBSOUP_TRUE@am__objects_14 = 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) \
@@ -1104,11 +1093,12 @@ 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_12) \
+ $(am__objects_11) \
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) \
src/ostree/ostree-ot-admin-builtin-finalize-staged.$(OBJEXT) \
+ src/ostree/ostree-ot-admin-builtin-boot-complete.$(OBJEXT) \
src/ostree/ostree-ot-admin-builtin-undeploy.$(OBJEXT) \
src/ostree/ostree-ot-admin-builtin-instutil.$(OBJEXT) \
src/ostree/ostree-ot-admin-builtin-cleanup.$(OBJEXT) \
@@ -1130,8 +1120,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_13) $(am__objects_14) \
- $(am__objects_15)
+ $(am__objects_1) $(am__objects_12) $(am__objects_13) \
+ $(am__objects_14)
nodist_ostree_OBJECTS = src/ostree/ostree-parse-datetime.$(OBJEXT) \
$(am__objects_1)
ostree_OBJECTS = $(am_ostree_OBJECTS) $(nodist_ostree_OBJECTS)
@@ -1187,9 +1177,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_16 = \
+am__objects_15 = \
libglnx/tests/test_libglnx_errors-libglnx-testlib.$(OBJEXT)
-am_test_libglnx_errors_OBJECTS = $(am__objects_16) \
+am_test_libglnx_errors_OBJECTS = $(am__objects_15) \
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
@@ -1197,9 +1187,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_17 = \
+am__objects_16 = \
libglnx/tests/test_libglnx_fdio-libglnx-testlib.$(OBJEXT)
-am_test_libglnx_fdio_OBJECTS = $(am__objects_17) \
+am_test_libglnx_fdio_OBJECTS = $(am__objects_16) \
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
@@ -1207,9 +1197,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_18 = \
+am__objects_17 = \
libglnx/tests/test_libglnx_macros-libglnx-testlib.$(OBJEXT)
-am_test_libglnx_macros_OBJECTS = $(am__objects_18) \
+am_test_libglnx_macros_OBJECTS = $(am__objects_17) \
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
@@ -1217,9 +1207,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_19 = \
+am__objects_18 = \
libglnx/tests/test_libglnx_shutil-libglnx-testlib.$(OBJEXT)
-am_test_libglnx_shutil_OBJECTS = $(am__objects_19) \
+am_test_libglnx_shutil_OBJECTS = $(am__objects_18) \
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
@@ -1227,9 +1217,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_20 = \
+am__objects_19 = \
libglnx/tests/test_libglnx_xattrs-libglnx-testlib.$(OBJEXT)
-am_test_libglnx_xattrs_OBJECTS = $(am__objects_20) \
+am_test_libglnx_xattrs_OBJECTS = $(am__objects_19) \
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
@@ -1584,8 +1574,6 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-dummy.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-ed25519.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign.Plo \
- src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Plo \
- src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-cleanup.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-deploy.Plo \
src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-upgrader.Plo \
@@ -1617,6 +1605,7 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \
src/libotutil/$(DEPDIR)/libotutil_la-ot-variant-utils.Plo \
src/libotutil/$(DEPDIR)/libotutil_la-zbase32.Plo \
src/ostree/$(DEPDIR)/ostree-main.Po \
+ src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po \
src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-cleanup.Po \
src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-deploy.Po \
src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-diff.Po \
@@ -2079,7 +2068,7 @@ am__EXEEXT_23 = tests/test-basic.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__append_68) $(am__append_71) \
+ $(am__EXEEXT_20) $(am__append_67) $(am__append_70) \
$(am__EXEEXT_22)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23)
@@ -2377,8 +2366,8 @@ AM_CPPFLAGS = -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
-DSHORTENED_SYSCONFDIR=\"$(shortened_sysconfdir)\" \
-DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' -DOSTREE_COMPILATION \
-DG_LOG_DOMAIN=\"OSTree\" -DOSTREE_GITREV='"$(OSTREE_GITREV)"' \
- -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44 \
- '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \
+ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66 \
+ '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,70)' \
-DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 \
'-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)'
# For strict aliasing, see https://bugzilla.gnome.org/show_bug.cgi?id=791622
@@ -2386,8 +2375,8 @@ 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_64) \
- $(am__append_83) \
+ --disable-maintainer-mode $(NULL) $(am__append_63) \
+ $(am__append_82) \
BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions'
SUBDIRS = . $(am__append_14)
NULL =
@@ -2395,7 +2384,7 @@ BUILT_SOURCES = $(top_builddir)/libglnx-config.h \
$(nodist_libostree_1_la_SOURCES)
MANPAGES =
CLEANFILES = $(am__append_13) $(top_builddir)/libglnx-config.h \
- $(BUILT_SOURCES) $(am__append_44) src/ostree/parse-datetime.c \
+ $(BUILT_SOURCES) $(am__append_43) src/ostree/parse-datetime.c \
tests/libreaddir-rand.so tests/ostree-symlink-stamp \
tests/ostree-prepare-root-symlink-stamp \
tests/ostree-remount-symlink-stamp \
@@ -2420,37 +2409,38 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
src/libostree/s390x-se-luks-gencpio \
src/ostree/parse-datetime.y buildutil/tap-driver.sh \
buildutil/tap-test tests/glib.supp tests/ostree.supp $(NULL) \
- $(am__append_70) $(am__append_73) tests/libtest.sh \
- $(am__append_74) $(am__append_79) tests/libostreetest.h \
+ $(am__append_69) $(am__append_72) tests/libtest.sh \
+ $(am__append_73) $(am__append_78) tests/libostreetest.h \
tests/libtest.sh $(NULL) src/boot/dracut/module-setup.sh \
src/boot/dracut/ostree.conf src/boot/mkinitcpio \
+ src/boot/ostree-boot-complete.service \
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_88) \
+ src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_87) \
$(am__append_91)
bin_SCRIPTS =
lib_LTLIBRARIES = libostree-1.la
# Secure Execution: script for creating new initramdisk with LUKS key and config
pkglibexec_SCRIPTS = src/libostree/s390x-se-luks-gencpio \
- $(am__append_84)
+ $(am__append_83)
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_41)
+INTROSPECTION_GIRS = $(am__append_40)
girdir = $(datadir)/gir-1.0
-gir_DATA = $(am__append_42)
+gir_DATA = $(am__append_41)
typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = $(am__append_43)
+typelib_DATA = $(am__append_42)
gsettings_SCHEMAS =
ostree_bootdir = $(prefix)/lib/ostree
-ostree_boot_SCRIPTS = $(am__append_58) $(am__append_86)
+ostree_boot_SCRIPTS = $(am__append_57) $(am__append_85)
# We should probably consider flipping the default for DEBUG. Also,
# include the builddir in $PATH so we find our just-built ostree
@@ -2467,7 +2457,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_66)
+ $(NULL) $(am__append_65)
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)
@@ -2475,7 +2465,7 @@ installed_test_SCRIPTS = $(am__append_10)
installed_test_DATA = $(am__append_11)
nobase_installed_test_DATA =
noinst_SCRIPTS = $(am__append_3)
-noinst_DATA = $(am__append_4)
+noinst_DATA = $(am__append_4) $(am__append_90)
check_LTLIBRARIES = $(am__append_5)
check_SCRIPTS = $(am__append_7)
check_DATA = $(am__append_8)
@@ -2507,8 +2497,8 @@ 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_82) \
- $(am__append_85)
+INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_81) \
+ $(am__append_84)
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)
@@ -2522,7 +2512,7 @@ ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS}
GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \
gtk-doc.make fastbuild-*.qcow2 _kola_temp/ target/ Cargo.lock \
docs/.bundle/ docs/Gemfile.lock docs/_site/ docs/reference/ \
- docs/vendor/ $(NULL) $(am__append_63)
+ docs/vendor/ $(NULL) $(am__append_62)
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)
@@ -2734,7 +2724,7 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \
src/libostree/ostree-kernel-args.c $(NULL) $(am__append_16) \
$(am__append_17) $(am__append_18) $(am__append_19) \
$(am__append_20) $(am__append_27) $(am__append_28) \
- $(am__append_31) $(am__append_34) src/libostree/ostree-sign.c \
+ $(am__append_31) 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 \
@@ -2757,8 +2747,8 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff \
'-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) \
extern' -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" $(am__append_21) \
$(am__append_23) $(am__append_25) $(am__append_29) \
- $(am__append_32) $(am__append_35) $(am__append_37) \
- $(am__append_39)
+ $(am__append_32) $(am__append_34) $(am__append_36) \
+ $(am__append_38)
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 \
@@ -2766,7 +2756,7 @@ libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la \
$(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) \
$(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)
+ $(am__append_35) $(am__append_37) $(am__append_39)
EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files)
# XXX: work around clang being passed -fstack-clash-protection which it doesn't understand
@@ -2803,11 +2793,12 @@ 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_45) \
+ src/ostree/parse-datetime.h $(NULL) $(am__append_44) \
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 \
+ src/ostree/ot-admin-builtin-boot-complete.c \
src/ostree/ot-admin-builtin-undeploy.c \
src/ostree/ot-admin-builtin-instutil.c \
src/ostree/ot-admin-builtin-cleanup.c \
@@ -2832,7 +2823,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_46) $(am__append_47) $(am__append_48)
+ $(am__append_45) $(am__append_46) $(am__append_47)
nodist_ostree_SOURCES = \
src/ostree/parse-datetime.c \
$(NULL)
@@ -2844,11 +2835,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_50) \
- $(am__append_52) $(am__append_54)
+ostree_CFLAGS = $(ostree_bin_shared_cflags) $(am__append_49) \
+ $(am__append_51) $(am__append_53)
ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la \
- $(LIBSYSTEMD_LIBS) $(am__append_51) $(am__append_53) \
- $(am__append_55)
+ $(LIBSYSTEMD_LIBS) $(am__append_50) $(am__append_52) \
+ $(am__append_54)
@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)
@@ -2857,8 +2848,8 @@ ostree_prepare_root_SOURCES = \
src/switchroot/ostree-prepare-root.c \
$(NULL)
-ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_60) \
- $(am__append_61)
+ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_59) \
+ $(am__append_60)
@BUILDOPT_USE_STATIC_COMPILER_FALSE@ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot
ostree_remount_SOURCES = \
src/switchroot/ostree-mount-util.h \
@@ -2867,7 +2858,7 @@ ostree_remount_SOURCES = \
ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) \
$(OT_INTERNAL_GIO_UNIX_CFLAGS) -Isrc/switchroot \
- -I$(srcdir)/libglnx $(am__append_62)
+ -I$(srcdir)/libglnx $(am__append_61)
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 \
@@ -2884,7 +2875,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_69)
+ tests/ostree-remount-symlink-stamp $(am__append_68)
dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
# This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below.
@@ -2892,10 +2883,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_80)
+dist_test_scripts = $(NULL) $(am__append_79)
test_programs = tests/test-bloom tests/test-repo-finder-config \
- tests/test-repo-finder-mount $(NULL) $(am__append_77) \
- $(am__append_81)
+ tests/test-repo-finder-mount $(NULL) $(am__append_76) \
+ $(am__append_80)
_installed_or_uninstalled_test_scripts = tests/test-basic.sh \
tests/test-basic-bare-split-xattrs.sh tests/test-basic-user.sh \
tests/test-basic-user-only.sh tests/test-basic-root.sh \
@@ -2952,8 +2943,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_67) \
- $(am__append_68) $(am__append_71) $(am__append_72)
+ tests/test-signed-pull-summary.sh $(NULL) $(am__append_66) \
+ $(am__append_67) $(am__append_70) $(am__append_71)
test_extra_programs = \
tests/get-byte-order \
tests/repo-finder-mount \
@@ -2980,7 +2971,7 @@ dist_installed_test_data = tests/archive-test.sh \
tests/ostree-path-traverse.tar.gz \
tests/pre-signed-pull-data.tar.gz \
tests/libtest-core.sh \
- tests/fixtures/bare-split-xattrs/basic.tar.xz \
+ tests/bare-split-xattrs-basic.tar.xz \
$(NULL)
dist_test_extra_scripts = \
@@ -3030,7 +3021,7 @@ libreaddir_rand_la_LIBADD = \
$(NULL)
libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \
- $(am__append_75)
+ $(am__append_74)
_installed_or_uninstalled_test_programs = tests/test-varint \
tests/test-ot-unix-utils tests/test-bsdiff \
tests/test-mutable-tree tests/test-keyfile-utils \
@@ -3038,7 +3029,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_76) $(am__append_78)
+ tests/test-rfc2616-dates $(am__append_75) $(am__append_77)
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
@@ -3141,6 +3132,7 @@ tests_test_commit_sign_sh_ext_LDADD = $(TESTS_LDADD)
@BUILDOPT_MKINITCPIO_TRUE@mkinitcpioconf_DATA = src/boot/mkinitcpio/ostree-mkinitcpio.conf
@BUILDOPT_SYSTEMD_TRUE@systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-remount.service \
+@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-boot-complete.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-finalize-staged.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-finalize-staged.path \
@BUILDOPT_SYSTEMD_TRUE@ $(NULL)
@@ -3148,6 +3140,9 @@ tests_test_commit_sign_sh_ext_LDADD = $(TESTS_LDADD)
@BUILDOPT_SYSTEMD_TRUE@systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
@BUILDOPT_SYSTEMD_TRUE@dist_systemdtmpfiles_DATA = src/boot/ostree-tmpfiles.conf
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@grub2configdir = $(sysconfdir)/grub.d
+
+# If you add a new man page here, add a reference to it in index.xml and
+# ostree.xml.
@ENABLE_MAN_TRUE@man1_files = ostree.1 ostree-admin-cleanup.1 \
@ENABLE_MAN_TRUE@ ostree-admin-config-diff.1 \
@ENABLE_MAN_TRUE@ ostree-admin-deploy.1 ostree-admin-init-fs.1 \
@@ -3167,12 +3162,19 @@ tests_test_commit_sign_sh_ext_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_87) \
-@ENABLE_MAN_TRUE@ $(am__append_89) $(am__append_90)
+@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_86) \
+@ENABLE_MAN_TRUE@ $(am__append_88) $(am__append_89)
@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))
-@ENABLE_MAN_TRUE@XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+@ENABLE_MAN_TRUE@manhtml_files = \
+@ENABLE_MAN_TRUE@ man/html/index.html \
+@ENABLE_MAN_TRUE@ $(addprefix man/html/,$(man1_files:.1=.html)) \
+@ENABLE_MAN_TRUE@ $(addprefix man/html/,$(man5_files:.5=.html)) \
+@ENABLE_MAN_TRUE@ $(NULL)
+
+@ENABLE_MAN_TRUE@XSLT_MAN_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
+@ENABLE_MAN_TRUE@XSLT_HTML_STYLESHEET = man/html.xsl
@ENABLE_MAN_TRUE@XSLTPROC_FLAGS = \
@ENABLE_MAN_TRUE@ --nonet \
@ENABLE_MAN_TRUE@ --stringparam man.output.quietly 1 \
@@ -3978,12 +3980,6 @@ src/libostree/libostree_1_la-ostree-metalink.lo: \
src/libostree/libostree_1_la-ostree-fetcher-curl.lo: \
src/libostree/$(am__dirstamp) \
src/libostree/$(DEPDIR)/$(am__dirstamp)
-src/libostree/libostree_1_la-ostree-soup-uri.lo: \
- src/libostree/$(am__dirstamp) \
- src/libostree/$(DEPDIR)/$(am__dirstamp)
-src/libostree/libostree_1_la-ostree-soup-form.lo: \
- src/libostree/$(am__dirstamp) \
- src/libostree/$(DEPDIR)/$(am__dirstamp)
src/libostree/libostree_1_la-ostree-fetcher-soup.lo: \
src/libostree/$(am__dirstamp) \
src/libostree/$(DEPDIR)/$(am__dirstamp)
@@ -4164,6 +4160,9 @@ src/ostree/ostree-ot-admin-builtin-deploy.$(OBJEXT): \
src/ostree/ostree-ot-admin-builtin-finalize-staged.$(OBJEXT): \
src/ostree/$(am__dirstamp) \
src/ostree/$(DEPDIR)/$(am__dirstamp)
+src/ostree/ostree-ot-admin-builtin-boot-complete.$(OBJEXT): \
+ src/ostree/$(am__dirstamp) \
+ src/ostree/$(DEPDIR)/$(am__dirstamp)
src/ostree/ostree-ot-admin-builtin-undeploy.$(OBJEXT): \
src/ostree/$(am__dirstamp) \
src/ostree/$(DEPDIR)/$(am__dirstamp)
@@ -4873,8 +4872,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-dummy.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-ed25519.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-cleanup.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-deploy.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-upgrader.Plo@am__quote@ # am--include-marker
@@ -4906,6 +4903,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/libotutil/$(DEPDIR)/libotutil_la-ot-variant-utils.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/libotutil/$(DEPDIR)/libotutil_la-zbase32.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/ostree/$(DEPDIR)/ostree-main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-cleanup.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-deploy.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-diff.Po@am__quote@ # am--include-marker
@@ -5565,20 +5563,6 @@ src/libostree/libostree_1_la-ostree-fetcher-curl.lo: src/libostree/ostree-fetche
@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-fetcher-curl.lo `test -f 'src/libostree/ostree-fetcher-curl.c' || echo '$(srcdir)/'`src/libostree/ostree-fetcher-curl.c
-src/libostree/libostree_1_la-ostree-soup-uri.lo: src/libostree/ostree-soup-uri.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-soup-uri.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Tpo -c -o src/libostree/libostree_1_la-ostree-soup-uri.lo `test -f 'src/libostree/ostree-soup-uri.c' || echo '$(srcdir)/'`src/libostree/ostree-soup-uri.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-soup-uri.c' object='src/libostree/libostree_1_la-ostree-soup-uri.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-soup-uri.lo `test -f 'src/libostree/ostree-soup-uri.c' || echo '$(srcdir)/'`src/libostree/ostree-soup-uri.c
-
-src/libostree/libostree_1_la-ostree-soup-form.lo: src/libostree/ostree-soup-form.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-soup-form.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Tpo -c -o src/libostree/libostree_1_la-ostree-soup-form.lo `test -f 'src/libostree/ostree-soup-form.c' || echo '$(srcdir)/'`src/libostree/ostree-soup-form.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libostree/ostree-soup-form.c' object='src/libostree/libostree_1_la-ostree-soup-form.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-soup-form.lo `test -f 'src/libostree/ostree-soup-form.c' || echo '$(srcdir)/'`src/libostree/ostree-soup-form.c
-
src/libostree/libostree_1_la-ostree-fetcher-soup.lo: src/libostree/ostree-fetcher-soup.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libostree_1_la_CFLAGS) $(CFLAGS) -MT src/libostree/libostree_1_la-ostree-fetcher-soup.lo -MD -MP -MF src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-soup.Tpo -c -o src/libostree/libostree_1_la-ostree-fetcher-soup.lo `test -f 'src/libostree/ostree-fetcher-soup.c' || echo '$(srcdir)/'`src/libostree/ostree-fetcher-soup.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-soup.Tpo src/libostree/$(DEPDIR)/libostree_1_la-ostree-fetcher-soup.Plo
@@ -6181,6 +6165,20 @@ src/ostree/ostree-ot-admin-builtin-finalize-staged.obj: src/ostree/ot-admin-buil
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-admin-builtin-finalize-staged.obj `if test -f 'src/ostree/ot-admin-builtin-finalize-staged.c'; then $(CYGPATH_W) 'src/ostree/ot-admin-builtin-finalize-staged.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-admin-builtin-finalize-staged.c'; fi`
+src/ostree/ostree-ot-admin-builtin-boot-complete.o: src/ostree/ot-admin-builtin-boot-complete.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-admin-builtin-boot-complete.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Tpo -c -o src/ostree/ostree-ot-admin-builtin-boot-complete.o `test -f 'src/ostree/ot-admin-builtin-boot-complete.c' || echo '$(srcdir)/'`src/ostree/ot-admin-builtin-boot-complete.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Tpo src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-admin-builtin-boot-complete.c' object='src/ostree/ostree-ot-admin-builtin-boot-complete.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-admin-builtin-boot-complete.o `test -f 'src/ostree/ot-admin-builtin-boot-complete.c' || echo '$(srcdir)/'`src/ostree/ot-admin-builtin-boot-complete.c
+
+src/ostree/ostree-ot-admin-builtin-boot-complete.obj: src/ostree/ot-admin-builtin-boot-complete.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-admin-builtin-boot-complete.obj -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Tpo -c -o src/ostree/ostree-ot-admin-builtin-boot-complete.obj `if test -f 'src/ostree/ot-admin-builtin-boot-complete.c'; then $(CYGPATH_W) 'src/ostree/ot-admin-builtin-boot-complete.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-admin-builtin-boot-complete.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Tpo src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ostree/ot-admin-builtin-boot-complete.c' object='src/ostree/ostree-ot-admin-builtin-boot-complete.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -c -o src/ostree/ostree-ot-admin-builtin-boot-complete.obj `if test -f 'src/ostree/ot-admin-builtin-boot-complete.c'; then $(CYGPATH_W) 'src/ostree/ot-admin-builtin-boot-complete.c'; else $(CYGPATH_W) '$(srcdir)/src/ostree/ot-admin-builtin-boot-complete.c'; fi`
+
src/ostree/ostree-ot-admin-builtin-undeploy.o: src/ostree/ot-admin-builtin-undeploy.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ostree_CFLAGS) $(CFLAGS) -MT src/ostree/ostree-ot-admin-builtin-undeploy.o -MD -MP -MF src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-undeploy.Tpo -c -o src/ostree/ostree-ot-admin-builtin-undeploy.o `test -f 'src/ostree/ot-admin-builtin-undeploy.c' || echo '$(srcdir)/'`src/ostree/ot-admin-builtin-undeploy.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-undeploy.Tpo src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-undeploy.Po
@@ -9342,8 +9340,6 @@ distclean: distclean-recursive
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-dummy.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-ed25519.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign.Plo
- -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Plo
- -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-cleanup.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-deploy.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-upgrader.Plo
@@ -9375,6 +9371,7 @@ distclean: distclean-recursive
-rm -f src/libotutil/$(DEPDIR)/libotutil_la-ot-variant-utils.Plo
-rm -f src/libotutil/$(DEPDIR)/libotutil_la-zbase32.Plo
-rm -f src/ostree/$(DEPDIR)/ostree-main.Po
+ -rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-cleanup.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-deploy.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-diff.Po
@@ -9624,8 +9621,6 @@ maintainer-clean: maintainer-clean-recursive
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-dummy.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign-ed25519.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sign.Plo
- -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-form.Plo
- -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-soup-uri.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-cleanup.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-deploy.Plo
-rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-sysroot-upgrader.Plo
@@ -9657,6 +9652,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f src/libotutil/$(DEPDIR)/libotutil_la-ot-variant-utils.Plo
-rm -f src/libotutil/$(DEPDIR)/libotutil_la-zbase32.Plo
-rm -f src/ostree/$(DEPDIR)/ostree-main.Po
+ -rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-boot-complete.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-cleanup.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-deploy.Po
-rm -f src/ostree/$(DEPDIR)/ostree-ot-admin-builtin-diff.Po
@@ -9959,11 +9955,19 @@ install-kola-tests:
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@ mkdir -p $(DESTDIR)$(grub2configdir)
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@ ln -sf $(pkglibexecdir)/grub2-15_ostree $(DESTDIR)$(grub2configdir)/15_ostree
+# Convenience target for building the just the HTML man pages
+@ENABLE_MAN_HTML_TRUE@@ENABLE_MAN_TRUE@manhtml: $(manhtml_files)
+@ENABLE_MAN_HTML_TRUE@@ENABLE_MAN_TRUE@.PHONY: manhtml
+
@ENABLE_MAN_TRUE@%.1: %.xml
-@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
+@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
@ENABLE_MAN_TRUE@%.5: %.xml
-@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
+@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
+
+@ENABLE_MAN_TRUE@man/html/%.html: man/%.xml
+@ENABLE_MAN_TRUE@ @mkdir -p man/html
+@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_HTML_STYLESHEET) $<
release-tag:
cd $(srcdir) && git $(srcdir) tag -m "Release $(VERSION)" v$(VERSION)
diff --git a/README.md b/README.md
index 8fa17f94..0896b244 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ write higher level manual bindings on top; this is more common
for statically compiled languages. Here's a list of such bindings:
- [ostree-go](https://github.com/ostreedev/ostree-go/)
- - [ostree-rs](https://gitlab.com/fkrull/ostree-rs/)
+ - [ostree-rs](https://github.com/ostreedev/ostree-rs/)
## Building
diff --git a/apidoc/html/index.html b/apidoc/html/index.html
index 1ad0c2e3..fda3b4ad 100644
--- a/apidoc/html/index.html
+++ b/apidoc/html/index.html
@@ -14,7 +14,7 @@
@@ -58,14 +58,35 @@
ostree-checksum-input-stream
+ostree-content-writer
+
+
ostree-deployment
ostree-diff
+ostree-kernel-args
+
+
+ostree-ref
+
+
+ostree-remote
+
+
ostree-repo-file
+
+ostree-repo-finder
+
+
+ostree-repo-remote-finder
+
+
+ostree-version — ostree version checking
+
API Index
diff --git a/apidoc/html/ostree-ostree-checksum-input-stream.html b/apidoc/html/ostree-ostree-checksum-input-stream.html
index 3623eec8..72e2a30d 100644
--- a/apidoc/html/ostree-ostree-checksum-input-stream.html
+++ b/apidoc/html/ostree-ostree-checksum-input-stream.html
@@ -7,7 +7,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
diff --git a/apidoc/html/ostree-ostree-content-writer.html b/apidoc/html/ostree-ostree-content-writer.html
new file mode 100644
index 00000000..406f81dc
--- /dev/null
+++ b/apidoc/html/ostree-ostree-content-writer.html
@@ -0,0 +1,101 @@
+
+
+
+
+
ostree-content-writer: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-content-writer
+ostree-content-writer
+
+
+
+
+
+
+
Functions
+
+
ostree_content_writer_finish ()
+
char *
+ostree_content_writer_finish (OstreeContentWriter *self ,
+ GCancellable *cancellable ,
+ GError **error );
+
Complete the object write and return the checksum.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-deployment.html b/apidoc/html/ostree-ostree-deployment.html
index 1f0ff6f2..41cc9be5 100644
--- a/apidoc/html/ostree-ostree-deployment.html
+++ b/apidoc/html/ostree-ostree-deployment.html
@@ -6,7 +6,7 @@
-
+
@@ -19,7 +19,7 @@
-
+
diff --git a/apidoc/html/ostree-ostree-diff.html b/apidoc/html/ostree-ostree-diff.html
index 90015a79..627dff28 100644
--- a/apidoc/html/ostree-ostree-diff.html
+++ b/apidoc/html/ostree-ostree-diff.html
@@ -7,7 +7,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
diff --git a/apidoc/html/ostree-ostree-kernel-args.html b/apidoc/html/ostree-ostree-kernel-args.html
new file mode 100644
index 00000000..f1e9322f
--- /dev/null
+++ b/apidoc/html/ostree-ostree-kernel-args.html
@@ -0,0 +1,865 @@
+
+
+
+
+
ostree-kernel-args: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-kernel-args
+ostree-kernel-args
+
+
+
+
+
+
+
+
Functions
+
+
ostree_kernel_args_free ()
+
void
+ostree_kernel_args_free (OstreeKernelArgs *kargs );
+
Frees the kargs structure
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_new ()
+
OstreeKernelArgs *
+ostree_kernel_args_new (void );
+
Initializes a new OstreeKernelArgs structure and returns it
+
[skip ]
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_cleanup ()
+
void
+ostree_kernel_args_cleanup (void *loc );
+
Frees the OstreeKernelArgs structure pointed by *loc
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_replace_take ()
+
void
+ostree_kernel_args_replace_take (OstreeKernelArgs *kargs ,
+ char *arg );
+
Finds and replaces the old key if arg
+ is already in the hash table,
+otherwise adds arg
+ as new key and split_keyeq (arg) as value.
+Note that when replacing old key, the old values are freed.
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_replace ()
+
void
+ostree_kernel_args_replace (OstreeKernelArgs *kargs ,
+ const char *arg );
+
Finds and replaces the old key if arg
+ is already in the hash table,
+otherwise adds arg
+ as new key and split_keyeq (arg) as value.
+Note that when replacing old key value pair, the old values are freed.
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_replace_argv ()
+
void
+ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs ,
+ char **argv );
+
Finds and replaces each non-null arguments of argv
+ in the hash table,
+otherwise adds individual arg as new key and split_keyeq (arg) as value.
+Note that when replacing old key value pair, the old values are freed.
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_append ()
+
void
+ostree_kernel_args_append (OstreeKernelArgs *kargs ,
+ const char *arg );
+
Appends arg
+ which is in the form of key=value pair to the hash table kargs->table
+(appends to the value list if key is already in the hash table)
+and appends key to kargs->order if it is not in the hash table already.
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_append_argv ()
+
void
+ostree_kernel_args_append_argv (OstreeKernelArgs *kargs ,
+ char **argv );
+
Appends each value in argv
+ to the corresponding value array and
+appends key to kargs->order if it is not in the hash table already.
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_append_argv_filtered ()
+
void
+ostree_kernel_args_append_argv_filtered
+ (OstreeKernelArgs *kargs ,
+ char **argv ,
+ char **prefixes );
+
Appends each argument that does not have one of the prefixes
+ as prefix to the kargs
+
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_new_replace ()
+
gboolean
+ostree_kernel_args_new_replace (OstreeKernelArgs *kargs ,
+ const char *arg ,
+ GError **error );
+
This function implements the basic logic behind key/value pair
+replacement. Do note that the arg need to be properly formatted
+
When replacing key with exact one value, the arg can be in
+the form:
+key, key=new_val, or key=old_val=new_val
+The first one swaps the old_val with the key to an empty value
+The second and third replace the old_val into the new_val
+
When replacing key with multiple values, the arg can only be
+in the form of:
+key=old_val=new_val. Unless there is a special case where
+there is an empty value associated with the key, then
+key=new_val will work because old_val is empty. The empty
+val will be swapped with the new_val in that case
+
+
+
Returns
+
TRUE on success, FALSE on failure (and in some other instances such as:
+
+key not found in kargs
+
+old value not found when arg
+is in the form of key=old_val=new_val
+multiple old values found when arg
+is in the form of key=old_val)
+
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_delete ()
+
gboolean
+ostree_kernel_args_delete (OstreeKernelArgs *kargs ,
+ const char *arg ,
+ GError **error );
+
There are few scenarios being handled for deletion:
+
1: for input arg with a single key(i.e without = for split),
+ the key/value pair will be deleted if there is only
+ one value that is associated with the key
+
2: for input arg wth key/value pair, the specific key
+ value pair will be deleted from the pointer array
+ if those exist.
+
3: If the found key has only one value
+ associated with it, the key entry in the table will also
+ be removed, and the key will be removed from order table
+
+
+
Returns
+
TRUE on success, FALSE on failure
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_delete_key_entry ()
+
gboolean
+ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs ,
+ const char *key ,
+ GError **error );
+
This function removes the key entry from the hashtable
+as well from the order pointer array inside kargs
+
Note: since both table and order inside kernel args
+are with free function, no extra free functions are
+being called as they are done automatically by GLib
+
+
+
Returns
+
TRUE on success, FALSE on failure
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_append_proc_cmdline ()
+
gboolean
+ostree_kernel_args_append_proc_cmdline
+ (OstreeKernelArgs *kargs ,
+ GCancellable *cancellable ,
+ GError **error );
+
Appends the command line arguments in the file "/proc/cmdline"
+that does not have "BOOT_IMAGE=" and "initrd=" as prefixes to the kargs
+
+
+
+
Returns
+
TRUE on success, FALSE on failure
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_parse_append ()
+
void
+ostree_kernel_args_parse_append (OstreeKernelArgs *kargs ,
+ const char *options );
+
Parses options
+ by separating it by whitespaces and appends each argument to kargs
+
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_get_last_value ()
+
const char *
+ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs ,
+ const char *key );
+
Finds and returns the last element of value array
+corresponding to the key
+ in kargs
+ hash table. Note that the application
+will be terminated if the key
+ is found but the value array is empty
+
+
+
Returns
+
NULL if key
+is not found in the kargs
+hash table,
+otherwise returns last element of value array corresponding to key
+
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_from_string ()
+
OstreeKernelArgs *
+ostree_kernel_args_from_string (const char *options );
+
Initializes a new OstreeKernelArgs then parses and appends options
+
+to the empty OstreeKernelArgs
+
[skip ]
+
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_to_strv ()
+
char **
+ostree_kernel_args_to_strv (OstreeKernelArgs *kargs );
+
Extracts all key value pairs in kargs
+ and appends to a temporary
+array in forms of "key=value" or "key" if value is NULL, and returns
+the temporary array with the GPtrArray wrapper freed
+
+
+
Returns
+
an array of "key=value" pairs or "key" if value is NULL.
+
[transfer full ]
+
+
Since: 2019.3
+
+
+
+
ostree_kernel_args_to_string ()
+
char *
+ostree_kernel_args_to_string (OstreeKernelArgs *kargs );
+
Extracts all key value pairs in kargs
+ and appends to a temporary
+GString in forms of "key=value" or "key" if value is NULL separated
+by a single whitespace, and returns the temporary string with the
+GString wrapper freed
+
Note: the application will be terminated if one of the values array
+in kargs
+ is NULL
+
+
+
Returns
+
a string of "key=value" pairs or "key" if value is NULL,
+separated by single whitespaces.
+
[transfer full ]
+
+
Since: 2019.3
+
+
+
+
Types and Values
+
+
OstreeKernelArgs
+
typedef struct _OstreeKernelArgs OstreeKernelArgs;
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-ref.html b/apidoc/html/ostree-ostree-ref.html
new file mode 100644
index 00000000..fa6356d1
--- /dev/null
+++ b/apidoc/html/ostree-ostree-ref.html
@@ -0,0 +1,373 @@
+
+
+
+
+
ostree-ref: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-ref
+ostree-ref
+
+
+
+
+
+
+
+
Functions
+
+
ostree_collection_ref_new ()
+
OstreeCollectionRef *
+ostree_collection_ref_new (const gchar *collection_id ,
+ const gchar *ref_name );
+
Create a new OstreeCollectionRef containing (collection_id
+, ref_name
+). If
+collection_id
+ is NULL, this is equivalent to a plain ref name string (not a
+refspec; no remote name is included), which can be used for non-P2P
+operations.
+
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_dup ()
+
OstreeCollectionRef *
+ostree_collection_ref_dup (const OstreeCollectionRef *ref );
+
Create a copy of the given ref
+.
+
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_free ()
+
void
+ostree_collection_ref_free (OstreeCollectionRef *ref );
+
Free the given ref
+.
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_hash ()
+
guint
+ostree_collection_ref_hash (gconstpointer ref );
+
Hash the given ref
+. This function is suitable for use with GHashTable .
+ref
+ must be non-NULL.
+
+
+
Returns
+
hash value for ref
+
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_equal ()
+
gboolean
+ostree_collection_ref_equal (gconstpointer ref1 ,
+ gconstpointer ref2 );
+
Compare ref1
+ and ref2
+ and return TRUE if they have the same collection ID and
+ref name, and FALSE otherwise. Both ref1
+ and ref2
+ must be non-NULL.
+
+
+
Returns
+
TRUE if ref1
+and ref2
+are equal, FALSE otherwise
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_dupv ()
+
OstreeCollectionRef **
+ostree_collection_ref_dupv (const OstreeCollectionRef * const *refs );
+
Copy an array of OstreeCollectionRefs , including deep copies of all its
+elements. refs
+ must be NULL-terminated; it may be empty, but must not be
+NULL.
+
+
+
Since: 2018.6
+
+
+
+
ostree_collection_ref_freev ()
+
void
+ostree_collection_ref_freev (OstreeCollectionRef **refs );
+
Free the given array of refs
+, including freeing all its elements. refs
+
+must be NULL-terminated; it may be empty, but must not be NULL.
+
+
Since: 2018.6
+
+
+
+
Types and Values
+
+
OstreeCollectionRefv
+
typedef OstreeCollectionRef** OstreeCollectionRefv;
+
+
A NULL-terminated array of OstreeCollectionRef instances, designed to
+be used with g_auto():
+
+
+
+
Since: 2018.6
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-remote.html b/apidoc/html/ostree-ostree-remote.html
new file mode 100644
index 00000000..01e83fb7
--- /dev/null
+++ b/apidoc/html/ostree-ostree-remote.html
@@ -0,0 +1,230 @@
+
+
+
+
+
ostree-remote: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-remote
+ostree-remote
+
+
+
+
+
+
+
+
Functions
+
+
ostree_remote_ref ()
+
OstreeRemote *
+ostree_remote_ref (OstreeRemote *remote );
+
Increase the reference count on the given remote
+.
+
+
+
Returns
+
a copy of remote
+, for convenience.
+
[transfer full ]
+
+
Since: 2018.6
+
+
+
+
ostree_remote_unref ()
+
void
+ostree_remote_unref (OstreeRemote *remote );
+
Decrease the reference count on the given remote
+ and free it if the
+reference count reaches 0.
+
+
Since: 2018.6
+
+
+
+
ostree_remote_get_name ()
+
const gchar *
+ostree_remote_get_name (OstreeRemote *remote );
+
Get the human-readable name of the remote. This is what the user configured,
+if the remote was explicitly configured; and will otherwise be a stable,
+arbitrary, string.
+
+
+
Returns
+
remote’s name
+
+
Since: 2018.6
+
+
+
+
ostree_remote_get_url ()
+
gchar *
+ostree_remote_get_url (OstreeRemote *remote );
+
Get the URL from the remote.
+
+
+
Since: 2018.6
+
+
+
+
Types and Values
+
+
struct OstreeRemote
+
struct OstreeRemote {
+ int ref_count; /* atomic */
+ char *name; /* (not nullable) */
+ char *refspec_name; /* (nullable) */
+ char *group; /* group name in options (not nullable) */
+ char *keyring; /* keyring name ($refspec_name.trustedkeys.gpg) (not nullable) */
+ GFile *file; /* NULL if remote defined in repo/config */
+ GKeyFile *options;
+};
+
+
This represents the configuration for a single remote repository. Currently,
+remotes can only be passed around as (reference counted) opaque handles. In
+future, more API may be added to create and interrogate them.
+
Since: 2018.6
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-repo-file.html b/apidoc/html/ostree-ostree-repo-file.html
index 27fd47ae..ff2bcf3b 100644
--- a/apidoc/html/ostree-ostree-repo-file.html
+++ b/apidoc/html/ostree-ostree-repo-file.html
@@ -6,7 +6,8 @@
-
+
+
@@ -18,8 +19,8 @@
-
-
+
+
diff --git a/apidoc/html/ostree-ostree-repo-finder.html b/apidoc/html/ostree-ostree-repo-finder.html
new file mode 100644
index 00000000..3e753f69
--- /dev/null
+++ b/apidoc/html/ostree-ostree-repo-finder.html
@@ -0,0 +1,577 @@
+
+
+
+
+
ostree-repo-finder: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-repo-finder
+ostree-repo-finder
+
+
+
+
+
+
+
+
Functions
+
+
ostree_repo_finder_resolve_async ()
+
void
+ostree_repo_finder_resolve_async (OstreeRepoFinder *self ,
+ const OstreeCollectionRef * const *refs ,
+ OstreeRepo *parent_repo ,
+ GCancellable *cancellable ,
+ GAsyncReadyCallback callback ,
+ gpointer user_data );
+
Find reachable remote URIs which claim to provide any of the given refs
+. The
+specific method for finding the remotes depends on the OstreeRepoFinder
+implementation.
+
Any remote which is found and which claims to support any of the given refs
+
+will be returned in the results. It is possible that a remote claims to
+support a given ref, but turns out not to — it is not possible to verify this
+until ostree_repo_pull_from_remotes_async() is called.
+
The returned results will be sorted with the most useful first — this is
+typically the remote which claims to provide the most refs
+, at the lowest
+latency.
+
Each result contains a mapping of refs
+ to the checksums of the commits
+which the result provides. If the result provides the latest commit for a ref
+across all of the results, the checksum will be set. Otherwise, if the
+result provides an outdated commit, or doesn’t provide a given ref at all,
+the checksum will not be set. Results which provide none of the requested
+refs
+ may be listed with an empty refs map.
+
Pass the results to ostree_repo_pull_from_remotes_async() to pull the given
+refs
+ from those remotes.
+
+
Since: 2018.6
+
+
+
+
+
+
ostree_repo_finder_resolve_all_async ()
+
void
+ostree_repo_finder_resolve_all_async (OstreeRepoFinder * const *finders ,
+ const OstreeCollectionRef * const *refs ,
+ OstreeRepo *parent_repo ,
+ GCancellable *cancellable ,
+ GAsyncReadyCallback callback ,
+ gpointer user_data );
+
A version of ostree_repo_finder_resolve_async() which queries one or more
+finders
+ in parallel and combines the results.
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_resolve_all_finish ()
+
GPtrArray *
+ostree_repo_finder_resolve_all_finish (GAsyncResult *result ,
+ GError **error );
+
Get the results from a ostree_repo_finder_resolve_all_async() operation.
+
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_result_new ()
+
OstreeRepoFinderResult *
+ostree_repo_finder_result_new (OstreeRemote *remote ,
+ OstreeRepoFinder *finder ,
+ gint priority ,
+ GHashTable *ref_to_checksum ,
+ GHashTable *ref_to_timestamp ,
+ guint64 summary_last_modified );
+
Create a new OstreeRepoFinderResult instance. The semantics for the arguments
+are as described in the OstreeRepoFinderResult documentation.
+
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_result_dup ()
+
OstreeRepoFinderResult *
+ostree_repo_finder_result_dup (OstreeRepoFinderResult *result );
+
Copy an OstreeRepoFinderResult .
+
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_result_free ()
+
void
+ostree_repo_finder_result_free (OstreeRepoFinderResult *result );
+
Free the given result
+.
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_result_compare ()
+
gint
+ostree_repo_finder_result_compare (const OstreeRepoFinderResult *a ,
+ const OstreeRepoFinderResult *b );
+
Compare two OstreeRepoFinderResult instances to work out which one is better
+to pull from, and hence needs to be ordered before the other.
+
+
+
Returns
+
<0 if a
+is ordered before b
+, 0 if they are ordered equally,
+>0 if b
+is ordered before a
+
+
+
Since: 2018.6
+
+
+
+
ostree_repo_finder_result_freev ()
+
void
+ostree_repo_finder_result_freev (OstreeRepoFinderResult **results );
+
Free the given results
+ array, freeing each element and the container.
+
+
Since: 2018.6
+
+
+
+
Types and Values
+
+
OstreeRepoFinder
+
typedef struct _OstreeRepoFinder OstreeRepoFinder;
+
+
+
+
OstreeRepoFinderResultv
+
typedef OstreeRepoFinderResult** OstreeRepoFinderResultv;
+
+
A NULL-terminated array of OstreeRepoFinderResult instances, designed to
+be used with g_auto():
+
+
+
+
Since: 2018.6
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-repo-remote-finder.html b/apidoc/html/ostree-ostree-repo-remote-finder.html
new file mode 100644
index 00000000..006ba4d9
--- /dev/null
+++ b/apidoc/html/ostree-ostree-repo-remote-finder.html
@@ -0,0 +1,516 @@
+
+
+
+
+
ostree-repo-remote-finder: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-repo-remote-finder
+ostree-repo-remote-finder
+
+
+
+
+
+
+
+
Functions
+
+
ostree_repo_find_remotes_async ()
+
void
+ostree_repo_find_remotes_async (OstreeRepo *self ,
+ const OstreeCollectionRef * const *refs ,
+ GVariant *options ,
+ OstreeRepoFinder **finders ,
+ OstreeAsyncProgress *progress ,
+ GCancellable *cancellable ,
+ GAsyncReadyCallback callback ,
+ gpointer user_data );
+
Find reachable remote URIs which claim to provide any of the given named
+refs
+. This will search for configured remotes (OstreeRepoFinderConfig ),
+mounted volumes (OstreeRepoFinderMount ) and (if enabled at compile time)
+local network peers (OstreeRepoFinderAvahi ). In order to use a custom
+configuration of OstreeRepoFinder instances, call
+ostree_repo_finder_resolve_all_async() on them individually.
+
Any remote which is found and which claims to support any of the given refs
+
+will be returned in the results. It is possible that a remote claims to
+support a given ref, but turns out not to — it is not possible to verify this
+until ostree_repo_pull_from_remotes_async() is called.
+
The returned results will be sorted with the most useful first — this is
+typically the remote which claims to provide the most of refs
+, at the lowest
+latency.
+
Each result contains a list of the subset of refs
+ it claims to provide. It
+is possible for a non-empty list of results to be returned, but for some of
+refs
+ to not be listed in any of the results. Callers must check for this.
+
Pass the results to ostree_repo_pull_from_remotes_async() to pull the given refs
+
+from those remotes.
+
The following options
+ are currently defined:
+
+override-commit-ids (as): Array of specific commit IDs to fetch. The nth
+commit ID applies to the nth ref, so this must be the same length as refs
+, if
+provided.
+n-network-retries (u): Number of times to retry each download on
+receiving a transient network error, such as a socket timeout; default is
+5, 0 means return errors without retrying. Since: 2018.6
+
+
finders
+ must be a non-empty NULL-terminated array of the OstreeRepoFinder
+instances to use, or NULL to use the system default set of finders, which
+will typically be all available finders using their default options (but
+this is not guaranteed).
+
GPG verification of commits will be used unconditionally.
+
This will use the thread-default GMainContext , but will not iterate it.
+
+
Since: 2018.6
+
+
+
+
ostree_repo_find_remotes_finish ()
+
OstreeRepoFinderResult **
+ostree_repo_find_remotes_finish (OstreeRepo *self ,
+ GAsyncResult *result ,
+ GError **error );
+
Finish an asynchronous pull operation started with
+ostree_repo_find_remotes_async() .
+
+
+
Returns
+
a potentially empty array
+of OstreeRepoFinderResults , followed by a NULL terminator element; or
+NULL on error.
+
[transfer full ][array zero-terminated=1]
+
+
Since: 2018.6
+
+
+
+
ostree_repo_pull_from_remotes_async ()
+
void
+ostree_repo_pull_from_remotes_async (OstreeRepo *self ,
+ const OstreeRepoFinderResult * const *results ,
+ GVariant *options ,
+ OstreeAsyncProgress *progress ,
+ GCancellable *cancellable ,
+ GAsyncReadyCallback callback ,
+ gpointer user_data );
+
Pull refs from multiple remotes which have been found using
+ostree_repo_find_remotes_async() .
+
results
+ are expected to be in priority order, with the best remotes to pull
+from listed first. ostree_repo_pull_from_remotes_async() will generally pull
+from the remotes in order, but may parallelise its downloads.
+
If an error is encountered when pulling from a given remote, that remote will
+be ignored and another will be tried instead. If any refs have not been
+downloaded successfully after all remotes have been tried, G_IO_ERROR_FAILED
+will be returned. The results of any successful downloads will remain cached
+in the local repository.
+
If cancellable
+ is cancelled, G_IO_ERROR_CANCELLED will be returned
+immediately. The results of any successfully completed downloads at that
+point will remain cached in the local repository.
+
GPG verification of commits will be used unconditionally.
+
The following options
+ are currently defined:
+
+flags (i): OstreeRepoPullFlags to apply to the pull operation
+inherit-transaction (b): TRUE to inherit an ongoing transaction on
+the OstreeRepo , rather than encapsulating the pull in a new one
+depth (i): How far in the history to traverse; default is 0, -1 means infinite
+disable-static-deltas (b): Do not use static deltas
+http-headers (a(ss)): Additional headers to add to all HTTP requests
+subdirs (as): Pull just these subdirectories
+update-frequency (u): Frequency to call the async progress callback in
+milliseconds, if any; only values higher than 0 are valid
+append-user-agent (s): Additional string to append to the user agent
+n-network-retries (u): Number of times to retry each download on receiving
+a transient network error, such as a socket timeout; default is 5, 0
+means return errors without retrying. Since: 2018.6
+ref-keyring-map (a(sss)): Array of (collection ID, ref name, keyring
+remote name) tuples specifying which remote's keyring should be used when
+doing GPG verification of each collection-ref. This is useful to prevent a
+remote from serving malicious updates to refs which did not originate from
+it. This can be a subset or superset of the refs being pulled; any ref
+not being pulled will be ignored and any ref without a keyring remote
+will be verified with the keyring of the remote being pulled from.
+
+
+
Since: 2018.6
+
+
+
+
ostree_repo_pull_from_remotes_finish ()
+
gboolean
+ostree_repo_pull_from_remotes_finish (OstreeRepo *self ,
+ GAsyncResult *result ,
+ GError **error );
+
Finish an asynchronous pull operation started with
+ostree_repo_pull_from_remotes_async() .
+
+
+
Returns
+
TRUE on success, FALSE otherwise
+
+
Since: 2018.6
+
+
+
+
ostree_repo_resolve_keyring_for_collection ()
+
OstreeRemote *
+ostree_repo_resolve_keyring_for_collection
+ (OstreeRepo *self ,
+ const gchar *collection_id ,
+ GCancellable *cancellable ,
+ GError **error );
+
Find the GPG keyring for the given collection_id
+, using the local
+configuration from the given OstreeRepo . This will search the configured
+remotes for ones whose collection-id key matches collection_id
+, and will
+return the first matching remote.
+
If multiple remotes match and have different keyrings, a debug message will
+be emitted, and the first result will be returned. It is expected that the
+keyrings should match.
+
If no match can be found, a G_IO_ERROR_NOT_FOUND error will be returned.
+
+
+
Since: 2018.6
+
+
+
+
Types and Values
+
+
OSTREE_REPO_METADATA_REF
+
#define OSTREE_REPO_METADATA_REF "ostree-metadata"
+
+
The name of a ref which is used to store metadata for the entire repository,
+such as its expected update time (ostree.summary.expires), name, or new
+GPG keys. Metadata is stored on contentless commits in the ref, and hence is
+signed with the commits.
+
This supersedes the additional metadata dictionary in the summary file
+(see ostree_repo_regenerate_summary() ), as the use of a ref means that the
+metadata for multiple upstream repositories can be included in a single mirror
+repository, disambiguating the refs using collection IDs. In order to support
+peer to peer redistribution of repository metadata, repositories must set a
+collection ID (ostree_repo_set_collection_id() ).
+
Users of OSTree may place arbitrary metadata in commits on this ref, but the
+keys must be namespaced by product or developer. For example,
+exampleos.end-of-life. The ostree. prefix is reserved.
+
Since: 2018.6
+
+
+
+
OSTREE_META_KEY_DEPLOY_COLLECTION_ID
+
#define OSTREE_META_KEY_DEPLOY_COLLECTION_ID "ostree.deploy-collection-id"
+
+
GVariant type s. This key can be used in the repo metadata which is stored
+in OSTREE_REPO_METADATA_REF as well as in the summary. The semantics of this
+are that the remote repository wants clients to update their remote config
+to add this collection ID (clients can't do P2P operations involving a
+remote without a collection ID configured on it, even if one is configured
+on the server side). Clients must never change or remove a collection ID
+already set in their remote config.
+
Currently, OSTree does not implement changing a remote config based on this
+key, but it may do so in a later release, and until then clients such as
+Flatpak may implement it.
+
This is a replacement for the similar metadata key implemented by flatpak,
+xa.collection-id, which is now deprecated as clients which supported it had
+bugs with their P2P implementations.
+
Since: 2018.9
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree-ostree-version.html b/apidoc/html/ostree-ostree-version.html
new file mode 100644
index 00000000..114518d1
--- /dev/null
+++ b/apidoc/html/ostree-ostree-version.html
@@ -0,0 +1,163 @@
+
+
+
+
+
ostree-version: OSTree API references
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ostree-version
+ostree-version — ostree version checking
+
+
+
+
+
+
+
Description
+
ostree provides macros to check the version of the library
+at compile-time
+
+
+
Functions
+
+
OSTREE_CHECK_VERSION()
+
#define OSTREE_CHECK_VERSION(year,release)
+
Compile-time version checking. Evaluates to TRUE if the version
+of ostree is equal or greater than the required one.
+
+
Since: 2017.4
+
+
+
+
Types and Values
+
+
OSTREE_YEAR_VERSION
+
#define OSTREE_YEAR_VERSION (2022)
+
+
ostree year version component (e.g. 2017 if OSTREE_VERSION is 2017.2)
+
Since: 2017.4
+
+
+
+
OSTREE_RELEASE_VERSION
+
#define OSTREE_RELEASE_VERSION (3)
+
+
ostree release version component (e.g. 2 if OSTREE_VERSION is 2017.2)
+
Since: 2017.4
+
+
+
+
OSTREE_VERSION
+
#define OSTREE_VERSION (2022.3)
+
+
ostree version.
+
Since: 2017.4
+
+
+
+
OSTREE_VERSION_S
+
#define OSTREE_VERSION_S "2022.3"
+
+
ostree version, encoded as a string, useful for printing and
+concatenation.
+
Since: 2017.4
+
+
+
+
OSTREE_VERSION_HEX
+
#define OSTREE_VERSION_HEX
+
ostree version, encoded as an hexadecimal number, useful for
+integer comparisons.
+
Since: 2017.4
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2
index 7443e479..dcdb45e5 100644
--- a/apidoc/html/ostree.devhelp2
+++ b/apidoc/html/ostree.devhelp2
@@ -14,9 +14,16 @@
+
+
+
+
+
+
+
@@ -427,6 +434,7 @@
+
@@ -457,6 +465,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -470,6 +510,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html
index fc097fc3..55cf2bdd 100644
--- a/apidoc/html/reference.html
+++ b/apidoc/html/reference.html
@@ -60,14 +60,35 @@
ostree-checksum-input-stream
+ostree-content-writer
+
+
ostree-deployment
ostree-diff
+ostree-kernel-args
+
+
+ostree-ref
+
+
+ostree-remote
+
+
ostree-repo-file
+
+ostree-repo-finder
+
+
+ostree-repo-remote-finder
+
+
+ostree-version — ostree version checking
+
API Index
@@ -269,7 +290,7 @@
-OSTREE_CHECK_VERSION, macro in ostree-version
+OSTREE_CHECK_VERSION , macro in ostree-version
@@ -281,35 +302,35 @@ OSTREE_CHECK_VERSION, macro in ostree-version
-OstreeCollectionRefv, typedef in ostree-ref
+OstreeCollectionRefv , typedef in ostree-ref
-ostree_collection_ref_dup, function in ostree-ref
+ostree_collection_ref_dup , function in ostree-ref
-ostree_collection_ref_dupv, function in ostree-ref
+ostree_collection_ref_dupv , function in ostree-ref
-ostree_collection_ref_equal, function in ostree-ref
+ostree_collection_ref_equal , function in ostree-ref
-ostree_collection_ref_free, function in ostree-ref
+ostree_collection_ref_free , function in ostree-ref
-ostree_collection_ref_freev, function in ostree-ref
+ostree_collection_ref_freev , function in ostree-ref
-ostree_collection_ref_hash, function in ostree-ref
+ostree_collection_ref_hash , function in ostree-ref
-ostree_collection_ref_new, function in ostree-ref
+ostree_collection_ref_new , function in ostree-ref
@@ -369,7 +390,7 @@ ostree_collection_ref_new, function in ostree-ref
-ostree_content_writer_finish, function in ostree-content-writer
+ostree_content_writer_finish , function in ostree-content-writer
@@ -570,79 +591,79 @@ ostree_content_writer_finish, function in ostree-content-writer
K
-OstreeKernelArgs, struct in ostree-kernel-args
+OstreeKernelArgs , struct in ostree-kernel-args
-ostree_kernel_args_append, function in ostree-kernel-args
+ostree_kernel_args_append , function in ostree-kernel-args
-ostree_kernel_args_append_argv, function in ostree-kernel-args
+ostree_kernel_args_append_argv , function in ostree-kernel-args
-ostree_kernel_args_append_argv_filtered, function in ostree-kernel-args
+ostree_kernel_args_append_argv_filtered , function in ostree-kernel-args
-ostree_kernel_args_append_proc_cmdline, function in ostree-kernel-args
+ostree_kernel_args_append_proc_cmdline , function in ostree-kernel-args
-ostree_kernel_args_cleanup, function in ostree-kernel-args
+ostree_kernel_args_cleanup , function in ostree-kernel-args
-ostree_kernel_args_delete, function in ostree-kernel-args
+ostree_kernel_args_delete , function in ostree-kernel-args
-ostree_kernel_args_delete_key_entry, function in ostree-kernel-args
+ostree_kernel_args_delete_key_entry , function in ostree-kernel-args
-ostree_kernel_args_free, function in ostree-kernel-args
+ostree_kernel_args_free , function in ostree-kernel-args
-ostree_kernel_args_from_string, function in ostree-kernel-args
+ostree_kernel_args_from_string , function in ostree-kernel-args
-ostree_kernel_args_get_last_value, function in ostree-kernel-args
+ostree_kernel_args_get_last_value , function in ostree-kernel-args
-ostree_kernel_args_new, function in ostree-kernel-args
+ostree_kernel_args_new , function in ostree-kernel-args
-ostree_kernel_args_new_replace, function in ostree-kernel-args
+ostree_kernel_args_new_replace , function in ostree-kernel-args
-ostree_kernel_args_parse_append, function in ostree-kernel-args
+ostree_kernel_args_parse_append , function in ostree-kernel-args
-ostree_kernel_args_replace, function in ostree-kernel-args
+ostree_kernel_args_replace , function in ostree-kernel-args
-ostree_kernel_args_replace_argv, function in ostree-kernel-args
+ostree_kernel_args_replace_argv , function in ostree-kernel-args
-ostree_kernel_args_replace_take, function in ostree-kernel-args
+ostree_kernel_args_replace_take , function in ostree-kernel-args
-ostree_kernel_args_to_string, function in ostree-kernel-args
+ostree_kernel_args_to_string , function in ostree-kernel-args
-ostree_kernel_args_to_strv, function in ostree-kernel-args
+ostree_kernel_args_to_strv , function in ostree-kernel-args
M
@@ -659,7 +680,7 @@ ostree_kernel_args_to_strv, function in ostree-kernel-args
-OSTREE_META_KEY_DEPLOY_COLLECTION_ID, macro in ostree-repo-remote-finder
+OSTREE_META_KEY_DEPLOY_COLLECTION_ID , macro in ostree-repo-remote-finder
@@ -790,27 +811,27 @@ OSTREE_META_KEY_DEPLOY_COLLECTION_ID, macro in ostree-repo-remote-finder
-OSTREE_RELEASE_VERSION, macro in ostree-version
+OSTREE_RELEASE_VERSION , macro in ostree-version
-OstreeRemote, struct in ostree-remote
+OstreeRemote , struct in ostree-remote
-ostree_remote_get_name, function in ostree-remote
+ostree_remote_get_name , function in ostree-remote
-ostree_remote_get_url, function in ostree-remote
+ostree_remote_get_url , function in ostree-remote
-ostree_remote_ref, function in ostree-remote
+ostree_remote_ref , function in ostree-remote
-ostree_remote_unref, function in ostree-remote
+ostree_remote_unref , function in ostree-remote
@@ -870,7 +891,7 @@ ostree_remote_unref, function in ostree-remote
-OstreeRepoFinder, struct in ostree-repo-finder
+OstreeRepoFinder , struct in ostree-repo-finder
@@ -890,7 +911,7 @@ OstreeRepoFinderOverride, struct in OstreeRepoFinderOverride
-OstreeRepoFinderResultv, typedef in ostree-repo-finder
+OstreeRepoFinderResultv , typedef in ostree-repo-finder
@@ -1118,47 +1139,47 @@ OstreeRepoFinderResultv, typedef in ostree-repo-finder
-ostree_repo_finder_resolve_all_async, function in ostree-repo-finder
+ostree_repo_finder_resolve_all_async , function in ostree-repo-finder
-ostree_repo_finder_resolve_all_finish, function in ostree-repo-finder
+ostree_repo_finder_resolve_all_finish , function in ostree-repo-finder
-ostree_repo_finder_resolve_async, function in ostree-repo-finder
+ostree_repo_finder_resolve_async , function in ostree-repo-finder
-ostree_repo_finder_resolve_finish, function in ostree-repo-finder
+ostree_repo_finder_resolve_finish , function in ostree-repo-finder
-ostree_repo_finder_result_compare, function in ostree-repo-finder
+ostree_repo_finder_result_compare , function in ostree-repo-finder
-ostree_repo_finder_result_dup, function in ostree-repo-finder
+ostree_repo_finder_result_dup , function in ostree-repo-finder
-ostree_repo_finder_result_free, function in ostree-repo-finder
+ostree_repo_finder_result_free , function in ostree-repo-finder
-ostree_repo_finder_result_freev, function in ostree-repo-finder
+ostree_repo_finder_result_freev , function in ostree-repo-finder
-ostree_repo_finder_result_new, function in ostree-repo-finder
+ostree_repo_finder_result_new , function in ostree-repo-finder
-ostree_repo_find_remotes_async, function in ostree-repo-remote-finder
+ostree_repo_find_remotes_async , function in ostree-repo-remote-finder
-ostree_repo_find_remotes_finish, function in ostree-repo-remote-finder
+ostree_repo_find_remotes_finish , function in ostree-repo-remote-finder
@@ -1322,7 +1343,7 @@ ostree_repo_find_remotes_finish, function in ostree-repo-remote-finder
-OSTREE_REPO_METADATA_REF, macro in ostree-repo-remote-finder
+OSTREE_REPO_METADATA_REF , macro in ostree-repo-remote-finder
@@ -1374,11 +1395,11 @@ OSTREE_REPO_METADATA_REF, macro in ostree-repo-remote-finder
-ostree_repo_pull_from_remotes_async, function in ostree-repo-remote-finder
+ostree_repo_pull_from_remotes_async , function in ostree-repo-remote-finder
-ostree_repo_pull_from_remotes_finish, function in ostree-repo-remote-finder
+ostree_repo_pull_from_remotes_finish , function in ostree-repo-remote-finder
@@ -1466,7 +1487,7 @@ ostree_repo_pull_from_remotes_finish, function in ostree-repo-remote-finder
-ostree_repo_resolve_keyring_for_collection, function in ostree-repo-remote-finder
+ostree_repo_resolve_keyring_for_collection , function in ostree-repo-remote-finder
@@ -2113,20 +2134,20 @@ ostree_repo_resolve_keyring_for_collection, function in ostree-repo-remote-finde
-OSTREE_VERSION, macro in ostree-version
+OSTREE_VERSION , macro in ostree-version
-OSTREE_VERSION_HEX, macro in ostree-version
+OSTREE_VERSION_HEX , macro in ostree-version
-OSTREE_VERSION_S, macro in ostree-version
+OSTREE_VERSION_S , macro in ostree-version
Y
-OSTREE_YEAR_VERSION, macro in ostree-version
+OSTREE_YEAR_VERSION , macro in ostree-version
diff --git a/apidoc/ostree-docs.xml b/apidoc/ostree-docs.xml
index 1ad0de37..88bc8903 100644
--- a/apidoc/ostree-docs.xml
+++ b/apidoc/ostree-docs.xml
@@ -25,9 +25,16 @@
+
+
+
+
+
+
+
API Index
diff --git a/apidoc/version.xml b/apidoc/version.xml
index f34332ce..b52d9afe 100644
--- a/apidoc/version.xml
+++ b/apidoc/version.xml
@@ -1 +1 @@
-2021.6
\ No newline at end of file
+2022.3
\ No newline at end of file
diff --git a/configure b/configure
index f7c53201..911f6878 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 2022.2.
+# Generated by GNU Autoconf 2.69 for libostree 2022.3.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libostree'
PACKAGE_TARNAME='libostree'
-PACKAGE_VERSION='2022.2'
-PACKAGE_STRING='libostree 2022.2'
+PACKAGE_VERSION='2022.3'
+PACKAGE_STRING='libostree 2022.3'
PACKAGE_BUGREPORT='walters@verbum.org'
PACKAGE_URL=''
@@ -692,6 +692,8 @@ USE_LIBARCHIVE_FALSE
USE_LIBARCHIVE_TRUE
OT_DEP_LIBARCHIVE_LIBS
OT_DEP_LIBARCHIVE_CFLAGS
+ENABLE_MAN_HTML_FALSE
+ENABLE_MAN_HTML_TRUE
ENABLE_MAN_FALSE
ENABLE_MAN_TRUE
XSLTPROC
@@ -943,6 +945,7 @@ enable_gtk_doc
enable_gtk_doc_html
enable_gtk_doc_pdf
enable_man
+enable_man_html
with_libarchive
with_selinux
with_smack
@@ -1569,7 +1572,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 2022.2 to adapt to many kinds of systems.
+\`configure' configures libostree 2022.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1640,7 +1643,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libostree 2022.2:";;
+ short | recursive ) echo "Configuration of libostree 2022.3:";;
esac
cat <<\_ACEOF
@@ -1686,6 +1689,7 @@ Optional Features:
--enable-gtk-doc-html build documentation in html format [[default=yes]]
--enable-gtk-doc-pdf build documentation in pdf format [[default=no]]
--enable-man generate man pages [default=auto]
+ --enable-man-html generate man HTML pages [default=no]
--enable-rofiles-fuse generate rofiles-fuse helper [default=yes]
Optional Packages:
@@ -1903,7 +1907,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libostree configure 2022.2
+libostree configure 2022.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2375,7 +2379,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 2022.2, which was
+It was created by libostree $as_me 2022.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3243,7 +3247,7 @@ fi
# Define the identity of the package.
PACKAGE='libostree'
- VERSION='2022.2'
+ VERSION='2022.3'
# Some tools Automake needs.
@@ -5977,9 +5981,9 @@ test -n "$YACC" || YACC="yacc"
YEAR_VERSION=2022
-RELEASE_VERSION=2
+RELEASE_VERSION=3
-PACKAGE_VERSION=2022.2
+PACKAGE_VERSION=2022.3
pkglibexecdir=$libexecdir/$PACKAGE
@@ -14713,7 +14717,7 @@ rm -f core conftest.err conftest.$ac_objext \
rm -f conf.glibtest
-GIO_DEPENDENCY="gio-unix-2.0 >= 2.44.0"
+GIO_DEPENDENCY="gio-unix-2.0 >= 2.66.0"
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GIO_UNIX" >&5
@@ -16736,6 +16740,28 @@ else
fi
+# Check whether --enable-man-html was given.
+if test "${enable_man_html+set}" = set; then :
+ enableval=$enable_man_html;
+else
+ enable_man_html=no
+fi
+
+
+if test "$enable_man_html" = yes && test "$enable_man" = no; then :
+
+ as_fn_error $? "--enable-man is required for --enable-man-html" "$LINENO" 5
+
+fi
+ if test "$enable_man_html" = yes; then
+ ENABLE_MAN_HTML_TRUE=
+ ENABLE_MAN_HTML_FALSE='#'
+else
+ ENABLE_MAN_HTML_TRUE='#'
+ ENABLE_MAN_HTML_FALSE=
+fi
+
+
# Check whether --with-libarchive was given.
if test "${with_libarchive+set}" = set; then :
@@ -18597,6 +18623,10 @@ if test -z "${ENABLE_MAN_TRUE}" && test -z "${ENABLE_MAN_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_MAN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_MAN_HTML_TRUE}" && test -z "${ENABLE_MAN_HTML_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_MAN_HTML\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${USE_LIBARCHIVE_TRUE}" && test -z "${USE_LIBARCHIVE_FALSE}"; then
as_fn_error $? "conditional \"USE_LIBARCHIVE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19062,7 +19092,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 2022.2, which was
+This file was extended by libostree $as_me 2022.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19128,7 +19158,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 2022.2
+libostree config.status 2022.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 3bd735ed..f59e9d7d 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], [2022])
-m4_define([release_version], [2])
+m4_define([release_version], [3])
m4_define([package_version], [year_version.release_version])
AC_INIT([libostree], [package_version], [walters@verbum.org])
is_release_build=yes
@@ -113,7 +113,7 @@ AM_PATH_GLIB_2_0(,,AC_MSG_ERROR([GLib not found]))
dnl When bumping the gio-unix-2.0 dependency (or glib-2.0 in general),
dnl remember to bump GLIB_VERSION_MIN_REQUIRED and
dnl GLIB_VERSION_MAX_ALLOWED in Makefile.am
-GIO_DEPENDENCY="gio-unix-2.0 >= 2.44.0"
+GIO_DEPENDENCY="gio-unix-2.0 >= 2.66.0"
PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY)
dnl 5.1.0 is an arbitrary version here
@@ -292,6 +292,16 @@ AS_IF([test "$enable_man" != no], [
])
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
+AC_ARG_ENABLE([man-html],
+ [AS_HELP_STRING([--enable-man-html],
+ [generate man HTML pages [default=no]])],,
+ enable_man_html=no)
+
+AS_IF([test "$enable_man_html" = yes && test "$enable_man" = no], [
+ AC_MSG_ERROR([--enable-man is required for --enable-man-html])
+])
+AM_CONDITIONAL(ENABLE_MAN_HTML, test "$enable_man_html" = yes)
+
AC_ARG_WITH(libarchive,
AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
:, with_libarchive=maybe)
diff --git a/man/html.xsl b/man/html.xsl
new file mode 100644
index 00000000..17a425d4
--- /dev/null
+++ b/man/html.xsl
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .html
+
+
+
+
+
+
diff --git a/man/index.xml b/man/index.xml
new file mode 100644
index 00000000..e20ae871
--- /dev/null
+++ b/man/index.xml
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+ OSTree Manual
+
+
+ ostree 1
+
+
+
+ ostree-admin-cleanup 1
+
+
+
+ ostree-admin-config-diff 1
+
+
+
+ ostree-admin-deploy 1
+
+
+
+ ostree-admin-init-fs 1
+
+
+
+ ostree-admin-instutil 1
+
+
+
+ ostree-admin-os-init 1
+
+
+
+ ostree-admin-pin 1
+
+
+
+ ostree-admin-set-origin 1
+
+
+
+ ostree-admin-status 1
+
+
+
+ ostree-admin-switch 1
+
+
+
+ ostree-admin-undeploy 1
+
+
+
+ ostree-admin-unlock 1
+
+
+
+ ostree-admin-upgrade 1
+
+
+
+ ostree-admin 1
+
+
+
+ ostree-cat 1
+
+
+
+ ostree-checkout 1
+
+
+
+ ostree-checksum 1
+
+
+
+ ostree-commit 1
+
+
+
+ ostree-config 1
+
+
+
+ ostree-create-usb 1
+
+
+
+ ostree-diff 1
+
+
+
+ ostree-export 1
+
+
+
+ ostree-find-remotes 1
+
+
+
+ ostree-fsck 1
+
+
+
+ ostree-gpg-sign 1
+
+
+
+ ostree-init 1
+
+
+
+ ostree-log 1
+
+
+
+ ostree-ls 1
+
+
+
+ ostree-prune 1
+
+
+
+ ostree-pull-local 1
+
+
+
+ ostree-pull 1
+
+
+
+ ostree-refs 1
+
+
+
+ ostree-remote 1
+
+
+
+ ostree.repo-config 5
+
+
+
+ ostree.repo 5
+
+
+
+ ostree-reset 1
+
+
+
+ ostree-rev-parse 1
+
+
+
+ ostree-show 1
+
+
+
+ ostree-sign 1
+
+
+
+ ostree-static-delta 1
+
+
+
+ ostree-summary 1
+
+
+
+ ostree-trivial-httpd 1
+
+
+
+ rofiles-fuse 1
+
+
diff --git a/man/ostree.xml b/man/ostree.xml
index c06c6121..39f78845 100644
--- a/man/ostree.xml
+++ b/man/ostree.xml
@@ -151,7 +151,7 @@ License along with this library. If not, see .
ostree-admin-cleanup 1
- Delete untagged
+ Delete untagged
deployments and repository objects.
@@ -160,7 +160,7 @@ License along with this library. If not, see .
ostree-admin-config-diff 1
- See changes to
+ See changes to
/etc as compared
to the current default (from
/usr/etc ).
@@ -171,7 +171,7 @@ License along with this library. If not, see .
ostree-admin-deploy 1
- Takes a particular
+ Takes a particular
commit or revision, and sets it up for
the next boot.
@@ -181,7 +181,7 @@ License along with this library. If not, see .
ostree-admin-init-fs 1
- Initialize a root filesystem
+ Initialize a root filesystem
in a specified path.
@@ -190,7 +190,7 @@ License along with this library. If not, see .
ostree-admin-instutil 1
- Utility functions intended primarily for operating system installation programs
+ Utility functions intended primarily for operating system installation programs
@@ -198,7 +198,7 @@ License along with this library. If not, see .
ostree-admin-os-init 1
- Initialize the
+ Initialize the
deployment location for an operating
system with a specified name.
@@ -208,7 +208,7 @@ License along with this library. If not, see .
ostree-admin-status 1
- Show and list the deployments.
+ Show and list the deployments.
@@ -216,7 +216,7 @@ License along with this library. If not, see .
ostree-admin-switch 1
- Choose a different ref
+ Choose a different ref
to track from the same remote as the
current tree.
@@ -226,7 +226,7 @@ License along with this library. If not, see .
ostree-admin-undeploy 1
- Remove the previously
+ Remove the previously
INDEX
deployed tree from the bootloader
configuration.
@@ -237,7 +237,7 @@ License along with this library. If not, see .
ostree-admin-upgrade 1
- Download the latest version for the
+ Download the latest version for the
current ref, and deploy it.
@@ -253,7 +253,7 @@ License along with this library. If not, see .
ostree-cat 1
- Concatenate contents of files
+ Concatenate contents of files
@@ -261,7 +261,7 @@ License along with this library. If not, see .
ostree-checkout 1
- Check out a commit into a filesystem tree.
+ Check out a commit into a filesystem tree.
@@ -269,7 +269,7 @@ License along with this library. If not, see .
ostree-checksum 1
- Gives checksum of any file.
+ Gives checksum of any file.
@@ -277,7 +277,7 @@ License along with this library. If not, see .
ostree-commit 1
- Given one or more
+ Given one or more
trees, create a new commit using those contents.
@@ -286,7 +286,7 @@ License along with this library. If not, see .
ostree-config 1
- Change settings.
+ Change settings.
@@ -294,7 +294,7 @@ License along with this library. If not, see .
ostree-create-usb 1
- Put the given refs on an external drive for P2P distribution.
+ Put the given refs on an external drive for P2P distribution.
@@ -302,7 +302,7 @@ License along with this library. If not, see .
ostree-diff 1
- Concisely list
+ Concisely list
differences between the given refs.
@@ -311,7 +311,7 @@ License along with this library. If not, see .
ostree-find-remotes 1
- Find remotes to serve the given refs.
+ Find remotes to serve the given refs.
@@ -319,7 +319,7 @@ License along with this library. If not, see .
ostree-fsck 1
- Check a repository for consistency.
+ Check a repository for consistency.
@@ -327,7 +327,7 @@ License along with this library. If not, see .
ostree-init 1
- Initialize a new repository.
+ Initialize a new repository.
@@ -335,7 +335,7 @@ License along with this library. If not, see .
ostree-log 1
- Show revision log.
+ Show revision log.
@@ -343,7 +343,7 @@ License along with this library. If not, see .
ostree-ls 1
- List the contents of a given commit.
+ List the contents of a given commit.
@@ -351,7 +351,7 @@ License along with this library. If not, see .
ostree-prune 1
- Search for unreachable objects.
+ Search for unreachable objects.
@@ -359,7 +359,7 @@ License along with this library. If not, see .
ostree-pull-local 1
- Copy data from source-repo.
+ Copy data from source-repo.
@@ -367,7 +367,7 @@ License along with this library. If not, see .
ostree-pull 1
- Download data from remote repo. If you have libsoup.
+ Download data from remote repo. If you have libsoup.
@@ -375,7 +375,7 @@ License along with this library. If not, see .
ostree-refs 1
- List refs.
+ List refs.
@@ -383,7 +383,7 @@ License along with this library. If not, see .
ostree-remote 1
- Manipulate remote archive configuration.
+ Manipulate remote archive configuration.
@@ -391,7 +391,7 @@ License along with this library. If not, see .
ostree-reset 1
- Reset a ref to a previous commit.
+ Reset a ref to a previous commit.
@@ -399,7 +399,7 @@ License along with this library. If not, see .
ostree-rev-parse 1
- Show the SHA256 corresponding to a given rev.
+ Show the SHA256 corresponding to a given rev.
@@ -407,7 +407,7 @@ License along with this library. If not, see .
ostree-show 1
- Given an OSTree SHA256 checksum, display its contents.
+ Given an OSTree SHA256 checksum, display its contents.
@@ -415,7 +415,7 @@ License along with this library. If not, see .
ostree-static-delta 1
- Manage static delta files.
+ Manage static delta files.
@@ -423,7 +423,7 @@ License along with this library. If not, see .
ostree-summary 1
- Regenerate the repository summary metadata.
+ Regenerate the repository summary metadata.
@@ -431,7 +431,7 @@ License along with this library. If not, see .
ostree-trivial-httpd 1
- Simple webserver.
+ Simple webserver.
diff --git a/src/boot/ostree-boot-complete.service b/src/boot/ostree-boot-complete.service
new file mode 100644
index 00000000..5c09fdc9
--- /dev/null
+++ b/src/boot/ostree-boot-complete.service
@@ -0,0 +1,33 @@
+# Copyright (C) 2022 Red Hat, Inc.
+#
+# 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, see .
+
+[Unit]
+Description=OSTree Complete Boot
+Documentation=man:ostree(1)
+# For now, this is the only condition on which we start, but it's
+# marked as a triggering condition in case in the future we want
+# to do something else.
+ConditionPathExists=|/boot/ostree/finalize-failure.stamp
+RequiresMountsFor=/boot
+# Ensure that we propagate the failure into the current boot before
+# any further finalization attempts.
+Before=ostree-finalize-staged.service
+
+[Service]
+Type=oneshot
+# To write to /boot while keeping it read-only
+MountFlags=slave
+RemainAfterExit=yes
+ExecStart=/usr/bin/ostree admin boot-complete
diff --git a/src/boot/ostree-tmpfiles.conf b/src/boot/ostree-tmpfiles.conf
index 4cbba0bd..69c2d3f3 100644
--- a/src/boot/ostree-tmpfiles.conf
+++ b/src/boot/ostree-tmpfiles.conf
@@ -13,5 +13,7 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see .
+# ostree runtime configuration
+d /run/ostree 0755 root root -
# https://github.com/ostreedev/ostree/issues/393
R! /var/tmp/ostree-unlock-ovl.*
diff --git a/src/libostree/ostree-chain-input-stream.c b/src/libostree/ostree-chain-input-stream.c
index 879d10c7..5ff4392a 100644
--- a/src/libostree/ostree-chain-input-stream.c
+++ b/src/libostree/ostree-chain-input-stream.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -26,13 +27,13 @@ enum {
PROP_STREAMS
};
-G_DEFINE_TYPE (OstreeChainInputStream, ostree_chain_input_stream, G_TYPE_INPUT_STREAM)
-
struct _OstreeChainInputStreamPrivate {
GPtrArray *streams;
guint index;
};
+G_DEFINE_TYPE_WITH_PRIVATE (OstreeChainInputStream, ostree_chain_input_stream, G_TYPE_INPUT_STREAM)
+
static void ostree_chain_input_stream_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -56,8 +57,6 @@ ostree_chain_input_stream_class_init (OstreeChainInputStreamClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
-
- g_type_class_add_private (klass, sizeof (OstreeChainInputStreamPrivate));
gobject_class->get_property = ostree_chain_input_stream_get_property;
gobject_class->set_property = ostree_chain_input_stream_set_property;
@@ -137,9 +136,7 @@ ostree_chain_input_stream_finalize (GObject *object)
static void
ostree_chain_input_stream_init (OstreeChainInputStream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- OSTREE_TYPE_CHAIN_INPUT_STREAM,
- OstreeChainInputStreamPrivate);
+ self->priv = ostree_chain_input_stream_get_instance_private (self);
}
diff --git a/src/libostree/ostree-checksum-input-stream.c b/src/libostree/ostree-checksum-input-stream.c
index 8cef10d3..7cdf2048 100644
--- a/src/libostree/ostree-checksum-input-stream.c
+++ b/src/libostree/ostree-checksum-input-stream.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -26,12 +27,12 @@ enum {
PROP_CHECKSUM
};
-G_DEFINE_TYPE (OstreeChecksumInputStream, ostree_checksum_input_stream, G_TYPE_FILTER_INPUT_STREAM)
-
struct _OstreeChecksumInputStreamPrivate {
GChecksum *checksum;
};
+G_DEFINE_TYPE_WITH_PRIVATE (OstreeChecksumInputStream, ostree_checksum_input_stream, G_TYPE_FILTER_INPUT_STREAM)
+
static void ostree_checksum_input_stream_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -51,8 +52,6 @@ ostree_checksum_input_stream_class_init (OstreeChecksumInputStreamClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
-
- g_type_class_add_private (klass, sizeof (OstreeChecksumInputStreamPrivate));
gobject_class->get_property = ostree_checksum_input_stream_get_property;
gobject_class->set_property = ostree_checksum_input_stream_set_property;
@@ -118,10 +117,7 @@ ostree_checksum_input_stream_get_property (GObject *object,
static void
ostree_checksum_input_stream_init (OstreeChecksumInputStream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- OSTREE_TYPE_CHECKSUM_INPUT_STREAM,
- OstreeChecksumInputStreamPrivate);
-
+ self->priv = ostree_checksum_input_stream_get_instance_private (self);
}
OstreeChecksumInputStream *
diff --git a/src/libostree/ostree-cmdprivate.c b/src/libostree/ostree-cmdprivate.c
index c9a6e2e1..f6c114f4 100644
--- a/src/libostree/ostree-cmdprivate.c
+++ b/src/libostree/ostree-cmdprivate.c
@@ -51,6 +51,7 @@ ostree_cmd__private__ (void)
_ostree_repo_static_delta_delete,
_ostree_repo_verify_bindings,
_ostree_sysroot_finalize_staged,
+ _ostree_sysroot_boot_complete,
};
return &table;
diff --git a/src/libostree/ostree-cmdprivate.h b/src/libostree/ostree-cmdprivate.h
index 46452ebd..17f943c8 100644
--- a/src/libostree/ostree-cmdprivate.h
+++ b/src/libostree/ostree-cmdprivate.h
@@ -33,6 +33,7 @@ typedef struct {
gboolean (* ostree_static_delta_delete) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error);
gboolean (* ostree_repo_verify_bindings) (const char *collection_id, const char *ref_name, GVariant *commit, GError **error);
gboolean (* ostree_finalize_staged) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
+ gboolean (* ostree_boot_complete) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
} OstreeCmdPrivateVTable;
/* Note this not really "public", we just export the symbol, but not the header */
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index f0d0e698..794f0e11 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -1031,19 +1032,22 @@ typedef struct {
} ChecksumFileAsyncData;
static void
-checksum_file_async_thread (GSimpleAsyncResult *res,
+checksum_file_async_thread (GTask *task,
GObject *object,
+ gpointer datap,
GCancellable *cancellable)
{
GError *error = NULL;
- ChecksumFileAsyncData *data;
+ ChecksumFileAsyncData *data = datap;
guchar *csum = NULL;
- data = g_simple_async_result_get_op_res_gpointer (res);
if (!ostree_checksum_file (data->f, data->objtype, &csum, cancellable, &error))
- g_simple_async_result_take_error (res, error);
+ g_task_return_error (task, error);
else
- data->csum = csum;
+ {
+ data->csum = csum;
+ g_task_return_pointer (task, data, NULL);
+ }
}
static void
@@ -1076,18 +1080,18 @@ ostree_checksum_file_async (GFile *f,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GSimpleAsyncResult *res;
+ g_autoptr(GTask) task = NULL;
ChecksumFileAsyncData *data;
data = g_new0 (ChecksumFileAsyncData, 1);
data->f = g_object_ref (f);
data->objtype = objtype;
- res = g_simple_async_result_new (G_OBJECT (f), callback, user_data, ostree_checksum_file_async);
- g_simple_async_result_set_op_res_gpointer (res, data, (GDestroyNotify)checksum_file_async_data_free);
-
- g_simple_async_result_run_in_thread (res, checksum_file_async_thread, io_priority, cancellable);
- g_object_unref (res);
+ task = g_task_new (G_OBJECT (f), cancellable, callback, user_data);
+ g_task_set_task_data (task, data, (GDestroyNotify)checksum_file_async_data_free);
+ g_task_set_priority (task, io_priority);
+ g_task_set_source_tag (task, ostree_checksum_file_async);
+ g_task_run_in_thread (task, (GTaskThreadFunc)checksum_file_async_thread);
}
/**
@@ -1106,15 +1110,19 @@ ostree_checksum_file_async_finish (GFile *f,
guchar **out_csum,
GError **error)
{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
ChecksumFileAsyncData *data;
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_checksum_file_async);
+ g_return_val_if_fail (G_IS_FILE (f), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, f), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (result, ostree_checksum_file_async), FALSE);
- if (g_simple_async_result_propagate_error (simple, error))
+ data = g_task_propagate_pointer (G_TASK (result), error);
+
+ if (data == NULL)
return FALSE;
- data = g_simple_async_result_get_op_res_gpointer (simple);
/* Transfer ownership */
*out_csum = data->csum;
data->csum = NULL;
diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c
index 35769f8a..75038ecc 100644
--- a/src/libostree/ostree-fetcher-curl.c
+++ b/src/libostree/ostree-fetcher-curl.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -50,8 +51,6 @@
#include "ostree-repo-private.h"
#include "otutil.h"
-#include "ostree-soup-uri.h"
-
typedef struct FetcherRequest FetcherRequest;
typedef struct SockInfo SockInfo;
@@ -183,13 +182,13 @@ _ostree_fetcher_finalize (GObject *object)
g_free (self->cookie_jar_path);
g_free (self->proxy);
g_assert_cmpint (g_hash_table_size (self->outstanding_requests), ==, 0);
- g_clear_pointer (&self->extra_headers, (GDestroyNotify)curl_slist_free_all);
+ g_clear_pointer (&self->extra_headers, curl_slist_free_all);
g_hash_table_unref (self->outstanding_requests);
g_hash_table_unref (self->sockets);
- g_clear_pointer (&self->timer_event, (GDestroyNotify)destroy_and_unref_source);
+ g_clear_pointer (&self->timer_event, destroy_and_unref_source);
if (self->mainctx)
g_main_context_unref (self->mainctx);
- g_clear_pointer (&self->custom_user_agent, (GDestroyNotify)g_free);
+ g_clear_pointer (&self->custom_user_agent, g_free);
G_OBJECT_CLASS (_ostree_fetcher_parent_class)->finalize (object);
}
@@ -266,11 +265,11 @@ destroy_and_unref_source (GSource *source)
}
static char *
-request_get_uri (FetcherRequest *req, SoupURI *baseuri)
+request_get_uri (FetcherRequest *req, GUri *baseuri)
{
if (!req->filename)
- return soup_uri_to_string (baseuri, FALSE);
- { g_autofree char *uristr = soup_uri_to_string (baseuri, FALSE);
+ return g_uri_to_string_partial (baseuri, G_URI_HIDE_PASSWORD);
+ { g_autofree char *uristr = g_uri_to_string_partial (baseuri, G_URI_HIDE_PASSWORD);
return g_build_filename (uristr, req->filename, NULL);
}
}
@@ -424,7 +423,7 @@ static gboolean
timer_cb (gpointer data)
{
OstreeFetcher *fetcher = data;
- g_clear_pointer (&fetcher->timer_event, (GDestroyNotify)destroy_and_unref_source);
+ g_clear_pointer (&fetcher->timer_event, destroy_and_unref_source);
(void)curl_multi_socket_action (fetcher->multi, CURL_SOCKET_TIMEOUT, 0, &fetcher->curl_running);
check_multi_info (fetcher);
@@ -437,7 +436,7 @@ update_timeout_cb (CURLM *multi, long timeout_ms, void *userp)
{
OstreeFetcher *fetcher = userp;
- g_clear_pointer (&fetcher->timer_event, (GDestroyNotify)destroy_and_unref_source);
+ g_clear_pointer (&fetcher->timer_event, destroy_and_unref_source);
if (timeout_ms != -1)
{
@@ -479,7 +478,7 @@ sock_unref (SockInfo *f)
return;
if (--f->refcount != 0)
return;
- g_clear_pointer (&f->ch, (GDestroyNotify)destroy_and_unref_source);
+ g_clear_pointer (&f->ch, destroy_and_unref_source);
g_free (f);
}
@@ -492,7 +491,7 @@ setsock (SockInfo*f, curl_socket_t s, int act, OstreeFetcher *fetcher)
f->sockfd = s;
f->action = act;
- g_clear_pointer (&f->ch, (GDestroyNotify)destroy_and_unref_source);
+ g_clear_pointer (&f->ch, destroy_and_unref_source);
/* TODO - investigate new g_source_modify_unix_fd() so changing the poll
* flags involves less allocation.
*/
@@ -648,7 +647,7 @@ request_unref (FetcherRequest *req)
g_string_free (req->output_buf, TRUE);
g_free (req->if_none_match);
g_free (req->out_etag);
- g_clear_pointer (&req->req_headers, (GDestroyNotify)curl_slist_free_all);
+ g_clear_pointer (&req->req_headers, curl_slist_free_all);
curl_easy_cleanup (req->easy);
g_free (req);
@@ -705,7 +704,7 @@ _ostree_fetcher_set_extra_headers (OstreeFetcher *self,
const char *key;
const char *value;
- g_clear_pointer (&self->extra_headers, (GDestroyNotify)curl_slist_free_all);
+ g_clear_pointer (&self->extra_headers, curl_slist_free_all);
g_variant_iter_init (&viter, extra_headers);
while (g_variant_iter_loop (&viter, "(&s&s)", &key, &value))
@@ -719,7 +718,7 @@ void
_ostree_fetcher_set_extra_user_agent (OstreeFetcher *self,
const char *extra_user_agent)
{
- g_clear_pointer (&self->custom_user_agent, (GDestroyNotify)g_free);
+ g_clear_pointer (&self->custom_user_agent, g_free);
if (extra_user_agent)
{
self->custom_user_agent =
@@ -763,13 +762,15 @@ initiate_next_curl_request (FetcherRequest *req,
g_assert_cmpint (req->idx, <, req->mirrorlist->len);
- SoupURI *baseuri = req->mirrorlist->pdata[req->idx];
+ GUri *baseuri = req->mirrorlist->pdata[req->idx];
{ g_autofree char *uri = request_get_uri (req, baseuri);
- curl_easy_setopt (req->easy, CURLOPT_URL, uri);
+ rc = curl_easy_setopt (req->easy, CURLOPT_URL, uri);
+ g_assert_cmpint (rc, ==, CURLM_OK);
}
- (void) curl_easy_setopt (req->easy, CURLOPT_USERAGENT,
+ rc = curl_easy_setopt (req->easy, CURLOPT_USERAGENT,
self->custom_user_agent ?: OSTREE_FETCHER_USERAGENT_STRING);
+ g_assert_cmpint (rc, ==, CURLM_OK);
/* Set caching request headers */
if (req->if_none_match != NULL)
@@ -792,7 +793,10 @@ initiate_next_curl_request (FetcherRequest *req,
req->req_headers = curl_slist_append (req->req_headers, l->data);
if (req->req_headers != NULL)
- curl_easy_setopt (req->easy, CURLOPT_HTTPHEADER, req->req_headers);
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_HTTPHEADER, req->req_headers);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
if (self->cookie_jar_path)
{
@@ -809,10 +813,17 @@ initiate_next_curl_request (FetcherRequest *req,
}
if (self->tls_ca_db_path)
- curl_easy_setopt (req->easy, CURLOPT_CAINFO, self->tls_ca_db_path);
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_CAINFO, self->tls_ca_db_path);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
+
if ((self->config_flags & OSTREE_FETCHER_FLAGS_TLS_PERMISSIVE) > 0)
- curl_easy_setopt (req->easy, CURLOPT_SSL_VERIFYPEER, 0L);
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSL_VERIFYPEER, 0L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
if (self->tls_client_cert_path)
{
@@ -827,28 +838,43 @@ initiate_next_curl_request (FetcherRequest *req,
*/
if (g_str_has_prefix (self->tls_client_key_path, "pkcs11:"))
{
- curl_easy_setopt (req->easy, CURLOPT_SSLENGINE, "pkcs11");
- curl_easy_setopt (req->easy, CURLOPT_SSLENGINE_DEFAULT, 1L);
- curl_easy_setopt (req->easy, CURLOPT_SSLKEYTYPE, "ENG");
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLENGINE, "pkcs11");
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLENGINE_DEFAULT, 1L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLKEYTYPE, "ENG");
+ g_assert_cmpint (rc, ==, CURLM_OK);
}
if (g_str_has_prefix (self->tls_client_cert_path, "pkcs11:"))
- curl_easy_setopt (req->easy, CURLOPT_SSLCERTTYPE, "ENG");
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLCERTTYPE, "ENG");
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
- curl_easy_setopt (req->easy, CURLOPT_SSLCERT, self->tls_client_cert_path);
- curl_easy_setopt (req->easy, CURLOPT_SSLKEY, self->tls_client_key_path);
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLCERT, self->tls_client_cert_path);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+
+ rc = curl_easy_setopt (req->easy, CURLOPT_SSLKEY, self->tls_client_key_path);
+ g_assert_cmpint (rc, ==, CURLM_OK);
}
if ((self->config_flags & OSTREE_FETCHER_FLAGS_TRANSFER_GZIP) > 0)
- curl_easy_setopt (req->easy, CURLOPT_ACCEPT_ENCODING, "");
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_ACCEPT_ENCODING, "");
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
/* If we have e.g. basic auth in the URL string, let's honor that */
- const char *username = soup_uri_get_user (baseuri);
- curl_easy_setopt (req->easy, CURLOPT_USERNAME, username);
- const char *password = soup_uri_get_password (baseuri);
- curl_easy_setopt (req->easy, CURLOPT_PASSWORD, password);
+ const char *username = g_uri_get_user (baseuri);
+ rc = curl_easy_setopt (req->easy, CURLOPT_USERNAME, username);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ const char *password = g_uri_get_password (baseuri);
+ rc = curl_easy_setopt (req->easy, CURLOPT_PASSWORD, password);
+ g_assert_cmpint (rc, ==, CURLM_OK);
/* We should only speak HTTP; TODO: only enable file if specified */
- curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
+ rc = curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
+ g_assert_cmpint (rc, ==, CURLM_OK);
/* Picked the current version in F25 as of 20170127, since
* there are numerous HTTP/2 fixes since the original version in
* libcurl 7.43.0.
@@ -856,25 +882,37 @@ initiate_next_curl_request (FetcherRequest *req,
if (!(self->config_flags & OSTREE_FETCHER_FLAGS_DISABLE_HTTP2))
{
#if CURL_AT_LEAST_VERSION(7, 51, 0)
- curl_easy_setopt (req->easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+ rc = curl_easy_setopt (req->easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+ g_assert_cmpint (rc, ==, CURLM_OK);
#endif
/* https://github.com/curl/curl/blob/curl-7_53_0/docs/examples/http2-download.c */
#if (CURLPIPE_MULTIPLEX > 0)
/* wait for pipe connection to confirm */
- curl_easy_setopt (req->easy, CURLOPT_PIPEWAIT, 1L);
+ rc = curl_easy_setopt (req->easy, CURLOPT_PIPEWAIT, 1L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
#endif
}
- curl_easy_setopt (req->easy, CURLOPT_WRITEFUNCTION, write_cb);
- curl_easy_setopt (req->easy, CURLOPT_HEADERFUNCTION, response_header_cb);
+ rc = curl_easy_setopt (req->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_HEADERFUNCTION, response_header_cb);
+ g_assert_cmpint (rc, ==, CURLM_OK);
if (g_getenv ("OSTREE_DEBUG_HTTP"))
- curl_easy_setopt (req->easy, CURLOPT_VERBOSE, 1L);
- curl_easy_setopt (req->easy, CURLOPT_ERRORBUFFER, req->error);
+ {
+ rc = curl_easy_setopt (req->easy, CURLOPT_VERBOSE, 1L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ }
+ rc = curl_easy_setopt (req->easy, CURLOPT_ERRORBUFFER, req->error);
+ g_assert_cmpint (rc, ==, CURLM_OK);
/* Note that the "easy" object's privdata is the task */
- curl_easy_setopt (req->easy, CURLOPT_NOPROGRESS, 1L);
- curl_easy_setopt (req->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
- curl_easy_setopt (req->easy, CURLOPT_FOLLOWLOCATION, 1L);
- curl_easy_setopt (req->easy, CURLOPT_CONNECTTIMEOUT, 30L);
+ rc = curl_easy_setopt (req->easy, CURLOPT_NOPROGRESS, 1L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_FOLLOWLOCATION, 1L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_CONNECTTIMEOUT, 30L);
+ g_assert_cmpint (rc, ==, CURLM_OK);
/* We used to set CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME
* here, but see https://github.com/ostreedev/ostree/issues/878#issuecomment-347228854
* basically those options don't play well with HTTP2 at the moment
@@ -884,10 +922,14 @@ initiate_next_curl_request (FetcherRequest *req,
*/
/* closure bindings -> task */
- curl_easy_setopt (req->easy, CURLOPT_PRIVATE, task);
- curl_easy_setopt (req->easy, CURLOPT_WRITEDATA, task);
- curl_easy_setopt (req->easy, CURLOPT_HEADERDATA, task);
- curl_easy_setopt (req->easy, CURLOPT_PROGRESSDATA, task);
+ rc = curl_easy_setopt (req->easy, CURLOPT_PRIVATE, task);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_WRITEDATA, task);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_HEADERDATA, task);
+ g_assert_cmpint (rc, ==, CURLM_OK);
+ rc = curl_easy_setopt (req->easy, CURLOPT_PROGRESSDATA, task);
+ g_assert_cmpint (rc, ==, CURLM_OK);
CURLMcode multi_rc = curl_multi_add_handle (self->multi, req->easy);
g_assert (multi_rc == CURLM_OK);
diff --git a/src/libostree/ostree-fetcher-soup.c b/src/libostree/ostree-fetcher-soup.c
index be87f81e..ec1d8e09 100644
--- a/src/libostree/ostree-fetcher-soup.c
+++ b/src/libostree/ostree-fetcher-soup.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -153,7 +154,7 @@ thread_closure_unref (ThreadClosure *thread_closure)
g_clear_pointer (&thread_closure->main_context, g_main_context_unref);
- g_clear_pointer (&thread_closure->extra_headers, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&thread_closure->extra_headers, g_variant_unref);
g_clear_pointer (&thread_closure->output_stream_set, g_hash_table_unref);
g_mutex_clear (&thread_closure->output_stream_set_lock);
@@ -329,7 +330,7 @@ session_thread_set_headers_cb (ThreadClosure *thread_closure,
{
GVariant *headers = data;
- g_clear_pointer (&thread_closure->extra_headers, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&thread_closure->extra_headers, g_variant_unref);
thread_closure->extra_headers = g_variant_ref (headers);
}
@@ -431,11 +432,15 @@ create_pending_soup_request (OstreeFetcherPendingURI *pending,
next_mirror = g_ptr_array_index (pending->mirrorlist, pending->mirrorlist_idx);
if (pending->filename)
uri = _ostree_fetcher_uri_new_subpath (next_mirror, pending->filename);
+ if (!uri)
+ uri = (OstreeFetcherURI*)g_uri_ref ((GUri*)next_mirror);
g_clear_object (&pending->request);
- pending->request = soup_session_request_uri (pending->thread_closure->session,
- (SoupURI*)(uri ? uri : next_mirror), error);
+ {
+ g_autofree gchar *uri_str = g_uri_to_string ((GUri*)uri);
+ pending->request = soup_session_request (pending->thread_closure->session, uri_str, error);
+ }
/* Add caching headers. */
if (SOUP_IS_REQUEST_HTTP (pending->request) && pending->if_none_match != NULL)
diff --git a/src/libostree/ostree-fetcher-uri.c b/src/libostree/ostree-fetcher-uri.c
index 13bcb8f2..d5ed576d 100644
--- a/src/libostree/ostree-fetcher-uri.c
+++ b/src/libostree/ostree-fetcher-uri.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011,2017 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -21,15 +22,7 @@
#include "config.h"
-
-#ifdef HAVE_LIBCURL
-#include "ostree-soup-uri.h"
-#else
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-#include
-#include
-#include
-#endif
+#include
#include "ostree-fetcher.h"
@@ -39,21 +32,52 @@ void
_ostree_fetcher_uri_free (OstreeFetcherURI *uri)
{
if (uri)
- soup_uri_free ((SoupURI*)uri);
+ g_uri_unref ((GUri*)uri);
}
OstreeFetcherURI *
_ostree_fetcher_uri_parse (const char *str,
GError **error)
{
- SoupURI *soupuri = soup_uri_new (str);
- if (soupuri == NULL)
+ GUri *uri = NULL;
+#if GLIB_CHECK_VERSION(2, 68, 0)
+ uri = g_uri_parse (str, G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED | G_URI_FLAGS_SCHEME_NORMALIZE, error);
+#else
+ /* perform manual scheme normalization for older glib */
+ uri = g_uri_parse (str, G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED, error);
+ if (uri)
{
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Failed to parse uri: %s", str);
- return NULL;
+ GUri *nuri = NULL;
+ switch (g_uri_get_port (uri))
+ {
+ case 21:
+ if (!strcmp (g_uri_get_scheme (uri), "ftp"))
+ break;
+ return (OstreeFetcherURI*)uri;
+ case 80:
+ if (!strcmp (g_uri_get_scheme (uri), "http"))
+ break;
+ return (OstreeFetcherURI*)uri;
+ case 443:
+ if (!strcmp (g_uri_get_scheme (uri), "https"))
+ break;
+ return (OstreeFetcherURI*)uri;
+ default:
+ return (OstreeFetcherURI*)uri;
+ }
+ nuri = g_uri_build_with_user (g_uri_get_flags (uri), "http",
+ g_uri_get_user (uri),
+ g_uri_get_password (uri),
+ NULL,
+ g_uri_get_host (uri), -1,
+ g_uri_get_path (uri),
+ g_uri_get_query (uri),
+ g_uri_get_fragment (uri));
+ g_uri_unref (uri);
+ uri = nuri;
}
- return (OstreeFetcherURI*)soupuri;
+#endif
+ return (OstreeFetcherURI*)uri;
}
static OstreeFetcherURI *
@@ -61,21 +85,31 @@ _ostree_fetcher_uri_new_path_internal (OstreeFetcherURI *uri,
gboolean extend,
const char *path)
{
- SoupURI *newuri = soup_uri_copy ((SoupURI*)uri);
+ GUri *guri = (GUri*)uri;
+ const char *opath = g_uri_get_path (guri);
+ g_autofree char *newpath = NULL;
if (path)
{
if (extend)
{
- const char *origpath = soup_uri_get_path ((SoupURI*)uri);
- g_autofree char *newpath = g_build_filename (origpath, path, NULL);
- soup_uri_set_path (newuri, newpath);
+ newpath = g_build_filename (opath, path, NULL);
+ opath = newpath;
}
else
{
- soup_uri_set_path (newuri, path);
+ opath = path;
}
}
- return (OstreeFetcherURI*)newuri;
+ return (OstreeFetcherURI*)g_uri_build_with_user (g_uri_get_flags (guri),
+ g_uri_get_scheme (guri),
+ g_uri_get_user (guri),
+ g_uri_get_password (guri),
+ NULL,
+ g_uri_get_host (guri),
+ g_uri_get_port (guri),
+ opath,
+ g_uri_get_query (guri),
+ g_uri_get_fragment (guri));
}
OstreeFetcherURI *
@@ -101,19 +135,19 @@ _ostree_fetcher_uri_clone (OstreeFetcherURI *uri)
char *
_ostree_fetcher_uri_get_scheme (OstreeFetcherURI *uri)
{
- return g_strdup (soup_uri_get_scheme ((SoupURI*)uri));
+ return g_strdup (g_uri_get_scheme ((GUri*)uri));
}
char *
_ostree_fetcher_uri_get_path (OstreeFetcherURI *uri)
{
- return g_strdup (soup_uri_get_path ((SoupURI*)uri));
+ return g_strdup (g_uri_get_path ((GUri*)uri));
}
char *
_ostree_fetcher_uri_to_string (OstreeFetcherURI *uri)
{
- return soup_uri_to_string ((SoupURI*)uri, FALSE);
+ return g_uri_to_string_partial ((GUri*)uri, G_URI_HIDE_PASSWORD);
}
@@ -124,7 +158,7 @@ _ostree_fetcher_uri_to_string (OstreeFetcherURI *uri)
gboolean
_ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error)
{
- const char *scheme = soup_uri_get_scheme ((SoupURI*)uri);
+ const char *scheme = g_uri_get_scheme ((GUri*)uri);
// TODO only allow file if explicitly requested by a higher level
if (!(g_str_equal (scheme, "http") || g_str_equal (scheme, "https") || g_str_equal (scheme, "file")))
{
diff --git a/src/libostree/ostree-fetcher-util.c b/src/libostree/ostree-fetcher-util.c
index 7aeb035a..450a3abe 100644
--- a/src/libostree/ostree-fetcher-util.c
+++ b/src/libostree/ostree-fetcher-util.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -124,7 +125,7 @@ _ostree_fetcher_mirrored_request_to_membuf_once (OstreeFetcher *fe
out:
if (mainctx)
g_main_context_pop_thread_default (mainctx);
- g_clear_pointer (&data.result_buf, (GDestroyNotify)g_bytes_unref);
+ g_clear_pointer (&data.result_buf, g_bytes_unref);
g_clear_pointer (&data.result_etag, g_free);
return ret;
}
diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c
index 16b87c6f..1c8d9464 100644
--- a/src/libostree/ostree-gpg-verifier.c
+++ b/src/libostree/ostree-gpg-verifier.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2011 Colin Walters
* Copyright (C) 2013 Sjoerd Simons
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -53,7 +54,7 @@ ostree_gpg_verifier_finalize (GObject *object)
g_list_free_full (self->keyrings, g_object_unref);
if (self->key_ascii_files)
g_ptr_array_unref (self->key_ascii_files);
- g_clear_pointer (&self->keyring_data, (GDestroyNotify)g_ptr_array_unref);
+ g_clear_pointer (&self->keyring_data, g_ptr_array_unref);
G_OBJECT_CLASS (_ostree_gpg_verifier_parent_class)->finalize (object);
}
diff --git a/src/libostree/ostree-impl-system-generator.c b/src/libostree/ostree-impl-system-generator.c
index 769f0cbd..92d71605 100644
--- a/src/libostree/ostree-impl-system-generator.c
+++ b/src/libostree/ostree-impl-system-generator.c
@@ -134,6 +134,8 @@ require_internal_units (const char *normal_dir,
return FALSE;
if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-finalize-staged.path", normal_dir_dfd, "multi-user.target.wants/ostree-finalize-staged.path") < 0)
return glnx_throw_errno_prefix (error, "symlinkat");
+ if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-boot-complete.service", normal_dir_dfd, "multi-user.target.wants/ostree-boot-complete.service") < 0)
+ return glnx_throw_errno_prefix (error, "symlinkat");
return TRUE;
#else
diff --git a/src/libostree/ostree-libarchive-input-stream.c b/src/libostree/ostree-libarchive-input-stream.c
index f80bd77c..3c313c1d 100644
--- a/src/libostree/ostree-libarchive-input-stream.c
+++ b/src/libostree/ostree-libarchive-input-stream.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -29,12 +30,12 @@ enum {
PROP_ARCHIVE
};
-G_DEFINE_TYPE (OstreeLibarchiveInputStream, _ostree_libarchive_input_stream, G_TYPE_INPUT_STREAM)
-
struct _OstreeLibarchiveInputStreamPrivate {
struct archive *archive;
};
+G_DEFINE_TYPE_WITH_PRIVATE (OstreeLibarchiveInputStream, _ostree_libarchive_input_stream, G_TYPE_INPUT_STREAM)
+
static void ostree_libarchive_input_stream_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -63,8 +64,6 @@ _ostree_libarchive_input_stream_class_init (OstreeLibarchiveInputStreamClass *kl
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
-
- g_type_class_add_private (klass, sizeof (OstreeLibarchiveInputStreamPrivate));
gobject_class->get_property = ostree_libarchive_input_stream_get_property;
gobject_class->set_property = ostree_libarchive_input_stream_set_property;
@@ -132,10 +131,7 @@ ostree_libarchive_input_stream_get_property (GObject *object,
static void
_ostree_libarchive_input_stream_init (OstreeLibarchiveInputStream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- OSTREE_TYPE_LIBARCHIVE_INPUT_STREAM,
- OstreeLibarchiveInputStreamPrivate);
-
+ self->priv = _ostree_libarchive_input_stream_get_instance_private (self);
}
GInputStream *
diff --git a/src/libostree/ostree-lzma-compressor.c b/src/libostree/ostree-lzma-compressor.c
index 3b201418..c60e6b71 100644
--- a/src/libostree/ostree-lzma-compressor.c
+++ b/src/libostree/ostree-lzma-compressor.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2014 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -66,7 +67,7 @@ _ostree_lzma_compressor_finalize (GObject *object)
OstreeLzmaCompressor *self = OSTREE_LZMA_COMPRESSOR (object);
lzma_end (&self->lstream);
- g_clear_pointer (&self->params, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&self->params, g_variant_unref);
G_OBJECT_CLASS (_ostree_lzma_compressor_parent_class)->finalize (object);
}
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index 5b16be5b..0af8fee3 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011,2013 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -640,8 +641,8 @@ _ostree_repo_bare_content_cleanup (OstreeRepoBareContent *regwrite)
return;
glnx_tmpfile_clear (&real->tmpf);
ot_checksum_clear (&real->checksum);
- g_clear_pointer (&real->expected_checksum, (GDestroyNotify)g_free);
- g_clear_pointer (&real->xattrs, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&real->expected_checksum, g_free);
+ g_clear_pointer (&real->xattrs, g_variant_unref);
real->initialized = FALSE;
}
@@ -1688,10 +1689,10 @@ ostree_repo_prepare_transaction (OstreeRepo *self,
g_debug ("Preparing transaction in repository %p", self);
/* Set up to abort the transaction if we return early from this function.
- * This needs to be manually built here due to a circular dependency. */
- g_autoptr(OstreeRepoAutoTransaction) txn = g_malloc(sizeof(OstreeRepoAutoTransaction));
+ * We can't call _ostree_repo_auto_transaction_start() here, because that
+ * would be a circular dependency; use the lower-level version instead. */
+ g_autoptr(OstreeRepoAutoTransaction) txn = _ostree_repo_auto_transaction_new (self);
g_assert (txn != NULL);
- txn->repo = self;
memset (&self->txn.stats, 0, sizeof (OstreeRepoTransactionStats));
@@ -2584,8 +2585,6 @@ typedef struct {
char *expected_checksum;
GVariant *object;
GCancellable *cancellable;
- GSimpleAsyncResult *result;
-
guchar *result_csum;
} WriteMetadataAsyncData;
@@ -2603,19 +2602,21 @@ write_metadata_async_data_free (gpointer user_data)
}
static void
-write_metadata_thread (GSimpleAsyncResult *res,
+write_metadata_thread (GTask *task,
GObject *object,
+ gpointer datap,
GCancellable *cancellable)
{
GError *error = NULL;
- WriteMetadataAsyncData *data;
+ WriteMetadataAsyncData *data = datap;
- data = g_simple_async_result_get_op_res_gpointer (res);
if (!ostree_repo_write_metadata (data->repo, data->objtype, data->expected_checksum,
data->object,
&data->result_csum,
cancellable, &error))
- g_simple_async_result_take_error (res, error);
+ g_task_return_error (task, error);
+ else
+ g_task_return_pointer (task, data, NULL);
}
/**
@@ -2640,6 +2641,7 @@ ostree_repo_write_metadata_async (OstreeRepo *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ g_autoptr(GTask) task = NULL;
WriteMetadataAsyncData *asyncdata;
asyncdata = g_new0 (WriteMetadataAsyncData, 1);
@@ -2649,14 +2651,10 @@ ostree_repo_write_metadata_async (OstreeRepo *self,
asyncdata->object = g_variant_ref (object);
asyncdata->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
- asyncdata->result = g_simple_async_result_new ((GObject*) self,
- callback, user_data,
- ostree_repo_write_metadata_async);
-
- g_simple_async_result_set_op_res_gpointer (asyncdata->result, asyncdata,
- write_metadata_async_data_free);
- g_simple_async_result_run_in_thread (asyncdata->result, write_metadata_thread, G_PRIORITY_DEFAULT, cancellable);
- g_object_unref (asyncdata->result);
+ task = g_task_new (G_OBJECT (self), cancellable, callback, user_data);
+ g_task_set_task_data (task, asyncdata, write_metadata_async_data_free);
+ g_task_set_source_tag (task, ostree_repo_write_metadata_async);
+ g_task_run_in_thread (task, (GTaskThreadFunc)write_metadata_thread);
}
/**
@@ -2674,15 +2672,18 @@ ostree_repo_write_metadata_finish (OstreeRepo *self,
guchar **out_csum,
GError **error)
{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
WriteMetadataAsyncData *data;
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_write_metadata_async);
+ g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (result, ostree_repo_write_metadata_async), FALSE);
- if (g_simple_async_result_propagate_error (simple, error))
+ data = g_task_propagate_pointer (G_TASK (result), error);
+ if (data == NULL)
return FALSE;
- data = g_simple_async_result_get_op_res_gpointer (simple);
/* Transfer ownership */
*out_csum = data->result_csum;
data->result_csum = NULL;
@@ -2920,7 +2921,6 @@ typedef struct {
GInputStream *object;
guint64 file_object_length;
GCancellable *cancellable;
- GSimpleAsyncResult *result;
guchar *result_csum;
} WriteContentAsyncData;
@@ -2939,19 +2939,21 @@ write_content_async_data_free (gpointer user_data)
}
static void
-write_content_thread (GSimpleAsyncResult *res,
+write_content_thread (GTask *task,
GObject *object,
+ gpointer datap,
GCancellable *cancellable)
{
GError *error = NULL;
- WriteContentAsyncData *data;
+ WriteContentAsyncData *data = datap;
- data = g_simple_async_result_get_op_res_gpointer (res);
if (!ostree_repo_write_content (data->repo, data->expected_checksum,
data->object, data->file_object_length,
&data->result_csum,
cancellable, &error))
- g_simple_async_result_take_error (res, error);
+ g_task_return_error (task, error);
+ else
+ g_task_return_pointer (task, data, NULL);
}
/**
@@ -2976,6 +2978,7 @@ ostree_repo_write_content_async (OstreeRepo *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ g_autoptr(GTask) task = NULL;
WriteContentAsyncData *asyncdata;
asyncdata = g_new0 (WriteContentAsyncData, 1);
@@ -2985,14 +2988,10 @@ ostree_repo_write_content_async (OstreeRepo *self,
asyncdata->file_object_length = length;
asyncdata->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
- asyncdata->result = g_simple_async_result_new ((GObject*) self,
- callback, user_data,
- ostree_repo_write_content_async);
-
- g_simple_async_result_set_op_res_gpointer (asyncdata->result, asyncdata,
- write_content_async_data_free);
- g_simple_async_result_run_in_thread (asyncdata->result, write_content_thread, G_PRIORITY_DEFAULT, cancellable);
- g_object_unref (asyncdata->result);
+ task = g_task_new (G_OBJECT (self), cancellable, callback, user_data);
+ g_task_set_task_data (task, asyncdata, (GDestroyNotify)write_content_async_data_free);
+ g_task_set_source_tag (task, ostree_repo_write_content_async);
+ g_task_run_in_thread (task, (GTaskThreadFunc)write_content_thread);
}
/**
@@ -3010,15 +3009,18 @@ ostree_repo_write_content_finish (OstreeRepo *self,
guchar **out_csum,
GError **error)
{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
WriteContentAsyncData *data;
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ostree_repo_write_content_async);
+ g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (result, ostree_repo_write_content_async), FALSE);
- if (g_simple_async_result_propagate_error (simple, error))
+ data = g_task_propagate_pointer (G_TASK (result), error);
+ if (data == NULL)
return FALSE;
- data = g_simple_async_result_get_op_res_gpointer (simple);
ot_transfer_out_value (out_csum, &data->result_csum);
return TRUE;
}
@@ -4336,7 +4338,7 @@ ostree_repo_commit_modifier_unref (OstreeRepoCommitModifier *modifier)
if (modifier->xattr_destroy)
modifier->xattr_destroy (modifier->xattr_user_data);
- g_clear_pointer (&modifier->devino_cache, (GDestroyNotify)g_hash_table_unref);
+ g_clear_pointer (&modifier->devino_cache, g_hash_table_unref);
g_clear_object (&modifier->sepolicy);
diff --git a/src/libostree/ostree-repo-file.c b/src/libostree/ostree-repo-file.c
index 082588a5..3d396ced 100644
--- a/src/libostree/ostree-repo-file.c
+++ b/src/libostree/ostree-repo-file.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -55,8 +56,8 @@ ostree_repo_file_finalize (GObject *object)
self = OSTREE_REPO_FILE (object);
- g_clear_pointer (&self->tree_contents, (GDestroyNotify) g_variant_unref);
- g_clear_pointer (&self->tree_metadata, (GDestroyNotify) g_variant_unref);
+ g_clear_pointer (&self->tree_contents, g_variant_unref);
+ g_clear_pointer (&self->tree_metadata, g_variant_unref);
g_free (self->cached_file_checksum);
g_free (self->tree_contents_checksum);
g_free (self->tree_metadata_checksum);
@@ -236,7 +237,7 @@ do_resolve_nonroot (OstreeRepoFile *self,
files_variant = g_variant_get_child_value (self->parent->tree_contents, 0);
self->index = g_variant_n_children (files_variant) + i;
- g_clear_pointer (&files_variant, (GDestroyNotify) g_variant_unref);
+ g_clear_pointer (&files_variant, g_variant_unref);
g_variant_get_child (container, i, "(&s@ay@ay)",
&name, &contents_csum_v, &metadata_csum_v);
@@ -337,7 +338,7 @@ ostree_repo_file_tree_set_metadata (OstreeRepoFile *self,
const char *checksum,
GVariant *metadata)
{
- g_clear_pointer (&self->tree_metadata, (GDestroyNotify) g_variant_unref);
+ g_clear_pointer (&self->tree_metadata, g_variant_unref);
self->tree_metadata = g_variant_ref (metadata);
g_free (self->tree_metadata_checksum);
self->tree_metadata_checksum = g_strdup (checksum);
@@ -414,8 +415,8 @@ ostree_repo_file_get_checksum (OstreeRepoFile *self)
g_variant_get_child (files_variant, n,
"(@s@ay)", NULL, &csum_bytes);
}
- g_clear_pointer (&files_variant, (GDestroyNotify) g_variant_unref);
- g_clear_pointer (&dirs_variant, (GDestroyNotify) g_variant_unref);
+ g_clear_pointer (&files_variant, g_variant_unref);
+ g_clear_pointer (&dirs_variant, g_variant_unref);
self->cached_file_checksum = ostree_checksum_from_bytes_v (csum_bytes);
@@ -775,9 +776,9 @@ ostree_repo_file_tree_find_child (OstreeRepoFile *self,
*out_container = ret_container;
ret_container = NULL;
}
- g_clear_pointer (&ret_container, (GDestroyNotify) g_variant_unref);
- g_clear_pointer (&files_variant, (GDestroyNotify) g_variant_unref);
- g_clear_pointer (&dirs_variant, (GDestroyNotify) g_variant_unref);
+ g_clear_pointer (&ret_container, g_variant_unref);
+ g_clear_pointer (&files_variant, g_variant_unref);
+ g_clear_pointer (&dirs_variant, g_variant_unref);
return i;
}
@@ -969,7 +970,7 @@ ostree_repo_file_read (GFile *file,
return g_file_read (dest, cancellable, error);
}
- return g_steal_pointer (&ret_stream);
+ return (GFileInputStream *)g_steal_pointer (&ret_stream);
}
static void
diff --git a/src/libostree/ostree-repo-finder-avahi.c b/src/libostree/ostree-repo-finder-avahi.c
index 76153b01..7555df6e 100644
--- a/src/libostree/ostree-repo-finder-avahi.c
+++ b/src/libostree/ostree-repo-finder-avahi.c
@@ -1,6 +1,7 @@
/*
* Copyright © 2016 Kinvolk GmbH
* Copyright © 2017 Endless Mobile, Inc.
+ * Copyright © 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -53,7 +54,6 @@
#include "ostree-repo-private.h"
#include "ostree-repo.h"
#include "ostree-repo-finder-avahi-private.h"
-#include "ostree-soup-uri.h"
#include "otutil.h"
#endif /* HAVE_AVAHI */
@@ -490,7 +490,7 @@ fill_refs_and_checksums_from_summary (GVariant *summary,
return FALSE;
}
- g_clear_pointer (&ref_map, (GDestroyNotify) g_variant_iter_free);
+ g_clear_pointer (&ref_map, g_variant_iter_free);
/* Repeat for the other collections listed in the summary. */
if (g_variant_dict_lookup (&additional_metadata, OSTREE_SUMMARY_COLLECTION_MAP, "a{sa(s(taya{sv}))}", &collection_map))
@@ -705,7 +705,7 @@ ostree_avahi_service_build_repo_finder_result (OstreeAvahiService
g_autoptr(GVariant) repo_index = NULL;
g_autofree gchar *repo_path = NULL;
g_autoptr(GPtrArray) possible_refs = NULL; /* (element-type OstreeCollectionRef) */
- SoupURI *_uri = NULL;
+ GUri *_uri = NULL;
g_autofree gchar *uri = NULL;
g_autoptr(GError) error = NULL;
gsize i;
@@ -772,13 +772,9 @@ ostree_avahi_service_build_repo_finder_result (OstreeAvahiService
repo_to_refs = g_hash_table_new_full (uri_and_keyring_hash, uri_and_keyring_equal,
(GDestroyNotify) uri_and_keyring_free, (GDestroyNotify) g_hash_table_unref);
- _uri = soup_uri_new (NULL);
- soup_uri_set_scheme (_uri, "http");
- soup_uri_set_host (_uri, service->address);
- soup_uri_set_port (_uri, service->port);
- soup_uri_set_path (_uri, repo_path);
- uri = soup_uri_to_string (_uri, FALSE);
- soup_uri_free (_uri);
+ _uri = g_uri_build (G_URI_FLAGS_ENCODED, "http", NULL, service->address, service->port, repo_path, NULL, NULL);
+ uri = g_uri_to_string (_uri);
+ g_uri_unref (_uri);
for (i = 0; i < possible_refs->len; i++)
{
diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c
index 679aa44d..631c6d4b 100644
--- a/src/libostree/ostree-repo-libarchive.c
+++ b/src/libostree/ostree-repo-libarchive.c
@@ -146,8 +146,12 @@ file_info_from_archive_entry (struct archive_entry *entry)
g_autoptr(GFileInfo) info = _ostree_stbuf_to_gfileinfo (&stbuf);
if (S_ISLNK (stbuf.st_mode))
- g_file_info_set_attribute_byte_string (info, "standard::symlink-target",
- archive_entry_symlink (entry));
+ {
+ const char *target = archive_entry_symlink (entry);
+ if (target != NULL)
+ g_file_info_set_attribute_byte_string (info, "standard::symlink-target",
+ target);
+ }
return g_steal_pointer (&info);
}
diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h
index 988c2179..96253e77 100644
--- a/src/libostree/ostree-repo-private.h
+++ b/src/libostree/ostree-repo-private.h
@@ -554,4 +554,8 @@ GType _ostree_repo_auto_transaction_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoAutoTransaction, _ostree_repo_auto_transaction_unref);
+/* Internal function to break a circular dependency:
+ * should not be made into public API, even if the rest is */
+OstreeRepoAutoTransaction *_ostree_repo_auto_transaction_new (OstreeRepo *repo);
+
G_END_DECLS
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index e8918cf6..4819a40a 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2011,2012,2013 Colin Walters
* Copyright © 2017 Endless Mobile, Inc.
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -435,7 +436,7 @@ idle_worker (gpointer user_data)
scan_data = g_queue_pop_head (&pull_data->scan_object_queue);
if (!scan_data)
{
- g_clear_pointer (&pull_data->idle_src, (GDestroyNotify) g_source_destroy);
+ g_clear_pointer (&pull_data->idle_src, g_source_destroy);
return G_SOURCE_REMOVE;
}
@@ -4020,7 +4021,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
&pull_data->signapi_commit_verifiers,
&pull_data->signapi_summary_verifiers,
error))
- return FALSE;
+ goto out;
}
pull_data->phase = OSTREE_PULL_PHASE_FETCHING_REFS;
@@ -4476,7 +4477,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
pull_data->remote_name);
summary_from_cache = FALSE;
- g_clear_pointer (&bytes_summary, (GDestroyNotify)g_bytes_unref);
+ g_clear_pointer (&bytes_summary, g_bytes_unref);
g_clear_pointer (&summary_etag, g_free);
summary_last_modified = 0;
if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
@@ -4544,7 +4545,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
pull_data->remote_name);
summary_from_cache = FALSE;
- g_clear_pointer (&bytes_summary, (GDestroyNotify)g_bytes_unref);
+ g_clear_pointer (&bytes_summary, g_bytes_unref);
g_clear_pointer (&summary_etag, g_free);
summary_last_modified = 0;
if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
@@ -5153,46 +5154,46 @@ ostree_repo_pull_with_options (OstreeRepo *self,
g_source_destroy (update_timeout);
g_strfreev (configured_branches);
g_clear_object (&pull_data->fetcher);
- g_clear_pointer (&pull_data->extra_headers, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&pull_data->extra_headers, g_variant_unref);
g_clear_object (&pull_data->cancellable);
- g_clear_pointer (&pull_data->localcache_repos, (GDestroyNotify)g_ptr_array_unref);
+ g_clear_pointer (&pull_data->localcache_repos, g_ptr_array_unref);
g_clear_object (&pull_data->remote_repo_local);
g_free (pull_data->remote_refspec_name);
g_free (pull_data->remote_name);
g_free (pull_data->append_user_agent);
- g_clear_pointer (&pull_data->signapi_commit_verifiers, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&pull_data->signapi_summary_verifiers, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&pull_data->meta_mirrorlist, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&pull_data->content_mirrorlist, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&pull_data->summary_data, (GDestroyNotify) g_bytes_unref);
+ g_clear_pointer (&pull_data->signapi_commit_verifiers, g_ptr_array_unref);
+ g_clear_pointer (&pull_data->signapi_summary_verifiers, g_ptr_array_unref);
+ g_clear_pointer (&pull_data->meta_mirrorlist, g_ptr_array_unref);
+ g_clear_pointer (&pull_data->content_mirrorlist, g_ptr_array_unref);
+ g_clear_pointer (&pull_data->summary_data, g_bytes_unref);
g_clear_pointer (&pull_data->summary_etag, g_free);
- g_clear_pointer (&pull_data->summary_data_sig, (GDestroyNotify) g_bytes_unref);
+ g_clear_pointer (&pull_data->summary_data_sig, g_bytes_unref);
g_clear_pointer (&pull_data->summary_sig_etag, g_free);
- g_clear_pointer (&pull_data->summary, (GDestroyNotify) g_variant_unref);
- g_clear_pointer (&pull_data->static_delta_superblocks, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&pull_data->commit_to_depth, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->expected_commit_sizes, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->scanned_metadata, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->fetched_detached_metadata, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->summary_deltas_checksums, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->ref_original_commits, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&pull_data->summary, g_variant_unref);
+ g_clear_pointer (&pull_data->static_delta_superblocks, g_ptr_array_unref);
+ g_clear_pointer (&pull_data->commit_to_depth, g_hash_table_unref);
+ g_clear_pointer (&pull_data->expected_commit_sizes, g_hash_table_unref);
+ g_clear_pointer (&pull_data->scanned_metadata, g_hash_table_unref);
+ g_clear_pointer (&pull_data->fetched_detached_metadata, g_hash_table_unref);
+ g_clear_pointer (&pull_data->summary_deltas_checksums, g_hash_table_unref);
+ g_clear_pointer (&pull_data->ref_original_commits, g_hash_table_unref);
g_free (pull_data->timestamp_check_from_rev);
- g_clear_pointer (&pull_data->verified_commits, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->signapi_verified_commits, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->ref_keyring_map, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->requested_content, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->requested_fallback_content, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->requested_metadata, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->pending_fetch_content, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->pending_fetch_metadata, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->pending_fetch_delta_indexes, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->pending_fetch_delta_superblocks, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&pull_data->pending_fetch_deltaparts, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&pull_data->verified_commits, g_hash_table_unref);
+ g_clear_pointer (&pull_data->signapi_verified_commits, g_hash_table_unref);
+ g_clear_pointer (&pull_data->ref_keyring_map, g_hash_table_unref);
+ g_clear_pointer (&pull_data->requested_content, g_hash_table_unref);
+ g_clear_pointer (&pull_data->requested_fallback_content, g_hash_table_unref);
+ g_clear_pointer (&pull_data->requested_metadata, g_hash_table_unref);
+ g_clear_pointer (&pull_data->pending_fetch_content, g_hash_table_unref);
+ g_clear_pointer (&pull_data->pending_fetch_metadata, g_hash_table_unref);
+ g_clear_pointer (&pull_data->pending_fetch_delta_indexes, g_hash_table_unref);
+ g_clear_pointer (&pull_data->pending_fetch_delta_superblocks, g_hash_table_unref);
+ g_clear_pointer (&pull_data->pending_fetch_deltaparts, g_hash_table_unref);
g_queue_foreach (&pull_data->scan_object_queue, (GFunc) scan_object_queue_data_free, NULL);
g_queue_clear (&pull_data->scan_object_queue);
- g_clear_pointer (&pull_data->idle_src, (GDestroyNotify) g_source_destroy);
- g_clear_pointer (&pull_data->dirs, (GDestroyNotify) g_ptr_array_unref);
- g_clear_pointer (&remote_config, (GDestroyNotify) g_key_file_unref);
+ g_clear_pointer (&pull_data->idle_src, g_source_destroy);
+ g_clear_pointer (&pull_data->dirs, g_ptr_array_unref);
+ g_clear_pointer (&remote_config, g_key_file_unref);
return ret;
}
@@ -5838,7 +5839,7 @@ find_remotes_cb (GObject *obj,
{
g_debug ("%s: Failed to download summary for result ‘%s’. Ignoring. %s",
G_STRFUNC, result->remote->name, error->message);
- g_clear_pointer (&g_ptr_array_index (results, i), (GDestroyNotify) ostree_repo_finder_result_free);
+ g_clear_pointer (&g_ptr_array_index (results, i), ostree_repo_finder_result_free);
g_clear_error (&error);
continue;
}
@@ -5847,7 +5848,7 @@ find_remotes_cb (GObject *obj,
g_debug ("%s: Failed to download summary for result ‘%s’. Ignoring. %s",
G_STRFUNC, result->remote->name,
"No summary file exists on server");
- g_clear_pointer (&g_ptr_array_index (results, i), (GDestroyNotify) ostree_repo_finder_result_free);
+ g_clear_pointer (&g_ptr_array_index (results, i), ostree_repo_finder_result_free);
continue;
}
@@ -5869,7 +5870,7 @@ find_remotes_cb (GObject *obj,
if (!find_remotes_process_refs (self, refs, result, i, summary_collection_id, summary_refs,
commit_metadatas, refs_and_remotes_table))
{
- g_clear_pointer (&g_ptr_array_index (results, i), (GDestroyNotify) ostree_repo_finder_result_free);
+ g_clear_pointer (&g_ptr_array_index (results, i), ostree_repo_finder_result_free);
continue;
}
}
@@ -5890,7 +5891,7 @@ find_remotes_cb (GObject *obj,
if (!find_remotes_process_refs (self, refs, result, i, summary_collection_id, summary_refs,
commit_metadatas, refs_and_remotes_table))
{
- g_clear_pointer (&g_ptr_array_index (results, i), (GDestroyNotify) ostree_repo_finder_result_free);
+ g_clear_pointer (&g_ptr_array_index (results, i), ostree_repo_finder_result_free);
invalid_result = TRUE;
break;
}
diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c
index 6e093121..47e6c064 100644
--- a/src/libostree/ostree-repo-static-delta-processing.c
+++ b/src/libostree/ostree-repo-static-delta-processing.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013,2014 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -285,7 +286,6 @@ typedef struct {
GVariant *header;
GVariant *part;
GCancellable *cancellable;
- GSimpleAsyncResult *result;
} StaticDeltaPartExecuteAsyncData;
static void
@@ -301,20 +301,22 @@ static_delta_part_execute_async_data_free (gpointer user_data)
}
static void
-static_delta_part_execute_thread (GSimpleAsyncResult *res,
+static_delta_part_execute_thread (GTask *task,
GObject *object,
+ gpointer datap,
GCancellable *cancellable)
{
GError *error = NULL;
- StaticDeltaPartExecuteAsyncData *data;
+ StaticDeltaPartExecuteAsyncData *data = datap;
- data = g_simple_async_result_get_op_res_gpointer (res);
if (!_ostree_static_delta_part_execute (data->repo,
data->header,
data->part,
FALSE, NULL,
cancellable, &error))
- g_simple_async_result_take_error (res, error);
+ g_task_return_error (task, error);
+ else
+ g_task_return_boolean (task, TRUE);
}
void
@@ -325,6 +327,7 @@ _ostree_static_delta_part_execute_async (OstreeRepo *repo,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ g_autoptr(GTask) task = NULL;
StaticDeltaPartExecuteAsyncData *asyncdata;
asyncdata = g_new0 (StaticDeltaPartExecuteAsyncData, 1);
@@ -333,14 +336,10 @@ _ostree_static_delta_part_execute_async (OstreeRepo *repo,
asyncdata->part = g_variant_ref (part);
asyncdata->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
- asyncdata->result = g_simple_async_result_new ((GObject*) repo,
- callback, user_data,
- _ostree_static_delta_part_execute_async);
-
- g_simple_async_result_set_op_res_gpointer (asyncdata->result, asyncdata,
- static_delta_part_execute_async_data_free);
- g_simple_async_result_run_in_thread (asyncdata->result, static_delta_part_execute_thread, G_PRIORITY_DEFAULT, cancellable);
- g_object_unref (asyncdata->result);
+ task = g_task_new (G_OBJECT (repo), cancellable, callback, user_data);
+ g_task_set_task_data (task, asyncdata, (GDestroyNotify)static_delta_part_execute_async_data_free);
+ g_task_set_source_tag (task, _ostree_static_delta_part_execute_async);
+ g_task_run_in_thread (task, (GTaskThreadFunc)static_delta_part_execute_thread);
}
gboolean
@@ -348,13 +347,13 @@ _ostree_static_delta_part_execute_finish (OstreeRepo *repo,
GAsyncResult *result,
GError **error)
{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
+ g_return_val_if_fail (OSTREE_IS_REPO (repo), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, repo), FALSE);
+ g_return_val_if_fail (g_async_result_is_tagged (result, _ostree_static_delta_part_execute_async), FALSE);
- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == _ostree_static_delta_part_execute_async);
-
- if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
- return TRUE;
+ return g_task_propagate_boolean (G_TASK (result), error);
}
static gboolean
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index a27591b3..ad071c17 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2011 Colin Walters
* Copyright (C) 2015 Red Hat, Inc.
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -709,6 +710,32 @@ ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *auto_lock)
}
}
+/**
+ * _ostree_repo_auto_transaction_new:
+ * @repo: (not nullable): an #OsreeRepo object
+ * @cancellable: Cancellable
+ * @error: a #GError
+ *
+ * Return a guard for a transaction in @repo.
+ *
+ * Do not call this function outside the OstreeRepo transaction implementation.
+ * Use _ostree_repo_auto_transaction_start() instead.
+ *
+ * Returns: (transfer full): an #OstreeRepoAutoTransaction guard on success,
+ * %NULL otherwise.
+ */
+OstreeRepoAutoTransaction *
+_ostree_repo_auto_transaction_new (OstreeRepo *repo)
+{
+ g_assert (repo != NULL);
+
+ OstreeRepoAutoTransaction *txn = g_malloc(sizeof(OstreeRepoAutoTransaction));
+ txn->atomic_refcount = 1;
+ txn->repo = g_object_ref (repo);
+
+ return g_steal_pointer (&txn);
+}
+
/**
* _ostree_repo_auto_transaction_start:
* @repo: (not nullable): an #OsreeRepo object
@@ -730,11 +757,7 @@ _ostree_repo_auto_transaction_start (OstreeRepo *repo,
if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
return NULL;
- OstreeRepoAutoTransaction *txn = g_malloc(sizeof(OstreeRepoAutoTransaction));
- txn->atomic_refcount = 1;
- txn->repo = g_object_ref (repo);
-
- return g_steal_pointer (&txn);
+ return _ostree_repo_auto_transaction_new (repo);
}
/**
@@ -1208,8 +1231,8 @@ ostree_repo_finalize (GObject *object)
g_clear_pointer (&self->txn.refs, g_hash_table_destroy);
g_clear_pointer (&self->txn.collection_refs, g_hash_table_destroy);
g_clear_error (&self->writable_error);
- g_clear_pointer (&self->object_sizes, (GDestroyNotify) g_hash_table_unref);
- g_clear_pointer (&self->dirmeta_cache, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&self->object_sizes, g_hash_table_unref);
+ g_clear_pointer (&self->dirmeta_cache, g_hash_table_unref);
g_mutex_clear (&self->cache_lock);
g_mutex_clear (&self->txn_lock);
g_free (self->collection_id);
@@ -2306,7 +2329,7 @@ ostree_repo_remote_gpg_import (OstreeRepo *self,
goto out;
}
- g_clear_pointer (&data_buffer, (GDestroyNotify) gpgme_data_release);
+ g_clear_pointer (&data_buffer, gpgme_data_release);
}
/* Retrieve all keys or specific keys from the source GPGME context.
@@ -3179,7 +3202,7 @@ reload_core_config (OstreeRepo *self,
gboolean is_archive;
gsize len;
- g_clear_pointer (&self->config, (GDestroyNotify)g_key_file_unref);
+ g_clear_pointer (&self->config, g_key_file_unref);
self->config = g_key_file_new ();
contents = glnx_file_get_contents_utf8_at (self->repo_dir_fd, "config", &len,
@@ -6274,7 +6297,7 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
g_autoptr(GHashTable) collection_map = NULL; /* (element-type utf8 GHashTable) */
g_hash_table_iter_init (&iter, collection_refs);
collection_map = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) g_hash_table_unref);
+ (GDestroyNotify)g_hash_table_unref);
const OstreeCollectionRef *c_ref;
const char *checksum;
@@ -6594,7 +6617,7 @@ _ostree_repo_memory_cache_ref_destroy (OstreeRepoMemoryCacheRef *state)
g_mutex_lock (lock);
repo->dirmeta_cache_refcount--;
if (repo->dirmeta_cache_refcount == 0)
- g_clear_pointer (&repo->dirmeta_cache, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&repo->dirmeta_cache, g_hash_table_unref);
g_mutex_unlock (lock);
g_object_unref (repo);
}
diff --git a/src/libostree/ostree-soup-form.c b/src/libostree/ostree-soup-form.c
deleted file mode 100644
index dfaffb96..00000000
--- a/src/libostree/ostree-soup-form.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* soup-form.c : utility functions for HTML forms */
-
-/*
- * Copyright 2008 Red Hat, Inc.
- */
-
-/* This one is stripped down to only have soup_form_encode_hash()
- * and soup_form_encode_valist() which are the only bits that soup-uri.c
- * calls.
- */
-
-#include
-
-#include
-
-#include "ostree-soup-uri.h"
-
-/**
- * SECTION:soup-form
- * @short_description: HTML form handling
- * @see_also: #SoupMultipart
- *
- * libsoup contains several help methods for processing HTML forms as
- * defined by the
- * HTML 4.01 specification .
- **/
-
-/**
- * SOUP_FORM_MIME_TYPE_URLENCODED:
- *
- * A macro containing the value
- * "application/x-www-form-urlencoded" ; the default
- * MIME type for POSTing HTML form data.
- *
- * Since: 2.26
- **/
-
-/**
- * SOUP_FORM_MIME_TYPE_MULTIPART:
- *
- * A macro containing the value
- * "multipart/form-data" ; the MIME type used for
- * posting form data that contains files to be uploaded.
- *
- * Since: 2.26
- **/
-
-#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
-#define HEXCHAR(s) ((XDIGIT (s[1]) << 4) + XDIGIT (s[2]))
-
-static void
-append_form_encoded (GString *str, const char *in)
-{
- const unsigned char *s = (const unsigned char *)in;
-
- while (*s) {
- if (*s == ' ') {
- g_string_append_c (str, '+');
- s++;
- } else if (!g_ascii_isalnum (*s) && (*s != '-') && (*s != '_')
- && (*s != '.'))
- g_string_append_printf (str, "%%%02X", (int)*s++);
- else
- g_string_append_c (str, *s++);
- }
-}
-
-static void
-encode_pair (GString *str, const char *name, const char *value)
-{
- g_return_if_fail (name != NULL);
- g_return_if_fail (value != NULL);
-
- if (str->len)
- g_string_append_c (str, '&');
- append_form_encoded (str, name);
- g_string_append_c (str, '=');
- append_form_encoded (str, value);
-}
-
-/**
- * soup_form_encode_hash:
- * @form_data_set: (element-type utf8 utf8) (transfer none): a hash table containing
- * name/value pairs (as strings)
- *
- * Encodes @form_data_set into a value of type
- * "application/x-www-form-urlencoded", as defined in the HTML 4.01
- * spec.
- *
- * Note that the HTML spec states that "The control names/values are
- * listed in the order they appear in the document." Since this method
- * takes a hash table, it cannot enforce that; if you care about the
- * ordering of the form fields, use soup_form_encode_datalist().
- *
- * Return value: the encoded form
- **/
-char *
-soup_form_encode_hash (GHashTable *form_data_set)
-{
- GString *str = g_string_new (NULL);
- GHashTableIter iter;
- gpointer name, value;
-
- g_hash_table_iter_init (&iter, form_data_set);
- while (g_hash_table_iter_next (&iter, &name, &value))
- encode_pair (str, name, value);
- return g_string_free (str, FALSE);
-}
-
-/**
- * soup_form_encode_valist:
- * @first_field: name of the first form field
- * @args: pointer to additional values, as in soup_form_encode()
- *
- * See soup_form_encode(). This is mostly an internal method, used by
- * various other methods such as soup_uri_set_query_from_fields() and
- * soup_form_request_new().
- *
- * Return value: the encoded form
- **/
-char *
-soup_form_encode_valist (const char *first_field, va_list args)
-{
- GString *str = g_string_new (NULL);
- const char *name, *value;
-
- name = first_field;
- value = va_arg (args, const char *);
- while (name && value) {
- encode_pair (str, name, value);
-
- name = va_arg (args, const char *);
- if (name)
- value = va_arg (args, const char *);
- }
-
- return g_string_free (str, FALSE);
-}
diff --git a/src/libostree/ostree-soup-uri.c b/src/libostree/ostree-soup-uri.c
deleted file mode 100644
index bfc5dd1a..00000000
--- a/src/libostree/ostree-soup-uri.c
+++ /dev/null
@@ -1,1438 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* soup-uri.c : utility functions to parse URLs */
-
-/*
- * Copyright 1999-2003 Ximian, Inc.
- */
-
-#include "config.h"
-
-#include
-#include
-
-#include "ostree-soup-uri.h"
-
-/* OSTREECHANGE: definitions from soup-misc-private.h */
-char *soup_uri_decoded_copy (const char *str, int length, int *decoded_length);
-char *soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query,
- gboolean force_port);
-
-/* OSTREECHANGE: import soup-misc's char helpers */
-#define SOUP_CHAR_URI_PERCENT_ENCODED 0x01
-#define SOUP_CHAR_URI_GEN_DELIMS 0x02
-#define SOUP_CHAR_URI_SUB_DELIMS 0x04
-#define SOUP_CHAR_HTTP_SEPARATOR 0x08
-#define SOUP_CHAR_HTTP_CTL 0x10
-
-/* 00 URI_UNRESERVED
- * 01 URI_PCT_ENCODED
- * 02 URI_GEN_DELIMS
- * 04 URI_SUB_DELIMS
- * 08 HTTP_SEPARATOR
- * 10 HTTP_CTL
- */
-const char soup_char_attributes[] = {
- /* 0x00 - 0x07 */
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- /* 0x08 - 0x0f */
- 0x11, 0x19, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- /* 0x10 - 0x17 */
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- /* 0x18 - 0x1f */
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
- /* !"#$%&' */
- 0x09, 0x04, 0x09, 0x02, 0x04, 0x01, 0x04, 0x04,
- /* ()*+,-./ */
- 0x0c, 0x0c, 0x04, 0x04, 0x0c, 0x00, 0x00, 0x0a,
- /* 01234567 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* 89:;<=>? */
- 0x00, 0x00, 0x0a, 0x0c, 0x09, 0x0a, 0x09, 0x0a,
- /* @ABCDEFG */
- 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* HIJKLMNO */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* PQRSTUVW */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* XYZ[\]^_ */
- 0x00, 0x00, 0x00, 0x0a, 0x09, 0x0a, 0x01, 0x00,
- /* `abcdefg */
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* hijklmno */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* pqrstuvw */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* xyz{|}~ */
- 0x00, 0x00, 0x00, 0x09, 0x01, 0x09, 0x00, 0x11,
- /* 0x80 - 0xFF */
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
-};
-
-#define soup_char_is_uri_percent_encoded(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_PERCENT_ENCODED)
-#define soup_char_is_uri_gen_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_GEN_DELIMS)
-#define soup_char_is_uri_sub_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_SUB_DELIMS)
-#define soup_char_is_uri_unreserved(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_URI_PERCENT_ENCODED | SOUP_CHAR_URI_GEN_DELIMS | SOUP_CHAR_URI_SUB_DELIMS)))
-#define soup_char_is_token(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_HTTP_SEPARATOR | SOUP_CHAR_HTTP_CTL)))
-
-/**
- * soup_str_case_hash:
- * @key: ASCII string to hash
- *
- * Hashes @key in a case-insensitive manner.
- *
- * Return value: the hash code.
- **/
-static guint
-soup_str_case_hash (gconstpointer key)
-{
- const char *p = key;
- guint h = g_ascii_toupper(*p);
-
- if (h)
- for (p += 1; *p != '\0'; p++)
- h = (h << 5) - h + g_ascii_toupper(*p);
-
- return h;
-}
-
-/**
- * SECTION:soup-uri
- * @short_description: URIs
- *
- * A #SoupURI represents a (parsed) URI.
- *
- * Many applications will not need to use #SoupURI directly at all; on
- * the client side, soup_message_new() takes a stringified URI, and on
- * the server side, the path and query components are provided for you
- * in the server callback.
- **/
-
-/**
- * SoupURI:
- * @scheme: the URI scheme (eg, "http")
- * @user: a username, or %NULL
- * @password: a password, or %NULL
- * @host: the hostname or IP address
- * @port: the port number on @host
- * @path: the path on @host
- * @query: a query for @path, or %NULL
- * @fragment: a fragment identifier within @path, or %NULL
- *
- * A #SoupURI represents a (parsed) URI. #SoupURI supports RFC 3986
- * (URI Generic Syntax), and can parse any valid URI. However, libsoup
- * only uses "http" and "https" URIs internally; You can use
- * SOUP_URI_VALID_FOR_HTTP() to test if a #SoupURI is a valid HTTP
- * URI.
- *
- * @scheme will always be set in any URI. It is an interned string and
- * is always all lowercase. (If you parse a URI with a non-lowercase
- * scheme, it will be converted to lowercase.) The macros
- * %SOUP_URI_SCHEME_HTTP and %SOUP_URI_SCHEME_HTTPS provide the
- * interned values for "http" and "https" and can be compared against
- * URI @scheme values.
- *
- * @user and @password are parsed as defined in the older URI specs
- * (ie, separated by a colon; RFC 3986 only talks about a single
- * "userinfo" field). Note that @password is not included in the
- * output of soup_uri_to_string(). libsoup does not normally use these
- * fields; authentication is handled via #SoupSession signals.
- *
- * @host contains the hostname, and @port the port specified in the
- * URI. If the URI doesn't contain a hostname, @host will be %NULL,
- * and if it doesn't specify a port, @port may be 0. However, for
- * "http" and "https" URIs, @host is guaranteed to be non-%NULL
- * (trying to parse an http URI with no @host will return %NULL), and
- * @port will always be non-0 (because libsoup knows the default value
- * to use when it is not specified in the URI).
- *
- * @path is always non-%NULL. For http/https URIs, @path will never be
- * an empty string either; if the input URI has no path, the parsed
- * #SoupURI will have a @path of "/".
- *
- * @query and @fragment are optional for all URI types.
- * soup_form_decode() may be useful for parsing @query.
- *
- * Note that @path, @query, and @fragment may contain
- * %-encoded characters. soup_uri_new() calls
- * soup_uri_normalize() on them, but not soup_uri_decode(). This is
- * necessary to ensure that soup_uri_to_string() will generate a URI
- * that has exactly the same meaning as the original. (In theory,
- * #SoupURI should leave @user, @password, and @host partially-encoded
- * as well, but this would be more annoying than useful.)
- **/
-
-/**
- * SOUP_URI_IS_VALID:
- * @uri: a #SoupURI
- *
- * Tests whether @uri is a valid #SoupURI; that is, that it is non-%NULL
- * and its @scheme and @path members are also non-%NULL.
- *
- * This macro does not check whether http and https URIs have a non-%NULL
- * @host member.
- *
- * Return value: %TRUE if @uri is valid for use.
- *
- * Since: 2.38
- **/
-
-/**
- * SOUP_URI_VALID_FOR_HTTP:
- * @uri: a #SoupURI
- *
- * Tests if @uri is a valid #SoupURI for HTTP communication; that is, if
- * it can be used to construct a #SoupMessage.
- *
- * Return value: %TRUE if @uri is a valid "http" or "https" URI.
- *
- * Since: 2.24
- **/
-
-/**
- * SOUP_URI_SCHEME_HTTP:
- *
- * "http" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- */
-/**
- * SOUP_URI_SCHEME_HTTPS:
- *
- * "https" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- */
-/**
- * SOUP_URI_SCHEME_FTP:
- *
- * "ftp" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- *
- * Since: 2.30
- */
-/**
- * SOUP_URI_SCHEME_FILE:
- *
- * "file" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- *
- * Since: 2.30
- */
-/**
- * SOUP_URI_SCHEME_DATA:
- *
- * "data" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- *
- * Since: 2.30
- */
-/**
- * SOUP_URI_SCHEME_RESOURCE:
- *
- * "data" as an interned string; you can compare this directly to a
- * #SoupURI's scheme field using
- * == .
- *
- * Since: 2.42
- */
-/**
- * SOUP_URI_SCHEME_WS:
- *
- * "ws" (WebSocket) as an interned string; you can compare this
- * directly to a #SoupURI's scheme field using
- * == .
- *
- * Since: 2.50
- */
-/**
- * SOUP_URI_SCHEME_WSS:
- *
- * "wss" (WebSocket over TLS) as an interned string; you can compare
- * this directly to a #SoupURI's scheme field using
- * == .
- *
- * Since: 2.50
- */
-
-struct _SoupURI {
- const char *scheme;
-
- char *user;
- char *password;
-
- char *host;
- guint port;
-
- char *path;
- char *query;
-
- char *fragment;
-};
-
-static void append_uri_encoded (GString *str, const char *in, const char *extra_enc_chars);
-static char *uri_normalized_copy (const char *str, int length, const char *unescape_extra);
-
-gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS;
-gpointer _SOUP_URI_SCHEME_WS, _SOUP_URI_SCHEME_WSS;
-gpointer _SOUP_URI_SCHEME_FTP;
-gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE;
-
-static inline const char *
-soup_uri_parse_scheme (const char *scheme, int len)
-{
- if (len == 4 && !g_ascii_strncasecmp (scheme, "http", len)) {
- return SOUP_URI_SCHEME_HTTP;
- } else if (len == 5 && !g_ascii_strncasecmp (scheme, "https", len)) {
- return SOUP_URI_SCHEME_HTTPS;
- } else if (len == 8 && !g_ascii_strncasecmp (scheme, "resource", len)) {
- return SOUP_URI_SCHEME_RESOURCE;
- } else if (len == 2 && !g_ascii_strncasecmp (scheme, "ws", len)) {
- return SOUP_URI_SCHEME_WS;
- } else if (len == 3 && !g_ascii_strncasecmp (scheme, "wss", len)) {
- return SOUP_URI_SCHEME_WSS;
- } else {
- char *lower_scheme;
-
- lower_scheme = g_ascii_strdown (scheme, len);
- scheme = g_intern_static_string (lower_scheme);
- if (scheme != (const char *)lower_scheme)
- g_free (lower_scheme);
- return scheme;
- }
-}
-
-static inline guint
-soup_scheme_default_port (const char *scheme)
-{
- if (scheme == SOUP_URI_SCHEME_HTTP || scheme == SOUP_URI_SCHEME_WS)
- return 80;
- else if (scheme == SOUP_URI_SCHEME_HTTPS || scheme == SOUP_URI_SCHEME_WSS)
- return 443;
- else if (scheme == SOUP_URI_SCHEME_FTP)
- return 21;
- else
- return 0;
-}
-
-/**
- * soup_uri_new_with_base:
- * @base: a base URI
- * @uri_string: the URI
- *
- * Parses @uri_string relative to @base.
- *
- * Return value: a parsed #SoupURI.
- **/
-SoupURI *
-soup_uri_new_with_base (SoupURI *base, const char *uri_string)
-{
- SoupURI *uri, fixed_base;
- const char *end, *hash, *colon, *at, *path, *question;
- const char *c, *hostend;
- gboolean remove_dot_segments = TRUE;
- int len;
-
- g_return_val_if_fail (uri_string != NULL, NULL);
-
- /* Allow a %NULL path in @base, for compatibility */
- if (base && base->scheme && !base->path) {
- g_warn_if_fail (SOUP_URI_IS_VALID (base));
-
- memcpy (&fixed_base, base, sizeof (SoupURI));
- fixed_base.path = "";
- base = &fixed_base;
- }
-
- g_return_val_if_fail (base == NULL || SOUP_URI_IS_VALID (base), NULL);
-
- /* First some cleanup steps (which are supposed to all be no-ops,
- * but...). Skip initial whitespace, strip out internal tabs and
- * line breaks, and ignore trailing whitespace.
- */
- while (g_ascii_isspace (*uri_string))
- uri_string++;
-
- len = strcspn (uri_string, "\t\n\r");
- if (uri_string[len]) {
- char *clean = g_malloc (strlen (uri_string) + 1), *d;
- const char *s;
-
- for (s = uri_string, d = clean; *s; s++) {
- if (*s != '\t' && *s != '\n' && *s != '\r')
- *d++ = *s;
- }
- *d = '\0';
-
- uri = soup_uri_new_with_base (base, clean);
- g_free (clean);
- return uri;
- }
- end = uri_string + len;
- while (end > uri_string && g_ascii_isspace (end[-1]))
- end--;
-
- uri = g_slice_new0 (SoupURI);
-
- /* Find fragment. */
- hash = strchr (uri_string, '#');
- if (hash) {
- uri->fragment = uri_normalized_copy (hash + 1, end - hash + 1,
- NULL);
- end = hash;
- }
-
- /* Find scheme */
- c = uri_string;
- while (c < end && (g_ascii_isalpha (*c) ||
- (c > uri_string && (g_ascii_isdigit (*c) ||
- *c == '.' ||
- *c == '+' ||
- *c == '-'))))
- c++;
-
- if (c > uri_string && *c == ':') {
- uri->scheme = soup_uri_parse_scheme (uri_string, c - uri_string);
- uri_string = c + 1;
- }
-
- if (uri_string == end && !base && !uri->fragment) {
- uri->path = g_strdup ("");
- return uri;
- }
-
- /* Check for authority */
- if (strncmp (uri_string, "//", 2) == 0) {
- uri_string += 2;
-
- path = uri_string + strcspn (uri_string, "/?#");
- if (path > end)
- path = end;
- at = strchr (uri_string, '@');
- if (at && at < path) {
- colon = strchr (uri_string, ':');
- if (colon && colon < at) {
- uri->password = soup_uri_decoded_copy (colon + 1,
- at - colon - 1, NULL);
- } else {
- uri->password = NULL;
- colon = at;
- }
-
- uri->user = soup_uri_decoded_copy (uri_string,
- colon - uri_string, NULL);
- uri_string = at + 1;
- } else
- uri->user = uri->password = NULL;
-
- /* Find host and port. */
- if (*uri_string == '[') {
- const char *pct;
-
- uri_string++;
- hostend = strchr (uri_string, ']');
- if (!hostend || hostend > path) {
- soup_uri_free (uri);
- return NULL;
- }
- if (*(hostend + 1) == ':')
- colon = hostend + 1;
- else
- colon = NULL;
-
- pct = memchr (uri_string, '%', hostend - uri_string);
- if (!pct || (pct[1] == '2' && pct[2] == '5')) {
- uri->host = soup_uri_decoded_copy (uri_string,
- hostend - uri_string, NULL);
- } else
- uri->host = g_strndup (uri_string, hostend - uri_string);
- } else {
- colon = memchr (uri_string, ':', path - uri_string);
- hostend = colon ? colon : path;
- uri->host = soup_uri_decoded_copy (uri_string,
- hostend - uri_string, NULL);
- }
-
- if (colon && colon != path - 1) {
- char *portend;
- uri->port = strtoul (colon + 1, &portend, 10);
- if (portend != (char *)path) {
- soup_uri_free (uri);
- return NULL;
- }
- }
-
- uri_string = path;
- }
-
- /* Find query */
- question = memchr (uri_string, '?', end - uri_string);
- if (question) {
- uri->query = uri_normalized_copy (question + 1,
- end - (question + 1),
- NULL);
- end = question;
- }
-
- if (end != uri_string) {
- uri->path = uri_normalized_copy (uri_string, end - uri_string,
- NULL);
- }
-
- /* Apply base URI. This is spelled out in RFC 3986. */
- if (base && !uri->scheme && uri->host)
- uri->scheme = base->scheme;
- else if (base && !uri->scheme) {
- uri->scheme = base->scheme;
- uri->user = g_strdup (base->user);
- uri->password = g_strdup (base->password);
- uri->host = g_strdup (base->host);
- uri->port = base->port;
-
- if (!uri->path) {
- uri->path = g_strdup (base->path);
- if (!uri->query)
- uri->query = g_strdup (base->query);
- remove_dot_segments = FALSE;
- } else if (*uri->path != '/') {
- char *newpath, *last;
-
- last = strrchr (base->path, '/');
- if (last) {
- newpath = g_strdup_printf ("%.*s%s",
- (int)(last + 1 - base->path),
- base->path,
- uri->path);
- } else
- newpath = g_strdup_printf ("/%s", uri->path);
-
- g_free (uri->path);
- uri->path = newpath;
- }
- }
-
- if (remove_dot_segments && uri->path && *uri->path) {
- char *p, *q;
-
- /* Remove "./" where "." is a complete segment. */
- for (p = uri->path + 1; *p; ) {
- if (*(p - 1) == '/' &&
- *p == '.' && *(p + 1) == '/')
- memmove (p, p + 2, strlen (p + 2) + 1);
- else
- p++;
- }
- /* Remove "." at end. */
- if (p > uri->path + 2 &&
- *(p - 1) == '.' && *(p - 2) == '/')
- *(p - 1) = '\0';
-
- /* Remove "/../" where != ".." */
- for (p = uri->path + 1; *p; ) {
- if (!strncmp (p, "../", 3)) {
- p += 3;
- continue;
- }
- q = strchr (p + 1, '/');
- if (!q)
- break;
- if (strncmp (q, "/../", 4) != 0) {
- p = q + 1;
- continue;
- }
- memmove (p, q + 4, strlen (q + 4) + 1);
- p = uri->path + 1;
- }
- /* Remove "/.." at end where != ".." */
- q = strrchr (uri->path, '/');
- if (q && !strcmp (q, "/..")) {
- p = q - 1;
- while (p > uri->path && *p != '/')
- p--;
- if (strncmp (p, "/../", 4) != 0)
- *(p + 1) = 0;
- }
-
- /* Remove extraneous initial "/.."s */
- while (!strncmp (uri->path, "/../", 4))
- memmove (uri->path, uri->path + 3, strlen (uri->path) - 2);
- if (!strcmp (uri->path, "/.."))
- uri->path[1] = '\0';
- }
-
- /* HTTP-specific stuff */
- if (uri->scheme == SOUP_URI_SCHEME_HTTP ||
- uri->scheme == SOUP_URI_SCHEME_HTTPS) {
- if (!uri->path)
- uri->path = g_strdup ("/");
- if (!SOUP_URI_VALID_FOR_HTTP (uri)) {
- soup_uri_free (uri);
- return NULL;
- }
- }
-
- if (uri->scheme == SOUP_URI_SCHEME_FTP) {
- if (!uri->host) {
- soup_uri_free (uri);
- return NULL;
- }
- }
-
- if (!uri->port)
- uri->port = soup_scheme_default_port (uri->scheme);
- if (!uri->path)
- uri->path = g_strdup ("");
-
- return uri;
-}
-
-/**
- * soup_uri_new:
- * @uri_string: (allow-none): a URI
- *
- * Parses an absolute URI.
- *
- * You can also pass %NULL for @uri_string if you want to get back an
- * "empty" #SoupURI that you can fill in by hand. (You will need to
- * call at least soup_uri_set_scheme() and soup_uri_set_path(), since
- * those fields are required.)
- *
- * Return value: (nullable): a #SoupURI, or %NULL if the given string
- * was found to be invalid.
- **/
-SoupURI *
-soup_uri_new (const char *uri_string)
-{
- SoupURI *uri;
-
- if (!uri_string)
- return g_slice_new0 (SoupURI);
-
- uri = soup_uri_new_with_base (NULL, uri_string);
- if (!uri)
- return NULL;
- if (!SOUP_URI_IS_VALID (uri)) {
- soup_uri_free (uri);
- return NULL;
- }
-
- return uri;
-}
-
-
-char *
-soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query,
- gboolean force_port)
-{
- GString *str;
- char *return_result;
-
- g_return_val_if_fail (uri != NULL, NULL);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri));
-
- str = g_string_sized_new (40);
-
- if (uri->scheme && !just_path_and_query)
- g_string_append_printf (str, "%s:", uri->scheme);
- if (uri->host && !just_path_and_query) {
- g_string_append (str, "//");
- if (uri->user) {
- append_uri_encoded (str, uri->user, ":;@?/");
- g_string_append_c (str, '@');
- }
- if (strchr (uri->host, ':')) {
- const char *pct;
-
- g_string_append_c (str, '[');
- pct = strchr (uri->host, '%');
- if (pct) {
- g_string_append_printf (str, "%.*s%%25%s",
- (int) (pct - uri->host),
- uri->host, pct + 1);
- } else
- g_string_append (str, uri->host);
- g_string_append_c (str, ']');
- } else
- append_uri_encoded (str, uri->host, ":/");
- if (uri->port && (force_port || uri->port != soup_scheme_default_port (uri->scheme)))
- g_string_append_printf (str, ":%u", uri->port);
- if (!uri->path && (uri->query || uri->fragment))
- g_string_append_c (str, '/');
- else if ((!uri->path || !*uri->path) &&
- (uri->scheme == SOUP_URI_SCHEME_HTTP ||
- uri->scheme == SOUP_URI_SCHEME_HTTPS))
- g_string_append_c (str, '/');
- }
-
- if (uri->path && *uri->path)
- g_string_append (str, uri->path);
- else if (just_path_and_query)
- g_string_append_c (str, '/');
-
- if (uri->query) {
- g_string_append_c (str, '?');
- g_string_append (str, uri->query);
- }
- if (uri->fragment && !just_path_and_query) {
- g_string_append_c (str, '#');
- g_string_append (str, uri->fragment);
- }
-
- return_result = str->str;
- g_string_free (str, FALSE);
-
- return return_result;
-}
-
-/**
- * soup_uri_to_string:
- * @uri: a #SoupURI
- * @just_path_and_query: if %TRUE, output just the path and query portions
- *
- * Returns a string representing @uri.
- *
- * If @just_path_and_query is %TRUE, this concatenates the path and query
- * together. That is, it constructs the string that would be needed in
- * the Request-Line of an HTTP request for @uri.
- *
- * Note that the output will never contain a password, even if @uri
- * does.
- *
- * Return value: a string representing @uri, which the caller must free.
- **/
-char *
-soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query)
-{
- return soup_uri_to_string_internal (uri, just_path_and_query, FALSE);
-}
-
-/**
- * soup_uri_copy:
- * @uri: a #SoupURI
- *
- * Copies @uri
- *
- * Return value: a copy of @uri, which must be freed with soup_uri_free()
- **/
-SoupURI *
-soup_uri_copy (SoupURI *uri)
-{
- SoupURI *dup;
-
- g_return_val_if_fail (uri != NULL, NULL);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri));
-
- dup = g_slice_new0 (SoupURI);
- dup->scheme = uri->scheme;
- dup->user = g_strdup (uri->user);
- dup->password = g_strdup (uri->password);
- dup->host = g_strdup (uri->host);
- dup->port = uri->port;
- dup->path = g_strdup (uri->path);
- dup->query = g_strdup (uri->query);
- dup->fragment = g_strdup (uri->fragment);
-
- return dup;
-}
-
-static inline gboolean
-parts_equal (const char *one, const char *two, gboolean insensitive)
-{
- if (!one && !two)
- return TRUE;
- if (!one || !two)
- return FALSE;
- return insensitive ? !g_ascii_strcasecmp (one, two) : !strcmp (one, two);
-}
-
-/**
- * soup_uri_equal:
- * @uri1: a #SoupURI
- * @uri2: another #SoupURI
- *
- * Tests whether or not @uri1 and @uri2 are equal in all parts
- *
- * Return value: %TRUE or %FALSE
- **/
-gboolean
-soup_uri_equal (SoupURI *uri1, SoupURI *uri2)
-{
- g_return_val_if_fail (uri1 != NULL, FALSE);
- g_return_val_if_fail (uri2 != NULL, FALSE);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri1));
- g_warn_if_fail (SOUP_URI_IS_VALID (uri2));
-
- if (uri1->scheme != uri2->scheme ||
- uri1->port != uri2->port ||
- !parts_equal (uri1->user, uri2->user, FALSE) ||
- !parts_equal (uri1->password, uri2->password, FALSE) ||
- !parts_equal (uri1->host, uri2->host, TRUE) ||
- !parts_equal (uri1->path, uri2->path, FALSE) ||
- !parts_equal (uri1->query, uri2->query, FALSE) ||
- !parts_equal (uri1->fragment, uri2->fragment, FALSE))
- return FALSE;
-
- return TRUE;
-}
-
-/**
- * soup_uri_free:
- * @uri: a #SoupURI
- *
- * Frees @uri.
- **/
-void
-soup_uri_free (SoupURI *uri)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->user);
- g_free (uri->password);
- g_free (uri->host);
- g_free (uri->path);
- g_free (uri->query);
- g_free (uri->fragment);
-
- g_slice_free (SoupURI, uri);
-}
-
-static void
-append_uri_encoded (GString *str, const char *in, const char *extra_enc_chars)
-{
- const unsigned char *s = (const unsigned char *)in;
-
- while (*s) {
- if (soup_char_is_uri_percent_encoded (*s) ||
- soup_char_is_uri_gen_delims (*s) ||
- (extra_enc_chars && strchr (extra_enc_chars, *s)))
- g_string_append_printf (str, "%%%02X", (int)*s++);
- else
- g_string_append_c (str, *s++);
- }
-}
-
-/**
- * soup_uri_encode:
- * @part: a URI part
- * @escape_extra: (allow-none): additional reserved characters to
- * escape (or %NULL)
- *
- * This %-encodes the given URI part and returns the escaped
- * version in allocated memory, which the caller must free when it is
- * done.
- *
- * Return value: the encoded URI part
- **/
-char *
-soup_uri_encode (const char *part, const char *escape_extra)
-{
- GString *str;
- char *encoded;
-
- g_return_val_if_fail (part != NULL, NULL);
-
- str = g_string_new (NULL);
- append_uri_encoded (str, part, escape_extra);
- encoded = str->str;
- g_string_free (str, FALSE);
-
- return encoded;
-}
-
-#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
-#define HEXCHAR(s) ((XDIGIT (s[1]) << 4) + XDIGIT (s[2]))
-
-char *
-soup_uri_decoded_copy (const char *part, int length, int *decoded_length)
-{
- unsigned char *s, *d;
- char *decoded;
-
- g_return_val_if_fail (part != NULL, NULL);
-
- decoded = g_strndup (part, length);
- s = d = (unsigned char *)decoded;
- do {
- if (*s == '%') {
- if (!g_ascii_isxdigit (s[1]) ||
- !g_ascii_isxdigit (s[2])) {
- *d++ = *s;
- continue;
- }
- *d++ = HEXCHAR (s);
- s += 2;
- } else
- *d++ = *s;
- } while (*s++);
-
- if (decoded_length)
- *decoded_length = d - (unsigned char *)decoded - 1;
-
- return decoded;
-}
-
-/**
- * soup_uri_decode:
- * @part: a URI part
- *
- * Fully %-decodes @part.
- *
- * In the past, this would return %NULL if @part contained invalid
- * percent-encoding, but now it just ignores the problem (as
- * soup_uri_new() already did).
- *
- * Return value: the decoded URI part.
- */
-char *
-soup_uri_decode (const char *part)
-{
- g_return_val_if_fail (part != NULL, NULL);
-
- return soup_uri_decoded_copy (part, strlen (part), NULL);
-}
-
-static char *
-uri_normalized_copy (const char *part, int length,
- const char *unescape_extra)
-{
- unsigned char *s, *d, c;
- char *normalized = g_strndup (part, length);
- gboolean need_fixup = FALSE;
-
- if (!unescape_extra)
- unescape_extra = "";
-
- s = d = (unsigned char *)normalized;
- while (*s) {
- if (*s == '%') {
- if (!g_ascii_isxdigit (s[1]) ||
- !g_ascii_isxdigit (s[2])) {
- *d++ = *s++;
- continue;
- }
-
- c = HEXCHAR (s);
- if (soup_char_is_uri_unreserved (c) ||
- (c && strchr (unescape_extra, c))) {
- *d++ = c;
- s += 3;
- } else {
- /* We leave it unchanged. We used to uppercase percent-encoded
- * triplets but we do not do it any more as RFC3986 Section 6.2.2.1
- * says that they only SHOULD be case normalized.
- */
- *d++ = *s++;
- *d++ = *s++;
- *d++ = *s++;
- }
- } else {
- if (!g_ascii_isgraph (*s) &&
- !strchr (unescape_extra, *s))
- need_fixup = TRUE;
- *d++ = *s++;
- }
- }
- *d = '\0';
-
- if (need_fixup) {
- GString *fixed;
-
- fixed = g_string_new (NULL);
- s = (guchar *)normalized;
- while (*s) {
- if (g_ascii_isgraph (*s) ||
- strchr (unescape_extra, *s))
- g_string_append_c (fixed, *s);
- else
- g_string_append_printf (fixed, "%%%02X", (int)*s);
- s++;
- }
- g_free (normalized);
- normalized = g_string_free (fixed, FALSE);
- }
-
- return normalized;
-}
-
-/**
- * soup_uri_normalize:
- * @part: a URI part
- * @unescape_extra: (allow-none): reserved characters to unescape (or %NULL)
- *
- * %-decodes any "unreserved" characters (or characters in
- * @unescape_extra) in @part, and %-encodes any non-ASCII
- * characters, spaces, and non-printing characters in @part.
- *
- * "Unreserved" characters are those that are not allowed to be used
- * for punctuation according to the URI spec. For example, letters are
- * unreserved, so soup_uri_normalize() will turn
- * http://example.com/foo/b%61r into
- * http://example.com/foo/bar , which is guaranteed
- * to mean the same thing. However, "/" is "reserved", so
- * http://example.com/foo%2Fbar would not
- * be changed, because it might mean something different to the
- * server.
- *
- * In the past, this would return %NULL if @part contained invalid
- * percent-encoding, but now it just ignores the problem (as
- * soup_uri_new() already did).
- *
- * Return value: the normalized URI part
- */
-char *
-soup_uri_normalize (const char *part, const char *unescape_extra)
-{
- g_return_val_if_fail (part != NULL, NULL);
-
- return uri_normalized_copy (part, strlen (part), unescape_extra);
-}
-
-
-/**
- * soup_uri_uses_default_port:
- * @uri: a #SoupURI
- *
- * Tests if @uri uses the default port for its scheme. (Eg, 80 for
- * http.) (This only works for http, https and ftp; libsoup does not know
- * the default ports of other protocols.)
- *
- * Return value: %TRUE or %FALSE
- **/
-gboolean
-soup_uri_uses_default_port (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, FALSE);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri));
-
- return uri->port == soup_scheme_default_port (uri->scheme);
-}
-
-/**
- * soup_uri_get_scheme:
- * @uri: a #SoupURI
- *
- * Gets @uri's scheme.
- *
- * Return value: @uri's scheme.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_scheme (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->scheme;
-}
-
-/**
- * soup_uri_set_scheme:
- * @uri: a #SoupURI
- * @scheme: the URI scheme
- *
- * Sets @uri's scheme to @scheme. This will also set @uri's port to
- * the default port for @scheme, if known.
- **/
-void
-soup_uri_set_scheme (SoupURI *uri, const char *scheme)
-{
- g_return_if_fail (uri != NULL);
- g_return_if_fail (scheme != NULL);
-
- uri->scheme = soup_uri_parse_scheme (scheme, strlen (scheme));
- uri->port = soup_scheme_default_port (uri->scheme);
-}
-
-/**
- * soup_uri_get_user:
- * @uri: a #SoupURI
- *
- * Gets @uri's user.
- *
- * Return value: @uri's user.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_user (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->user;
-}
-
-/**
- * soup_uri_set_user:
- * @uri: a #SoupURI
- * @user: (allow-none): the username, or %NULL
- *
- * Sets @uri's user to @user.
- **/
-void
-soup_uri_set_user (SoupURI *uri, const char *user)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->user);
- uri->user = g_strdup (user);
-}
-
-/**
- * soup_uri_get_password:
- * @uri: a #SoupURI
- *
- * Gets @uri's password.
- *
- * Return value: @uri's password.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_password (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->password;
-}
-
-/**
- * soup_uri_set_password:
- * @uri: a #SoupURI
- * @password: (allow-none): the password, or %NULL
- *
- * Sets @uri's password to @password.
- **/
-void
-soup_uri_set_password (SoupURI *uri, const char *password)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->password);
- uri->password = g_strdup (password);
-}
-
-/**
- * soup_uri_get_host:
- * @uri: a #SoupURI
- *
- * Gets @uri's host.
- *
- * Return value: @uri's host.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_host (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->host;
-}
-
-/**
- * soup_uri_set_host:
- * @uri: a #SoupURI
- * @host: (allow-none): the hostname or IP address, or %NULL
- *
- * Sets @uri's host to @host.
- *
- * If @host is an IPv6 IP address, it should not include the brackets
- * required by the URI syntax; they will be added automatically when
- * converting @uri to a string.
- *
- * http and https URIs should not have a %NULL @host.
- **/
-void
-soup_uri_set_host (SoupURI *uri, const char *host)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->host);
- uri->host = g_strdup (host);
-}
-
-/**
- * soup_uri_get_port:
- * @uri: a #SoupURI
- *
- * Gets @uri's port.
- *
- * Return value: @uri's port.
- *
- * Since: 2.32
- **/
-guint
-soup_uri_get_port (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, 0);
-
- return uri->port;
-}
-
-/**
- * soup_uri_set_port:
- * @uri: a #SoupURI
- * @port: the port, or 0
- *
- * Sets @uri's port to @port. If @port is 0, @uri will not have an
- * explicitly-specified port.
- **/
-void
-soup_uri_set_port (SoupURI *uri, guint port)
-{
- g_return_if_fail (uri != NULL);
-
- uri->port = port;
-}
-
-/**
- * soup_uri_get_path:
- * @uri: a #SoupURI
- *
- * Gets @uri's path.
- *
- * Return value: @uri's path.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_path (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->path;
-}
-
-/**
- * soup_uri_set_path:
- * @uri: a #SoupURI
- * @path: the non-%NULL path
- *
- * Sets @uri's path to @path.
- **/
-void
-soup_uri_set_path (SoupURI *uri, const char *path)
-{
- g_return_if_fail (uri != NULL);
-
- /* We allow a NULL path for compatibility, but warn about it. */
- if (!path) {
- g_warn_if_fail (path != NULL);
- path = "";
- }
-
- g_free (uri->path);
- uri->path = g_strdup (path);
-}
-
-/**
- * soup_uri_get_query:
- * @uri: a #SoupURI
- *
- * Gets @uri's query.
- *
- * Return value: @uri's query.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_query (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->query;
-}
-
-/**
- * soup_uri_set_query:
- * @uri: a #SoupURI
- * @query: (allow-none): the query
- *
- * Sets @uri's query to @query.
- **/
-void
-soup_uri_set_query (SoupURI *uri, const char *query)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->query);
- uri->query = g_strdup (query);
-}
-
-/**
- * soup_uri_set_query_from_form:
- * @uri: a #SoupURI
- * @form: (element-type utf8 utf8) (transfer none): a #GHashTable containing HTML form
- * information
- *
- * Sets @uri's query to the result of encoding @form according to the
- * HTML form rules. See soup_form_encode_hash() for more information.
- **/
-void
-soup_uri_set_query_from_form (SoupURI *uri, GHashTable *form)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->query);
- uri->query = soup_form_encode_hash (form);
-}
-
-/**
- * soup_uri_set_query_from_fields:
- * @uri: a #SoupURI
- * @first_field: name of the first form field to encode into query
- * @...: value of @first_field, followed by additional field names
- * and values, terminated by %NULL.
- *
- * Sets @uri's query to the result of encoding the given form fields
- * and values according to the * HTML form rules. See
- * soup_form_encode() for more information.
- **/
-void
-soup_uri_set_query_from_fields (SoupURI *uri,
- const char *first_field,
- ...)
-{
- va_list args;
-
- g_return_if_fail (uri != NULL);
-
- g_free (uri->query);
- va_start (args, first_field);
- uri->query = soup_form_encode_valist (first_field, args);
- va_end (args);
-}
-
-/**
- * soup_uri_get_fragment:
- * @uri: a #SoupURI
- *
- * Gets @uri's fragment.
- *
- * Return value: @uri's fragment.
- *
- * Since: 2.32
- **/
-const char *
-soup_uri_get_fragment (SoupURI *uri)
-{
- g_return_val_if_fail (uri != NULL, NULL);
-
- return uri->fragment;
-}
-
-/**
- * soup_uri_set_fragment:
- * @uri: a #SoupURI
- * @fragment: (allow-none): the fragment
- *
- * Sets @uri's fragment to @fragment.
- **/
-void
-soup_uri_set_fragment (SoupURI *uri, const char *fragment)
-{
- g_return_if_fail (uri != NULL);
-
- g_free (uri->fragment);
- uri->fragment = g_strdup (fragment);
-}
-
-/**
- * soup_uri_copy_host:
- * @uri: a #SoupURI
- *
- * Makes a copy of @uri, considering only the protocol, host, and port
- *
- * Return value: the new #SoupURI
- *
- * Since: 2.28
- **/
-SoupURI *
-soup_uri_copy_host (SoupURI *uri)
-{
- SoupURI *dup;
-
- g_return_val_if_fail (uri != NULL, NULL);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri));
-
- dup = soup_uri_new (NULL);
- dup->scheme = uri->scheme;
- dup->host = g_strdup (uri->host);
- dup->port = uri->port;
- dup->path = g_strdup ("");
-
- return dup;
-}
-
-/**
- * soup_uri_host_hash:
- * @key: (type Soup.URI): a #SoupURI with a non-%NULL @host member
- *
- * Hashes @key, considering only the scheme, host, and port.
- *
- * Return value: a hash
- *
- * Since: 2.28
- **/
-guint
-soup_uri_host_hash (gconstpointer key)
-{
- const SoupURI *uri = key;
-
- g_return_val_if_fail (uri != NULL && uri->host != NULL, 0);
- g_warn_if_fail (SOUP_URI_IS_VALID (uri));
-
- return GPOINTER_TO_UINT (uri->scheme) + uri->port +
- soup_str_case_hash (uri->host);
-}
-
-/**
- * soup_uri_host_equal:
- * @v1: (type Soup.URI): a #SoupURI with a non-%NULL @host member
- * @v2: (type Soup.URI): a #SoupURI with a non-%NULL @host member
- *
- * Compares @v1 and @v2, considering only the scheme, host, and port.
- *
- * Return value: whether or not the URIs are equal in scheme, host,
- * and port.
- *
- * Since: 2.28
- **/
-gboolean
-soup_uri_host_equal (gconstpointer v1, gconstpointer v2)
-{
- const SoupURI *one = v1;
- const SoupURI *two = v2;
-
- g_return_val_if_fail (one != NULL && two != NULL, one == two);
- g_return_val_if_fail (one->host != NULL && two->host != NULL, one->host == two->host);
- g_warn_if_fail (SOUP_URI_IS_VALID (one));
- g_warn_if_fail (SOUP_URI_IS_VALID (two));
-
- if (one->scheme != two->scheme)
- return FALSE;
- if (one->port != two->port)
- return FALSE;
-
- return g_ascii_strcasecmp (one->host, two->host) == 0;
-}
-
-/* OSTREECHANGE: drop boxed type definition */
-/* G_DEFINE_BOXED_TYPE (SoupURI, soup_uri, soup_uri_copy, soup_uri_free) */
diff --git a/src/libostree/ostree-soup-uri.h b/src/libostree/ostree-soup-uri.h
deleted file mode 100644
index 650b7efc..00000000
--- a/src/libostree/ostree-soup-uri.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Copyright 1999-2002 Ximian, Inc.
- */
-
-/* NOTE - taken from the libsoup codebase for use by the ostree curl backend
- * (yes, ironically enough).
- *
- * Please watch for future changes in libsoup.
- */
-
-
-#ifndef SOUP_URI_H
-#define SOUP_URI_H 1
-
-/* OSTREECHANGE: make struct private
- * Only include gio, and skip available definitions.
- */
-#include
-#define SOUP_AVAILABLE_IN_2_4
-#define SOUP_AVAILABLE_IN_2_28
-#define SOUP_AVAILABLE_IN_2_32
-
-G_BEGIN_DECLS
-
-/* OSTREECHANGE: make struct private */
-typedef struct _SoupURI SoupURI;
-
-/* OSTREECHANGE: import soup-misc's interning */
-#define SOUP_VAR extern
-#define _SOUP_ATOMIC_INTERN_STRING(variable, value) ((const char *)(g_atomic_pointer_get (&(variable)) ? (variable) : (g_atomic_pointer_set (&(variable), (gpointer)g_intern_static_string (value)), (variable))))
-#define SOUP_URI_SCHEME_HTTP _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTP, "http")
-#define SOUP_URI_SCHEME_HTTPS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTPS, "https")
-#define SOUP_URI_SCHEME_FTP _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_FTP, "ftp")
-#define SOUP_URI_SCHEME_FILE _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_FILE, "file")
-#define SOUP_URI_SCHEME_DATA _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_DATA, "data")
-#define SOUP_URI_SCHEME_RESOURCE _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_RESOURCE, "resource")
-#define SOUP_URI_SCHEME_WS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WS, "ws")
-#define SOUP_URI_SCHEME_WSS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_WSS, "wss")
-
-/* OSTREECHANGE: import soup-form bits */
-SOUP_AVAILABLE_IN_2_4
-char *soup_form_encode_hash (GHashTable *form_data_set);
-SOUP_AVAILABLE_IN_2_4
-char *soup_form_encode_valist (const char *first_field,
- va_list args);
-
-SOUP_VAR gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS;
-SOUP_VAR gpointer _SOUP_URI_SCHEME_FTP;
-SOUP_VAR gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE;
-SOUP_VAR gpointer _SOUP_URI_SCHEME_WS, _SOUP_URI_SCHEME_WSS;
-
-SOUP_AVAILABLE_IN_2_4
-SoupURI *soup_uri_new_with_base (SoupURI *base,
- const char *uri_string);
-SOUP_AVAILABLE_IN_2_4
-SoupURI *soup_uri_new (const char *uri_string);
-
-SOUP_AVAILABLE_IN_2_4
-char *soup_uri_to_string (SoupURI *uri,
- gboolean just_path_and_query);
-
-SOUP_AVAILABLE_IN_2_4
-SoupURI *soup_uri_copy (SoupURI *uri);
-
-SOUP_AVAILABLE_IN_2_4
-gboolean soup_uri_equal (SoupURI *uri1,
- SoupURI *uri2);
-
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_free (SoupURI *uri);
-
-SOUP_AVAILABLE_IN_2_4
-char *soup_uri_encode (const char *part,
- const char *escape_extra);
-SOUP_AVAILABLE_IN_2_4
-char *soup_uri_decode (const char *part);
-SOUP_AVAILABLE_IN_2_4
-char *soup_uri_normalize (const char *part,
- const char *unescape_extra);
-
-SOUP_AVAILABLE_IN_2_4
-gboolean soup_uri_uses_default_port (SoupURI *uri);
-
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_scheme (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_scheme (SoupURI *uri,
- const char *scheme);
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_user (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_user (SoupURI *uri,
- const char *user);
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_password (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_password (SoupURI *uri,
- const char *password);
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_host (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_host (SoupURI *uri,
- const char *host);
-SOUP_AVAILABLE_IN_2_32
-guint soup_uri_get_port (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_port (SoupURI *uri,
- guint port);
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_path (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_path (SoupURI *uri,
- const char *path);
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_query (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_query (SoupURI *uri,
- const char *query);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_query_from_form (SoupURI *uri,
- GHashTable *form);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_query_from_fields (SoupURI *uri,
- const char *first_field,
- ...) G_GNUC_NULL_TERMINATED;
-SOUP_AVAILABLE_IN_2_32
-const char *soup_uri_get_fragment (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_4
-void soup_uri_set_fragment (SoupURI *uri,
- const char *fragment);
-
-SOUP_AVAILABLE_IN_2_28
-SoupURI *soup_uri_copy_host (SoupURI *uri);
-SOUP_AVAILABLE_IN_2_28
-guint soup_uri_host_hash (gconstpointer key);
-SOUP_AVAILABLE_IN_2_28
-gboolean soup_uri_host_equal (gconstpointer v1,
- gconstpointer v2);
-
-#define SOUP_URI_IS_VALID(uri) ((uri) && (uri)->scheme && (uri)->path)
-#define SOUP_URI_VALID_FOR_HTTP(uri) ((uri) && ((uri)->scheme == SOUP_URI_SCHEME_HTTP || (uri)->scheme == SOUP_URI_SCHEME_HTTPS) && (uri)->host && (uri)->path)
-
-G_END_DECLS
-
-#endif /*SOUP_URI_H*/
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index b7cc232f..404f336f 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -2830,6 +2830,121 @@ get_var_dfd (OstreeSysroot *self,
return glnx_opendirat (base_dfd, base_path, TRUE, ret_fd, error);
}
+#ifdef HAVE_SELINUX
+static void
+child_setup_fchdir (gpointer data)
+{
+ int fd = (int) (uintptr_t) data;
+ int rc __attribute__((unused));
+
+ rc = fchdir (fd);
+}
+
+/*
+ * Derived from rpm-ostree's rust/src/bwrap.rs
+ */
+static gboolean
+run_in_deployment (int deployment_dfd,
+ const gchar * const *child_argv,
+ gsize child_argc,
+ gint *exit_status,
+ gchar **stdout,
+ GError **error)
+{
+ static const gchar * const COMMON_ARGV[] = {
+ "/usr/bin/bwrap",
+ "--dev", "/dev", "--proc", "/proc", "--dir", "/run", "--dir", "/tmp",
+ "--chdir", "/",
+ "--die-with-parent",
+ "--unshare-pid",
+ "--unshare-uts",
+ "--unshare-ipc",
+ "--unshare-cgroup-try",
+ "--ro-bind", "/sys/block", "/sys/block",
+ "--ro-bind", "/sys/bus", "/sys/bus",
+ "--ro-bind", "/sys/class", "/sys/class",
+ "--ro-bind", "/sys/dev", "/sys/dev",
+ "--ro-bind", "/sys/devices", "/sys/devices",
+ "--bind", "usr", "/usr",
+ "--bind", "etc", "/etc",
+ "--bind", "var", "/var",
+ "--symlink", "/usr/lib", "/lib",
+ "--symlink", "/usr/lib32", "/lib32",
+ "--symlink", "/usr/lib64", "/lib64",
+ "--symlink", "/usr/bin", "/bin",
+ "--symlink", "/usr/sbin", "/sbin",
+ };
+ static const gsize COMMON_ARGC = sizeof (COMMON_ARGV) / sizeof (*COMMON_ARGV);
+
+ gsize i;
+ GPtrArray *args = g_ptr_array_sized_new (COMMON_ARGC + child_argc + 1);
+ g_autofree gchar **args_raw = NULL;
+
+ for (i = 0; i < COMMON_ARGC; i++)
+ g_ptr_array_add (args, (gchar *) COMMON_ARGV[i]);
+
+ for (i = 0; i < child_argc; i++)
+ g_ptr_array_add (args, (gchar *) child_argv[i]);
+
+ g_ptr_array_add (args, NULL);
+
+ args_raw = (gchar **) g_ptr_array_free (args, FALSE);
+
+ return g_spawn_sync (NULL, args_raw, NULL, 0, &child_setup_fchdir,
+ (gpointer) (uintptr_t) deployment_dfd,
+ stdout, NULL, exit_status, error);
+}
+
+/*
+ * Run semodule to check if the module content changed after merging /etc
+ * and rebuild the policy if needed.
+ */
+static gboolean
+sysroot_finalize_selinux_policy (int deployment_dfd, GError **error)
+{
+ struct stat stbuf;
+ gint exit_status;
+ g_autofree gchar *stdout = NULL;
+
+ if (!glnx_fstatat_allow_noent (deployment_dfd, "etc/selinux/config", &stbuf,
+ AT_SYMLINK_NOFOLLOW, error))
+ return FALSE;
+
+ /* Skip the SELinux policy refresh if /etc/selinux/config doesn't exist. */
+ if (errno != 0)
+ return TRUE;
+
+ /*
+ * Skip the SELinux policy refresh if the --rebuild-if-modules-changed
+ * flag is not supported by semodule.
+ */
+ static const gchar * const SEMODULE_HELP_ARGV[] = {
+ "semodule", "--help"
+ };
+ static const gsize SEMODULE_HELP_ARGC = sizeof (SEMODULE_HELP_ARGV) / sizeof (*SEMODULE_HELP_ARGV);
+ if (!run_in_deployment (deployment_dfd, SEMODULE_HELP_ARGV,
+ SEMODULE_HELP_ARGC, &exit_status, &stdout, error))
+ return FALSE;
+ if (!g_spawn_check_exit_status (exit_status, error))
+ return glnx_prefix_error (error, "failed to run semodule");
+ if (!strstr(stdout, "--rebuild-if-modules-changed"))
+ {
+ ot_journal_print (LOG_INFO, "semodule does not have --rebuild-if-modules-changed");
+ return TRUE;
+ }
+
+ static const gchar * const SEMODULE_REBUILD_ARGV[] = {
+ "semodule", "-N", "--rebuild-if-modules-changed"
+ };
+ static const gsize SEMODULE_REBUILD_ARGC = sizeof (SEMODULE_REBUILD_ARGV) / sizeof (*SEMODULE_REBUILD_ARGV);
+
+ if (!run_in_deployment (deployment_dfd, SEMODULE_REBUILD_ARGV,
+ SEMODULE_REBUILD_ARGC, &exit_status, NULL, error))
+ return FALSE;
+ return g_spawn_check_exit_status (exit_status, error);
+}
+#endif /* HAVE_SELINUX */
+
static gboolean
sysroot_finalize_deployment (OstreeSysroot *self,
OstreeDeployment *deployment,
@@ -2866,6 +2981,11 @@ sysroot_finalize_deployment (OstreeSysroot *self,
return FALSE;
}
+#ifdef HAVE_SELINUX
+ if (!sysroot_finalize_selinux_policy(deployment_dfd, error))
+ return FALSE;
+#endif /* HAVE_SELINUX */
+
const char *osdeploypath = glnx_strjoina ("ostree/deploy/", ostree_deployment_get_osname (deployment));
glnx_autofd int os_deploy_dfd = -1;
if (!glnx_opendirat (self->sysroot_fd, osdeploypath, TRUE, &os_deploy_dfd, error))
@@ -3255,10 +3375,10 @@ ostree_sysroot_stage_tree_with_options (OstreeSysroot *self,
}
/* Invoked at shutdown time by ostree-finalize-staged.service */
-gboolean
-_ostree_sysroot_finalize_staged (OstreeSysroot *self,
- GCancellable *cancellable,
- GError **error)
+static gboolean
+_ostree_sysroot_finalize_staged_inner (OstreeSysroot *self,
+ GCancellable *cancellable,
+ GError **error)
{
/* It's totally fine if there's no staged deployment; perhaps down the line
* though we could teach the ostree cmdline to tell systemd to activate the
@@ -3355,9 +3475,63 @@ _ostree_sysroot_finalize_staged (OstreeSysroot *self,
if (!ostree_sysroot_prepare_cleanup (self, cancellable, error))
return FALSE;
+ // Cleanup will have closed some FDs, re-ensure writability
+ if (!_ostree_sysroot_ensure_writable (self, error))
+ return FALSE;
+
return TRUE;
}
+/* Invoked at shutdown time by ostree-finalize-staged.service */
+gboolean
+_ostree_sysroot_finalize_staged (OstreeSysroot *self,
+ GCancellable *cancellable,
+ GError **error)
+{
+ g_autoptr(GError) finalization_error = NULL;
+ if (!_ostree_sysroot_ensure_boot_fd (self, error))
+ return FALSE;
+ if (!_ostree_sysroot_finalize_staged_inner (self, cancellable, &finalization_error))
+ {
+ g_autoptr(GError) writing_error = NULL;
+ g_assert_cmpint (self->boot_fd, !=, -1);
+ if (!glnx_file_replace_contents_at (self->boot_fd, _OSTREE_FINALIZE_STAGED_FAILURE_PATH,
+ (guint8*)finalization_error->message, -1,
+ 0, cancellable, &writing_error))
+ {
+ // We somehow failed to write the failure message...that's not great. Maybe ENOSPC on /boot.
+ g_printerr ("Failed to write %s: %s\n", _OSTREE_FINALIZE_STAGED_FAILURE_PATH, writing_error->message);
+ }
+ g_propagate_error (error, g_steal_pointer (&finalization_error));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* Invoked at bootup time by ostree-boot-complete.service */
+gboolean
+_ostree_sysroot_boot_complete (OstreeSysroot *self,
+ GCancellable *cancellable,
+ GError **error)
+{
+ if (!_ostree_sysroot_ensure_boot_fd (self, error))
+ return FALSE;
+
+ glnx_autofd int failure_fd = -1;
+ if (!ot_openat_ignore_enoent (self->boot_fd, _OSTREE_FINALIZE_STAGED_FAILURE_PATH, &failure_fd, error))
+ return FALSE;
+ // If we didn't find a failure log, then there's nothing to do right now.
+ // (Actually this unit shouldn't even be invoked, but we may do more in the future)
+ if (failure_fd == -1)
+ return TRUE;
+ g_autofree char *failure_data = glnx_fd_readall_utf8 (failure_fd, NULL, cancellable, error);
+ if (failure_data == NULL)
+ return glnx_prefix_error (error, "Reading from %s", _OSTREE_FINALIZE_STAGED_FAILURE_PATH);
+ // Remove the file; we don't want to continually error out.
+ (void) unlinkat (self->boot_fd, _OSTREE_FINALIZE_STAGED_FAILURE_PATH, 0);
+ return glnx_throw (error, "ostree-finalize-staged.service failed on previous boot: %s", failure_data);
+}
+
/**
* ostree_sysroot_deployment_set_kargs:
* @self: Sysroot
diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h
index cb34eeb3..a49a406c 100644
--- a/src/libostree/ostree-sysroot-private.h
+++ b/src/libostree/ostree-sysroot-private.h
@@ -96,6 +96,9 @@ struct OstreeSysroot {
#define _OSTREE_SYSROOT_BOOT_INITRAMFS_OVERLAYS "ostree/initramfs-overlays"
#define _OSTREE_SYSROOT_INITRAMFS_OVERLAYS "boot/" _OSTREE_SYSROOT_BOOT_INITRAMFS_OVERLAYS
+// Relative to /boot, consumed by ostree-boot-complete.service
+#define _OSTREE_FINALIZE_STAGED_FAILURE_PATH "ostree/finalize-failure.stamp"
+
gboolean
_ostree_sysroot_ensure_writable (OstreeSysroot *self,
GError **error);
@@ -142,6 +145,10 @@ gboolean
_ostree_sysroot_finalize_staged (OstreeSysroot *self,
GCancellable *cancellable,
GError **error);
+gboolean
+_ostree_sysroot_boot_complete (OstreeSysroot *self,
+ GCancellable *cancellable,
+ GError **error);
OstreeDeployment *
_ostree_sysroot_deserialize_deployment_from_variant (GVariant *v,
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index 266a2975..67afb5d2 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -82,7 +83,7 @@ ostree_sysroot_finalize (GObject *object)
g_clear_pointer (&self->deployments, g_ptr_array_unref);
g_clear_object (&self->booted_deployment);
g_clear_object (&self->staged_deployment);
- g_clear_pointer (&self->staged_deployment_data, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&self->staged_deployment_data, g_variant_unref);
glnx_release_lock_file (&self->lock);
@@ -356,6 +357,8 @@ _ostree_sysroot_ensure_writable (OstreeSysroot *self,
ostree_sysroot_unload (self);
if (!ensure_sysroot_fd (self, error))
return FALSE;
+ if (!_ostree_sysroot_ensure_boot_fd (self, error))
+ return FALSE;
return TRUE;
}
@@ -1016,7 +1019,7 @@ _ostree_sysroot_reload_staged (OstreeSysroot *self,
g_assert (self->booted_deployment);
g_clear_object (&self->staged_deployment);
- g_clear_pointer (&self->staged_deployment_data, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&self->staged_deployment_data, g_variant_unref);
/* Read the staged state from disk */
glnx_autofd int fd = -1;
diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h
index 244ec9af..d1c64c1c 100644
--- a/src/libostree/ostree-version.h
+++ b/src/libostree/ostree-version.h
@@ -41,7 +41,7 @@
*
* Since: 2017.4
*/
-#define OSTREE_RELEASE_VERSION (2)
+#define OSTREE_RELEASE_VERSION (3)
/**
* OSTREE_VERSION
@@ -50,7 +50,7 @@
*
* Since: 2017.4
*/
-#define OSTREE_VERSION (2022.2)
+#define OSTREE_VERSION (2022.3)
/**
* OSTREE_VERSION_S:
@@ -60,7 +60,7 @@
*
* Since: 2017.4
*/
-#define OSTREE_VERSION_S "2022.2"
+#define OSTREE_VERSION_S "2022.3"
#define OSTREE_ENCODE_VERSION(year,release) \
((year) << 16 | (release))
diff --git a/src/libostree/s390x-se-luks-gencpio b/src/libostree/s390x-se-luks-gencpio
index f0ad24eb..7c94a440 100755
--- a/src/libostree/s390x-se-luks-gencpio
+++ b/src/libostree/s390x-se-luks-gencpio
@@ -1,5 +1,5 @@
- #!/usr/bin/bash
- # This script creates new initramdisk with LUKS config within
+#!/bin/bash
+# This script creates new initramdisk with LUKS config within
set -euo pipefail
old_initrd=$1
diff --git a/src/libotutil/ot-checksum-instream.c b/src/libotutil/ot-checksum-instream.c
index 6555eb8a..e89d68e4 100644
--- a/src/libotutil/ot-checksum-instream.c
+++ b/src/libotutil/ot-checksum-instream.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -22,12 +23,12 @@
#include "ot-checksum-instream.h"
#include "ot-checksum-utils.h"
-G_DEFINE_TYPE (OtChecksumInstream, ot_checksum_instream, G_TYPE_FILTER_INPUT_STREAM)
-
struct _OtChecksumInstreamPrivate {
OtChecksum checksum;
};
+G_DEFINE_TYPE_WITH_PRIVATE (OtChecksumInstream, ot_checksum_instream, G_TYPE_FILTER_INPUT_STREAM)
+
static gssize ot_checksum_instream_read (GInputStream *stream,
void *buffer,
gsize count,
@@ -50,8 +51,6 @@ ot_checksum_instream_class_init (OtChecksumInstreamClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass, sizeof (OtChecksumInstreamPrivate));
-
object_class->finalize = ot_checksum_instream_finalize;
stream_class->read_fn = ot_checksum_instream_read;
}
@@ -59,7 +58,7 @@ ot_checksum_instream_class_init (OtChecksumInstreamClass *klass)
static void
ot_checksum_instream_init (OtChecksumInstream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, OT_TYPE_CHECKSUM_INSTREAM, OtChecksumInstreamPrivate);
+ self->priv = ot_checksum_instream_get_instance_private (self);
}
OtChecksumInstream *
diff --git a/src/libotutil/ot-gpg-utils.c b/src/libotutil/ot-gpg-utils.c
index 63d6e503..fd65e120 100644
--- a/src/libotutil/ot-gpg-utils.c
+++ b/src/libotutil/ot-gpg-utils.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 Red Hat, Inc.
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -129,7 +130,7 @@ ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx,
goto out;
/* Sneaky cast from GFileOutputStream to GOutputStream. */
- *out_pubring_stream = g_steal_pointer (&pubring_stream);
+ *out_pubring_stream = (GOutputStream *)g_steal_pointer (&pubring_stream);
}
if (out_tmp_home_dir != NULL)
diff --git a/src/ostree/ot-admin-builtin-boot-complete.c b/src/ostree/ot-admin-builtin-boot-complete.c
new file mode 100644
index 00000000..6e1052f5
--- /dev/null
+++ b/src/ostree/ot-admin-builtin-boot-complete.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2022 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, see .
+ */
+
+#include "config.h"
+
+#include
+
+#include "ot-main.h"
+#include "ot-admin-builtins.h"
+#include "ot-admin-functions.h"
+#include "ostree.h"
+#include "otutil.h"
+
+#include "ostree-cmdprivate.h"
+
+static GOptionEntry options[] = {
+ { NULL }
+};
+
+gboolean
+ot_admin_builtin_boot_complete (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
+{
+ /* Just a sanity check; we shouldn't be called outside of the service though.
+ */
+ struct stat stbuf;
+ if (fstatat (AT_FDCWD, OSTREE_PATH_BOOTED, &stbuf, 0) < 0)
+ return TRUE;
+ // We must have been invoked via systemd which should have set up a mount namespace.
+ g_assert (getenv ("INVOCATION_ID"));
+
+ g_autoptr(GOptionContext) context = g_option_context_new ("");
+ g_autoptr(OstreeSysroot) sysroot = NULL;
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
+ invocation, &sysroot, cancellable, error))
+ return FALSE;
+
+ if (!ostree_cmd__private__()->ostree_boot_complete (sysroot, cancellable, error))
+ return FALSE;
+
+ return TRUE;
+}
diff --git a/src/ostree/ot-admin-builtins.h b/src/ostree/ot-admin-builtins.h
index d32b617e..8d9451be 100644
--- a/src/ostree/ot-admin-builtins.h
+++ b/src/ostree/ot-admin-builtins.h
@@ -39,6 +39,7 @@ BUILTINPROTO(deploy);
BUILTINPROTO(cleanup);
BUILTINPROTO(pin);
BUILTINPROTO(finalize_staged);
+BUILTINPROTO(boot_complete);
BUILTINPROTO(unlock);
BUILTINPROTO(status);
BUILTINPROTO(set_origin);
diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c
index e0d2a60c..af09a614 100644
--- a/src/ostree/ot-builtin-admin.c
+++ b/src/ostree/ot-builtin-admin.c
@@ -43,6 +43,9 @@ static OstreeCommand admin_subcommands[] = {
{ "finalize-staged", OSTREE_BUILTIN_FLAG_NO_REPO | OSTREE_BUILTIN_FLAG_HIDDEN,
ot_admin_builtin_finalize_staged,
"Internal command to run at shutdown time" },
+ { "boot-complete", OSTREE_BUILTIN_FLAG_NO_REPO | OSTREE_BUILTIN_FLAG_HIDDEN,
+ ot_admin_builtin_boot_complete,
+ "Internal command to run at boot after an update was applied" },
{ "init-fs", OSTREE_BUILTIN_FLAG_NO_REPO,
ot_admin_builtin_init_fs,
"Initialize a root filesystem" },
diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c
index 8e3266a1..042b157d 100644
--- a/src/ostree/ot-builtin-fsck.c
+++ b/src/ostree/ot-builtin-fsck.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -419,7 +420,7 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
}
}
- g_clear_pointer (&objects, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&objects, g_hash_table_unref);
if (!opt_quiet)
g_print ("Verifying content integrity of %u commit objects...\n",
diff --git a/src/ostree/ot-builtin-prune.c b/src/ostree/ot-builtin-prune.c
index b2dd407a..73dfe5e5 100644
--- a/src/ostree/ot-builtin-prune.c
+++ b/src/ostree/ot-builtin-prune.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Colin Walters
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -133,7 +134,7 @@ traverse_keep_younger_than (OstreeRepo *repo, const char *checksum,
g_free (next_checksum);
next_checksum = ostree_commit_get_parent (commit);
if (next_checksum)
- g_clear_pointer (&commit, (GDestroyNotify)g_variant_unref);
+ g_clear_pointer (&commit, g_variant_unref);
else
break; /* No parent, we're done */
}
diff --git a/tests/fixtures/bare-split-xattrs/basic.tar.xz b/tests/bare-split-xattrs-basic.tar.xz
similarity index 100%
rename from tests/fixtures/bare-split-xattrs/basic.tar.xz
rename to tests/bare-split-xattrs-basic.tar.xz
diff --git a/tests/repo-finder-mount.c b/tests/repo-finder-mount.c
index 184148cc..66c4ecd7 100644
--- a/tests/repo-finder-mount.c
+++ b/tests/repo-finder-mount.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2017 Endless Mobile, Inc.
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -47,7 +48,7 @@ result_cb (GObject *source_object,
static void
collection_ref_free0 (OstreeCollectionRef *ref)
{
- g_clear_pointer (&ref, (GDestroyNotify) ostree_collection_ref_free);
+ g_clear_pointer (&ref, ostree_collection_ref_free);
}
int
diff --git a/tests/test-basic-bare-split-xattrs.sh b/tests/test-basic-bare-split-xattrs.sh
index ac8ebffd..bf828eb7 100755
--- a/tests/test-basic-bare-split-xattrs.sh
+++ b/tests/test-basic-bare-split-xattrs.sh
@@ -56,7 +56,7 @@ rm -rf -- repo files
if [ "${PRIVILEGED}" = "true" ]; then
COMMIT="d614c428015227259031b0f19b934dade908942fd71c49047e0daa70e7800a5d"
cd ${test_tmpdir}
- ${SUDO} tar --same-permissions --same-owner -xaf ${test_srcdir}/fixtures/bare-split-xattrs/basic.tar.xz
+ ${SUDO} tar --same-permissions --same-owner -xaf ${test_srcdir}/bare-split-xattrs-basic.tar.xz
${SUDO} ${OSTREE} fsck --all
${OSTREE} log ${COMMIT} > out.txt
assert_file_has_content_literal out.txt "fixtures: bare-split-xattrs repo"
diff --git a/tests/test-cli-extensions.sh b/tests/test-cli-extensions.sh
index e1916036..edce0c9d 100755
--- a/tests/test-cli-extensions.sh
+++ b/tests/test-cli-extensions.sh
@@ -15,7 +15,9 @@ echo '1..2'
mkdir -p ./localbin
ORIG_PATH="${PATH}"
export PATH="./localbin/:${PATH}"
-ln -s /usr/bin/env ./localbin/ostree-env
+echo '#!/bin/sh' >> ./localbin/ostree-env
+echo 'env "$@"' >> ./localbin/ostree-env
+chmod +x ./localbin/ostree-env
export A_CUSTOM_TEST_FLAG="myvalue"
${CMD_PREFIX} ostree env >out.txt
assert_file_has_content out.txt "^A_CUSTOM_TEST_FLAG=myvalue"
diff --git a/tests/test-mock-gio.c b/tests/test-mock-gio.c
index bf7f5fcb..719dc6cd 100644
--- a/tests/test-mock-gio.c
+++ b/tests/test-mock-gio.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2017 Endless Mobile, Inc.
+ * Copyright (C) 2022 Igalia S.L.
*
* SPDX-License-Identifier: LGPL-2.0+
*
@@ -136,7 +137,7 @@ ostree_mock_volume_monitor_new (GList *mounts,
monitor->mounts = g_list_copy_deep (mounts, (GCopyFunc) g_object_ref, NULL);
monitor->volumes = g_list_copy_deep (volumes, (GCopyFunc) g_object_ref, NULL);
- return g_steal_pointer (&monitor);
+ return (GVolumeMonitor *)g_steal_pointer (&monitor);
}
/* Mock volume class. This returns a static set of data to the caller, which it
diff --git a/tests/test-prune.sh b/tests/test-prune.sh
index 20904f31..bbb77a23 100755
--- a/tests/test-prune.sh
+++ b/tests/test-prune.sh
@@ -350,7 +350,7 @@ tap_ok --commit-only and --delete-commit
# Test --delete-commit when it creates orphaned commits
reinitialize_commit_only_test_repo
# get the current HEAD's parent on dev branch
-COMMIT_TO_DELETE=$(${CMD_PREFIX} ostree --repo=repo log dev | grep ^commit | cut -f 2 -d' ' | head -n 2 | tail -n 1)
+COMMIT_TO_DELETE=$(${CMD_PREFIX} ostree --repo=repo log dev | grep ^commit | cut -f 2 -d' ' | sed -ne '2p')
${CMD_PREFIX} ostree --repo=repo prune --commit-only --refs-only --delete-commit=$COMMIT_TO_DELETE
# we deleted a commit that orphaned another, so we lose two commits
assert_repo_has_n_commits repo 4