New upstream version 2017.9

This commit is contained in:
Simon McVittie 2017-07-28 08:57:43 +01:00
commit e5ac0cef85
134 changed files with 3986 additions and 5324 deletions

View File

@ -57,7 +57,6 @@ src/libostree/ostree-enumtypes.h: src/libostree/ostree-enumtypes.h.template $(EN
src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES)
$(AM_V_GEN) $(GLIB_MKENUMS) \
--template $< \
--fhead "#include \"ostree-enumtypes.h\"" \
$(ENUM_TYPES) > $@.tmp && mv $@.tmp $@
nodist_libostree_1_la_SOURCES = \
@ -187,7 +186,11 @@ symbol_files += $(top_srcdir)/src/libostree/libostree-experimental.sym
endif
# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
wl_versionscript_arg = -Wl,--version-script=
EXTRA_DIST += $(symbol_files)
EXTRA_DIST += \
$(top_srcdir)/src/libostree/libostree-devel.sym \
$(top_srcdir)/src/libostree/libostree-experimental.sym \
$(top_srcdir)/src/libostree/libostree-released.sym \
$(NULL)
libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree \
$(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_OPENSSL_CFLAGS) \

View File

@ -46,7 +46,7 @@ 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) $(man5_MANS) $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
EXTRA_DIST += $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl

View File

@ -67,7 +67,8 @@ _installed_or_uninstalled_test_scripts = \
tests/test-help.sh \
tests/test-libarchive.sh \
tests/test-parent.sh \
tests/test-pull-archive.sh \
tests/test-pull-bare.sh \
tests/test-pull-bareuser.sh \
tests/test-pull-commit-only.sh \
tests/test-pull-depth.sh \
tests/test-pull-mirror-summary.sh \
@ -113,8 +114,7 @@ _installed_or_uninstalled_test_scripts = \
tests/test-summary-view.sh \
$(NULL)
if ENABLE_EXPERIMENTAL_API
_installed_or_uninstalled_test_scripts += \
experimental_test_scripts = \
tests/test-find-remotes.sh \
tests/test-fsck-collections.sh \
tests/test-init-collections.sh \
@ -122,7 +122,13 @@ _installed_or_uninstalled_test_scripts += \
tests/test-refs-collections.sh \
tests/test-remote-add-collections.sh \
tests/test-summary-collections.sh \
tests/test-pull-collections.sh \
$(NULL)
if ENABLE_EXPERIMENTAL_API
_installed_or_uninstalled_test_scripts += $(experimental_test_scripts)
else
EXTRA_DIST += $(experimental_test_scripts)
endif
if BUILDOPT_FUSE
@ -185,7 +191,7 @@ js_installed_tests = \
$(NULL)
if BUILDOPT_GJS
dist_installed_test_scripts = $(js_installed_tests)
_installed_or_uninstalled_test_scripts += $(js_installed_tests)
else
EXTRA_DIST += $(js_installed_tests)
endif

View File

@ -343,7 +343,7 @@ libexec_PROGRAMS =
pkglibexec_PROGRAMS = $(am__EXEEXT_18)
noinst_PROGRAMS = $(am__EXEEXT_15) tests/test-rollsum-cli$(EXEEXT)
ostree_boot_PROGRAMS = $(am__EXEEXT_16) $(am__EXEEXT_17)
TESTS = $(am__EXEEXT_8) $(am__EXEEXT_22) \
TESTS = $(am__EXEEXT_8) $(am__EXEEXT_25) \
$(dist_uninstalled_test_scripts) $(am__EXEEXT_12)
installed_test_PROGRAMS = $(am__EXEEXT_14)
check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13)
@ -476,47 +476,39 @@ check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13)
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = $(systemdsystemgenerator_PROGRAMS)
@BUILDOPT_FUSE_TRUE@am__append_61 = rofiles-fuse
@BUILDOPT_ASAN_TRUE@am__append_62 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_63 = \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-find-remotes.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-fsck-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-init-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-prune-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-refs-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-remote-add-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-summary-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL)
@BUILDOPT_FUSE_TRUE@am__append_64 = tests/test-rofiles-fuse.sh
@BUILDOPT_FUSE_FALSE@am__append_65 = tests/test-rofiles-fuse.sh
@USE_LIBSOUP_TRUE@am__append_66 = tests/test-remote-cookies.sh
@BUILDOPT_GJS_TRUE@am__append_67 = $(js_tests)
@BUILDOPT_GJS_FALSE@am__append_68 = $(js_tests)
@BUILDOPT_GJS_FALSE@am__append_69 = $(js_installed_tests)
@ENABLE_INSTALLED_TESTS_FALSE@am__append_70 = -rpath $(abs_builddir)
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_71 = \
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_63 = $(experimental_test_scripts)
@ENABLE_EXPERIMENTAL_API_FALSE@am__append_64 = $(experimental_test_scripts)
@BUILDOPT_FUSE_TRUE@am__append_65 = tests/test-rofiles-fuse.sh
@BUILDOPT_FUSE_FALSE@am__append_66 = tests/test-rofiles-fuse.sh
@USE_LIBSOUP_TRUE@am__append_67 = tests/test-remote-cookies.sh
@BUILDOPT_GJS_TRUE@am__append_68 = $(js_tests) $(js_installed_tests)
@BUILDOPT_GJS_FALSE@am__append_69 = $(js_tests)
@BUILDOPT_GJS_FALSE@am__append_70 = $(js_installed_tests)
@ENABLE_INSTALLED_TESTS_FALSE@am__append_71 = -rpath $(abs_builddir)
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_72 = \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-bloom \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-repo-finder-config \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-repo-finder-mount \
@ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL)
@ENABLE_EXPERIMENTAL_API_TRUE@@USE_AVAHI_TRUE@am__append_72 = tests/test-repo-finder-avahi
@USE_LIBARCHIVE_TRUE@am__append_73 = tests/test-libarchive-import
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_74 = $(_installed_or_uninstalled_test_scripts)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_75 = $(_installed_or_uninstalled_test_programs)
@ENABLE_INSTALLED_TESTS_TRUE@am__append_76 = install-installed-tests-extra
@ENABLE_EXPERIMENTAL_API_TRUE@@USE_AVAHI_TRUE@am__append_73 = tests/test-repo-finder-avahi
@USE_LIBARCHIVE_TRUE@am__append_74 = tests/test-libarchive-import
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_75 = $(_installed_or_uninstalled_test_scripts)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_76 = $(_installed_or_uninstalled_test_programs)
@ENABLE_INSTALLED_TESTS_TRUE@am__append_77 = install-installed-tests-extra
# Allow the distcheck install under $prefix test to pass
@BUILDOPT_SYSTEMD_TRUE@am__append_77 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
@BUILDOPT_SYSTEMD_TRUE@am__append_78 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
# We're using the system grub2-mkconfig generator
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_78 = src/boot/grub2/grub2-15_ostree
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_79 = install-grub2-config-hook
@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_80 = ostree-trivial-httpd.1
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_79 = src/boot/grub2/grub2-15_ostree
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_80 = install-grub2-config-hook
@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_81 = ostree-trivial-httpd.1
# We still want to distribute the source, even if we are not building it
@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_81 = man/ostree-trivial-httpd.xml
@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_82 = rofiles-fuse.1
@ENABLE_MAN_TRUE@am__append_83 = $(man1_MANS) $(man5_MANS) $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
@ENABLE_MAN_TRUE@am__append_84 = \
@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_82 = man/ostree-trivial-httpd.xml
@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_83 = rofiles-fuse.1
@ENABLE_MAN_TRUE@am__append_84 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
@ENABLE_MAN_TRUE@am__append_85 = \
@ENABLE_MAN_TRUE@ $(man1_MANS) \
@ENABLE_MAN_TRUE@ $(man5_MANS) \
@ENABLE_MAN_TRUE@ $(NULL)
@ -1616,24 +1608,26 @@ am__set_TESTS_bases = \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_19 = \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-find-remotes.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-fsck-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-init-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-prune-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-refs-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-remote-add-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-summary-collections.sh \
@ENABLE_EXPERIMENTAL_API_TRUE@ $(am__EXEEXT_2)
am__EXEEXT_20 = tests/test-basic.sh tests/test-basic-user.sh \
am__EXEEXT_19 = tests/test-find-remotes.sh \
tests/test-fsck-collections.sh tests/test-init-collections.sh \
tests/test-prune-collections.sh tests/test-refs-collections.sh \
tests/test-remote-add-collections.sh \
tests/test-summary-collections.sh \
tests/test-pull-collections.sh $(am__EXEEXT_2)
@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_20 = $(am__EXEEXT_19)
am__EXEEXT_21 = tests/test-core.js tests/test-sizes.js \
tests/test-sysroot.js $(am__EXEEXT_2)
@BUILDOPT_GJS_TRUE@am__EXEEXT_22 = $(js_tests) $(am__EXEEXT_21)
am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \
tests/test-basic-user-only.sh tests/test-basic-root.sh \
tests/test-pull-subpath.sh tests/test-archivez.sh \
tests/test-remote-add.sh tests/test-remote-headers.sh \
tests/test-remote-gpg-import.sh tests/test-commit-sign.sh \
tests/test-export.sh tests/test-help.sh \
tests/test-libarchive.sh tests/test-parent.sh \
tests/test-pull-archive.sh tests/test-pull-commit-only.sh \
tests/test-pull-depth.sh tests/test-pull-mirror-summary.sh \
tests/test-pull-bare.sh tests/test-pull-bareuser.sh \
tests/test-pull-commit-only.sh tests/test-pull-depth.sh \
tests/test-pull-mirror-summary.sh \
tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \
tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \
tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \
@ -1660,11 +1654,11 @@ am__EXEEXT_20 = tests/test-basic.sh tests/test-basic-user.sh \
tests/test-refs.sh tests/test-demo-buildsystem.sh \
tests/test-switchroot.sh tests/test-pull-contenturl.sh \
tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \
tests/test-summary-view.sh $(am__EXEEXT_2) $(am__EXEEXT_19) \
$(am__append_64) $(am__append_66) $(am__append_67)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_21 = \
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_20)
am__EXEEXT_22 = $(am__EXEEXT_2) $(am__EXEEXT_21)
tests/test-summary-view.sh $(am__EXEEXT_2) $(am__EXEEXT_20) \
$(am__append_65) $(am__append_67) $(am__EXEEXT_22)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23)
am__EXEEXT_25 = $(am__EXEEXT_2) $(am__EXEEXT_24)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
@ -1953,7 +1947,7 @@ AM_CPPFLAGS = -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
-DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_48
AM_CFLAGS = -std=gnu99 $(WARN_CFLAGS)
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \
--disable-maintainer-mode $(NULL) $(am__append_77)
--disable-maintainer-mode $(NULL) $(am__append_78)
SUBDIRS = . $(am__append_14)
NULL =
BUILT_SOURCES = $(nodist_libostree_1_la_SOURCES)
@ -1965,32 +1959,36 @@ CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_46) \
tests/ostree-remount-symlink-stamp \
tests/rofiles-fuse-symlink-stamp tests/ostree \
tests/ostree-prepare-root tests/ostree-remount \
tests/rofiles-fuse $(am__append_84)
tests/rofiles-fuse $(am__append_85)
EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
COPYING README.md $(am__append_15) libglnx/README.md \
libglnx/COPYING libglnx/libglnx.m4 $(NULL) \
libglnx/Makefile-libglnx.am bsdiff/bsdiff.h bsdiff/bspatch.h \
bsdiff/LICENSE bsdiff/README.md bsdiff/Makefile-bsdiff.am \
$(am__append_17) $(symbol_files) src/libostree/README-gpg \
src/libostree/bupsplit.h \
$(am__append_17) \
$(top_srcdir)/src/libostree/libostree-devel.sym \
$(top_srcdir)/src/libostree/libostree-experimental.sym \
$(top_srcdir)/src/libostree/libostree-released.sym $(NULL) \
src/libostree/README-gpg src/libostree/bupsplit.h \
src/libostree/ostree-enumtypes.h.template \
src/libostree/ostree-enumtypes.c.template \
src/libostree/ostree-deployment-private.h \
src/libostree/ostree-repo-deprecated.h \
src/libostree/ostree-version.h src/ostree/parse-datetime.y \
buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \
tests/ostree.supp $(NULL) $(am__append_65) $(am__append_68) \
tests/libtest.sh $(am__append_69) tests/libostreetest.h \
tests/libtest.sh tests/gpg-verify-data/README.md $(NULL) \
tests/ostree.supp $(NULL) $(am__append_64) $(am__append_66) \
$(am__append_69) tests/libtest.sh $(am__append_70) \
tests/libostreetest.h tests/libtest.sh \
tests/gpg-verify-data/README.md $(NULL) \
src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \
src/boot/mkinitcpio/ostree \
src/boot/ostree-prepare-root.service \
src/boot/ostree-remount.service src/boot/grub2/grub2-15_ostree \
src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_81) \
$(am__append_83)
src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_82) \
$(am__append_84)
bin_SCRIPTS =
lib_LTLIBRARIES = libostree-1.la
pkglibexec_SCRIPTS = $(am__append_78)
pkglibexec_SCRIPTS = $(am__append_79)
noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \
libotutil.la libostree-kernel-args.la $(am__append_18) \
libostreetest.la
@ -2060,8 +2058,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_76) \
$(am__append_79)
INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_77) \
$(am__append_80)
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)
@ -2422,9 +2420,9 @@ 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_74)
test_programs = $(NULL) $(am__append_71) $(am__append_72) \
$(am__append_75)
dist_test_scripts = $(NULL) $(am__append_75)
test_programs = $(NULL) $(am__append_72) $(am__append_73) \
$(am__append_76)
_installed_or_uninstalled_test_scripts = tests/test-basic.sh \
tests/test-basic-user.sh tests/test-basic-user-only.sh \
tests/test-basic-root.sh tests/test-pull-subpath.sh \
@ -2432,9 +2430,9 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \
tests/test-remote-headers.sh tests/test-remote-gpg-import.sh \
tests/test-commit-sign.sh tests/test-export.sh \
tests/test-help.sh tests/test-libarchive.sh \
tests/test-parent.sh tests/test-pull-archive.sh \
tests/test-pull-commit-only.sh tests/test-pull-depth.sh \
tests/test-pull-mirror-summary.sh \
tests/test-parent.sh tests/test-pull-bare.sh \
tests/test-pull-bareuser.sh tests/test-pull-commit-only.sh \
tests/test-pull-depth.sh tests/test-pull-mirror-summary.sh \
tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \
tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \
tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \
@ -2462,7 +2460,18 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \
tests/test-switchroot.sh tests/test-pull-contenturl.sh \
tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \
tests/test-summary-view.sh $(NULL) $(am__append_63) \
$(am__append_64) $(am__append_66) $(am__append_67)
$(am__append_65) $(am__append_67) $(am__append_68)
experimental_test_scripts = \
tests/test-find-remotes.sh \
tests/test-fsck-collections.sh \
tests/test-init-collections.sh \
tests/test-prune-collections.sh \
tests/test-refs-collections.sh \
tests/test-remote-add-collections.sh \
tests/test-summary-collections.sh \
tests/test-pull-collections.sh \
$(NULL)
# These call into gjs scripts
js_tests = tests/test-corruption.sh tests/test-pull-corruption.sh
@ -2504,10 +2513,6 @@ js_installed_tests = \
tests/test-sysroot.js \
$(NULL)
@BUILDOPT_GJS_TRUE@dist_installed_test_scripts = $(js_installed_tests)
# See above comment on binding the tests to be either installed or not.
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts)
test_ltlibraries = libreaddir-rand.la
libreaddir_rand_la_SOURCES = tests/readdir-rand.c
libreaddir_rand_la_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS)
@ -2517,14 +2522,14 @@ libreaddir_rand_la_LIBADD = \
$(NULL)
libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \
$(am__append_70)
$(am__append_71)
_installed_or_uninstalled_test_programs = tests/test-varint \
tests/test-ot-unix-utils tests/test-bsdiff \
tests/test-mutable-tree tests/test-keyfile-utils \
tests/test-ot-opt-utils tests/test-ot-tool-util \
tests/test-gpg-verify-result tests/test-checksum \
tests/test-lzma tests/test-rollsum tests/test-basic-c \
tests/test-sysroot-c tests/test-pull-c $(am__append_73)
tests/test-sysroot-c tests/test-pull-c $(am__append_74)
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
@ -2588,6 +2593,9 @@ tests_test_gpg_verify_result_SOURCES = \
tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS)
tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
# See above comment on binding the tests to be either installed or not.
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts)
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@installed_test_programs = $(_installed_or_uninstalled_test_programs)
# Not using $(libdir) here is intentional, dracut modules go in prefix/lib
@ -2620,8 +2628,8 @@ tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
@ENABLE_MAN_TRUE@ ostree-pull.1 ostree-refs.1 ostree-remote.1 \
@ENABLE_MAN_TRUE@ ostree-reset.1 ostree-rev-parse.1 \
@ENABLE_MAN_TRUE@ ostree-show.1 ostree-summary.1 \
@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_80) \
@ENABLE_MAN_TRUE@ $(am__append_82)
@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_81) \
@ENABLE_MAN_TRUE@ $(am__append_83)
@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))
@ -7138,9 +7146,16 @@ tests/test-parent.sh.log: tests/test-parent.sh
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-pull-archive.sh.log: tests/test-pull-archive.sh
@p='tests/test-pull-archive.sh'; \
b='tests/test-pull-archive.sh'; \
tests/test-pull-bare.sh.log: tests/test-pull-bare.sh
@p='tests/test-pull-bare.sh'; \
b='tests/test-pull-bare.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-pull-bareuser.sh.log: tests/test-pull-bareuser.sh
@p='tests/test-pull-bareuser.sh'; \
b='tests/test-pull-bareuser.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@ -7495,6 +7510,13 @@ tests/test-summary-collections.sh.log: tests/test-summary-collections.sh
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-pull-collections.sh.log: tests/test-pull-collections.sh
@p='tests/test-pull-collections.sh'; \
b='tests/test-pull-collections.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-rofiles-fuse.sh.log: tests/test-rofiles-fuse.sh
@p='tests/test-rofiles-fuse.sh'; \
b='tests/test-rofiles-fuse.sh'; \
@ -7523,6 +7545,27 @@ tests/test-pull-corruption.sh.log: tests/test-pull-corruption.sh
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-core.js.log: tests/test-core.js
@p='tests/test-core.js'; \
b='tests/test-core.js'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-sizes.js.log: tests/test-sizes.js
@p='tests/test-sizes.js'; \
b='tests/test-sizes.js'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-sysroot.js.log: tests/test-sysroot.js
@p='tests/test-sysroot.js'; \
b='tests/test-sysroot.js'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/test-symbols.sh.log: tests/test-symbols.sh
@p='tests/test-symbols.sh'; \
b='tests/test-symbols.sh'; \
@ -8062,7 +8105,6 @@ src/libostree/ostree-enumtypes.h: src/libostree/ostree-enumtypes.h.template $(EN
src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES)
$(AM_V_GEN) $(GLIB_MKENUMS) \
--template $< \
--fhead "#include \"ostree-enumtypes.h\"" \
$(ENUM_TYPES) > $@.tmp && mv $@.tmp $@
@BUILDOPT_INTROSPECTION_TRUE@OSTree-1.0.gir: libostree-1.la Makefile

74
aclocal.m4 vendored
View File

@ -613,9 +613,9 @@ AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1)
dnl
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 11 (pkg-config-0.29.1)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
@ -889,6 +889,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OSTree API references: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="next" href="reference.html" title="API Reference">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">OSTree API references</p></th></tr></table></div>
<div><p class="releaseinfo">for OSTree 2017.8</p></div>
<div><p class="releaseinfo">for OSTree 2017.9</p></div>
</div>
<hr>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GPG signature verification results: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-Simple-upgrade-class.html" title="Simple upgrade class">
@ -41,7 +41,7 @@
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()">ostree_gpg_verify_result_count_all</a> <span class="c_punctuation">()</span>
@ -49,7 +49,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-valid" title="ostree_gpg_verify_result_count_valid ()">ostree_gpg_verify_result_count_valid</a> <span class="c_punctuation">()</span>
@ -57,7 +57,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-lookup" title="ostree_gpg_verify_result_lookup ()">ostree_gpg_verify_result_lookup</a> <span class="c_punctuation">()</span>
@ -65,7 +65,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<span class="returnvalue">GVariant</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get" title="ostree_gpg_verify_result_get ()">ostree_gpg_verify_result_get</a> <span class="c_punctuation">()</span>
@ -73,7 +73,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<span class="returnvalue">GVariant</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()">ostree_gpg_verify_result_get_all</a> <span class="c_punctuation">()</span>
@ -97,7 +97,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-require-valid-signature" title="ostree_gpg_verify_result_require_valid_signature ()">ostree_gpg_verify_result_require_valid_signature</a> <span class="c_punctuation">()</span>
@ -146,7 +146,7 @@ or get all signature details with <a class="link" href="ostree-GPG-signature-ver
<a name="ostree-GPG-signature-verification-results.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ostree-gpg-verify-result-count-all"></a><h3>ostree_gpg_verify_result_count_all ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<pre class="programlisting"><span class="returnvalue">guint</span>
ostree_gpg_verify_result_count_all (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>);</pre>
<p>Counts all the signatures in <em class="parameter"><code>result</code></em>
.</p>
@ -173,7 +173,7 @@ ostree_gpg_verify_result_count_all (<em class="parameter"><code><a class="link"
<hr>
<div class="refsect2">
<a name="ostree-gpg-verify-result-count-valid"></a><h3>ostree_gpg_verify_result_count_valid ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<pre class="programlisting"><span class="returnvalue">guint</span>
ostree_gpg_verify_result_count_valid (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>);</pre>
<p>Counts only the valid signatures in <em class="parameter"><code>result</code></em>
.</p>
@ -200,17 +200,17 @@ ostree_gpg_verify_result_count_valid (<em class="parameter"><code><a class="link
<hr>
<div class="refsect2">
<a name="ostree-gpg-verify-result-lookup"></a><h3>ostree_gpg_verify_result_lookup ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_gpg_verify_result_lookup (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key_id</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *out_signature_index</code></em>);</pre>
<em class="parameter"><code>const <span class="type">gchar</span> *key_id</code></em>,
<em class="parameter"><code><span class="type">guint</span> *out_signature_index</code></em>);</pre>
<p>Searches <em class="parameter"><code>result</code></em>
for a signature signed by <em class="parameter"><code>key_id</code></em>
. If a match is found,
the function returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and sets <em class="parameter"><code>out_signature_index</code></em>
the function returns <code class="literal">TRUE</code> and sets <em class="parameter"><code>out_signature_index</code></em>
so that further
signature details can be obtained through <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get" title="ostree_gpg_verify_result_get ()"><code class="function">ostree_gpg_verify_result_get()</code></a>.
If no match is found, the function returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and leaves
If no match is found, the function returns <code class="literal">FALSE</code> and leaves
<em class="parameter"><code>out_signature_index</code></em>
unchanged.</p>
<div class="refsect3">
@ -236,7 +236,7 @@ If no match is found, the function returns <a href="https://developer.gnome.org/
<td class="parameter_name"><p>out_signature_index</p></td>
<td class="parameter_description"><p> return location for the index of the signature
signed by <em class="parameter"><code>key_id</code></em>
, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
</tr>
</tbody>
@ -244,22 +244,22 @@ signed by <em class="parameter"><code>key_id</code></em>
</div>
<div class="refsect3">
<a name="ostree-gpg-verify-result-lookup.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure</p>
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-gpg-verify-result-get"></a><h3>ostree_gpg_verify_result_get ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
ostree_gpg_verify_result_get (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signature_index</code></em>,
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>,
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> *attrs</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_attrs</code></em>);</pre>
<p>Builds a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple of requested attributes for the GPG signature at
<em class="parameter"><code><span class="type">guint</span> n_attrs</code></em>);</pre>
<p>Builds a <span class="type">GVariant</span> tuple of requested attributes for the GPG signature at
<em class="parameter"><code>signature_index</code></em>
in <em class="parameter"><code>result</code></em>
. See the <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> description
for the <a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of each available attribute.</p>
for the <span class="type">GVariantType</span> of each available attribute.</p>
<p>It is a programmer error to request an invalid <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> or
an invalid <em class="parameter"><code>signature_index</code></em>
. Use <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()"><code class="function">ostree_gpg_verify_result_count_all()</code></a> to
@ -300,29 +300,29 @@ array</p></td>
</div>
<div class="refsect3">
<a name="ostree-gpg-verify-result-get.returns"></a><h4>Returns</h4>
<p> a new, floating, <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple</p>
<p> a new, floating, <span class="type">GVariant</span> tuple</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-gpg-verify-result-get-all"></a><h3>ostree_gpg_verify_result_get_all ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
ostree_gpg_verify_result_get_all (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signature_index</code></em>);</pre>
<p>Builds a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple of all available attributes for the GPG signature
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>);</pre>
<p>Builds a <span class="type">GVariant</span> tuple of all available attributes for the GPG signature
at <em class="parameter"><code>signature_index</code></em>
in <em class="parameter"><code>result</code></em>
.</p>
<p>The child values in the returned <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple are ordered to match the
<p>The child values in the returned <span class="type">GVariant</span> tuple are ordered to match the
<a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> enumeration, which means the enum values can be
used as index values in functions like <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-get-child"><code class="function">g_variant_get_child()</code></a>. See the
<a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> description for the <a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of each
used as index values in functions like <code class="function">g_variant_get_child()</code>. See the
<a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> description for the <span class="type">GVariantType</span> of each
available attribute.</p>
<div class="note"><p>
The <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> enumeration may be extended in the future
with new attributes, which would affect the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple returned by
with new attributes, which would affect the <span class="type">GVariant</span> tuple returned by
this function. While the position and type of current child values in
the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple will not change, to avoid backward-compatibility
the <span class="type">GVariant</span> tuple will not change, to avoid backward-compatibility
issues <span class="emphasis"><em>please do not depend on the tuple's overall size or
type signature</em></span>.
</p></div>
@ -355,7 +355,7 @@ available attribute.</p>
</div>
<div class="refsect3">
<a name="ostree-gpg-verify-result-get-all.returns"></a><h4>Returns</h4>
<p> a new, floating, <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple</p>
<p> a new, floating, <span class="type">GVariant</span> tuple</p>
</div>
</div>
<hr>
@ -363,9 +363,9 @@ available attribute.</p>
<a name="ostree-gpg-verify-result-describe"></a><h3>ostree_gpg_verify_result_describe ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_gpg_verify_result_describe (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signature_index</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> *output_buffer</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *line_prefix</code></em>,
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>,
<em class="parameter"><code><span class="type">GString</span> *output_buffer</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *line_prefix</code></em>,
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureFormatFlags" title="enum OstreeGpgSignatureFormatFlags"><span class="type">OstreeGpgSignatureFormatFlags</span></a> flags</code></em>);</pre>
<p>Appends a brief, human-readable description of the GPG signature at
<em class="parameter"><code>signature_index</code></em>
@ -404,7 +404,7 @@ format. Currently must be 0.</p>
</tr>
<tr>
<td class="parameter_name"><p>output_buffer</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> to hold the description</p></td>
<td class="parameter_description"><p>a <span class="type">GString</span> to hold the description</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -426,11 +426,11 @@ format. Currently must be 0.</p>
<a name="ostree-gpg-verify-result-describe-variant"></a><h3>ostree_gpg_verify_result_describe_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_gpg_verify_result_describe_variant
(<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *variant</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> *output_buffer</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *line_prefix</code></em>,
(<em class="parameter"><code><span class="type">GVariant</span> *variant</code></em>,
<em class="parameter"><code><span class="type">GString</span> *output_buffer</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *line_prefix</code></em>,
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureFormatFlags" title="enum OstreeGpgSignatureFormatFlags"><span class="type">OstreeGpgSignatureFormatFlags</span></a> flags</code></em>);</pre>
<p>Similar to <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe" title="ostree_gpg_verify_result_describe ()"><code class="function">ostree_gpg_verify_result_describe()</code></a> but takes a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of
<p>Similar to <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe" title="ostree_gpg_verify_result_describe ()"><code class="function">ostree_gpg_verify_result_describe()</code></a> but takes a <span class="type">GVariant</span> of
all attributes for a GPG signature instead of an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>
and signature index.</p>
<p>The <em class="parameter"><code>variant</code></em>
@ -447,12 +447,12 @@ and signature index.</p>
<tbody>
<tr>
<td class="parameter_name"><p>variant</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> from <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()"><code class="function">ostree_gpg_verify_result_get_all()</code></a></p></td>
<td class="parameter_description"><p>a <span class="type">GVariant</span> from <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()"><code class="function">ostree_gpg_verify_result_get_all()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>output_buffer</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> to hold the description</p></td>
<td class="parameter_description"><p>a <span class="type">GString</span> to hold the description</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -472,14 +472,14 @@ and signature index.</p>
<hr>
<div class="refsect2">
<a name="ostree-gpg-verify-result-require-valid-signature"></a><h3>ostree_gpg_verify_result_require_valid_signature ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_gpg_verify_result_require_valid_signature
(<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Checks if the result contains at least one signature from the
trusted keyring. You can call this function immediately after
<a class="link" href="ostree-Content-addressed-object-store.html#ostree-repo-verify-summary" title="ostree_repo_verify_summary ()"><code class="function">ostree_repo_verify_summary()</code></a> or <a class="link" href="ostree-Content-addressed-object-store.html#ostree-repo-verify-commit-ext" title="ostree_repo_verify_commit_ext ()"><code class="function">ostree_repo_verify_commit_ext()</code></a> -
it will handle the <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>result</code></em>
it will handle the <code class="literal">NULL</code> <em class="parameter"><code>result</code></em>
and filled <em class="parameter"><code>error</code></em>
too.</p>
<div class="refsect3">
@ -498,7 +498,7 @@ it will handle the <a href="https://developer.gnome.org/glib/unstable/glib-Stand
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
<td class="parameter_description"><p>A <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -506,9 +506,9 @@ it will handle the <a href="https://developer.gnome.org/glib/unstable/glib-Stand
</div>
<div class="refsect3">
<a name="ostree-gpg-verify-result-require-valid-signature.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>result</code></em>
was not <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and had at least one
signature from trusted keyring, otherwise <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>result</code></em>
was not <code class="literal">NULL</code> and had at least one
signature from trusted keyring, otherwise <code class="literal">FALSE</code></p>
</div>
</div>
</div>
@ -524,7 +524,7 @@ signature from trusted keyring, otherwise <a href="https://developer.gnome.org/g
<div class="refsect2">
<a name="OstreeGpgSignatureAttr"></a><h3>enum OstreeGpgSignatureAttr</h3>
<p>Signature attributes available from an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>.
The attribute's <a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> is shown in brackets.</p>
The attribute's <span class="type">GVariantType</span> is shown in brackets.</p>
<div class="refsect3">
<a name="OstreeGpgSignatureAttr.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -537,56 +537,56 @@ The attribute's <a href="https://developer.gnome.org/glib/unstable/glib-GVariant
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-VALID:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_VALID</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS"><span class="type">G_VARIANT_TYPE_BOOLEAN</span></a>] Is the signature valid?</p>
<p> [<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Is the signature valid?</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-SIG-EXPIRED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS"><span class="type">G_VARIANT_TYPE_BOOLEAN</span></a>] Has the signature expired?</p>
<p> [<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signature expired?</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXPIRED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS"><span class="type">G_VARIANT_TYPE_BOOLEAN</span></a>] Has the signing key expired?</p>
<p> [<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signing key expired?</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-REVOKED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS"><span class="type">G_VARIANT_TYPE_BOOLEAN</span></a>] Has the signing key been revoked?</p>
<p> [<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signing key been revoked?</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-MISSING:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS"><span class="type">G_VARIANT_TYPE_BOOLEAN</span></a>] Is the signing key missing?</p>
<p> [<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Is the signing key missing?</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-FINGERPRINT:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a>] Fingerprint of the signing key</p>
<p> [<span class="type">G_VARIANT_TYPE_STRING</span>] Fingerprint of the signing key</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-INT64:CAPS"><span class="type">G_VARIANT_TYPE_INT64</span></a>] Signature creation Unix timestamp</p>
<p> [<span class="type">G_VARIANT_TYPE_INT64</span>] Signature creation Unix timestamp</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-EXP-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-INT64:CAPS"><span class="type">G_VARIANT_TYPE_INT64</span></a>] Signature expiration Unix timestamp (0 if no
<p> [<span class="type">G_VARIANT_TYPE_INT64</span>] Signature expiration Unix timestamp (0 if no
expiration)</p>
</td>
<td class="enum_member_annotations"> </td>
@ -594,7 +594,7 @@ The attribute's <a href="https://developer.gnome.org/glib/unstable/glib-GVariant
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-PUBKEY-ALGO-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a>] Name of the public key algorithm used to create
<p> [<span class="type">G_VARIANT_TYPE_STRING</span>] Name of the public key algorithm used to create
the signature</p>
</td>
<td class="enum_member_annotations"> </td>
@ -602,7 +602,7 @@ The attribute's <a href="https://developer.gnome.org/glib/unstable/glib-GVariant
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-HASH-ALGO-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a>] Name of the hash algorithm used to create the
<p> [<span class="type">G_VARIANT_TYPE_STRING</span>] Name of the hash algorithm used to create the
signature</p>
</td>
<td class="enum_member_annotations"> </td>
@ -610,14 +610,14 @@ The attribute's <a href="https://developer.gnome.org/glib/unstable/glib-GVariant
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-USER-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_USER_NAME</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a>] The name of the signing key's primary user</p>
<p> [<span class="type">G_VARIANT_TYPE_STRING</span>] The name of the signing key's primary user</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-USER-EMAIL:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL</p></td>
<td class="enum_member_description">
<p> [<a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a>] The email address of the signing key's primary
<p> [<span class="type">G_VARIANT_TYPE_STRING</span>] The email address of the signing key's primary
user</p>
</td>
<td class="enum_member_annotations"> </td>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>In-memory modifiable filesystem tree: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-Content-addressed-object-store.html" title="Content-addressed object store">
@ -79,7 +79,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-replace-file" title="ostree_mutable_tree_replace_file ()">ostree_mutable_tree_replace_file</a> <span class="c_punctuation">()</span>
@ -87,7 +87,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-dir" title="ostree_mutable_tree_ensure_dir ()">ostree_mutable_tree_ensure_dir</a> <span class="c_punctuation">()</span>
@ -95,7 +95,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-lookup" title="ostree_mutable_tree_lookup ()">ostree_mutable_tree_lookup</a> <span class="c_punctuation">()</span>
@ -103,7 +103,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-parent-dirs" title="ostree_mutable_tree_ensure_parent_dirs ()">ostree_mutable_tree_ensure_parent_dirs</a> <span class="c_punctuation">()</span>
@ -111,7 +111,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-walk" title="ostree_mutable_tree_walk ()">ostree_mutable_tree_walk</a> <span class="c_punctuation">()</span>
@ -119,7 +119,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
<span class="returnvalue">GHashTable</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-subdirs" title="ostree_mutable_tree_get_subdirs ()">ostree_mutable_tree_get_subdirs</a> <span class="c_punctuation">()</span>
@ -127,7 +127,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
<span class="returnvalue">GHashTable</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-files" title="ostree_mutable_tree_get_files ()">ostree_mutable_tree_get_files</a> <span class="c_punctuation">()</span>
@ -202,41 +202,41 @@ ostree_mutable_tree_get_contents_checksum
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-replace-file"></a><h3>ostree_mutable_tree_replace_file ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_replace_file (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-ensure-dir"></a><h3>ostree_mutable_tree_ensure_dir ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_ensure_dir (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-lookup"></a><h3>ostree_mutable_tree_lookup ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_lookup (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code><span class="type">char</span> **out_file_checksum</code></em>,
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-ensure-parent-dirs"></a><h3>ostree_mutable_tree_ensure_parent_dirs ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_ensure_parent_dirs
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *split_path</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>,
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_parent</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Create all parent trees necessary for the given <em class="parameter"><code>split_path</code></em>
to
exist.</p>
@ -271,7 +271,7 @@ exist.</p>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -281,12 +281,12 @@ exist.</p>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-walk"></a><h3>ostree_mutable_tree_walk ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_walk (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *split_path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> start</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
<em class="parameter"><code><span class="type">guint</span> start</code></em>,
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Traverse <em class="parameter"><code>start</code></em>
number of elements starting from <em class="parameter"><code>split_path</code></em>
; the
@ -334,7 +334,7 @@ child will be returned in <em class="parameter"><code>out_subdir</code></em>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-subdirs"></a><h3>ostree_mutable_tree_get_subdirs ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
ostree_mutable_tree_get_subdirs (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-mutable-tree-get-subdirs.returns"></a><h4>Returns</h4>
@ -345,7 +345,7 @@ ostree_mutable_tree_get_subdirs (<em class="parameter"><code><a class="link" hre
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-files"></a><h3>ostree_mutable_tree_get_files ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
ostree_mutable_tree_get_files (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-mutable-tree-get-files.returns"></a><h4>Returns</h4>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Progress notification system for asynchronous operations: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-Root-partition-mount-point.html" title="Root partition mount point">
@ -73,7 +73,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<span class="returnvalue">GVariant</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-variant" title="ostree_async_progress_get_variant ()">ostree_async_progress_get_variant</a> <span class="c_punctuation">()</span>
@ -81,7 +81,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-uint" title="ostree_async_progress_get_uint ()">ostree_async_progress_get_uint</a> <span class="c_punctuation">()</span>
@ -89,7 +89,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>
<span class="returnvalue">guint64</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-uint64" title="ostree_async_progress_get_uint64 ()">ostree_async_progress_get_uint64</a> <span class="c_punctuation">()</span>
@ -171,7 +171,7 @@ handles thread safety, ensuring that the progress change
notification occurs in the thread-default context of the calling
operation.</p>
<p>The <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-status" title="ostree_async_progress_get_status ()"><code class="function">ostree_async_progress_get_status()</code></a> and <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-status" title="ostree_async_progress_set_status ()"><code class="function">ostree_async_progress_set_status()</code></a>
methods get and set a well-known <code class="literal">status</code> key of type <a href="https://developer.gnome.org/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><code class="literal">G_VARIANT_TYPE_STRING</code></a>.
methods get and set a well-known <code class="literal">status</code> key of type <code class="literal">G_VARIANT_TYPE_STRING</code>.
This key may be accessed using the other <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> methods, but it
must always have the correct type.</p>
</div>
@ -192,7 +192,7 @@ ostree_async_progress_new (<em class="parameter"><code><span class="type">void</
<a name="ostree-async-progress-new-and-connect"></a><h3>ostree_async_progress_new_and_connect ()</h3>
<pre class="programlisting"><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="returnvalue">OstreeAsyncProgress</span></a> *
ostree_async_progress_new_and_connect (<em class="parameter"><code><span class="type">void</span> (*changed) (OstreeAsyncProgress *self, gpointer user_data)</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
@ -200,7 +200,7 @@ ostree_async_progress_new_and_connect (<em class="parameter"><code><span class="
<pre class="programlisting"><span class="returnvalue">char</span> *
ostree_async_progress_get_status (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>);</pre>
<p>Get the human-readable status string from the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. This
operation is thread-safe. The retuned value may be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no status is
operation is thread-safe. The retuned value may be <code class="literal">NULL</code> if no status is
set.</p>
<p>This is a convenience function to get the well-known <code class="literal">status</code> key.</p>
<div class="refsect3">
@ -220,7 +220,7 @@ set.</p>
</div>
<div class="refsect3">
<a name="ostree-async-progress-get-status.returns"></a><h4>Returns</h4>
<p> the current status, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is set. </p>
<p> the current status, or <code class="literal">NULL</code> if none is set. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
</div>
<p class="since">Since: 2017.6</p>
@ -233,9 +233,9 @@ ostree_async_progress_get (<em class="parameter"><code><a class="link" href="ost
<em class="parameter"><code>...</code></em>);</pre>
<p>Get the values corresponding to zero or more keys from the
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. Each key is specified in @... as the key name, followed
by a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> format string, followed by the necessary arguments for that
format string, just as for <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-get"><code class="function">g_variant_get()</code></a>. After those arguments is the
next key name. The varargs list must be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated.</p>
by a <span class="type">GVariant</span> format string, followed by the necessary arguments for that
format string, just as for <code class="function">g_variant_get()</code>. After those arguments is the
next key name. The varargs list must be <code class="literal">NULL</code>-terminated.</p>
<p>Each format string must make deep copies of its value, as the values stored
in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> may be freed from another thread after this
function returns.</p>
@ -257,15 +257,15 @@ function returns.</p>
11</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">guint32</span><span class="normal"> outstanding_fetches</span><span class="symbol">;</span>
<span class="usertype">guint64</span><span class="normal"> bytes_received</span><span class="symbol">;</span>
<span class="usertype">g_autofree</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">status </span><span class="symbol">=</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
<span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-Miscellaneous-Macros.html#g-autoptr">g_autoptr</a></span><span class="symbol">(</span><span class="normal"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant">GVariant</a></span><span class="symbol">)</span><span class="normal"> refs_variant </span><span class="symbol">=</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
<span class="usertype">g_autofree</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">status </span><span class="symbol">=</span><span class="normal"> NULL</span><span class="symbol">;</span>
<span class="function">g_autoptr</span><span class="symbol">(</span><span class="normal">GVariant</span><span class="symbol">)</span><span class="normal"> refs_variant </span><span class="symbol">=</span><span class="normal"> NULL</span><span class="symbol">;</span>
<span class="function"><a href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get">ostree_async_progress_get</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">progress</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"outstanding-fetches"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"u"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">outstanding_fetches</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"bytes-received"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"t"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">bytes_received</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"status"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"s"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">status</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"refs"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"@a{ss}"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">refs_variant</span><span class="symbol">,</span>
<span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
<span class="normal"> NULL</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
@ -288,7 +288,7 @@ function returns.</p>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>key name, format string, <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> return locations, …, followed by <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_description"><p>key name, format string, <span class="type">GVariant</span> return locations, …, followed by <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -299,10 +299,10 @@ function returns.</p>
<hr>
<div class="refsect2">
<a name="ostree-async-progress-get-variant"></a><h3>ostree_async_progress_get_variant ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
ostree_async_progress_get_variant (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
<p>Look up a key in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> and return the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> associated
<p>Look up a key in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> and return the <span class="type">GVariant</span> associated
with it. The lookup is thread-safe.</p>
<div class="refsect3">
<a name="ostree-async-progress-get-variant.parameters"></a><h4>Parameters</h4>
@ -329,7 +329,7 @@ with it. The lookup is thread-safe.</p>
<div class="refsect3">
<a name="ostree-async-progress-get-variant.returns"></a><h4>Returns</h4>
<p> value for the given <em class="parameter"><code>key</code></em>
, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
, or <code class="literal">NULL</code> if
it was not set. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
</div>
@ -338,14 +338,14 @@ it was not set. </p>
<hr>
<div class="refsect2">
<a name="ostree-async-progress-get-uint"></a><h3>ostree_async_progress_get_uint ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<pre class="programlisting"><span class="returnvalue">guint</span>
ostree_async_progress_get_uint (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-async-progress-get-uint64"></a><h3>ostree_async_progress_get_uint64 ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>
<pre class="programlisting"><span class="returnvalue">guint64</span>
ostree_async_progress_get_uint64 (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
</div>
@ -356,7 +356,7 @@ ostree_async_progress_get_uint64 (<em class="parameter"><code><a class="link" hr
ostree_async_progress_set_status (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *status</code></em>);</pre>
<p>Set the human-readable status string for the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. This
operation is thread-safe. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> may be passed to clear the status.</p>
operation is thread-safe. <code class="literal">NULL</code> may be passed to clear the status.</p>
<p>This is a convenience function to set the well-known <code class="literal">status</code> key.</p>
<div class="refsect3">
<a name="ostree-async-progress-set-status.parameters"></a><h4>Parameters</h4>
@ -374,7 +374,7 @@ operation is thread-safe. <a href="https://developer.gnome.org/glib/unstable/gli
</tr>
<tr>
<td class="parameter_name"><p>status</p></td>
<td class="parameter_description"><p> new status string, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to clear the status. </p></td>
<td class="parameter_description"><p> new status string, or <code class="literal">NULL</code> to clear the status. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
</tr>
</tbody>
@ -389,11 +389,11 @@ operation is thread-safe. <a href="https://developer.gnome.org/glib/unstable/gli
ostree_async_progress_set (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Set the values for zero or more keys in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. Each key is
specified in @... as the key name, followed by a <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> format string,
specified in @... as the key name, followed by a <span class="type">GVariant</span> format string,
followed by the necessary arguments for that format string, just as for
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a>. After those arguments is the next key name. The varargs list
must be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated.</p>
<p>g_variant_ref_sink() will be called as appropriate on the <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
<code class="function">g_variant_new()</code>. After those arguments is the next key name. The varargs list
must be <code class="literal">NULL</code>-terminated.</p>
<p>g_variant_ref_sink() will be called as appropriate on the <span class="type">GVariant</span>
parameters, so they may be floating.</p>
<p>This operation is thread-safe, and all the keys are set atomically.</p>
<div class="informalexample">
@ -416,8 +416,8 @@ parameters, so they may be floating.</p>
<span class="normal"> </span><span class="string">"outstanding-fetches"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"u"</span><span class="symbol">,</span><span class="normal"> outstanding_fetches</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"bytes-received"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"t"</span><span class="symbol">,</span><span class="normal"> bytes_received</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"status"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"s"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Updated status"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"refs"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"@a{ss}"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-new-parsed">g_variant_new_parsed</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"@a{ss} {}"</span><span class="symbol">),</span>
<span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
<span class="normal"> </span><span class="string">"refs"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"@a{ss}"</span><span class="symbol">,</span><span class="normal"> </span><span class="function">g_variant_new_parsed</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"@a{ss} {}"</span><span class="symbol">),</span>
<span class="normal"> NULL</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
@ -440,7 +440,7 @@ parameters, so they may be floating.</p>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>key name, format string, <a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> parameters, …, followed by <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_description"><p>key name, format string, <span class="type">GVariant</span> parameters, …, followed by <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -454,13 +454,13 @@ parameters, so they may be floating.</p>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_async_progress_set_variant (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre>
<p>Assign a new <em class="parameter"><code>value</code></em>
to the given <em class="parameter"><code>key</code></em>
, replacing any existing value. The
operation is thread-safe. <em class="parameter"><code>value</code></em>
may be a floating reference;
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#g-variant-ref-sink"><code class="function">g_variant_ref_sink()</code></a> will be called on it.</p>
<code class="function">g_variant_ref_sink()</code> will be called on it.</p>
<p>Any watchers of the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> will be notified of the change if
<em class="parameter"><code>value</code></em>
differs from the existing value for <em class="parameter"><code>key</code></em>
@ -501,7 +501,7 @@ operation is thread-safe. <em class="parameter"><code>value</code></em>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_async_progress_set_uint (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> value</code></em>);</pre>
<em class="parameter"><code><span class="type">guint</span> value</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
@ -509,7 +509,7 @@ ostree_async_progress_set_uint (<em class="parameter"><code><a class="link" href
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_async_progress_set_uint64 (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value</code></em>);</pre>
<em class="parameter"><code><span class="type">guint64</span> value</code></em>);</pre>
</div>
<hr>
<div class="refsect2">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Root partition mount point: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-In-memory-modifiable-filesystem-tree.html" title="In-memory modifiable filesystem tree">
@ -57,7 +57,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-path" title="ostree_sysroot_get_path ()">ostree_sysroot_get_path</a> <span class="c_punctuation">()</span>
@ -65,7 +65,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-load" title="ostree_sysroot_load ()">ostree_sysroot_load</a> <span class="c_punctuation">()</span>
@ -73,7 +73,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-load-if-changed" title="ostree_sysroot_load_if_changed ()">ostree_sysroot_load_if_changed</a> <span class="c_punctuation">()</span>
@ -81,7 +81,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-lock" title="ostree_sysroot_lock ()">ostree_sysroot_lock</a> <span class="c_punctuation">()</span>
@ -89,7 +89,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-try-lock" title="ostree_sysroot_try_lock ()">ostree_sysroot_try_lock</a> <span class="c_punctuation">()</span>
@ -105,7 +105,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-lock-finish" title="ostree_sysroot_lock_finish ()">ostree_sysroot_lock_finish</a> <span class="c_punctuation">()</span>
@ -137,7 +137,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-ensure-initialized" title="ostree_sysroot_ensure_initialized ()">ostree_sysroot_ensure_initialized</a> <span class="c_punctuation">()</span>
@ -161,7 +161,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
<span class="returnvalue">GPtrArray</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-deployments" title="ostree_sysroot_get_deployments ()">ostree_sysroot_get_deployments</a> <span class="c_punctuation">()</span>
@ -177,7 +177,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-deployment-directory" title="ostree_sysroot_get_deployment_directory ()">ostree_sysroot_get_deployment_directory</a> <span class="c_punctuation">()</span>
@ -193,7 +193,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-deployment-origin-path" title="ostree_sysroot_get_deployment_origin_path ()">ostree_sysroot_get_deployment_origin_path</a> <span class="c_punctuation">()</span>
@ -201,7 +201,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-cleanup" title="ostree_sysroot_cleanup ()">ostree_sysroot_cleanup</a> <span class="c_punctuation">()</span>
@ -209,7 +209,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-prepare-cleanup" title="ostree_sysroot_prepare_cleanup ()">ostree_sysroot_prepare_cleanup</a> <span class="c_punctuation">()</span>
@ -225,7 +225,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-repo" title="ostree_sysroot_get_repo ()">ostree_sysroot_get_repo</a> <span class="c_punctuation">()</span>
@ -233,7 +233,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-init-osname" title="ostree_sysroot_init_osname ()">ostree_sysroot_init_osname</a> <span class="c_punctuation">()</span>
@ -241,7 +241,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-kargs" title="ostree_sysroot_deployment_set_kargs ()">ostree_sysroot_deployment_set_kargs</a> <span class="c_punctuation">()</span>
@ -249,7 +249,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-mutable" title="ostree_sysroot_deployment_set_mutable ()">ostree_sysroot_deployment_set_mutable</a> <span class="c_punctuation">()</span>
@ -257,7 +257,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-unlock" title="ostree_sysroot_deployment_unlock ()">ostree_sysroot_deployment_unlock</a> <span class="c_punctuation">()</span>
@ -265,7 +265,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments" title="ostree_sysroot_write_deployments ()">ostree_sysroot_write_deployments</a> <span class="c_punctuation">()</span>
@ -273,7 +273,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments-with-options" title="ostree_sysroot_write_deployments_with_options ()">ostree_sysroot_write_deployments_with_options</a> <span class="c_punctuation">()</span>
@ -281,7 +281,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-write-origin-file" title="ostree_sysroot_write_origin_file ()">ostree_sysroot_write_origin_file</a> <span class="c_punctuation">()</span>
@ -289,7 +289,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deploy-tree" title="ostree_sysroot_deploy_tree ()">ostree_sysroot_deploy_tree</a> <span class="c_punctuation">()</span>
@ -313,7 +313,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<span class="returnvalue">GKeyFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-origin-new-from-refspec" title="ostree_sysroot_origin_new_from_refspec ()">ostree_sysroot_origin_new_from_refspec</a> <span class="c_punctuation">()</span>
@ -321,7 +321,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-simple-write-deployment" title="ostree_sysroot_simple_write_deployment ()">ostree_sysroot_simple_write_deployment</a> <span class="c_punctuation">()</span>
@ -364,7 +364,7 @@ perform locking externally.</p>
<div class="refsect2">
<a name="ostree-sysroot-new"></a><h3>ostree_sysroot_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="returnvalue">OstreeSysroot</span></a> *
ostree_sysroot_new (<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *path</code></em>);</pre>
ostree_sysroot_new (<em class="parameter"><code><span class="type">GFile</span> *path</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -375,7 +375,7 @@ ostree_sysroot_new (<em class="parameter"><code><a href="https://developer.gnome
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p> Path to a system root directory, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_description"><p> Path to a system root directory, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
</tr></tbody>
</table></div>
@ -401,7 +401,7 @@ ostree_sysroot_new_default (<em class="parameter"><code><span class="type">void<
<hr>
<div class="refsect2">
<a name="ostree-sysroot-get-path"></a><h3>ostree_sysroot_get_path ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GFile</span> *
ostree_sysroot_get_path (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-get-path.returns"></a><h4>Returns</h4>
@ -412,10 +412,10 @@ ostree_sysroot_get_path (<em class="parameter"><code><a class="link" href="ostre
<hr>
<div class="refsect2">
<a name="ostree-sysroot-load"></a><h3>ostree_sysroot_load ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_load (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Load deployment list, bootversion, and subbootversion from the
rootfs <em class="parameter"><code>self</code></em>
.</p>
@ -450,18 +450,18 @@ rootfs <em class="parameter"><code>self</code></em>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-load-if-changed"></a><h3>ostree_sysroot_load_if_changed ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_load_if_changed (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_changed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-lock"></a><h3>ostree_sysroot_lock ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_lock (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Acquire an exclusive multi-process write lock for <em class="parameter"><code>self</code></em>
. This call
blocks until the lock has been acquired. The lock is not
@ -495,15 +495,15 @@ be released if <em class="parameter"><code>self</code></em>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-try-lock"></a><h3>ostree_sysroot_try_lock ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_try_lock (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_acquired</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> *out_acquired</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Try to acquire an exclusive multi-process write lock for <em class="parameter"><code>self</code></em>
. If
another process holds the lock, this function will return
immediately, setting <em class="parameter"><code>out_acquired</code></em>
to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, and returning <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
to <code class="literal">FALSE</code>, and returning <code class="literal">TRUE</code>
(and no error).</p>
<p>Release the lock with <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-unlock" title="ostree_sysroot_unlock ()"><code class="function">ostree_sysroot_unlock()</code></a>. The lock will also
be released if <em class="parameter"><code>self</code></em>
@ -541,9 +541,9 @@ be released if <em class="parameter"><code>self</code></em>
<a name="ostree-sysroot-lock-async"></a><h3>ostree_sysroot_lock_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_sysroot_lock_async (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GAsyncReadyCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>An asynchronous version of <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-lock" title="ostree_sysroot_lock ()"><code class="function">ostree_sysroot_lock()</code></a>.</p>
<div class="refsect3">
<a name="ostree-sysroot-lock-async.parameters"></a><h4>Parameters</h4>
@ -581,10 +581,10 @@ ostree_sysroot_lock_async (<em class="parameter"><code><a class="link" href="ost
<hr>
<div class="refsect2">
<a name="ostree-sysroot-lock-finish"></a><h3>ostree_sysroot_lock_finish ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_lock_finish (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GAsyncResult</span> *result</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Call when <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-lock-async" title="ostree_sysroot_lock_async ()"><code class="function">ostree_sysroot_lock_async()</code></a> is ready.</p>
<div class="refsect3">
<a name="ostree-sysroot-lock-finish.parameters"></a><h4>Parameters</h4>
@ -696,10 +696,10 @@ calling this function.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-ensure-initialized"></a><h3>ostree_sysroot_ensure_initialized ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_ensure_initialized (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Ensure that <em class="parameter"><code>self</code></em>
is set up as a valid rootfs, by creating
/ostree/repo, among other things.</p>
@ -746,7 +746,7 @@ ostree_sysroot_get_subbootversion (<em class="parameter"><code><a class="link" h
<hr>
<div class="refsect2">
<a name="ostree-sysroot-get-deployments"></a><h3>ostree_sysroot_get_deployments ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> *
ostree_sysroot_get_deployments (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-get-deployments.parameters"></a><h4>Parameters</h4>
@ -791,14 +791,14 @@ ostree_sysroot_get_booted_deployment (<em class="parameter"><code><a class="link
</div>
<div class="refsect3">
<a name="ostree-sysroot-get-booted-deployment.returns"></a><h4>Returns</h4>
<p> The currently booted deployment, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. </p>
<p> The currently booted deployment, or <code class="literal">NULL</code> if none. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-get-deployment-directory"></a><h3>ostree_sysroot_get_deployment_directory ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GFile</span> *
ostree_sysroot_get_deployment_directory
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *deployment</code></em>);</pre>
@ -870,9 +870,9 @@ or concatenate it with the full <a class="link" href="ostree-Root-partition-moun
<hr>
<div class="refsect2">
<a name="ostree-sysroot-get-deployment-origin-path"></a><h3>ostree_sysroot_get_deployment_origin_path ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GFile</span> *
ostree_sysroot_get_deployment_origin_path
(<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *deployment_path</code></em>);</pre>
(<em class="parameter"><code><span class="type">GFile</span> *deployment_path</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-get-deployment-origin-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -897,10 +897,10 @@ ostree_sysroot_get_deployment_origin_path
<hr>
<div class="refsect2">
<a name="ostree-sysroot-cleanup"></a><h3>ostree_sysroot_cleanup ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_cleanup (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Delete any state that resulted from a partially completed
transaction, such as incomplete deployments.</p>
<div class="refsect3">
@ -934,10 +934,10 @@ transaction, such as incomplete deployments.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-prepare-cleanup"></a><h3>ostree_sysroot_prepare_cleanup ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_prepare_cleanup (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Like <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-cleanup" title="ostree_sysroot_cleanup ()"><code class="function">ostree_sysroot_cleanup()</code></a> in that it cleans up incomplete deployments
and old boot versions, but does NOT prune the repository.</p>
<div class="refsect3">
@ -1001,11 +1001,11 @@ has been invoked successfully.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-get-repo"></a><h3>ostree_sysroot_get_repo ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_get_repo (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Content-addressed-object-store.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> **out_repo</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Retrieve the OSTree repository in sysroot <em class="parameter"><code>self</code></em>
.</p>
<div class="refsect3">
@ -1045,11 +1045,11 @@ ostree_sysroot_get_repo (<em class="parameter"><code><a class="link" href="ostre
<hr>
<div class="refsect2">
<a name="ostree-sysroot-init-osname"></a><h3>ostree_sysroot_init_osname ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_init_osname (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Initialize the directory structure for an "osname", which is a
group of operating system deployments, with a shared <code class="literal">/var</code>. One
is required for generating a deployment.</p>
@ -1089,12 +1089,12 @@ is required for generating a deployment.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-deployment-set-kargs"></a><h3>ostree_sysroot_deployment_set_kargs ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_deployment_set_kargs (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *deployment</code></em>,
<em class="parameter"><code><span class="type">char</span> **new_kargs</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Entirely replace the kernel arguments of <em class="parameter"><code>deployment</code></em>
with the
values in <em class="parameter"><code>new_kargs</code></em>
@ -1140,12 +1140,12 @@ values in <em class="parameter"><code>new_kargs</code></em>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-deployment-set-mutable"></a><h3>ostree_sysroot_deployment_set_mutable ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_deployment_set_mutable (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *deployment</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_mutable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> is_mutable</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>By default, deployment directories are not mutable. This function
will allow making them temporarily mutable, for example to allow
layering additional non-OSTree content.</p>
@ -1190,12 +1190,12 @@ layering additional non-OSTree content.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-deployment-unlock"></a><h3>ostree_sysroot_deployment_unlock ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_deployment_unlock (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *deployment</code></em>,
<em class="parameter"><code><span class="type">OstreeDeploymentUnlockedState</span> unlocked_state</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Configure the target deployment <em class="parameter"><code>deployment</code></em>
such that it
is writable. There are multiple modes, essentially differing
@ -1243,11 +1243,11 @@ across reboots.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-write-deployments"></a><h3>ostree_sysroot_write_deployments ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_write_deployments (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *new_deployments</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GPtrArray</span> *new_deployments</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Older version of <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments-with-options" title="ostree_sysroot_write_deployments_with_options ()"><code class="function">ostree_sysroot_write_deployments_with_options()</code></a>. This
version will perform post-deployment cleanup by default.</p>
<div class="refsect3">
@ -1286,13 +1286,13 @@ version will perform post-deployment cleanup by default.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-write-deployments-with-options"></a><h3>ostree_sysroot_write_deployments_with_options ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_write_deployments_with_options
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *new_deployments</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *new_deployments</code></em>,
<em class="parameter"><code><span class="type">OstreeSysrootWriteDeploymentsOpts</span> *opts</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Assuming <em class="parameter"><code>new_deployments</code></em>
have already been deployed in place on disk via
<a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deploy-tree" title="ostree_sysroot_deploy_tree ()"><code class="function">ostree_sysroot_deploy_tree()</code></a>, atomically update bootloader configuration. By
@ -1342,17 +1342,17 @@ if for example you want to control pruning of the repository.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-write-origin-file"></a><h3>ostree_sysroot_write_origin_file ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_write_origin_file (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *deployment</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *new_origin</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GKeyFile</span> *new_origin</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Immediately replace the origin file of the referenced <em class="parameter"><code>deployment</code></em>
with the contents of <em class="parameter"><code>new_origin</code></em>
. If <em class="parameter"><code>new_origin</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
is <code class="literal">NULL</code>,
this function will write the current origin of <em class="parameter"><code>deployment</code></em>
.</p>
<div class="refsect3">
@ -1396,16 +1396,16 @@ this function will write the current origin of <em class="parameter"><code>deplo
<hr>
<div class="refsect2">
<a name="ostree-sysroot-deploy-tree"></a><h3>ostree_sysroot_deploy_tree ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_deploy_tree (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *revision</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *origin</code></em>,
<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *provided_merge_deployment</code></em>,
<em class="parameter"><code><span class="type">char</span> **override_kernel_argv</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> **out_new_deployment</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Check out deployment tree with revision <em class="parameter"><code>revision</code></em>
, performing a 3
way merge with <em class="parameter"><code>provided_merge_deployment</code></em>
@ -1446,7 +1446,7 @@ way merge with <em class="parameter"><code>provided_merge_deployment</code></em>
</tr>
<tr>
<td class="parameter_name"><p>override_kernel_argv</p></td>
<td class="parameter_description"><p> Use these as kernel arguments; if <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, inherit options from provided_merge_deployment. </p></td>
<td class="parameter_description"><p> Use these as kernel arguments; if <code class="literal">NULL</code>, inherit options from provided_merge_deployment. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>][<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8]</span></td>
</tr>
<tr>
@ -1513,7 +1513,7 @@ ostree_sysroot_query_deployments_for (<em class="parameter"><code><a class="link
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> **out_pending</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> **out_rollback</code></em>);</pre>
<p>Find the pending and rollback deployments for <em class="parameter"><code>osname</code></em>
. Pass <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>osname</code></em>
. Pass <code class="literal">NULL</code> for <em class="parameter"><code>osname</code></em>
to use the booted deployment's osname. By default, pending deployment is the
first deployment in the order that matches <em class="parameter"><code>osname</code></em>
@ -1558,7 +1558,7 @@ we're not looking at the booted deployment.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-origin-new-from-refspec"></a><h3>ostree_sysroot_origin_new_from_refspec ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
ostree_sysroot_origin_new_from_refspec
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *refspec</code></em>);</pre>
@ -1594,15 +1594,15 @@ as an origin. </p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-simple-write-deployment"></a><h3>ostree_sysroot_simple_write_deployment ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_simple_write_deployment
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *new_deployment</code></em>,
<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *merge_deployment</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysrootSimpleWriteDeploymentFlags" title="enum OstreeSysrootSimpleWriteDeploymentFlags"><span class="type">OstreeSysrootSimpleWriteDeploymentFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Prepend <em class="parameter"><code>new_deployment</code></em>
to the list of deployments, commit, and
cleanup. By default, all other deployments for the given <em class="parameter"><code>osname</code></em>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SELinux policy management: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-Progress-notification-system-for-asynchronous-operations.html" title="Progress notification system for asynchronous operations">
@ -57,7 +57,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-path" title="ostree_sepolicy_get_path ()">ostree_sepolicy_get_path</a> <span class="c_punctuation">()</span>
@ -72,7 +72,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-label" title="ostree_sepolicy_get_label ()">ostree_sepolicy_get_label</a> <span class="c_punctuation">()</span>
@ -87,7 +87,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-restorecon" title="ostree_sepolicy_restorecon ()">ostree_sepolicy_restorecon</a> <span class="c_punctuation">()</span>
@ -95,7 +95,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon" title="ostree_sepolicy_setfscreatecon ()">ostree_sepolicy_setfscreatecon</a> <span class="c_punctuation">()</span>
@ -141,9 +141,9 @@ root and perform labeling.</p>
<div class="refsect2">
<a name="ostree-sepolicy-new"></a><h3>ostree_sepolicy_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
ostree_sepolicy_new (<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
ostree_sepolicy_new (<em class="parameter"><code><span class="type">GFile</span> *path</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sepolicy-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -183,8 +183,8 @@ ostree_sepolicy_new (<em class="parameter"><code><a href="https://developer.gnom
<a name="ostree-sepolicy-new-at"></a><h3>ostree_sepolicy_new_at ()</h3>
<pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
ostree_sepolicy_new_at (<em class="parameter"><code><span class="type">int</span> rootfs_dfd</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sepolicy-new-at.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -222,7 +222,7 @@ ostree_sepolicy_new_at (<em class="parameter"><code><span class="type">int</span
<hr>
<div class="refsect2">
<a name="ostree-sepolicy-get-path"></a><h3>ostree_sepolicy_get_path ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GFile</span> *
ostree_sepolicy_get_path (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sepolicy-get-path.returns"></a><h4>Returns</h4>
@ -244,18 +244,18 @@ ostree_sepolicy_get_name (<em class="parameter"><code><a class="link" href="ostr
<hr>
<div class="refsect2">
<a name="ostree-sepolicy-get-label"></a><h3>ostree_sepolicy_get_label ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sepolicy_get_label (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *relpath</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> unix_mode</code></em>,
<em class="parameter"><code><span class="type">guint32</span> unix_mode</code></em>,
<em class="parameter"><code><span class="type">char</span> **out_label</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Store in <em class="parameter"><code>out_label</code></em>
the security context for the given <em class="parameter"><code>relpath</code></em>
and
mode <em class="parameter"><code>unix_mode</code></em>
. If the policy does not specify a label, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
. If the policy does not specify a label, <code class="literal">NULL</code>
will be returned.</p>
<div class="refsect3">
<a name="ostree-sepolicy-get-label.parameters"></a><h4>Parameters</h4>
@ -314,15 +314,15 @@ ostree_sepolicy_get_csum (<em class="parameter"><code><a class="link" href="ostr
<hr>
<div class="refsect2">
<a name="ostree-sepolicy-restorecon"></a><h3>ostree_sepolicy_restorecon ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sepolicy_restorecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFileInfo.html#GFileInfo-struct"><span class="type">GFileInfo</span></a> *info</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *target</code></em>,
<em class="parameter"><code><span class="type">GFileInfo</span> *info</code></em>,
<em class="parameter"><code><span class="type">GFile</span> *target</code></em>,
<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicyRestoreconFlags" title="enum OstreeSePolicyRestoreconFlags"><span class="type">OstreeSePolicyRestoreconFlags</span></a> flags</code></em>,
<em class="parameter"><code><span class="type">char</span> **out_new_label</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Reset the security context of <em class="parameter"><code>target</code></em>
based on the SELinux policy.</p>
<div class="refsect3">
@ -361,7 +361,7 @@ ostree_sepolicy_restorecon (<em class="parameter"><code><a class="link" href="os
</tr>
<tr>
<td class="parameter_name"><p>out_new_label</p></td>
<td class="parameter_description"><p> New label, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unchanged. </p></td>
<td class="parameter_description"><p> New label, or <code class="literal">NULL</code> if unchanged. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>][<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
</tr>
<tr>
@ -381,11 +381,11 @@ ostree_sepolicy_restorecon (<em class="parameter"><code><a class="link" href="os
<hr>
<div class="refsect2">
<a name="ostree-sepolicy-setfscreatecon"></a><h3>ostree_sepolicy_setfscreatecon ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sepolicy_setfscreatecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> mode</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">guint32</span> mode</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sepolicy-setfscreatecon.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple upgrade class: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-SELinux-policy-management.html" title="SELinux policy management">
@ -65,7 +65,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<span class="returnvalue">GKeyFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-get-origin" title="ostree_sysroot_upgrader_get_origin ()">ostree_sysroot_upgrader_get_origin</a> <span class="c_punctuation">()</span>
@ -73,7 +73,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<span class="returnvalue">GKeyFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-dup-origin" title="ostree_sysroot_upgrader_dup_origin ()">ostree_sysroot_upgrader_dup_origin</a> <span class="c_punctuation">()</span>
@ -81,7 +81,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-set-origin" title="ostree_sysroot_upgrader_set_origin ()">ostree_sysroot_upgrader_set_origin</a> <span class="c_punctuation">()</span>
@ -97,7 +97,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-check-timestamps" title="ostree_sysroot_upgrader_check_timestamps ()">ostree_sysroot_upgrader_check_timestamps</a> <span class="c_punctuation">()</span>
@ -105,7 +105,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull" title="ostree_sysroot_upgrader_pull ()">ostree_sysroot_upgrader_pull</a> <span class="c_punctuation">()</span>
@ -113,7 +113,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull-one-dir" title="ostree_sysroot_upgrader_pull_one_dir ()">ostree_sysroot_upgrader_pull_one_dir</a> <span class="c_punctuation">()</span>
@ -121,7 +121,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-deploy" title="ostree_sysroot_upgrader_deploy ()">ostree_sysroot_upgrader_deploy</a> <span class="c_punctuation">()</span>
@ -164,8 +164,8 @@ operations.</p>
<a name="ostree-sysroot-upgrader-new"></a><h3>ostree_sysroot_upgrader_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
ostree_sysroot_upgrader_new (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -205,8 +205,8 @@ ostree_sysroot_upgrader_new (<em class="parameter"><code><a class="link" href="o
<pre class="programlisting"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
ostree_sysroot_upgrader_new_for_os (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-new-for-os.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -253,8 +253,8 @@ ostree_sysroot_upgrader_new_for_os_with_flags
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderFlags" title="enum OstreeSysrootUpgraderFlags"><span class="type">OstreeSysrootUpgraderFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-new-for-os-with-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -301,7 +301,7 @@ ostree_sysroot_upgrader_new_for_os_with_flags
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-get-origin"></a><h3>ostree_sysroot_upgrader_get_origin ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
ostree_sysroot_upgrader_get_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-get-origin.parameters"></a><h4>Parameters</h4>
@ -320,14 +320,14 @@ ostree_sysroot_upgrader_get_origin (<em class="parameter"><code><a class="link"
</div>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-get-origin.returns"></a><h4>Returns</h4>
<p> The origin file, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. </p>
<p> The origin file, or <code class="literal">NULL</code> if unknown. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-dup-origin"></a><h3>ostree_sysroot_upgrader_dup_origin ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
ostree_sysroot_upgrader_dup_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-dup-origin.parameters"></a><h4>Parameters</h4>
@ -346,18 +346,18 @@ ostree_sysroot_upgrader_dup_origin (<em class="parameter"><code><a class="link"
</div>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-dup-origin.returns"></a><h4>Returns</h4>
<p> A copy of the origin file, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. </p>
<p> A copy of the origin file, or <code class="literal">NULL</code> if unknown. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-set-origin"></a><h3>ostree_sysroot_upgrader_set_origin ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_upgrader_set_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *origin</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Replace the origin with <em class="parameter"><code>origin</code></em>
.</p>
<div class="refsect3">
@ -416,18 +416,18 @@ ostree_sysroot_upgrader_get_origin_description
</div>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-get-origin-description.returns"></a><h4>Returns</h4>
<p> A one-line descriptive summary of the origin, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown</p>
<p> A one-line descriptive summary of the origin, or <code class="literal">NULL</code> if unknown</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-check-timestamps"></a><h3>ostree_sysroot_upgrader_check_timestamps ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_upgrader_check_timestamps
(<em class="parameter"><code><a class="link" href="ostree-Content-addressed-object-store.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *from_rev</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *to_rev</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Check that the timestamp on <em class="parameter"><code>to_rev</code></em>
is equal to or newer than
<em class="parameter"><code>from_rev</code></em>
@ -469,21 +469,21 @@ attackers which provide a client with an older commit.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-pull"></a><h3>ostree_sysroot_upgrader_pull ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_upgrader_pull (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Content-addressed-object-store.html#OstreeRepoPullFlags" title="enum OstreeRepoPullFlags"><span class="type">OstreeRepoPullFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderPullFlags" title="enum OstreeSysrootUpgraderPullFlags"><span class="type">OstreeSysrootUpgraderPullFlags</span></a> upgrader_flags</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *progress</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_changed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Perform a pull from the origin. First check if the ref has
changed, if so download the linked objects, and store the updated
ref locally. Then <em class="parameter"><code>out_changed</code></em>
will be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
will be <code class="literal">TRUE</code>.</p>
<p>If the origin remote is unchanged, <em class="parameter"><code>out_changed</code></em>
will be set to
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
<code class="literal">FALSE</code>.</p>
<div class="refsect3">
<a name="ostree-sysroot-upgrader-pull.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -535,15 +535,15 @@ ref locally. Then <em class="parameter"><code>out_changed</code></em>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-pull-one-dir"></a><h3>ostree_sysroot_upgrader_pull_one_dir ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_upgrader_pull_one_dir (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *dir_to_pull</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Content-addressed-object-store.html#OstreeRepoPullFlags" title="enum OstreeRepoPullFlags"><span class="type">OstreeRepoPullFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderPullFlags" title="enum OstreeSysrootUpgraderPullFlags"><span class="type">OstreeSysrootUpgraderPullFlags</span></a> upgrader_flags</code></em>,
<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *progress</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_changed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Like <a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull" title="ostree_sysroot_upgrader_pull ()"><code class="function">ostree_sysroot_upgrader_pull()</code></a>, but allows retrieving just a
subpath of the tree. This can be used to download metadata files
from inside the tree such as package databases.</p>
@ -603,10 +603,10 @@ from inside the tree such as package databases.</p>
<hr>
<div class="refsect2">
<a name="ostree-sysroot-upgrader-deploy"></a><h3>ostree_sysroot_upgrader_deploy ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sysroot_upgrader_deploy (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Write the new deployment to disk, perform a configuration merge
with /etc, and update the bootloader configuration.</p>
<div class="refsect3">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-bootconfig-parser: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-GPG-signature-verification-results.html" title="GPG signature verification results">
@ -57,7 +57,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-parse" title="ostree_bootconfig_parser_parse ()">ostree_bootconfig_parser_parse</a> <span class="c_punctuation">()</span>
@ -65,7 +65,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-parse-at" title="ostree_bootconfig_parser_parse_at ()">ostree_bootconfig_parser_parse_at</a> <span class="c_punctuation">()</span>
@ -73,7 +73,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-write" title="ostree_bootconfig_parser_write ()">ostree_bootconfig_parser_write</a> <span class="c_punctuation">()</span>
@ -81,7 +81,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-write-at" title="ostree_bootconfig_parser_write_at ()">ostree_bootconfig_parser_write_at</a> <span class="c_punctuation">()</span>
@ -158,21 +158,21 @@ ostree_bootconfig_parser_clone (<em class="parameter"><code><a class="link" href
<hr>
<div class="refsect2">
<a name="ostree-bootconfig-parser-parse"></a><h3>ostree_bootconfig_parser_parse ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_bootconfig_parser_parse (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GFile</span> *path</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-bootconfig-parser-parse-at"></a><h3>ostree_bootconfig_parser_parse_at ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_bootconfig_parser_parse_at (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">int</span> dfd</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Initialize a bootconfig from the given file.</p>
<div class="refsect3">
<a name="ostree-bootconfig-parser-parse-at.parameters"></a><h4>Parameters</h4>
@ -215,21 +215,21 @@ ostree_bootconfig_parser_parse_at (<em class="parameter"><code><a class="link" h
<hr>
<div class="refsect2">
<a name="ostree-bootconfig-parser-write"></a><h3>ostree_bootconfig_parser_write ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_bootconfig_parser_write (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *output</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GFile</span> *output</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-bootconfig-parser-write-at"></a><h3>ostree_bootconfig_parser_write_at ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_bootconfig_parser_write_at (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">int</span> dfd</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-chain-input-stream: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-ostree-bootconfig-parser.html" title="ostree-bootconfig-parser">
@ -69,7 +69,7 @@
<div class="refsect2">
<a name="ostree-chain-input-stream-new"></a><h3>ostree_chain_input_stream_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-ostree-chain-input-stream.html#OstreeChainInputStream" title="struct OstreeChainInputStream"><span class="returnvalue">OstreeChainInputStream</span></a> *
ostree_chain_input_stream_new (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *streams</code></em>);</pre>
ostree_chain_input_stream_new (<em class="parameter"><code><span class="type">GPtrArray</span> *streams</code></em>);</pre>
</div>
</div>
<div class="refsect1">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-checksum-input-stream: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-ostree-chain-input-stream.html" title="ostree-chain-input-stream">
@ -69,8 +69,8 @@
<div class="refsect2">
<a name="ostree-checksum-input-stream-new"></a><h3>ostree_checksum_input_stream_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-ostree-checksum-input-stream.html#OstreeChecksumInputStream" title="struct OstreeChecksumInputStream"><span class="returnvalue">OstreeChecksumInputStream</span></a> *
ostree_checksum_input_stream_new (<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> *stream</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Data-Checksums.html#GChecksum"><span class="type">GChecksum</span></a> *checksum</code></em>);</pre>
ostree_checksum_input_stream_new (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>,
<em class="parameter"><code><span class="type">GChecksum</span> *checksum</code></em>);</pre>
</div>
</div>
<div class="refsect1">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-deployment: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-ostree-checksum-input-stream.html" title="ostree-checksum-input-stream">
@ -41,7 +41,7 @@
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-hash" title="ostree_deployment_hash ()">ostree_deployment_hash</a> <span class="c_punctuation">()</span>
@ -49,7 +49,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-equal" title="ostree_deployment_equal ()">ostree_deployment_equal</a> <span class="c_punctuation">()</span>
@ -118,7 +118,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<span class="returnvalue">GKeyFile</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-origin" title="ostree_deployment_get_origin ()">ostree_deployment_get_origin</a> <span class="c_punctuation">()</span>
@ -210,15 +210,15 @@
<a name="ostree-ostree-deployment.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ostree-deployment-hash"></a><h3>ostree_deployment_hash ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
ostree_deployment_hash (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v</code></em>);</pre>
<pre class="programlisting"><span class="returnvalue">guint</span>
ostree_deployment_hash (<em class="parameter"><code><span class="type">gconstpointer</span> v</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-deployment-equal"></a><h3>ostree_deployment_equal ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
ostree_deployment_equal (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> ap</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> bp</code></em>);</pre>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_deployment_equal (<em class="parameter"><code><span class="type">gconstpointer</span> ap</code></em>,
<em class="parameter"><code><span class="type">gconstpointer</span> bp</code></em>);</pre>
<div class="refsect3">
<a name="ostree-deployment-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
@ -243,7 +243,7 @@ ostree_deployment_equal (<em class="parameter"><code><a href="https://developer.
</div>
<div class="refsect3">
<a name="ostree-deployment-equal.returns"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if deployments have the same osname, csum, and deployserial</p>
<p> <code class="literal">TRUE</code> if deployments have the same osname, csum, and deployserial</p>
</div>
</div>
<hr>
@ -322,7 +322,7 @@ ostree_deployment_get_bootconfig (<em class="parameter"><code><a class="link" hr
<hr>
<div class="refsect2">
<a name="ostree-deployment-get-origin"></a><h3>ostree_deployment_get_origin ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> *
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
ostree_deployment_get_origin (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-deployment-get-origin.parameters"></a><h4>Parameters</h4>
@ -406,7 +406,7 @@ ostree_deployment_set_bootconfig (<em class="parameter"><code><a class="link" hr
<a name="ostree-deployment-set-origin"></a><h3>ostree_deployment_set_origin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_deployment_set_origin (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *origin</code></em>);</pre>
<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
@ -506,7 +506,7 @@ ostree_deployment_unlocked_state_to_string
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> *<em class="structfield"><code><a name="OstreeDeployment.origin"></a>origin</code></em>;</p></td>
<td class="struct_member_name"><p><span class="type">GKeyFile</span> *<em class="structfield"><code><a name="OstreeDeployment.origin"></a>origin</code></em>;</p></td>
<td class="struct_member_description"><p>How to construct an upgraded version of this tree</p></td>
<td class="struct_member_annotations"> </td>
</tr>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-diff: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-ostree-deployment.html" title="ostree-deployment">
@ -57,7 +57,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-diff.html#ostree-diff-dirs" title="ostree_diff_dirs ()">ostree_diff_dirs</a> <span class="c_punctuation">()</span>
@ -65,7 +65,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-diff.html#ostree-diff-dirs-with-options" title="ostree_diff_dirs_with_options ()">ostree_diff_dirs_with_options</a> <span class="c_punctuation">()</span>
@ -120,15 +120,15 @@ ostree_diff_item_unref (<em class="parameter"><code><a class="link" href="ostree
<hr>
<div class="refsect2">
<a name="ostree-diff-dirs"></a><h3>ostree_diff_dirs ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_diff_dirs (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffFlags" title="enum OstreeDiffFlags"><span class="type">OstreeDiffFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *a</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *b</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *modified</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *removed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *added</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Compute the difference between directory <em class="parameter"><code>a</code></em>
and <em class="parameter"><code>b</code></em>
as 3 separate
@ -152,7 +152,7 @@ sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="str
</tr>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>First directory path, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_description"><p>First directory path, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -192,16 +192,16 @@ sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="str
<hr>
<div class="refsect2">
<a name="ostree-diff-dirs-with-options"></a><h3>ostree_diff_dirs_with_options ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_diff_dirs_with_options (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffFlags" title="enum OstreeDiffFlags"><span class="type">OstreeDiffFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *a</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *b</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *modified</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *removed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *added</code></em>,
<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>,
<em class="parameter"><code><span class="type">OstreeDiffDirsOptions</span> *options</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Compute the difference between directory <em class="parameter"><code>a</code></em>
and <em class="parameter"><code>b</code></em>
as 3 separate
@ -225,7 +225,7 @@ sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="str
</tr>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>First directory path, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_description"><p>First directory path, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
@ -271,11 +271,11 @@ sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="str
<div class="refsect2">
<a name="ostree-diff-print"></a><h3>ostree_diff_print ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_diff_print (<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *a</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFile-struct"><span class="type">GFile</span></a> *b</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *modified</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *removed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *added</code></em>);</pre>
ostree_diff_print (<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>);</pre>
<p>Print the contents of a diff to stdout.</p>
<div class="refsect3">
<a name="ostree-diff-print.parameters"></a><h4>Parameters</h4>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ostree-repo-file: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-ostree-diff.html" title="ostree-diff">
@ -40,7 +40,7 @@
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-ensure-resolved" title="ostree_repo_file_ensure_resolved ()">ostree_repo_file_ensure_resolved</a> <span class="c_punctuation">()</span>
@ -48,7 +48,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-get-xattrs" title="ostree_repo_file_get_xattrs ()">ostree_repo_file_get_xattrs</a> <span class="c_punctuation">()</span>
@ -94,7 +94,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<span class="returnvalue">GVariant</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-contents" title="ostree_repo_file_tree_get_contents ()">ostree_repo_file_tree_get_contents</a> <span class="c_punctuation">()</span>
@ -102,7 +102,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<span class="returnvalue">GVariant</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-metadata" title="ostree_repo_file_tree_get_metadata ()">ostree_repo_file_tree_get_metadata</a> <span class="c_punctuation">()</span>
@ -125,7 +125,7 @@
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-query-child" title="ostree_repo_file_tree_query_child ()">ostree_repo_file_tree_query_child</a> <span class="c_punctuation">()</span>
@ -154,18 +154,18 @@
<a name="ostree-ostree-repo-file.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ostree-repo-file-ensure-resolved"></a><h3>ostree_repo_file_ensure_resolved ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_repo_file_ensure_resolved (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-file-get-xattrs"></a><h3>ostree_repo_file_get_xattrs ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_repo_file_get_xattrs (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **out_xattrs</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GVariant</span> **out_xattrs</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
@ -195,7 +195,7 @@ ostree_repo_file_get_root (<em class="parameter"><code><a class="link" href="ost
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_repo_file_tree_set_metadata (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *metadata</code></em>);</pre>
<em class="parameter"><code><span class="type">GVariant</span> *metadata</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
@ -214,13 +214,13 @@ ostree_repo_file_tree_get_metadata_checksum
<hr>
<div class="refsect2">
<a name="ostree-repo-file-tree-get-contents"></a><h3>ostree_repo_file_tree_get_contents ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
ostree_repo_file_tree_get_contents (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-file-tree-get-metadata"></a><h3>ostree_repo_file_tree_get_metadata ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
ostree_repo_file_tree_get_metadata (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
</div>
<hr>
@ -235,20 +235,20 @@ ostree_repo_file_get_checksum (<em class="parameter"><code><a class="link" href=
<pre class="programlisting"><span class="returnvalue">int</span>
ostree_repo_file_tree_find_child (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *is_dir</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **out_container</code></em>);</pre>
<em class="parameter"><code><span class="type">gboolean</span> *is_dir</code></em>,
<em class="parameter"><code><span class="type">GVariant</span> **out_container</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-file-tree-query-child"></a><h3>ostree_repo_file_tree_query_child ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_repo_file_tree_query_child (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">int</span> n</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFile.html#GFileQueryInfoFlags"><span class="type">GFileQueryInfoFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GFileInfo.html#GFileInfo-struct"><span class="type">GFileInfo</span></a> **out_info</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gio/unstable/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<em class="parameter"><code><span class="type">GFileQueryInfoFlags</span> flags</code></em>,
<em class="parameter"><code><span class="type">GFileInfo</span> **out_info</code></em>,
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
</div>
<div class="refsect1">

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Reference: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="index.html" title="OSTree API references">
<link rel="prev" href="index.html" title="OSTree API references">

View File

@ -28,6 +28,7 @@ ostree_repo_find_remotes_finish
ostree_repo_pull_from_remotes_async
ostree_repo_pull_from_remotes_finish
ostree_repo_resolve_keyring_for_collection
OSTREE_REPO_METADATA_REF
</SECTION>
<SECTION>

View File

@ -1 +1 @@
2017.8
2017.9

165
build-aux/config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-01-01'
timestamp='2016-10-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -27,7 +27,7 @@ timestamp='2015-01-01'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -168,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
machine=${arch}${endian}-unknown
;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
# to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@ -197,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
# Determine ABI tags.
case "${UNAME_MACHINE_ARCH}" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
@ -207,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@ -223,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@ -235,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@ -251,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@ -359,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@ -393,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
@ -618,13 +642,13 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@ -663,11 +687,11 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
@ -680,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
HP_ARCH=hppa2.0w
else
HP_ARCH="hppa64"
HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@ -790,14 +814,14 @@ EOF
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@ -879,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@ -902,7 +926,7 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
@ -933,6 +957,9 @@ EOF
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
e2k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
@ -945,6 +972,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
@ -970,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@ -1002,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
@ -1021,7 +1057,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@ -1100,7 +1136,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@ -1249,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
SX-ACE:SUPER-UX:*:*)
echo sxace-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1262,9 +1301,9 @@ EOF
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@ -1286,7 +1325,7 @@ EOF
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@ -1317,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@ -1359,7 +1398,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@ -1370,23 +1409,25 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
$0: unable to guess system type
This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.
config.guess timestamp = $timestamp

52
build-aux/config.sub vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-01-01'
timestamp='2016-09-05'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -33,7 +33,7 @@ timestamp='2015-01-01'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@ -53,8 +53,7 @@ timestamp='2015-01-01'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -117,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -255,11 +254,12 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
@ -305,7 +305,7 @@ case $basic_machine in
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@ -376,12 +376,13 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@ -428,12 +429,13 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@ -518,6 +520,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
basic_machine=asmjs-unknown
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -638,6 +643,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@ -1017,7 +1030,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@ -1027,7 +1040,7 @@ case $basic_machine in
;;
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@ -1373,18 +1386,18 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@ -1393,7 +1406,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1525,6 +1539,8 @@ case $os in
;;
-nacl*)
;;
-ios)
;;
-none)
;;
*)

29
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libostree 2017.8.
# Generated by GNU Autoconf 2.69 for libostree 2017.9.
#
# Report bugs to <walters@verbum.org>.
#
@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libostree'
PACKAGE_TARNAME='libostree'
PACKAGE_VERSION='2017.8'
PACKAGE_STRING='libostree 2017.8'
PACKAGE_VERSION='2017.9'
PACKAGE_STRING='libostree 2017.9'
PACKAGE_BUGREPORT='walters@verbum.org'
PACKAGE_URL=''
@ -1533,7 +1533,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 2017.8 to adapt to many kinds of systems.
\`configure' configures libostree 2017.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1603,7 +1603,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libostree 2017.8:";;
short | recursive ) echo "Configuration of libostree 2017.9:";;
esac
cat <<\_ACEOF
@ -1839,7 +1839,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libostree configure 2017.8
libostree configure 2017.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2254,7 +2254,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 2017.8, which was
It was created by libostree $as_me 2017.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3122,7 +3122,7 @@ fi
# Define the identity of the package.
PACKAGE='libostree'
VERSION='2017.8'
VERSION='2017.9'
# Some tools Automake needs.
@ -5856,11 +5856,15 @@ test -n "$YACC" || YACC="yacc"
YEAR_VERSION=2017
RELEASE_VERSION=8
RELEASE_VERSION=9
PACKAGE_VERSION=2017.8
PACKAGE_VERSION=2017.9
if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then :
else
for flag in \
-pipe \
@ -5912,6 +5916,7 @@ fi
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fsanitize=address in CFLAGS" >&5
@ -17956,7 +17961,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 2017.8, which was
This file was extended by libostree $as_me 2017.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -18022,7 +18027,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 2017.8
libostree config.status 2017.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -4,7 +4,7 @@ dnl update libostree-released.sym from libostree-devel.sym, and update the check
dnl in test-symbols.sh, and also set is_release_build=yes below. Then make
dnl another post-release commit to bump the version, and set is_release_build=no.
m4_define([year_version], [2017])
m4_define([release_version], [8])
m4_define([release_version], [9])
m4_define([package_version], [year_version.release_version])
AC_INIT([libostree], [package_version], [walters@verbum.org])
is_release_build=yes
@ -28,6 +28,7 @@ AC_SUBST([YEAR_VERSION], [year_version])
AC_SUBST([RELEASE_VERSION], [release_version])
AC_SUBST([PACKAGE_VERSION], [package_version])
AS_IF([echo "$CFLAGS" | grep -q -E -e '-Werror($| )'], [], [
CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\
-pipe \
-Wall \
@ -46,7 +47,7 @@ CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\
-Werror=misleading-indentation \
-Werror=missing-include-dirs -Werror=aggregate-return \
-Werror=unused-result \
])
])])
AC_SUBST(WARN_CFLAGS)
AC_MSG_CHECKING([for -fsanitize=address in CFLAGS])

View File

@ -17,7 +17,7 @@ Why?
----
There are multiple projects which have a hard dependency on Linux and
GLib, such as NetworkManager, ostree, xdg-app, etc. It makes sense
GLib, such as NetworkManager, ostree, flatpak, etc. It makes sense
for them to be able to share Linux-specific APIs.
This module also contains some code taken from systemd, which has very

View File

@ -67,9 +67,7 @@ glnx_opendirat (int dfd,
{
int ret = glnx_opendirat_with_errno (dfd, path, follow);
if (ret == -1)
{
return glnx_throw_errno_prefix (error, "openat");
}
return glnx_throw_errno_prefix (error, "opendir(%s)", path);
*out_fd = ret;
return TRUE;
}

View File

@ -21,6 +21,8 @@
#pragma once
#include <glnx-backport-autocleanups.h>
#include <glnx-macros.h>
#include <glnx-errors.h>
#include <limits.h>
#include <dirent.h>
#include <sys/stat.h>
@ -83,6 +85,34 @@ char *glnx_fdrel_abspath (int dfd,
void glnx_gen_temp_name (gchar *tmpl);
/**
* glnx_ensure_dir:
* @dfd: directory fd
* @path: Directory path
* @mode: Mode
* @error: Return location for a #GError, or %NULL
*
* Wrapper around mkdirat() which ignores adds #GError support, ensures that
* it retries on %EINTR, and also ignores `EEXIST`.
*
* See also `glnx_shutil_mkdir_p_at()` for recursive handling.
*
* Returns: %TRUE on success, %FALSE otherwise
*/
static inline gboolean
glnx_ensure_dir (int dfd,
const char *path,
mode_t mode,
GError **error)
{
if (TEMP_FAILURE_RETRY (mkdirat (dfd, path, mode)) != 0)
{
if (G_UNLIKELY (errno != EEXIST))
return glnx_throw_errno_prefix (error, "mkdirat(%s)", path);
}
return TRUE;
}
gboolean glnx_mkdtempat (int dfd,
gchar *tmpl,
int mode,

View File

@ -84,6 +84,38 @@ glnx_prefix_error (GError **error, const char *fmt, ...)
#define glnx_prefix_error_null(error, args...) \
({glnx_prefix_error (error, args); NULL;})
/**
* GLNX_AUTO_PREFIX_ERROR:
*
* An autocleanup-based macro to automatically call `g_prefix_error()` (also with a colon+space `: `)
* when it goes out of scope. This is useful when one wants error strings built up by the callee
* function, not all callers.
*
* ```
* gboolean start_http_request (..., GError **error)
* {
* GLNX_AUTO_PREFIX_ERROR ("HTTP request", error)
*
* if (!libhttp_request_start (..., error))
* return FALSE;
* ...
* return TRUE;
* ```
*/
typedef struct {
const char *prefix;
GError **error;
} GLnxAutoErrorPrefix;
static inline void
glnx_cleanup_auto_prefix_error (GLnxAutoErrorPrefix *prefix)
{
if (prefix->error && *(prefix->error))
g_prefix_error (prefix->error, "%s: ", prefix->prefix);
}
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GLnxAutoErrorPrefix, glnx_cleanup_auto_prefix_error)
#define GLNX_AUTO_PREFIX_ERROR(text, error) \
G_GNUC_UNUSED g_auto(GLnxAutoErrorPrefix) _GLNX_MAKE_ANONYMOUS(_glnxautoprefixerror_) = { text, error }
/* Set @error using the value of `g_strerror (errno)`.
*
* This function returns %FALSE so it can be used conveniently in a single

View File

@ -53,6 +53,15 @@
sizeof(type) <= 4 ? 10 : \
sizeof(type) <= 8 ? 20 : sizeof(int[-2*(sizeof(type) > 8)])))
gboolean
glnx_stdio_file_flush (FILE *f, GError **error)
{
if (fflush (f) != 0)
return glnx_throw_errno_prefix (error, "fflush");
if (ferror (f) != 0)
return glnx_throw_errno_prefix (error, "ferror");
return TRUE;
}
/* An implementation of renameat2(..., RENAME_NOREPLACE)
* with fallback to a non-atomic version.
@ -169,13 +178,12 @@ glnx_tmpfile_clear (GLnxTmpfile *tmpf)
tmpf->initialized = FALSE;
}
/* Allocate a temporary file, using Linux O_TMPFILE if available.
/* Allocate a temporary file, using Linux O_TMPFILE if available. The file mode
* will be 0600.
*
* The result will be stored in @out_tmpf, which is caller allocated
* so you can store it on the stack in common scenarios.
*
* Note that with O_TMPFILE, the file mode will be `000`; you likely
* want to chmod it before calling glnx_link_tmpfile_at().
*
* The directory fd @dfd must live at least as long as the output @out_tmpf.
*/
gboolean
@ -185,6 +193,7 @@ glnx_open_tmpfile_linkable_at (int dfd,
GLnxTmpfile *out_tmpf,
GError **error)
{
const guint mode = 0600;
glnx_fd_close int fd = -1;
int count;
@ -200,11 +209,16 @@ glnx_open_tmpfile_linkable_at (int dfd,
* link_tmpfile() below to rename the result after writing the file
* in full. */
#if defined(O_TMPFILE) && !defined(DISABLE_OTMPFILE) && !defined(ENABLE_WRPSEUDO_COMPAT)
fd = openat (dfd, subpath, O_TMPFILE|flags, 0600);
fd = openat (dfd, subpath, O_TMPFILE|flags, mode);
if (fd == -1 && !(G_IN_SET(errno, ENOSYS, EISDIR, EOPNOTSUPP)))
return glnx_throw_errno_prefix (error, "open(O_TMPFILE)");
if (fd != -1)
{
/* Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=17523
* See also https://github.com/ostreedev/ostree/issues/991
*/
if (fchmod (fd, mode) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
out_tmpf->initialized = TRUE;
out_tmpf->src_dfd = dfd; /* Copied; caller must keep open */
out_tmpf->fd = glnx_steal_fd (&fd);
@ -221,7 +235,7 @@ glnx_open_tmpfile_linkable_at (int dfd,
{
glnx_gen_temp_name (tmp);
fd = openat (dfd, tmp, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|flags, 0600);
fd = openat (dfd, tmp, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|flags, mode);
if (fd < 0)
{
if (errno == EEXIST)
@ -373,6 +387,35 @@ glnx_link_tmpfile_at (GLnxTmpfile *tmpf,
return TRUE;
}
/**
* glnx_openat_rdonly:
* @dfd: File descriptor for origin directory
* @path: Pathname, relative to @dfd
* @follow: Whether or not to follow symbolic links in the final component
* @out_fd: (out): File descriptor
* @error: Error
*
* Use openat() to open a file, with flags `O_RDONLY | O_CLOEXEC | O_NOCTTY`.
* Like the other libglnx wrappers, will use `TEMP_FAILURE_RETRY` and
* also includes @path in @error in case of failure.
*/
gboolean
glnx_openat_rdonly (int dfd,
const char *path,
gboolean follow,
int *out_fd,
GError **error)
{
int flags = O_RDONLY | O_CLOEXEC | O_NOCTTY;
if (!follow)
flags |= O_NOFOLLOW;
int fd = TEMP_FAILURE_RETRY (openat (dfd, path, flags));
if (fd == -1)
return glnx_throw_errno_prefix (error, "openat(%s)", path);
*out_fd = fd;
return TRUE;
}
static guint8*
glnx_fd_readall_malloc (int fd,
gsize *out_len,
@ -510,9 +553,9 @@ glnx_file_get_contents_utf8_at (int dfd,
{
dfd = glnx_dirfd_canonicalize (dfd);
glnx_fd_close int fd = TEMP_FAILURE_RETRY (openat (dfd, subpath, O_RDONLY | O_NOCTTY | O_CLOEXEC));
if (G_UNLIKELY (fd == -1))
return glnx_null_throw_errno_prefix (error, "open(%s)", subpath);
glnx_fd_close int fd = -1;
if (!glnx_openat_rdonly (dfd, subpath, TRUE, &fd, error))
return NULL;
gsize len;
g_autofree char *buf = glnx_fd_readall_utf8 (fd, &len, cancellable, error);
@ -808,12 +851,8 @@ glnx_file_copy_at (int src_dfd,
goto out;
}
src_fd = TEMP_FAILURE_RETRY (openat (src_dfd, src_subpath, O_RDONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW));
if (src_fd == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
if (!glnx_openat_rdonly (src_dfd, src_subpath, FALSE, &src_fd, error))
goto out;
dest_open_flags = O_WRONLY | O_CREAT | O_CLOEXEC | O_NOCTTY;
if (!(copyflags & GLNX_FILE_COPY_OVERWRITE))
@ -1008,28 +1047,3 @@ glnx_file_replace_contents_with_perms_at (int dfd,
return TRUE;
}
/**
* glnx_stream_fstat:
* @stream: A stream containing a Unix file descriptor
* @stbuf: Memory location to write stat buffer
* @error:
*
* Some streams created via libgsystem are #GUnixInputStream; these do
* not support e.g. g_file_input_stream_query_info(). This function
* allows dropping to the raw unix fstat() call for these types of
* streams, while still conveniently wrapped with the normal GLib
* handling of @error.
*/
gboolean
glnx_stream_fstat (GFileDescriptorBased *stream,
struct stat *stbuf,
GError **error)
{
int fd = g_file_descriptor_based_get_fd (stream);
if (fstat (fd, stbuf) == -1)
return glnx_throw_errno_prefix (error, "fstat");
return TRUE;
}

View File

@ -50,6 +50,23 @@ const char *glnx_basename (const char *path)
return (basename) (path);
}
/* Utilities for standard FILE* */
static inline void
glnx_stdio_file_cleanup (void *filep)
{
FILE *f = filep;
if (f)
fclose (f);
}
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, glnx_stdio_file_cleanup)
/**
* glnx_stdio_file_flush:
* Call fflush() and check ferror().
*/
gboolean
glnx_stdio_file_flush (FILE *f, GError **error);
typedef struct {
gboolean initialized;
gboolean anonymous;
@ -85,6 +102,13 @@ glnx_link_tmpfile_at (GLnxTmpfile *tmpf,
const char *target,
GError **error);
gboolean
glnx_openat_rdonly (int dfd,
const char *path,
gboolean follow,
int *out_fd,
GError **error);
GBytes *
glnx_fd_readall_bytes (int fd,
GCancellable *cancellable,
@ -164,11 +188,6 @@ glnx_file_copy_at (int src_dfd,
GCancellable *cancellable,
GError **error);
gboolean
glnx_stream_fstat (GFileDescriptorBased *stream,
struct stat *stbuf,
GError **error);
int glnx_renameat2_noreplace (int olddirfd, const char *oldpath,
int newdirfd, const char *newpath);
int glnx_renameat2_exchange (int olddirfd, const char *oldpath,
@ -224,8 +243,29 @@ glnx_fstat (int fd,
GError **error)
{
if (TEMP_FAILURE_RETRY (fstat (fd, buf)) != 0)
return glnx_throw_errno (error);
return glnx_throw_errno_prefix (error, "fstat");
return TRUE;
}
/**
* glnx_fchmod:
* @fd: FD
* @mode: Mode
* @error: Return location for a #GError, or %NULL
*
* Wrapper around fchmod() which adds #GError support and ensures that it
* retries on %EINTR.
*
* Returns: %TRUE on success, %FALSE otherwise
* Since: UNRELEASED
*/
static inline gboolean
glnx_fchmod (int fd,
mode_t mode,
GError **error)
{
if (TEMP_FAILURE_RETRY (fchmod (fd, mode)) != 0)
return glnx_throw_errno_prefix (error, "fchmod");
return TRUE;
}

View File

@ -185,6 +185,8 @@ mkdir_p_at_internal (int dfd,
*
* Similar to g_mkdir_with_parents(), except operates relative to the
* directory fd @dfd.
*
* See also glnx_ensure_dir() for a non-recursive version.
*/
gboolean
glnx_shutil_mkdir_p_at (int dfd,

View File

@ -125,6 +125,48 @@ test_error_errno (void)
g_assert_cmpint (fd, ==, -1);
}
static void
test_error_auto_nothrow (GError **error)
{
GLNX_AUTO_PREFIX_ERROR("foo", error);
/* Side effect to avoid otherwise empty function */
g_assert_no_error (*error);
}
static void
test_error_auto_throw (GError **error)
{
GLNX_AUTO_PREFIX_ERROR("foo", error);
(void) glnx_throw (error, "oops");
}
static void
test_error_auto_throw_recurse (GError **error)
{
GLNX_AUTO_PREFIX_ERROR("foo", error);
if (TRUE)
{
GLNX_AUTO_PREFIX_ERROR("bar", error);
(void) glnx_throw (error, "oops");
}
}
static void
test_error_auto (void)
{
g_autoptr(GError) error = NULL;
test_error_auto_nothrow (&error);
g_assert_no_error (error);
test_error_auto_throw (&error);
g_assert_nonnull (error);
g_assert_cmpstr (error->message, ==, "foo: oops");
g_clear_error (&error);
test_error_auto_throw_recurse (&error);
g_assert_nonnull (error);
g_assert_cmpstr (error->message, ==, "foo: bar: oops");
}
int main (int argc, char **argv)
{
int ret;
@ -133,6 +175,7 @@ int main (int argc, char **argv)
g_test_add_func ("/error-throw", test_error_throw);
g_test_add_func ("/error-errno", test_error_errno);
g_test_add_func ("/error-auto", test_error_auto);
ret = g_test_run();

View File

@ -137,12 +137,66 @@ test_renameat2_exchange (void)
g_assert_no_error (local_error);
}
static void
test_tmpfile (void)
{
g_autoptr(GError) local_error = NULL;
GError **error = &local_error;
g_auto(GLnxTmpfile) tmpf = { 0, };
if (!glnx_open_tmpfile_linkable_at (AT_FDCWD, ".", O_WRONLY|O_CLOEXEC, &tmpf, error))
goto out;
if (glnx_loop_write (tmpf.fd, "foo", strlen ("foo")) < 0)
{
(void)glnx_throw_errno_prefix (error, "write");
goto out;
}
if (glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_NOREPLACE, AT_FDCWD, "foo", error))
goto out;
out:
g_assert_no_error (local_error);
}
static void
test_stdio_file (void)
{
g_autoptr(GError) local_error = NULL;
GError **error = &local_error;
g_auto(GLnxTmpfile) tmpf = { 0, };
g_autoptr(FILE) f = NULL;
if (!glnx_open_anonymous_tmpfile (O_RDWR|O_CLOEXEC, &tmpf, error))
goto out;
f = fdopen (tmpf.fd, "w");
if (!f)
{
(void)glnx_throw_errno_prefix (error, "fdopen");
goto out;
}
if (fwrite ("hello", 1, strlen ("hello"), f) != strlen ("hello"))
{
(void)glnx_throw_errno_prefix (error, "fwrite");
goto out;
}
if (!glnx_stdio_file_flush (f, error))
goto out;
out:
g_assert_no_error (local_error);
}
int main (int argc, char **argv)
{
int ret;
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/tmpfile", test_tmpfile);
g_test_add_func ("/stdio-file", test_stdio_file);
g_test_add_func ("/renameat2-noreplace", test_renameat2_noreplace);
g_test_add_func ("/renameat2-exchange", test_renameat2_exchange);

View File

@ -107,22 +107,17 @@ do_write_run (GLnxDirFdIterator *dfd_iter, GError **error)
{
while (TRUE)
{
g_autoptr(GVariant) current_xattrs = NULL;
glnx_fd_close int fd = -1;
struct dirent *dent;
if (!glnx_dirfd_iterator_next_dent (dfd_iter, &dent, NULL, error))
return FALSE;
if (!dent)
break;
fd = openat (dfd_iter->fd, dent->d_name, O_RDONLY | O_CLOEXEC);
if (fd < 0)
{
glnx_set_error_from_errno (error);
return FALSE;
}
glnx_fd_close int fd = -1;
if (!glnx_openat_rdonly (dfd_iter->fd, dent->d_name, FALSE, &fd, error))
return FALSE;
g_autoptr(GVariant) current_xattrs = NULL;
if (!glnx_fd_get_all_xattrs (fd, &current_xattrs, NULL, error))
return FALSE;
@ -156,22 +151,17 @@ do_read_run (GLnxDirFdIterator *dfd_iter,
guint nattrs = 0;
while (TRUE)
{
g_autoptr(GVariant) current_xattrs = NULL;
glnx_fd_close int fd = -1;
struct dirent *dent;
if (!glnx_dirfd_iterator_next_dent (dfd_iter, &dent, NULL, error))
return FALSE;
if (!dent)
break;
fd = openat (dfd_iter->fd, dent->d_name, O_RDONLY | O_CLOEXEC);
if (fd < 0)
{
glnx_set_error_from_errno (error);
return FALSE;
}
glnx_fd_close int fd = -1;
if (!glnx_openat_rdonly (dfd_iter->fd, dent->d_name, FALSE, &fd, error))
return FALSE;
g_autoptr(GVariant) current_xattrs = NULL;
if (!glnx_fd_get_all_xattrs (fd, &current_xattrs, NULL, error))
return FALSE;

View File

@ -1,40 +0,0 @@
'\" t
.\" Title: ostree admin cleanup
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin cleanup
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN CLEANUP" "1" "" "OSTree" "ostree admin cleanup"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-cleanup \- Delete untagged deployments and repository objects
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ cleanup\ \fR\ 'u
\fBostree admin cleanup \fR
.SH "DESCRIPTION"
.PP
OSTree sysroot cleans up other bootversions and old deployments\&. If/when a pull or deployment is interrupted, a partially written state may remain on disk\&. This command cleans up any such partial states\&.
.SH "EXAMPLE"
.PP
\fB$ ostree admin cleanup\fR

View File

@ -1,58 +0,0 @@
'\" t
.\" Title: ostree admin config-diff
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin config-diff
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN CONFIG\" "1" "" "OSTree" "ostree admin config-diff"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-config-diff \- Diff current /etc configuration versus default
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ config\-diff\fR\ 'u
\fBostree admin config\-diff\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
Prints the differences between the current /etc directory and the default configuration in /usr/etc\&. Newly added files (present in /etc but not in /usr/etc) will be prefixed with \*(AqA\*(Aq\&. Modified files will be prefixed with \*(AqM\*(Aq, and deleted files with \*(AqD\*(Aq\&.
.SH "OPTIONS"
.PP
\fB\-\-os\fR="STATEROOT"
.RS 4
Use a different operating system stateroot than the current one\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree admin config\-diff\fR
.sp
.if n \{\
.RS 4
.\}
.nf
M shadow
A example\&.txt
.fi
.if n \{\
.RE
.\}

View File

@ -1,113 +0,0 @@
'\" t
.\" Title: ostree admin deploy
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin deploy
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN DEPLOY" "1" "" "OSTree" "ostree admin deploy"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-deploy \- Checkout a revision as the new default deployment
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ deploy\fR\ 'u
\fBostree admin deploy\fR [OPTIONS...] {REFSPEC}
.SH "DESCRIPTION"
.PP
Takes a commit or revision REFSPEC, and queues the new deployment as default upon reboot\&.
.SH "OPTIONS"
.PP
\fB\-\-os\fR="STATEROOT"
.RS 4
Use a different operating system root than the current one\&.
.RE
.PP
\fB\-\-origin\-file\fR="FILENAME"
.RS 4
Use FILENAME as the origin, which is where OSTree will look for updated versions of the tree\&.
.RE
.PP
\fB\-\-retain\fR
.RS 4
Do not delete previous deployment\&.
.RE
.PP
\fB\-\-karg\-proc\-cmdline\fR
.RS 4
Import current /proc/cmdline\&.
.RE
.PP
\fB\-\-karg\fR="NAME=VALUE"
.RS 4
Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name\&.
.RE
.PP
\fB\-\-karg\-append\fR="NAME=VALUE"
.RS 4
Append kernel argument; useful with e\&.g\&. console= that can be used multiple times\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree admin status\fR
.sp
.if n \{\
.RS 4
.\}
.nf
* gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree admin deploy gnome\-ostree/buildmaster/x86_64\-runtime\fR
.sp
.if n \{\
.RS 4
.\}
.nf
ostadmin: Creating deployment /ostree/deploy/gnome\-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.1
ostadmin: Processing /etc: 3 modified, 0 removed, 29 added
Transaction complete: bootconfig swap: no deployment count change: 0)
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree admin status\fR
.sp
.if n \{\
.RS 4
.\}
.nf
gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.1
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
* gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}

View File

@ -1,54 +0,0 @@
'\" t
.\" Title: ostree admin init-fs
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin init-fs
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN INIT\-F" "1" "" "OSTree" "ostree admin init-fs"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-init-fs \- Initialize a new root filesystem
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ init\-fs\fR\ 'u
\fBostree admin init\-fs\fR [OPTIONS...] {PATH}
.SH "DESCRIPTION"
.PP
Initialize an empty physical root filesystem in the designated PATH, with normal toplevels and correct permissions for each directory\&. Primarily useful for operating system installers\&.
.SH "EXAMPLE"
.PP
\fB$ mkdir /example\fR
.PP
\fB$ ostree admin init\-fs /example\fR
.PP
\fB$ ls /example \fR
.PP
\fIboot\fR\ \&\ \&
\fIdev\fR\ \&\ \&
\fIhome\fR\ \&\ \&
\fIostree\fR\ \&\ \&
\fIproc\fR\ \&\ \&
\fIroot\fR\ \&\ \&
\fIrun\fR\ \&\ \&
\fIsys\fR\ \&\ \&
\fItmp\fR

View File

@ -1,48 +0,0 @@
'\" t
.\" Title: ostree admin instutil
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin instutil
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN INSTUTI" "1" "" "OSTree" "ostree admin instutil"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-instutil \- Utility functions intended primarily for operating system installation programs
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ instutil\fR\ 'u
\fBostree admin instutil\fR {SUBCOMMAND} [ARGS]
.SH "DESCRIPTION"
.PP
Use the subcommands to toggle admin installation utilities for selinux policies and kernel arguments\&.
.SH "SUBCOMMANDS"
.PP
.HP \w'\fBselinux\-ensure\-labeled\fR\ 'u \fBselinux\-ensure\-labeled\fR [SUBPATH\ PREFIX]
.RS 4
Ensure all files and directories are labeled according to SELinux policy of the first deployment\&.
.RE
.PP
.HP \w'\fBset\-kargs\fR\ 'u \fBset\-kargs\fR [\-\-merge] [\-\-import\-proc\-cmdline] [\-\-append="NAME=VALUE"] [\-\-replace="NAME=VALUE"] [MORE_APPEND_ARGS]
.RS 4
Replace the kernel arguments of the default deployment\&. The new arguments are based on an empty list (the default), the current options (\-\-merge), or the arguments of the loaded kernel (\-\-import\-proc\-cmdline), and new options either are added to the end (\-\-append="NAME=VALUE") or replace existing arguments of the same name (\-\-replace="NAME=VALUE")\&.
.RE

View File

@ -1,53 +0,0 @@
'\" t
.\" Title: ostree admin os-init
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin os-init
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN OS\-INI" "1" "" "OSTree" "ostree admin os-init"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-os-init \- Initialize empty state for a given operating system
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ os\-init\fR\ 'u
\fBostree admin os\-init\fR {STATEROOT}
.SH "DESCRIPTION"
.PP
Initializes an new stateroot (AKA "osname") for an operating system\&. Ensures that the core subdirectories of /var (/tmp, /lib, /run, and /lock) exist and initialize the given STATEROOT as OSTree stateroot\&. Each deployment location is comprised of a single shared
var
and a set of deployments (chroots)\&.
.SH "EXAMPLE"
.PP
\fB$ ostree admin os\-init exampleos\fR
.sp
.if n \{\
.RS 4
.\}
.nf
ostree/deploy/exampleos initialized as OSTree root
.fi
.if n \{\
.RE
.\}

View File

@ -1,56 +0,0 @@
'\" t
.\" Title: ostree admin set-origin
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin set-origin
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN SET\-OR" "1" "" "OSTree" "ostree admin set-origin"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-set-origin \- Change the "origin" (location for upgrades)
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ set\-origin\ \fR\ 'u
\fBostree admin set\-origin \fR {REMOTENAME} {URL} [BRANCH]
.SH "DESCRIPTION"
.PP
Add a new remote named
\fIREMOTENAME\fR
(if it does not already exist)\&. Then change the origin file for the current deployment\&. This is the ref that will be "tracked" and upgraded with
\fBostree admin upgrade\fR\&.
.SH "OPTIONS"
.PP
\fB\-\-set\fR=KEY=VALUE
.RS 4
Set an option for the remote\&.
.RE
.PP
\fB\-\-index\fR=INDEX
.RS 4
Change the origin of the deployment numbered
\fIINDEX\fR
(starting from 0)\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree admin set\-origin exampleos http://os\&.example\&.com/repo exampleos/10\&.0/master/router\fR

View File

@ -1,53 +0,0 @@
'\" t
.\" Title: ostree admin status
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin status
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN STATUS" "1" "" "OSTree" "ostree admin status"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-status \- List deployments
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ status\fR\ 'u
\fBostree admin status\fR
.SH "DESCRIPTION"
.PP
Lists the deployments available to be booted into\&. Includes osname, the checksum followed by the deploy serial, and the refspec\&. An asterisk indicates the current booted deployment\&.
.SH "EXAMPLE"
.PP
\fB$ ostree admin status\fR
.sp
.if n \{\
.RS 4
.\}
.nf
* gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}

View File

@ -1,47 +0,0 @@
'\" t
.\" Title: ostree admin switch
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin switch
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN SWITCH" "1" "" "OSTree" "ostree admin switch"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-switch \- Construct new tree from current origin and deploy it, if it changed
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ switch\fR\ 'u
\fBostree admin switch\fR {REF}
.SH "DESCRIPTION"
.PP
Choose a different REF forom the current remote to track\&. This is the ref that will be "tracked" and upgraded with
\fBostree admin upgrade\fR\&. Like an upgrade, the operating system state will be preserved\&.
.SH "OPTIONS"
.PP
\fB\-\-os\fR="STATEROOT"
.RS 4
Use a different operating system root than the current one\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree admin switch fedostree/20/workstation/gnome/core\fR

View File

@ -1,80 +0,0 @@
'\" t
.\" Title: ostree admin undeploy
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin undeploy
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN UNDEPLO" "1" "" "OSTree" "ostree admin undeploy"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-undeploy \- Delete deployment at a given index
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ undeploy\fR\ 'u
\fBostree admin undeploy\fR {INDEX}
.SH "DESCRIPTION"
.PP
Deletes the deployment at INDEX\&. INDEX must be in range and not reference the currently booted deployment\&.
.SH "EXAMPLE"
.PP
\fB$ ostree admin status\fR
.sp
.if n \{\
.RS 4
.\}
.nf
* gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree admin undeploy 1\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Transaction complete; bootconfig swap: no deployment count change: \-1)
Freed objects: 326\&.5 kB
Deleted deployment ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree admin status\fR
.sp
.if n \{\
.RS 4
.\}
.nf
* gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0
origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}

View File

@ -1,46 +0,0 @@
'\" t
.\" Title: ostree admin unlock
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin unlock
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN UNLOCK" "1" "" "OSTree" "ostree admin unlock"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-unlock \- Prepare the current deployment for hotfix or development
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ unlock\fR\ 'u
\fBostree admin unlock\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
Remove the read\-only bind mount on
/usr
and replace it with a writable overlay filesystem\&. This default invocation of "unlock" is intended for development/testing purposes\&. All changes in the overlay are lost on reboot\&. However, this command also supports "hotfixes", see below\&.
.SH "OPTIONS"
.PP
\fB\-\-hotfix\fR
.RS 4
If this option is provided, the current deployment will be cloned as a rollback target\&. This option is intended for things like emergency security updates to userspace components such as
sshd\&. The semantics here differ from the default "development" unlock mode in that reboots will retain any changes (which is what you likely want for security hotfixes)\&.
.RE

View File

@ -1,85 +0,0 @@
'\" t
.\" Title: ostree admin upgrade
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin upgrade
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN UPGRADE" "1" "" "OSTree" "ostree admin upgrade"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin-upgrade \- Construct new tree from current origin and deploy it, if it changed
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\ upgrade\fR\ 'u
\fBostree admin upgrade\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
Downloads the latest version of the current ref from the build server and deploys it, if it changed\&. Reboot the machine for the changes to take effect\&. These phases can be split via
\fB\-\-pull\-only\fR
and
\fB\-\-deploy\-only\fR\&.
.SH "OPTIONS"
.PP
\fB\-\-os\fR="STATEROOT"
.RS 4
Use a different operating system root than the current one\&.
.RE
.PP
\fB\-\-pull\-only\fR
.RS 4
Only perform a pull into the repository; do not create a deployment\&. This option can hence safely be used in a background scheduled job with the assurance of not changing system state\&.
.RE
.PP
\fB\-\-deploy\-only\fR
.RS 4
Create a new deployment from the latest commit in the tracked origin refspec\&. This option is intended to be used by a scheduled system that detected changes via
\fB\-\-pull\-only\fR, and is ready to deploy them\&.
.RE
.PP
\fB\-\-reboot\fR,\fB\-r\fR
.RS 4
Reboot after a successful upgrade\&.
.RE
.PP
\fB\-\-allow\-downgrade\fR
.RS 4
Permit deployment of chronologically older trees\&.
.RE
.PP
\fB\-\-override\-commit\fR="CHECKSUM"
.RS 4
Deploy CHECKSUM instead of the latest tree\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree admin upgrade\fR
.sp
.if n \{\
.RS 4
.\}
.nf
No update available\&.
.fi
.if n \{\
.RE
.\}

View File

@ -1,179 +0,0 @@
'\" t
.\" Title: ostree admin
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree admin
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE ADMIN" "1" "" "OSTree" "ostree admin"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-admin \- Use one of the ostree admin commands
.SH "SYNOPSIS"
.HP \w'\fBostree\ admin\fR\ 'u
\fBostree admin\fR {SUBCOMMAND}
.SH "DESCRIPTION"
.PP
Use ostree admin subcommands\&.
.SH "SUBCOMMANDS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBcleanup\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBconfig\-diff\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBdeploy\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBinit\-fs\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBinstutil\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBos\-init\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBstatus\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBset\-origin\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBswitch\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBundeploy\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBupgrade\fR
.RE
.PP
View manpages for each admin subcommand using, for example:
.PP
\fB$ man ostree\-admin cleanup\fR
.SH "OPTIONS"
.PP
\fB\-\-help\fR, \fB\-h\fR
.RS 4
Usage help
.RE
.PP
\fB\-\-sysroot\fR="PATH"
.RS 4
Creates a new OSTree sysroot at PATH
.RE
.PP
\fB\-\-print\-current\-dir\fR
.RS 4
Prints the full path to the deployment directory for the currently active deployment in the specified sysroot to standard out\&. This is incompatible with specifying a subcommand\&.
.RE

View File

@ -1,50 +0,0 @@
'\" t
.\" Title: ostree cat
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree cat
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE CAT" "1" "" "OSTree" "ostree cat"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-cat \- Display or concatenate contents of files
.SH "SYNOPSIS"
.HP \w'\fBostree\ cat\fR\ 'u
\fBostree cat\fR {COMMIT} {PATH...}
.SH "DESCRIPTION"
.PP
This command functions much like the typical Unix "cat" command, in that it displays the contents of a file, or concatenates them given two or more files\&. However, this command requires the user to specify a commit \- a checksum or refspec corresponding to a given build\&. If you use a refspec, OSTree will refer to the most recent commit, unless you specify a parent build using the carat (^) at the end of the refspec\&. It will then operate the command in that given commit\&.
.SH "EXAMPLE"
.PP
\fB$ ostree cat my\-branch helloworld\&.txt\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Hello, world!
.fi
.if n \{\
.RE
.\}

View File

@ -1,90 +0,0 @@
'\" t
.\" Title: ostree checkout
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree checkout
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE CHECKOUT" "1" "" "OSTree" "ostree checkout"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-checkout \- Check out a commit into a filesystem
.SH "SYNOPSIS"
.HP \w'\fBostree\ checkout\fR\ 'u
\fBostree checkout\fR [OPTIONS...] {COMMIT} [DESTINATION]
.SH "DESCRIPTION"
.PP
Checks out the given commit into the filesystem under directory DESTINATION\&. If DESTINATION is not specified, the COMMIT will become the destination checkout target\&. If COMMIT destination already exists, command will error unless
\fB\-\-union\fR
option is selected\&.
.SH "OPTIONS"
.PP
\fB\-\-user\-mode\fR,\fB \-u\fR
.RS 4
Do not change file ownership or initialize extended attributes\&.
.RE
.PP
\fB\-\-subpath\fR="PATH"
.RS 4
Checkout sub\-directory PATH\&.
.RE
.PP
\fB\-\-union\fR
.RS 4
Keep existing directories and unchanged files, overwrite existing files\&.
.RE
.PP
\fB\-\-union\-add\fR
.RS 4
Keep existing directories and files\&.
.RE
.PP
\fB\-\-allow\-noent\fR
.RS 4
Do nothing if specified path does not exist\&.
.RE
.PP
\fB\-\-from\-stdin\fR
.RS 4
Process many checkouts from standard input\&.
.RE
.PP
\fB\-\-from\-file\fR="FILE"
.RS 4
Process many checkouts from input file\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree checkout my\-branch\fR
.PP
\fB$ ls\fR
.sp
.if n \{\
.RS 4
.\}
.nf
file1\ \&\ \&\ \&\ \&file2\ \&\ \&\ \&\ \&\fImy\-branch\fR
.fi
.if n \{\
.RE
.\}

View File

@ -1,50 +0,0 @@
'\" t
.\" Title: ostree checksum
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree checksum
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE CHECKSUM" "1" "" "OSTree" "ostree checksum"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-checksum \- Checksum a file or directory
.SH "SYNOPSIS"
.HP \w'\fBostree\ checksum\fR\ 'u
\fBostree checksum\fR {PATH}
.SH "DESCRIPTION"
.PP
Generates a checksum for a given file or directory\&.
.SH "EXAMPLE"
.PP
\fB$ ostree checksum file1\fR
.sp
.if n \{\
.RS 4
.\}
.nf
67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
.fi
.if n \{\
.RE
.\}

View File

@ -1,161 +0,0 @@
'\" t
.\" Title: ostree commit
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree commit
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE COMMIT" "1" "" "OSTree" "ostree commit"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-commit \- Commit a new revision
.SH "SYNOPSIS"
.HP \w'\fBostree\ commit\fR\ 'u
\fBostree commit\fR [OPTIONS...] \-\-branch= {BRANCH} [PATH]
.SH "DESCRIPTION"
.PP
This allows you to commit changes to a branch\&. The specification of the branch is required\&. The command will print the checksum of a successful commit\&.
.SH "OPTIONS"
.PP
\fB\-\-subject\fR, \fB\-s\fR="SUBJECT"
.RS 4
One line subject\&. (optional)
.RE
.PP
\fB\-\-body\fR, \fB\-m\fR="BODY"
.RS 4
Full description\&. (optional)
.RE
.PP
\fB\-\-editor\fR, \fB\-e\fR
.RS 4
Open a text editor for the commit description\&. It will use OSTREE_EDITOR, VISUAL, EDITOR, or vi, in descending order of preference\&. The commit will be aborted if the message is left empty\&.
.RE
.PP
\fB\-\-branch\fR, \fB\-b\fR="BRANCH"
.RS 4
Branch\&. Required, unless \-\-orphan is given\&.
.RE
.PP
\fB\-\-tree\fR="dir=PATH" or "tar=TARFILE" or "ref=COMMIT"
.RS 4
Overlay the given argument as a tree\&.
.RE
.PP
\fB\-\-add\-metadata\-string\fR="KEY=VALUE"
.RS 4
Add a key/value pair to metadata\&.
.RE
.PP
\fB\-\-add\-detached\-metadata\-string\fR="KEY=VALUE"
.RS 4
Add a key/value pair to detached metadata\&.
.RE
.PP
\fB\-\-owner\-uid\fR="UID"
.RS 4
Set file ownership user id\&.
.RE
.PP
\fB\-\-owner\-gid\fR="GID"
.RS 4
Set file ownership group id\&.
.RE
.PP
\fB\-\-no\-xattrs\fR
.RS 4
Do not import extended attributes\&.
.RE
.PP
\fB\-\-link\-checkout\-speedup\fR
.RS 4
Optimize for commits of trees composed of hardlinks into the repository\&.
.RE
.PP
\fB\-\-tar\-autocreate\-parents\fR
.RS 4
When loading tar archives, automatically create parent directories as needed\&.
.RE
.PP
\fB\-\-skip\-if\-unchanged\fR
.RS 4
If the contents are unchanged from previous commit, do nothing\&.
.RE
.PP
\fB\-\-statoverride\fR="PATH"
.RS 4
File containing list of modifications to make permissions (file mode, followed by space, followed by file path)\&.
.RE
.PP
\fB\-\-skip\-list\fR="PATH"
.RS 4
File containing list of file paths to skip (one path per line)\&.
.RE
.PP
\fB\-\-table\-output\fR
.RS 4
Output more information in a KEY: VALUE format\&.
.RE
.PP
\fB\-\-generate\-sizes\fR
.RS 4
Generate size information along with commit metadata\&.
.RE
.PP
\fB\-\-gpg\-sign\fR="KEY\-ID"
.RS 4
GPG Key ID with which to sign the commit (if have GPGME \- GNU Privacy Guard Made Easy)\&.
.RE
.PP
\fB\-\-gpg\-homedir\fR="HOMEDIR"
.RS 4
GPG home directory to use when looking for keyrings (if have GPGME \- GNU Privacy Guard Made Easy)\&.
.RE
.PP
\fB\-\-timestamp\fR="TIMESTAMP"
.RS 4
Override the timestamp of the commit to TIMESTAMP\&.
.RE
.PP
\fB\-\-orphan\fR
.RS 4
Create a commit without writing to a ref (branch)
.RE
.PP
\fB\-\-fsync\fR="POLICY"
.RS 4
POLICY is a boolean which specifies whether fsync should be used or not\&. Default to true\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree commit \-\-branch=my\-branch \-\-subject="Initial commit"\fR
.sp
.if n \{\
.RS 4
.\}
.nf
67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
.fi
.if n \{\
.RE
.\}

View File

@ -1,44 +0,0 @@
'\" t
.\" Title: ostree config
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree config
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE CONFIG" "1" "" "OSTree" "ostree config"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-config \- Change configuration settings
.SH "SYNOPSIS"
.HP \w'\fBostree\ config\ get\fR\ 'u
\fBostree config get\fR {SECTIONNAME\&.KEYNAME}
.HP \w'\fBostree\ config\ set\fR\ 'u
\fBostree config set\fR {SECTIONNAME\&.KEYNAME} {VALUE}
.SH "DESCRIPTION"
.PP
Displays or changes a configuration setting\&.
.SH "EXAMPLE"
.PP
\fB$ ostree config get core\&.mode\fR
.PP
bare

View File

@ -1,85 +0,0 @@
'\" t
.\" Title: ostree diff
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree diff
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE DIFF" "1" "" "OSTree" "ostree diff"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-diff \- Compare a directory against a revision
.SH "SYNOPSIS"
.HP \w'\fBostree\ diff\fR\ 'u
\fBostree diff\fR [OPTIONS...] {REV} {TARGETDIR}
.SH "DESCRIPTION"
.PP
Compare directory TARGETDIR against revision REV\&. Shows files and directories modified, added, and deleted\&. If there is a file in TARGETDIR not in REV, it will show with an "A" for "added"\&. If a file in REV is not in TARGETDIR, it shows "D" for "deleted"\&. "M" for "modified" will also show\&.
.SH "OPTIONS"
.PP
\fB\-\-stats\fR
.RS 4
Print various statistics\&.
.RE
.PP
\fB\-\-fs\-diff\fR
.RS 4
Print filesystem diff\&.
.RE
.PP
\fB\-\-owner\-uid\fR
.RS 4
Use file ownership user id for local files\&.
.RE
.PP
\fB\-\-owner\-gid\fR
.RS 4
Use file ownership group id for local files\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree diff my\-branch^ my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
A /testdirectory
M /helloworld\&.txt
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree diff my\-branch my\-branch^\fR
.sp
.if n \{\
.RS 4
.\}
.nf
D /testdirectory
M /helloworld\&.txt
.fi
.if n \{\
.RE
.\}

View File

@ -1,40 +0,0 @@
'\" t
.\" Title: ostree export
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree export
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE EXPORT" "1" "" "OSTree" "ostree export"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-export \- Generate a tar archive from an OSTree commit
.SH "SYNOPSIS"
.HP \w'\fBostree\ export\fR\ 'u
\fBostree export\fR [OPTIONS...] {BRANCH}
.SH "DESCRIPTION"
.PP
This command generates a GNU tar formatted archive from an OSTree commit\&. This is useful for cases like backups, converting OSTree commits into Docker images, and the like\&.
.SH "EXAMPLE"
.PP
\fB$ ostree export exampleos/x86_64/standard | gzip > exampleos\-standard\&.tar\&.gz\fR

View File

@ -1,69 +0,0 @@
'\" t
.\" Title: ostree fsck
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree fsck
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE FSCK" "1" "" "OSTree" "ostree fsck"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-fsck \- Check the repository for consistency
.SH "SYNOPSIS"
.HP \w'\fBostree\ fsck\fR\ 'u
\fBostree fsck\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
Checks the repository to verify the content integrity of commit objects\&. Looks for missing and corrupted objects and metadata, and validates directory structure and metadata\&.
.SH "OPTIONS"
.PP
\fB\-\-quiet\fR,\fB\-q\fR
.RS 4
Only print error messages\&.
.RE
.PP
\fB\-\-delete\fR
.RS 4
Remove corrupted objects\&.
.RE
.PP
\fB\-\-add\-tombstones\fR
.RS 4
Add tombstone commit for referenced but missing commits\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree fsck\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Enumerating objects\&.\&.\&.
Verifying content integrity of of 2 commit objects
0/2572 objects
2571/2572 objects
.fi
.if n \{\
.RE
.\}

View File

@ -1,48 +0,0 @@
'\" t
.\" Title: ostree gpg-sign
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree gpg-sign
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE GPG\-SIGN" "1" "" "OSTree" "ostree gpg-sign"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-gpg-sign \- Sign a commit
.SH "SYNOPSIS"
.HP \w'\fBostree\ gpg\-sign\fR\ 'u
\fBostree gpg\-sign\fR [OPTIONS...] {COMMIT} {KEY\-ID...}
.SH "DESCRIPTION"
.PP
Add a new signature to a commit for each specified GPG key\&. Note that currently, this will append a new signature even if the commit is already signed with a given key\&.
.SH "OPTIONS"
.PP
\fB\-\-delete\fR
.RS 4
Delete signatures having any of the GPG KEY\-IDs\&.
.RE
.PP
\fB\-\-gpg\-homedir\fR="HOMEDIR"
.RS 4
GPG Homedir to use when looking for keyrings\&.
.RE

View File

@ -1,54 +0,0 @@
'\" t
.\" Title: ostree init
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/04/2017
.\" Manual: ostree init
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE INIT" "1" "" "OSTree" "ostree init"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-init \- Initialize a new empty repository
.SH "SYNOPSIS"
.HP \w'\fBostree\ init\fR\ 'u
\fBostree init\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
Creates a new empty repository\&.
.SH "OPTIONS"
.PP
\fB\-\-mode\fR="MODE"
.RS 4
Initialize repository in given mode (bare, bare\-user, archive\-z2)\&. Default is "bare"\&.
.RE
.PP
\fB\-\-collection\-id\fR=COLLECTION\-ID
.RS 4
Set the collection ID of the repository\&. Remotes in clones of this repository must configure the same value in order to pull refs which originated in this repository over peer to peer\&.
.sp
This collection ID must be persistent and globally unique\&. It is formatted as a reverse DNS name (like a D\-Bus interface)\&. It must be set to a reverse DNS domain under your control\&.
.sp
This option may be omitted (the default) to leave peer to peer distribution unsupported for the repository\&. A collection ID may be added to an existing repository in future to enable peer to peer distribution from that point onwards\&.
.sp
If the collection ID is changed for the repository in future, peer to peer distribution of refs from the repository will break for all peers who do not update their remote configuration to the new collection ID\&.
.RE

View File

@ -1,62 +0,0 @@
'\" t
.\" Title: ostree log
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree log
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE LOG" "1" "" "OSTree" "ostree log"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-log \- Show log starting at a commit or ref
.SH "SYNOPSIS"
.HP \w'\fBostree\ log\fR\ 'u
\fBostree log\fR [OPTIONS...] {REF}
.SH "DESCRIPTION"
.PP
Shows a log of commits to a given ref or branch\&. Includes commit checksum, timestamp, and commit message\&.
.SH "OPTIONS"
.PP
\fB\-\-raw\fR
.RS 4
Show raw variant data\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree log my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
Date: 2014\-06\-12 13:42:54 +0000
This is the second commit
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e
Date: 2014\-06\-12 11:20:08 +0000
Initial commit
.fi
.if n \{\
.RE
.\}

View File

@ -1,80 +0,0 @@
'\" t
.\" Title: ostree ls
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree ls
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE LS" "1" "" "OSTree" "ostree ls"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-ls \- List file paths
.SH "SYNOPSIS"
.HP \w'\fBostree\ ls\fR\ 'u
\fBostree ls\fR [OPTIONS...] {COMMIT} [PATHS...]
.SH "DESCRIPTION"
.PP
Prints a list of file paths within the given commit, and within the given path(s) if specified\&. The first letter of the file line output specifies the type: "\-" for regular file, "d" for directory, "l" for symbolic link\&. See EXAMPLE section for more detail on the specific output\&.
.SH "OPTIONS"
.PP
\fB\-\-dironly\fR,\fB\-d\fR
.RS 4
Do not recurse into directory arguments\&.
.RE
.PP
\fB\-\-recursive\fR,\fB\-R\fR
.RS 4
Print directories recursively\&.
.RE
.PP
\fB\-\-checksum\fR,\fB\-C\fR
.RS 4
Print checksum\&.
.RE
.PP
\fB\-\-xattrs\fR,\fB\-X\fR
.RS 4
Print extended attributes\&.
.RE
.PP
\fB\-\-nul\-filenames\-only\fR
.RS 4
Print only filenames, NUL separated\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree ls my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
d00644 0 0 0 /
\-00644 0 0 2 /helloworld\&.txt
d00755 0 0 0 /testdirectory
.fi
.if n \{\
.RE
.\}
.PP
Here, the first column is the file\-type symbol (as explained in the DESCRIPTION section) followed by the S_IFMT file type\&. The next two columns (here: 0 0) are respectively the user ID and group ID for the file\&. After the break, the next number represents that file\*(Aqs standard size\&. The final column is the file path\&.

View File

@ -1,87 +0,0 @@
'\" t
.\" Title: ostree prune
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree prune
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE PRUNE" "1" "" "OSTree" "ostree prune"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-prune \- Search for unreachable objects
.SH "SYNOPSIS"
.HP \w'\fBostree\ prune\fR\ 'u
\fBostree prune\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
This searches for unreachable objects in the current repository\&. If unreachable objects are found, the command delete them to free space\&. If the
\fB\-\-no\-prune\fR
option is invoked, the command will just print unreachable objects and recommend deleting them\&.
.SH "OPTIONS"
.PP
\fB\-\-no\-prune\fR
.RS 4
Only display unreachable objects; don\*(Aqt delete\&.
.RE
.PP
\fB\-\-refs\-only\fR
.RS 4
Only compute reachability via refs\&.
.RE
.PP
\fB\-\-delete\-commit\fR=COMMIT
.RS 4
Specify a COMMIT to delete\&.
.RE
.PP
\fB\-\-keep\-younger\-than\fR=DATE
.RS 4
All commits older than DATE will be pruned\&. The format of DATE is the same as that accepted by GNU
date
utility \- for more information see
info date\&.
.RE
.PP
\fB\-\-depth\fR=DEPTH
.RS 4
Only traverse DEPTH (integer) parents for each commit (default: \-1=infinite)\&.
.RE
.PP
\fB\-\-static\-deltas\-only\fR=DEPTH
.RS 4
Change the behaviour of \-\-keep\-younger\-than and \-\-delete\-commit to prune only the static deltas files\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree prune\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Total objects: 25627
No unreachable objects
.fi
.if n \{\
.RE
.\}

View File

@ -1,68 +0,0 @@
'\" t
.\" Title: ostree pull-local
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree pull-local
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE PULL\-LOCAL" "1" "" "OSTree" "ostree pull-local"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-pull-local \- Copy data from a source repository
.SH "SYNOPSIS"
.HP \w'\fBostree\ pull\-local\fR\ 'u
\fBostree pull\-local\fR [OPTIONS...] {SOURCE_REPO} [REFS...]
.SH "DESCRIPTION"
.PP
Copies data from a given repository; optimized for copies only between repositories on the same system\&.
.SH "OPTIONS"
.PP
\fB\-\-remote\fR="REMOTE"
.RS 4
Add REMOTE to refspec\&.
.RE
.PP
\fB\-\-disable\-fsync\fR
.RS 4
Do no invoke fsync()\&.
.RE
.PP
\fB\-\-untrusted\fR
.RS 4
Do not trust source, verify checksums and don\*(Aqt hardlink into source\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree pull\-local /ostree/repo\fR
.sp
.if n \{\
.RS 4
.\}
.nf
Enumerating objects\&.\&.\&.
pull: 25709/25709 scanned, 0 objects copied
Writing 5 refs
.fi
.if n \{\
.RE
.\}

View File

@ -1,104 +0,0 @@
'\" t
.\" Title: ostree pull
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/04/2017
.\" Manual: ostree pull
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE PULL" "1" "" "OSTree" "ostree pull"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-pull \- Download data from a remote repository
.SH "SYNOPSIS"
.HP \w'\fBostree\ pull\ \fR\fB{REMOTE}\fR\fB\ \fR\fB[BRANCH]\fR\ 'u
\fBostree pull \fR\fB{REMOTE}\fR\fB \fR\fB[BRANCH]\fR
.SH "OPTIONS"
.PP
\fB\-\-commit\-metadata\-only\fR
.RS 4
Fetch only the commit metadata\&.
.RE
.PP
\fB\-\-disable\-fsync\fR
.RS 4
Do no invoke fsync()\&.
.RE
.PP
\fB\-\-localcache\-repo\fR
.RS 4
Like git\*(Aqs
clone \-\-reference\&. Reuse the provided OSTree repo as a local object cache of objects when doing HTTP fetches\&. May be specified multiple times\&.
.RE
.PP
\fB\-\-untrusted\fR
.RS 4
Do not trust local sources, verify checksums and don\*(Aqt hardlink into source\&.
.RE
.PP
\fB\-\-disable\-static\-deltas\fR
.RS 4
Do not use static deltas\&.
.RE
.PP
\fB\-\-mirror\fR
.RS 4
Write refs suitable for a mirror\&.
.RE
.PP
\fB\-\-subpath\fR=SUBPATH
.RS 4
Only pull the provided subpath\&.
.RE
.PP
\fB\-\-depth\fR=DEPTH
.RS 4
Traverse DEPTH parents (\-1=infinite) (default: 0)\&.
.RE
.SH "DESCRIPTION"
.PP
This command can retrieve just a specific commit, or go all the way to performing a full mirror of the remote repository\&. If no
BRANCH
is specified, all branches are retrieved\&.
.PP
A special syntax in the
@
character allows specifying a specific commit to retrieve from a branch\&. This
.SH "EXAMPLE"
.PP
\fB$ ostree \-\-repo=repo pull \-\-depth=\-1 \-\-mirror remote_name\fR
.PP
Perform a complete mirror of the remote\&. (This is likely most useful if your repository is also
archive\-z2
mode)
.PP
\fB$ ostree \-\-repo=repo pull remote_name exampleos/x86_64/standard\fR
.PP
Fetch the most recent commit to
exampleos/x86_64/standard\&.
.PP
\fB$ ostree \-\-repo=repo pull remote_name exampleos/x86_64/standard@98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4\fR
.PP
Download the specific commit starting with
98ea6e
as if it was the latest commit for
exampleos/x86_64/standard\&.

View File

@ -1,82 +0,0 @@
'\" t
.\" Title: ostree refs
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/04/2017
.\" Manual: ostree refs
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE REFS" "1" "" "OSTree" "ostree refs"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-refs \- List refs
.SH "SYNOPSIS"
.HP \w'\fBostree\ refs\fR\ 'u
\fBostree refs\fR [OPTIONS...] [PREFIX]
.SH "DESCRIPTION"
.PP
Lists all refs available on the host\&. If specified, PREFIX assigns the refspec prefix; default prefix is null, which lists all refs\&.
.SH "OPTIONS"
.PP
\fB\-\-list\fR
.RS 4
For historical reasons,
refs
without this option will strip the specified prefix from the output\&. Normally, one wants to see the full ref, so providing this option ensures the refs are printed in full, rather than truncated\&.
.RE
.PP
\fB\-\-delete\fR
.RS 4
Delete refs which match PREFIX, rather than listing them\&. If you are trying to reclaim space, you will then need to
\fBostree prune\fR
or
\fBostree admin cleanup\fR\&.
.RE
.PP
\fB\-\-collections\fR
.RS 4
Enable interactions with refs using the combination of their collection IDs and ref names\&. When listing refs, this changes the output format to include collection IDs, and enables listing remote mirrored refs\&.
.sp
When creating refs, the refspec value passed to the
\fB\-\-create\fR
option is treated as
COLLECTION\-ID:REF\-NAME
and a mirrored ref is created\&. (This is an abuse of the refspec syntax\&.)
.sp
When deleting refs, all refs whose collection ID equals the value of the
\fB\-\-delete\fR
argument are deleted\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree refs\fR
.sp
.if n \{\
.RS 4
.\}
.nf
my\-branch
gnome\-ostree/buildmaster/x86_64\-runtime
.fi
.if n \{\
.RE
.\}

View File

@ -1,135 +0,0 @@
'\" t
.\" Title: ostree remote
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/04/2017
.\" Manual: ostree remote
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE REMOTE" "1" "" "OSTree" "ostree remote"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-remote \- Control remote repository configuration
.SH "SYNOPSIS"
.HP \w'\fBostree\ remote\ add\fR\ 'u
\fBostree remote add\fR [OPTIONS...] {NAME} {URL} [BRANCH...]
.HP \w'\fBostree\ remote\ delete\fR\ 'u
\fBostree remote delete\fR {NAME}
.HP \w'\fBostree\ remote\ show\-url\fR\ 'u
\fBostree remote show\-url\fR {NAME}
.HP \w'\fBostree\ remote\ list\fR\ 'u
\fBostree remote list\fR [OPTIONS...] {NAME}
.HP \w'\fBostree\ remote\ gpg\-import\fR\ 'u
\fBostree remote gpg\-import\fR [OPTIONS...] {NAME} [KEY\-ID...]
.HP \w'\fBostree\ remote\ refs\fR\ 'u
\fBostree remote refs\fR {NAME}
.HP \w'\fBostree\ remote\ summary\fR\ 'u
\fBostree remote summary\fR [OPTIONS...] {NAME}
.HP \w'\fBostree\ remote\ add\-cookie\fR\ 'u
\fBostree remote add\-cookie\fR {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE}
.HP \w'\fBostree\ remote\ delete\-cookie\fR\ 'u
\fBostree remote delete\-cookie\fR {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE}
.HP \w'\fBostree\ remote\ list\-cookies\fR\ 'u
\fBostree remote list\-cookies\fR {NAME}
.SH "DESCRIPTION"
.PP
Changes remote repository configurations\&. The NAME refers to the name of the remote\&.
.PP
The
\fBgpg\-import\fR
subcommand can associate GPG keys to a specific remote repository for use when pulling signed commits from that repository (if GPG verification is enabled)\&.
.PP
The GPG keys to import may be in binary OpenPGP format or ASCII armored\&. The optional
[KEY\-ID]
list can restrict which keys are imported from a keyring file or input stream\&. All keys are imported if this list is omitted\&. If neither
\fB\-\-keyring\fR
nor
\fB\-\-stdin\fR
options are given, then keys are imported from the user\*(Aqs personal GPG keyring\&.
.PP
The various cookie related command allow management of a remote specific cookie jar\&.
.SH "\*(AQADD\*(AQ OPTIONS"
.PP
\fB\-\-set\fR="KEY=VALUE"
.RS 4
Set config option KEY=VALUE for remote\&.
.RE
.PP
\fB\-\-no\-gpg\-verify\fR
.RS 4
Disable GPG verification\&.
.RE
.PP
\fB\-\-gpg\-import\fR=FILE
.RS 4
Import one or more GPG keys from a file\&.
.sp
Equivalent to
\fBostree remote gpg\-import \-\-keyring=FILE\fR\&.
.RE
.PP
\fB\-\-collection\-id\fR=COLLECTION\-ID
.RS 4
Set the collection ID for the remote to a value provided by the repository owner, which allows refs from this remote to be shared peer to peer\&.
.RE
.SH "\*(AQLIST\*(AQ OPTIONS"
.PP
\fB\-u, \-\-show\-urls\fR
.RS 4
Show remote URLs in list
.RE
.SH "\*(AQGPG\-IMPORT\*(AQ OPTIONS"
.PP
\fB\-k, \-\-keyring\fR=FILE
.RS 4
Import one or more keys from a file\&.
.sp
This option may be repeated to import from multiple files, but may not be used in combination with
\fB\-\-stdin\fR\&.
.RE
.PP
\fB\-\-stdin\fR
.RS 4
Import one or more keys from standard input\&.
.sp
This option may not be used in combination with
\fB\-\-keyring\fR\&.
.RE
.SH "\*(AQSUMMARY\*(AQ OPTIONS"
.PP
\fB\-\-raw\fR
.RS 4
Show raw variant data
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree remote show\-url local\fR
.sp
.if n \{\
.RS 4
.\}
.nf
http://192\&.168\&.122\&.1/repo
.fi
.if n \{\
.RE
.\}

View File

@ -1,72 +0,0 @@
'\" t
.\" Title: ostree reset
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree reset
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE RESET" "1" "" "OSTree" "ostree reset"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-reset \- Reset a ref to a previous commit
.SH "SYNOPSIS"
.HP \w'\fBostree\ reset\ \fR\ 'u
\fBostree reset \fR {REF} {REF_TO_RESET_TO}
.SH "DESCRIPTION"
.PP
Given a commit, this command will reset the ref to a previous specified commit\&.
.SH "EXAMPLE"
.PP
\fB$ ostree log my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07
Date: 2014\-06\-12 13:42:54 +0000
This is the second commit
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c
Date: 2014\-06\-12 11:20:08 +0000
Initial commit
.fi
.if n \{\
.RE
.\}
.PP
\fB$ ostree reset my\-branch my\-branch^\fR
.PP
\fB$ ostree log my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c
Date: 2014\-06\-12 11:20:08 +0000
Initial commit
.fi
.if n \{\
.RE
.\}

View File

@ -1,50 +0,0 @@
'\" t
.\" Title: ostree rev-parse
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree rev-parse
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE REV\-PARSE" "1" "" "OSTree" "ostree rev-parse"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-rev-parse \- Output the target of a rev
.SH "SYNOPSIS"
.HP \w'\fBostree\ rev\-parse\ \fR\ 'u
\fBostree rev\-parse \fR {REV} {PATH}
.SH "DESCRIPTION"
.PP
Given a REV, outputs the checksum of the latest commit of that revision\&.
.SH "EXAMPLE"
.PP
\fB$ ostree rev\-parse my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e
.fi
.if n \{\
.RE
.\}

View File

@ -1,84 +0,0 @@
'\" t
.\" Title: ostree show
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree show
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE SHOW" "1" "" "OSTree" "ostree show"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-show \- Output a metadata object
.SH "SYNOPSIS"
.HP \w'\fBostree\ show\fR\ 'u
\fBostree show\fR [OPTIONS...] {OBJECT}
.SH "DESCRIPTION"
.PP
Given an object, shows the metadata for that object\&. For a particular revision, it will show the data for the most recent commit to that revision\&.
.SH "OPTIONS"
.PP
\fB\-\-print\-related\fR
.RS 4
Show the "related" commits\&.
.RE
.PP
\fB\-\-print\-variant\-type\fR="TYPE"
.RS 4
Memory map
\fIOBJECT\fR
(in this case a filename) to the GVariant type string\&.
.RE
.PP
\fB\-\-print\-metadata\-key\fR="KEY"
.RS 4
Print string value of metadata key\&.
.RE
.PP
\fB\-\-print\-detached\-metadata\-key\fR="KEY"
.RS 4
Print string value of detached metadata key\&.
.RE
.PP
\fB\-\-raw\fR
.RS 4
Show raw variant data\&.
.RE
.PP
\fB\-\-gpg\-homedir\fR="HOMEDIR"
.RS 4
GPG home directory to use when looking for keyrings (if have GPGME \- GNU Privacy Guard Made Easy)\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree show my\-branch\fR
.sp
.if n \{\
.RS 4
.\}
.nf
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07
Date: 2014\-06\-12 13:42:54 +0000
.fi
.if n \{\
.RE
.\}

View File

@ -1,79 +0,0 @@
'\" t
.\" Title: ostree static-delta
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree static-delta
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE STATIC\-DELTA" "1" "" "OSTree" "ostree static-delta"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-static-delta \- Manage static delta files
.SH "SYNOPSIS"
.HP \w'\fBostree\ static\-delta\ list\fR\ 'u
\fBostree static\-delta list\fR
.HP \w'\fBostree\ static\-delta\ show\fR\ 'u
\fBostree static\-delta show\fR
.HP \w'\fBostree\ static\-delta\ delete\fR\ 'u
\fBostree static\-delta delete\fR
.HP \w'\fBostree\ static\-delta\ generate\fR\ 'u
\fBostree static\-delta generate\fR {\-\-to=REV} [OPTIONS...]
.HP \w'\fBostree\ static\-delta\ apply\-offline\fR\ 'u
\fBostree static\-delta apply\-offline\fR {PATH}
.SH "DESCRIPTION"
.PP
List and manipulate static delta files\&.
.SH "\*(AQGENERATE\*(AQ OPTIONS"
.PP
\fB\-\-from\fR="REV"
.RS 4
Create delta from revision REV\&.
.RE
.PP
\fB\-\-to\fR="REV"
.RS 4
Create delta to revision REV\&. (This option is required\&.)
.RE
.PP
\fB\-\-empty\fR
.RS 4
Create delta from scratch\&.
.RE
.PP
\fB\-\-max\-usize\fR=SIZE
.RS 4
Maximum uncompressed size in megabytes\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree static\-delta\fR
.sp
.if n \{\
.RS 4
.\}
.nf
(No static deltas)
.fi
.if n \{\
.RE
.\}

View File

@ -1,60 +0,0 @@
'\" t
.\" Title: ostree summary
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/04/2017
.\" Manual: ostree summary
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE SUMMARY" "1" "" "OSTree" "ostree summary"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-summary \- Regenerate the summary metadata file
.SH "SYNOPSIS"
.HP \w'\fBostree\ summary\fR\ 'u
\fBostree summary\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
The
summary
file is an optional higher level form of repository metadata that describes the available branches\&. It needs to be manually regenerated after a series of commits\&. Among other things, this allows atomically updating multiple commits\&.
.SH "OPTIONS"
.PP
\fB\-u\fR
.RS 4
Update the summary file\&.
.sp
Any additional arguments to the command are treated as additional key\(envalue pairs to be added to the summary file as additional metadata\&. They must be in the format
\fB\fIKEY\fR\fR\fB=\fR\fB\fIVALUE\fR\fR
or as two separate arguments\&. The keys must be namespaced for your organisation or repository using a dot prefix\&. The values must be in GVariant text format\&. For example,
\fBexampleos\&.end\-of\-life "@t 1445385600"\fR\&.
.RE
.PP
\fB\-\-gpg\-sign\fR=KEYID
.RS 4
GPG Key ID to sign the delta with\&.
.RE
.PP
\fB\-\-gpg\-homedir\fR=HOMEDIR
.RS 4
GPG Homedir to use when looking for keyrings\&.
.RE

View File

@ -1,267 +0,0 @@
'\" t
.\" Title: ostree
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE" "1" "" "OSTree" "ostree"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree \- Manage multiple bootable versioned filesystem trees
.SH "SYNOPSIS"
.HP \w'\fBostree\fR\ 'u
\fBostree\fR {COMMAND} [OPTIONS...]
.SH "DESCRIPTION"
.PP
OSTree is a tool for managing multiple bootable versioned filesystem trees, or just "tree" for short\&. In the OSTree model, operating systems no longer live in the physical "/" root directory\&. Instead, they parallel install to the new toplevel
/ostree
directory\&. Each installed system gets its own
/ostree/deploy/\fIstateroot\fR
directory\&. (stateroot
is the newer term for
osname)\&.
.PP
Unlike
rpm
or
dpkg, OSTree is only aware of complete filesystem trees\&. It has no built\-in knowledge of what components went into creating the filesystem tree\&.
.PP
It is possible to use OSTree in several modes; the most basic form is to replicate pre\-built trees from a build server\&. Usually, these pre\-built trees are derived from packages\&. You might also be using OSTree underneath a higher level tool which computes filesystem trees locally\&.
.PP
It must be emphasized that OSTree only supports
\fIread\-only\fR
trees\&. To change to a different tree (upgrade, downgrade, install software), a new tree is checked out, and a 3\-way merge of configuration is performed\&. The currently running tree is not ever modified; the new tree will become active on a system reboot\&.
.PP
To see the man page for a command run
\fBman ostree \fR\fB\fICOMMAND\fR\fR
or
\fBman ostree\-admin \fR\fB\fICOMMAND\fR\fR
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-\-repo\fR
.RS 4
For most commands, when run as non\-root, repository is required\&. If
\fBostree\fR
is run as root, it is assumed operations will be performed on the
/sysroot/ostree/repo
repository\&.
.RE
.PP
\fB\-v, \-\-verbose\fR
.RS 4
Produce debug level output\&.
.RE
.SH "COMMANDS"
.PP
System administrators will primarily interact with OSTree via the subcommand
\fBostree admin\fR\&.
.PP
\fBostree-admin-cleanup\fR(1)
.RS 4
\ \&Delete untagged deployments and repository objects\&.
.RE
.PP
\fBostree-admin-config-diff\fR(1)
.RS 4
\ \&See changes to
/etc
as compared to the current default (from
/usr/etc)\&.
.RE
.PP
\fBostree-admin-deploy\fR(1)
.RS 4
\ \&Takes a particular commit or revision, and sets it up for the next boot\&.
.RE
.PP
\fBostree-admin-init-fs\fR(1)
.RS 4
\ \&Initialize a root filesystem in a specified path\&.
.RE
.PP
\fBostree-admin-instutil\fR(1)
.RS 4
\ \&Utility functions intended primarily for operating system installation programs
.RE
.PP
\fBostree-admin-os-init\fR(1)
.RS 4
\ \&Initialize the deployment location for an operating system with a specified name\&.
.RE
.PP
\fBostree-admin-status\fR(1)
.RS 4
\ \&Show and list the deployments\&.
.RE
.PP
\fBostree-admin-switch\fR(1)
.RS 4
\ \&Choose a different ref to track from the same remote as the current tree\&.
.RE
.PP
\fBostree-admin-undeploy\fR(1)
.RS 4
\ \&Remove the previously
\fIINDEX\fR
deployed tree from the bootloader configuration\&.
.RE
.PP
\fBostree-admin-upgrade\fR(1)
.RS 4
\ \&Download the latest version for the current ref, and deploy it\&.
.RE
.PP
Both administrators and operating system builders may interact with OSTree via the regular filesystem manipulation commands\&.
.PP
\fBostree-cat\fR(1)
.RS 4
\ \&Concatenate contents of files
.RE
.PP
\fBostree-checkout\fR(1)
.RS 4
\ \&Check out a commit into a filesystem tree\&.
.RE
.PP
\fBostree-checksum\fR(1)
.RS 4
\ \&Gives checksum of any file\&.
.RE
.PP
\fBostree-commit\fR(1)
.RS 4
\ \&Given one or more trees, create a new commit using those contents\&.
.RE
.PP
\fBostree-config\fR(1)
.RS 4
\ \&Change settings\&.
.RE
.PP
\fBostree-diff\fR(1)
.RS 4
\ \&Concisely list differences between the given refs\&.
.RE
.PP
\fBostree-fsck\fR(1)
.RS 4
\ \&Check a repository for consistency\&.
.RE
.PP
\fBostree-init\fR(1)
.RS 4
\ \&Initialize a new repository\&.
.RE
.PP
\fBostree-log\fR(1)
.RS 4
\ \&Show revision log\&.
.RE
.PP
\fBostree-ls\fR(1)
.RS 4
\ \&List the contents of a given commit\&.
.RE
.PP
\fBostree-prune\fR(1)
.RS 4
\ \&Search for unreachable objects\&.
.RE
.PP
\fBostree-pull-local\fR(1)
.RS 4
\ \&Copy data from source\-repo\&.
.RE
.PP
\fBostree-pull\fR(1)
.RS 4
\ \&Download data from remote repo\&. If you have libsoup\&.
.RE
.PP
\fBostree-refs\fR(1)
.RS 4
\ \&List refs\&.
.RE
.PP
\fBostree-remote\fR(1)
.RS 4
\ \&Manipulate remote archive configuration\&.
.RE
.PP
\fBostree-reset\fR(1)
.RS 4
\ \&Reset a ref to a previous commit\&.
.RE
.PP
\fBostree-rev-parse\fR(1)
.RS 4
\ \&Show the SHA256 corresponding to a given rev\&.
.RE
.PP
\fBostree-show\fR(1)
.RS 4
\ \&Given an OSTree SHA256 checksum, display its contents\&.
.RE
.PP
\fBostree-static-delta\fR(1)
.RS 4
\ \&Manage static delta files\&.
.RE
.PP
\fBostree-summary\fR(1)
.RS 4
\ \&Regenerate the repository summary metadata\&.
.RE
.PP
\fBostree-trivial-httpd\fR(1)
.RS 4
\ \&Simple webserver\&.
.RE
.SH "EXAMPLES"
.PP
For specific examples, please see the man page regarding the specific ostree command\&. For example:
.PP
\fBman ostree init\fR
or
\fBman ostree\-admin status\fR
.SH "GPG VERIFICATION"
.PP
OSTree supports signing commits with GPG\&. Operations on the system repository by default use keyring files in
/usr/share/ostree/trusted\&.gpg\&.d\&. Any public key in a keyring file in that directory will be trusted by the client\&. No private keys should be present in this directory\&.
.PP
In addition to the system repository, OSTree supports two other paths\&. First, there is a
gpgkeypath
option for remotes, which must point to the filename of an ASCII\-armored key\&.
.PP
Second, there is support for a per\-remote
\fIremotename\fR\&.trustedkeys\&.gpg
file stored in the toplevel of the repository (alongside
objects/
and such)\&. This is particularly useful when downloading content that may not be fully trusted (e\&.g\&. you want to inspect it but not deploy it as an OS), or use it for containers\&. This file is written via
\fBostree remote add \-\-gpg\-import\fR\&.
.SH "SEE ALSO"
.PP
\fBostree.repo\fR(5)

View File

@ -1,203 +0,0 @@
'\" t
.\" Title: ostree.repo-config
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/05/2017
.\" Manual: ostree.repo-config
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE\&.REPO\-CONFI" "5" "" "OSTree" "ostree.repo-config"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree.repo-config \- OSTree repository configuration
.SH "DESCRIPTION"
.PP
The
config
file in an OSTree repository is a "keyfile" in the
\m[blue]\fBXDG Desktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2
format\&. It has several global flags, as well as zero or more remote entries which describe how to access remote repositories\&.
.PP
See
\fBostree.repo\fR(5)
for more information about OSTree repositories\&.
.SH "[CORE] SECTION OPTIONS"
.PP
Repository\-global options\&. The following entries are defined:
.PP
\fImode\fR
.RS 4
One of
bare,
bare\-user
or
archive\-z2\&.
.RE
.PP
\fIrepo_version\fR
.RS 4
Currently, this must be set to
1\&.
.RE
.PP
\fIcommit\-update\-summary\fR
.RS 4
Boolean value controlling whether or not to automatically update the summary file after a commit\&. Defaults to
false\&.
.RE
.PP
\fIfsync\fR
.RS 4
Boolean value controlling whether or not to ensure files are on stable storage when performing operations such as commits, pulls, and checkouts\&. Defaults to
true\&.
.sp
If you disable fsync, OSTree will no longer be robust against kernel crashes or power loss\&.
.sp
You might choose to disable this for local development repositories, under the assumption they can be recreated from source\&. Similarly, you could disable for a mirror where you could re\-pull\&.
.sp
For the system repository, you might choose to disable fsync if you have uninterruptable power supplies and a well tested kernel\&.
.RE
.SH "[REMOTE "NAME"] SECTION OPTIONS"
.PP
Describes a remote repository location\&.
.PP
\fIurl\fR
.RS 4
Must be present; declares URL for accessing metadata and content for remote\&. See also
contenturl\&. The supported schemes are documented below\&.
.RE
.PP
\fIcontenturl\fR
.RS 4
Declares URL for accessing content (filez, static delta parts)\&. When specified,
url
is used just for metadata: summary, static delta "superblocks"\&.
.RE
.PP
\fIproxy\fR
.RS 4
A string value, if given should be a URL for a HTTP proxy to use for access to this repository\&.
.RE
.PP
\fIgpg\-verify\fR
.RS 4
A boolean value, defaults to true\&. Controls whether or not OSTree will require commits to be signed by a known GPG key\&. For more information, see the
\fBostree\fR(1)
manual under GPG\&.
.RE
.PP
\fIgpg\-verify\-summary\fR
.RS 4
A boolean value, defaults to false\&. Controls whether or not OSTree will check if the summary is signed by a known GPG key\&. For more information, see the
\fBostree\fR(1)
manual under GPG\&.
.RE
.PP
\fItls\-permissive\fR
.RS 4
A boolean value, defaults to false\&. By default, server TLS certificates will be checked against the system certificate store\&. If this variable is set, any certificate will be accepted\&.
.RE
.PP
\fItls\-client\-cert\-path\fR
.RS 4
Path to file for client\-side certificate, to present when making requests to this repository\&.
.RE
.PP
\fItls\-client\-key\-path\fR
.RS 4
Path to file containing client\-side certificate key, to present when making requests to this repository\&.
.RE
.PP
\fItls\-ca\-path\fR
.RS 4
Path to file containing trusted anchors instead of the system CA database\&.
.RE
.PP
\fIunconfigured\-state\fR
.RS 4
If set, pulls from this remote will fail with the configured text\&. This is intended for OS vendors which have a subscription process to access content\&.
.RE
.PP
\fImin\-free\-space\-percent\fR
.RS 4
Integer percentage value (0\-99) that specifies a minimum percentage of total space (in blocks) in the underlying filesystem to keep free\&. The default value is 3\&.
.RE
.SH "/ETC/OSTREE/REMOTES\&.D"
.PP
In addition to the
/ostree/repo/config
file, remotes may also be specified in
/etc/ostree/remotes\&.d\&. The remote configuration file must end in
\&.conf; files whose name does not end in
\&.conf
will be ignored\&.
.SH "REPOSITORY URL/CONTENTURL"
.PP
Originally, OSTree had just a
url
option for remotes\&. Since then, the
contenturl
option was introduced\&. Both of these support
file,
http, and
https
schemes\&.
.PP
Additionally, both of these can be prefixed with the string
mirrorlist=, which instructs the client that the target url is a "mirrorlist" format, which is a plain text file of newline\-separated URLs\&. Earlier URLs will be given precedence\&.
.PP
Note that currently, the
tls\-ca\-path
and
tls\-client\-cert\-path
options apply to every HTTP request, even when
contenturl
and/or
mirrorlist
are in use\&. This may change in the future to only apply to metadata (i\&.e\&.
url, not
contenturl) fetches\&.
.SH "PER\-REMOTE GPG KEYRINGS AND VERIFICATION"
.PP
OSTree supports a per\-remote GPG keyring, as well as a
gpgkeypath
option\&. For more information see
\fBostree\fR(1)\&. in the section
GPG verification\&.
.SH "PER\-REMOTE HTTP COOKIES"
.PP
Some content providers may want to control access to remote repositories via HTTP cookies\&. The
\fBostree remote add\-cookie\fR
and
\fBostree remote delete\-cookie\fR
commands will update a per\-remote lookaside cookie jar, named
$remotename\&.cookies\&.txt\&.
.SH "SEE ALSO"
.PP
\fBostree\fR(1),
\fBostree.repo\fR(5)
.SH "NOTES"
.IP " 1." 4
XDG Desktop Entry Specification
.RS 4
\%http://standards.freedesktop.org/desktop-entry-spec/latest/
.RE

View File

@ -1,58 +0,0 @@
'\" t
.\" Title: ostree.repo
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: ostree.repo
.\" Source: OSTree
.\" Language: English
.\"
.TH "OSTREE\&.REPO" "5" "" "OSTree" "ostree.repo"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree.repo \- OSTree repository configuration and layout
.SH "DESCRIPTION"
.PP
An OSTree repository is structurally similar to a git repository; it is a content\-addressed object store containing filesystem trees\&. However, unlike git, ostree is designed to store operating system binaries\&. It records the Unix uid and gid, permissions, as well as extended attributes\&.
.PP
A repository can be in one of three modes;
bare, which is designed as a hard link source for operating system checkouts,
bare\-user, which is like
bare
but works on systems that run as non\-root as well as non\-root containers, and
archive\-z2, which is designed for static HTTP servers\&.
.PP
There is a system repository located at
/ostree/repo\&. If no repository is specified \-\- either by a command\-line option or the
\fBOSTREE_REPO\fR
environment variable \-\- the
\fBostree\fR
as well as many API calls will use it by default\&.
.SH "COMPONENTS OF A REPOSITORY"
.PP
The only user\-editable component is the
config
file\&. For more information, see
\fBostree.repo-config\fR(5)\&.
.SH "SEE ALSO"
.PP
\fBostree\fR(1),
\fBostree.repo-config\fR(1)

View File

@ -1,73 +0,0 @@
'\" t
.\" Title: rofiles-fuse
.\" Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/29/2017
.\" Manual: rofiles-fuse
.\" Source: rofiles-fuse
.\" Language: English
.\"
.TH "ROFILES\-FUSE" "1" "" "rofiles-fuse" "rofiles-fuse"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
rofiles-fuse \- Use FUSE to create a view where directories are writable, files are immutable
.SH "SYNOPSIS"
.HP \w'\fBrofiles\-fuse\ SRCDIR\ MNTPOINT\fR\ 'u
\fBrofiles\-fuse SRCDIR MNTPOINT\fR
.SH "DESCRIPTION"
.PP
Creating a checkout from an OSTree repository by default uses hard links, which means an in\-place mutation to any file corrupts the repository and all checkouts\&. This can be problematic if one wishes to run arbitrary programs against such a checkout\&. For example, RPM
%post
scripts or equivalent\&.
.PP
In the case where one wants to create a tree commit derived from other content, using
\fBrofiles\-fuse\fR
in concert with
\fBostree commit \-\-link\-checkout\-speedup\fR
(or the underlying API) can ensure that only new files are checksummed\&.
.SH "EXAMPLE: UPDATE AN OSTREE COMMIT"
.sp
.if n \{\
.RS 4
.\}
.nf
# Initialize a checkout and mount
$ ostree \-\-repo=repo checkout somebranch branch\-checkout
$ mkdir mnt
$ rofiles\-fuse branch\-checkout mnt
# Now, arbitrary changes to mnt/ are reflected in branch\-checkout
$ echo somenewcontent > mnt/anewfile
$ mkdir mnt/anewdir
$ rm mnt/someoriginalcontent \-rf
# Commit and cleanup
$ fusermount \-u mnt
$ ostree \-\-repo=repo commit \-\-link\-checkout\-speedup \-b somebranch \-s \*(AqCommit new content\*(Aq \-\-tree=dir=branch\-checkout
$ rm mnt branch\-checkout \-rf
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBostree\fR(1)

View File

@ -0,0 +1,32 @@
/* DEVEL symbol file - add new symbols here
Copyright (C) 2016 Colin Walters <walters@verbum.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
***/
/* Add new symbols here. Release commits should copy this section into -released.sym. */
LIBOSTREE_2017.10 {
};
/* Stub section for the stable release *after* this development one; don't
* edit this other than to update the last number. This is just a copy/paste
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
* with whatever the next version with new symbols will be.
LIBOSTREE_2017.$NEWVERSION {
global:
someostree_symbol_deleteme;
} LIBOSTREE_2017.$LASTSTABLE;
*/

View File

@ -0,0 +1,78 @@
/*
* Copyright © 2017 Endless Mobile, 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, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors:
* - Philip Withnall <withnall@endlessm.com>
*/
/* Symbols in this file are added to the build if OSTree is configured with
* --enable-experimental-api. They are not stable or officially supported, and
* might disappear or change in future releases. */
LIBOSTREE_2017.6_EXPERIMENTAL {
global:
ostree_remote_ref;
ostree_remote_unref;
} LIBOSTREE_2017.6;
LIBOSTREE_2017.7_EXPERIMENTAL {
global:
ostree_remote_get_name;
} LIBOSTREE_2017.6_EXPERIMENTAL;
LIBOSTREE_2017.8_EXPERIMENTAL {
global:
ostree_collection_ref_dup;
ostree_collection_ref_dupv;
ostree_collection_ref_equal;
ostree_collection_ref_free;
ostree_collection_ref_freev;
ostree_collection_ref_get_type;
ostree_collection_ref_hash;
ostree_collection_ref_new;
ostree_repo_find_remotes_async;
ostree_repo_find_remotes_finish;
ostree_repo_finder_avahi_get_type;
ostree_repo_finder_avahi_new;
ostree_repo_finder_avahi_start;
ostree_repo_finder_avahi_stop;
ostree_repo_finder_config_get_type;
ostree_repo_finder_config_new;
ostree_repo_finder_get_type;
ostree_repo_finder_mount_get_type;
ostree_repo_finder_mount_new;
ostree_repo_finder_resolve_async;
ostree_repo_finder_resolve_all_async;
ostree_repo_finder_resolve_all_finish;
ostree_repo_finder_resolve_finish;
ostree_repo_finder_result_compare;
ostree_repo_finder_result_dup;
ostree_repo_finder_result_free;
ostree_repo_finder_result_freev;
ostree_repo_finder_result_get_type;
ostree_repo_finder_result_new;
ostree_repo_get_collection_id;
ostree_repo_list_collection_refs;
ostree_repo_pull_from_remotes_async;
ostree_repo_pull_from_remotes_finish;
ostree_repo_resolve_keyring_for_collection;
ostree_repo_set_collection_id;
ostree_repo_set_collection_ref_immediate;
ostree_repo_transaction_set_collection_ref;
ostree_validate_collection_id;
} LIBOSTREE_2017.7_EXPERIMENTAL;

View File

@ -413,6 +413,9 @@ global:
ostree_validate_remote_name;
} LIBOSTREE_2017.7;
LIBOSTREE_2017.9 {
};
/* NOTE: Only add more content here in release commits! See the
* comments at the top of this file.
*/

View File

@ -420,15 +420,13 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
}
/* Now let's fdatasync() for the new file */
{ glnx_fd_close int new_config_fd = open (gs_file_get_path_cached (new_config_path), O_RDONLY | O_CLOEXEC);
if (new_config_fd < 0)
{
glnx_set_prefix_error_from_errno (error, "Opening %s", gs_file_get_path_cached (new_config_path));
goto out;
}
{ glnx_fd_close int new_config_fd = -1;
if (!glnx_openat_rdonly (AT_FDCWD, gs_file_get_path_cached (new_config_path), TRUE, &new_config_fd, error))
goto out;
if (fdatasync (new_config_fd) < 0)
{
glnx_set_error_from_errno (error);
(void)glnx_throw_errno_prefix (error, "fdatasync");
goto out;
}
}

View File

@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <gio/gfiledescriptorbased.h>
#include <gio/gunixinputstream.h>
#include "libglnx.h"
#include "ostree.h"
#include "ostree-core-private.h"
@ -35,6 +36,40 @@
#define ALIGN_VALUE(this, boundary) \
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
/* Return a copy of @input suitable for addition to
* a GError message; newlines are quashed, the value
* is forced to be UTF-8, is truncated to @maxlen (if maxlen != -1).
*/
static char *
quash_string_for_error_message (const char *input,
ssize_t len,
ssize_t maxlen)
{
if (len == -1)
len = strlen (input);
if (maxlen != -1 && maxlen < len)
len = maxlen;
#if GLIB_CHECK_VERSION(2, 52, 0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
char *buf = g_utf8_make_valid (input, len);
G_GNUC_END_IGNORE_DEPRECATIONS
#else
char *buf = g_strndup (input, len);
#endif
for (char *iter = buf; iter && *iter; iter++)
{
char c = *iter;
if (c == '\n')
*iter = ' ';
#if !GLIB_CHECK_VERSION(2, 52, 0)
/* No g_utf8_make_valid()? OK, let's just brute force this. */
if (!g_ascii_isprint (c))
*iter = ' ';
#endif
}
return buf;
}
static gboolean
file_header_parse (GVariant *metadata,
GFileInfo **out_file_info,
@ -740,15 +775,16 @@ ostree_content_file_parse_at (gboolean compressed,
GCancellable *cancellable,
GError **error)
{
g_autoptr(GInputStream) file_input = NULL;
if (!ot_openat_read_stream (parent_dfd, path, TRUE, &file_input,
cancellable, error))
glnx_fd_close int fd = -1;
if (!glnx_openat_rdonly (parent_dfd, path, TRUE, &fd, error))
return FALSE;
struct stat stbuf;
if (!glnx_stream_fstat ((GFileDescriptorBased*)file_input, &stbuf, error))
if (!glnx_fstat (fd, &stbuf, error))
return FALSE;
g_autoptr(GInputStream) file_input = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
g_autoptr(GFileInfo) ret_file_info = NULL;
g_autoptr(GVariant) ret_xattrs = NULL;
g_autoptr(GInputStream) ret_input = NULL;
@ -1823,7 +1859,15 @@ ostree_validate_structureof_checksum_string (const char *checksum,
size_t len = strlen (checksum);
if (len != OSTREE_SHA256_STRING_LEN)
return glnx_throw (error, "Invalid rev '%s'", checksum);
{
/* If we happen to get e.g. an Apache directory listing HTML, don't
* dump it all to the error.
* https://github.com/projectatomic/rpm-ostree/issues/885
*/
g_autofree char *sanitized = quash_string_for_error_message (checksum, len,
OSTREE_SHA256_STRING_LEN);
return glnx_throw (error, "Invalid rev %s", sanitized);
}
for (i = 0; i < len; i++)
{

View File

@ -195,6 +195,65 @@ typedef enum {
OSTREE_REPO_MODE_BARE_USER_ONLY,
} OstreeRepoMode;
/**
* OSTREE_COMMIT_META_KEY_VERSION:
*
* GVariant type `s`. This metadata key is used for version numbers. A freeform
* string; the intention is that systems using ostree do not interpret this
* semantically as traditional package managers do.
*
* This is the only ostree-defined metadata key that does not start with `ostree.`.
* Since: 2014.9
*/
#define OSTREE_COMMIT_META_KEY_VERSION "version"
/**
* OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE:
*
* GVariant type `s`. Should contain a refspec defining a new target branch;
* `ostree admin upgrade` and `OstreeSysrootUpgrader` will automatically initiate
* a rebase upon encountering this metadata key.
*
* Since: 2017.7
*/
#define OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE "ostree.endoflife-rebase"
/**
* OSTREE_COMMIT_META_KEY_ENDOFLIFE:
*
* GVariant type `s`. This metadata key is used to display vendor's message
* when an update stream for a particular branch ends. It usually provides
* update instructions for the users.
*
* Since: 2017.7
*/
#define OSTREE_COMMIT_META_KEY_ENDOFLIFE "ostree.endoflife"
/**
* OSTREE_COMMIT_META_KEY_REF_BINDING:
*
* GVariant type `as`; each element is a branch name. If this is added to a
* commit, `ostree_repo_pull()` will enforce that the commit was retrieved from
* one of the branch names in this array. This prevents "sidegrade" attacks.
* The rationale for having this support multiple branch names is that it helps
* support a "promotion" model of taking a commit and moving it between development
* and production branches.
*
* Since: 2017.9
*/
#define OSTREE_COMMIT_META_KEY_REF_BINDING "ostree.ref-binding"
/**
* OSTREE_COMMIT_META_KEY_COLLECTION_BINDING:
*
* GVariant type `s`. If this is added to a commit, `ostree_repo_pull()`
* will enforce that the commit was retrieved from a repository which has
* the same collection ID. See `ostree_repo_set_collection_id()`.
* This is most useful in concert with `OSTREE_COMMIT_META_KEY_REF_BINDING`,
* as it more strongly binds the commit to the repository and branch.
*
* Since: 2017.9
*/
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
#define OSTREE_COMMIT_META_KEY_COLLECTION_BINDING "ostree.collection-binding"
#endif
_OSTREE_PUBLIC
const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);

View File

@ -23,6 +23,8 @@
#endif
#include <string.h>
#include "ostree-enumtypes.h"
/*** END file-header ***/
/*** BEGIN file-production ***/

View File

@ -353,7 +353,9 @@ check_multi_info (OstreeFetcher *fetcher)
g_autofree char *msg = g_strdup_printf ("Server returned HTTP %lu", response);
g_task_return_new_error (task, G_IO_ERROR, giocode,
"%s", msg);
if (req->fetcher->remote_name)
if (req->fetcher->remote_name &&
!((req->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 &&
giocode == G_IO_ERROR_NOT_FOUND))
_ostree_fetcher_journal_failure (req->fetcher->remote_name,
eff_url, msg);
@ -859,13 +861,14 @@ void
_ostree_fetcher_request_to_tmpfile (OstreeFetcher *self,
GPtrArray *mirrorlist,
const char *filename,
OstreeFetcherRequestFlags flags,
guint64 max_size,
int priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
_ostree_fetcher_request_async (self, mirrorlist, filename, 0, FALSE,
_ostree_fetcher_request_async (self, mirrorlist, filename, flags, FALSE,
max_size, priority, cancellable,
callback, user_data);
}

View File

@ -1128,7 +1128,9 @@ on_request_sent (GObject *object,
g_prefix_error (&local_error,
"All %u mirrors failed. Last error was: ",
pending->mirrorlist->len);
if (pending->thread_closure->remote_name)
if (pending->thread_closure->remote_name &&
!((pending->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 &&
code == G_IO_ERROR_NOT_FOUND))
_ostree_fetcher_journal_failure (pending->thread_closure->remote_name,
uristring, local_error->message);
@ -1238,13 +1240,14 @@ void
_ostree_fetcher_request_to_tmpfile (OstreeFetcher *self,
GPtrArray *mirrorlist,
const char *filename,
OstreeFetcherRequestFlags flags,
guint64 max_size,
int priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
_ostree_fetcher_request_async (self, mirrorlist, filename, 0, FALSE,
_ostree_fetcher_request_async (self, mirrorlist, filename, flags, FALSE,
max_size, priority, cancellable,
callback, user_data);
}
@ -1334,8 +1337,10 @@ _ostree_fetcher_bytes_transferred (OstreeFetcher *self)
{
if (G_IS_FILE_DESCRIPTOR_BASED (stream))
{
int fd = g_file_descriptor_based_get_fd ((GFileDescriptorBased*)stream);
struct stat stbuf;
if (glnx_stream_fstat ((GFileDescriptorBased*)stream, &stbuf, NULL))
if (glnx_fstat (fd, &stbuf, NULL))
ret += stbuf.st_size;
}
}

View File

@ -55,8 +55,7 @@ gboolean
_ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
GPtrArray *mirrorlist,
const char *filename,
gboolean add_nul,
gboolean allow_noent,
OstreeFetcherRequestFlags flags,
GBytes **out_contents,
guint64 max_size,
GCancellable *cancellable,
@ -79,7 +78,7 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
data.error = error;
_ostree_fetcher_request_to_membuf (fetcher, mirrorlist, filename,
add_nul ? OSTREE_FETCHER_REQUEST_NUL_TERMINATION : 0,
flags,
max_size, OSTREE_FETCHER_DEFAULT_PRIORITY,
cancellable, fetch_uri_sync_on_complete, &data);
while (!data.done)
@ -87,7 +86,7 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
if (!data.result_buf)
{
if (allow_noent)
if (flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT)
{
if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
@ -112,8 +111,7 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
gboolean
_ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
OstreeFetcherURI *uri,
gboolean add_nul,
gboolean allow_noent,
OstreeFetcherRequestFlags flags,
GBytes **out_contents,
guint64 max_size,
GCancellable *cancellable,
@ -121,8 +119,7 @@ _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
{
g_autoptr(GPtrArray) mirrorlist = g_ptr_array_new ();
g_ptr_array_add (mirrorlist, uri); /* no transfer */
return _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, NULL,
add_nul, allow_noent,
return _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, NULL, flags,
out_contents, max_size,
cancellable, error);
}

View File

@ -29,8 +29,7 @@ G_BEGIN_DECLS
gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
GPtrArray *mirrorlist,
const char *filename,
gboolean add_nul,
gboolean allow_noent,
OstreeFetcherRequestFlags flags,
GBytes **out_contents,
guint64 max_size,
GCancellable *cancellable,
@ -38,8 +37,7 @@ gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
gboolean _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher,
OstreeFetcherURI *uri,
gboolean add_nul,
gboolean allow_noent,
OstreeFetcherRequestFlags flags,
GBytes **out_contents,
guint64 max_size,
GCancellable *cancellable,

View File

@ -54,6 +54,11 @@ typedef enum {
OSTREE_FETCHER_FLAGS_TRANSFER_GZIP = (1 << 1)
} OstreeFetcherConfigFlags;
typedef enum {
OSTREE_FETCHER_REQUEST_NUL_TERMINATION = (1 << 0),
OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT = (1 << 1)
} OstreeFetcherRequestFlags;
void
_ostree_fetcher_uri_free (OstreeFetcherURI *uri);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OstreeFetcherURI, _ostree_fetcher_uri_free)
@ -111,6 +116,7 @@ guint64 _ostree_fetcher_bytes_transferred (OstreeFetcher *self);
void _ostree_fetcher_request_to_tmpfile (OstreeFetcher *self,
GPtrArray *mirrorlist,
const char *filename,
OstreeFetcherRequestFlags flags,
guint64 max_size,
int priority,
GCancellable *cancellable,
@ -122,10 +128,6 @@ gboolean _ostree_fetcher_request_to_tmpfile_finish (OstreeFetcher *self,
char **out_filename,
GError **error);
typedef enum {
OSTREE_FETCHER_REQUEST_NUL_TERMINATION = (1 << 0)
} OstreeFetcherRequestFlags;
void _ostree_fetcher_request_to_membuf (OstreeFetcher *self,
GPtrArray *mirrorlist,
const char *filename,

View File

@ -93,6 +93,7 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
GCancellable *cancellable,
GError **error)
{
GLNX_AUTO_PREFIX_ERROR("GPG", error);
gpgme_error_t gpg_error = 0;
ot_auto_gpgme_data gpgme_data_t data_buffer = NULL;
ot_auto_gpgme_data gpgme_data_t signature_buffer = NULL;
@ -166,12 +167,8 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
glnx_fd_close int fd = -1;
ot_auto_gpgme_data gpgme_data_t kdata = NULL;
fd = openat (AT_FDCWD, path, O_RDONLY | O_CLOEXEC) ;
if (fd < 0)
{
glnx_set_prefix_error_from_errno (error, "Opening %s", path);
goto out;
}
if (!glnx_openat_rdonly (AT_FDCWD, path, TRUE, &fd, error))
goto out;
gpg_error = gpgme_data_new_from_fd (&kdata, fd);
if (gpg_error != GPG_ERR_NO_ERROR)
@ -253,8 +250,6 @@ out:
(void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL);
}
g_prefix_error (error, "GPG: ");
return result;
}

View File

@ -203,8 +203,8 @@ _ostree_impl_system_generator (const char *ostree_cmdline,
return FALSE;
g_clear_object (&outstream);
/* It should be readable */
if (fchmod (tmpf.fd, 0644) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf.fd, 0644, error))
return FALSE;
/* Error out if somehow it already exists, that'll help us debug conflicts */
if (!glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_NOREPLACE,
normal_dir_dfd, "var.mount", error))

View File

@ -431,10 +431,7 @@ try_one_url (OstreeMetalinkRequest *self,
gssize n_bytes;
if (!_ostree_fetcher_request_uri_to_membuf (self->metalink->fetcher,
uri,
FALSE,
FALSE,
&bytes,
uri, 0, &bytes,
self->metalink->max_size,
self->cancellable,
error))
@ -614,14 +611,9 @@ _ostree_metalink_request_sync (OstreeMetalink *self,
request.urls = g_ptr_array_new_with_free_func ((GDestroyNotify) _ostree_fetcher_uri_free);
request.parser = g_markup_parse_context_new (&metalink_parser, G_MARKUP_PREFIX_ERROR_POSITION, &request, NULL);
if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher,
self->uri,
FALSE,
FALSE,
&contents,
self->max_size,
cancellable,
error))
if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher, self->uri, 0,
&contents, self->max_size,
cancellable, error))
goto out;
data = g_bytes_get_data (contents, &len);

View File

@ -81,8 +81,8 @@ checkout_object_for_uncompressed_cache (OstreeRepo *self,
if (!g_output_stream_close (temp_out, cancellable, error))
return FALSE;
if (fchmod (tmpf.fd, file_mode) < 0)
return glnx_throw_errno (error);
if (!glnx_fchmod (tmpf.fd, file_mode, error))
return FALSE;
if (!_ostree_repo_ensure_loose_objdir_at (self->uncompressed_objects_dir_fd,
loose_path,
@ -770,9 +770,11 @@ checkout_tree_at_recurse (OstreeRepo *self,
}
/* Set directory mtime to OSTREE_TIMESTAMP, so that it is constant for all checkouts.
* Must be done after setting permissions and creating all children.
* Must be done after setting permissions and creating all children. Note we skip doing
* this for directories that already exist (under the theory we possibly don't own them),
* and we also skip it if doing copying checkouts, which is mostly for /etc.
*/
if (!did_exist)
if (!did_exist && !options->force_copy)
{
const struct timespec times[2] = { { OSTREE_TIMESTAMP, UTIME_OMIT }, { OSTREE_TIMESTAMP, 0} };
if (TEMP_FAILURE_RETRY (futimens (destination_dfd, times)) < 0)

View File

@ -253,8 +253,8 @@ commit_loose_regfile_object (OstreeRepo *self,
if (S_ISREG (mode))
{
const mode_t content_mode = (mode & (S_IFREG | 0775)) | S_IRUSR;
if (fchmod (tmpf->fd, content_mode) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf->fd, content_mode, error))
return FALSE;
}
else
g_assert (S_ISLNK (mode));
@ -266,8 +266,8 @@ commit_loose_regfile_object (OstreeRepo *self,
return glnx_throw (error, "Invalid mode 0%04o with bits 0%04o in bare-user-only repository",
mode, invalid_modebits);
if (fchmod (tmpf->fd, mode) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf->fd, mode, error))
return FALSE;
}
if (_ostree_repo_mode_is_bare (self->mode))
@ -299,13 +299,13 @@ commit_loose_regfile_object (OstreeRepo *self,
typedef struct
{
gsize unpacked;
gsize archived;
goffset unpacked;
goffset archived;
} OstreeContentSizeCacheEntry;
static OstreeContentSizeCacheEntry *
content_size_cache_entry_new (gsize unpacked,
gsize archived)
content_size_cache_entry_new (goffset unpacked,
goffset archived)
{
OstreeContentSizeCacheEntry *entry = g_slice_new0 (OstreeContentSizeCacheEntry);
@ -325,8 +325,8 @@ content_size_cache_entry_free (gpointer entry)
static void
repo_store_size_entry (OstreeRepo *self,
const gchar *checksum,
gsize unpacked,
gsize archived)
goffset unpacked,
goffset archived)
{
if (G_UNLIKELY (self->object_sizes == NULL))
self->object_sizes = g_hash_table_new_full (g_str_hash, g_str_equal,
@ -495,8 +495,8 @@ create_regular_tmpfile_linkable_with_content (OstreeRepo *self,
}
}
if (fchmod (tmpf.fd, 0644) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf.fd, 0644, error))
return FALSE;
*out_tmpf = tmpf; tmpf.initialized = FALSE;
return TRUE;
@ -594,7 +594,7 @@ write_content_object (OstreeRepo *self,
*/
g_auto(OtCleanupUnlinkat) tmp_unlinker = { self->tmp_dir_fd, NULL };
g_auto(GLnxTmpfile) tmpf = { 0, };
gssize unpacked_size = 0;
goffset unpacked_size = 0;
gboolean indexable = FALSE;
/* Is it a symlink physically? */
if (phys_object_is_symlink)
@ -643,17 +643,18 @@ write_content_object (OstreeRepo *self,
/* Don't close the base; we'll do that later */
g_filter_output_stream_set_close_base_stream ((GFilterOutputStream*)compressed_out_stream, FALSE);
unpacked_size = g_output_stream_splice (compressed_out_stream, file_input,
0, cancellable, error);
if (unpacked_size < 0)
if (g_output_stream_splice (compressed_out_stream, file_input,
0, cancellable, error) < 0)
return FALSE;
unpacked_size = g_file_info_get_size (file_info);
}
if (!g_output_stream_flush (temp_out, cancellable, error))
return FALSE;
if (fchmod (tmpf.fd, 0644) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf.fd, 0644, error))
return FALSE;
}
const char *actual_checksum = NULL;
@ -733,6 +734,17 @@ write_content_object (OstreeRepo *self,
}
else
{
/* Update size metadata if configured */
if (indexable && object_file_type == G_FILE_TYPE_REGULAR)
{
struct stat stbuf;
if (!glnx_fstat (tmpf.fd, &stbuf, error))
return FALSE;
repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size);
}
/* This path is for regular files */
if (!commit_loose_regfile_object (self, actual_checksum, &tmpf,
uid, gid, mode,
@ -742,17 +754,6 @@ write_content_object (OstreeRepo *self,
ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE));
}
/* Update size metadata if configured */
if (indexable && object_file_type == G_FILE_TYPE_REGULAR)
{
struct stat stbuf;
if (!glnx_fstat (tmpf.fd, &stbuf, error))
return FALSE;
repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size);
}
/* Update statistics */
g_mutex_lock (&self->txn_stats_lock);
self->txn_stats.content_objects_written++;
@ -851,8 +852,8 @@ write_metadata_object (OstreeRepo *self,
return FALSE;
if (glnx_loop_write (tmpf.fd, bufp, len) < 0)
return glnx_throw_errno_prefix (error, "write()");
if (fchmod (tmpf.fd, 0644) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf.fd, 0644, error))
return FALSE;
/* And commit it into place */
if (!_ostree_repo_commit_tmpf_final (self, actual_checksum, objtype,
@ -2823,18 +2824,16 @@ write_dfd_iter_to_mtree_internal (OstreeRepo *self,
while (TRUE)
{
struct dirent *dent;
struct stat stbuf;
g_autoptr(GFileInfo) child_info = NULL;
const char *loose_checksum;
if (!glnx_dirfd_iterator_next_dent (src_dfd_iter, &dent, cancellable, error))
return FALSE;
if (dent == NULL)
break;
if (fstatat (src_dfd_iter->fd, dent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW) == -1)
return glnx_throw_errno (error);
struct stat stbuf;
if (!glnx_fstatat (src_dfd_iter->fd, dent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW, error))
return FALSE;
loose_checksum = devino_cache_lookup (self, modifier, stbuf.st_dev, stbuf.st_ino);
const char *loose_checksum = devino_cache_lookup (self, modifier, stbuf.st_dev, stbuf.st_ino);
if (loose_checksum)
{
if (!ostree_mutable_tree_replace_file (mtree, dent->d_name, loose_checksum,
@ -2844,7 +2843,7 @@ write_dfd_iter_to_mtree_internal (OstreeRepo *self,
continue;
}
child_info = _ostree_stbuf_to_gfileinfo (&stbuf);
g_autoptr(GFileInfo) child_info = _ostree_stbuf_to_gfileinfo (&stbuf);
g_file_info_set_name (child_info, dent->d_name);
if (S_ISREG (stbuf.st_mode))

View File

@ -76,6 +76,13 @@ struct OstreeRepoCommitModifier {
GHashTable *devino_cache;
};
typedef enum {
OSTREE_REPO_SYSROOT_KIND_UNKNOWN,
OSTREE_REPO_SYSROOT_KIND_NO, /* Not a system repo */
OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT, /* Constructed via ostree_sysroot_get_repo() */
OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE, /* We match /ostree/repo */
} OstreeRepoSysrootKind;
/**
* OstreeRepo:
*
@ -97,6 +104,7 @@ struct OstreeRepo {
int objects_dir_fd;
int uncompressed_objects_dir_fd;
GFile *sysroot_dir;
GWeakRef sysroot; /* Weak to avoid a circular ref; see also `is_system` */
char *remotes_config_dir;
GHashTable *txn_refs; /* (element-type utf8 utf8) */
@ -114,7 +122,7 @@ struct OstreeRepo {
gboolean inited;
gboolean writable;
gboolean is_system; /* Was this repo created via ostree_sysroot_get_repo() ? */
OstreeRepoSysrootKind sysroot_kind;
GError *writable_error;
gboolean in_transaction;
gboolean disable_fsync;

View File

@ -155,6 +155,8 @@ typedef struct {
* whether to fetch the primary object after fetching its
* detached metadata (no need if it's already stored). */
gboolean object_is_stored;
OstreeCollectionRef *requested_ref; /* (nullable) */
} FetchObjectData;
typedef struct {
@ -172,31 +174,35 @@ typedef struct {
char *path;
OstreeObjectType objtype;
guint recursion_depth; /* NB: not used anymore, though might be nice to print */
OstreeCollectionRef *requested_ref; /* (nullable) */
} ScanObjectQueueData;
static void start_fetch (OtPullData *pull_data, FetchObjectData *fetch);
static void start_fetch_deltapart (OtPullData *pull_data,
FetchStaticDeltaData *fetch);
static gboolean fetcher_queue_is_full (OtPullData *pull_data);
static void queue_scan_one_metadata_object (OtPullData *pull_data,
const char *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth);
static void queue_scan_one_metadata_object (OtPullData *pull_data,
const char *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref);
static void queue_scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth);
static void queue_scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref);
static gboolean scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
GCancellable *cancellable,
GError **error);
static gboolean scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref,
GCancellable *cancellable,
GError **error);
static gboolean
update_progress (gpointer user_data)
@ -422,11 +428,14 @@ idle_worker (gpointer user_data)
scan_data->objtype,
scan_data->path,
scan_data->recursion_depth,
scan_data->requested_ref,
pull_data->cancellable,
&error);
check_outstanding_requests_handle_error (pull_data, &error);
g_free (scan_data->path);
if (scan_data->requested_ref != NULL)
ostree_collection_ref_free (scan_data->requested_ref);
g_free (scan_data);
return G_SOURCE_CONTINUE;
}
@ -461,7 +470,7 @@ fetch_mirrored_uri_contents_utf8_sync (OstreeFetcher *fetcher,
{
g_autoptr(GBytes) bytes = NULL;
if (!_ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist,
filename, TRUE, FALSE,
filename, OSTREE_FETCHER_REQUEST_NUL_TERMINATION,
&bytes,
OSTREE_MAX_METADATA_SIZE,
cancellable, error))
@ -507,12 +516,13 @@ write_commitpartial_for (OtPullData *pull_data,
}
static void
enqueue_one_object_request (OtPullData *pull_data,
const char *checksum,
OstreeObjectType objtype,
const char *path,
gboolean is_detached_meta,
gboolean object_is_stored);
enqueue_one_object_request (OtPullData *pull_data,
const char *checksum,
OstreeObjectType objtype,
const char *path,
gboolean is_detached_meta,
gboolean object_is_stored,
const OstreeCollectionRef *ref);
static gboolean
matches_pull_dir (const char *current_file,
@ -604,18 +614,19 @@ validate_bareuseronly_mode (OtPullData *pull_data,
return TRUE;
}
/* Import a single content object in the case where
* we have pull_data->remote_repo_local.
/* Synchronously import a single content object; this is used async for content,
* or synchronously for metadata. @src_repo is either
* pull_data->remote_repo_local or one of pull_data->localcache_repos.
*
* One important special case here is handling the
* OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES flag.
*/
static gboolean
import_one_local_content_object (OtPullData *pull_data,
OstreeRepo *src_repo,
const char *checksum,
GCancellable *cancellable,
GError **error)
import_one_local_content_object_sync (OtPullData *pull_data,
OstreeRepo *src_repo,
const char *checksum,
GCancellable *cancellable,
GError **error)
{
const gboolean trusted = !pull_data->is_untrusted;
if (trusted && !pull_data->is_bareuseronly_files)
@ -664,6 +675,83 @@ import_one_local_content_object (OtPullData *pull_data,
return TRUE;
}
typedef struct {
OtPullData *pull_data;
OstreeRepo *src_repo;
char checksum[OSTREE_SHA256_STRING_LEN+1];
} ImportLocalAsyncData;
static void
async_import_in_thread (GTask *task,
gpointer source,
gpointer task_data,
GCancellable *cancellable)
{
ImportLocalAsyncData *iataskdata = task_data;
g_autoptr(GError) local_error = NULL;
if (!import_one_local_content_object_sync (iataskdata->pull_data,
iataskdata->src_repo,
iataskdata->checksum,
cancellable,
&local_error))
g_task_return_error (task, g_steal_pointer (&local_error));
else
g_task_return_boolean (task, TRUE);
}
/* Start an async import of a single object; currently used for content objects.
* @src_repo is from pull_data->remote_repo_local or
* pull_data->localcache_repos.
*
* One important special case here is handling the
* OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES flag.
*/
static void
async_import_one_local_content_object (OtPullData *pull_data,
OstreeRepo *src_repo,
const char *checksum,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
ImportLocalAsyncData *iataskdata = g_new0 (ImportLocalAsyncData, 1);
iataskdata->pull_data = pull_data;
iataskdata->src_repo = src_repo;
memcpy (iataskdata->checksum, checksum, OSTREE_SHA256_STRING_LEN);
g_autoptr(GTask) task = g_task_new (pull_data->repo, cancellable, callback, user_data);
g_task_set_source_tag (task, async_import_one_local_content_object);
g_task_set_task_data (task, iataskdata, g_free);
pull_data->n_outstanding_content_write_requests++;
g_task_run_in_thread (task, async_import_in_thread);
}
static gboolean
async_import_one_local_content_object_finish (OtPullData *pull_data,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, pull_data->repo), FALSE);
return g_task_propagate_boolean ((GTask*)result, error);
}
static void
on_local_object_imported (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
OtPullData *pull_data = user_data;
g_autoptr(GError) local_error = NULL;
GError **error = &local_error;
if (!async_import_one_local_content_object_finish (pull_data, result, error))
goto out;
out:
g_assert_cmpint (pull_data->n_outstanding_content_write_requests, >, 0);
pull_data->n_outstanding_content_write_requests--;
check_outstanding_requests_handle_error (pull_data, &local_error);
}
static gboolean
scan_dirtree_object (OtPullData *pull_data,
const char *checksum,
@ -714,10 +802,11 @@ scan_dirtree_object (OtPullData *pull_data,
/* Is this a local repo? */
if (pull_data->remote_repo_local)
{
if (!import_one_local_content_object (pull_data, pull_data->remote_repo_local,
file_checksum, cancellable, error))
return FALSE;
async_import_one_local_content_object (pull_data, pull_data->remote_repo_local,
file_checksum, cancellable,
on_local_object_imported,
pull_data);
g_hash_table_add (pull_data->requested_content, g_steal_pointer (&file_checksum));
/* Note early loop continue */
continue;
}
@ -736,9 +825,9 @@ scan_dirtree_object (OtPullData *pull_data,
return FALSE;
if (!localcache_repo_has_obj)
continue;
if (!import_one_local_content_object (pull_data, localcache_repo, file_checksum,
cancellable, error))
return FALSE;
async_import_one_local_content_object (pull_data, localcache_repo, file_checksum, cancellable,
on_local_object_imported, pull_data);
g_hash_table_add (pull_data->requested_content, g_steal_pointer (&file_checksum));
did_import_from_cache_repo = TRUE;
pull_data->n_fetched_localcache_content++;
break;
@ -749,7 +838,7 @@ scan_dirtree_object (OtPullData *pull_data,
/* Not available locally, queue a HTTP request */
g_hash_table_add (pull_data->requested_content, file_checksum);
enqueue_one_object_request (pull_data, file_checksum, OSTREE_OBJECT_TYPE_FILE, path, FALSE, FALSE);
enqueue_one_object_request (pull_data, file_checksum, OSTREE_OBJECT_TYPE_FILE, path, FALSE, FALSE, NULL);
file_checksum = NULL; /* Transfer ownership */
}
@ -779,14 +868,15 @@ scan_dirtree_object (OtPullData *pull_data,
g_autofree char *subpath = g_strconcat (path, dirname, "/", NULL);
queue_scan_one_metadata_object_c (pull_data, tree_csum_bytes,
OSTREE_OBJECT_TYPE_DIR_TREE, subpath, recursion_depth + 1);
OSTREE_OBJECT_TYPE_DIR_TREE, subpath, recursion_depth + 1, NULL);
queue_scan_one_metadata_object_c (pull_data, meta_csum_bytes,
OSTREE_OBJECT_TYPE_DIR_META, subpath, recursion_depth + 1);
OSTREE_OBJECT_TYPE_DIR_META, subpath, recursion_depth + 1, NULL);
}
return TRUE;
}
/* Given a @ref, fetch its contents (should be a SHA256 ASCII string) */
static gboolean
fetch_ref_contents (OtPullData *pull_data,
const char *main_collection_id,
@ -812,7 +902,7 @@ fetch_ref_contents (OtPullData *pull_data,
g_strchomp (ret_contents);
if (!ostree_validate_checksum_string (ret_contents, error))
return FALSE;
return glnx_prefix_error (error, "Fetching %s", filename);
ot_transfer_out_value (out_contents, &ret_contents);
return TRUE;
@ -883,6 +973,8 @@ fetch_object_data_free (FetchObjectData *fetch_data)
{
g_variant_unref (fetch_data->object);
g_free (fetch_data->path);
if (fetch_data->requested_ref)
ostree_collection_ref_free (fetch_data->requested_ref);
g_free (fetch_data);
}
@ -1062,7 +1154,7 @@ on_metadata_written (GObject *object,
goto out;
}
queue_scan_one_metadata_object_c (pull_data, csum, objtype, fetch_data->path, 0);
queue_scan_one_metadata_object_c (pull_data, csum, objtype, fetch_data->path, 0, fetch_data->requested_ref);
out:
pull_data->n_outstanding_metadata_write_requests--;
@ -1108,9 +1200,9 @@ meta_fetch_on_complete (GObject *object,
g_hash_table_add (pull_data->fetched_detached_metadata, g_strdup (checksum));
if (!fetch_data->object_is_stored)
enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE);
enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE, fetch_data->requested_ref);
else
queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0);
queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0, fetch_data->requested_ref);
}
/* When traversing parents, do not fail on a missing commit.
@ -1125,7 +1217,7 @@ meta_fetch_on_complete (GObject *object,
if (pull_data->has_tombstone_commits)
{
enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT,
fetch_data->path, FALSE, FALSE);
fetch_data->path, FALSE, FALSE, NULL);
}
}
}
@ -1137,12 +1229,8 @@ meta_fetch_on_complete (GObject *object,
if (objtype == OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT)
goto out;
fd = openat (_ostree_fetcher_get_dfd (fetcher), tmp_unlinker.path, O_RDONLY | O_CLOEXEC);
if (fd == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
if (!glnx_openat_rdonly (_ostree_fetcher_get_dfd (fetcher), tmp_unlinker.path, TRUE, &fd, error))
goto out;
/* Now delete it, keeping the fd open as the last reference; see comment in
* corresponding content fetch path.
@ -1162,9 +1250,9 @@ meta_fetch_on_complete (GObject *object,
g_hash_table_add (pull_data->fetched_detached_metadata, g_strdup (checksum));
if (!fetch_data->object_is_stored)
enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE);
enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE, fetch_data->requested_ref);
else
queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0);
queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0, fetch_data->requested_ref);
}
else
{
@ -1250,12 +1338,8 @@ static_deltapart_fetch_on_complete (GObject *object,
if (!_ostree_fetcher_request_to_tmpfile_finish (fetcher, result, &temp_path, error))
goto out;
fd = openat (_ostree_fetcher_get_dfd (fetcher), temp_path, O_RDONLY | O_CLOEXEC);
if (fd == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
if (!glnx_openat_rdonly (_ostree_fetcher_get_dfd (fetcher), temp_path, TRUE, &fd, error))
goto out;
/* From here on, if we fail to apply the delta, we'll re-fetch it */
if (unlinkat (_ostree_fetcher_get_dfd (fetcher), temp_path, 0) < 0)
@ -1295,11 +1379,10 @@ process_verify_result (OtPullData *pull_data,
OstreeGpgVerifyResult *result,
GError **error)
{
const char *error_prefix = glnx_strjoina ("Commit ", checksum);
GLNX_AUTO_PREFIX_ERROR(error_prefix, error);
if (result == NULL)
{
g_prefix_error (error, "Commit %s: ", checksum);
return FALSE;
}
return FALSE;
/* Allow callers to output the results immediately. */
g_signal_emit_by_name (pull_data->repo,
@ -1307,10 +1390,8 @@ process_verify_result (OtPullData *pull_data,
checksum, result);
if (!ostree_gpg_verify_result_require_valid_signature (result, error))
{
g_prefix_error (error, "Commit %s: ", checksum);
return FALSE;
}
return FALSE;
return TRUE;
}
@ -1357,12 +1438,151 @@ commitstate_is_partial (OtPullData *pull_data,
|| (commitstate & OSTREE_REPO_COMMIT_STATE_PARTIAL) > 0;
}
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
/* Reads the collection-id of a given remote from the repo
* configuration.
*/
static char *
get_real_remote_repo_collection_id (OstreeRepo *repo,
const gchar *remote_name)
{
g_autofree gchar *remote_collection_id = NULL;
if (!ostree_repo_get_remote_option (repo, remote_name, "collection-id", NULL,
&remote_collection_id, NULL) ||
(remote_collection_id == NULL) ||
(remote_collection_id[0] == '\0'))
return NULL;
return g_steal_pointer (&remote_collection_id);
}
/* Reads the collection-id of the remote repo. Where it will be read
* from depends on whether we pull from the "local" remote repo (the
* "file://" URL) or "remote" remote repo (likely the "http(s)://"
* URL).
*/
static char *
get_remote_repo_collection_id (OtPullData *pull_data)
{
if (pull_data->remote_repo_local != NULL)
{
const char *remote_collection_id =
ostree_repo_get_collection_id (pull_data->remote_repo_local);
if ((remote_collection_id == NULL) ||
(remote_collection_id[0] == '\0'))
return NULL;
return g_strdup (remote_collection_id);
}
return get_real_remote_repo_collection_id (pull_data->repo,
pull_data->remote_name);
}
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
/* Verify the ref and collection bindings.
*
* The ref binding is verified only if it exists. But if we have the
* collection ID specified in the remote configuration then the ref
* binding must exist, otherwise the verification will fail. Parts of
* the verification can be skipped by passing NULL to the requested_ref
* parameter (in case we requested a checksum directly, without looking it up
* from a ref).
*
* The collection binding is verified only when we have collection ID
* specified in the remote configuration. If it is specified, then the
* binding must exist and must be equal to the remote repository
* collection ID.
*/
static gboolean
scan_commit_object (OtPullData *pull_data,
const char *checksum,
guint recursion_depth,
GCancellable *cancellable,
GError **error)
verify_bindings (OtPullData *pull_data,
GVariant *commit,
const OstreeCollectionRef *requested_ref,
GError **error)
{
g_autofree char *remote_collection_id = NULL;
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
remote_collection_id = get_remote_repo_collection_id (pull_data);
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
g_autoptr(GVariant) metadata = g_variant_get_child_value (commit, 0);
g_autofree const char **refs = NULL;
if (!g_variant_lookup (metadata,
OSTREE_COMMIT_META_KEY_REF_BINDING,
"^a&s",
&refs))
{
/* Early return here - if the remote collection ID is NULL, then
* we certainly will not verify the collection binding in the
* commit.
*/
if (remote_collection_id == NULL)
return TRUE;
return glnx_throw (error,
"expected commit metadata to have ref "
"binding information, found none");
}
if (requested_ref != NULL)
{
if (!g_strv_contains ((const char *const *) refs, requested_ref->ref_name))
{
g_autoptr(GString) refs_dump = g_string_new (NULL);
const char *refs_str;
if (refs != NULL && (*refs) != NULL)
{
for (const char **iter = refs; *iter != NULL; ++iter)
{
const char *ref = *iter;
if (refs_dump->len > 0)
g_string_append (refs_dump, ", ");
g_string_append_printf (refs_dump, "%s", ref);
}
refs_str = refs_dump->str;
}
else
{
refs_str = "no refs";
}
return glnx_throw (error, "commit has no requested ref %s "
"in ref binding metadata (%s)",
requested_ref->ref_name, refs_str);
}
}
if (remote_collection_id != NULL)
{
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
const char *collection_id;
if (!g_variant_lookup (metadata,
OSTREE_COMMIT_META_KEY_COLLECTION_BINDING,
"&s",
&collection_id))
return glnx_throw (error,
"expected commit metadata to have collection ID "
"binding information, found none");
if (!g_str_equal (collection_id, remote_collection_id))
return glnx_throw (error,
"commit has collection ID %s in collection binding "
"metadata, while the remote it came from has "
"collection ID %s",
collection_id, remote_collection_id);
#endif
}
return TRUE;
}
static gboolean
scan_commit_object (OtPullData *pull_data,
const char *checksum,
guint recursion_depth,
const OstreeCollectionRef *ref,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
/* If we found a legacy transaction flag, assume we have to scan.
@ -1405,6 +1625,15 @@ scan_commit_object (OtPullData *pull_data,
if (!ostree_repo_load_commit (pull_data->repo, checksum, &commit, &commitstate, error))
goto out;
/* If ref is non-NULL then the commit we fetched was requested through the
* branch, otherwise we requested a commit checksum without specifying a branch.
*/
if (!verify_bindings (pull_data, commit, ref, error))
{
g_prefix_error (error, "Commit %s: ", checksum);
goto out;
}
/* If we found a legacy transaction flag, assume all commits are partial */
is_partial = commitstate_is_partial (pull_data, commitstate);
@ -1421,7 +1650,7 @@ scan_commit_object (OtPullData *pull_data,
{
queue_scan_one_metadata_object_c (pull_data, parent_csum_bytes,
OSTREE_OBJECT_TYPE_COMMIT, NULL,
recursion_depth + 1);
recursion_depth + 1, NULL);
}
else if (parent_csum_bytes != NULL && depth > 0)
{
@ -1448,7 +1677,8 @@ scan_commit_object (OtPullData *pull_data,
queue_scan_one_metadata_object_c (pull_data, parent_csum_bytes,
OSTREE_OBJECT_TYPE_COMMIT,
NULL,
recursion_depth + 1);
recursion_depth + 1,
NULL);
}
}
@ -1475,10 +1705,10 @@ scan_commit_object (OtPullData *pull_data,
goto out;
queue_scan_one_metadata_object_c (pull_data, tree_contents_csum_bytes,
OSTREE_OBJECT_TYPE_DIR_TREE, "/", recursion_depth + 1);
OSTREE_OBJECT_TYPE_DIR_TREE, "/", recursion_depth + 1, NULL);
queue_scan_one_metadata_object_c (pull_data, tree_meta_csum_bytes,
OSTREE_OBJECT_TYPE_DIR_META, NULL, recursion_depth + 1);
OSTREE_OBJECT_TYPE_DIR_META, NULL, recursion_depth + 1, NULL);
}
ret = TRUE;
@ -1487,23 +1717,25 @@ scan_commit_object (OtPullData *pull_data,
}
static void
queue_scan_one_metadata_object (OtPullData *pull_data,
const char *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth)
queue_scan_one_metadata_object (OtPullData *pull_data,
const char *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref)
{
guchar buf[OSTREE_SHA256_DIGEST_LEN];
ostree_checksum_inplace_to_bytes (csum, buf);
queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth);
queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth, ref);
}
static void
queue_scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth)
queue_scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref)
{
ScanObjectQueueData *scan_data = g_new0 (ScanObjectQueueData, 1);
@ -1511,19 +1743,21 @@ queue_scan_one_metadata_object_c (OtPullData *pull_data,
scan_data->objtype = objtype;
scan_data->path = g_strdup (path);
scan_data->recursion_depth = recursion_depth;
scan_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
g_queue_push_tail (&pull_data->scan_object_queue, scan_data);
ensure_idle_queued (pull_data);
}
static gboolean
scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
GCancellable *cancellable,
GError **error)
scan_one_metadata_object_c (OtPullData *pull_data,
const guchar *csum,
OstreeObjectType objtype,
const char *path,
guint recursion_depth,
const OstreeCollectionRef *ref,
GCancellable *cancellable,
GError **error)
{
g_autofree char *tmp_checksum = ostree_checksum_from_bytes (csum);
g_autoptr(GVariant) object = ostree_object_name_serialize (tmp_checksum, objtype);
@ -1594,7 +1828,7 @@ scan_one_metadata_object_c (OtPullData *pull_data,
g_hash_table_add (pull_data->requested_metadata, g_variant_ref (object));
do_fetch_detached = (objtype == OSTREE_OBJECT_TYPE_COMMIT);
enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, do_fetch_detached, FALSE);
enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, do_fetch_detached, FALSE, ref);
}
else if (is_stored && objtype == OSTREE_OBJECT_TYPE_COMMIT)
{
@ -1602,10 +1836,10 @@ scan_one_metadata_object_c (OtPullData *pull_data,
* detached metadata before scanning it, in case new signatures appear.
* https://github.com/projectatomic/rpm-ostree/issues/630 */
if (!g_hash_table_contains (pull_data->fetched_detached_metadata, tmp_checksum))
enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE);
enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE, ref);
else
{
if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth,
if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth, ref,
pull_data->cancellable, error))
return FALSE;
@ -1627,12 +1861,13 @@ scan_one_metadata_object_c (OtPullData *pull_data,
}
static void
enqueue_one_object_request (OtPullData *pull_data,
const char *checksum,
OstreeObjectType objtype,
const char *path,
gboolean is_detached_meta,
gboolean object_is_stored)
enqueue_one_object_request (OtPullData *pull_data,
const char *checksum,
OstreeObjectType objtype,
const char *path,
gboolean is_detached_meta,
gboolean object_is_stored,
const OstreeCollectionRef *ref)
{
gboolean is_meta;
FetchObjectData *fetch_data;
@ -1645,6 +1880,7 @@ enqueue_one_object_request (OtPullData *pull_data,
fetch_data->path = g_strdup (path);
fetch_data->is_detached_meta = is_detached_meta;
fetch_data->object_is_stored = object_is_stored;
fetch_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
if (is_meta)
pull_data->n_requested_metadata++;
@ -1699,6 +1935,7 @@ start_fetch (OtPullData *pull_data,
else
pull_data->n_outstanding_content_fetches++;
OstreeFetcherRequestFlags flags = 0;
/* Override the path if we're trying to fetch the .commitmeta file first */
if (fetch->is_detached_meta)
{
@ -1706,6 +1943,7 @@ start_fetch (OtPullData *pull_data,
_ostree_loose_path (buf, expected_checksum, OSTREE_OBJECT_TYPE_COMMIT_META, pull_data->remote_mode);
obj_subpath = g_build_filename ("objects", buf, NULL);
mirrorlist = pull_data->meta_mirrorlist;
flags |= OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT;
}
else
{
@ -1725,7 +1963,7 @@ start_fetch (OtPullData *pull_data,
expected_max_size = 0;
_ostree_fetcher_request_to_tmpfile (pull_data->fetcher, mirrorlist,
obj_subpath, expected_max_size,
obj_subpath, flags, expected_max_size,
is_meta ? OSTREE_REPO_PULL_METADATA_PRIORITY
: OSTREE_REPO_PULL_CONTENT_PRIORITY,
pull_data->cancellable,
@ -1749,7 +1987,7 @@ load_remote_repo_config (OtPullData *pull_data,
g_autoptr(GKeyFile) ret_keyfile = g_key_file_new ();
if (!g_key_file_load_from_data (ret_keyfile, contents, strlen (contents),
0, error))
return FALSE;
return glnx_prefix_error (error, "Parsing config");
ot_transfer_out_value (out_keyfile, &ret_keyfile);
return TRUE;
@ -1812,7 +2050,7 @@ process_one_static_delta_fallback (OtPullData *pull_data,
* for it as logically part of the delta fetch.
*/
g_hash_table_add (pull_data->requested_fallback_content, g_strdup (checksum));
enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_FILE, NULL, FALSE, FALSE);
enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_FILE, NULL, FALSE, FALSE, NULL);
checksum = NULL; /* We transferred ownership to the requested_content hash */
}
}
@ -1830,7 +2068,7 @@ start_fetch_deltapart (OtPullData *pull_data,
g_assert_cmpint (pull_data->n_outstanding_deltapart_fetches, <=, _OSTREE_MAX_OUTSTANDING_DELTAPART_REQUESTS);
_ostree_fetcher_request_to_tmpfile (pull_data->fetcher,
pull_data->content_mirrorlist,
deltapart_path, fetch->size,
deltapart_path, 0, fetch->size,
OSTREE_FETCHER_DEFAULT_PRIORITY,
pull_data->cancellable,
static_deltapart_fetch_on_complete,
@ -1838,12 +2076,13 @@ start_fetch_deltapart (OtPullData *pull_data,
}
static gboolean
process_one_static_delta (OtPullData *pull_data,
const char *from_revision,
const char *to_revision,
GVariant *delta_superblock,
GCancellable *cancellable,
GError **error)
process_one_static_delta (OtPullData *pull_data,
const char *from_revision,
const char *to_revision,
GVariant *delta_superblock,
const OstreeCollectionRef *ref,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
gboolean delta_byteswap;
@ -1918,6 +2157,7 @@ process_one_static_delta (OtPullData *pull_data,
fetch_data->object = ostree_object_name_serialize (to_checksum, OSTREE_OBJECT_TYPE_COMMIT);
fetch_data->is_detached_meta = FALSE;
fetch_data->object_is_stored = FALSE;
fetch_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
ostree_repo_write_metadata_async (pull_data->repo, OSTREE_OBJECT_TYPE_COMMIT, to_checksum,
to_commit,
@ -2142,6 +2382,7 @@ typedef struct {
OtPullData *pull_data;
char *from_revision;
char *to_revision;
OstreeCollectionRef *requested_ref; /* (nullable) */
} FetchDeltaSuperData;
static void
@ -2183,7 +2424,7 @@ on_superblock_fetched (GObject *src,
goto out;
}
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0);
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, fdata->requested_ref);
}
else
{
@ -2224,7 +2465,7 @@ on_superblock_fetched (GObject *src,
delta_superblock_data, FALSE));
g_ptr_array_add (pull_data->static_delta_superblocks, g_variant_ref (delta_superblock));
if (!process_one_static_delta (pull_data, from_revision, to_revision, delta_superblock,
if (!process_one_static_delta (pull_data, from_revision, to_revision, delta_superblock, fdata->requested_ref,
pull_data->cancellable, error))
goto out;
}
@ -2232,6 +2473,8 @@ on_superblock_fetched (GObject *src,
out:
g_free (fdata->from_revision);
g_free (fdata->to_revision);
if (fdata->requested_ref)
ostree_collection_ref_free (fdata->requested_ref);
g_free (fdata);
g_assert (pull_data->n_outstanding_metadata_fetches > 0);
pull_data->n_outstanding_metadata_fetches--;
@ -2446,16 +2689,16 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self,
}
{
g_autofree char *jar_path = NULL;
g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt",
remote_name);
g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name);
/* TODO; port away from this; a bit hard since both libsoup and libcurl
* expect a file. Doing ot_fdrel_to_gfile() works for now though.
*/
GFile*repo_path = ostree_repo_get_path (self);
g_autofree char *jar_path =
g_build_filename (gs_file_get_path_cached (repo_path), cookie_file, NULL);
jar_path = g_build_filename (gs_file_get_path_cached (self->repodir), cookie_file,
NULL);
if (g_file_test(jar_path, G_FILE_TEST_IS_REGULAR))
if (g_file_test (jar_path, G_FILE_TEST_IS_REGULAR))
_ostree_fetcher_set_cookie_jar (fetcher, jar_path);
}
success = TRUE;
@ -2507,7 +2750,8 @@ _ostree_preload_metadata_file (OstreeRepo *self,
else
{
ret = _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist,
filename, FALSE, TRUE,
filename,
OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT,
out_bytes,
OSTREE_MAX_METADATA_SIZE,
cancellable, error);
@ -2774,7 +3018,8 @@ reinitialize_fetcher (OtPullData *pull_data, const char *remote_name, GError **e
static void
initiate_delta_request (OtPullData *pull_data,
const char *from_revision,
const char *to_revision)
const char *to_revision,
const OstreeCollectionRef *ref)
{
g_autofree char *delta_name =
_ostree_get_relative_static_delta_superblock_path (from_revision, to_revision);
@ -2782,6 +3027,7 @@ initiate_delta_request (OtPullData *pull_data,
fdata->pull_data = pull_data;
fdata->from_revision = g_strdup (from_revision);
fdata->to_revision = g_strdup (to_revision);
fdata->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
_ostree_fetcher_request_to_membuf (pull_data->fetcher,
pull_data->content_mirrorlist,
@ -2815,7 +3061,7 @@ initiate_request (OtPullData *pull_data,
/* Are deltas disabled? OK, just start an object fetch and be done */
if (pull_data->disable_static_deltas)
{
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0);
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, ref);
return TRUE;
}
@ -2831,16 +3077,16 @@ initiate_request (OtPullData *pull_data,
return FALSE;
if (delta_from_revision) /* Did we find a delta FROM commit? */
initiate_delta_request (pull_data, delta_from_revision, to_revision);
initiate_delta_request (pull_data, delta_from_revision, to_revision, ref);
else if (have_scratch_delta) /* No delta FROM, do we have a scratch? */
initiate_delta_request (pull_data, NULL, to_revision);
initiate_delta_request (pull_data, NULL, to_revision, ref);
else if (pull_data->require_static_deltas) /* No deltas found; are they required? */
{
set_required_deltas_error (error, (ref != NULL) ? ref->ref_name : "", to_revision);
return FALSE;
}
else /* No deltas, fall back to object fetches. */
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0);
queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, ref);
}
else if (ref != NULL)
{
@ -2874,14 +3120,14 @@ initiate_request (OtPullData *pull_data,
/* This is similar to the below, except we *might* use the previous
* commit, or we might do a scratch delta first.
*/
initiate_delta_request (pull_data, delta_from_revision ?: NULL, to_revision);
initiate_delta_request (pull_data, delta_from_revision ?: NULL, to_revision, ref);
}
else
{
/* Legacy path without a summary file - let's try a scratch delta, if that
* doesn't work, it'll drop down to object requests.
*/
initiate_delta_request (pull_data, NULL, to_revision);
initiate_delta_request (pull_data, NULL, to_revision, NULL);
}
return TRUE;
@ -3342,7 +3588,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
{
if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
pull_data->meta_mirrorlist,
"summary.sig", FALSE, TRUE,
"summary.sig", OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT,
&bytes_sig,
OSTREE_MAX_METADATA_SIZE,
cancellable, error))
@ -3366,7 +3612,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
{
if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher,
pull_data->meta_mirrorlist,
"summary", FALSE, TRUE,
"summary", OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT,
&bytes_summary,
OSTREE_MAX_METADATA_SIZE,
cancellable, error))
@ -4604,8 +4850,7 @@ find_remotes_cb (GObject *obj,
if (!_ostree_fetcher_mirrored_request_to_membuf (fetcher,
mirrorlist,
commit_filename,
FALSE, /* dont add trailing nul */
TRUE, /* return NULL on ENOENT */
OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT,
&commit_bytes,
0, /* no maximum size */
cancellable,
@ -5097,9 +5342,8 @@ check_remote_matches_collection_id (OstreeRepo *repo,
{
g_autofree gchar *remote_collection_id = NULL;
if (!ostree_repo_get_remote_option (repo, remote_name, "collection-id", NULL,
&remote_collection_id, NULL) ||
remote_collection_id == NULL)
remote_collection_id = get_real_remote_repo_collection_id (repo, remote_name);
if (remote_collection_id == NULL)
return FALSE;
return g_str_equal (remote_collection_id, collection_id);

View File

@ -50,7 +50,7 @@ typedef struct {
GVariant *mode_dict;
GVariant *xattr_dict;
gboolean object_start;
gboolean caught_error;
GError **async_error;
@ -68,12 +68,12 @@ typedef struct {
guint32 gid;
guint32 mode;
GVariant *xattrs;
const guint8 *output_target;
const guint8 *input_target_csum;
const guint8 *payload_data;
guint64 payload_size;
guint64 payload_size;
} StaticDeltaExecutionState;
typedef struct {
@ -127,26 +127,21 @@ open_output_target (StaticDeltaExecutionState *state,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
guint8 *objcsum;
g_assert (state->checksums != NULL);
g_assert (state->output_target == NULL);
g_assert (state->checksum_index < state->n_checksums);
objcsum = (guint8*)state->checksums + (state->checksum_index * OSTREE_STATIC_DELTA_OBJTYPE_CSUM_LEN);
guint8 *objcsum = (guint8*)state->checksums + (state->checksum_index * OSTREE_STATIC_DELTA_OBJTYPE_CSUM_LEN);
if (G_UNLIKELY(!ostree_validate_structureof_objtype (*objcsum, error)))
goto out;
return FALSE;
state->output_objtype = (OstreeObjectType) *objcsum;
state->output_target = objcsum + 1;
ostree_checksum_inplace_from_bytes (state->output_target, state->checksum);
ret = TRUE;
out:
return ret;
return TRUE;
}
static guint
@ -353,7 +348,7 @@ _ostree_static_delta_part_execute_async (OstreeRepo *repo,
gboolean
_ostree_static_delta_part_execute_finish (OstreeRepo *repo,
GAsyncResult *result,
GError **error)
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
@ -386,7 +381,7 @@ content_out_write (OstreeRepo *repo,
StaticDeltaExecutionState *state,
const guint8* buf,
gsize len,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gsize bytes_written;
@ -407,21 +402,19 @@ content_out_write (OstreeRepo *repo,
static gboolean
do_content_open_generic (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
g_autoptr(GVariant) modev = NULL;
guint64 mode_offset;
guint64 xattr_offset;
guint32 uid, gid, mode;
if (!read_varuint64 (state, &mode_offset, error))
goto out;
return FALSE;
if (!read_varuint64 (state, &xattr_offset, error))
goto out;
return FALSE;
modev = g_variant_get_child_value (state->mode_dict, mode_offset);
g_autoptr(GVariant) modev = g_variant_get_child_value (state->mode_dict, mode_offset);
guint32 uid, gid, mode;
g_variant_get (modev, "(uuu)", &uid, &gid, &mode);
state->uid = GUINT32_FROM_BE (uid);
state->gid = GUINT32_FROM_BE (gid);
@ -429,9 +422,7 @@ do_content_open_generic (OstreeRepo *repo,
state->xattrs = g_variant_get_child_value (state->xattr_dict, xattr_offset);
ret = TRUE;
out:
return ret;
return TRUE;
}
struct bzpatch_opaque_s
@ -460,35 +451,29 @@ dispatch_bspatch (OstreeRepo *repo,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
guint64 offset, length;
g_autoptr(GMappedFile) input_mfile = NULL;
g_autofree guchar *buf = NULL;
struct bspatch_stream stream;
struct bzpatch_opaque_s opaque;
if (!read_varuint64 (state, &offset, error))
goto out;
return FALSE;
if (!read_varuint64 (state, &length, error))
goto out;
return FALSE;
if (state->stats_only)
{
ret = TRUE;
goto out;
}
return TRUE; /* Early return */
if (!state->have_obj)
{
input_mfile = g_mapped_file_new_from_fd (state->read_source_fd, FALSE, error);
g_autoptr(GMappedFile) input_mfile = g_mapped_file_new_from_fd (state->read_source_fd, FALSE, error);
if (!input_mfile)
goto out;
return FALSE;
buf = g_malloc0 (state->content_size);
g_autofree guchar *buf = g_malloc0 (state->content_size);
struct bzpatch_opaque_s opaque;
opaque.state = state;
opaque.offset = offset;
opaque.length = length;
struct bspatch_stream stream;
stream.read = bspatch_read;
stream.opaque = &opaque;
if (bspatch ((const guint8*)g_mapped_file_get_contents (input_mfile),
@ -496,16 +481,14 @@ dispatch_bspatch (OstreeRepo *repo,
buf,
state->content_size,
&stream) < 0)
goto out;
return FALSE;
if (!content_out_write (repo, state, buf, state->content_size,
cancellable, error))
goto out;
return FALSE;
}
ret = TRUE;
out:
return ret;
return TRUE;
}
/* Before, we had a distinction between "trusted" and "untrusted" deltas
@ -534,7 +517,7 @@ handle_untrusted_content_checksum (OstreeRepo *repo,
static gboolean
dispatch_open_splice_and_close (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
@ -560,7 +543,7 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
ret = TRUE;
goto out;
}
metadata = g_variant_new_from_data (ostree_metadata_variant_type (state->output_objtype),
state->payload_data + offset, length, TRUE, NULL, NULL);
@ -581,7 +564,7 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
guint64 objlen;
g_autoptr(GInputStream) object_input = NULL;
g_autoptr(GInputStream) memin = NULL;
if (!do_content_open_generic (repo, state, cancellable, error))
goto out;
@ -591,7 +574,7 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
goto out;
if (!validate_ofs (state, content_offset, state->content_size, error))
goto out;
if (state->stats_only)
{
ret = TRUE;
@ -599,7 +582,7 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
}
/* Fast path for regular files to bare repositories */
if (S_ISREG (state->mode) &&
if (S_ISREG (state->mode) &&
(repo->mode == OSTREE_REPO_MODE_BARE ||
repo->mode == OSTREE_REPO_MODE_BARE_USER))
{
@ -676,10 +659,10 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
static gboolean
dispatch_open (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GLNX_AUTO_PREFIX_ERROR("opcode open", error);
g_assert (state->output_target == NULL);
/* FIXME - lift this restriction */
@ -689,71 +672,58 @@ dispatch_open (OstreeRepo *repo,
repo->mode == OSTREE_REPO_MODE_BARE_USER ||
repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY);
}
if (!open_output_target (state, cancellable, error))
goto out;
return FALSE;
if (!do_content_open_generic (repo, state, cancellable, error))
goto out;
return FALSE;
if (!read_varuint64 (state, &state->content_size, error))
goto out;
return FALSE;
if (state->stats_only)
{
ret = TRUE;
goto out;
}
return TRUE; /* Early return */
if (!_ostree_repo_open_content_bare (repo, state->checksum,
state->content_size,
&state->tmpf,
&state->have_obj,
cancellable, error))
goto out;
return FALSE;
if (!state->have_obj)
state->content_out = g_unix_output_stream_new (state->tmpf.fd, FALSE);
if (!handle_untrusted_content_checksum (repo, state, cancellable, error))
goto out;
return FALSE;
ret = TRUE;
out:
if (!ret)
g_prefix_error (error, "opcode open: ");
return ret;
return TRUE;
}
static gboolean
dispatch_write (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GLNX_AUTO_PREFIX_ERROR("opcode open-splice-and-close", error);
guint64 content_size;
guint64 content_offset;
if (!read_varuint64 (state, &content_size, error))
goto out;
return FALSE;
if (!read_varuint64 (state, &content_offset, error))
goto out;
return FALSE;
if (state->stats_only)
{
ret = TRUE;
goto out;
}
return TRUE; /* Early return */
if (!state->have_obj)
{
if (state->read_source_fd != -1)
{
if (lseek (state->read_source_fd, content_offset, SEEK_SET) == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "lseek");
while (content_size > 0)
{
char buf[4096];
@ -763,49 +733,38 @@ dispatch_write (OstreeRepo *repo,
bytes_read = read (state->read_source_fd, buf, MIN(sizeof(buf), content_size));
while (G_UNLIKELY (bytes_read == -1 && errno == EINTR));
if (bytes_read == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "read");
if (G_UNLIKELY (bytes_read == 0))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unexpected EOF reading object %s", state->read_source_object);
goto out;
}
return glnx_throw (error, "Unexpected EOF reading object %s", state->read_source_object);
if (!content_out_write (repo, state, (guint8*)buf, bytes_read,
cancellable, error))
goto out;
return FALSE;
content_size -= bytes_read;
}
}
else
{
if (!validate_ofs (state, content_offset, content_size, error))
goto out;
return FALSE;
if (!content_out_write (repo, state, state->payload_data + content_offset, content_size,
cancellable, error))
goto out;
return FALSE;
}
}
ret = TRUE;
out:
if (!ret)
g_prefix_error (error, "opcode open-splice-and-close: ");
return ret;
return TRUE;
}
static gboolean
dispatch_set_read_source (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GLNX_AUTO_PREFIX_ERROR("opcode set-read-source", error);
guint64 source_offset;
if (state->read_source_fd != -1)
@ -815,15 +774,12 @@ dispatch_set_read_source (OstreeRepo *repo,
}
if (!read_varuint64 (state, &source_offset, error))
goto out;
return FALSE;
if (!validate_ofs (state, source_offset, 32, error))
goto out;
return FALSE;
if (state->stats_only)
{
ret = TRUE;
goto out;
}
return TRUE; /* Early return */
g_free (state->read_source_object);
state->read_source_object = ostree_checksum_from_bytes (state->payload_data + source_offset);
@ -832,28 +788,21 @@ dispatch_set_read_source (OstreeRepo *repo,
&state->read_source_fd,
NULL, NULL, NULL,
cancellable, error))
goto out;
return FALSE;
ret = TRUE;
out:
if (!ret)
g_prefix_error (error, "opcode set-read-source: ");
return ret;
return TRUE;
}
static gboolean
dispatch_unset_read_source (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GLNX_AUTO_PREFIX_ERROR("opcode unset-read-source", error);
if (state->stats_only)
{
ret = TRUE;
goto out;
}
return TRUE; /* Early return */
if (state->read_source_fd != -1)
{
@ -862,60 +811,48 @@ dispatch_unset_read_source (OstreeRepo *repo,
}
g_clear_pointer (&state->read_source_object, g_free);
ret = TRUE;
out:
if (!ret)
g_prefix_error (error, "opcode unset-read-source: ");
return ret;
return TRUE;
}
static gboolean
dispatch_close (OstreeRepo *repo,
StaticDeltaExecutionState *state,
GCancellable *cancellable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GLNX_AUTO_PREFIX_ERROR("opcode open-splice-and-close", error);
if (state->content_out)
{
if (!g_output_stream_flush (state->content_out, cancellable, error))
goto out;
return FALSE;
if (state->content_checksum)
{
const char *actual_checksum = g_checksum_get_string (state->content_checksum);
if (strcmp (actual_checksum, state->checksum) != 0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Corrupted object %s (actual checksum is %s)",
state->checksum, actual_checksum);
goto out;
}
return glnx_throw (error, "Corrupted object %s (actual checksum is %s)",
state->checksum, actual_checksum);
}
if (!_ostree_repo_commit_trusted_content_bare (repo, state->checksum, &state->tmpf,
state->uid, state->gid, state->mode,
state->xattrs,
cancellable, error))
goto out;
return FALSE;
g_clear_object (&state->content_out);
}
if (!dispatch_unset_read_source (repo, state, cancellable, error))
goto out;
return FALSE;
g_clear_pointer (&state->xattrs, g_variant_unref);
g_clear_pointer (&state->content_checksum, g_checksum_free);
state->checksum_index++;
state->output_target = NULL;
ret = TRUE;
out:
if (!ret)
g_prefix_error (error, "opcode open-splice-and-close: ");
return ret;
return TRUE;
}

View File

@ -32,6 +32,7 @@
#include <glnx-console.h>
#include "ostree-core-private.h"
#include "ostree-sysroot-private.h"
#include "ostree-remote-private.h"
#include "ostree-repo-private.h"
#include "ostree-repo-file.h"
@ -125,6 +126,10 @@ G_DEFINE_TYPE (OstreeRepo, ostree_repo, G_TYPE_OBJECT)
#define SYSCONF_REMOTES SHORTENED_SYSCONFDIR "/ostree/remotes.d"
static GFile *
get_remotes_d_dir (OstreeRepo *self,
GFile *sysroot);
OstreeRemote *
_ostree_repo_get_remote (OstreeRepo *self,
const char *name,
@ -467,6 +472,7 @@ ostree_repo_finalize (GObject *object)
if (self->uncompressed_objects_dir_fd != -1)
(void) close (self->uncompressed_objects_dir_fd);
g_clear_object (&self->sysroot_dir);
g_weak_ref_clear (&self->sysroot);
g_free (self->remotes_config_dir);
if (self->loose_object_devino_hash)
@ -547,10 +553,6 @@ ostree_repo_constructed (GObject *object)
g_assert (self->repodir != NULL);
/* Ensure the "sysroot-path" property is set. */
if (self->sysroot_dir == NULL)
self->sysroot_dir = g_object_ref (_ostree_get_default_sysroot_path ());
G_OBJECT_CLASS (ostree_repo_parent_class)->constructed (object);
}
@ -645,6 +647,7 @@ ostree_repo_init (OstreeRepo *self)
self->objects_dir_fd = -1;
self->uncompressed_objects_dir_fd = -1;
self->commit_stagedir_lock = empty_lockfile;
self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_UNKNOWN;
}
/**
@ -728,18 +731,20 @@ ostree_repo_new_default (void)
gboolean
ostree_repo_is_system (OstreeRepo *repo)
{
g_autoptr(GFile) default_repo_path = NULL;
g_return_val_if_fail (OSTREE_IS_REPO (repo), FALSE);
/* If we were created via ostree_sysroot_get_repo(), we know the answer is yes
* without having to compare file paths.
*/
if (repo->is_system)
if (repo->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT ||
repo->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE)
return TRUE;
default_repo_path = get_default_repo_path (repo->sysroot_dir);
/* No sysroot_dir set? Not a system repo then. */
if (!repo->sysroot_dir)
return FALSE;
g_autoptr(GFile) default_repo_path = get_default_repo_path (repo->sysroot_dir);
return g_file_equal (repo->repodir, default_repo_path);
}
@ -916,24 +921,11 @@ impl_repo_remote_add (OstreeRepo *self,
remote = ostree_remote_new (name);
/* The OstreeRepo maintains its own internal system root path,
* so we need to not only check if a "sysroot" argument was given
* but also whether it's actually different from OstreeRepo's.
*
* XXX Having API regret about the "sysroot" argument now.
*/
gboolean different_sysroot = FALSE;
if (sysroot != NULL)
different_sysroot = !g_file_equal (sysroot, self->sysroot_dir);
if (different_sysroot || ostree_repo_is_system (self))
g_autoptr(GFile) etc_ostree_remotes_d = get_remotes_d_dir (self, sysroot);
if (etc_ostree_remotes_d)
{
g_autoptr(GError) local_error = NULL;
if (sysroot == NULL)
sysroot = self->sysroot_dir;
g_autoptr(GFile) etc_ostree_remotes_d = g_file_resolve_relative_path (sysroot, SYSCONF_REMOTES);
if (!g_file_make_directory_with_parents (etc_ostree_remotes_d,
cancellable, &local_error))
{
@ -1761,8 +1753,6 @@ ostree_repo_create (OstreeRepo *self,
if (!glnx_open_tmpfile_linkable_at (dfd, ".", O_RDWR|O_CLOEXEC, &tmpf, error))
return FALSE;
if (fchmod (tmpf.fd, 0600) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!_ostree_write_bareuser_metadata (tmpf.fd, 0, 0, 644, NULL, error))
return FALSE;
}
@ -1874,14 +1864,55 @@ append_one_remote_config (OstreeRepo *self,
}
static GFile *
get_remotes_d_dir (OstreeRepo *self)
get_remotes_d_dir (OstreeRepo *self,
GFile *sysroot)
{
if (self->remotes_config_dir != NULL)
/* Support explicit override */
if (self->sysroot_dir != NULL && self->remotes_config_dir != NULL)
return g_file_resolve_relative_path (self->sysroot_dir, self->remotes_config_dir);
else if (ostree_repo_is_system (self))
return g_file_resolve_relative_path (self->sysroot_dir, SYSCONF_REMOTES);
return NULL;
g_autoptr(GFile) sysroot_owned = NULL;
/* Very complicated sysroot logic; this bit breaks the otherwise mostly clean
* layering between OstreeRepo and OstreeSysroot. First, If a sysroot was
* provided, use it. Otherwise, check to see whether we reference
* /ostree/repo, or if not that, see if we have a ref to a sysroot (and it's
* physical).
*/
g_autoptr(OstreeSysroot) sysroot_ref = NULL;
if (sysroot == NULL)
{
/* No explicit sysroot? Let's see if we have a kind */
switch (self->sysroot_kind)
{
case OSTREE_REPO_SYSROOT_KIND_UNKNOWN:
g_assert_not_reached ();
break;
case OSTREE_REPO_SYSROOT_KIND_NO:
break;
case OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE:
sysroot = sysroot_owned = g_file_new_for_path ("/");
break;
case OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT:
sysroot_ref = (OstreeSysroot*)g_weak_ref_get (&self->sysroot);
/* Only write to /etc/ostree/remotes.d if we are pointed at a deployment */
if (sysroot_ref != NULL && !sysroot_ref->is_physical)
sysroot = ostree_sysroot_get_path (sysroot_ref);
break;
}
}
/* For backwards compat, also fall back to the sysroot-path variable, which we
* don't set anymore internally, and I hope no one else uses.
*/
if (sysroot == NULL && sysroot_ref == NULL)
sysroot = self->sysroot_dir;
/* Did we find a sysroot? If not, NULL means use the repo config, otherwise
* return the path in /etc.
*/
if (sysroot == NULL)
return NULL;
else
return g_file_resolve_relative_path (sysroot, SYSCONF_REMOTES);
}
static gboolean
@ -2036,7 +2067,7 @@ reload_remote_config (OstreeRepo *self,
if (!add_remotes_from_keyfile (self, self->config, NULL, error))
return FALSE;
g_autoptr(GFile) remotes_d = get_remotes_d_dir (self);
g_autoptr(GFile) remotes_d = get_remotes_d_dir (self, NULL);
if (remotes_d == NULL)
return TRUE;
@ -2101,6 +2132,7 @@ ostree_repo_open (OstreeRepo *self,
GCancellable *cancellable,
GError **error)
{
struct stat self_stbuf;
struct stat stbuf;
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@ -2137,6 +2169,9 @@ ostree_repo_open (OstreeRepo *self,
return FALSE;
}
if (!glnx_fstat (self->repo_dir_fd, &self_stbuf, error))
return FALSE;
if (!glnx_opendirat (self->repo_dir_fd, "objects", TRUE,
&self->objects_dir_fd, error))
{
@ -2166,6 +2201,20 @@ ostree_repo_open (OstreeRepo *self,
self->target_owner_uid = self->target_owner_gid = -1;
}
if (self->writable)
{
/* Always try to recreate the tmpdir to be nice to people
* who are looking to free up space.
*
* https://github.com/ostreedev/ostree/issues/1018
*/
if (mkdirat (self->repo_dir_fd, "tmp", 0755) == -1)
{
if (G_UNLIKELY (errno != EEXIST))
return glnx_throw_errno_prefix (error, "mkdir(tmp)");
}
}
if (!glnx_opendirat (self->repo_dir_fd, "tmp", TRUE, &self->tmp_dir_fd, error))
return FALSE;
@ -2178,6 +2227,27 @@ ostree_repo_open (OstreeRepo *self,
return FALSE;
}
/* If we weren't created via ostree_sysroot_get_repo(), for backwards
* compatibility we need to figure out now whether or not we refer to the
* system repo. See also ostree-sysroot.c.
*/
if (self->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_UNKNOWN)
{
struct stat system_stbuf;
/* Ignore any errors if we can't access /ostree/repo */
if (fstatat (AT_FDCWD, "/ostree/repo", &system_stbuf, 0) == 0)
{
/* Are we the same as /ostree/repo? */
if (self_stbuf.st_dev == system_stbuf.st_dev &&
self_stbuf.st_ino == system_stbuf.st_ino)
self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE;
else
self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_NO;
}
else
self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_NO;
}
if (!ostree_repo_reload_config (self, cancellable, error))
return FALSE;
@ -4144,7 +4214,7 @@ find_keyring (OstreeRepo *self,
return g_steal_pointer (&file);
}
g_autoptr(GFile) remotes_d = get_remotes_d_dir (self);
g_autoptr(GFile) remotes_d = get_remotes_d_dir (self, NULL);
if (remotes_d)
{
g_autoptr(GFile) file2 = g_file_get_child (remotes_d, remote->keyring);
@ -4648,9 +4718,10 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
return FALSE;
g_autofree char *superblock = _ostree_get_relative_static_delta_superblock_path ((from && from[0]) ? from : NULL, to);
glnx_fd_close int superblock_file_fd = openat (self->repo_dir_fd, superblock, O_RDONLY | O_CLOEXEC);
if (superblock_file_fd == -1)
return glnx_throw_errno (error);
glnx_fd_close int superblock_file_fd = -1;
if (!glnx_openat_rdonly (self->repo_dir_fd, superblock, TRUE, &superblock_file_fd, error))
return FALSE;
g_autoptr(GInputStream) in_stream = g_unix_input_stream_new (superblock_file_fd, FALSE);
if (!in_stream)

View File

@ -1244,6 +1244,32 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo *self,
GCancellable *cancellable,
GError **error);
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
/**
* OSTREE_REPO_METADATA_REF:
*
* 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: 2017.8
*/
#define OSTREE_REPO_METADATA_REF "ostree-metadata"
#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */
G_END_DECLS

View File

@ -52,34 +52,24 @@ symlink_at_replace (const char *oldpath,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
int res;
/* Possibly in the future generate a temporary random name here,
* would need to move "generate a temporary name" code into
* libglnx or glib?
*/
g_autofree char *temppath = g_strconcat (newpath, ".tmp", NULL);
/* Clean up any stale temporary links */
/* Clean up any stale temporary links */
(void) unlinkat (parent_dfd, temppath, 0);
/* Create the temp link */
do
res = symlinkat (oldpath, parent_dfd, temppath);
while (G_UNLIKELY (res == -1 && errno == EINTR));
if (res == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
/* Create the temp link */
if (TEMP_FAILURE_RETRY (symlinkat (oldpath, parent_dfd, temppath)) < 0)
return glnx_throw_errno_prefix (error, "symlinkat");
/* Rename it into place */
if (!glnx_renameat (parent_dfd, temppath, parent_dfd, newpath, error))
goto out;
return FALSE;
ret = TRUE;
out:
return ret;
return TRUE;
}
static GLnxFileCopyFlags
@ -104,26 +94,17 @@ hardlink_or_copy_at (int src_dfd,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
if (linkat (src_dfd, src_subpath, dest_dfd, dest_subpath, 0) != 0)
{
if (errno == EMLINK || errno == EXDEV)
{
return glnx_file_copy_at (src_dfd, src_subpath, NULL, dest_dfd, dest_subpath,
sysroot_flags_to_copy_flags (0, flags),
cancellable, error);
}
if (G_IN_SET (errno, EMLINK, EXDEV))
return glnx_file_copy_at (src_dfd, src_subpath, NULL, dest_dfd, dest_subpath,
sysroot_flags_to_copy_flags (0, flags),
cancellable, error);
else
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "linkat");
}
ret = TRUE;
out:
return ret;
return TRUE;
}
static gboolean
@ -135,8 +116,6 @@ dirfd_copy_attributes_and_xattrs (int src_parent_dfd,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
struct stat src_stbuf;
g_autoptr(GVariant) xattrs = NULL;
/* Clone all xattrs first, so we get the SELinux security context
@ -147,31 +126,21 @@ dirfd_copy_attributes_and_xattrs (int src_parent_dfd,
{
if (!glnx_dfd_name_get_all_xattrs (src_parent_dfd, src_name,
&xattrs, cancellable, error))
goto out;
return FALSE;
if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs,
cancellable, error))
goto out;
return FALSE;
}
if (fstat (src_dfd, &src_stbuf) != 0)
{
glnx_set_error_from_errno (error);
goto out;
}
struct stat src_stbuf;
if (!glnx_fstat (src_dfd, &src_stbuf, error))
return FALSE;
if (fchown (dest_dfd, src_stbuf.st_uid, src_stbuf.st_gid) != 0)
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "fchown");
if (fchmod (dest_dfd, src_stbuf.st_mode) != 0)
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "fchmod");
ret = TRUE;
out:
return ret;
return TRUE;
}
static gboolean
@ -199,7 +168,7 @@ copy_dir_recurse (int src_parent_dfd,
if (!dirfd_copy_attributes_and_xattrs (src_parent_dfd, name, src_dfd_iter.fd, dest_dfd,
flags, cancellable, error))
return FALSE;
while (TRUE)
{
struct stat child_stbuf;
@ -209,9 +178,9 @@ copy_dir_recurse (int src_parent_dfd,
if (dent == NULL)
break;
if (fstatat (src_dfd_iter.fd, dent->d_name, &child_stbuf,
AT_SYMLINK_NOFOLLOW) != 0)
return glnx_throw_errno (error);
if (!glnx_fstatat (src_dfd_iter.fd, dent->d_name, &child_stbuf,
AT_SYMLINK_NOFOLLOW, error))
return FALSE;
if (S_ISDIR (child_stbuf.st_mode))
{
@ -242,7 +211,6 @@ ensure_directory_from_template (int orig_etc_fd,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
glnx_fd_close int src_dfd = -1;
glnx_fd_close int target_dfd = -1;
@ -250,7 +218,7 @@ ensure_directory_from_template (int orig_etc_fd,
g_assert (*path != '/' && *path != '\0');
if (!glnx_opendirat (modified_etc_fd, path, TRUE, &src_dfd, error))
goto out;
return FALSE;
/* Create with mode 0700, we'll fchmod/fchown later */
again:
@ -268,7 +236,7 @@ ensure_directory_from_template (int orig_etc_fd,
{
if (!ensure_directory_from_template (orig_etc_fd, modified_etc_fd, new_etc_fd,
parent_path, NULL, flags, cancellable, error))
goto out;
return FALSE;
/* Loop */
goto again;
@ -280,29 +248,19 @@ ensure_directory_from_template (int orig_etc_fd,
}
}
else
{
glnx_set_error_from_errno (error);
g_prefix_error (error, "mkdirat: ");
goto out;
}
return glnx_throw_errno_prefix (error, "mkdirat");
}
if (!glnx_opendirat (new_etc_fd, path, TRUE, &target_dfd, error))
goto out;
return FALSE;
if (!dirfd_copy_attributes_and_xattrs (modified_etc_fd, path, src_dfd, target_dfd,
flags, cancellable, error))
goto out;
return FALSE;
ret = TRUE;
if (out_dfd)
{
g_assert (target_dfd != -1);
*out_dfd = target_dfd;
target_dfd = -1;
}
out:
return ret;
*out_dfd = glnx_steal_fd (&target_dfd);
return TRUE;
}
/**
@ -321,100 +279,79 @@ copy_modified_config_file (int orig_etc_fd,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
struct stat modified_stbuf;
struct stat new_stbuf;
if (!glnx_fstatat (modified_etc_fd, path, &modified_stbuf, AT_SYMLINK_NOFOLLOW, error))
return glnx_prefix_error (error, "Reading modified config file");
glnx_fd_close int dest_parent_dfd = -1;
if (fstatat (modified_etc_fd, path, &modified_stbuf, AT_SYMLINK_NOFOLLOW) < 0)
{
glnx_set_error_from_errno (error);
g_prefix_error (error, "Failed to read modified config file '%s': ", path);
goto out;
}
if (strchr (path, '/') != NULL)
{
g_autofree char *parent = g_path_get_dirname (path);
if (!ensure_directory_from_template (orig_etc_fd, modified_etc_fd, new_etc_fd,
parent, &dest_parent_dfd, flags, cancellable, error))
goto out;
return FALSE;
}
else
{
dest_parent_dfd = dup (new_etc_fd);
if (dest_parent_dfd == -1)
{
glnx_set_error_from_errno (error);
goto out;
}
return glnx_throw_errno_prefix (error, "dup");
}
g_assert (dest_parent_dfd != -1);
if (fstatat (new_etc_fd, path, &new_stbuf, AT_SYMLINK_NOFOLLOW) < 0)
{
if (errno == ENOENT)
;
else
{
glnx_set_error_from_errno (error);
goto out;
}
if (errno != ENOENT)
return glnx_throw_errno_prefix (error, "fstatat");
}
else if (S_ISDIR(new_stbuf.st_mode))
{
if (!S_ISDIR(modified_stbuf.st_mode))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
"Modified config file newly defaults to directory '%s', cannot merge",
path);
goto out;
return g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
"Modified config file newly defaults to directory '%s', cannot merge",
path), FALSE;
}
else
{
/* Do nothing here - we assume that we've already
* recursively copied the parent directory.
*/
ret = TRUE;
goto out;
return TRUE;
}
}
else
{
if (unlinkat (new_etc_fd, path, 0) < 0)
{
glnx_set_error_from_errno (error);
goto out;
}
if (!glnx_unlinkat (new_etc_fd, path, 0, error))
return FALSE;
}
if (S_ISDIR (modified_stbuf.st_mode))
{
if (!copy_dir_recurse (modified_etc_fd, new_etc_fd, path, flags,
cancellable, error))
goto out;
return FALSE;
}
else if (S_ISLNK (modified_stbuf.st_mode) || S_ISREG (modified_stbuf.st_mode))
{
if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf,
if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf,
new_etc_fd, path,
sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags),
cancellable, error))
goto out;
return FALSE;
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unsupported non-regular/non-symlink file in /etc '%s'",
path);
goto out;
return glnx_throw (error,
"Unsupported non-regular/non-symlink file in /etc '%s'",
path);
}
ret = TRUE;
out:
return ret;
return TRUE;
}
/*
@ -575,7 +512,7 @@ checkout_deployment_tree (OstreeSysroot *sysroot,
if (!glnx_opendirat (osdeploy_dfd, checkout_target_name, TRUE, &ret_fd, error))
goto out;
ret = TRUE;
*out_deployment_dfd = ret_fd;
out:
@ -652,7 +589,7 @@ relabel_recursively (OstreeSysroot *sysroot,
cancellable, error);
if (!direnum)
goto out;
while (TRUE)
{
GFileInfo *file_info;
@ -706,7 +643,7 @@ selinux_relabel_dir (OstreeSysroot *sysroot,
cancellable, error);
if (!root_info)
goto out;
g_ptr_array_add (path_parts, (char*)prefix);
if (!relabel_recursively (sysroot, sepolicy, dir, root_info, path_parts,
cancellable, error))
@ -959,7 +896,7 @@ get_kernel_from_tree (int deployment_dfd,
if (!glnx_dirfd_iterator_next_dent (&dfditer, &dent, cancellable, error))
goto out;
if (dent == NULL)
break;
@ -983,7 +920,7 @@ get_kernel_from_tree (int deployment_dfd,
ret_initramfs_name = g_strdup (dent->d_name);
}
}
if (ret_kernel_name != NULL && ret_initramfs_name != NULL)
break;
}
@ -1328,7 +1265,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
&variant, NULL))
{
metadata = g_variant_get_child_value (variant, 0);
g_variant_lookup (metadata, "version", "s", &deployment_version);
g_variant_lookup (metadata, OSTREE_COMMIT_META_KEY_VERSION, "s", &deployment_version);
}
}
@ -1355,7 +1292,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
ostree_bootconfig_parser_set (bootconfig, "title", title_key->str);
g_autofree char *version_key = g_strdup_printf ("%d", n_deployments - ostree_deployment_get_index (deployment));
ostree_bootconfig_parser_set (bootconfig, "version", version_key);
ostree_bootconfig_parser_set (bootconfig, OSTREE_COMMIT_META_KEY_VERSION, version_key);
g_autofree char * boot_relpath = g_strconcat ("/", bootcsumdir, "/", dest_kernel_name, NULL);
ostree_bootconfig_parser_set (bootconfig, "linux", boot_relpath);
@ -1451,7 +1388,7 @@ static GHashTable *
assign_bootserials (GPtrArray *deployments)
{
guint i;
GHashTable *ret =
GHashTable *ret =
g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
for (i = 0; i < deployments->len; i++)
@ -1488,7 +1425,7 @@ deployment_bootconfigs_equal (OstreeDeployment *a,
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *b_kargs = NULL;
g_autofree char *a_boot_options_without_ostree = NULL;
g_autofree char *b_boot_options_without_ostree = NULL;
/* We checksum the kernel arguments *except* ostree= */
a_kargs = _ostree_kernel_args_from_string (a_boot_options);
_ostree_kernel_args_replace (a_kargs, "ostree");
@ -1662,10 +1599,10 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
{
OstreeDeployment *deployment = new_deployments->pdata[i];
g_autoptr(GFile) deployment_root = NULL;
if (deployment == self->booted_deployment)
found_booted_deployment = TRUE;
deployment_root = ostree_sysroot_get_deployment_directory (self, deployment);
if (!g_file_query_exists (deployment_root, NULL))
{
@ -1693,7 +1630,7 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
g_prefix_error (error, "Creating new current bootlinks: ");
goto out;
}
if (!full_system_sync (self, cancellable, error))
{
g_prefix_error (error, "Full sync: ");
@ -1707,7 +1644,7 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
g_prefix_error (error, "Swapping current bootlinks: ");
goto out;
}
bootloader_is_atomic = TRUE;
}
else
@ -1741,7 +1678,7 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
if (!glnx_shutil_mkdir_p_at (self->sysroot_fd, new_loader_entries_dir, 0755,
cancellable, error))
goto out;
/* Need the repo to try and extract the versions for deployments.
* But this is a "nice-to-have" for the bootloader UI, so failure
* here is not fatal to the whole operation. We just gracefully
@ -1819,7 +1756,7 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
g_prefix_error (error, "Full sync: ");
goto out;
}
if (!swap_bootloader (self, self->bootversion, new_bootversion,
cancellable, error))
{

View File

@ -48,7 +48,8 @@ struct OstreeSysroot {
GLnxLockFile lock;
gboolean loaded;
gboolean is_physical; /* TRUE if we're pointed at physical storage root and not a deployment */
GPtrArray *deployments;
int bootversion;
int subbootversion;

Some files were not shown because too many files have changed in this diff Show More