diff --git a/Makefile-tests.am b/Makefile-tests.am index c99a7ede..295c734e 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -69,6 +69,7 @@ _installed_or_uninstalled_test_scripts = \ tests/test-remote-add.sh \ tests/test-remote-headers.sh \ tests/test-commit-sign.sh \ + tests/test-commit-timestamp.sh \ tests/test-export.sh \ tests/test-help.sh \ tests/test-libarchive.sh \ diff --git a/Makefile.am b/Makefile.am index 2f3cb53f..1dcf6b74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \ -DOSTREE_COMPILATION \ -DG_LOG_DOMAIN=\"OSTree\" \ -DOSTREE_GITREV='"$(OSTREE_GITREV)"' \ - -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \ + -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44 '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \ -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 '-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)' # For strict aliasing, see https://bugzilla.gnome.org/show_bug.cgi?id=791622 AM_CFLAGS += -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS) @@ -49,6 +49,15 @@ GITIGNOREFILES += fastbuild-*.qcow2 _kola_temp/ # Rust stuff GITIGNOREFILES += target/ Cargo.lock +# Jekyll docs +GITIGNOREFILES += \ + docs/.bundle/ \ + docs/Gemfile.lock \ + docs/_site/ \ + docs/reference/ \ + docs/vendor/ \ + $(NULL) + SUBDIRS += . if ENABLE_GTK_DOC diff --git a/Makefile.in b/Makefile.in index fa2cc2c2..601a2766 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. @@ -2018,6 +2018,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) @USE_GPGME_TRUE@am__EXEEXT_20 = tests/test-remote-gpg-import.sh \ @USE_GPGME_TRUE@ tests/test-gpg-signed-commit.sh \ @@ -2029,10 +2030,11 @@ 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-commit-sign.sh tests/test-export.sh \ - tests/test-help.sh tests/test-libarchive.sh \ - tests/test-parent.sh tests/test-pull-bare.sh \ - tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \ + tests/test-commit-sign.sh tests/test-commit-timestamp.sh \ + tests/test-export.sh tests/test-help.sh \ + tests/test-libarchive.sh tests/test-parent.sh \ + tests/test-pull-bare.sh tests/test-pull-bareuser.sh \ + tests/test-pull-bareuseronly.sh \ tests/test-pull2-bareuseronly.sh \ tests/test-pull-commit-only.sh tests/test-pull-depth.sh \ tests/test-pull-mirror-summary.sh \ @@ -2167,6 +2169,8 @@ am__relativize = \ GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.xz DIST_TARGETS = dist-xz +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -2354,6 +2358,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -2372,7 +2377,7 @@ AM_CPPFLAGS = -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \ -DSHORTENED_SYSCONFDIR=\"$(shortened_sysconfdir)\" \ -DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' -DOSTREE_COMPILATION \ -DG_LOG_DOMAIN=\"OSTree\" -DOSTREE_GITREV='"$(OSTREE_GITREV)"' \ - -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 \ + -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44 \ '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \ -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 \ '-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)' @@ -2504,9 +2509,12 @@ ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS} # Generated by coreos-assembler build-fast and kola # Rust stuff + +# Jekyll docs GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \ gtk-doc.make fastbuild-*.qcow2 _kola_temp/ target/ Cargo.lock \ - $(am__append_63) + docs/.bundle/ docs/Gemfile.lock docs/_site/ docs/reference/ \ + docs/vendor/ $(NULL) $(am__append_63) OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS) OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS) OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS) @@ -2883,10 +2891,10 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.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-commit-sign.sh \ - tests/test-export.sh tests/test-help.sh \ - tests/test-libarchive.sh tests/test-parent.sh \ - tests/test-pull-bare.sh tests/test-pull-bareuser.sh \ - tests/test-pull-bareuseronly.sh \ + tests/test-commit-timestamp.sh tests/test-export.sh \ + tests/test-help.sh tests/test-libarchive.sh \ + tests/test-parent.sh tests/test-pull-bare.sh \ + tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \ tests/test-pull2-bareuseronly.sh \ tests/test-pull-commit-only.sh tests/test-pull-depth.sh \ tests/test-pull-mirror-summary.sh \ @@ -7941,7 +7949,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -8199,6 +8207,13 @@ tests/test-commit-sign.sh.log: tests/test-commit-sign.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-commit-timestamp.sh.log: tests/test-commit-timestamp.sh + @p='tests/test-commit-timestamp.sh'; \ + b='tests/test-commit-timestamp.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-export.sh.log: tests/test-export.sh @p='tests/test-export.sh'; \ b='tests/test-export.sh'; \ @@ -9024,7 +9039,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -9092,7 +9107,8 @@ installdirs-am: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -9690,7 +9706,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-man: uninstall-man1 uninstall-man5 .MAKE: $(am__recursive_targets) all check check-am install install-am \ - install-data-am install-strip + install-data-am install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--depfiles am--refresh check check-TESTS check-am \ diff --git a/README.md b/README.md index fcde7015..234ad6c6 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ However, in order to build from a git clone, you must update the submodules. If you're packaging OSTree and want a tarball, I recommend using a "recursive git archive" script. There are several available online; -[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11) +[this code](https://github.com/ostreedev/ostree/blob/main/packaging/Makefile.dist-packaging#L11) in OSTree is an example. Once you have a git clone or recursive archive, building is the @@ -147,7 +147,7 @@ make install DESTDIR=/path/to/dest ## Contact and discussion forums OSTree has a [mailing list](https://mail.gnome.org/archives/ostree-list/) and -there is also an `#ostree` channel on FreeNode. However, asynchronous+logged +there is also an `#ostree` channel on [Libera.Chat](ircs://irc.libera.chat/ostree). However, asynchronous+logged communication is preferred for nontrivial questions. ## Contributing @@ -157,7 +157,7 @@ See [Contributing](CONTRIBUTING.md). ## Licensing The licensing for the *code* of libostree can be canonically found in the individual files; -and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING) +and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/main/COPYING) file in the source. Currently, that's LGPLv2+. This also covers the man pages and API docs. The license for the manual documentation in the `doc/` directory is: diff --git a/aclocal.m4 b/aclocal.m4 index baea2d23..7e601777 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. @@ -702,7 +702,7 @@ AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) +# serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson @@ -744,7 +744,7 @@ dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -845,7 +845,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -855,11 +855,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -876,7 +876,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -977,74 +977,6 @@ 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-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1060,7 +992,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.2], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -1076,7 +1008,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.2])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1801,12 +1733,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then diff --git a/apidoc/Makefile.in b/apidoc/Makefile.in index e3958357..fc3bbf45 100644 --- a/apidoc/Makefile.in +++ b/apidoc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. @@ -377,6 +377,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/apidoc/html/home.png b/apidoc/html/home.png index 9346b336..3966a915 100644 Binary files a/apidoc/html/home.png and b/apidoc/html/home.png differ diff --git a/apidoc/html/index.html b/apidoc/html/index.html index 60a23947..d1d71e64 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2021.2

+

for OSTree 2021.3


diff --git a/apidoc/html/left-insensitive.png b/apidoc/html/left-insensitive.png index 3269393a..2cd8c169 100644 Binary files a/apidoc/html/left-insensitive.png and b/apidoc/html/left-insensitive.png differ diff --git a/apidoc/html/left.png b/apidoc/html/left.png index 2abde032..1ca1664c 100644 Binary files a/apidoc/html/left.png and b/apidoc/html/left.png differ diff --git a/apidoc/html/ostree-Core-repository-independent-functions.html b/apidoc/html/ostree-Core-repository-independent-functions.html index f4401e34..08cf5d95 100644 --- a/apidoc/html/ostree-Core-repository-independent-functions.html +++ b/apidoc/html/ostree-Core-repository-independent-functions.html @@ -46,7 +46,7 @@ -const GVariantType * +const GVariantType * ostree_metadata_variant_type () @@ -54,7 +54,7 @@ -gboolean +gboolean ostree_validate_checksum_string () @@ -62,7 +62,7 @@ -gboolean +gboolean ostree_validate_collection_id () @@ -70,7 +70,7 @@ -guchar * +guchar * ostree_checksum_to_bytes () @@ -78,7 +78,7 @@ -GVariant * +GVariant * ostree_checksum_to_bytes_v () @@ -117,14 +117,14 @@ -const guchar * +const guchar * ostree_checksum_bytes_peek () -const guchar * +const guchar * ostree_checksum_bytes_peek_validate () @@ -140,7 +140,7 @@ -guchar * +guchar * ostree_checksum_b64_to_bytes () @@ -172,7 +172,7 @@ -gboolean +gboolean ostree_validate_rev () @@ -180,7 +180,7 @@ -gboolean +gboolean ostree_validate_remote_name () @@ -188,7 +188,7 @@ -gboolean +gboolean ostree_parse_refspec () @@ -211,7 +211,7 @@ -guint +guint ostree_hash_object_name () @@ -219,7 +219,7 @@ -GVariant * +GVariant * ostree_object_name_serialize () @@ -251,7 +251,7 @@ -gboolean +gboolean ostree_content_stream_parse () @@ -259,7 +259,7 @@ -gboolean +gboolean ostree_content_file_parse () @@ -267,7 +267,7 @@ -gboolean +gboolean ostree_content_file_parse_at () @@ -275,7 +275,7 @@ -gboolean +gboolean ostree_raw_file_to_archive_z2_stream () @@ -283,7 +283,7 @@ -gboolean +gboolean ostree_raw_file_to_archive_z2_stream_with_options () @@ -291,7 +291,7 @@ -gboolean +gboolean ostree_raw_file_to_content_stream () @@ -299,7 +299,7 @@ -gboolean +gboolean ostree_break_hardlink () @@ -307,7 +307,7 @@ -gboolean +gboolean ostree_checksum_file_from_input () @@ -315,7 +315,7 @@ -gboolean +gboolean ostree_checksum_file () @@ -323,7 +323,7 @@ -gboolean +gboolean ostree_checksum_file_at () @@ -339,7 +339,7 @@ -gboolean +gboolean ostree_checksum_file_async_finish () @@ -347,7 +347,7 @@ -GVariant * +GVariant * ostree_create_directory_metadata () @@ -355,7 +355,7 @@ -gboolean +gboolean ostree_validate_structureof_objtype () @@ -363,7 +363,7 @@ -gboolean +gboolean ostree_validate_structureof_csum_v () @@ -371,7 +371,7 @@ -gboolean +gboolean ostree_validate_structureof_checksum_string () @@ -379,7 +379,7 @@ -gboolean +gboolean ostree_validate_structureof_file_mode () @@ -387,7 +387,7 @@ -gboolean +gboolean ostree_validate_structureof_commit () @@ -395,7 +395,7 @@ -gboolean +gboolean ostree_validate_structureof_dirtree () @@ -403,7 +403,7 @@ -gboolean +gboolean ostree_validate_structureof_dirmeta () @@ -411,7 +411,7 @@ -gchar * +gchar * ostree_commit_get_parent () @@ -419,7 +419,7 @@ -guint64 +guint64 ostree_commit_get_timestamp () @@ -427,7 +427,7 @@ -gboolean +gboolean ostree_commit_metadata_for_bootable () @@ -435,7 +435,7 @@ -gchar * +gchar * ostree_commit_get_content_checksum () @@ -443,7 +443,7 @@ -gboolean +gboolean ostree_commit_get_object_sizes () @@ -475,7 +475,7 @@ -gboolean +gboolean ostree_check_version () @@ -559,11 +559,11 @@

Description

These functions implement repository-independent algorithms for operating on the core OSTree data formats, such as converting -GFileInfo into a GVariant.

+GFileInfo into a GVariant.

There are 4 types of objects; file, dirmeta, tree, and commit. The last 3 are metadata, and the file object is the only content object type.

-

All metadata objects are stored as GVariant (big endian). The +

All metadata objects are stored as GVariant (big endian). The rationale for this is the same as that of the ext{2,3,4} family of filesystems; most developers will be using LE, and so it's better to continually test the BE->LE swap.

@@ -592,21 +592,21 @@ to continually test the BE->LE swap.

Returns

-

TRUE if object type is metadata

+

TRUE if object type is metadata


ostree_metadata_variant_type ()

-
const GVariantType *
+
const GVariantType *
 ostree_metadata_variant_type (OstreeObjectType objtype);

ostree_validate_checksum_string ()

-
gboolean
+
gboolean
 ostree_validate_checksum_string (const char *sha256,
-                                 GError **error);
+ GError **error);

Use this function to see if input strings are checksums.

Parameters

@@ -632,19 +632,19 @@ ostree_validate_checksum_string (const

Returns

-

TRUE if sha256 -is a valid checksum string, FALSE otherwise

+

TRUE if sha256 +is a valid checksum string, FALSE otherwise


ostree_validate_collection_id ()

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

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

+invalid or NULL.

Valid collection IDs are reverse DNS names:

  • They are composed of 1 or more elements separated by a period (.) character. @@ -680,16 +680,16 @@ begin with a digit.

Returns

-

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

+

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

Since: 2018.6


ostree_checksum_to_bytes ()

-
guchar *
+
guchar *
 ostree_checksum_to_bytes (const char *checksum);

Parameters

@@ -709,14 +709,14 @@ ostree_checksum_to_bytes (const c

Returns

Binary checksum from checksum -of length 32; free with g_free().

+of length 32; free with g_free().

[transfer full][array fixed-size=32]


ostree_checksum_to_bytes_v ()

-
GVariant *
+
GVariant *
 ostree_checksum_to_bytes_v (const char *checksum);

Parameters

@@ -735,7 +735,7 @@ ostree_checksum_to_bytes_v (const

Returns

-

New GVariant of type ay with length 32.

+

New GVariant of type ay with length 32.

[transfer full]

@@ -743,7 +743,7 @@ ostree_checksum_to_bytes_v (const

ostree_checksum_from_bytes ()

char *
-ostree_checksum_from_bytes (const guchar *csum);
+ostree_checksum_from_bytes (const guchar *csum);

Parameters

@@ -770,7 +770,7 @@ ostree_checksum_from_bytes (const

ostree_checksum_from_bytes_v ()

char *
-ostree_checksum_from_bytes_v (GVariant *csum_v);
+ostree_checksum_from_bytes_v (GVariant *csum_v);

Parameters

@@ -781,7 +781,7 @@ ostree_checksum_from_bytes_v (GVa - +

csum_v

GVariant of type ay

GVariant of type ay

 
@@ -797,7 +797,7 @@ ostree_checksum_from_bytes_v (GVa

ostree_checksum_inplace_from_bytes ()

void
-ostree_checksum_inplace_from_bytes (const guchar *csum,
+ostree_checksum_inplace_from_bytes (const guchar *csum,
                                     char *buf);

Overwrite the contents of buf with stringified version of csum @@ -831,7 +831,7 @@ ostree_checksum_inplace_from_bytes (const

ostree_checksum_inplace_to_bytes ()

void
 ostree_checksum_inplace_to_bytes (const char *checksum,
-                                  guchar *buf);
+ guchar *buf);

Convert checksum from a string to binary in-place, without allocating memory. Use this function in hot code paths.

@@ -861,8 +861,8 @@ allocating memory. Use this function in hot code paths.


ostree_checksum_bytes_peek ()

-
const guchar *
-ostree_checksum_bytes_peek (GVariant *bytes);
+
const guchar *
+ostree_checksum_bytes_peek (GVariant *bytes);

Parameters

@@ -873,7 +873,7 @@ ostree_checksum_bytes_peek (GVari - +

bytes

GVariant of type ay

GVariant of type ay

 
@@ -882,16 +882,16 @@ ostree_checksum_bytes_peek (GVari

Returns

Binary checksum data in bytes ; do not free. If bytes -does not have the correct length, return NULL.

+does not have the correct length, return NULL.

[transfer none][array fixed-size=32][element-type guint8]


ostree_checksum_bytes_peek_validate ()

-
const guchar *
-ostree_checksum_bytes_peek_validate (GVariant *bytes,
-                                     GError **error);
+
const guchar *
+ostree_checksum_bytes_peek_validate (GVariant *bytes,
+                                     GError **error);

Like ostree_checksum_bytes_peek(), but also throws error .

@@ -905,7 +905,7 @@ ostree_checksum_bytes_peek_validate (

bytes

-

GVariant of type ay

+

GVariant of type ay

  @@ -926,7 +926,7 @@ ostree_checksum_bytes_peek_validate (

ostree_checksum_b64_from_bytes ()

char *
-ostree_checksum_b64_from_bytes (const guchar *csum);
+ostree_checksum_b64_from_bytes (const guchar *csum);

Parameters

@@ -955,7 +955,7 @@ character is used.


ostree_checksum_b64_to_bytes ()

-
guchar *
+
guchar *
 ostree_checksum_b64_to_bytes (const char *checksum);

Parameters

@@ -985,7 +985,7 @@ ostree_checksum_b64_to_bytes (const

ostree_checksum_b64_inplace_from_bytes ()

void
 ostree_checksum_b64_inplace_from_bytes
-                               (const guchar *csum,
+                               (const guchar *csum,
                                 char *buf);

Overwrite the contents of buf with modified base64 encoding of csum @@ -1021,7 +1021,7 @@ character is used.

ostree_checksum_b64_inplace_to_bytes ()

void
 ostree_checksum_b64_inplace_to_bytes (const char *checksum,
-                                      guint8 *buf);
+ guint8 *buf);

Overwrite the contents of buf with stringified version of csum .

@@ -1053,8 +1053,8 @@ ostree_checksum_b64_inplace_to_bytes (const

ostree_cmp_checksum_bytes ()

int
-ostree_cmp_checksum_bytes (const guchar *a,
-                           const guchar *b);
+ostree_cmp_checksum_bytes (const guchar *a, + const guchar *b);

Compare two binary checksums, using memcmp().

Parameters

@@ -1082,9 +1082,9 @@ ostree_cmp_checksum_bytes (const

ostree_validate_rev ()

-
gboolean
+
gboolean
 ostree_validate_rev (const char *rev,
-                     GError **error);
+ GError **error);

Parameters

@@ -1109,16 +1109,16 @@ ostree_validate_rev (const char

Returns

-

TRUE if rev +

TRUE if rev is a valid ref string


ostree_validate_remote_name ()

-
gboolean
+
gboolean
 ostree_validate_remote_name (const char *remote_name,
-                             GError **error);
+ GError **error);

Parameters

@@ -1143,7 +1143,7 @@ ostree_validate_remote_name (const

Returns

-

TRUE if remote_name +

TRUE if remote_name is a valid remote name

Since: 2017.8

@@ -1151,20 +1151,20 @@ is a valid remote name


ostree_parse_refspec ()

-
gboolean
+
gboolean
 ostree_parse_refspec (const char *refspec,
                       char **out_remote,
                       char **out_ref,
-                      GError **error);
-

Split a refspec like gnome-ostree:gnome-ostree/buildmaster or just -gnome-ostree/buildmaster into two parts. In the first case, out_remote + GError **error);

+

Split a refspec like gnome-ostree:gnome-ostree/buildmain or just +gnome-ostree/buildmain into two parts. In the first case, out_remote will be set to gnome-ostree, and out_ref - to gnome-ostree/buildmaster. + to gnome-ostree/buildmain. In the second case (a local ref), out_remote - will be NULL, and out_ref + will be NULL, and out_ref -will be gnome-ostree/buildmaster. In both cases, TRUE will be returned.

+will be gnome-ostree/buildmain. In both cases, TRUE will be returned.

Parameters

@@ -1182,7 +1182,7 @@ will be gnome-ostree/buildmaster. In both cases, +or NULL if the refspec refs to a local ref.

@@ -1200,7 +1200,7 @@ or NULL if the refspec refs to a local ref.

Returns

-

TRUE on successful parsing, FALSE otherwise

+

TRUE on successful parsing, FALSE otherwise


@@ -1251,9 +1251,9 @@ ostree_object_type_from_string (const

ostree_hash_object_name ()

-
guint
-ostree_hash_object_name (gconstpointer a);
-

Use this function with GHashTable and ostree_object_name_serialize().

+
guint
+ostree_hash_object_name (gconstpointer a);
+

Use this function with GHashTable and ostree_object_name_serialize().

Parameters

out_remote

Return location for the remote name, -or NULL if the refspec refs to a local ref.

[out][nullable][optional]
@@ -1264,7 +1264,7 @@ ostree_hash_object_name (gconstpo - +

a

A GVariant containing a serialized object

A GVariant containing a serialized object

 
@@ -1273,7 +1273,7 @@ ostree_hash_object_name (gconstpo

ostree_object_name_serialize ()

-
GVariant *
+
GVariant *
 ostree_object_name_serialize (const char *checksum,
                               OstreeObjectType objtype);
@@ -1300,7 +1300,7 @@ ostree_object_name_serialize (const

Returns

-

A new floating GVariant containing checksum string and objtype.

+

A new floating GVariant containing checksum string and objtype.

[transfer floating]

@@ -1308,7 +1308,7 @@ ostree_object_name_serialize (const

ostree_object_name_deserialize ()

void
-ostree_object_name_deserialize (GVariant *variant,
+ostree_object_name_deserialize (GVariant *variant,
                                 const char **out_checksum,
                                 OstreeObjectType *out_objtype);

Reverse ostree_object_name_serialize(). Note that out_checksum @@ -1326,7 +1326,7 @@ only valid for the lifetime of variant

variant

-

A GVariant of type (su)

+

A GVariant of type (su)

  @@ -1384,7 +1384,7 @@ and a stringifed version of objtype

ostree_object_from_string ()

void
 ostree_object_from_string (const char *str,
-                           gchar **out_checksum,
+                           gchar **out_checksum,
                            OstreeObjectType *out_objtype);

Reverse ostree_object_to_string().

@@ -1418,16 +1418,16 @@ ostree_object_from_string (const

ostree_content_stream_parse ()

-
gboolean
-ostree_content_stream_parse (gboolean compressed,
-                             GInputStream *input,
-                             guint64 input_length,
-                             gboolean trusted,
-                             GInputStream **out_input,
-                             GFileInfo **out_file_info,
-                             GVariant **out_xattrs,
-                             GCancellable *cancellable,
-                             GError **error);
+
gboolean
+ostree_content_stream_parse (gboolean compressed,
+                             GInputStream *input,
+                             guint64 input_length,
+                             gboolean trusted,
+                             GInputStream **out_input,
+                             GFileInfo **out_file_info,
+                             GVariant **out_xattrs,
+                             GCancellable *cancellable,
+                             GError **error);

The reverse of ostree_raw_file_to_content_stream(); this function converts an object content stream back into components.

@@ -1456,7 +1456,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1491,15 +1491,15 @@ converts an object content stream back into components.


ostree_content_file_parse ()

-
gboolean
-ostree_content_file_parse (gboolean compressed,
-                           GFile *content_path,
-                           gboolean trusted,
-                           GInputStream **out_input,
-                           GFileInfo **out_file_info,
-                           GVariant **out_xattrs,
-                           GCancellable *cancellable,
-                           GError **error);
+
gboolean
+ostree_content_file_parse (gboolean compressed,
+                           GFile *content_path,
+                           gboolean trusted,
+                           GInputStream **out_input,
+                           GFileInfo **out_file_info,
+                           GVariant **out_xattrs,
+                           GCancellable *cancellable,
+                           GError **error);

A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components.

@@ -1523,7 +1523,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1558,16 +1558,16 @@ converts an object content stream back into components.


ostree_content_file_parse_at ()

-
gboolean
-ostree_content_file_parse_at (gboolean compressed,
+
gboolean
+ostree_content_file_parse_at (gboolean compressed,
                               int parent_dfd,
                               const char *path,
-                              gboolean trusted,
-                              GInputStream **out_input,
-                              GFileInfo **out_file_info,
-                              GVariant **out_xattrs,
-                              GCancellable *cancellable,
-                              GError **error);
+ gboolean trusted, + GInputStream **out_input, + GFileInfo **out_file_info, + GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components.

@@ -1596,7 +1596,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1631,13 +1631,13 @@ converts an object content stream back into components.


ostree_raw_file_to_archive_z2_stream ()

-
gboolean
-ostree_raw_file_to_archive_z2_stream (GInputStream *input,
-                                      GFileInfo *file_info,
-                                      GVariant *xattrs,
-                                      GInputStream **out_input,
-                                      GCancellable *cancellable,
-                                      GError **error);
+
gboolean
+ostree_raw_file_to_archive_z2_stream (GInputStream *input,
+                                      GFileInfo *file_info,
+                                      GVariant *xattrs,
+                                      GInputStream **out_input,
+                                      GCancellable *cancellable,
+                                      GError **error);

Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.

@@ -1687,15 +1687,15 @@ OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.


ostree_raw_file_to_archive_z2_stream_with_options ()

-
gboolean
+
gboolean
 ostree_raw_file_to_archive_z2_stream_with_options
-                               (GInputStream *input,
-                                GFileInfo *file_info,
-                                GVariant *xattrs,
-                                GVariant *options,
-                                GInputStream **out_input,
-                                GCancellable *cancellable,
-                                GError **error);
+ (GInputStream *input, + GFileInfo *file_info, + GVariant *xattrs, + GVariant *options, + GInputStream **out_input, + GCancellable *cancellable, + GError **error);

Like ostree_raw_file_to_archive_z2_stream(), but supports an extensible set of flags. The following flags are currently defined:

  • compression-level (i): Level of compression to use, 0–9, with 0 being @@ -1752,14 +1752,14 @@ the least compression, and <0 giving the default level (currently 6).

  • ostree_raw_file_to_content_stream ()

    -
    gboolean
    -ostree_raw_file_to_content_stream (GInputStream *input,
    -                                   GFileInfo *file_info,
    -                                   GVariant *xattrs,
    -                                   GInputStream **out_input,
    -                                   guint64 *out_length,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    +
    gboolean
    +ostree_raw_file_to_content_stream (GInputStream *input,
    +                                   GFileInfo *file_info,
    +                                   GVariant *xattrs,
    +                                   GInputStream **out_input,
    +                                   guint64 *out_length,
    +                                   GCancellable *cancellable,
    +                                   GError **error);

    Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream. This is a fundamental operation for writing data to an OstreeRepo.

    @@ -1814,12 +1814,12 @@ for writing data to an

    ostree_break_hardlink ()

    -
    gboolean
    +
    gboolean
     ostree_break_hardlink (int dfd,
                            const char *path,
    -                       gboolean skip_xattrs,
    -                       GCancellable *cancellable,
    -                       GError **error);
    + gboolean skip_xattrs, + GCancellable *cancellable, + GError **error);

    In many cases using libostree, a program may need to "break" hardlinks by performing a copy. For example, in order to logically append to a file.

    @@ -1869,14 +1869,14 @@ care of synchronization.


    ostree_checksum_file_from_input ()

    -
    gboolean
    -ostree_checksum_file_from_input (GFileInfo *file_info,
    -                                 GVariant *xattrs,
    -                                 GInputStream *in,
    +
    gboolean
    +ostree_checksum_file_from_input (GFileInfo *file_info,
    +                                 GVariant *xattrs,
    +                                 GInputStream *in,
                                      OstreeObjectType objtype,
    -                                 guchar **out_csum,
    -                                 GCancellable *cancellable,
    -                                 GError **error);
    + guchar **out_csum, + GCancellable *cancellable, + GError **error);

    Compute the OSTree checksum for a given input.

    Parameters

    @@ -1899,7 +1899,7 @@ ostree_checksum_file_from_input (

    in

    -

    File content, should be NULL for symbolic links.

    +

    File content, should be NULL for symbolic links.

    [allow-none] @@ -1929,12 +1929,12 @@ ostree_checksum_file_from_input (

    ostree_checksum_file ()

    -
    gboolean
    -ostree_checksum_file (GFile *f,
    +
    gboolean
    +ostree_checksum_file (GFile *f,
                           OstreeObjectType objtype,
    -                      guchar **out_csum,
    -                      GCancellable *cancellable,
    -                      GError **error);
    + guchar **out_csum, + GCancellable *cancellable, + GError **error);

    Compute the OSTree checksum for a given file.

    Parameters

    @@ -1977,15 +1977,15 @@ ostree_checksum_file (GFile

    ostree_checksum_file_at ()

    -
    gboolean
    +
    gboolean
     ostree_checksum_file_at (int dfd,
                              const char *path,
                              struct stat *stbuf,
                              OstreeObjectType objtype,
                              OstreeChecksumFlags flags,
                              char **out_checksum,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Compute the OSTree checksum for a given file. This is an fd-relative version of ostree_checksum_file() which also takes flags and fills in a caller allocated buffer.

    @@ -2047,12 +2047,12 @@ allocated buffer.

    ostree_checksum_file_async ()

    void
    -ostree_checksum_file_async (GFile *f,
    +ostree_checksum_file_async (GFile *f,
                                 OstreeObjectType objtype,
                                 int io_priority,
    -                            GCancellable *cancellable,
    -                            GAsyncReadyCallback callback,
    -                            gpointer user_data);
    + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

    Asynchronously compute the OSTree checksum for a given file; complete with ostree_checksum_file_async_finish().

    @@ -2102,11 +2102,11 @@ complete with

    ostree_checksum_file_async_finish ()

    -
    gboolean
    -ostree_checksum_file_async_finish (GFile *f,
    -                                   GAsyncResult *result,
    -                                   guchar **out_csum,
    -                                   GError **error);
    +
    gboolean
    +ostree_checksum_file_async_finish (GFile *f,
    +                                   GAsyncResult *result,
    +                                   guchar **out_csum,
    +                                   GError **error);

    Finish computing the OSTree checksum for a given file; see ostree_checksum_file_async().

    @@ -2145,9 +2145,9 @@ ostree_checksum_file_async_finish (

    ostree_create_directory_metadata ()

    -
    GVariant *
    -ostree_create_directory_metadata (GFileInfo *dir_info,
    -                                  GVariant *xattrs);
    +
    GVariant *
    +ostree_create_directory_metadata (GFileInfo *dir_info,
    +                                  GVariant *xattrs);

    Parameters

    @@ -2159,7 +2159,7 @@ ostree_create_directory_metadata ( - + @@ -2172,16 +2172,16 @@ ostree_create_directory_metadata (

    Returns

    -

    A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

    +

    A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

    [transfer full]


    ostree_validate_structureof_objtype ()

    -
    gboolean
    -ostree_validate_structureof_objtype (guchar objtype,
    -                                     GError **error);
    +
    gboolean
    +ostree_validate_structureof_objtype (guchar objtype,
    +                                     GError **error);

    Parameters

    dir_info

    a GFileInfo containing directory information

    a GFileInfo containing directory information

     
    @@ -2199,16 +2199,16 @@ ostree_validate_structureof_objtype (

    Returns

    -

    TRUE if objtype +

    TRUE if objtype represents a valid object type


    ostree_validate_structureof_csum_v ()

    -
    gboolean
    -ostree_validate_structureof_csum_v (GVariant *checksum,
    -                                    GError **error);
    +
    gboolean
    +ostree_validate_structureof_csum_v (GVariant *checksum,
    +                                    GError **error);

    Parameters

    @@ -2220,7 +2220,7 @@ ostree_validate_structureof_csum_v (

    checksum

    -
    + @@ -2233,17 +2233,17 @@ ostree_validate_structureof_csum_v (

    Returns

    -

    TRUE if checksum +

    TRUE if checksum is a valid binary SHA256 checksum


    ostree_validate_structureof_checksum_string ()

    -
    gboolean
    +
    gboolean
     ostree_validate_structureof_checksum_string
                                    (const char *checksum,
    -                                GError **error);
    + GError **error);

    Parameters

    a GVariant of type "ay"

    a GVariant of type "ay"

     
    @@ -2268,16 +2268,16 @@ ostree_validate_structureof_checksum_string

    Returns

    -

    TRUE if checksum +

    TRUE if checksum is a valid ASCII SHA256 checksum


    ostree_validate_structureof_file_mode ()

    -
    gboolean
    -ostree_validate_structureof_file_mode (guint32 mode,
    -                                       GError **error);
    +
    gboolean
    +ostree_validate_structureof_file_mode (guint32 mode,
    +                                       GError **error);

    Parameters

    @@ -2302,16 +2302,16 @@ ostree_validate_structureof_file_mode (

    Returns

    -

    TRUE if mode +

    TRUE if mode represents a valid file type and permissions


    ostree_validate_structureof_commit ()

    -
    gboolean
    -ostree_validate_structureof_commit (GVariant *commit,
    -                                    GError **error);
    +
    gboolean
    +ostree_validate_structureof_commit (GVariant *commit,
    +                                    GError **error);

    Use this to validate the basic structure of commit , independent of any other objects it references.

    @@ -2339,16 +2339,16 @@ any other objects it references.

    Returns

    -

    TRUE if commit +

    TRUE if commit is structurally valid


    ostree_validate_structureof_dirtree ()

    -
    gboolean
    -ostree_validate_structureof_dirtree (GVariant *dirtree,
    -                                     GError **error);
    +
    gboolean
    +ostree_validate_structureof_dirtree (GVariant *dirtree,
    +                                     GError **error);

    Use this to validate the basic structure of dirtree , independent of any other objects it references.

    @@ -2376,16 +2376,16 @@ any other objects it references.

    Returns

    -

    TRUE if dirtree +

    TRUE if dirtree is structurally valid


    ostree_validate_structureof_dirmeta ()

    -
    gboolean
    -ostree_validate_structureof_dirmeta (GVariant *dirmeta,
    -                                     GError **error);
    +
    gboolean
    +ostree_validate_structureof_dirmeta (GVariant *dirmeta,
    +                                     GError **error);

    Use this to validate the basic structure of dirmeta .

    @@ -2412,15 +2412,15 @@ ostree_validate_structureof_dirmeta (

    Returns

    -

    TRUE if dirmeta +

    TRUE if dirmeta is structurally valid


    ostree_commit_get_parent ()

    -
    gchar *
    -ostree_commit_get_parent (GVariant *commit_variant);
    +
    gchar *
    +ostree_commit_get_parent (GVariant *commit_variant);

    Parameters

    @@ -2439,15 +2439,15 @@ ostree_commit_get_parent (GVarian

    Returns

    Checksum of the parent commit of commit_variant -, or NULL +, or NULL if none


    ostree_commit_get_timestamp ()

    -
    guint64
    -ostree_commit_get_timestamp (GVariant *commit_variant);
    +
    guint64
    +ostree_commit_get_timestamp (GVariant *commit_variant);

    Parameters

    @@ -2472,11 +2472,11 @@ ostree_commit_get_timestamp (GVar

    ostree_commit_metadata_for_bootable ()

    -
    gboolean
    -ostree_commit_metadata_for_bootable (GFile *root,
    -                                     GVariantDict *dict,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    +
    gboolean
    +ostree_commit_metadata_for_bootable (GFile *root,
    +                                     GVariantDict *dict,
    +                                     GCancellable *cancellable,
    +                                     GError **error);

    Update provided dict with standard metadata for bootable OSTree commits.

    @@ -2506,8 +2506,8 @@ ostree_commit_metadata_for_bootable (

    ostree_commit_get_content_checksum ()

    -
    gchar *
    -ostree_commit_get_content_checksum (GVariant *commit_variant);
    +
    gchar *
    +ostree_commit_get_content_checksum (GVariant *commit_variant);

    There are use cases where one wants a checksum just of the content of a commit. OSTree commits by default capture the current timestamp, and may have additional metadata, which means that re-committing identical content @@ -2534,7 +2534,7 @@ root "dirmeta" checksum (both in binary form, not hexadecimal).

    Returns

    -

    A SHA-256 hex string, or NULL if commit_variant +

    A SHA-256 hex string, or NULL if commit_variant is not well-formed.

    [nullable]

    @@ -2543,15 +2543,15 @@ is not well-formed.


    ostree_commit_get_object_sizes ()

    -
    gboolean
    -ostree_commit_get_object_sizes (GVariant *commit_variant,
    -                                GPtrArray **out_sizes_entries,
    -                                GError **error);
    +
    gboolean
    +ostree_commit_get_object_sizes (GVariant *commit_variant,
    +                                GPtrArray **out_sizes_entries,
    +                                GError **error);

    Reads a commit's "ostree.sizes" metadata and returns an array of OstreeCommitSizesEntry in out_sizes_entries . Each element represents an object in the commit. If the commit does not contain -the "ostree.sizes" metadata, a G_IO_ERROR_NOT_FOUND error will be +the "ostree.sizes" metadata, a G_IO_ERROR_NOT_FOUND error will be returned.

    Parameters

    @@ -2586,10 +2586,10 @@ returned.

    ostree_commit_sizes_entry_new ()

    OstreeCommitSizesEntry *
    -ostree_commit_sizes_entry_new (const gchar *checksum,
    +ostree_commit_sizes_entry_new (const gchar *checksum,
                                    OstreeObjectType objtype,
    -                               guint64 unpacked,
    -                               guint64 archived);
    + guint64 unpacked, + guint64 archived);

    Create a new OstreeCommitSizesEntry for representing an object in a commit's "ostree.sizes" metadata.

    @@ -2688,9 +2688,9 @@ ostree_commit_sizes_entry_free (

    ostree_check_version ()

    -
    gboolean
    -ostree_check_version (guint required_year,
    -                      guint required_release);
    +
    gboolean
    +ostree_check_version (guint required_year,
    +                      guint required_release);

    Parameters

    @@ -2715,7 +2715,7 @@ ostree_check_version (guint

    Returns

    -

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

    +

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

    Since: 2017.4

    @@ -2943,7 +2943,7 @@ entry corresponds to an object in the associated commit.

    - + @@ -2953,12 +2953,12 @@ entry corresponds to an object in the associated commit.

    - + - + diff --git a/apidoc/html/ostree-GPG-signature-verification-results.html b/apidoc/html/ostree-GPG-signature-verification-results.html index 82a957f5..39ea8f99 100644 --- a/apidoc/html/ostree-GPG-signature-verification-results.html +++ b/apidoc/html/ostree-GPG-signature-verification-results.html @@ -41,7 +41,7 @@ +, or NULL.

    @@ -248,22 +248,22 @@ signed by key_id

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_gpg_verify_result_get ()

    -
    GVariant *
    +
    GVariant *
     ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
    -                              guint signature_index,
    +                              guint signature_index,
                                   OstreeGpgSignatureAttr *attrs,
    -                              guint n_attrs);
    -

    Builds a GVariant tuple of requested attributes for the GPG signature at + guint n_attrs);

    +

    Builds a GVariant tuple of requested attributes for the GPG signature at signature_index in result . See the OstreeGpgSignatureAttr description -for the GVariantType of each available attribute.

    +for the GVariantType of each available attribute.

    It is a programmer error to request an invalid OstreeGpgSignatureAttr or an invalid signature_index . Use ostree_gpg_verify_result_count_all() to @@ -304,29 +304,29 @@ array

    Returns

    -

    a new, floating, GVariant tuple

    +

    a new, floating, GVariant tuple


    ostree_gpg_verify_result_get_all ()

    -
    GVariant *
    +
    GVariant *
     ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result,
    -                                  guint signature_index);
    -

    Builds a GVariant tuple of all available attributes for the GPG signature + guint signature_index);

    +

    Builds a GVariant tuple of all available attributes for the GPG signature at signature_index in result .

    -

    The child values in the returned GVariant tuple are ordered to match the +

    The child values in the returned GVariant tuple are ordered to match the OstreeGpgSignatureAttr enumeration, which means the enum values can be -used as index values in functions like g_variant_get_child(). See the -OstreeGpgSignatureAttr description for the GVariantType of each +used as index values in functions like g_variant_get_child(). See the +OstreeGpgSignatureAttr description for the GVariantType of each available attribute.

    The OstreeGpgSignatureAttr enumeration may be extended in the future - with new attributes, which would affect the GVariant tuple returned by + with new attributes, which would affect the GVariant tuple returned by this function. While the position and type of current child values in - the GVariant tuple will not change, to avoid backward-compatibility + the GVariant tuple will not change, to avoid backward-compatibility issues please do not depend on the tuple's overall size or type signature.

    @@ -359,7 +359,7 @@ available attribute.

    Returns

    -

    a new, floating, GVariant tuple

    +

    a new, floating, GVariant tuple


    @@ -367,9 +367,9 @@ available attribute.

    ostree_gpg_verify_result_describe ()

    void
     ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result,
    -                                   guint signature_index,
    -                                   GString *output_buffer,
    -                                   const gchar *line_prefix,
    +                                   guint signature_index,
    +                                   GString *output_buffer,
    +                                   const gchar *line_prefix,
                                        OstreeGpgSignatureFormatFlags flags);

    Appends a brief, human-readable description of the GPG signature at signature_index @@ -408,7 +408,7 @@ format. Currently must be 0.

    - + @@ -430,11 +430,11 @@ format. Currently must be 0.

    ostree_gpg_verify_result_describe_variant ()

    void
     ostree_gpg_verify_result_describe_variant
    -                               (GVariant *variant,
    -                                GString *output_buffer,
    -                                const gchar *line_prefix,
    +                               (GVariant *variant,
    +                                GString *output_buffer,
    +                                const gchar *line_prefix,
                                     OstreeGpgSignatureFormatFlags flags);
    -

    Similar to ostree_gpg_verify_result_describe() but takes a GVariant of +

    Similar to ostree_gpg_verify_result_describe() but takes a GVariant of all attributes for a GPG signature instead of an OstreeGpgVerifyResult and signature index.

    The variant @@ -451,12 +451,12 @@ and signature index.

    - + - + @@ -476,14 +476,14 @@ and signature index.


    ostree_gpg_verify_result_require_valid_signature ()

    -
    gboolean
    +
    gboolean
     ostree_gpg_verify_result_require_valid_signature
                                    (OstreeGpgVerifyResult *result,
    -                                GError **error);
    + GError **error);

    Checks if the result contains at least one signature from the trusted keyring. You can call this function immediately after ostree_repo_verify_summary() or ostree_repo_verify_commit_ext() - -it will handle the NULL result +it will handle the NULL result and filled error too.

    @@ -502,7 +502,7 @@ it will handle the NULL
    - + @@ -510,9 +510,9 @@ it will handle the NULL

    Returns

    -

    TRUE if result -was not NULL and had at least one -signature from trusted keyring, otherwise FALSE

    +

    TRUE if result +was not NULL and had at least one +signature from trusted keyring, otherwise FALSE

    Since: 2016.6

    @@ -592,7 +592,7 @@ sign it has been revoked. Since: 2020.1.

    enum OstreeGpgSignatureAttr

    Signature attributes available from an OstreeGpgVerifyResult. -The attribute's GVariantType is shown in brackets.

    +The attribute's GVariantType is shown in brackets.

    Members

    gchar *checksum;

    gchar *checksum;

    object checksum.

    [not nullable]
     

    guint64 unpacked;

    guint64 unpacked;

    unpacked object size

     

    guint64 archived;

    guint64 archived;

    compressed object size

     
    -guint +guint ostree_gpg_verify_result_count_all () @@ -49,7 +49,7 @@
    -guint +guint ostree_gpg_verify_result_count_valid () @@ -57,7 +57,7 @@
    -gboolean +gboolean ostree_gpg_verify_result_lookup () @@ -65,7 +65,7 @@
    -GVariant * +GVariant * ostree_gpg_verify_result_get () @@ -73,7 +73,7 @@
    -GVariant * +GVariant * ostree_gpg_verify_result_get_all () @@ -97,7 +97,7 @@
    -gboolean +gboolean ostree_gpg_verify_result_require_valid_signature () @@ -150,7 +150,7 @@ or get all signature details with

    Functions

    ostree_gpg_verify_result_count_all ()

    -
    guint
    +
    guint
     ostree_gpg_verify_result_count_all (OstreeGpgVerifyResult *result);

    Counts all the signatures in result .

    @@ -177,7 +177,7 @@ ostree_gpg_verify_result_count_all (

    ostree_gpg_verify_result_count_valid ()

    -
    guint
    +
    guint
     ostree_gpg_verify_result_count_valid (OstreeGpgVerifyResult *result);

    Counts only the valid signatures in result .

    @@ -204,17 +204,17 @@ ostree_gpg_verify_result_count_valid (

    ostree_gpg_verify_result_lookup ()

    -
    gboolean
    +
    gboolean
     ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result,
    -                                 const gchar *key_id,
    -                                 guint *out_signature_index);
    + const gchar *key_id, + guint *out_signature_index);

    Searches result for a signature signed by key_id . If a match is found, -the function returns TRUE and sets out_signature_index +the function returns TRUE and sets out_signature_index so that further signature details can be obtained through ostree_gpg_verify_result_get(). -If no match is found, the function returns FALSE and leaves +If no match is found, the function returns FALSE and leaves out_signature_index unchanged.

    @@ -240,7 +240,7 @@ If no match is found, the function returns FALSE an

    out_signature_index

    return location for the index of the signature signed by key_id -, or NULL.

    [out]

    output_buffer

    a GString to hold the description

    a GString to hold the description

     

    variant

    a GVariant from ostree_gpg_verify_result_get_all()

    a GVariant from ostree_gpg_verify_result_get_all()

     

    output_buffer

    a GString to hold the description

    a GString to hold the description

     

    error

    A GError

    A GError

     
    @@ -605,56 +605,56 @@ The attribute's GVariantType is shown in brackets.

    @@ -662,7 +662,7 @@ expiration)

    @@ -670,7 +670,7 @@ the signature

    @@ -678,14 +678,14 @@ signature

    @@ -693,7 +693,7 @@ user

    @@ -711,7 +711,7 @@ expiration or if the key is missing)

    - + @@ -364,11 +364,11 @@ does not exist in the tree


    ostree_mutable_tree_ensure_dir ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
                                     const char *name,
                                     OstreeMutableTree **out_subdir,
    -                                GError **error);
    + GError **error);

    Returns the subdirectory of self with filename name , creating an empty one it if it doesn't exist.

    @@ -398,7 +398,7 @@ it if it doesn't exist.

    - + @@ -408,12 +408,12 @@ it if it doesn't exist.


    ostree_mutable_tree_lookup ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_lookup (OstreeMutableTree *self,
                                 const char *name,
                                 char **out_file_checksum,
                                 OstreeMutableTree **out_subdir,
    -                            GError **error);
    + GError **error);

    Parameters

    OSTREE_GPG_SIGNATURE_ATTR_VALID

    -

    [G_VARIANT_TYPE_BOOLEAN] Is the signature valid?

    +

    [G_VARIANT_TYPE_BOOLEAN] Is the signature valid?

     

    OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED

    -

    [G_VARIANT_TYPE_BOOLEAN] Has the signature expired?

    +

    [G_VARIANT_TYPE_BOOLEAN] Has the signature expired?

     

    OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED

    -

    [G_VARIANT_TYPE_BOOLEAN] Has the signing key expired?

    +

    [G_VARIANT_TYPE_BOOLEAN] Has the signing key expired?

     

    OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED

    -

    [G_VARIANT_TYPE_BOOLEAN] Has the signing key been revoked?

    +

    [G_VARIANT_TYPE_BOOLEAN] Has the signing key been revoked?

     

    OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING

    -

    [G_VARIANT_TYPE_BOOLEAN] Is the signing key missing?

    +

    [G_VARIANT_TYPE_BOOLEAN] Is the signing key missing?

     

    OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT

    -

    [G_VARIANT_TYPE_STRING] Fingerprint of the signing key

    +

    [G_VARIANT_TYPE_STRING] Fingerprint of the signing key

     

    OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP

    -

    [G_VARIANT_TYPE_INT64] Signature creation Unix timestamp

    +

    [G_VARIANT_TYPE_INT64] Signature creation Unix timestamp

     

    OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP

    -

    [G_VARIANT_TYPE_INT64] Signature expiration Unix timestamp (0 if no +

    [G_VARIANT_TYPE_INT64] Signature expiration Unix timestamp (0 if no expiration)

     

    OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME

    -

    [G_VARIANT_TYPE_STRING] Name of the public key algorithm used to create +

    [G_VARIANT_TYPE_STRING] Name of the public key algorithm used to create the signature

     

    OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME

    -

    [G_VARIANT_TYPE_STRING] Name of the hash algorithm used to create the +

    [G_VARIANT_TYPE_STRING] Name of the hash algorithm used to create the signature

     

    OSTREE_GPG_SIGNATURE_ATTR_USER_NAME

    -

    [G_VARIANT_TYPE_STRING] The name of the signing key's primary user

    +

    [G_VARIANT_TYPE_STRING] The name of the signing key's primary user

     

    OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL

    -

    [G_VARIANT_TYPE_STRING] The email address of the signing key's primary +

    [G_VARIANT_TYPE_STRING] The email address of the signing key's primary user

     

    OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY

    -

    [G_VARIANT_TYPE_STRING] Fingerprint of the signing key's primary key +

    [G_VARIANT_TYPE_STRING] Fingerprint of the signing key's primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT if the the signature is already from the primary key rather than a subkey, and will be the empty string if the key is missing.)

    @@ -703,7 +703,7 @@ and will be the empty string if the key is missing.)

    OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP

    -

    [G_VARIANT_TYPE_INT64] Key expiration Unix timestamp (0 if no +

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

     

    OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY

    -

    [G_VARIANT_TYPE_INT64] Key expiration Unix timestamp of the signing key's +

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

    diff --git a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html index 67afe627..8cc24ee6 100644 --- a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html +++ b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html @@ -57,7 +57,7 @@
    -gboolean +gboolean ostree_mutable_tree_check_error () @@ -95,7 +95,7 @@
    -gboolean +gboolean ostree_mutable_tree_replace_file () @@ -103,7 +103,7 @@
    -gboolean +gboolean ostree_mutable_tree_remove () @@ -111,7 +111,7 @@
    -gboolean +gboolean ostree_mutable_tree_ensure_dir () @@ -119,7 +119,7 @@
    -gboolean +gboolean ostree_mutable_tree_lookup () @@ -127,7 +127,7 @@
    -gboolean +gboolean ostree_mutable_tree_ensure_parent_dirs () @@ -135,7 +135,7 @@
    -gboolean +gboolean ostree_mutable_tree_walk () @@ -143,7 +143,7 @@
    -GHashTable * +GHashTable * ostree_mutable_tree_get_subdirs () @@ -151,7 +151,7 @@
    -GHashTable * +GHashTable * ostree_mutable_tree_get_files () @@ -159,7 +159,7 @@
    -gboolean +gboolean ostree_mutable_tree_fill_empty_from_dirtree () @@ -247,9 +247,9 @@ and checksums. The data will be loaded from the repo lazily as needed.


    ostree_mutable_tree_check_error ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_check_error (OstreeMutableTree *self,
    -                                 GError **error);
    + GError **error);

    In some cases, a tree may be in a "lazy" state that loads data in the background; if an error occurred during a non-throwing API call, it will have been cached. This function checks for a @@ -308,20 +308,20 @@ ostree_mutable_tree_get_contents_checksum


    ostree_mutable_tree_replace_file ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_replace_file (OstreeMutableTree *self,
                                       const char *name,
                                       const char *checksum,
    -                                  GError **error);
    + GError **error);

    ostree_mutable_tree_remove ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_remove (OstreeMutableTree *self,
                                 const char *name,
    -                            gboolean allow_noent,
    -                            GError **error);
    + gboolean allow_noent, + GError **error);

    Remove the file or subdirectory named name from the mutable tree self .

    @@ -353,7 +353,7 @@ does not exist in the tree

    error

    a GError

    a GError

     

    error

    a GError

    a GError

     
    @@ -445,7 +445,7 @@ ostree_mutable_tree_lookup (

    error

    -
    + @@ -455,13 +455,13 @@ ostree_mutable_tree_lookup (

    ostree_mutable_tree_ensure_parent_dirs ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_ensure_parent_dirs
                                    (OstreeMutableTree *self,
    -                                GPtrArray *split_path,
    +                                GPtrArray *split_path,
                                     const char *metadata_checksum,
                                     OstreeMutableTree **out_parent,
    -                                GError **error);
    + GError **error);

    Create all parent trees necessary for the given split_path to exist.

    @@ -496,7 +496,7 @@ exist.

    - + @@ -506,12 +506,12 @@ exist.


    ostree_mutable_tree_walk ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_walk (OstreeMutableTree *self,
    -                          GPtrArray *split_path,
    -                          guint start,
    +                          GPtrArray *split_path,
    +                          guint start,
                               OstreeMutableTree **out_subdir,
    -                          GError **error);
    + GError **error);

    Traverse start number of elements starting from split_path ; the @@ -559,7 +559,7 @@ child will be returned in out_subdir


    ostree_mutable_tree_get_subdirs ()

    -
    GHashTable *
    +
    GHashTable *
     ostree_mutable_tree_get_subdirs (OstreeMutableTree *self);

    Returns

    @@ -570,7 +570,7 @@ ostree_mutable_tree_get_subdirs (

    ostree_mutable_tree_get_files ()

    -
    GHashTable *
    +
    GHashTable *
     ostree_mutable_tree_get_files (OstreeMutableTree *self);

    Returns

    @@ -581,7 +581,7 @@ ostree_mutable_tree_get_files (

    ostree_mutable_tree_fill_empty_from_dirtree ()

    -
    gboolean
    +
    gboolean
     ostree_mutable_tree_fill_empty_from_dirtree
                                    (OstreeMutableTree *self,
                                     OstreeRepo *repo,
    diff --git a/apidoc/html/ostree-OstreeRepo.html b/apidoc/html/ostree-OstreeRepo.html
    index 192ace2a..a9cada5e 100644
    --- a/apidoc/html/ostree-OstreeRepo.html
    +++ b/apidoc/html/ostree-OstreeRepo.html
    @@ -41,7 +41,7 @@
     
    - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1418,10 +1458,10 @@ collection IDs, see

    Functions

    ostree_repo_mode_from_string ()

    -
    gboolean
    +
    gboolean
     ostree_repo_mode_from_string (const char *mode,
                                   OstreeRepoMode *out_mode,
    -                              GError **error);
    + GError **error);

    Parameters

    a GError

    a GError

     

    error

    a GError

    a GError

     
    -gboolean +gboolean ostree_repo_mode_from_string () @@ -81,7 +81,7 @@
    -gboolean +gboolean ostree_repo_open () @@ -97,7 +97,7 @@
    -gboolean +gboolean ostree_repo_get_disable_fsync () @@ -105,7 +105,7 @@
    -gboolean +gboolean ostree_repo_is_system () @@ -113,7 +113,7 @@
    -gboolean +gboolean ostree_repo_is_writable () @@ -129,21 +129,21 @@
    -gboolean +gboolean ostree_repo_create ()
    const gchar * +const gchar * ostree_repo_get_collection_id ()
    const gchar * +const gchar * ostree_repo_get_bootloader () @@ -151,7 +151,7 @@
    -GFile * +GFile * ostree_repo_get_path () @@ -167,7 +167,7 @@
    -gboolean +gboolean ostree_repo_get_min_free_space_bytes () @@ -175,7 +175,7 @@
    -GKeyFile * +GKeyFile * ostree_repo_get_config () @@ -190,7 +190,7 @@
    const gchar * const * +const gchar * const * ostree_repo_get_default_repo_finders () @@ -198,7 +198,39 @@
    -guint +gboolean + +ostree_repo_lock_pop () +
    +gboolean + +ostree_repo_lock_push () +
    +OstreeRepoAutoLock * + +ostree_repo_auto_lock_push () +
    +void + +ostree_repo_auto_lock_cleanup () +
    +guint ostree_repo_hash () @@ -206,7 +238,7 @@
    -gboolean +gboolean ostree_repo_equal () @@ -214,7 +246,7 @@
    -GKeyFile * +GKeyFile * ostree_repo_copy_config () @@ -222,7 +254,7 @@
    -gboolean +gboolean ostree_repo_remote_add () @@ -230,7 +262,7 @@
    -gboolean +gboolean ostree_repo_remote_delete () @@ -238,7 +270,7 @@
    -gboolean +gboolean ostree_repo_remote_change () @@ -254,7 +286,7 @@
    -gboolean +gboolean ostree_repo_remote_list_collection_refs () @@ -262,7 +294,7 @@
    -gboolean +gboolean ostree_repo_remote_get_url () @@ -270,7 +302,7 @@
    -gboolean +gboolean ostree_repo_remote_get_gpg_verify () @@ -278,7 +310,7 @@
    -gboolean +gboolean ostree_repo_remote_get_gpg_verify_summary () @@ -286,7 +318,7 @@
    -gboolean +gboolean ostree_repo_remote_gpg_import () @@ -294,7 +326,7 @@
    -gboolean +gboolean ostree_repo_remote_fetch_summary () @@ -302,7 +334,7 @@
    -gboolean +gboolean ostree_repo_remote_fetch_summary_with_options () @@ -310,7 +342,7 @@
    -gboolean +gboolean ostree_repo_reload_config () @@ -318,7 +350,7 @@
    -gboolean +gboolean ostree_repo_get_remote_boolean_option () @@ -326,7 +358,7 @@
    -gboolean +gboolean ostree_repo_get_remote_list_option () @@ -334,7 +366,7 @@
    -gboolean +gboolean ostree_repo_get_remote_option () @@ -350,7 +382,7 @@
    -gboolean +gboolean ostree_repo_write_config () @@ -358,7 +390,7 @@
    -gboolean +gboolean ostree_repo_scan_hardlinks () @@ -366,7 +398,7 @@
    -gboolean +gboolean ostree_repo_prepare_transaction () @@ -374,7 +406,7 @@
    -gboolean +gboolean ostree_repo_commit_transaction () @@ -382,7 +414,7 @@
    -gboolean +gboolean ostree_repo_abort_transaction () @@ -414,7 +446,7 @@
    -gboolean +gboolean ostree_repo_set_ref_immediate () @@ -422,7 +454,7 @@
    -gboolean +gboolean ostree_repo_set_alias_ref_immediate () @@ -430,7 +462,7 @@
    -gboolean +gboolean ostree_repo_set_cache_dir () @@ -438,7 +470,7 @@
    -gboolean +gboolean ostree_repo_set_collection_id () @@ -446,7 +478,7 @@
    -gboolean +gboolean ostree_repo_set_collection_ref_immediate () @@ -454,7 +486,7 @@
    -gboolean +gboolean ostree_repo_sign_delta () @@ -462,7 +494,7 @@
    -gboolean +gboolean ostree_repo_has_object () @@ -470,7 +502,7 @@
    -gboolean +gboolean ostree_repo_mark_commit_partial () @@ -478,7 +510,7 @@
    -gboolean +gboolean ostree_repo_mark_commit_partial_reason () @@ -486,7 +518,7 @@
    -gboolean +gboolean ostree_repo_write_metadata () @@ -502,7 +534,7 @@
    -gboolean +gboolean ostree_repo_write_metadata_finish () @@ -510,7 +542,7 @@
    -gboolean +gboolean ostree_repo_write_content () @@ -542,7 +574,7 @@
    -gboolean +gboolean ostree_repo_write_metadata_trusted () @@ -550,7 +582,7 @@
    -gboolean +gboolean ostree_repo_write_metadata_stream_trusted () @@ -558,7 +590,7 @@
    -gboolean +gboolean ostree_repo_write_content_trusted () @@ -574,7 +606,7 @@
    -gboolean +gboolean ostree_repo_write_content_finish () @@ -582,7 +614,7 @@
    -gboolean +gboolean ostree_repo_resolve_rev () @@ -590,7 +622,7 @@
    -gboolean +gboolean ostree_repo_resolve_rev_ext () @@ -598,7 +630,7 @@
    -gboolean +gboolean ostree_repo_list_refs () @@ -606,7 +638,7 @@
    -gboolean +gboolean ostree_repo_list_refs_ext () @@ -614,7 +646,7 @@
    -gboolean +gboolean ostree_repo_list_collection_refs () @@ -622,7 +654,7 @@
    -gboolean +gboolean ostree_repo_remote_list_refs () @@ -630,7 +662,7 @@
    -gboolean +gboolean ostree_repo_resolve_collection_ref () @@ -638,7 +670,7 @@
    -gboolean +gboolean ostree_repo_load_variant () @@ -646,7 +678,7 @@
    -gboolean +gboolean ostree_repo_load_commit () @@ -654,7 +686,7 @@
    -gboolean +gboolean ostree_repo_load_variant_if_exists () @@ -662,7 +694,7 @@
    -gboolean +gboolean ostree_repo_load_file () @@ -670,7 +702,7 @@
    -gboolean +gboolean ostree_repo_load_object_stream () @@ -678,7 +710,7 @@
    -gboolean +gboolean ostree_repo_query_object_storage_size () @@ -686,7 +718,7 @@
    -gboolean +gboolean ostree_repo_import_object_from () @@ -694,7 +726,7 @@
    -gboolean +gboolean ostree_repo_import_object_from_with_trust () @@ -702,7 +734,7 @@
    -gboolean +gboolean ostree_repo_import_archive_to_mtree () @@ -710,7 +742,7 @@
    -gboolean +gboolean ostree_repo_export_tree_to_archive () @@ -718,7 +750,7 @@
    -gboolean +gboolean ostree_repo_delete_object () @@ -726,7 +758,7 @@
    -gboolean +gboolean ostree_repo_fsck_object () @@ -750,7 +782,7 @@
    -GVariant * +GVariant * (*OstreeRepoCommitModifierXattrCallback) () @@ -774,7 +806,7 @@
    -gboolean +gboolean ostree_repo_commit_modifier_set_sepolicy_from_commit () @@ -830,7 +862,7 @@
    -GType +GType ostree_repo_devino_cache_get_type () @@ -838,7 +870,7 @@
    -gboolean +gboolean ostree_repo_write_directory_to_mtree () @@ -846,7 +878,7 @@
    -gboolean +gboolean ostree_repo_write_dfd_to_mtree () @@ -854,7 +886,7 @@
    -gboolean +gboolean ostree_repo_write_archive_to_mtree () @@ -862,7 +894,7 @@
    -gboolean +gboolean ostree_repo_write_archive_to_mtree_from_fd () @@ -870,7 +902,7 @@
    -gboolean +gboolean ostree_repo_write_mtree () @@ -878,7 +910,7 @@
    -gboolean +gboolean ostree_repo_write_commit () @@ -886,7 +918,7 @@
    -gboolean +gboolean ostree_repo_write_commit_with_time () @@ -894,7 +926,7 @@
    -gboolean +gboolean ostree_repo_read_commit_detached_metadata () @@ -902,7 +934,7 @@
    -gboolean +gboolean ostree_repo_write_commit_detached_metadata () @@ -918,7 +950,7 @@
    -gboolean +gboolean ostree_repo_checkout_tree () @@ -926,7 +958,7 @@
    -gboolean +gboolean ostree_repo_checkout_tree_at () @@ -934,7 +966,7 @@
    -gboolean +gboolean ostree_repo_checkout_at () @@ -942,7 +974,7 @@
    -gboolean +gboolean ostree_repo_checkout_gc () @@ -950,7 +982,7 @@
    -gboolean +gboolean ostree_repo_read_commit () @@ -958,7 +990,7 @@
    -gboolean +gboolean ostree_repo_list_objects () @@ -966,7 +998,7 @@
    -gboolean +gboolean ostree_repo_list_commit_objects_starting_with () @@ -974,7 +1006,7 @@
    -gboolean +gboolean ostree_repo_list_static_delta_names () @@ -982,7 +1014,7 @@
    -gboolean +gboolean ostree_repo_list_static_delta_indexes () @@ -990,7 +1022,7 @@
    -gboolean +gboolean ostree_repo_static_delta_reindex () @@ -998,7 +1030,7 @@
    -gboolean +gboolean ostree_repo_static_delta_generate () @@ -1006,7 +1038,7 @@
    -gboolean +gboolean ostree_repo_static_delta_execute_offline_with_signature () @@ -1014,7 +1046,7 @@
    -gboolean +gboolean ostree_repo_static_delta_execute_offline () @@ -1022,7 +1054,7 @@
    -gboolean +gboolean ostree_repo_static_delta_verify_signature () @@ -1030,7 +1062,7 @@
    -GHashTable * +GHashTable * ostree_repo_traverse_new_reachable () @@ -1038,7 +1070,7 @@
    -GHashTable * +GHashTable * ostree_repo_traverse_new_parents () @@ -1054,7 +1086,7 @@
    -gboolean +gboolean ostree_repo_traverse_commit () @@ -1062,7 +1094,7 @@
    -gboolean +gboolean ostree_repo_traverse_commit_union () @@ -1070,7 +1102,7 @@
    -gboolean +gboolean ostree_repo_traverse_commit_union_with_parents () @@ -1110,7 +1142,7 @@
    -gboolean +gboolean ostree_repo_commit_traverse_iter_init_commit () @@ -1118,7 +1150,7 @@
    -gboolean +gboolean ostree_repo_commit_traverse_iter_init_dirtree () @@ -1134,7 +1166,7 @@
    -gboolean +gboolean ostree_repo_prune () @@ -1142,7 +1174,7 @@
    -gboolean +gboolean ostree_repo_prune_static_deltas () @@ -1150,7 +1182,7 @@
    -gboolean +gboolean ostree_repo_traverse_reachable_refs () @@ -1158,7 +1190,7 @@
    -gboolean +gboolean ostree_repo_prune_from_reachable () @@ -1166,7 +1198,7 @@
    -gboolean +gboolean ostree_repo_pull () @@ -1174,7 +1206,7 @@
    -gboolean +gboolean ostree_repo_pull_one_dir () @@ -1182,7 +1214,7 @@
    -gboolean +gboolean ostree_repo_pull_with_options () @@ -1198,7 +1230,7 @@
    -gboolean +gboolean ostree_repo_sign_commit () @@ -1206,7 +1238,7 @@
    -gboolean +gboolean ostree_repo_append_gpg_signature () @@ -1214,7 +1246,7 @@
    -gboolean +gboolean ostree_repo_add_gpg_signature_summary () @@ -1222,7 +1254,7 @@
    -gboolean +gboolean ostree_repo_gpg_sign_data () @@ -1238,7 +1270,7 @@
    -gboolean +gboolean ostree_repo_verify_commit () @@ -1270,7 +1302,7 @@
    -gboolean +gboolean ostree_repo_regenerate_summary () @@ -1297,6 +1329,14 @@
    enumOstreeRepoLockType
    typedefOstreeRepoAutoLock
    enum OstreeRepoRemoteChange
    @@ -1443,7 +1483,7 @@ ostree_repo_mode_from_string (const

    error

    -
    + @@ -1456,8 +1496,8 @@ ostree_repo_mode_from_string (const OstreeRepo * ostree_repo_open_at (int dfd, const char *path, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

    This combines ostree_repo_new() (but using fd-relative access) with ostree_repo_open(). Use this when you know you should be operating on an already extant repository. If you want to create one, use ostree_repo_create_at().

    @@ -1496,7 +1536,7 @@ already extant repository. If you want to create one, use

    ostree_repo_new ()

    OstreeRepo *
    -ostree_repo_new (GFile *path);
    +ostree_repo_new (GFile *path);

    Parameters

    a GError if the string is not a valid mode

    a GError if the string is not a valid mode

     
    @@ -1523,8 +1563,8 @@ ostree_repo_new (GFile *pa

    ostree_repo_new_for_sysroot_path ()

    OstreeRepo *
    -ostree_repo_new_for_sysroot_path (GFile *repo_path,
    -                                  GFile *sysroot_path);
    +ostree_repo_new_for_sysroot_path (GFile *repo_path, + GFile *sysroot_path);

    Creates a new OstreeRepo instance, taking the system root path explicitly instead of assuming "/".

    @@ -1575,17 +1615,17 @@ Otherwise use the path in the OSTREE_REPO environment variable

    ostree_repo_open ()

    -
    gboolean
    +
    gboolean
     ostree_repo_open (OstreeRepo *self,
    -                  GCancellable *cancellable,
    -                  GError **error);
    + GCancellable *cancellable, + GError **error);

    ostree_repo_set_disable_fsync ()

    void
     ostree_repo_set_disable_fsync (OstreeRepo *self,
    -                               gboolean disable_fsync);
    + gboolean disable_fsync);

    Disable requests to fsync() to stable storage during commits. This option should only be used by build system tools which are creating disposable virtual machines, or have higher level mechanisms for @@ -1606,7 +1646,7 @@ ensuring data consistency.

    - + @@ -1616,7 +1656,7 @@ ensuring data consistency.


    ostree_repo_get_disable_fsync ()

    -
    gboolean
    +
    gboolean
     ostree_repo_get_disable_fsync (OstreeRepo *self);

    For more information see ostree_repo_set_disable_fsync().

    @@ -1642,7 +1682,7 @@ ostree_repo_get_disable_fsync (

    ostree_repo_is_system ()

    -
    gboolean
    +
    gboolean
     ostree_repo_is_system (OstreeRepo *repo);

    Parameters

    @@ -1661,15 +1701,15 @@ ostree_repo_is_system (

    Returns

    -

    TRUE if this repository is the root-owned system global repository

    +

    TRUE if this repository is the root-owned system global repository


    ostree_repo_is_writable ()

    -
    gboolean
    +
    gboolean
     ostree_repo_is_writable (OstreeRepo *self,
    -                         GError **error);
    + GError **error);

    Returns whether the repository is writable by the current user. If the repository is not writable, the error indicates why.

    @@ -1689,7 +1729,7 @@ If the repository is not writable, the error<
    - + @@ -1697,7 +1737,7 @@ If the repository is not writable, the error<

    Returns

    -

    TRUE if this repository is writable

    +

    TRUE if this repository is writable


    @@ -1707,9 +1747,9 @@ If the repository is not writable, the error< ostree_repo_create_at (int dfd, const char *path, OstreeRepoMode mode, - GVariant *options, - GCancellable *cancellable, - GError **error); + GVariant *options, + GCancellable *cancellable, + GError **error);

    This is a file-descriptor relative version of ostree_repo_create(). Create the underlying structure on disk for the repository, and call ostree_repo_open_at() on the result, preparing it for use.

    @@ -1774,11 +1814,11 @@ the mode or configuration (repo/config) of an exist

    ostree_repo_create ()

    -
    gboolean
    +
    gboolean
     ostree_repo_create (OstreeRepo *self,
                         OstreeRepoMode mode,
    -                    GCancellable *cancellable,
    -                    GError **error);
    + GCancellable *cancellable, + GError **error);

    Create the underlying structure on disk for the repository, and call ostree_repo_open() on the result, preparing it for use.

    Since version 2016.8, this function will succeed on an existing @@ -1826,7 +1866,7 @@ this function on a repository initialized via

    ostree_repo_get_collection_id ()

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

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

    @@ -1854,7 +1894,7 @@ ostree_repo_get_collection_id (

    ostree_repo_get_bootloader ()

    -
    const gchar *
    +
    const gchar *
     ostree_repo_get_bootloader (OstreeRepo *self);

    Get the bootloader configured. See the documentation for the "sysroot.bootloader" config key.

    @@ -1883,7 +1923,7 @@ ostree_repo_get_bootloader (

    ostree_repo_get_path ()

    -
    GFile *
    +
    GFile *
     ostree_repo_get_path (OstreeRepo *self);

    Note that since the introduction of ostree_repo_open_at(), this function may return a process-specific path in /proc if the repository was created using @@ -1918,10 +1958,10 @@ ostree_repo_get_mode (

    ostree_repo_get_min_free_space_bytes ()

    -
    gboolean
    +
    gboolean
     ostree_repo_get_min_free_space_bytes (OstreeRepo *self,
    -                                      guint64 *out_reserved_bytes,
    -                                      GError **error);
    + guint64 *out_reserved_bytes, + GError **error);

    Determine the number of bytes of free disk space that are reserved according to the repo config and return that number in out_reserved_bytes . See the @@ -1948,7 +1988,7 @@ core.min-free-space-percent repo config options.

    - + @@ -1956,14 +1996,14 @@ core.min-free-space-percent repo config options.

    Returns

    -

    TRUE on success, FALSE otherwise.

    +

    TRUE on success, FALSE otherwise.

    Since: 2018.9


    ostree_repo_get_config ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_repo_get_config (OstreeRepo *self);

    Returns

    @@ -2005,7 +2045,7 @@ repository (to see whether a ref was written).


    ostree_repo_get_default_repo_finders ()

    -
    const gchar * const *
    +
    const gchar * const *
     ostree_repo_get_default_repo_finders (OstreeRepo *self);

    Get the set of default repo finders configured. See the documentation for the "core.default-repo-finders" config key.

    @@ -2026,15 +2066,242 @@ the "core.default-repo-finders" config key.

    Returns

    -

    NULL-terminated array of strings.

    +

    NULL-terminated array of strings.

    [array zero-terminated=1][element-type utf8]

    Since: 2018.9


    +

    ostree_repo_lock_pop ()

    +
    gboolean
    +ostree_repo_lock_pop (OstreeRepo *self,
    +                      OstreeRepoLockType lock_type,
    +                      GCancellable *cancellable,
    +                      GError **error);
    +

    Release a lock of type lock_type + from the lock state. If the lock state +becomes empty, the repository is unlocked. Otherwise, the lock state only +changes when transitioning from an exclusive lock back to a shared lock. The +requested lock_type + must be the same type that was requested in the call to +ostree_repo_lock_push(). It is a programmer error if these do not match and +the program may abort if the lock would reach an invalid state.

    +

    ostree_repo_lock_pop() waits for the lock depending on the repository's +lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is +attempted. Otherwise, the lock is removed non-blocking and +ostree_repo_lock_pop() will sleep synchronously up to lock-timeout-secs seconds +attempting to remove the lock. If the lock cannot be removed within the +timeout, a G_IO_ERROR_WOULD_BLOCK error is returned.

    +

    If self + is not writable by the user, then no unlocking is attempted and +TRUE is returned.

    +
    +

    Parameters

    +

    disable_fsync

    If TRUE, do not fsync

    If TRUE, do not fsync

     

    error

    a GError

    a GError

     

    error

    Return location for a GError

    Return location for a GError

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

    self

    a OstreeRepo

     

    lock_type

    the type of lock to release

     

    cancellable

    a GCancellable

     

    error

    a GError

     
    +
    +
    +

    Returns

    +

    TRUE on success, otherwise FALSE with error +set

    +
    +

    Since: 2021.3

    +
    +
    +
    +

    ostree_repo_lock_push ()

    +
    gboolean
    +ostree_repo_lock_push (OstreeRepo *self,
    +                       OstreeRepoLockType lock_type,
    +                       GCancellable *cancellable,
    +                       GError **error);
    +

    Takes a lock on the repository and adds it to the lock state. If lock_type + +is OSTREE_REPO_LOCK_SHARED, a shared lock is taken. If lock_type + is +OSTREE_REPO_LOCK_EXCLUSIVE, an exclusive lock is taken. The actual lock +state is only changed when locking a previously unlocked repository or +upgrading the lock from shared to exclusive. If the requested lock type is +unchanged or would represent a downgrade (exclusive to shared), the lock +state is not changed.

    +

    ostree_repo_lock_push() waits for the lock depending on the repository's +lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is +attempted. Otherwise, the lock is taken non-blocking and +ostree_repo_lock_push() will sleep synchronously up to lock-timeout-secs seconds +attempting to acquire the lock. If the lock cannot be acquired within the +timeout, a G_IO_ERROR_WOULD_BLOCK error is returned.

    +

    If self + is not writable by the user, then no locking is attempted and +TRUE is returned.

    +
    +

    Parameters

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

    self

    a OstreeRepo

     

    lock_type

    the type of lock to acquire

     

    cancellable

    a GCancellable

     

    error

    a GError

     
    +
    +
    +

    Returns

    +

    TRUE on success, otherwise FALSE with error +set

    +
    +

    Since: 2021.3

    +
    +
    +
    +

    ostree_repo_auto_lock_push ()

    +
    OstreeRepoAutoLock *
    +ostree_repo_auto_lock_push (OstreeRepo *self,
    +                            OstreeRepoLockType lock_type,
    +                            GCancellable *cancellable,
    +                            GError **error);
    +

    Like ostree_repo_lock_push(), but for usage with OstreeRepoAutoLock. The +intended usage is to declare the OstreeRepoAutoLock with g_autoptr() so +that ostree_repo_auto_lock_cleanup() is called when it goes out of scope. +This will automatically release the lock if it was acquired successfully.

    +
    + + + + + + + +
    1
    +2
    +3
    +4
    g_autoptr(OstreeRepoAutoLock) lock = NULL;
    +lock = ostree_repo_auto_lock_push (repo, lock_type, cancellable, error);
    +if (!lock)
    +  return FALSE;
    +
    + +

    +

    [skip]

    +
    +

    Parameters

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

    self

    a OstreeRepo

     

    lock_type

    the type of lock to acquire

     

    cancellable

    a GCancellable

     

    error

    a GError

     
    +
    +
    +

    Returns

    +

    self +on success, otherwise NULL with error +set

    +
    +

    Since: 2021.3

    +
    +
    +
    +

    ostree_repo_auto_lock_cleanup ()

    +
    void
    +ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock);
    +

    A cleanup handler for use with ostree_repo_auto_lock_push(). If lock + is +not NULL, ostree_repo_lock_pop() will be called on it. If +ostree_repo_lock_pop() fails, a critical warning will be emitted.

    +

    [skip]

    +
    +

    Parameters

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

    lock

    a OstreeRepoAutoLock

     
    +
    +

    Since: 2021.3

    +
    +
    +

    ostree_repo_hash ()

    -
    guint
    +
    guint
     ostree_repo_hash (OstreeRepo *self);

    Calculate a hash value for the given open repository, suitable for use when putting it into a hash table. It is an error to call this on an OstreeRepo @@ -2065,14 +2332,14 @@ the repository is open and the inode of its root directory has been loaded.


    ostree_repo_equal ()

    -
    gboolean
    +
    gboolean
     ostree_repo_equal (OstreeRepo *a,
                        OstreeRepo *b);

    Check whether two opened repositories are the same on disk: if their root directories are the same inode. If a or b are not open yet (due to -ostree_repo_open() not being called on them yet), FALSE will be returned.

    +ostree_repo_open() not being called on them yet), FALSE will be returned.

    Parameters

    @@ -2097,16 +2364,16 @@ directories are the same inode. If a

    Returns

    -

    TRUE if a +

    TRUE if a and b -are the same repository on disk, FALSE otherwise

    +are the same repository on disk, FALSE otherwise

    Since: 2017.12


    ostree_repo_copy_config ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_repo_copy_config (OstreeRepo *self);

    Returns

    @@ -2117,24 +2384,24 @@ ostree_repo_copy_config (

    ostree_repo_remote_add ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_add (OstreeRepo *self,
                             const char *name,
                             const char *url,
    -                        GVariant *options,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + GVariant *options, + GCancellable *cancellable, + GError **error);

    Create a new remote named name pointing to url . If options is -provided, then it will be mapped to GKeyFile entries, where the +provided, then it will be mapped to GKeyFile entries, where the GVariant dictionary key is an option string, and the value is mapped as follows:

    Parameters

    @@ -2182,11 +2449,11 @@ mapped as follows:


    ostree_repo_remote_delete ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_delete (OstreeRepo *self,
                                const char *name,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Delete the remote named name . It is an error if the provided remote does not exist.

    @@ -2226,15 +2493,15 @@ remote does not exist.


    ostree_repo_remote_change ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_change (OstreeRepo *self,
    -                           GFile *sysroot,
    +                           GFile *sysroot,
                                OstreeRepoRemoteChange changeop,
                                const char *name,
                                const char *url,
    -                           GVariant *options,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GVariant *options, + GCancellable *cancellable, + GError **error);

    A combined function handling the equivalent of ostree_repo_remote_add(), ostree_repo_remote_delete(), with more options.

    @@ -2296,9 +2563,9 @@ options.

    ostree_repo_remote_list ()

    char **
     ostree_repo_remote_list (OstreeRepo *self,
    -                         guint *out_n_remotes);
    + guint *out_n_remotes);

    List available remote names in an OstreeRepo. Remote names are sorted -alphabetically. If no remotes are available the function returns NULL.

    +alphabetically. If no remotes are available the function returns NULL.

    Parameters

    @@ -2323,7 +2590,7 @@ alphabetically. If no remotes are available the function returns

    Returns

    -

    a NULL-terminated +

    a NULL-terminated array of remote names.

    [array length=out_n_remotes][transfer full]

    @@ -2331,19 +2598,19 @@ array of remote names.


    ostree_repo_remote_list_collection_refs ()

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

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

    @@ -2389,11 +2656,11 @@ No filtering is performed.


    ostree_repo_remote_get_url ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_get_url (OstreeRepo *self,
                                 const char *name,
                                 char **out_url,
    -                            GError **error);
    + GError **error);

    Return the URL of the remote named name through out_url . It is an @@ -2432,17 +2699,17 @@ error if the provided remote does not exist.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_repo_remote_get_gpg_verify ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
                                        const char *name,
    -                                   gboolean *out_gpg_verify,
    -                                   GError **error);
    + gboolean *out_gpg_verify, + GError **error);

    Return whether GPG verification is enabled for the remote named name through out_gpg_verify @@ -2482,18 +2749,18 @@ not exist.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_repo_remote_get_gpg_verify_summary ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_get_gpg_verify_summary
                                    (OstreeRepo *self,
                                     const char *name,
    -                                gboolean *out_gpg_verify_summary,
    -                                GError **error);
    + gboolean *out_gpg_verify_summary, + GError **error);

    Return whether GPG verification of the summary is enabled for the remote named name through out_gpg_verify_summary @@ -2533,27 +2800,27 @@ remote does not exist.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_repo_remote_gpg_import ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_gpg_import (OstreeRepo *self,
                                    const char *name,
    -                               GInputStream *source_stream,
    +                               GInputStream *source_stream,
                                    const char * const *key_ids,
    -                               guint *out_imported,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + guint *out_imported, + GCancellable *cancellable, + GError **error);

    Imports one or more GPG keys from the open source_stream , or from the user's personal keyring if source_stream - is NULL. The key_ids + is NULL. The key_ids array can optionally restrict which keys are imported. If key_ids - is NULL, + is NULL, then all keys are imported.

    The imported keys will be used to conduct GPG verification when pulling from the remote named name @@ -2579,28 +2846,28 @@ from the remote named name

    - + - + +keys, or NULL.

    - + - + @@ -2608,19 +2875,19 @@ keys, or NULL.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_repo_remote_fetch_summary ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_fetch_summary (OstreeRepo *self,
                                       const char *name,
    -                                  GBytes **out_summary,
    -                                  GBytes **out_signatures,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + GBytes **out_summary, + GBytes **out_signatures, + GCancellable *cancellable, + GError **error);

    Tries to fetch the summary file and any GPG signatures on the summary file over HTTP, and returns the binary data in out_summary and out_signatures @@ -2632,10 +2899,10 @@ respectively.

    . Likewise if the summary file is not signed, out_signatures is set to NULL -. In either case the function still returns TRUE.

    +. In either case the function still returns TRUE.

    This method does not verify the signature of the downloaded summary file. Use ostree_repo_verify_summary() for that.

    -

    Parse the summary data into a GVariant using g_variant_new_from_bytes() +

    Parse the summary data into a GVariant using g_variant_new_from_bytes() with OSTREE_SUMMARY_GVARIANT_FORMAT as the format string.

    Parameters

    @@ -2659,23 +2926,23 @@ with

    out_summary

    +NULL.

    +signature data, or NULL.

    - + - + @@ -2683,21 +2950,21 @@ signature data, or NULL.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure


    ostree_repo_remote_fetch_summary_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_repo_remote_fetch_summary_with_options
                                    (OstreeRepo *self,
                                     const char *name,
    -                                GVariant *options,
    -                                GBytes **out_summary,
    -                                GBytes **out_signatures,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GVariant *options, + GBytes **out_summary, + GBytes **out_signatures, + GCancellable *cancellable, + GError **error);

    Like ostree_repo_remote_fetch_summary(), but supports an extensible set of flags. The following are currently defined:

      @@ -2735,23 +3002,23 @@ means return errors without retrying

    +NULL.

    +signature data, or NULL.

    - + - + @@ -2759,17 +3026,17 @@ signature data, or NULL.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure

    Since: 2016.6


    ostree_repo_reload_config ()

    -
    gboolean
    +
    gboolean
     ostree_repo_reload_config (OstreeRepo *self,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    By default, an OstreeRepo will cache the remote configuration and its own repo/config data. This API can be used to reload it.

    @@ -2804,13 +3071,13 @@ own repo/config data. This API can be used to reload it.


    ostree_repo_get_remote_boolean_option ()

    -
    gboolean
    +
    gboolean
     ostree_repo_get_remote_boolean_option (OstreeRepo *self,
                                            const char *remote_name,
                                            const char *option_name,
    -                                       gboolean default_value,
    -                                       gboolean *out_value,
    -                                       GError **error);
    + gboolean default_value, + gboolean *out_value, + GError **error);

    OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name @@ -2819,7 +3086,7 @@ If the option is not set, out_value will be set to default_value . If an error is returned, out_value - will be set to FALSE.

    + will be set to FALSE.

    Parameters

    source_stream

    a GInputStream, or NULL.

    a GInputStream, or NULL.

    [nullable]

    key_ids

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

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

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

    out_imported

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

    [out][optional]

    cancellable

    a GCancellable

    a GCancellable

     

    error

    a GError

    a GError

     

    return location for raw summary data, or -NULL.

    [out][optional]

    out_signatures

    return location for raw summary -signature data, or NULL.

    [out][optional]

    cancellable

    a GCancellable

    a GCancellable

     

    error

    a GError

    a GError

     

    out_summary

    return location for raw summary data, or -NULL.

    [out][optional]

    out_signatures

    return location for raw summary -signature data, or NULL.

    [out][optional]

    cancellable

    a GCancellable

    a GCancellable

     

    error

    a GError

    a GError

     
    @@ -2865,7 +3132,7 @@ is not present

    Returns

    -

    TRUE on success, otherwise FALSE with error +

    TRUE on success, otherwise FALSE with error set

    Since: 2016.5

    @@ -2873,19 +3140,19 @@ set


    ostree_repo_get_remote_list_option ()

    -
    gboolean
    +
    gboolean
     ostree_repo_get_remote_list_option (OstreeRepo *self,
                                         const char *remote_name,
                                         const char *option_name,
                                         char ***out_value,
    -                                    GError **error);
    + GError **error);

    OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name underneath that group, and returns it as a zero terminated array of strings. If the option is not set, or if an error is returned, out_value will be set -to NULL.

    +to NULL.

    Parameters

    @@ -2914,7 +3181,7 @@ to NULL.

    +g_strfreev().

    @@ -2927,7 +3194,7 @@ of strings. The list should be freed with

    Returns

    -

    TRUE on success, otherwise FALSE with error +

    TRUE on success, otherwise FALSE with error set

    Since: 2016.5

    @@ -2935,20 +3202,20 @@ set


    ostree_repo_get_remote_option ()

    -
    gboolean
    +
    gboolean
     ostree_repo_get_remote_option (OstreeRepo *self,
                                    const char *remote_name,
                                    const char *option_name,
                                    const char *default_value,
                                    char **out_value,
    -                               GError **error);
    + GError **error);

    OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name underneath that group, or default_value if the remote exists but not the option name. If an error is returned, out_value - will be set to NULL.

    + will be set to NULL.

    Parameters

    out_value

    location to store the list of strings. The list should be freed with -g_strfreev().

    [out][array zero-terminated=1]
    @@ -2994,7 +3261,7 @@ is not present.

    Returns

    -

    TRUE on success, otherwise FALSE with error +

    TRUE on success, otherwise FALSE with error set

    Since: 2016.5

    @@ -3023,17 +3290,17 @@ called.

    Returns

    -

    Parent repository, or NULL if none.

    +

    Parent repository, or NULL if none.

    [transfer none]


    ostree_repo_write_config ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_config (OstreeRepo *self,
    -                          GKeyFile *new_config,
    -                          GError **error);
    + GKeyFile *new_config, + GError **error);

    Save new_config in place of this repository's config file.

    @@ -3057,7 +3324,7 @@ ostree_repo_write_config (

    error

    -
    + @@ -3067,10 +3334,10 @@ ostree_repo_write_config (

    ostree_repo_scan_hardlinks ()

    -
    gboolean
    +
    gboolean
     ostree_repo_scan_hardlinks (OstreeRepo *self,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GCancellable *cancellable, + GError **error);

    This function is deprecated in favor of using ostree_repo_devino_cache_new(), which allows a precise mapping to be built up between hardlink checkout files and their checksums between ostree_repo_checkout_at() and @@ -3116,11 +3383,11 @@ before you call

    ostree_repo_prepare_transaction ()

    -
    gboolean
    +
    gboolean
     ostree_repo_prepare_transaction (OstreeRepo *self,
    -                                 gboolean *out_transaction_resume,
    -                                 GCancellable *cancellable,
    -                                 GError **error);
    + gboolean *out_transaction_resume, + GCancellable *cancellable, + GError **error);

    Starts or resumes a transaction. In order to write to a repo, you need to start a transaction. You can complete the transaction with ostree_repo_commit_transaction(), or abort the transaction with @@ -3173,11 +3440,11 @@ pulls use per-commit state/.commitpartial files.

    ostree_repo_commit_transaction ()

    -
    gboolean
    +
    gboolean
     ostree_repo_commit_transaction (OstreeRepo *self,
                                     OstreeRepoTransactionStats *out_stats,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Complete the transaction. Any refs set with ostree_repo_transaction_set_ref() or ostree_repo_transaction_set_refspec() will be written out.

    @@ -3223,10 +3490,10 @@ that happened during this transaction.


    ostree_repo_abort_transaction ()

    -
    gboolean
    +
    gboolean
     ostree_repo_abort_transaction (OstreeRepo *self,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + GCancellable *cancellable, + GError **error);

    Abort the active transaction; any staged objects and ref changes will be discarded. You *must* invoke this if you have chosen not to invoke ostree_repo_commit_transaction(). Calling this function when not in a @@ -3308,11 +3575,11 @@ ostree_repo_transaction_set_collection_ref const OstreeCollectionRef *ref, const char *checksum);

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

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

    The change will not be written out immediately, but when the transaction is completed with ostree_repo_commit_transaction(). If the transaction @@ -3357,13 +3624,13 @@ ostree_repo_transaction_set_ref (const char *ref, const char *checksum);

    If checksum - is not NULL, then record it as the target of ref named + is not NULL, then record it as the target of ref named ref ; if remote is provided, the ref will appear to originate from that remote.

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

    The change will be written when the transaction is completed with ostree_repo_commit_transaction(); that function takes care of writing all of @@ -3414,13 +3681,13 @@ case.


    ostree_repo_set_ref_immediate ()

    -
    gboolean
    +
    gboolean
     ostree_repo_set_ref_immediate (OstreeRepo *self,
                                    const char *remote,
                                    const char *ref,
                                    const char *checksum,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + GCancellable *cancellable, + GError **error);

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

    @@ -3451,7 +3718,7 @@ case where we're creating or overwriting an existing ref.

    - + @@ -3471,13 +3738,13 @@ case where we're creating or overwriting an existing ref.


    ostree_repo_set_alias_ref_immediate ()

    -
    gboolean
    +
    gboolean
     ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
                                          const char *remote,
                                          const char *ref,
                                          const char *target,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + GCancellable *cancellable, + GError **error);

    Like ostree_repo_set_ref_immediate(), but creates an alias.

    Parameters

    @@ -3505,7 +3772,7 @@ ostree_repo_set_alias_ref_immediate (
    - + @@ -3526,12 +3793,12 @@ ostree_repo_set_alias_ref_immediate (

    ostree_repo_set_cache_dir ()

    -
    gboolean
    +
    gboolean
     ostree_repo_set_cache_dir (OstreeRepo *self,
                                int dfd,
                                const char *path,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Set a custom location for the cache directory used for e.g. per-remote summary caches. Setting this manually is useful when doing operations on a system repo as a user because you don't have @@ -3563,12 +3830,12 @@ write permissions in the repo, where the cache is normally stored.

    - + - + @@ -3579,10 +3846,10 @@ write permissions in the repo, where the cache is normally stored.


    ostree_repo_set_collection_id ()

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

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

    @@ -3602,12 +3869,12 @@ configuration on disk using

    collection_id

    -
    + - + @@ -3615,20 +3882,20 @@ configuration on disk using

    Returns

    -

    TRUE on success, FALSE otherwise

    +

    TRUE on success, FALSE otherwise

    Since: 2018.6


    ostree_repo_set_collection_ref_immediate ()

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

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

    @@ -3653,7 +3920,7 @@ case where we're creating or overwriting an existing ref.

    - + @@ -3671,21 +3938,21 @@ case where we're creating or overwriting an existing ref.

    Returns

    -

    TRUE on success, FALSE otherwise

    +

    TRUE on success, FALSE otherwise

    Since: 2018.6


    ostree_repo_sign_delta ()

    -
    gboolean
    +
    gboolean
     ostree_repo_sign_delta (OstreeRepo *self,
    -                        const gchar *from_commit,
    -                        const gchar *to_commit,
    -                        const gchar *key_id,
    -                        const gchar *homedir,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + const gchar *from_commit, + const gchar *to_commit, + const gchar *key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

    This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta.

    @@ -3739,17 +4006,17 @@ Add a GPG signature to a static delta.


    ostree_repo_has_object ()

    -
    gboolean
    +
    gboolean
     ostree_repo_has_object (OstreeRepo *self,
                             OstreeObjectType objtype,
                             const char *checksum,
    -                        gboolean *out_have_object,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + gboolean *out_have_object, + GCancellable *cancellable, + GError **error);

    Set out_have_object - to TRUE if self + to TRUE if self contains the given object; -FALSE otherwise.

    +FALSE otherwise.

    Parameters

    a GError

    a GError

     

    checksum

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

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

    [allow-none]

    target

    The ref target to point it to, or NULL to unset.

    The ref target to point it to, or NULL to unset.

    [allow-none]

    cancellable

    a GCancellable

    a GCancellable

     

    error

    a GError

    a GError

     

    new collection ID, or NULL to unset it.

    new collection ID, or NULL to unset it.

    [nullable]

    error

    return location for a GError, or NULL

    return location for a GError, or NULL

     

    checksum

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

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

    [nullable]
    @@ -3776,7 +4043,7 @@ ostree_repo_has_object (

    out_have_object

    -
    + @@ -3794,17 +4061,17 @@ ostree_repo_has_object (

    Returns

    -

    FALSE if an unexpected error occurred, TRUE otherwise

    +

    FALSE if an unexpected error occurred, TRUE otherwise


    ostree_repo_mark_commit_partial ()

    -
    gboolean
    +
    gboolean
     ostree_repo_mark_commit_partial (OstreeRepo *self,
                                      const char *checksum,
    -                                 gboolean is_partial,
    -                                 GError **error);
    + gboolean is_partial, + GError **error);

    Commits in the "partial" state do not have all their child objects written. This occurs in various situations, such as during a pull, but also if a "subpath" pull is used, as well as "commit only" @@ -3848,13 +4115,13 @@ should use this if you are implementing a different type of transport.


    ostree_repo_mark_commit_partial_reason ()

    -
    gboolean
    +
    gboolean
     ostree_repo_mark_commit_partial_reason
                                    (OstreeRepo *self,
                                     const char *checksum,
    -                                gboolean is_partial,
    +                                gboolean is_partial,
                                     OstreeRepoCommitState in_state,
    -                                GError **error);
    + GError **error);

    Allows the setting of a reason code for a partial commit. Presently it only supports setting reason bitmask to OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL, or @@ -3904,20 +4171,20 @@ it.


    ostree_repo_write_metadata ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_metadata (OstreeRepo *self,
                                 OstreeObjectType objtype,
                                 const char *expected_checksum,
    -                            GVariant *object,
    -                            guchar **out_csum,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GVariant *object, + guchar **out_csum, + GCancellable *cancellable, + GError **error);

    Store the metadata object object . Return the checksum as out_csum .

    If expected_checksum - is not NULL, verify it against the + is not NULL, verify it against the computed checksum.

    Parameters

    @@ -3974,10 +4241,10 @@ computed checksum.

    ostree_repo_write_metadata_async (OstreeRepo *self, OstreeObjectType objtype, const char *expected_checksum, - GVariant *object, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); + GVariant *object, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

    Asynchronously store the metadata object variant . If provided, the checksum expected_checksum @@ -4034,11 +4301,11 @@ the checksum expected_checksum


    ostree_repo_write_metadata_finish ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_metadata_finish (OstreeRepo *self,
    -                                   GAsyncResult *result,
    -                                   guchar **out_csum,
    -                                   GError **error);
    + GAsyncResult *result, + guchar **out_csum, + GError **error);

    Complete a call to ostree_repo_write_metadata_async().

    Parameters

    @@ -4076,14 +4343,14 @@ ostree_repo_write_metadata_finish (

    ostree_repo_write_content ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_content (OstreeRepo *self,
                                const char *expected_checksum,
    -                           GInputStream *object_input,
    -                           guint64 length,
    -                           guchar **out_csum,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GInputStream *object_input, + guint64 length, + guchar **out_csum, + GCancellable *cancellable, + GError **error);

    Store the content object streamed as object_input , with total length length @@ -4145,12 +4412,12 @@ be returned as out_csum

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

    Create an OstreeContentWriter that allows streaming output into the repository.

    @@ -4207,7 +4474,7 @@ the repository.

    Returns

    -

    A new writer, or NULL on error.

    +

    A new writer, or NULL on error.

    [transfer full]

    Since: 2021.2

    @@ -4218,14 +4485,14 @@ the repository.

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

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

    @@ -4302,12 +4569,12 @@ this function will not check for the presence of the object beforehand.

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

    Synchronously create a symlink object.

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


    ostree_repo_write_metadata_trusted ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_metadata_trusted (OstreeRepo *self,
                                         OstreeObjectType objtype,
                                         const char *checksum,
    -                                    GVariant *variant,
    -                                    GCancellable *cancellable,
    -                                    GError **error);
    + GVariant *variant, + GCancellable *cancellable, + GError **error);

    Store the metadata object variant ; the provided checksum is @@ -4431,15 +4698,15 @@ trusted.


    ostree_repo_write_metadata_stream_trusted ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_metadata_stream_trusted
                                    (OstreeRepo *self,
                                     OstreeObjectType objtype,
                                     const char *checksum,
    -                                GInputStream *object_input,
    -                                guint64 length,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GInputStream *object_input, + guint64 length, + GCancellable *cancellable, + GError **error);

    Store the metadata object variant ; the provided checksum is @@ -4495,13 +4762,13 @@ trusted.


    ostree_repo_write_content_trusted ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_content_trusted (OstreeRepo *self,
                                        const char *checksum,
    -                                   GInputStream *object_input,
    -                                   guint64 length,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GInputStream *object_input, + guint64 length, + GCancellable *cancellable, + GError **error);

    Store the content object streamed as object_input , with total length length @@ -4560,11 +4827,11 @@ disk, for example.

    void
     ostree_repo_write_content_async (OstreeRepo *self,
                                      const char *expected_checksum,
    -                                 GInputStream *object,
    -                                 guint64 length,
    -                                 GCancellable *cancellable,
    -                                 GAsyncReadyCallback callback,
    -                                 gpointer user_data);
    + GInputStream *object, + guint64 length, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

    Asynchronously store the content object object . If provided, the checksum expected_checksum @@ -4622,11 +4889,11 @@ checksum expected_checksum


    ostree_repo_write_content_finish ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_content_finish (OstreeRepo *self,
    -                                  GAsyncResult *result,
    -                                  guchar **out_csum,
    -                                  GError **error);
    + GAsyncResult *result, + guchar **out_csum, + GError **error);

    Completes an invocation of ostree_repo_write_content_async().

    Parameters

    @@ -4644,7 +4911,7 @@ ostree_repo_write_content_finish (
    - + @@ -4654,7 +4921,7 @@ ostree_repo_write_content_finish ( - + @@ -4664,12 +4931,12 @@ ostree_repo_write_content_finish (

    ostree_repo_resolve_rev ()

    -
    gboolean
    +
    gboolean
     ostree_repo_resolve_rev (OstreeRepo *self,
                              const char *refspec,
    -                         gboolean allow_noent,
    +                         gboolean allow_noent,
                              char **out_rev,
    -                         GError **error);
    + GError **error);

    Look up the given refspec, returning the checksum it references in the parameter out_rev . Will fall back on remote directory if cannot @@ -4700,7 +4967,7 @@ find the given refspec in local.

    - @@ -4716,13 +4983,13 @@ is true and it does not exist.


    ostree_repo_resolve_rev_ext ()

    -
    gboolean
    +
    gboolean
     ostree_repo_resolve_rev_ext (OstreeRepo *self,
                                  const char *refspec,
    -                             gboolean allow_noent,
    +                             gboolean allow_noent,
                                  OstreeRepoResolveRevExtFlags flags,
                                  char **out_rev,
    -                             GError **error);
    + GError **error);

    Look up the given refspec, returning the checksum it references in the parameter out_rev . Differently from ostree_repo_resolve_rev(), @@ -4761,7 +5028,7 @@ using it has no effect.

    - @@ -4778,14 +5045,14 @@ is true and it does not exist.


    ostree_repo_list_refs ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_refs (OstreeRepo *self,
                            const char *refspec_prefix,
    -                       GHashTable **out_all_refs,
    -                       GCancellable *cancellable,
    -                       GError **error);
    + GHashTable **out_all_refs, + GCancellable *cancellable, + GError **error);

    If refspec_prefix - is NULL, list all local and remote refspecs, + is NULL, list all local and remote refspecs, with their current values in out_all_refs . Otherwise, only list refspecs which have refspec_prefix @@ -4793,7 +5060,7 @@ refspecs which have refspec_prefix

    out_all_refs will be returned as a mapping from refspecs (including the remote name) to checksums. If refspec_prefix - is non-NULL, it will be + is non-NULL, it will be removed as a prefix from the hash table keys.

    Parameters

    @@ -4836,15 +5103,15 @@ removed as a prefix from the hash table keys.


    ostree_repo_list_refs_ext ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_refs_ext (OstreeRepo *self,
                                const char *refspec_prefix,
    -                           GHashTable **out_all_refs,
    +                           GHashTable **out_all_refs,
                                OstreeRepoListRefsExtFlags flags,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    If refspec_prefix - is NULL, list all local and remote refspecs, + is NULL, list all local and remote refspecs, with their current values in out_all_refs . Otherwise, only list refspecs which have refspec_prefix @@ -4901,13 +5168,13 @@ remote name) to checksums. Differently from

    ostree_repo_list_collection_refs ()

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

    List all local, mirrored, and remote refs, mapping them to the commit checksums they currently point to in out_all_refs . If match_collection_id @@ -4915,7 +5182,7 @@ checksums they currently point to in out_all_refs

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

    If you want to exclude refs from refs/remotes, use @@ -4939,7 +5206,7 @@ collection ID is configured for the repository

    - + @@ -4967,19 +5234,19 @@ collection ID is configured for the repository

    Returns

    -

    TRUE on success, FALSE otherwise

    +

    TRUE on success, FALSE otherwise

    Since: 2018.6


    ostree_repo_remote_list_refs ()

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

    Parameters

    TRUE if repository contains object.

    TRUE if repository contains object.

    [out]

    result

    a GAsyncResult

    a GAsyncResult

     

    error

    a GError

    a GError

     

    out_rev

    A checksum,or NULL if allow_noent +

    A checksum,or NULL if allow_noent is true and it does not exist.

    [out][nullable][transfer full]

    out_rev

    A checksum,or NULL if allow_noent +

    A checksum,or NULL if allow_noent is true and it does not exist.

    [out][nullable][transfer full]

    match_collection_id

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

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

    [nullable]
    @@ -5021,25 +5288,25 @@ ostree_repo_remote_list_refs (

    ostree_repo_resolve_collection_ref ()

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

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

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

    If you want to check only local refs, not remote or mirrored ones, use the flag OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY. This is analogous to using @@ -5065,7 +5332,7 @@ flag

    allow_noent

    -
    @@ -5078,20 +5345,20 @@ doesn’t exist

    - + - + @@ -5099,19 +5366,19 @@ could not be found.

    Returns

    -

    TRUE on success, FALSE on failure

    +

    TRUE on success, FALSE on failure

    Since: 2018.6


    ostree_repo_load_variant ()

    -
    gboolean
    +
    gboolean
     ostree_repo_load_variant (OstreeRepo *self,
                               OstreeObjectType objtype,
                               const char *sha256,
    -                          GVariant **out_variant,
    -                          GError **error);
    + GVariant **out_variant, + GError **error);

    Load the metadata object sha256 of type objtype , storing the @@ -5158,12 +5425,12 @@ result in out_variant


    ostree_repo_load_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_load_commit (OstreeRepo *self,
                              const char *checksum,
    -                         GVariant **out_commit,
    +                         GVariant **out_commit,
                              OstreeRepoCommitState *out_state,
    -                         GError **error);
    + GError **error);

    A version of ostree_repo_load_variant() specialized to commits, capable of returning extended state information. Currently the only extended state is OSTREE_REPO_COMMIT_STATE_PARTIAL, which @@ -5209,19 +5476,19 @@ means that only a sub-path of the commit is available.


    ostree_repo_load_variant_if_exists ()

    -
    gboolean
    +
    gboolean
     ostree_repo_load_variant_if_exists (OstreeRepo *self,
                                         OstreeObjectType objtype,
                                         const char *sha256,
    -                                    GVariant **out_variant,
    -                                    GError **error);
    + GVariant **out_variant, + GError **error);

    Attempt to load the metadata object sha256 of type objtype if it exists, storing the result in out_variant . If it doesn't exist, out_variant - will be set to NULL and the function will still + will be set to NULL and the function will still return TRUE.

    Parameters

    @@ -5264,14 +5531,14 @@ return TRUE.


    ostree_repo_load_file ()

    -
    gboolean
    +
    gboolean
     ostree_repo_load_file (OstreeRepo *self,
                            const char *checksum,
    -                       GInputStream **out_input,
    -                       GFileInfo **out_file_info,
    -                       GVariant **out_xattrs,
    -                       GCancellable *cancellable,
    -                       GError **error);
    + GInputStream **out_input, + GFileInfo **out_file_info, + GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

    Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.

    @@ -5325,14 +5592,14 @@ content (for regular files), the metadata, and extended attributes.


    ostree_repo_load_object_stream ()

    -
    gboolean
    +
    gboolean
     ostree_repo_load_object_stream (OstreeRepo *self,
                                     OstreeObjectType objtype,
                                     const char *checksum,
    -                                GInputStream **out_input,
    -                                guint64 *out_size,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GInputStream **out_input, + guint64 *out_size, + GCancellable *cancellable, + GError **error);

    Load object as a stream; useful when copying objects between repositories.

    @@ -5387,13 +5654,13 @@ repositories.


    ostree_repo_query_object_storage_size ()

    -
    gboolean
    +
    gboolean
     ostree_repo_query_object_storage_size (OstreeRepo *self,
                                            OstreeObjectType objtype,
                                            const char *sha256,
    -                                       guint64 *out_size,
    -                                       GCancellable *cancellable,
    -                                       GError **error);
    + guint64 *out_size, + GCancellable *cancellable, + GError **error);

    Return the size in bytes of object with checksum sha256 , after any compression has been applied.

    @@ -5443,13 +5710,13 @@ compression has been applied.


    ostree_repo_import_object_from ()

    -
    gboolean
    +
    gboolean
     ostree_repo_import_object_from (OstreeRepo *self,
                                     OstreeRepo *source,
                                     OstreeObjectType objtype,
                                     const char *checksum,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Copy object named by objtype and checksum into self @@ -5505,22 +5772,22 @@ hard link operation.


    ostree_repo_import_object_from_with_trust ()

    -
    gboolean
    +
    gboolean
     ostree_repo_import_object_from_with_trust
                                    (OstreeRepo *self,
                                     OstreeRepo *source,
                                     OstreeObjectType objtype,
                                     const char *checksum,
    -                                gboolean trusted,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + gboolean trusted, + GCancellable *cancellable, + GError **error);

    Copy object named by objtype and checksum into self from the source repository source . If trusted - is TRUE and both + is TRUE and both repositories are of the same type and on the same filesystem, this will simply be a fast Unix hard link operation.

    Otherwise, a copy will be performed.

    @@ -5555,7 +5822,7 @@ this will simply be a fast Unix hard link operation.

    - + @@ -5576,14 +5843,14 @@ this will simply be a fast Unix hard link operation.


    ostree_repo_import_archive_to_mtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_import_archive_to_mtree (OstreeRepo *self,
                                          OstreeRepoImportArchiveOptions *opts,
                                          void *archive,
                                          OstreeMutableTree *mtree,
                                          OstreeRepoCommitModifier *modifier,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + GCancellable *cancellable, + GError **error);

    Import an archive file archive into the repository, and write its file structure to mtree @@ -5640,13 +5907,13 @@ file structure to mtree


    ostree_repo_export_tree_to_archive ()

    -
    gboolean
    +
    gboolean
     ostree_repo_export_tree_to_archive (OstreeRepo *self,
                                         OstreeRepoExportArchiveOptions *opts,
                                         OstreeRepoFile *root,
                                         void *archive,
    -                                    GCancellable *cancellable,
    -                                    GError **error);
    + GCancellable *cancellable, + GError **error);

    Import an archive file archive into the repository, and write its file structure to mtree @@ -5698,16 +5965,16 @@ file structure to mtree


    ostree_repo_delete_object ()

    -
    gboolean
    +
    gboolean
     ostree_repo_delete_object (OstreeRepo *self,
                                OstreeObjectType objtype,
                                const char *sha256,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Remove the object of type objtype with checksum sha256 -from the repository. An error of type G_IO_ERROR_NOT_FOUND +from the repository. An error of type G_IO_ERROR_NOT_FOUND is thrown if the object does not exist.

    Parameters

    @@ -5750,12 +6017,12 @@ is thrown if the object does not exist.


    ostree_repo_fsck_object ()

    -
    gboolean
    +
    gboolean
     ostree_repo_fsck_object (OstreeRepo *self,
                              OstreeObjectType objtype,
                              const char *sha256,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Verify consistency of the object; this performs checks only relevant to the immediate object itself, such as checksumming. This API call will not itself traverse metadata objects for example.

    @@ -5804,8 +6071,8 @@ traverse metadata objects for example.

    OstreeRepoCommitFilterResult
     (*OstreeRepoCommitFilter) (OstreeRepo *repo,
                                const char *path,
    -                           GFileInfo *file_info,
    -                           gpointer user_data);
    + GFileInfo *file_info, + gpointer user_data);

    Parameters

    TRUE to not throw an error if ref +

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

     

    out_rev

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

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

    cancellable

    a GCancellable, or NULL.

    a GCancellable, or NULL.

    [nullable]

    error

    return location for a GError, or NULL

    return location for a GError, or NULL

     

    trusted

    If TRUE, assume the source repo is valid and trusted

    If TRUE, assume the source repo is valid and trusted

     
    @@ -5849,8 +6116,8 @@ traverse metadata objects for example.

    OstreeRepoCommitModifier *
     ostree_repo_commit_modifier_new (OstreeRepoCommitModifierFlags flags,
                                      OstreeRepoCommitFilter commit_filter,
    -                                 gpointer user_data,
    -                                 GDestroyNotify destroy_notify);
    + gpointer user_data, + GDestroyNotify destroy_notify);

    Parameters

    @@ -5877,7 +6144,7 @@ ostree_repo_commit_modifier_new ( - + @@ -5892,12 +6159,12 @@ ostree_repo_commit_modifier_new (

    OstreeRepoCommitModifierXattrCallback ()

    -
    GVariant *
    +
    GVariant *
     (*OstreeRepoCommitModifierXattrCallback)
                                    (OstreeRepo *repo,
                                     const char *path,
    -                                GFileInfo *file_info,
    -                                gpointer user_data);
    + GFileInfo *file_info, + gpointer user_data);

    @@ -5906,8 +6173,8 @@ ostree_repo_commit_modifier_new (OstreeRepoCommitModifier *modifier, OstreeRepoCommitModifierXattrCallback callback, - GDestroyNotify destroy, - gpointer user_data); + GDestroyNotify destroy, + gpointer user_data);

    If set, this function should return extended attributes to use for the given path. This is useful for things like ACLs and SELinux, where a build system can label the files as it's committing to the @@ -5954,7 +6221,7 @@ ostree_repo_commit_modifier_set_sepolicy (OstreeRepoCommitModifier *modifier, OstreeSePolicy *sepolicy);

    If policy - is non-NULL, use it to look up labels to use for + is non-NULL, use it to look up labels to use for "security.selinux" extended attributes.

    Note that any policy specified this way operates in addition to any extended attributes provided via @@ -5987,13 +6254,13 @@ policy wins.


    ostree_repo_commit_modifier_set_sepolicy_from_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_commit_modifier_set_sepolicy_from_commit
                                    (OstreeRepoCommitModifier *modifier,
                                     OstreeRepo *repo,
                                     const char *rev,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    In many cases, one wants to create a "derived" commit from base commit. SELinux policy labels are part of that base commit. This API allows one to easily set up SELinux labeling from a base commit.

    @@ -6112,19 +6379,19 @@ ostree_repo_devino_cache_unref (O

    ostree_repo_devino_cache_get_type ()

    -
    GType
    +
    GType
     ostree_repo_devino_cache_get_type (void);

    ostree_repo_write_directory_to_mtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_directory_to_mtree (OstreeRepo *self,
    -                                      GFile *dir,
    +                                      GFile *dir,
                                           OstreeMutableTree *mtree,
                                           OstreeRepoCommitModifier *modifier,
    -                                      GCancellable *cancellable,
    -                                      GError **error);
    + GCancellable *cancellable, + GError **error);

    Store objects for dir and all children into the repository self , @@ -6176,14 +6443,14 @@ overlaying the resulting filesystem hierarchy into m


    ostree_repo_write_dfd_to_mtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_dfd_to_mtree (OstreeRepo *self,
                                     int dfd,
                                     const char *path,
                                     OstreeMutableTree *mtree,
                                     OstreeRepoCommitModifier *modifier,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Store as objects all contents of the directory referred to by dfd and path @@ -6242,14 +6509,14 @@ resulting filesystem hierarchy into mtree

    ostree_repo_write_archive_to_mtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_archive_to_mtree (OstreeRepo *self,
    -                                    GFile *archive,
    +                                    GFile *archive,
                                         OstreeMutableTree *mtree,
                                         OstreeRepoCommitModifier *modifier,
    -                                    gboolean autocreate_parents,
    -                                    GCancellable *cancellable,
    -                                    GError **error);
    + gboolean autocreate_parents, + GCancellable *cancellable, + GError **error);

    Import an archive file archive into the repository, and write its file structure to mtree @@ -6305,15 +6572,15 @@ file structure to mtree


    ostree_repo_write_archive_to_mtree_from_fd ()

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

    Read an archive from fd and import it into the repository, writing its file structure to mtree @@ -6369,12 +6636,12 @@ its file structure to mtree


    ostree_repo_write_mtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_mtree (OstreeRepo *self,
                              OstreeMutableTree *mtree,
    -                         GFile **out_file,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GFile **out_file, + GCancellable *cancellable, + GError **error);

    Write all metadata objects for mtree to repo; the resulting out_file @@ -6423,20 +6690,24 @@ the mtree


    ostree_repo_write_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_commit (OstreeRepo *self,
                               const char *parent,
                               const char *subject,
                               const char *body,
    -                          GVariant *metadata,
    +                          GVariant *metadata,
                               OstreeRepoFile *root,
                               char **out_commit,
    -                          GCancellable *cancellable,
    -                          GError **error);
    + GCancellable *cancellable, + GError **error);

    Write a commit metadata object, referencing root_contents_checksum and root_metadata_checksum -.

    +. +This uses the current time as the commit timestamp, but it can be +overridden with an explicit timestamp via the +standard +SOURCE_DATE_EPOCH environment flag.

    Parameters

    destroy_notify

    A GDestroyNotify

    A GDestroyNotify

     
    @@ -6453,7 +6724,7 @@ and root_metadata_checksum - + @@ -6468,7 +6739,7 @@ and root_metadata_checksum - + @@ -6498,17 +6769,17 @@ and root_metadata_checksum

    ostree_repo_write_commit_with_time ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_commit_with_time (OstreeRepo *self,
                                         const char *parent,
                                         const char *subject,
                                         const char *body,
    -                                    GVariant *metadata,
    +                                    GVariant *metadata,
                                         OstreeRepoFile *root,
    -                                    guint64 time,
    +                                    guint64 time,
                                         char **out_commit,
    -                                    GCancellable *cancellable,
    -                                    GError **error);
    + GCancellable *cancellable, + GError **error);

    Write a commit metadata object, referencing root_contents_checksum and root_metadata_checksum @@ -6529,7 +6800,7 @@ and root_metadata_checksum

    - + @@ -6544,7 +6815,7 @@ and root_metadata_checksum - + @@ -6579,17 +6850,17 @@ and root_metadata_checksum

    ostree_repo_read_commit_detached_metadata ()

    -
    gboolean
    +
    gboolean
     ostree_repo_read_commit_detached_metadata
                                    (OstreeRepo *self,
                                     const char *checksum,
    -                                GVariant **out_metadata,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GVariant **out_metadata, + GCancellable *cancellable, + GError **error);

    OSTree commits can have arbitrary metadata associated; this function retrieves them. If none exists, out_metadata will be set -to NULL.

    +to NULL.

    Parameters

    parent

    ASCII SHA256 checksum for parent, or NULL for none.

    ASCII SHA256 checksum for parent, or NULL for none.

    [allow-none]

    metadata

    GVariant of type a{sv}, or NULL for none.

    GVariant of type a{sv}, or NULL for none.

    [allow-none]

    parent

    ASCII SHA256 checksum for parent, or NULL for none.

    ASCII SHA256 checksum for parent, or NULL for none.

    [allow-none]

    metadata

    GVariant of type a{sv}, or NULL for none.

    GVariant of type a{sv}, or NULL for none.

    [allow-none]
    @@ -6611,7 +6882,7 @@ to NULL.

    - + @@ -6631,18 +6902,18 @@ to NULL.


    ostree_repo_write_commit_detached_metadata ()

    -
    gboolean
    +
    gboolean
     ostree_repo_write_commit_detached_metadata
                                    (OstreeRepo *self,
                                     const char *checksum,
    -                                GVariant *metadata,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GVariant *metadata, + GCancellable *cancellable, + GError **error);

    Replace any existing metadata associated with commit referred to by checksum with metadata . If metadata - is NULL, then existing + is NULL, then existing data will be deleted.

    Parameters

    @@ -6665,7 +6936,7 @@ data will be deleted.

    - + @@ -6724,15 +6995,15 @@ ostree_repo_checkout_at_options_set_devino

    ostree_repo_checkout_tree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_checkout_tree (OstreeRepo *self,
                                OstreeRepoCheckoutMode mode,
                                OstreeRepoCheckoutOverwriteMode overwrite_mode,
    -                           GFile *destination,
    +                           GFile *destination,
                                OstreeRepoFile *source,
    -                           GFileInfo *source_info,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GFileInfo *source_info, + GCancellable *cancellable, + GError **error);

    Check out source into destination , which must live on the @@ -6798,14 +7069,14 @@ files are checked out.


    ostree_repo_checkout_tree_at ()

    -
    gboolean
    +
    gboolean
     ostree_repo_checkout_tree_at (OstreeRepo *self,
                                   OstreeRepoCheckoutOptions *options,
                                   int destination_dfd,
                                   const char *destination_path,
                                   const char *commit,
    -                              GCancellable *cancellable,
    -                              GError **error);
    + GCancellable *cancellable, + GError **error);

    ostree_repo_checkout_tree_at is deprecated and should not be used in newly-written code.

    Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new OstreeRepoCheckoutAtOptions, @@ -6867,14 +7138,14 @@ cache.


    ostree_repo_checkout_at ()

    -
    gboolean
    +
    gboolean
     ostree_repo_checkout_at (OstreeRepo *self,
                              OstreeRepoCheckoutAtOptions *options,
                              int destination_dfd,
                              const char *destination_path,
                              const char *commit,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new OstreeRepoCheckoutAtOptions, and takes a commit checksum and optional subpath pair, rather than @@ -6936,10 +7207,10 @@ cache.


    ostree_repo_checkout_gc ()

    -
    gboolean
    +
    gboolean
     ostree_repo_checkout_gc (OstreeRepo *self,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.

    @@ -6974,13 +7245,13 @@ cache.


    ostree_repo_read_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_read_commit (OstreeRepo *self,
                              const char *ref,
    -                         GFile **out_root,
    +                         GFile **out_root,
                              char **out_commit,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Load the content for rev into out_root .

    @@ -7030,18 +7301,18 @@ ostree_repo_read_commit (

    ostree_repo_list_objects ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_objects (OstreeRepo *self,
                               OstreeRepoListObjectsFlags flags,
    -                          GHashTable **out_objects,
    -                          GCancellable *cancellable,
    -                          GError **error);
    + GHashTable **out_objects, + GCancellable *cancellable, + GError **error);

    This function synchronously enumerates all objects in the repository, returning data in out_objects . out_objects maps from keys returned by ostree_object_name_serialize() -to GVariant values of type OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE.

    +to GVariant values of type OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE.

    Parameters

    out_metadata

    Metadata associated with commit in with format "a{sv}", or NULL if none exists.

    Metadata associated with commit in with format "a{sv}", or NULL if none exists.

    [out][transfer full]

    metadata

    Metadata to associate with commit in with format "a{sv}", or NULL to delete.

    Metadata to associate with commit in with format "a{sv}", or NULL to delete.

    [allow-none]
    @@ -7081,20 +7352,20 @@ to GVariant values of type

    Returns

    -

    TRUE on success, FALSE on error, and error +

    TRUE on success, FALSE on error, and error will be set


    ostree_repo_list_commit_objects_starting_with ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_commit_objects_starting_with
                                    (OstreeRepo *self,
                                     const char *start,
    -                                GHashTable **out_commits,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GHashTable **out_commits, + GCancellable *cancellable, + GError **error);

    This function synchronously enumerates all commit objects starting with start , returning data in out_commits @@ -7138,18 +7409,18 @@ with start

    Returns

    -

    TRUE on success, FALSE on error, and error +

    TRUE on success, FALSE on error, and error will be set


    ostree_repo_list_static_delta_names ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_static_delta_names (OstreeRepo *self,
    -                                     GPtrArray **out_deltas,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + GPtrArray **out_deltas, + GCancellable *cancellable, + GError **error);

    This function synchronously enumerates all static deltas in the repository, returning its result in out_deltas .

    @@ -7189,11 +7460,11 @@ repository, returning its result in out_deltas

    ostree_repo_list_static_delta_indexes ()

    -
    gboolean
    +
    gboolean
     ostree_repo_list_static_delta_indexes (OstreeRepo *self,
    -                                       GPtrArray **out_indexes,
    -                                       GCancellable *cancellable,
    -                                       GError **error);
    + GPtrArray **out_indexes, + GCancellable *cancellable, + GError **error);

    This function synchronously enumerates all static delta indexes in the repository, returning its result in out_indexes .

    @@ -7234,18 +7505,18 @@ repository, returning its result in out_indexes

    ostree_repo_static_delta_reindex ()

    -
    gboolean
    +
    gboolean
     ostree_repo_static_delta_reindex (OstreeRepo *repo,
                                       OstreeStaticDeltaIndexFlags flags,
                                       const char *opt_to_commit,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + GCancellable *cancellable, + GError **error);

    The delta index for a particular commit lists all the existing deltas that can be used when downloading that commit. This operation regenerates these indexes, either for a particular commit (if opt_to_commit - is non-NULL), or for all commits that + is non-NULL), or for all commits that are reachable by an existing delta (if opt_to_commit - is NULL).

    + is NULL).

    This is normally called automatically when the summary is updated in ostree_repo_regenerate_summary().

    Locking: shared

    @@ -7269,7 +7540,7 @@ are reachable by an existing delta (if opt_to_commit
    - + @@ -7290,17 +7561,17 @@ are reachable by an existing delta (if opt_to_commit

    ostree_repo_static_delta_generate ()

    -
    gboolean
    +
    gboolean
     ostree_repo_static_delta_generate (OstreeRepo *self,
                                        OstreeStaticDeltaGenerateOpt opt,
                                        const char *from,
                                        const char *to,
    -                                   GVariant *metadata,
    -                                   GVariant *params,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GVariant *metadata, + GVariant *params, + GCancellable *cancellable, + GError **error);

    Generate a lookaside "static delta" from from - (NULL means + (NULL means from-empty) which can generate the objects in to . This delta is an optimization over fetching individual objects, and can be @@ -7343,7 +7614,7 @@ for input files

    - + @@ -7378,14 +7649,14 @@ for input files


    ostree_repo_static_delta_execute_offline_with_signature ()

    -
    gboolean
    +
    gboolean
     ostree_repo_static_delta_execute_offline_with_signature
                                    (OstreeRepo *self,
    -                                GFile *dir_or_file,
    +                                GFile *dir_or_file,
                                     OstreeSign *sign,
    -                                gboolean skip_validation,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + gboolean skip_validation, + GCancellable *cancellable, + GError **error);

    Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. If sign is passed, the static delta signature is verified. @@ -7420,7 +7691,7 @@ one part.

    - + @@ -7441,13 +7712,13 @@ one part.


    ostree_repo_static_delta_execute_offline ()

    -
    gboolean
    +
    gboolean
     ostree_repo_static_delta_execute_offline
                                    (OstreeRepo *self,
    -                                GFile *dir_or_file,
    -                                gboolean skip_validation,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GFile *dir_or_file, + gboolean skip_validation, + GCancellable *cancellable, + GError **error);

    Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. The directory must be named with the form "FROM-TO", where both are checksums, and it @@ -7473,7 +7744,7 @@ must contain a file named "superblock", along with at least one part.

    - + @@ -7493,13 +7764,13 @@ must contain a file named "superblock", along with at least one part.


    ostree_repo_static_delta_verify_signature ()

    -
    gboolean
    +
    gboolean
     ostree_repo_static_delta_verify_signature
                                    (OstreeRepo *self,
                                     const char *delta_id,
                                     OstreeSign *sign,
                                     char **out_success_message,
    -                                GError **error);
    + GError **error);

    Verify static delta file signature.

    Parameters

    @@ -7548,9 +7819,9 @@ signature engine provided, FALSE otherwise.


    ostree_repo_traverse_new_reachable ()

    -
    GHashTable *
    +
    GHashTable *
     ostree_repo_traverse_new_reachable (void);
    -

    This hash table is a set of GVariant which can be accessed via +

    This hash table is a set of GVariant which can be accessed via ostree_object_name_deserialize().

    Returns

    @@ -7561,11 +7832,11 @@ ostree_repo_traverse_new_reachable (

    ostree_repo_traverse_new_parents ()

    -
    GHashTable *
    +
    GHashTable *
     ostree_repo_traverse_new_parents (void);
    -

    This hash table is a mapping from GVariant which can be accessed -via ostree_object_name_deserialize() to a GVariant containing either -a similar GVariant or and array of them, listing the parents of the key.

    +

    This hash table is a mapping from GVariant which can be accessed +via ostree_object_name_deserialize() to a GVariant containing either +a similar GVariant or and array of them, listing the parents of the key.

    Returns

    A new hash table.

    @@ -7578,8 +7849,8 @@ a similar GVariant or and array of them, listing the p

    ostree_repo_traverse_parents_get_commits ()

    char **
     ostree_repo_traverse_parents_get_commits
    -                               (GHashTable *parents,
    -                                GVariant *object);
    + (GHashTable *parents, + GVariant *object);

    Gets all the commits that a certain object belongs to, as recorded by a parents table gotten from ostree_repo_traverse_commit_union_with_parents.

    @@ -7593,13 +7864,13 @@ the commits the key belongs to.


    ostree_repo_traverse_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_traverse_commit (OstreeRepo *repo,
                                  const char *commit_checksum,
                                  int maxdepth,
    -                             GHashTable **out_reachable,
    -                             GCancellable *cancellable,
    -                             GError **error);
    + GHashTable **out_reachable, + GCancellable *cancellable, + GError **error);

    Create a new set out_reachable containing all objects reachable from commit_checksum @@ -7651,13 +7922,13 @@ from commit_checksum


    ostree_repo_traverse_commit_union ()

    -
    gboolean
    +
    gboolean
     ostree_repo_traverse_commit_union (OstreeRepo *repo,
                                        const char *commit_checksum,
                                        int maxdepth,
    -                                   GHashTable *inout_reachable,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GHashTable *inout_reachable, + GCancellable *cancellable, + GError **error);

    Update the set inout_reachable containing all objects reachable from commit_checksum @@ -7710,15 +7981,15 @@ from commit_checksum


    ostree_repo_traverse_commit_union_with_parents ()

    -
    gboolean
    +
    gboolean
     ostree_repo_traverse_commit_union_with_parents
                                    (OstreeRepo *repo,
                                     const char *commit_checksum,
                                     int maxdepth,
    -                                GHashTable *inout_reachable,
    -                                GHashTable *inout_parents,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GHashTable *inout_reachable, + GHashTable *inout_parents, + GCancellable *cancellable, + GError **error);

    Update the set inout_reachable containing all objects reachable from commit_checksum @@ -7878,13 +8149,13 @@ called if

    ostree_repo_commit_traverse_iter_init_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_commit_traverse_iter_init_commit
                                    (OstreeRepoCommitTraverseIter *iter,
                                     OstreeRepo *repo,
    -                                GVariant *commit,
    +                                GVariant *commit,
                                     OstreeRepoCommitTraverseFlags flags,
    -                                GError **error);
    + GError **error);

    Initialize (in place) an iterator over the root of a commit object.

    Parameters

    @@ -7927,13 +8198,13 @@ ostree_repo_commit_traverse_iter_init_commit

    ostree_repo_commit_traverse_iter_init_dirtree ()

    -
    gboolean
    +
    gboolean
     ostree_repo_commit_traverse_iter_init_dirtree
                                    (OstreeRepoCommitTraverseIter *iter,
                                     OstreeRepo *repo,
    -                                GVariant *dirtree,
    +                                GVariant *dirtree,
                                     OstreeRepoCommitTraverseFlags flags,
    -                                GError **error);
    + GError **error);

    Initialize (in place) an iterator over a directory tree.

    Parameters

    @@ -7978,8 +8249,8 @@ ostree_repo_commit_traverse_iter_init_dirtree

    ostree_repo_commit_traverse_iter_next ()

    OstreeRepoCommitIterResult
     ostree_repo_commit_traverse_iter_next (OstreeRepoCommitTraverseIter *iter,
    -                                       GCancellable *cancellable,
    -                                       GError **error);
    + GCancellable *cancellable, + GError **error);

    Step the interator to the next item. Files will be returned first, then subdirectories. Call this in a loop; upon encountering OSTREE_REPO_COMMIT_ITER_RESULT_END, there will be no more files or @@ -8023,15 +8294,15 @@ program error to call any further API on iter


    ostree_repo_prune ()

    -
    gboolean
    +
    gboolean
     ostree_repo_prune (OstreeRepo *self,
                        OstreeRepoPruneFlags flags,
    -                   gint depth,
    -                   gint *out_objects_total,
    -                   gint *out_objects_pruned,
    -                   guint64 *out_pruned_object_size_total,
    -                   GCancellable *cancellable,
    -                   GError **error);
    + gint depth, + gint *out_objects_total, + gint *out_objects_pruned, + guint64 *out_pruned_object_size_total, + GCancellable *cancellable, + GError **error);

    Delete content from the repository. By default, this function will only delete "orphaned" objects not referred to by any commit. This can happen during a local commit operation, when we have written @@ -8101,11 +8372,11 @@ deleting them.


    ostree_repo_prune_static_deltas ()

    -
    gboolean
    +
    gboolean
     ostree_repo_prune_static_deltas (OstreeRepo *self,
                                      const char *commit,
    -                                 GCancellable *cancellable,
    -                                 GError **error);
    + GCancellable *cancellable, + GError **error);

    Prune static deltas, if COMMIT is specified then delete static delta files only targeting that commit; otherwise any static delta of non existing commits are deleted.

    @@ -8126,7 +8397,7 @@ deleted.

    - @@ -8147,12 +8418,12 @@ non existing commit.


    ostree_repo_traverse_reachable_refs ()

    -
    gboolean
    +
    gboolean
     ostree_repo_traverse_reachable_refs (OstreeRepo *self,
    -                                     guint depth,
    -                                     GHashTable *reachable,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + guint depth, + GHashTable *reachable, + GCancellable *cancellable, + GError **error);

    Add all commit objects directly reachable via a ref to reachable .

    Locking: shared

    @@ -8198,14 +8469,14 @@ ostree_repo_traverse_reachable_refs (

    ostree_repo_prune_from_reachable ()

    -
    gboolean
    +
    gboolean
     ostree_repo_prune_from_reachable (OstreeRepo *self,
                                       OstreeRepoPruneOptions *options,
    -                                  gint *out_objects_total,
    -                                  gint *out_objects_pruned,
    -                                  guint64 *out_pruned_object_size_total,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + gint *out_objects_total, + gint *out_objects_pruned, + guint64 *out_pruned_object_size_total, + GCancellable *cancellable, + GError **error);

    Delete content from the repository. This function is the "backend" half of the higher level ostree_repo_prune(). To use this function, you determine the root set yourself, and this function finds all other @@ -8268,14 +8539,14 @@ statistics on objects that would be deleted, without actually deleting them.


    ostree_repo_pull ()

    -
    gboolean
    +
    gboolean
     ostree_repo_pull (OstreeRepo *self,
                       const char *remote_name,
                       char **refs_to_fetch,
                       OstreeRepoPullFlags flags,
                       OstreeAsyncProgress *progress,
    -                  GCancellable *cancellable,
    -                  GError **error);
    + GCancellable *cancellable, + GError **error);

    Connect to the remote repository, fetching the specified set of refs refs_to_fetch . For each ref that is changed, download the @@ -8285,7 +8556,7 @@ on disk in self

    If flags contains OSTREE_REPO_PULL_FLAGS_MIRROR, and the refs_to_fetch - is NULL, and the remote repository contains a + is NULL, and the remote repository contains a summary file, then all refs will be fetched.

    If flags contains OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY, then only the @@ -8293,7 +8564,7 @@ metadata for the commits in refs_to_fetch

    Warning: This API will iterate the thread default main context, which is a bug, but kept for compatibility reasons. If you want to -avoid this, use g_main_context_push_thread_default() to push a new +avoid this, use g_main_context_push_thread_default() to push a new one around this call.

    Parameters

    @@ -8316,7 +8587,7 @@ one around this call.

    - + @@ -8346,15 +8617,15 @@ one around this call.


    ostree_repo_pull_one_dir ()

    -
    gboolean
    +
    gboolean
     ostree_repo_pull_one_dir (OstreeRepo *self,
                               const char *remote_name,
                               const char *dir_to_pull,
                               char **refs_to_fetch,
                               OstreeRepoPullFlags flags,
                               OstreeAsyncProgress *progress,
    -                          GCancellable *cancellable,
    -                          GError **error);
    + GCancellable *cancellable, + GError **error);

    This is similar to ostree_repo_pull(), but only fetches a single subpath.

    @@ -8383,7 +8654,7 @@ subpath.

    - + @@ -8413,13 +8684,13 @@ subpath.


    ostree_repo_pull_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_repo_pull_with_options (OstreeRepo *self,
                                    const char *remote_name_or_baseurl,
    -                               GVariant *options,
    +                               GVariant *options,
                                    OstreeAsyncProgress *progress,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + GCancellable *cancellable, + GError **error);

    Like ostree_repo_pull(), but supports an extensible set of flags. The following are currently defined:

      @@ -8511,7 +8782,7 @@ will be verified with the keyring of the remote being pulled from.

      void
       ostree_repo_pull_default_console_progress_changed
                                      (OstreeAsyncProgress *progress,
      -                                gpointer user_data);
      + gpointer user_data);

      Convenient "changed" callback for use with ostree_async_progress_new_and_connect() when pulling from a remote repository.

      @@ -8550,13 +8821,13 @@ and user_data

      ostree_repo_sign_commit ()

      -
      gboolean
      +
      gboolean
       ostree_repo_sign_commit (OstreeRepo *self,
      -                         const gchar *commit_checksum,
      -                         const gchar *key_id,
      -                         const gchar *homedir,
      -                         GCancellable *cancellable,
      -                         GError **error);
      + const gchar *commit_checksum, + const gchar *key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

      Add a GPG signature to a commit.

      Parameters

      @@ -8584,17 +8855,17 @@ ostree_repo_sign_commit (

      homedir

      -
    + - + - + @@ -8604,12 +8875,12 @@ ostree_repo_sign_commit (

    ostree_repo_append_gpg_signature ()

    -
    gboolean
    +
    gboolean
     ostree_repo_append_gpg_signature (OstreeRepo *self,
    -                                  const gchar *commit_checksum,
    -                                  GBytes *signature_bytes,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + const gchar *commit_checksum, + GBytes *signature_bytes, + GCancellable *cancellable, + GError **error);

    Append a GPG signature to a commit.

    Parameters

    @@ -8637,12 +8908,12 @@ ostree_repo_append_gpg_signature (
    - + - + @@ -8652,12 +8923,12 @@ ostree_repo_append_gpg_signature (

    ostree_repo_add_gpg_signature_summary ()

    -
    gboolean
    +
    gboolean
     ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
    -                                       const gchar **key_id,
    -                                       const gchar *homedir,
    -                                       GCancellable *cancellable,
    -                                       GError **error);
    + const gchar **key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

    Add a GPG signature to a summary file.

    Parameters

    @@ -8680,17 +8951,17 @@ ostree_repo_add_gpg_signature_summary (

    homedir

    -
    + - + - + @@ -8700,15 +8971,15 @@ ostree_repo_add_gpg_signature_summary (

    ostree_repo_gpg_sign_data ()

    -
    gboolean
    +
    gboolean
     ostree_repo_gpg_sign_data (OstreeRepo *self,
    -                           GBytes *data,
    -                           GBytes *old_signatures,
    -                           const gchar **key_id,
    -                           const gchar *homedir,
    -                           GBytes **out_signatures,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GBytes *data, + GBytes *old_signatures, + const gchar **key_id, + const gchar *homedir, + GBytes **out_signatures, + GCancellable *cancellable, + GError **error);

    Sign the given data with the specified keys in key_id . Similar to @@ -8731,12 +9002,12 @@ data.

    - + - + @@ -8746,7 +9017,7 @@ data.

    - + @@ -8756,12 +9027,12 @@ data.

    - + - + @@ -8783,20 +9054,20 @@ will contain the reason).

    ostree_repo_gpg_verify_data ()

    OstreeGpgVerifyResult *
     ostree_repo_gpg_verify_data (OstreeRepo *self,
    -                             const gchar *remote_name,
    -                             GBytes *data,
    -                             GBytes *signatures,
    -                             GFile *keyringdir,
    -                             GFile *extra_keyring,
    -                             GCancellable *cancellable,
    -                             GError **error);
    + const gchar *remote_name, + GBytes *data, + GBytes *signatures, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

    Verify signatures for data using GPG keys in the keyring for remote_name , and return an OstreeGpgVerifyResult.

    The remote_name - parameter can be NULL. In that case it will do + parameter can be NULL. In that case it will do the verifications using GPG keys in the keyrings of all remotes.

    Parameters

    @@ -8819,12 +9090,12 @@ the verifications using GPG keys in the keyrings of all remotes.

    - + - + @@ -8852,7 +9123,7 @@ the verifications using GPG keys in the keyrings of all remotes.

    Returns

    -

    an OstreeGpgVerifyResult, or NULL on error.

    +

    an OstreeGpgVerifyResult, or NULL on error.

    [transfer full]

    Since: 2016.6

    @@ -8860,13 +9131,13 @@ the verifications using GPG keys in the keyrings of all remotes.


    ostree_repo_verify_commit ()

    -
    gboolean
    +
    gboolean
     ostree_repo_verify_commit (OstreeRepo *self,
    -                           const gchar *commit_checksum,
    -                           GFile *keyringdir,
    -                           GFile *extra_keyring,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + const gchar *commit_checksum, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

    Check for a valid GPG signature on commit named by the ASCII checksum commit_checksum .

    @@ -8914,7 +9185,7 @@ checksum commit_checksum

    Returns

    -

    TRUE if there was a GPG signature from a trusted keyring, otherwise FALSE

    +

    TRUE if there was a GPG signature from a trusted keyring, otherwise FALSE


    @@ -8922,11 +9193,11 @@ checksum commit_checksum

    ostree_repo_verify_commit_ext ()

    OstreeGpgVerifyResult *
     ostree_repo_verify_commit_ext (OstreeRepo *self,
    -                               const gchar *commit_checksum,
    -                               GFile *keyringdir,
    -                               GFile *extra_keyring,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + const gchar *commit_checksum, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

    Read GPG signature(s) on the commit named by the ASCII checksum commit_checksum and return detailed results.

    @@ -8974,7 +9245,7 @@ ostree_repo_verify_commit_ext (

    Returns

    -

    an OstreeGpgVerifyResult, or NULL on error.

    +

    an OstreeGpgVerifyResult, or NULL on error.

    [transfer full]

    @@ -8983,10 +9254,10 @@ ostree_repo_verify_commit_ext (

    ostree_repo_verify_commit_for_remote ()

    OstreeGpgVerifyResult *
     ostree_repo_verify_commit_for_remote (OstreeRepo *self,
    -                                      const gchar *commit_checksum,
    -                                      const gchar *remote_name,
    -                                      GCancellable *cancellable,
    -                                      GError **error);
    + const gchar *commit_checksum, + const gchar *remote_name, + GCancellable *cancellable, + GError **error);

    Read GPG signature(s) on the commit named by the ASCII checksum commit_checksum and return detailed results, based on the keyring @@ -9031,7 +9302,7 @@ configured for remote

    Returns

    -

    an OstreeGpgVerifyResult, or NULL on error.

    +

    an OstreeGpgVerifyResult, or NULL on error.

    [transfer full]

    Since: 2016.14

    @@ -9042,10 +9313,10 @@ configured for remote
    OstreeGpgVerifyResult *
     ostree_repo_verify_summary (OstreeRepo *self,
                                 const char *remote_name,
    -                            GBytes *summary,
    -                            GBytes *signatures,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GBytes *summary, + GBytes *signatures, + GCancellable *cancellable, + GError **error);

    Verify signatures for summary data using GPG keys in the keyring for @@ -9072,12 +9343,12 @@ ostree_repo_verify_summary (

    summary

    -
    + - + @@ -9095,18 +9366,18 @@ ostree_repo_verify_summary (

    Returns

    -

    an OstreeGpgVerifyResult, or NULL on error.

    +

    an OstreeGpgVerifyResult, or NULL on error.

    [transfer full]


    ostree_repo_regenerate_summary ()

    -
    gboolean
    +
    gboolean
     ostree_repo_regenerate_summary (OstreeRepo *self,
    -                                GVariant *additional_metadata,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GVariant *additional_metadata, + GCancellable *cancellable, + GError **error);

    An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata.

    If the timetable for making commits and updating the summary file is fairly @@ -9138,7 +9409,7 @@ lexicographic order.

    - + @@ -9219,6 +9490,46 @@ possible modes.


    +

    enum OstreeRepoLockType

    +

    Flags controlling repository locking.

    +
    +

    Members

    +

    opt_to_commit

    ASCII SHA256 checksum of target commit, or NULL to index all targets

    ASCII SHA256 checksum of target commit, or NULL to index all targets

     

    from

    ASCII SHA256 checksum of origin, or NULL.

    ASCII SHA256 checksum of origin, or NULL.

    [nullable]

    skip_validation

    If TRUE, assume data integrity

    If TRUE, assume data integrity

     

    skip_validation

    If TRUE, assume data integrity

    If TRUE, assume data integrity

     

    commit

    ASCII SHA256 checksum for commit, or NULL for each +

    ASCII SHA256 checksum for commit, or NULL for each non existing commit.

    [allow-none]

    refs_to_fetch

    Optional list of refs; if NULL, fetch all configured refs.

    Optional list of refs; if NULL, fetch all configured refs.

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

    refs_to_fetch

    Optional list of refs; if NULL, fetch all configured refs.

    Optional list of refs; if NULL, fetch all configured refs.

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

    GPG home directory, or NULL.

    GPG home directory, or NULL.

    [allow-none]

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    GPG home directory, or NULL.

    GPG home directory, or NULL.

    [allow-none]

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    data

    Data as a GBytes

    Data as a GBytes

     

    old_signatures

    Existing signatures to append to (or NULL)

    Existing signatures to append to (or NULL)

     

    homedir

    GPG home directory, or NULL.

    GPG home directory, or NULL.

    [allow-none]

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    data

    Data as a GBytes

    Data as a GBytes

     

    signatures

    Signatures as a GBytes

    Signatures as a GBytes

     

    Summary data as a GBytes

    Summary data as a GBytes

     

    signatures

    Summary signatures as a GBytes

    Summary signatures as a GBytes

     

    additional_metadata

    A GVariant of type a{sv}, or NULL.

    A GVariant of type a{sv}, or NULL.

    [allow-none]
    +++++ + + + + + + + + + + + + +

    OSTREE_REPO_LOCK_SHARED

    +

    A "read only" lock; multiple readers are allowed.

    +
     

    OSTREE_REPO_LOCK_EXCLUSIVE

    +

    A writable lock at most one writer can be active, and zero readers.

    +
     
    +
    +

    Since: 2021.3

    +
    +
    +
    +

    OstreeRepoAutoLock

    +
    typedef struct OstreeRepoAutoLock OstreeRepoAutoLock;
    +
    +

    An opaque type for use with ostree_repo_auto_lock_push().

    +

    Since: 2021.3

    +
    +
    +

    enum OstreeRepoRemoteChange

    Members

    @@ -9297,57 +9608,57 @@ interesting for reporting purposes.

    -

    guint metadata_objects_total;

    +

    guint metadata_objects_total;

    The total number of metadata objects in the repository after this transaction has completed.

      -

    guint metadata_objects_written;

    +

    guint metadata_objects_written;

    The number of metadata objects that were written to the repository in this transaction.

      -

    guint content_objects_total;

    +

    guint content_objects_total;

    The total number of content objects in the repository after this transaction has completed.

      -

    guint content_objects_written;

    +

    guint content_objects_written;

    The number of content objects that were written to the repository in this transaction.

      -

    guint64 content_bytes_written;

    +

    guint64 content_bytes_written;

    The amount of data added to the repository, in bytes, counting only content objects.

      -

    guint devino_cache_hits;

    +

    guint devino_cache_hits;

        -

    guint padding1;

    +

    guint padding1;

    reserved

      -

    guint64 padding2;

    +

    guint64 padding2;

    reserved

      -

    guint64 padding3;

    +

    guint64 padding3;

    reserved

      -

    guint64 padding4;

    +

    guint64 padding4;

    reserved

      @@ -9732,7 +10043,7 @@ supercedes previous separate enumeration usage in

    OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE

    #define OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE (G_VARIANT_TYPE ("(bas)")
     
    -

    b - TRUE if object is available "loose" +

    b - TRUE if object is available "loose" as - List of pack file checksums in which this object appears


    diff --git a/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html b/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html index ea4de364..399390e6 100644 --- a/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html +++ b/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html @@ -81,7 +81,7 @@ -GVariant * +GVariant * ostree_async_progress_get_variant () @@ -89,7 +89,7 @@ -guint +guint ostree_async_progress_get_uint () @@ -97,7 +97,7 @@ -guint64 +guint64 ostree_async_progress_get_uint64 () @@ -179,7 +179,7 @@ handles thread safety, ensuring that the progress change notification occurs in the thread-default context of the calling operation.

    The ostree_async_progress_get_status() and ostree_async_progress_set_status() -methods get and set a well-known status key of type G_VARIANT_TYPE_STRING. +methods get and set a well-known status key of type G_VARIANT_TYPE_STRING. This key may be accessed using the other OstreeAsyncProgress methods, but it must always have the correct type.

    @@ -200,7 +200,7 @@ ostree_async_progress_new (void

    ostree_async_progress_new_and_connect ()

    OstreeAsyncProgress *
     ostree_async_progress_new_and_connect (void (*changed) (OstreeAsyncProgress *self, gpointer user_data),
    -                                       gpointer user_data);
    + gpointer user_data);

    @@ -212,7 +212,7 @@ ostree_async_progress_copy_state (dest , without invoking the callback. -This is used for proxying progress objects across different GMainContexts.

    +This is used for proxying progress objects across different
    GMainContexts.

    Parameters

    @@ -243,7 +243,7 @@ This is used for proxying progress objects across different G
    char *
     ostree_async_progress_get_status (OstreeAsyncProgress *self);

    Get the human-readable status string from the OstreeAsyncProgress. This -operation is thread-safe. The retuned value may be NULL if no status is +operation is thread-safe. The retuned value may be NULL if no status is set.

    This is a convenience function to get the well-known status key.

    @@ -263,7 +263,7 @@ set.

    Returns

    -

    the current status, or NULL if none is set.

    +

    the current status, or NULL if none is set.

    [transfer full][nullable]

    Since: 2017.6

    @@ -276,9 +276,9 @@ ostree_async_progress_get (...);

    Get the values corresponding to zero or more keys from the OstreeAsyncProgress. Each key is specified in @... as the key name, followed -by a GVariant format string, followed by the necessary arguments for that -format string, just as for g_variant_get(). After those arguments is the -next key name. The varargs list must be NULL-terminated.

    +by a GVariant format string, followed by the necessary arguments for that +format string, just as for g_variant_get(). After those arguments is the +next key name. The varargs list must be NULL-terminated.

    Each format string must make deep copies of its value, as the values stored in the OstreeAsyncProgress may be freed from another thread after this function returns.

    @@ -331,7 +331,7 @@ function returns.

    - + @@ -342,10 +342,10 @@ function returns.


    ostree_async_progress_get_variant ()

    -
    GVariant *
    +
    GVariant *
     ostree_async_progress_get_variant (OstreeAsyncProgress *self,
                                        const char *key);
    -

    Look up a key in the OstreeAsyncProgress and return the GVariant associated +

    Look up a key in the OstreeAsyncProgress and return the GVariant associated with it. The lookup is thread-safe.

    Parameters

    @@ -372,7 +372,7 @@ with it. The lookup is thread-safe.

    Returns

    value for the given key -, or NULL if +, or NULL if it was not set.

    [transfer full][nullable]

    @@ -381,14 +381,14 @@ it was not set.


    ostree_async_progress_get_uint ()

    -
    guint
    +
    guint
     ostree_async_progress_get_uint (OstreeAsyncProgress *self,
                                     const char *key);

    ostree_async_progress_get_uint64 ()

    -
    guint64
    +
    guint64
     ostree_async_progress_get_uint64 (OstreeAsyncProgress *self,
                                       const char *key);
    @@ -399,7 +399,7 @@ ostree_async_progress_get_uint64 (OstreeAsyncProgress *self, const char *status);

    Set the human-readable status string for the OstreeAsyncProgress. This -operation is thread-safe. NULL may be passed to clear the status.

    +operation is thread-safe. NULL may be passed to clear the status.

    This is a convenience function to set the well-known status key.

    Parameters

    @@ -417,7 +417,7 @@ operation is thread-safe. NULL may be passed to cle
    - + @@ -432,11 +432,11 @@ operation is thread-safe. NULL may be passed to cle ostree_async_progress_set (OstreeAsyncProgress *self, ...);

    Set the values for zero or more keys in the OstreeAsyncProgress. Each key is -specified in @... as the key name, followed by a GVariant format string, +specified in @... as the key name, followed by a GVariant format string, followed by the necessary arguments for that format string, just as for -g_variant_new(). After those arguments is the next key name. The varargs list -must be NULL-terminated.

    -

    g_variant_ref_sink() will be called as appropriate on the GVariant +g_variant_new(). After those arguments is the next key name. The varargs list +must be NULL-terminated.

    +

    g_variant_ref_sink() will be called as appropriate on the GVariant parameters, so they may be floating.

    This operation is thread-safe, and all the keys are set atomically.

    @@ -483,7 +483,7 @@ parameters, so they may be floating.

    - + @@ -497,13 +497,13 @@ parameters, so they may be floating.

    void
     ostree_async_progress_set_variant (OstreeAsyncProgress *self,
                                        const char *key,
    -                                   GVariant *value);
    + GVariant *value);

    Assign a new value to the given key , replacing any existing value. The operation is thread-safe. value may be a floating reference; -g_variant_ref_sink() will be called on it.

    +g_variant_ref_sink() will be called on it.

    Any watchers of the OstreeAsyncProgress will be notified of the change if value differs from the existing value for key @@ -544,7 +544,7 @@ operation is thread-safe. value

    void
     ostree_async_progress_set_uint (OstreeAsyncProgress *self,
                                     const char *key,
    -                                guint value);
    + guint value);
    @@ -552,7 +552,7 @@ ostree_async_progress_set_uint (void ostree_async_progress_set_uint64 (OstreeAsyncProgress *self, const char *key, - guint64 value); + guint64 value);

    diff --git a/apidoc/html/ostree-Root-partition-mount-point.html b/apidoc/html/ostree-Root-partition-mount-point.html index 4bbdee60..a16d6819 100644 --- a/apidoc/html/ostree-Root-partition-mount-point.html +++ b/apidoc/html/ostree-Root-partition-mount-point.html @@ -57,7 +57,7 @@
    - @@ -495,9 +495,9 @@ ostree_sysroot_new_default (void<

    ostree_sysroot_initialize ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_initialize (OstreeSysroot *self,
    -                           GError **error);
    + GError **error);

    Subset of ostree_sysroot_load(); performs basic initialization. Notably, one can invoke ostree_sysroot_get_fd() after calling this function.

    It is not necessary to call this function if ostree_sysroot_load() is @@ -522,7 +522,7 @@ invoked.


    ostree_sysroot_get_path ()

    -
    GFile *
    +
    GFile *
     ostree_sysroot_get_path (OstreeSysroot *self);

    Parameters

    @@ -548,10 +548,10 @@ ostree_sysroot_get_path (

    ostree_sysroot_load ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_load (OstreeSysroot *self,
    -                     GCancellable *cancellable,
    -                     GError **error);
    + GCancellable *cancellable, + GError **error);

    Load deployment list, bootversion, and subbootversion from the rootfs self .

    @@ -586,11 +586,11 @@ rootfs self

    ostree_sysroot_load_if_changed ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_load_if_changed (OstreeSysroot *self,
    -                                gboolean *out_changed,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + gboolean *out_changed, + GCancellable *cancellable, + GError **error);

    Parameters

    ...

    key name, format string, GVariant return locations, …, followed by NULL

    key name, format string, GVariant return locations, …, followed by NULL

     

    status

    new status string, or NULL to clear the status.

    new status string, or NULL to clear the status.

    [nullable]

    ...

    key name, format string, GVariant parameters, …, followed by NULL

    key name, format string, GVariant parameters, …, followed by NULL

     
    -gboolean +gboolean ostree_sysroot_initialize () @@ -65,7 +65,7 @@
    -GFile * +GFile * ostree_sysroot_get_path () @@ -73,7 +73,7 @@
    -gboolean +gboolean ostree_sysroot_load () @@ -81,7 +81,7 @@
    -gboolean +gboolean ostree_sysroot_load_if_changed () @@ -89,7 +89,7 @@
    -gboolean +gboolean ostree_sysroot_lock () @@ -97,7 +97,7 @@
    -gboolean +gboolean ostree_sysroot_try_lock () @@ -113,7 +113,7 @@
    -gboolean +gboolean ostree_sysroot_lock_finish () @@ -145,7 +145,7 @@
    -gboolean +gboolean ostree_sysroot_is_booted () @@ -161,7 +161,7 @@
    -gboolean +gboolean ostree_sysroot_ensure_initialized () @@ -185,7 +185,7 @@
    -GPtrArray * +GPtrArray * ostree_sysroot_get_deployments () @@ -209,7 +209,7 @@
    -GFile * +GFile * ostree_sysroot_get_deployment_directory () @@ -225,7 +225,7 @@
    -GFile * +GFile * ostree_sysroot_get_deployment_origin_path () @@ -233,7 +233,7 @@
    -gboolean +gboolean ostree_sysroot_cleanup () @@ -241,7 +241,7 @@
    -gboolean +gboolean ostree_sysroot_prepare_cleanup () @@ -249,7 +249,7 @@
    -gboolean +gboolean ostree_sysroot_cleanup_prune_repo () @@ -265,7 +265,7 @@
    -gboolean +gboolean ostree_sysroot_get_repo () @@ -281,7 +281,7 @@
    -gboolean +gboolean ostree_sysroot_init_osname () @@ -289,7 +289,7 @@
    -gboolean +gboolean ostree_sysroot_deployment_set_kargs () @@ -297,7 +297,7 @@
    -gboolean +gboolean ostree_sysroot_deployment_set_mutable () @@ -305,7 +305,7 @@
    -gboolean +gboolean ostree_sysroot_deployment_unlock () @@ -313,7 +313,7 @@
    -gboolean +gboolean ostree_sysroot_deployment_set_pinned () @@ -321,7 +321,7 @@
    -gboolean +gboolean ostree_sysroot_write_deployments () @@ -329,7 +329,7 @@
    -gboolean +gboolean ostree_sysroot_write_deployments_with_options () @@ -337,7 +337,7 @@
    -gboolean +gboolean ostree_sysroot_write_origin_file () @@ -345,7 +345,7 @@
    -gboolean +gboolean ostree_sysroot_stage_tree () @@ -353,7 +353,7 @@
    -gboolean +gboolean ostree_sysroot_stage_tree_with_options () @@ -361,7 +361,7 @@
    -gboolean +gboolean ostree_sysroot_stage_overlay_initrd () @@ -369,7 +369,7 @@
    -gboolean +gboolean ostree_sysroot_deploy_tree () @@ -377,7 +377,7 @@
    -gboolean +gboolean ostree_sysroot_deploy_tree_with_options () @@ -401,7 +401,7 @@
    -GKeyFile * +GKeyFile * ostree_sysroot_origin_new_from_refspec () @@ -409,7 +409,7 @@
    -gboolean +gboolean ostree_sysroot_simple_write_deployment () @@ -452,10 +452,10 @@ perform locking externally.

    ostree_sysroot_new ()

    OstreeSysroot *
    -ostree_sysroot_new (GFile *path);
    +ostree_sysroot_new (GFile *path);

    Create a new OstreeSysroot object for the sysroot at path . If path - is NULL, + is NULL, the current visible root file system is used, equivalent to ostree_sysroot_new_default().

    @@ -468,7 +468,7 @@ the current visible root file system is used, equivalent to

    path

    Path to a system root directory, or NULL to use the +

    Path to a system root directory, or NULL to use the current visible root file system.

    [allow-none]
    @@ -628,9 +628,9 @@ ostree_sysroot_load_if_changed (

    ostree_sysroot_lock ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_lock (OstreeSysroot *self,
    -                     GError **error);
    + GError **error);

    Acquire an exclusive multi-process write lock for self . This call blocks until the lock has been acquired. The lock is not @@ -664,15 +664,15 @@ be released if self


    ostree_sysroot_try_lock ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_try_lock (OstreeSysroot *self,
    -                         gboolean *out_acquired,
    -                         GError **error);
    + gboolean *out_acquired, + GError **error);

    Try to acquire an exclusive multi-process write lock for self . If another process holds the lock, this function will return immediately, setting out_acquired - to FALSE, and returning TRUE + to FALSE, and returning TRUE (and no error).

    Release the lock with ostree_sysroot_unlock(). The lock will also be released if self @@ -710,9 +710,9 @@ be released if self

    ostree_sysroot_lock_async ()

    void
     ostree_sysroot_lock_async (OstreeSysroot *self,
    -                           GCancellable *cancellable,
    -                           GAsyncReadyCallback callback,
    -                           gpointer user_data);
    + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

    An asynchronous version of ostree_sysroot_lock().

    Parameters

    @@ -750,10 +750,10 @@ ostree_sysroot_lock_async (

    ostree_sysroot_lock_finish ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_lock_finish (OstreeSysroot *self,
    -                            GAsyncResult *result,
    -                            GError **error);
    + GAsyncResult *result, + GError **error);

    Call when ostree_sysroot_lock_async() is ready.

    Parameters

    @@ -854,7 +854,7 @@ be invoked before or after

    ostree_sysroot_is_booted ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_is_booted (OstreeSysroot *self);

    Can only be invoked after ostree_sysroot_initialize().

    @@ -874,7 +874,7 @@ ostree_sysroot_is_booted (

    Returns

    -

    TRUE iff the sysroot points to a booted deployment

    +

    TRUE iff the sysroot points to a booted deployment

    Since: 2020.1

    @@ -910,10 +910,10 @@ prior to calling this function.


    ostree_sysroot_ensure_initialized ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_ensure_initialized (OstreeSysroot *self,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GCancellable *cancellable, + GError **error);

    Ensure that self is set up as a valid rootfs, by creating /ostree/repo, among other things.

    @@ -960,7 +960,7 @@ ostree_sysroot_get_subbootversion (

    ostree_sysroot_get_deployments ()

    -
    GPtrArray *
    +
    GPtrArray *
     ostree_sysroot_get_deployments (OstreeSysroot *self);

    Parameters

    @@ -1005,7 +1005,7 @@ ostree_sysroot_get_booted_deployment (

    Returns

    -

    The currently booted deployment, or NULL if none.

    +

    The currently booted deployment, or NULL if none.

    [transfer none][nullable]

    @@ -1015,7 +1015,7 @@ ostree_sysroot_get_booted_deployment (OstreeDeployment * ostree_sysroot_require_booted_deployment (OstreeSysroot *self, - GError **error); + GError **error);

    Find the booted deployment, or return an error if not booted via OSTree.

    Parameters

    @@ -1042,7 +1042,7 @@ ostree_sysroot_require_booted_deployment

    ostree_sysroot_get_deployment_directory ()

    -
    GFile *
    +
    GFile *
     ostree_sysroot_get_deployment_directory
                                    (OstreeSysroot *self,
                                     OstreeDeployment *deployment);
    @@ -1114,9 +1114,9 @@ or concatenate it with the full

    ostree_sysroot_get_deployment_origin_path ()

    -
    GFile *
    +
    GFile *
     ostree_sysroot_get_deployment_origin_path
    -                               (GFile *deployment_path);
    + (GFile *deployment_path);

    Parameters

    @@ -1141,10 +1141,10 @@ ostree_sysroot_get_deployment_origin_path

    ostree_sysroot_cleanup ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_cleanup (OstreeSysroot *self,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + GCancellable *cancellable, + GError **error);

    Delete any state that resulted from a partially completed transaction, such as incomplete deployments.

    @@ -1178,10 +1178,10 @@ transaction, such as incomplete deployments.


    ostree_sysroot_prepare_cleanup ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_prepare_cleanup (OstreeSysroot *self,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Like ostree_sysroot_cleanup() in that it cleans up incomplete deployments and old boot versions, but does NOT prune the repository.

    @@ -1215,14 +1215,14 @@ and old boot versions, but does NOT prune the repository.


    ostree_sysroot_cleanup_prune_repo ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_cleanup_prune_repo (OstreeSysroot *sysroot,
                                        OstreeRepoPruneOptions *options,
    -                                   gint *out_objects_total,
    -                                   gint *out_objects_pruned,
    -                                   guint64 *out_pruned_object_size_total,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + gint *out_objects_total, + gint *out_objects_pruned, + guint64 *out_pruned_object_size_total, + GCancellable *cancellable, + GError **error);

    Prune the system repository. This is a thin wrapper around ostree_repo_prune_from_reachable(); the primary addition is that this function automatically gathers @@ -1314,11 +1314,11 @@ or

    ostree_sysroot_get_repo ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_get_repo (OstreeSysroot *self,
                              OstreeRepo **out_repo,
    -                         GCancellable *cancellable,
    -                         GError **error);
    + GCancellable *cancellable, + GError **error);

    Retrieve the OSTree repository in sysroot self . The repo is guaranteed to be open (see ostree_repo_open()).

    @@ -1357,7 +1357,7 @@ ostree_sysroot_get_repo (

    Returns

    -

    TRUE on success, FALSE otherwise

    +

    TRUE on success, FALSE otherwise


    @@ -1382,7 +1382,7 @@ ostree_sysroot_get_staged_deployment (

    Returns

    -

    The currently staged deployment, or NULL if none.

    +

    The currently staged deployment, or NULL if none.

    [transfer none][nullable]

    Since: 2018.5

    @@ -1390,11 +1390,11 @@ ostree_sysroot_get_staged_deployment (

    ostree_sysroot_init_osname ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_init_osname (OstreeSysroot *self,
                                 const char *osname,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GCancellable *cancellable, + GError **error);

    Initialize the directory structure for an "osname", which is a group of operating system deployments, with a shared /var. One is required for generating a deployment.

    @@ -1435,12 +1435,12 @@ is required for generating a deployment.


    ostree_sysroot_deployment_set_kargs ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deployment_set_kargs (OstreeSysroot *self,
                                          OstreeDeployment *deployment,
                                          char **new_kargs,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + GCancellable *cancellable, + GError **error);

    Entirely replace the kernel arguments of deployment with the values in new_kargs @@ -1486,12 +1486,12 @@ values in new_kargs


    ostree_sysroot_deployment_set_mutable ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deployment_set_mutable (OstreeSysroot *self,
                                            OstreeDeployment *deployment,
    -                                       gboolean is_mutable,
    -                                       GCancellable *cancellable,
    -                                       GError **error);
    + gboolean is_mutable, + GCancellable *cancellable, + GError **error);

    By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content.

    @@ -1536,12 +1536,12 @@ layering additional non-OSTree content.


    ostree_sysroot_deployment_unlock ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deployment_unlock (OstreeSysroot *self,
                                       OstreeDeployment *deployment,
                                       OstreeDeploymentUnlockedState unlocked_state,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + GCancellable *cancellable, + GError **error);

    Configure the target deployment deployment such that it is writable. There are multiple modes, essentially differing @@ -1590,11 +1590,11 @@ across reboots.


    ostree_sysroot_deployment_set_pinned ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deployment_set_pinned (OstreeSysroot *self,
                                           OstreeDeployment *deployment,
    -                                      gboolean is_pinned,
    -                                      GError **error);
    + gboolean is_pinned, + GError **error);

    By default, deployments may be subject to garbage collection. Typical uses of libostree only retain at most 2 deployments. If is_pinned is TRUE, a @@ -1641,11 +1641,11 @@ the staged deployment (as it's not in the bootloader entries).


    ostree_sysroot_write_deployments ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_write_deployments (OstreeSysroot *self,
    -                                  GPtrArray *new_deployments,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + GPtrArray *new_deployments, + GCancellable *cancellable, + GError **error);

    Older version of ostree_sysroot_write_deployments_with_options(). This version will perform post-deployment cleanup by default.

    @@ -1684,13 +1684,13 @@ version will perform post-deployment cleanup by default.


    ostree_sysroot_write_deployments_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_write_deployments_with_options
                                    (OstreeSysroot *self,
    -                                GPtrArray *new_deployments,
    +                                GPtrArray *new_deployments,
                                     OstreeSysrootWriteDeploymentsOpts *opts,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Assuming new_deployments have already been deployed in place on disk via ostree_sysroot_deploy_tree(), atomically update bootloader configuration. By @@ -1741,17 +1741,17 @@ if for example you want to control pruning of the repository.


    ostree_sysroot_write_origin_file ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_write_origin_file (OstreeSysroot *sysroot,
                                       OstreeDeployment *deployment,
    -                                  GKeyFile *new_origin,
    -                                  GCancellable *cancellable,
    -                                  GError **error);
    + GKeyFile *new_origin, + GCancellable *cancellable, + GError **error);

    Immediately replace the origin file of the referenced deployment with the contents of new_origin . If new_origin - is NULL, + is NULL, this function will write the current origin of deployment .

    @@ -1795,16 +1795,16 @@ this function will write the current origin of deplo

    ostree_sysroot_stage_tree ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_stage_tree (OstreeSysroot *self,
                                const char *osname,
                                const char *revision,
    -                           GKeyFile *origin,
    +                           GKeyFile *origin,
                                OstreeDeployment *merge_deployment,
                                char **override_kernel_argv,
                                OstreeDeployment **out_new_deployment,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Older version of ostree_sysroot_stage_tree_with_options().

    Parameters

    @@ -1842,7 +1842,7 @@ ostree_sysroot_stage_tree (

    override_kernel_argv

    -
    + @@ -1868,17 +1868,17 @@ ostree_sysroot_stage_tree (

    ostree_sysroot_stage_tree_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_stage_tree_with_options
                                    (OstreeSysroot *self,
                                     const char *osname,
                                     const char *revision,
    -                                GKeyFile *origin,
    +                                GKeyFile *origin,
                                     OstreeDeployment *merge_deployment,
                                     OstreeSysrootDeployTreeOpts *opts,
                                     OstreeDeployment **out_new_deployment,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS shutdown time.

    @@ -1943,12 +1943,12 @@ shutdown time.


    ostree_sysroot_stage_overlay_initrd ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_stage_overlay_initrd (OstreeSysroot *self,
                                          int fd,
                                          char **out_checksum,
    -                                     GCancellable *cancellable,
    -                                     GError **error);
    + GCancellable *cancellable, + GError **error);

    Stage an overlay initrd to be used in an upcoming deployment. Returns a checksum which can be passed to ostree_sysroot_deploy_tree_with_options() or ostree_sysroot_stage_tree_with_options() via the overlay_initrds array option.

    @@ -1994,16 +1994,16 @@ can be passed to

    ostree_sysroot_deploy_tree ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deploy_tree (OstreeSysroot *self,
                                 const char *osname,
                                 const char *revision,
    -                            GKeyFile *origin,
    +                            GKeyFile *origin,
                                 OstreeDeployment *provided_merge_deployment,
                                 char **override_kernel_argv,
                                 OstreeDeployment **out_new_deployment,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GCancellable *cancellable, + GError **error);

    Older version of ostree_sysroot_stage_tree_with_options().

    Parameters

    @@ -2041,7 +2041,7 @@ ostree_sysroot_deploy_tree (

    override_kernel_argv

    -
    + @@ -2067,17 +2067,17 @@ ostree_sysroot_deploy_tree (

    ostree_sysroot_deploy_tree_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_deploy_tree_with_options
                                    (OstreeSysroot *self,
                                     const char *osname,
                                     const char *revision,
    -                                GKeyFile *origin,
    +                                GKeyFile *origin,
                                     OstreeDeployment *provided_merge_deployment,
                                     OstreeSysrootDeployTreeOpts *opts,
                                     OstreeDeployment **out_new_deployment,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Check out deployment tree with revision revision , performing a 3 way merge with provided_merge_deployment @@ -2188,7 +2188,7 @@ ostree_sysroot_query_deployments_for (OstreeDeployment **out_pending, OstreeDeployment **out_rollback);

    Find the pending and rollback deployments for osname -. Pass NULL for osname +. Pass NULL for osname to use the booted deployment's osname. By default, pending deployment is the first deployment in the order that matches osname @@ -2233,7 +2233,7 @@ we're not looking at the booted deployment.


    ostree_sysroot_origin_new_from_refspec ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_sysroot_origin_new_from_refspec
                                    (OstreeSysroot *self,
                                     const char *refspec);
    @@ -2269,15 +2269,15 @@ as an origin.


    ostree_sysroot_simple_write_deployment ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_simple_write_deployment
                                    (OstreeSysroot *sysroot,
                                     const char *osname,
                                     OstreeDeployment *new_deployment,
                                     OstreeDeployment *merge_deployment,
                                     OstreeSysrootSimpleWriteDeploymentFlags flags,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Prepend new_deployment to the list of deployments, commit, and cleanup. By default, all other deployments for the given osname diff --git a/apidoc/html/ostree-SELinux-policy-management.html b/apidoc/html/ostree-SELinux-policy-management.html index a56e1f7d..d265dad4 100644 --- a/apidoc/html/ostree-SELinux-policy-management.html +++ b/apidoc/html/ostree-SELinux-policy-management.html @@ -57,7 +57,7 @@

    Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

    Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

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

    Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

    Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

    [allow-none][array zero-terminated=1][element-type utf8]
    -GFile * +GFile * ostree_sepolicy_get_path () @@ -72,7 +72,7 @@
    -gboolean +gboolean ostree_sepolicy_get_label () @@ -87,7 +87,7 @@
    -gboolean +gboolean ostree_sepolicy_restorecon () @@ -95,7 +95,7 @@
    -gboolean +gboolean ostree_sepolicy_setfscreatecon () @@ -141,9 +141,9 @@ root and perform labeling.

    ostree_sepolicy_new ()

    OstreeSePolicy *
    -ostree_sepolicy_new (GFile *path,
    -                     GCancellable *cancellable,
    -                     GError **error);
    +ostree_sepolicy_new (GFile *path, + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -183,8 +183,8 @@ ostree_sepolicy_new (GFile

    ostree_sepolicy_new_at ()

    OstreeSePolicy *
     ostree_sepolicy_new_at (int rootfs_dfd,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -223,7 +223,7 @@ ostree_sepolicy_new_at (int

    ostree_sepolicy_get_path ()

    -
    GFile *
    +
    GFile *
     ostree_sepolicy_get_path (OstreeSePolicy *self);

    Returns

    @@ -245,18 +245,18 @@ ostree_sepolicy_get_name (

    ostree_sepolicy_get_label ()

    -
    gboolean
    +
    gboolean
     ostree_sepolicy_get_label (OstreeSePolicy *self,
                                const char *relpath,
    -                           guint32 unix_mode,
    +                           guint32 unix_mode,
                                char **out_label,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Store in out_label the security context for the given relpath and mode unix_mode -. If the policy does not specify a label, NULL +. If the policy does not specify a label, NULL will be returned.

    Parameters

    @@ -316,15 +316,15 @@ ostree_sepolicy_get_csum (

    ostree_sepolicy_restorecon ()

    -
    gboolean
    +
    gboolean
     ostree_sepolicy_restorecon (OstreeSePolicy *self,
                                 const char *path,
    -                            GFileInfo *info,
    -                            GFile *target,
    +                            GFileInfo *info,
    +                            GFile *target,
                                 OstreeSePolicyRestoreconFlags flags,
                                 char **out_new_label,
    -                            GCancellable *cancellable,
    -                            GError **error);
    + GCancellable *cancellable, + GError **error);

    Reset the security context of target based on the SELinux policy.

    @@ -363,7 +363,7 @@ ostree_sepolicy_restorecon (

    out_new_label

    -
    + @@ -383,11 +383,11 @@ ostree_sepolicy_restorecon (

    ostree_sepolicy_setfscreatecon ()

    -
    gboolean
    +
    gboolean
     ostree_sepolicy_setfscreatecon (OstreeSePolicy *self,
                                     const char *path,
    -                                guint32 mode,
    -                                GError **error);
    + guint32 mode, + GError **error);

    Parameters

    New label, or NULL if unchanged.

    New label, or NULL if unchanged.

    [allow-none][out]
    diff --git a/apidoc/html/ostree-Signature-management.html b/apidoc/html/ostree-Signature-management.html index 39be5e72..d5038edb 100644 --- a/apidoc/html/ostree-Signature-management.html +++ b/apidoc/html/ostree-Signature-management.html @@ -41,7 +41,7 @@ - - - - + - + @@ -254,13 +254,13 @@ will contain the reason).


    ostree_sign_commit_verify ()

    -
    gboolean
    +
    gboolean
     ostree_sign_commit_verify (OstreeSign *self,
                                OstreeRepo *repo,
    -                           const gchar *commit_checksum,
    +                           const gchar *commit_checksum,
                                char **out_success_message,
    -                           GCancellable *cancellable,
    -                           GError **error);
    + GCancellable *cancellable, + GError **error);

    Verify if commit is signed with known key.

    Depending of the signing engine used you will need to load the public key(s) for verification with ostree_sign_set_pk, @@ -296,12 +296,12 @@ the public key(s) for verification with

    cancellable

    -
    + - + @@ -320,12 +320,12 @@ will contain the reason).


    ostree_sign_data ()

    -
    gboolean
    +
    gboolean
     ostree_sign_data (OstreeSign *self,
    -                  GBytes *data,
    -                  GBytes **signature,
    -                  GCancellable *cancellable,
    -                  GError **error);
    + GBytes *data, + GBytes **signature, + GCancellable *cancellable, + GError **error);

    Sign the given data with pre-loaded secret key.

    Depending of the signing engine used you will need to load @@ -356,12 +356,12 @@ the secret key with

    cancellable

    -
    + - + @@ -381,12 +381,12 @@ will contain the reason).


    ostree_sign_data_verify ()

    -
    gboolean
    +
    gboolean
     ostree_sign_data_verify (OstreeSign *self,
    -                         GBytes *data,
    -                         GVariant *signatures,
    +                         GBytes *data,
    +                         GVariant *signatures,
                              char **out_success_message,
    -                         GError **error);
    + GError **error);

    Verify given data against signatures with pre-loaded public keys.

    Depending of the signing engine used you will need to load the public key(s) with ostree_sign_set_pk, ostree_sign_add_pk @@ -422,7 +422,7 @@ or

    - + @@ -443,8 +443,8 @@ will contain the reason).

    ostree_sign_get_by_name ()

    OstreeSign *
    -ostree_sign_get_by_name (const gchar *name,
    -                         GError **error);
    +ostree_sign_get_by_name (const gchar *name, + GError **error);

    Create a new instance of a signing engine.

    Parameters

    @@ -462,7 +462,7 @@ ostree_sign_get_by_name (const gc
    - + @@ -470,7 +470,7 @@ ostree_sign_get_by_name (const gc

    Returns

    -

    New signing engine, or NULL if the engine is not known.

    +

    New signing engine, or NULL if the engine is not known.

    [transfer full]

    Since: 2020.2

    @@ -478,7 +478,7 @@ ostree_sign_get_by_name (const gc

    ostree_sign_get_name ()

    -
    const gchar *
    +
    const gchar *
     ostree_sign_get_name (OstreeSign *self);

    Return the pointer to the name of currently used/selected signing engine.

    @@ -508,10 +508,10 @@ in case of error (unlikely).


    ostree_sign_add_pk ()

    -
    gboolean
    +
    gboolean
     ostree_sign_add_pk (OstreeSign *self,
    -                    GVariant *public_key,
    -                    GError **error);
    + GVariant *public_key, + GError **error);

    Add the public key for verification. Could be called multiple times for adding all needed keys to be used for verification.

    The public_key @@ -537,7 +537,7 @@ adding all needed keys to be used for verification.

    - + @@ -556,9 +556,9 @@ will contain the reason).


    ostree_sign_clear_keys ()

    -
    gboolean
    +
    gboolean
     ostree_sign_clear_keys (OstreeSign *self,
    -                        GError **error);
    + GError **error);

    Clear all previously preloaded secret and public keys.

    Parameters

    @@ -576,7 +576,7 @@ ostree_sign_clear_keys (

    error

    -
    + @@ -593,10 +593,10 @@ in case of error


    ostree_sign_load_pk ()

    -
    gboolean
    +
    gboolean
     ostree_sign_load_pk (OstreeSign *self,
    -                     GVariant *options,
    -                     GError **error);
    + GVariant *options, + GError **error);

    Load public keys for verification from anywhere. It is expected that all keys would be added to already pre-loaded keys.

    The options @@ -633,7 +633,7 @@ directories if defaults are not suitable for any reason.

    - + @@ -652,7 +652,7 @@ will contain the reason).


    ostree_sign_metadata_format ()

    -
    const gchar *
    +
    const gchar *
     ostree_sign_metadata_format (OstreeSign *self);

    Return the pointer to the string with format used in (detached) metadata for current signing engine.

    @@ -683,7 +683,7 @@ in case of error (unlikely).


    ostree_sign_metadata_key ()

    -
    const gchar *
    +
    const gchar *
     ostree_sign_metadata_key (OstreeSign *self);

    Return the pointer to the name of the key used in (detached) metadata for current signing engine.

    @@ -714,10 +714,10 @@ in case of error (unlikely).


    ostree_sign_set_pk ()

    -
    gboolean
    +
    gboolean
     ostree_sign_set_pk (OstreeSign *self,
    -                    GVariant *public_key,
    -                    GError **error);
    + GVariant *public_key, + GError **error);

    Set the public key for verification. It is expected what all previously pre-loaded public keys will be dropped.

    The public_key @@ -743,7 +743,7 @@ previously pre-loaded public keys will be dropped.

    - + @@ -762,10 +762,10 @@ will contain the reason).


    ostree_sign_set_sk ()

    -
    gboolean
    +
    gboolean
     ostree_sign_set_sk (OstreeSign *self,
    -                    GVariant *secret_key,
    -                    GError **error);
    + GVariant *secret_key, + GError **error);

    Set the secret key to be used for signing data, commits and summary.

    The secret_key argument depends of the particular engine implementation.

    @@ -790,7 +790,7 @@ ostree_sign_set_sk (

    error

    -
    + @@ -809,12 +809,12 @@ will contain the reason).


    ostree_sign_summary ()

    -
    gboolean
    +
    gboolean
     ostree_sign_summary (OstreeSign *self,
                          OstreeRepo *repo,
    -                     GVariant *keys,
    -                     GCancellable *cancellable,
    -                     GError **error);
    + GVariant *keys, + GCancellable *cancellable, + GError **error);

    Add a signature to a summary file. Based on ostree_repo_add_gpg_signature_summary implementation.

    @@ -843,12 +843,12 @@ Based on ostree_repo_add_gpg_signature_summary implementation.

    - + - + diff --git a/apidoc/html/ostree-Simple-upgrade-class.html b/apidoc/html/ostree-Simple-upgrade-class.html index 8d0846d6..192160d4 100644 --- a/apidoc/html/ostree-Simple-upgrade-class.html +++ b/apidoc/html/ostree-Simple-upgrade-class.html @@ -65,7 +65,7 @@
    -GPtrArray * +GPtrArray * ostree_sign_get_all () @@ -49,7 +49,7 @@
    -gboolean +gboolean ostree_sign_commit () @@ -57,7 +57,7 @@
    -gboolean +gboolean ostree_sign_commit_verify () @@ -65,7 +65,7 @@
    -gboolean +gboolean ostree_sign_data () @@ -73,7 +73,7 @@
    -gboolean +gboolean ostree_sign_data_verify () @@ -88,7 +88,7 @@
    const gchar * +const gchar * ostree_sign_get_name () @@ -96,7 +96,7 @@
    -gboolean +gboolean ostree_sign_add_pk () @@ -104,7 +104,7 @@
    -gboolean +gboolean ostree_sign_clear_keys () @@ -112,21 +112,21 @@
    -gboolean +gboolean ostree_sign_load_pk ()
    const gchar * +const gchar * ostree_sign_metadata_format ()
    const gchar * +const gchar * ostree_sign_metadata_key () @@ -134,7 +134,7 @@
    -gboolean +gboolean ostree_sign_set_pk () @@ -142,7 +142,7 @@
    -gboolean +gboolean ostree_sign_set_sk () @@ -150,7 +150,7 @@
    -gboolean +gboolean ostree_sign_summary () @@ -181,7 +181,7 @@ for signing or verifying the commit object or summary file.

    Functions

    ostree_sign_get_all ()

    -
    GPtrArray *
    +
    GPtrArray *
     ostree_sign_get_all (void);

    Return an array with newly allocated instances of all available signing engines; they will not be initialized.

    @@ -195,12 +195,12 @@ signing engines; they will not be initialized.


    ostree_sign_commit ()

    -
    gboolean
    +
    gboolean
     ostree_sign_commit (OstreeSign *self,
                         OstreeRepo *repo,
    -                    const gchar *commit_checksum,
    -                    GCancellable *cancellable,
    -                    GError **error);
    + const gchar *commit_checksum, + GCancellable *cancellable, + GError **error);

    Add a signature to a commit.

    Depending of the signing engine used you will need to load the secret key with ostree_sign_set_sk.

    @@ -230,12 +230,12 @@ the secret key with

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     

    error

    a GError

    a GError

     

    error

    return location for a GError

    return location for a GError

     

    error

    a GError

    a GError

     

    a GError

    a GError

     

    error

    a GError

    a GError

     

    error

    a GError

    a GError

     

    a GError

    a GError

     

    cancellable

    A GCancellable

    A GCancellable

     

    error

    a GError

    a GError

     
    -GKeyFile * +GKeyFile * ostree_sysroot_upgrader_get_origin () @@ -73,7 +73,7 @@
    -GKeyFile * +GKeyFile * ostree_sysroot_upgrader_dup_origin () @@ -81,7 +81,7 @@
    -gboolean +gboolean ostree_sysroot_upgrader_set_origin () @@ -97,7 +97,7 @@
    -gboolean +gboolean ostree_sysroot_upgrader_check_timestamps () @@ -105,7 +105,7 @@
    -gboolean +gboolean ostree_sysroot_upgrader_pull () @@ -113,7 +113,7 @@
    -gboolean +gboolean ostree_sysroot_upgrader_pull_one_dir () @@ -121,7 +121,7 @@
    -gboolean +gboolean ostree_sysroot_upgrader_deploy () @@ -164,8 +164,8 @@ operations.

    ostree_sysroot_upgrader_new ()

    OstreeSysrootUpgrader *
     ostree_sysroot_upgrader_new (OstreeSysroot *sysroot,
    -                             GCancellable *cancellable,
    -                             GError **error);
    + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -205,8 +205,8 @@ ostree_sysroot_upgrader_new (OstreeSysrootUpgrader * ostree_sysroot_upgrader_new_for_os (OstreeSysroot *sysroot, const char *osname, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -253,8 +253,8 @@ ostree_sysroot_upgrader_new_for_os_with_flags (OstreeSysroot *sysroot, const char *osname, OstreeSysrootUpgraderFlags flags, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -301,7 +301,7 @@ ostree_sysroot_upgrader_new_for_os_with_flags

    ostree_sysroot_upgrader_get_origin ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_sysroot_upgrader_get_origin (OstreeSysrootUpgrader *self);

    Parameters

    @@ -320,14 +320,14 @@ ostree_sysroot_upgrader_get_origin (

    Returns

    -

    The origin file, or NULL if unknown.

    +

    The origin file, or NULL if unknown.

    [transfer none]


    ostree_sysroot_upgrader_dup_origin ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_sysroot_upgrader_dup_origin (OstreeSysrootUpgrader *self);

    Parameters

    @@ -346,18 +346,18 @@ ostree_sysroot_upgrader_dup_origin (

    Returns

    -

    A copy of the origin file, or NULL if unknown.

    +

    A copy of the origin file, or NULL if unknown.

    [transfer full]


    ostree_sysroot_upgrader_set_origin ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self,
    -                                    GKeyFile *origin,
    -                                    GCancellable *cancellable,
    -                                    GError **error);
    + GKeyFile *origin, + GCancellable *cancellable, + GError **error);

    Replace the origin with origin .

    @@ -416,18 +416,18 @@ ostree_sysroot_upgrader_get_origin_description

    Returns

    -

    A one-line descriptive summary of the origin, or NULL if unknown

    +

    A one-line descriptive summary of the origin, or NULL if unknown


    ostree_sysroot_upgrader_check_timestamps ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_upgrader_check_timestamps
                                    (OstreeRepo *repo,
                                     const char *from_rev,
                                     const char *to_rev,
    -                                GError **error);
    + GError **error);

    Check that the timestamp on to_rev is equal to or newer than from_rev @@ -469,21 +469,21 @@ attackers which provide a client with an older commit.


    ostree_sysroot_upgrader_pull ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader *self,
                                   OstreeRepoPullFlags flags,
                                   OstreeSysrootUpgraderPullFlags upgrader_flags,
                                   OstreeAsyncProgress *progress,
    -                              gboolean *out_changed,
    -                              GCancellable *cancellable,
    -                              GError **error);
    + gboolean *out_changed, + GCancellable *cancellable, + GError **error);

    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 out_changed - will be TRUE.

    + will be TRUE.

    If the origin remote is unchanged, out_changed will be set to -FALSE.

    +FALSE.

    Parameters

    @@ -535,15 +535,15 @@ ref locally. Then out_changed

    ostree_sysroot_upgrader_pull_one_dir ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
                                           const char *dir_to_pull,
                                           OstreeRepoPullFlags flags,
                                           OstreeSysrootUpgraderPullFlags upgrader_flags,
                                           OstreeAsyncProgress *progress,
    -                                      gboolean *out_changed,
    -                                      GCancellable *cancellable,
    -                                      GError **error);
    + gboolean *out_changed, + GCancellable *cancellable, + GError **error);

    Like ostree_sysroot_upgrader_pull(), 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.

    @@ -603,10 +603,10 @@ from inside the tree such as package databases.


    ostree_sysroot_upgrader_deploy ()

    -
    gboolean
    +
    gboolean
     ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader *self,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GCancellable *cancellable, + GError **error);

    Write the new deployment to disk, perform a configuration merge with /etc, and update the bootloader configuration.

    diff --git a/apidoc/html/ostree-ostree-bootconfig-parser.html b/apidoc/html/ostree-ostree-bootconfig-parser.html index d6c2e2b6..39ccebf7 100644 --- a/apidoc/html/ostree-ostree-bootconfig-parser.html +++ b/apidoc/html/ostree-ostree-bootconfig-parser.html @@ -57,7 +57,7 @@
    +initrds or NULL to unset.

    @@ -319,7 +319,7 @@ ostree_bootconfig_parser_get_overlay_initrds

    Returns

    -

    Array of initrds or NULL +

    Array of initrds or NULL if none are set.

    [array zero-terminated=1][transfer none][nullable]

    diff --git a/apidoc/html/ostree-ostree-chain-input-stream.html b/apidoc/html/ostree-ostree-chain-input-stream.html index 8f5262a3..c4dcdc15 100644 --- a/apidoc/html/ostree-ostree-chain-input-stream.html +++ b/apidoc/html/ostree-ostree-chain-input-stream.html @@ -69,7 +69,7 @@

    ostree_chain_input_stream_new ()

    OstreeChainInputStream *
    -ostree_chain_input_stream_new (GPtrArray *streams);
    +ostree_chain_input_stream_new (GPtrArray *streams);
    diff --git a/apidoc/html/ostree-ostree-checksum-input-stream.html b/apidoc/html/ostree-ostree-checksum-input-stream.html index 3623eec8..66cfe338 100644 --- a/apidoc/html/ostree-ostree-checksum-input-stream.html +++ b/apidoc/html/ostree-ostree-checksum-input-stream.html @@ -69,8 +69,8 @@

    ostree_checksum_input_stream_new ()

    OstreeChecksumInputStream *
    -ostree_checksum_input_stream_new (GInputStream *stream,
    -                                  GChecksum *checksum);
    +ostree_checksum_input_stream_new (GInputStream *stream, + GChecksum *checksum);
    diff --git a/apidoc/html/ostree-ostree-deployment.html b/apidoc/html/ostree-ostree-deployment.html index 1f0ff6f2..573c4cf1 100644 --- a/apidoc/html/ostree-ostree-deployment.html +++ b/apidoc/html/ostree-ostree-deployment.html @@ -41,7 +41,7 @@
    -gboolean +gboolean ostree_bootconfig_parser_parse () @@ -65,7 +65,7 @@
    -gboolean +gboolean ostree_bootconfig_parser_parse_at () @@ -73,7 +73,7 @@
    -gboolean +gboolean ostree_bootconfig_parser_write () @@ -81,7 +81,7 @@
    -gboolean +gboolean ostree_bootconfig_parser_write_at () @@ -174,21 +174,21 @@ ostree_bootconfig_parser_clone (

    ostree_bootconfig_parser_parse ()

    -
    gboolean
    +
    gboolean
     ostree_bootconfig_parser_parse (OstreeBootconfigParser *self,
    -                                GFile *path,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GFile *path, + GCancellable *cancellable, + GError **error);

    ostree_bootconfig_parser_parse_at ()

    -
    gboolean
    +
    gboolean
     ostree_bootconfig_parser_parse_at (OstreeBootconfigParser *self,
                                        int dfd,
                                        const char *path,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GCancellable *cancellable, + GError **error);

    Initialize a bootconfig from the given file.

    Parameters

    @@ -231,21 +231,21 @@ ostree_bootconfig_parser_parse_at (

    ostree_bootconfig_parser_write ()

    -
    gboolean
    +
    gboolean
     ostree_bootconfig_parser_write (OstreeBootconfigParser *self,
    -                                GFile *output,
    -                                GCancellable *cancellable,
    -                                GError **error);
    + GFile *output, + GCancellable *cancellable, + GError **error);

    ostree_bootconfig_parser_write_at ()

    -
    gboolean
    +
    gboolean
     ostree_bootconfig_parser_write_at (OstreeBootconfigParser *self,
                                        int dfd,
                                        const char *path,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GCancellable *cancellable, + GError **error);

    @@ -288,7 +288,7 @@ base initrd is part of the primary keys.

    initrds

    Array of overlay -initrds or NULL to unset.

    [array zero-terminated=1][transfer none][allow-none]
    -guint +guint ostree_deployment_hash () @@ -49,7 +49,7 @@
    -gboolean +gboolean ostree_deployment_equal () @@ -118,7 +118,7 @@
    -GKeyFile * +GKeyFile * ostree_deployment_get_origin () @@ -142,7 +142,7 @@
    -gboolean +gboolean ostree_deployment_is_pinned () @@ -150,7 +150,7 @@
    -gboolean +gboolean ostree_deployment_is_staged () @@ -234,8 +234,8 @@

    Functions

    ostree_deployment_hash ()

    -
    guint
    -ostree_deployment_hash (gconstpointer v);
    +
    guint
    +ostree_deployment_hash (gconstpointer v);

    Parameters

    @@ -259,9 +259,9 @@ ostree_deployment_hash (gconstpoi

    ostree_deployment_equal ()

    -
    gboolean
    -ostree_deployment_equal (gconstpointer ap,
    -                         gconstpointer bp);
    +
    gboolean
    +ostree_deployment_equal (gconstpointer ap,
    +                         gconstpointer bp);

    Parameters

    @@ -286,7 +286,7 @@ ostree_deployment_equal (gconstpo

    Returns

    -

    TRUE if deployments have the same osname, csum, and deployserial

    +

    TRUE if deployments have the same osname, csum, and deployserial


    @@ -431,7 +431,7 @@ ostree_deployment_get_bootconfig (

    ostree_deployment_get_origin ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_deployment_get_origin (OstreeDeployment *self);

    Parameters

    @@ -493,7 +493,7 @@ ostree_deployment_get_unlocked (

    ostree_deployment_is_pinned ()

    -
    gboolean
    +
    gboolean
     ostree_deployment_is_pinned (OstreeDeployment *self);

    See ostree_sysroot_deployment_set_pinned().

    @@ -520,7 +520,7 @@ ostree_deployment_is_pinned (

    ostree_deployment_is_staged ()

    -
    gboolean
    +
    gboolean
     ostree_deployment_is_staged (OstreeDeployment *self);

    Parameters

    @@ -638,7 +638,7 @@ ostree_deployment_set_bootconfig (

    ostree_deployment_set_origin ()

    void
     ostree_deployment_set_origin (OstreeDeployment *self,
    -                              GKeyFile *origin);
    + GKeyFile *origin);

    Replace the "origin", which is a description of the source of the deployment and how to update to the next version.

    @@ -669,7 +669,7 @@ of the deployment and how to update to the next version.

    ostree_deployment_origin_remove_transient_state ()

    void
     ostree_deployment_origin_remove_transient_state
    -                               (GKeyFile *origin);
    + (GKeyFile *origin);

    The intention of an origin file is primarily describe the "inputs" that resulted in a deployment, and it's commonly used to derive the new state. For example, a key value (in pure libostree mode) is the "refspec". However, @@ -806,7 +806,7 @@ ostree_deployment_unlocked_state_to_string

    - + @@ -816,7 +816,7 @@ ostree_deployment_unlocked_state_to_string - + diff --git a/apidoc/html/ostree-ostree-diff.html b/apidoc/html/ostree-ostree-diff.html index 90015a79..0b843ac7 100644 --- a/apidoc/html/ostree-ostree-diff.html +++ b/apidoc/html/ostree-ostree-diff.html @@ -57,7 +57,7 @@ - + @@ -192,16 +192,16 @@ sets of

    ostree_diff_dirs_with_options ()

    -
    gboolean
    +
    gboolean
     ostree_diff_dirs_with_options (OstreeDiffFlags flags,
    -                               GFile *a,
    -                               GFile *b,
    -                               GPtrArray *modified,
    -                               GPtrArray *removed,
    -                               GPtrArray *added,
    +                               GFile *a,
    +                               GFile *b,
    +                               GPtrArray *modified,
    +                               GPtrArray *removed,
    +                               GPtrArray *added,
                                    OstreeDiffDirsOptions *options,
    -                               GCancellable *cancellable,
    -                               GError **error);
    + GCancellable *cancellable, + GError **error);

    Compute the difference between directory a and b as 3 separate @@ -225,7 +225,7 @@ sets of

    a

    -
    + @@ -272,11 +272,11 @@ sets of

    ostree_diff_print ()

    void
    -ostree_diff_print (GFile *a,
    -                   GFile *b,
    -                   GPtrArray *modified,
    -                   GPtrArray *removed,
    -                   GPtrArray *added);
    +ostree_diff_print (GFile *a, + GFile *b, + GPtrArray *modified, + GPtrArray *removed, + GPtrArray *added);

    Print the contents of a diff to stdout.

    Parameters

    diff --git a/apidoc/html/ostree-ostree-repo-file.html b/apidoc/html/ostree-ostree-repo-file.html index 27fd47ae..d36f7b44 100644 --- a/apidoc/html/ostree-ostree-repo-file.html +++ b/apidoc/html/ostree-ostree-repo-file.html @@ -40,7 +40,7 @@
     

    GKeyFile *origin;

    GKeyFile *origin;

    How to construct an upgraded version of this tree

     
     

    gboolean staged;

    gboolean staged;

    TRUE iff this deployment is staged

     
    -gboolean +gboolean ostree_diff_dirs () @@ -65,7 +65,7 @@
    -gboolean +gboolean ostree_diff_dirs_with_options () @@ -120,15 +120,15 @@ ostree_diff_item_unref (

    ostree_diff_dirs ()

    -
    gboolean
    +
    gboolean
     ostree_diff_dirs (OstreeDiffFlags flags,
    -                  GFile *a,
    -                  GFile *b,
    -                  GPtrArray *modified,
    -                  GPtrArray *removed,
    -                  GPtrArray *added,
    -                  GCancellable *cancellable,
    -                  GError **error);
    + GFile *a, + GFile *b, + GPtrArray *modified, + GPtrArray *removed, + GPtrArray *added, + GCancellable *cancellable, + GError **error);

    Compute the difference between directory a and b as 3 separate @@ -152,7 +152,7 @@ sets of

    a

    First directory path, or NULL

    First directory path, or NULL

     

    First directory path, or NULL

    First directory path, or NULL

     
    -gboolean +gboolean ostree_repo_file_ensure_resolved () @@ -48,7 +48,7 @@
    -gboolean +gboolean ostree_repo_file_get_xattrs () @@ -94,7 +94,7 @@
    -GVariant * +GVariant * ostree_repo_file_tree_get_contents () @@ -102,7 +102,7 @@
    -GVariant * +GVariant * ostree_repo_file_tree_get_metadata () @@ -125,7 +125,7 @@
    -gboolean +gboolean ostree_repo_file_tree_query_child () @@ -154,18 +154,18 @@

    Functions

    ostree_repo_file_ensure_resolved ()

    -
    gboolean
    +
    gboolean
     ostree_repo_file_ensure_resolved (OstreeRepoFile *self,
    -                                  GError **error);
    + GError **error);

    ostree_repo_file_get_xattrs ()

    -
    gboolean
    +
    gboolean
     ostree_repo_file_get_xattrs (OstreeRepoFile *self,
    -                             GVariant **out_xattrs,
    -                             GCancellable *cancellable,
    -                             GError **error);
    + GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -227,7 +227,7 @@ ostree_repo_file_get_root (void ostree_repo_file_tree_set_metadata (OstreeRepoFile *self, const char *checksum, - GVariant *metadata); + GVariant *metadata);
    @@ -246,13 +246,13 @@ ostree_repo_file_tree_get_metadata_checksum

    ostree_repo_file_tree_get_contents ()

    -
    GVariant *
    +
    GVariant *
     ostree_repo_file_tree_get_contents (OstreeRepoFile *self);

    ostree_repo_file_tree_get_metadata ()

    -
    GVariant *
    +
    GVariant *
     ostree_repo_file_tree_get_metadata (OstreeRepoFile *self);

    @@ -267,8 +267,8 @@ ostree_repo_file_get_checksum (int ostree_repo_file_tree_find_child (OstreeRepoFile *self, const char *name, - gboolean *is_dir, - GVariant **out_container); + gboolean *is_dir, + GVariant **out_container);

    Parameters

    @@ -305,14 +305,14 @@ ostree_repo_file_tree_find_child (

    ostree_repo_file_tree_query_child ()

    -
    gboolean
    +
    gboolean
     ostree_repo_file_tree_query_child (OstreeRepoFile *self,
                                        int n,
                                        const char *attributes,
    -                                   GFileQueryInfoFlags flags,
    -                                   GFileInfo **out_info,
    -                                   GCancellable *cancellable,
    -                                   GError **error);
    + GFileQueryInfoFlags flags, + GFileInfo **out_info, + GCancellable *cancellable, + GError **error);

    Parameters

    diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2 index e114b181..43e51f0e 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -112,6 +112,10 @@ + + + + @@ -249,6 +253,8 @@ + + @@ -471,6 +477,8 @@ + + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index 6b944de0..86275e35 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -814,6 +814,10 @@ ostree_remote_unref, function in ostree-remote
    +OstreeRepoAutoLock, typedef in OstreeRepo +
    +
    +
    OstreeRepoCheckoutAtOptions, struct in OstreeRepo
    @@ -894,6 +898,10 @@ OstreeRepoFinderResultv, typedef in ostree-repo-finder
    +OstreeRepoLockType, enum in OstreeRepo +
    +
    +
    OstreeRepoMode, enum in OstreeRepo
    @@ -930,6 +938,14 @@ OstreeRepoFinderResultv, typedef in ostree-repo-finder
    +ostree_repo_auto_lock_cleanup, function in OstreeRepo +
    +
    +
    +ostree_repo_auto_lock_push, function in OstreeRepo +
    +
    +
    ostree_repo_checkout_at, function in OstreeRepo
    @@ -1286,6 +1302,14 @@ ostree_repo_find_remotes_finish, function in ostree-repo-remote-finder
    +ostree_repo_lock_pop, function in OstreeRepo +
    +
    +
    +ostree_repo_lock_push, function in OstreeRepo +
    +
    +
    ostree_repo_mark_commit_partial, function in OstreeRepo
    diff --git a/apidoc/html/right-insensitive.png b/apidoc/html/right-insensitive.png index 4c95785b..763208da 100644 Binary files a/apidoc/html/right-insensitive.png and b/apidoc/html/right-insensitive.png differ diff --git a/apidoc/html/right.png b/apidoc/html/right.png index 76260ec8..eb90dd44 100644 Binary files a/apidoc/html/right.png and b/apidoc/html/right.png differ diff --git a/apidoc/html/style.css b/apidoc/html/style.css index b7ec78f5..41781ba5 100644 --- a/apidoc/html/style.css +++ b/apidoc/html/style.css @@ -455,6 +455,11 @@ acronym,abbr } } +pre { line-height: 125%; margin: 0; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } .hll { background-color: #ffffcc } .c { color: #408080; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ diff --git a/apidoc/html/up-insensitive.png b/apidoc/html/up-insensitive.png index f4049860..478700c9 100644 Binary files a/apidoc/html/up-insensitive.png and b/apidoc/html/up-insensitive.png differ diff --git a/apidoc/html/up.png b/apidoc/html/up.png index 80b4b37e..636d50dd 100644 Binary files a/apidoc/html/up.png and b/apidoc/html/up.png differ diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index b09ba6f9..2da1d749 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -319,6 +319,12 @@ ostree_repo_get_min_free_space_bytes ostree_repo_get_config ostree_repo_get_dfd ostree_repo_get_default_repo_finders +OstreeRepoLockType +ostree_repo_lock_pop +ostree_repo_lock_push +OstreeRepoAutoLock +ostree_repo_auto_lock_push +ostree_repo_auto_lock_cleanup ostree_repo_hash ostree_repo_equal ostree_repo_copy_config diff --git a/apidoc/version.xml b/apidoc/version.xml index c24c13a2..fbc566b8 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2021.2 \ No newline at end of file +2021.3 \ No newline at end of file diff --git a/build-aux/config.guess b/build-aux/config.guess index b33c9e89..f50dcdb6 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-08-29' +timestamp='2018-02-24' # 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 @@ -84,6 +84,8 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -94,39 +96,34 @@ fi # Portable tmp directory creation inspired by the Autoconf team. -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 -trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 - -set_cc_for_build() { - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi @@ -141,7 +138,7 @@ Linux|GNU|GNU/*) # We could probably try harder. LIBC=gnu - set_cc_for_build + eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -202,7 +199,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -240,7 +237,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -392,15 +389,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac + eval "$set_cc_for_build" + 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 (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -480,7 +482,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -577,7 +579,7 @@ EOF exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include @@ -658,7 +660,7 @@ EOF esac fi if [ "$HP_ARCH" = "" ]; then - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -698,7 +700,7 @@ EOF esac if [ "$HP_ARCH" = hppa2.0w ] then - set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -724,7 +726,7 @@ EOF echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int @@ -838,17 +840,6 @@ EOF *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi - else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf - fi - exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -903,8 +894,8 @@ EOF # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -931,7 +922,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -980,7 +971,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1055,7 +1046,11 @@ EOF echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1294,7 +1289,7 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1367,7 +1362,6 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1479,7 +1473,7 @@ EOF exit 1 # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/config.sub b/build-aux/config.sub index b51fb8cd..1d8e98bc 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-08-29' +timestamp='2018-02-22' # 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 @@ -110,1159 +110,1223 @@ case $# in exit 1;; esac -# Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <&2 - exit 1 +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. ;; - *-*-*-*) - basic_machine=$field1-$field2 - os=$field3-$field4 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - 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* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 - os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - os=linux-android - ;; - *) - basic_machine=$field1-$field2 - os=$field3 - ;; - esac + -bluegene*) + os=-cnk ;; - *-*) - # A lone config we happen to match not fitting any patern - case $field1-$field2 in - decstation-3100) - basic_machine=mips-dec - os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Prevent following clause from handling this valid os - sun*os*) - basic_machine=$field1 - os=$field2 - ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - os= - ;; - *) - basic_machine=$field1 - os=$field2 - ;; - esac - ;; - esac + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - os=bsd - ;; - a29khif) - basic_machine=a29k-amd - os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=scout - ;; - alliant) - basic_machine=fx80-alliant - os= - ;; - altos | altos3068) - basic_machine=m68k-altos - os= - ;; - am29k) - basic_machine=a29k-none - os=bsd - ;; - amdahl) - basic_machine=580-amdahl - os=sysv - ;; - amiga) - basic_machine=m68k-unknown - os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=bsd - ;; - aros) - basic_machine=i386-pc - os=aros - ;; - aux) - basic_machine=m68k-apple - os=aux - ;; - balance) - basic_machine=ns32k-sequent - os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=linux - ;; - cegcc) - basic_machine=arm-unknown - os=cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=bsd - ;; - convex-c2) - basic_machine=c2-convex - os=bsd - ;; - convex-c32) - basic_machine=c32-convex - os=bsd - ;; - convex-c34) - basic_machine=c34-convex - os=bsd - ;; - convex-c38) - basic_machine=c38-convex - os=bsd - ;; - cray) - basic_machine=j90-cray - os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - os= - ;; - da30) - basic_machine=m68k-da30 - os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - os= - ;; - delta88) - basic_machine=m88k-motorola - os=sysv3 - ;; - dicos) - basic_machine=i686-pc - os=dicos - ;; - djgpp) - basic_machine=i586-pc - os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=ose - ;; - gmicro) - basic_machine=tron-gmicro - os=sysv - ;; - go32) - basic_machine=i386-pc - os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=hms - ;; - harris) - basic_machine=m88k-harris - os=sysv3 - ;; - hp300) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=proelf - ;; - i386mach) - basic_machine=i386-mach - os=mach - ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; - isi68 | isi) - basic_machine=m68k-isi - os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=sysv - ;; - merlin) - basic_machine=ns32k-utek - os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - os=coff - ;; - morphos) - basic_machine=powerpc-unknown - os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=moxiebox - ;; - msdos) - basic_machine=i386-pc - os=msdos - ;; - msys) - basic_machine=i686-pc - os=msys - ;; - mvs) - basic_machine=i370-ibm - os=mvs - ;; - nacl) - basic_machine=le32-unknown - os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=newsos - ;; - news1000) - basic_machine=m68030-sony - os=newsos - ;; - necv70) - basic_machine=v70-nec - os=sysv - ;; - nh3000) - basic_machine=m68k-harris - os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=cxux - ;; - nindy960) - basic_machine=i960-intel - os=nindy - ;; - mon960) - basic_machine=i960-intel - os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=ose - ;; - os68k) - basic_machine=m68k-none - os=os68k - ;; - paragon) - basic_machine=i860-intel - os=osf - ;; - parisc) - basic_machine=hppa-unknown - os=linux - ;; - pw32) - basic_machine=i586-unknown - os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=rdos - ;; - rdos32) - basic_machine=i386-pc - os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=coff - ;; - sa29200) - basic_machine=a29k-amd - os=udi - ;; - sei) - basic_machine=mips-sei - os=seiux - ;; - sequent) - basic_machine=i386-sequent - os= - ;; - sps7) - basic_machine=m68k-bull - os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - os= - ;; - stratus) - basic_machine=i860-stratus - os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - os= - ;; - sun2os3) - basic_machine=m68000-sun - os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - os= - ;; - sun3os3) - basic_machine=m68k-sun - os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - os= - ;; - sun4os3) - basic_machine=sparc-sun - os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - os= - ;; - sv1) - basic_machine=sv1-cray - os=unicos - ;; - symmetry) - basic_machine=i386-sequent - os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=unicos - ;; - t90) - basic_machine=t90-cray - os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - os=tpf - ;; - udi29k) - basic_machine=a29k-amd - os=udi - ;; - ultra3) - basic_machine=a29k-nyu - os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=none - ;; - vaxv) - basic_machine=vax-dec - os=sysv - ;; - vms) - basic_machine=vax-dec - os=vms - ;; - vxworks960) - basic_machine=i960-wrs - os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=vxworks - ;; - xbox) - basic_machine=i686-pc - os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - os=unicos - ;; - *) - basic_machine=$1 - os= - ;; - esac + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint ;; esac -# Decode 1-component or ad-hoc basic machines +# Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | 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 \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | 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 \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown ;; - op50n) - cpu=hppa1.1 - vendor=oki + c54x) + basic_machine=tic54x-unknown ;; - op60c) - cpu=hppa1.1 - vendor=oki + c55x) + basic_machine=tic55x-unknown ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - os=tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - cpu=m68k - vendor=motorola - ;; - dpx2*) - cpu=m68k - vendor=bull - os=sysv3 - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - os=${os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - os=${os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $os in - irix*) - ;; - *) - os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - case $os in - nextstep* ) - ;; - ns2*) - os=nextstep2 - ;; - *) - os=nextstep3 - ;; - esac - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - os=${os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - os=proelf - ;; - none) - cpu=none - vendor=none + c6x) + basic_machine=tic6x-unknown ;; leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine + basic_machine=sparc-$basic_machine ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown ;; - *-*) - IFS="-" read -r cpu vendor <&2 + exit 1 ;; - # These rules are duplicated from below for sake of the special case above; - # i.e. things that normalized to x86 arches should also default to "pc" - pc98) - cpu=i386 - vendor=pc + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | 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-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | 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*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) ;; - x64 | amd64) - cpu=x86_64 - vendor=pc + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; - # Recognize the basic CPU types without company name. - *) - cpu=$basic_machine - vendor=unknown + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd ;; -esac - -unset -v basic_machine - -# Decode basic machines in the full and proper CPU-Company form. -case $cpu-$vendor in - # Here we handle the default manufacturer of certain CPU types in cannonical form. It is in - # some cases the only manufacturer, in others, it is the most popular. - craynv-unknown) - vendor=cray - os=${os:-unicosmp} + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att ;; - c90-unknown | c90-cray) - vendor=cray - os=${os:-unicos} + 3b*) + basic_machine=we32k-att ;; - fx80-unknown) - vendor=alliant + a29khif) + basic_machine=a29k-amd + os=-udi ;; - romp-unknown) - vendor=ibm + abacus) + basic_machine=abacus-unknown ;; - mmix-unknown) - vendor=knuth + adobe68k) + basic_machine=m68010-adobe + os=-scout ;; - microblaze-unknown | microblazeel-unknown) - vendor=xilinx + alliant | fx80) + basic_machine=fx80-alliant ;; - rs6000-unknown) - vendor=ibm + altos | altos3068) + basic_machine=m68k-altos ;; - vax-unknown) - vendor=dec + am29k) + basic_machine=a29k-none + os=-bsd ;; - pdp11-unknown) - vendor=dec + amd64) + basic_machine=x86_64-pc ;; - we32k-unknown) - vendor=att - ;; - cydra-unknown) - vendor=cydrome - ;; - i370-ibm*) - vendor=ibm - ;; - orion-unknown) - vendor=highlevel - ;; - xps-unknown | xps100-unknown) - cpu=xps100 - vendor=honeywell - ;; - - # Here we normalize CPU types with a missing or matching vendor - dpx20-unknown | dpx20-bull) - cpu=rs6000 - vendor=bull - os=${os:-bosx} - ;; - - # Here we normalize CPU types irrespective of the vendor amd64-*) - cpu=x86_64 + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux ;; blackfin-*) - cpu=bfin - os=linux + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk ;; c54x-*) - cpu=tic54x + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - cpu=tic55x + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - cpu=tic6x + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - e500v[12]-*) - cpu=powerpc + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown os=$os"spe" ;; - mips3*-*) - cpu=mips64 + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" ;; - ms1-*) - cpu=mt + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux ;; m68knommu-*) - cpu=m68k - os=linux + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - cpu=s12z + magnum | m3230) + basic_machine=mips-mips + os=-sysv ;; - openrisc-*) - cpu=or32 + merlin) + basic_machine=ns32k-utek + os=-sysv ;; - parisc-*) - cpu=hppa - os=linux + microblaze*) + basic_machine=microblaze-xilinx ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - cpu=i586 + mingw64) + basic_machine=x86_64-pc + os=-mingw64 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) - cpu=i686 + mingw32) + basic_machine=i686-pc + os=-mingw32 ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - cpu=i686 + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce ;; - pentium4-*) - cpu=i786 + miniframe) + basic_machine=m68000-convergent ;; - pc98-*) - cpu=i386 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint ;; - ppc-* | ppcbe-*) - cpu=powerpc + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; - ppcle-* | powerpclittle-*) - cpu=powerpcle + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; - ppc64-*) - cpu=powerpc64 + monitor) + basic_machine=m68k-rom68k + os=-coff ;; - ppc64le-* | powerpc64little-*) - cpu=powerpc64le + morphos) + basic_machine=powerpc-unknown + os=-morphos ;; - sb1-*) - cpu=mipsisa64sb1 + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox ;; - sb1el-*) - cpu=mipsisa64sb1el + msdos) + basic_machine=i386-pc + os=-msdos ;; - sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; - spur-*) - cpu=spur + msys) + basic_machine=i686-pc + os=-msys ;; - strongarm-* | thumb-*) - cpu=arm + mvs) + basic_machine=i370-ibm + os=-mvs ;; - tx39-*) - cpu=mipstx39 + nacl) + basic_machine=le32-unknown + os=-nacl ;; - tx39el-*) - cpu=mipstx39el + ncr3000) + basic_machine=i486-ncr + os=-sysv4 ;; - x64-*) - cpu=x86_64 + netbsd386) + basic_machine=i386-unknown + os=-netbsd ;; - xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + netwinder) + basic_machine=armv4l-rebel + os=-linux ;; - - # Recognize the cannonical CPU Types that limit and/or modify the - # company names they are paired with. - cr16-*) - os=${os:-elf} + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos ;; - crisv32-* | etraxfs*-*) - cpu=crisv32 - vendor=axis + news1000) + basic_machine=m68030-sony + os=-newsos ;; - cris-* | etrax*-*) - cpu=cris - vendor=axis + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos ;; - crx-*) - os=${os:-elf} + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould ;; neo-tandem) - cpu=neo - vendor=tandem + basic_machine=neo-tandem ;; nse-tandem) - cpu=nse - vendor=tandem + basic_machine=nse-tandem ;; nsr-tandem) - cpu=nsr - vendor=tandem + basic_machine=nsr-tandem ;; nsv-tandem) - cpu=nsv - vendor=tandem + basic_machine=nsv-tandem ;; nsx-tandem) - cpu=nsx - vendor=tandem + basic_machine=nsx-tandem ;; - s390-*) - cpu=s390 - vendor=ibm + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf ;; - s390x-*) - cpu=s390x - vendor=ibm + openrisc | openrisc-*) + basic_machine=or32-unknown ;; - tile*-*) - os=${os:-linux-gnu} + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none ;; +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) - # Recognize the cannonical CPU types that are allowed with any - # company name. - case $cpu in - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ - | alphapca5[67] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[lb]e | arme[lb] | armv* \ - | avr | avr32 \ - | asmjs \ - | ba \ - | be32 | be64 \ - | bfin | bs2000 \ - | c[123]* | c30 | [cjt]90 | c4x \ - | c8051 | clipper | craynv | csky | cydra \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | elxsi | epiphany \ - | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ - | h8300 | h8500 \ - | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i*86 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle \ - | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ - | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ - | m88110 | m88k | maxq | mb | mcore | mep | metag \ - | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mmix \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | none | np1 | ns16k | ns32k \ - | open8 \ - | or1k* \ - | or32 \ - | orion \ - | pdp10 | pdp11 | pj | pjl | pn | power \ - | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ - | pru \ - | pyramid \ - | riscv | riscv32 | riscv64 \ - | rl78 | romp | rs6000 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ - | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ - | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ - | spu \ - | tahoe \ - | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ - | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ - | vax \ - | visium \ - | wasm32 \ - | we32k \ - | x86 | x86_64 | xc16x | xgate | xps100 \ - | xstormy16 | xtensa* \ - | ymp \ - | z8k | z80) - ;; - - *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 - exit 1 - ;; - esac + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; - commodore*) - vendor=cbm + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1270,245 +1334,199 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x$os != x ] +if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. - # solaris* is a basic system type, with this one exception. - auroraux) - os=auroraux + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux ;; - bluegene*) - os=cnk - ;; - solaris1 | solaris1.*) + -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - solaris) - os=solaris2 + -solaris) + os=-solaris2 ;; - unixware*) - os=sysv4.2uw + -unixware*) + os=-sysv4.2uw ;; - gnu/linux*) + -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - es1800*) - os=ose - ;; - # Some version numbers need modification - chorusos*) - os=chorusos - ;; - isc) - os=isc2.2 - ;; - sco6) - os=sco5v6 - ;; - sco5) - os=sco3.2v5 - ;; - sco4) - os=sco3.2v4 - ;; - sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - scout) - # Don't match below - ;; - sco*) - os=sco3.2v2 - ;; - psos*) - os=psos + -es1800*) + os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | 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* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd*) + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -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* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - qnx*) - case $cpu in - x86 | i*86) + -qnx*) + case $basic_machine in + x86-* | i*86-*) ;; *) - os=nto-$os + os=-nto$os ;; esac ;; - hiux*) - os=hiuxwe2 + -nto-qnx*) ;; - nto-qnx*) - ;; - nto*) + -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - lynx*178) - os=lynxos178 - ;; - lynx*5) - os=lynxos5 - ;; - lynx*) - os=lynxos - ;; - mac*) + -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - opened*) - os=openedition + -linux-dietlibc) + os=-linux-dietlibc ;; - os400*) - os=os400 + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - sunos5*) + -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - sunos6*) + -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - wince*) - os=wince + -opened*) + os=-openedition ;; - utek*) - os=bsd + -os400*) + os=-os400 ;; - dynix*) - os=bsd + -wince*) + os=-wince ;; - acis*) - os=aos + -utek*) + os=-bsd ;; - atheos*) - os=atheos + -dynix*) + os=-bsd ;; - syllable*) - os=syllable + -acis*) + os=-aos ;; - 386bsd) - os=bsd + -atheos*) + os=-atheos ;; - ctix* | uts*) - os=sysv + -syllable*) + os=-syllable ;; - nova*) - os=rtmk-nova + -386bsd) + os=-bsd ;; - ns2) - os=nextstep2 + -ctix* | -uts*) + os=-sysv ;; - nsk*) - os=nsk + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk ;; # Preserve the version number of sinix5. - sinix5.*) + -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - sinix*) - os=sysv4 + -sinix*) + os=-sysv4 ;; - tpf*) - os=tpf + -tpf*) + os=-tpf ;; - triton*) - os=sysv3 + -triton*) + os=-sysv3 ;; - oss*) - os=sysv3 + -oss*) + os=-sysv3 ;; - svr4*) - os=sysv4 + -svr4*) + os=-sysv4 ;; - svr3) - os=sysv3 + -svr3) + os=-sysv3 ;; - sysvr4) - os=sysv4 + -sysvr4) + os=-sysv4 ;; - # This must come after sysvr4. - sysv*) + # This must come after -sysvr4. + -sysv*) ;; - ose*) - os=ose + -ose*) + os=-ose ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - os=mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; - zvmoe) - os=zvmoe + -zvmoe) + os=-zvmoe ;; - dicos*) - os=dicos + -dicos*) + os=-dicos ;; - pikeos*) + -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $cpu in + case $basic_machine in arm*) - os=eabi + os=-eabi ;; *) - os=elf + os=-elf ;; esac ;; - nacl*) + -nacl*) ;; - ios) + -ios) ;; - none) - ;; - *-eabi) + -none) ;; *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1525,265 +1543,258 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $cpu-$vendor in +case $basic_machine in score-*) - os=elf + os=-elf ;; spu-*) - os=elf + os=-elf ;; *-acorn) - os=riscix1.2 + os=-riscix1.2 ;; arm*-rebel) - os=linux + os=-linux ;; arm*-semi) - os=aout + os=-aout ;; c4x-* | tic4x-*) - os=coff + os=-coff ;; c8051-*) - os=elf - ;; - clipper-intergraph) - os=clix + os=-elf ;; hexagon-*) - os=elf + os=-elf ;; tic54x-*) - os=coff + os=-coff ;; tic55x-*) - os=coff + os=-coff ;; tic6x-*) - os=coff + os=-coff ;; # This must come before the *-dec entry. pdp10-*) - os=tops20 + os=-tops20 ;; pdp11-*) - os=none + os=-none ;; *-dec | vax-*) - os=ultrix4.2 + os=-ultrix4.2 ;; m68*-apollo) - os=domain + os=-domain ;; i386-sun) - os=sunos4.0.2 + os=-sunos4.0.2 ;; m68000-sun) - os=sunos3 + os=-sunos3 ;; m68*-cisco) - os=aout + os=-aout ;; mep-*) - os=elf + os=-elf ;; mips*-cisco) - os=elf + os=-elf ;; mips*-*) - os=elf + os=-elf ;; or32-*) - os=coff + os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=sysv3 + os=-sysv3 ;; sparc-* | *-sun) - os=sunos4.1.1 + os=-sunos4.1.1 ;; pru-*) - os=elf + os=-elf ;; *-be) - os=beos + os=-beos ;; *-ibm) - os=aix + os=-aix ;; *-knuth) - os=mmixware + os=-mmixware ;; *-wec) - os=proelf + os=-proelf ;; *-winbond) - os=proelf + os=-proelf ;; *-oki) - os=proelf + os=-proelf ;; *-hp) - os=hpux + os=-hpux ;; *-hitachi) - os=hiux + os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=sysv + os=-sysv ;; *-cbm) - os=amigaos + os=-amigaos ;; *-dg) - os=dgux + os=-dgux ;; *-dolphin) - os=sysv3 + os=-sysv3 ;; m68k-ccur) - os=rtu + os=-rtu ;; m88k-omron*) - os=luna + os=-luna ;; *-next) - os=nextstep + os=-nextstep ;; *-sequent) - os=ptx + os=-ptx ;; *-crds) - os=unos + os=-unos ;; *-ns) - os=genix + os=-genix ;; i370-*) - os=mvs + os=-mvs ;; *-gould) - os=sysv + os=-sysv ;; *-highlevel) - os=bsd + os=-bsd ;; *-encore) - os=bsd + os=-bsd ;; *-sgi) - os=irix + os=-irix ;; *-siemens) - os=sysv4 + os=-sysv4 ;; *-masscomp) - os=rtu + os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=uxpv + os=-uxpv ;; *-rom68k) - os=coff + os=-coff ;; *-*bug) - os=coff + os=-coff ;; *-apple) - os=macos + os=-macos ;; *-atari*) - os=mint - ;; - *-wrs) - os=vxworks + os=-mint ;; *) - os=none + os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) +vendor=unknown +case $basic_machine in + *-unknown) case $os in - riscix*) + -riscix*) vendor=acorn ;; - sunos*) + -sunos*) vendor=sun ;; - cnk*|-aix*) + -cnk*|-aix*) vendor=ibm ;; - beos*) + -beos*) vendor=be ;; - hpux*) + -hpux*) vendor=hp ;; - mpeix*) + -mpeix*) vendor=hp ;; - hiux*) + -hiux*) vendor=hitachi ;; - unos*) + -unos*) vendor=crds ;; - dgux*) + -dgux*) vendor=dg ;; - luna*) + -luna*) vendor=omron ;; - genix*) + -genix*) vendor=ns ;; - clix*) - vendor=intergraph - ;; - mvs* | opened*) + -mvs* | -opened*) vendor=ibm ;; - os400*) + -os400*) vendor=ibm ;; - ptx*) + -ptx*) vendor=sequent ;; - tpf*) + -tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; - aux*) + -aux*) vendor=apple ;; - hms*) + -hms*) vendor=hitachi ;; - mpw* | macos*) + -mpw* | -macos*) vendor=apple ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; - vos*) + -vos*) vendor=stratus ;; esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$cpu-$vendor-$os" +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/install-sh b/build-aux/install-sh index 20d8b2ea..ec298b53 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ posix_mkdir= # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ do fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ do then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ do prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -488,6 +493,13 @@ do then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -502,9 +514,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh old mode 100644 new mode 100755 index 7f3523d3..21e5e078 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 +VERSION="2.4.6 Debian-2.4.6-15" package_revision=2.4.6 @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,12 +2141,12 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 + version: $progname $scriptversion Debian-2.4.6-15 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . -GNU libtool home page: . +GNU libtool home page: . General help using GNU software: ." exit 0 } @@ -2124,7 +2197,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func_fatal_error ${1+"$@"} \ + func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7274,10 +7366,14 @@ func_mode_link () # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7570,7 +7666,10 @@ func_mode_link () case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then @@ -7889,19 +7988,19 @@ func_mode_link () # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -8825,6 +8924,9 @@ func_mode_link () revision=$number_minor lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type '$version_type'" + ;; esac ;; no) diff --git a/build-aux/test-driver b/build-aux/test-driver index 89dba1e0..9759384a 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -42,11 +42,13 @@ print_usage () { cat <> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -1042,8 +1041,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1072,11 +1071,11 @@ _LT_EOF # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -1493,7 +1492,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -2867,9 +2866,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2878,7 +2874,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2890,6 +2886,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3549,7 +3557,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4055,7 +4063,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4427,7 +4436,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4695,6 +4704,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -4939,6 +4954,9 @@ m4_if([$1], [CXX], [ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -5001,6 +5019,9 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5255,7 +5276,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5776,6 +5797,7 @@ _LT_EOF if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5797,7 +5819,7 @@ _LT_EOF esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -6423,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6798,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6863,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7202,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7286,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7297,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff --git a/config.h.in b/config.h.in index 2e8e0224..07b665c5 100644 --- a/config.h.in +++ b/config.h.in @@ -162,6 +162,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* "unit path" */ +#undef SYSTEM_DATA_UNIT_PATH + /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME diff --git a/configure b/configure index 138ba0e4..99bce1d7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libostree 2021.2. +# Generated by GNU Autoconf 2.69 for libostree 2021.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2021.2' -PACKAGE_STRING='libostree 2021.2' +PACKAGE_VERSION='2021.3' +PACKAGE_STRING='libostree 2021.3' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -882,6 +882,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1049,6 +1050,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1301,6 +1303,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1438,7 +1449,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1551,7 +1562,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libostree 2021.2 to adapt to many kinds of systems. +\`configure' configures libostree 2021.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1591,6 +1602,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1621,7 +1633,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2021.2:";; + short | recursive ) echo "Configuration of libostree 2021.3:";; esac cat <<\_ACEOF @@ -1883,7 +1895,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2021.2 +libostree configure 2021.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2355,7 +2367,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2021.2, which was +It was created by libostree $as_me 2021.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2913,12 +2925,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3223,7 +3230,7 @@ fi # Define the identity of the package. PACKAGE='libostree' - VERSION='2021.2' + VERSION='2021.3' # Some tools Automake needs. @@ -5008,7 +5015,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5054,7 +5061,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5078,7 +5085,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5123,7 +5130,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5147,7 +5154,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5957,9 +5964,9 @@ test -n "$YACC" || YACC="yacc" YEAR_VERSION=2021 -RELEASE_VERSION=2 +RELEASE_VERSION=3 -PACKAGE_VERSION=2021.2 +PACKAGE_VERSION=2021.3 if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : @@ -7255,7 +7262,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -7617,7 +7624,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -8118,11 +8125,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -9341,8 +9345,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -9374,11 +9378,11 @@ $as_echo "$lt_cv_ld_force_load" >&6; } # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + 10.0,*86*-darwin8*|10.0,*-darwin[912]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -10203,6 +10207,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -10679,6 +10689,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -10933,7 +10946,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -11603,6 +11616,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -11624,7 +11638,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -12719,9 +12733,6 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -12730,7 +12741,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12742,6 +12753,18 @@ fi dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -14345,8 +14368,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 -$as_echo_n "checking for GLIB... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_args" >&5 +$as_echo_n "checking for $pkg_config_args... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" @@ -14386,7 +14409,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -14404,7 +14427,7 @@ fi : elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else @@ -14690,11 +14713,11 @@ rm -f core conftest.err conftest.$ac_objext \ rm -f conf.glibtest -GIO_DEPENDENCY="gio-unix-2.0 >= 2.40.0" +GIO_DEPENDENCY="gio-unix-2.0 >= 2.44.0" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GIO_UNIX" >&5 -$as_echo_n "checking for OT_DEP_GIO_UNIX... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GIO_DEPENDENCY" >&5 +$as_echo_n "checking for $GIO_DEPENDENCY... " >&6; } if test -n "$OT_DEP_GIO_UNIX_CFLAGS"; then pkg_cv_OT_DEP_GIO_UNIX_CFLAGS="$OT_DEP_GIO_UNIX_CFLAGS" @@ -14734,7 +14757,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -14761,7 +14784,7 @@ Alternatively, you may set the environment variables OT_DEP_GIO_UNIX_CFLAGS and OT_DEP_GIO_UNIX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -14785,8 +14808,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LZMA" >&5 -$as_echo_n "checking for OT_DEP_LZMA... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma >= 5.0.5" >&5 +$as_echo_n "checking for liblzma >= 5.0.5... " >&6; } if test -n "$OT_DEP_LZMA_CFLAGS"; then pkg_cv_OT_DEP_LZMA_CFLAGS="$OT_DEP_LZMA_CFLAGS" @@ -14826,7 +14849,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -14853,7 +14876,7 @@ Alternatively, you may set the environment variables OT_DEP_LZMA_CFLAGS and OT_DEP_LZMA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -14877,8 +14900,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_ZLIB" >&5 -$as_echo_n "checking for OT_DEP_ZLIB... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 +$as_echo_n "checking for zlib... " >&6; } if test -n "$OT_DEP_ZLIB_CFLAGS"; then pkg_cv_OT_DEP_ZLIB_CFLAGS="$OT_DEP_ZLIB_CFLAGS" @@ -14918,7 +14941,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -14945,7 +14968,7 @@ Alternatively, you may set the environment variables OT_DEP_ZLIB_CFLAGS and OT_DEP_ZLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -14969,8 +14992,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_E2P" >&5 -$as_echo_n "checking for OT_DEP_E2P... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for e2p" >&5 +$as_echo_n "checking for e2p... " >&6; } if test -n "$OT_DEP_E2P_CFLAGS"; then pkg_cv_OT_DEP_E2P_CFLAGS="$OT_DEP_E2P_CFLAGS" @@ -15010,7 +15033,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -15037,7 +15060,7 @@ Alternatively, you may set the environment variables OT_DEP_E2P_CFLAGS and OT_DEP_E2P_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -15072,8 +15095,8 @@ if test x$with_curl != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CURL" >&5 -$as_echo_n "checking for OT_DEP_CURL... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= $CURL_DEPENDENCY" >&5 +$as_echo_n "checking for libcurl >= $CURL_DEPENDENCY... " >&6; } if test -n "$OT_DEP_CURL_CFLAGS"; then pkg_cv_OT_DEP_CURL_CFLAGS="$OT_DEP_CURL_CFLAGS" @@ -15113,7 +15136,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -15140,7 +15163,7 @@ Alternatively, you may set the environment variables OT_DEP_CURL_CFLAGS and OT_DEP_CURL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -15239,8 +15262,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_SOUP" >&5 -$as_echo_n "checking for OT_DEP_SOUP... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SOUP_DEPENDENCY" >&5 +$as_echo_n "checking for $SOUP_DEPENDENCY... " >&6; } if test -n "$OT_DEP_SOUP_CFLAGS"; then pkg_cv_OT_DEP_SOUP_CFLAGS="$OT_DEP_SOUP_CFLAGS" @@ -15280,7 +15303,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -15307,7 +15330,7 @@ Alternatively, you may set the environment variables OT_DEP_SOUP_CFLAGS and OT_DEP_SOUP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -15691,8 +15714,8 @@ if test x$with_gpgme != xno; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPGME" >&5 -$as_echo_n "checking for OT_DEP_GPGME... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpgme-pthread >= $LIBGPGME_DEPENDENCY" >&5 +$as_echo_n "checking for gpgme-pthread >= $LIBGPGME_DEPENDENCY... " >&6; } if test -n "$OT_DEP_GPGME_CFLAGS"; then pkg_cv_OT_DEP_GPGME_CFLAGS="$OT_DEP_GPGME_CFLAGS" @@ -15732,7 +15755,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -15846,7 +15869,7 @@ $as_echo "no" >&6; } elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -15960,8 +15983,8 @@ fi OSTREE_FEATURES="$OSTREE_FEATURES gpgme" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPG_ERROR" >&5 -$as_echo_n "checking for OT_DEP_GPG_ERROR... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpg-error" >&5 +$as_echo_n "checking for gpg-error... " >&6; } if test -n "$OT_DEP_GPG_ERROR_CFLAGS"; then pkg_cv_OT_DEP_GPG_ERROR_CFLAGS="$OT_DEP_GPG_ERROR_CFLAGS" @@ -16001,7 +16024,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -16063,7 +16086,7 @@ fi OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # Extract the first word of "gpg-error-config", so it can be a program name with args. @@ -16155,8 +16178,8 @@ $as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBSODIUM" >&5 -$as_echo_n "checking for OT_DEP_LIBSODIUM... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium >= $LIBSODIUM_DEPENDENCY" >&5 +$as_echo_n "checking for libsodium >= $LIBSODIUM_DEPENDENCY... " >&6; } if test -n "$OT_DEP_LIBSODIUM_CFLAGS"; then pkg_cv_OT_DEP_LIBSODIUM_CFLAGS="$OT_DEP_LIBSODIUM_CFLAGS" @@ -16196,7 +16219,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -16214,7 +16237,7 @@ fi have_libsodium=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_libsodium=no else @@ -16491,8 +16514,8 @@ $as_echo "$enable_gtk_doc" >&6; } if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 -$as_echo_n "checking for GTKDOC_DEPS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" >&5 +$as_echo_n "checking for glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" @@ -16532,7 +16555,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -16550,7 +16573,7 @@ fi : elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else @@ -16749,8 +16772,8 @@ $as_echo "#define HAVE_LIBARCHIVE 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBARCHIVE" >&5 -$as_echo_n "checking for OT_DEP_LIBARCHIVE... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBARCHIVE_DEPENDENCY" >&5 +$as_echo_n "checking for $LIBARCHIVE_DEPENDENCY... " >&6; } if test -n "$OT_DEP_LIBARCHIVE_CFLAGS"; then pkg_cv_OT_DEP_LIBARCHIVE_CFLAGS="$OT_DEP_LIBARCHIVE_CFLAGS" @@ -16790,7 +16813,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -16817,7 +16840,7 @@ Alternatively, you may set the environment variables OT_DEP_LIBARCHIVE_CFLAGS and OT_DEP_LIBARCHIVE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -16912,8 +16935,8 @@ $as_echo "#define HAVE_SELINUX 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_SELINUX" >&5 -$as_echo_n "checking for OT_DEP_SELINUX... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SELINUX_DEPENDENCY" >&5 +$as_echo_n "checking for $SELINUX_DEPENDENCY... " >&6; } if test -n "$OT_DEP_SELINUX_CFLAGS"; then pkg_cv_OT_DEP_SELINUX_CFLAGS="$OT_DEP_SELINUX_CFLAGS" @@ -16953,7 +16976,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -16980,7 +17003,7 @@ Alternatively, you may set the environment variables OT_DEP_SELINUX_CFLAGS and OT_DEP_SELINUX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17079,8 +17102,8 @@ if test x$with_openssl != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CRYPTO" >&5 -$as_echo_n "checking for OT_DEP_CRYPTO... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $OPENSSL_DEPENDENCY" >&5 +$as_echo_n "checking for $OPENSSL_DEPENDENCY... " >&6; } if test -n "$OT_DEP_CRYPTO_CFLAGS"; then pkg_cv_OT_DEP_CRYPTO_CFLAGS="$OT_DEP_CRYPTO_CFLAGS" @@ -17120,7 +17143,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17147,7 +17170,7 @@ Alternatively, you may set the environment variables OT_DEP_CRYPTO_CFLAGS and OT_DEP_CRYPTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17194,8 +17217,8 @@ if test $with_crypto = gnutls ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CRYPTO" >&5 -$as_echo_n "checking for OT_DEP_CRYPTO... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GNUTLS_DEPENDENCY" >&5 +$as_echo_n "checking for $GNUTLS_DEPENDENCY... " >&6; } if test -n "$OT_DEP_CRYPTO_CFLAGS"; then pkg_cv_OT_DEP_CRYPTO_CFLAGS="$OT_DEP_CRYPTO_CFLAGS" @@ -17235,7 +17258,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17262,7 +17285,7 @@ Alternatively, you may set the environment variables OT_DEP_CRYPTO_CFLAGS and OT_DEP_CRYPTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17337,8 +17360,8 @@ $as_echo "#define HAVE_AVAHI 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_AVAHI" >&5 -$as_echo_n "checking for OT_DEP_AVAHI... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $AVAHI_DEPENDENCY" >&5 +$as_echo_n "checking for $AVAHI_DEPENDENCY... " >&6; } if test -n "$OT_DEP_AVAHI_CFLAGS"; then pkg_cv_OT_DEP_AVAHI_CFLAGS="$OT_DEP_AVAHI_CFLAGS" @@ -17378,7 +17401,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17405,7 +17428,7 @@ Alternatively, you may set the environment variables OT_DEP_AVAHI_CFLAGS and OT_DEP_AVAHI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17486,8 +17509,8 @@ $as_echo "#define HAVE_LIBMOUNT 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBMOUNT" >&5 -$as_echo_n "checking for OT_DEP_LIBMOUNT... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBMOUNT_DEPENDENCY" >&5 +$as_echo_n "checking for $LIBMOUNT_DEPENDENCY... " >&6; } if test -n "$OT_DEP_LIBMOUNT_CFLAGS"; then pkg_cv_OT_DEP_LIBMOUNT_CFLAGS="$OT_DEP_LIBMOUNT_CFLAGS" @@ -17527,7 +17550,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17554,7 +17577,7 @@ Alternatively, you may set the environment variables OT_DEP_LIBMOUNT_CFLAGS and OT_DEP_LIBMOUNT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17622,8 +17645,8 @@ if test x$enable_rofiles_fuse != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILDOPT_FUSE" >&5 -$as_echo_n "checking for BUILDOPT_FUSE... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FUSE_DEPENDENCY" >&5 +$as_echo_n "checking for $FUSE_DEPENDENCY... " >&6; } if test -n "$BUILDOPT_FUSE_CFLAGS"; then pkg_cv_BUILDOPT_FUSE_CFLAGS="$BUILDOPT_FUSE_CFLAGS" @@ -17663,7 +17686,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17690,7 +17713,7 @@ Alternatively, you may set the environment variables BUILDOPT_FUSE_CFLAGS and BUILDOPT_FUSE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17809,8 +17832,8 @@ $as_echo "#define HAVE_LIBSYSTEMD 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSYSTEMD" >&5 -$as_echo_n "checking for LIBSYSTEMD... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5 +$as_echo_n "checking for libsystemd... " >&6; } if test -n "$LIBSYSTEMD_CFLAGS"; then pkg_cv_LIBSYSTEMD_CFLAGS="$LIBSYSTEMD_CFLAGS" @@ -17850,7 +17873,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -17877,7 +17900,7 @@ Alternatively, you may set the environment variables LIBSYSTEMD_CFLAGS and LIBSYSTEMD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -17925,6 +17948,11 @@ fi systemdsystemunitdir=$with_systemdsystemunitdir +cat >>confdefs.h <<_ACEOF +#define SYSTEM_DATA_UNIT_PATH "$with_systemdsystemunitdir" +_ACEOF + + fi # Check whether --with-systemdsystemgeneratordir was given. @@ -18854,7 +18882,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libostree $as_me 2021.2, which was +This file was extended by libostree $as_me 2021.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18920,7 +18948,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libostree config.status 2021.2 +libostree config.status 2021.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20045,7 +20073,6 @@ See \`config.log' for more details" "$LINENO" 5; } cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff --git a/configure.ac b/configure.ac index e8108732..c3f700ad 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. m4_define([year_version], [2021]) -m4_define([release_version], [2]) +m4_define([release_version], [3]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes @@ -109,7 +109,7 @@ AM_PATH_GLIB_2_0(,,AC_MSG_ERROR([GLib not found])) dnl When bumping the gio-unix-2.0 dependency (or glib-2.0 in general), dnl remember to bump GLIB_VERSION_MIN_REQUIRED and dnl GLIB_VERSION_MAX_ALLOWED in Makefile.am -GIO_DEPENDENCY="gio-unix-2.0 >= 2.40.0" +GIO_DEPENDENCY="gio-unix-2.0 >= 2.44.0" PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY) dnl 5.1.0 is an arbitrary version here @@ -499,6 +499,7 @@ AS_IF([test "x$with_libsystemd" = "xyes"], [ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) + AC_DEFINE_UNQUOTED([SYSTEM_DATA_UNIT_PATH], ["$with_systemdsystemunitdir"], ["unit path"]) ]) AC_ARG_WITH([systemdsystemgeneratordir], AS_HELP_STRING([--with-systemdsystemgeneratordir=DIR], [Directory for systemd generators]), diff --git a/man/ostree-admin-deploy.xml b/man/ostree-admin-deploy.xml index 396d9016..fbb8b96a 100644 --- a/man/ostree-admin-deploy.xml +++ b/man/ostree-admin-deploy.xml @@ -146,12 +146,12 @@ Boston, MA 02111-1307, USA. $ ostree admin status * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime -$ ostree admin deploy gnome-ostree/buildmaster/x86_64-runtime +$ ostree admin deploy gnome-ostree/buildmain/x86_64-runtime ostadmin: Creating deployment /ostree/deploy/gnome-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07.1 ostadmin: Processing /etc: 3 modified, 0 removed, 29 added @@ -161,9 +161,9 @@ Boston, MA 02111-1307, USA. $ ostree admin status gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.1 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime diff --git a/man/ostree-admin-set-origin.xml b/man/ostree-admin-set-origin.xml index ffa5cd20..c52c410c 100644 --- a/man/ostree-admin-set-origin.xml +++ b/man/ostree-admin-set-origin.xml @@ -93,6 +93,6 @@ Boston, MA 02111-1307, USA. Example - $ ostree admin set-origin exampleos http://os.example.com/repo exampleos/10.0/master/router + $ ostree admin set-origin exampleos http://os.example.com/repo exampleos/10.0/main/router diff --git a/man/ostree-admin-status.xml b/man/ostree-admin-status.xml index 096c0dae..020c601a 100644 --- a/man/ostree-admin-status.xml +++ b/man/ostree-admin-status.xml @@ -68,9 +68,9 @@ Boston, MA 02111-1307, USA. $ ostree admin status * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime diff --git a/man/ostree-admin-undeploy.xml b/man/ostree-admin-undeploy.xml index 818f12da..4fde382f 100644 --- a/man/ostree-admin-undeploy.xml +++ b/man/ostree-admin-undeploy.xml @@ -68,9 +68,9 @@ Boston, MA 02111-1307, USA. $ ostree admin status * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime $ ostree admin undeploy 1 @@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. $ ostree admin status * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 - origin refspec: gnome-ostree/buildmaster/x86_64-runtime + origin refspec: gnome-ostree/buildmain/x86_64-runtime diff --git a/man/ostree-refs.xml b/man/ostree-refs.xml index 0ba6b1d7..62aac5ce 100644 --- a/man/ostree-refs.xml +++ b/man/ostree-refs.xml @@ -144,7 +144,7 @@ Boston, MA 02111-1307, USA. $ ostree refs my-branch - gnome-ostree/buildmaster/x86_64-runtime + gnome-ostree/buildmain/x86_64-runtime diff --git a/src/boot/ostree-remount.service b/src/boot/ostree-remount.service index af40453c..a54114f9 100644 --- a/src/boot/ostree-remount.service +++ b/src/boot/ostree-remount.service @@ -28,7 +28,7 @@ After=systemd-remount-fs.service # But we run *before* most other core bootup services that need write access to /etc and /var Before=local-fs.target umount.target Before=systemd-random-seed.service plymouth-read-write.service systemd-journal-flush.service -Before=systemd-tmpfiles-setup.service +Before=systemd-tmpfiles-setup.service systemd-rfkill.service systemd-rfkill.socket [Service] Type=oneshot diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym index 9a45c0d8..becdfc55 100644 --- a/src/libostree/libostree-released.sym +++ b/src/libostree/libostree-released.sym @@ -653,6 +653,14 @@ global: ostree_content_writer_finish; } LIBOSTREE_2021.1; +LIBOSTREE_2021.3 { +global: + ostree_repo_auto_lock_push; + ostree_repo_auto_lock_cleanup; + ostree_repo_lock_push; + ostree_repo_lock_pop; +} LIBOSTREE_2021.2; + /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. */ diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 83f409ba..6a7c2afa 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -160,11 +160,11 @@ ostree_validate_checksum_string (const char *sha256, * @out_ref: (out) (not nullable) (optional): Return location for the ref name * @error: Error * - * Split a refspec like `gnome-ostree:gnome-ostree/buildmaster` or just - * `gnome-ostree/buildmaster` into two parts. In the first case, @out_remote - * will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmaster`. + * Split a refspec like `gnome-ostree:gnome-ostree/buildmain` or just + * `gnome-ostree/buildmain` into two parts. In the first case, @out_remote + * will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmain`. * In the second case (a local ref), @out_remote will be %NULL, and @out_ref - * will be `gnome-ostree/buildmaster`. In both cases, %TRUE will be returned. + * will be `gnome-ostree/buildmain`. In both cases, %TRUE will be returned. * * Returns: %TRUE on successful parsing, %FALSE otherwise */ diff --git a/src/libostree/ostree-fetcher-uri.c b/src/libostree/ostree-fetcher-uri.c index 485ed187..a08c623e 100644 --- a/src/libostree/ostree-fetcher-uri.c +++ b/src/libostree/ostree-fetcher-uri.c @@ -117,3 +117,21 @@ _ostree_fetcher_uri_to_string (OstreeFetcherURI *uri) { return soup_uri_to_string ((SoupURI*)uri, FALSE); } + + +/* Only accept http, https, and file; particularly curl has a ton of other + * backends like sftp that we don't want, and this also gracefully filters + * out invalid input. + */ +gboolean +_ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error) +{ + const char *scheme = soup_uri_get_scheme ((SoupURI*)uri); + // TODO only allow file if explicitly requested by a higher level + if (!(g_str_equal (scheme, "http") || g_str_equal (scheme, "https") || g_str_equal (scheme, "file"))) + { + g_autofree char *s = _ostree_fetcher_uri_to_string (uri); + return glnx_throw (error, "Invalid URI scheme in %s", s); + } + return TRUE; +} diff --git a/src/libostree/ostree-fetcher.h b/src/libostree/ostree-fetcher.h index 2065ee54..c02ac38c 100644 --- a/src/libostree/ostree-fetcher.h +++ b/src/libostree/ostree-fetcher.h @@ -90,6 +90,9 @@ _ostree_fetcher_uri_get_path (OstreeFetcherURI *uri); char * _ostree_fetcher_uri_to_string (OstreeFetcherURI *uri); +gboolean +_ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error); + GType _ostree_fetcher_get_type (void) G_GNUC_CONST; OstreeFetcher *_ostree_fetcher_new (int tmpdir_dfd, diff --git a/src/libostree/ostree-impl-system-generator.c b/src/libostree/ostree-impl-system-generator.c index cb9170b3..b5a7cde2 100644 --- a/src/libostree/ostree-impl-system-generator.c +++ b/src/libostree/ostree-impl-system-generator.c @@ -113,13 +113,43 @@ stateroot_from_ostree_cmdline (const char *ostree_cmdline, } #endif -/* Implementation of ostree-system-generator */ -gboolean -_ostree_impl_system_generator (const char *ostree_cmdline, - const char *normal_dir, - const char *early_dir, - const char *late_dir, - GError **error) +/* Forcibly enable our internal units, since we detected ostree= on the kernel cmdline */ +static gboolean +require_internal_units (const char *normal_dir, + const char *early_dir, + const char *late_dir, + GError **error) +{ +#ifdef SYSTEM_DATA_UNIT_PATH + GCancellable *cancellable = NULL; + + glnx_autofd int normal_dir_dfd = -1; + if (!glnx_opendirat (AT_FDCWD, normal_dir, TRUE, &normal_dir_dfd, error)) + return FALSE; + + if (!glnx_shutil_mkdir_p_at (normal_dir_dfd, "local-fs.target.requires", 0755, cancellable, error)) + return FALSE; + if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-remount.service", normal_dir_dfd, "local-fs.target.requires/ostree-remount.service") < 0) + return glnx_throw_errno_prefix (error, "symlinkat"); + + if (!glnx_shutil_mkdir_p_at (normal_dir_dfd, "multi-user.target.wants", 0755, cancellable, error)) + return FALSE; + if (symlinkat (SYSTEM_DATA_UNIT_PATH "/ostree-finalize-staged.path", normal_dir_dfd, "multi-user.target.wants/ostree-finalize-staged.path") < 0) + return glnx_throw_errno_prefix (error, "symlinkat"); + + return TRUE; +#else + return glnx_throw (error, "Not implemented"); +#endif +} + +/* Generate var.mount */ +static gboolean +fstab_generator (const char *ostree_cmdline, + const char *normal_dir, + const char *early_dir, + const char *late_dir, + GError **error) { #ifdef HAVE_LIBMOUNT /* Not currently cancellable, but define a var in case we care later */ @@ -225,3 +255,19 @@ _ostree_impl_system_generator (const char *ostree_cmdline, return glnx_throw (error, "Not implemented"); #endif } + +/* Implementation of ostree-system-generator */ +gboolean +_ostree_impl_system_generator (const char *ostree_cmdline, + const char *normal_dir, + const char *early_dir, + const char *late_dir, + GError **error) +{ + if (!require_internal_units (normal_dir, early_dir, late_dir, error)) + return FALSE; + if (!fstab_generator (ostree_cmdline, normal_dir, early_dir, late_dir, error)) + return FALSE; + + return TRUE; +} diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 1ac53259..c07526fc 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -1684,8 +1684,8 @@ ostree_repo_prepare_transaction (OstreeRepo *self, memset (&self->txn.stats, 0, sizeof (OstreeRepoTransactionStats)); - self->txn_locked = _ostree_repo_lock_push (self, OSTREE_REPO_LOCK_SHARED, - cancellable, error); + self->txn_locked = ostree_repo_lock_push (self, OSTREE_REPO_LOCK_SHARED, + cancellable, error); if (!self->txn_locked) return FALSE; @@ -2341,7 +2341,7 @@ ostree_repo_commit_transaction (OstreeRepo *self, if (self->txn_locked) { - if (!_ostree_repo_lock_pop (self, cancellable, error)) + if (!ostree_repo_lock_pop (self, OSTREE_REPO_LOCK_SHARED, cancellable, error)) return FALSE; self->txn_locked = FALSE; } @@ -2399,7 +2399,7 @@ ostree_repo_abort_transaction (OstreeRepo *self, if (self->txn_locked) { - if (!_ostree_repo_lock_pop (self, cancellable, error)) + if (!ostree_repo_lock_pop (self, OSTREE_REPO_LOCK_SHARED, cancellable, error)) return FALSE; self->txn_locked = FALSE; } @@ -3020,6 +3020,10 @@ create_empty_gvariant_dict (void) * * Write a commit metadata object, referencing @root_contents_checksum * and @root_metadata_checksum. + * This uses the current time as the commit timestamp, but it can be + * overridden with an explicit timestamp via the + * [standard](https://reproducible-builds.org/specs/source-date-epoch/) + * `SOURCE_DATE_EPOCH` environment flag. */ gboolean ostree_repo_write_commit (OstreeRepo *self, @@ -3032,9 +3036,26 @@ ostree_repo_write_commit (OstreeRepo *self, GCancellable *cancellable, GError **error) { - g_autoptr(GDateTime) now = g_date_time_new_now_utc (); + gint64 timestamp = 0; + const gchar *env_timestamp = g_getenv ("SOURCE_DATE_EPOCH"); + if (env_timestamp == NULL) + { + g_autoptr(GDateTime) now = g_date_time_new_now_utc (); + timestamp = g_date_time_to_unix (now); + } + else + { + gchar *ret = NULL; + errno = 0; + timestamp = g_ascii_strtoll (env_timestamp, &ret, 10); + if (errno != 0) + return glnx_throw_errno_prefix (error, "Parsing SOURCE_DATE_EPOCH"); + if (ret == env_timestamp) + return glnx_throw (error, "Failed to convert SOURCE_DATE_EPOCH"); + } + return ostree_repo_write_commit_with_time (self, parent, subject, body, - metadata, root, g_date_time_to_unix (now), + metadata, root, timestamp, out_commit, cancellable, error); } diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 14b29c0b..0cd9d8bb 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -104,6 +104,13 @@ typedef struct { fsblkcnt_t max_blocks; } OstreeRepoTxn; +typedef struct { + GMutex mutex; /* All other members should only be accessed with this held */ + int fd; /* The open file or flock file descriptor */ + guint shared; /* Number of shared locks curently held */ + guint exclusive; /* Number of exclusive locks currently held */ +} OstreeRepoLock; + typedef enum { _OSTREE_FEATURE_NO, _OSTREE_FEATURE_MAYBE, @@ -159,6 +166,8 @@ struct OstreeRepo { GWeakRef sysroot; /* Weak to avoid a circular ref; see also `is_system` */ char *remotes_config_dir; + OstreeRepoLock lock; + GMutex txn_lock; OstreeRepoTxn txn; gboolean txn_locked; @@ -506,30 +515,6 @@ _ostree_repo_maybe_regenerate_summary (OstreeRepo *self, GCancellable *cancellable, GError **error); -/* Locking APIs are currently private. - * See https://github.com/ostreedev/ostree/pull/1555 - */ -typedef enum { - OSTREE_REPO_LOCK_SHARED, - OSTREE_REPO_LOCK_EXCLUSIVE -} OstreeRepoLockType; - -gboolean _ostree_repo_lock_push (OstreeRepo *self, - OstreeRepoLockType lock_type, - GCancellable *cancellable, - GError **error); -gboolean _ostree_repo_lock_pop (OstreeRepo *self, - GCancellable *cancellable, - GError **error); - -typedef OstreeRepo OstreeRepoAutoLock; - -OstreeRepoAutoLock * _ostree_repo_auto_lock_push (OstreeRepo *self, - OstreeRepoLockType lock_type, - GCancellable *cancellable, - GError **error); -void _ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock); -G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoAutoLock, _ostree_repo_auto_lock_cleanup) gboolean _ostree_repo_parse_fsverity_config (OstreeRepo *self, GError **error); diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index 0b953628..c4ce64ab 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -204,7 +204,7 @@ ostree_repo_prune_static_deltas (OstreeRepo *self, const char *commit, GError **error) { g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); + ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); if (!lock) return FALSE; @@ -325,7 +325,7 @@ ostree_repo_traverse_reachable_refs (OstreeRepo *self, GError **error) { g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error); + ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error); if (!lock) return FALSE; @@ -400,7 +400,7 @@ ostree_repo_prune (OstreeRepo *self, GError **error) { g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); + ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); if (!lock) return FALSE; @@ -486,7 +486,7 @@ ostree_repo_prune_from_reachable (OstreeRepo *self, GError **error) { g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); + ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); if (!lock) return FALSE; diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index ab47a2a4..12409e63 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -3446,6 +3446,9 @@ compute_effective_mirrorlist (OstreeRepo *self, if (!baseuri) return FALSE; + if (!_ostree_fetcher_uri_validate (baseuri, error)) + return FALSE; + *out_mirrorlist = g_ptr_array_new_with_free_func ((GDestroyNotify) _ostree_fetcher_uri_free); g_ptr_array_add (*out_mirrorlist, g_steal_pointer (&baseuri)); diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c index e4280af0..d8c33b7c 100644 --- a/src/libostree/ostree-repo-static-delta-core.c +++ b/src/libostree/ostree-repo-static-delta-core.c @@ -1270,7 +1270,7 @@ ostree_repo_static_delta_reindex (OstreeRepo *repo, /* Protect against parallel prune operation */ g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_SHARED, cancellable, error); + ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_SHARED, cancellable, error); if (!lock) return FALSE; diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index b2347b47..b90e1c13 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -172,98 +172,84 @@ G_DEFINE_TYPE (OstreeRepo, ostree_repo, G_TYPE_OBJECT) /* Repository locking * * To guard against objects being deleted (e.g., prune) while they're in - * use by another operation is accessing them (e.g., commit), the + * use by another operation that is accessing them (e.g., commit), the * repository must be locked by concurrent writers. * - * The locking is implemented by maintaining a thread local table of - * lock stacks per repository. This allows thread safe locking since - * each thread maintains its own lock stack. See the OstreeRepoLock type - * below. + * The repository locking has several important features: * - * The actual locking is done using either open file descriptor locks or - * flock locks. This allows the locking to work with concurrent - * processes. The lock file is held on the ".lock" file within the - * repository. + * * There are 2 states - shared and exclusive. Multiple users can hold + * a shared lock concurrently while only one user can hold an + * exclusive lock. + * + * * The lock can be taken recursively so long as each acquisition is paired + * with a matching release. The recursion is also latched to the strongest + * state. Once an exclusive lock has been taken, it will remain exclusive + * until all exclusive locks have been released. + * + * * It is both multiprocess- and multithread-safe. Threads that share + * an OstreeRepo use the lock cooperatively while processes and + * threads using separate OstreeRepo structures will block when + * acquiring incompatible lock states. + * + * The actual locking is implemented using either open file descriptor + * locks or flock locks. This allows the locking to work with concurrent + * processes or concurrent threads using a separate OstreeRepo. The lock + * file is held on the ".lock" file within the repository. * * The intended usage is to take a shared lock when writing objects or * reading objects in critical sections. Exclusive locks are taken when * deleting objects. * - * To allow fine grained locking within libostree, the lock is - * maintained as a stack. The core APIs then push or pop from the stack. - * When pushing or popping a lock state identical to the existing or - * next state, the stack is simply updated. Only when upgrading or - * downgrading the lock (changing to/from unlocked, pushing exclusive on - * shared or popping exclusive to shared) are actual locking operations - * performed. + * To allow fine grained locking, the lock state is maintained in shared and + * exclusive counters. Callers then push or pop lock types to increment or + * decrement the counters. When pushing or popping a lock type identical to + * the existing or next state, the lock state is simply updated. Only when + * upgrading or downgrading the lock (changing to/from unlocked, pushing + * exclusive on shared or popping exclusive to shared) are actual locking + * operations performed. */ -static void -free_repo_lock_table (gpointer data) -{ - GHashTable *lock_table = data; - - if (lock_table != NULL) - { - g_debug ("Free lock table"); - g_hash_table_destroy (lock_table); - } -} - -static GPrivate repo_lock_table = G_PRIVATE_INIT (free_repo_lock_table); - -typedef struct { - int fd; - GQueue stack; -} OstreeRepoLock; - typedef struct { guint len; int state; const char *name; } OstreeRepoLockInfo; -static void -repo_lock_info (OstreeRepoLock *lock, OstreeRepoLockInfo *out_info) +static const char * +lock_state_name (int state) { - g_assert (lock != NULL); - g_assert (out_info != NULL); - - OstreeRepoLockInfo info; - info.len = g_queue_get_length (&lock->stack); - if (info.len == 0) + switch (state) { - info.state = LOCK_UN; - info.name = "unlocked"; + case LOCK_EX: + return "exclusive"; + case LOCK_SH: + return "shared"; + case LOCK_UN: + return "unlocked"; + default: + g_assert_not_reached (); } - else - { - info.state = GPOINTER_TO_INT (g_queue_peek_head (&lock->stack)); - info.name = (info.state == LOCK_EX) ? "exclusive" : "shared"; - } - - *out_info = info; } static void -free_repo_lock (gpointer data) +repo_lock_info (OstreeRepo *self, GMutexLocker *locker, + OstreeRepoLockInfo *out_info) { - OstreeRepoLock *lock = data; + g_assert (self != NULL); + g_assert (locker != NULL); + g_assert (out_info != NULL); - if (lock != NULL) - { - OstreeRepoLockInfo info; - repo_lock_info (lock, &info); + OstreeRepoLockInfo info; + info.len = self->lock.shared + self->lock.exclusive; + if (info.len == 0) + info.state = LOCK_UN; + else if (self->lock.exclusive > 0) + info.state = LOCK_EX; + else + info.state = LOCK_SH; + info.name = lock_state_name (info.state); - g_debug ("Free lock: state=%s, depth=%u", info.name, info.len); - g_queue_clear (&lock->stack); - if (lock->fd >= 0) - { - g_debug ("Closing repo lock file"); - (void) close (lock->fd); - } - g_free (lock); - } + *out_info = info; } /* Wrapper to handle flock vs OFD locking based on GLnxLockFile */ @@ -339,125 +325,148 @@ push_repo_lock (OstreeRepo *self, GError **error) { int flags = (lock_type == OSTREE_REPO_LOCK_EXCLUSIVE) ? LOCK_EX : LOCK_SH; + int next_state = flags; if (!blocking) flags |= LOCK_NB; - GHashTable *lock_table = g_private_get (&repo_lock_table); - if (lock_table == NULL) - { - g_debug ("Creating repo lock table"); - lock_table = g_hash_table_new_full (NULL, NULL, NULL, - (GDestroyNotify)free_repo_lock); - g_private_set (&repo_lock_table, lock_table); - } + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->lock.mutex); - OstreeRepoLock *lock = g_hash_table_lookup (lock_table, self); - if (lock == NULL) + if (self->lock.fd == -1) { - lock = g_new0 (OstreeRepoLock, 1); - g_queue_init (&lock->stack); g_debug ("Opening repo lock file"); - lock->fd = TEMP_FAILURE_RETRY (openat (self->repo_dir_fd, ".lock", - O_CREAT | O_RDWR | O_CLOEXEC, - DEFAULT_REGFILE_MODE)); - if (lock->fd < 0) - { - free_repo_lock (lock); - return glnx_throw_errno_prefix (error, - "Opening lock file %s/.lock failed", - gs_file_get_path_cached (self->repodir)); - } - g_hash_table_insert (lock_table, self, lock); + self->lock.fd = TEMP_FAILURE_RETRY (openat (self->repo_dir_fd, ".lock", + O_CREAT | O_RDWR | O_CLOEXEC, + DEFAULT_REGFILE_MODE)); + if (self->lock.fd < 0) + return glnx_throw_errno_prefix (error, + "Opening lock file %s/.lock failed", + gs_file_get_path_cached (self->repodir)); } OstreeRepoLockInfo info; - repo_lock_info (lock, &info); + repo_lock_info (self, locker, &info); g_debug ("Push lock: state=%s, depth=%u", info.name, info.len); - if (info.state == LOCK_EX) + guint *counter; + if (next_state == LOCK_EX) + counter = &(self->lock.exclusive); + else + counter = &(self->lock.shared); + + /* Check for overflow */ + if (*counter == G_MAXUINT) + g_error ("Repo lock %s counter would overflow", lock_state_name (next_state)); + + if (info.state == LOCK_EX || info.state == next_state) { - g_debug ("Repo already locked exclusively, extending stack"); - g_queue_push_head (&lock->stack, GINT_TO_POINTER (LOCK_EX)); + g_debug ("Repo already locked %s, maintaining state", info.name); } else { - int next_state = (flags & LOCK_EX) ? LOCK_EX : LOCK_SH; - const char *next_state_name = (flags & LOCK_EX) ? "exclusive" : "shared"; + /* We should never upgrade from exclusive to shared */ + g_assert (!(info.state == LOCK_EX && next_state == LOCK_SH)); + const char *next_state_name = lock_state_name (next_state); g_debug ("Locking repo %s", next_state_name); - if (!do_repo_lock (lock->fd, flags)) + if (!do_repo_lock (self->lock.fd, flags)) return glnx_throw_errno_prefix (error, "Locking repo %s failed", next_state_name); - - g_queue_push_head (&lock->stack, GINT_TO_POINTER (next_state)); } + /* Update state */ + (*counter)++; + return TRUE; } static gboolean -pop_repo_lock (OstreeRepo *self, - gboolean blocking, - GError **error) +pop_repo_lock (OstreeRepo *self, + OstreeRepoLockType lock_type, + gboolean blocking, + GError **error) { int flags = blocking ? 0 : LOCK_NB; - GHashTable *lock_table = g_private_get (&repo_lock_table); - g_return_val_if_fail (lock_table != NULL, FALSE); - - OstreeRepoLock *lock = g_hash_table_lookup (lock_table, self); - g_return_val_if_fail (lock != NULL, FALSE); - g_return_val_if_fail (lock->fd != -1, FALSE); + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->lock.mutex); + if (self->lock.fd == -1) + g_error ("Cannot pop repo never locked repo lock"); OstreeRepoLockInfo info; - repo_lock_info (lock, &info); - g_return_val_if_fail (info.len > 0, FALSE); - + repo_lock_info (self, locker, &info); g_debug ("Pop lock: state=%s, depth=%u", info.name, info.len); - if (info.len > 1) - { - int next_state = GPOINTER_TO_INT (g_queue_peek_nth (&lock->stack, 1)); - /* Drop back to the previous lock state if it differs */ - if (next_state != info.state) - { - /* We should never drop from shared to exclusive */ - g_return_val_if_fail (next_state == LOCK_SH, FALSE); - g_debug ("Returning lock state to shared"); - if (!do_repo_lock (lock->fd, next_state | flags)) - return glnx_throw_errno_prefix (error, - "Setting repo lock to shared failed"); - } - else - g_debug ("Maintaining lock state as %s", info.name); + if (info.len == 0 || info.state == LOCK_UN) + g_error ("Cannot pop already unlocked repo lock"); + + int state_to_drop; + guint *counter; + if (lock_type == OSTREE_REPO_LOCK_EXCLUSIVE) + { + state_to_drop = LOCK_EX; + counter = &(self->lock.exclusive); } else { - /* Lock stack will be empty, unlock */ - g_debug ("Unlocking repo"); - if (!do_repo_unlock (lock->fd, flags)) - return glnx_throw_errno_prefix (error, "Unlocking repo failed"); + state_to_drop = LOCK_SH; + counter = &(self->lock.shared); } - g_queue_pop_head (&lock->stack); + /* Make sure caller specified a valid type to release */ + if (*counter == 0) + g_error ("Repo %s lock pop requested, but none have been taken", + lock_state_name (state_to_drop)); + + int next_state; + if (info.len == 1) + { + /* Lock counters will be empty, unlock */ + next_state = LOCK_UN; + } + else if (state_to_drop == LOCK_EX) + next_state = (self->lock.exclusive > 1) ? LOCK_EX : LOCK_SH; + else + next_state = (self->lock.exclusive > 0) ? LOCK_EX : LOCK_SH; + + if (next_state == LOCK_UN) + { + g_debug ("Unlocking repo"); + if (!do_repo_unlock (self->lock.fd, flags)) + return glnx_throw_errno_prefix (error, "Unlocking repo failed"); + } + else if (info.state == next_state) + { + g_debug ("Maintaining lock state as %s", info.name); + } + else + { + /* We should never drop from shared to exclusive */ + g_assert (next_state == LOCK_SH); + g_debug ("Returning lock state to shared"); + if (!do_repo_lock (self->lock.fd, next_state | flags)) + return glnx_throw_errno_prefix (error, + "Setting repo lock to shared failed"); + } + + /* Update state */ + (*counter)--; return TRUE; } -/* +/** * ostree_repo_lock_push: * @self: a #OstreeRepo * @lock_type: the type of lock to acquire * @cancellable: a #GCancellable * @error: a #GError * - * Takes a lock on the repository and adds it to the lock stack. If @lock_type + * Takes a lock on the repository and adds it to the lock state. If @lock_type * is %OSTREE_REPO_LOCK_SHARED, a shared lock is taken. If @lock_type is * %OSTREE_REPO_LOCK_EXCLUSIVE, an exclusive lock is taken. The actual lock * state is only changed when locking a previously unlocked repository or - * upgrading the lock from shared to exclusive. If the requested lock state is + * upgrading the lock from shared to exclusive. If the requested lock type is * unchanged or would represent a downgrade (exclusive to shared), the lock - * state is not changed and the stack is simply updated. + * state is not changed. * * ostree_repo_lock_push() waits for the lock depending on the repository's * lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is @@ -470,12 +479,13 @@ pop_repo_lock (OstreeRepo *self, * %TRUE is returned. * * Returns: %TRUE on success, otherwise %FALSE with @error set + * Since: 2021.3 */ gboolean -_ostree_repo_lock_push (OstreeRepo *self, - OstreeRepoLockType lock_type, - GCancellable *cancellable, - GError **error) +ostree_repo_lock_push (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error) { g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE); @@ -538,16 +548,19 @@ _ostree_repo_lock_push (OstreeRepo *self, } } -/* - * _ostree_repo_lock_pop: +/** + * ostree_repo_lock_pop: * @self: a #OstreeRepo + * @lock_type: the type of lock to release * @cancellable: a #GCancellable * @error: a #GError * - * Remove the current repository lock state from the lock stack. If the lock - * stack becomes empty, the repository is unlocked. Otherwise, the lock state - * only changes when transitioning from an exclusive lock back to a shared - * lock. + * Release a lock of type @lock_type from the lock state. If the lock state + * becomes empty, the repository is unlocked. Otherwise, the lock state only + * changes when transitioning from an exclusive lock back to a shared lock. The + * requested @lock_type must be the same type that was requested in the call to + * ostree_repo_lock_push(). It is a programmer error if these do not match and + * the program may abort if the lock would reach an invalid state. * * ostree_repo_lock_pop() waits for the lock depending on the repository's * lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is @@ -560,11 +573,13 @@ _ostree_repo_lock_push (OstreeRepo *self, * %TRUE is returned. * * Returns: %TRUE on success, otherwise %FALSE with @error set + * Since: 2021.3 */ gboolean -_ostree_repo_lock_pop (OstreeRepo *self, - GCancellable *cancellable, - GError **error) +ostree_repo_lock_pop (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error) { g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE); @@ -581,7 +596,7 @@ _ostree_repo_lock_pop (OstreeRepo *self, else if (self->lock_timeout_seconds == REPO_LOCK_BLOCKING) { g_debug ("Popping lock blocking"); - return pop_repo_lock (self, TRUE, error); + return pop_repo_lock (self, lock_type, TRUE, error); } else { @@ -596,7 +611,7 @@ _ostree_repo_lock_pop (OstreeRepo *self, return FALSE; g_autoptr(GError) local_error = NULL; - if (pop_repo_lock (self, FALSE, &local_error)) + if (pop_repo_lock (self, lock_type, FALSE, &local_error)) return TRUE; if (!g_error_matches (local_error, G_IO_ERROR, @@ -627,60 +642,72 @@ _ostree_repo_lock_pop (OstreeRepo *self, } } -/* - * _ostree_repo_auto_lock_push: (skip) +struct OstreeRepoAutoLock { + OstreeRepo *repo; + OstreeRepoLockType lock_type; +}; + +/** + * ostree_repo_auto_lock_push: (skip) * @self: a #OstreeRepo * @lock_type: the type of lock to acquire * @cancellable: a #GCancellable * @error: a #GError * - * Like ostree_repo_lock_push(), but for usage with #OstreeRepoAutoLock. - * The intended usage is to declare the #OstreeRepoAutoLock with - * g_autoptr() so that ostree_repo_auto_lock_cleanup() is called when it - * goes out of scope. This will automatically pop the lock status off - * the stack if it was acquired successfully. + * Like ostree_repo_lock_push(), but for usage with #OstreeRepoAutoLock. The + * intended usage is to declare the #OstreeRepoAutoLock with g_autoptr() so + * that ostree_repo_auto_lock_cleanup() is called when it goes out of scope. + * This will automatically release the lock if it was acquired successfully. * * |[ * g_autoptr(OstreeRepoAutoLock) lock = NULL; - * lock = _ostree_repo_auto_lock_push (repo, lock_type, cancellable, error); + * lock = ostree_repo_auto_lock_push (repo, lock_type, cancellable, error); * if (!lock) * return FALSE; * ]| * * Returns: @self on success, otherwise %NULL with @error set + * Since: 2021.3 */ OstreeRepoAutoLock * -_ostree_repo_auto_lock_push (OstreeRepo *self, - OstreeRepoLockType lock_type, - GCancellable *cancellable, - GError **error) +ostree_repo_auto_lock_push (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error) { - if (!_ostree_repo_lock_push (self, lock_type, cancellable, error)) + if (!ostree_repo_lock_push (self, lock_type, cancellable, error)) return NULL; - return (OstreeRepoAutoLock *)self; + + OstreeRepoAutoLock *auto_lock = g_new (OstreeRepoAutoLock, 1); + auto_lock->repo = self; + auto_lock->lock_type = lock_type; + return auto_lock; } -/* - * _ostree_repo_auto_lock_cleanup: (skip) +/** + * ostree_repo_auto_lock_cleanup: (skip) * @lock: a #OstreeRepoAutoLock * * A cleanup handler for use with ostree_repo_auto_lock_push(). If @lock is * not %NULL, ostree_repo_lock_pop() will be called on it. If * ostree_repo_lock_pop() fails, a critical warning will be emitted. + * + * Since: 2021.3 */ void -_ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock) +ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *auto_lock) { - OstreeRepo *repo = lock; - if (repo) + if (auto_lock != NULL) { g_autoptr(GError) error = NULL; int errsv = errno; - if (!_ostree_repo_lock_pop (repo, NULL, &error)) + if (!ostree_repo_lock_pop (auto_lock->repo, auto_lock->lock_type, NULL, &error)) g_critical ("Cleanup repo lock failed: %s", error->message); errno = errsv; + + g_free (auto_lock); } } @@ -1052,13 +1079,8 @@ ostree_repo_finalize (GObject *object) g_clear_pointer (&self->remotes, g_hash_table_destroy); g_mutex_clear (&self->remotes_lock); - GHashTable *lock_table = g_private_get (&repo_lock_table); - if (lock_table) - { - g_hash_table_remove (lock_table, self); - if (g_hash_table_size (lock_table) == 0) - g_private_replace (&repo_lock_table, NULL); - } + glnx_close_fd (&self->lock.fd); + g_mutex_clear (&self->lock.mutex); G_OBJECT_CLASS (ostree_repo_parent_class)->finalize (object); } @@ -1220,6 +1242,7 @@ ostree_repo_init (OstreeRepo *self) self->test_error_flags = g_parse_debug_string (g_getenv ("OSTREE_REPO_TEST_ERROR"), test_error_keys, G_N_ELEMENTS (test_error_keys)); + g_mutex_init (&self->lock.mutex); g_mutex_init (&self->cache_lock); g_mutex_init (&self->txn_lock); @@ -1233,6 +1256,7 @@ ostree_repo_init (OstreeRepo *self) self->tmp_dir_fd = -1; self->objects_dir_fd = -1; self->uncompressed_objects_dir_fd = -1; + self->lock.fd = -1; self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_UNKNOWN; } @@ -3291,7 +3315,7 @@ ostree_repo_open (OstreeRepo *self, if (!glnx_opendirat (self->repo_dir_fd, "tmp", TRUE, &self->tmp_dir_fd, error)) return FALSE; - if (self->writable) + if (self->writable && getenv ("OSTREE_SKIP_CACHE") == NULL) { if (!glnx_shutil_mkdir_p_at (self->tmp_dir_fd, _OSTREE_CACHE_DIR, DEFAULT_DIRECTORY_MODE, cancellable, error)) return FALSE; @@ -5791,8 +5815,8 @@ ostree_repo_regenerate_summary (OstreeRepo *self, g_autoptr(OstreeRepoAutoLock) lock = NULL; gboolean no_deltas_in_summary = FALSE; - lock = _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, - cancellable, error); + lock = ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, + cancellable, error); if (!lock) return FALSE; diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index f94d70be..08d3d408 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -1498,6 +1498,57 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo *self, GCancellable *cancellable, GError **error); + +/** + * OstreeRepoLockType: + * @OSTREE_REPO_LOCK_SHARED: A "read only" lock; multiple readers are allowed. + * @OSTREE_REPO_LOCK_EXCLUSIVE: A writable lock at most one writer can be active, and zero readers. + * + * Flags controlling repository locking. + * + * Since: 2021.3 + */ +typedef enum { + OSTREE_REPO_LOCK_SHARED, + OSTREE_REPO_LOCK_EXCLUSIVE +} OstreeRepoLockType; + +_OSTREE_PUBLIC +gboolean ostree_repo_lock_push (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error); +_OSTREE_PUBLIC +gboolean ostree_repo_lock_pop (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error); + +/* C convenience API only */ +#ifndef __GI_SCANNER__ + +/** + * OstreeRepoAutoLock: (skip) + * + * An opaque type for use with ostree_repo_auto_lock_push(). + * + * Since: 2021.3 + */ +typedef struct OstreeRepoAutoLock OstreeRepoAutoLock; + +_OSTREE_PUBLIC +OstreeRepoAutoLock * ostree_repo_auto_lock_push (OstreeRepo *self, + OstreeRepoLockType lock_type, + GCancellable *cancellable, + GError **error); + +_OSTREE_PUBLIC +void ostree_repo_auto_lock_cleanup (OstreeRepoAutoLock *lock); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoAutoLock, ostree_repo_auto_lock_cleanup) + +#endif + + /** * OSTREE_REPO_METADATA_REF: * diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c index 27122834..91381cb0 100644 --- a/src/libostree/ostree-sysroot-cleanup.c +++ b/src/libostree/ostree-sysroot-cleanup.c @@ -505,7 +505,7 @@ ostree_sysroot_cleanup_prune_repo (OstreeSysroot *sysroot, * the prune. */ g_autoptr(OstreeRepoAutoLock) lock = - _ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); + ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_EXCLUSIVE, cancellable, error); if (!lock) return FALSE; diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 32748a62..6a13a41b 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2632,6 +2632,39 @@ _ostree_deployment_set_bootconfig_from_kargs (OstreeDeployment *deployment, } } +// Perform some basic static analysis and emit warnings for things +// that are likely to fail later. This function only returns +// a hard error if something unexpected (e.g. I/O error) occurs. +static gboolean +lint_deployment_fs (OstreeSysroot *self, + OstreeDeployment *deployment, + int deployment_dfd, + GCancellable *cancellable, + GError **error) +{ + g_auto(GLnxDirFdIterator) dfd_iter = { 0, }; + glnx_autofd int dest_dfd = -1; + gboolean exists; + + if (!ot_dfd_iter_init_allow_noent (deployment_dfd, "var", &dfd_iter, &exists, error)) + return FALSE; + while (exists) + { + struct dirent *dent; + + if (!glnx_dirfd_iterator_next_dent (&dfd_iter, &dent, cancellable, error)) + return FALSE; + if (dent == NULL) + break; + + fprintf (stderr, "note: Deploying commit %s which contains content in /var/%s that will be ignored.\n", + ostree_deployment_get_csum (deployment), + dent->d_name); + } + + return TRUE; +} + /* The first part of writing a deployment. This primarily means doing the * hardlink farm checkout, but we also compute some initial state. */ @@ -2680,6 +2713,9 @@ sysroot_initialize_deployment (OstreeSysroot *self, cancellable, error)) return FALSE; + if (!lint_deployment_fs (self, new_deployment, deployment_dfd, cancellable, error)) + return FALSE; + ot_transfer_out_value (out_new_deployment, &new_deployment); return TRUE; } @@ -3070,28 +3106,6 @@ ostree_sysroot_stage_tree_with_options (OstreeSysroot *self, if (booted_deployment == NULL) return glnx_prefix_error (error, "Cannot stage deployment"); - /* This is used by the testsuite to exercise the path unit, until it becomes the default - * (which is pending on the preset making it everywhere). */ - if ((self->debug_flags & OSTREE_SYSROOT_DEBUG_TEST_STAGED_PATH) == 0) - { - /* This is a bit of a hack. When adding a new service we have to end up getting - * into the presets for downstream distros; see e.g. https://src.fedoraproject.org/rpms/ostree/pull-request/7 - * - * Then again, it's perhaps a bit nicer to only start the service on-demand anyways. - */ - const char *const systemctl_argv[] = {"systemctl", "start", "ostree-finalize-staged.service", NULL}; - int estatus; - if (!g_spawn_sync (NULL, (char**)systemctl_argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, NULL, &estatus, error)) - return FALSE; - if (!g_spawn_check_exit_status (estatus, error)) - return FALSE; - } - else - { - g_print ("test-staged-path: Not running `systemctl start`\n"); - } /* OSTREE_SYSROOT_DEBUG_TEST_STAGED_PATH */ - g_autoptr(OstreeDeployment) deployment = NULL; if (!sysroot_initialize_deployment (self, osname, revision, origin, opts, &deployment, cancellable, error)) diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h index 641f0533..bf3ecf32 100644 --- a/src/libostree/ostree-sysroot-private.h +++ b/src/libostree/ostree-sysroot-private.h @@ -37,8 +37,7 @@ typedef enum { OSTREE_SYSROOT_DEBUG_TEST_FIFREEZE = 1 << 2, /* This is a temporary flag until we fully drop the explicit `systemctl start * ostree-finalize-staged.service` so that tests can exercise the new path unit. */ - OSTREE_SYSROOT_DEBUG_TEST_STAGED_PATH = 1 << 3, - OSTREE_SYSROOT_DEBUG_TEST_NO_DTB = 1 << 4, /* https://github.com/ostreedev/ostree/issues/2154 */ + OSTREE_SYSROOT_DEBUG_TEST_NO_DTB = 1 << 3, /* https://github.com/ostreedev/ostree/issues/2154 */ } OstreeSysrootDebugFlags; typedef enum { diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index b0ae66cf..2fcd4323 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -190,7 +190,6 @@ ostree_sysroot_init (OstreeSysroot *self) { "mutable-deployments", OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS }, { "test-fifreeze", OSTREE_SYSROOT_DEBUG_TEST_FIFREEZE }, { "no-xattrs", OSTREE_SYSROOT_DEBUG_NO_XATTRS }, - { "test-staged-path", OSTREE_SYSROOT_DEBUG_TEST_STAGED_PATH }, { "no-dtb", OSTREE_SYSROOT_DEBUG_TEST_NO_DTB }, }; @@ -1063,7 +1062,7 @@ _ostree_sysroot_reload_staged (OstreeSysroot *self, return TRUE; } -/* Loads the current bootversion, subbootversion, and deplyments, starting from the +/* Loads the current bootversion, subbootversion, and deployments, starting from the * bootloader configs which are the source of truth. */ static gboolean diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h index be4250d9..6d971306 100644 --- a/src/libostree/ostree-version.h +++ b/src/libostree/ostree-version.h @@ -43,7 +43,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (2) +#define OSTREE_RELEASE_VERSION (3) /** * OSTREE_VERSION @@ -52,7 +52,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2021.2) +#define OSTREE_VERSION (2021.3) /** * OSTREE_VERSION_S: @@ -62,7 +62,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2021.2" +#define OSTREE_VERSION_S "2021.3" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) @@ -100,4 +100,4 @@ * * Since: 2019.3 */ -#define OSTREE_BUILT_FEATURES "libcurl libsoup gpgme ex-fsverity libarchive selinux openssl libmount systemd release p2p" +#define OSTREE_BUILT_FEATURES "libsoup gpgme ex-fsverity libarchive selinux avahi libmount systemd release p2p" diff --git a/tests/admin-test.sh b/tests/admin-test.sh index a7016a87..dd5ffd14 100644 --- a/tests/admin-test.sh +++ b/tests/admin-test.sh @@ -53,11 +53,11 @@ assert_ostree_deployment_refs() { } orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) assert_not_streq "${orig_mtime}" "${new_mtime}" ${CMD_PREFIX} ostree admin status | tee status.txt @@ -66,9 +66,9 @@ assert_not_file_has_content status.txt "rollback" validate_bootloader # Test the bootable and linux keys -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.linux show testos:testos/buildmaster/x86_64-runtime >out.txt +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.linux show testos:testos/buildmain/x86_64-runtime >out.txt assert_file_has_content_literal out.txt 3.6.0 -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.bootable show testos:testos/buildmaster/x86_64-runtime >out.txt +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.bootable show testos:testos/buildmain/x86_64-runtime >out.txt assert_file_has_content_literal out.txt true echo "ok deploy command" @@ -92,14 +92,14 @@ assert_ostree_deployment_refs 1/1/0 ${CMD_PREFIX} ostree admin status echo "ok layout" -if ${CMD_PREFIX} ostree admin deploy --stage --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then +if ${CMD_PREFIX} ostree admin deploy --stage --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then fatal "staged when not booted" fi assert_file_has_content_literal err.txt "Cannot stage deployment: Not currently booted into an OSTree system" echo "ok staging does not work when not booted" orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) assert_not_streq "${orig_mtime}" "${new_mtime}" # Need a new bootversion, sine we now have two deployments @@ -119,7 +119,7 @@ validate_bootloader echo "ok second deploy" -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime # Keep the same bootversion assert_has_dir sysroot/boot/loader.0 assert_not_has_dir sysroot/boot/loader.1 @@ -134,7 +134,7 @@ echo "ok third deploy (swap)" ${CMD_PREFIX} ostree admin os-init otheros -${CMD_PREFIX} ostree admin deploy --os=otheros testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=otheros testos/buildmain/x86_64-runtime assert_not_has_dir sysroot/boot/loader.0 assert_has_dir sysroot/boot/loader.1 assert_has_file sysroot/boot/loader/entries/ostree-2-testos.conf @@ -147,7 +147,7 @@ validate_bootloader echo "ok independent deploy" -${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/loader.0 assert_not_has_dir sysroot/boot/loader.1 assert_has_file sysroot/boot/loader/entries/ostree-4-testos.conf @@ -164,7 +164,7 @@ echo "a new local config file" > sysroot/ostree/deploy/testos/deploy/${rev}.3/et rm -r sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/testdirectory rm sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/aconfigfile ln -s /ENOENT sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/a-new-broken-symlink -${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime assert_not_has_dir sysroot/boot/loader.0 assert_has_dir sysroot/boot/loader.1 link=sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/a-new-broken-symlink @@ -189,7 +189,7 @@ done assert_has_file sysroot/boot/loader/entries/ostree-1-testos.conf assert_not_has_file sysroot/boot/loader/entries/ostree-2-testos.conf assert_not_has_file sysroot/boot/loader/entries/ostree-3-otheros.conf -${CMD_PREFIX} ostree admin deploy --not-as-default --os=otheros testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --not-as-default --os=otheros testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/loader.0 assert_not_has_dir sysroot/boot/loader.1 assert_has_file sysroot/boot/loader/entries/ostree-2-testos.conf @@ -199,7 +199,7 @@ validate_bootloader echo "ok deploy --not-as-default" -${CMD_PREFIX} ostree admin deploy --retain-rollback --os=otheros testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --retain-rollback --os=otheros testos:testos/buildmain/x86_64-runtime assert_not_has_dir sysroot/boot/loader.0 assert_has_dir sysroot/boot/loader.1 assert_has_file sysroot/boot/loader/entries/ostree-3-otheros.conf @@ -211,12 +211,12 @@ validate_bootloader echo "ok deploy --retain-rollback" os_repository_new_commit -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-runtime) export newrev assert_not_streq ${rev} ${newrev} -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS' # New files in /usr/etc assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/a-new-default-config-file "a new default config file" @@ -234,24 +234,24 @@ if env OSTREE_EX_STAGE_DEPLOYMENTS=1 ${CMD_PREFIX} ostree admin upgrade --os=tes fi echo "ok upgrade failed when staged" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos origrev=${rev} rev=${newrev} -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_not_streq ${rev} ${newrev} assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS' ${CMD_PREFIX} ostree admin status validate_bootloader ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo refs testos:testos > reftest.txt -assert_file_has_content reftest.txt testos:buildmaster/x86_64-runtime +assert_file_has_content reftest.txt testos:buildmain/x86_64-runtime echo "ok upgrade" originfile=$(${CMD_PREFIX} ostree admin --print-current-dir).origin cp ${originfile} saved-origin ${CMD_PREFIX} ostree admin set-origin --index=0 bacon --set=gpg-verify=false http://tasty.com -assert_file_has_content "${originfile}" "bacon:testos/buildmaster/x86_64-runtime" +assert_file_has_content "${originfile}" "bacon:testos/buildmain/x86_64-runtime" ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt assert_file_has_content remotes.txt 'bacon.*http://tasty\.com' cp saved-origin ${originfile} @@ -272,22 +272,22 @@ validate_bootloader echo "ok undeploy" -if ${CMD_PREFIX} ostree admin deploy --os=unknown testos:testos/buildmaster/x86_64-runtime; then +if ${CMD_PREFIX} ostree admin deploy --os=unknown testos:testos/buildmain/x86_64-runtime; then assert_not_reached "Unexpected successful deploy of unknown OS" fi echo "ok deploy with unknown OS" -${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=console=/dev/foo --karg-append=console=/dev/bar testos:testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=console=/dev/foo --karg-append=console=/dev/bar testos:testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf 'console=/dev/foo.*console=/dev/bar' validate_bootloader echo "ok deploy with multiple kernel args" -origrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +origrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) os_repository_new_commit 0 "test upgrade multiple kernel args" ${CMD_PREFIX} ostree admin upgrade --os=testos -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_not_streq ${origrev} ${newrev} assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf 'console=/dev/foo.*console=/dev/bar' validate_bootloader @@ -297,7 +297,7 @@ echo "ok upgrade with multiple kernel args" os_repository_new_commit ${CMD_PREFIX} ostree admin upgrade --os=testos assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 ${version} (ostree:testos:0)$" -os_repository_new_commit 0 0 testos/buildmaster/x86_64-runtime 42 +os_repository_new_commit 0 0 testos/buildmain/x86_64-runtime 42 ${CMD_PREFIX} ostree admin upgrade --os=testos assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 (ostree:testos:0)$" @@ -310,8 +310,8 @@ sleep 1 os_repository_new_commit # upgrade to the latest ${CMD_PREFIX} ostree admin upgrade --os=testos -head_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime) -prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime^) +head_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime) +prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime^) assert_not_streq ${head_rev} ${prev_rev} # Don't use `ostree admin status | head -n 1` directly here because `head` # exiting early might cause SIGPIPE to ostree, which with `set -euo pipefail` @@ -342,14 +342,14 @@ sleep 1 os_repository_new_commit sleep 1 os_repository_new_commit -${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmaster/x86_64-runtime -curr_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime) -prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime^) +${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmain/x86_64-runtime +curr_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime) +prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime^) ${CMD_PREFIX} ostree admin upgrade --os=testos --override-commit=${prev_rev} echo "ok upgrade to newer version older than branch tip" ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" \ - --add-metadata-string 'ostree.source-title=libtest os_repository_new_commit()' -b testos/buildmaster/x86_64-runtime \ + --add-metadata-string 'ostree.source-title=libtest os_repository_new_commit()' -b testos/buildmain/x86_64-runtime \ -s "Build" --tree=dir=${test_tmpdir}/osdata ${CMD_PREFIX} ostree admin upgrade --os=testos ${CMD_PREFIX} ostree admin status | tee status.txt @@ -381,7 +381,7 @@ assert_file_has_content sysroot/ostree/repo/config remote-test-config-dir echo "ok remote add nonphysical sysroot add-remotes-config-dir false" if env OSTREE_SYSROOT_DEBUG="${OSTREE_SYSROOT_DEBUG},test-fifreeze" \ - ${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then + ${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then fatal "fifreeze-test exited successfully?" fi assert_file_has_content err.txt "fifreeze watchdog was run" diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 75333f4d..03f2cb1b 100644 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -1017,7 +1017,7 @@ if ! skip_one_without_user_xattrs; then fi cd ${test_tmpdir} -${CMD_PREFIX} ostree --repo=repo remote --set=tls-permissive=true add aremote http://remote.example.com/repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=repo remote --set=tls-permissive=true add aremote http://remote.example.com/repo testos/buildmain/x86_64-runtime assert_file_has_content repo/config 'tls-permissive=true' assert_file_has_content repo/config 'remote\.example\.com' echo "ok remote add with set" diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh index 64b3e0a3..9632e905 100644 --- a/tests/libtest-core.sh +++ b/tests/libtest-core.sh @@ -5,7 +5,8 @@ # # Known copies are in the following repos: # -# - https://github.com/projectatomic/rpm-ostree +# - https://github.com/containers/bubblewrap +# - https://github.com/coreos/rpm-ostree # # Copyright (C) 2017 Colin Walters # @@ -83,6 +84,18 @@ _fatal_print_file() { fatal "$@" } +_fatal_print_files() { + file1="$1" + shift + file2="$1" + shift + ls -al "$file1" >&2 + sed -e 's/^/# /' < "$file1" >&2 + ls -al "$file2" >&2 + sed -e 's/^/# /' < "$file2" >&2 + fatal "$@" +} + assert_not_has_file () { if test -f "$1"; then _fatal_print_file "$1" "File '$1' exists" @@ -156,8 +169,22 @@ assert_file_empty() { fi } +assert_files_equal() { + if ! cmp "$1" "$2"; then + _fatal_print_files "$1" "$2" "File '$1' and '$2' is not equal" + fi +} + # Use to skip all of these tests skip() { echo "1..0 # SKIP" "$@" exit 0 } + +report_err () { + local exit_status="$?" + { { local BASH_XTRACEFD=3; } 2> /dev/null + echo "Unexpected nonzero exit status $exit_status while running: $BASH_COMMAND" >&2 + } 3> /dev/null +} +trap report_err ERR diff --git a/tests/libtest.sh b/tests/libtest.sh index eda3b921..260b8d1d 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -78,6 +78,11 @@ unset TAR_OPTIONS # easily clean up. export OSTREE_SYSROOT_DEBUG=mutable-deployments +# By default, don't use a cache directory since it makes the tests racy. +# Tests that are explicitly testing the cache operation should unset +# this. +export OSTREE_SKIP_CACHE=1 + export TEST_GPG_KEYID_1="7FCA23D8472CDAFA" export TEST_GPG_KEYFPR_1="5E65DE75AB1C501862D476347FCA23D8472CDAFA" export TEST_GPG_KEYID_2="D8228CFECA950D41" @@ -442,12 +447,12 @@ EOF mkdir -p usr/etc/testdirectory echo "a default daemon file" > usr/etc/testdirectory/test - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build" + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build" # Ensure these commits have distinct second timestamps sleep 2 echo "a new executable" > usr/bin/sh - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.10 -b testos/buildmain/x86_64-runtime -s "Build" cd ${test_tmpdir} rm -rf osdata-devel @@ -456,7 +461,7 @@ EOF cd osdata-devel mkdir -p usr/include echo "a development header" > usr/include/foo.h - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-devel -s "Build" + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-devel -s "Build" ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo fsck -q @@ -503,7 +508,7 @@ os_repository_new_commit () { boot_checksum_iteration=${1:-0} content_iteration=${2:-0} - branch=${3:-testos/buildmaster/x86_64-runtime} + branch=${3:-testos/buildmain/x86_64-runtime} export version=${4:-$(date "+%Y%m%d.${content_iteration}")} echo "BOOT ITERATION: $boot_checksum_iteration" cd ${test_tmpdir}/osdata diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 5e719bf8..274bd978 100644 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -55,10 +55,10 @@ function verify_initial_contents() { } if has_gpgme; then - echo "1..36" + echo "1..37" else # 3 tests needs GPG support - echo "1..33" + echo "1..34" fi # Try both syntaxes @@ -142,6 +142,14 @@ ${CMD_PREFIX} ostree --repo=mirrorrepo pull origin main ${CMD_PREFIX} ostree --repo=mirrorrepo fsck echo "ok pull (refuses deltas)" +${CMD_PREFIX} ostree --repo=mirrorrepo remote add broken badscheme://something +if ${CMD_PREFIX} ostree --repo=mirrorrepo pull broken main 2>err.txt; then + assert_not_reached "pulled from invalid" +fi +assert_file_has_content_literal err.txt "Invalid URI scheme in badscheme://something" +${CMD_PREFIX} ostree --repo=mirrorrepo remote delete broken +echo "ok clean error on invalid scheme" + cd ${test_tmpdir} rm mirrorrepo/refs/remotes/* -rf ${CMD_PREFIX} ostree --repo=mirrorrepo prune --refs-only diff --git a/tests/test-admin-deploy-2.sh b/tests/test-admin-deploy-2.sh index 6df4877c..33c38988 100755 --- a/tests/test-admin-deploy-2.sh +++ b/tests/test-admin-deploy-2.sh @@ -28,11 +28,11 @@ setup_os_repository "archive" "syslinux" echo "1..8" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/ostree/testos-${bootcsum} echo "ok deploy command" @@ -40,14 +40,14 @@ echo "ok deploy command" # Commit + upgrade twice, so that we'll rotate out the original deployment bootcsum1=${bootcsum} os_repository_new_commit -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos bootcsum2=${bootcsum} os_repository_new_commit "1" bootcsum3=${bootcsum} ${CMD_PREFIX} ostree admin upgrade --os=testos -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_not_streq ${rev} ${newrev} assert_not_streq ${bootcsum1} ${bootcsum2} assert_not_streq ${bootcsum2} ${bootcsum3} diff --git a/tests/test-admin-deploy-bootid-gc.sh b/tests/test-admin-deploy-bootid-gc.sh index 9a5094ce..051dae6d 100755 --- a/tests/test-admin-deploy-bootid-gc.sh +++ b/tests/test-admin-deploy-bootid-gc.sh @@ -28,16 +28,16 @@ setup_os_repository "archive" "syslinux" echo "1..1" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime os_repository_new_commit rm sysroot/ostree/repo/tmp/* -rf export TEST_BOOTID=4072029c-8b10-60d1-d31b-8422eeff9b42 if env OSTREE_REPO_TEST_ERROR=pre-commit OSTREE_BOOTID=${TEST_BOOTID} \ - ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then + ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then assert_not_reached "Should have hit OSTREE_REPO_TEST_ERROR_PRE_COMMIT" fi stagepath=$(ls -d sysroot/ostree/repo/tmp/staging-${TEST_BOOTID}-*) @@ -47,12 +47,12 @@ assert_has_dir "${stagepath}" export NEW_TEST_BOOTID=5072029c-8b10-60d1-d31b-8422eeff9b42 if env OSTREE_REPO_TEST_ERROR=pre-commit OSTREE_BOOTID=${NEW_TEST_BOOTID} \ - ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=FOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then + ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=FOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then assert_not_reached "Should have hit OSTREE_REPO_TEST_ERROR_PRE_COMMIT" fi newstagepath=$(ls -d sysroot/ostree/repo/tmp/staging-${NEW_TEST_BOOTID}-*) assert_has_dir "${newstagepath}" -env OSTREE_BOOTID=${NEW_TEST_BOOTID} ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +env OSTREE_BOOTID=${NEW_TEST_BOOTID} ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime newstagepath=$(echo sysroot/ostree/repo/tmp/staging-${NEW_TEST_BOOTID}-*) assert_not_has_dir "${stagepath}" assert_not_has_dir "${newstagepath}" diff --git a/tests/test-admin-deploy-clean.sh b/tests/test-admin-deploy-clean.sh index bca45251..f26eaa0c 100755 --- a/tests/test-admin-deploy-clean.sh +++ b/tests/test-admin-deploy-clean.sh @@ -28,10 +28,10 @@ setup_os_repository "archive" "syslinux" echo "1..1" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin undeploy 0 ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo refs > refs.txt assert_not_file_has_content refs.txt '^ostree/' diff --git a/tests/test-admin-deploy-etcmerge-cornercases.sh b/tests/test-admin-deploy-etcmerge-cornercases.sh index fab50d16..4f55bc3a 100755 --- a/tests/test-admin-deploy-etcmerge-cornercases.sh +++ b/tests/test-admin-deploy-etcmerge-cornercases.sh @@ -28,12 +28,12 @@ setup_os_repository "archive" "syslinux" echo "1..2" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev echo "rev=${rev}" # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/ostree/testos-${bootcsum} etc=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc @@ -58,9 +58,9 @@ rm ${etc}/testdirectory -rf # Now deploy a new commit os_repository_new_commit -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) echo "newrev=${newrev}" newroot=sysroot/ostree/deploy/testos/deploy/${newrev}.0 newetc=${newroot}/etc @@ -94,32 +94,32 @@ echo "ok" # Add /etc/initially-empty cd "${test_tmpdir}/osdata" mkdir -p usr/etc/initially-empty -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add empty directory" cd ${test_tmpdir} # Upgrade, check that we have it ${CMD_PREFIX} ostree admin upgrade --os=testos -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_has_dir sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty # Now add a two files in initially-empty cd "${test_tmpdir}/osdata" touch usr/etc/initially-empty/{afile,bfile} -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add empty directory" # Upgrade, check that we have the two new files cd ${test_tmpdir} ${CMD_PREFIX} ostree admin upgrade --os=testos -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/afile assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/bfile # Replace config file with default directory cd "${test_tmpdir}/osdata" mkdir usr/etc/somenewdir -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add default dir" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add default dir" cd ${test_tmpdir} -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/somenewdir echo "some content blah" > ${newconfpath} if ${CMD_PREFIX} ostree admin upgrade --os=testos 2>err.txt; then @@ -131,12 +131,12 @@ rm ${newconfpath} # Remove parent directory of modified config file cd "${test_tmpdir}/osdata" rm -rf usr/etc/initially-empty -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Remove default dir" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Remove default dir" cd ${test_tmpdir} newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile touch ${newconfpath} ${CMD_PREFIX} ostree admin upgrade --os=testos -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_not_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/usr/etc/initially-empty assert_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile rm ${newconfpath} diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh index ccf66b0e..9bd5025d 100755 --- a/tests/test-admin-deploy-karg.sh +++ b/tests/test-admin-deploy-karg.sh @@ -28,23 +28,23 @@ setup_os_repository "archive" "syslinux" echo "1..3" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --karg=FOO=BAR --os=testos testos:testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --karg=TESTARG=TESTVALUE --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=FOO=BAR --os=testos testos:testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=TESTARG=TESTVALUE --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*FOO=BAR' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*FOO=BAR' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE' -${CMD_PREFIX} ostree admin deploy --karg=ANOTHERARG=ANOTHERVALUE --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=ANOTHERARG=ANOTHERVALUE --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*ANOTHERARG=ANOTHERVALUE' echo "ok deploy with --karg, but same config" -${CMD_PREFIX} ostree admin deploy --karg-proc-cmdline --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg-proc-cmdline --os=testos testos:testos/buildmain/x86_64-runtime for arg in $(cat /proc/cmdline); do case "$arg" in ostree=*) # Skip ostree arg that gets stripped out @@ -61,13 +61,13 @@ echo "ok deploy --karg-proc-cmdline" ${CMD_PREFIX} ostree admin status ${CMD_PREFIX} ostree admin undeploy 0 -${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=APPENDARG=VALAPPEND --karg-append=APPENDARG=2NDAPPEND testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=APPENDARG=VALAPPEND --karg-append=APPENDARG=2NDAPPEND testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*FOO=BAR' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND' # Check correct ordering of different-valued args of the same key. -${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND .*FOO=TESTORDERED .*APPENDARG=3RDAPPEND' echo "ok deploy --karg-append" diff --git a/tests/test-admin-deploy-nomerge.sh b/tests/test-admin-deploy-nomerge.sh index 06271421..8637691c 100755 --- a/tests/test-admin-deploy-nomerge.sh +++ b/tests/test-admin-deploy-nomerge.sh @@ -25,15 +25,15 @@ set -euo pipefail # Exports OSTREE_SYSROOT so --sysroot not needed. setup_os_repository "archive" "syslinux" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime echo "1..1" -${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=LABEL=foo --karg=testkarg=1 testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=LABEL=foo --karg=testkarg=1 testos:testos/buildmain/x86_64-runtime origdeployment=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir) testconfig=etc/modified-config-file-that-will-be-removed touch "${origdeployment}"/"${testconfig}" assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf "^options.*root=LABEL=foo.*testkarg" -${CMD_PREFIX} ostree admin deploy --os=testos --no-merge --karg=root=LABEL=bar testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos --no-merge --karg=root=LABEL=bar testos:testos/buildmain/x86_64-runtime deployment=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir) assert_not_streq "${origdeployment}" "${deployment}" assert_not_has_file "${deployment}/${testconfig}" diff --git a/tests/test-admin-deploy-none.sh b/tests/test-admin-deploy-none.sh index 09dee624..982addbe 100755 --- a/tests/test-admin-deploy-none.sh +++ b/tests/test-admin-deploy-none.sh @@ -34,12 +34,12 @@ extra_admin_tests=1 cd ${test_tmpdir} rm httpd osdata testos-repo sysroot -rf setup_os_repository "archive" "sysroot.bootloader none" -${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmain/x86_64-runtime # Test that configuring sysroot.bootloader="none" is a workaround for previous # grub2 bootloader issue (see https://github.com/ostreedev/ostree/issues/1774) mkdir -p sysroot/boot/grub2 touch sysroot/boot/grub2/grub.cfg -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmaster/x86_64-runtime > out.txt +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmain/x86_64-runtime > out.txt assert_file_has_content out.txt "Bootloader updated.*" assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO' assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel' diff --git a/tests/test-admin-deploy-switch.sh b/tests/test-admin-deploy-switch.sh index bae67667..275ba026 100755 --- a/tests/test-admin-deploy-switch.sh +++ b/tests/test-admin-deploy-switch.sh @@ -29,23 +29,23 @@ setup_os_repository "archive" "syslinux" echo "1..4" ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-runtime) assert_not_has_file sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h -if ${CMD_PREFIX} ostree admin switch --os=testos testos/buildmaster/x86_64-runtime; then +if ${CMD_PREFIX} ostree admin switch --os=testos testos/buildmain/x86_64-runtime; then assert_not_reached "Switch to same ref unexpectedly succeeded" fi echo "ok switch expected error" -${CMD_PREFIX} ostree admin switch --os=testos testos/buildmaster/x86_64-devel -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-devel) +${CMD_PREFIX} ostree admin switch --os=testos testos/buildmain/x86_64-devel +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-devel) assert_file_has_content sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h 'header' echo "ok switch" ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false anothertestos file://$(pwd)/testos-repo -${CMD_PREFIX} ostree admin switch --os=testos anothertestos:testos/buildmaster/x86_64-devel +${CMD_PREFIX} ostree admin switch --os=testos anothertestos:testos/buildmain/x86_64-devel # Ok this is lame, need a better shell command to extract config, or switch to gjs ${CMD_PREFIX} ostree admin status > status.txt assert_file_has_content status.txt anothertestos diff --git a/tests/test-admin-deploy-syslinux.sh b/tests/test-admin-deploy-syslinux.sh index 4d4ac7ae..8f9f0259 100755 --- a/tests/test-admin-deploy-syslinux.sh +++ b/tests/test-admin-deploy-syslinux.sh @@ -35,9 +35,9 @@ for test_bootdir in "boot" "usr/lib/ostree-boot"; do cd ${test_tmpdir} rm httpd osdata testos-repo sysroot -rf setup_os_repository "archive" "syslinux" $test_bootdir - ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime - rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) - ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime + ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime + rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) + ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO' assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* quiet' assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel' @@ -59,11 +59,11 @@ setup_os_repository "archive" "syslinux" "usr/lib/ostree-boot" cd osdata echo "this is a kernel without an initramfs like Fedora 26" > usr/lib/modules/3.6.0/vmlinuz usrlib_modules_bootcsum=$(cat usr/lib/modules/3.6.0/vmlinuz | sha256sum | cut -f 1 -d ' ') -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build" cd ${test_tmpdir} -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO' assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel' assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/initramfs-3.6.0.img 'an initramfs' diff --git a/tests/test-admin-deploy-uboot.sh b/tests/test-admin-deploy-uboot.sh index e3163cb0..98bd580b 100755 --- a/tests/test-admin-deploy-uboot.sh +++ b/tests/test-admin-deploy-uboot.sh @@ -46,7 +46,7 @@ loadramdisk=load mmc ${bootpart} ${rdaddr} ${ramdisk_image} mmcargs=setenv bootargs $bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} mmcboot=run loadramdisk; echo Booting from mmc ....; run mmcargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr} EOF -${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos assert_file_has_content sysroot/boot/uEnv.txt "loadfdt=" assert_file_has_content sysroot/boot/uEnv.txt "kernel_image=" @@ -71,7 +71,7 @@ bootcsum=$( cat ${devicetree_path} ${devicetree_overlay_path} ) | sha256sum | cut -f 1 -d ' ') -${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos assert_file_has_content sysroot/boot/uEnv.txt "fdtdir=" assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/dtb/asoc-board.dtb 'a device tree' diff --git a/tests/test-admin-gpg.sh b/tests/test-admin-gpg.sh index dc776743..2167f673 100755 --- a/tests/test-admin-gpg.sh +++ b/tests/test-admin-gpg.sh @@ -82,12 +82,12 @@ EOF mkdir -p usr/etc/testdirectory echo "a default daemon file" > usr/etc/testdirectory/test - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome # Ensure these commits have distinct second timestamps sleep 2 echo "a new executable" > usr/bin/sh - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmain/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome cd ${test_tmpdir} rm -rf osdata-devel @@ -96,7 +96,7 @@ EOF cd osdata-devel mkdir -p usr/include echo "a development header" > usr/include/foo.h - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-devel -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-devel -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo fsck -q @@ -137,9 +137,9 @@ setup_os_repository_signed "archive" "syslinux" echo "1..2" ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --gpg-verify=true --remote=testos testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --gpg-verify=true --remote=testos testos-repo testos/buildmain/x86_64-runtime # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/ostree/testos-${bootcsum} echo "ok deploy command" diff --git a/tests/test-admin-instutil-set-kargs.sh b/tests/test-admin-instutil-set-kargs.sh index 1cb32189..a6d40813 100755 --- a/tests/test-admin-instutil-set-kargs.sh +++ b/tests/test-admin-instutil-set-kargs.sh @@ -29,8 +29,8 @@ setup_os_repository "archive" "syslinux" echo "1..5" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin instutil set-kargs FOO=BAR ${CMD_PREFIX} ostree admin instutil set-kargs FOO=BAZ FOO=BIF TESTARG=TESTVALUE KEYWORD EMPTYLIST= @@ -50,7 +50,7 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'option assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*TESTARG=TESTVALUE KEYWORD EMPTYLIST=' echo "ok instutil set-kargs --replace" -${CMD_PREFIX} ostree admin instutil set-kargs --merge --append=FOO=BAR --append=APPENDARG=VALAPPEND --append=APPENDARG=2NDAPPEND testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin instutil set-kargs --merge --append=FOO=BAR --append=APPENDARG=VALAPPEND --append=APPENDARG=2NDAPPEND testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*FOO=XXX.*FOO=BAR' assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND' echo "ok instutil set-kargs --append" diff --git a/tests/test-admin-locking.sh b/tests/test-admin-locking.sh index 7e708502..05bdb9bf 100755 --- a/tests/test-admin-locking.sh +++ b/tests/test-admin-locking.sh @@ -36,12 +36,12 @@ echo "1..1" cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev echo "rev=${rev}" # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/ostree/testos-${bootcsum} parallel_cmd="parallel --gnu" @@ -50,7 +50,7 @@ if parallel --help | grep -q -e --no-notice; then fi count=$(($(getconf _NPROCESSORS_ONLN) * 2)) -seq "${count}" | ${parallel_cmd} -n0 ${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime +seq "${count}" | ${parallel_cmd} -n0 ${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin status > status.txt grep "testos ${rev}" status.txt | wc -l > status-matches.txt diff --git a/tests/test-admin-pull-deploy-commit.sh b/tests/test-admin-pull-deploy-commit.sh index 557ae60a..f1323913 100755 --- a/tests/test-admin-pull-deploy-commit.sh +++ b/tests/test-admin-pull-deploy-commit.sh @@ -31,8 +31,8 @@ setup_os_repository "archive" "syslinux" cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) parent_rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse ${rev}^) ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos ${parent_rev} ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos ${parent_rev} diff --git a/tests/test-admin-pull-deploy-split.sh b/tests/test-admin-pull-deploy-split.sh index 1196368d..8695024e 100755 --- a/tests/test-admin-pull-deploy-split.sh +++ b/tests/test-admin-pull-deploy-split.sh @@ -31,11 +31,11 @@ setup_os_repository "archive" "syslinux" cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) parent_rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse ${rev}^) -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime@${parent_rev} -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime@${parent_rev} +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0 assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0 # Do a pull, this one should get us new content @@ -47,7 +47,7 @@ assert_not_file_has_content out.txt 'No update available' assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0 assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0 assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'TestOS 42 1\.0\.9' -assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) # Now, generate new content upstream; we shouldn't pull it os_repository_new_commit ${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt diff --git a/tests/test-admin-upgrade-endoflife.sh b/tests/test-admin-upgrade-endoflife.sh index 8a0dc9c2..cb2abd7e 100755 --- a/tests/test-admin-upgrade-endoflife.sh +++ b/tests/test-admin-upgrade-endoflife.sh @@ -36,27 +36,27 @@ echo "1..3" cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) echo "rev=${rev}" # Now sysroot/ostree has the objects from the testos-repo (obtained over http # and kept in remote "testos"), but there is no deployment # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/boot/ostree/testos-${bootcsum} echo "ok deploy" # Create a new branch which we want to migrate to -os_repository_new_commit 1 1 testos/buildmaster/newbranch +os_repository_new_commit 1 1 testos/buildmain/newbranch # bootcsum now refers to this new commit # Create a new commit with an empty tree, which marks the original branch as # EOL, redirecting to the new one. mkdir empty -${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=$(pwd)/empty --add-metadata-string "ostree.endoflife=Product discontinued" --add-metadata-string "ostree.endoflife-rebase=testos/buildmaster/newbranch" -b testos/buildmaster/x86_64-runtime -s "EOL redirect to new branch" +${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=$(pwd)/empty --add-metadata-string "ostree.endoflife=Product discontinued" --add-metadata-string "ostree.endoflife-rebase=testos/buildmain/newbranch" -b testos/buildmain/x86_64-runtime -s "EOL redirect to new branch" echo "ok new branch" @@ -66,7 +66,7 @@ ${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only # Check we got redirected to the new branch assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf "${bootcsum}" -rev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo rev-parse testos/buildmaster/newbranch) +rev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo rev-parse testos/buildmain/newbranch) assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0/usr/bin/content-iteration "1" assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0.origin "newbranch" diff --git a/tests/test-admin-upgrade-not-backwards.sh b/tests/test-admin-upgrade-not-backwards.sh index c23dbf29..599284dc 100755 --- a/tests/test-admin-upgrade-not-backwards.sh +++ b/tests/test-admin-upgrade-not-backwards.sh @@ -28,7 +28,7 @@ setup_os_repository "archive" "syslinux" echo "1..2" -ref=testos/buildmaster/x86_64-runtime +ref=testos/buildmain/x86_64-runtime cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos ${ref} diff --git a/tests/test-admin-upgrade-systemd-update.sh b/tests/test-admin-upgrade-systemd-update.sh index 94b750d7..b1f9956b 100755 --- a/tests/test-admin-upgrade-systemd-update.sh +++ b/tests/test-admin-upgrade-systemd-update.sh @@ -29,9 +29,9 @@ echo "1..2" # Setup a deployment cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) -${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) +${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0/usr assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0/etc assert_has_dir sysroot/ostree/deploy/testos/var @@ -50,7 +50,7 @@ touch -r ${usr} sysroot/ostree/deploy/testos/var/.updated # (current) deployment os_repository_new_commit ${CMD_PREFIX} ostree admin upgrade --os=testos -newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) assert_not_has_file sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/.updated assert_not_has_file sysroot/ostree/deploy/testos/var/.updated assert_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/.updated diff --git a/tests/test-admin-upgrade-unconfigured.sh b/tests/test-admin-upgrade-unconfigured.sh index d9a15fcc..5cb588af 100755 --- a/tests/test-admin-upgrade-unconfigured.sh +++ b/tests/test-admin-upgrade-unconfigured.sh @@ -28,15 +28,15 @@ setup_os_repository "archive" "syslinux" echo "1..2" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime) +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime) export rev echo "rev=${rev}" # This initial deployment gets kicked off with some kernel arguments -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime echo "unconfigured-state=Use \"subscription-manager\" to enable online updates for example.com OS" >> sysroot/ostree/deploy/testos/deploy/${rev}.0.origin -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime if ${CMD_PREFIX} ostree admin upgrade --os=testos 2>err.txt; then assert_not_reached "upgrade unexpectedly succeeded" fi @@ -44,7 +44,7 @@ assert_file_has_content err.txt "Use.*subscription.*online" echo "ok error" -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin switch --os=testos otheros:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin switch --os=testos otheros:testos/buildmain/x86_64-runtime echo "ok switch" diff --git a/tests/test-commit-timestamp.sh b/tests/test-commit-timestamp.sh new file mode 100755 index 00000000..7dbdbdfc --- /dev/null +++ b/tests/test-commit-timestamp.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# SPDX-License-Identifier: LGPL-2.0+ + +set -euo pipefail + +. $(dirname $0)/libtest.sh +TZ='UTC' +LANG='C' + +echo "1..2" + +# Explicit timestamp via CLI flag. +mkdir testrepo +ostree_repo_init testrepo --mode="archive" +mkdir testrepo-files +cd testrepo-files +echo first > firstfile +cd .. +${CMD_PREFIX} ostree --repo=./testrepo commit -b cli --timestamp='@1234567890' -s "cli timestamp" +${CMD_PREFIX} ostree --repo=./testrepo show cli > show-cli.txt +rm -rf testrepo testrepo-files +assert_file_has_content_literal show-cli.txt 'Date: 2009-02-13 23:31:30 +0000' +echo "ok commit with CLI timestamp" + +# Reproducible timestamp via env flag. +mkdir testrepo +ostree_repo_init testrepo --mode="archive" +mkdir testrepo-files +cd testrepo-files +echo first > firstfile +cd .. +${CMD_PREFIX} SOURCE_DATE_EPOCH='1234567890' ostree --repo=./testrepo commit -b env -s "env timestamp" +if (${CMD_PREFIX} SOURCE_DATE_EPOCH='invalid' ostree --repo=./testrepo commit -b env -s "invalid timestamp") 2> commit-invalid.txt; then + assert_not_reached "commit with invalid timestamp succeeded" +fi +if (${CMD_PREFIX} SOURCE_DATE_EPOCH='12345678901234567890' ostree --repo=./testrepo commit -b env -s "overflowing timestamp") 2> commit-overflowing.txt; then + assert_not_reached "commit with overflowing timestamp succeeded" +fi +${CMD_PREFIX} ostree --repo=./testrepo show env > show-env.txt +rm -rf testrepo testrepo-files +assert_file_has_content_literal commit-invalid.txt 'Failed to convert SOURCE_DATE_EPOCH' +assert_file_has_content_literal commit-overflowing.txt 'Parsing SOURCE_DATE_EPOCH: Numerical result out of range' +assert_file_has_content_literal show-env.txt 'Date: 2009-02-13 23:31:30 +0000' +echo "ok commit with env timestamp" diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py index e4ce21e9..3679ddb6 100755 --- a/tests/test-concurrency.py +++ b/tests/test-concurrency.py @@ -40,11 +40,15 @@ def mktree(dname, serial=0): f.write('{} {} {}\n'.format(dname, serial, v)) subprocess.check_call(['ostree', '--repo=repo', 'init', '--mode=bare']) -# like the bit in libtest, but let's do it unconditionally since it's simpler, -# and we don't need xattr coverage for this with open('repo/config', 'a') as f: + # like the bit in libtest, but let's do it unconditionally since + # it's simpler, and we don't need xattr coverage for this f.write('disable-xattrs=true\n') + # Make any locking errors fail quickly instead of blocking the test + # for 30 seconds. + f.write('lock-timeout-secs=5\n') + def commit(v): tdir='tree{}'.format(v) cmd = ['ostree', '--repo=repo', 'commit', '--fsync=0', '-b', tdir, '--tree=dir='+tdir] diff --git a/tests/test-core.js b/tests/test-core.js index 2c7162be..b804e007 100755 --- a/tests/test-core.js +++ b/tests/test-core.js @@ -134,4 +134,12 @@ w.write(inline_content.slice(10), null) let actual_checksum = w.finish(null) assertEquals(actual_checksum, networks_checksum) +// Basic locking API sanity test +repo.lock_push(OSTree.RepoLockType.SHARED, null); +repo.lock_push(OSTree.RepoLockType.SHARED, null); +repo.lock_pop(OSTree.RepoLockType.SHARED, null); +repo.lock_pop(OSTree.RepoLockType.SHARED, null); +repo.lock_push(OSTree.RepoLockType.EXCLUSIVE, null); +repo.lock_pop(OSTree.RepoLockType.EXCLUSIVE, null); + print("ok test-core"); diff --git a/tests/test-find-remotes.sh b/tests/test-find-remotes.sh index 5dd880f0..044bd468 100755 --- a/tests/test-find-remotes.sh +++ b/tests/test-find-remotes.sh @@ -43,7 +43,7 @@ mkdir os-collection ostree_repo_init os-collection --collection-id org.example.OsCollection mkdir -p files pushd files -${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 1" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 1" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum popd ${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} @@ -54,16 +54,16 @@ ${CMD_PREFIX} ostree --repo=local remote add apps-remote file://$(pwd)/apps-coll ${CMD_PREFIX} ostree --repo=local remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc ${CMD_PREFIX} ostree --repo=local pull apps-remote app1 -${CMD_PREFIX} ostree --repo=local pull os-remote os/amd64/master +${CMD_PREFIX} ostree --repo=local pull os-remote os/amd64/main ${CMD_PREFIX} ostree --repo=local refs > refs assert_file_has_content refs "^apps-remote:app1$" -assert_file_has_content refs "^os-remote:os/amd64/master$" +assert_file_has_content refs "^os-remote:os/amd64/main$" ${CMD_PREFIX} ostree --repo=local refs --collections > refs cat refs | wc -l > refscount assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$" -assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$" +assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/main)$" assert_file_has_content refscount "^2$" # Create a local mirror repository where we pull the branches *in mirror mode* from the two remotes. @@ -74,7 +74,7 @@ ${CMD_PREFIX} ostree --repo=local-mirror remote add apps-remote file://$(pwd)/ap ${CMD_PREFIX} ostree --repo=local-mirror remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc ${CMD_PREFIX} ostree --repo=local-mirror pull --mirror apps-remote app1 -${CMD_PREFIX} ostree --repo=local-mirror pull --mirror os-remote os/amd64/master +${CMD_PREFIX} ostree --repo=local-mirror pull --mirror os-remote os/amd64/main ${CMD_PREFIX} ostree --repo=local-mirror refs | wc -l > refscount assert_file_has_content refscount "^0$" @@ -83,10 +83,10 @@ assert_file_has_content remotescount "^0$" ${CMD_PREFIX} ostree --repo=local-mirror refs --collections > refs assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$" -assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$" +assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/main)$" assert_file_has_content local-mirror/refs/mirrors/org.example.AppsCollection/app1 "^$(cat app1-checksum)$" -assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/master "^$(cat os-checksum)$" +assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/main "^$(cat os-checksum)$" for repo in local local-mirror; do # Try finding an update for an existing branch. @@ -98,25 +98,25 @@ for repo in local local-mirror; do assert_not_file_has_content find "^No results\.$" # Find several updates for several existing branches. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > find + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/main > find assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$" assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$" assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum)$" assert_file_has_content find "^2/2 refs were found\.$" assert_not_file_has_content find "^No results\.$" # Find some updates and a new branch. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > find + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/main > find assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$" assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$" assert_file_has_content find "^ - (org\.example\.AppsCollection, app2) = $(cat app2-checksum)$" assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum)$" assert_file_has_content find "^3/3 refs were found\.$" assert_not_file_has_content find "^No results\.$" @@ -138,20 +138,20 @@ for repo in local local-mirror; do assert_not_file_has_content pull "Failed to pull some refs from the remotes" assert_ref $repo app1 $(cat app1-checksum) - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > pull + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/main > pull assert_file_has_content pull "^2/2 refs were found\.$" assert_file_has_content pull "^Pulled 2/2 refs successfully\.$" assert_not_file_has_content pull "Failed to pull some refs from the remotes" assert_ref $repo app1 $(cat app1-checksum) - assert_ref $repo os/amd64/master $(cat os-checksum) + assert_ref $repo os/amd64/main $(cat os-checksum) - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > pull + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/main > pull assert_file_has_content pull "^3/3 refs were found\.$" assert_file_has_content pull "^Pulled 3/3 refs successfully\.$" assert_not_file_has_content pull "Failed to pull some refs from the remotes" assert_ref $repo app1 $(cat app1-checksum) assert_ref $repo app2 $(cat app2-checksum) - assert_ref $repo os/amd64/master $(cat os-checksum) + assert_ref $repo os/amd64/main $(cat os-checksum) ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection not-an-app > pull assert_file_has_content pull "^1/2 refs were found\.$" @@ -162,30 +162,30 @@ done # Test pulling a new commit into the local mirror from one of the repositories. pushd files -${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 2" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-2 +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 2" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-2 popd ${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} for repo in local-mirror; do # Try finding an update for that branch. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$" assert_file_has_content find "^1/1 refs were found\.$" assert_not_file_has_content find "^No results\.$" # Pull it. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true assert_file_has_content pull "^1/1 refs were found\.$" assert_file_has_content pull "^Pulled 1/1 refs successfully\.$" assert_not_file_has_content pull "Failed to pull some refs from the remotes" - assert_ref $repo os/amd64/master $(cat os-checksum-2) + assert_ref $repo os/amd64/main $(cat os-checksum-2) # We need to manually update the refs afterwards, since the original pull # into the local-mirror was a --mirror pull — so it wrote refs/mirrors/blah. # This pull was not, so it wrote refs/remotes/blah. - ${CMD_PREFIX} ostree --repo=$repo refs --collections --create org.example.OsCollection:os/amd64/master os-remote:os/amd64/master + ${CMD_PREFIX} ostree --repo=$repo refs --collections --create org.example.OsCollection:os/amd64/main os-remote:os/amd64/main done # Add the local mirror to the local repository as a remote, so that the local repo @@ -195,46 +195,46 @@ ${CMD_PREFIX} ostree --repo=local remote add os-remote-local-mirror file://$(pwd for repo in local; do # Try finding an update for that branch. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$" assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$" assert_file_has_content find "^ - Keyring: os-remote-local-mirror\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$" assert_file_has_content find "^1/1 refs were found\.$" assert_not_file_has_content find "^No results\.$" # Pull it. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true assert_file_has_content pull "^1/1 refs were found\.$" assert_file_has_content pull "^Pulled 1/1 refs successfully\.$" assert_not_file_has_content pull "Failed to pull some refs from the remotes" - assert_ref $repo os/amd64/master $(cat os-checksum-2) + assert_ref $repo os/amd64/main $(cat os-checksum-2) done # Add another commit to the OS collection, but don’t update the mirror. Then try pulling # into the local repository again, and check that the outdated ref in the mirror is ignored. pushd files -${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 3" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-3 +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 3" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-3 popd ${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} for repo in local; do # Try finding an update for that branch. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$" - assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-3)$" + assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-3)$" assert_file_has_content find "^1/1 refs were found\.$" assert_not_file_has_content find "^No results\.$" # Pull it. - ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true + ${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true assert_file_has_content pull "^1/1 refs were found\.$" assert_file_has_content pull "^Pulled 1/1 refs successfully\.$" assert_not_file_has_content pull "Failed to pull some refs from the remotes" - assert_ref $repo os/amd64/master $(cat os-checksum-3) + assert_ref $repo os/amd64/main $(cat os-checksum-3) done echo "ok find-remotes" diff --git a/tests/test-gpg-signed-commit.sh b/tests/test-gpg-signed-commit.sh index 090b4bfe..67ce4f74 100755 --- a/tests/test-gpg-signed-commit.sh +++ b/tests/test-gpg-signed-commit.sh @@ -235,7 +235,6 @@ assert_file_has_content test2-show "${key1_id}" assert_file_has_content test2-show "${key2_sub_id}" assert_file_has_content test2-show 'Good signature from "Test Key 1 <>"' assert_file_has_content test2-show 'BAD signature from "Test Key 2 <>"' -assert_not_file_has_content test2-show 'Key expired' assert_file_has_content test2-show "Primary key ID ${key2_id}" assert_file_has_content test2-show 'Primary key expired' diff --git a/tests/test-no-initramfs.sh b/tests/test-no-initramfs.sh index 22846c8f..84c44576 100755 --- a/tests/test-no-initramfs.sh +++ b/tests/test-no-initramfs.sh @@ -9,8 +9,8 @@ setup_os_repository "archive-z2" "uboot" cd ${test_tmpdir} ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=rootfs --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=rootfs --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'root=LABEL=rootfs' assert_not_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'init=' @@ -47,8 +47,8 @@ pull_test_tree() { exit 1 fi cd - - ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime - ${CMD_PREFIX} ostree pull testos:testos/buildmaster/x86_64-runtime + ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime + ${CMD_PREFIX} ostree pull testos:testos/buildmain/x86_64-runtime } get_key_from_bootloader_conf() { @@ -62,7 +62,7 @@ get_key_from_bootloader_conf() { for layout in /usr/lib/modules /usr/lib/ostree-boot /boot; do pull_test_tree "the kernel only" - ${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=/dev/sda2 --karg=rootwait testos:testos/buildmaster/x86_64-runtime + ${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=/dev/sda2 --karg=rootwait testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'rootwait' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init=' assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd' @@ -70,7 +70,7 @@ do echo "ok switching to bootdir with no initramfs layout=$layout" pull_test_tree "the kernel" "initramfs to assist the kernel" - ${CMD_PREFIX} ostree admin deploy --os=testos --karg-none --karg=root=LABEL=rootfs testos:testos/buildmaster/x86_64-runtime + ${CMD_PREFIX} ostree admin deploy --os=testos --karg-none --karg=root=LABEL=rootfs testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd' assert_file_has_content sysroot/boot/$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf "initrd") "initramfs to assist the kernel" assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'root=LABEL=rootfs' @@ -80,7 +80,7 @@ do echo "ok switching from no initramfs to initramfs enabled sysroot layout=$layout" pull_test_tree "the kernel" "" "my .dtb file" - ${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime + ${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init=' assert_file_has_content sysroot/boot/"$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf 'devicetree')" "my \.dtb file" diff --git a/tests/test-osupdate-dtb.sh b/tests/test-osupdate-dtb.sh index 9e0c4686..33e752f5 100755 --- a/tests/test-osupdate-dtb.sh +++ b/tests/test-osupdate-dtb.sh @@ -41,17 +41,17 @@ echo "a device tree" > ${devicetree_path} mkdir -p osdata/${modulesdir}/dtb/overlays echo "a device tree overlay" > ${devicetree_overlay_path} -${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime -${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime -${CMD_PREFIX} env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime +${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime +${CMD_PREFIX} env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime assert_has_file sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 assert_not_has_file sysroot/boot/ostree/testos-${bootcsum}/dtb/asoc-board.dtb 'a device tree' assert_streq $(ls sysroot/boot/ostree | wc -l) 1 assert_streq $(find sysroot/boot/ostree -name '*.dtb' | wc -l) 0 -${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ${CMD_PREFIX} ostree admin upgrade --os=testos -${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime +${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime ${CMD_PREFIX} ostree admin upgrade --os=testos assert_streq $(ls sysroot/boot/ostree | wc -l) 2 # Note that the bootcsum computed by the test suite doesn't include devicetree diff --git a/tests/test-pull-summary-caching.sh b/tests/test-pull-summary-caching.sh index 9671199a..37c2aed6 100755 --- a/tests/test-pull-summary-caching.sh +++ b/tests/test-pull-summary-caching.sh @@ -31,6 +31,9 @@ if ! has_gpgme; then exit 0 fi +# Ensure repo caching is in use. +unset OSTREE_SKIP_CACHE + COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" echo "1..1" diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh index 3819cbf3..04a8e488 100755 --- a/tests/test-pull-summary-sigs.sh +++ b/tests/test-pull-summary-sigs.sh @@ -23,6 +23,9 @@ set -euo pipefail . $(dirname $0)/libtest.sh +# Ensure repo caching is in use. +unset OSTREE_SKIP_CACHE + COMMIT_SIGN="" if has_gpgme; then COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" diff --git a/tests/test-repo-finder-config.c b/tests/test-repo-finder-config.c index b3e8a264..8a803aba 100644 --- a/tests/test-repo-finder-config.c +++ b/tests/test-repo-finder-config.c @@ -112,7 +112,7 @@ test_repo_finder_config_no_configs (Fixture *fixture, g_autoptr(GPtrArray) results = NULL; /* (element-type OstreeRepoFinderResult) */ g_autoptr(GError) error = NULL; const OstreeCollectionRef ref1 = { "org.example.Os", "exampleos/x86_64/standard" }; - const OstreeCollectionRef ref2 = { "org.example.Os", "exampleos/x86_64/buildmaster/standard" }; + const OstreeCollectionRef ref2 = { "org.example.Os", "exampleos/x86_64/buildmain/standard" }; const OstreeCollectionRef * const refs[] = { &ref1, &ref2, NULL }; context = g_main_context_new (); diff --git a/tests/test-repo-finder-mount.c b/tests/test-repo-finder-mount.c index 45e58fa4..5b670f50 100644 --- a/tests/test-repo-finder-mount.c +++ b/tests/test-repo-finder-mount.c @@ -125,7 +125,7 @@ test_repo_finder_mount_no_mounts (Fixture *fixture, g_autoptr(GPtrArray) results = NULL; /* (element-type OstreeRepoFinderResult) */ g_autoptr(GError) error = NULL; const OstreeCollectionRef ref1 = { "org.example.Collection1", "exampleos/x86_64/standard" }; - const OstreeCollectionRef ref2 = { "org.example.Collection1", "exampleos/x86_64/buildmaster/standard" }; + const OstreeCollectionRef ref2 = { "org.example.Collection1", "exampleos/x86_64/buildmain/standard" }; const OstreeCollectionRef ref3 = { "org.example.Collection2", "exampleos/x86_64/standard" }; const OstreeCollectionRef ref4 = { "org.example.Collection2", "exampleos/arm64/standard" }; const OstreeCollectionRef * const refs[] = { &ref1, &ref2, &ref3, &ref4, NULL }; diff --git a/tests/test-repo.c b/tests/test-repo.c index 9337ac3b..0c7e0dd3 100644 --- a/tests/test-repo.c +++ b/tests/test-repo.c @@ -51,6 +51,29 @@ setup (Fixture *fixture, g_test_message ("Using temporary directory: %s", fixture->tmpdir.path); } +/* Common setup for locking tests. Create an archive repo in the tmpdir and + * set the locking timeout to 0 so lock failures don't block. + */ +static void +lock_setup (Fixture *fixture, + gconstpointer test_data) +{ + setup (fixture, test_data); + + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_create_at (fixture->tmpdir.fd, ".", + OSTREE_REPO_MODE_ARCHIVE, + NULL, + NULL, &error); + g_assert_no_error (error); + + /* Set the lock timeout to 0 so failures don't block the test */ + g_autoptr(GKeyFile) config = ostree_repo_copy_config (repo); + g_key_file_set_integer (config, "core", "lock-timeout-secs", 0); + ostree_repo_write_config (repo, config, &error); + g_assert_no_error (error); +} + static void teardown (Fixture *fixture, gconstpointer test_data) @@ -249,6 +272,301 @@ test_write_regfile_api (Fixture *fixture, g_assert_cmpstr (checksum, ==, "23a2e97d21d960ac7a4e39a8721b1baff7b213e00e5e5641334f50506012fcff"); } +/* Just a sanity check of the C autolocking API */ +static void +test_repo_autolock (Fixture *fixture, + gconstpointer test_data) +{ + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_create_at (fixture->tmpdir.fd, ".", + OSTREE_REPO_MODE_ARCHIVE, + NULL, + NULL, &error); + g_assert_no_error (error); + + { + g_autoptr(OstreeRepoAutoLock) lock = ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + } + + g_autoptr(OstreeRepoAutoLock) lock1 = ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + + g_autoptr(OstreeRepoAutoLock) lock2 = ostree_repo_auto_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); +} + +/* Locking from single thread with a single OstreeRepo */ +static void +test_repo_lock_single (Fixture *fixture, + gconstpointer test_data) +{ + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + /* Single thread on a single repo can freely recurse in any state */ + ostree_repo_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); +} + +/* Unlocking without having ever locked */ +static void +test_repo_lock_unlock_never_locked (Fixture *fixture, + gconstpointer test_data) +{ + if (g_test_subprocess ()) + { + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + + return; + } + + g_test_trap_subprocess (NULL, 0, 0); + g_test_trap_assert_failed (); + g_test_trap_assert_stderr ("*ERROR*Cannot pop repo never locked repo lock\n"); +} + +/* Unlocking after already unlocked */ +static void +test_repo_lock_double_unlock (Fixture *fixture, + gconstpointer test_data) +{ + if (g_test_subprocess ()) + { + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + ostree_repo_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + + return; + } + + g_test_trap_subprocess (NULL, 0, 0); + g_test_trap_assert_failed (); + g_test_trap_assert_stderr ("*ERROR*Cannot pop already unlocked repo lock\n"); +} + +/* Unlocking the wrong type */ +static void +test_repo_lock_unlock_wrong_type (Fixture *fixture, + gconstpointer test_data) +{ + if (g_test_subprocess ()) + { + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + ostree_repo_lock_push (repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + + return; + } + + g_test_trap_subprocess (NULL, 0, 0); + g_test_trap_assert_failed (); + g_test_trap_assert_stderr ("*ERROR*Repo exclusive lock pop requested, but none have been taken\n"); +} + +/* Locking with single thread and multiple OstreeRepos */ +static void +test_repo_lock_multi_repo (Fixture *fixture, + gconstpointer test_data) +{ + g_autoptr(GError) error = NULL; + + /* Open two OstreeRepo instances */ + g_autoptr(OstreeRepo) repo1 = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + g_autoptr(OstreeRepo) repo2 = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + /* Single thread with multiple OstreeRepo's conflict */ + ostree_repo_lock_push (repo1, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo1, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); + g_clear_error (&error); + ostree_repo_lock_pop (repo1, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + + /* Recursive lock should stay exclusive once acquired */ + ostree_repo_lock_push (repo1, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo1, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); + g_clear_error (&error); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); + g_clear_error (&error); + ostree_repo_lock_pop (repo1, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + ostree_repo_lock_pop (repo1, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); +} + +/* Locking from multiple threads with a single OstreeRepo */ +typedef struct { + OstreeRepo *repo; + guint step; +} LockThreadData; + +static gpointer +lock_thread1 (gpointer thread_data) +{ + LockThreadData *data = thread_data; + g_autoptr(GError) error = NULL; + + /* Step 0: Take an exclusive lock */ + g_assert_cmpuint (data->step, ==, 0); + g_test_message ("Thread 1: Push exclusive lock"); + ostree_repo_lock_push (data->repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + data->step++; + + /* Step 2: Take a shared lock */ + while (data->step != 2) + g_thread_yield (); + g_test_message ("Thread 1: Push shared lock"); + ostree_repo_lock_push (data->repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + data->step++; + + /* Step 4: Pop both locks */ + while (data->step != 4) + g_thread_yield (); + g_test_message ("Thread 1: Pop shared lock"); + ostree_repo_lock_pop (data->repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + g_test_message ("Thread 1: Pop exclusive lock"); + ostree_repo_lock_pop (data->repo, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + data->step++; + + return NULL; +} + +static gpointer +lock_thread2 (gpointer thread_data) +{ + LockThreadData *data = thread_data; + g_autoptr(GError) error = NULL; + + /* Step 1: Wait for the other thread to acquire a lock and then take a + * shared lock. + */ + while (data->step != 1) + g_thread_yield (); + g_test_message ("Thread 2: Push shared lock"); + ostree_repo_lock_push (data->repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + data->step++; + + /* Step 6: Pop lock */ + while (data->step != 6) + g_thread_yield (); + g_test_message ("Thread 2: Pop shared lock"); + ostree_repo_lock_pop (data->repo, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + data->step++; + + return NULL; +} + +static void +test_repo_lock_multi_thread (Fixture *fixture, + gconstpointer test_data) +{ + g_autoptr(GError) error = NULL; + g_autoptr(OstreeRepo) repo1 = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + g_autoptr(OstreeRepo) repo2 = ostree_repo_open_at (fixture->tmpdir.fd, ".", + NULL, &error); + g_assert_no_error (error); + + LockThreadData thread_data = {repo1, 0}; + GThread *thread1 = g_thread_new ("lock-thread-1", lock_thread1, &thread_data); + GThread *thread2 = g_thread_new ("lock-thread-2", lock_thread2, &thread_data); + + /* Step 3: Try to take a shared lock on repo2. This should fail since + * thread1 still has an exclusive lock. + */ + while (thread_data.step != 3) + g_thread_yield (); + g_test_message ("Repo 2: Push failing shared lock"); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); + g_clear_error (&error); + thread_data.step++; + + /* Step 5: Try to a lock on repo2. A shared lock should succeed since + * thread1 has dropped its exclusive lock. + */ + while (thread_data.step != 5) + g_thread_yield (); + g_test_message ("Repo 2: Push shared lock"); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + g_test_message ("Repo 2: Push failing exclusive lock"); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); + g_clear_error (&error); + thread_data.step++; + + /* Step 7: Now both threads have dropped their locks and taking an exclusive + * lock should succeed. + */ + while (thread_data.step != 7) + g_thread_yield (); + g_test_message ("Repo 2: Push exclusive lock"); + ostree_repo_lock_push (repo2, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + g_test_message ("Repo 2: Pop exclusive lock"); + ostree_repo_lock_pop (repo2, OSTREE_REPO_LOCK_EXCLUSIVE, NULL, &error); + g_assert_no_error (error); + g_test_message ("Repo 2: Pop shared lock"); + ostree_repo_lock_pop (repo2, OSTREE_REPO_LOCK_SHARED, NULL, &error); + g_assert_no_error (error); + thread_data.step++; + + g_thread_join (thread1); + g_thread_join (thread2); +} + int main (int argc, char **argv) @@ -266,6 +584,20 @@ main (int argc, test_repo_get_min_free_space, teardown); g_test_add ("/repo/write_regfile_api", Fixture, NULL, setup, test_write_regfile_api, teardown); + g_test_add ("/repo/autolock", Fixture, NULL, setup, + test_repo_autolock, teardown); + g_test_add ("/repo/lock/single", Fixture, NULL, lock_setup, + test_repo_lock_single, teardown); + g_test_add ("/repo/lock/unlock-never-locked", Fixture, NULL, lock_setup, + test_repo_lock_unlock_never_locked, teardown); + g_test_add ("/repo/lock/double-unlock", Fixture, NULL, lock_setup, + test_repo_lock_double_unlock, teardown); + g_test_add ("/repo/lock/unlock-wrong-type", Fixture, NULL, lock_setup, + test_repo_lock_unlock_wrong_type, teardown); + g_test_add ("/repo/lock/multi-repo", Fixture, NULL, lock_setup, + test_repo_lock_multi_repo, teardown); + g_test_add ("/repo/lock/multi-thread", Fixture, NULL, lock_setup, + test_repo_lock_multi_thread, teardown); return g_test_run (); } diff --git a/tests/test-signed-pull-summary.sh b/tests/test-signed-pull-summary.sh index e953f2ea..3d468693 100755 --- a/tests/test-signed-pull-summary.sh +++ b/tests/test-signed-pull-summary.sh @@ -27,6 +27,9 @@ set -euo pipefail echo "1..14" +# Ensure repo caching is in use. +unset OSTREE_SKIP_CACHE + # This is explicitly opt in for testing export OSTREE_DUMMY_SIGN_ENABLED=1 diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 14adc867..89c3eb07 100755 --- a/tests/test-symbols.sh +++ b/tests/test-symbols.sh @@ -56,7 +56,7 @@ echo 'ok documented symbols' # ONLY update this checksum in release commits! cat > released-sha256.txt < " + rev);