diff --git a/Makefile-libostree.am b/Makefile-libostree.am index c9511fe3..f125adb8 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -171,9 +171,9 @@ endif # USE_GPGME symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym # Uncomment this include when adding new development symbols. -# if BUILDOPT_IS_DEVEL_BUILD -# symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym -# endif +#if BUILDOPT_IS_DEVEL_BUILD +#symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym +#endif # http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html wl_versionscript_arg = -Wl,--version-script= @@ -184,7 +184,8 @@ EXTRA_DIST += \ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree \ $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_CRYPTO_CFLAGS) \ - -fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern' + -fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern' \ + -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) @@ -292,8 +293,12 @@ EXTRA_DIST += src/libostree/README-gpg src/libostree/bupsplit.h \ src/libostree/ostree-enumtypes.c.template \ src/libostree/ostree-deployment-private.h \ src/libostree/ostree-repo-deprecated.h \ - src/libostree/ostree-version.h + src/libostree/ostree-version.h \ + src/libostree/s390x-se-luks-gencpio install-mkdir-remotes-d-hook: mkdir -p $(DESTDIR)$(sysconfdir)/ostree/remotes.d INSTALL_DATA_HOOKS += install-mkdir-remotes-d-hook + +# Secure Execution: script for creating new initramdisk with LUKS key and config +pkglibexec_SCRIPTS += src/libostree/s390x-se-luks-gencpio diff --git a/Makefile-tests.am b/Makefile-tests.am index 6bae65cf..5d39ee5e 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -59,6 +59,7 @@ test_programs = \ $(NULL) _installed_or_uninstalled_test_scripts = \ tests/test-basic.sh \ + tests/test-basic-bare-split-xattrs.sh \ tests/test-basic-user.sh \ tests/test-basic-user-only.sh \ tests/test-basic-root.sh \ @@ -201,6 +202,7 @@ dist_installed_test_data = tests/archive-test.sh \ tests/ostree-path-traverse.tar.gz \ tests/pre-signed-pull-data.tar.gz \ tests/libtest-core.sh \ + tests/fixtures/bare-split-xattrs/basic.tar.xz \ $(NULL) EXTRA_DIST += tests/libtest.sh diff --git a/Makefile.in b/Makefile.in index dc259a3f..1e0cc49f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. @@ -51,6 +51,7 @@ # GLIB - Library of useful C routines # Copyright (C) 2015 Colin Walters +# SPDX-License-Identifier: LGPL-2.0-or-later # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -341,7 +342,6 @@ am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -2014,7 +2014,6 @@ 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-remote-gpg-list-keys.sh \ @@ -2023,7 +2022,8 @@ RECHECK_LOGS = $(TEST_LOGS) am__EXEEXT_21 = tests/test-core.js tests/test-remotes-config-dir.js \ tests/test-sizes.js tests/test-sysroot.js $(am__EXEEXT_2) @BUILDOPT_GJS_TRUE@am__EXEEXT_22 = $(js_tests) $(am__EXEEXT_21) -am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \ +am__EXEEXT_23 = tests/test-basic.sh \ + tests/test-basic-bare-split-xattrs.sh tests/test-basic-user.sh \ tests/test-basic-user-only.sh tests/test-basic-root.sh \ tests/test-cli-extensions.sh tests/test-pull-subpath.sh \ tests/test-archivez.sh tests/test-remote-add.sh \ @@ -2166,12 +2166,11 @@ 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$$' distcleancheck_listfiles = find . -type f -print +pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -2392,11 +2391,12 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \ BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions' SUBDIRS = . $(am__append_14) NULL = -BUILT_SOURCES = $(nodist_libostree_1_la_SOURCES) +BUILT_SOURCES = $(top_builddir)/libglnx-config.h \ + $(nodist_libostree_1_la_SOURCES) MANPAGES = -CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_44) \ - src/ostree/parse-datetime.c tests/libreaddir-rand.so \ - tests/ostree-symlink-stamp \ +CLEANFILES = $(am__append_13) $(top_builddir)/libglnx-config.h \ + $(BUILT_SOURCES) $(am__append_44) src/ostree/parse-datetime.c \ + tests/libreaddir-rand.so tests/ostree-symlink-stamp \ tests/ostree-prepare-root-symlink-stamp \ tests/ostree-remount-symlink-stamp \ tests/rofiles-fuse-symlink-stamp tests/ostree \ @@ -2404,9 +2404,11 @@ CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_44) \ tests/rofiles-fuse $(am__append_92) EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ COPYING README.md libglnx/README.md libglnx/COPYING \ - libglnx/libglnx.m4 $(NULL) libglnx/Makefile-libglnx.am \ - bsdiff/bsdiff.h bsdiff/bspatch.h bsdiff/LICENSE \ - bsdiff/README.md bsdiff/Makefile-bsdiff.am \ + libglnx/LICENSES/LGPL-2.0-or-later.txt \ + libglnx/LICENSES/LGPL-2.1-or-later.txt libglnx/libglnx.m4 \ + $(NULL) libglnx/Makefile-libglnx.am bsdiff/bsdiff.h \ + bsdiff/bspatch.h bsdiff/LICENSE bsdiff/README.md \ + bsdiff/Makefile-bsdiff.am \ $(top_srcdir)/src/libostree/libostree-devel.sym \ $(top_srcdir)/src/libostree/libostree-released.sym $(NULL) \ src/libostree/README-gpg src/libostree/bupsplit.h \ @@ -2414,13 +2416,15 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ src/libostree/ostree-enumtypes.c.template \ src/libostree/ostree-deployment-private.h \ src/libostree/ostree-repo-deprecated.h \ - src/libostree/ostree-version.h src/ostree/parse-datetime.y \ - buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \ - tests/ostree.supp $(NULL) $(am__append_70) $(am__append_73) \ - tests/libtest.sh $(am__append_74) $(am__append_79) \ - tests/libostreetest.h tests/libtest.sh $(NULL) \ - src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \ - src/boot/mkinitcpio src/boot/ostree-prepare-root.service \ + src/libostree/ostree-version.h \ + src/libostree/s390x-se-luks-gencpio \ + src/ostree/parse-datetime.y buildutil/tap-driver.sh \ + buildutil/tap-test tests/glib.supp tests/ostree.supp $(NULL) \ + $(am__append_70) $(am__append_73) tests/libtest.sh \ + $(am__append_74) $(am__append_79) tests/libostreetest.h \ + tests/libtest.sh $(NULL) src/boot/dracut/module-setup.sh \ + src/boot/dracut/ostree.conf src/boot/mkinitcpio \ + src/boot/ostree-prepare-root.service \ src/boot/ostree-finalize-staged.path \ src/boot/ostree-remount.service \ src/boot/ostree-finalize-staged.service \ @@ -2429,7 +2433,10 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ $(am__append_91) bin_SCRIPTS = lib_LTLIBRARIES = libostree-1.la -pkglibexec_SCRIPTS = $(am__append_84) + +# Secure Execution: script for creating new initramdisk with LUKS key and config +pkglibexec_SCRIPTS = src/libostree/s390x-se-luks-gencpio \ + $(am__append_84) noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \ libotutil.la libbupsplit.la libostreetest.la privlibdir = $(pkglibdir) @@ -2557,7 +2564,7 @@ libglnx_la_SOURCES = \ libglnx/tests/libglnx-testlib.h \ $(NULL) -libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) +libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir) libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic libglnx_la_LIBADD = $(libglnx_libs) libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil @@ -2735,9 +2742,9 @@ libostree_1_la_SOURCES = src/libostree/ostree-async-progress.c \ symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym # Uncomment this include when adding new development symbols. -# if BUILDOPT_IS_DEVEL_BUILD -# symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym -# endif +#if BUILDOPT_IS_DEVEL_BUILD +#symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym +#endif # http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html wl_versionscript_arg = -Wl,--version-script= @@ -2748,9 +2755,10 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff \ $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) \ $(OT_DEP_CRYPTO_CFLAGS) -fvisibility=hidden \ '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) \ - extern' $(am__append_21) $(am__append_23) $(am__append_25) \ - $(am__append_29) $(am__append_32) $(am__append_35) \ - $(am__append_37) $(am__append_39) + extern' -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" $(am__append_21) \ + $(am__append_23) $(am__append_25) $(am__append_29) \ + $(am__append_32) $(am__append_35) $(am__append_37) \ + $(am__append_39) libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64 libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la \ @@ -2889,15 +2897,15 @@ test_programs = tests/test-bloom tests/test-repo-finder-config \ tests/test-repo-finder-mount $(NULL) $(am__append_77) \ $(am__append_81) _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ - tests/test-basic-user.sh tests/test-basic-user-only.sh \ - tests/test-basic-root.sh tests/test-cli-extensions.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-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-basic-bare-split-xattrs.sh tests/test-basic-user.sh \ + tests/test-basic-user-only.sh tests/test-basic-root.sh \ + tests/test-cli-extensions.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-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 \ @@ -2972,6 +2980,7 @@ dist_installed_test_data = tests/archive-test.sh \ tests/ostree-path-traverse.tar.gz \ tests/pre-signed-pull-data.tar.gz \ tests/libtest-core.sh \ + tests/fixtures/bare-split-xattrs/basic.tar.xz \ $(NULL) dist_test_extra_scripts = \ @@ -8003,7 +8012,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -8205,6 +8214,13 @@ tests/test-basic.sh.log: tests/test-basic.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-basic-bare-split-xattrs.sh.log: tests/test-basic-bare-split-xattrs.sh + @p='tests/test-basic-bare-split-xattrs.sh'; \ + b='tests/test-basic-bare-split-xattrs.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-basic-user.sh.log: tests/test-basic-user.sh @p='tests/test-basic-user.sh'; \ b='tests/test-basic-user.sh'; \ @@ -9107,7 +9123,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -9175,8 +9191,7 @@ installdirs-am: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive +install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -9780,7 +9795,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-exec install-strip + install-data-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--depfiles am--refresh check check-TESTS check-am \ @@ -9868,6 +9883,8 @@ all-local: $(ALL_LOCAL_RULES) # it will try to build it. $(srcdir)/libglnx/Makefile-libglnx.am.inc: $(srcdir)/libglnx/Makefile-libglnx.am sed -e 's,$$(libglnx_srcpath),libglnx,g' < $< > $@ +$(top_builddir)/libglnx-config.h: Makefile.am + echo '#include "config.h"' > $@ # See the comment for the similar libglnx bit above $(srcdir)/bsdiff/Makefile-bsdiff.am.inc: $(srcdir)/bsdiff/Makefile-bsdiff.am sed -e 's,$$(libbsdiff_srcpath),bsdiff,g' < $< > $@ diff --git a/aclocal.m4 b/aclocal.m4 index 7e601777..269f9c56 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. @@ -24,7 +24,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # Owen Taylor 1997-2001 # Increment this whenever this file is changed. -#serial 3 +#serial 4 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, @@ -116,7 +116,7 @@ dnl Now check if the installed GLib is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.glibtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -184,7 +184,7 @@ main (void) } return 1; } -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -206,10 +206,10 @@ main (void) ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], +]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLib or finding the wrong" echo "*** version of GLib. If it is not finding GLib, you'll need to set your" @@ -247,12 +247,12 @@ main (void) # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-11-12 +# Last-changed: 2020-11-20 AC_DEFUN([_AM_PATH_GPGME_CONFIG], [ AC_ARG_WITH(gpgme-prefix, - AC_HELP_STRING([--with-gpgme-prefix=PFX], + AS_HELP_STRING([--with-gpgme-prefix=PFX], [prefix where GPGME is installed (optional)]), gpgme_config_prefix="$withval", gpgme_config_prefix="") if test x"${GPGME_CONFIG}" = x ; then @@ -702,7 +702,7 @@ AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 12 (pkg-config-0.29.2) +# serial 11 (pkg-config-0.29.1) 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.2]) +[m4_define([PKG_MACROS_VERSION], [0.29.1]) 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 $2]) +AC_MSG_CHECKING([for $1]) _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,6 +977,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + # Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -992,7 +1060,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.3], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -1008,7 +1076,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.3])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1733,7 +1801,12 @@ 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 - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then diff --git a/apidoc/Makefile.in b/apidoc/Makefile.in index 5b0c5c22..f2089260 100644 --- a/apidoc/Makefile.in +++ b/apidoc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. @@ -133,7 +133,6 @@ am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -190,6 +189,7 @@ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/../Makefile-libostree-defines.am \ $(srcdir)/Makefile.in $(top_srcdir)/gtk-doc.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ diff --git a/apidoc/html/home.png b/apidoc/html/home.png index 3966a915..9346b336 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 bb0fbcaf..1ad0c2e3 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2022.1

+

for OSTree 2021.6


diff --git a/apidoc/html/left-insensitive.png b/apidoc/html/left-insensitive.png index 2cd8c169..3269393a 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 1ca1664c..2abde032 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 08cf5d95..3c37e56a 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 (

csum_v

-
+

GVariant of type ay

GVariant of type ay

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

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 (

bytes

-
+

GVariant of type ay

GVariant of type ay

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

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);
+ 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/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/buildmain. 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/buildmain. In both cases, +or NULL if the refspec refs to a local ref.

@@ -1200,7 +1200,7 @@ or

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 (

a

-
+

A GVariant containing a serialized object

A GVariant containing a serialized object

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

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 (

    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 (

    dir_info

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

    Returns

    -

    A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

    -

    [transfer full]

    +

    A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

    +

    [transfer full][not nullable]


    ostree_validate_structureof_objtype ()

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

    Parameters

    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 (

    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 (

    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 (

    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

    @@ -2801,6 +2801,20 @@ content, the other types are metadata.

    + + + + + + + + + +
     

    OSTREE_OBJECT_TYPE_FILE_XATTRS

    +

    Detached xattrs content, for 'bare-split-xattrs' mode.

    +
     

    OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK

    +

    Hardlink to a .file-xattrs given the checksum of its .file object.

    +
     
    @@ -2808,7 +2822,7 @@ content, the other types are metadata.


    OSTREE_OBJECT_TYPE_LAST

    -
    #define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_PAYLOAD_LINK
    +
    #define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK
     

    Last valid object type; use this to validate ranges.

    @@ -2918,8 +2932,12 @@ stale and should be re-downloaded if possible (similar to the HTTP

The currently defined keys for the a{sv} of additional metadata for each commit are:

-
  • key: ostree.commit.timestamp, value: t, timestamp (seconds since the -Unix epoch in UTC, big-endian) when the commit was committed

+
    +
  • key: ostree.commit.timestamp, value: t, timestamp (seconds since the +Unix epoch in UTC, big-endian) when the commit was committed

  • +
  • key: ostree.commit.version, value: s, the version value from the +commit's metadata if it was defined. Since: 2022.2

  • +

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

-

gchar *checksum;

+

gchar *checksum;

object checksum.

[not nullable] @@ -2953,12 +2971,12 @@ entry corresponds to an object in the associated commit.

  -

guint64 unpacked;

+

guint64 unpacked;

unpacked object size

  -

guint64 archived;

+

guint64 archived;

compressed object size

  diff --git a/apidoc/html/ostree-GPG-signature-verification-results.html b/apidoc/html/ostree-GPG-signature-verification-results.html index 39ea8f99..d6c94bec 100644 --- a/apidoc/html/ostree-GPG-signature-verification-results.html +++ b/apidoc/html/ostree-GPG-signature-verification-results.html @@ -41,7 +41,7 @@ -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

out_signature_index

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

+, or NULL.

[out] @@ -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,30 @@ array

Returns

-

a new, floating, GVariant tuple

+

a new, floating, GVariant tuple.

+

[transfer floating]


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 +360,8 @@ available attribute.

Returns

-

a new, floating, GVariant tuple

+

a new, floating, GVariant tuple.

+

[transfer floating]


@@ -367,9 +369,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 +410,7 @@ format. Currently must be 0.

output_buffer

-

a GString to hold the description

+

a GString to hold the description

  @@ -430,11 +432,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 +453,12 @@ and signature index.

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

  @@ -476,14 +478,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 +504,7 @@ it will handle the

error

-

A GError

+

A GError

  @@ -510,9 +512,9 @@ it will handle the

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 +594,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

@@ -605,56 +607,56 @@ The attribute's

OSTREE_GPG_SIGNATURE_ATTR_VALID

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

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

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

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

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

- + @@ -410,11 +410,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.

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

- + @@ -454,12 +454,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

-

[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 +705,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 aa269dda..6ce4b817 100644 --- a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html +++ b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html @@ -65,7 +65,7 @@
-gboolean +gboolean ostree_mutable_tree_check_error () @@ -103,7 +103,7 @@
-gboolean +gboolean ostree_mutable_tree_replace_file () @@ -111,7 +111,7 @@
-gboolean +gboolean ostree_mutable_tree_remove () @@ -119,7 +119,7 @@
-gboolean +gboolean ostree_mutable_tree_ensure_dir () @@ -127,7 +127,7 @@
-gboolean +gboolean ostree_mutable_tree_lookup () @@ -135,7 +135,7 @@
-gboolean +gboolean ostree_mutable_tree_ensure_parent_dirs () @@ -143,7 +143,7 @@
-gboolean +gboolean ostree_mutable_tree_walk () @@ -151,7 +151,7 @@
-GHashTable * +GHashTable * ostree_mutable_tree_get_subdirs () @@ -159,7 +159,7 @@
-GHashTable * +GHashTable * ostree_mutable_tree_get_files () @@ -167,7 +167,7 @@
-gboolean +gboolean ostree_mutable_tree_fill_empty_from_dirtree () @@ -215,7 +215,7 @@ ostree_mutable_tree_new (voidOstreeMutableTree * ostree_mutable_tree_new_from_commit (OstreeRepo *repo, const char *rev, - GError **error); + GError **error);

Creates a new OstreeMutableTree with the contents taken from the given commit. The data will be loaded from the repo lazily as needed.

@@ -293,9 +293,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 @@ -354,20 +354,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 .

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

error

a GError

a GError

 

error

a GError

a GError

 
@@ -491,7 +491,7 @@ ostree_mutable_tree_lookup (

error

-
+ @@ -501,13 +501,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.

@@ -542,7 +542,7 @@ exist.

- + @@ -552,12 +552,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 @@ -605,7 +605,7 @@ child will be returned in out_subdir


ostree_mutable_tree_get_subdirs ()

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

Returns

@@ -616,7 +616,7 @@ ostree_mutable_tree_get_subdirs (

ostree_mutable_tree_get_files ()

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

Returns

@@ -627,7 +627,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 8f5c983f..25b92fe4 100644
--- a/apidoc/html/ostree-OstreeRepo.html
+++ b/apidoc/html/ostree-OstreeRepo.html
@@ -41,7 +41,7 @@
 
- - - + + + + - @@ -8504,12 +8588,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

@@ -8555,14 +8639,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 @@ -8625,14 +8709,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 @@ -8642,7 +8726,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 @@ -8650,7 +8734,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

@@ -8673,7 +8757,7 @@ one around this call.

- + @@ -8703,15 +8787,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.

@@ -8740,7 +8824,7 @@ subpath.

- + @@ -8770,13 +8854,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:

    @@ -8868,7 +8952,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.

    @@ -8907,13 +8991,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

    @@ -8941,17 +9025,17 @@ ostree_repo_sign_commit (

    homedir

    -
+ - + - + @@ -8961,12 +9045,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

@@ -8994,12 +9078,12 @@ ostree_repo_append_gpg_signature (
- + - + @@ -9009,12 +9093,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

@@ -9037,17 +9121,17 @@ ostree_repo_add_gpg_signature_summary (

homedir

-
+ - + - + @@ -9057,15 +9141,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 @@ -9088,12 +9172,12 @@ data.

- + - + @@ -9103,7 +9187,7 @@ data.

- + @@ -9113,12 +9197,12 @@ data.

- + - + @@ -9140,20 +9224,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

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

- + - + @@ -9209,7 +9293,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

@@ -9217,15 +9301,15 @@ the verifications using GPG keys in the keyrings of all remotes.


ostree_repo_signature_verify_commit_data ()

-
gboolean
+
gboolean
 ostree_repo_signature_verify_commit_data
                                (OstreeRepo *self,
                                 const char *remote_name,
-                                GBytes *commit_data,
-                                GBytes *commit_metadata,
+                                GBytes *commit_data,
+                                GBytes *commit_metadata,
                                 OstreeRepoVerifyFlags flags,
                                 char **out_results,
-                                GError **error);
+ GError **error);

Validate the commit data using the commit metadata which must contain at least one valid signature. If GPG and signapi are both enabled, then both must find at least one valid signature.

@@ -9280,13 +9364,13 @@ both enabled, then both must find at least one valid signature.


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 .

@@ -9334,7 +9418,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


@@ -9342,11 +9426,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.

@@ -9394,7 +9478,7 @@ ostree_repo_verify_commit_ext (

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

@@ -9403,10 +9487,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 @@ -9451,7 +9535,7 @@ configured for remote

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

Since: 2016.14

@@ -9462,10 +9546,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 @@ -9492,12 +9576,12 @@ ostree_repo_verify_summary (

summary

-
+ - + @@ -9515,18 +9599,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 @@ -9558,7 +9642,7 @@ lexicographic order.

- + @@ -9633,6 +9717,13 @@ possible modes.

+ + + + +

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,7 @@
-gboolean +gboolean ostree_repo_lock_pop () @@ -206,7 +206,7 @@
-gboolean +gboolean ostree_repo_lock_push () @@ -230,7 +230,7 @@
-guint +guint ostree_repo_hash () @@ -238,7 +238,7 @@
-gboolean +gboolean ostree_repo_equal () @@ -246,7 +246,7 @@
-GKeyFile * +GKeyFile * ostree_repo_copy_config () @@ -254,7 +254,7 @@
-gboolean +gboolean ostree_repo_remote_add () @@ -262,7 +262,7 @@
-gboolean +gboolean ostree_repo_remote_delete () @@ -270,7 +270,7 @@
-gboolean +gboolean ostree_repo_remote_change () @@ -286,7 +286,7 @@
-gboolean +gboolean ostree_repo_remote_list_collection_refs () @@ -294,7 +294,7 @@
-gboolean +gboolean ostree_repo_remote_get_url () @@ -302,7 +302,7 @@
-gboolean +gboolean ostree_repo_remote_get_gpg_verify () @@ -310,7 +310,7 @@
-gboolean +gboolean ostree_repo_remote_get_gpg_verify_summary () @@ -318,7 +318,7 @@
-gboolean +gboolean ostree_repo_remote_get_gpg_keys () @@ -326,7 +326,7 @@
-gboolean +gboolean ostree_repo_remote_gpg_import () @@ -334,7 +334,7 @@
-gboolean +gboolean ostree_repo_remote_fetch_summary () @@ -342,7 +342,7 @@
-gboolean +gboolean ostree_repo_remote_fetch_summary_with_options () @@ -350,7 +350,7 @@
-gboolean +gboolean ostree_repo_reload_config () @@ -358,7 +358,7 @@
-gboolean +gboolean ostree_repo_get_remote_boolean_option () @@ -366,7 +366,7 @@
-gboolean +gboolean ostree_repo_get_remote_list_option () @@ -374,7 +374,7 @@
-gboolean +gboolean ostree_repo_get_remote_option () @@ -390,7 +390,7 @@
-gboolean +gboolean ostree_repo_write_config () @@ -398,7 +398,7 @@
-gboolean +gboolean ostree_repo_scan_hardlinks () @@ -406,7 +406,7 @@
-gboolean +gboolean ostree_repo_prepare_transaction () @@ -414,7 +414,7 @@
-gboolean +gboolean ostree_repo_commit_transaction () @@ -422,7 +422,7 @@
-gboolean +gboolean ostree_repo_abort_transaction () @@ -454,7 +454,7 @@
-gboolean +gboolean ostree_repo_set_ref_immediate () @@ -462,7 +462,7 @@
-gboolean +gboolean ostree_repo_set_alias_ref_immediate () @@ -470,7 +470,7 @@
-gboolean +gboolean ostree_repo_set_cache_dir () @@ -478,7 +478,7 @@
-gboolean +gboolean ostree_repo_set_collection_id () @@ -486,7 +486,7 @@
-gboolean +gboolean ostree_repo_set_collection_ref_immediate () @@ -494,7 +494,7 @@
-gboolean +gboolean ostree_repo_sign_delta () @@ -502,7 +502,7 @@
-gboolean +gboolean ostree_repo_has_object () @@ -510,7 +510,7 @@
-gboolean +gboolean ostree_repo_mark_commit_partial () @@ -518,7 +518,7 @@
-gboolean +gboolean ostree_repo_mark_commit_partial_reason () @@ -526,7 +526,7 @@
-gboolean +gboolean ostree_repo_write_metadata () @@ -542,7 +542,7 @@
-gboolean +gboolean ostree_repo_write_metadata_finish () @@ -550,7 +550,7 @@
-gboolean +gboolean ostree_repo_write_content () @@ -582,7 +582,7 @@
-gboolean +gboolean ostree_repo_write_metadata_trusted () @@ -590,7 +590,7 @@
-gboolean +gboolean ostree_repo_write_metadata_stream_trusted () @@ -598,7 +598,7 @@
-gboolean +gboolean ostree_repo_write_content_trusted () @@ -614,7 +614,7 @@
-gboolean +gboolean ostree_repo_write_content_finish () @@ -622,7 +622,7 @@
-gboolean +gboolean ostree_repo_resolve_rev () @@ -630,7 +630,7 @@
-gboolean +gboolean ostree_repo_resolve_rev_ext () @@ -638,7 +638,7 @@
-gboolean +gboolean ostree_repo_list_refs () @@ -646,7 +646,7 @@
-gboolean +gboolean ostree_repo_list_refs_ext () @@ -654,7 +654,7 @@
-gboolean +gboolean ostree_repo_list_collection_refs () @@ -662,7 +662,7 @@
-gboolean +gboolean ostree_repo_remote_list_refs () @@ -670,7 +670,7 @@
-gboolean +gboolean ostree_repo_resolve_collection_ref () @@ -678,7 +678,7 @@
-gboolean +gboolean ostree_repo_load_variant () @@ -686,7 +686,7 @@
-gboolean +gboolean ostree_repo_load_commit () @@ -694,7 +694,7 @@
-gboolean +gboolean ostree_repo_load_variant_if_exists () @@ -702,7 +702,7 @@
-gboolean +gboolean ostree_repo_load_file () @@ -710,7 +710,7 @@
-gboolean +gboolean ostree_repo_load_object_stream () @@ -718,7 +718,7 @@
-gboolean +gboolean ostree_repo_query_object_storage_size () @@ -726,7 +726,7 @@
-gboolean +gboolean ostree_repo_import_object_from () @@ -734,7 +734,7 @@
-gboolean +gboolean ostree_repo_import_object_from_with_trust () @@ -742,7 +742,7 @@
-gboolean +gboolean ostree_repo_import_archive_to_mtree () @@ -750,7 +750,7 @@
-gboolean +gboolean ostree_repo_export_tree_to_archive () @@ -758,7 +758,7 @@
-gboolean +gboolean ostree_repo_delete_object () @@ -766,7 +766,7 @@
-gboolean +gboolean ostree_repo_fsck_object () @@ -790,7 +790,7 @@
-GVariant * +GVariant * (*OstreeRepoCommitModifierXattrCallback) () @@ -814,7 +814,7 @@
-gboolean +gboolean ostree_repo_commit_modifier_set_sepolicy_from_commit () @@ -870,7 +870,7 @@
-GType +GType ostree_repo_devino_cache_get_type () @@ -878,7 +878,7 @@
-gboolean +gboolean ostree_repo_write_directory_to_mtree () @@ -886,7 +886,7 @@
-gboolean +gboolean ostree_repo_write_dfd_to_mtree () @@ -894,7 +894,7 @@
-gboolean +gboolean ostree_repo_write_archive_to_mtree () @@ -902,7 +902,7 @@
-gboolean +gboolean ostree_repo_write_archive_to_mtree_from_fd () @@ -910,7 +910,7 @@
-gboolean +gboolean ostree_repo_write_mtree () @@ -918,7 +918,7 @@
-gboolean +gboolean ostree_repo_write_commit () @@ -926,7 +926,7 @@
-gboolean +gboolean ostree_repo_write_commit_with_time () @@ -934,7 +934,7 @@
-gboolean +gboolean ostree_repo_read_commit_detached_metadata () @@ -942,7 +942,7 @@
-gboolean +gboolean ostree_repo_write_commit_detached_metadata () @@ -958,7 +958,7 @@
-gboolean +gboolean ostree_repo_checkout_tree () @@ -966,7 +966,7 @@
-gboolean +gboolean ostree_repo_checkout_tree_at () @@ -974,7 +974,7 @@
-gboolean +gboolean ostree_repo_checkout_at () @@ -982,7 +982,7 @@
-gboolean +gboolean ostree_repo_checkout_gc () @@ -990,7 +990,7 @@
-gboolean +gboolean ostree_repo_read_commit () @@ -998,7 +998,7 @@
-gboolean +gboolean ostree_repo_list_objects () @@ -1006,7 +1006,7 @@
-gboolean +gboolean ostree_repo_list_commit_objects_starting_with () @@ -1014,7 +1014,7 @@
-gboolean +gboolean ostree_repo_list_static_delta_names () @@ -1022,7 +1022,7 @@
-gboolean +gboolean ostree_repo_list_static_delta_indexes () @@ -1030,7 +1030,7 @@
-gboolean +gboolean ostree_repo_static_delta_reindex () @@ -1038,7 +1038,7 @@
-gboolean +gboolean ostree_repo_static_delta_generate () @@ -1046,7 +1046,7 @@
-gboolean +gboolean ostree_repo_static_delta_execute_offline_with_signature () @@ -1054,7 +1054,7 @@
-gboolean +gboolean ostree_repo_static_delta_execute_offline () @@ -1062,7 +1062,7 @@
-gboolean +gboolean ostree_repo_static_delta_verify_signature () @@ -1070,7 +1070,7 @@
-GHashTable * +GHashTable * ostree_repo_traverse_new_reachable () @@ -1078,7 +1078,7 @@
-GHashTable * +GHashTable * ostree_repo_traverse_new_parents () @@ -1094,7 +1094,7 @@
-gboolean +gboolean ostree_repo_traverse_commit () @@ -1102,7 +1102,7 @@
-gboolean +gboolean ostree_repo_traverse_commit_union () @@ -1110,7 +1110,7 @@
-gboolean +gboolean ostree_repo_traverse_commit_union_with_parents () @@ -1118,6 +1118,14 @@
+gboolean + +ostree_repo_traverse_commit_with_flags () +
void @@ -1150,7 +1158,7 @@
-gboolean +gboolean ostree_repo_commit_traverse_iter_init_commit () @@ -1158,7 +1166,7 @@
-gboolean +gboolean ostree_repo_commit_traverse_iter_init_dirtree () @@ -1174,7 +1182,7 @@
-gboolean +gboolean ostree_repo_prune () @@ -1182,7 +1190,7 @@
-gboolean +gboolean ostree_repo_prune_static_deltas () @@ -1190,7 +1198,7 @@
-gboolean +gboolean ostree_repo_traverse_reachable_refs () @@ -1198,7 +1206,7 @@
-gboolean +gboolean ostree_repo_prune_from_reachable () @@ -1206,7 +1214,7 @@
-gboolean +gboolean ostree_repo_pull () @@ -1214,7 +1222,7 @@
-gboolean +gboolean ostree_repo_pull_one_dir () @@ -1222,7 +1230,7 @@
-gboolean +gboolean ostree_repo_pull_with_options () @@ -1238,7 +1246,7 @@
-gboolean +gboolean ostree_repo_sign_commit () @@ -1246,7 +1254,7 @@
-gboolean +gboolean ostree_repo_append_gpg_signature () @@ -1254,7 +1262,7 @@
-gboolean +gboolean ostree_repo_add_gpg_signature_summary () @@ -1262,7 +1270,7 @@
-gboolean +gboolean ostree_repo_gpg_sign_data () @@ -1278,7 +1286,7 @@
-gboolean +gboolean ostree_repo_signature_verify_commit_data () @@ -1286,7 +1294,7 @@
-gboolean +gboolean ostree_repo_verify_commit () @@ -1318,7 +1326,7 @@
-gboolean +gboolean ostree_repo_regenerate_summary () @@ -1474,10 +1482,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

@@ -1499,7 +1507,7 @@ ostree_repo_mode_from_string (const

error

-
+ @@ -1512,8 +1520,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().

@@ -1552,7 +1560,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

 
@@ -1579,8 +1587,8 @@ ostree_repo_new (

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 "/".

@@ -1631,17 +1639,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 @@ -1662,7 +1670,7 @@ ensuring data consistency.

- + @@ -1672,7 +1680,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().

@@ -1698,7 +1706,7 @@ ostree_repo_get_disable_fsync (

ostree_repo_is_system ()

-
gboolean
+
gboolean
 ostree_repo_is_system (OstreeRepo *repo);

Parameters

@@ -1717,15 +1725,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.

@@ -1745,7 +1753,7 @@ If the repository is not writable, the error<
- + @@ -1753,7 +1761,7 @@ If the repository is not writable, the error<

Returns

-

TRUE if this repository is writable

+

TRUE if this repository is writable


@@ -1763,9 +1771,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.

@@ -1830,11 +1838,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 @@ -1882,7 +1890,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.

@@ -1910,7 +1918,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.

@@ -1939,7 +1947,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 @@ -1974,10 +1982,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 @@ -2004,7 +2012,7 @@ core.min-free-space-percent repo config options.

- + @@ -2012,14 +2020,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

@@ -2061,7 +2069,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.

@@ -2082,7 +2090,7 @@ 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

@@ -2090,11 +2098,11 @@ the "core.default-repo-finders" config key.


ostree_repo_lock_pop ()

-
gboolean
+
gboolean
 ostree_repo_lock_pop (OstreeRepo *self,
                       OstreeRepoLockType lock_type,
-                      GCancellable *cancellable,
-                      GError **error);
+ 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 @@ -2108,10 +2116,10 @@ lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock i 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.

+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.

+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

 
@@ -2133,12 +2141,12 @@ timeout, a

cancellable

-
+ - + @@ -2146,7 +2154,7 @@ timeout, a

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

Since: 2021.3

@@ -2154,11 +2162,11 @@ set


ostree_repo_lock_push ()

-
gboolean
+
gboolean
 ostree_repo_lock_push (OstreeRepo *self,
                        OstreeRepoLockType lock_type,
-                       GCancellable *cancellable,
-                       GError **error);
+ 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 @@ -2173,10 +2181,10 @@ lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock i 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.

+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.

+TRUE is returned.

Parameters

a GCancellable

a GCancellable

 

error

a GError

a GError

 
@@ -2198,12 +2206,12 @@ timeout, a

cancellable

-
+ - + @@ -2211,7 +2219,7 @@ timeout, a

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

Since: 2021.3

@@ -2222,10 +2230,10 @@ set

OstreeRepoAutoLock *
 ostree_repo_auto_lock_push (OstreeRepo *self,
                             OstreeRepoLockType lock_type,
-                            GCancellable *cancellable,
-                            GError **error);
+ 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 +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.

@@ -2268,12 +2276,12 @@ This will automatically release the lock if it was acquired successfully.

- + - + @@ -2282,7 +2290,7 @@ This will automatically release the lock if it was acquired successfully.

Returns

self -on success, otherwise NULL with error +on success, otherwise NULL with error set

Since: 2021.3

@@ -2294,7 +2302,7 @@ set

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 +not NULL, ostree_repo_lock_pop() will be called on it. If ostree_repo_lock_pop() fails, a critical warning will be emitted.

[skip]

@@ -2317,7 +2325,7 @@ not <

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 @@ -2348,14 +2356,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

a GCancellable

a GCancellable

 

error

a GError

a GError

 

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 
@@ -2380,16 +2388,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

@@ -2400,24 +2408,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

@@ -2465,11 +2473,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.

@@ -2509,15 +2517,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.

@@ -2579,9 +2587,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

@@ -2606,7 +2614,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]

@@ -2614,19 +2622,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.

@@ -2672,11 +2680,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 @@ -2715,17 +2723,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 @@ -2765,18 +2773,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 @@ -2816,30 +2824,30 @@ remote does not exist.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_get_gpg_keys ()

-
gboolean
+
gboolean
 ostree_repo_remote_get_gpg_keys (OstreeRepo *self,
                                  const char *name,
                                  const char * const *key_ids,
-                                 GPtrArray **out_keys,
-                                 GCancellable *cancellable,
-                                 GError **error);
+ GPtrArray **out_keys, + GCancellable *cancellable, + GError **error);

Enumerate the trusted GPG keys for the remote name . If name is -NULL, the global GPG keys will be returned. The keys will be +NULL, the global GPG keys will be returned. The keys will be returned in the out_keys - GPtrArray. Each element in the array is a -GVariant of format OSTREE_GPG_KEY_GVARIANT_FORMAT. The key_ids + GPtrArray. Each element in the array is a +GVariant of format OSTREE_GPG_KEY_GVARIANT_FORMAT. The key_ids array can be used to limit which keys are included. If key_ids is -NULL, then all keys are included.

+NULL, then all keys are included.

Parameters

@@ -2856,28 +2864,28 @@ array can be used to limit which keys are included. If - + - + - + - + - + @@ -2885,28 +2893,28 @@ array can be used to limit which keys are included. If

Returns

-

TRUE if the GPG keys could be enumerated, FALSE otherwise

+

TRUE if the GPG keys could be enumerated, FALSE otherwise

Since: 2021.4


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 @@ -2932,28 +2940,28 @@ from the remote named name

- + - + +keys, or NULL.

- + - + @@ -2961,19 +2969,19 @@ keys, or

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 @@ -2985,10 +2993,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

@@ -3012,23 +3020,23 @@ with

out_summary

+NULL.

+signature data, or NULL.

- + - + @@ -3036,21 +3044,21 @@ signature data, or

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:

    @@ -3088,23 +3096,23 @@ means return errors without retrying

+NULL.

+signature data, or NULL.

- + - + @@ -3112,17 +3120,17 @@ signature data, or

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.

@@ -3157,13 +3165,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 @@ -3172,7 +3180,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

name

name of the remote or NULL.

name of the remote or NULL.

[nullable]

key_ids

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

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

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

out_keys

return location for a GPtrArray of the remote's trusted GPG keys, or -NULL.

return location for a GPtrArray of the remote's trusted GPG keys, or +NULL.

[out][optional][element-type GVariant][transfer container]

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

 

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

 
@@ -3218,7 +3226,7 @@ is not present

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

Since: 2016.5

@@ -3226,19 +3234,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

@@ -3267,7 +3275,7 @@ to

out_value

+g_strfreev().

@@ -3280,7 +3288,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

@@ -3288,20 +3296,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

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

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

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

Since: 2016.5

@@ -3376,17 +3384,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.

@@ -3410,7 +3418,7 @@ ostree_repo_write_config (

error

-
+ @@ -3420,10 +3428,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 @@ -3469,11 +3477,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 @@ -3526,11 +3534,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.

@@ -3576,10 +3584,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 @@ -3661,11 +3669,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 @@ -3710,13 +3718,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 @@ -3767,13 +3775,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.

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

- + @@ -3824,13 +3832,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

@@ -3858,7 +3866,7 @@ ostree_repo_set_alias_ref_immediate (
- + @@ -3879,12 +3887,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 @@ -3916,12 +3924,12 @@ write permissions in the repo, where the cache is normally stored.

- + - + @@ -3932,10 +3940,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().

@@ -3955,12 +3963,12 @@ configuration on disk using

collection_id

-
+ - + @@ -3968,20 +3976,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.

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

- + @@ -4024,21 +4032,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.

@@ -4092,17 +4100,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]
@@ -4129,7 +4137,7 @@ ostree_repo_has_object (

out_have_object

-
+ @@ -4147,17 +4155,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" @@ -4201,13 +4209,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 @@ -4257,20 +4265,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

@@ -4327,10 +4335,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 @@ -4387,11 +4395,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

@@ -4429,14 +4437,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 @@ -4498,12 +4506,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.

@@ -4560,7 +4568,7 @@ the repository.

Returns

-

A new writer, or NULL on error.

+

A new writer, or NULL on error.

[transfer full]

Since: 2021.2

@@ -4571,14 +4579,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.

@@ -4655,12 +4663,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, @@ -4727,13 +4735,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 @@ -4784,15 +4792,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 @@ -4848,13 +4856,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 @@ -4913,11 +4921,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 @@ -4975,11 +4983,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

@@ -4997,7 +5005,7 @@ ostree_repo_write_content_finish (
- + @@ -5007,7 +5015,7 @@ ostree_repo_write_content_finish ( - + @@ -5017,12 +5025,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 @@ -5053,7 +5061,7 @@ find the given refspec in local.

- @@ -5069,13 +5077,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(), @@ -5114,7 +5122,7 @@ using it has no effect.

- @@ -5131,14 +5139,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 @@ -5146,7 +5154,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

@@ -5189,15 +5197,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 @@ -5254,13 +5262,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 @@ -5268,7 +5276,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 @@ -5292,7 +5300,7 @@ collection ID is configured for the repository

- + @@ -5320,19 +5328,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]
@@ -5374,25 +5382,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 @@ -5418,7 +5426,7 @@ flag

allow_noent

-
@@ -5431,20 +5439,20 @@ doesn’t exist

- + - + @@ -5452,19 +5460,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 @@ -5511,12 +5519,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 @@ -5562,19 +5570,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

@@ -5617,14 +5625,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.

@@ -5678,14 +5686,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.

@@ -5740,13 +5748,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.

@@ -5796,13 +5804,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 @@ -5858,22 +5866,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.

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

- + @@ -5929,14 +5937,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 @@ -5993,13 +6001,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 @@ -6051,16 +6059,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

@@ -6103,12 +6111,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.

@@ -6157,8 +6165,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

 
@@ -6202,8 +6210,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

@@ -6230,7 +6238,7 @@ ostree_repo_commit_modifier_new ( - + @@ -6245,12 +6253,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);

@@ -6259,8 +6267,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 @@ -6307,7 +6315,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 @@ -6340,13 +6348,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.

@@ -6465,19 +6473,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 , @@ -6529,14 +6537,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 @@ -6595,14 +6603,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 @@ -6658,15 +6666,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 @@ -6722,12 +6730,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 @@ -6776,16 +6784,16 @@ 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 @@ -6810,7 +6818,7 @@ overridden with an explicit timestamp via the

- + @@ -6825,7 +6833,7 @@ overridden with an explicit timestamp via the - + @@ -6855,17 +6863,17 @@ overridden with an explicit timestamp via the

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 @@ -6886,7 +6894,7 @@ and root_metadata_checksum

- + @@ -6901,7 +6909,7 @@ and root_metadata_checksum - + @@ -6936,17 +6944,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

destroy_notify

A GDestroyNotify

A GDestroyNotify

 

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]
@@ -6968,7 +6976,7 @@ to - + @@ -6988,18 +6996,18 @@ to

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

@@ -7022,7 +7030,7 @@ data will be deleted.

- + @@ -7081,15 +7089,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 @@ -7155,14 +7163,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, @@ -7224,14 +7232,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 @@ -7293,10 +7301,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.

@@ -7331,13 +7339,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 .

@@ -7387,18 +7395,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][nullable][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]
@@ -7438,20 +7446,20 @@ to

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 @@ -7495,18 +7503,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 .

@@ -7546,11 +7554,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 .

@@ -7591,18 +7599,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

@@ -7626,7 +7634,7 @@ are reachable by an existing delta (if opt_to_commit
- + @@ -7647,17 +7655,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 @@ -7700,7 +7708,7 @@ for input files

- + @@ -7735,14 +7743,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. @@ -7777,7 +7785,7 @@ one part.

- + @@ -7798,13 +7806,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 @@ -7830,7 +7838,7 @@ must contain a file named "superblock", along with at least one part.

- + @@ -7850,13 +7858,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

@@ -7905,9 +7913,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

@@ -7918,11 +7926,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.

@@ -7935,8 +7943,8 @@ a similar

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.

@@ -7950,13 +7958,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 @@ -8008,13 +8016,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 @@ -8067,15 +8075,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 @@ -8136,6 +8144,82 @@ belongs to.


+

ostree_repo_traverse_commit_with_flags ()

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

Update the set inout_reachable + containing all objects reachable +from commit_checksum +, traversing maxdepth + parent commits.

+

Additionally this constructs a mapping from each object to the parents +of the object, which can be used to track which commits an object +belongs to.

+

[skip]

+
+

Parameters

+

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

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

repo

Repo

 

flags

change traversal behaviour according to these flags

 

commit_checksum

ASCII SHA256 checksum

 

maxdepth

Traverse this many parent commits, -1 for unlimited

 

inout_reachable

Set of reachable objects

 

inout_parents

Map from object to parent object

 

cancellable

Cancellable

 

error

Error

 
+
+

Since: 2018.5

+
+
+

ostree_repo_commit_traverse_iter_cleanup ()

void
 ostree_repo_commit_traverse_iter_cleanup
@@ -8235,13 +8319,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

@@ -8284,13 +8368,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

@@ -8335,8 +8419,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 @@ -8380,15 +8464,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 @@ -8458,11 +8542,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.

@@ -8483,7 +8567,7 @@ deleted.

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_MODE_BARE_SPLIT_XATTRS

+

Same as BARE_USER, but xattrs are stored separately from file content, with dedicated object types.

+
 
@@ -9757,57 +9848,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

  @@ -10196,7 +10287,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


@@ -10241,11 +10332,22 @@ as - List of pack file checksums in which this object appears

- + +

OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE

-  -  - + +

No special options for traverse

+ +  + + +

OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY

+ +

Traverse and retrieve only commit objects. (Since: 2022.2)

+ +  + +
@@ -10318,6 +10420,13 @@ as - List of pack file checksums in which this object appears

  + +

OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY

+ +

Only traverse commit objects. (Since 2022.2)

+ +  +
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 399390e6..ea4de364 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 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.

status

-
+ @@ -432,11 +432,11 @@ operation is thread-safe. 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 d3155088..9b44c0ca 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

 

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

@@ -1006,7 +1006,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]

@@ -1016,7 +1016,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

@@ -1043,7 +1043,7 @@ ostree_sysroot_require_booted_deployment

ostree_sysroot_get_deployment_directory ()

-
GFile *
+
GFile *
 ostree_sysroot_get_deployment_directory
                                (OstreeSysroot *self,
                                 OstreeDeployment *deployment);
@@ -1115,9 +1115,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

@@ -1142,10 +1142,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.

@@ -1179,10 +1179,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.

@@ -1216,14 +1216,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 @@ -1315,11 +1315,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()).

@@ -1358,7 +1358,7 @@ ostree_sysroot_get_repo (

Returns

-

TRUE on success, FALSE otherwise

+

TRUE on success, FALSE otherwise


@@ -1383,7 +1383,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

@@ -1391,11 +1391,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.

@@ -1436,12 +1436,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 @@ -1487,12 +1487,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.

@@ -1537,12 +1537,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 @@ -1591,11 +1591,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 @@ -1642,11 +1642,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.

@@ -1685,13 +1685,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 @@ -1742,17 +1742,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 .

@@ -1796,16 +1796,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

@@ -1843,7 +1843,7 @@ ostree_sysroot_stage_tree (

override_kernel_argv

-
+ @@ -1869,17 +1869,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.

@@ -1944,12 +1944,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.

@@ -1995,16 +1995,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

@@ -2042,7 +2042,7 @@ ostree_sysroot_deploy_tree (

override_kernel_argv

-
+ @@ -2068,17 +2068,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 @@ -2189,7 +2189,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 @@ -2234,7 +2234,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);
@@ -2270,15 +2270,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 7eda284e..d3cd48b4 100644 --- a/apidoc/html/ostree-SELinux-policy-management.html +++ b/apidoc/html/ostree-SELinux-policy-management.html @@ -65,7 +65,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 () @@ -80,7 +80,7 @@
-gboolean +gboolean ostree_sepolicy_get_label () @@ -95,7 +95,7 @@
-gboolean +gboolean ostree_sepolicy_restorecon () @@ -103,7 +103,7 @@
-gboolean +gboolean ostree_sepolicy_setfscreatecon () @@ -149,9 +149,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

@@ -191,8 +191,8 @@ ostree_sepolicy_new (

ostree_sepolicy_new_at ()

OstreeSePolicy *
 ostree_sepolicy_new_at (int rootfs_dfd,
-                        GCancellable *cancellable,
-                        GError **error);
+ GCancellable *cancellable, + GError **error);

Parameters

@@ -234,8 +234,8 @@ ostree_sepolicy_new_at (intOstreeSePolicy * ostree_sepolicy_new_from_commit (OstreeRepo *repo, const char *rev, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

Extract the SELinux policy from a commit object via a partial checkout. This is useful for labeling derived content as separate commits.

This function is the backend of ostree_repo_commit_modifier_set_sepolicy_from_commit().

@@ -280,7 +280,7 @@ for labeling derived content as separate commits.


ostree_sepolicy_get_path ()

-
GFile *
+
GFile *
 ostree_sepolicy_get_path (OstreeSePolicy *self);

This API should be considered deprecated, because it's supported for policy objects to be created from file-descriptor relative paths, which @@ -320,18 +320,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

@@ -391,15 +391,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.

@@ -438,7 +438,7 @@ ostree_sepolicy_restorecon (

out_new_label

-
+ @@ -458,11 +458,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 d5038edb..39be5e72 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

error

-
+ @@ -470,7 +470,7 @@ ostree_sign_get_by_name (const

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

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 15cf4c20..da3eee99 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

 

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 39ccebf7..d6c2e2b6 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 c4dcdc15..8f5262a3 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 66cfe338..3623eec8 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 573c4cf1..1f0ff6f2 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 (

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 (

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 0b843ac7..90015a79 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 d36f7b44..27fd47ae 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 5964a01e..7443e479 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -227,6 +227,7 @@ + @@ -476,11 +477,14 @@ + + + @@ -519,6 +523,7 @@ + @@ -526,6 +531,7 @@ + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index 86cbaada..fc097fc3 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -1562,6 +1562,10 @@ ostree_repo_resolve_keyring_for_collection, function in ostree-repo-remote-finde
+ostree_repo_traverse_commit_with_flags, function in OstreeRepo +
+
+
ostree_repo_traverse_new_parents, function in OstreeRepo
diff --git a/apidoc/html/right-insensitive.png b/apidoc/html/right-insensitive.png index 763208da..4c95785b 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 eb90dd44..76260ec8 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 41781ba5..c163abaa 100644 --- a/apidoc/html/style.css +++ b/apidoc/html/style.css @@ -455,11 +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; } +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 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 478700c9..f4049860 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 636d50dd..80b4b37e 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 aa74c839..577ee808 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -451,6 +451,7 @@ ostree_repo_traverse_parents_get_commits ostree_repo_traverse_commit ostree_repo_traverse_commit_union ostree_repo_traverse_commit_union_with_parents +ostree_repo_traverse_commit_with_flags ostree_repo_commit_traverse_iter_cleanup ostree_repo_commit_traverse_iter_clear ostree_repo_commit_traverse_iter_get_dir diff --git a/apidoc/version.xml b/apidoc/version.xml index 51d37475..f34332ce 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2022.1 \ No newline at end of file +2021.6 \ No newline at end of file diff --git a/bash/ostree b/bash/ostree index c990462f..46363315 100644 --- a/bash/ostree +++ b/bash/ostree @@ -805,6 +805,7 @@ _ostree_prune() { --no-prune --refs-only --static-deltas-only + --commit-only " local options_with_args=" diff --git a/build-aux/config.guess b/build-aux/config.guess index f50dcdb6..b33c9e89 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-02-24' +timestamp='2018-08-29' # 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,8 +84,6 @@ 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 @@ -96,34 +94,39 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -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= ;' +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 +} # 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) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +141,7 @@ Linux|GNU|GNU/*) # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -199,7 +202,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -237,7 +240,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.//'` @@ -389,20 +392,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - 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/[^.]*//'`" + 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 exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -482,7 +480,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -579,7 +577,7 @@ EOF exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -660,7 +658,7 @@ EOF esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -700,7 +698,7 @@ EOF esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + 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 @@ -726,7 +724,7 @@ EOF echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -840,6 +838,17 @@ 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 @@ -894,8 +903,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 ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -922,7 +931,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -971,7 +980,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1046,11 +1055,7 @@ EOF echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - 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 + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1289,7 +1294,7 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1362,6 +1367,7 @@ 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 @@ -1473,7 +1479,7 @@ EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook '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 1d8e98bc..b51fb8cd 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-02-22' +timestamp='2018-08-29' # 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,1223 +110,1159 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 ;; - -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 + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -bluegene*) - os=-cnk + *-*-*) + # 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 ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 + *-*) + # 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 ;; - -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 + *) + # 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 ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # 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 + # 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 ;; - c54x) - basic_machine=tic54x-unknown + op50n) + cpu=hppa1.1 + vendor=oki ;; - c55x) - basic_machine=tic55x-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - c6x) - basic_machine=tic6x-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 ;; leon|leon[3-9]) - basic_machine=sparc-$basic_machine + cpu=sparc + vendor=$basic_machine ;; - 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 + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown + *-*) + IFS="-" read -r cpu vendor <&2 - exit 1 - ;; - # 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-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-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 - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - 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-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - 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" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - 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-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - 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 - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - 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-unknown - 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 - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - 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) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - 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 + cpu=$basic_machine + vendor=pc ;; + # 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) - basic_machine=i386-pc + cpu=i386 + vendor=pc ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + x64 | amd64) + cpu=x86_64 + vendor=pc ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + # Recognize the basic CPU types without company name. + *) + cpu=$basic_machine + vendor=unknown ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc +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} ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + c90-unknown | c90-cray) + vendor=cray + os=${os:-unicos} ;; - pentium4) - basic_machine=i786-pc + fx80-unknown) + vendor=alliant ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + romp-unknown) + vendor=ibm ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + mmix-unknown) + vendor=knuth ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + microblaze-unknown | microblazeel-unknown) + vendor=xilinx ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + rs6000-unknown) + vendor=ibm ;; - pn) - basic_machine=pn-gould + vax-unknown) + vendor=dec ;; - power) basic_machine=power-ibm + pdp11-unknown) + vendor=dec ;; - ppc | ppcbe) basic_machine=powerpc-unknown + we32k-unknown) + vendor=att ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + cydra-unknown) + vendor=cydrome ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + i370-ibm*) + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + orion-unknown) + vendor=highlevel ;; - 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 + xps-unknown | xps100-unknown) + cpu=xps100 + vendor=honeywell ;; -# 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 + # Here we normalize CPU types with a missing or matching vendor + dpx20-unknown | dpx20-bull) + cpu=rs6000 + vendor=bull + os=${os:-bosx} ;; - op50n) - basic_machine=hppa1.1-oki + + # Here we normalize CPU types irrespective of the vendor + amd64-*) + cpu=x86_64 ;; - op60c) - basic_machine=hppa1.1-oki + blackfin-*) + cpu=bfin + os=linux ;; - romp) - basic_machine=romp-ibm + c54x-*) + cpu=tic54x ;; - mmix) - basic_machine=mmix-knuth + c55x-*) + cpu=tic55x ;; - rs6000) - basic_machine=rs6000-ibm + c6x-*) + cpu=tic6x ;; - vax) - basic_machine=vax-dec + e500v[12]-*) + cpu=powerpc + os=$os"spe" ;; - pdp11) - basic_machine=pdp11-dec + mips3*-*) + cpu=mips64 ;; - we32k) - basic_machine=we32k-att + ms1-*) + cpu=mt ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown + m68knommu-*) + cpu=m68k + os=linux ;; - cydra) - basic_machine=cydra-cydrome + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + cpu=s12z ;; - orion) - basic_machine=orion-highlevel + openrisc-*) + cpu=or32 ;; - orion105) - basic_machine=clipper-highlevel + parisc-*) + cpu=hppa + os=linux ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + cpu=i586 ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + cpu=i686 ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + cpu=i686 ;; + pentium4-*) + cpu=i786 + ;; + pc98-*) + cpu=i386 + ;; + ppc-* | ppcbe-*) + cpu=powerpc + ;; + ppcle-* | powerpclittle-*) + cpu=powerpcle + ;; + ppc64-*) + cpu=powerpc64 + ;; + ppc64le-* | powerpc64little-*) + cpu=powerpc64le + ;; + sb1-*) + cpu=mipsisa64sb1 + ;; + sb1el-*) + cpu=mipsisa64sb1el + ;; + sh5e[lb]-*) + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ;; + spur-*) + cpu=spur + ;; + strongarm-* | thumb-*) + cpu=arm + ;; + tx39-*) + cpu=mipstx39 + ;; + tx39el-*) + cpu=mipstx39el + ;; + x64-*) + cpu=x86_64 + ;; + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; + + # Recognize the cannonical CPU Types that limit and/or modify the + # company names they are paired with. + cr16-*) + os=${os:-elf} + ;; + crisv32-* | etraxfs*-*) + cpu=crisv32 + vendor=axis + ;; + cris-* | etrax*-*) + cpu=cris + vendor=axis + ;; + crx-*) + os=${os:-elf} + ;; + neo-tandem) + cpu=neo + vendor=tandem + ;; + nse-tandem) + cpu=nse + vendor=tandem + ;; + nsr-tandem) + cpu=nsr + vendor=tandem + ;; + nsv-tandem) + cpu=nsv + vendor=tandem + ;; + nsx-tandem) + cpu=nsx + vendor=tandem + ;; + s390-*) + cpu=s390 + vendor=ibm + ;; + s390x-*) + cpu=s390x + vendor=ibm + ;; + tile*-*) + os=${os:-linux-gnu} + ;; + *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 + # 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 ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,199 +1270,245 @@ 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 ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + 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 + 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 ;; # 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* | -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*) + # 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*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + 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*) ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` + linux-dietlibc) + os=linux-dietlibc ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) + linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -sunos5*) + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition + wince*) + os=wince ;; - -os400*) - os=-os400 + utek*) + os=bsd ;; - -wince*) - os=-wince + dynix*) + os=bsd ;; - -utek*) - os=-bsd + acis*) + os=aos ;; - -dynix*) - os=-bsd + atheos*) + os=atheos ;; - -acis*) - os=-aos + syllable*) + os=syllable ;; - -atheos*) - os=-atheos + 386bsd) + os=bsd ;; - -syllable*) - os=-syllable + ctix* | uts*) + os=sysv ;; - -386bsd) - os=-bsd + nova*) + os=rtmk-nova ;; - -ctix* | -uts*) - os=-sysv + ns2) + os=nextstep2 ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk + 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 $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) ;; - -ios) + ios) ;; - -none) + none) + ;; + *-eabi) ;; *) - # 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 ;; @@ -1543,258 +1525,265 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor 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 + os=elf + ;; + clipper-intergraph) + os=clix ;; 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 + os=mint + ;; + *-wrs) + os=vxworks ;; *) - 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. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor 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 ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + 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 "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook '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 ec298b53..20d8b2ea 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=2020-11-14.01; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,11 +69,6 @@ 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= @@ -104,28 +99,18 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve data modification time) + -C install only if different (preserve the last 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 @@ -152,13 +137,8 @@ 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 @@ -275,10 +255,6 @@ 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 @@ -325,6 +301,22 @@ 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 @@ -334,49 +326,52 @@ do fi posix_mkdir=false - # 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-$$ + 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-$$ - 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'. - 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;; + # 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;; esac if @@ -387,7 +382,7 @@ do then : else - # mkdir does not conform to POSIX, + # The umask is ridiculous, or 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. @@ -416,7 +411,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 @@ -493,13 +488,6 @@ 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 || @@ -514,9 +502,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || + $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd -f "$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 100755 new mode 100644 index 21e5e078..7f3523d3 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-15" +VERSION=2.4.6 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='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='eval 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=2015-10-07.11; # UTC +scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,8 +1530,6 @@ 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" ;; @@ -1540,16 +1538,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - 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 + 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 done - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1559,16 +1557,10 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# '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: +# 'eval'. Like this: # # my_options_prep () # { @@ -1578,11 +1570,9 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # 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_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1591,37 +1581,25 @@ 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=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # 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=: # ;; -# *) # 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 ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# fi -# -# $args_changed +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1633,32 +1611,16 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# false +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse 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 @@ -1668,28 +1630,17 @@ func_options () { $debug_cmd - _G_rc_options=false + 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"} - 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 + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_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 + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1698,9 +1649,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 propagate that back to rest of this script, then the complete +# needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +# returning. func_hookable func_options_prep func_options_prep () { @@ -1710,14 +1661,10 @@ func_options_prep () opt_verbose=false opt_warning_types= - _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 + func_run_hooks func_options_prep ${1+"$@"} - $_G_rc_options_prep + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1731,20 +1678,18 @@ 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. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: - fi + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # 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 @@ -1759,10 +1704,7 @@ func_parse_options () ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1815,25 +1757,15 @@ func_parse_options () shift ;; - --) _G_rc_parse_options=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - $_G_match_parse_options && _G_rc_parse_options=: done - - 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 + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -1846,21 +1778,16 @@ 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" - 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 + func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - $_G_rc_validate_options + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2141,12 +2068,12 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-15 + version: $progname (GNU libtool) 2.4.6 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 } @@ -2197,7 +2124,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." } @@ -2343,8 +2270,6 @@ 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) @@ -2368,18 +2293,11 @@ 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 - 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 + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2391,12 +2309,9 @@ 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 @@ -2471,22 +2386,15 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; 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 - $_G_rc_lt_parse_options + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options @@ -7366,14 +7274,10 @@ 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=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) + -specs=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7666,10 +7570,7 @@ func_mode_link () case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then @@ -7988,19 +7889,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 @@ -8924,9 +8825,6 @@ 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 9759384a..89dba1e0 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -42,13 +42,11 @@ 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. @@ -1041,8 +1042,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 cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cr libconftest.a conftest.o 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 "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1071,11 +1072,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[[912]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) + 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -1492,7 +1493,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -2866,6 +2867,9 @@ 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 @@ -2874,7 +2878,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="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2886,18 +2890,6 @@ 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 @@ -3557,7 +3549,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) 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 @@ -4063,8 +4055,7 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - $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 + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4436,7 +4427,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4704,12 +4695,6 @@ 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*) @@ -4954,9 +4939,6 @@ 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' ;; @@ -5019,9 +5001,6 @@ 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 @@ -5276,7 +5255,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5797,7 +5776,6 @@ _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' @@ -5819,7 +5797,7 @@ _LT_EOF esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) 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 @@ -6445,7 +6423,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 @@ -6820,7 +6798,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 @@ -6885,7 +6863,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 @@ -7224,7 +7202,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 @@ -7308,7 +7286,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. @@ -7319,7 +7297,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/configure b/configure index c20517ca..f7c53201 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libostree 2022.1. +# Generated by GNU Autoconf 2.69 for libostree 2022.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2022.1' -PACKAGE_STRING='libostree 2022.1' +PACKAGE_VERSION='2022.2' +PACKAGE_STRING='libostree 2022.2' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -814,6 +814,7 @@ BUILDOPT_TSAN_TRUE BUILDOPT_ASAN_FALSE BUILDOPT_ASAN_TRUE WARN_CFLAGS +pkglibexecdir RELEASE_VERSION YEAR_VERSION YFLAGS @@ -1568,7 +1569,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libostree 2022.1 to adapt to many kinds of systems. +\`configure' configures libostree 2022.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1639,7 +1640,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2022.1:";; + short | recursive ) echo "Configuration of libostree 2022.2:";; esac cat <<\_ACEOF @@ -1902,7 +1903,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2022.1 +libostree configure 2022.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2374,7 +2375,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2022.1, which was +It was created by libostree $as_me 2022.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2932,7 +2933,12 @@ 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 - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3237,7 +3243,7 @@ fi # Define the identity of the package. PACKAGE='libostree' - VERSION='2022.1' + VERSION='2022.2' # Some tools Automake needs. @@ -5022,7 +5028,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 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5068,7 +5074,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 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5092,7 +5098,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 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5137,7 +5143,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 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5161,7 +5167,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 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5971,9 +5977,12 @@ test -n "$YACC" || YACC="yacc" YEAR_VERSION=2022 -RELEASE_VERSION=1 +RELEASE_VERSION=2 -PACKAGE_VERSION=2022.1 +PACKAGE_VERSION=2022.2 + + +pkglibexecdir=$libexecdir/$PACKAGE if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : @@ -6000,7 +6009,7 @@ else -Werror=undef \ -Werror=incompatible-pointer-types \ -Werror=misleading-indentation \ - -Werror=missing-include-dirs -Werror=aggregate-return \ + -Werror=missing-include-dirs \ -Wstrict-aliasing=2 \ -Werror=unused-result \ ; do @@ -7269,7 +7278,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) 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 @@ -7631,7 +7640,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} @@ -8132,8 +8141,11 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $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 + 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 # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -9352,8 +9364,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 cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -9385,11 +9397,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[912]*) + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) + 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -10214,12 +10226,6 @@ 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*) @@ -10696,9 +10702,6 @@ $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 @@ -10953,7 +10956,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -11623,7 +11626,6 @@ $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' @@ -11645,7 +11647,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -12740,6 +12742,9 @@ 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 @@ -12748,7 +12753,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="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12760,18 +12765,6 @@ 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 @@ -14375,8 +14368,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_args" >&5 -$as_echo_n "checking for $pkg_config_args... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" @@ -14416,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 @@ -14434,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 @@ -14723,8 +14716,8 @@ rm -f core conftest.err conftest.$ac_objext \ GIO_DEPENDENCY="gio-unix-2.0 >= 2.44.0" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GIO_DEPENDENCY" >&5 -$as_echo_n "checking for $GIO_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GIO_UNIX" >&5 +$as_echo_n "checking for OT_DEP_GIO_UNIX... " >&6; } if test -n "$OT_DEP_GIO_UNIX_CFLAGS"; then pkg_cv_OT_DEP_GIO_UNIX_CFLAGS="$OT_DEP_GIO_UNIX_CFLAGS" @@ -14764,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 @@ -14791,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;} @@ -14815,8 +14808,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma >= 5.0.5" >&5 -$as_echo_n "checking for liblzma >= 5.0.5... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LZMA" >&5 +$as_echo_n "checking for OT_DEP_LZMA... " >&6; } if test -n "$OT_DEP_LZMA_CFLAGS"; then pkg_cv_OT_DEP_LZMA_CFLAGS="$OT_DEP_LZMA_CFLAGS" @@ -14856,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 @@ -14883,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;} @@ -14907,8 +14900,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -$as_echo_n "checking for zlib... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_ZLIB" >&5 +$as_echo_n "checking for OT_DEP_ZLIB... " >&6; } if test -n "$OT_DEP_ZLIB_CFLAGS"; then pkg_cv_OT_DEP_ZLIB_CFLAGS="$OT_DEP_ZLIB_CFLAGS" @@ -14948,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 @@ -14975,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;} @@ -14999,8 +14992,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for e2p" >&5 -$as_echo_n "checking for e2p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_E2P" >&5 +$as_echo_n "checking for OT_DEP_E2P... " >&6; } if test -n "$OT_DEP_E2P_CFLAGS"; then pkg_cv_OT_DEP_E2P_CFLAGS="$OT_DEP_E2P_CFLAGS" @@ -15040,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 @@ -15067,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;} @@ -15102,8 +15095,8 @@ if test x$with_curl != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= $CURL_DEPENDENCY" >&5 -$as_echo_n "checking for libcurl >= $CURL_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CURL" >&5 +$as_echo_n "checking for OT_DEP_CURL... " >&6; } if test -n "$OT_DEP_CURL_CFLAGS"; then pkg_cv_OT_DEP_CURL_CFLAGS="$OT_DEP_CURL_CFLAGS" @@ -15143,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 @@ -15170,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;} @@ -15269,8 +15262,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SOUP_DEPENDENCY" >&5 -$as_echo_n "checking for $SOUP_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_SOUP" >&5 +$as_echo_n "checking for OT_DEP_SOUP... " >&6; } if test -n "$OT_DEP_SOUP_CFLAGS"; then pkg_cv_OT_DEP_SOUP_CFLAGS="$OT_DEP_SOUP_CFLAGS" @@ -15310,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 @@ -15337,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;} @@ -15721,8 +15714,8 @@ if test x$with_gpgme != xno; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpgme-pthread >= $LIBGPGME_DEPENDENCY" >&5 -$as_echo_n "checking for gpgme-pthread >= $LIBGPGME_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPGME" >&5 +$as_echo_n "checking for OT_DEP_GPGME... " >&6; } if test -n "$OT_DEP_GPGME_CFLAGS"; then pkg_cv_OT_DEP_GPGME_CFLAGS="$OT_DEP_GPGME_CFLAGS" @@ -15762,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 @@ -15876,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; } @@ -15990,8 +15983,8 @@ fi OSTREE_FEATURES="$OSTREE_FEATURES gpgme" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpg-error" >&5 -$as_echo_n "checking for gpg-error... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPG_ERROR" >&5 +$as_echo_n "checking for OT_DEP_GPG_ERROR... " >&6; } if test -n "$OT_DEP_GPG_ERROR_CFLAGS"; then pkg_cv_OT_DEP_GPG_ERROR_CFLAGS="$OT_DEP_GPG_ERROR_CFLAGS" @@ -16031,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 @@ -16093,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. @@ -16185,8 +16178,8 @@ $as_echo "#define HAVE_LIBSODIUM 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium >= $LIBSODIUM_DEPENDENCY" >&5 -$as_echo_n "checking for libsodium >= $LIBSODIUM_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBSODIUM" >&5 +$as_echo_n "checking for OT_DEP_LIBSODIUM... " >&6; } if test -n "$OT_DEP_LIBSODIUM_CFLAGS"; then pkg_cv_OT_DEP_LIBSODIUM_CFLAGS="$OT_DEP_LIBSODIUM_CFLAGS" @@ -16226,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 @@ -16244,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 @@ -16522,8 +16515,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 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 +$as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" @@ -16563,7 +16556,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 @@ -16581,7 +16574,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 @@ -16780,8 +16773,8 @@ $as_echo "#define HAVE_LIBARCHIVE 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBARCHIVE_DEPENDENCY" >&5 -$as_echo_n "checking for $LIBARCHIVE_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBARCHIVE" >&5 +$as_echo_n "checking for OT_DEP_LIBARCHIVE... " >&6; } if test -n "$OT_DEP_LIBARCHIVE_CFLAGS"; then pkg_cv_OT_DEP_LIBARCHIVE_CFLAGS="$OT_DEP_LIBARCHIVE_CFLAGS" @@ -16821,7 +16814,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 @@ -16848,7 +16841,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;} @@ -16943,8 +16936,8 @@ $as_echo "#define HAVE_SELINUX 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SELINUX_DEPENDENCY" >&5 -$as_echo_n "checking for $SELINUX_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_SELINUX" >&5 +$as_echo_n "checking for OT_DEP_SELINUX... " >&6; } if test -n "$OT_DEP_SELINUX_CFLAGS"; then pkg_cv_OT_DEP_SELINUX_CFLAGS="$OT_DEP_SELINUX_CFLAGS" @@ -16984,7 +16977,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 @@ -17011,7 +17004,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;} @@ -17110,8 +17103,8 @@ if test x$with_openssl != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $OPENSSL_DEPENDENCY" >&5 -$as_echo_n "checking for $OPENSSL_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CRYPTO" >&5 +$as_echo_n "checking for OT_DEP_CRYPTO... " >&6; } if test -n "$OT_DEP_CRYPTO_CFLAGS"; then pkg_cv_OT_DEP_CRYPTO_CFLAGS="$OT_DEP_CRYPTO_CFLAGS" @@ -17151,7 +17144,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 @@ -17178,7 +17171,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;} @@ -17225,8 +17218,8 @@ if test $with_crypto = gnutls ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GNUTLS_DEPENDENCY" >&5 -$as_echo_n "checking for $GNUTLS_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_CRYPTO" >&5 +$as_echo_n "checking for OT_DEP_CRYPTO... " >&6; } if test -n "$OT_DEP_CRYPTO_CFLAGS"; then pkg_cv_OT_DEP_CRYPTO_CFLAGS="$OT_DEP_CRYPTO_CFLAGS" @@ -17266,7 +17259,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 @@ -17293,7 +17286,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;} @@ -17368,8 +17361,8 @@ $as_echo "#define HAVE_AVAHI 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $AVAHI_DEPENDENCY" >&5 -$as_echo_n "checking for $AVAHI_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_AVAHI" >&5 +$as_echo_n "checking for OT_DEP_AVAHI... " >&6; } if test -n "$OT_DEP_AVAHI_CFLAGS"; then pkg_cv_OT_DEP_AVAHI_CFLAGS="$OT_DEP_AVAHI_CFLAGS" @@ -17409,7 +17402,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 @@ -17436,7 +17429,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;} @@ -17517,8 +17510,8 @@ $as_echo "#define HAVE_LIBMOUNT 1" >>confdefs.h pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBMOUNT_DEPENDENCY" >&5 -$as_echo_n "checking for $LIBMOUNT_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_LIBMOUNT" >&5 +$as_echo_n "checking for OT_DEP_LIBMOUNT... " >&6; } if test -n "$OT_DEP_LIBMOUNT_CFLAGS"; then pkg_cv_OT_DEP_LIBMOUNT_CFLAGS="$OT_DEP_LIBMOUNT_CFLAGS" @@ -17558,7 +17551,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 @@ -17585,7 +17578,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;} @@ -17653,8 +17646,8 @@ if test x$enable_rofiles_fuse != xno ; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FUSE3_DEPENDENCY" >&5 -$as_echo_n "checking for $FUSE3_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE3" >&5 +$as_echo_n "checking for FUSE3... " >&6; } if test -n "$FUSE3_CFLAGS"; then pkg_cv_FUSE3_CFLAGS="$FUSE3_CFLAGS" @@ -17694,7 +17687,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 @@ -17712,8 +17705,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FUSE_DEPENDENCY" >&5 -$as_echo_n "checking for $FUSE_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE" >&5 +$as_echo_n "checking for FUSE... " >&6; } if test -n "$FUSE_CFLAGS"; then pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" @@ -17753,7 +17746,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 @@ -17780,7 +17773,7 @@ Alternatively, you may set the environment variables FUSE_CFLAGS and 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;} @@ -17806,12 +17799,12 @@ $as_echo "yes" >&6; } 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; } pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FUSE_DEPENDENCY" >&5 -$as_echo_n "checking for $FUSE_DEPENDENCY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE" >&5 +$as_echo_n "checking for FUSE... " >&6; } if test -n "$FUSE_CFLAGS"; then pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" @@ -17851,7 +17844,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 @@ -17878,7 +17871,7 @@ Alternatively, you may set the environment variables FUSE_CFLAGS and 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;} @@ -18019,8 +18012,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" @@ -18060,7 +18053,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 @@ -18087,7 +18080,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;} @@ -19069,7 +19062,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libostree $as_me 2022.1, which was +This file was extended by libostree $as_me 2022.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19135,7 +19128,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libostree config.status 2022.1 +libostree config.status 2022.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20260,6 +20253,7 @@ 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 93b98cb9..3bd735ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. m4_define([year_version], [2022]) -m4_define([release_version], [1]) +m4_define([release_version], [2]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes @@ -25,6 +25,10 @@ AC_SUBST([YEAR_VERSION], [year_version]) AC_SUBST([RELEASE_VERSION], [release_version]) AC_SUBST([PACKAGE_VERSION], [package_version]) +dnl automake variables we want in pkg-config +pkglibexecdir=$libexecdir/$PACKAGE +AC_SUBST(pkglibexecdir) + AS_IF([echo "$CFLAGS" | grep -q -E -e '-Werror($| )'], [], [ CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ -pipe \ @@ -45,7 +49,7 @@ CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ -Werror=undef \ -Werror=incompatible-pointer-types \ -Werror=misleading-indentation \ - -Werror=missing-include-dirs -Werror=aggregate-return \ + -Werror=missing-include-dirs \ -Wstrict-aliasing=2 \ -Werror=unused-result \ ])]) diff --git a/libglnx/COPYING b/libglnx/COPYING index 4362b491..cb402477 100644 --- a/libglnx/COPYING +++ b/libglnx/COPYING @@ -1,502 +1,3 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! +This project's licensing is REUSE-compliant . +See individual files for full details of copyright and licensing, +and see LICENSES/*.txt for the license text. diff --git a/libglnx/LICENSES/LGPL-2.0-or-later.txt b/libglnx/LICENSES/LGPL-2.0-or-later.txt new file mode 100644 index 00000000..eb3a4cd1 --- /dev/null +++ b/libglnx/LICENSES/LGPL-2.0-or-later.txt @@ -0,0 +1,174 @@ +GNU LIBRARY GENERAL PUBLIC LICENSE + +Version 2, June 1991 + +Copyright (C) 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. + +Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. + +The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. + +Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. + +However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. + +Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + + d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice + +That's all there is to it! diff --git a/libglnx/LICENSES/LGPL-2.1-or-later.txt b/libglnx/LICENSES/LGPL-2.1-or-later.txt new file mode 100644 index 00000000..4362b491 --- /dev/null +++ b/libglnx/LICENSES/LGPL-2.1-or-later.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/libglnx/Makefile-libglnx.am b/libglnx/Makefile-libglnx.am index 957eae97..bea7b13f 100644 --- a/libglnx/Makefile-libglnx.am +++ b/libglnx/Makefile-libglnx.am @@ -1,4 +1,5 @@ # Copyright (C) 2015 Colin Walters +# SPDX-License-Identifier: LGPL-2.0-or-later # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,9 +19,16 @@ EXTRA_DIST += \ $(libglnx_srcpath)/README.md \ $(libglnx_srcpath)/COPYING \ + $(libglnx_srcpath)/LICENSES/LGPL-2.0-or-later.txt \ + $(libglnx_srcpath)/LICENSES/LGPL-2.1-or-later.txt \ $(libglnx_srcpath)/libglnx.m4 \ $(NULL) +BUILT_SOURCES += $(top_builddir)/libglnx-config.h +CLEANFILES += $(top_builddir)/libglnx-config.h +$(top_builddir)/libglnx-config.h: Makefile.am + echo '#include "config.h"' > $@ + libglnx_la_SOURCES = \ $(libglnx_srcpath)/glnx-macros.h \ $(libglnx_srcpath)/glnx-backport-autocleanups.h \ @@ -49,7 +57,7 @@ libglnx_la_SOURCES = \ $(libglnx_srcpath)/tests/libglnx-testlib.h \ $(NULL) -libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) +libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir) libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic libglnx_la_LIBADD = $(libglnx_libs) diff --git a/libglnx/Makefile-libglnx.am.inc b/libglnx/Makefile-libglnx.am.inc index 4465f465..f08724c5 100644 --- a/libglnx/Makefile-libglnx.am.inc +++ b/libglnx/Makefile-libglnx.am.inc @@ -1,4 +1,5 @@ # Copyright (C) 2015 Colin Walters +# SPDX-License-Identifier: LGPL-2.0-or-later # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,9 +19,16 @@ EXTRA_DIST += \ libglnx/README.md \ libglnx/COPYING \ + libglnx/LICENSES/LGPL-2.0-or-later.txt \ + libglnx/LICENSES/LGPL-2.1-or-later.txt \ libglnx/libglnx.m4 \ $(NULL) +BUILT_SOURCES += $(top_builddir)/libglnx-config.h +CLEANFILES += $(top_builddir)/libglnx-config.h +$(top_builddir)/libglnx-config.h: Makefile.am + echo '#include "config.h"' > $@ + libglnx_la_SOURCES = \ libglnx/glnx-macros.h \ libglnx/glnx-backport-autocleanups.h \ @@ -49,7 +57,7 @@ libglnx_la_SOURCES = \ libglnx/tests/libglnx-testlib.h \ $(NULL) -libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) +libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir) libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic libglnx_la_LIBADD = $(libglnx_libs) diff --git a/libglnx/README.md b/libglnx/README.md index 587e5d47..ef2cc9d1 100644 --- a/libglnx/README.md +++ b/libglnx/README.md @@ -74,3 +74,9 @@ Development happens in GNOME Gitlab: https://gitlab.gnome.org/GNOME/libglnx (If you're seeing this on the Github mirror, we used to do development on Github but that was before GNOME deployed Gitlab.) + + diff --git a/libglnx/glnx-backport-autocleanups.h b/libglnx/glnx-backport-autocleanups.h index 50f469f2..9b15ee47 100644 --- a/libglnx/glnx-backport-autocleanups.h +++ b/libglnx/glnx-backport-autocleanups.h @@ -1,5 +1,6 @@ /* * Copyright © 2015 Canonical Limited + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-backport-autoptr.h b/libglnx/glnx-backport-autoptr.h index b36919dc..8eb91b94 100644 --- a/libglnx/glnx-backport-autoptr.h +++ b/libglnx/glnx-backport-autoptr.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald diff --git a/libglnx/glnx-backports.c b/libglnx/glnx-backports.c index c7bb600f..f9aa7ce5 100644 --- a/libglnx/glnx-backports.c +++ b/libglnx/glnx-backports.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-backports.h" diff --git a/libglnx/glnx-backports.h b/libglnx/glnx-backports.h index 6c39cf22..0c5fabe9 100644 --- a/libglnx/glnx-backports.h +++ b/libglnx/glnx-backports.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald diff --git a/libglnx/glnx-console.c b/libglnx/glnx-console.c index 0a96cdce..3ce24527 100644 --- a/libglnx/glnx-console.c +++ b/libglnx/glnx-console.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2013,2014,2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-console.h" diff --git a/libglnx/glnx-console.h b/libglnx/glnx-console.h index d853a80c..3d94895b 100644 --- a/libglnx/glnx-console.h +++ b/libglnx/glnx-console.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2013,2014,2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published diff --git a/libglnx/glnx-dirfd.c b/libglnx/glnx-dirfd.c index 0a63bcbc..b039c419 100644 --- a/libglnx/glnx-dirfd.c +++ b/libglnx/glnx-dirfd.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include diff --git a/libglnx/glnx-dirfd.h b/libglnx/glnx-dirfd.h index d5773e72..1960820c 100644 --- a/libglnx/glnx-dirfd.h +++ b/libglnx/glnx-dirfd.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-errors.c b/libglnx/glnx-errors.c index f350f305..cb0df13f 100644 --- a/libglnx/glnx-errors.c +++ b/libglnx/glnx-errors.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include #include diff --git a/libglnx/glnx-errors.h b/libglnx/glnx-errors.h index cbe74a60..e1dc3a56 100644 --- a/libglnx/glnx-errors.h +++ b/libglnx/glnx-errors.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-fdio.c b/libglnx/glnx-fdio.c index 3fa73b5d..b3a62394 100644 --- a/libglnx/glnx-fdio.c +++ b/libglnx/glnx-fdio.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * Portions derived from systemd: * Copyright 2010 Lennart Poettering @@ -21,7 +22,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include #include @@ -805,7 +806,9 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) */ if (fstat (fdf, &stbuf) < 0) return -1; - max_bytes = stbuf.st_size; + + if (stbuf.st_size > 0) + max_bytes = stbuf.st_size; } while (TRUE) @@ -816,7 +819,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) * try_copy_file_range() from systemd upstream, which works better since * we use POSIX errno style. */ - if (try_cfr) + if (try_cfr && max_bytes != (off_t) -1) { n = copy_file_range (fdf, NULL, fdt, NULL, max_bytes, 0u); if (n < 0) @@ -829,7 +832,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) have_cfr = 0; try_cfr = false; } - else if (G_IN_SET (errno, EXDEV, EOPNOTSUPP)) + else if (G_IN_SET (errno, EXDEV, EINVAL, EOPNOTSUPP)) /* We won't try cfr again for this run, but let's be * conservative and not mark it as available/unavailable until * we know for sure. @@ -855,7 +858,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) /* Next try sendfile(); this version is also changed from systemd upstream * to match the same logic we have for copy_file_range(). */ - if (try_sendfile) + if (try_sendfile && max_bytes != (off_t) -1) { n = sendfile (fdt, fdf, NULL, max_bytes); if (n < 0) diff --git a/libglnx/glnx-fdio.h b/libglnx/glnx-fdio.h index 3d1f024c..b6ba0ea4 100644 --- a/libglnx/glnx-fdio.h +++ b/libglnx/glnx-fdio.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-local-alloc.c b/libglnx/glnx-local-alloc.c index 692f0de2..8bd55141 100644 --- a/libglnx/glnx-local-alloc.c +++ b/libglnx/glnx-local-alloc.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2012,2015 Colin Walters + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-local-alloc.h" diff --git a/libglnx/glnx-local-alloc.h b/libglnx/glnx-local-alloc.h index 3be1fa43..615b9548 100644 --- a/libglnx/glnx-local-alloc.h +++ b/libglnx/glnx-local-alloc.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2012,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-lockfile.c b/libglnx/glnx-lockfile.c index f1d52dee..65a15585 100644 --- a/libglnx/glnx-lockfile.c +++ b/libglnx/glnx-lockfile.c @@ -7,6 +7,7 @@ Copyright 2010 Lennart Poettering Copyright 2015 Colin Walters + SPDX-License-Identifier: LGPL-2.1-or-later systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -22,7 +23,7 @@ along with systemd; If not, see . ***/ -#include "config.h" +#include "libglnx-config.h" #include #include diff --git a/libglnx/glnx-lockfile.h b/libglnx/glnx-lockfile.h index b3465089..6604d707 100644 --- a/libglnx/glnx-lockfile.h +++ b/libglnx/glnx-lockfile.h @@ -7,6 +7,7 @@ Copyright 2011 Lennart Poettering Copyright 2015 Colin Walters + SPDX-License-Identifier: LGPL-2.1-or-later systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -22,8 +23,6 @@ along with systemd; If not, see . ***/ -#include "config.h" - #include "glnx-backport-autoptr.h" typedef struct GLnxLockFile { diff --git a/libglnx/glnx-macros.h b/libglnx/glnx-macros.h index 3177bb66..b92e9e2e 100644 --- a/libglnx/glnx-macros.h +++ b/libglnx/glnx-macros.h @@ -3,6 +3,7 @@ * Copyright (C) 2017 Colin Walters * With original source from systemd: * Copyright 2010 Lennart Poettering + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-missing-syscall.h b/libglnx/glnx-missing-syscall.h index 4876ca39..3ee9dd56 100644 --- a/libglnx/glnx-missing-syscall.h +++ b/libglnx/glnx-missing-syscall.h @@ -3,6 +3,7 @@ Copyright 2010 Lennart Poettering Copyright 2016 Zbigniew Jędrzejewski-Szmek + SPDX-License-Identifier: LGPL-2.1-or-later systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -30,7 +31,7 @@ Add abstraction model for BPF programs */ -#include "config.h" +#include "libglnx-config.h" #if !HAVE_DECL_RENAMEAT2 # ifndef __NR_renameat2 diff --git a/libglnx/glnx-missing.h b/libglnx/glnx-missing.h index 9d35c40b..5439ae58 100644 --- a/libglnx/glnx-missing.h +++ b/libglnx/glnx-missing.h @@ -4,6 +4,7 @@ This file was originally part of systemd. Copyright 2010 Lennart Poettering + SPDX-License-Identifier: LGPL-2.1-or-later systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/libglnx/glnx-shutil.c b/libglnx/glnx-shutil.c index 78042fe0..5ebe7f88 100644 --- a/libglnx/glnx-shutil.c +++ b/libglnx/glnx-shutil.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include diff --git a/libglnx/glnx-shutil.h b/libglnx/glnx-shutil.h index 56a99fa2..6a00312e 100644 --- a/libglnx/glnx-shutil.h +++ b/libglnx/glnx-shutil.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/glnx-xattrs.c b/libglnx/glnx-xattrs.c index 785ad0e4..32479cca 100644 --- a/libglnx/glnx-xattrs.c +++ b/libglnx/glnx-xattrs.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include #include diff --git a/libglnx/glnx-xattrs.h b/libglnx/glnx-xattrs.h index a566a224..b0288504 100644 --- a/libglnx/glnx-xattrs.h +++ b/libglnx/glnx-xattrs.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/libglnx.h b/libglnx/libglnx.h index 411d4fa0..ca82ba5c 100644 --- a/libglnx/libglnx.h +++ b/libglnx/libglnx.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2012,2013,2015 Colin Walters . + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/libglnx.m4 b/libglnx/libglnx.m4 index 5a72e98b..bd0d580c 100644 --- a/libglnx/libglnx.m4 +++ b/libglnx/libglnx.m4 @@ -1,3 +1,7 @@ +# Copyright 2016 Colin Walters +# Copyright 2020 Endless OS Foundation LLC +# SPDX-License-Identifier: LGPL-2.1-or-later + AC_DEFUN([LIBGLNX_CONFIGURE], [ AC_CHECK_DECLS([ diff --git a/libglnx/tests/libglnx-testlib.c b/libglnx/tests/libglnx-testlib.c index 869d144d..37b3ecee 100644 --- a/libglnx/tests/libglnx-testlib.c +++ b/libglnx/tests/libglnx-testlib.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright 2019 Collabora Ltd. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx-testlib.h" #include diff --git a/libglnx/tests/libglnx-testlib.h b/libglnx/tests/libglnx-testlib.h index d45ba860..dccc7e55 100644 --- a/libglnx/tests/libglnx-testlib.h +++ b/libglnx/tests/libglnx-testlib.h @@ -2,6 +2,7 @@ * * Copyright (C) 2017 Red Hat, Inc. * Copyright 2019 Collabora Ltd. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libglnx/tests/test-libglnx-errors.c b/libglnx/tests/test-libglnx-errors.c index 4e91e02c..3b2a4856 100644 --- a/libglnx/tests/test-libglnx-errors.c +++ b/libglnx/tests/test-libglnx-errors.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2017 Red Hat, Inc. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include #include diff --git a/libglnx/tests/test-libglnx-fdio.c b/libglnx/tests/test-libglnx-fdio.c index 84ebb14d..b9aa682a 100644 --- a/libglnx/tests/test-libglnx-fdio.c +++ b/libglnx/tests/test-libglnx-fdio.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2017 Red Hat, Inc. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include #include @@ -235,6 +236,56 @@ test_filecopy (void) g_assert (S_ISREG (stbuf.st_mode)); } +static void +test_filecopy_procfs (void) +{ + const char * const pseudo_files[] = + { + /* A file in /proc that stat()s as empty (at least on Linux 5.15) */ + "/proc/version", + /* A file in /sys that stat()s as empty (at least on Linux 5.15) */ + "/sys/fs/cgroup/cgroup.controllers", + /* A file in /sys that stat()s as non-empty (at least on Linux 5.15) */ + "/sys/fs/ext4/features/meta_bg_resize", + }; + gsize i; + + for (i = 0; i < G_N_ELEMENTS (pseudo_files); i++) + { + _GLNX_TEST_DECLARE_ERROR(local_error, error); + g_autofree char *contents = NULL; + g_autofree char *contents_of_copy = NULL; + gsize len; + gsize len_copy; + + if (!g_file_get_contents (pseudo_files[i], &contents, &len, error)) + { + g_test_message ("Not testing %s: %s", + pseudo_files[i], local_error->message); + g_clear_error (&local_error); + continue; + } + + if (!glnx_file_copy_at (AT_FDCWD, pseudo_files[i], NULL, + AT_FDCWD, "copy", + (GLNX_FILE_COPY_OVERWRITE | + GLNX_FILE_COPY_NOCHOWN | + GLNX_FILE_COPY_NOXATTRS), + NULL, error)) + return; + + g_assert_no_error (local_error); + + if (!g_file_get_contents ("copy", &contents_of_copy, &len_copy, error)) + return; + + g_assert_no_error (local_error); + + g_assert_cmpstr (contents, ==, contents_of_copy); + g_assert_cmpuint (len, ==, len_copy); + } +} + int main (int argc, char **argv) { _GLNX_TEST_SCOPED_TEMP_DIR; @@ -245,6 +296,7 @@ int main (int argc, char **argv) g_test_add_func ("/tmpfile", test_tmpfile); g_test_add_func ("/stdio-file", test_stdio_file); g_test_add_func ("/filecopy", test_filecopy); + g_test_add_func ("/filecopy-procfs", test_filecopy_procfs); g_test_add_func ("/renameat2-noreplace", test_renameat2_noreplace); g_test_add_func ("/renameat2-exchange", test_renameat2_exchange); g_test_add_func ("/fstat", test_fstatat); diff --git a/libglnx/tests/test-libglnx-macros.c b/libglnx/tests/test-libglnx-macros.c index ffde8fae..5f41e5b6 100644 --- a/libglnx/tests/test-libglnx-macros.c +++ b/libglnx/tests/test-libglnx-macros.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2017 Red Hat, Inc. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include #include diff --git a/libglnx/tests/test-libglnx-shutil.c b/libglnx/tests/test-libglnx-shutil.c index 6917b890..28b34abe 100644 --- a/libglnx/tests/test-libglnx-shutil.c +++ b/libglnx/tests/test-libglnx-shutil.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * - * Copyright © 2017 Endless Mobile, Inc. + * Copyright © 2017 Endless OS Foundation LLC + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include #include diff --git a/libglnx/tests/test-libglnx-xattrs.c b/libglnx/tests/test-libglnx-xattrs.c index 82def4aa..b72b0d06 100644 --- a/libglnx/tests/test-libglnx-xattrs.c +++ b/libglnx/tests/test-libglnx-xattrs.c @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2017 Red Hat, Inc. + * SPDX-License-Identifier: LGPL-2.0-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include #include diff --git a/man/ostree-admin-switch.xml b/man/ostree-admin-switch.xml index 720cabdd..6795c49b 100644 --- a/man/ostree-admin-switch.xml +++ b/man/ostree-admin-switch.xml @@ -57,7 +57,7 @@ License along with this library. If not, see . Description - Choose a different REF forom the current remote to track. This is the ref that will be "tracked" and upgraded with ostree admin upgrade. Like an upgrade, the operating system state will be preserved. + Choose a different REF from the current remote to track. This is the ref that will be "tracked" and upgraded with ostree admin upgrade. Like an upgrade, the operating system state will be preserved. diff --git a/man/ostree-find-remotes.xml b/man/ostree-find-remotes.xml index 95664a89..5c5b2412 100644 --- a/man/ostree-find-remotes.xml +++ b/man/ostree-find-remotes.xml @@ -57,7 +57,7 @@ License along with this library. If not, see . Description - OSTree has the ability do pulls not just from configured remote + OSTree has the ability to pull not just from the configured remote servers but also from peer computers on the LAN and from mounted filesystems such as USB drives. This functionality requires the use of collection IDs and GPG verification. diff --git a/man/ostree-prune.xml b/man/ostree-prune.xml index e7e028ab..341ac7fb 100644 --- a/man/ostree-prune.xml +++ b/man/ostree-prune.xml @@ -120,6 +120,17 @@ License along with this library. If not, see . . + + + + + + Only traverse and delete commit objects. This leaves orphaned meta and + content objects, which can be cleaned up with another prune invocation. + One may want to use this option to cheaply delete multiple commits, + and then clean up with a more expensive prune at the end. + + diff --git a/man/ostree-summary.xml b/man/ostree-summary.xml index 4c9652cc..e853e8cd 100644 --- a/man/ostree-summary.xml +++ b/man/ostree-summary.xml @@ -183,6 +183,7 @@ License along with this library. If not, see . Latest Commit (4.2 MB): 9828ab80f357459b4ab50f0629beab2ae3b67318fc3d161d10a89fae353afa90 Timestamp (ostree.commit.timestamp): 2017-11-21T01:41:10-08 + Version (ostree.commit.version): 1.2.3 Last-Modified (ostree.summary.last-modified): 2018-01-12T22:06:38-08 diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym index 9168db73..c15ae9fa 100644 --- a/src/libostree/libostree-devel.sym +++ b/src/libostree/libostree-devel.sym @@ -20,6 +20,8 @@ - uncomment the include in Makefile-libostree.am */ + + /* Stub section for the stable release *after* this development one; don't * edit this other than to update the year. This is just a copy/paste * source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym index 5349de63..dbff16a0 100644 --- a/src/libostree/libostree-released.sym +++ b/src/libostree/libostree-released.sym @@ -672,6 +672,11 @@ global: ostree_mutable_tree_new_from_commit; } LIBOSTREE_2021.4; +LIBOSTREE_2022.2 { +global: + ostree_repo_traverse_commit_with_flags; +} LIBOSTREE_2021.5; + /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. */ diff --git a/src/libostree/ostree-1.pc.in b/src/libostree/ostree-1.pc.in index 9a4debce..cbf0a13c 100644 --- a/src/libostree/ostree-1.pc.in +++ b/src/libostree/ostree-1.pc.in @@ -3,6 +3,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ features=@OSTREE_FEATURES@ +cliextdir=@pkglibexecdir@/ext Name: OSTree Description: Git for operating system binaries diff --git a/src/libostree/ostree-bootloader-zipl.c b/src/libostree/ostree-bootloader-zipl.c index a7078aea..02c10826 100644 --- a/src/libostree/ostree-bootloader-zipl.c +++ b/src/libostree/ostree-bootloader-zipl.c @@ -19,10 +19,17 @@ #include "ostree-sysroot-private.h" #include "ostree-bootloader-zipl.h" +#include "ostree-deployment-private.h" #include "otutil.h" - #include +#define SECURE_EXECUTION_BOOT_IMAGE "/boot/sd-boot" +#define SECURE_EXECUTION_HOSTKEY_PATH "/etc/se-hostkeys/" +#define SECURE_EXECUTION_HOSTKEY_PREFIX "ibm-z-hostkey" +#define SECURE_EXECUTION_LUKS_ROOT_KEY "/etc/luks/root" +#define SECURE_EXECUTION_LUKS_CONFIG "/etc/crypttab" +#define SECURE_EXECUTION_RAMDISK_TOOL PKGLIBEXECDIR "/s390x-se-luks-gencpio" + /* This is specific to zipl today, but in the future we could also * use it for the grub2-mkconfig case. */ @@ -78,8 +85,206 @@ _ostree_bootloader_zipl_write_config (OstreeBootloader *bootloader, return TRUE; } +static gboolean +_ostree_secure_execution_get_keys (GPtrArray **keys, + GCancellable *cancellable, + GError **error) +{ + g_auto (GLnxDirFdIterator) it = { 0,}; + if ( !glnx_dirfd_iterator_init_at (-1, SECURE_EXECUTION_HOSTKEY_PATH, TRUE, &it, error)) + return glnx_prefix_error (error, "s390x SE: looking for SE keys"); + + g_autoptr(GPtrArray) ret_keys = g_ptr_array_new_with_free_func (g_free); + while (TRUE) + { + struct dirent *dent = NULL; + if (!glnx_dirfd_iterator_next_dent (&it, &dent, cancellable, error)) + return FALSE; + + if (!dent) + break; + + if (g_str_has_prefix (dent->d_name, SECURE_EXECUTION_HOSTKEY_PREFIX)) + g_ptr_array_add (ret_keys, g_build_filename (SECURE_EXECUTION_HOSTKEY_PATH, dent->d_name, NULL)); + } + + *keys = g_steal_pointer (&ret_keys); + return TRUE; +} + +static gboolean +_ostree_secure_execution_get_bls_config (OstreeBootloaderZipl *self, + int bootversion, + gchar **vmlinuz, + gchar **initramfs, + gchar **options, + GCancellable *cancellable, + GError **error) +{ + g_autoptr (GPtrArray) configs = NULL; + if ( !_ostree_sysroot_read_boot_loader_configs (self->sysroot, bootversion, &configs, cancellable, error)) + return glnx_prefix_error (error, "s390x SE: loading bls configs"); + + if (!configs || configs->len == 0) + return glnx_throw (error, "s390x SE: no bls config"); + + OstreeBootconfigParser *parser = (OstreeBootconfigParser *) g_ptr_array_index (configs, 0); + const gchar *val = NULL; + + val = ostree_bootconfig_parser_get (parser, "linux"); + if (!val) + return glnx_throw (error, "s390x SE: no \"linux\" key in bootloader config"); + *vmlinuz = g_build_filename ("/boot", val, NULL); + + val = ostree_bootconfig_parser_get (parser, "initrd"); + if (!val) + return glnx_throw (error, "s390x SE: no \"initrd\" key in bootloader config"); + *initramfs = g_build_filename ("/boot", val, NULL); + + val = ostree_bootconfig_parser_get (parser, "options"); + if (!val) + return glnx_throw (error, "s390x SE: no \"options\" key in bootloader config"); + *options = g_strdup(val); + + return TRUE; +} + +static gboolean +_ostree_secure_execution_luks_key_exists (void) +{ + return (access(SECURE_EXECUTION_LUKS_ROOT_KEY, F_OK) == 0 && + access(SECURE_EXECUTION_LUKS_CONFIG, F_OK) == 0); +} + +static gboolean +_ostree_secure_execution_enable_luks(const gchar *oldramfs, + const gchar *newramfs, + GError **error) +{ + const char *const argv[] = {SECURE_EXECUTION_RAMDISK_TOOL, oldramfs, newramfs, NULL}; + g_autofree gchar *out = NULL; + g_autofree gchar *err = NULL; + int status = 0; + if (!g_spawn_sync (NULL, (char**)argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, &out, &err, &status, error)) + return glnx_prefix_error(error, "s390x SE: spawning %s", SECURE_EXECUTION_RAMDISK_TOOL); + + if (!g_spawn_check_exit_status (status, error)) + { + g_printerr("s390x SE: `%s` stdout: %s\n", SECURE_EXECUTION_RAMDISK_TOOL, out); + g_printerr("s390x SE: `%s` stderr: %s\n", SECURE_EXECUTION_RAMDISK_TOOL, err); + return glnx_prefix_error(error, "s390x SE: `%s` failed", SECURE_EXECUTION_RAMDISK_TOOL); + } + + ot_journal_print(LOG_INFO, "s390x SE: luks key added to initrd"); + return TRUE; +} + +static gboolean +_ostree_secure_execution_generate_sdboot (gchar *vmlinuz, + gchar *initramfs, + gchar *options, + GPtrArray *keys, + GError **error) +{ + g_assert (vmlinuz && initramfs && options && keys && keys->len); + ot_journal_print(LOG_INFO, "s390x SE: kernel: %s", vmlinuz); + ot_journal_print(LOG_INFO, "s390x SE: initrd: %s", initramfs); + ot_journal_print(LOG_INFO, "s390x SE: kargs: %s", options); + + pid_t self = getpid(); + + // Store kernel options to temp file, so `genprotimg` can later embed it + g_auto(GLnxTmpfile) cmdline = { 0, }; + if (!glnx_open_anonymous_tmpfile (O_RDWR | O_CLOEXEC, &cmdline, error)) + return glnx_prefix_error(error, "s390x SE: opening cmdline file"); + if (glnx_loop_write (cmdline.fd, options, strlen (options)) < 0) + return glnx_throw_errno_prefix (error, "s390x SE: writting cmdline file"); + g_autofree gchar *cmdline_filename = g_strdup_printf ("/proc/%d/fd/%d", self, cmdline.fd); + + // Copy initramfs to temp file and embed LUKS key and config into it + g_auto(GLnxTmpfile) ramdisk = { 0, }; + g_autofree gchar *ramdisk_filename = NULL; + if (_ostree_secure_execution_luks_key_exists ()) + { + if (!glnx_open_anonymous_tmpfile (O_RDWR | O_CLOEXEC, &ramdisk, error)) + return glnx_prefix_error(error, "s390x SE: creating new ramdisk"); + ramdisk_filename = g_strdup_printf ("/proc/%d/fd/%d", self, ramdisk.fd); + if (!_ostree_secure_execution_enable_luks (initramfs, ramdisk_filename, error)) + return FALSE; + } + + g_autoptr(GPtrArray) argv = g_ptr_array_new (); + g_ptr_array_add (argv, "genprotimg"); + g_ptr_array_add (argv, "-i"); + g_ptr_array_add (argv, vmlinuz); + g_ptr_array_add (argv, "-r"); + g_ptr_array_add (argv, (ramdisk_filename == NULL) ? initramfs: ramdisk_filename); + g_ptr_array_add (argv, "-p"); + g_ptr_array_add (argv, cmdline_filename); + for (guint i = 0; i < keys->len; ++i) + { + gchar *key = g_ptr_array_index (keys, i); + g_ptr_array_add (argv, "-k"); + g_ptr_array_add (argv, key); + ot_journal_print(LOG_INFO, "s390x SE: key[%d]: %s", i + 1, key); + } + g_ptr_array_add (argv, "--no-verify"); + g_ptr_array_add (argv, "-o"); + g_ptr_array_add (argv, SECURE_EXECUTION_BOOT_IMAGE); + g_ptr_array_add (argv, NULL); + + gint status = 0; + if (!g_spawn_sync (NULL, (char**)argv->pdata, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL, &status, error)) + return glnx_prefix_error(error, "s390x SE: spawning genprotimg"); + + if (!g_spawn_check_exit_status (status, error)) + return glnx_prefix_error(error, "s390x SE: `genprotimg` failed"); + + ot_journal_print(LOG_INFO, "s390x SE: `%s` generated", SECURE_EXECUTION_BOOT_IMAGE); + return TRUE; +} + +static gboolean +_ostree_secure_execution_call_zipl (GError **error) +{ + int status = 0; + const char *const zipl_argv[] = {"zipl", "-V", "-t", "/boot", "-i", SECURE_EXECUTION_BOOT_IMAGE, NULL}; + if (!g_spawn_sync (NULL, (char**)zipl_argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL, &status, error)) + return glnx_prefix_error(error, "s390x SE: spawning zipl"); + + if (!g_spawn_check_exit_status (status, error)) + return glnx_prefix_error(error, "s390x SE: `zipl` failed"); + + ot_journal_print(LOG_INFO, "s390x SE: `sd-boot` zipled"); + return TRUE; +} + +static gboolean +_ostree_secure_execution_enable (OstreeBootloaderZipl *self, + int bootversion, + GPtrArray *keys, + GCancellable *cancellable, + GError **error) +{ + g_autofree gchar* vmlinuz = NULL; + g_autofree gchar* initramfs = NULL; + g_autofree gchar* options = NULL; + + gboolean rc = + _ostree_secure_execution_get_bls_config (self, bootversion, &vmlinuz, &initramfs, &options, cancellable, error) && + _ostree_secure_execution_generate_sdboot (vmlinuz, initramfs, options, keys, error) && + _ostree_secure_execution_call_zipl (error); + + return rc; +} + + static gboolean _ostree_bootloader_zipl_post_bls_sync (OstreeBootloader *bootloader, + int bootversion, GCancellable *cancellable, GError **error) { @@ -97,6 +302,14 @@ _ostree_bootloader_zipl_post_bls_sync (OstreeBootloader *bootloader, if (errno == ENOENT) return TRUE; + /* Try with Secure Execution */ + g_autoptr(GPtrArray) keys = NULL; + if (!_ostree_secure_execution_get_keys (&keys, cancellable, error)) + return FALSE; + if (keys && keys->len) + return _ostree_secure_execution_enable (self, bootversion, keys, cancellable, error); + + /* Fallback to non-SE setup */ const char *const zipl_argv[] = {"zipl", NULL}; int estatus; if (!g_spawn_sync (NULL, (char**)zipl_argv, NULL, G_SPAWN_SEARCH_PATH, diff --git a/src/libostree/ostree-bootloader-zipl.h b/src/libostree/ostree-bootloader-zipl.h index 3584feb2..e3f0b2b3 100644 --- a/src/libostree/ostree-bootloader-zipl.h +++ b/src/libostree/ostree-bootloader-zipl.h @@ -30,5 +30,4 @@ typedef struct _OstreeBootloaderZipl OstreeBootloaderZipl; GType _ostree_bootloader_zipl_get_type (void) G_GNUC_CONST; OstreeBootloaderZipl * _ostree_bootloader_zipl_new (OstreeSysroot *sysroot); - G_END_DECLS diff --git a/src/libostree/ostree-bootloader.c b/src/libostree/ostree-bootloader.c index f221b608..785fd233 100644 --- a/src/libostree/ostree-bootloader.c +++ b/src/libostree/ostree-bootloader.c @@ -65,13 +65,14 @@ _ostree_bootloader_write_config (OstreeBootloader *self, gboolean _ostree_bootloader_post_bls_sync (OstreeBootloader *self, + int bootversion, GCancellable *cancellable, GError **error) { g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), FALSE); if (OSTREE_BOOTLOADER_GET_IFACE (self)->post_bls_sync) - return OSTREE_BOOTLOADER_GET_IFACE (self)->post_bls_sync (self, cancellable, error); + return OSTREE_BOOTLOADER_GET_IFACE (self)->post_bls_sync (self, bootversion, cancellable, error); return TRUE; } diff --git a/src/libostree/ostree-bootloader.h b/src/libostree/ostree-bootloader.h index 6e0f6f88..ca1b453e 100644 --- a/src/libostree/ostree-bootloader.h +++ b/src/libostree/ostree-bootloader.h @@ -46,6 +46,7 @@ struct _OstreeBootloaderInterface GCancellable *cancellable, GError **error); gboolean (* post_bls_sync) (OstreeBootloader *self, + int bootversion, GCancellable *cancellable, GError **error); gboolean (* is_atomic) (OstreeBootloader *self); @@ -68,6 +69,7 @@ gboolean _ostree_bootloader_write_config (OstreeBootloader *self, GError **error); gboolean _ostree_bootloader_post_bls_sync (OstreeBootloader *self, + int bootversion, GCancellable *cancellable, GError **error); diff --git a/src/libostree/ostree-core-private.h b/src/libostree/ostree-core-private.h index 34f86a6c..2bd2f984 100644 --- a/src/libostree/ostree-core-private.h +++ b/src/libostree/ostree-core-private.h @@ -197,7 +197,8 @@ _ostree_repo_mode_is_bare (OstreeRepoMode mode) return mode == OSTREE_REPO_MODE_BARE || mode == OSTREE_REPO_MODE_BARE_USER || - mode == OSTREE_REPO_MODE_BARE_USER_ONLY; + mode == OSTREE_REPO_MODE_BARE_USER_ONLY || + mode == OSTREE_REPO_MODE_BARE_SPLIT_XATTRS; } #ifndef OSTREE_DISABLE_GPGME diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 0abd90a4..f0d0e698 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -39,6 +39,7 @@ G_STATIC_ASSERT(OSTREE_REPO_MODE_ARCHIVE_Z2 == 1); G_STATIC_ASSERT(OSTREE_REPO_MODE_ARCHIVE == OSTREE_REPO_MODE_ARCHIVE_Z2); G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER == 2); G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER_ONLY == 3); +G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_SPLIT_XATTRS == 4); static GBytes *variant_to_lenprefixed_buffer (GVariant *variant); @@ -1141,7 +1142,7 @@ _ostree_compare_object_checksum (OstreeObjectType objtype, * @dir_info: a #GFileInfo containing directory information * @xattrs: (allow-none): Optional extended attributes * - * Returns: (transfer full): A new #GVariant containing %OSTREE_OBJECT_TYPE_DIR_META + * Returns: (transfer full) (not nullable): A new #GVariant containing %OSTREE_OBJECT_TYPE_DIR_META */ GVariant * ostree_create_directory_metadata (GFileInfo *dir_info, @@ -1228,6 +1229,10 @@ ostree_object_type_to_string (OstreeObjectType objtype) return "commitmeta"; case OSTREE_OBJECT_TYPE_PAYLOAD_LINK: return "payload-link"; + case OSTREE_OBJECT_TYPE_FILE_XATTRS: + return "file-xattrs"; + case OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK: + return "file-xattrs-link"; default: g_assert_not_reached (); return NULL; @@ -1257,6 +1262,10 @@ ostree_object_type_from_string (const char *str) return OSTREE_OBJECT_TYPE_COMMIT_META; else if (!strcmp (str, "payload-link")) return OSTREE_OBJECT_TYPE_PAYLOAD_LINK; + else if (!strcmp (str, "file-xattrs")) + return OSTREE_OBJECT_TYPE_FILE_XATTRS; + else if (!strcmp (str, "file-xattrs-link")) + return OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK; g_assert_not_reached (); return 0; } @@ -2141,6 +2150,8 @@ _ostree_validate_structureof_metadata (OstreeObjectType objtype, /* TODO */ break; case OSTREE_OBJECT_TYPE_FILE: + case OSTREE_OBJECT_TYPE_FILE_XATTRS: + case OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK: g_assert_not_reached (); break; } @@ -2197,6 +2208,19 @@ ostree_validate_structureof_commit (GVariant *commit, if (!validate_variant (commit, OSTREE_COMMIT_GVARIANT_FORMAT, error)) return FALSE; + g_autoptr(GVariant) metadata = NULL; + g_variant_get_child (commit, 0, "@a{sv}", &metadata); + g_assert (metadata != NULL); + g_autoptr(GVariantIter) metadata_iter = g_variant_iter_new (metadata); + g_assert (metadata_iter != NULL); + g_autoptr(GVariant) metadata_entry = NULL; + const gchar *metadata_key = NULL; + while (g_variant_iter_loop (metadata_iter, "{sv}", &metadata_key, NULL)) + { + if (metadata_key == NULL || strlen (metadata_key) == 0) + return glnx_throw (error, "Empty metadata key"); + } + g_autoptr(GVariant) parent_csum_v = NULL; g_variant_get_child (commit, 1, "@ay", &parent_csum_v); gsize n_elts; diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h index 36e61290..9a14192d 100644 --- a/src/libostree/ostree-core.h +++ b/src/libostree/ostree-core.h @@ -67,6 +67,8 @@ G_BEGIN_DECLS * @OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT: Toplevel object, refers to a deleted commit * @OSTREE_OBJECT_TYPE_COMMIT_META: Detached metadata for a commit * @OSTREE_OBJECT_TYPE_PAYLOAD_LINK: Symlink to a .file given its checksum on the payload only. + * @OSTREE_OBJECT_TYPE_FILE_XATTRS: Detached xattrs content, for 'bare-split-xattrs' mode. + * @OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK: Hardlink to a .file-xattrs given the checksum of its .file object. * * Enumeration for core object types; %OSTREE_OBJECT_TYPE_FILE is for * content, the other types are metadata. @@ -78,7 +80,9 @@ typedef enum { OSTREE_OBJECT_TYPE_COMMIT = 4, /* .commit */ OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT = 5, /* .commit-tombstone */ OSTREE_OBJECT_TYPE_COMMIT_META = 6, /* .commitmeta */ - OSTREE_OBJECT_TYPE_PAYLOAD_LINK = 7, /* .payload-link */ + OSTREE_OBJECT_TYPE_PAYLOAD_LINK = 7, /* .payload-link */ + OSTREE_OBJECT_TYPE_FILE_XATTRS = 8, /* .file-xattrs */ + OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK = 9, /* .file-xattrs-link */ } OstreeObjectType; /** @@ -94,7 +98,7 @@ typedef enum { * * Last valid object type; use this to validate ranges. */ -#define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_PAYLOAD_LINK +#define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK /** * OSTREE_DIRMETA_GVARIANT_FORMAT: @@ -164,6 +168,8 @@ typedef enum { * The currently defined keys for the `a{sv}` of additional metadata for each commit are: * - key: `ostree.commit.timestamp`, value: `t`, timestamp (seconds since the * Unix epoch in UTC, big-endian) when the commit was committed + * - key: `ostree.commit.version`, value: `s`, the `version` value from the + * commit's metadata if it was defined. Since: 2022.2 */ #define OSTREE_SUMMARY_GVARIANT_STRING "(a(s(taya{sv}))a{sv})" #define OSTREE_SUMMARY_GVARIANT_FORMAT G_VARIANT_TYPE (OSTREE_SUMMARY_GVARIANT_STRING) @@ -187,6 +193,7 @@ typedef enum { * @OSTREE_REPO_MODE_ARCHIVE_Z2: Legacy alias for `OSTREE_REPO_MODE_ARCHIVE` * @OSTREE_REPO_MODE_BARE_USER: Files are stored as themselves, except ownership; can be written by user. Hardlinks work only in user checkouts. * @OSTREE_REPO_MODE_BARE_USER_ONLY: Same as BARE_USER, but all metadata is not stored, so it can only be used for user checkouts. Does not need xattrs. + * @OSTREE_REPO_MODE_BARE_SPLIT_XATTRS: Same as BARE_USER, but xattrs are stored separately from file content, with dedicated object types. * * See the documentation of #OstreeRepo for more information about the * possible modes. @@ -197,6 +204,7 @@ typedef enum { OSTREE_REPO_MODE_ARCHIVE_Z2 = OSTREE_REPO_MODE_ARCHIVE, OSTREE_REPO_MODE_BARE_USER, OSTREE_REPO_MODE_BARE_USER_ONLY, + OSTREE_REPO_MODE_BARE_SPLIT_XATTRS, } OstreeRepoMode; /** diff --git a/src/libostree/ostree-gpg-verify-result-dummy.c b/src/libostree/ostree-gpg-verify-result-dummy.c index e0116518..382b7b92 100644 --- a/src/libostree/ostree-gpg-verify-result-dummy.c +++ b/src/libostree/ostree-gpg-verify-result-dummy.c @@ -143,7 +143,7 @@ ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result, * an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to * find the number of signatures in @result. * - * Returns: a new, floating, #GVariant tuple + * Returns: (transfer floating): a new, floating, #GVariant tuple **/ GVariant * ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, @@ -184,7 +184,7 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, * ostree_gpg_verify_result_count_all() to find the number of signatures in * @result. * - * Returns: a new, floating, #GVariant tuple + * Returns: (transfer floating): a new, floating, #GVariant tuple **/ GVariant * ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result, diff --git a/src/libostree/ostree-gpg-verify-result.c b/src/libostree/ostree-gpg-verify-result.c index 7bf45aac..3b6a7da4 100644 --- a/src/libostree/ostree-gpg-verify-result.c +++ b/src/libostree/ostree-gpg-verify-result.c @@ -298,7 +298,7 @@ ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result, * an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to * find the number of signatures in @result. * - * Returns: a new, floating, #GVariant tuple + * Returns: (transfer floating): a new, floating, #GVariant tuple **/ GVariant * ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, @@ -490,7 +490,7 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result, * ostree_gpg_verify_result_count_all() to find the number of signatures in * @result. * - * Returns: a new, floating, #GVariant tuple + * Returns: (transfer floating): a new, floating, #GVariant tuple **/ GVariant * ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result, diff --git a/src/libostree/ostree-mutable-tree.c b/src/libostree/ostree-mutable-tree.c index 91023ca9..4b3460e3 100644 --- a/src/libostree/ostree-mutable-tree.c +++ b/src/libostree/ostree-mutable-tree.c @@ -463,13 +463,11 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self, OstreeMutableTree *subdir = self; /* nofree */ for (guint i = 0; i+1 < split_path->len; i++) { - OstreeMutableTree *next; const char *name = split_path->pdata[i]; - if (g_hash_table_lookup (subdir->files, name)) return glnx_throw (error, "Can't replace file with directory: %s", name); - next = g_hash_table_lookup (subdir->subdirs, name); + OstreeMutableTree *next = g_hash_table_lookup (subdir->subdirs, name); if (!next) { invalidate_contents_checksum (subdir); @@ -479,6 +477,9 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self, } subdir = next; + g_assert (subdir); + if (!_ostree_mutable_tree_make_whole (subdir, NULL, error)) + return FALSE; } if (out_parent) @@ -580,11 +581,9 @@ ostree_mutable_tree_walk (OstreeMutableTree *self, } else { - OstreeMutableTree *subdir; if (!_ostree_mutable_tree_make_whole (self, NULL, error)) return FALSE; - - subdir = g_hash_table_lookup (self->subdirs, split_path->pdata[start]); + OstreeMutableTree *subdir = g_hash_table_lookup (self->subdirs, split_path->pdata[start]); if (!subdir) return set_error_noent (error, (char*)split_path->pdata[start]); diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index e2c86d96..5b16be5b 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -912,13 +912,17 @@ write_content_object (OstreeRepo *self, GCancellable *cancellable, GError **error) { + g_assert (expected_checksum != NULL || out_csum != NULL); + GLNX_AUTO_PREFIX_ERROR ("Writing content object", error); - g_return_val_if_fail (expected_checksum || out_csum, FALSE); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; OstreeRepoMode repo_mode = ostree_repo_get_mode (self); + if (repo_mode == OSTREE_REPO_MODE_BARE_SPLIT_XATTRS && + g_getenv ("OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS") == NULL) + return glnx_throw (error, "Not allowed due to repo mode"); GInputStream *file_input; /* Unowned alias */ g_autoptr(GInputStream) file_input_owned = NULL; /* We need a temporary for bare-user symlinks */ @@ -1244,9 +1248,10 @@ adopt_and_commit_regfile (OstreeRepo *self, GCancellable *cancellable, GError **error) { + g_assert (G_IN_SET (self->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER_ONLY)); + GLNX_AUTO_PREFIX_ERROR ("Commit regfile (adopt)", error); - g_assert (G_IN_SET (self->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER_ONLY)); g_autoptr(GBytes) header = _ostree_file_header_new (finfo, xattrs); g_auto(OtChecksum) hasher = { 0, }; @@ -1341,9 +1346,9 @@ write_metadata_object (OstreeRepo *self, GCancellable *cancellable, GError **error) { - GLNX_AUTO_PREFIX_ERROR ("Writing metadata object", error); + g_assert (expected_checksum != NULL || out_csum != NULL); - g_return_val_if_fail (expected_checksum || out_csum, FALSE); + GLNX_AUTO_PREFIX_ERROR ("Writing metadata object", error); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; @@ -1629,7 +1634,11 @@ ostree_repo_scan_hardlinks (OstreeRepo *self, GCancellable *cancellable, GError **error) { - g_return_val_if_fail (self->in_transaction == TRUE, FALSE); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + + if (!self->in_transaction) + return glnx_throw (error, "Failed to scan hardlinks, not in a transaction"); if (!self->loose_object_devino_hash) self->loose_object_devino_hash = (GHashTable*)ostree_repo_devino_cache_new (); @@ -1671,10 +1680,10 @@ ostree_repo_prepare_transaction (OstreeRepo *self, GError **error) { g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); - guint64 reserved_bytes = 0; - - g_return_val_if_fail (self->in_transaction == FALSE, FALSE); + if (self->in_transaction) + return glnx_throw (error, "Failed to prepare transaction, another transaction is in progress"); g_debug ("Preparing transaction in repository %p", self); @@ -1700,6 +1709,7 @@ ostree_repo_prepare_transaction (OstreeRepo *self, g_mutex_lock (&self->txn_lock); self->txn.blocksize = stvfsbuf.f_bsize; + guint64 reserved_bytes = 0; if (!ostree_repo_get_min_free_space_bytes (self, &reserved_bytes, error)) { g_mutex_unlock (&self->txn_lock); @@ -2077,7 +2087,9 @@ ostree_repo_transaction_set_refspec (OstreeRepo *self, const char *refspec, const char *checksum) { - g_return_if_fail (self->in_transaction == TRUE); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + g_assert (self->in_transaction == TRUE); g_mutex_lock (&self->txn_lock); ensure_txn_refs (self); @@ -2120,7 +2132,9 @@ ostree_repo_transaction_set_ref (OstreeRepo *self, const char *ref, const char *checksum) { - g_return_if_fail (self->in_transaction == TRUE); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + g_assert (self->in_transaction == TRUE); char *refspec; if (remote) @@ -2160,9 +2174,13 @@ ostree_repo_transaction_set_collection_ref (OstreeRepo *self, const OstreeCollectionRef *ref, const char *checksum) { - g_return_if_fail (OSTREE_IS_REPO (self)); - g_return_if_fail (self->in_transaction == TRUE); - g_return_if_fail (ref != NULL); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + g_assert (self->in_transaction == TRUE); + g_assert (ref != NULL); + + // TODO(lucab): introduce a method with error-returning in order to deprecate + // this one, because it can silently fail. g_return_if_fail (checksum == NULL || ostree_validate_checksum_string (checksum, NULL)); g_mutex_lock (&self->txn_lock); @@ -2248,11 +2266,13 @@ ostree_repo_set_collection_ref_immediate (OstreeRepo *self, GCancellable *cancellable, GError **error) { - g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE); - g_return_val_if_fail (ref != NULL, FALSE); - g_return_val_if_fail (checksum == NULL || ostree_validate_checksum_string (checksum, NULL), FALSE); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + g_assert (ref != NULL); + + /* If a checksum was provided, validate it upfront. */ + if (checksum != NULL && !ostree_validate_checksum_string (checksum, error)) + return FALSE; return _ostree_repo_write_ref (self, NULL, ref, checksum, NULL, cancellable, error); @@ -2283,7 +2303,11 @@ ostree_repo_commit_transaction (OstreeRepo *self, GCancellable *cancellable, GError **error) { - g_return_val_if_fail (self->in_transaction == TRUE, FALSE); + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + + if (!self->in_transaction) + return glnx_throw (error, "Failed to commit transaction, no transaction in progress"); g_debug ("Committing transaction in repository %p", self); @@ -2370,6 +2394,9 @@ ostree_repo_abort_transaction (OstreeRepo *self, GCancellable *cancellable, GError **error) { + g_assert (self != NULL); + g_assert (OSTREE_IS_REPO (self)); + g_autoptr(GError) cleanup_error = NULL; /* Always ignore the cancellable to avoid the chance that, if it gets @@ -2478,12 +2505,8 @@ ostree_repo_write_metadata (OstreeRepo *self, normalized = g_variant_get_normal_form (object); } - /* For untrusted objects, verify their structure here */ - if (expected_checksum) - { - if (!_ostree_validate_structureof_metadata (objtype, object, error)) - return FALSE; - } + if (!_ostree_validate_structureof_metadata (objtype, object, error)) + return FALSE; g_autoptr(GBytes) vdata = g_variant_get_data_as_bytes (normalized); if (!write_metadata_object (self, objtype, expected_checksum, diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c index aacf7c64..679aa44d 100644 --- a/src/libostree/ostree-repo-libarchive.c +++ b/src/libostree/ostree-repo-libarchive.c @@ -364,6 +364,7 @@ aic_ensure_parent_dir (OstreeRepoArchiveImportContext *ctx, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("ostree-tar: Failed to create parent", error); /* Who should own the parent dir? Since it's not in the archive, it's up to * us. Here, we use the heuristic of simply creating it as the same user as * the owner of the archive entry for which we're creating the dir. This is OK @@ -452,6 +453,7 @@ aic_get_xattrs (OstreeRepoArchiveImportContext *ctx, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("ostree-tar: Failed to get xattrs", error); g_autofree char *abspath = g_build_filename ("/", path, NULL); g_autoptr(GVariant) xattrs = NULL; const char *cb_path = abspath; @@ -526,6 +528,7 @@ aic_handle_dir (OstreeRepoArchiveImportContext *ctx, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("ostree-tar: Failed to handle directory", error); const char *name = glnx_basename (path); g_autoptr(GVariant) xattrs = NULL; @@ -575,6 +578,7 @@ aic_import_file (OstreeRepoArchiveImportContext *ctx, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("ostree-tar: Failed to import file", error); const char *name = glnx_basename (path); g_autoptr(GVariant) xattrs = NULL; g_autofree char *csum = NULL; @@ -631,6 +635,7 @@ aic_handle_file (OstreeRepoArchiveImportContext *ctx, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("ostree-tar: Failed to handle file", error); /* The wonderful world of hardlinks and archives. We have to be very careful * here. Do not assume that if a file is a hardlink, it will have size 0 (e.g. * cpio). Do not assume that if a file will have hardlinks to it, it will have @@ -784,10 +789,10 @@ aic_import_deferred_hardlinks_for (OstreeRepoArchiveImportContext *ctx, /* rewrite the target so it points to the csum of the payload hardlink */ if (payload) if (!aic_import_from_hardlink (ctx, target, payload->data, error)) - return FALSE; + return glnx_prefix_error (error, "Failed importing hardlink"); if (!aic_lookup_file_csum (ctx, target, &csum, error)) - return FALSE; + return glnx_prefix_error (error, "Failed to find object"); /* import all the hardlinks */ for (GSList *hl = hardlinks; hl != NULL; hl = g_slist_next (hl)) @@ -799,7 +804,7 @@ aic_import_deferred_hardlinks_for (OstreeRepoArchiveImportContext *ctx, continue; /* small optimization; no need to redo this one */ if (!ostree_mutable_tree_replace_file (df->parent, name, csum, error)) - return FALSE; + return glnx_prefix_error (error, "Failed to replace file"); } return TRUE; @@ -813,7 +818,7 @@ aic_import_deferred_hardlinks (OstreeRepoArchiveImportContext *ctx, GLNX_HASH_TABLE_FOREACH_KV (ctx->deferred_hardlinks, const char*, target, GSList*, links) { if (!aic_import_deferred_hardlinks_for (ctx, target, links, error)) - return FALSE; + return glnx_prefix_error (error, "ostree-tar: Processing deferred hardlink %s", target); } return TRUE; } diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 6d8f0193..988c2179 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -63,6 +63,7 @@ G_BEGIN_DECLS /* Well-known keys for the additional metadata field in a commit in a ref entry * in a summary file. */ #define OSTREE_COMMIT_TIMESTAMP "ostree.commit.timestamp" +#define OSTREE_COMMIT_VERSION "ostree.commit.version" typedef enum { OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0), diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index 175765fd..0c702dc9 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -48,6 +48,10 @@ maybe_prune_loose_object (OtPruneData *data, OstreeObjectType objtype; ostree_object_name_deserialize (key, &checksum, &objtype); + /* Return if we only want to delete commits and this object is not a commit object. */ + gboolean commit_only = flags & OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY; + if (commit_only && (objtype != OSTREE_OBJECT_TYPE_COMMIT)) + goto exit; if (g_hash_table_lookup_extended (data->reachable, key, NULL, NULL)) reachable = TRUE; @@ -125,7 +129,11 @@ maybe_prune_loose_object (OtPruneData *data, else data->n_reachable_content++; } - + if (commit_only && (objtype != OSTREE_OBJECT_TYPE_COMMIT)) + { + g_debug ("Keeping object (not commit) %s.%s", checksum, + ostree_object_type_to_string (objtype)); + } return TRUE; } @@ -299,6 +307,52 @@ repo_prune_internal (OstreeRepo *self, return TRUE; } +static gboolean +traverse_reachable_internal (OstreeRepo *self, + OstreeRepoCommitTraverseFlags flags, + guint depth, + GHashTable *reachable, + GCancellable *cancellable, + GError **error) +{ + g_autoptr(OstreeRepoAutoLock) lock = + ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error); + if (!lock) + return FALSE; + + /* Ignoring collections. */ + g_autoptr(GHashTable) all_refs = NULL; /* (element-type utf8 utf8) */ + + if (!ostree_repo_list_refs (self, NULL, &all_refs, + cancellable, error)) + return FALSE; + + GLNX_HASH_TABLE_FOREACH_V (all_refs, const char*, checksum) + { + g_debug ("Finding objects to keep for commit %s", checksum); + if (!ostree_repo_traverse_commit_with_flags (self, flags, checksum, depth, reachable, + NULL, cancellable, error)) + return FALSE; + } + + /* Using collections. */ + g_autoptr(GHashTable) all_collection_refs = NULL; /* (element-type OstreeChecksumRef utf8) */ + + if (!ostree_repo_list_collection_refs (self, NULL, &all_collection_refs, + OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES, cancellable, error)) + return FALSE; + + GLNX_HASH_TABLE_FOREACH_V (all_collection_refs, const char*, checksum) + { + g_debug ("Finding objects to keep for commit %s", checksum); + if (!ostree_repo_traverse_commit_with_flags (self, flags, checksum, depth, reachable, + NULL, cancellable, error)) + return FALSE; + } + + return TRUE; +} + /** * ostree_repo_traverse_reachable_refs: * @self: Repo @@ -319,42 +373,10 @@ ostree_repo_traverse_reachable_refs (OstreeRepo *self, GCancellable *cancellable, GError **error) { - g_autoptr(OstreeRepoAutoLock) lock = - ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error); - if (!lock) - return FALSE; - - /* Ignoring collections. */ - g_autoptr(GHashTable) all_refs = NULL; /* (element-type utf8 utf8) */ - - if (!ostree_repo_list_refs (self, NULL, &all_refs, - cancellable, error)) - return FALSE; - - GLNX_HASH_TABLE_FOREACH_V (all_refs, const char*, checksum) - { - g_debug ("Finding objects to keep for commit %s", checksum); - if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable, - cancellable, error)) - return FALSE; - } - - /* Using collections. */ - g_autoptr(GHashTable) all_collection_refs = NULL; /* (element-type OstreeChecksumRef utf8) */ - - if (!ostree_repo_list_collection_refs (self, NULL, &all_collection_refs, - OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES, cancellable, error)) - return FALSE; - - GLNX_HASH_TABLE_FOREACH_V (all_collection_refs, const char*, checksum) - { - g_debug ("Finding objects to keep for commit %s", checksum); - if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable, - cancellable, error)) - return FALSE; - } - - return TRUE; + return traverse_reachable_internal (self, + OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE, + depth, reachable, + cancellable, error); } /** @@ -401,6 +423,7 @@ ostree_repo_prune (OstreeRepo *self, g_autoptr(GHashTable) objects = NULL; gboolean refs_only = flags & OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY; + gboolean commit_only = flags & OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY; g_autoptr(GHashTable) reachable = ostree_repo_traverse_new_reachable (); @@ -409,9 +432,15 @@ ostree_repo_prune (OstreeRepo *self, * the deletion. */ + OstreeRepoCommitTraverseFlags traverse_flags = OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE; + if (commit_only) + traverse_flags |= OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY; + if (refs_only) { - if (!ostree_repo_traverse_reachable_refs (self, depth, reachable, cancellable, error)) + if (!traverse_reachable_internal (self, traverse_flags, + depth, reachable, + cancellable, error)) return FALSE; } @@ -432,8 +461,8 @@ ostree_repo_prune (OstreeRepo *self, continue; g_debug ("Finding objects to keep for commit %s", checksum); - if (!ostree_repo_traverse_commit_union (self, checksum, depth, reachable, - cancellable, error)) + if (!ostree_repo_traverse_commit_with_flags (self, traverse_flags, checksum, depth, reachable, + NULL, cancellable, error)) return FALSE; } } diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 65b56789..e8918cf6 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -2244,6 +2244,9 @@ process_one_static_delta (OtPullData *pull_data, ref, cancellable, error)) return FALSE; + if (!ostree_repo_mark_commit_partial (pull_data->repo, to_revision, TRUE, error)) + return FALSE; + if (detached_data && !ostree_repo_write_commit_detached_metadata (pull_data->repo, to_revision, detached_data, diff --git a/src/libostree/ostree-repo-refs.c b/src/libostree/ostree-repo-refs.c index 8d010729..86bd27c5 100644 --- a/src/libostree/ostree-repo-refs.c +++ b/src/libostree/ostree-repo-refs.c @@ -396,7 +396,6 @@ _ostree_repo_resolve_rev_internal (OstreeRepo *self, { ret_rev = g_strdup (refspec); } - else if (!ostree_repo_resolve_partial_checksum (self, refspec, &ret_rev, error)) return FALSE; diff --git a/src/libostree/ostree-repo-traverse.c b/src/libostree/ostree-repo-traverse.c index c5c204d7..5efed100 100644 --- a/src/libostree/ostree-repo-traverse.c +++ b/src/libostree/ostree-repo-traverse.c @@ -542,8 +542,9 @@ traverse_dirtree (OstreeRepo *repo, } /** - * ostree_repo_traverse_commit_union_with_parents: (skip) + * ostree_repo_traverse_commit_with_flags: (skip) * @repo: Repo + * @flags: change traversal behaviour according to these flags * @commit_checksum: ASCII SHA256 checksum * @maxdepth: Traverse this many parent commits, -1 for unlimited * @inout_reachable: Set of reachable objects @@ -561,15 +562,17 @@ traverse_dirtree (OstreeRepo *repo, * Since: 2018.5 */ 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) +ostree_repo_traverse_commit_with_flags (OstreeRepo *repo, + OstreeRepoCommitTraverseFlags flags, + const char *commit_checksum, + int maxdepth, + GHashTable *inout_reachable, + GHashTable *inout_parents, + GCancellable *cancellable, + GError **error) { g_autofree char *tmp_checksum = NULL; + gboolean commit_only = flags & OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY; while (TRUE) { @@ -603,16 +606,20 @@ ostree_repo_traverse_commit_union_with_parents (OstreeRepo *repo, g_hash_table_add (inout_reachable, g_variant_ref (key)); - g_debug ("Traversing commit %s", commit_checksum); - ostree_cleanup_repo_commit_traverse_iter - OstreeRepoCommitTraverseIter iter = { 0, }; - if (!ostree_repo_commit_traverse_iter_init_commit (&iter, repo, commit, - OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE, - error)) - return FALSE; + /* Save time by skipping traversal of non-commit objects */ + if (!commit_only) + { + g_debug ("Traversing commit %s", commit_checksum); + ostree_cleanup_repo_commit_traverse_iter + OstreeRepoCommitTraverseIter iter = { 0, }; + if (!ostree_repo_commit_traverse_iter_init_commit (&iter, repo, commit, + OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE, + error)) + return FALSE; - if (!traverse_iter (repo, &iter, key, inout_reachable, inout_parents, ignore_missing_dirs, cancellable, error)) - return FALSE; + if (!traverse_iter (repo, &iter, key, inout_reachable, inout_parents, ignore_missing_dirs, cancellable, error)) + return FALSE; + } gboolean recurse = FALSE; if (maxdepth == -1 || maxdepth > 0) @@ -634,6 +641,39 @@ ostree_repo_traverse_commit_union_with_parents (OstreeRepo *repo, return TRUE; } +/** + * ostree_repo_traverse_commit_union_with_parents: (skip) + * @repo: Repo + * @commit_checksum: ASCII SHA256 checksum + * @maxdepth: Traverse this many parent commits, -1 for unlimited + * @inout_reachable: Set of reachable objects + * @inout_parents: Map from object to parent object + * @cancellable: Cancellable + * @error: Error + * + * Update the set @inout_reachable containing all objects reachable + * from @commit_checksum, traversing @maxdepth parent commits. + * + * Additionally this constructs a mapping from each object to the parents + * of the object, which can be used to track which commits an object + * belongs to. + * + * Since: 2018.5 + */ +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) +{ + return ostree_repo_traverse_commit_with_flags(repo, OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE, + commit_checksum, maxdepth, inout_reachable, inout_parents, + cancellable, error); +} + /** * ostree_repo_traverse_commit_union: (skip) * @repo: Repo diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 86948ee2..a27591b3 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -2704,6 +2704,9 @@ ostree_repo_mode_to_string (OstreeRepoMode mode, /* Legacy alias */ ret_mode ="archive-z2"; break; + case OSTREE_REPO_MODE_BARE_SPLIT_XATTRS: + ret_mode = "bare-split-xattrs"; + break; default: return glnx_throw (error, "Invalid mode '%d'", mode); } @@ -2734,6 +2737,8 @@ ostree_repo_mode_from_string (const char *mode, else if (strcmp (mode, "archive-z2") == 0 || strcmp (mode, "archive") == 0) ret_mode = OSTREE_REPO_MODE_ARCHIVE; + else if (strcmp (mode, "bare-split-xattrs") == 0) + ret_mode = OSTREE_REPO_MODE_BARE_SPLIT_XATTRS; else return glnx_throw (error, "Invalid mode '%s' in repository configuration", mode); @@ -4171,6 +4176,32 @@ repo_load_file_archive (OstreeRepo *self, } } +static GVariant * +_ostree_repo_read_xattrs_file_link (OstreeRepo *self, + const char *checksum, + GCancellable *cancellable, + GError **error) +{ + g_assert (self != NULL); + g_assert (checksum != NULL); + + char xattr_path[_OSTREE_LOOSE_PATH_MAX]; + _ostree_loose_path (xattr_path, checksum, OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK, self->mode); + + g_autoptr(GVariant) xattrs = NULL; + glnx_autofd int fd = -1; + if (!glnx_openat_rdonly (self->objects_dir_fd, xattr_path, FALSE, &fd, error)) + return FALSE; + + g_assert (fd >= 0); + if (!ot_variant_read_fd (fd, 0, G_VARIANT_TYPE ("a(ayay)"), TRUE, + &xattrs, error)) + return glnx_prefix_error_null (error, "Deserializing xattrs content"); + + g_assert (xattrs != NULL); + return g_steal_pointer (&xattrs); +} + gboolean _ostree_repo_load_file_bare (OstreeRepo *self, const char *checksum, @@ -4218,8 +4249,9 @@ _ostree_repo_load_file_bare (OstreeRepo *self, cancellable, error); } - const gboolean need_open = - (out_fd || out_xattrs || self->mode == OSTREE_REPO_MODE_BARE_USER); + const gboolean need_open = (out_fd || + (out_xattrs && self->mode == OSTREE_REPO_MODE_BARE) || + self->mode == OSTREE_REPO_MODE_BARE_USER); /* If it's a regular file and we're requested to return the fd, do it now. As * a special case in bare-user, we always do an open, since the stat() metadata * lives there. @@ -4284,10 +4316,8 @@ _ostree_repo_load_file_bare (OstreeRepo *self, ret_xattrs = g_variant_ref_sink (g_variant_builder_end (&builder)); } } - else + else if (self->mode == OSTREE_REPO_MODE_BARE) { - g_assert (self->mode == OSTREE_REPO_MODE_BARE); - if (S_ISREG (stbuf.st_mode) && out_xattrs) { if (self->disable_xattrs) @@ -4306,6 +4336,19 @@ _ostree_repo_load_file_bare (OstreeRepo *self, return FALSE; } } + else if (self->mode == OSTREE_REPO_MODE_BARE_SPLIT_XATTRS) + { + if (out_xattrs) + { + ret_xattrs = _ostree_repo_read_xattrs_file_link(self, checksum, cancellable, error); + if (ret_xattrs == NULL) + return FALSE; + } + } + else + { + g_assert_not_reached (); + } if (out_fd) *out_fd = glnx_steal_fd (&fd); @@ -6064,10 +6107,11 @@ summary_add_ref_entry (OstreeRepo *self, g_autoptr(GVariant) commit_obj = NULL; if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT, checksum, &commit_obj, error)) return FALSE; + g_autoptr(GVariant) orig_metadata = g_variant_get_child_value (commit_obj, 0); g_variant_dict_init (&commit_metadata_builder, NULL); - /* Forward the commit’s timestamp if it’s valid. */ + /* Forward the commit’s timestamp and version if they're valid. */ guint64 commit_timestamp = ostree_commit_get_timestamp (commit_obj); g_autoptr(GDateTime) dt = g_date_time_new_from_unix_utc (commit_timestamp); @@ -6075,6 +6119,10 @@ summary_add_ref_entry (OstreeRepo *self, g_variant_dict_insert_value (&commit_metadata_builder, OSTREE_COMMIT_TIMESTAMP, g_variant_new_uint64 (GUINT64_TO_BE (commit_timestamp))); + const char *version = NULL; + if (g_variant_lookup (orig_metadata, OSTREE_COMMIT_META_KEY_VERSION, "&s", &version)) + g_variant_dict_insert (&commit_metadata_builder, OSTREE_COMMIT_VERSION, "s", version); + g_variant_builder_add_value (refs_builder, g_variant_new ("(s(t@ay@a{sv}))", ref, (guint64) g_variant_get_size (commit_obj), diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index 8a5c3b33..98571170 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -1118,6 +1118,16 @@ typedef enum { OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE = 0, } OstreeStaticDeltaIndexFlags; +/** + * OstreeRepoCommitTraverseFlags: + * @OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE: No special options for traverse + * @OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY: Traverse and retrieve only commit objects. (Since: 2022.2) + */ +typedef enum { + OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE = (1 << 0), + OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY = (1 << 1), +} OstreeRepoCommitTraverseFlags; + _OSTREE_PUBLIC gboolean ostree_repo_static_delta_reindex (OstreeRepo *repo, OstreeStaticDeltaIndexFlags flags, @@ -1171,6 +1181,7 @@ gboolean ostree_repo_traverse_commit_union (OstreeRepo *repo, GHashTable *inout_reachable, GCancellable *cancellable, GError **error); + _OSTREE_PUBLIC gboolean ostree_repo_traverse_commit_union_with_parents (OstreeRepo *repo, const char *commit_checksum, @@ -1180,6 +1191,16 @@ gboolean ostree_repo_traverse_commit_union_with_parents (OstreeRepo *rep GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC +gboolean ostree_repo_traverse_commit_with_flags (OstreeRepo *repo, + OstreeRepoCommitTraverseFlags flags, + const char *commit_checksum, + int maxdepth, + GHashTable *inout_reachable, + GHashTable *inout_parents, + GCancellable *cancellable, + GError **error); + struct _OstreeRepoCommitTraverseIter { gboolean initialized; /* 4 byte hole on 64 bit */ @@ -1189,10 +1210,6 @@ struct _OstreeRepoCommitTraverseIter { typedef struct _OstreeRepoCommitTraverseIter OstreeRepoCommitTraverseIter; -typedef enum { - OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE = (1 << 0) -} OstreeRepoCommitTraverseFlags; - _OSTREE_PUBLIC gboolean ostree_repo_commit_traverse_iter_init_commit (OstreeRepoCommitTraverseIter *iter, @@ -1245,11 +1262,13 @@ void ostree_repo_commit_traverse_iter_cleanup (void *p); * @OSTREE_REPO_PRUNE_FLAGS_NONE: No special options for pruning * @OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: Don't actually delete objects * @OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: Do not traverse individual commit objects, only follow refs + * @OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY: Only traverse commit objects. (Since 2022.2) */ typedef enum { OSTREE_REPO_PRUNE_FLAGS_NONE = 0, OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE = (1 << 0), OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY = (1 << 1), + OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY = (1 << 2), } OstreeRepoPruneFlags; _OSTREE_PUBLIC diff --git a/src/libostree/ostree-sepolicy.c b/src/libostree/ostree-sepolicy.c index d8ff35cb..5fd59a82 100644 --- a/src/libostree/ostree-sepolicy.c +++ b/src/libostree/ostree-sepolicy.c @@ -422,7 +422,6 @@ initable_init (GInitable *initable, { const char *policy_rootpath = gs_file_get_path_cached (policy_root); - g_setenv ("LIBSELINUX_DISABLE_PCRE_PRECOMPILED", "1", FALSE); if (selinux_set_policy_root (policy_rootpath) != 0) return glnx_throw_errno_prefix (error, "selinux_set_policy_root(%s)", policy_rootpath); diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index c4ae86d5..b7cc232f 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1557,6 +1558,39 @@ typedef struct { guint64 extra_syncfs_msec; } SyncStats; +typedef struct { + int ref_count; /* atomic */ + bool success; + GMutex mutex; + GCond cond; +} SyncData; + +static void +sync_data_unref (SyncData *data) +{ + if (!g_atomic_int_dec_and_test (&data->ref_count)) + return; + g_mutex_clear (&data->mutex); + g_cond_clear (&data->cond); + g_free (data); +} + +// An asynchronous sync() call. See below. +static void * +sync_in_thread (void *ptr) +{ + SyncData *syncdata = ptr; + // Ensure that the caller is blocked waiting + g_mutex_lock (&syncdata->mutex); + sync (); + // Signal success + syncdata->success = true; + g_cond_broadcast (&syncdata->cond); + g_mutex_unlock (&syncdata->mutex); + sync_data_unref (syncdata); + return NULL; +} + /* First, sync the root directory as well as /var and /boot which may * be separate mount points. Then *in addition*, do a global * `sync()`. @@ -1589,9 +1623,44 @@ full_system_sync (OstreeSysroot *self, * actually get error codes out of that API, and we more clearly * delineate what we actually want to sync in the future when this * global sync call is removed. + * + * Due to https://bugzilla.redhat.com/show_bug.cgi?id=2003532 which is + * a bug in the interaction between Ceph and systemd, we have a capped + * timeout of 5s on the sync here. In general, we don't actually want + * to "own" flushing data on *all* mounted filesystems as part of + * our process. Again, we're only keeping the `sync` here out of + * conservatisim. We could likely just remove it and e.g. systemd + * would take care of sync as part of unmounting individual filesystems. */ start_msec = g_get_monotonic_time () / 1000; - sync (); + if (!(self->opt_flags & OSTREE_SYSROOT_GLOBAL_OPT_SKIP_SYNC)) + { + SyncData *syncdata = g_new (SyncData, 1); + syncdata->ref_count = 2; // One for us, one for thread + syncdata->success = FALSE; + g_mutex_init (&syncdata->mutex); + g_cond_init (&syncdata->cond); + g_mutex_lock (&syncdata->mutex); + GThread *worker = g_thread_new ("ostree sync", sync_in_thread, syncdata); + // Wait up to 5 seconds for sync() to finish + gint64 end_time = g_get_monotonic_time () + (5 * G_TIME_SPAN_SECOND); + while (!syncdata->success) + { + if (!g_cond_wait_until (&syncdata->cond, &syncdata->mutex, end_time)) + { + ot_journal_print (LOG_INFO, "Timed out waiting for global sync()"); + break; + } + } + g_mutex_unlock (&syncdata->mutex); + sync_data_unref (syncdata); + // We can't join the thread here, for two reasons. First, the whole + // point here is to avoid blocking on `sync`. The other reason is + // today there is no return value on success from `sync`, so there's + // no point to joining the thread even if we had a nonblocking mechanism + // to do so. + g_thread_unref (worker); + } end_msec = g_get_monotonic_time () / 1000; out_stats->extra_syncfs_msec = (end_msec - start_msec); @@ -2097,7 +2166,7 @@ swap_bootloader (OstreeSysroot *sysroot, **/ if (bootloader) { - if (!_ostree_bootloader_post_bls_sync (bootloader, cancellable, error)) + if (!_ostree_bootloader_post_bls_sync (bootloader, new_bootversion, cancellable, error)) return FALSE; } @@ -2424,6 +2493,10 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self, if (!_ostree_sysroot_rmrf_deployment (self, self->staged_deployment, cancellable, error)) return FALSE; + /* Delete the lock if there was any. */ + if (!ot_ensure_unlinked_at (AT_FDCWD, _OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED, error)) + return FALSE; + /* Clear it out of the *current* deployments list to maintain invariants */ self->staged_deployment = NULL; g_ptr_array_remove_index (self->deployments, 0); diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h index 9cc4023f..cb34eeb3 100644 --- a/src/libostree/ostree-sysroot-private.h +++ b/src/libostree/ostree-sysroot-private.h @@ -38,6 +38,11 @@ typedef enum { OSTREE_SYSROOT_DEBUG_TEST_NO_DTB = 1 << 3, /* https://github.com/ostreedev/ostree/issues/2154 */ } OstreeSysrootDebugFlags; +typedef enum { + /* Skip invoking `sync()` */ + OSTREE_SYSROOT_GLOBAL_OPT_SKIP_SYNC = 1 << 0, +} OstreeSysrootGlobalOptFlags; + typedef enum { OSTREE_SYSROOT_LOAD_STATE_NONE, /* ostree_sysroot_new() was called */ OSTREE_SYSROOT_LOAD_STATE_INIT, /* We've loaded basic sysroot state and have an fd */ @@ -75,6 +80,7 @@ struct OstreeSysroot { /* Only access through ostree_sysroot_[_get]repo() */ OstreeRepo *repo; + OstreeSysrootGlobalOptFlags opt_flags; OstreeSysrootDebugFlags debug_flags; }; diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index eccf9375..266a2975 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -184,6 +184,9 @@ ostree_sysroot_class_init (OstreeSysrootClass *klass) static void ostree_sysroot_init (OstreeSysroot *self) { + const GDebugKey globalopt_keys[] = { + { "skip-sync", OSTREE_SYSROOT_GLOBAL_OPT_SKIP_SYNC }, + }; const GDebugKey keys[] = { { "mutable-deployments", OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS }, { "test-fifreeze", OSTREE_SYSROOT_DEBUG_TEST_FIFREEZE }, @@ -191,6 +194,8 @@ ostree_sysroot_init (OstreeSysroot *self) { "no-dtb", OSTREE_SYSROOT_DEBUG_TEST_NO_DTB }, }; + self->opt_flags = g_parse_debug_string (g_getenv ("OSTREE_SYSROOT_OPTS"), + globalopt_keys, G_N_ELEMENTS (globalopt_keys)); self->debug_flags = g_parse_debug_string (g_getenv ("OSTREE_SYSROOT_DEBUG"), keys, G_N_ELEMENTS (keys)); @@ -973,7 +978,7 @@ ostree_sysroot_initialize (OstreeSysroot *self, * we'll use it to sanity check that we found a booted deployment for example. * Second, we also find out whether sysroot == /. */ - if (!glnx_fstatat_allow_noent (AT_FDCWD, "/run/ostree-booted", NULL, 0, error)) + if (!glnx_fstatat_allow_noent (AT_FDCWD, OSTREE_PATH_BOOTED, NULL, 0, error)) return FALSE; const gboolean ostree_booted = (errno == 0); @@ -1106,11 +1111,11 @@ sysroot_load_from_bootloader_configs (OstreeSysroot *self, return FALSE; if (errno == ENOENT) { - return glnx_throw (error, "Unexpected state: /run/ostree-booted found, but no /boot/loader directory"); + return glnx_throw (error, "Unexpected state: %s found, but no /boot/loader directory", OSTREE_PATH_BOOTED); } else { - return glnx_throw (error, "Unexpected state: /run/ostree-booted found and in / sysroot, but bootloader entry not found"); + return glnx_throw (error, "Unexpected state: %s found and in / sysroot, but bootloader entry not found", OSTREE_PATH_BOOTED); } } diff --git a/src/libostree/ostree-sysroot.h b/src/libostree/ostree-sysroot.h index 41361716..c240aaa0 100644 --- a/src/libostree/ostree-sysroot.h +++ b/src/libostree/ostree-sysroot.h @@ -24,6 +24,14 @@ G_BEGIN_DECLS +/** + * OSTREE_PATH_BOOTED: + * Filesystem path that is created on an ostree-booted system. + * + * Since: 2022.2 + */ +#define OSTREE_PATH_BOOTED "/run/ostree-booted" + #define OSTREE_TYPE_SYSROOT ostree_sysroot_get_type() #define OSTREE_SYSROOT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), OSTREE_TYPE_SYSROOT, OstreeSysroot)) diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h index 40b5c95e..244ec9af 100644 --- a/src/libostree/ostree-version.h +++ b/src/libostree/ostree-version.h @@ -41,7 +41,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (1) +#define OSTREE_RELEASE_VERSION (2) /** * OSTREE_VERSION @@ -50,7 +50,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2022.1) +#define OSTREE_VERSION (2022.2) /** * OSTREE_VERSION_S: @@ -60,7 +60,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2022.1" +#define OSTREE_VERSION_S "2022.2" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) @@ -98,4 +98,4 @@ * * Since: 2019.3 */ -#define OSTREE_BUILT_FEATURES "libsoup gpgme ex-fsverity libarchive selinux avahi libmount systemd release p2p" +#define OSTREE_BUILT_FEATURES "libsoup gpgme ex-fsverity libarchive selinux libmount systemd release p2p" diff --git a/src/libostree/s390x-se-luks-gencpio b/src/libostree/s390x-se-luks-gencpio new file mode 100755 index 00000000..f0ad24eb --- /dev/null +++ b/src/libostree/s390x-se-luks-gencpio @@ -0,0 +1,22 @@ + #!/usr/bin/bash + # This script creates new initramdisk with LUKS config within +set -euo pipefail + +old_initrd=$1 +new_initrd=$2 + +# Unpacking existing initramdisk +workdir=$(mktemp -d -p /tmp se-initramfs-XXXXXX) +cd ${workdir} +gzip -cd ${old_initrd} | cpio -imd --quiet + +# Adding LUKS root key and crypttab config +mkdir -p etc/luks +cp -f /etc/luks/root etc/luks/ +cp -f /etc/crypttab etc/ + +# Creating new initramdisk image +find . | cpio --quiet -H newc -o | gzip -9 -n >> ${new_initrd} + +# Cleanup +rm -rf ${workdir} diff --git a/src/libotutil/ot-variant-builder.c b/src/libotutil/ot-variant-builder.c index 92ac8ede..4d3dcbe5 100644 --- a/src/libotutil/ot-variant-builder.c +++ b/src/libotutil/ot-variant-builder.c @@ -760,10 +760,10 @@ ot_variant_builder_info_new (OtVariantBuilder *builder, const GVariantType *type { OtVariantBuilderInfo *info; - info = (OtVariantBuilderInfo *) g_slice_new0 (OtVariantBuilderInfo); - g_return_val_if_fail (g_variant_type_is_container (type), NULL); + info = (OtVariantBuilderInfo *) g_slice_new0 (OtVariantBuilderInfo); + info->builder = builder; info->type = g_variant_type_copy (type); info->type_info = g_variant_type_info_get (type); @@ -830,7 +830,7 @@ static void ot_variant_builder_info_free (OtVariantBuilderInfo *info) { if (info->parent) - ot_variant_builder_info_free (info); + ot_variant_builder_info_free (info->parent); g_variant_type_free (info->type); g_array_unref (info->child_ends); @@ -845,10 +845,10 @@ ot_variant_builder_new (const GVariantType *type, { OtVariantBuilder *builder; - builder = (OtVariantBuilder *) g_slice_new0 (OtVariantBuilder); - g_return_val_if_fail (g_variant_type_is_container (type), NULL); + builder = (OtVariantBuilder *) g_slice_new0 (OtVariantBuilder); + builder->head = ot_variant_builder_info_new (builder, type); builder->ref_count = 1; builder->fd = fd; diff --git a/src/libotutil/otutil.h b/src/libotutil/otutil.h index 1b543062..4279bc15 100644 --- a/src/libotutil/otutil.h +++ b/src/libotutil/otutil.h @@ -23,8 +23,13 @@ #include #include /* Yeah...let's just do that here. */ +#include #include +#ifdef HAVE_LIBSYSTEMD +#include +#endif + /* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */ #if !GLIB_CHECK_VERSION(2, 49, 3) #define OT_VARIANT_BUILDER_INITIALIZER {{0,}} diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c index 97351b14..d4743890 100644 --- a/src/ostree/ot-admin-builtin-deploy.c +++ b/src/ostree/ot-admin-builtin-deploy.c @@ -21,6 +21,8 @@ #include "config.h" +#include "ostree-sysroot-private.h" + #include "ot-main.h" #include "ot-admin-builtins.h" #include "ot-admin-functions.h" @@ -31,6 +33,7 @@ static gboolean opt_retain; static gboolean opt_stage; +static gboolean opt_lock_finalization; static gboolean opt_retain_pending; static gboolean opt_retain_rollback; static gboolean opt_not_as_default; @@ -51,6 +54,7 @@ static GOptionEntry options[] = { { "no-merge", 0, 0, G_OPTION_ARG_NONE, &opt_no_merge, "Do not apply configuration (/etc and kernel arguments) from booted deployment", NULL}, { "retain", 0, 0, G_OPTION_ARG_NONE, &opt_retain, "Do not delete previous deployments", NULL }, { "stage", 0, 0, G_OPTION_ARG_NONE, &opt_stage, "Complete deployment at OS shutdown", NULL }, + { "lock-finalization", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_lock_finalization, "Prevent automatic deployment finalization on shutdown", NULL }, { "retain-pending", 0, 0, G_OPTION_ARG_NONE, &opt_retain_pending, "Do not delete pending deployments", NULL }, { "retain-rollback", 0, 0, G_OPTION_ARG_NONE, &opt_retain_rollback, "Do not delete rollback deployments", NULL }, { "not-as-default", 0, 0, G_OPTION_ARG_NONE, &opt_not_as_default, "Append rather than prepend new deployment", NULL }, @@ -202,6 +206,20 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat return glnx_throw (error, "--stage cannot currently be combined with --retain arguments"); if (opt_not_as_default) return glnx_throw (error, "--stage cannot currently be combined with --not-as-default"); + /* touch file *before* we stage to avoid races */ + if (opt_lock_finalization) + { + if (!glnx_shutil_mkdir_p_at (AT_FDCWD, + dirname (strdupa (_OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED)), + 0755, cancellable, error)) + return FALSE; + + glnx_autofd int fd = open (_OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED, + O_CREAT | O_WRONLY | O_NOCTTY | O_CLOEXEC, 0640); + if (fd == -1) + return glnx_throw_errno_prefix (error, "touch(%s)", + _OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED); + } /* use old API if we can to exercise it in CI */ if (!overlay_initrd_chksums) { diff --git a/src/ostree/ot-admin-builtin-finalize-staged.c b/src/ostree/ot-admin-builtin-finalize-staged.c index 80d8a9b7..17b6a625 100644 --- a/src/ostree/ot-admin-builtin-finalize-staged.c +++ b/src/ostree/ot-admin-builtin-finalize-staged.c @@ -45,7 +45,7 @@ ot_admin_builtin_finalize_staged (int argc, char **argv, OstreeCommandInvocation /* Just a sanity check; we shouldn't be called outside of the service though. */ struct stat stbuf; - if (fstatat (AT_FDCWD, "/run/ostree-booted", &stbuf, 0) < 0) + if (fstatat (AT_FDCWD, OSTREE_PATH_BOOTED, &stbuf, 0) < 0) return TRUE; g_autoptr(GOptionContext) context = g_option_context_new (""); diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c index 845013ed..c43f9b3c 100644 --- a/src/ostree/ot-builtin-commit.c +++ b/src/ostree/ot-builtin-commit.c @@ -335,17 +335,18 @@ parse_keyvalue_strings (GVariantBuilder *builder, if (!eq) return glnx_throw (error, "Missing '=' in KEY=VALUE metadata '%s'", s); g_autofree char *key = g_strndup (s, eq - s); + const char *value = eq + 1; if (is_gvariant_print) { - g_autoptr(GVariant) value = g_variant_parse (NULL, eq + 1, NULL, NULL, error); - if (!value) + g_autoptr(GVariant) variant = g_variant_parse (NULL, value, NULL, NULL, error); + if (!variant) return glnx_prefix_error (error, "Parsing %s", s); - g_variant_builder_add (builder, "{sv}", key, value); + g_variant_builder_add (builder, "{sv}", key, variant); } else g_variant_builder_add (builder, "{sv}", key, - g_variant_new_string (eq + 1)); + g_variant_new_string (value)); } return TRUE; diff --git a/src/ostree/ot-builtin-ls.c b/src/ostree/ot-builtin-ls.c index a8056a86..5fa080ae 100644 --- a/src/ostree/ot-builtin-ls.c +++ b/src/ostree/ot-builtin-ls.c @@ -47,17 +47,19 @@ static GOptionEntry options[] = { { NULL } }; -static void -print_one_file_text (GFile *f, - GFileInfo *file_info) +static gboolean +print_one_file_text (GFile *f, + GFileInfo *file_info, + GCancellable *cancellable, + GError **error) { g_autoptr(GString) buf = g_string_new (""); char type_c; guint32 mode; guint32 type; - if (!ostree_repo_file_ensure_resolved ((OstreeRepoFile*)f, NULL)) - g_assert_not_reached (); + if (!ostree_repo_file_ensure_resolved ((OstreeRepoFile*)f, error)) + return FALSE; type_c = '?'; mode = g_file_info_get_attribute_uint32 (file_info, "unix::mode"); @@ -82,8 +84,7 @@ print_one_file_text (GFile *f, case G_FILE_TYPE_UNKNOWN: case G_FILE_TYPE_SHORTCUT: case G_FILE_TYPE_MOUNTABLE: - g_assert_not_reached (); - break; + return glnx_throw (error, "Invalid file type"); } g_string_append_c (buf, type_c); g_string_append_printf (buf, "0%04o %u %u %6" G_GUINT64_FORMAT " ", @@ -104,8 +105,8 @@ print_one_file_text (GFile *f, GVariant *xattrs; char *formatted; - if (!ostree_repo_file_get_xattrs ((OstreeRepoFile*)f, &xattrs, NULL, NULL)) - g_assert_not_reached (); + if (!ostree_repo_file_get_xattrs ((OstreeRepoFile*)f, &xattrs, cancellable, error)) + return FALSE; formatted = g_variant_print (xattrs, TRUE); g_string_append (buf, "{ "); @@ -121,39 +122,47 @@ print_one_file_text (GFile *f, g_string_append_printf (buf, " -> %s", g_file_info_get_attribute_byte_string (file_info, "standard::symlink-target")); g_print ("%s\n", buf->str); + + return TRUE; } -static void -print_one_file_binary (GFile *f, - GFileInfo *file_info) +static gboolean +print_one_file_binary (GFile *f, + GFileInfo *file_info, + GCancellable *cancellable, + GError **error) { const char *path; - if (!ostree_repo_file_ensure_resolved ((OstreeRepoFile*)f, NULL)) - g_assert_not_reached (); + if (!ostree_repo_file_ensure_resolved ((OstreeRepoFile*)f, error)) + return FALSE; path = gs_file_get_path_cached (f); fwrite (path, 1, strlen (path), stdout); fwrite ("\0", 1, 1, stdout); -} -static void -print_one_file (GFile *f, - GFileInfo *file_info) -{ - if (opt_nul_filenames_only) - print_one_file_binary (f, file_info); - else - print_one_file_text (f, file_info); + return TRUE; } static gboolean -print_directory_recurse (GFile *f, - int depth, - GError **error) +print_one_file (GFile *f, + GFileInfo *file_info, + GCancellable *cancellable, + GError **error) +{ + if (opt_nul_filenames_only) + return print_one_file_binary (f, file_info, cancellable, error); + else + return print_one_file_text (f, file_info, cancellable, error); +} + +static gboolean +print_directory_recurse (GFile *f, + int depth, + GCancellable *cancellable, + GError **error) { - gboolean ret = FALSE; g_autoptr(GFileEnumerator) dir_enum = NULL; g_autoptr(GFile) child = NULL; g_autoptr(GFileInfo) child_info = NULL; @@ -170,20 +179,21 @@ print_directory_recurse (GFile *f, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, error); - if (!dir_enum) - goto out; + if (dir_enum == NULL) + return FALSE; while ((child_info = g_file_enumerator_next_file (dir_enum, NULL, &temp_error)) != NULL) { g_clear_object (&child); child = g_file_get_child (f, g_file_info_get_name (child_info)); - print_one_file (child, child_info); + if (!print_one_file (child, child_info, cancellable, error)) + return FALSE; if (g_file_info_get_file_type (child_info) == G_FILE_TYPE_DIRECTORY) { - if (!print_directory_recurse (child, depth, error)) - goto out; + if (!print_directory_recurse (child, depth, cancellable, error)) + return FALSE; } g_clear_object (&child_info); @@ -191,12 +201,10 @@ print_directory_recurse (GFile *f, if (temp_error) { g_propagate_error (error, temp_error); - goto out; + return FALSE; } - ret = TRUE; - out: - return ret; + return TRUE; } static gboolean @@ -206,37 +214,38 @@ print_one_argument (OstreeRepo *repo, GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - g_autoptr(GFile) f = NULL; - g_autoptr(GFileInfo) file_info = NULL; + g_assert (root != NULL); + g_assert (arg != NULL); - f = g_file_resolve_relative_path (root, arg); - + g_autoptr(GFile) f = g_file_resolve_relative_path (root, arg); + if (f == NULL) + return glnx_throw (error, "Failed to resolve path '%s'", arg); + + g_autoptr(GFileInfo) file_info = NULL; file_info = g_file_query_info (f, OSTREE_GIO_FAST_QUERYINFO, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, error); - if (!file_info) - goto out; + if (file_info == NULL) + return FALSE; - print_one_file (f, file_info); + if (!print_one_file (f, file_info, cancellable, error)) + return FALSE; if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY) { if (opt_recursive) { - if (!print_directory_recurse (f, -1, error)) - goto out; + if (!print_directory_recurse (f, -1, cancellable, error)) + return FALSE; } else if (!opt_dironly) { - if (!print_directory_recurse (f, 1, error)) - goto out; + if (!print_directory_recurse (f, 1, cancellable, error)) + return FALSE; } } - ret = TRUE; - out: - return ret; + return TRUE; } gboolean @@ -244,7 +253,6 @@ ostree_builtin_ls (int argc, char **argv, OstreeCommandInvocation *invocation, G { g_autoptr(GOptionContext) context = NULL; g_autoptr(OstreeRepo) repo = NULL; - gboolean ret = FALSE; const char *rev; int i; g_autoptr(GFile) root = NULL; @@ -252,33 +260,31 @@ ostree_builtin_ls (int argc, char **argv, OstreeCommandInvocation *invocation, G context = g_option_context_new ("COMMIT [PATH...]"); if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error)) - goto out; + return FALSE; if (argc <= 1) { ot_util_usage_error (context, "An COMMIT argument is required", error); - goto out; + return FALSE; } rev = argv[1]; if (!ostree_repo_read_commit (repo, rev, &root, NULL, cancellable, error)) - goto out; + return FALSE; if (argc > 2) { for (i = 2; i < argc; i++) { if (!print_one_argument (repo, root, argv[i], cancellable, error)) - goto out; + return glnx_prefix_error (error, "Inspecting path '%s'", argv[i]); } } else { if (!print_one_argument (repo, root, "/", cancellable, error)) - goto out; + return FALSE; } - ret = TRUE; - out: - return ret; + return TRUE; } diff --git a/src/ostree/ot-builtin-prune.c b/src/ostree/ot-builtin-prune.c index d133bbd8..b2dd407a 100644 --- a/src/ostree/ot-builtin-prune.c +++ b/src/ostree/ot-builtin-prune.c @@ -35,6 +35,7 @@ static char *opt_delete_commit; static char *opt_keep_younger_than; static char **opt_retain_branch_depth; static char **opt_only_branches; +static gboolean opt_commit_only; /* ATTENTION: * Please remember to update the bash-completion script (bash/ostree) and @@ -50,6 +51,7 @@ static GOptionEntry options[] = { { "static-deltas-only", 0, 0, G_OPTION_ARG_NONE, &opt_static_deltas_only, "Change the behavior of delete-commit and keep-younger-than to prune only static deltas" }, { "retain-branch-depth", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_retain_branch_depth, "Additionally retain BRANCH=DEPTH commits", "BRANCH=DEPTH" }, { "only-branch", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_only_branches, "Only prune BRANCH (may be specified multiple times)", "BRANCH" }, + { "commit-only", 0, 0, G_OPTION_ARG_NONE, &opt_commit_only, "Only traverse and delete commit objects.", NULL }, { NULL } }; @@ -99,12 +101,15 @@ traverse_keep_younger_than (OstreeRepo *repo, const char *checksum, GCancellable *cancellable, GError **error) { g_autofree char *next_checksum = g_strdup (checksum); + OstreeRepoCommitTraverseFlags traverse_flags = OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE; + if (opt_commit_only) + traverse_flags |= OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY; /* This is the first commit in our loop, which has a ref pointing to it. We * don't want to auto-prune it. */ - if (!ostree_repo_traverse_commit_union (repo, checksum, 0, reachable, - cancellable, error)) + if (!ostree_repo_traverse_commit_with_flags (repo, traverse_flags, checksum, 0, reachable, + NULL, cancellable, error)) return FALSE; while (TRUE) @@ -121,8 +126,8 @@ traverse_keep_younger_than (OstreeRepo *repo, const char *checksum, if (commit_timestamp >= ts->tv_sec) { /* It's newer, traverse it */ - if (!ostree_repo_traverse_commit_union (repo, next_checksum, 0, reachable, - cancellable, error)) + if (!ostree_repo_traverse_commit_with_flags (repo, traverse_flags, next_checksum, 0, reachable, + NULL, cancellable, error)) return FALSE; g_free (next_checksum); @@ -183,6 +188,8 @@ ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation pruneflags |= OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY; if (opt_no_prune) pruneflags |= OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE; + if (opt_commit_only) + pruneflags |= OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY; /* If no newer more complex options are specified, drop down to the original * prune API - both to avoid code duplication, and to keep it run from the @@ -285,6 +292,10 @@ ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation /* Traverse each ref, and gather all objects pointed to by it up to a * specific depth (if configured). */ + OstreeRepoCommitTraverseFlags traverse_flags = OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE; + if (opt_commit_only) + /** We can avoid looking at all objects if --commit-only is specified **/ + traverse_flags |= OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY; g_hash_table_iter_init (&hash_iter, all_refs); while (g_hash_table_iter_next (&hash_iter, &key, &value)) { @@ -316,8 +327,8 @@ ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation the global default */ g_debug ("Finding objects to keep for commit %s", checksum); - if (!ostree_repo_traverse_commit_union (repo, checksum, depth, reachable, - cancellable, error)) + if (!ostree_repo_traverse_commit_with_flags (repo, traverse_flags, checksum, depth, reachable, + NULL, cancellable, error)) return FALSE; } @@ -333,7 +344,10 @@ ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation } g_autofree char *formatted_freed_size = g_format_size_full (objsize_total, 0); - g_print ("Total objects: %u\n", n_objects_total); + if (opt_commit_only) + g_print("Total (commit only) objects: %u\n", n_objects_total); + else + g_print ("Total objects: %u\n", n_objects_total); if (n_objects_pruned == 0) g_print ("No unreachable objects\n"); else if (pruneflags & OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE) diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c index b874db0f..509eb792 100644 --- a/src/ostree/ot-dump.c +++ b/src/ostree/ot-dump.c @@ -249,6 +249,11 @@ dump_summary_ref (const char *collection_id, pretty_key = "Timestamp"; value_str = uint64_secs_to_iso8601 (GUINT64_FROM_BE (g_variant_get_uint64 (value))); } + else if (g_strcmp0 (key, OSTREE_COMMIT_VERSION) == 0) + { + pretty_key = "Version"; + value_str = g_strdup (g_variant_get_string (value, NULL)); + } else { value_str = g_variant_print (value, FALSE); diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index 8ee73038..b7b50d67 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -41,6 +41,10 @@ static gboolean opt_verbose; static gboolean opt_version; static gboolean opt_print_current_dir; +// TODO: make this public? But no one sane wants to use our C headers +// to find where to put files. Maybe we can make it printed by the CLI? +#define _OSTREE_EXT_DIR PKGLIBEXECDIR "/ext" + static GOptionEntry global_entries[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL }, { "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, "Print version information and exit", NULL }, @@ -116,7 +120,7 @@ maybe_setup_mount_namespace (gboolean *out_ns, return TRUE; /* If the system isn't booted via libostree, also nothing to do */ - if (!glnx_fstatat_allow_noent (AT_FDCWD, "/run/ostree-booted", NULL, 0, error)) + if (!glnx_fstatat_allow_noent (AT_FDCWD, OSTREE_PATH_BOOTED, NULL, 0, error)) return FALSE; if (errno == ENOENT) return TRUE; @@ -188,7 +192,7 @@ ostree_command_lookup_external (int argc, // Find the first verb (ignoring all earlier flags), then // check if it is a known native command. Otherwise, try to look it - // up in $PATH. + // up in /usr/lib/ostree/ostree-$cmd or $PATH. // We ignore argv[0] here, the ostree binary itself is not multicall. for (guint arg_index = 1; arg_index < argc; arg_index++) { @@ -204,10 +208,18 @@ ostree_command_lookup_external (int argc, return NULL; } + g_autofree gchar *ext_command = g_strdup_printf ("ostree-%s", current_arg); + + /* First, search in our libdir /usr/lib/ostree/ostree-$cmd */ + g_autofree char *ext_lib = g_strconcat (_OSTREE_EXT_DIR, "/", ext_command, NULL); + struct stat stbuf; + if (stat (ext_lib, &stbuf) == 0) + return g_steal_pointer (&ext_lib); + + /* Otherwise, look in $PATH */ if (g_find_program_in_path (ext_command) == NULL) return NULL; - return g_steal_pointer (&ext_command); } @@ -253,7 +265,11 @@ ostree_run (int argc, int in, out; /* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */ - g_setenv ("GIO_USE_VFS", "local", TRUE); + if (!g_setenv ("GIO_USE_VFS", "local", TRUE)) + { + (void) glnx_throw (res_error, "Failed to set environment variable GIO_USE_FVS"); + return 1; + } g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, message_handler, NULL); diff --git a/tests/fixtures/bare-split-xattrs/basic.tar.xz b/tests/fixtures/bare-split-xattrs/basic.tar.xz new file mode 100644 index 00000000..cec6717e Binary files /dev/null and b/tests/fixtures/bare-split-xattrs/basic.tar.xz differ diff --git a/tests/libostreetest.c b/tests/libostreetest.c index d5671a1e..08abb9f1 100644 --- a/tests/libostreetest.c +++ b/tests/libostreetest.c @@ -155,7 +155,8 @@ ot_test_setup_sysroot (GCancellable *cancellable, } /* Make sure deployments are mutable */ - g_setenv ("OSTREE_SYSROOT_DEBUG", buf->str, TRUE); + if (!g_setenv ("OSTREE_SYSROOT_DEBUG", buf->str, TRUE)) + return glnx_null_throw (error, "Failed to set environment variable OSTREE_SYSROOT_DEBUG"); g_autoptr(GFile) sysroot_path = g_file_new_for_path ("sysroot"); return ostree_sysroot_new (sysroot_path); diff --git a/tests/test-basic-bare-split-xattrs.sh b/tests/test-basic-bare-split-xattrs.sh new file mode 100755 index 00000000..ac8ebffd --- /dev/null +++ b/tests/test-basic-bare-split-xattrs.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# +# SPDX-License-Identifier: LGPL-2.0+ + +set -euo pipefail + +. $(dirname $0)/libtest.sh + +mode="bare-split-xattrs" +OSTREE="${CMD_PREFIX} ostree --repo=${test_tmpdir}/repo" + +SUDO="sudo --non-interactive" +PRIVILEGED="false" +if [ $(id -u) -eq 0 ]; then + PRIVILEGED="true" + SUDO="" +elif $(${SUDO} -v); then + PRIVILEGED="true" +fi + +cd ${test_tmpdir} +${OSTREE} init --mode "${mode}" +${OSTREE} config get core.mode > mode.txt +assert_file_has_content mode.txt "${mode}" +tap_ok "repo init" +rm -rf -- repo mode.txt + +cd ${test_tmpdir} +${OSTREE} init --mode "${mode}" +${OSTREE} fsck --all +tap_ok "repo fsck" +rm -rf -- repo + +cd ${test_tmpdir} +mkdir -p "${test_tmpdir}/files" +touch files/foo +${OSTREE} init --mode "${mode}" +if ${OSTREE} commit --orphan -m "not implemented" files; then + assert_not_reached "commit to bare-split-xattrs should have failed" +fi +${OSTREE} fsck --all +tap_ok "commit not implemented" +rm -rf -- repo files + +cd ${test_tmpdir} +mkdir -p "${test_tmpdir}/files" +touch files/foo +${OSTREE} init --mode "${mode}" +OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS=true ${OSTREE} commit --orphan -m "experimental" files +if ${OSTREE} fsck --all; then + assert_not_reached "fsck should have failed" +fi +tap_ok "commit exp override" +rm -rf -- repo files + +if [ "${PRIVILEGED}" = "true" ]; then + COMMIT="d614c428015227259031b0f19b934dade908942fd71c49047e0daa70e7800a5d" + cd ${test_tmpdir} + ${SUDO} tar --same-permissions --same-owner -xaf ${test_srcdir}/fixtures/bare-split-xattrs/basic.tar.xz + ${SUDO} ${OSTREE} fsck --all + ${OSTREE} log ${COMMIT} > out.txt + assert_file_has_content_literal out.txt "fixtures: bare-split-xattrs repo" + ${OSTREE} ls ${COMMIT} -X /foo > out.txt + assert_file_has_content_literal out.txt "{ @a(ayay) [] } /foo" + ${OSTREE} ls ${COMMIT} -X /bar > out.txt + assert_file_has_content_literal out.txt "{ [(b'user.mykey', [byte 0x6d, 0x79, 0x76, 0x61, 0x6c, 0x75, 0x65])] } /bar" + ${OSTREE} ls ${COMMIT} /foolink > out.txt + assert_file_has_content_literal out.txt "/foolink -> foo" + tap_ok "reading simple fixture" + ${SUDO} rm -rf -- repo log.txt +else + tap_ok "reading simple fixture # skip Unable to sudo" +fi + +tap_end diff --git a/tests/test-basic-user-only.sh b/tests/test-basic-user-only.sh index 368abf0d..f6e8606d 100755 --- a/tests/test-basic-user-only.sh +++ b/tests/test-basic-user-only.sh @@ -23,7 +23,7 @@ set -euo pipefail mode="bare-user-only" setup_test_repository "$mode" -extra_basic_tests=6 +extra_basic_tests=7 . $(dirname $0)/basic-test.sh $CMD_PREFIX ostree --version > version.yaml @@ -54,6 +54,17 @@ fi assert_file_has_content err.txt "Content object.*invalid mode.*with bits 040.*" echo "ok failed to commit suid" +cd ${test_tmpdir} +rm repo-input -rf +ostree_repo_init repo-input init --mode=archive +rm files -rf && mkdir files +if $CMD_PREFIX ostree --repo=repo-input commit -b metadata --tree=dir=files --add-metadata-string='=FOO' 2>err.txt; then + assert_not_reached "committed an empty metadata key" +fi +assert_file_has_content err.txt "Empty metadata key" +$CMD_PREFIX ostree --repo=repo-input commit -b metadata --tree=dir=files --add-metadata-string='FOO=' +echo "ok rejected invalid metadata" + cd ${test_tmpdir} rm repo-input -rf ostree_repo_init repo-input init --mode=archive diff --git a/tests/test-cli-extensions.sh b/tests/test-cli-extensions.sh index 1fe9c037..e1916036 100755 --- a/tests/test-cli-extensions.sh +++ b/tests/test-cli-extensions.sh @@ -9,6 +9,9 @@ set -euo pipefail echo '1..2' +# Test CLI extensions via $PATH. If you change this, you may +# also want to change the corresponding destructive version in +# tests/kolainst/destructive/basic-misc.sh mkdir -p ./localbin ORIG_PATH="${PATH}" export PATH="./localbin/:${PATH}" diff --git a/tests/test-gpg-verify-result.c b/tests/test-gpg-verify-result.c index d49224ec..8485b888 100644 --- a/tests/test-gpg-verify-result.c +++ b/tests/test-gpg-verify-result.c @@ -78,7 +78,8 @@ test_fixture_setup (TestFixture *fixture, * certificates for certain test cases. */ homedir = g_test_build_filename (G_TEST_DIST, "tests/gpg-verify-data", NULL); - g_setenv ("GNUPGHOME", homedir, TRUE); + gboolean is_ok = g_setenv ("GNUPGHOME", homedir, TRUE); + g_assert (is_ok == TRUE); result = g_initable_new (OSTREE_TYPE_GPG_VERIFY_RESULT, NULL, &local_error, NULL); diff --git a/tests/test-prune.sh b/tests/test-prune.sh index e33ab1e7..20904f31 100755 --- a/tests/test-prune.sh +++ b/tests/test-prune.sh @@ -25,8 +25,6 @@ skip_without_user_xattrs setup_fake_remote_repo1 "archive" -echo '1..12' - cd ${test_tmpdir} mkdir repo ostree_repo_init repo @@ -50,6 +48,12 @@ assert_repo_has_n_commits() { assert_streq "$(find ${repo}/objects -name '*.commit' | wc -l)" "${count}" } +assert_repo_has_n_non_commit_objects() { + repo=$1 + count=$2 + assert_streq "$(find ${repo}/objects -name '*.*' ! -name '*.commit' ! -name '*.tombstone-commit'| wc -l)" "${count}" +} + # Test --no-prune objectcount_orig=$(find repo/objects | wc -l) ${CMD_PREFIX} ostree prune --repo=repo --refs-only --depth=0 --no-prune | tee noprune.txt @@ -144,7 +148,7 @@ if ${CMD_PREFIX} ostree --repo=repo prune --static-deltas-only --keep-younger-th fi assert_file_has_content_literal err.txt "--static-deltas-only requires --delete-commit" -echo "ok prune" +tap_ok prune rm repo -rf ostree_repo_init repo --mode=bare-user @@ -152,7 +156,7 @@ ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat ${CMD_PREFIX} ostree --repo=repo pull --depth=-1 --commit-metadata-only origin test ${CMD_PREFIX} ostree --repo=repo prune -echo "ok prune with partial repo" +tap_ok prune with partial repo assert_has_n_objects() { find $1/objects -name '*.filez' | wc -l > object-count @@ -188,7 +192,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --delete test ${CMD_PREFIX} ostree --repo=child-repo prune --refs-only --depth=0 assert_has_n_objects child-repo 3 -echo "ok prune with parent repo" +tap_ok prune with parent repo # Delete all the above since I can't be bothered to think about how new tests # would interact. We make a new repo test suite, then clone it @@ -233,7 +237,7 @@ $OSTREE fsck ${CMD_PREFIX} ostree --repo=repo prune --keep-younger-than="1 week ago" --retain-branch-depth=stable=5 assert_repo_has_n_commits repo 9 $OSTREE fsck -echo "ok retain branch depth and keep-younger-than" +tap_ok retain branch depth and keep-younger-than # Just stable branch ref, we should prune everything except the tip of dev, # so 8 stable + 1 dev = 9 @@ -242,7 +246,7 @@ ${CMD_PREFIX} ostree --repo=repo prune --depth=0 --retain-branch-depth=stable=-1 assert_repo_has_n_commits repo 9 $OSTREE fsck -echo "ok retain branch depth (alone)" +tap_ok retain branch depth [alone] # Test --only-branch with --depth=0; this should be exactly identical to the # above with a result of 9. @@ -250,13 +254,13 @@ reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=dev --depth=0 assert_repo_has_n_commits repo 9 $OSTREE fsck -echo "ok --only-branch --depth=0" +tap_ok --only-branch --depth=0 # Test --only-branch with --depth=1; should just add 1 to the above, for 10. reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=dev --depth=1 assert_repo_has_n_commits repo 10 -echo "ok --only-branch --depth=1" +tap_ok --only-branch --depth=1 # Test --only-branch with all branches reinitialize_datesnap_repo @@ -265,27 +269,27 @@ assert_repo_has_n_commits repo 2 reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=dev --only-branch=stable --depth=1 assert_repo_has_n_commits repo 4 -echo "ok --only-branch (all) --depth=1" +tap_ok --only-branch [all] --depth=1 # Test --only-branch and --retain-branch-depth overlap reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=dev --only-branch=stable --depth=0 \ --retain-branch-depth=stable=2 assert_repo_has_n_commits repo 4 -echo "ok --only-branch and --retain-branch-depth overlap" +tap_ok --only-branch and --retain-branch-depth overlap # Test --only-branch and --retain-branch-depth together reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=dev --depth=0 --retain-branch-depth=stable=2 assert_repo_has_n_commits repo 4 -echo "ok --only-branch and --retain-branch-depth together" +tap_ok --only-branch and --retain-branch-depth together # Test --only-branch with --keep-younger-than; this should be identical to the test # above for --retain-branch-depth=stable=-1 reinitialize_datesnap_repo ${CMD_PREFIX} ostree --repo=repo prune --only-branch=stable --keep-younger-than="1 week ago" assert_repo_has_n_commits repo 11 -echo "ok --only-branch --keep-younger-than" +tap_ok --only-branch --keep-younger-than # Test --only-branch with a nonexistent ref reinitialize_datesnap_repo @@ -293,4 +297,70 @@ if ${CMD_PREFIX} ostree --repo=repo prune --only-branch=BACON 2>err.txt; then fatal "we pruned BACON?" fi assert_file_has_content err.txt "Refspec.*BACON.*not found" -echo "ok --only-branch=BACON" +tap_ok --only-branch=BACON + +# We will use the same principle as datesnap repo +# to create a snapshot to test --commit-only +rm -rf commit-only-test-repo +ostree_repo_init commit-only-test-repo --mode=archive +# Older commits w/ content objects +echo 'message' > tree/file.txt +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=stable -m test -s "new stable build 1" tree --timestamp="October 15 1985" +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=dev -m test -s "new dev build 1" tree --timestamp="October 15 1985" +# Commits without any content objects +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=stable -m test -s "new stable build 2" tree +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=dev -m test -s "new dev build 2" tree +# Commits with content objects +echo 'message2' > tree/file2.txt +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=stable -m test -s "new stable build 2" tree +${CMD_PREFIX} ostree --repo=commit-only-test-repo commit --branch=dev -m test -s "new dev build 2" tree +assert_repo_has_n_commits commit-only-test-repo 6 +reinitialize_commit_only_test_repo() { + rm repo -rf + ostree_repo_init repo --mode=archive + ${CMD_PREFIX} ostree --repo=repo pull-local --depth=-1 commit-only-test-repo +} +orig_obj_count=$(find commit-only-test-repo/objects -name '*.*' ! -name '*.commit' | wc -l) + +# --commit-only tests +# Test single branch +reinitialize_commit_only_test_repo +${CMD_PREFIX} ostree --repo=repo prune --commit-only --only-branch=dev --depth=0 +assert_repo_has_n_commits repo 4 +assert_repo_has_n_non_commit_objects repo ${orig_obj_count} +tap_ok --commit-only and --only-branch + +# Test multiple branches (and depth > 0) +reinitialize_commit_only_test_repo +${CMD_PREFIX} ostree --repo=repo prune --commit-only --refs-only --depth=1 +assert_repo_has_n_commits repo 4 +assert_repo_has_n_non_commit_objects repo ${orig_obj_count} +tap_ok --commit-only and multiple branches depth=1 + +# Test --delete-commit with --commit-only +reinitialize_commit_only_test_repo +# this commit does not have a parent commit +COMMIT_TO_DELETE=$(${CMD_PREFIX} ostree --repo=repo log dev | grep ^commit | cut -f 2 -d' ' | tail -n 1) +${CMD_PREFIX} ostree --repo=repo prune --commit-only --delete-commit=$COMMIT_TO_DELETE +assert_repo_has_n_commits repo 5 +# We gain an extra +assert_repo_has_n_non_commit_objects repo ${orig_obj_count} +tap_ok --commit-only and --delete-commit + +# Test --delete-commit when it creates orphaned commits +reinitialize_commit_only_test_repo +# get the current HEAD's parent on dev branch +COMMIT_TO_DELETE=$(${CMD_PREFIX} ostree --repo=repo log dev | grep ^commit | cut -f 2 -d' ' | head -n 2 | tail -n 1) +${CMD_PREFIX} ostree --repo=repo prune --commit-only --refs-only --delete-commit=$COMMIT_TO_DELETE +# we deleted a commit that orphaned another, so we lose two commits +assert_repo_has_n_commits repo 4 +assert_repo_has_n_non_commit_objects repo ${orig_obj_count} +tap_ok --commit-only and --delete-commit with orphaned commits + +# Test --keep-younger-than with --commit-only +reinitialize_commit_only_test_repo +${CMD_PREFIX} ostree --repo=repo prune --commit-only --keep-younger-than="1 week ago" +assert_repo_has_n_commits repo 4 +assert_repo_has_n_non_commit_objects repo ${orig_obj_count} +tap_ok --commit-only and --keep-younger-than +tap_end diff --git a/tests/test-rollsum-cli.c b/tests/test-rollsum-cli.c index 44e3390c..2cf730d3 100644 --- a/tests/test-rollsum-cli.c +++ b/tests/test-rollsum-cli.c @@ -35,7 +35,8 @@ main (int argc, char **argv) OstreeRollsumMatches *matches; GMappedFile *mfile; - g_setenv ("GIO_USE_VFS", "local", TRUE); + gboolean is_ok = g_setenv ("GIO_USE_VFS", "local", TRUE); + g_assert (is_ok == TRUE); if (argc < 3) return 1; diff --git a/tests/test-summary-view.sh b/tests/test-summary-view.sh index 088628d8..9dfc74f4 100755 --- a/tests/test-summary-view.sh +++ b/tests/test-summary-view.sh @@ -56,6 +56,7 @@ assert_file_has_content_literal summary.txt "* main" assert_file_has_content_literal summary.txt "* other" assert_file_has_content_literal summary.txt "ostree.summary.last-modified" assert_file_has_content_literal summary.txt "Timestamp (ostree.commit.timestamp): " +assert_file_has_content_literal summary.txt "Version (ostree.commit.version): 3.2" echo "ok view summary" # Check the summary can be viewed raw too. diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 18e13e9f..76e63ba1 100755 --- a/tests/test-symbols.sh +++ b/tests/test-symbols.sh @@ -54,7 +54,7 @@ echo 'ok documented symbols' # ONLY update this checksum in release commits! cat > released-sha256.txt <