diff --git a/Makefile-boot.am b/Makefile-boot.am index b4d4a1af..b51928f0 100644 --- a/Makefile-boot.am +++ b/Makefile-boot.am @@ -60,7 +60,7 @@ grub2configdir = $(sysconfdir)/grub.d INSTALL_DATA_HOOKS += install-grub2-config-hook else # We're using our internal generator -ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator +ostree_boot_SCRIPTS += src/boot/grub2/ostree-grub-generator endif EXTRA_DIST += src/boot/dracut/module-setup.sh \ diff --git a/Makefile-decls.am b/Makefile-decls.am index 115c19fb..086ee138 100644 --- a/Makefile-decls.am +++ b/Makefile-decls.am @@ -47,6 +47,7 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = gsettings_SCHEMAS = ostree_bootdir = $(prefix)/lib/ostree +ostree_boot_SCRIPTS = ostree_boot_PROGRAMS = # This initializes some more variables diff --git a/Makefile-ostree.am b/Makefile-ostree.am index 76f39cad..f861afe4 100644 --- a/Makefile-ostree.am +++ b/Makefile-ostree.am @@ -123,6 +123,7 @@ ostree_SOURCES += src/ostree/ot-remote-builtin-add-cookie.c \ endif src/ostree/parse-datetime.c: src/ostree/parse-datetime.y Makefile + mkdir -p src/ostree/ $(AM_V_GEN) $(YACC) $< -o $@ EXTRA_DIST += src/ostree/parse-datetime.y diff --git a/Makefile-switchroot.am b/Makefile-switchroot.am index ff44d4bc..b81b843f 100644 --- a/Makefile-switchroot.am +++ b/Makefile-switchroot.am @@ -42,7 +42,7 @@ if BUILDOPT_USE_STATIC_COMPILER # to get autotools to install this as an executable but without generating rules # to make it itself which we have specified manually. See # https://lists.gnu.org/archive/html/help-gnu-utils/2007-01/msg00007.html -ostree_boot_SCRIPTS = ostree-prepare-root +ostree_boot_SCRIPTS += ostree-prepare-root ostree-prepare-root : $(ostree_prepare_root_SOURCES) $(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(ostree_prepare_root_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) -DOSTREE_PREPARE_ROOT_STATIC=1 diff --git a/Makefile-tests.am b/Makefile-tests.am index f5a65278..fc2f2d91 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -84,6 +84,7 @@ _installed_or_uninstalled_test_scripts = \ tests/test-pull-metalink.sh \ tests/test-pull-summary-sigs.sh \ tests/test-pull-resume.sh \ + tests/test-pull-basicauth.sh \ tests/test-pull-repeated.sh \ tests/test-pull-untrusted.sh \ tests/test-pull-override-url.sh \ diff --git a/Makefile.in b/Makefile.in index 7e04837f..0855556d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -528,63 +528,77 @@ check_PROGRAMS = $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) # It is built anyway as a side-effect of having the symlink in tests/, # and if we declare it here, it gets cleaned up properly @BUILDOPT_SYSTEMD_FALSE@am__append_62 = ostree-remount -@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_63 = ostree-prepare-root -@BUILDOPT_SYSTEMD_TRUE@am__append_64 = -DHAVE_SYSTEMD=1 + +# ostree-prepare-root can be used as init in a system without a populated /lib. +# To support this use case we need to link statically as we will be unable to +# locate libc.so at run time if it's not installed in /lib. +# +# We support building ostree-prepare-root with a different compiler to the rest +# of ostree so we can use musl rather than glibc. This reduces the size of the +# executable significantly: from ~700K -> ~30K. We have to use _SCRIPTS here +# to get autotools to install this as an executable but without generating rules +# to make it itself which we have specified manually. See +# https://lists.gnu.org/archive/html/help-gnu-utils/2007-01/msg00007.html +@BUILDOPT_USE_STATIC_COMPILER_TRUE@am__append_63 = ostree-prepare-root +@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_64 = ostree-prepare-root +@BUILDOPT_SYSTEMD_TRUE@am__append_65 = -DHAVE_SYSTEMD=1 # This is the "new mode" of using a generator for /var; see # https://github.com/ostreedev/ostree/issues/855 -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_65 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_66 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_67 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1 @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT) -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_67 = $(systemdsystemgenerator_PROGRAMS) +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_68 = $(systemdsystemgenerator_PROGRAMS) # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_68 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators' -@BUILDOPT_FUSE_TRUE@am__append_69 = rofiles-fuse -@BUILDOPT_ASAN_TRUE@am__append_70 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc -@USE_GPGME_TRUE@am__append_71 = \ +@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_69 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators' +@BUILDOPT_FUSE_TRUE@am__append_70 = rofiles-fuse +@BUILDOPT_ASAN_TRUE@am__append_71 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc +@USE_GPGME_TRUE@am__append_72 = \ @USE_GPGME_TRUE@ tests/test-remote-gpg-import.sh \ @USE_GPGME_TRUE@ tests/test-gpg-signed-commit.sh \ @USE_GPGME_TRUE@ tests/test-admin-gpg.sh \ @USE_GPGME_TRUE@ $(NULL) -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_72 = $(experimental_test_scripts) -@ENABLE_EXPERIMENTAL_API_FALSE@am__append_73 = $(experimental_test_scripts) -@BUILDOPT_FUSE_TRUE@am__append_74 = tests/test-rofiles-fuse.sh -@BUILDOPT_FUSE_TRUE@am__append_75 = tests/rofiles-fuse-symlink-stamp -@BUILDOPT_FUSE_FALSE@am__append_76 = tests/test-rofiles-fuse.sh -@USE_LIBSOUP_TRUE@am__append_77 = tests/test-remote-cookies.sh -@BUILDOPT_GJS_TRUE@am__append_78 = $(js_tests) $(js_installed_tests) -@BUILDOPT_GJS_FALSE@am__append_79 = $(js_tests) -@BUILDOPT_GJS_FALSE@am__append_80 = $(js_installed_tests) -@ENABLE_INSTALLED_TESTS_FALSE@am__append_81 = -rpath $(abs_builddir) -@USE_GPGME_TRUE@am__append_82 = \ +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_73 = $(experimental_test_scripts) +@ENABLE_EXPERIMENTAL_API_FALSE@am__append_74 = $(experimental_test_scripts) +@BUILDOPT_FUSE_TRUE@am__append_75 = tests/test-rofiles-fuse.sh +@BUILDOPT_FUSE_TRUE@am__append_76 = tests/rofiles-fuse-symlink-stamp +@BUILDOPT_FUSE_FALSE@am__append_77 = tests/test-rofiles-fuse.sh +@USE_LIBSOUP_TRUE@am__append_78 = tests/test-remote-cookies.sh +@BUILDOPT_GJS_TRUE@am__append_79 = $(js_tests) $(js_installed_tests) +@BUILDOPT_GJS_FALSE@am__append_80 = $(js_tests) +@BUILDOPT_GJS_FALSE@am__append_81 = $(js_installed_tests) +@ENABLE_INSTALLED_TESTS_FALSE@am__append_82 = -rpath $(abs_builddir) +@USE_GPGME_TRUE@am__append_83 = \ @USE_GPGME_TRUE@ tests/test-gpg-verify-result \ @USE_GPGME_TRUE@ $(NULL) -@USE_AVAHI_TRUE@am__append_83 = tests/test-repo-finder-avahi -@USE_LIBARCHIVE_TRUE@am__append_84 = tests/test-libarchive-import -@USE_GPGME_TRUE@am__append_85 = \ +@USE_AVAHI_TRUE@am__append_84 = tests/test-repo-finder-avahi +@USE_LIBARCHIVE_TRUE@am__append_85 = tests/test-libarchive-import +@USE_GPGME_TRUE@am__append_86 = \ @USE_GPGME_TRUE@ tests/gpg-verify-data/README.md \ @USE_GPGME_TRUE@ $(NULL) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_86 = $(_installed_or_uninstalled_test_scripts) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_87 = $(_installed_or_uninstalled_test_programs) -@ENABLE_INSTALLED_TESTS_TRUE@am__append_88 = install-installed-tests-extra +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_87 = $(_installed_or_uninstalled_test_scripts) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_88 = $(_installed_or_uninstalled_test_programs) +@ENABLE_INSTALLED_TESTS_TRUE@am__append_89 = install-installed-tests-extra # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_TRUE@am__append_89 = --with-systemdsystemunitdir='$${libdir}/systemd/system' +@BUILDOPT_SYSTEMD_TRUE@am__append_90 = --with-systemdsystemunitdir='$${libdir}/systemd/system' # We're using the system grub2-mkconfig generator -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_90 = src/boot/grub2/grub2-15_ostree -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_91 = install-grub2-config-hook -@ENABLE_MAN_TRUE@@USE_LIBSOUP_TRUE@am__append_92 = ostree-trivial-httpd.1 +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_91 = src/boot/grub2/grub2-15_ostree +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_92 = install-grub2-config-hook +# We're using our internal generator +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@am__append_93 = src/boot/grub2/ostree-grub-generator +@ENABLE_MAN_TRUE@@USE_LIBSOUP_TRUE@am__append_94 = ostree-trivial-httpd.1 # We still want to distribute the source, even if we are not building it -@ENABLE_MAN_TRUE@@USE_LIBSOUP_FALSE@am__append_93 = man/ostree-trivial-httpd.xml -@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_94 = rofiles-fuse.1 -@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_95 = ostree-gpg-sign.1 -@ENABLE_MAN_TRUE@am__append_96 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) -@ENABLE_MAN_TRUE@am__append_97 = \ +@ENABLE_MAN_TRUE@@USE_LIBSOUP_FALSE@am__append_95 = man/ostree-trivial-httpd.xml +@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_96 = rofiles-fuse.1 +@ENABLE_MAN_TRUE@@USE_GPGME_TRUE@am__append_97 = ostree-gpg-sign.1 +@ENABLE_MAN_TRUE@am__append_98 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) +@ENABLE_MAN_TRUE@am__append_99 = \ @ENABLE_MAN_TRUE@ $(man1_MANS) \ @ENABLE_MAN_TRUE@ $(man5_MANS) \ @ENABLE_MAN_TRUE@ $(NULL) @@ -1185,14 +1199,19 @@ rofiles_fuse_OBJECTS = $(am_rofiles_fuse_OBJECTS) rofiles_fuse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rofiles_fuse_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_test_libglnx_errors_OBJECTS = libglnx/tests/test_libglnx_errors-test-libglnx-errors.$(OBJEXT) +am__objects_19 = \ + libglnx/tests/test_libglnx_errors-libglnx-testlib.$(OBJEXT) +am_test_libglnx_errors_OBJECTS = $(am__objects_19) \ + libglnx/tests/test_libglnx_errors-test-libglnx-errors.$(OBJEXT) test_libglnx_errors_OBJECTS = $(am_test_libglnx_errors_OBJECTS) test_libglnx_errors_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la test_libglnx_errors_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_errors_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am_test_libglnx_fdio_OBJECTS = \ +am__objects_20 = \ + libglnx/tests/test_libglnx_fdio-libglnx-testlib.$(OBJEXT) +am_test_libglnx_fdio_OBJECTS = $(am__objects_20) \ libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.$(OBJEXT) test_libglnx_fdio_OBJECTS = $(am_test_libglnx_fdio_OBJECTS) test_libglnx_fdio_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la @@ -1200,21 +1219,30 @@ test_libglnx_fdio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_fdio_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ -am_test_libglnx_macros_OBJECTS = libglnx/tests/test_libglnx_macros-test-libglnx-macros.$(OBJEXT) +am__objects_21 = \ + libglnx/tests/test_libglnx_macros-libglnx-testlib.$(OBJEXT) +am_test_libglnx_macros_OBJECTS = $(am__objects_21) \ + libglnx/tests/test_libglnx_macros-test-libglnx-macros.$(OBJEXT) test_libglnx_macros_OBJECTS = $(am_test_libglnx_macros_OBJECTS) test_libglnx_macros_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la test_libglnx_macros_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_macros_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am_test_libglnx_shutil_OBJECTS = libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.$(OBJEXT) +am__objects_22 = \ + libglnx/tests/test_libglnx_shutil-libglnx-testlib.$(OBJEXT) +am_test_libglnx_shutil_OBJECTS = $(am__objects_22) \ + libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.$(OBJEXT) test_libglnx_shutil_OBJECTS = $(am_test_libglnx_shutil_OBJECTS) test_libglnx_shutil_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la test_libglnx_shutil_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_libglnx_shutil_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am_test_libglnx_xattrs_OBJECTS = libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.$(OBJEXT) +am__objects_23 = \ + libglnx/tests/test_libglnx_xattrs-libglnx-testlib.$(OBJEXT) +am_test_libglnx_xattrs_OBJECTS = $(am__objects_23) \ + libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.$(OBJEXT) test_libglnx_xattrs_OBJECTS = $(am_test_libglnx_xattrs_OBJECTS) test_libglnx_xattrs_DEPENDENCIES = $(am__DEPENDENCIES_2) libglnx.la test_libglnx_xattrs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -1475,10 +1503,15 @@ am__depfiles_remade = bsdiff/$(DEPDIR)/libbsdiff_la-bsdiff.Plo \ libglnx/$(DEPDIR)/la-glnx-lockfile.Plo \ libglnx/$(DEPDIR)/la-glnx-shutil.Plo \ libglnx/$(DEPDIR)/la-glnx-xattrs.Plo \ + libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po \ libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Po \ + libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po \ libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Po \ + libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po \ libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Po \ + libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po \ libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Po \ + libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po \ libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Po \ src/libostree/$(DEPDIR)/bupsplit.Plo \ src/libostree/$(DEPDIR)/libostree_1_la-ostree-async-progress.Plo \ @@ -1975,9 +2008,10 @@ am__EXEEXT_25 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-pull-mirror-summary.sh \ tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \ tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \ - tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ - tests/test-pull-override-url.sh tests/test-pull-localcache.sh \ - tests/test-local-pull.sh tests/test-local-pull-depth.sh \ + tests/test-pull-basicauth.sh tests/test-pull-repeated.sh \ + tests/test-pull-untrusted.sh tests/test-pull-override-url.sh \ + tests/test-pull-localcache.sh tests/test-local-pull.sh \ + tests/test-local-pull-depth.sh \ tests/test-admin-upgrade-unconfigured.sh \ tests/test-admin-upgrade-endoflife.sh \ tests/test-admin-upgrade-systemd-update.sh \ @@ -2010,7 +2044,7 @@ am__EXEEXT_25 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-summary-collections.sh \ tests/test-pull-collections.sh tests/test-config.sh \ $(am__EXEEXT_2) $(am__EXEEXT_20) $(am__EXEEXT_22) \ - $(am__append_74) $(am__append_77) $(am__EXEEXT_24) + $(am__append_75) $(am__append_78) $(am__EXEEXT_24) @ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_26 = \ @ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_25) am__EXEEXT_27 = $(am__EXEEXT_2) $(am__EXEEXT_26) @@ -2309,8 +2343,8 @@ AM_CFLAGS = -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS) # Allow the distcheck install under $prefix test to pass AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \ - --disable-maintainer-mode $(NULL) $(am__append_68) \ - $(am__append_89) \ + --disable-maintainer-mode $(NULL) $(am__append_69) \ + $(am__append_90) \ BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions' SUBDIRS = . $(am__append_14) NULL = @@ -2323,7 +2357,7 @@ CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_50) \ tests/ostree-remount-symlink-stamp \ tests/rofiles-fuse-symlink-stamp tests/ostree \ tests/ostree-prepare-root tests/ostree-remount \ - tests/rofiles-fuse $(am__append_97) + tests/rofiles-fuse $(am__append_99) EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ COPYING README.md $(am__append_15) libglnx/README.md \ libglnx/COPYING libglnx/libglnx.m4 $(NULL) \ @@ -2339,9 +2373,9 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ src/libostree/ostree-repo-deprecated.h \ src/libostree/ostree-version.h src/ostree/parse-datetime.y \ buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \ - tests/ostree.supp $(NULL) $(am__append_73) $(am__append_76) \ - $(am__append_79) tests/libtest.sh $(am__append_80) \ - $(am__append_85) tests/libostreetest.h tests/libtest.sh \ + tests/ostree.supp $(NULL) $(am__append_74) $(am__append_77) \ + $(am__append_80) tests/libtest.sh $(am__append_81) \ + $(am__append_86) tests/libostreetest.h tests/libtest.sh \ $(NULL) src/boot/dracut/module-setup.sh \ src/boot/dracut/ostree.conf src/boot/mkinitcpio/ostree \ src/boot/ostree-prepare-root.service \ @@ -2349,11 +2383,11 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ src/boot/ostree-remount.service \ src/boot/ostree-finalize-staged.service \ src/boot/grub2/grub2-15_ostree \ - src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_93) \ - $(am__append_96) + src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_95) \ + $(am__append_98) bin_SCRIPTS = lib_LTLIBRARIES = libostree-1.la -pkglibexec_SCRIPTS = $(am__append_90) +pkglibexec_SCRIPTS = $(am__append_91) noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \ libotutil.la $(am__append_18) libostreetest.la privlibdir = $(pkglibdir) @@ -2367,6 +2401,7 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(am__append_49) gsettings_SCHEMAS = ostree_bootdir = $(prefix)/lib/ostree +ostree_boot_SCRIPTS = $(am__append_63) $(am__append_93) # We should probably consider flipping the default for DEBUG. Also, # include the builddir in $PATH so we find our just-built ostree @@ -2383,7 +2418,7 @@ AM_TESTS_ENVIRONMENT = G_TEST_SRCDIR="$(abs_srcdir)" \ pwd)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}} PATH=$$(cd \ $(top_builddir)/tests && pwd):$${PATH} \ OSTREE_FEATURES="$(OSTREE_FEATURES)" PYTHONUNBUFFERED=1 \ - $(NULL) $(am__append_70) + $(NULL) $(am__append_71) LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/buildutil/tap-driver.sh LOG_COMPILER = $(top_srcdir)/buildutil/tap-test installed_test_LTLIBRARIES = $(am__append_12) @@ -2423,14 +2458,14 @@ all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installe # This initializes some more variables # This is a special facility to chain together hooks easily -INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_88) \ - $(am__append_91) +INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_89) \ + $(am__append_92) ALL_LOCAL_RULES = tests/libreaddir-rand.so shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||') OSTREE_GITREV = $(shell cd $(srcdir) && if command -v git >/dev/null 2>&1 && test -d .git; then git describe --abbrev=42 --tags --always HEAD; fi) ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS} GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \ - gtk-doc.make $(am__append_67) + gtk-doc.make $(am__append_68) OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS) OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS) OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS) @@ -2480,19 +2515,20 @@ libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) 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 -test_libglnx_xattrs_SOURCES = libglnx/tests/test-libglnx-xattrs.c +libglnx_testlib_sources = libglnx/tests/libglnx-testlib.c +test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-xattrs.c test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_fdio_SOURCES = libglnx/tests/test-libglnx-fdio.c +test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-fdio.c test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_errors_SOURCES = libglnx/tests/test-libglnx-errors.c +test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-errors.c test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_macros_SOURCES = libglnx/tests/test-libglnx-macros.c +test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-macros.c test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_shutil_SOURCES = libglnx/tests/test-libglnx-shutil.c +test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-shutil.c test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la libbsdiff_srcpath := $(srcdir)/bsdiff @@ -2755,22 +2791,8 @@ ostree_prepare_root_SOURCES = \ src/switchroot/ostree-prepare-root.c \ $(NULL) -ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_64) \ - $(am__append_65) -# We're using our internal generator -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator - -# ostree-prepare-root can be used as init in a system without a populated /lib. -# To support this use case we need to link statically as we will be unable to -# locate libc.so at run time if it's not installed in /lib. -# -# We support building ostree-prepare-root with a different compiler to the rest -# of ostree so we can use musl rather than glibc. This reduces the size of the -# executable significantly: from ~700K -> ~30K. We have to use _SCRIPTS here -# to get autotools to install this as an executable but without generating rules -# to make it itself which we have specified manually. See -# https://lists.gnu.org/archive/html/help-gnu-utils/2007-01/msg00007.html -@BUILDOPT_USE_STATIC_COMPILER_TRUE@ostree_boot_SCRIPTS = ostree-prepare-root +ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_65) \ + $(am__append_66) @BUILDOPT_USE_STATIC_COMPILER_FALSE@ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot ostree_remount_SOURCES = \ src/switchroot/ostree-mount-util.h \ @@ -2778,7 +2800,7 @@ ostree_remount_SOURCES = \ $(NULL) ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \ - $(am__append_66) + $(am__append_67) @BUILDOPT_SYSTEMD_TRUE@ostree_prepare_root_LDADD = $(AM_LDFLAGS) $(LIBSYSTEMD_LIBS) @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ostree_system_generator_SOURCES = src/switchroot/ostree-mount-util.h \ @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ src/switchroot/ostree-system-generator.c @@ -2794,7 +2816,7 @@ ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \ @BUILDOPT_FUSE_TRUE@rofiles_fuse_LDADD = libglnx.la $(BUILDOPT_FUSE_LIBS) $(OT_INTERNAL_GIO_UNIX_LIBS) libostree-1.la uninstalled_test_data = tests/ostree-symlink-stamp \ tests/ostree-prepare-root-symlink-stamp \ - tests/ostree-remount-symlink-stamp $(am__append_75) + tests/ostree-remount-symlink-stamp $(am__append_76) dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh # This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below. @@ -2802,10 +2824,10 @@ dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh # tests *only* run installed, to avoid having to run them twice in CI. # This overrides the glib-tap.mk emphasis on doing both, if we'd # used e.g. `dist_test_scripts`. -dist_test_scripts = $(NULL) $(am__append_86) +dist_test_scripts = $(NULL) $(am__append_87) test_programs = tests/test-bloom tests/test-repo-finder-config \ - tests/test-repo-finder-mount $(NULL) $(am__append_83) \ - $(am__append_87) + tests/test-repo-finder-mount $(NULL) $(am__append_84) \ + $(am__append_88) _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-basic-user.sh tests/test-basic-user-only.sh \ tests/test-basic-root.sh tests/test-pull-subpath.sh \ @@ -2820,9 +2842,10 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-pull-mirror-summary.sh \ tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \ tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \ - tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ - tests/test-pull-override-url.sh tests/test-pull-localcache.sh \ - tests/test-local-pull.sh tests/test-local-pull-depth.sh \ + tests/test-pull-basicauth.sh tests/test-pull-repeated.sh \ + tests/test-pull-untrusted.sh tests/test-pull-override-url.sh \ + tests/test-pull-localcache.sh tests/test-local-pull.sh \ + tests/test-local-pull-depth.sh \ tests/test-admin-upgrade-unconfigured.sh \ tests/test-admin-upgrade-endoflife.sh \ tests/test-admin-upgrade-systemd-update.sh \ @@ -2854,8 +2877,8 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-repo-finder-mount-integration.sh \ tests/test-summary-collections.sh \ tests/test-pull-collections.sh tests/test-config.sh $(NULL) \ - $(am__append_71) $(am__append_72) $(am__append_74) \ - $(am__append_77) $(am__append_78) + $(am__append_72) $(am__append_73) $(am__append_75) \ + $(am__append_78) $(am__append_79) experimental_test_scripts = \ $(NULL) @@ -2925,7 +2948,7 @@ libreaddir_rand_la_LIBADD = \ $(NULL) libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \ - $(am__append_81) + $(am__append_82) _installed_or_uninstalled_test_programs = tests/test-varint \ tests/test-ot-unix-utils tests/test-bsdiff \ tests/test-mutable-tree tests/test-keyfile-utils \ @@ -2933,7 +2956,7 @@ _installed_or_uninstalled_test_programs = tests/test-varint \ tests/test-checksum tests/test-lzma tests/test-rollsum \ tests/test-basic-c tests/test-sysroot-c tests/test-pull-c \ tests/test-repo tests/test-include-ostree-h tests/test-kargs \ - $(am__append_82) $(am__append_84) + $(am__append_83) $(am__append_85) common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx common_tests_ldadd = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS) libostreetest_la_SOURCES = tests/libostreetest.c tests/test-mock-gio.c tests/test-mock-gio.h @@ -3050,8 +3073,8 @@ tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS) @ENABLE_MAN_TRUE@ ostree-pull.1 ostree-refs.1 ostree-remote.1 \ @ENABLE_MAN_TRUE@ ostree-reset.1 ostree-rev-parse.1 \ @ENABLE_MAN_TRUE@ ostree-show.1 ostree-summary.1 \ -@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_92) \ -@ENABLE_MAN_TRUE@ $(am__append_94) $(am__append_95) +@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_94) \ +@ENABLE_MAN_TRUE@ $(am__append_96) $(am__append_97) @ENABLE_MAN_TRUE@man5_files = ostree.repo.5 ostree.repo-config.5 @ENABLE_MAN_TRUE@man1_MANS = $(addprefix man/,$(man1_files)) @ENABLE_MAN_TRUE@man5_MANS = $(addprefix man/,$(man5_files)) @@ -4159,6 +4182,9 @@ libglnx/tests/$(am__dirstamp): libglnx/tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libglnx/tests/$(DEPDIR) @: > libglnx/tests/$(DEPDIR)/$(am__dirstamp) +libglnx/tests/test_libglnx_errors-libglnx-testlib.$(OBJEXT): \ + libglnx/tests/$(am__dirstamp) \ + libglnx/tests/$(DEPDIR)/$(am__dirstamp) libglnx/tests/test_libglnx_errors-test-libglnx-errors.$(OBJEXT): \ libglnx/tests/$(am__dirstamp) \ libglnx/tests/$(DEPDIR)/$(am__dirstamp) @@ -4166,6 +4192,9 @@ libglnx/tests/test_libglnx_errors-test-libglnx-errors.$(OBJEXT): \ test-libglnx-errors$(EXEEXT): $(test_libglnx_errors_OBJECTS) $(test_libglnx_errors_DEPENDENCIES) $(EXTRA_test_libglnx_errors_DEPENDENCIES) @rm -f test-libglnx-errors$(EXEEXT) $(AM_V_CCLD)$(test_libglnx_errors_LINK) $(test_libglnx_errors_OBJECTS) $(test_libglnx_errors_LDADD) $(LIBS) +libglnx/tests/test_libglnx_fdio-libglnx-testlib.$(OBJEXT): \ + libglnx/tests/$(am__dirstamp) \ + libglnx/tests/$(DEPDIR)/$(am__dirstamp) libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.$(OBJEXT): \ libglnx/tests/$(am__dirstamp) \ libglnx/tests/$(DEPDIR)/$(am__dirstamp) @@ -4173,6 +4202,9 @@ libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.$(OBJEXT): \ test-libglnx-fdio$(EXEEXT): $(test_libglnx_fdio_OBJECTS) $(test_libglnx_fdio_DEPENDENCIES) $(EXTRA_test_libglnx_fdio_DEPENDENCIES) @rm -f test-libglnx-fdio$(EXEEXT) $(AM_V_CCLD)$(test_libglnx_fdio_LINK) $(test_libglnx_fdio_OBJECTS) $(test_libglnx_fdio_LDADD) $(LIBS) +libglnx/tests/test_libglnx_macros-libglnx-testlib.$(OBJEXT): \ + libglnx/tests/$(am__dirstamp) \ + libglnx/tests/$(DEPDIR)/$(am__dirstamp) libglnx/tests/test_libglnx_macros-test-libglnx-macros.$(OBJEXT): \ libglnx/tests/$(am__dirstamp) \ libglnx/tests/$(DEPDIR)/$(am__dirstamp) @@ -4180,6 +4212,9 @@ libglnx/tests/test_libglnx_macros-test-libglnx-macros.$(OBJEXT): \ test-libglnx-macros$(EXEEXT): $(test_libglnx_macros_OBJECTS) $(test_libglnx_macros_DEPENDENCIES) $(EXTRA_test_libglnx_macros_DEPENDENCIES) @rm -f test-libglnx-macros$(EXEEXT) $(AM_V_CCLD)$(test_libglnx_macros_LINK) $(test_libglnx_macros_OBJECTS) $(test_libglnx_macros_LDADD) $(LIBS) +libglnx/tests/test_libglnx_shutil-libglnx-testlib.$(OBJEXT): \ + libglnx/tests/$(am__dirstamp) \ + libglnx/tests/$(DEPDIR)/$(am__dirstamp) libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.$(OBJEXT): \ libglnx/tests/$(am__dirstamp) \ libglnx/tests/$(DEPDIR)/$(am__dirstamp) @@ -4187,6 +4222,9 @@ libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.$(OBJEXT): \ test-libglnx-shutil$(EXEEXT): $(test_libglnx_shutil_OBJECTS) $(test_libglnx_shutil_DEPENDENCIES) $(EXTRA_test_libglnx_shutil_DEPENDENCIES) @rm -f test-libglnx-shutil$(EXEEXT) $(AM_V_CCLD)$(test_libglnx_shutil_LINK) $(test_libglnx_shutil_OBJECTS) $(test_libglnx_shutil_LDADD) $(LIBS) +libglnx/tests/test_libglnx_xattrs-libglnx-testlib.$(OBJEXT): \ + libglnx/tests/$(am__dirstamp) \ + libglnx/tests/$(DEPDIR)/$(am__dirstamp) libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.$(OBJEXT): \ libglnx/tests/$(am__dirstamp) \ libglnx/tests/$(DEPDIR)/$(am__dirstamp) @@ -4616,10 +4654,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libglnx/$(DEPDIR)/la-glnx-lockfile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/$(DEPDIR)/la-glnx-shutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/$(DEPDIR)/la-glnx-xattrs.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/bupsplit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/libostree/$(DEPDIR)/libostree_1_la-ostree-async-progress.Plo@am__quote@ # am--include-marker @@ -6364,6 +6407,20 @@ src/rofiles-fuse/rofiles_fuse-main.obj: src/rofiles-fuse/main.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rofiles_fuse_CFLAGS) $(CFLAGS) -c -o src/rofiles-fuse/rofiles_fuse-main.obj `if test -f 'src/rofiles-fuse/main.c'; then $(CYGPATH_W) 'src/rofiles-fuse/main.c'; else $(CYGPATH_W) '$(srcdir)/src/rofiles-fuse/main.c'; fi` +libglnx/tests/test_libglnx_errors-libglnx-testlib.o: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_errors-libglnx-testlib.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_errors-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_errors-libglnx-testlib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_errors-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c + +libglnx/tests/test_libglnx_errors-libglnx-testlib.obj: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_errors-libglnx-testlib.obj -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_errors-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_errors-libglnx-testlib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_errors-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` + libglnx/tests/test_libglnx_errors-test-libglnx-errors.o: libglnx/tests/test-libglnx-errors.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_errors-test-libglnx-errors.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Tpo -c -o libglnx/tests/test_libglnx_errors-test-libglnx-errors.o `test -f 'libglnx/tests/test-libglnx-errors.c' || echo '$(srcdir)/'`libglnx/tests/test-libglnx-errors.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Po @@ -6378,6 +6435,20 @@ libglnx/tests/test_libglnx_errors-test-libglnx-errors.obj: libglnx/tests/test-li @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_errors_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_errors-test-libglnx-errors.obj `if test -f 'libglnx/tests/test-libglnx-errors.c'; then $(CYGPATH_W) 'libglnx/tests/test-libglnx-errors.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/test-libglnx-errors.c'; fi` +libglnx/tests/test_libglnx_fdio-libglnx-testlib.o: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_fdio-libglnx-testlib.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_fdio-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_fdio-libglnx-testlib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_fdio-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c + +libglnx/tests/test_libglnx_fdio-libglnx-testlib.obj: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_fdio-libglnx-testlib.obj -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_fdio-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_fdio-libglnx-testlib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_fdio-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` + libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.o: libglnx/tests/test-libglnx-fdio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Tpo -c -o libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.o `test -f 'libglnx/tests/test-libglnx-fdio.c' || echo '$(srcdir)/'`libglnx/tests/test-libglnx-fdio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Po @@ -6392,6 +6463,20 @@ libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.obj: libglnx/tests/test-libgln @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_fdio_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_fdio-test-libglnx-fdio.obj `if test -f 'libglnx/tests/test-libglnx-fdio.c'; then $(CYGPATH_W) 'libglnx/tests/test-libglnx-fdio.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/test-libglnx-fdio.c'; fi` +libglnx/tests/test_libglnx_macros-libglnx-testlib.o: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_macros-libglnx-testlib.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_macros-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_macros-libglnx-testlib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_macros-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c + +libglnx/tests/test_libglnx_macros-libglnx-testlib.obj: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_macros-libglnx-testlib.obj -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_macros-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_macros-libglnx-testlib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_macros-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` + libglnx/tests/test_libglnx_macros-test-libglnx-macros.o: libglnx/tests/test-libglnx-macros.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_macros-test-libglnx-macros.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Tpo -c -o libglnx/tests/test_libglnx_macros-test-libglnx-macros.o `test -f 'libglnx/tests/test-libglnx-macros.c' || echo '$(srcdir)/'`libglnx/tests/test-libglnx-macros.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Po @@ -6406,6 +6491,20 @@ libglnx/tests/test_libglnx_macros-test-libglnx-macros.obj: libglnx/tests/test-li @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_macros_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_macros-test-libglnx-macros.obj `if test -f 'libglnx/tests/test-libglnx-macros.c'; then $(CYGPATH_W) 'libglnx/tests/test-libglnx-macros.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/test-libglnx-macros.c'; fi` +libglnx/tests/test_libglnx_shutil-libglnx-testlib.o: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_shutil-libglnx-testlib.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_shutil-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_shutil-libglnx-testlib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_shutil-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c + +libglnx/tests/test_libglnx_shutil-libglnx-testlib.obj: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_shutil-libglnx-testlib.obj -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_shutil-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_shutil-libglnx-testlib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_shutil-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` + libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.o: libglnx/tests/test-libglnx-shutil.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Tpo -c -o libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.o `test -f 'libglnx/tests/test-libglnx-shutil.c' || echo '$(srcdir)/'`libglnx/tests/test-libglnx-shutil.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Po @@ -6420,6 +6519,20 @@ libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.obj: libglnx/tests/test-li @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_shutil_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_shutil-test-libglnx-shutil.obj `if test -f 'libglnx/tests/test-libglnx-shutil.c'; then $(CYGPATH_W) 'libglnx/tests/test-libglnx-shutil.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/test-libglnx-shutil.c'; fi` +libglnx/tests/test_libglnx_xattrs-libglnx-testlib.o: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_xattrs_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_xattrs-libglnx-testlib.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_xattrs-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_xattrs-libglnx-testlib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_xattrs_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_xattrs-libglnx-testlib.o `test -f 'libglnx/tests/libglnx-testlib.c' || echo '$(srcdir)/'`libglnx/tests/libglnx-testlib.c + +libglnx/tests/test_libglnx_xattrs-libglnx-testlib.obj: libglnx/tests/libglnx-testlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_xattrs_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_xattrs-libglnx-testlib.obj -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Tpo -c -o libglnx/tests/test_libglnx_xattrs-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libglnx/tests/libglnx-testlib.c' object='libglnx/tests/test_libglnx_xattrs-libglnx-testlib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_xattrs_CFLAGS) $(CFLAGS) -c -o libglnx/tests/test_libglnx_xattrs-libglnx-testlib.obj `if test -f 'libglnx/tests/libglnx-testlib.c'; then $(CYGPATH_W) 'libglnx/tests/libglnx-testlib.c'; else $(CYGPATH_W) '$(srcdir)/libglnx/tests/libglnx-testlib.c'; fi` + libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.o: libglnx/tests/test-libglnx-xattrs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libglnx_xattrs_CFLAGS) $(CFLAGS) -MT libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.o -MD -MP -MF libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Tpo -c -o libglnx/tests/test_libglnx_xattrs-test-libglnx-xattrs.o `test -f 'libglnx/tests/test-libglnx-xattrs.c' || echo '$(srcdir)/'`libglnx/tests/test-libglnx-xattrs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Tpo libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Po @@ -7928,6 +8041,13 @@ tests/test-pull-resume.sh.log: tests/test-pull-resume.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-pull-basicauth.sh.log: tests/test-pull-basicauth.sh + @p='tests/test-pull-basicauth.sh'; \ + b='tests/test-pull-basicauth.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-pull-repeated.sh.log: tests/test-pull-repeated.sh @p='tests/test-pull-repeated.sh'; \ b='tests/test-pull-repeated.sh'; \ @@ -8715,10 +8835,15 @@ distclean: distclean-recursive -rm -f libglnx/$(DEPDIR)/la-glnx-lockfile.Plo -rm -f libglnx/$(DEPDIR)/la-glnx-shutil.Plo -rm -f libglnx/$(DEPDIR)/la-glnx-xattrs.Plo + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Po -rm -f src/libostree/$(DEPDIR)/bupsplit.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-async-progress.Plo @@ -8976,10 +9101,15 @@ maintainer-clean: maintainer-clean-recursive -rm -f libglnx/$(DEPDIR)/la-glnx-lockfile.Plo -rm -f libglnx/$(DEPDIR)/la-glnx-shutil.Plo -rm -f libglnx/$(DEPDIR)/la-glnx-xattrs.Plo + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_errors-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_errors-test-libglnx-errors.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_fdio-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_fdio-test-libglnx-fdio.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_macros-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_macros-test-libglnx-macros.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_shutil-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_shutil-test-libglnx-shutil.Po + -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-libglnx-testlib.Po -rm -f libglnx/tests/$(DEPDIR)/test_libglnx_xattrs-test-libglnx-xattrs.Po -rm -f src/libostree/$(DEPDIR)/bupsplit.Plo -rm -f src/libostree/$(DEPDIR)/libostree_1_la-ostree-async-progress.Plo @@ -9271,6 +9401,7 @@ uninstall-man: uninstall-man1 uninstall-man5 @ENABLE_INSTALLED_TESTS_TRUE@%.test: %$(EXEEXT) Makefile +@ENABLE_INSTALLED_TESTS_TRUE@ @$(MKDIR_P) $(dir $@) @ENABLE_INSTALLED_TESTS_TRUE@ $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ @ENABLE_INSTALLED_TESTS_TRUE@ echo 'Type=session' >> $@.tmp; \ @ENABLE_INSTALLED_TESTS_TRUE@ echo 'Exec=env G_TEST_SRCDIR=$(installed_testdir) G_TEST_BUILDDIR=$(installed_testdir) $(installed_testdir)/$(notdir $<)' >> $@.tmp; \ @@ -9322,6 +9453,7 @@ install-mkdir-remotes-d-hook: mkdir -p $(DESTDIR)$(sysconfdir)/ostree/remotes.d src/ostree/parse-datetime.c: src/ostree/parse-datetime.y Makefile + mkdir -p src/ostree/ $(AM_V_GEN) $(YACC) $< -o $@ @BUILDOPT_USE_STATIC_COMPILER_TRUE@ostree-prepare-root : $(ostree_prepare_root_SOURCES) diff --git a/README.md b/README.md index a4146f04..1e6348dd 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,7 @@ systems. which uses libostree. The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and -integration tool uses libostree as a caching system to store and share -built artifacts. +integration tool supports importing and exporting from libostree repos. Fedora [coreos-assembler](https://github.com/coreos/coreos-assembler) is the build tool used to generate Fedora CoreOS derivatives. diff --git a/aclocal.m4 b/aclocal.m4 index 26567006..46f62182 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -237,7 +237,7 @@ main (void) ]) # gpgme.m4 - autoconf macro to detect GPGME. -# Copyright (C) 2002, 2003, 2004, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -247,7 +247,7 @@ 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: 2014-10-02 +# Last-changed: 2018-11-12 AC_DEFUN([_AM_PATH_GPGME_CONFIG], @@ -274,10 +274,24 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG], fi fi - AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) + use_gpgrt_config="" + if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG gpgme --exists; then + GPGME_CONFIG="$GPGRT_CONFIG gpgme" + AC_MSG_NOTICE([Use gpgrt-config as gpgme-config]) + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) + fi if test "$GPGME_CONFIG" != "no" ; then - gpgme_version=`$GPGME_CONFIG --version` + if test -z "$use_gpgrt_config"; then + gpgme_version=`$GPGME_CONFIG --version` + else + gpgme_version=`$GPGME_CONFIG --modversion` + fi fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -290,12 +304,16 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG], AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK], [ - gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + else + gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpgme_config_host" != xnone ; then if test x"$gpgme_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPGME_CONFIG was +*** The config script "$GPGME_CONFIG" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix @@ -356,7 +374,11 @@ AC_DEFUN([AM_PATH_GPGME], # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then - tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no @@ -496,7 +518,11 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then - tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no @@ -505,8 +531,20 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], fi fi if test $ok = yes; then - GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` - GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` + if test -z "$use_gpgrt_config"; then + GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` + GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` + else + if $GPGRT_CONFIG gpgme-glib --exists; then + GPGME_CONFIG="$GPGRT_CONFIG gpgme-glib" + GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --cflags` + GPGME_GLIB_LIBS=`$GPGME_CONFIG --libs` + else + ok = no + fi + fi + fi + if test $ok = yes; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) _AM_PATH_GPGME_CONFIG_HOST_CHECK diff --git a/apidoc/html/index.html b/apidoc/html/index.html index 0d46e278..f462ee84 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2019.5

+

for OSTree 2019.6


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 2bc38719..cb63dde3 100644 --- a/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html +++ b/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html @@ -57,6 +57,14 @@ +void + + +ostree_async_progress_copy_state () + + + + char * @@ -196,6 +204,41 @@ ostree_async_progress_new_and_connect ( +

ostree_async_progress_copy_state ()

+
void
+ostree_async_progress_copy_state (OstreeAsyncProgress *self,
+                                  OstreeAsyncProgress *dest);
+

Atomically copies all the state from self + to dest +, without invoking the +callback. +This is used for proxying progress objects across different GMainContexts.

+
+

Parameters

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

self

An OstreeAsyncProgress to copy from

 

dest

An OstreeAsyncProgress to copy to

 
+
+

Since: 2019.6

+ +
+

ostree_async_progress_get_status ()

char *
 ostree_async_progress_get_status (OstreeAsyncProgress *self);
diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2 index 00931091..d2d82d7a 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -304,6 +304,7 @@ + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index ef4b30be..1a9ba640 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -76,6 +76,10 @@
+ostree_async_progress_copy_state, function in Progress notification system for asynchronous operations +
+
+
ostree_async_progress_finish, function in Progress notification system for asynchronous operations
diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index 252a563a..f99c4df5 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -3,6 +3,7 @@ OstreeAsyncProgress ostree_async_progress_new ostree_async_progress_new_and_connect +ostree_async_progress_copy_state ostree_async_progress_get_status ostree_async_progress_get ostree_async_progress_get_variant diff --git a/apidoc/version.xml b/apidoc/version.xml index 51a8c5f1..a6415107 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2019.5 \ No newline at end of file +2019.6 \ No newline at end of file diff --git a/buildutil/glib-tap.mk b/buildutil/glib-tap.mk index 34b8f21e..9a944a0a 100644 --- a/buildutil/glib-tap.mk +++ b/buildutil/glib-tap.mk @@ -116,6 +116,7 @@ installed_testcases = $(test_programs) $(installed_test_programs) \ installed_test_meta_DATA = $(installed_testcases:=.test) %.test: %$(EXEEXT) Makefile + @$(MKDIR_P) $(dir $@) $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ echo 'Type=session' >> $@.tmp; \ echo 'Exec=env G_TEST_SRCDIR=$(installed_testdir) G_TEST_BUILDDIR=$(installed_testdir) $(installed_testdir)/$(notdir $<)' >> $@.tmp; \ diff --git a/configure b/configure index bfa772f6..4ae7dd2f 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 2019.5. +# Generated by GNU Autoconf 2.69 for libostree 2019.6. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2019.5' -PACKAGE_STRING='libostree 2019.5' +PACKAGE_VERSION='2019.6' +PACKAGE_STRING='libostree 2019.6' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -1554,7 +1554,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 2019.5 to adapt to many kinds of systems. +\`configure' configures libostree 2019.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1624,7 +1624,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2019.5:";; + short | recursive ) echo "Configuration of libostree 2019.6:";; esac cat <<\_ACEOF @@ -1883,7 +1883,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2019.5 +libostree configure 2019.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2355,7 +2355,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2019.5, which was +It was created by libostree $as_me 2019.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3223,7 +3223,7 @@ fi # Define the identity of the package. PACKAGE='libostree' - VERSION='2019.5' + VERSION='2019.6' # Some tools Automake needs. @@ -5957,9 +5957,9 @@ test -n "$YACC" || YACC="yacc" YEAR_VERSION=2019 -RELEASE_VERSION=5 +RELEASE_VERSION=6 -PACKAGE_VERSION=2019.5 +PACKAGE_VERSION=2019.6 if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : @@ -15560,7 +15560,17 @@ $as_echo "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >& fi fi - # Extract the first word of "gpgme-config", so it can be a program name with args. + use_gpgrt_config="" + if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG gpgme --exists; then + GPGME_CONFIG="$GPGRT_CONFIG gpgme" + { $as_echo "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as gpgme-config" >&5 +$as_echo "$as_me: Use gpgrt-config as gpgme-config" >&6;} + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + # Extract the first word of "gpgme-config", so it can be a program name with args. set dummy gpgme-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -15601,9 +15611,14 @@ $as_echo "no" >&6; } fi + fi if test "$GPGME_CONFIG" != "no" ; then - gpgme_version=`$GPGME_CONFIG --version` + if test -z "$use_gpgrt_config"; then + gpgme_version=`$GPGME_CONFIG --version` + else + gpgme_version=`$GPGME_CONFIG --modversion` + fi fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` @@ -15731,12 +15746,16 @@ $as_echo_n "checking for GPGME pthread - version >= $min_gpgme_version... " >&6; $as_echo "yes" >&6; } have_gpgme=yes - gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + else + gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpgme_config_host" != xnone ; then if test x"$gpgme_config_host" != x"$host" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** -*** The config script $GPGME_CONFIG was +*** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix @@ -15744,7 +15763,7 @@ $as_echo "yes" >&6; } ***" >&5 $as_echo "$as_me: WARNING: *** -*** The config script $GPGME_CONFIG was +*** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix @@ -15827,12 +15846,16 @@ $as_echo_n "checking for GPGME pthread - version >= $min_gpgme_version... " >&6; $as_echo "yes" >&6; } have_gpgme=yes - gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` + else + gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpgme_config_host" != xnone ; then if test x"$gpgme_config_host" != x"$host" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** -*** The config script $GPGME_CONFIG was +*** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix @@ -15840,7 +15863,7 @@ $as_echo "yes" >&6; } ***" >&5 $as_echo "$as_me: WARNING: *** -*** The config script $GPGME_CONFIG was +*** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix @@ -18819,7 +18842,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 2019.5, which was +This file was extended by libostree $as_me 2019.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18885,7 +18908,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 2019.5 +libostree config.status 2019.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 4b022e36..46a900f5 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ dnl Seed the release notes with `git-shortlog-with-prs ..`. Th dnl `git-evtag` to create the tag and push it. Finally, create a GitHub release and attach dnl the tarball from `make dist`. m4_define([year_version], [2019]) -m4_define([release_version], [5]) +m4_define([release_version], [6]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes diff --git a/libglnx/Makefile-libglnx.am b/libglnx/Makefile-libglnx.am index 158063c7..957eae97 100644 --- a/libglnx/Makefile-libglnx.am +++ b/libglnx/Makefile-libglnx.am @@ -56,23 +56,25 @@ libglnx_la_LIBADD = $(libglnx_libs) libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil TESTS += $(libglnx_tests) +libglnx_testlib_sources = $(libglnx_srcpath)/tests/libglnx-testlib.c + check_PROGRAMS += $(libglnx_tests) -test_libglnx_xattrs_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-xattrs.c +test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-xattrs.c test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_fdio_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-fdio.c +test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-fdio.c test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_errors_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-errors.c +test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-errors.c test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_macros_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-macros.c +test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-macros.c test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_shutil_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-shutil.c +test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-shutil.c test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la diff --git a/libglnx/Makefile-libglnx.am.inc b/libglnx/Makefile-libglnx.am.inc index ff2700c3..4465f465 100644 --- a/libglnx/Makefile-libglnx.am.inc +++ b/libglnx/Makefile-libglnx.am.inc @@ -56,23 +56,25 @@ libglnx_la_LIBADD = $(libglnx_libs) libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil TESTS += $(libglnx_tests) +libglnx_testlib_sources = libglnx/tests/libglnx-testlib.c + check_PROGRAMS += $(libglnx_tests) -test_libglnx_xattrs_SOURCES = libglnx/tests/test-libglnx-xattrs.c +test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-xattrs.c test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_fdio_SOURCES = libglnx/tests/test-libglnx-fdio.c +test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-fdio.c test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_errors_SOURCES = libglnx/tests/test-libglnx-errors.c +test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-errors.c test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_macros_SOURCES = libglnx/tests/test-libglnx-macros.c +test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-macros.c test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la -test_libglnx_shutil_SOURCES = libglnx/tests/test-libglnx-shutil.c +test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) libglnx/tests/test-libglnx-shutil.c test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la diff --git a/libglnx/README.md b/libglnx/README.md index 6589d29b..3be38d72 100644 --- a/libglnx/README.md +++ b/libglnx/README.md @@ -28,6 +28,32 @@ One could also compare this project to gnulib; the salient differences there are that at least some of this module is eventually destined for inclusion in GLib. +Adding this to your project +--------------------------- + +## Meson + +First, set up a Git submodule: + +``` +git submodule add https://gitlab.gnome.org/GNOME/libglnx subprojects/libglnx +``` + +Or a Git [subtree](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt): + +``` +git remote add libglnx https://gitlab.gnome.org/GNOME/libglnx.git +git fetch libglnx +git subtree add -P subprojects/libglnx libglnx/master +``` + +Then, in your top-level `meson.build`: + +``` +libglnx_dep = subproject('libglnx').get_variable('libglnx_dep') +# now use libglnx_dep in your dependencies +``` + Porting from libgsystem ----------------------- diff --git a/libglnx/glnx-fdio.c b/libglnx/glnx-fdio.c index 7b734ff6..12879cd7 100644 --- a/libglnx/glnx-fdio.c +++ b/libglnx/glnx-fdio.c @@ -277,17 +277,19 @@ glnx_open_tmpfile_linkable_at (int dfd, return open_tmpfile_core (dfd, subpath, flags, out_tmpf, error); } + /* A variant of `glnx_open_tmpfile_linkable_at()` which doesn't support linking. - * Useful for true temporary storage. The fd will be allocated in /var/tmp to - * ensure maximum storage space. + * Useful for true temporary storage. The fd will be allocated in the specified + * directory. */ gboolean -glnx_open_anonymous_tmpfile (int flags, - GLnxTmpfile *out_tmpf, - GError **error) +glnx_open_anonymous_tmpfile_full (int flags, + const char *dir, + GLnxTmpfile *out_tmpf, + GError **error) { /* Add in O_EXCL */ - if (!open_tmpfile_core (AT_FDCWD, "/var/tmp", flags | O_EXCL, out_tmpf, error)) + if (!open_tmpfile_core (AT_FDCWD, dir, flags | O_EXCL, out_tmpf, error)) return FALSE; if (out_tmpf->path) { @@ -299,6 +301,21 @@ glnx_open_anonymous_tmpfile (int flags, return TRUE; } +/* A variant of `glnx_open_tmpfile_linkable_at()` which doesn't support linking. + * Useful for true temporary storage. The fd will be allocated in /var/tmp to + * ensure maximum storage space. + * + * If you need the file on a specific filesystem use glnx_open_anonymous_tmpfile_full() + * which lets you pass a directory. + */ +gboolean +glnx_open_anonymous_tmpfile (int flags, + GLnxTmpfile *out_tmpf, + GError **error) +{ + return glnx_open_anonymous_tmpfile_full (flags, "/var/tmp", out_tmpf, error); +} + /* Use this after calling glnx_open_tmpfile_linkable_at() to give * the file its final name (link into place). */ @@ -346,8 +363,7 @@ glnx_link_tmpfile_at (GLnxTmpfile *tmpf, { /* This case we have O_TMPFILE, so our reference to it is via /proc/self/fd */ char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; - - sprintf (proc_fd_path, "/proc/self/fd/%i", tmpf->fd); + snprintf (proc_fd_path, sizeof (proc_fd_path), "/proc/self/fd/%i", tmpf->fd); if (replace) { @@ -407,6 +423,45 @@ glnx_link_tmpfile_at (GLnxTmpfile *tmpf, return TRUE; } +/* glnx_tmpfile_reopen_rdonly: + * @tmpf: tmpfile + * @error: Error + * + * Give up write access to the file descriptior. One use + * case for this is fs-verity, which requires a read-only fd. + * It could also be useful to allocate an anonymous tmpfile + * write some sort of caching/indexing data to it, then reopen it + * read-only thereafter. + **/ +gboolean +glnx_tmpfile_reopen_rdonly (GLnxTmpfile *tmpf, + GError **error) +{ + g_return_val_if_fail (tmpf->fd >= 0, FALSE); + g_return_val_if_fail (tmpf->src_dfd == AT_FDCWD || tmpf->src_dfd >= 0, FALSE); + + glnx_fd_close int rdonly_fd = -1; + + if (tmpf->path) + { + if (!glnx_openat_rdonly (tmpf->src_dfd, tmpf->path, FALSE, &rdonly_fd, error)) + return FALSE; + } + else + { + /* This case we have O_TMPFILE, so our reference to it is via /proc/self/fd */ + char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; + snprintf (proc_fd_path, sizeof (proc_fd_path), "/proc/self/fd/%i", tmpf->fd); + + if (!glnx_openat_rdonly (AT_FDCWD, proc_fd_path, TRUE, &rdonly_fd, error)) + return FALSE; + } + + glnx_close_fd (&tmpf->fd); + tmpf->fd = glnx_steal_fd (&rdonly_fd); + return TRUE; +} + /** * glnx_openat_rdonly: * @dfd: File descriptor for origin directory diff --git a/libglnx/glnx-fdio.h b/libglnx/glnx-fdio.h index c0a7cc1d..9c57dc5e 100644 --- a/libglnx/glnx-fdio.h +++ b/libglnx/glnx-fdio.h @@ -83,6 +83,13 @@ glnx_open_anonymous_tmpfile (int flags, GLnxTmpfile *out_tmpf, GError **error); +gboolean +glnx_open_anonymous_tmpfile_full (int flags, + const char *dir, + GLnxTmpfile *out_tmpf, + GError **error); + + gboolean glnx_open_tmpfile_linkable_at (int dfd, const char *subpath, @@ -103,6 +110,10 @@ glnx_link_tmpfile_at (GLnxTmpfile *tmpf, const char *target, GError **error); +gboolean +glnx_tmpfile_reopen_rdonly (GLnxTmpfile *tmpf, + GError **error); + gboolean glnx_openat_rdonly (int dfd, const char *path, diff --git a/libglnx/glnx-macros.h b/libglnx/glnx-macros.h index 6d8aca93..700fc75c 100644 --- a/libglnx/glnx-macros.h +++ b/libglnx/glnx-macros.h @@ -31,6 +31,16 @@ G_BEGIN_DECLS /* All of these are for C only. */ #ifndef __GI_SCANNER__ +/* fixes builds against musl, taken from glibc unistd.h */ +#ifndef TEMP_FAILURE_RETRY +#define TEMP_FAILURE_RETRY(expression) \ + (__extension__ \ + ({ long int __result; \ + do __result = (long int) (expression); \ + while (__result == -1L && errno == EINTR); \ + __result; })) +#endif + /* Taken from https://github.com/systemd/systemd/src/basic/string-util.h * at revision v228-666-gcf6c8c4 */ diff --git a/libglnx/glnx-missing.h b/libglnx/glnx-missing.h index 0eba07bf..9d35c40b 100644 --- a/libglnx/glnx-missing.h +++ b/libglnx/glnx-missing.h @@ -36,7 +36,6 @@ #include #include #include -#include #include /* The precise definition of __O_TMPFILE is arch specific; use the diff --git a/libglnx/tests/libglnx-testlib.c b/libglnx/tests/libglnx-testlib.c new file mode 100644 index 00000000..5687d807 --- /dev/null +++ b/libglnx/tests/libglnx-testlib.c @@ -0,0 +1,66 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- + * + * Copyright 2019 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" +#include "libglnx-testlib.h" + +#include + +#include "libglnx.h" + +struct _GLnxTestAutoTempDir +{ + gchar *old_cwd; + int old_cwd_fd; + GLnxTmpDir temp_dir; +}; + +_GLnxTestAutoTempDir * +_glnx_test_auto_temp_dir_enter (void) +{ + GError *error = NULL; + _GLnxTestAutoTempDir *ret = g_new0 (_GLnxTestAutoTempDir, 1); + + glnx_mkdtemp ("glnx-test-XXXXXX", 0700, &ret->temp_dir, &error); + g_assert_no_error (error); + + /* just for better diagnostics */ + ret->old_cwd = g_get_current_dir (); + + glnx_opendirat (-1, ".", TRUE, &ret->old_cwd_fd, &error); + g_assert_no_error (error); + + if (fchdir (ret->temp_dir.fd) != 0) + g_error ("fchdir(): %s", ret->temp_dir.path, g_strerror (errno)); + + return ret; +} + +void +_glnx_test_auto_temp_dir_leave (_GLnxTestAutoTempDir *dir) +{ + GError *error = NULL; + + if (fchdir (dir->old_cwd_fd) != 0) + g_error ("fchdir(): %s", dir->old_cwd, g_strerror (errno)); + + glnx_tmpdir_delete (&dir->temp_dir, NULL, &error); + g_assert_no_error (error); +} diff --git a/libglnx/tests/libglnx-testlib.h b/libglnx/tests/libglnx-testlib.h index ee750e49..0d3a0751 100644 --- a/libglnx/tests/libglnx-testlib.h +++ b/libglnx/tests/libglnx-testlib.h @@ -1,6 +1,7 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2017 Red Hat, Inc. + * Copyright 2019 Collabora Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,6 +21,10 @@ #pragma once +#include + +#include "glnx-backport-autoptr.h" + typedef GError _GLnxTestAutoError; static inline void _glnx_test_auto_error_cleanup (_GLnxTestAutoError *autoerror) @@ -32,3 +37,12 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(_GLnxTestAutoError, _glnx_test_auto_error_cleanup) #define _GLNX_TEST_DECLARE_ERROR(local_error, error) \ g_autoptr(_GLnxTestAutoError) local_error = NULL; \ GError **error = &local_error + +typedef struct _GLnxTestAutoTempDir _GLnxTestAutoTempDir; + +_GLnxTestAutoTempDir *_glnx_test_auto_temp_dir_enter (void); +void _glnx_test_auto_temp_dir_leave (_GLnxTestAutoTempDir *dir); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(_GLnxTestAutoTempDir, _glnx_test_auto_temp_dir_leave); + +#define _GLNX_TEST_SCOPED_TEMP_DIR \ + g_autoptr(_GLnxTestAutoTempDir) temp_dir = _glnx_test_auto_temp_dir_enter () diff --git a/libglnx/tests/test-libglnx-fdio.c b/libglnx/tests/test-libglnx-fdio.c index 81636e59..84ebb14d 100644 --- a/libglnx/tests/test-libglnx-fdio.c +++ b/libglnx/tests/test-libglnx-fdio.c @@ -237,6 +237,7 @@ test_filecopy (void) int main (int argc, char **argv) { + _GLNX_TEST_SCOPED_TEMP_DIR; int ret; g_test_init (&argc, &argv, NULL); diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym index 0b876f3b..a5d15e93 100644 --- a/src/libostree/libostree-devel.sym +++ b/src/libostree/libostree-devel.sym @@ -18,8 +18,8 @@ ***/ /* Add new symbols here. Release commits should copy this section into -released.sym. */ -LIBOSTREE_2019.5 { -} LIBOSTREE_2019.4; +LIBOSTREE_2019.7 { +} LIBOSTREE_2019.6; /* 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 diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym index f6a83b77..e81a6595 100644 --- a/src/libostree/libostree-released.sym +++ b/src/libostree/libostree-released.sym @@ -577,6 +577,10 @@ LIBOSTREE_2019.4 { /* No new symbols in 2019.5 */ +LIBOSTREE_2019.6 { + ostree_async_progress_copy_state; +} LIBOSTREE_2019.4; + /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. */ diff --git a/src/libostree/ostree-async-progress.c b/src/libostree/ostree-async-progress.c index 64372c27..8d6fdfe5 100644 --- a/src/libostree/ostree-async-progress.c +++ b/src/libostree/ostree-async-progress.c @@ -424,6 +424,40 @@ ostree_async_progress_set_uint64 (OstreeAsyncProgress *self, ostree_async_progress_set_variant (self, key, g_variant_new_uint64 (value)); } +/** + * ostree_async_progress_copy_state: + * @self: An #OstreeAsyncProgress to copy from + * @dest: An #OstreeAsyncProgress to copy to + * + * Atomically copies all the state from @self to @dest, without invoking the + * callback. + * This is used for proxying progress objects across different #GMainContexts. + * + * Since: 2019.6 + */ +void +ostree_async_progress_copy_state (OstreeAsyncProgress *self, + OstreeAsyncProgress *dest) +{ + g_return_if_fail (OSTREE_IS_ASYNC_PROGRESS (self)); + g_return_if_fail (OSTREE_IS_ASYNC_PROGRESS (dest)); + + g_mutex_lock (&self->lock); + + if (self->dead) + goto out; + + GLNX_HASH_TABLE_FOREACH_KV (self->values, void *, key, GVariant *, value) + { + if (value) + g_variant_ref (value); + g_hash_table_replace (dest->values, key, value); + } + + out: + g_mutex_unlock (&self->lock); +} + /** * ostree_async_progress_new: * diff --git a/src/libostree/ostree-async-progress.h b/src/libostree/ostree-async-progress.h index 45a80cfb..475d7f62 100644 --- a/src/libostree/ostree-async-progress.h +++ b/src/libostree/ostree-async-progress.h @@ -92,4 +92,8 @@ void ostree_async_progress_set_variant (OstreeAsyncProgress *self, _OSTREE_PUBLIC void ostree_async_progress_finish (OstreeAsyncProgress *self); +_OSTREE_PUBLIC +void ostree_async_progress_copy_state (OstreeAsyncProgress *self, + OstreeAsyncProgress *dest); + G_END_DECLS diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index 294b2078..fdf8a2ef 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -261,9 +261,8 @@ destroy_and_unref_source (GSource *source) } static char * -request_get_uri (FetcherRequest *req, guint idx) +request_get_uri (FetcherRequest *req, SoupURI *baseuri) { - SoupURI *baseuri = req->mirrorlist->pdata[idx]; if (!req->filename) return soup_uri_to_string (baseuri, FALSE); { g_autofree char *uristr = soup_uri_to_string (baseuri, FALSE); @@ -715,7 +714,8 @@ initiate_next_curl_request (FetcherRequest *req, g_assert_cmpint (req->idx, <, req->mirrorlist->len); - { g_autofree char *uri = request_get_uri (req, req->idx); + SoupURI *baseuri = req->mirrorlist->pdata[req->idx]; + { g_autofree char *uri = request_get_uri (req, baseuri); curl_easy_setopt (req->easy, CURLOPT_URL, uri); } @@ -771,6 +771,12 @@ initiate_next_curl_request (FetcherRequest *req, if ((self->config_flags & OSTREE_FETCHER_FLAGS_TRANSFER_GZIP) > 0) curl_easy_setopt (req->easy, CURLOPT_ACCEPT_ENCODING, ""); + /* If we have e.g. basic auth in the URL string, let's honor that */ + const char *username = soup_uri_get_user (baseuri); + curl_easy_setopt (req->easy, CURLOPT_USERNAME, username); + const char *password = soup_uri_get_password (baseuri); + curl_easy_setopt (req->easy, CURLOPT_PASSWORD, password); + /* We should only speak HTTP; TODO: only enable file if specified */ curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); /* Picked the current version in F25 as of 20170127, since diff --git a/src/libostree/ostree-kernel-args.c b/src/libostree/ostree-kernel-args.c index dbf2ec8a..c6300823 100644 --- a/src/libostree/ostree-kernel-args.c +++ b/src/libostree/ostree-kernel-args.c @@ -30,6 +30,111 @@ struct _OstreeKernelArgs { GHashTable *table; }; +struct _OstreeKernelArgsEntry { + char *key; + char *value; +}; + +char * +_ostree_kernel_args_entry_get_key (const OstreeKernelArgsEntry *e) +{ + return e->key; +} + +char * +_ostree_kernel_args_entry_get_value (const OstreeKernelArgsEntry *e) +{ + return e->value; +} + +void +_ostree_kernel_args_entry_set_key (OstreeKernelArgsEntry *e, + char *key) +{ + e->key = key; +} + +void +_ostree_kernel_args_entry_set_value (OstreeKernelArgsEntry *e, + char *value) +{ + e->value = value; +} + +char * +_ostree_kernel_args_get_key_index (const OstreeKernelArgs *kargs, + int i) +{ + OstreeKernelArgsEntry *e = kargs->order->pdata[i]; + return e->key; +} + +char * +_ostree_kernel_args_get_value_index (const OstreeKernelArgs *kargs, + int i) +{ + OstreeKernelArgsEntry *e = kargs->order->pdata[i]; + return e->value; +} + +OstreeKernelArgsEntry * +_ostree_kernel_args_entry_new (void) +{ + return g_new0 (OstreeKernelArgsEntry, 1); +} + +void +_ostree_kernel_args_entry_value_free (OstreeKernelArgsEntry *e) +{ + g_clear_pointer (&e->value, g_free); +} + +/* Free the value field, and the entry. This should be set as the free + * function, for all pointer arrays stored in the hash table. + */ +static void +kernel_args_entry_free_from_table (gpointer data) +{ + OstreeKernelArgsEntry *e = data; + // The hash table owns the key; do not free it here. + g_free (_ostree_kernel_args_entry_get_value (e)); + g_free (e); +} + +static gboolean +kernel_args_entry_value_equal (gconstpointer data, + gconstpointer value) +{ + const OstreeKernelArgsEntry *e = data; + return g_strcmp0 (_ostree_kernel_args_entry_get_value (e), value) == 0; +} + +static gboolean +kernel_args_entry_key_equal (gconstpointer data, + gconstpointer key) +{ + const OstreeKernelArgsEntry *e = data; + return g_strcmp0 (_ostree_kernel_args_entry_get_key (e), key) == 0; +} + +static void +kernel_args_entry_replace_value (OstreeKernelArgsEntry *e, + const char *value) +{ + g_assert (e); + _ostree_kernel_args_entry_value_free (e); + _ostree_kernel_args_entry_set_value (e, g_strdup (value)); +} + +static void +kernel_args_remove_entries_from_order (GPtrArray *order, + GPtrArray *entries) +{ + g_assert (entries); + for (int i = 0; i < entries->len; i++) + g_assert (g_ptr_array_remove (order, entries->pdata[i])); +} + static char * split_keyeq (char *arg) { @@ -82,9 +187,11 @@ ostree_kernel_args_new (void) { OstreeKernelArgs *ret; ret = g_new0 (OstreeKernelArgs, 1); - ret->order = g_ptr_array_new_with_free_func (g_free); + /* Hash table owns the kernel args entries, since it uses keys to index, + * and its values are used to locate entries in the order array. */ ret->table = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, (GDestroyNotify)g_ptr_array_unref); + g_free, (GDestroyNotify)g_ptr_array_unref); + ret->order = g_ptr_array_new_with_free_func (NULL); return ret; } @@ -194,10 +301,10 @@ ostree_kernel_args_new_replace (OstreeKernelArgs *kargs, const char *key = arg_owned; const char *val = split_keyeq (arg_owned); - GPtrArray *values = g_hash_table_lookup (kargs->table, key); - if (!values) + GPtrArray *entries = g_hash_table_lookup (kargs->table, key); + if (!entries) return glnx_throw (error, "No key '%s' found", key); - g_assert_cmpuint (values->len, >, 0); + g_assert_cmpuint (entries->len, >, 0); /* first handle the case where the user just wants to replace an old value */ if (val && strchr (val, '=')) @@ -207,20 +314,18 @@ ostree_kernel_args_new_replace (OstreeKernelArgs *kargs, g_assert (new_val); guint i = 0; - if (!ot_ptr_array_find_with_equal_func (values, old_val, strcmp0_equal, &i)) + if (!ot_ptr_array_find_with_equal_func (entries, old_val, kernel_args_entry_value_equal, &i)) return glnx_throw (error, "No karg '%s=%s' found", key, old_val); - g_clear_pointer (&values->pdata[i], g_free); - values->pdata[i] = g_strdup (new_val); + kernel_args_entry_replace_value (entries->pdata[i], new_val); return TRUE; } /* can't know which val to replace without the old_val=new_val syntax */ - if (values->len > 1) + if (entries->len > 1) return glnx_throw (error, "Multiple values for key '%s' found", key); - g_clear_pointer (&values->pdata[0], g_free); - values->pdata[0] = g_strdup (val); + kernel_args_entry_replace_value (entries->pdata[0], val); return TRUE; } @@ -246,6 +351,13 @@ ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs, const char *key, GError **error) { + GPtrArray *entries = g_hash_table_lookup (kargs->table, key); + if (!entries) + return glnx_throw (error, "No key '%s' found", key); + g_assert_cmpuint (entries->len, >, 0); + + kernel_args_remove_entries_from_order (kargs->order, entries); + if (!g_hash_table_remove (kargs->table, key)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, @@ -254,10 +366,6 @@ ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs, return FALSE; } - /* Then remove the key from order table */ - guint key_index; - g_assert (ot_ptr_array_find_with_equal_func (kargs->order, key, g_str_equal, &key_index)); - g_assert (g_ptr_array_remove_index (kargs->order, key_index)); return TRUE; } @@ -294,16 +402,17 @@ ostree_kernel_args_delete (OstreeKernelArgs *kargs, const char *key = arg_owned; const char *val = split_keyeq (arg_owned); - GPtrArray *values = g_hash_table_lookup (kargs->table, key); - if (!values) + GPtrArray *entries = g_hash_table_lookup (kargs->table, key); + if (!entries) return glnx_throw (error, "No key '%s' found", key); - g_assert_cmpuint (values->len, >, 0); + g_assert_cmpuint (entries->len, >, 0); /* special-case: we allow deleting by key only if there's only one val */ - if (values->len == 1) + if (entries->len == 1) { /* but if a specific val was passed, check that it's the same */ - if (val && !strcmp0_equal (val, values->pdata[0])) + OstreeKernelArgsEntry *e = entries->pdata[0]; + if (val && !strcmp0_equal (val, _ostree_kernel_args_entry_get_value (e))) return glnx_throw (error, "No karg '%s=%s' found", key, val); return ostree_kernel_args_delete_key_entry (kargs, key, error); } @@ -311,7 +420,7 @@ ostree_kernel_args_delete (OstreeKernelArgs *kargs, /* note val might be NULL here, in which case we're looking for `key`, not `key=` or * `key=val` */ guint i = 0; - if (!ot_ptr_array_find_with_equal_func (values, val, strcmp0_equal, &i)) + if (!ot_ptr_array_find_with_equal_func (entries, val, kernel_args_entry_value_equal, &i)) { if (!val) /* didn't find NULL -> only key= key=val1 key=val2 style things left, so the user @@ -320,7 +429,8 @@ ostree_kernel_args_delete (OstreeKernelArgs *kargs, return glnx_throw (error, "No karg '%s' found", arg); } - g_ptr_array_remove_index (values, i); + g_assert (g_ptr_array_remove (kargs->order, entries->pdata[i])); + g_assert (g_ptr_array_remove_index (entries, i)); return TRUE; } @@ -340,22 +450,38 @@ ostree_kernel_args_replace_take (OstreeKernelArgs *kargs, char *arg) { gboolean existed; - GPtrArray *values = g_ptr_array_new_with_free_func (g_free); + GPtrArray *entries = g_ptr_array_new_with_free_func (kernel_args_entry_free_from_table); const char *value = split_keyeq (arg); gpointer old_key; - g_ptr_array_add (values, g_strdup (value)); - existed = g_hash_table_lookup_extended (kargs->table, arg, &old_key, NULL); + OstreeKernelArgsEntry *entry = g_new0 (OstreeKernelArgsEntry, 1); + _ostree_kernel_args_entry_set_value (entry, g_strdup (value)); + g_ptr_array_add (entries, entry); + + gpointer old_entries_ptr; + existed = g_hash_table_lookup_extended (kargs->table, arg, &old_key, &old_entries_ptr); + GPtrArray *old_entries = old_entries_ptr; if (existed) { - g_hash_table_replace (kargs->table, old_key, values); - g_free (arg); + g_assert (old_entries); + g_assert_cmpuint (old_entries->len, >, 0); + + guint old_order_index = 0; + g_assert (ot_ptr_array_find_with_equal_func (kargs->order, old_key, kernel_args_entry_key_equal, &old_order_index)); + kernel_args_remove_entries_from_order (kargs->order, old_entries); + + g_assert_cmpstr (old_key, ==, arg); + _ostree_kernel_args_entry_set_key (entry, old_key); + g_ptr_array_insert (kargs->order, old_order_index, entry); + // `arg` is freed by the `g_hash_table_insert` call. + g_hash_table_insert (kargs->table, arg, entries); } else { - g_ptr_array_add (kargs->order, arg); - g_hash_table_replace (kargs->table, arg, values); + _ostree_kernel_args_entry_set_key (entry, arg); + g_hash_table_replace (kargs->table, arg, entries); + g_ptr_array_add (kargs->order, entry); } } @@ -393,28 +519,26 @@ ostree_kernel_args_append (OstreeKernelArgs *kargs, const char *arg) { gboolean existed = TRUE; - GPtrArray *values; + GPtrArray *entries = NULL; char *duped = g_strdup (arg); const char *val = split_keyeq (duped); - values = g_hash_table_lookup (kargs->table, duped); - if (!values) + entries = g_hash_table_lookup (kargs->table, duped); + if (!entries) { - values = g_ptr_array_new_with_free_func (g_free); + entries = g_ptr_array_new_with_free_func (kernel_args_entry_free_from_table); existed = FALSE; } - g_ptr_array_add (values, g_strdup (val)); + OstreeKernelArgsEntry *entry = _ostree_kernel_args_entry_new (); + _ostree_kernel_args_entry_set_key (entry, duped); + _ostree_kernel_args_entry_set_value (entry, g_strdup (val)); + + g_ptr_array_add (entries, entry); + g_ptr_array_add (kargs->order, entry); if (!existed) - { - g_hash_table_replace (kargs->table, duped, values); - g_ptr_array_add (kargs->order, duped); - } - else - { - g_free (duped); - } + g_hash_table_replace (kargs->table, duped, entries); } /** @@ -598,20 +722,13 @@ ostree_kernel_args_to_strv (OstreeKernelArgs *kargs) for (i = 0; i < kargs->order->len; i++) { - const char *key = kargs->order->pdata[i]; - GPtrArray *values = g_hash_table_lookup (kargs->table, key); - guint j; + const char *key = _ostree_kernel_args_get_key_index (kargs, i); + const char *value = _ostree_kernel_args_get_value_index (kargs, i); - g_assert (values != NULL); - - for (j = 0; j < values->len; j++) - { - const char *value = values->pdata[j]; - if (value == NULL) - g_ptr_array_add (strv, g_strconcat (key, NULL)); - else - g_ptr_array_add (strv, g_strconcat (key, "=", value, NULL)); - } + if (value == NULL) + g_ptr_array_add (strv, g_strconcat (key, NULL)); + else + g_ptr_array_add (strv, g_strconcat (key, "=", value, NULL)); } g_ptr_array_add (strv, NULL); @@ -644,27 +761,19 @@ ostree_kernel_args_to_string (OstreeKernelArgs *kargs) for (i = 0; i < kargs->order->len; i++) { - const char *key = kargs->order->pdata[i]; - GPtrArray *values = g_hash_table_lookup (kargs->table, key); - guint j; + const char *key = _ostree_kernel_args_get_key_index (kargs, i); + const char *value = _ostree_kernel_args_get_value_index (kargs, i); - g_assert (values != NULL); + if (first) + first = FALSE; + else + g_string_append_c (buf, ' '); - for (j = 0; j < values->len; j++) + g_string_append (buf, key); + if (value != NULL) { - const char *value = values->pdata[j]; - - if (first) - first = FALSE; - else - g_string_append_c (buf, ' '); - - g_string_append (buf, key); - if (value != NULL) - { - g_string_append_c (buf, '='); - g_string_append (buf, value); - } + g_string_append_c (buf, '='); + g_string_append (buf, value); } } @@ -688,11 +797,12 @@ ostree_kernel_args_to_string (OstreeKernelArgs *kargs) const char * ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key) { - GPtrArray *values = g_hash_table_lookup (kargs->table, key); + const GPtrArray *entries = g_hash_table_lookup (kargs->table, key); - if (!values) + if (!entries) return NULL; - g_assert (values->len > 0); - return (char*)values->pdata[values->len-1]; + g_assert (entries->len > 0); + const OstreeKernelArgsEntry *e = entries->pdata[entries->len-1]; + return _ostree_kernel_args_entry_get_value (e); } diff --git a/src/libostree/ostree-kernel-args.h b/src/libostree/ostree-kernel-args.h index 3975ae5c..5c8be0c0 100644 --- a/src/libostree/ostree-kernel-args.h +++ b/src/libostree/ostree-kernel-args.h @@ -27,11 +27,40 @@ G_BEGIN_DECLS typedef struct _OstreeKernelArgs OstreeKernelArgs; +typedef struct _OstreeKernelArgsEntry OstreeKernelArgsEntry; GHashTable *_ostree_kernel_arg_get_kargs_table (OstreeKernelArgs *kargs); GPtrArray *_ostree_kernel_arg_get_key_array (OstreeKernelArgs *kargs); +char * +_ostree_kernel_args_entry_get_key (const OstreeKernelArgsEntry *e); + +char * +_ostree_kernel_args_entry_get_value (const OstreeKernelArgsEntry *e); + +void +_ostree_kernel_args_entry_set_key (OstreeKernelArgsEntry *e, + char *key); + +void +_ostree_kernel_args_entry_set_value (OstreeKernelArgsEntry *e, + char *value); + +char * +_ostree_kernel_args_get_key_index (const OstreeKernelArgs *kargs, + int i); + +char * +_ostree_kernel_args_get_value_index (const OstreeKernelArgs *kargs, + int i); + +OstreeKernelArgsEntry * +_ostree_kernel_args_entry_new (void); + +void +_ostree_kernel_args_entry_value_free (OstreeKernelArgsEntry *e); + _OSTREE_PUBLIC void ostree_kernel_args_free (OstreeKernelArgs *kargs); diff --git a/src/libostree/ostree-version.h b/src/libostree/ostree-version.h index 704f3493..e828c885 100644 --- a/src/libostree/ostree-version.h +++ b/src/libostree/ostree-version.h @@ -43,7 +43,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (5) +#define OSTREE_RELEASE_VERSION (6) /** * OSTREE_VERSION @@ -52,7 +52,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2019.5) +#define OSTREE_VERSION (2019.6) /** * OSTREE_VERSION_S: @@ -62,7 +62,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2019.5" +#define OSTREE_VERSION_S "2019.6" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) diff --git a/src/libotutil/ot-keyfile-utils.c b/src/libotutil/ot-keyfile-utils.c index 2050e969..3e028b20 100644 --- a/src/libotutil/ot-keyfile-utils.c +++ b/src/libotutil/ot-keyfile-utils.c @@ -27,6 +27,13 @@ #include +static gboolean +is_notfound (GError *error) +{ + return g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND) + || g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND); +} + gboolean ot_keyfile_get_boolean_with_default (GKeyFile *keyfile, const char *section, @@ -43,7 +50,7 @@ ot_keyfile_get_boolean_with_default (GKeyFile *keyfile, gboolean ret_bool = g_key_file_get_boolean (keyfile, section, value, &temp_error); if (temp_error) { - if (g_error_matches (temp_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) + if (is_notfound (temp_error)) { g_clear_error (&temp_error); ret_bool = default_value; @@ -75,7 +82,7 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile, g_autofree char *ret_value = g_key_file_get_value (keyfile, section, value, &temp_error); if (temp_error) { - if (g_error_matches (temp_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) + if (is_notfound (temp_error)) { g_clear_error (&temp_error); g_assert (ret_value == NULL); @@ -206,8 +213,7 @@ ot_keyfile_get_string_list_with_default (GKeyFile *keyfile, if (temp_error) { - if (g_error_matches (temp_error, G_KEY_FILE_ERROR, - G_KEY_FILE_ERROR_KEY_NOT_FOUND)) + if (is_notfound (temp_error)) { g_clear_error (&temp_error); ret_value = g_strdupv (default_value); diff --git a/src/ostree/ostree-trivial-httpd.c b/src/ostree/ostree-trivial-httpd.c index 1b7aa2a2..5d3a004e 100644 --- a/src/ostree/ostree-trivial-httpd.c +++ b/src/ostree/ostree-trivial-httpd.c @@ -50,6 +50,7 @@ static int opt_random_408s_max = 100; static gint opt_port = 0; static gchar **opt_expected_cookies; static gchar **opt_expected_headers; +static gboolean opt_require_basic_auth; static guint emitted_random_500s_count = 0; static guint emitted_random_408s_count = 0; @@ -71,6 +72,7 @@ static GOptionEntry options[] = { { "port", 'P', 0, G_OPTION_ARG_INT, &opt_port, "Use the specified TCP port", "PORT" }, { "port-file", 'p', 0, G_OPTION_ARG_FILENAME, &opt_port_file, "Write port number to PATH (- for standard output)", "PATH" }, { "force-range-requests", 0, 0, G_OPTION_ARG_NONE, &opt_force_ranges, "Force range requests by only serving half of files", NULL }, + { "require-basic-auth", 0, 0, G_OPTION_ARG_NONE, &opt_require_basic_auth, "Require username foouser, password barpw", NULL }, { "random-500s", 0, 0, G_OPTION_ARG_INT, &opt_random_500s_percentage, "Generate random HTTP 500 errors approximately for PERCENTAGE requests", "PERCENTAGE" }, { "random-500s-max", 0, 0, G_OPTION_ARG_INT, &opt_random_500s_max, "Limit HTTP 500 errors to MAX (default 100)", "MAX" }, { "random-408s", 0, 0, G_OPTION_ARG_INT, &opt_random_408s_percentage, "Generate random HTTP 408 errors approximately for PERCENTAGE requests", "PERCENTAGE" }, @@ -474,6 +476,13 @@ httpd_callback (SoupServer *server, SoupMessage *msg, soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); } +static gboolean +basic_auth_callback (SoupAuthDomain *auth_domain, SoupMessage *msg, + const char *username, const char *password, gpointer data) +{ + return g_str_equal (username, "foouser") && g_str_equal (password, "barpw"); +} + static void on_dir_changed (GFileMonitor *mon, GFile *file, @@ -571,6 +580,15 @@ run (int argc, char **argv, GCancellable *cancellable, GError **error) SOUP_SERVER_SERVER_HEADER, "ostree-httpd ", NULL); #endif + if (opt_require_basic_auth) + { + glnx_unref_object SoupAuthDomain *auth_domain = + soup_auth_domain_basic_new (SOUP_AUTH_DOMAIN_REALM, "auth-test", + SOUP_AUTH_DOMAIN_ADD_PATH, "/", + SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, basic_auth_callback, + NULL); + soup_server_add_auth_domain (server, auth_domain); + } soup_server_add_handler (server, NULL, httpd_callback, app, NULL); if (opt_port_file) diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh index f6f94288..46aafab0 100644 --- a/tests/libtest-core.sh +++ b/tests/libtest-core.sh @@ -35,14 +35,16 @@ assert_not_reached () { } # Some tests look for specific English strings. Use a UTF-8 version -# of the C (POSIX) locale if we have one, or fall back to POSIX +# of the C (POSIX) locale if we have one, or fall back to en_US.UTF-8 # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8) -if locale -a | grep '^C.UTF-8$' >/dev/null; then - export LC_ALL=C.UTF-8 -elif locale -a | grep '^C.utf8$' >/dev/null; then - export LC_ALL=C.utf8 +# +# If we can't find the locale command assume we have support for C.UTF-8 +# (e.g. musl based systems) +if type -p locale >/dev/null; then + export LC_ALL=$(locale -a | grep -Ee '\.(UTF-8|utf8)' | grep -iEe '^(C|en_US)' | head -1 || true) + if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi else - export LC_ALL=C + export LC_ALL=C.UTF-8 fi # A GNU extension, used whenever LC_ALL is not C unset LANGUAGE diff --git a/tests/libtest.sh b/tests/libtest.sh index ba00073a..3f5fd931 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -440,7 +440,9 @@ EOF ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" cd ${test_tmpdir} - cp -a osdata osdata-devel + rm -rf osdata-devel + mkdir osdata-devel + tar -C osdata -cf - . | tar -C osdata-devel -xf - cd osdata-devel mkdir -p usr/include echo "a development header" > usr/include/foo.h diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 0a97a119..2cfd8e02 100644 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -177,7 +177,7 @@ if ! skip_one_without_user_xattrs; then ${CMD_PREFIX} ostree --repo=cacherepo pull-local ostree-srv/gnomerepo main rev=$(ostree --repo=cacherepo rev-parse main) ${CMD_PREFIX} ostree --repo=cacherepo ls -R -C main > ls.txt - regfile_hash=$(grep -E -e '^-0' ls.txt | head -1 | awk '{ print $5 }') + regfile_hash=$((grep -E -e '^-0' ls.txt || true) | head -1 | awk '{ print $5 }') ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false corruptrepo $(cat httpd-address)/ostree/corruptrepo # Make this a loop so in the future we can add more object types like commit etc. for object in ${regfile_hash}.file; do diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh index aade011c..ccf66b0e 100755 --- a/tests/test-admin-deploy-karg.sh +++ b/tests/test-admin-deploy-karg.sh @@ -66,4 +66,8 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'option assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE' assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND' +# Check correct ordering of different-valued args of the same key. +${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmaster/x86_64-runtime +assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND .*FOO=TESTORDERED .*APPENDARG=3RDAPPEND' + echo "ok deploy --karg-append" diff --git a/tests/test-admin-gpg.sh b/tests/test-admin-gpg.sh index 1f50c8a9..dc776743 100755 --- a/tests/test-admin-gpg.sh +++ b/tests/test-admin-gpg.sh @@ -90,7 +90,9 @@ EOF ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome cd ${test_tmpdir} - cp -a osdata osdata-devel + rm -rf osdata-devel + mkdir osdata-devel + tar -C osdata -cf - . | tar -C osdata-devel -xf - cd osdata-devel mkdir -p usr/include echo "a development header" > usr/include/foo.h diff --git a/tests/test-kargs.c b/tests/test-kargs.c index 8d34f73c..d8370555 100644 --- a/tests/test-kargs.c +++ b/tests/test-kargs.c @@ -32,6 +32,22 @@ check_string_existance (OstreeKernelArgs *karg, return g_strv_contains ((const char* const*) string_list, string_to_find); } +static gboolean +kernel_args_entry_value_equal (gconstpointer data, + gconstpointer value) +{ + const OstreeKernelArgsEntry *e = data; + return g_strcmp0 (_ostree_kernel_args_entry_get_value (e), value) == 0; +} + +static gboolean +kernel_args_entry_key_equal (gconstpointer data, + gconstpointer key) +{ + const OstreeKernelArgsEntry *e = data; + return g_strcmp0 (_ostree_kernel_args_entry_get_key (e), key) == 0; +} + static void test_kargs_delete (void) { @@ -82,7 +98,7 @@ test_kargs_delete (void) g_assert (ret); /* verify the value array is properly updated */ GPtrArray *kargs_array = _ostree_kernel_arg_get_key_array (karg); - g_assert (!ot_ptr_array_find_with_equal_func (kargs_array, "single_key", g_str_equal, NULL)); + g_assert (!ot_ptr_array_find_with_equal_func (kargs_array, "single_key", kernel_args_entry_value_equal, NULL)); g_assert (!check_string_existance (karg, "single_key")); /* Delete specific key/value pair */ @@ -177,13 +193,6 @@ test_kargs_replace (void) g_assert (check_string_existance (karg, "test=newval")); } -static gboolean -strcmp0_equal (gconstpointer v1, - gconstpointer v2) -{ - return g_strcmp0 (v1, v2) == 0; -} - /* In this function, we want to verify that ostree_kernel_args_append * and ostree_kernel_args_to_string is correct. After that * we will use these two functions(append and tostring) in other tests: delete and replace @@ -208,22 +217,22 @@ test_kargs_append (void) { if (g_str_equal (key, "test")) { - g_assert (ot_ptr_array_find_with_equal_func (value_array, "valid", strcmp0_equal, NULL)); - g_assert (ot_ptr_array_find_with_equal_func (value_array, "secondvalid", strcmp0_equal, NULL)); - g_assert (ot_ptr_array_find_with_equal_func (value_array, "", strcmp0_equal, NULL)); - g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, strcmp0_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, "valid", kernel_args_entry_value_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, "secondvalid", kernel_args_entry_value_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, "", kernel_args_entry_value_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, kernel_args_entry_value_equal, NULL)); } else { g_assert_cmpstr (key, ==, "second_test"); - g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, strcmp0_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (value_array, NULL, kernel_args_entry_value_equal, NULL)); } } /* verify the value array is properly updated */ GPtrArray *kargs_array = _ostree_kernel_arg_get_key_array (append_arg); - g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "test", g_str_equal, NULL)); - g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "second_test", g_str_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "test", kernel_args_entry_key_equal, NULL)); + g_assert (ot_ptr_array_find_with_equal_func (kargs_array, "second_test", kernel_args_entry_key_equal, NULL)); /* Up till this point, we verified that the above was all correct, we then * check ostree_kernel_args_to_string has the right result diff --git a/tests/test-keyfile-utils.c b/tests/test-keyfile-utils.c index c580f81c..3014cf16 100644 --- a/tests/test-keyfile-utils.c +++ b/tests/test-keyfile-utils.c @@ -60,12 +60,12 @@ test_get_boolean_with_default (void) g_assert_true (out); g_clear_error (&error); - g_assert_false (ot_keyfile_get_boolean_with_default (g_keyfile, - "a_fake_section", - "a_boolean_true", - FALSE, - &out, - &error)); + g_assert (ot_keyfile_get_boolean_with_default (g_keyfile, + "a_fake_section", + "a_boolean_true", + FALSE, + &out, + &error)); } static void @@ -122,13 +122,13 @@ test_get_value_with_default (void) g_assert_cmpstr (out, ==, "correct"); g_clear_pointer (&out, g_free); - g_assert_false (ot_keyfile_get_value_with_default (g_keyfile, - "a_fake_section", - "a_value_true", - "no value", - &out, - &error)); - g_clear_error (&error); + g_assert (ot_keyfile_get_value_with_default (g_keyfile, + "a_fake_section", + "a_value_true", + "no value", + &out, + &error)); + g_assert_cmpstr (out, ==, "no value"); g_clear_pointer (&out, g_free); } diff --git a/tests/test-pull-basicauth.sh b/tests/test-pull-basicauth.sh new file mode 100755 index 00000000..4a2622a7 --- /dev/null +++ b/tests/test-pull-basicauth.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# +# Copyright (C) 2017 Colin Walters +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +set -euo pipefail + +. $(dirname $0)/libtest.sh + +setup_fake_remote_repo1 "archive" "" "--require-basic-auth" + +echo '1..3' + +repopath=${test_tmpdir}/ostree-srv/gnomerepo +cp -a ${repopath} ${repopath}.orig + +cd ${test_tmpdir} +rm repo -rf +ostree_repo_init repo +unauthaddress=$(cat httpd-address) +badauthaddress=$(echo $unauthaddress | sed -e 's,http://,http://foo:bar@,') +goodauthaddress=$(echo $unauthaddress | sed -e 's,http://,http://foouser:barpw@,') +${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin-unauth ${unauthaddress}/ostree/gnomerepo +${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin-badauth ${badauthaddress}/ostree/gnomerepo +${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin-goodauth ${goodauthaddress}/ostree/gnomerepo + +if ${CMD_PREFIX} ostree --repo=repo pull origin-unauth main 2>err.txt; then + fatal "Pulled via unauth" +fi +assert_file_has_content err.txt "401" +echo "ok unauth" +rm -f err.txt +if ${CMD_PREFIX} ostree --repo=repo pull origin-badauth main 2>err.txt; then + fatal "Pulled via badauth" +fi +assert_file_has_content err.txt "401" +rm -f err.txt +echo "ok badauth" + +${CMD_PREFIX} ostree --repo=repo pull origin-goodauth main +echo "ok basic auth" diff --git a/tests/test-pull-mirrorlist.sh b/tests/test-pull-mirrorlist.sh index 4e44852d..85ff66e9 100755 --- a/tests/test-pull-mirrorlist.sh +++ b/tests/test-pull-mirrorlist.sh @@ -47,12 +47,12 @@ setup_mirror content_mirror3 # Let's delete a file from 1 so that it falls back on 2 cd ${test_tmpdir}/content_mirror1/ostree/gnomerepo -filez=$(find objects/ -name '*.filez' | head -n 1) +filez=$((find objects/ -name '*.filez' || true) | head -n 1) rm ${filez} # Let's delete a file from 1 and 2 so that it falls back on 3 cd ${test_tmpdir}/content_mirror1/ostree/gnomerepo -filez=$(find objects/ -name '*.filez' | head -n 1) +filez=$((find objects/ -name '*.filez' || true) | head -n 1) rm ${filez} cd ${test_tmpdir}/content_mirror2/ostree/gnomerepo rm ${filez} diff --git a/tests/test-repo-finder-mount.c b/tests/test-repo-finder-mount.c index 847f4bec..af2f5e08 100644 --- a/tests/test-repo-finder-mount.c +++ b/tests/test-repo-finder-mount.c @@ -62,7 +62,9 @@ setup (Fixture *fixture, g_clear_error (&error); g_assert_no_error (error); - fixture->working_dir = g_file_new_for_path (fixture->tmpdir.path); + /* Realpath since at least coretoolbox makes /tmp a symlink to /host/tmp */ + g_autofree char *tmpdir_real_path = realpath (fixture->tmpdir.path, NULL); + fixture->working_dir = g_file_new_for_path (tmpdir_real_path); fixture->parent_repo = ot_test_setup_repo (NULL, &error); g_assert_no_error (error); @@ -443,9 +445,8 @@ test_repo_finder_mount_mixed_mounts (Fixture *fixture, } else { - g_test_message ("Unknown result ‘%s’ with keyring ‘%s’.", - result->remote->name, result->remote->keyring); - g_assert_not_reached (); + g_error ("Unknown result ‘%s’ with keyring ‘%s’", + result->remote->name, result->remote->keyring); } } diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 2287710d..a041ddb1 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 <