New upstream version 2019.2
This commit is contained in:
commit
bd32d1e5de
|
|
@ -45,7 +45,7 @@ if BUILDOPT_USE_STATIC_COMPILER
|
||||||
ostree_boot_SCRIPTS = ostree-prepare-root
|
ostree_boot_SCRIPTS = ostree-prepare-root
|
||||||
|
|
||||||
ostree-prepare-root : $(ostree_prepare_root_SOURCES)
|
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)
|
$(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
|
||||||
else
|
else
|
||||||
ostree_boot_PROGRAMS += ostree-prepare-root
|
ostree_boot_PROGRAMS += ostree-prepare-root
|
||||||
ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot
|
ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot
|
||||||
|
|
@ -57,6 +57,11 @@ ostree_remount_SOURCES = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot
|
ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot
|
||||||
|
|
||||||
|
if BUILDOPT_SYSTEMD
|
||||||
|
ostree_prepare_root_CPPFLAGS += -DHAVE_SYSTEMD=1
|
||||||
|
ostree_prepare_root_LDADD = $(AM_LDFLAGS) $(LIBSYSTEMD_LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
# This is the "new mode" of using a generator for /var; see
|
# This is the "new mode" of using a generator for /var; see
|
||||||
# https://github.com/ostreedev/ostree/issues/855
|
# https://github.com/ostreedev/ostree/issues/855
|
||||||
if BUILDOPT_SYSTEMD_AND_LIBMOUNT
|
if BUILDOPT_SYSTEMD_AND_LIBMOUNT
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ _installed_or_uninstalled_test_scripts = \
|
||||||
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
||||||
tests/test-admin-deploy-uboot.sh \
|
tests/test-admin-deploy-uboot.sh \
|
||||||
tests/test-admin-deploy-grub2.sh \
|
tests/test-admin-deploy-grub2.sh \
|
||||||
|
tests/test-admin-deploy-none.sh \
|
||||||
tests/test-admin-deploy-bootid-gc.sh \
|
tests/test-admin-deploy-bootid-gc.sh \
|
||||||
tests/test-admin-instutil-set-kargs.sh \
|
tests/test-admin-instutil-set-kargs.sh \
|
||||||
tests/test-admin-upgrade-not-backwards.sh \
|
tests/test-admin-upgrade-not-backwards.sh \
|
||||||
|
|
|
||||||
123
Makefile.in
123
Makefile.in
|
|
@ -505,46 +505,47 @@ check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13)
|
||||||
# and if we declare it here, it gets cleaned up properly
|
# and if we declare it here, it gets cleaned up properly
|
||||||
@BUILDOPT_SYSTEMD_FALSE@am__append_57 = ostree-remount
|
@BUILDOPT_SYSTEMD_FALSE@am__append_57 = ostree-remount
|
||||||
@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_58 = ostree-prepare-root
|
@BUILDOPT_USE_STATIC_COMPILER_FALSE@am__append_58 = ostree-prepare-root
|
||||||
|
@BUILDOPT_SYSTEMD_TRUE@am__append_59 = -DHAVE_SYSTEMD=1
|
||||||
|
|
||||||
# This is the "new mode" of using a generator for /var; see
|
# This is the "new mode" of using a generator for /var; see
|
||||||
# https://github.com/ostreedev/ostree/issues/855
|
# https://github.com/ostreedev/ostree/issues/855
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_59 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
|
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
|
||||||
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_61 = -DHAVE_SYSTEMD_AND_LIBMOUNT=1
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT)
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@systemdsystemgenerator_PROGRAMS = ostree-system-generator$(EXEEXT)
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_61 = $(systemdsystemgenerator_PROGRAMS)
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_62 = $(systemdsystemgenerator_PROGRAMS)
|
||||||
|
|
||||||
# Allow the distcheck install under $prefix test to pass
|
# Allow the distcheck install under $prefix test to pass
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_62 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators'
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_63 = --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators'
|
||||||
@BUILDOPT_FUSE_TRUE@am__append_63 = rofiles-fuse
|
@BUILDOPT_FUSE_TRUE@am__append_64 = rofiles-fuse
|
||||||
@BUILDOPT_ASAN_TRUE@am__append_64 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc
|
@BUILDOPT_ASAN_TRUE@am__append_65 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc
|
||||||
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_65 = $(experimental_test_scripts)
|
@ENABLE_EXPERIMENTAL_API_TRUE@am__append_66 = $(experimental_test_scripts)
|
||||||
@ENABLE_EXPERIMENTAL_API_FALSE@am__append_66 = $(experimental_test_scripts)
|
@ENABLE_EXPERIMENTAL_API_FALSE@am__append_67 = $(experimental_test_scripts)
|
||||||
@BUILDOPT_FUSE_TRUE@am__append_67 = tests/test-rofiles-fuse.sh
|
@BUILDOPT_FUSE_TRUE@am__append_68 = tests/test-rofiles-fuse.sh
|
||||||
@BUILDOPT_FUSE_TRUE@am__append_68 = tests/rofiles-fuse-symlink-stamp
|
@BUILDOPT_FUSE_TRUE@am__append_69 = tests/rofiles-fuse-symlink-stamp
|
||||||
@BUILDOPT_FUSE_FALSE@am__append_69 = tests/test-rofiles-fuse.sh
|
@BUILDOPT_FUSE_FALSE@am__append_70 = tests/test-rofiles-fuse.sh
|
||||||
@USE_LIBSOUP_TRUE@am__append_70 = tests/test-remote-cookies.sh
|
@USE_LIBSOUP_TRUE@am__append_71 = tests/test-remote-cookies.sh
|
||||||
@BUILDOPT_GJS_TRUE@am__append_71 = $(js_tests) $(js_installed_tests)
|
@BUILDOPT_GJS_TRUE@am__append_72 = $(js_tests) $(js_installed_tests)
|
||||||
@BUILDOPT_GJS_FALSE@am__append_72 = $(js_tests)
|
@BUILDOPT_GJS_FALSE@am__append_73 = $(js_tests)
|
||||||
@BUILDOPT_GJS_FALSE@am__append_73 = $(js_installed_tests)
|
@BUILDOPT_GJS_FALSE@am__append_74 = $(js_installed_tests)
|
||||||
@ENABLE_INSTALLED_TESTS_FALSE@am__append_74 = -rpath $(abs_builddir)
|
@ENABLE_INSTALLED_TESTS_FALSE@am__append_75 = -rpath $(abs_builddir)
|
||||||
@USE_AVAHI_TRUE@am__append_75 = tests/test-repo-finder-avahi
|
@USE_AVAHI_TRUE@am__append_76 = tests/test-repo-finder-avahi
|
||||||
@USE_LIBARCHIVE_TRUE@am__append_76 = tests/test-libarchive-import
|
@USE_LIBARCHIVE_TRUE@am__append_77 = tests/test-libarchive-import
|
||||||
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_77 = $(_installed_or_uninstalled_test_scripts)
|
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_78 = $(_installed_or_uninstalled_test_scripts)
|
||||||
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_78 = $(_installed_or_uninstalled_test_programs)
|
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_79 = $(_installed_or_uninstalled_test_programs)
|
||||||
@ENABLE_INSTALLED_TESTS_TRUE@am__append_79 = install-installed-tests-extra
|
@ENABLE_INSTALLED_TESTS_TRUE@am__append_80 = install-installed-tests-extra
|
||||||
|
|
||||||
# Allow the distcheck install under $prefix test to pass
|
# Allow the distcheck install under $prefix test to pass
|
||||||
@BUILDOPT_SYSTEMD_TRUE@am__append_80 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
|
@BUILDOPT_SYSTEMD_TRUE@am__append_81 = --with-systemdsystemunitdir='$${libdir}/systemd/system'
|
||||||
|
|
||||||
# We're using the system grub2-mkconfig generator
|
# We're using the system grub2-mkconfig generator
|
||||||
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_81 = src/boot/grub2/grub2-15_ostree
|
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_82 = src/boot/grub2/grub2-15_ostree
|
||||||
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_82 = install-grub2-config-hook
|
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_83 = install-grub2-config-hook
|
||||||
@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_83 = ostree-trivial-httpd.1
|
@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_84 = ostree-trivial-httpd.1
|
||||||
# We still want to distribute the source, even if we are not building it
|
# We still want to distribute the source, even if we are not building it
|
||||||
@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_84 = man/ostree-trivial-httpd.xml
|
@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_85 = man/ostree-trivial-httpd.xml
|
||||||
@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_85 = rofiles-fuse.1
|
@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_86 = rofiles-fuse.1
|
||||||
@ENABLE_MAN_TRUE@am__append_86 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
|
@ENABLE_MAN_TRUE@am__append_87 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
|
||||||
@ENABLE_MAN_TRUE@am__append_87 = \
|
@ENABLE_MAN_TRUE@am__append_88 = \
|
||||||
@ENABLE_MAN_TRUE@ $(man1_MANS) \
|
@ENABLE_MAN_TRUE@ $(man1_MANS) \
|
||||||
@ENABLE_MAN_TRUE@ $(man5_MANS) \
|
@ENABLE_MAN_TRUE@ $(man5_MANS) \
|
||||||
@ENABLE_MAN_TRUE@ $(NULL)
|
@ENABLE_MAN_TRUE@ $(NULL)
|
||||||
|
|
@ -1079,7 +1080,8 @@ ostree_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
am_ostree_prepare_root_OBJECTS = src/switchroot/ostree_prepare_root-ostree-prepare-root.$(OBJEXT) \
|
am_ostree_prepare_root_OBJECTS = src/switchroot/ostree_prepare_root-ostree-prepare-root.$(OBJEXT) \
|
||||||
$(am__objects_1)
|
$(am__objects_1)
|
||||||
ostree_prepare_root_OBJECTS = $(am_ostree_prepare_root_OBJECTS)
|
ostree_prepare_root_OBJECTS = $(am_ostree_prepare_root_OBJECTS)
|
||||||
ostree_prepare_root_LDADD = $(LDADD)
|
@BUILDOPT_SYSTEMD_TRUE@ostree_prepare_root_DEPENDENCIES = \
|
||||||
|
@BUILDOPT_SYSTEMD_TRUE@ $(am__DEPENDENCIES_1)
|
||||||
ostree_prepare_root_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
ostree_prepare_root_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||||
$(ostree_prepare_root_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
$(ostree_prepare_root_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||||
|
|
@ -1909,6 +1911,7 @@ am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \
|
||||||
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
||||||
tests/test-admin-deploy-uboot.sh \
|
tests/test-admin-deploy-uboot.sh \
|
||||||
tests/test-admin-deploy-grub2.sh \
|
tests/test-admin-deploy-grub2.sh \
|
||||||
|
tests/test-admin-deploy-none.sh \
|
||||||
tests/test-admin-deploy-bootid-gc.sh \
|
tests/test-admin-deploy-bootid-gc.sh \
|
||||||
tests/test-admin-instutil-set-kargs.sh \
|
tests/test-admin-instutil-set-kargs.sh \
|
||||||
tests/test-admin-upgrade-not-backwards.sh \
|
tests/test-admin-upgrade-not-backwards.sh \
|
||||||
|
|
@ -1930,8 +1933,8 @@ am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \
|
||||||
tests/test-repo-finder-mount-integration.sh \
|
tests/test-repo-finder-mount-integration.sh \
|
||||||
tests/test-summary-collections.sh \
|
tests/test-summary-collections.sh \
|
||||||
tests/test-pull-collections.sh tests/test-config.sh \
|
tests/test-pull-collections.sh tests/test-config.sh \
|
||||||
$(am__EXEEXT_2) $(am__EXEEXT_20) $(am__append_67) \
|
$(am__EXEEXT_2) $(am__EXEEXT_20) $(am__append_68) \
|
||||||
$(am__append_70) $(am__EXEEXT_22)
|
$(am__append_71) $(am__EXEEXT_22)
|
||||||
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \
|
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \
|
||||||
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23)
|
@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23)
|
||||||
am__EXEEXT_25 = $(am__EXEEXT_2) $(am__EXEEXT_24)
|
am__EXEEXT_25 = $(am__EXEEXT_2) $(am__EXEEXT_24)
|
||||||
|
|
@ -2230,8 +2233,8 @@ AM_CFLAGS = -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS)
|
||||||
|
|
||||||
# Allow the distcheck install under $prefix test to pass
|
# Allow the distcheck install under $prefix test to pass
|
||||||
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \
|
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \
|
||||||
--disable-maintainer-mode $(NULL) $(am__append_62) \
|
--disable-maintainer-mode $(NULL) $(am__append_63) \
|
||||||
$(am__append_80) \
|
$(am__append_81) \
|
||||||
BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions'
|
BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions'
|
||||||
SUBDIRS = . $(am__append_14)
|
SUBDIRS = . $(am__append_14)
|
||||||
NULL =
|
NULL =
|
||||||
|
|
@ -2244,7 +2247,7 @@ CLEANFILES = $(am__append_13) $(BUILT_SOURCES) $(am__append_47) \
|
||||||
tests/ostree-remount-symlink-stamp \
|
tests/ostree-remount-symlink-stamp \
|
||||||
tests/rofiles-fuse-symlink-stamp tests/ostree \
|
tests/rofiles-fuse-symlink-stamp tests/ostree \
|
||||||
tests/ostree-prepare-root tests/ostree-remount \
|
tests/ostree-prepare-root tests/ostree-remount \
|
||||||
tests/rofiles-fuse $(am__append_87)
|
tests/rofiles-fuse $(am__append_88)
|
||||||
EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
|
EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
|
||||||
COPYING README.md $(am__append_15) libglnx/README.md \
|
COPYING README.md $(am__append_15) libglnx/README.md \
|
||||||
libglnx/COPYING libglnx/libglnx.m4 $(NULL) \
|
libglnx/COPYING libglnx/libglnx.m4 $(NULL) \
|
||||||
|
|
@ -2260,8 +2263,8 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
|
||||||
src/libostree/ostree-repo-deprecated.h \
|
src/libostree/ostree-repo-deprecated.h \
|
||||||
src/libostree/ostree-version.h src/ostree/parse-datetime.y \
|
src/libostree/ostree-version.h src/ostree/parse-datetime.y \
|
||||||
buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \
|
buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \
|
||||||
tests/ostree.supp $(NULL) $(am__append_66) $(am__append_69) \
|
tests/ostree.supp $(NULL) $(am__append_67) $(am__append_70) \
|
||||||
$(am__append_72) tests/libtest.sh $(am__append_73) \
|
$(am__append_73) tests/libtest.sh $(am__append_74) \
|
||||||
tests/libostreetest.h tests/libtest.sh \
|
tests/libostreetest.h tests/libtest.sh \
|
||||||
tests/gpg-verify-data/README.md $(NULL) \
|
tests/gpg-verify-data/README.md $(NULL) \
|
||||||
src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \
|
src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \
|
||||||
|
|
@ -2271,11 +2274,11 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
|
||||||
src/boot/ostree-remount.service \
|
src/boot/ostree-remount.service \
|
||||||
src/boot/ostree-finalize-staged.service \
|
src/boot/ostree-finalize-staged.service \
|
||||||
src/boot/grub2/grub2-15_ostree \
|
src/boot/grub2/grub2-15_ostree \
|
||||||
src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_84) \
|
src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_85) \
|
||||||
$(am__append_86)
|
$(am__append_87)
|
||||||
bin_SCRIPTS =
|
bin_SCRIPTS =
|
||||||
lib_LTLIBRARIES = libostree-1.la
|
lib_LTLIBRARIES = libostree-1.la
|
||||||
pkglibexec_SCRIPTS = $(am__append_81)
|
pkglibexec_SCRIPTS = $(am__append_82)
|
||||||
noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \
|
noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \
|
||||||
libotutil.la libostree-kernel-args.la $(am__append_17) \
|
libotutil.la libostree-kernel-args.la $(am__append_17) \
|
||||||
libostreetest.la
|
libostreetest.la
|
||||||
|
|
@ -2306,7 +2309,7 @@ AM_TESTS_ENVIRONMENT = G_TEST_SRCDIR="$(abs_srcdir)" \
|
||||||
pwd)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}} PATH=$$(cd \
|
pwd)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}} PATH=$$(cd \
|
||||||
$(top_builddir)/tests && pwd):$${PATH} \
|
$(top_builddir)/tests && pwd):$${PATH} \
|
||||||
OSTREE_FEATURES="$(OSTREE_FEATURES)" PYTHONUNBUFFERED=1 \
|
OSTREE_FEATURES="$(OSTREE_FEATURES)" PYTHONUNBUFFERED=1 \
|
||||||
$(NULL) $(am__append_64)
|
$(NULL) $(am__append_65)
|
||||||
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/buildutil/tap-driver.sh
|
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/buildutil/tap-driver.sh
|
||||||
LOG_COMPILER = $(top_srcdir)/buildutil/tap-test
|
LOG_COMPILER = $(top_srcdir)/buildutil/tap-test
|
||||||
installed_test_LTLIBRARIES = $(am__append_12)
|
installed_test_LTLIBRARIES = $(am__append_12)
|
||||||
|
|
@ -2346,14 +2349,14 @@ all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installe
|
||||||
# This initializes some more variables
|
# This initializes some more variables
|
||||||
|
|
||||||
# This is a special facility to chain together hooks easily
|
# This is a special facility to chain together hooks easily
|
||||||
INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_79) \
|
INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_80) \
|
||||||
$(am__append_82)
|
$(am__append_83)
|
||||||
ALL_LOCAL_RULES = tests/libreaddir-rand.so
|
ALL_LOCAL_RULES = tests/libreaddir-rand.so
|
||||||
shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||')
|
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)
|
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}
|
ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS}
|
||||||
GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \
|
GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in \
|
||||||
gtk-doc.make $(am__append_61)
|
gtk-doc.make $(am__append_62)
|
||||||
OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS)
|
OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS)
|
||||||
OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS)
|
OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS)
|
||||||
OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS)
|
OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS)
|
||||||
|
|
@ -2694,7 +2697,8 @@ ostree_prepare_root_SOURCES = \
|
||||||
src/switchroot/ostree-prepare-root.c \
|
src/switchroot/ostree-prepare-root.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_59)
|
ostree_prepare_root_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_59) \
|
||||||
|
$(am__append_60)
|
||||||
# We're using our internal generator
|
# We're using our internal generator
|
||||||
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
|
@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_TRUE@ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
|
||||||
|
|
||||||
|
|
@ -2716,7 +2720,8 @@ ostree_remount_SOURCES = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \
|
ostree_remount_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/switchroot \
|
||||||
$(am__append_60)
|
$(am__append_61)
|
||||||
|
@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@ostree_system_generator_SOURCES = src/switchroot/ostree-mount-util.h \
|
||||||
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ src/switchroot/ostree-system-generator.c
|
@BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@ src/switchroot/ostree-system-generator.c
|
||||||
|
|
||||||
|
|
@ -2731,7 +2736,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
|
@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 \
|
uninstalled_test_data = tests/ostree-symlink-stamp \
|
||||||
tests/ostree-prepare-root-symlink-stamp \
|
tests/ostree-prepare-root-symlink-stamp \
|
||||||
tests/ostree-remount-symlink-stamp $(am__append_68)
|
tests/ostree-remount-symlink-stamp $(am__append_69)
|
||||||
dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
|
dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
|
||||||
|
|
||||||
# This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below.
|
# This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below.
|
||||||
|
|
@ -2739,10 +2744,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.
|
# 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
|
# This overrides the glib-tap.mk emphasis on doing both, if we'd
|
||||||
# used e.g. `dist_test_scripts`.
|
# used e.g. `dist_test_scripts`.
|
||||||
dist_test_scripts = $(NULL) $(am__append_77)
|
dist_test_scripts = $(NULL) $(am__append_78)
|
||||||
test_programs = tests/test-bloom tests/test-repo-finder-config \
|
test_programs = tests/test-bloom tests/test-repo-finder-config \
|
||||||
tests/test-repo-finder-mount $(NULL) $(am__append_75) \
|
tests/test-repo-finder-mount $(NULL) $(am__append_76) \
|
||||||
$(am__append_78)
|
$(am__append_79)
|
||||||
_installed_or_uninstalled_test_scripts = tests/test-basic.sh \
|
_installed_or_uninstalled_test_scripts = tests/test-basic.sh \
|
||||||
tests/test-basic-user.sh tests/test-basic-user-only.sh \
|
tests/test-basic-user.sh tests/test-basic-user-only.sh \
|
||||||
tests/test-basic-root.sh tests/test-pull-subpath.sh \
|
tests/test-basic-root.sh tests/test-pull-subpath.sh \
|
||||||
|
|
@ -2770,6 +2775,7 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \
|
||||||
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
tests/test-admin-deploy-etcmerge-cornercases.sh \
|
||||||
tests/test-admin-deploy-uboot.sh \
|
tests/test-admin-deploy-uboot.sh \
|
||||||
tests/test-admin-deploy-grub2.sh \
|
tests/test-admin-deploy-grub2.sh \
|
||||||
|
tests/test-admin-deploy-none.sh \
|
||||||
tests/test-admin-deploy-bootid-gc.sh \
|
tests/test-admin-deploy-bootid-gc.sh \
|
||||||
tests/test-admin-instutil-set-kargs.sh \
|
tests/test-admin-instutil-set-kargs.sh \
|
||||||
tests/test-admin-upgrade-not-backwards.sh \
|
tests/test-admin-upgrade-not-backwards.sh \
|
||||||
|
|
@ -2791,8 +2797,8 @@ _installed_or_uninstalled_test_scripts = tests/test-basic.sh \
|
||||||
tests/test-repo-finder-mount-integration.sh \
|
tests/test-repo-finder-mount-integration.sh \
|
||||||
tests/test-summary-collections.sh \
|
tests/test-summary-collections.sh \
|
||||||
tests/test-pull-collections.sh tests/test-config.sh $(NULL) \
|
tests/test-pull-collections.sh tests/test-config.sh $(NULL) \
|
||||||
$(am__append_65) $(am__append_67) $(am__append_70) \
|
$(am__append_66) $(am__append_68) $(am__append_71) \
|
||||||
$(am__append_71)
|
$(am__append_72)
|
||||||
experimental_test_scripts = \
|
experimental_test_scripts = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
@ -2862,7 +2868,7 @@ libreaddir_rand_la_LIBADD = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \
|
libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \
|
||||||
$(am__append_74)
|
$(am__append_75)
|
||||||
_installed_or_uninstalled_test_programs = tests/test-varint \
|
_installed_or_uninstalled_test_programs = tests/test-varint \
|
||||||
tests/test-ot-unix-utils tests/test-bsdiff \
|
tests/test-ot-unix-utils tests/test-bsdiff \
|
||||||
tests/test-mutable-tree tests/test-keyfile-utils \
|
tests/test-mutable-tree tests/test-keyfile-utils \
|
||||||
|
|
@ -2870,7 +2876,7 @@ _installed_or_uninstalled_test_programs = tests/test-varint \
|
||||||
tests/test-gpg-verify-result tests/test-checksum \
|
tests/test-gpg-verify-result tests/test-checksum \
|
||||||
tests/test-lzma tests/test-rollsum tests/test-basic-c \
|
tests/test-lzma tests/test-rollsum tests/test-basic-c \
|
||||||
tests/test-sysroot-c tests/test-pull-c tests/test-repo \
|
tests/test-sysroot-c tests/test-pull-c tests/test-repo \
|
||||||
tests/test-include-ostree-h $(am__append_76)
|
tests/test-include-ostree-h $(am__append_77)
|
||||||
common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx
|
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)
|
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
|
libostreetest_la_SOURCES = tests/libostreetest.c tests/test-mock-gio.c tests/test-mock-gio.h
|
||||||
|
|
@ -2985,7 +2991,7 @@ tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
|
||||||
@ENABLE_MAN_TRUE@ ostree-refs.1 ostree-remote.1 ostree-reset.1 \
|
@ENABLE_MAN_TRUE@ ostree-refs.1 ostree-remote.1 ostree-reset.1 \
|
||||||
@ENABLE_MAN_TRUE@ ostree-rev-parse.1 ostree-show.1 \
|
@ENABLE_MAN_TRUE@ ostree-rev-parse.1 ostree-show.1 \
|
||||||
@ENABLE_MAN_TRUE@ ostree-summary.1 ostree-static-delta.1 \
|
@ENABLE_MAN_TRUE@ ostree-summary.1 ostree-static-delta.1 \
|
||||||
@ENABLE_MAN_TRUE@ $(am__append_83) $(am__append_85)
|
@ENABLE_MAN_TRUE@ $(am__append_84) $(am__append_86)
|
||||||
@ENABLE_MAN_TRUE@man5_files = ostree.repo.5 ostree.repo-config.5
|
@ENABLE_MAN_TRUE@man5_files = ostree.repo.5 ostree.repo-config.5
|
||||||
@ENABLE_MAN_TRUE@man1_MANS = $(addprefix man/,$(man1_files))
|
@ENABLE_MAN_TRUE@man1_MANS = $(addprefix man/,$(man1_files))
|
||||||
@ENABLE_MAN_TRUE@man5_MANS = $(addprefix man/,$(man5_files))
|
@ENABLE_MAN_TRUE@man5_MANS = $(addprefix man/,$(man5_files))
|
||||||
|
|
@ -7923,6 +7929,13 @@ tests/test-admin-deploy-grub2.sh.log: tests/test-admin-deploy-grub2.sh
|
||||||
--log-file $$b.log --trs-file $$b.trs \
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
tests/test-admin-deploy-none.sh.log: tests/test-admin-deploy-none.sh
|
||||||
|
@p='tests/test-admin-deploy-none.sh'; \
|
||||||
|
b='tests/test-admin-deploy-none.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-admin-deploy-bootid-gc.sh.log: tests/test-admin-deploy-bootid-gc.sh
|
tests/test-admin-deploy-bootid-gc.sh.log: tests/test-admin-deploy-bootid-gc.sh
|
||||||
@p='tests/test-admin-deploy-bootid-gc.sh'; \
|
@p='tests/test-admin-deploy-bootid-gc.sh'; \
|
||||||
b='tests/test-admin-deploy-bootid-gc.sh'; \
|
b='tests/test-admin-deploy-bootid-gc.sh'; \
|
||||||
|
|
@ -9172,7 +9185,7 @@ src/ostree/parse-datetime.c: src/ostree/parse-datetime.y Makefile
|
||||||
$(AM_V_GEN) $(YACC) $< -o $@
|
$(AM_V_GEN) $(YACC) $< -o $@
|
||||||
|
|
||||||
@BUILDOPT_USE_STATIC_COMPILER_TRUE@ostree-prepare-root : $(ostree_prepare_root_SOURCES)
|
@BUILDOPT_USE_STATIC_COMPILER_TRUE@ostree-prepare-root : $(ostree_prepare_root_SOURCES)
|
||||||
@BUILDOPT_USE_STATIC_COMPILER_TRUE@ $(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(ostree_prepare_root_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES)
|
@BUILDOPT_USE_STATIC_COMPILER_TRUE@ $(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
|
||||||
|
|
||||||
tests/libreaddir-rand.so: Makefile
|
tests/libreaddir-rand.so: Makefile
|
||||||
mkdir -p tests/
|
mkdir -p tests/
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ version of
|
||||||
- Support for parallel installing more than just 2 bootable roots
|
- Support for parallel installing more than just 2 bootable roots
|
||||||
- Binary history on the server side (and client)
|
- Binary history on the server side (and client)
|
||||||
- Introspectable shared library API for build and deployment systems
|
- Introspectable shared library API for build and deployment systems
|
||||||
- Flexible support for multiple branches and repositories, supporting
|
- Flexible support for multiple branches and repositories, supporting
|
||||||
projects like [flatpak](https://github.com/flatpak/flatpak) which
|
projects like [flatpak](https://github.com/flatpak/flatpak) which
|
||||||
use libostree for applications, rather than hosts.
|
use libostree for applications, rather than hosts.
|
||||||
|
|
||||||
|
|
@ -74,6 +74,9 @@ The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
|
||||||
integration tool uses libostree as a caching system to store and share
|
integration tool uses libostree as a caching system to store and share
|
||||||
built artifacts.
|
built artifacts.
|
||||||
|
|
||||||
|
[Liri OS](https://liri.io/download/silverblue/) has the option to install
|
||||||
|
their distribution using ostree.
|
||||||
|
|
||||||
Language bindings
|
Language bindings
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
||||||
# Owen Taylor 1997-2001
|
# Owen Taylor 1997-2001
|
||||||
|
|
||||||
# Increment this whenever this file is changed.
|
# Increment this whenever this file is changed.
|
||||||
#serial 1
|
#serial 3
|
||||||
|
|
||||||
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
|
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
|
||||||
|
|
@ -34,10 +34,16 @@ AC_DEFUN([AM_PATH_GLIB_2_0],
|
||||||
[dnl
|
[dnl
|
||||||
dnl Get the cflags and libraries from pkg-config
|
dnl Get the cflags and libraries from pkg-config
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
dnl We can't use PKG_PREREQ because that needs 0.29.
|
||||||
|
m4_ifndef([PKG_PROG_PKG_CONFIG],
|
||||||
|
[pkg.m4 version 0.28 or later is required])
|
||||||
|
|
||||||
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
|
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
|
||||||
, enable_glibtest=yes)
|
, enable_glibtest=yes)
|
||||||
|
|
||||||
pkg_config_args=glib-2.0
|
min_glib_version=ifelse([$1], [], [2.0.0], [$1])
|
||||||
|
pkg_config_args="glib-2.0 >= $min_glib_version"
|
||||||
for module in . $4
|
for module in . $4
|
||||||
do
|
do
|
||||||
case "$module" in
|
case "$module" in
|
||||||
|
|
@ -68,7 +74,15 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
|
||||||
PKG_CONFIG=no
|
PKG_CONFIG=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
min_glib_version=ifelse([$1], ,2.0.0,$1)
|
dnl For GLIB_CFLAGS and GLIB_LIBS
|
||||||
|
PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
|
||||||
|
|
||||||
|
dnl For the tools
|
||||||
|
PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
|
||||||
|
PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.0], [gobject_query])
|
||||||
|
PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
|
||||||
|
PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
||||||
|
|
||||||
if test x$PKG_CONFIG != xno ; then
|
if test x$PKG_CONFIG != xno ; then
|
||||||
|
|
@ -86,13 +100,6 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$no_glib" = x ; then
|
if test x"$no_glib" = x ; then
|
||||||
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
|
|
||||||
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
|
|
||||||
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
|
|
||||||
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
|
|
||||||
|
|
||||||
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
|
|
||||||
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
|
|
||||||
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||||
|
|
@ -226,12 +233,6 @@ main (void)
|
||||||
GLIB_COMPILE_RESOURCES=""
|
GLIB_COMPILE_RESOURCES=""
|
||||||
ifelse([$3], , :, [$3])
|
ifelse([$3], , :, [$3])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(GLIB_CFLAGS)
|
|
||||||
AC_SUBST(GLIB_LIBS)
|
|
||||||
AC_SUBST(GLIB_GENMARSHAL)
|
|
||||||
AC_SUBST(GOBJECT_QUERY)
|
|
||||||
AC_SUBST(GLIB_MKENUMS)
|
|
||||||
AC_SUBST(GLIB_COMPILE_RESOURCES)
|
|
||||||
rm -f conf.glibtest
|
rm -f conf.glibtest
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="titlepage">
|
<div class="titlepage">
|
||||||
<div>
|
<div>
|
||||||
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">OSTree API references</p></th></tr></table></div>
|
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">OSTree API references</p></th></tr></table></div>
|
||||||
<div><p class="releaseinfo">for OSTree 2019.1</p></div>
|
<div><p class="releaseinfo">for OSTree 2019.2</p></div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,13 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||||||
|
</td>
|
||||||
|
<td class="function_name">
|
||||||
|
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-bootloader" title="ostree_repo_get_bootloader ()">ostree_repo_get_bootloader</a> <span class="c_punctuation">()</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="function_type">
|
<td class="function_type">
|
||||||
<span class="returnvalue">GFile</span> *
|
<span class="returnvalue">GFile</span> *
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -1646,6 +1653,34 @@ this function on a repository initialized via <a class="link" href="ostree-Ostre
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="refsect2">
|
<div class="refsect2">
|
||||||
|
<a name="ostree-repo-get-bootloader"></a><h3>ostree_repo_get_bootloader ()</h3>
|
||||||
|
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||||||
|
ostree_repo_get_bootloader (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
|
||||||
|
<p>Get the bootloader configured. See the documentation for the
|
||||||
|
"sysroot.bootloader" config key.</p>
|
||||||
|
<div class="refsect3">
|
||||||
|
<a name="ostree-repo-get-bootloader.parameters"></a><h4>Parameters</h4>
|
||||||
|
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||||
|
<colgroup>
|
||||||
|
<col width="150px" class="parameters_name">
|
||||||
|
<col class="parameters_description">
|
||||||
|
<col width="200px" class="parameters_annotations">
|
||||||
|
</colgroup>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="parameter_name"><p>self</p></td>
|
||||||
|
<td class="parameter_description"><p>an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a></p></td>
|
||||||
|
<td class="parameter_annotations"> </td>
|
||||||
|
</tr></tbody>
|
||||||
|
</table></div>
|
||||||
|
</div>
|
||||||
|
<div class="refsect3">
|
||||||
|
<a name="ostree-repo-get-bootloader.returns"></a><h4>Returns</h4>
|
||||||
|
<p> bootloader configuration for the sysroot</p>
|
||||||
|
</div>
|
||||||
|
<p class="since">Since: 2019.2</p>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="refsect2">
|
||||||
<a name="ostree-repo-get-path"></a><h3>ostree_repo_get_path ()</h3>
|
<a name="ostree-repo-get-path"></a><h3>ostree_repo_get_path ()</h3>
|
||||||
<pre class="programlisting"><span class="returnvalue">GFile</span> *
|
<pre class="programlisting"><span class="returnvalue">GFile</span> *
|
||||||
ostree_repo_get_path (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
|
ostree_repo_get_path (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
|
||||||
|
|
@ -3952,6 +3987,8 @@ the parameter <em class="parameter"><code>out_rev</code></em>
|
||||||
. Differently from <a class="link" href="ostree-OstreeRepo.html#ostree-repo-resolve-rev" title="ostree_repo_resolve_rev ()"><code class="function">ostree_repo_resolve_rev()</code></a>,
|
. Differently from <a class="link" href="ostree-OstreeRepo.html#ostree-repo-resolve-rev" title="ostree_repo_resolve_rev ()"><code class="function">ostree_repo_resolve_rev()</code></a>,
|
||||||
this will not fall back to searching through remote repos if a
|
this will not fall back to searching through remote repos if a
|
||||||
local ref is specified but not found.</p>
|
local ref is specified but not found.</p>
|
||||||
|
<p>The flag <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-RESOLVE-REV-EXT-LOCAL-ONLY:CAPS"><code class="literal">OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY</code></a> is implied so
|
||||||
|
using it has no effect.</p>
|
||||||
<div class="refsect3">
|
<div class="refsect3">
|
||||||
<a name="ostree-repo-resolve-rev-ext.parameters"></a><h4>Parameters</h4>
|
<a name="ostree-repo-resolve-rev-ext.parameters"></a><h4>Parameters</h4>
|
||||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||||
|
|
@ -7176,7 +7213,14 @@ string to pull the latest commit for that ref</p></li>
|
||||||
<li class="listitem"><p>append-user-agent (s): Additional string to append to the user agent</p></li>
|
<li class="listitem"><p>append-user-agent (s): Additional string to append to the user agent</p></li>
|
||||||
<li class="listitem"><p>n-network-retries (u): Number of times to retry each download on receiving
|
<li class="listitem"><p>n-network-retries (u): Number of times to retry each download on receiving
|
||||||
a transient network error, such as a socket timeout; default is 5, 0
|
a transient network error, such as a socket timeout; default is 5, 0
|
||||||
means return errors without retrying</p></li>
|
means return errors without retrying. Since: 2018.6</p></li>
|
||||||
|
<li class="listitem"><p>ref-keyring-map (a(sss)): Array of (collection ID, ref name, keyring
|
||||||
|
remote name) tuples specifying which remote's keyring should be used when
|
||||||
|
doing GPG verification of each collection-ref. This is useful to prevent a
|
||||||
|
remote from serving malicious updates to refs which did not originate from
|
||||||
|
it. This can be a subset or superset of the refs being pulled; any ref
|
||||||
|
not being pulled will be ignored and any ref without a keyring remote
|
||||||
|
will be verified with the keyring of the remote being pulled from.</p></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="refsect3">
|
<div class="refsect3">
|
||||||
<a name="ostree-repo-pull-with-options.parameters"></a><h4>Parameters</h4>
|
<a name="ostree-repo-pull-with-options.parameters"></a><h4>Parameters</h4>
|
||||||
|
|
@ -7220,6 +7264,7 @@ means return errors without retrying</p></li>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="since">Since: 2019.2</p>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="refsect2">
|
<div class="refsect2">
|
||||||
|
|
@ -7890,6 +7935,13 @@ possible modes.</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="enum_member_annotations"> </td>
|
<td class="enum_member_annotations"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="enum_member_name"><p><a name="OSTREE-REPO-REMOTE-CHANGE-REPLACE:CAPS"></a>OSTREE_REPO_REMOTE_CHANGE_REPLACE</p></td>
|
||||||
|
<td class="enum_member_description">
|
||||||
|
<p>Add or replace a remote (Since: 2019.2)</p>
|
||||||
|
</td>
|
||||||
|
<td class="enum_member_annotations"> </td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -7992,13 +8044,22 @@ in bytes, counting only content objects.</p></td>
|
||||||
<col class="enum_members_description">
|
<col class="enum_members_description">
|
||||||
<col width="200px" class="enum_members_annotations">
|
<col width="200px" class="enum_members_annotations">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody><tr>
|
<tbody>
|
||||||
|
<tr>
|
||||||
<td class="enum_member_name"><p><a name="OSTREE-REPO-RESOLVE-REV-EXT-NONE:CAPS"></a>OSTREE_REPO_RESOLVE_REV_EXT_NONE</p></td>
|
<td class="enum_member_name"><p><a name="OSTREE-REPO-RESOLVE-REV-EXT-NONE:CAPS"></a>OSTREE_REPO_RESOLVE_REV_EXT_NONE</p></td>
|
||||||
<td class="enum_member_description">
|
<td class="enum_member_description">
|
||||||
<p>No flags.</p>
|
<p>No flags.</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="enum_member_annotations"> </td>
|
<td class="enum_member_annotations"> </td>
|
||||||
</tr></tbody>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="enum_member_name"><p><a name="OSTREE-REPO-RESOLVE-REV-EXT-LOCAL-ONLY:CAPS"></a>OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY</p></td>
|
||||||
|
<td class="enum_member_description">
|
||||||
|
<p>Exclude remote and mirrored refs. Since: 2019.2</p>
|
||||||
|
</td>
|
||||||
|
<td class="enum_member_annotations"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -8035,6 +8096,13 @@ in bytes, counting only content objects.</p></td>
|
||||||
</td>
|
</td>
|
||||||
<td class="enum_member_annotations"> </td>
|
<td class="enum_member_annotations"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="enum_member_name"><p><a name="OSTREE-REPO-LIST-REFS-EXT-EXCLUDE-MIRRORS:CAPS"></a>OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS</p></td>
|
||||||
|
<td class="enum_member_description">
|
||||||
|
<p>Exclude mirrored refs. Since: 2019.2</p>
|
||||||
|
</td>
|
||||||
|
<td class="enum_member_annotations"> </td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@
|
||||||
<keyword type="function" name="ostree_repo_is_writable ()" link="ostree-OstreeRepo.html#ostree-repo-is-writable"/>
|
<keyword type="function" name="ostree_repo_is_writable ()" link="ostree-OstreeRepo.html#ostree-repo-is-writable"/>
|
||||||
<keyword type="function" name="ostree_repo_create_at ()" link="ostree-OstreeRepo.html#ostree-repo-create-at"/>
|
<keyword type="function" name="ostree_repo_create_at ()" link="ostree-OstreeRepo.html#ostree-repo-create-at"/>
|
||||||
<keyword type="function" name="ostree_repo_create ()" link="ostree-OstreeRepo.html#ostree-repo-create"/>
|
<keyword type="function" name="ostree_repo_create ()" link="ostree-OstreeRepo.html#ostree-repo-create"/>
|
||||||
|
<keyword type="function" name="ostree_repo_get_bootloader ()" link="ostree-OstreeRepo.html#ostree-repo-get-bootloader" since="2019.2"/>
|
||||||
<keyword type="function" name="ostree_repo_get_path ()" link="ostree-OstreeRepo.html#ostree-repo-get-path"/>
|
<keyword type="function" name="ostree_repo_get_path ()" link="ostree-OstreeRepo.html#ostree-repo-get-path"/>
|
||||||
<keyword type="function" name="ostree_repo_get_mode ()" link="ostree-OstreeRepo.html#ostree-repo-get-mode"/>
|
<keyword type="function" name="ostree_repo_get_mode ()" link="ostree-OstreeRepo.html#ostree-repo-get-mode"/>
|
||||||
<keyword type="function" name="ostree_repo_get_min_free_space_bytes ()" link="ostree-OstreeRepo.html#ostree-repo-get-min-free-space-bytes"/>
|
<keyword type="function" name="ostree_repo_get_min_free_space_bytes ()" link="ostree-OstreeRepo.html#ostree-repo-get-min-free-space-bytes"/>
|
||||||
|
|
@ -209,7 +210,7 @@
|
||||||
<keyword type="function" name="ostree_repo_prune_from_reachable ()" link="ostree-OstreeRepo.html#ostree-repo-prune-from-reachable"/>
|
<keyword type="function" name="ostree_repo_prune_from_reachable ()" link="ostree-OstreeRepo.html#ostree-repo-prune-from-reachable"/>
|
||||||
<keyword type="function" name="ostree_repo_pull ()" link="ostree-OstreeRepo.html#ostree-repo-pull"/>
|
<keyword type="function" name="ostree_repo_pull ()" link="ostree-OstreeRepo.html#ostree-repo-pull"/>
|
||||||
<keyword type="function" name="ostree_repo_pull_one_dir ()" link="ostree-OstreeRepo.html#ostree-repo-pull-one-dir"/>
|
<keyword type="function" name="ostree_repo_pull_one_dir ()" link="ostree-OstreeRepo.html#ostree-repo-pull-one-dir"/>
|
||||||
<keyword type="function" name="ostree_repo_pull_with_options ()" link="ostree-OstreeRepo.html#ostree-repo-pull-with-options"/>
|
<keyword type="function" name="ostree_repo_pull_with_options ()" link="ostree-OstreeRepo.html#ostree-repo-pull-with-options" since="2019.2"/>
|
||||||
<keyword type="function" name="ostree_repo_pull_default_console_progress_changed ()" link="ostree-OstreeRepo.html#ostree-repo-pull-default-console-progress-changed"/>
|
<keyword type="function" name="ostree_repo_pull_default_console_progress_changed ()" link="ostree-OstreeRepo.html#ostree-repo-pull-default-console-progress-changed"/>
|
||||||
<keyword type="function" name="ostree_repo_sign_commit ()" link="ostree-OstreeRepo.html#ostree-repo-sign-commit"/>
|
<keyword type="function" name="ostree_repo_sign_commit ()" link="ostree-OstreeRepo.html#ostree-repo-sign-commit"/>
|
||||||
<keyword type="function" name="ostree_repo_append_gpg_signature ()" link="ostree-OstreeRepo.html#ostree-repo-append-gpg-signature"/>
|
<keyword type="function" name="ostree_repo_append_gpg_signature ()" link="ostree-OstreeRepo.html#ostree-repo-append-gpg-signature"/>
|
||||||
|
|
@ -422,10 +423,13 @@
|
||||||
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-ADD-IF-NOT-EXISTS:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-ADD-IF-NOT-EXISTS:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_DELETE" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-DELETE:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_DELETE" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-DELETE:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-DELETE-IF-EXISTS:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-DELETE-IF-EXISTS:CAPS"/>
|
||||||
|
<keyword type="constant" name="OSTREE_REPO_REMOTE_CHANGE_REPLACE" link="ostree-OstreeRepo.html#OSTREE-REPO-REMOTE-CHANGE-REPLACE:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_RESOLVE_REV_EXT_NONE" link="ostree-OstreeRepo.html#OSTREE-REPO-RESOLVE-REV-EXT-NONE:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_RESOLVE_REV_EXT_NONE" link="ostree-OstreeRepo.html#OSTREE-REPO-RESOLVE-REV-EXT-NONE:CAPS"/>
|
||||||
|
<keyword type="constant" name="OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY" link="ostree-OstreeRepo.html#OSTREE-REPO-RESOLVE-REV-EXT-LOCAL-ONLY:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_NONE" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-NONE:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_NONE" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-NONE:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_ALIASES" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-ALIASES:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_ALIASES" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-ALIASES:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-EXCLUDE-REMOTES:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-EXCLUDE-REMOTES:CAPS"/>
|
||||||
|
<keyword type="constant" name="OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS" link="ostree-OstreeRepo.html#OSTREE-REPO-LIST-REFS-EXT-EXCLUDE-MIRRORS:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_COMMIT_STATE_NORMAL" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-STATE-NORMAL:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_COMMIT_STATE_NORMAL" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-STATE-NORMAL:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_COMMIT_STATE_PARTIAL" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-STATE-PARTIAL:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_COMMIT_STATE_PARTIAL" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-STATE-PARTIAL:CAPS"/>
|
||||||
<keyword type="constant" name="OSTREE_REPO_COMMIT_FILTER_ALLOW" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-FILTER-ALLOW:CAPS"/>
|
<keyword type="constant" name="OSTREE_REPO_COMMIT_FILTER_ALLOW" link="ostree-OstreeRepo.html#OSTREE-REPO-COMMIT-FILTER-ALLOW:CAPS"/>
|
||||||
|
|
|
||||||
|
|
@ -1022,6 +1022,10 @@ ostree_repo_find_remotes_finish, function in ostree-repo-experimental
|
||||||
</dt>
|
</dt>
|
||||||
<dd></dd>
|
<dd></dd>
|
||||||
<dt>
|
<dt>
|
||||||
|
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-bootloader" title="ostree_repo_get_bootloader ()">ostree_repo_get_bootloader</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
|
||||||
|
</dt>
|
||||||
|
<dd></dd>
|
||||||
|
<dt>
|
||||||
ostree_repo_get_collection_id, function in ostree-misc-experimental
|
ostree_repo_get_collection_id, function in ostree-misc-experimental
|
||||||
</dt>
|
</dt>
|
||||||
<dd></dd>
|
<dd></dd>
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,7 @@ ostree_repo_is_system
|
||||||
ostree_repo_is_writable
|
ostree_repo_is_writable
|
||||||
ostree_repo_create_at
|
ostree_repo_create_at
|
||||||
ostree_repo_create
|
ostree_repo_create
|
||||||
|
ostree_repo_get_bootloader
|
||||||
ostree_repo_get_path
|
ostree_repo_get_path
|
||||||
ostree_repo_get_mode
|
ostree_repo_get_mode
|
||||||
ostree_repo_get_min_free_space_bytes
|
ostree_repo_get_min_free_space_bytes
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2019.1
|
2019.2
|
||||||
|
|
@ -985,6 +985,7 @@ _ostree_remote_add() {
|
||||||
local boolean_options="
|
local boolean_options="
|
||||||
$main_boolean_options
|
$main_boolean_options
|
||||||
--if-not-exists
|
--if-not-exists
|
||||||
|
--force
|
||||||
--no-gpg-verify
|
--no-gpg-verify
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#!/usr/bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#! /bin/sh
|
#!/usr/bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-03-08'
|
timestamp='2018-08-29'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -84,8 +84,6 @@ if test $# != 0; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'exit 1' 1 2 15
|
|
||||||
|
|
||||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||||
# compiler to aid in system detection is discouraged as it requires
|
# compiler to aid in system detection is discouraged as it requires
|
||||||
# temporary files to be created and, as you can see below, it is a
|
# temporary files to be created and, as you can see below, it is a
|
||||||
|
|
@ -96,34 +94,39 @@ trap 'exit 1' 1 2 15
|
||||||
|
|
||||||
# Portable tmp directory creation inspired by the Autoconf team.
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
|
|
||||||
set_cc_for_build='
|
tmp=
|
||||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
# shellcheck disable=SC2172
|
||||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
|
||||||
: ${TMPDIR=/tmp} ;
|
trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
|
||||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
|
||||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
set_cc_for_build() {
|
||||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
: "${TMPDIR=/tmp}"
|
||||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
# shellcheck disable=SC2039
|
||||||
dummy=$tmp/dummy ;
|
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
||||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||||
,,) echo "int x;" > "$dummy.c" ;
|
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
|
||||||
for c in cc gcc c89 c99 ; do
|
dummy=$tmp/dummy
|
||||||
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||||
CC_FOR_BUILD="$c"; break ;
|
,,) echo "int x;" > "$dummy.c"
|
||||||
fi ;
|
for driver in cc gcc c89 c99 ; do
|
||||||
done ;
|
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||||
if test x"$CC_FOR_BUILD" = x ; then
|
CC_FOR_BUILD="$driver"
|
||||||
CC_FOR_BUILD=no_compiler_found ;
|
break
|
||||||
fi
|
fi
|
||||||
;;
|
done
|
||||||
,,*) CC_FOR_BUILD=$CC ;;
|
if test x"$CC_FOR_BUILD" = x ; then
|
||||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
CC_FOR_BUILD=no_compiler_found
|
||||||
esac ; set_cc_for_build= ;'
|
fi
|
||||||
|
;;
|
||||||
|
,,*) CC_FOR_BUILD=$CC ;;
|
||||||
|
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
if test -f /.attbin/uname ; then
|
||||||
PATH=$PATH:/.attbin ; export PATH
|
PATH=$PATH:/.attbin ; export PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -138,7 +141,7 @@ Linux|GNU|GNU/*)
|
||||||
# We could probably try harder.
|
# We could probably try harder.
|
||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
|
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
cat <<-EOF > "$dummy.c"
|
cat <<-EOF > "$dummy.c"
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#if defined(__UCLIBC__)
|
#if defined(__UCLIBC__)
|
||||||
|
|
@ -199,7 +202,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||||
os=netbsdelf
|
os=netbsdelf
|
||||||
;;
|
;;
|
||||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ELF__
|
| grep -q __ELF__
|
||||||
then
|
then
|
||||||
|
|
@ -237,7 +240,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||||
# contains redundant information, the shorter form:
|
# contains redundant information, the shorter form:
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "$machine-${os}${release}${abi}"
|
echo "$machine-${os}${release}${abi-}"
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Bitrig:*:*)
|
*:Bitrig:*:*)
|
||||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||||
|
|
@ -389,20 +392,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||||
echo i386-pc-auroraux"$UNAME_RELEASE"
|
echo i386-pc-auroraux"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||||
eval "$set_cc_for_build"
|
UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
||||||
SUN_ARCH=i386
|
case `isainfo -b` in
|
||||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
32)
|
||||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
echo i386-pc-solaris2"$UNAME_REL"
|
||||||
# This test works for both compilers.
|
;;
|
||||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
64)
|
||||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
echo x86_64-pc-solaris2"$UNAME_REL"
|
||||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
;;
|
||||||
grep IS_64BIT_ARCH >/dev/null
|
esac
|
||||||
then
|
|
||||||
SUN_ARCH=x86_64
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
|
||||||
exit ;;
|
exit ;;
|
||||||
sun4*:SunOS:6*:*)
|
sun4*:SunOS:6*:*)
|
||||||
# According to config.sub, this is the proper way to canonicalize
|
# According to config.sub, this is the proper way to canonicalize
|
||||||
|
|
@ -482,7 +480,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||||
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <stdio.h> /* for printf() prototype */
|
#include <stdio.h> /* for printf() prototype */
|
||||||
|
|
@ -579,7 +577,7 @@ EOF
|
||||||
exit ;;
|
exit ;;
|
||||||
*:AIX:2:3)
|
*:AIX:2:3)
|
||||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#include <sys/systemcfg.h>
|
#include <sys/systemcfg.h>
|
||||||
|
|
||||||
|
|
@ -660,7 +658,7 @@ EOF
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "$HP_ARCH" = "" ]; then
|
if [ "$HP_ARCH" = "" ]; then
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
|
|
||||||
#define _HPUX_SOURCE
|
#define _HPUX_SOURCE
|
||||||
|
|
@ -700,7 +698,7 @@ EOF
|
||||||
esac
|
esac
|
||||||
if [ "$HP_ARCH" = hppa2.0w ]
|
if [ "$HP_ARCH" = hppa2.0w ]
|
||||||
then
|
then
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
|
|
||||||
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
||||||
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
||||||
|
|
@ -726,7 +724,7 @@ EOF
|
||||||
echo ia64-hp-hpux"$HPUX_REV"
|
echo ia64-hp-hpux"$HPUX_REV"
|
||||||
exit ;;
|
exit ;;
|
||||||
3050*:HI-UX:*:*)
|
3050*:HI-UX:*:*)
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
int
|
int
|
||||||
|
|
@ -840,6 +838,17 @@ EOF
|
||||||
*:BSD/OS:*:*)
|
*:BSD/OS:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
|
arm:FreeBSD:*:*)
|
||||||
|
UNAME_PROCESSOR=`uname -p`
|
||||||
|
set_cc_for_build
|
||||||
|
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
|
| grep -q __ARM_PCS_VFP
|
||||||
|
then
|
||||||
|
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
|
||||||
|
else
|
||||||
|
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
|
||||||
|
fi
|
||||||
|
exit ;;
|
||||||
*:FreeBSD:*:*)
|
*:FreeBSD:*:*)
|
||||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||||
case "$UNAME_PROCESSOR" in
|
case "$UNAME_PROCESSOR" in
|
||||||
|
|
@ -894,8 +903,8 @@ EOF
|
||||||
# other systems with GNU libc and userland
|
# other systems with GNU libc and userland
|
||||||
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Minix:*:*)
|
*:Minix:*:*)
|
||||||
echo "$UNAME_MACHINE"-pc-minix
|
echo "$UNAME_MACHINE"-unknown-minix
|
||||||
exit ;;
|
exit ;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
|
|
@ -922,7 +931,7 @@ EOF
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ARM_EABI__
|
| grep -q __ARM_EABI__
|
||||||
then
|
then
|
||||||
|
|
@ -971,7 +980,7 @@ EOF
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:* | mips64:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
sed 's/^ //' << EOF > "$dummy.c"
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
#undef CPU
|
#undef CPU
|
||||||
#undef ${UNAME_MACHINE}
|
#undef ${UNAME_MACHINE}
|
||||||
|
|
@ -1285,7 +1294,7 @@ EOF
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||||
eval "$set_cc_for_build"
|
set_cc_for_build
|
||||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||||
UNAME_PROCESSOR=powerpc
|
UNAME_PROCESSOR=powerpc
|
||||||
fi
|
fi
|
||||||
|
|
@ -1358,6 +1367,7 @@ EOF
|
||||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||||
# is converted to i386 for consistency with other x86
|
# is converted to i386 for consistency with other x86
|
||||||
# operating systems.
|
# operating systems.
|
||||||
|
# shellcheck disable=SC2154
|
||||||
if test "$cputype" = 386; then
|
if test "$cputype" = 386; then
|
||||||
UNAME_MACHINE=i386
|
UNAME_MACHINE=i386
|
||||||
else
|
else
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#!/usr/bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2018-03-11.20; # UTC
|
scriptversion=2018-03-11.20; # UTC
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#!/usr/bin/sh
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#!/usr/bin/sh
|
||||||
# test-driver - basic testsuite driver script.
|
# test-driver - basic testsuite driver script.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for libostree 2019.1.
|
# Generated by GNU Autoconf 2.69 for libostree 2019.2.
|
||||||
#
|
#
|
||||||
# Report bugs to <walters@verbum.org>.
|
# Report bugs to <walters@verbum.org>.
|
||||||
#
|
#
|
||||||
|
|
@ -590,8 +590,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='libostree'
|
PACKAGE_NAME='libostree'
|
||||||
PACKAGE_TARNAME='libostree'
|
PACKAGE_TARNAME='libostree'
|
||||||
PACKAGE_VERSION='2019.1'
|
PACKAGE_VERSION='2019.2'
|
||||||
PACKAGE_STRING='libostree 2019.1'
|
PACKAGE_STRING='libostree 2019.2'
|
||||||
PACKAGE_BUGREPORT='walters@verbum.org'
|
PACKAGE_BUGREPORT='walters@verbum.org'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
|
|
@ -975,6 +975,12 @@ PKG_CONFIG
|
||||||
PKG_CONFIG_PATH
|
PKG_CONFIG_PATH
|
||||||
PKG_CONFIG_LIBDIR
|
PKG_CONFIG_LIBDIR
|
||||||
BASH_COMPLETIONSDIR
|
BASH_COMPLETIONSDIR
|
||||||
|
GLIB_CFLAGS
|
||||||
|
GLIB_LIBS
|
||||||
|
GLIB_GENMARSHAL
|
||||||
|
GOBJECT_QUERY
|
||||||
|
GLIB_MKENUMS
|
||||||
|
GLIB_COMPILE_RESOURCES
|
||||||
OT_DEP_GIO_UNIX_CFLAGS
|
OT_DEP_GIO_UNIX_CFLAGS
|
||||||
OT_DEP_GIO_UNIX_LIBS
|
OT_DEP_GIO_UNIX_LIBS
|
||||||
OT_DEP_LZMA_CFLAGS
|
OT_DEP_LZMA_CFLAGS
|
||||||
|
|
@ -1547,7 +1553,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures libostree 2019.1 to adapt to many kinds of systems.
|
\`configure' configures libostree 2019.2 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
|
@ -1617,7 +1623,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of libostree 2019.1:";;
|
short | recursive ) echo "Configuration of libostree 2019.2:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
|
@ -1733,6 +1739,17 @@ Some influential environment variables:
|
||||||
BASH_COMPLETIONSDIR
|
BASH_COMPLETIONSDIR
|
||||||
value of completionsdir for bash-completion, overriding
|
value of completionsdir for bash-completion, overriding
|
||||||
pkg-config
|
pkg-config
|
||||||
|
GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
|
||||||
|
GLIB_LIBS linker flags for GLIB, overriding pkg-config
|
||||||
|
GLIB_GENMARSHAL
|
||||||
|
value of glib_genmarshal for glib-2.0, overriding pkg-config
|
||||||
|
GOBJECT_QUERY
|
||||||
|
value of gobject_query for glib-2.0, overriding pkg-config
|
||||||
|
GLIB_MKENUMS
|
||||||
|
value of glib_mkenums for glib-2.0, overriding pkg-config
|
||||||
|
GLIB_COMPILE_RESOURCES
|
||||||
|
value of glib_compile_resources for gio-2.0, overriding
|
||||||
|
pkg-config
|
||||||
OT_DEP_GIO_UNIX_CFLAGS
|
OT_DEP_GIO_UNIX_CFLAGS
|
||||||
C compiler flags for OT_DEP_GIO_UNIX, overriding pkg-config
|
C compiler flags for OT_DEP_GIO_UNIX, overriding pkg-config
|
||||||
OT_DEP_GIO_UNIX_LIBS
|
OT_DEP_GIO_UNIX_LIBS
|
||||||
|
|
@ -1864,7 +1881,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
libostree configure 2019.1
|
libostree configure 2019.2
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
|
@ -2336,7 +2353,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by libostree $as_me 2019.1, which was
|
It was created by libostree $as_me 2019.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
|
@ -3204,7 +3221,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='libostree'
|
PACKAGE='libostree'
|
||||||
VERSION='2019.1'
|
VERSION='2019.2'
|
||||||
|
|
||||||
|
|
||||||
# Some tools Automake needs.
|
# Some tools Automake needs.
|
||||||
|
|
@ -5938,9 +5955,9 @@ test -n "$YACC" || YACC="yacc"
|
||||||
|
|
||||||
YEAR_VERSION=2019
|
YEAR_VERSION=2019
|
||||||
|
|
||||||
RELEASE_VERSION=1
|
RELEASE_VERSION=2
|
||||||
|
|
||||||
PACKAGE_VERSION=2019.1
|
PACKAGE_VERSION=2019.2
|
||||||
|
|
||||||
|
|
||||||
if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then :
|
if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then :
|
||||||
|
|
@ -14159,6 +14176,9 @@ if test "x$BASH_COMPLETIONSDIR" = x""; then :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-glibtest was given.
|
# Check whether --enable-glibtest was given.
|
||||||
if test "${enable_glibtest+set}" = set; then :
|
if test "${enable_glibtest+set}" = set; then :
|
||||||
enableval=$enable_glibtest;
|
enableval=$enable_glibtest;
|
||||||
|
|
@ -14167,7 +14187,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
pkg_config_args=glib-2.0
|
min_glib_version=2.0.0
|
||||||
|
pkg_config_args="glib-2.0 >= $min_glib_version"
|
||||||
for module in .
|
for module in .
|
||||||
do
|
do
|
||||||
case "$module" in
|
case "$module" in
|
||||||
|
|
@ -14317,7 +14338,171 @@ fi
|
||||||
PKG_CONFIG=no
|
PKG_CONFIG=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
min_glib_version=2.0.0
|
|
||||||
|
pkg_failed=no
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
|
||||||
|
$as_echo_n "checking for GLIB... " >&6; }
|
||||||
|
|
||||||
|
if test -n "$GLIB_CFLAGS"; then
|
||||||
|
pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$pkg_config_args" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
if test -n "$GLIB_LIBS"; then
|
||||||
|
pkg_cv_GLIB_LIBS="$GLIB_LIBS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$pkg_config_args" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test $pkg_failed = yes; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
_pkg_short_errors_supported=yes
|
||||||
|
else
|
||||||
|
_pkg_short_errors_supported=no
|
||||||
|
fi
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_config_args" 2>&1`
|
||||||
|
else
|
||||||
|
GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_config_args" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$GLIB_PKG_ERRORS" >&5
|
||||||
|
|
||||||
|
:
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
:
|
||||||
|
else
|
||||||
|
GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
|
||||||
|
GLIB_LIBS=$pkg_cv_GLIB_LIBS
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test -n "$GLIB_GENMARSHAL"; then
|
||||||
|
pkg_cv_GLIB_GENMARSHAL="$GLIB_GENMARSHAL"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GLIB_GENMARSHAL=`$PKG_CONFIG --variable="glib_genmarshal" "glib-2.0" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
GLIB_GENMARSHAL=$pkg_cv_GLIB_GENMARSHAL
|
||||||
|
|
||||||
|
if test "x$GLIB_GENMARSHAL" = x""; then :
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$GOBJECT_QUERY"; then
|
||||||
|
pkg_cv_GOBJECT_QUERY="$GOBJECT_QUERY"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GOBJECT_QUERY=`$PKG_CONFIG --variable="gobject_query" "glib-2.0" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
GOBJECT_QUERY=$pkg_cv_GOBJECT_QUERY
|
||||||
|
|
||||||
|
if test "x$GOBJECT_QUERY" = x""; then :
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$GLIB_MKENUMS"; then
|
||||||
|
pkg_cv_GLIB_MKENUMS="$GLIB_MKENUMS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GLIB_MKENUMS=`$PKG_CONFIG --variable="glib_mkenums" "glib-2.0" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
GLIB_MKENUMS=$pkg_cv_GLIB_MKENUMS
|
||||||
|
|
||||||
|
if test "x$GLIB_MKENUMS" = x""; then :
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$GLIB_COMPILE_RESOURCES"; then
|
||||||
|
pkg_cv_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable="glib_compile_resources" "gio-2.0" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
GLIB_COMPILE_RESOURCES=$pkg_cv_GLIB_COMPILE_RESOURCES
|
||||||
|
|
||||||
|
if test "x$GLIB_COMPILE_RESOURCES" = x""; then :
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
|
||||||
$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
|
$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
|
||||||
|
|
||||||
|
|
@ -14336,13 +14521,6 @@ $as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$no_glib" = x ; then
|
if test x"$no_glib" = x ; then
|
||||||
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
|
|
||||||
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
|
|
||||||
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
|
|
||||||
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
|
|
||||||
|
|
||||||
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
|
|
||||||
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
|
|
||||||
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||||
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
|
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
|
||||||
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||||
|
|
@ -14504,12 +14682,6 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||||
GLIB_COMPILE_RESOURCES=""
|
GLIB_COMPILE_RESOURCES=""
|
||||||
as_fn_error $? "GLib not found" "$LINENO" 5
|
as_fn_error $? "GLib not found" "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rm -f conf.glibtest
|
rm -f conf.glibtest
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -18623,7 +18795,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by libostree $as_me 2019.1, which was
|
This file was extended by libostree $as_me 2019.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
|
@ -18689,7 +18861,7 @@ _ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
libostree config.status 2019.1
|
libostree config.status 2019.2
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ dnl update libostree-released.sym from libostree-devel.sym, and update the check
|
||||||
dnl in test-symbols.sh, and also set is_release_build=yes below. Then make
|
dnl in test-symbols.sh, and also set is_release_build=yes below. Then make
|
||||||
dnl another post-release commit to bump the version, and set is_release_build=no.
|
dnl another post-release commit to bump the version, and set is_release_build=no.
|
||||||
m4_define([year_version], [2019])
|
m4_define([year_version], [2019])
|
||||||
m4_define([release_version], [1])
|
m4_define([release_version], [2])
|
||||||
m4_define([package_version], [year_version.release_version])
|
m4_define([package_version], [year_version.release_version])
|
||||||
AC_INIT([libostree], [package_version], [walters@verbum.org])
|
AC_INIT([libostree], [package_version], [walters@verbum.org])
|
||||||
is_release_build=yes
|
is_release_build=yes
|
||||||
|
|
|
||||||
|
|
@ -51,25 +51,46 @@ Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>ostree config get</command> <arg choice="req">SECTIONNAME.KEYNAME</arg>
|
<command>ostree config get</command> <arg choice="req">GROUPNAME.KEYNAME</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>ostree config get</command> <arg choice="req"> --group=GROUPNAME</arg> <arg choice="req"> KEYNAME</arg>
|
<command>ostree config get</command> <arg choice="req"> --group=GROUPNAME</arg> <arg choice="req"> KEYNAME</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>ostree config set</command> <arg choice="req">SECTIONNAME.KEYNAME</arg> <arg choice="req">VALUE</arg>
|
<command>ostree config set</command> <arg choice="req">GROUPNAME.KEYNAME</arg> <arg choice="req">VALUE</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>ostree config set</command> <arg choice="req"> --group=GROUPNAME</arg> <arg choice="req"> KEYNAME</arg> <arg choice="req">VALUE</arg>
|
<command>ostree config set</command> <arg choice="req"> --group=GROUPNAME</arg> <arg choice="req"> KEYNAME</arg> <arg choice="req">VALUE</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>ostree config unset</command> <arg choice="req">GROUPNAME.KEYNAME</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>ostree config unset</command> <arg choice="req"> --group=GROUPNAME</arg> <arg choice="req"> KEYNAME</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<itemizedlist>
|
||||||
Displays or changes a configuration setting.
|
<listitem><para>
|
||||||
</para>
|
<command>ostree config get</command> displays the value of
|
||||||
|
<arg choice="plain">KEYNAME</arg> in the group <arg choice="plain">GROUPNAME</arg>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<command>ostree config set</command> sets the value of
|
||||||
|
<arg choice="plain">KEYNAME</arg> in the group <arg choice="plain">GROUPNAME</arg>
|
||||||
|
to <arg choice="plain">VALUE</arg>.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<command>ostree config unset</command> removes the key
|
||||||
|
<arg choice="plain">KEYNAME</arg> from the group <arg choice="plain">GROUPNAME</arg>
|
||||||
|
so that OSTree uses the default value for it. It is not an
|
||||||
|
error for the specified <arg choice="plain">GROUPNAME</arg> or
|
||||||
|
<arg choice="plain">KEYNAME</arg> not to exist.
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
|
|
@ -77,5 +98,6 @@ Boston, MA 02111-1307, USA.
|
||||||
<para><command>$ ostree config get core.mode</command></para>
|
<para><command>$ ostree config get core.mode</command></para>
|
||||||
<para>bare</para>
|
<para>bare</para>
|
||||||
<para><command>$ ostree config set --group='remote "myremote"' url http://example.com/repo</command></para>
|
<para><command>$ ostree config set --group='remote "myremote"' url http://example.com/repo</command></para>
|
||||||
|
<para><command>$ ostree config unset core.lock-timeout-secs</command></para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,22 @@ Boston, MA 02111-1307, USA.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--if-not-exists</option></term>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
Do nothing if the provided remote exists.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--force</option></term>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
Replace the provided remote if it exists.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-gpg-verify</option></term>
|
<term><option>--no-gpg-verify</option></term>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,22 +109,22 @@ Boston, MA 02111-1307, USA.
|
||||||
ensure files are on stable storage when performing operations
|
ensure files are on stable storage when performing operations
|
||||||
such as commits, pulls, and checkouts. Defaults to
|
such as commits, pulls, and checkouts. Defaults to
|
||||||
<literal>true</literal>.</para>
|
<literal>true</literal>.</para>
|
||||||
<para>
|
<para>
|
||||||
If you disable fsync, OSTree will no longer be robust
|
If you disable fsync, OSTree will no longer be robust
|
||||||
against kernel crashes or power loss.
|
against kernel crashes or power loss.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
You might choose to disable this for local development
|
You might choose to disable this for local development
|
||||||
repositories, under the assumption they can be recreated from
|
repositories, under the assumption they can be recreated from
|
||||||
source. Similarly, you could disable for a mirror where you could
|
source. Similarly, you could disable for a mirror where you could
|
||||||
re-pull.
|
re-pull.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For the system repository, you might choose to disable fsync
|
For the system repository, you might choose to disable fsync
|
||||||
if you have uninterruptable power supplies and a well tested
|
if you have uninterruptable power supplies and a well tested
|
||||||
kernel.
|
kernel.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|
@ -333,6 +333,42 @@ Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>[sysroot] Section Options</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Options for the sysroot, which contains the OSTree repository,
|
||||||
|
deployments, and stateroots. The following entries are defined:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>bootloader</varname></term>
|
||||||
|
<listitem><para>Configure the bootloader that OSTree uses when
|
||||||
|
deploying the sysroot. This may take the values
|
||||||
|
<literal>bootloader=none</literal> or <literal>bootloader=auto</literal>.
|
||||||
|
Default is <literal>auto</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If <literal>none</literal>, then OSTree will generate only BLS (Boot
|
||||||
|
Loader Specification) fragments in <literal>sysroot/boot/loader/entries/</literal>
|
||||||
|
for the deployment.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If <literal>auto</literal>, then in addition to generating BLS
|
||||||
|
fragments, OSTree will dynamically check for the existence of grub2,
|
||||||
|
uboot, and syslinux bootloaders. If one of the bootloaders is found,
|
||||||
|
then OSTree will generate a config for the bootloader found. For
|
||||||
|
example, <literal>grub2-mkconfig</literal> is run for the grub2 case.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>/etc/ostree/remotes.d</title>
|
<title>/etc/ostree/remotes.d</title>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,15 @@ Boston, MA 02111-1307, USA.
|
||||||
Produce debug level output.
|
Produce debug level output.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--version</option></term>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
Print version information, including the features enabled
|
||||||
|
at compile time, and exit.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ read_config()
|
||||||
|
|
||||||
populate_menu()
|
populate_menu()
|
||||||
{
|
{
|
||||||
# Default to /boot if OSTREE_BOOT_PARTITION is not set and /boot is on the same device than ostree/repo
|
# Default to /boot if OSTREE_BOOT_PARTITION is not set and /boot is on the same device as /ostree/repo
|
||||||
if [ -z ${OSTREE_BOOT_PARTITION+x} ] && [ -d /boot/ostree ] && [ -d /ostree/repo ] && [ $(stat -c '%d' /boot/ostree) -eq $(stat -c '%d' /ostree/repo) ]; then
|
if [ -z ${OSTREE_BOOT_PARTITION+x} ] && [ -d /boot/ostree ] && [ -d /ostree/repo ] && [ $(stat -c '%d' /boot/ostree) -eq $(stat -c '%d' /ostree/repo) ]; then
|
||||||
boot_prefix="/boot"
|
boot_prefix="/boot"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ ConditionPathExists=/run/ostree-booted
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
|
|
||||||
RequiresMountsFor=/sysroot
|
RequiresMountsFor=/sysroot
|
||||||
After=basic.target
|
After=local-fs.target
|
||||||
Before=multi-user.target final.target
|
Before=basic.target final.target
|
||||||
Conflicts=final.target
|
Conflicts=final.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,15 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
/* Add new symbols here. Release commits should copy this section into -released.sym. */
|
/* Add new symbols here. Release commits should copy this section into -released.sym. */
|
||||||
LIBOSTREE_2018.10 {
|
LIBOSTREE_2019.3 {
|
||||||
} LIBOSTREE_2018.9;
|
} LIBOSTREE_2018.9;
|
||||||
|
|
||||||
/* Stub section for the stable release *after* this development one; don't
|
/* Stub section for the stable release *after* this development one; don't
|
||||||
* edit this other than to update the last number. This is just a copy/paste
|
* edit this other than to update the year. This is just a copy/paste
|
||||||
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
|
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
|
||||||
* with whatever the next version with new symbols will be.
|
* with whatever the next version with new symbols will be.
|
||||||
LIBOSTREE_2018.$NEWVERSION {
|
LIBOSTREE_2019.$NEWVERSION {
|
||||||
global:
|
global:
|
||||||
someostree_symbol_deleteme;
|
someostree_symbol_deleteme;
|
||||||
} LIBOSTREE_2018.$LASTSTABLE;
|
} LIBOSTREE_2019.$LASTSTABLE;
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -542,6 +542,13 @@ LIBOSTREE_2018.9 {
|
||||||
ostree_repo_get_default_repo_finders;
|
ostree_repo_get_default_repo_finders;
|
||||||
} LIBOSTREE_2018.7;
|
} LIBOSTREE_2018.7;
|
||||||
|
|
||||||
|
/* No new symbols in 2019.1 */
|
||||||
|
|
||||||
|
LIBOSTREE_2019.2 {
|
||||||
|
ostree_repo_get_bootloader;
|
||||||
|
} LIBOSTREE_2018.9;
|
||||||
|
|
||||||
|
|
||||||
/* NOTE: Only add more content here in release commits! See the
|
/* NOTE: Only add more content here in release commits! See the
|
||||||
* comments at the top of this file.
|
* comments at the top of this file.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,7 @@ grub2_child_setup (gpointer user_data)
|
||||||
static gboolean
|
static gboolean
|
||||||
_ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
_ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
|
GPtrArray *new_deployments,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
|
@ -357,15 +358,11 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
||||||
if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
|
if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
|
||||||
&& g_file_has_parent (self->sysroot->path, NULL))
|
&& g_file_has_parent (self->sysroot->path, NULL))
|
||||||
{
|
{
|
||||||
g_autoptr(GPtrArray) deployments = NULL;
|
|
||||||
OstreeDeployment *tool_deployment;
|
OstreeDeployment *tool_deployment;
|
||||||
g_autoptr(GFile) tool_deployment_root = NULL;
|
g_autoptr(GFile) tool_deployment_root = NULL;
|
||||||
|
|
||||||
deployments = ostree_sysroot_get_deployments (self->sysroot);
|
g_assert_cmpint (new_deployments->len, >, 0);
|
||||||
|
tool_deployment = new_deployments->pdata[0];
|
||||||
g_assert_cmpint (deployments->len, >, 0);
|
|
||||||
|
|
||||||
tool_deployment = deployments->pdata[0];
|
|
||||||
|
|
||||||
/* Sadly we have to execute code to generate the bootloader configuration.
|
/* Sadly we have to execute code to generate the bootloader configuration.
|
||||||
* If we're in a booted deployment, we just don't chroot.
|
* If we're in a booted deployment, we just don't chroot.
|
||||||
|
|
@ -380,6 +377,8 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
||||||
grub2_mkconfig_chroot = g_file_get_path (tool_deployment_root);
|
grub2_mkconfig_chroot = g_file_get_path (tool_deployment_root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_debug ("Using grub2-mkconfig chroot: %s\n", grub2_mkconfig_chroot);
|
||||||
|
|
||||||
g_autoptr(GFile) new_config_path = NULL;
|
g_autoptr(GFile) new_config_path = NULL;
|
||||||
g_autoptr(GFile) config_path_efi_dir = NULL;
|
g_autoptr(GFile) config_path_efi_dir = NULL;
|
||||||
if (self->is_efi)
|
if (self->is_efi)
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,11 @@ append_config_from_loader_entries (OstreeBootloaderSyslinux *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
|
_ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
GCancellable *cancellable,
|
GPtrArray *new_deployments,
|
||||||
GError **error)
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
OstreeBootloaderSyslinux *self = OSTREE_BOOTLOADER_SYSLINUX (bootloader);
|
OstreeBootloaderSyslinux *self = OSTREE_BOOTLOADER_SYSLINUX (bootloader);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,10 +158,11 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
|
_ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
GCancellable *cancellable,
|
GPtrArray *new_deployments,
|
||||||
GError **error)
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
|
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,15 @@ _ostree_bootloader_get_name (OstreeBootloader *self)
|
||||||
gboolean
|
gboolean
|
||||||
_ostree_bootloader_write_config (OstreeBootloader *self,
|
_ostree_bootloader_write_config (OstreeBootloader *self,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
|
GPtrArray *new_deployments,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), FALSE);
|
g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), FALSE);
|
||||||
|
|
||||||
return OSTREE_BOOTLOADER_GET_IFACE (self)->write_config (self, bootversion,
|
return OSTREE_BOOTLOADER_GET_IFACE (self)->write_config (self, bootversion,
|
||||||
cancellable, error);
|
new_deployments,
|
||||||
|
cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ struct _OstreeBootloaderInterface
|
||||||
const char * (* get_name) (OstreeBootloader *self);
|
const char * (* get_name) (OstreeBootloader *self);
|
||||||
gboolean (* write_config) (OstreeBootloader *self,
|
gboolean (* write_config) (OstreeBootloader *self,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
|
GPtrArray *new_deployments,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
gboolean (* is_atomic) (OstreeBootloader *self);
|
gboolean (* is_atomic) (OstreeBootloader *self);
|
||||||
|
|
@ -61,6 +62,7 @@ const char *_ostree_bootloader_get_name (OstreeBootloader *self);
|
||||||
|
|
||||||
gboolean _ostree_bootloader_write_config (OstreeBootloader *self,
|
gboolean _ostree_bootloader_write_config (OstreeBootloader *self,
|
||||||
int bootversion,
|
int bootversion,
|
||||||
|
GPtrArray *new_deployments,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -645,7 +645,7 @@ _ostree_fetcher_constructed (GObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
http_proxy = g_getenv ("http_proxy");
|
http_proxy = g_getenv ("http_proxy");
|
||||||
if (http_proxy != NULL)
|
if (http_proxy != NULL && http_proxy[0] != '\0')
|
||||||
_ostree_fetcher_set_proxy (self, http_proxy);
|
_ostree_fetcher_set_proxy (self, http_proxy);
|
||||||
|
|
||||||
/* FIXME Maybe implement GInitableIface and use g_thread_try_new()
|
/* FIXME Maybe implement GInitableIface and use g_thread_try_new()
|
||||||
|
|
@ -711,7 +711,7 @@ _ostree_fetcher_set_proxy (OstreeFetcher *self,
|
||||||
SoupURI *proxy_uri;
|
SoupURI *proxy_uri;
|
||||||
|
|
||||||
g_return_if_fail (OSTREE_IS_FETCHER (self));
|
g_return_if_fail (OSTREE_IS_FETCHER (self));
|
||||||
g_return_if_fail (http_proxy != NULL);
|
g_return_if_fail (http_proxy != NULL && http_proxy[0] != '\0');
|
||||||
|
|
||||||
proxy_uri = soup_uri_new (http_proxy);
|
proxy_uri = soup_uri_new (http_proxy);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,18 +163,16 @@ _ostree_fetcher_journal_failure (const char *remote_name,
|
||||||
const char *url,
|
const char *url,
|
||||||
const char *msg)
|
const char *msg)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBSYSTEMD
|
|
||||||
/* Sanity - we don't want to log this when doing local/file pulls */
|
/* Sanity - we don't want to log this when doing local/file pulls */
|
||||||
if (!remote_name)
|
if (!remote_name)
|
||||||
return;
|
return;
|
||||||
sd_journal_send ("MESSAGE=libostree HTTP error from remote %s for <%s>: %s",
|
ot_journal_send ("MESSAGE=libostree HTTP error from remote %s for <%s>: %s",
|
||||||
remote_name, url, msg,
|
remote_name, url, msg,
|
||||||
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_HTTP_FAILURE_ID),
|
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_HTTP_FAILURE_ID),
|
||||||
"OSTREE_REMOTE=%s", remote_name,
|
"OSTREE_REMOTE=%s", remote_name,
|
||||||
"OSTREE_URL=%s", url,
|
"OSTREE_URL=%s", url,
|
||||||
"PRIORITY=%i", LOG_ERR,
|
"PRIORITY=%i", LOG_ERR,
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check whether a particular operation should be retried. This is entirely
|
/* Check whether a particular operation should be retried. This is entirely
|
||||||
|
|
|
||||||
|
|
@ -4269,7 +4269,7 @@ import_one_object_direct (OstreeRepo *dest_repo,
|
||||||
G_IN_SET (src_repo->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER);
|
G_IN_SET (src_repo->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER);
|
||||||
if (src_is_bare_or_bare_user && !OSTREE_OBJECT_TYPE_IS_META(objtype))
|
if (src_is_bare_or_bare_user && !OSTREE_OBJECT_TYPE_IS_META(objtype))
|
||||||
{
|
{
|
||||||
if (src_repo == OSTREE_REPO_MODE_BARE)
|
if (src_repo->mode == OSTREE_REPO_MODE_BARE)
|
||||||
{
|
{
|
||||||
g_autoptr(GVariant) xattrs = NULL;
|
g_autoptr(GVariant) xattrs = NULL;
|
||||||
if (!glnx_fd_get_all_xattrs (src_fd, &xattrs,
|
if (!glnx_fd_get_all_xattrs (src_fd, &xattrs,
|
||||||
|
|
@ -4279,15 +4279,25 @@ import_one_object_direct (OstreeRepo *dest_repo,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
else if (dest_repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY)
|
||||||
|
{
|
||||||
|
/* Nothing; this is the "bareuser-only conversion case",
|
||||||
|
* we don't need to set any xattrs in the dest repo.
|
||||||
|
*/
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* And this case must be bare-user → bare-user */
|
||||||
|
g_assert (src_repo->mode == OSTREE_REPO_MODE_BARE_USER);
|
||||||
|
g_assert (src_repo->mode == dest_repo->mode);
|
||||||
|
|
||||||
/* bare-user; we just want ostree.usermeta */
|
/* bare-user; we just want ostree.usermeta */
|
||||||
g_autoptr(GBytes) bytes =
|
g_autoptr(GBytes) bytes =
|
||||||
glnx_fgetxattr_bytes (src_fd, "user.ostreemeta", error);
|
glnx_fgetxattr_bytes (src_fd, "user.ostreemeta", error);
|
||||||
if (bytes == NULL)
|
if (bytes == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (TEMP_FAILURE_RETRY (fsetxattr (src_fd, "user.ostreemeta",
|
if (TEMP_FAILURE_RETRY (fsetxattr (tmp_dest.fd, "user.ostreemeta",
|
||||||
(char*)g_bytes_get_data (bytes, NULL),
|
(char*)g_bytes_get_data (bytes, NULL),
|
||||||
g_bytes_get_size (bytes), 0)) != 0)
|
g_bytes_get_size (bytes), 0)) != 0)
|
||||||
return glnx_throw_errno_prefix (error, "fsetxattr");
|
return glnx_throw_errno_prefix (error, "fsetxattr");
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@ struct OstreeRepo {
|
||||||
guint64 payload_link_threshold;
|
guint64 payload_link_threshold;
|
||||||
gint fs_support_reflink; /* The underlying filesystem has support for ioctl (FICLONE..) */
|
gint fs_support_reflink; /* The underlying filesystem has support for ioctl (FICLONE..) */
|
||||||
gchar **repo_finders;
|
gchar **repo_finders;
|
||||||
|
gchar *bootloader; /* Configure which bootloader to use. */
|
||||||
|
|
||||||
OstreeRepo *parent_repo;
|
OstreeRepo *parent_repo;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ typedef struct {
|
||||||
GHashTable *summary_deltas_checksums;
|
GHashTable *summary_deltas_checksums;
|
||||||
GHashTable *ref_original_commits; /* Maps checksum to commit, used by timestamp checks */
|
GHashTable *ref_original_commits; /* Maps checksum to commit, used by timestamp checks */
|
||||||
GHashTable *gpg_verified_commits; /* Set<checksum> of commits that have been verified */
|
GHashTable *gpg_verified_commits; /* Set<checksum> of commits that have been verified */
|
||||||
|
GHashTable *ref_keyring_map; /* Maps OstreeCollectionRef to keyring remote name */
|
||||||
GPtrArray *static_delta_superblocks;
|
GPtrArray *static_delta_superblocks;
|
||||||
GHashTable *expected_commit_sizes; /* Maps commit checksum to known size */
|
GHashTable *expected_commit_sizes; /* Maps commit checksum to known size */
|
||||||
GHashTable *commit_to_depth; /* Maps commit checksum maximum depth */
|
GHashTable *commit_to_depth; /* Maps commit checksum maximum depth */
|
||||||
|
|
@ -260,12 +261,13 @@ static gboolean scan_one_metadata_object (OtPullData *pull_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
static void scan_object_queue_data_free (ScanObjectQueueData *scan_data);
|
static void scan_object_queue_data_free (ScanObjectQueueData *scan_data);
|
||||||
static gboolean
|
static gboolean
|
||||||
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
||||||
const char *checksum,
|
const char *checksum,
|
||||||
GVariant *commit,
|
GVariant *commit,
|
||||||
GVariant *detached_metadata,
|
GVariant *detached_metadata,
|
||||||
GCancellable *cancellable,
|
const OstreeCollectionRef *ref,
|
||||||
GError **error);
|
GCancellable *cancellable,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
@ -1307,7 +1309,7 @@ meta_fetch_on_complete (GObject *object,
|
||||||
*/
|
*/
|
||||||
GVariant *detached_data = g_hash_table_lookup (pull_data->fetched_detached_metadata, checksum);
|
GVariant *detached_data = g_hash_table_lookup (pull_data->fetched_detached_metadata, checksum);
|
||||||
if (!gpg_verify_unwritten_commit (pull_data, checksum, metadata, detached_data,
|
if (!gpg_verify_unwritten_commit (pull_data, checksum, metadata, detached_data,
|
||||||
pull_data->cancellable, error))
|
fetch_data->requested_ref, pull_data->cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!ostree_repo_mark_commit_partial (pull_data->repo, checksum, TRUE, error))
|
if (!ostree_repo_mark_commit_partial (pull_data->repo, checksum, TRUE, error))
|
||||||
|
|
@ -1462,23 +1464,32 @@ process_verify_result (OtPullData *pull_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
||||||
const char *checksum,
|
const char *checksum,
|
||||||
GVariant *commit,
|
GVariant *commit,
|
||||||
GVariant *detached_metadata,
|
GVariant *detached_metadata,
|
||||||
GCancellable *cancellable,
|
const OstreeCollectionRef *ref,
|
||||||
GError **error)
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
if (pull_data->gpg_verify)
|
if (pull_data->gpg_verify)
|
||||||
{
|
{
|
||||||
|
const char *keyring_remote = NULL;
|
||||||
|
|
||||||
/* Shouldn't happen, but see comment in process_verify_result() */
|
/* Shouldn't happen, but see comment in process_verify_result() */
|
||||||
if (g_hash_table_contains (pull_data->gpg_verified_commits, checksum))
|
if (g_hash_table_contains (pull_data->gpg_verified_commits, checksum))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
if (ref != NULL)
|
||||||
|
keyring_remote = g_hash_table_lookup (pull_data->ref_keyring_map, ref);
|
||||||
|
if (keyring_remote == NULL)
|
||||||
|
keyring_remote = pull_data->remote_name;
|
||||||
|
|
||||||
g_autoptr(GBytes) signed_data = g_variant_get_data_as_bytes (commit);
|
g_autoptr(GBytes) signed_data = g_variant_get_data_as_bytes (commit);
|
||||||
g_autoptr(OstreeGpgVerifyResult) result =
|
g_autoptr(OstreeGpgVerifyResult) result =
|
||||||
_ostree_repo_gpg_verify_with_metadata (pull_data->repo, signed_data,
|
_ostree_repo_gpg_verify_with_metadata (pull_data->repo, signed_data,
|
||||||
detached_metadata, pull_data->remote_name,
|
detached_metadata,
|
||||||
|
keyring_remote,
|
||||||
NULL, NULL, cancellable, error);
|
NULL, NULL, cancellable, error);
|
||||||
if (!process_verify_result (pull_data, checksum, result, error))
|
if (!process_verify_result (pull_data, checksum, result, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
@ -1788,10 +1799,16 @@ scan_commit_object (OtPullData *pull_data,
|
||||||
!g_hash_table_contains (pull_data->gpg_verified_commits, checksum))
|
!g_hash_table_contains (pull_data->gpg_verified_commits, checksum))
|
||||||
{
|
{
|
||||||
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
||||||
|
const char *keyring_remote = NULL;
|
||||||
|
|
||||||
|
if (ref != NULL)
|
||||||
|
keyring_remote = g_hash_table_lookup (pull_data->ref_keyring_map, ref);
|
||||||
|
if (keyring_remote == NULL)
|
||||||
|
keyring_remote = pull_data->remote_name;
|
||||||
|
|
||||||
result = ostree_repo_verify_commit_for_remote (pull_data->repo,
|
result = ostree_repo_verify_commit_for_remote (pull_data->repo,
|
||||||
checksum,
|
checksum,
|
||||||
pull_data->remote_name,
|
keyring_remote,
|
||||||
cancellable,
|
cancellable,
|
||||||
error);
|
error);
|
||||||
if (!process_verify_result (pull_data, checksum, result, error))
|
if (!process_verify_result (pull_data, checksum, result, error))
|
||||||
|
|
@ -2385,7 +2402,7 @@ process_one_static_delta (OtPullData *pull_data,
|
||||||
g_autoptr(GVariant) detached_data = g_variant_lookup_value (metadata, detached_path, G_VARIANT_TYPE("a{sv}"));
|
g_autoptr(GVariant) detached_data = g_variant_lookup_value (metadata, detached_path, G_VARIANT_TYPE("a{sv}"));
|
||||||
|
|
||||||
if (!gpg_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data,
|
if (!gpg_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data,
|
||||||
cancellable, error))
|
ref, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (detached_data && !ostree_repo_write_commit_detached_metadata (pull_data->repo,
|
if (detached_data && !ostree_repo_write_commit_detached_metadata (pull_data->repo,
|
||||||
|
|
@ -3017,7 +3034,7 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self,
|
||||||
&http_proxy, error))
|
&http_proxy, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (http_proxy != NULL)
|
if (http_proxy != NULL && http_proxy[0] != '\0')
|
||||||
_ostree_fetcher_set_proxy (fetcher, http_proxy);
|
_ostree_fetcher_set_proxy (fetcher, http_proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3504,7 +3521,15 @@ initiate_request (OtPullData *pull_data,
|
||||||
* * append-user-agent (s): Additional string to append to the user agent
|
* * append-user-agent (s): Additional string to append to the user agent
|
||||||
* * n-network-retries (u): Number of times to retry each download on receiving
|
* * n-network-retries (u): Number of times to retry each download on receiving
|
||||||
* a transient network error, such as a socket timeout; default is 5, 0
|
* a transient network error, such as a socket timeout; default is 5, 0
|
||||||
* means return errors without retrying
|
* means return errors without retrying. Since: 2018.6
|
||||||
|
* * ref-keyring-map (a(sss)): Array of (collection ID, ref name, keyring
|
||||||
|
* remote name) tuples specifying which remote's keyring should be used when
|
||||||
|
* doing GPG verification of each collection-ref. This is useful to prevent a
|
||||||
|
* remote from serving malicious updates to refs which did not originate from
|
||||||
|
* it. This can be a subset or superset of the refs being pulled; any ref
|
||||||
|
* not being pulled will be ignored and any ref without a keyring remote
|
||||||
|
* will be verified with the keyring of the remote being pulled from.
|
||||||
|
* Since: 2019.2
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ostree_repo_pull_with_options (OstreeRepo *self,
|
ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
|
|
@ -3539,12 +3564,14 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
gboolean opt_gpg_verify_summary_set = FALSE;
|
gboolean opt_gpg_verify_summary_set = FALSE;
|
||||||
gboolean opt_collection_refs_set = FALSE;
|
gboolean opt_collection_refs_set = FALSE;
|
||||||
gboolean opt_n_network_retries_set = FALSE;
|
gboolean opt_n_network_retries_set = FALSE;
|
||||||
|
gboolean opt_ref_keyring_map_set = FALSE;
|
||||||
const char *main_collection_id = NULL;
|
const char *main_collection_id = NULL;
|
||||||
const char *url_override = NULL;
|
const char *url_override = NULL;
|
||||||
gboolean inherit_transaction = FALSE;
|
gboolean inherit_transaction = FALSE;
|
||||||
g_autoptr(GHashTable) updated_requested_refs_to_fetch = NULL; /* (element-type OstreeCollectionRef utf8) */
|
g_autoptr(GHashTable) updated_requested_refs_to_fetch = NULL; /* (element-type OstreeCollectionRef utf8) */
|
||||||
int i;
|
int i;
|
||||||
g_autofree char **opt_localcache_repos = NULL;
|
g_autofree char **opt_localcache_repos = NULL;
|
||||||
|
g_autoptr(GVariantIter) ref_keyring_map_iter = NULL;
|
||||||
/* If refs or collection-refs has exactly one value, this will point to that
|
/* If refs or collection-refs has exactly one value, this will point to that
|
||||||
* value, otherwise NULL. Used for logging.
|
* value, otherwise NULL. Used for logging.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3584,6 +3611,8 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
(void) g_variant_lookup (options, "append-user-agent", "s", &pull_data->append_user_agent);
|
(void) g_variant_lookup (options, "append-user-agent", "s", &pull_data->append_user_agent);
|
||||||
opt_n_network_retries_set =
|
opt_n_network_retries_set =
|
||||||
g_variant_lookup (options, "n-network-retries", "u", &pull_data->n_network_retries);
|
g_variant_lookup (options, "n-network-retries", "u", &pull_data->n_network_retries);
|
||||||
|
opt_ref_keyring_map_set =
|
||||||
|
g_variant_lookup (options, "ref-keyring-map", "a(sss)", &ref_keyring_map_iter);
|
||||||
|
|
||||||
if (pull_data->remote_refspec_name != NULL)
|
if (pull_data->remote_refspec_name != NULL)
|
||||||
pull_data->remote_name = g_strdup (pull_data->remote_refspec_name);
|
pull_data->remote_name = g_strdup (pull_data->remote_refspec_name);
|
||||||
|
|
@ -3644,6 +3673,8 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
(GDestroyNotify)g_free);
|
(GDestroyNotify)g_free);
|
||||||
pull_data->gpg_verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal,
|
pull_data->gpg_verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
(GDestroyNotify)g_free, NULL);
|
(GDestroyNotify)g_free, NULL);
|
||||||
|
pull_data->ref_keyring_map = g_hash_table_new_full (ostree_collection_ref_hash, ostree_collection_ref_equal,
|
||||||
|
(GDestroyNotify)ostree_collection_ref_free, (GDestroyNotify)g_free);
|
||||||
pull_data->scanned_metadata = g_hash_table_new_full (ostree_hash_object_name, g_variant_equal,
|
pull_data->scanned_metadata = g_hash_table_new_full (ostree_hash_object_name, g_variant_equal,
|
||||||
(GDestroyNotify)g_variant_unref, NULL);
|
(GDestroyNotify)g_variant_unref, NULL);
|
||||||
pull_data->fetched_detached_metadata = g_hash_table_new_full (g_str_hash, g_str_equal,
|
pull_data->fetched_detached_metadata = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
|
|
@ -4373,6 +4404,30 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt_ref_keyring_map_set)
|
||||||
|
{
|
||||||
|
const gchar *collection_id, *ref_name, *keyring_remote_name;
|
||||||
|
|
||||||
|
while (g_variant_iter_loop (ref_keyring_map_iter, "(&s&s&s)", &collection_id, &ref_name, &keyring_remote_name))
|
||||||
|
{
|
||||||
|
g_autoptr(OstreeCollectionRef) c_r = NULL;
|
||||||
|
|
||||||
|
if (!ostree_validate_collection_id (collection_id, error))
|
||||||
|
goto out;
|
||||||
|
if (!ostree_validate_rev (ref_name, error))
|
||||||
|
goto out;
|
||||||
|
if (!ostree_validate_remote_name (keyring_remote_name, error))
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
c_r = ostree_collection_ref_new (collection_id, ref_name);
|
||||||
|
if (!g_hash_table_contains (requested_refs_to_fetch, c_r))
|
||||||
|
continue;
|
||||||
|
g_hash_table_insert (pull_data->ref_keyring_map,
|
||||||
|
g_steal_pointer (&c_r),
|
||||||
|
g_strdup (keyring_remote_name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Create the state directory here - it's new with the commitpartial code,
|
/* Create the state directory here - it's new with the commitpartial code,
|
||||||
* and may not exist in older repositories.
|
* and may not exist in older repositories.
|
||||||
*/
|
*/
|
||||||
|
|
@ -4600,7 +4655,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
g_autofree char *formatted_xferred = g_format_size (bytes_transferred);
|
g_autofree char *formatted_xferred = g_format_size (bytes_transferred);
|
||||||
g_string_append_printf (msg, "\ntransfer: secs: %u size: %s", n_seconds, formatted_xferred);
|
g_string_append_printf (msg, "\ntransfer: secs: %u size: %s", n_seconds, formatted_xferred);
|
||||||
|
|
||||||
sd_journal_send ("MESSAGE=%s", msg->str,
|
ot_journal_send ("MESSAGE=%s", msg->str,
|
||||||
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_MESSAGE_FETCH_COMPLETE_ID),
|
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_MESSAGE_FETCH_COMPLETE_ID),
|
||||||
"OSTREE_REMOTE=%s", pull_data->remote_name,
|
"OSTREE_REMOTE=%s", pull_data->remote_name,
|
||||||
"OSTREE_GPG=%s", gpg_verify_state,
|
"OSTREE_GPG=%s", gpg_verify_state,
|
||||||
|
|
@ -4664,6 +4719,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
g_clear_pointer (&pull_data->summary_deltas_checksums, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->summary_deltas_checksums, (GDestroyNotify) g_hash_table_unref);
|
||||||
g_clear_pointer (&pull_data->ref_original_commits, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->ref_original_commits, (GDestroyNotify) g_hash_table_unref);
|
||||||
g_clear_pointer (&pull_data->gpg_verified_commits, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->gpg_verified_commits, (GDestroyNotify) g_hash_table_unref);
|
||||||
|
g_clear_pointer (&pull_data->ref_keyring_map, (GDestroyNotify) g_hash_table_unref);
|
||||||
g_clear_pointer (&pull_data->requested_content, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->requested_content, (GDestroyNotify) g_hash_table_unref);
|
||||||
g_clear_pointer (&pull_data->requested_fallback_content, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->requested_fallback_content, (GDestroyNotify) g_hash_table_unref);
|
||||||
g_clear_pointer (&pull_data->requested_metadata, (GDestroyNotify) g_hash_table_unref);
|
g_clear_pointer (&pull_data->requested_metadata, (GDestroyNotify) g_hash_table_unref);
|
||||||
|
|
@ -4950,7 +5006,7 @@ static void find_remotes_cb (GObject *obj,
|
||||||
* provided.
|
* provided.
|
||||||
* * `n-network-retries` (`u`): Number of times to retry each download on
|
* * `n-network-retries` (`u`): Number of times to retry each download on
|
||||||
* receiving a transient network error, such as a socket timeout; default is
|
* receiving a transient network error, such as a socket timeout; default is
|
||||||
* 5, 0 means return errors without retrying.
|
* 5, 0 means return errors without retrying. Since: 2018.6
|
||||||
*
|
*
|
||||||
* @finders must be a non-empty %NULL-terminated array of the #OstreeRepoFinder
|
* @finders must be a non-empty %NULL-terminated array of the #OstreeRepoFinder
|
||||||
* instances to use, or %NULL to use the system default set of finders, which
|
* instances to use, or %NULL to use the system default set of finders, which
|
||||||
|
|
@ -5795,6 +5851,17 @@ copy_option (GVariantDict *master_options,
|
||||||
* * `update-frequency` (`u`): Frequency to call the async progress callback in
|
* * `update-frequency` (`u`): Frequency to call the async progress callback in
|
||||||
* milliseconds, if any; only values higher than 0 are valid
|
* milliseconds, if any; only values higher than 0 are valid
|
||||||
* * `append-user-agent` (`s`): Additional string to append to the user agent
|
* * `append-user-agent` (`s`): Additional string to append to the user agent
|
||||||
|
* * `n-network-retries` (`u`): Number of times to retry each download on receiving
|
||||||
|
* a transient network error, such as a socket timeout; default is 5, 0
|
||||||
|
* means return errors without retrying. Since: 2018.6
|
||||||
|
* * `ref-keyring-map` (`a(sss)`): Array of (collection ID, ref name, keyring
|
||||||
|
* remote name) tuples specifying which remote's keyring should be used when
|
||||||
|
* doing GPG verification of each collection-ref. This is useful to prevent a
|
||||||
|
* remote from serving malicious updates to refs which did not originate from
|
||||||
|
* it. This can be a subset or superset of the refs being pulled; any ref
|
||||||
|
* not being pulled will be ignored and any ref without a keyring remote
|
||||||
|
* will be verified with the keyring of the remote being pulled from.
|
||||||
|
* Since: 2019.2
|
||||||
*
|
*
|
||||||
* Since: 2018.6
|
* Since: 2018.6
|
||||||
*/
|
*/
|
||||||
|
|
@ -5915,6 +5982,7 @@ ostree_repo_pull_from_remotes_async (OstreeRepo *self,
|
||||||
copy_option (&options_dict, &local_options_dict, "update-frequency", G_VARIANT_TYPE ("u"));
|
copy_option (&options_dict, &local_options_dict, "update-frequency", G_VARIANT_TYPE ("u"));
|
||||||
copy_option (&options_dict, &local_options_dict, "append-user-agent", G_VARIANT_TYPE ("s"));
|
copy_option (&options_dict, &local_options_dict, "append-user-agent", G_VARIANT_TYPE ("s"));
|
||||||
copy_option (&options_dict, &local_options_dict, "n-network-retries", G_VARIANT_TYPE ("u"));
|
copy_option (&options_dict, &local_options_dict, "n-network-retries", G_VARIANT_TYPE ("u"));
|
||||||
|
copy_option (&options_dict, &local_options_dict, "ref-keyring-map", G_VARIANT_TYPE ("a(sss)"));
|
||||||
|
|
||||||
local_options = g_variant_dict_end (&local_options_dict);
|
local_options = g_variant_dict_end (&local_options_dict);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,9 @@ ostree_repo_resolve_rev (OstreeRepo *self,
|
||||||
* the parameter @out_rev. Differently from ostree_repo_resolve_rev(),
|
* the parameter @out_rev. Differently from ostree_repo_resolve_rev(),
|
||||||
* this will not fall back to searching through remote repos if a
|
* this will not fall back to searching through remote repos if a
|
||||||
* local ref is specified but not found.
|
* local ref is specified but not found.
|
||||||
|
*
|
||||||
|
* The flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY is implied so
|
||||||
|
* using it has no effect.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||||
|
|
@ -511,7 +514,9 @@ ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||||
* the given @ref cannot be found, a %G_IO_ERROR_NOT_FOUND error will be
|
* the given @ref cannot be found, a %G_IO_ERROR_NOT_FOUND error will be
|
||||||
* returned.
|
* returned.
|
||||||
*
|
*
|
||||||
* There are currently no @flags which affect the behaviour of this function.
|
* If you want to check only local refs, not remote or mirrored ones, use the
|
||||||
|
* flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY. This is analogous to using
|
||||||
|
* ostree_repo_resolve_rev_ext() but for collection-refs.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE on success, %FALSE on failure
|
* Returns: %TRUE on success, %FALSE on failure
|
||||||
* Since: 2018.6
|
* Since: 2018.6
|
||||||
|
|
@ -525,19 +530,63 @@ ostree_repo_resolve_collection_ref (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
g_autofree char *ret_contents = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
|
g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
|
||||||
g_return_val_if_fail (ref != NULL, FALSE);
|
g_return_val_if_fail (ref != NULL, FALSE);
|
||||||
g_return_val_if_fail (ref->collection_id != NULL && ref->ref_name != NULL, FALSE);
|
g_return_val_if_fail (ref->collection_id != NULL && ref->ref_name != NULL, FALSE);
|
||||||
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
|
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
|
||||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||||
|
|
||||||
g_autoptr(GHashTable) refs = NULL; /* (element-type OstreeCollectionRef utf8) */
|
/* Check for the ref in the current transaction in case it hasn't been
|
||||||
if (!ostree_repo_list_collection_refs (self, ref->collection_id, &refs,
|
* written to disk, to match the behavior of ostree_repo_resolve_rev() */
|
||||||
OSTREE_REPO_LIST_REFS_EXT_NONE,
|
if (self->in_transaction)
|
||||||
cancellable, error))
|
{
|
||||||
return FALSE;
|
g_mutex_lock (&self->txn_lock);
|
||||||
|
if (self->txn.collection_refs)
|
||||||
|
{
|
||||||
|
const char *repo_collection_id = ostree_repo_get_collection_id (self);
|
||||||
|
/* If the collection ID doesn't match it's a remote ref */
|
||||||
|
if (!(flags & OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY) ||
|
||||||
|
repo_collection_id == NULL ||
|
||||||
|
g_strcmp0 (repo_collection_id, ref->collection_id) == 0)
|
||||||
|
{
|
||||||
|
ret_contents = g_strdup (g_hash_table_lookup (self->txn.collection_refs, ref));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_mutex_unlock (&self->txn_lock);
|
||||||
|
}
|
||||||
|
|
||||||
const char *ret_contents = g_hash_table_lookup (refs, ref);
|
/* Check for the ref on disk in the repo */
|
||||||
|
if (ret_contents == NULL)
|
||||||
|
{
|
||||||
|
g_autoptr(GHashTable) refs = NULL; /* (element-type OstreeCollectionRef utf8) */
|
||||||
|
OstreeRepoListRefsExtFlags list_refs_flags;
|
||||||
|
|
||||||
|
if (flags & OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY)
|
||||||
|
list_refs_flags = OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES | OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS;
|
||||||
|
else
|
||||||
|
list_refs_flags = OSTREE_REPO_LIST_REFS_EXT_NONE;
|
||||||
|
|
||||||
|
if (!ostree_repo_list_collection_refs (self, ref->collection_id, &refs,
|
||||||
|
list_refs_flags, cancellable, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ret_contents = g_strdup (g_hash_table_lookup (refs, ref));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check for the ref in the parent repo */
|
||||||
|
if (ret_contents == NULL && self->parent_repo != NULL)
|
||||||
|
{
|
||||||
|
if (!ostree_repo_resolve_collection_ref (self->parent_repo,
|
||||||
|
ref,
|
||||||
|
TRUE,
|
||||||
|
flags,
|
||||||
|
&ret_contents,
|
||||||
|
cancellable,
|
||||||
|
error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret_contents == NULL && !allow_noent)
|
if (ret_contents == NULL && !allow_noent)
|
||||||
{
|
{
|
||||||
|
|
@ -548,7 +597,7 @@ ostree_repo_resolve_collection_ref (OstreeRepo *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (out_rev != NULL)
|
if (out_rev != NULL)
|
||||||
*out_rev = g_strdup (ret_contents);
|
*out_rev = g_steal_pointer (&ret_contents);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1218,7 +1267,9 @@ _ostree_repo_update_collection_refs (OstreeRepo *self,
|
||||||
* (ostree_repo_get_collection_id()).
|
* (ostree_repo_get_collection_id()).
|
||||||
*
|
*
|
||||||
* If you want to exclude refs from `refs/remotes`, use
|
* If you want to exclude refs from `refs/remotes`, use
|
||||||
* %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags.
|
* %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags. Similarly use
|
||||||
|
* %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS to exclude refs from
|
||||||
|
* `refs/mirrors`.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE on success, %FALSE otherwise
|
* Returns: %TRUE on success, %FALSE otherwise
|
||||||
* Since: 2018.6
|
* Since: 2018.6
|
||||||
|
|
@ -1240,9 +1291,12 @@ ostree_repo_list_collection_refs (OstreeRepo *self,
|
||||||
if (match_collection_id != NULL && !ostree_validate_collection_id (match_collection_id, error))
|
if (match_collection_id != NULL && !ostree_validate_collection_id (match_collection_id, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
const gchar *refs_dirs[] = { "refs/mirrors", "refs/remotes", NULL };
|
g_autoptr(GPtrArray) refs_dirs = g_ptr_array_new ();
|
||||||
if (flags & OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES)
|
if (!(flags & OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS))
|
||||||
refs_dirs[1] = NULL;
|
g_ptr_array_add (refs_dirs, "refs/mirrors");
|
||||||
|
if (!(flags & OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES))
|
||||||
|
g_ptr_array_add (refs_dirs, "refs/remotes");
|
||||||
|
g_ptr_array_add (refs_dirs, NULL);
|
||||||
|
|
||||||
g_autoptr(GHashTable) ret_all_refs = NULL;
|
g_autoptr(GHashTable) ret_all_refs = NULL;
|
||||||
|
|
||||||
|
|
@ -1272,7 +1326,7 @@ ostree_repo_list_collection_refs (OstreeRepo *self,
|
||||||
|
|
||||||
g_string_truncate (base_path, 0);
|
g_string_truncate (base_path, 0);
|
||||||
|
|
||||||
for (const char **iter = refs_dirs; iter && *iter; iter++)
|
for (const char **iter = (const char **)refs_dirs->pdata; iter && *iter; iter++)
|
||||||
{
|
{
|
||||||
const char *refs_dir = *iter;
|
const char *refs_dir = *iter;
|
||||||
gboolean refs_dir_exists = FALSE;
|
gboolean refs_dir_exists = FALSE;
|
||||||
|
|
|
||||||
|
|
@ -725,16 +725,25 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
g_autofree char *from = NULL;
|
|
||||||
g_autofree char *to = NULL;
|
|
||||||
if (!_ostree_parse_delta_name (delta_id, &from, &to, error))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
g_autofree char *superblock_path = _ostree_get_relative_static_delta_superblock_path (from, to);
|
|
||||||
|
|
||||||
glnx_autofd int superblock_fd = -1;
|
glnx_autofd int superblock_fd = -1;
|
||||||
if (!glnx_openat_rdonly (self->repo_dir_fd, superblock_path, TRUE, &superblock_fd, error))
|
|
||||||
return FALSE;
|
if (strchr (delta_id, '/'))
|
||||||
|
{
|
||||||
|
if (!glnx_openat_rdonly (AT_FDCWD, delta_id, TRUE, &superblock_fd, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_autofree char *from = NULL;
|
||||||
|
g_autofree char *to = NULL;
|
||||||
|
if (!_ostree_parse_delta_name (delta_id, &from, &to, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
g_autofree char *superblock_path = _ostree_get_relative_static_delta_superblock_path (from, to);
|
||||||
|
if (!glnx_openat_rdonly (self->repo_dir_fd, superblock_path, TRUE, &superblock_fd, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
g_autoptr(GVariant) delta_superblock = NULL;
|
g_autoptr(GVariant) delta_superblock = NULL;
|
||||||
if (!ot_variant_read_fd (superblock_fd, 0,
|
if (!ot_variant_read_fd (superblock_fd, 0,
|
||||||
(GVariantType*)OSTREE_STATIC_DELTA_SUPERBLOCK_FORMAT,
|
(GVariantType*)OSTREE_STATIC_DELTA_SUPERBLOCK_FORMAT,
|
||||||
|
|
@ -742,6 +751,26 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
g_print ("Delta: %s\n", delta_id);
|
g_print ("Delta: %s\n", delta_id);
|
||||||
|
g_autoptr(GVariant) from_commit_v = NULL;
|
||||||
|
g_variant_get_child (delta_superblock, 2, "@ay", &from_commit_v);
|
||||||
|
g_autofree char *from_commit = NULL;
|
||||||
|
if (g_variant_n_children (from_commit_v) > 0)
|
||||||
|
{
|
||||||
|
if (!ostree_checksum_bytes_peek_validate (from_commit_v, error))
|
||||||
|
return FALSE;
|
||||||
|
from_commit = ostree_checksum_from_bytes_v (from_commit_v);
|
||||||
|
g_print ("From: %s\n", from_commit);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_print ("From <scratch>\n");
|
||||||
|
}
|
||||||
|
g_autoptr(GVariant) to_commit_v = NULL;
|
||||||
|
g_variant_get_child (delta_superblock, 3, "@ay", &to_commit_v);
|
||||||
|
if (!ostree_checksum_bytes_peek_validate (to_commit_v, error))
|
||||||
|
return FALSE;
|
||||||
|
g_autofree char *to_commit = ostree_checksum_from_bytes_v (to_commit_v);
|
||||||
|
g_print ("To: %s\n", to_commit);
|
||||||
|
|
||||||
gboolean swap_endian = FALSE;
|
gboolean swap_endian = FALSE;
|
||||||
OstreeDeltaEndianness endianness;
|
OstreeDeltaEndianness endianness;
|
||||||
|
|
@ -777,6 +806,7 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
|
|
||||||
g_print ("Endianness: %s\n", endianness_description);
|
g_print ("Endianness: %s\n", endianness_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
guint64 ts;
|
guint64 ts;
|
||||||
g_variant_get_child (delta_superblock, 1, "t", &ts);
|
g_variant_get_child (delta_superblock, 1, "t", &ts);
|
||||||
g_print ("Timestamp: %" G_GUINT64_FORMAT "\n", GUINT64_FROM_BE (ts));
|
g_print ("Timestamp: %" G_GUINT64_FORMAT "\n", GUINT64_FROM_BE (ts));
|
||||||
|
|
@ -821,7 +851,7 @@ _ostree_repo_static_delta_dump (OstreeRepo *self,
|
||||||
|
|
||||||
for (guint i = 0; i < n_parts; i++)
|
for (guint i = 0; i < n_parts; i++)
|
||||||
{
|
{
|
||||||
if (!show_one_part (self, swap_endian, from, to, meta_entries, i,
|
if (!show_one_part (self, swap_endian, from_commit, to_commit, meta_entries, i,
|
||||||
&total_size, &total_usize,
|
&total_size, &total_usize,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
|
|
@ -1036,6 +1036,7 @@ ostree_repo_finalize (GObject *object)
|
||||||
g_mutex_clear (&self->txn_lock);
|
g_mutex_clear (&self->txn_lock);
|
||||||
g_free (self->collection_id);
|
g_free (self->collection_id);
|
||||||
g_strfreev (self->repo_finders);
|
g_strfreev (self->repo_finders);
|
||||||
|
g_free (self->bootloader);
|
||||||
|
|
||||||
g_clear_pointer (&self->remotes, g_hash_table_destroy);
|
g_clear_pointer (&self->remotes, g_hash_table_destroy);
|
||||||
g_mutex_clear (&self->remotes_lock);
|
g_mutex_clear (&self->remotes_lock);
|
||||||
|
|
@ -1735,6 +1736,88 @@ ostree_repo_remote_delete (OstreeRepo *self,
|
||||||
return impl_repo_remote_delete (self, NULL, FALSE, name, cancellable, error);
|
return impl_repo_remote_delete (self, NULL, FALSE, name, cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
impl_repo_remote_replace (OstreeRepo *self,
|
||||||
|
GFile *sysroot,
|
||||||
|
const char *name,
|
||||||
|
const char *url,
|
||||||
|
GVariant *options,
|
||||||
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (name != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (url != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (options == NULL || g_variant_is_of_type (options, G_VARIANT_TYPE ("a{sv}")), FALSE);
|
||||||
|
|
||||||
|
if (!ostree_validate_remote_name (name, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
g_autoptr(GError) local_error = NULL;
|
||||||
|
g_autoptr(OstreeRemote) remote = _ostree_repo_get_remote (self, name, &local_error);
|
||||||
|
if (remote == NULL)
|
||||||
|
{
|
||||||
|
if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||||
|
{
|
||||||
|
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
g_clear_error (&local_error);
|
||||||
|
if (!impl_repo_remote_add (self, sysroot, FALSE, name, url, options,
|
||||||
|
cancellable, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Replace the entire option group */
|
||||||
|
if (!g_key_file_remove_group (remote->options, remote->group, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (g_str_has_prefix (url, "metalink="))
|
||||||
|
g_key_file_set_string (remote->options, remote->group, "metalink",
|
||||||
|
url + strlen ("metalink="));
|
||||||
|
else
|
||||||
|
g_key_file_set_string (remote->options, remote->group, "url", url);
|
||||||
|
|
||||||
|
if (options != NULL)
|
||||||
|
keyfile_set_from_vardict (remote->options, remote->group, options);
|
||||||
|
|
||||||
|
/* Write out updated settings */
|
||||||
|
if (remote->file != NULL)
|
||||||
|
{
|
||||||
|
gsize length;
|
||||||
|
g_autofree char *data = g_key_file_to_data (remote->options, &length,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (!g_file_replace_contents (remote->file, data, length,
|
||||||
|
NULL, FALSE, 0, NULL,
|
||||||
|
cancellable, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_autoptr(GKeyFile) config = ostree_repo_copy_config (self);
|
||||||
|
|
||||||
|
/* Remove the existing group if it exists */
|
||||||
|
if (!g_key_file_remove_group (config, remote->group, &local_error))
|
||||||
|
{
|
||||||
|
if (!g_error_matches (local_error, G_KEY_FILE_ERROR,
|
||||||
|
G_KEY_FILE_ERROR_GROUP_NOT_FOUND))
|
||||||
|
{
|
||||||
|
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ot_keyfile_copy_group (remote->options, config, remote->group);
|
||||||
|
if (!ostree_repo_write_config (self, config, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ostree_repo_remote_change:
|
* ostree_repo_remote_change:
|
||||||
* @self: Repo
|
* @self: Repo
|
||||||
|
|
@ -1776,6 +1859,9 @@ ostree_repo_remote_change (OstreeRepo *self,
|
||||||
case OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS:
|
case OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS:
|
||||||
return impl_repo_remote_delete (self, sysroot, TRUE, name,
|
return impl_repo_remote_delete (self, sysroot, TRUE, name,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
|
case OSTREE_REPO_REMOTE_CHANGE_REPLACE:
|
||||||
|
return impl_repo_remote_replace (self, sysroot, name, url, options,
|
||||||
|
cancellable, error);
|
||||||
}
|
}
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
|
@ -3028,6 +3114,33 @@ reload_remote_config (OstreeRepo *self,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
reload_sysroot_config (OstreeRepo *self,
|
||||||
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
{ g_autofree char *bootloader = NULL;
|
||||||
|
|
||||||
|
if (!ot_keyfile_get_value_with_default_group_optional (self->config, "sysroot",
|
||||||
|
"bootloader", "auto",
|
||||||
|
&bootloader, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* TODO: possibly later add support for specifying a generic bootloader
|
||||||
|
* binary "x" in /usr/lib/ostree/bootloaders/x). See:
|
||||||
|
* https://github.com/ostreedev/ostree/issues/1719
|
||||||
|
* https://github.com/ostreedev/ostree/issues/1801
|
||||||
|
*/
|
||||||
|
if (!(g_str_equal (bootloader, "auto") || g_str_equal (bootloader, "none")))
|
||||||
|
return glnx_throw (error, "Invalid bootloader configuration: '%s'", bootloader);
|
||||||
|
|
||||||
|
g_free (self->bootloader);
|
||||||
|
self->bootloader = g_steal_pointer (&bootloader);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ostree_repo_reload_config:
|
* ostree_repo_reload_config:
|
||||||
* @self: repo
|
* @self: repo
|
||||||
|
|
@ -3046,6 +3159,8 @@ ostree_repo_reload_config (OstreeRepo *self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!reload_remote_config (self, cancellable, error))
|
if (!reload_remote_config (self, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (!reload_sysroot_config (self, cancellable, error))
|
||||||
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5101,8 +5216,12 @@ _ostree_repo_gpg_verify_data_internal (OstreeRepo *self,
|
||||||
|
|
||||||
g_auto(GStrv) gpgkeypath_list = NULL;
|
g_auto(GStrv) gpgkeypath_list = NULL;
|
||||||
|
|
||||||
if (!ot_keyfile_get_string_as_list (remote->options, remote->group, "gpgkeypath",
|
if (!ot_keyfile_get_string_list_with_separator_choice (remote->options,
|
||||||
";,", &gpgkeypath_list, error))
|
remote->group,
|
||||||
|
"gpgkeypath",
|
||||||
|
";,",
|
||||||
|
&gpgkeypath_list,
|
||||||
|
error))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (gpgkeypath_list)
|
if (gpgkeypath_list)
|
||||||
|
|
@ -5975,3 +6094,21 @@ ostree_repo_get_default_repo_finders (OstreeRepo *self)
|
||||||
|
|
||||||
return (const gchar * const *)self->repo_finders;
|
return (const gchar * const *)self->repo_finders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ostree_repo_get_bootloader:
|
||||||
|
* @self: an #OstreeRepo
|
||||||
|
*
|
||||||
|
* Get the bootloader configured. See the documentation for the
|
||||||
|
* "sysroot.bootloader" config key.
|
||||||
|
*
|
||||||
|
* Returns: bootloader configuration for the sysroot
|
||||||
|
* Since: 2019.2
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
ostree_repo_get_bootloader (OstreeRepo *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (OSTREE_IS_REPO (self), NULL);
|
||||||
|
|
||||||
|
return self->bootloader;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,9 @@ gboolean ostree_repo_set_collection_id (OstreeRepo *self,
|
||||||
_OSTREE_PUBLIC
|
_OSTREE_PUBLIC
|
||||||
const gchar * const * ostree_repo_get_default_repo_finders (OstreeRepo *self);
|
const gchar * const * ostree_repo_get_default_repo_finders (OstreeRepo *self);
|
||||||
|
|
||||||
|
_OSTREE_PUBLIC
|
||||||
|
const gchar * ostree_repo_get_bootloader (OstreeRepo *self);
|
||||||
|
|
||||||
_OSTREE_PUBLIC
|
_OSTREE_PUBLIC
|
||||||
GFile * ostree_repo_get_path (OstreeRepo *self);
|
GFile * ostree_repo_get_path (OstreeRepo *self);
|
||||||
|
|
||||||
|
|
@ -166,12 +169,14 @@ gboolean ostree_repo_remote_delete (OstreeRepo *self,
|
||||||
* @OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS: Like above, but do nothing if the remote exists
|
* @OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS: Like above, but do nothing if the remote exists
|
||||||
* @OSTREE_REPO_REMOTE_CHANGE_DELETE: Delete a remote
|
* @OSTREE_REPO_REMOTE_CHANGE_DELETE: Delete a remote
|
||||||
* @OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS: Delete a remote, do nothing if the remote does not exist
|
* @OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS: Delete a remote, do nothing if the remote does not exist
|
||||||
|
* @OSTREE_REPO_REMOTE_CHANGE_REPLACE: Add or replace a remote (Since: 2019.2)
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OSTREE_REPO_REMOTE_CHANGE_ADD,
|
OSTREE_REPO_REMOTE_CHANGE_ADD,
|
||||||
OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
|
OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
|
||||||
OSTREE_REPO_REMOTE_CHANGE_DELETE,
|
OSTREE_REPO_REMOTE_CHANGE_DELETE,
|
||||||
OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS
|
OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS,
|
||||||
|
OSTREE_REPO_REMOTE_CHANGE_REPLACE,
|
||||||
} OstreeRepoRemoteChange;
|
} OstreeRepoRemoteChange;
|
||||||
|
|
||||||
_OSTREE_PUBLIC
|
_OSTREE_PUBLIC
|
||||||
|
|
@ -460,9 +465,11 @@ gboolean ostree_repo_resolve_rev (OstreeRepo *self,
|
||||||
/**
|
/**
|
||||||
* OstreeRepoResolveRevExtFlags:
|
* OstreeRepoResolveRevExtFlags:
|
||||||
* @OSTREE_REPO_RESOLVE_REV_EXT_NONE: No flags.
|
* @OSTREE_REPO_RESOLVE_REV_EXT_NONE: No flags.
|
||||||
|
* @OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY: Exclude remote and mirrored refs. Since: 2019.2
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OSTREE_REPO_RESOLVE_REV_EXT_NONE = 0,
|
OSTREE_REPO_RESOLVE_REV_EXT_NONE = 0,
|
||||||
|
OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY = (1 << 0),
|
||||||
} OstreeRepoResolveRevExtFlags;
|
} OstreeRepoResolveRevExtFlags;
|
||||||
|
|
||||||
_OSTREE_PUBLIC
|
_OSTREE_PUBLIC
|
||||||
|
|
@ -494,11 +501,13 @@ gboolean ostree_repo_list_refs (OstreeRepo *self,
|
||||||
* @OSTREE_REPO_LIST_REFS_EXT_NONE: No flags.
|
* @OSTREE_REPO_LIST_REFS_EXT_NONE: No flags.
|
||||||
* @OSTREE_REPO_LIST_REFS_EXT_ALIASES: Only list aliases. Since: 2017.10
|
* @OSTREE_REPO_LIST_REFS_EXT_ALIASES: Only list aliases. Since: 2017.10
|
||||||
* @OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES: Exclude remote refs. Since: 2017.11
|
* @OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES: Exclude remote refs. Since: 2017.11
|
||||||
|
* @OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS: Exclude mirrored refs. Since: 2019.2
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OSTREE_REPO_LIST_REFS_EXT_NONE = 0,
|
OSTREE_REPO_LIST_REFS_EXT_NONE = 0,
|
||||||
OSTREE_REPO_LIST_REFS_EXT_ALIASES = (1 << 0),
|
OSTREE_REPO_LIST_REFS_EXT_ALIASES = (1 << 0),
|
||||||
OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES = (1 << 1),
|
OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES = (1 << 1),
|
||||||
|
OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS = (1 << 2),
|
||||||
} OstreeRepoListRefsExtFlags;
|
} OstreeRepoListRefsExtFlags;
|
||||||
|
|
||||||
_OSTREE_PUBLIC
|
_OSTREE_PUBLIC
|
||||||
|
|
|
||||||
|
|
@ -447,14 +447,12 @@ merge_configuration_from (OstreeSysroot *sysroot,
|
||||||
{ g_autofree char *msg =
|
{ g_autofree char *msg =
|
||||||
g_strdup_printf ("Copying /etc changes: %u modified, %u removed, %u added",
|
g_strdup_printf ("Copying /etc changes: %u modified, %u removed, %u added",
|
||||||
modified->len, removed->len, added->len);
|
modified->len, removed->len, added->len);
|
||||||
#ifdef HAVE_LIBSYSTEMD
|
ot_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_CONFIGMERGE_ID),
|
||||||
sd_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_CONFIGMERGE_ID),
|
|
||||||
"MESSAGE=%s", msg,
|
"MESSAGE=%s", msg,
|
||||||
"ETC_N_MODIFIED=%u", modified->len,
|
"ETC_N_MODIFIED=%u", modified->len,
|
||||||
"ETC_N_REMOVED=%u", removed->len,
|
"ETC_N_REMOVED=%u", removed->len,
|
||||||
"ETC_N_ADDED=%u", added->len,
|
"ETC_N_ADDED=%u", added->len,
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
|
||||||
_ostree_sysroot_emit_journal_msg (sysroot, msg);
|
_ostree_sysroot_emit_journal_msg (sysroot, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -701,11 +699,9 @@ selinux_relabel_var_if_needed (OstreeSysroot *sysroot,
|
||||||
{
|
{
|
||||||
{ g_autofree char *msg =
|
{ g_autofree char *msg =
|
||||||
g_strdup_printf ("Relabeling /var (no stamp file '%s' found)", selabeled);
|
g_strdup_printf ("Relabeling /var (no stamp file '%s' found)", selabeled);
|
||||||
#ifdef HAVE_LIBSYSTEMD
|
ot_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_VARRELABEL_ID),
|
||||||
sd_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_VARRELABEL_ID),
|
|
||||||
"MESSAGE=%s", msg,
|
"MESSAGE=%s", msg,
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
|
||||||
_ostree_sysroot_emit_journal_msg (sysroot, msg);
|
_ostree_sysroot_emit_journal_msg (sysroot, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1739,7 +1735,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
||||||
* (specifically, it looks for the substring "(ostree"), so further
|
* (specifically, it looks for the substring "(ostree"), so further
|
||||||
* changes to the title format may require updating that backend. */
|
* changes to the title format may require updating that backend. */
|
||||||
g_autoptr(GString) title_key = g_string_new (val);
|
g_autoptr(GString) title_key = g_string_new (val);
|
||||||
if (deployment_version && *deployment_version)
|
if (deployment_version && *deployment_version && !strstr (val, deployment_version))
|
||||||
{
|
{
|
||||||
g_string_append_c (title_key, ' ');
|
g_string_append_c (title_key, ' ');
|
||||||
g_string_append (title_key, deployment_version);
|
g_string_append (title_key, deployment_version);
|
||||||
|
|
@ -2122,7 +2118,8 @@ write_deployments_bootswap (OstreeSysroot *self,
|
||||||
if (bootloader)
|
if (bootloader)
|
||||||
{
|
{
|
||||||
if (!_ostree_bootloader_write_config (bootloader, new_bootversion,
|
if (!_ostree_bootloader_write_config (bootloader, new_bootversion,
|
||||||
cancellable, error))
|
new_deployments, cancellable,
|
||||||
|
error))
|
||||||
return glnx_prefix_error (error, "Bootloader write config");
|
return glnx_prefix_error (error, "Bootloader write config");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2310,6 +2307,7 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
|
||||||
gboolean bootloader_is_atomic = FALSE;
|
gboolean bootloader_is_atomic = FALSE;
|
||||||
SyncStats syncstats = { 0, };
|
SyncStats syncstats = { 0, };
|
||||||
g_autoptr(OstreeBootloader) bootloader = NULL;
|
g_autoptr(OstreeBootloader) bootloader = NULL;
|
||||||
|
const char *bootloader_config = NULL;
|
||||||
if (!requires_new_bootversion)
|
if (!requires_new_bootversion)
|
||||||
{
|
{
|
||||||
if (!create_new_bootlinks (self, self->bootversion,
|
if (!create_new_bootlinks (self, self->bootversion,
|
||||||
|
|
@ -2342,8 +2340,22 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
|
||||||
return glnx_throw_errno_prefix (error, "Remounting /boot read-write");
|
return glnx_throw_errno_prefix (error, "Remounting /boot read-write");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
|
OstreeRepo *repo = ostree_sysroot_repo (self);
|
||||||
return FALSE;
|
|
||||||
|
bootloader_config = ostree_repo_get_bootloader (repo);
|
||||||
|
|
||||||
|
g_debug ("Using bootloader configuration: %s", bootloader_config);
|
||||||
|
|
||||||
|
if (g_str_equal (bootloader_config, "auto"))
|
||||||
|
{
|
||||||
|
if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else if (g_str_equal (bootloader_config, "none"))
|
||||||
|
{
|
||||||
|
/* No bootloader specified; do not query bootloaders to run. */
|
||||||
|
}
|
||||||
|
|
||||||
bootloader_is_atomic = bootloader != NULL && _ostree_bootloader_is_atomic (bootloader);
|
bootloader_is_atomic = bootloader != NULL && _ostree_bootloader_is_atomic (bootloader);
|
||||||
|
|
||||||
/* Note equivalent of try/finally here */
|
/* Note equivalent of try/finally here */
|
||||||
|
|
@ -2371,10 +2383,10 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
|
||||||
(bootloader_is_atomic ? "Transaction complete" : "Bootloader updated"),
|
(bootloader_is_atomic ? "Transaction complete" : "Bootloader updated"),
|
||||||
requires_new_bootversion ? "yes" : "no",
|
requires_new_bootversion ? "yes" : "no",
|
||||||
new_deployments->len - self->deployments->len);
|
new_deployments->len - self->deployments->len);
|
||||||
#ifdef HAVE_LIBSYSTEMD
|
ot_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_DEPLOYMENT_COMPLETE_ID),
|
||||||
sd_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_DEPLOYMENT_COMPLETE_ID),
|
|
||||||
"MESSAGE=%s", msg,
|
"MESSAGE=%s", msg,
|
||||||
"OSTREE_BOOTLOADER=%s", bootloader ? _ostree_bootloader_get_name (bootloader) : "none",
|
"OSTREE_BOOTLOADER=%s", bootloader ? _ostree_bootloader_get_name (bootloader) : "none",
|
||||||
|
"OSTREE_BOOTLOADER_CONFIG=%s", bootloader_config,
|
||||||
"OSTREE_BOOTLOADER_ATOMIC=%s", bootloader_is_atomic ? "yes" : "no",
|
"OSTREE_BOOTLOADER_ATOMIC=%s", bootloader_is_atomic ? "yes" : "no",
|
||||||
"OSTREE_DID_BOOTSWAP=%s", requires_new_bootversion ? "yes" : "no",
|
"OSTREE_DID_BOOTSWAP=%s", requires_new_bootversion ? "yes" : "no",
|
||||||
"OSTREE_N_DEPLOYMENTS=%u", new_deployments->len,
|
"OSTREE_N_DEPLOYMENTS=%u", new_deployments->len,
|
||||||
|
|
@ -2382,7 +2394,6 @@ ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
|
||||||
"OSTREE_SYNCFS_BOOT_MSEC=%" G_GUINT64_FORMAT, syncstats.boot_syncfs_msec,
|
"OSTREE_SYNCFS_BOOT_MSEC=%" G_GUINT64_FORMAT, syncstats.boot_syncfs_msec,
|
||||||
"OSTREE_SYNCFS_EXTRA_MSEC=%" G_GUINT64_FORMAT, syncstats.extra_syncfs_msec,
|
"OSTREE_SYNCFS_EXTRA_MSEC=%" G_GUINT64_FORMAT, syncstats.extra_syncfs_msec,
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
|
||||||
_ostree_sysroot_emit_journal_msg (self, msg);
|
_ostree_sysroot_emit_journal_msg (self, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2870,12 +2881,25 @@ _ostree_sysroot_finalize_staged (OstreeSysroot *self,
|
||||||
* service when a staged deployment is created.
|
* service when a staged deployment is created.
|
||||||
*/
|
*/
|
||||||
if (!self->staged_deployment)
|
if (!self->staged_deployment)
|
||||||
return TRUE;
|
{
|
||||||
|
ot_journal_print (LOG_INFO, "No deployment staged for finalization");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if finalization is locked. */
|
||||||
|
if (!glnx_fstatat_allow_noent (AT_FDCWD, _OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED,
|
||||||
|
NULL, 0, error))
|
||||||
|
return FALSE;
|
||||||
|
if (errno == 0)
|
||||||
|
{
|
||||||
|
ot_journal_print (LOG_INFO, "Not finalizing; found "
|
||||||
|
_OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Notice we send this *after* the trivial `return TRUE` above; this msg implies we've
|
/* Notice we send this *after* the trivial `return TRUE` above; this msg implies we've
|
||||||
* committed to finalizing the deployment. */
|
* committed to finalizing the deployment. */
|
||||||
#ifdef HAVE_LIBSYSTEMD
|
ot_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR,
|
||||||
sd_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR,
|
|
||||||
SD_ID128_FORMAT_VAL(OSTREE_DEPLOYMENT_FINALIZING_ID),
|
SD_ID128_FORMAT_VAL(OSTREE_DEPLOYMENT_FINALIZING_ID),
|
||||||
"MESSAGE=Finalizing staged deployment",
|
"MESSAGE=Finalizing staged deployment",
|
||||||
"OSTREE_OSNAME=%s",
|
"OSTREE_OSNAME=%s",
|
||||||
|
|
@ -2885,7 +2909,6 @@ _ostree_sysroot_finalize_staged (OstreeSysroot *self,
|
||||||
"OSTREE_DEPLOYSERIAL=%u",
|
"OSTREE_DEPLOYSERIAL=%u",
|
||||||
ostree_deployment_get_deployserial (self->staged_deployment),
|
ostree_deployment_get_deployserial (self->staged_deployment),
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
g_assert (self->staged_deployment_data);
|
g_assert (self->staged_deployment_data);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ struct OstreeSysroot {
|
||||||
#define OSTREE_SYSROOT_LOCKFILE "ostree/lock"
|
#define OSTREE_SYSROOT_LOCKFILE "ostree/lock"
|
||||||
/* We keep some transient state in /run */
|
/* We keep some transient state in /run */
|
||||||
#define _OSTREE_SYSROOT_RUNSTATE_STAGED "/run/ostree/staged-deployment"
|
#define _OSTREE_SYSROOT_RUNSTATE_STAGED "/run/ostree/staged-deployment"
|
||||||
|
#define _OSTREE_SYSROOT_RUNSTATE_STAGED_LOCKED "/run/ostree/staged-deployment-locked"
|
||||||
#define _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_DIR "/run/ostree/deployment-state/"
|
#define _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_DIR "/run/ostree/deployment-state/"
|
||||||
#define _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT "unlocked-development"
|
#define _OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT "unlocked-development"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1699,6 +1699,22 @@ clone_deployment (OstreeSysroot *sysroot,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do `mkdir()` followed by `chmod()` immediately afterwards to ensure `umask()` isn't
|
||||||
|
* masking permissions where we don't want it to. Thus we avoid calling `umask()`, which
|
||||||
|
* would affect the whole process. */
|
||||||
|
static gboolean mkdir_unmasked (int dfd,
|
||||||
|
const char *path,
|
||||||
|
int mode,
|
||||||
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
if (!glnx_shutil_mkdir_p_at (dfd, path, mode, cancellable, error))
|
||||||
|
return FALSE;
|
||||||
|
if (fchmodat (dfd, path, mode, 0) < 0)
|
||||||
|
return glnx_throw_errno_prefix (error, "chmod(%s)", path);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ostree_sysroot_deployment_unlock:
|
* ostree_sysroot_deployment_unlock:
|
||||||
* @self: Sysroot
|
* @self: Sysroot
|
||||||
|
|
@ -1755,6 +1771,14 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
||||||
if (!sepolicy)
|
if (!sepolicy)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* we want our /usr overlay to have the same permission bits as the one we'll shadow */
|
||||||
|
mode_t usr_mode;
|
||||||
|
{ struct stat stbuf;
|
||||||
|
if (!glnx_fstatat (deployment_dfd, "usr", &stbuf, 0, error))
|
||||||
|
return FALSE;
|
||||||
|
usr_mode = stbuf.st_mode;
|
||||||
|
}
|
||||||
|
|
||||||
const char *ovl_options = NULL;
|
const char *ovl_options = NULL;
|
||||||
static const char hotfix_ovl_options[] = "lowerdir=usr,upperdir=.usr-ovl-upper,workdir=.usr-ovl-work";
|
static const char hotfix_ovl_options[] = "lowerdir=usr,upperdir=.usr-ovl-upper,workdir=.usr-ovl-work";
|
||||||
switch (unlocked_state)
|
switch (unlocked_state)
|
||||||
|
|
@ -1768,9 +1792,9 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
||||||
* directly for hotfixes. The ostree-prepare-root.c helper
|
* directly for hotfixes. The ostree-prepare-root.c helper
|
||||||
* is also set up to detect and mount these.
|
* is also set up to detect and mount these.
|
||||||
*/
|
*/
|
||||||
if (!glnx_shutil_mkdir_p_at (deployment_dfd, ".usr-ovl-upper", 0755, cancellable, error))
|
if (!mkdir_unmasked (deployment_dfd, ".usr-ovl-upper", usr_mode, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!glnx_shutil_mkdir_p_at (deployment_dfd, ".usr-ovl-work", 0755, cancellable, error))
|
if (!mkdir_unmasked (deployment_dfd, ".usr-ovl-work", usr_mode, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
ovl_options = hotfix_ovl_options;
|
ovl_options = hotfix_ovl_options;
|
||||||
}
|
}
|
||||||
|
|
@ -1788,7 +1812,7 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
||||||
{ g_auto(OstreeSepolicyFsCreatecon) con = { 0, };
|
{ g_auto(OstreeSepolicyFsCreatecon) con = { 0, };
|
||||||
|
|
||||||
if (!_ostree_sepolicy_preparefscreatecon (&con, sepolicy,
|
if (!_ostree_sepolicy_preparefscreatecon (&con, sepolicy,
|
||||||
"/usr", 0755, error))
|
"/usr", usr_mode, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (g_mkdtemp_full (development_ovldir, 0755) == NULL)
|
if (g_mkdtemp_full (development_ovldir, 0755) == NULL)
|
||||||
|
|
@ -1796,10 +1820,10 @@ ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
development_ovl_upper = glnx_strjoina (development_ovldir, "/upper");
|
development_ovl_upper = glnx_strjoina (development_ovldir, "/upper");
|
||||||
if (!glnx_shutil_mkdir_p_at (AT_FDCWD, development_ovl_upper, 0755, cancellable, error))
|
if (!mkdir_unmasked (AT_FDCWD, development_ovl_upper, usr_mode, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
development_ovl_work = glnx_strjoina (development_ovldir, "/work");
|
development_ovl_work = glnx_strjoina (development_ovldir, "/work");
|
||||||
if (!glnx_shutil_mkdir_p_at (AT_FDCWD, development_ovl_work, 0755, cancellable, error))
|
if (!mkdir_unmasked (AT_FDCWD, development_ovl_work, usr_mode, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
ovl_options = glnx_strjoina ("lowerdir=usr,upperdir=", development_ovl_upper,
|
ovl_options = glnx_strjoina ("lowerdir=usr,upperdir=", development_ovl_upper,
|
||||||
",workdir=", development_ovl_work);
|
",workdir=", development_ovl_work);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
*
|
*
|
||||||
* Since: 2017.4
|
* Since: 2017.4
|
||||||
*/
|
*/
|
||||||
#define OSTREE_RELEASE_VERSION (1)
|
#define OSTREE_RELEASE_VERSION (2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OSTREE_VERSION
|
* OSTREE_VERSION
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
*
|
*
|
||||||
* Since: 2017.4
|
* Since: 2017.4
|
||||||
*/
|
*/
|
||||||
#define OSTREE_VERSION (2019.1)
|
#define OSTREE_VERSION (2019.2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OSTREE_VERSION_S:
|
* OSTREE_VERSION_S:
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
*
|
*
|
||||||
* Since: 2017.4
|
* Since: 2017.4
|
||||||
*/
|
*/
|
||||||
#define OSTREE_VERSION_S "2019.1"
|
#define OSTREE_VERSION_S "2019.2"
|
||||||
|
|
||||||
#define OSTREE_ENCODE_VERSION(year,release) \
|
#define OSTREE_ENCODE_VERSION(year,release) \
|
||||||
((year) << 16 | (release))
|
((year) << 16 | (release))
|
||||||
|
|
|
||||||
|
|
@ -101,20 +101,55 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the value of key as a string. If the value string contains
|
gboolean
|
||||||
* one of the separators and none of the others, read the
|
ot_keyfile_get_value_with_default_group_optional (GKeyFile *keyfile,
|
||||||
* string as a NULL-terminated array out_value. If the value string contains
|
const char *section,
|
||||||
* none of the separators, read the string as a single entry into a
|
const char *value,
|
||||||
* NULL-terminated array out_value. If the value string contains multiple of
|
const char *default_value,
|
||||||
* the separators, an error is given.
|
char **out_value,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
GError *local_error = NULL;
|
||||||
|
g_autofree char *ret_value = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (keyfile != NULL, ret);
|
||||||
|
g_return_val_if_fail (section != NULL, ret);
|
||||||
|
g_return_val_if_fail (value != NULL, ret);
|
||||||
|
|
||||||
|
if (!ot_keyfile_get_value_with_default (keyfile, section, value, default_value, &ret_value, &local_error))
|
||||||
|
{
|
||||||
|
if (g_error_matches (local_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND))
|
||||||
|
{
|
||||||
|
g_clear_error (&local_error);
|
||||||
|
ret_value = g_strdup (default_value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_propagate_error (error, local_error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = TRUE;
|
||||||
|
ot_transfer_out_value(out_value, &ret_value);
|
||||||
|
out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read the value of key as a string. If the value string contains
|
||||||
|
* zero or one of the separators and none of the others, read the
|
||||||
|
* string as a NULL-terminated array out_value. If the value string
|
||||||
|
* contains multiple of the separators, give an error.
|
||||||
|
*
|
||||||
* Returns TRUE on success, FALSE on error. */
|
* Returns TRUE on success, FALSE on error. */
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_as_list (GKeyFile *keyfile,
|
ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile,
|
||||||
const char *section,
|
const char *section,
|
||||||
const char *key,
|
const char *key,
|
||||||
const char *separators,
|
const char *separators,
|
||||||
char ***out_value,
|
char ***out_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
guint sep_count = 0;
|
guint sep_count = 0;
|
||||||
gchar sep = '\0';
|
gchar sep = '\0';
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,20 @@ ot_keyfile_get_value_with_default (GKeyFile *keyfile,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_as_list (GKeyFile *keyfile,
|
ot_keyfile_get_value_with_default_group_optional (GKeyFile *keyfile,
|
||||||
const char *section,
|
const char *section,
|
||||||
const char *key,
|
const char *value,
|
||||||
const char *separators,
|
const char *default_value,
|
||||||
char ***out_value_list,
|
char **out_value,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
ot_keyfile_get_string_list_with_separator_choice (GKeyFile *keyfile,
|
||||||
|
const char *section,
|
||||||
|
const char *key,
|
||||||
|
const char *separators,
|
||||||
|
char ***out_value_list,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ot_keyfile_get_string_list_with_default (GKeyFile *keyfile,
|
ot_keyfile_get_string_list_with_default (GKeyFile *keyfile,
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,14 @@
|
||||||
} \
|
} \
|
||||||
} G_STMT_END;
|
} G_STMT_END;
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBSYSTEMD
|
||||||
|
#define ot_journal_send(...) sd_journal_send(__VA_ARGS__)
|
||||||
|
#define ot_journal_print(...) sd_journal_print(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define ot_journal_send(...) {}
|
||||||
|
#define ot_journal_print(...) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ot-keyfile-utils.h>
|
#include <ot-keyfile-utils.h>
|
||||||
#include <ot-gio-utils.h>
|
#include <ot-gio-utils.h>
|
||||||
#include <ot-fs-utils.h>
|
#include <ot-fs-utils.h>
|
||||||
|
|
|
||||||
|
|
@ -65,27 +65,38 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
{
|
{
|
||||||
g_autoptr(GOptionContext) context = NULL;
|
g_autoptr(GOptionContext) context = NULL;
|
||||||
g_autoptr(OstreeRepo) repo = NULL;
|
g_autoptr(OstreeRepo) repo = NULL;
|
||||||
gboolean ret = FALSE;
|
|
||||||
const char *op;
|
const char *op;
|
||||||
const char *section_key;
|
const char *section_key;
|
||||||
const char *value;
|
const char *value;
|
||||||
g_autofree char *section = NULL;
|
g_autofree char *section = NULL;
|
||||||
g_autofree char *key = NULL;
|
g_autofree char *key = NULL;
|
||||||
GKeyFile *config = NULL;
|
g_autoptr(GKeyFile) config = NULL;
|
||||||
|
int correct_argc;
|
||||||
|
|
||||||
context = g_option_context_new ("(get KEY|set KEY VALUE)");
|
context = g_option_context_new ("(get KEY|set KEY VALUE|unset KEY)");
|
||||||
|
|
||||||
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
|
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
ot_util_usage_error (context, "OPERATION must be specified", error);
|
ot_util_usage_error (context, "OPERATION must be specified", error);
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
op = argv[1];
|
op = argv[1];
|
||||||
|
|
||||||
|
if (!strcmp (op, "set"))
|
||||||
|
correct_argc = 4;
|
||||||
|
else
|
||||||
|
correct_argc = 3;
|
||||||
|
|
||||||
|
if (argc > correct_argc)
|
||||||
|
{
|
||||||
|
ot_util_usage_error (context, "Too many arguments given", error);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp (op, "set"))
|
if (!strcmp (op, "set"))
|
||||||
{
|
{
|
||||||
if (opt_group)
|
if (opt_group)
|
||||||
|
|
@ -94,7 +105,7 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"GROUP name, KEY and VALUE must be specified");
|
"GROUP name, KEY and VALUE must be specified");
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
section = g_strdup(opt_group);
|
section = g_strdup(opt_group);
|
||||||
key = g_strdup(argv[2]);
|
key = g_strdup(argv[2]);
|
||||||
|
|
@ -106,19 +117,19 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"KEY and VALUE must be specified");
|
"KEY and VALUE must be specified");
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
section_key = argv[2];
|
section_key = argv[2];
|
||||||
value = argv[3];
|
value = argv[3];
|
||||||
if(!split_key_string (section_key, §ion, &key, error))
|
if(!split_key_string (section_key, §ion, &key, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
config = ostree_repo_copy_config (repo);
|
config = ostree_repo_copy_config (repo);
|
||||||
g_key_file_set_string (config, section, key, value);
|
g_key_file_set_string (config, section, key, value);
|
||||||
|
|
||||||
if (!ostree_repo_write_config (repo, config, error))
|
if (!ostree_repo_write_config (repo, config, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else if (!strcmp (op, "get"))
|
else if (!strcmp (op, "get"))
|
||||||
{
|
{
|
||||||
|
|
@ -130,7 +141,7 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Group name and key must be specified");
|
"Group name and key must be specified");
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
section = g_strdup(opt_group);
|
section = g_strdup(opt_group);
|
||||||
key = g_strdup(argv[2]);
|
key = g_strdup(argv[2]);
|
||||||
|
|
@ -141,30 +152,67 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"KEY must be specified");
|
"KEY must be specified");
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
section_key = argv[2];
|
section_key = argv[2];
|
||||||
if (!split_key_string (section_key, §ion, &key, error))
|
if (!split_key_string (section_key, §ion, &key, error))
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly_config = ostree_repo_get_config (repo);
|
readonly_config = ostree_repo_get_config (repo);
|
||||||
value = g_key_file_get_string (readonly_config, section, key, error);
|
value = g_key_file_get_string (readonly_config, section, key, error);
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
goto out;
|
return FALSE;
|
||||||
|
|
||||||
g_print ("%s\n", value);
|
g_print ("%s\n", value);
|
||||||
}
|
}
|
||||||
|
else if (!strcmp (op, "unset"))
|
||||||
|
{
|
||||||
|
g_autoptr(GError) local_error = NULL;
|
||||||
|
if (opt_group)
|
||||||
|
{
|
||||||
|
if (argc < 3)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
"Group name and key must be specified");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
section = g_strdup(opt_group);
|
||||||
|
key = g_strdup(argv[2]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (argc < 3)
|
||||||
|
{
|
||||||
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
"KEY must be specified");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
section_key = argv[2];
|
||||||
|
if (!split_key_string (section_key, §ion, &key, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
config = ostree_repo_copy_config (repo);
|
||||||
|
if (!g_key_file_remove_key (config, section, key, &local_error))
|
||||||
|
{
|
||||||
|
if (!g_error_matches (local_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND) &&
|
||||||
|
!g_error_matches (local_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND))
|
||||||
|
{
|
||||||
|
g_propagate_error (error, g_steal_pointer (&local_error));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (local_error == NULL && !ostree_repo_write_config (repo, config, error))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Unknown operation %s", op);
|
"Unknown operation %s", op);
|
||||||
goto out;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = TRUE;
|
return TRUE;
|
||||||
out:
|
|
||||||
if (config)
|
|
||||||
g_key_file_free (config);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
static char **opt_set;
|
static char **opt_set;
|
||||||
static gboolean opt_no_gpg_verify;
|
static gboolean opt_no_gpg_verify;
|
||||||
static gboolean opt_if_not_exists;
|
static gboolean opt_if_not_exists;
|
||||||
|
static gboolean opt_force;
|
||||||
static char *opt_gpg_import;
|
static char *opt_gpg_import;
|
||||||
static char *opt_contenturl;
|
static char *opt_contenturl;
|
||||||
static char *opt_collection_id;
|
static char *opt_collection_id;
|
||||||
|
|
@ -45,6 +46,7 @@ static GOptionEntry option_entries[] = {
|
||||||
{ "set", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_set, "Set config option KEY=VALUE for remote", "KEY=VALUE" },
|
{ "set", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_set, "Set config option KEY=VALUE for remote", "KEY=VALUE" },
|
||||||
{ "no-gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_no_gpg_verify, "Disable GPG verification", NULL },
|
{ "no-gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_no_gpg_verify, "Disable GPG verification", NULL },
|
||||||
{ "if-not-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_not_exists, "Do nothing if the provided remote exists", NULL },
|
{ "if-not-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_not_exists, "Do nothing if the provided remote exists", NULL },
|
||||||
|
{ "force", 0, 0, G_OPTION_ARG_NONE, &opt_force, "Replace the provided remote if it exists", NULL },
|
||||||
{ "gpg-import", 0, 0, G_OPTION_ARG_FILENAME, &opt_gpg_import, "Import GPG key from FILE", "FILE" },
|
{ "gpg-import", 0, 0, G_OPTION_ARG_FILENAME, &opt_gpg_import, "Import GPG key from FILE", "FILE" },
|
||||||
{ "contenturl", 0, 0, G_OPTION_ARG_STRING, &opt_contenturl, "Use URL when fetching content", "URL" },
|
{ "contenturl", 0, 0, G_OPTION_ARG_STRING, &opt_contenturl, "Use URL when fetching content", "URL" },
|
||||||
{ "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id,
|
{ "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id,
|
||||||
|
|
@ -84,6 +86,14 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt_if_not_exists && opt_force)
|
||||||
|
{
|
||||||
|
ot_util_usage_error (context,
|
||||||
|
"Can only specify one of --if-not-exists and --force",
|
||||||
|
error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
remote_name = argv[1];
|
remote_name = argv[1];
|
||||||
remote_url = argv[2];
|
remote_url = argv[2];
|
||||||
|
|
||||||
|
|
@ -135,9 +145,14 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
|
||||||
|
|
||||||
options = g_variant_ref_sink (g_variant_builder_end (optbuilder));
|
options = g_variant_ref_sink (g_variant_builder_end (optbuilder));
|
||||||
|
|
||||||
if (!ostree_repo_remote_change (repo, NULL,
|
OstreeRepoRemoteChange changeop;
|
||||||
opt_if_not_exists ? OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS :
|
if (opt_if_not_exists)
|
||||||
OSTREE_REPO_REMOTE_CHANGE_ADD,
|
changeop = OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS;
|
||||||
|
else if (opt_force)
|
||||||
|
changeop = OSTREE_REPO_REMOTE_CHANGE_REPLACE;
|
||||||
|
else
|
||||||
|
changeop = OSTREE_REPO_REMOTE_CHANGE_ADD;
|
||||||
|
if (!ostree_repo_remote_change (repo, NULL, changeop,
|
||||||
remote_name, remote_url,
|
remote_name, remote_url,
|
||||||
options,
|
options,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,15 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_LIBSYSTEMD) && !defined(OSTREE_PREPARE_ROOT_STATIC)
|
||||||
|
#define USE_LIBSYSTEMD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_LIBSYSTEMD
|
||||||
|
#include <systemd/sd-journal.h>
|
||||||
|
#define OSTREE_PREPARE_ROOT_DEPLOYMENT_MSG SD_ID128_MAKE(71,70,33,6a,73,ba,46,01,ba,d3,1a,f8,88,aa,0d,f7)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ostree-mount-util.h"
|
#include "ostree-mount-util.h"
|
||||||
|
|
||||||
/* Initialized early in main */
|
/* Initialized early in main */
|
||||||
|
|
@ -71,9 +80,19 @@ resolve_deploy_path (const char * root_mountpoint)
|
||||||
deploy_path = realpath (destpath, NULL);
|
deploy_path = realpath (destpath, NULL);
|
||||||
if (deploy_path == NULL)
|
if (deploy_path == NULL)
|
||||||
err (EXIT_FAILURE, "realpath(%s) failed", destpath);
|
err (EXIT_FAILURE, "realpath(%s) failed", destpath);
|
||||||
|
if (stat (deploy_path, &stbuf) < 0)
|
||||||
|
err (EXIT_FAILURE, "stat(%s) failed", deploy_path);
|
||||||
/* Quiet logs if there's no journal */
|
/* Quiet logs if there's no journal */
|
||||||
if (!running_as_pid1)
|
#ifdef USE_LIBSYSTEMD
|
||||||
printf ("Resolved OSTree target to: %s\n", deploy_path);
|
const char *resolved_path = deploy_path + strlen (root_mountpoint);
|
||||||
|
sd_journal_send ("MESSAGE=Resolved OSTree target to: %s", deploy_path,
|
||||||
|
"MESSAGE_ID=" SD_ID128_FORMAT_STR,
|
||||||
|
SD_ID128_FORMAT_VAL(OSTREE_PREPARE_ROOT_DEPLOYMENT_MSG),
|
||||||
|
"DEPLOYMENT_PATH=%s", resolved_path,
|
||||||
|
"DEPLOYMENT_DEVICE=%u", stbuf.st_dev,
|
||||||
|
"DEPLOYMENT_INODE=%u", stbuf.st_ino,
|
||||||
|
NULL);
|
||||||
|
#endif
|
||||||
return deploy_path;
|
return deploy_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "1..$((25 + ${extra_admin_tests:-0}))"
|
echo "1..$((26 + ${extra_admin_tests:-0}))"
|
||||||
|
|
||||||
function validate_bootloader() {
|
function validate_bootloader() {
|
||||||
cd ${test_tmpdir};
|
cd ${test_tmpdir};
|
||||||
|
|
@ -60,7 +60,7 @@ validate_bootloader
|
||||||
echo "ok deploy command"
|
echo "ok deploy command"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree admin --print-current-dir > curdir
|
${CMD_PREFIX} ostree admin --print-current-dir > curdir
|
||||||
assert_file_has_content curdir ^`pwd`/sysroot/ostree/deploy/testos/deploy/${rev}.0$
|
assert_file_has_content curdir ^`pwd`/sysroot/ostree/deploy/testos/deploy/${rev}\.0$
|
||||||
|
|
||||||
echo "ok --print-current-dir"
|
echo "ok --print-current-dir"
|
||||||
|
|
||||||
|
|
@ -239,7 +239,7 @@ cp ${originfile} saved-origin
|
||||||
${CMD_PREFIX} ostree admin set-origin --index=0 bacon --set=gpg-verify=false http://tasty.com
|
${CMD_PREFIX} ostree admin set-origin --index=0 bacon --set=gpg-verify=false http://tasty.com
|
||||||
assert_file_has_content "${originfile}" "bacon:testos/buildmaster/x86_64-runtime"
|
assert_file_has_content "${originfile}" "bacon:testos/buildmaster/x86_64-runtime"
|
||||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt
|
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt
|
||||||
assert_file_has_content remotes.txt 'bacon.*http://tasty.com'
|
assert_file_has_content remotes.txt 'bacon.*http://tasty\.com'
|
||||||
cp saved-origin ${originfile}
|
cp saved-origin ${originfile}
|
||||||
validate_bootloader
|
validate_bootloader
|
||||||
|
|
||||||
|
|
@ -280,6 +280,16 @@ validate_bootloader
|
||||||
|
|
||||||
echo "ok upgrade with multiple kernel args"
|
echo "ok upgrade with multiple kernel args"
|
||||||
|
|
||||||
|
os_repository_new_commit
|
||||||
|
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||||
|
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 ${version} (ostree:testos)$"
|
||||||
|
os_repository_new_commit 0 0 testos/buildmaster/x86_64-runtime 42
|
||||||
|
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||||
|
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 (ostree:testos)$"
|
||||||
|
|
||||||
|
echo "ok no duplicate version strings in title"
|
||||||
|
|
||||||
|
|
||||||
# Test upgrade with and without --override-commit
|
# Test upgrade with and without --override-commit
|
||||||
# See https://github.com/GNOME/ostree/pull/147
|
# See https://github.com/GNOME/ostree/pull/147
|
||||||
${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmaster/x86_64-runtime
|
${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmaster/x86_64-runtime
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ EOF
|
||||||
$OSTREE commit ${COMMIT_ARGS} -b branch-with-commitmsg -F commitmsg.txt -s 'a message' $test_tmpdir/checkout-test2-4
|
$OSTREE commit ${COMMIT_ARGS} -b branch-with-commitmsg -F commitmsg.txt -s 'a message' $test_tmpdir/checkout-test2-4
|
||||||
$OSTREE log branch-with-commitmsg > log.txt
|
$OSTREE log branch-with-commitmsg > log.txt
|
||||||
assert_file_has_content log.txt '^ *This is a long$'
|
assert_file_has_content log.txt '^ *This is a long$'
|
||||||
assert_file_has_content log.txt '^ *Build-Host:.*example.com$'
|
assert_file_has_content log.txt '^ *Build-Host:.*example\.com$'
|
||||||
assert_file_has_content log.txt '^ *Crunchy-With.*true$'
|
assert_file_has_content log.txt '^ *Crunchy-With.*true$'
|
||||||
$OSTREE refs --delete branch-with-commitmsg
|
$OSTREE refs --delete branch-with-commitmsg
|
||||||
echo "ok commit body file"
|
echo "ok commit body file"
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <linux/magic.h>
|
|
||||||
#include <sys/vfs.h>
|
|
||||||
|
|
||||||
#include "libglnx.h"
|
#include "libglnx.h"
|
||||||
#include "libostreetest.h"
|
#include "libostreetest.h"
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,11 @@ setup_os_boot_grub2() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_os_boot_configured_bootloader() {
|
||||||
|
bootloader_keyval=$1
|
||||||
|
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo config set ${bootloader_keyval}
|
||||||
|
}
|
||||||
|
|
||||||
setup_os_repository () {
|
setup_os_repository () {
|
||||||
mode=$1
|
mode=$1
|
||||||
shift
|
shift
|
||||||
|
|
@ -448,6 +453,9 @@ EOF
|
||||||
*grub2*)
|
*grub2*)
|
||||||
setup_os_boot_grub2 "${bootmode}"
|
setup_os_boot_grub2 "${bootmode}"
|
||||||
;;
|
;;
|
||||||
|
sysroot\.bootloader*)
|
||||||
|
setup_os_boot_configured_bootloader "${bootmode}"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
|
|
@ -465,6 +473,7 @@ os_repository_new_commit ()
|
||||||
boot_checksum_iteration=${1:-0}
|
boot_checksum_iteration=${1:-0}
|
||||||
content_iteration=${2:-0}
|
content_iteration=${2:-0}
|
||||||
branch=${3:-testos/buildmaster/x86_64-runtime}
|
branch=${3:-testos/buildmaster/x86_64-runtime}
|
||||||
|
export version=${4:-$(date "+%Y%m%d.${content_iteration}")}
|
||||||
echo "BOOT ITERATION: $boot_checksum_iteration"
|
echo "BOOT ITERATION: $boot_checksum_iteration"
|
||||||
cd ${test_tmpdir}/osdata
|
cd ${test_tmpdir}/osdata
|
||||||
kver=3.6.0
|
kver=3.6.0
|
||||||
|
|
@ -499,8 +508,6 @@ os_repository_new_commit ()
|
||||||
|
|
||||||
echo "content iteration ${content_iteration}" > usr/bin/content-iteration
|
echo "content iteration ${content_iteration}" > usr/bin/content-iteration
|
||||||
|
|
||||||
export version=$(date "+%Y%m%d.${content_iteration}")
|
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" -b $branch -s "Build"
|
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" -b $branch -s "Build"
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ read_config()
|
||||||
|
|
||||||
populate_menu()
|
populate_menu()
|
||||||
{
|
{
|
||||||
# Default to /boot if OSTREE_BOOT_PARTITION is not set and /boot is on the same device than ostree/repo
|
# Default to /boot if OSTREE_BOOT_PARTITION is not set and /boot is on the same device as /ostree/repo
|
||||||
if [ -z ${OSTREE_BOOT_PARTITION+x} ] && [ -d /boot/ostree ] && [ -d /ostree/repo ] && [ $(stat -c '%d' /boot/ostree) -eq $(stat -c '%d' /ostree/repo) ]; then
|
if [ -z ${OSTREE_BOOT_PARTITION+x} ] && [ -d /boot/ostree ] && [ -d /ostree/repo ] && [ $(stat -c '%d' /boot/ostree) -eq $(stat -c '%d' /ostree/repo) ]; then
|
||||||
boot_prefix="/boot"
|
boot_prefix="/boot"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@ repo_init --no-gpg-verify
|
||||||
${CMD_PREFIX} ostree --repo=repo pull origin main@${prev_rev}
|
${CMD_PREFIX} ostree --repo=repo pull origin main@${prev_rev}
|
||||||
${CMD_PREFIX} ostree --repo=repo pull --dry-run --require-static-deltas origin ${delta_target} >dry-run-pull.txt
|
${CMD_PREFIX} ostree --repo=repo pull --dry-run --require-static-deltas origin ${delta_target} >dry-run-pull.txt
|
||||||
# Compression can vary, so we support 400-699
|
# Compression can vary, so we support 400-699
|
||||||
delta_dry_run_regexp='Delta update: 0/1 parts, 0 bytes/[456][0-9][0-9] bytes, 455 bytes total uncompressed'
|
delta_dry_run_regexp='Delta update: 0/1 parts, 0[ ]bytes/[456][0-9][0-9][ ]bytes, 455[ ]bytes total uncompressed'
|
||||||
assert_file_has_content dry-run-pull.txt "${delta_dry_run_regexp}"
|
assert_file_has_content dry-run-pull.txt "${delta_dry_run_regexp}"
|
||||||
rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:main)
|
rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:main)
|
||||||
assert_streq "${prev_rev}" "${rev}"
|
assert_streq "${prev_rev}" "${rev}"
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ ${CMD_PREFIX} ostree --repo=ostree-srv/repo static-delta generate ${remote_ref}
|
||||||
${CMD_PREFIX} ostree --repo=ostree-srv/repo summary -u
|
${CMD_PREFIX} ostree --repo=ostree-srv/repo summary -u
|
||||||
${CMD_PREFIX} ostree --repo=repo pull origin ${remote_ref}@${prev_rev}
|
${CMD_PREFIX} ostree --repo=repo pull origin ${remote_ref}@${prev_rev}
|
||||||
${CMD_PREFIX} ostree --repo=repo pull --dry-run --require-static-deltas origin ${remote_ref} >dry-run-pull.txt
|
${CMD_PREFIX} ostree --repo=repo pull --dry-run --require-static-deltas origin ${remote_ref} >dry-run-pull.txt
|
||||||
assert_file_has_content dry-run-pull.txt 'Delta update: 0/1 parts, 0 bytes/[45][0-9].[0-9] kB, 1.[678] MB total uncompressed'
|
assert_file_has_content dry-run-pull.txt 'Delta update: 0/1 parts, 0 bytes/[45][0-9]\.[0-9][ ]kB, 1\.[678][ ]MB total uncompressed'
|
||||||
${CMD_PREFIX} ostree --repo=repo pull --require-static-deltas origin ${remote_ref}
|
${CMD_PREFIX} ostree --repo=repo pull --require-static-deltas origin ${remote_ref}
|
||||||
final_rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:${remote_ref})
|
final_rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:${remote_ref})
|
||||||
assert_streq "${rev}" "${final_rev}"
|
assert_streq "${rev}" "${final_rev}"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (C) 2019 Robert Fairley <rfairley@redhat.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LGPL-2.0+
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the
|
||||||
|
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
. $(dirname $0)/libtest.sh
|
||||||
|
|
||||||
|
# Exports OSTREE_SYSROOT so --sysroot not needed.
|
||||||
|
setup_os_repository "archive" "sysroot.bootloader none"
|
||||||
|
|
||||||
|
extra_admin_tests=1
|
||||||
|
|
||||||
|
. $(dirname $0)/admin-test.sh
|
||||||
|
|
||||||
|
# Test that the bootloader configuration "none" generates BLS config snippets.
|
||||||
|
cd ${test_tmpdir}
|
||||||
|
rm httpd osdata testos-repo sysroot -rf
|
||||||
|
setup_os_repository "archive" "sysroot.bootloader none"
|
||||||
|
${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmaster/x86_64-runtime
|
||||||
|
# Test that configuring sysroot.bootloader="none" is a workaround for previous
|
||||||
|
# grub2 bootloader issue (see https://github.com/ostreedev/ostree/issues/1774)
|
||||||
|
mkdir -p sysroot/boot/grub2
|
||||||
|
touch sysroot/boot/grub2/grub.cfg
|
||||||
|
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmaster/x86_64-runtime > out.txt
|
||||||
|
assert_file_has_content out.txt "Bootloader updated.*"
|
||||||
|
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
|
||||||
|
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
|
||||||
|
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/initramfs-3.6.0.img 'an initramfs'
|
||||||
|
echo "ok generate bls config on first deployment"
|
||||||
|
|
||||||
|
# TODO: add tests to try setting with an unsupported bootloader config,
|
||||||
|
# once https://github.com/ostreedev/ostree/issues/1827 is solved.
|
||||||
|
# The tests should check that the following commands fail:
|
||||||
|
# ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo config set sysroot.bootloader unsupported_bootloader
|
||||||
|
# ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo config set sysroot.bootloader ""
|
||||||
|
|
@ -46,13 +46,13 @@ ${CMD_PREFIX} ostree admin upgrade --os=testos --pull-only --os=testos > out.txt
|
||||||
assert_not_file_has_content out.txt 'No update available'
|
assert_not_file_has_content out.txt 'No update available'
|
||||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
||||||
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
||||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'TestOS 42 1.0.9'
|
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'TestOS 42 1\.0\.9'
|
||||||
assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||||
# Now, generate new content upstream; we shouldn't pull it
|
# Now, generate new content upstream; we shouldn't pull it
|
||||||
os_repository_new_commit
|
os_repository_new_commit
|
||||||
${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt
|
${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt
|
||||||
assert_not_file_has_content out.txt 'No update available'
|
assert_not_file_has_content out.txt 'No update available'
|
||||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'TestOS 42 1.0.10'
|
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'TestOS 42 1\.0\.10'
|
||||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
||||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
||||||
${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt
|
${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ set -euo pipefail
|
||||||
|
|
||||||
. $(dirname $0)/libtest.sh
|
. $(dirname $0)/libtest.sh
|
||||||
|
|
||||||
echo '1..2'
|
echo '1..3'
|
||||||
|
|
||||||
ostree_repo_init repo
|
ostree_repo_init repo
|
||||||
${CMD_PREFIX} ostree remote add --repo=repo --set=xa.title=Flathub --set=xa.title-is-set=true flathub https://dl.flathub.org/repo/
|
${CMD_PREFIX} ostree remote add --repo=repo --set=xa.title=Flathub --set=xa.title-is-set=true flathub https://dl.flathub.org/repo/
|
||||||
|
|
@ -34,13 +34,19 @@ ${CMD_PREFIX} ostree config --repo=repo get --group=core repo_version >> list.tx
|
||||||
${CMD_PREFIX} ostree config --repo=repo get --group='remote "flathub"' 'xa.title' >> list.txt
|
${CMD_PREFIX} ostree config --repo=repo get --group='remote "flathub"' 'xa.title' >> list.txt
|
||||||
${CMD_PREFIX} ostree config --repo=repo get --group='remote "flathub"' 'xa.title-is-set' >> list.txt
|
${CMD_PREFIX} ostree config --repo=repo get --group='remote "flathub"' 'xa.title-is-set' >> list.txt
|
||||||
${CMD_PREFIX} ostree config --repo=repo get --group='remote "org.mozilla.FirefoxRepo"' url >> list.txt
|
${CMD_PREFIX} ostree config --repo=repo get --group='remote "org.mozilla.FirefoxRepo"' url >> list.txt
|
||||||
${CMD_PREFIX} cat list.txt
|
${CMD_PREFIX} cat list.txt
|
||||||
|
|
||||||
assert_file_has_content list.txt "bare"
|
assert_file_has_content list.txt "bare"
|
||||||
assert_file_has_content list.txt "1"
|
assert_file_has_content list.txt "1"
|
||||||
assert_file_has_content list.txt "Flathub"
|
assert_file_has_content list.txt "Flathub"
|
||||||
assert_file_has_content list.txt "true"
|
assert_file_has_content list.txt "true"
|
||||||
assert_file_has_content list.txt "http://example.com/ostree/repo/"
|
assert_file_has_content list.txt "http://example\.com/ostree/repo/"
|
||||||
|
|
||||||
|
# Check that it errors out if too many arguments are given
|
||||||
|
if ${CMD_PREFIX} ostree config --repo=repo get --group=core lock-timeout-secs extra 2>err.txt; then
|
||||||
|
assert_not_reached "ostree config get should error out if too many arguments are given"
|
||||||
|
fi
|
||||||
|
assert_file_has_content err.txt "error: Too many arguments given"
|
||||||
echo "ok config get"
|
echo "ok config get"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree config --repo=repo set core.mode bare-user-only
|
${CMD_PREFIX} ostree config --repo=repo set core.mode bare-user-only
|
||||||
|
|
@ -51,5 +57,43 @@ ${CMD_PREFIX} ostree config --repo=repo set --group='remote "org.mozilla.Firefox
|
||||||
assert_file_has_content repo/config "bare-user-only"
|
assert_file_has_content repo/config "bare-user-only"
|
||||||
assert_file_has_content repo/config "Nightly Flathub"
|
assert_file_has_content repo/config "Nightly Flathub"
|
||||||
assert_file_has_content repo/config "false"
|
assert_file_has_content repo/config "false"
|
||||||
assert_file_has_content repo/config "http://example.com/ostree/"
|
assert_file_has_content repo/config "http://example\.com/ostree/"
|
||||||
|
|
||||||
|
# Check that it errors out if too many arguments are given
|
||||||
|
if ${CMD_PREFIX} ostree config --repo=repo set --group=core lock-timeout-secs 120 extra 2>err.txt; then
|
||||||
|
assert_not_reached "ostree config set should error out if too many arguments are given"
|
||||||
|
fi
|
||||||
|
assert_file_has_content err.txt "error: Too many arguments given"
|
||||||
echo "ok config set"
|
echo "ok config set"
|
||||||
|
|
||||||
|
# Check that "ostree config unset" works
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo set core.lock-timeout-secs 60
|
||||||
|
assert_file_has_content repo/config "lock-timeout-secs=60"
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs
|
||||||
|
assert_not_file_has_content repo/config "lock-timeout-secs="
|
||||||
|
|
||||||
|
# Check that "ostree config get" errors out on the key
|
||||||
|
if ${CMD_PREFIX} ostree config --repo=repo get core.lock-timeout-secs 2>err.txt; then
|
||||||
|
assert_not_reached "ostree config get should not work after unsetting a key"
|
||||||
|
fi
|
||||||
|
# Check for any character where quotation marks would be as they appear differently in the Fedora and Debian
|
||||||
|
# test suites (“” and '' respectively). See: https://github.com/ostreedev/ostree/pull/1839
|
||||||
|
assert_file_has_content err.txt "error: Key file does not have key .lock-timeout-secs. in group .core."
|
||||||
|
|
||||||
|
# Check that it's idempotent
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs
|
||||||
|
assert_not_file_has_content repo/config "lock-timeout-secs="
|
||||||
|
|
||||||
|
# Check that the group doesn't need to exist
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo unset --group='remote "aoeuhtns"' 'xa.title'
|
||||||
|
|
||||||
|
# Check that the key doesn't need to exist
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo set --group='remote "aoeuhtns"' 'xa.title-is-set' 'false'
|
||||||
|
${CMD_PREFIX} ostree config --repo=repo unset --group='remote "aoeuhtns"' 'xa.title'
|
||||||
|
|
||||||
|
# Check that it errors out if too many arguments are given
|
||||||
|
if ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs extra 2>err.txt; then
|
||||||
|
assert_not_reached "ostree config unset should error out if too many arguments are given"
|
||||||
|
fi
|
||||||
|
assert_file_has_content err.txt "error: Too many arguments given"
|
||||||
|
echo "ok config unset"
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,9 @@ ${CMD_PREFIX} ostree --repo=local-repo create-usb dest-mount1 org.example.Collec
|
||||||
|
|
||||||
assert_has_dir dest-mount1/.ostree/repo
|
assert_has_dir dest-mount1/.ostree/repo
|
||||||
${CMD_PREFIX} ostree --repo=dest-mount1/.ostree/repo refs --collections > dest-refs
|
${CMD_PREFIX} ostree --repo=dest-mount1/.ostree/repo refs --collections > dest-refs
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-1)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-1)$"
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-2)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-2)$"
|
||||||
assert_not_file_has_content dest-refs "^(org.example.Collection1, test-3)$"
|
assert_not_file_has_content dest-refs "^(org\.example\.Collection1, test-3)$"
|
||||||
assert_has_file dest-mount1/.ostree/repo/summary
|
assert_has_file dest-mount1/.ostree/repo/summary
|
||||||
|
|
||||||
echo "ok 1 simple usb"
|
echo "ok 1 simple usb"
|
||||||
|
|
@ -83,7 +83,7 @@ ${CMD_PREFIX} ostree --repo=local-repo create-usb --destination-repo some-dest d
|
||||||
assert_has_dir "dest-mount3/some-dest"
|
assert_has_dir "dest-mount3/some-dest"
|
||||||
assert_symlink_has_content "dest-mount3/.ostree/repos.d/00-generated" "/some-dest$"
|
assert_symlink_has_content "dest-mount3/.ostree/repos.d/00-generated" "/some-dest$"
|
||||||
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated refs --collections > dest-refs
|
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated refs --collections > dest-refs
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-1)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-1)$"
|
||||||
assert_has_file dest-mount3/.ostree/repos.d/00-generated/summary
|
assert_has_file dest-mount3/.ostree/repos.d/00-generated/summary
|
||||||
|
|
||||||
echo "ok 3 usb in non-standard location"
|
echo "ok 3 usb in non-standard location"
|
||||||
|
|
@ -93,13 +93,13 @@ ${CMD_PREFIX} ostree --repo=local-repo create-usb --destination-repo some-dest d
|
||||||
assert_has_dir "dest-mount3/some-dest"
|
assert_has_dir "dest-mount3/some-dest"
|
||||||
assert_symlink_has_content "dest-mount3/.ostree/repos.d/00-generated" "/some-dest$"
|
assert_symlink_has_content "dest-mount3/.ostree/repos.d/00-generated" "/some-dest$"
|
||||||
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated refs --collections > dest-refs
|
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated refs --collections > dest-refs
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-1)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-1)$"
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-2)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-2)$"
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-3)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-3)$"
|
||||||
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated summary -v > dest-summary
|
${CMD_PREFIX} ostree --repo=dest-mount3/.ostree/repos.d/00-generated summary -v > dest-summary
|
||||||
assert_file_has_content dest-summary "(org.example.Collection1, test-1)$"
|
assert_file_has_content dest-summary "(org\.example\.Collection1, test-1)$"
|
||||||
assert_file_has_content dest-summary "(org.example.Collection1, test-2)$"
|
assert_file_has_content dest-summary "(org\.example\.Collection1, test-2)$"
|
||||||
assert_file_has_content dest-summary "(org.example.Collection1, test-3)$"
|
assert_file_has_content dest-summary "(org\.example\.Collection1, test-3)$"
|
||||||
|
|
||||||
echo "ok 4 adding ref to an existing usb"
|
echo "ok 4 adding ref to an existing usb"
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ ostree_repo_init finder-repo
|
||||||
${CMD_PREFIX} ostree --repo=finder-repo remote add remote1 file://$(pwd)/just-needed-for-the-keyring --collection-id org.example.Collection1 --gpg-import="${test_tmpdir}/gpghome/key1.asc"
|
${CMD_PREFIX} ostree --repo=finder-repo remote add remote1 file://$(pwd)/just-needed-for-the-keyring --collection-id org.example.Collection1 --gpg-import="${test_tmpdir}/gpghome/key1.asc"
|
||||||
|
|
||||||
${test_builddir}/repo-finder-mount finder-repo dest-mount1 org.example.Collection1 test-1 org.example.Collection1 test-2 &> out
|
${test_builddir}/repo-finder-mount finder-repo dest-mount1 org.example.Collection1 test-1 org.example.Collection1 test-2 &> out
|
||||||
assert_file_has_content out "^0 .*_2Fdest-mount1_2F.ostree_2Frepo_remote1.trustedkeys.gpg org.example.Collection1 test-1 $(ostree --repo=repo show test-1)$"
|
assert_file_has_content out "^0 .*_2Fdest-mount1_2F\.ostree_2Frepo_remote1\.trustedkeys\.gpg org\.example\.Collection1 test-1 $(ostree --repo=repo show test-1)$"
|
||||||
assert_file_has_content out "^0 .*_2Fdest-mount1_2F.ostree_2Frepo_remote1.trustedkeys.gpg org.example.Collection1 test-2 $(ostree --repo=repo show test-2)$"
|
assert_file_has_content out "^0 .*_2Fdest-mount1_2F\.ostree_2Frepo_remote1\.trustedkeys\.gpg org\.example\.Collection1 test-2 $(ostree --repo=repo show test-2)$"
|
||||||
|
|
||||||
echo "ok 5 find from usb repo"
|
echo "ok 5 find from usb repo"
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,8 @@ rm temp-repo -rf
|
||||||
echo 'ok generate'
|
echo 'ok generate'
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo static-delta show ${origrev}-${newrev} > show.txt
|
${CMD_PREFIX} ostree --repo=repo static-delta show ${origrev}-${newrev} > show.txt
|
||||||
|
assert_file_has_content show.txt "From: ${origrev}"
|
||||||
|
assert_file_has_content show.txt "To: ${newrev}"
|
||||||
assert_file_has_content show.txt 'Endianness: \(little\|big\)'
|
assert_file_has_content show.txt 'Endianness: \(little\|big\)'
|
||||||
|
|
||||||
echo 'ok show'
|
echo 'ok show'
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ assert_file_has_content refs "^os-remote:os/amd64/master$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=local refs --collections > refs
|
${CMD_PREFIX} ostree --repo=local refs --collections > refs
|
||||||
cat refs | wc -l > refscount
|
cat refs | wc -l > refscount
|
||||||
assert_file_has_content refs "^(org.example.AppsCollection, app1)$"
|
assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$"
|
||||||
assert_file_has_content refs "^(org.example.OsCollection, os/amd64/master)$"
|
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$"
|
||||||
assert_file_has_content refscount "^2$"
|
assert_file_has_content refscount "^2$"
|
||||||
|
|
||||||
# Create a local mirror repository where we pull the branches *in mirror mode* from the two remotes.
|
# Create a local mirror repository where we pull the branches *in mirror mode* from the two remotes.
|
||||||
|
|
@ -80,8 +80,8 @@ ls -1 local-mirror/refs/remotes | wc -l > remotescount
|
||||||
assert_file_has_content remotescount "^0$"
|
assert_file_has_content remotescount "^0$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=local-mirror refs --collections > refs
|
${CMD_PREFIX} ostree --repo=local-mirror refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.AppsCollection, app1)$"
|
assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$"
|
||||||
assert_file_has_content refs "^(org.example.OsCollection, os/amd64/master)$"
|
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$"
|
||||||
|
|
||||||
assert_file_has_content local-mirror/refs/mirrors/org.example.AppsCollection/app1 "^$(cat app1-checksum)$"
|
assert_file_has_content local-mirror/refs/mirrors/org.example.AppsCollection/app1 "^$(cat app1-checksum)$"
|
||||||
assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/master "^$(cat os-checksum)$"
|
assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/master "^$(cat os-checksum)$"
|
||||||
|
|
@ -90,69 +90,69 @@ for repo in local local-mirror; do
|
||||||
# Try finding an update for an existing branch.
|
# Try finding an update for an existing branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||||
assert_file_has_content find "^1/1 refs were found.$"
|
assert_file_has_content find "^1/1 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Find several updates for several existing branches.
|
# Find several updates for several existing branches.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
||||||
assert_file_has_content find "^2/2 refs were found.$"
|
assert_file_has_content find "^2/2 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Find some updates and a new branch.
|
# Find some updates and a new branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, app2) = $(cat app2-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, app2) = $(cat app2-checksum)$"
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
||||||
assert_file_has_content find "^3/3 refs were found.$"
|
assert_file_has_content find "^3/3 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Find an update and a non-existent branch.
|
# Find an update and a non-existent branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection not-an-app > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection not-an-app > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, not-an-app) = (not found)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, not-an-app) = (not found)$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||||
assert_file_has_content find "^Refs not found in any remote:$"
|
assert_file_has_content find "^Refs not found in any remote:$"
|
||||||
assert_file_has_content find "^ - (org.example.AppsCollection, not-an-app)$"
|
assert_file_has_content find "^ - (org\.example\.AppsCollection, not-an-app)$"
|
||||||
assert_file_has_content find "^1/2 refs were found.$"
|
assert_file_has_content find "^1/2 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Do all the above, but pull this time.
|
# Do all the above, but pull this time.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 > pull || true
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 > pull || true
|
||||||
assert_file_has_content pull "^1/1 refs were found.$"
|
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 1/1 refs successfully.$"
|
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo app1 $(cat app1-checksum)
|
assert_ref $repo app1 $(cat app1-checksum)
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > pull
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > pull
|
||||||
assert_file_has_content pull "^2/2 refs were found.$"
|
assert_file_has_content pull "^2/2 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 2/2 refs successfully.$"
|
assert_file_has_content pull "^Pulled 2/2 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo app1 $(cat app1-checksum)
|
assert_ref $repo app1 $(cat app1-checksum)
|
||||||
assert_ref $repo os/amd64/master $(cat os-checksum)
|
assert_ref $repo os/amd64/master $(cat os-checksum)
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > pull
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > pull
|
||||||
assert_file_has_content pull "^3/3 refs were found.$"
|
assert_file_has_content pull "^3/3 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 3/3 refs successfully.$"
|
assert_file_has_content pull "^Pulled 3/3 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo app1 $(cat app1-checksum)
|
assert_ref $repo app1 $(cat app1-checksum)
|
||||||
assert_ref $repo app2 $(cat app2-checksum)
|
assert_ref $repo app2 $(cat app2-checksum)
|
||||||
assert_ref $repo os/amd64/master $(cat os-checksum)
|
assert_ref $repo os/amd64/master $(cat os-checksum)
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection not-an-app > pull
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection not-an-app > pull
|
||||||
assert_file_has_content pull "^1/2 refs were found.$"
|
assert_file_has_content pull "^1/2 refs were found\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo app1 $(cat app1-checksum)
|
assert_ref $repo app1 $(cat app1-checksum)
|
||||||
assert_not_ref $repo not-an-app
|
assert_not_ref $repo not-an-app
|
||||||
|
|
@ -168,15 +168,15 @@ for repo in local-mirror; do
|
||||||
# Try finding an update for that branch.
|
# Try finding an update for that branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||||
assert_file_has_content find "^1/1 refs were found.$"
|
assert_file_has_content find "^1/1 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Pull it.
|
# Pull it.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||||
assert_file_has_content pull "^1/1 refs were found.$"
|
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 1/1 refs successfully.$"
|
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
||||||
|
|
||||||
|
|
@ -195,18 +195,18 @@ for repo in local; do
|
||||||
# Try finding an update for that branch.
|
# Try finding an update for that branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote-local-mirror.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote-local-mirror\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||||
assert_file_has_content find "^1/1 refs were found.$"
|
assert_file_has_content find "^1/1 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Pull it.
|
# Pull it.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||||
assert_file_has_content pull "^1/1 refs were found.$"
|
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 1/1 refs successfully.$"
|
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
||||||
done
|
done
|
||||||
|
|
@ -222,15 +222,15 @@ for repo in local; do
|
||||||
# Try finding an update for that branch.
|
# Try finding an update for that branch.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||||
assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$"
|
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||||
assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-3)$"
|
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-3)$"
|
||||||
assert_file_has_content find "^1/1 refs were found.$"
|
assert_file_has_content find "^1/1 refs were found\.$"
|
||||||
assert_not_file_has_content find "^No results.$"
|
assert_not_file_has_content find "^No results\.$"
|
||||||
|
|
||||||
# Pull it.
|
# Pull it.
|
||||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||||
assert_file_has_content pull "^1/1 refs were found.$"
|
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||||
assert_file_has_content pull "^Pulled 1/1 refs successfully.$"
|
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||||
assert_ref $repo os/amd64/master $(cat os-checksum-3)
|
assert_ref $repo os/amd64/master $(cat os-checksum-3)
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ set_up_repo_with_collection_id
|
||||||
|
|
||||||
# fsck at this point should succeed
|
# fsck at this point should succeed
|
||||||
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
# Drop the commit the ref points to, and drop the original ref so that fsck doesn’t prematurely fail on that.
|
# Drop the commit the ref points to, and drop the original ref so that fsck doesn’t prematurely fail on that.
|
||||||
find repo/objects -name '*.commit' -delete -print | wc -l > commitcount
|
find repo/objects -name '*.commit' -delete -print | wc -l > commitcount
|
||||||
|
|
@ -73,8 +73,8 @@ rm repo/refs/heads/ref1
|
||||||
if ${CMD_PREFIX} ostree fsck --repo=repo > fsck; then
|
if ${CMD_PREFIX} ostree fsck --repo=repo > fsck; then
|
||||||
assert_not_reached "fsck unexpectedly succeeded after deleting commit!"
|
assert_not_reached "fsck unexpectedly succeeded after deleting commit!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 1 fsck-collections"
|
echo "ok 1 fsck-collections"
|
||||||
|
|
||||||
|
|
@ -84,8 +84,8 @@ set_up_repo_with_collection_id
|
||||||
rm -rf repo/refs/mirrors
|
rm -rf repo/refs/mirrors
|
||||||
|
|
||||||
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 2 fsck-collections in old repository"
|
echo "ok 2 fsck-collections in old repository"
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@ if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error;
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
|
|
||||||
echo "ok 3 fsck detects missing ref bindings"
|
echo "ok 3 fsck detects missing ref bindings"
|
||||||
|
|
||||||
|
|
@ -114,8 +114,8 @@ if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error;
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 4 fsck detects missing collection–ref bindings"
|
echo "ok 4 fsck detects missing collection–ref bindings"
|
||||||
|
|
||||||
|
|
@ -127,9 +127,9 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect
|
||||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Commit has collection ID ‘org.example.Collection’ in collection binding metadata, while the remote it came from has collection ID ‘org.example.Collection2’"
|
assert_file_has_content fsck-error "Commit has collection ID ‘org\.example\.Collection’ in collection binding metadata, while the remote it came from has collection ID ‘org\.example\.Collection2’"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 5 fsck detects missing collection–ref bindings"
|
echo "ok 5 fsck detects missing collection–ref bindings"
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --delete ref1
|
||||||
|
|
||||||
# fsck at this point should succeed
|
# fsck at this point should succeed
|
||||||
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 6 fsck ignores unreferenced ref bindings"
|
echo "ok 6 fsck ignores unreferenced ref bindings"
|
||||||
|
|
||||||
|
|
@ -147,9 +147,9 @@ echo "ok 6 fsck ignores unreferenced ref bindings"
|
||||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
|
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Collection–ref (org.example.Collection, ref1) in bindings for commit .* does not exist"
|
assert_file_has_content fsck-error "Collection–ref (org\.example\.Collection, ref1) in bindings for commit .* does not exist"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
echo "ok 7 fsck ignores unreferenced ref bindings"
|
echo "ok 7 fsck ignores unreferenced ref bindings"
|
||||||
|
|
||||||
|
|
@ -161,7 +161,7 @@ set_up_repo_without_collection_id
|
||||||
|
|
||||||
# fsck at this point should succeed
|
# fsck at this point should succeed
|
||||||
${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck
|
${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck
|
||||||
assert_file_has_content fsck "^Validating refs in collections...$"
|
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||||
|
|
||||||
# Drop the commit the ref points to, and drop the original ref so that fsck doesn’t prematurely fail on that.
|
# Drop the commit the ref points to, and drop the original ref so that fsck doesn’t prematurely fail on that.
|
||||||
find repo/objects -name '*.commit' -delete -print | wc -l > commitcount
|
find repo/objects -name '*.commit' -delete -print | wc -l > commitcount
|
||||||
|
|
@ -173,7 +173,7 @@ rm repo/refs/heads/ref3
|
||||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck; then
|
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck; then
|
||||||
assert_not_reached "fsck unexpectedly succeeded after deleting commit!"
|
assert_not_reached "fsck unexpectedly succeeded after deleting commit!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
|
|
||||||
echo "ok 8 fsck-collections"
|
echo "ok 8 fsck-collections"
|
||||||
|
|
||||||
|
|
@ -187,7 +187,7 @@ if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error;
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref3’, ‘ref4’)"
|
assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref3’, ‘ref4’)"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
|
|
||||||
echo "ok 9 fsck detects missing ref bindings"
|
echo "ok 9 fsck detects missing ref bindings"
|
||||||
|
|
||||||
|
|
@ -197,7 +197,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --delete ref3
|
||||||
|
|
||||||
# fsck at this point should succeed
|
# fsck at this point should succeed
|
||||||
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
${CMD_PREFIX} ostree fsck --repo=repo > fsck
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
|
|
||||||
echo "ok 10 fsck ignores unreferenced ref bindings"
|
echo "ok 10 fsck ignores unreferenced ref bindings"
|
||||||
|
|
||||||
|
|
@ -206,6 +206,6 @@ if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error
|
||||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content fsck-error "Ref ‘ref3’ in bindings for commit .* does not exist"
|
assert_file_has_content fsck-error "Ref ‘ref3’ in bindings for commit .* does not exist"
|
||||||
assert_file_has_content fsck "^Validating refs...$"
|
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||||
|
|
||||||
echo "ok 11 fsck ignores unreferenced ref bindings"
|
echo "ok 11 fsck ignores unreferenced ref bindings"
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,6 @@ cd ${test_tmpdir}
|
||||||
# Check that initialising a repository with a collection ID results in the ID being in the config.
|
# Check that initialising a repository with a collection ID results in the ID being in the config.
|
||||||
mkdir repo
|
mkdir repo
|
||||||
ostree_repo_init repo --collection-id org.example.Collection
|
ostree_repo_init repo --collection-id org.example.Collection
|
||||||
assert_file_has_content repo/config "^collection-id=org.example.Collection$"
|
assert_file_has_content repo/config "^collection-id=org\.example\.Collection$"
|
||||||
|
|
||||||
echo "ok init-collections"
|
echo "ok init-collections"
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ test_get_value_with_default (void)
|
||||||
/* Avoid that g_return_val_if_fail causes the test to fail. */
|
/* Avoid that g_return_val_if_fail causes the test to fail. */
|
||||||
always_fatal_mask = g_log_set_always_fatal (0);
|
always_fatal_mask = g_log_set_always_fatal (0);
|
||||||
|
|
||||||
|
|
||||||
g_assert_false (ot_keyfile_get_value_with_default (g_keyfile,
|
g_assert_false (ot_keyfile_get_value_with_default (g_keyfile,
|
||||||
NULL,
|
NULL,
|
||||||
"value_foo",
|
"value_foo",
|
||||||
|
|
@ -124,11 +123,75 @@ test_get_value_with_default (void)
|
||||||
g_clear_pointer (&out, g_free);
|
g_clear_pointer (&out, g_free);
|
||||||
|
|
||||||
g_assert_false (ot_keyfile_get_value_with_default (g_keyfile,
|
g_assert_false (ot_keyfile_get_value_with_default (g_keyfile,
|
||||||
"a_fake_section",
|
"a_fake_section",
|
||||||
"a_value_true",
|
"a_value_true",
|
||||||
"no value",
|
"no value",
|
||||||
&out,
|
&out,
|
||||||
&error));
|
&error));
|
||||||
|
g_clear_error (&error);
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_get_value_with_default_group_optional (void)
|
||||||
|
{
|
||||||
|
g_autoptr(GError) error = NULL;
|
||||||
|
g_autofree char *out = NULL;
|
||||||
|
GLogLevelFlags always_fatal_mask;
|
||||||
|
const char *section = "section";
|
||||||
|
|
||||||
|
/* Avoid that g_return_val_if_fail causes the test to fail. */
|
||||||
|
always_fatal_mask = g_log_set_always_fatal (0);
|
||||||
|
|
||||||
|
g_assert_false (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
NULL,
|
||||||
|
"value_foo",
|
||||||
|
"none",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
g_assert_false (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
section,
|
||||||
|
NULL,
|
||||||
|
"none",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
g_assert_false (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
section,
|
||||||
|
NULL,
|
||||||
|
"something",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
|
||||||
|
/* Restore the old mask. */
|
||||||
|
g_log_set_always_fatal (always_fatal_mask);
|
||||||
|
|
||||||
|
g_assert (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
section,
|
||||||
|
"value_foo",
|
||||||
|
"none",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
|
g_assert_cmpstr (out, ==, "foo");
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
|
||||||
|
g_assert (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
section,
|
||||||
|
"a_not_existing_value",
|
||||||
|
"correct",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
|
g_assert_cmpstr (out, ==, "correct");
|
||||||
|
g_clear_pointer (&out, g_free);
|
||||||
|
|
||||||
|
g_assert (ot_keyfile_get_value_with_default_group_optional (g_keyfile,
|
||||||
|
"an_optional_section",
|
||||||
|
"a_value_true",
|
||||||
|
"no value",
|
||||||
|
&out,
|
||||||
|
&error));
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
g_clear_pointer (&out, g_free);
|
g_clear_pointer (&out, g_free);
|
||||||
}
|
}
|
||||||
|
|
@ -191,6 +254,7 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
g_test_add_func ("/keyfile-utils/get-boolean-with-default", test_get_boolean_with_default);
|
g_test_add_func ("/keyfile-utils/get-boolean-with-default", test_get_boolean_with_default);
|
||||||
g_test_add_func ("/keyfile-utils/get-value-with-default", test_get_value_with_default);
|
g_test_add_func ("/keyfile-utils/get-value-with-default", test_get_value_with_default);
|
||||||
|
g_test_add_func ("/keyfile-utils/get-value-with-default-group-optional", test_get_value_with_default_group_optional);
|
||||||
g_test_add_func ("/keyfile-utils/copy-group", test_copy_group);
|
g_test_add_func ("/keyfile-utils/copy-group", test_copy_group);
|
||||||
|
|
||||||
ret = g_test_run();
|
ret = g_test_run();
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ do
|
||||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||||
|
|
||||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init='
|
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init='
|
||||||
assert_file_has_content sysroot/boot/"$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf 'devicetree')" "my .dtb file"
|
assert_file_has_content sysroot/boot/"$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf 'devicetree')" "my \.dtb file"
|
||||||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd'
|
assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd'
|
||||||
|
|
||||||
echo "ok switching from initramfs to no initramfs sysroot with devicetree layout=$layout"
|
echo "ok switching from initramfs to no initramfs sysroot with devicetree layout=$layout"
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ assert_file_has_content summary.txt "* main"
|
||||||
assert_file_has_content summary.txt "* other"
|
assert_file_has_content summary.txt "* other"
|
||||||
assert_file_has_content summary.txt "* yet-another"
|
assert_file_has_content summary.txt "* yet-another"
|
||||||
assert_file_has_content summary.txt "found 1 signature"
|
assert_file_has_content summary.txt "found 1 signature"
|
||||||
assert_file_has_content summary.txt "Good signature from \"Ostree Tester <test@test.com>\""
|
assert_file_has_content summary.txt "Good signature from \"Ostree Tester <test@test\.com>\""
|
||||||
grep static-deltas summary.txt > static-deltas.txt
|
grep static-deltas summary.txt > static-deltas.txt
|
||||||
assert_file_has_content static-deltas.txt \
|
assert_file_has_content static-deltas.txt \
|
||||||
$(${OSTREE} --repo=repo rev-parse origin:main)
|
$(${OSTREE} --repo=repo rev-parse origin:main)
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,11 @@ assert_file_has_content refscount "^5$"
|
||||||
${CMD_PREFIX} ostree --repo=repo refs > refs
|
${CMD_PREFIX} ostree --repo=repo refs > refs
|
||||||
assert_file_has_content refs "^test\-1$"
|
assert_file_has_content refs "^test\-1$"
|
||||||
assert_file_has_content refs "^test\-5$"
|
assert_file_has_content refs "^test\-5$"
|
||||||
assert_not_file_has_content refs "org.example.Collection"
|
assert_not_file_has_content refs "org\.example\.Collection"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.Collection, test-1)$"
|
assert_file_has_content refs "^(org\.example\.Collection, test-1)$"
|
||||||
assert_file_has_content refs "^(org.example.Collection, test-5)$"
|
assert_file_has_content refs "^(org\.example\.Collection, test-5)$"
|
||||||
|
|
||||||
# Similarly, the collection IDs should only be listed when filtering if --collections is passed.
|
# Similarly, the collection IDs should only be listed when filtering if --collections is passed.
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --list org.example.Collection | wc -l > refscount
|
${CMD_PREFIX} ostree --repo=repo refs --list org.example.Collection | wc -l > refscount
|
||||||
|
|
@ -102,8 +102,8 @@ assert_file_has_content refs "^ctest$"
|
||||||
assert_not_file_has_content refs "^ctest-mirror$"
|
assert_not_file_has_content refs "^ctest-mirror$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.Collection, ctest)$"
|
assert_file_has_content refs "^(org\.example\.Collection, ctest)$"
|
||||||
assert_file_has_content refs "^(org.example.NewCollection, ctest-mirror)$"
|
assert_file_has_content refs "^(org\.example\.NewCollection, ctest-mirror)$"
|
||||||
|
|
||||||
# Remote refs should be listed if they have collection IDs
|
# Remote refs should be listed if they have collection IDs
|
||||||
|
|
||||||
|
|
@ -116,13 +116,13 @@ ${CMD_PREFIX} ostree --repo=repo remote add --no-gpg-verify --collection-id org.
|
||||||
${CMD_PREFIX} ostree --repo=repo pull collection-repo-remote rcommit
|
${CMD_PREFIX} ostree --repo=repo pull collection-repo-remote rcommit
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
|
assert_file_has_content refs "^(org\.example\.RemoteCollection, rcommit)$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections org.example.RemoteCollection > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections org.example.RemoteCollection > refs
|
||||||
assert_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
|
assert_file_has_content refs "^(org\.example\.RemoteCollection, rcommit)$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections org.example.NonexistentID > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections org.example.NonexistentID > refs
|
||||||
assert_not_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
|
assert_not_file_has_content refs "^(org\.example\.RemoteCollection, rcommit)$"
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
mkdir no-collection-repo
|
mkdir no-collection-repo
|
||||||
|
|
@ -147,8 +147,8 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections
|
||||||
rm -rf repo/refs/mirrors
|
rm -rf repo/refs/mirrors
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.NewCollection:ctest-mirror ctest
|
${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.NewCollection:ctest-mirror ctest
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.Collection, ctest)$"
|
assert_file_has_content refs "^(org\.example\.Collection, ctest)$"
|
||||||
assert_file_has_content refs "^(org.example.NewCollection, ctest-mirror)$"
|
assert_file_has_content refs "^(org\.example\.NewCollection, ctest-mirror)$"
|
||||||
|
|
||||||
rm -rf repo/refs/mirrors
|
rm -rf repo/refs/mirrors
|
||||||
${CMD_PREFIX} ostree refs --repo=repo --collections --delete org.example.NonexistentCollection
|
${CMD_PREFIX} ostree refs --repo=repo --collections --delete org.example.NonexistentCollection
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ set -euo pipefail
|
||||||
|
|
||||||
. $(dirname $0)/libtest.sh
|
. $(dirname $0)/libtest.sh
|
||||||
|
|
||||||
echo '1..14'
|
echo '1..16'
|
||||||
|
|
||||||
setup_test_repository "bare"
|
setup_test_repository "bare"
|
||||||
$OSTREE remote add origin http://example.com/ostree/gnome
|
$OSTREE remote add origin http://example.com/ostree/gnome
|
||||||
|
|
@ -51,18 +51,18 @@ $OSTREE remote list > list.txt
|
||||||
assert_file_has_content list.txt "origin"
|
assert_file_has_content list.txt "origin"
|
||||||
assert_file_has_content list.txt "another"
|
assert_file_has_content list.txt "another"
|
||||||
assert_file_has_content list.txt "another-noexist"
|
assert_file_has_content list.txt "another-noexist"
|
||||||
assert_not_file_has_content list.txt "http://example.com/ostree/gnome"
|
assert_not_file_has_content list.txt "http://example\.com/ostree/gnome"
|
||||||
assert_not_file_has_content list.txt "http://another.com/repo"
|
assert_not_file_has_content list.txt "http://another\.com/repo"
|
||||||
assert_not_file_has_content list.txt "http://another-noexist.example.com/anotherrepo"
|
assert_not_file_has_content list.txt "http://another-noexist\.example\.com/anotherrepo"
|
||||||
echo "ok remote list"
|
echo "ok remote list"
|
||||||
|
|
||||||
$OSTREE remote list --show-urls > list.txt
|
$OSTREE remote list --show-urls > list.txt
|
||||||
assert_file_has_content list.txt "origin"
|
assert_file_has_content list.txt "origin"
|
||||||
assert_file_has_content list.txt "another"
|
assert_file_has_content list.txt "another"
|
||||||
assert_file_has_content list.txt "another-noexist"
|
assert_file_has_content list.txt "another-noexist"
|
||||||
assert_file_has_content list.txt "http://example.com/ostree/gnome"
|
assert_file_has_content list.txt "http://example\.com/ostree/gnome"
|
||||||
assert_file_has_content list.txt "http://another.com/repo"
|
assert_file_has_content list.txt "http://another\.com/repo"
|
||||||
assert_file_has_content list.txt "http://another-noexist.example.com/anotherrepo"
|
assert_file_has_content list.txt "http://another-noexist\.example\.com/anotherrepo"
|
||||||
echo "ok remote list with urls"
|
echo "ok remote list with urls"
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
|
|
@ -106,3 +106,15 @@ assert_not_file_has_content list.txt "origin"
|
||||||
# Can't grep for 'another' because of 'another-noexist'
|
# Can't grep for 'another' because of 'another-noexist'
|
||||||
assert_file_has_content list.txt "another-noexist"
|
assert_file_has_content list.txt "another-noexist"
|
||||||
echo "ok remote list remaining"
|
echo "ok remote list remaining"
|
||||||
|
|
||||||
|
# Both --if-not-exists and --force cannot be used
|
||||||
|
if $OSTREE remote add --if-not-exists --force yetanother http://yetanother.com/repo 2>/dev/null; then
|
||||||
|
assert_not_reached "Adding remote with --if-not-exists and --force unexpectedly succeeded"
|
||||||
|
fi
|
||||||
|
echo "ok remote add fail --if-not-exists and --force"
|
||||||
|
|
||||||
|
# Overwrite with --force
|
||||||
|
$OSTREE remote add --force another http://another.example.com/anotherrepo
|
||||||
|
$OSTREE remote list --show-urls > list.txt
|
||||||
|
assert_file_has_content list.txt "^another \+http://another\.example\.com/anotherrepo$"
|
||||||
|
echo "ok remote add --force"
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function assertNotEquals(a, b) {
|
||||||
throw new Error("assertion failed " + JSON.stringify(a) + " != " + JSON.stringify(b));
|
throw new Error("assertion failed " + JSON.stringify(a) + " != " + JSON.stringify(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
print('1..6')
|
print('1..9')
|
||||||
|
|
||||||
let remotesDir = Gio.File.new_for_path('remotes.d');
|
let remotesDir = Gio.File.new_for_path('remotes.d');
|
||||||
remotesDir.make_directory(null);
|
remotesDir.make_directory(null);
|
||||||
|
|
@ -45,6 +45,10 @@ remoteConfig.set_value('remote "foo"', 'url', 'http://foo')
|
||||||
let remoteConfigFile = remotesDir.get_child('foo.conf')
|
let remoteConfigFile = remotesDir.get_child('foo.conf')
|
||||||
remoteConfig.save_to_file(remoteConfigFile.get_path())
|
remoteConfig.save_to_file(remoteConfigFile.get_path())
|
||||||
|
|
||||||
|
let remoteOptions = GLib.Variant.new('a{sv}', {
|
||||||
|
'branches': GLib.Variant.new('as', ['test']),
|
||||||
|
});
|
||||||
|
|
||||||
// Use the full Repo constructor to set remotes-config-dir
|
// Use the full Repo constructor to set remotes-config-dir
|
||||||
let repoFile = Gio.File.new_for_path('repo');
|
let repoFile = Gio.File.new_for_path('repo');
|
||||||
let repo = new OSTree.Repo({path: repoFile,
|
let repo = new OSTree.Repo({path: repoFile,
|
||||||
|
|
@ -60,7 +64,7 @@ print("ok read-remotes-config-dir");
|
||||||
|
|
||||||
// Adding a remote should not go in the remotes.d dir unless this is a
|
// Adding a remote should not go in the remotes.d dir unless this is a
|
||||||
// system repo or add-remotes-config-dir is set to true
|
// system repo or add-remotes-config-dir is set to true
|
||||||
repo.remote_add('bar', 'http://bar', null, null);
|
repo.remote_add('bar', 'http://bar', remoteOptions, null);
|
||||||
remotes = repo.remote_list()
|
remotes = repo.remote_list()
|
||||||
assertNotEquals(remotes.indexOf('bar'), -1);
|
assertNotEquals(remotes.indexOf('bar'), -1);
|
||||||
assertEquals(remotesDir.get_child('bar.conf').query_exists(null), false);
|
assertEquals(remotesDir.get_child('bar.conf').query_exists(null), false);
|
||||||
|
|
@ -81,7 +85,7 @@ let repoConfig = repo.copy_config();
|
||||||
repoConfig.set_boolean('core', 'add-remotes-config-dir', true);
|
repoConfig.set_boolean('core', 'add-remotes-config-dir', true);
|
||||||
repo.write_config(repoConfig);
|
repo.write_config(repoConfig);
|
||||||
repo.reload_config(null);
|
repo.reload_config(null);
|
||||||
repo.remote_add('baz', 'http://baz', null, null);
|
repo.remote_add('baz', 'http://baz', remoteOptions, null);
|
||||||
remotes = repo.remote_list()
|
remotes = repo.remote_list()
|
||||||
assertNotEquals(remotes.indexOf('baz'), -1);
|
assertNotEquals(remotes.indexOf('baz'), -1);
|
||||||
assertEquals(remotesDir.get_child('baz.conf').query_exists(null), true);
|
assertEquals(remotesDir.get_child('baz.conf').query_exists(null), true);
|
||||||
|
|
@ -114,3 +118,49 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
print("ok config-remote-in-config-dir-fails");
|
print("ok config-remote-in-config-dir-fails");
|
||||||
|
|
||||||
|
// Replacing a non-existent remote should succeed. This should go in the
|
||||||
|
// config dir since add-remote-config-dir is set to true above
|
||||||
|
repo.remote_change(null, OSTree.RepoRemoteChange.REPLACE,
|
||||||
|
'nonexistent', 'http://nonexistent',
|
||||||
|
null, null);
|
||||||
|
remotes = repo.remote_list();
|
||||||
|
assertNotEquals(remotes.indexOf('nonexistent'), -1);
|
||||||
|
assertEquals(remotesDir.get_child('nonexistent.conf').query_exists(null), true);
|
||||||
|
|
||||||
|
print("ok replace-missing-remote-succeeds");
|
||||||
|
|
||||||
|
// Test replacing remote options in config dir. This should remove the
|
||||||
|
// branches setting above
|
||||||
|
repo.remote_change(null, OSTree.RepoRemoteChange.REPLACE, 'baz',
|
||||||
|
'http://baz2', null, null);
|
||||||
|
remoteConfigFile = remotesDir.get_child('baz.conf');
|
||||||
|
remoteConfig = GLib.KeyFile.new();
|
||||||
|
remoteConfig.load_from_file(remoteConfigFile.get_path(),
|
||||||
|
GLib.KeyFileFlags.NONE);
|
||||||
|
assertEquals(remoteConfig.get_value('remote "baz"', 'url'), 'http://baz2');
|
||||||
|
try {
|
||||||
|
remoteConfig.get_string_list('remote "baz"', 'branches');
|
||||||
|
throw new Error('baz remote should not have branches option');
|
||||||
|
} catch (e) {
|
||||||
|
if (!(e.matches(GLib.KeyFileError, GLib.KeyFileError.KEY_NOT_FOUND)))
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
print("ok replace-remote-in-config-dir");
|
||||||
|
|
||||||
|
// Test replacing remote options in config file. This should remove the
|
||||||
|
// branches setting above
|
||||||
|
repo.remote_change(null, OSTree.RepoRemoteChange.REPLACE, 'bar',
|
||||||
|
'http://bar2', null, null);
|
||||||
|
repoConfig = repo.get_config();
|
||||||
|
assertEquals(repoConfig.get_value('remote "bar"', 'url'), 'http://bar2');
|
||||||
|
try {
|
||||||
|
repoConfig.get_string_list('remote "bar"', 'branches');
|
||||||
|
throw new Error('bar remote should not have branches option');
|
||||||
|
} catch (e) {
|
||||||
|
if (!(e.matches(GLib.KeyFileError, GLib.KeyFileError.KEY_NOT_FOUND)))
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
print("ok replace-remote-in-config-file");
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,9 @@ for fs_type in ext4 vfat; do
|
||||||
|
|
||||||
assert_has_dir "${usb_mount}"/.ostree/repo
|
assert_has_dir "${usb_mount}"/.ostree/repo
|
||||||
${CMD_PREFIX} ostree --repo="${usb_mount}"/.ostree/repo refs --collections > dest-refs
|
${CMD_PREFIX} ostree --repo="${usb_mount}"/.ostree/repo refs --collections > dest-refs
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-1)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-1)$"
|
||||||
assert_file_has_content dest-refs "^(org.example.Collection1, test-2)$"
|
assert_file_has_content dest-refs "^(org\.example\.Collection1, test-2)$"
|
||||||
assert_not_file_has_content dest-refs "^(org.example.Collection1, test-3)$"
|
assert_not_file_has_content dest-refs "^(org\.example\.Collection1, test-3)$"
|
||||||
assert_has_file "${usb_mount}"/.ostree/repo/summary
|
assert_has_file "${usb_mount}"/.ostree/repo/summary
|
||||||
|
|
||||||
# Pull into a second local repository (theoretically, a separate computer).
|
# Pull into a second local repository (theoretically, a separate computer).
|
||||||
|
|
@ -112,15 +112,15 @@ for fs_type in ext4 vfat; do
|
||||||
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type remote add remote1 file://just-here-for-the-keyring --collection-id org.example.Collection1 --gpg-import="${test_tmpdir}/gpghome/key1.asc"
|
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type remote add remote1 file://just-here-for-the-keyring --collection-id org.example.Collection1 --gpg-import="${test_tmpdir}/gpghome/key1.asc"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type find-remotes --finders=mount org.example.Collection1 test-1 > find-results
|
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type find-remotes --finders=mount org.example.Collection1 test-1 > find-results
|
||||||
assert_not_file_has_content find-results "^No results.$"
|
assert_not_file_has_content find-results "^No results\.$"
|
||||||
assert_file_has_content find-results "^Result 0: file://${usb_mount}"
|
assert_file_has_content find-results "^Result 0: file://${usb_mount}"
|
||||||
assert_file_has_content find-results "(org.example.Collection1, test-1) = $(cat ref1-checksum)$"
|
assert_file_has_content find-results "(org\.example\.Collection1, test-1) = $(cat ref1-checksum)$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type find-remotes --finders=mount --pull org.example.Collection1 test-1 > pull-results
|
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type find-remotes --finders=mount --pull org.example.Collection1 test-1 > pull-results
|
||||||
assert_file_has_content pull-results "^Pulled 1/1 refs successfully.$"
|
assert_file_has_content pull-results "^Pulled 1/1 refs successfully\.$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type refs --collections > refs
|
${CMD_PREFIX} ostree --repo=peer-repo_$fs_type refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.Collection1, test-1)$"
|
assert_file_has_content refs "^(org\.example\.Collection1, test-1)$"
|
||||||
|
|
||||||
${SUDO} umount "${MOUNT_INTEGRATION_DEV}"
|
${SUDO} umount "${MOUNT_INTEGRATION_DEV}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,19 +43,19 @@ done
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --update
|
${CMD_PREFIX} ostree --repo=repo summary --update
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
||||||
assert_file_has_content summary "(org.example.Collection, test-1)$"
|
assert_file_has_content summary "(org\.example\.Collection, test-1)$"
|
||||||
assert_file_has_content summary "(org.example.Collection, test-2)$"
|
assert_file_has_content summary "(org\.example\.Collection, test-2)$"
|
||||||
assert_file_has_content summary "(org.example.Collection, test-3)$"
|
assert_file_has_content summary "(org\.example\.Collection, test-3)$"
|
||||||
assert_file_has_content summary "(org.example.Collection, test-4)$"
|
assert_file_has_content summary "(org\.example\.Collection, test-4)$"
|
||||||
assert_file_has_content summary "(org.example.Collection, test-5)$"
|
assert_file_has_content summary "(org\.example\.Collection, test-5)$"
|
||||||
assert_file_has_content summary "^Collection ID (ostree\.summary\.collection-id): org.example.Collection$"
|
assert_file_has_content summary "^Collection ID (ostree\.summary\.collection-id): org\.example\.Collection$"
|
||||||
|
|
||||||
# Test that mirrored branches are listed too.
|
# Test that mirrored branches are listed too.
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.OtherCollection:test-1-mirror test-1
|
${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.OtherCollection:test-1-mirror test-1
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --update
|
${CMD_PREFIX} ostree --repo=repo summary --update
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
||||||
assert_file_has_content summary "(org.example.OtherCollection, test-1-mirror)$"
|
assert_file_has_content summary "(org\.example\.OtherCollection, test-1-mirror)$"
|
||||||
|
|
||||||
# Test that remote refs are listed, but only if they have collection IDs
|
# Test that remote refs are listed, but only if they have collection IDs
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
|
|
@ -68,7 +68,7 @@ ${CMD_PREFIX} ostree --repo=repo pull collection-repo-remote rcommit
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --update
|
${CMD_PREFIX} ostree --repo=repo summary --update
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
${CMD_PREFIX} ostree --repo=repo summary --view > summary
|
||||||
assert_file_has_content summary "(org.example.RemoteCollection, rcommit)$"
|
assert_file_has_content summary "(org\.example\.RemoteCollection, rcommit)$"
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
mkdir no-collection-repo
|
mkdir no-collection-repo
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,7 @@ assert_file_has_content summary "^map: {}$"
|
||||||
|
|
||||||
echo "ok 1 update summary"
|
echo "ok 1 update summary"
|
||||||
|
|
||||||
# Test again, but with collections enabled in the repository (if supported).
|
# Test again, but with collections enabled in the repository.
|
||||||
if ! ostree --version | grep -q -e '- experimental'; then
|
|
||||||
echo "ok 2 # skip No experimental API is compiled in"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ${test_tmpdir}
|
cd ${test_tmpdir}
|
||||||
rm -rf repo
|
rm -rf repo
|
||||||
ostree_repo_init repo --collection-id org.example.Collection1
|
ostree_repo_init repo --collection-id org.example.Collection1
|
||||||
|
|
@ -95,12 +90,12 @@ assert_file_has_content summary "^map: {}$"
|
||||||
|
|
||||||
# Check the ostree-metadata ref has also been created with the same content and appropriate bindings.
|
# Check the ostree-metadata ref has also been created with the same content and appropriate bindings.
|
||||||
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
|
||||||
assert_file_has_content refs "^(org.example.Collection1, ostree-metadata)$"
|
assert_file_has_content refs "^(org\.example\.Collection1, ostree-metadata)$"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo show ostree-metadata --raw > metadata
|
${CMD_PREFIX} ostree --repo=repo show ostree-metadata --raw > metadata
|
||||||
assert_file_has_content metadata "'map': <@a{sv} {}>"
|
assert_file_has_content metadata "'map': <@a{sv} {}>"
|
||||||
assert_file_has_content metadata "'ostree.ref-binding': <\['ostree-metadata'\]>"
|
assert_file_has_content metadata "'ostree\.ref-binding': <\['ostree-metadata'\]>"
|
||||||
assert_file_has_content metadata "'ostree.collection-binding': <'org.example.Collection1'>"
|
assert_file_has_content metadata "'ostree\.collection-binding': <'org\.example\.Collection1'>"
|
||||||
|
|
||||||
# There should be 5 commits in the ostree-metadata branch, since we’ve updated the summary 5 times.
|
# There should be 5 commits in the ostree-metadata branch, since we’ve updated the summary 5 times.
|
||||||
${CMD_PREFIX} ostree --repo=repo log ostree-metadata | grep 'commit ' | wc -l > commit-count
|
${CMD_PREFIX} ostree --repo=repo log ostree-metadata | grep 'commit ' | wc -l > commit-count
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ echo 'ok documented symbols'
|
||||||
|
|
||||||
# ONLY update this checksum in release commits!
|
# ONLY update this checksum in release commits!
|
||||||
cat > released-sha256.txt <<EOF
|
cat > released-sha256.txt <<EOF
|
||||||
ae2946567160d4a47c8a7d000b87306895ee72cdd339e157d21c839e4b2c003a ${released_syms}
|
26f500134a55d678dd8ce6ba971c9e05cd4848b50ab895abc32cde1cffb5ad28 ${released_syms}
|
||||||
EOF
|
EOF
|
||||||
sha256sum -c released-sha256.txt
|
sha256sum -c released-sha256.txt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ echo "ok commit with xattrs"
|
||||||
|
|
||||||
${CMD_PREFIX} ostree --repo=repo checkout test2 test2-checkout2
|
${CMD_PREFIX} ostree --repo=repo checkout test2 test2-checkout2
|
||||||
getfattr -m . test2-checkout2/firstfile > attrs
|
getfattr -m . test2-checkout2/firstfile > attrs
|
||||||
assert_file_has_content attrs '^user.ostree-test'
|
assert_file_has_content attrs '^user\.ostree-test'
|
||||||
assert_file_has_content attrs '^user.test0'
|
assert_file_has_content attrs '^user\.test0'
|
||||||
getfattr -n user.ostree-test --only-values test2-checkout2/firstfile > v0
|
getfattr -n user.ostree-test --only-values test2-checkout2/firstfile > v0
|
||||||
assert_file_has_content v0 '^testvalue$'
|
assert_file_has_content v0 '^testvalue$'
|
||||||
getfattr -n user.test0 --only-values test2-checkout2/firstfile > v1
|
getfattr -n user.test0 --only-values test2-checkout2/firstfile > v1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue