New upstream version 2019.3
This commit is contained in:
commit
1b51e1d9d0
|
|
@ -45,6 +45,7 @@ libostree_public_headers = \
|
|||
src/libostree/ostree-repo-finder-config.h \
|
||||
src/libostree/ostree-repo-finder-mount.h \
|
||||
src/libostree/ostree-repo-finder-override.h \
|
||||
src/libostree/ostree-kernel-args.h \
|
||||
$(NULL)
|
||||
|
||||
# This one is generated via configure.ac, and the gtk-doc
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
include Makefile-libostree-defines.am
|
||||
|
||||
noinst_LTLIBRARIES += libostree-kernel-args.la
|
||||
|
||||
|
||||
if ENABLE_RUST
|
||||
bupsplitpath = @abs_top_builddir@/target/@RUST_TARGET_SUBDIR@/libbupsplit_rs.a
|
||||
|
|
@ -36,13 +34,6 @@ noinst_LTLIBRARIES += libbupsplit.la
|
|||
libbupsplit_la_SOURCES = src/libostree/bupsplit.h src/libostree/bupsplit.c
|
||||
endif # ENABLE_RUST
|
||||
|
||||
libostree_kernel_args_la_SOURCES = \
|
||||
src/libostree/ostree-kernel-args.h \
|
||||
src/libostree/ostree-kernel-args.c \
|
||||
$(NULL)
|
||||
libostree_kernel_args_la_CFLAGS = -I$(srcdir)/libglnx $(OT_INTERNAL_GIO_UNIX_CFLAGS)
|
||||
libostree_kernel_args_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS)
|
||||
|
||||
lib_LTLIBRARIES += libostree-1.la
|
||||
|
||||
libostreeincludedir = $(includedir)/ostree-1
|
||||
|
|
@ -135,10 +126,6 @@ libostree_1_la_SOURCES = \
|
|||
src/libostree/ostree-repo-static-delta-compilation.c \
|
||||
src/libostree/ostree-repo-static-delta-compilation-analysis.c \
|
||||
src/libostree/ostree-repo-static-delta-private.h \
|
||||
src/libostree/ostree-gpg-verifier.c \
|
||||
src/libostree/ostree-gpg-verifier.h \
|
||||
src/libostree/ostree-gpg-verify-result.c \
|
||||
src/libostree/ostree-gpg-verify-result-private.h \
|
||||
src/libostree/ostree-autocleanups.h \
|
||||
src/libostree/ostree-bloom.c \
|
||||
src/libostree/ostree-bloom-private.h \
|
||||
|
|
@ -147,6 +134,8 @@ libostree_1_la_SOURCES = \
|
|||
src/libostree/ostree-repo-finder-config.c \
|
||||
src/libostree/ostree-repo-finder-mount.c \
|
||||
src/libostree/ostree-repo-finder-override.c \
|
||||
src/libostree/ostree-kernel-args.h \
|
||||
src/libostree/ostree-kernel-args.c \
|
||||
$(NULL)
|
||||
if USE_LIBARCHIVE
|
||||
libostree_1_la_SOURCES += src/libostree/ostree-libarchive-input-stream.h \
|
||||
|
|
@ -176,6 +165,19 @@ libostree_1_la_SOURCES += \
|
|||
$(NULL)
|
||||
endif # USE_AVAHI
|
||||
|
||||
if USE_GPGME
|
||||
libostree_1_la_SOURCES += \
|
||||
src/libostree/ostree-gpg-verifier.c \
|
||||
src/libostree/ostree-gpg-verifier.h \
|
||||
src/libostree/ostree-gpg-verify-result.c \
|
||||
src/libostree/ostree-gpg-verify-result-private.h \
|
||||
$(NULL)
|
||||
else
|
||||
libostree_1_la_SOURCES += \
|
||||
src/libostree/ostree-gpg-verify-result-dummy.c \
|
||||
$(NULL)
|
||||
endif # USE_GPGME
|
||||
|
||||
symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym
|
||||
if BUILDOPT_IS_DEVEL_BUILD
|
||||
symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
|
||||
|
|
@ -191,7 +193,7 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(
|
|||
$(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_CRYPTO_CFLAGS) \
|
||||
-fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern'
|
||||
libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files))
|
||||
libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la libostree-kernel-args.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \
|
||||
libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \
|
||||
$(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS)
|
||||
# Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64
|
||||
if ENABLE_RUST
|
||||
|
|
@ -258,6 +260,10 @@ libostree_1_la_CFLAGS += $(OT_DEP_SELINUX_CFLAGS)
|
|||
libostree_1_la_LIBADD += $(OT_DEP_SELINUX_LIBS)
|
||||
endif
|
||||
|
||||
# XXX: work around clang being passed -fstack-clash-protection which it doesn't understand
|
||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1672012
|
||||
INTROSPECTION_SCANNER_ENV = CC=gcc
|
||||
|
||||
if BUILDOPT_INTROSPECTION
|
||||
OSTree-1.0.gir: libostree-1.la Makefile
|
||||
OSTree_1_0_gir_EXPORT_PACKAGES = ostree-1
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ostree-admin-status.1 ostree-admin-set-origin.1 ostree-admin-switch.1 \
|
|||
ostree-admin-undeploy.1 ostree-admin-upgrade.1 ostree-admin-unlock.1 \
|
||||
ostree-admin-pin.1 \
|
||||
ostree-admin.1 ostree-cat.1 ostree-checkout.1 ostree-checksum.1 \
|
||||
ostree-commit.1 ostree-create-usb.1 ostree-export.1 ostree-gpg-sign.1 \
|
||||
ostree-commit.1 ostree-create-usb.1 ostree-export.1 \
|
||||
ostree-config.1 ostree-diff.1 ostree-find-remotes.1 ostree-fsck.1 \
|
||||
ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \
|
||||
ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \
|
||||
|
|
@ -45,6 +45,10 @@ if BUILDOPT_FUSE
|
|||
man1_files += rofiles-fuse.1
|
||||
endif
|
||||
|
||||
if USE_GPGME
|
||||
man1_files += ostree-gpg-sign.1
|
||||
endif
|
||||
|
||||
man5_files = ostree.repo.5 ostree.repo-config.5
|
||||
|
||||
man1_MANS = $(addprefix man/,$(man1_files))
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ ostree_SOURCES = src/ostree/main.c \
|
|||
src/ostree/ot-builtin-export.c \
|
||||
src/ostree/ot-builtin-find-remotes.c \
|
||||
src/ostree/ot-builtin-fsck.c \
|
||||
src/ostree/ot-builtin-gpg-sign.c \
|
||||
src/ostree/ot-builtin-init.c \
|
||||
src/ostree/ot-builtin-pull-local.c \
|
||||
src/ostree/ot-builtin-log.c \
|
||||
|
|
@ -65,6 +64,12 @@ ostree_SOURCES += \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
if USE_GPGME
|
||||
ostree_SOURCES += \
|
||||
src/ostree/ot-builtin-gpg-sign.c \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
# Admin subcommand
|
||||
ostree_SOURCES += \
|
||||
src/ostree/ot-admin-builtin-init-fs.c \
|
||||
|
|
@ -95,13 +100,18 @@ ostree_SOURCES += \
|
|||
src/ostree/ot-remote-builtins.h \
|
||||
src/ostree/ot-remote-builtin-add.c \
|
||||
src/ostree/ot-remote-builtin-delete.c \
|
||||
src/ostree/ot-remote-builtin-gpg-import.c \
|
||||
src/ostree/ot-remote-builtin-list.c \
|
||||
src/ostree/ot-remote-builtin-show-url.c \
|
||||
src/ostree/ot-remote-builtin-refs.c \
|
||||
src/ostree/ot-remote-builtin-summary.c \
|
||||
$(NULL)
|
||||
|
||||
if USE_GPGME
|
||||
ostree_SOURCES += \
|
||||
src/ostree/ot-remote-builtin-gpg-import.c \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
||||
if USE_CURL_OR_SOUP
|
||||
ostree_SOURCES += src/ostree/ot-remote-builtin-add-cookie.c \
|
||||
|
|
@ -125,7 +135,7 @@ ostree_bin_shared_ldadd = $(AM_LDFLAGS) libglnx.la libotutil.la libostree-1.la \
|
|||
$(OT_INTERNAL_GIO_UNIX_LIBS)
|
||||
|
||||
ostree_CFLAGS = $(ostree_bin_shared_cflags)
|
||||
ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la libostree-kernel-args.la $(LIBSYSTEMD_LIBS)
|
||||
ostree_LDADD = $(ostree_bin_shared_ldadd) libbsdiff.la $(LIBSYSTEMD_LIBS)
|
||||
|
||||
|
||||
if USE_CURL_OR_SOUP
|
||||
|
|
|
|||
|
|
@ -40,11 +40,17 @@ libotutil_la_SOURCES = \
|
|||
src/libotutil/ot-variant-builder.h \
|
||||
src/libotutil/ot-gio-utils.c \
|
||||
src/libotutil/ot-gio-utils.h \
|
||||
src/libotutil/ot-gpg-utils.c \
|
||||
src/libotutil/ot-gpg-utils.h \
|
||||
src/libotutil/otutil.h \
|
||||
src/libotutil/ot-tool-util.c \
|
||||
src/libotutil/ot-tool-util.h \
|
||||
$(NULL)
|
||||
|
||||
if USE_GPGME
|
||||
libotutil_la_SOURCES += \
|
||||
src/libotutil/ot-gpg-utils.c \
|
||||
src/libotutil/ot-gpg-utils.h \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(LIBSYSTEMD_CFLAGS)
|
||||
libotutil_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) $(LIBSYSTEMD_LIBS)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ _installed_or_uninstalled_test_scripts = \
|
|||
tests/test-archivez.sh \
|
||||
tests/test-remote-add.sh \
|
||||
tests/test-remote-headers.sh \
|
||||
tests/test-remote-gpg-import.sh \
|
||||
tests/test-commit-sign.sh \
|
||||
tests/test-export.sh \
|
||||
tests/test-help.sh \
|
||||
|
|
@ -91,7 +90,6 @@ _installed_or_uninstalled_test_scripts = \
|
|||
tests/test-pull-localcache.sh \
|
||||
tests/test-local-pull.sh \
|
||||
tests/test-local-pull-depth.sh \
|
||||
tests/test-gpg-signed-commit.sh \
|
||||
tests/test-admin-upgrade-unconfigured.sh \
|
||||
tests/test-admin-upgrade-endoflife.sh \
|
||||
tests/test-admin-upgrade-systemd-update.sh \
|
||||
|
|
@ -110,7 +108,6 @@ _installed_or_uninstalled_test_scripts = \
|
|||
tests/test-admin-pull-deploy-split.sh \
|
||||
tests/test-admin-locking.sh \
|
||||
tests/test-admin-deploy-clean.sh \
|
||||
tests/test-admin-gpg.sh \
|
||||
tests/test-reset-nonlinear.sh \
|
||||
tests/test-oldstyle-partial.sh \
|
||||
tests/test-delta.sh \
|
||||
|
|
@ -139,6 +136,14 @@ _installed_or_uninstalled_test_scripts = \
|
|||
tests/test-config.sh \
|
||||
$(NULL)
|
||||
|
||||
if USE_GPGME
|
||||
_installed_or_uninstalled_test_scripts += \
|
||||
tests/test-remote-gpg-import.sh \
|
||||
tests/test-gpg-signed-commit.sh \
|
||||
tests/test-admin-gpg.sh \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
experimental_test_scripts = \
|
||||
$(NULL)
|
||||
test_extra_programs = \
|
||||
|
|
@ -200,6 +205,7 @@ dist_test_extra_scripts = \
|
|||
tests/ostree-grub-generator \
|
||||
$(NULL)
|
||||
|
||||
if USE_GPGME
|
||||
# We can't use nobase_ as we need to strip off the tests/, can't
|
||||
# use plain installed_ as we do need the gpghome/ prefix.
|
||||
if ENABLE_INSTALLED_TESTS
|
||||
|
|
@ -217,6 +223,7 @@ gpgvinsttestdir = $(installed_testdir)/gpg-verify-data
|
|||
dist_gpgvinsttest_DATA = $(addprefix tests/gpg-verify-data/, \
|
||||
gpg.conf lgpl2 lgpl2.sig pubring.gpg secring.gpg trustdb.gpg)
|
||||
endif
|
||||
endif
|
||||
|
||||
js_installed_tests = \
|
||||
tests/test-core.js \
|
||||
|
|
@ -245,8 +252,14 @@ endif
|
|||
|
||||
_installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
|
||||
tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
|
||||
tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
|
||||
tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h
|
||||
tests/test-checksum tests/test-lzma tests/test-rollsum \
|
||||
tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h tests/test-kargs
|
||||
|
||||
if USE_GPGME
|
||||
_installed_or_uninstalled_test_programs += \
|
||||
tests/test-gpg-verify-result \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
if USE_AVAHI
|
||||
test_programs += tests/test-repo-finder-avahi
|
||||
|
|
@ -295,6 +308,10 @@ tests_test_repo_finder_avahi_CFLAGS = $(TESTS_CFLAGS)
|
|||
tests_test_repo_finder_avahi_LDADD = $(TESTS_LDADD)
|
||||
endif
|
||||
|
||||
tests_test_kargs_SOURCES = src/libostree/ostree-kernel-args.c tests/test-kargs.c
|
||||
tests_test_kargs_CFLAGS = $(TESTS_CFLAGS)
|
||||
tests_test_kargs_LDADD = $(TESTS_LDADD)
|
||||
|
||||
tests_test_repo_finder_config_SOURCES = tests/test-repo-finder-config.c
|
||||
tests_test_repo_finder_config_CFLAGS = $(TESTS_CFLAGS)
|
||||
tests_test_repo_finder_config_LDADD = $(TESTS_LDADD)
|
||||
|
|
@ -350,16 +367,21 @@ tests_test_lzma_SOURCES = src/libostree/ostree-lzma-common.c src/libostree/ostre
|
|||
tests_test_lzma_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_LZMA_CFLAGS)
|
||||
tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS)
|
||||
|
||||
if USE_GPGME
|
||||
tests_test_gpg_verify_result_SOURCES = \
|
||||
src/libostree/ostree-gpg-verify-result-private.h \
|
||||
tests/test-gpg-verify-result.c
|
||||
tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS)
|
||||
tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
|
||||
|
||||
EXTRA_DIST += \
|
||||
tests/gpg-verify-data/README.md \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
tests/libostreetest.h \
|
||||
tests/libtest.sh \
|
||||
tests/gpg-verify-data/README.md \
|
||||
$(NULL)
|
||||
|
||||
tests/libreaddir-rand.so: Makefile
|
||||
|
|
|
|||
|
|
@ -57,8 +57,10 @@ OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS)
|
|||
OT_INTERNAL_SOUP_LIBS = $(OT_DEP_SOUP_LIBS)
|
||||
|
||||
# This canonicalizes the PKG_CHECK_MODULES or AM_PATH_GPGME results
|
||||
if USE_GPGME
|
||||
OT_INTERNAL_GPGME_CFLAGS = $(OT_DEP_GPGME_CFLAGS) $(GPGME_PTHREAD_CFLAGS)
|
||||
OT_INTERNAL_GPGME_LIBS = $(OT_DEP_GPGME_LIBS) $(GPGME_PTHREAD_LIBS)
|
||||
endif
|
||||
|
||||
if BUILDOPT_INTROSPECTION
|
||||
include $(INTROSPECTION_MAKEFILE)
|
||||
|
|
|
|||
988
Makefile.in
988
Makefile.in
File diff suppressed because it is too large
Load Diff
70
README.md
70
README.md
|
|
@ -36,9 +36,36 @@ version of
|
|||
projects like [flatpak](https://github.com/flatpak/flatpak) which
|
||||
use libostree for applications, rather than hosts.
|
||||
|
||||
Projects using OSTree
|
||||
Operating systems and distributions using OSTree
|
||||
---------------------
|
||||
|
||||
[Endless OS](https://endlessos.com/) uses libostree for their host system as
|
||||
well as flatpak. See
|
||||
their [eos-updater](https://github.com/endlessm/eos-updater)
|
||||
and [deb-ostree-builder](https://github.com/dbnicholson/deb-ostree-builder)
|
||||
projects.
|
||||
|
||||
Fedora derivatives use rpm-ostree (noted below); there are 3 variants using OSTree:
|
||||
|
||||
- [Fedora CoreOS](https://getfedora.org/en/coreos/)
|
||||
- [Fedora Silverblue](https://silverblue.fedoraproject.org/)
|
||||
- [Fedora IoT](https://iot.fedoraproject.org/)
|
||||
|
||||
Red Hat Enterprise Linux CoreOS is a derivative of Fedora CoreOS, used in [OpenShift 4](https://try.openshift.com/).
|
||||
The [machine-config-operator](https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md)
|
||||
manages upgrades. RHEL CoreOS is also the successor to RHEL Atomic Host, which
|
||||
uses rpm-ostree as well.
|
||||
|
||||
[GNOME Continuous](https://wiki.gnome.org/Projects/GnomeContinuous) is
|
||||
where OSTree was born - as a high performance continuous delivery/testing
|
||||
system for GNOME.
|
||||
|
||||
[Liri OS](https://liri.io/download/silverblue/) has the option to install
|
||||
their distribution using ostree.
|
||||
|
||||
Distribution build tools
|
||||
------------------------
|
||||
|
||||
[meta-updater](https://github.com/advancedtelematic/meta-updater) is
|
||||
a layer available for [OpenEmbedded](http://www.openembedded.org/wiki/Main_Page)
|
||||
systems.
|
||||
|
|
@ -46,37 +73,32 @@ systems.
|
|||
[QtOTA](http://doc.qt.io/QtOTA/) is Qt's over-the-air update framework
|
||||
which uses libostree.
|
||||
|
||||
[rpm-ostree](https://github.com/projectatomic/rpm-ostree) is a next-generation
|
||||
hybrid package/image system for [Fedora](https://getfedora.org/) and [CentOS](https://www.centos.org/),
|
||||
used by the [Atomic Host](http://www.projectatomic.io/) project.
|
||||
By default it uses libostree to atomically replicate a base OS (all dependency
|
||||
resolution is done on the server), but it supports "package layering", where
|
||||
The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
|
||||
integration tool uses libostree as a caching system to store and share
|
||||
built artifacts.
|
||||
|
||||
Fedora [coreos-assembler](https://github.com/coreos/coreos-assembler) is
|
||||
the build tool used to generate Fedora CoreOS derivatives.
|
||||
|
||||
Projects linking to libostree
|
||||
-----------------------------
|
||||
|
||||
[rpm-ostree](https://github.com/projectatomic/rpm-ostree) is used by the
|
||||
Fedora-derived operating systems listed above. It is a full hybrid
|
||||
image/package system. By default it uses libostree to atomically replicate a base OS
|
||||
(all dependency resolution is done on the server), but it supports "package layering", where
|
||||
additional RPMs can be layered on top of the base. This brings a "best of both worlds""
|
||||
model for image and package systems.
|
||||
|
||||
[eos-updater](https://github.com/endlessm/eos-updater) is a daemon that implements updates
|
||||
on EndlessOS.
|
||||
|
||||
[flatpak](https://github.com/flatpak/flatpak) uses libostree for desktop
|
||||
application containers. Unlike most of the other systems here, flatpak does not
|
||||
use the "libostree host system" aspects (e.g. bootloader management), just the
|
||||
"git-like hardlink dedup". For example, flatpak supports a per-user OSTree
|
||||
repository.
|
||||
|
||||
[Endless OS](https://endlessos.com/) uses libostree for their host system as
|
||||
well as flatpak. See
|
||||
their [eos-updater](https://github.com/endlessm/eos-updater)
|
||||
and [deb-ostree-builder](https://github.com/dbnicholson/deb-ostree-builder)
|
||||
projects.
|
||||
|
||||
[GNOME Continuous](https://wiki.gnome.org/Projects/GnomeContinuous) is
|
||||
where OSTree was born - as a high performance continuous delivery/testing
|
||||
system for GNOME.
|
||||
|
||||
The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
|
||||
integration tool uses libostree as a caching system to store and share
|
||||
built artifacts.
|
||||
|
||||
[Liri OS](https://liri.io/download/silverblue/) has the option to install
|
||||
their distribution using ostree.
|
||||
|
||||
Language bindings
|
||||
----
|
||||
|
||||
|
|
@ -91,7 +113,7 @@ write higher level manual bindings on top; this is more common
|
|||
for statically compiled languages. Here's a list of such bindings:
|
||||
|
||||
- [ostree-go](https://github.com/ostreedev/ostree-go/)
|
||||
- [rust-libostree](https://gitlab.com/fkrull/rust-libostree/)
|
||||
- [ostree-rs](https://gitlab.com/fkrull/ostree-rs/)
|
||||
|
||||
Building
|
||||
--------
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ IGNORE_HFILES= \
|
|||
ostree-fetcher.h \
|
||||
ostree-gpg-verifier.h \
|
||||
ostree-gpg-verify-result-private.h \
|
||||
ostree-kernel-args.h \
|
||||
ostree-libarchive-input-stream.h \
|
||||
ostree-lzma-compressor.h \
|
||||
ostree-lzma-decompressor.h \
|
||||
|
|
|
|||
|
|
@ -411,6 +411,7 @@ libostree_public_headers = \
|
|||
src/libostree/ostree-repo-finder-config.h \
|
||||
src/libostree/ostree-repo-finder-mount.h \
|
||||
src/libostree/ostree-repo-finder-override.h \
|
||||
src/libostree/ostree-kernel-args.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
|
@ -474,7 +475,6 @@ IGNORE_HFILES = \
|
|||
ostree-fetcher.h \
|
||||
ostree-gpg-verifier.h \
|
||||
ostree-gpg-verify-result-private.h \
|
||||
ostree-kernel-args.h \
|
||||
ostree-libarchive-input-stream.h \
|
||||
ostree-lzma-compressor.h \
|
||||
ostree-lzma-decompressor.h \
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<div class="titlepage">
|
||||
<div>
|
||||
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">OSTree API references</p></th></tr></table></div>
|
||||
<div><p class="releaseinfo">for OSTree 2019.2</p></div>
|
||||
<div><p class="releaseinfo">for OSTree 2019.3</p></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -848,6 +848,7 @@ ostree_checksum_b64_from_bytes (<em class="parameter"><code>const <span class="t
|
|||
character is used. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.8</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -875,6 +876,7 @@ ostree_checksum_b64_to_bytes (<em class="parameter"><code>const <span class="typ
|
|||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/array"><span class="acronym">array</span></a> fixed-size=32]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.8</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1578,6 +1580,7 @@ OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2379,6 +2382,7 @@ root "dirmeta" checksum (both in binary form, not hexadecimal).</p>
|
|||
is not well-formed. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2412,6 +2416,7 @@ ostree_check_version (<em class="parameter"><code><span class="type">guint</span
|
|||
<a name="ostree-check-version.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if current libostree has at least the requested version, <code class="literal">FALSE</code> otherwise</p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ it will handle the <code class="literal">NULL</code> <em class="parameter"><code
|
|||
was not <code class="literal">NULL</code> and had at least one
|
||||
signature from trusted keyring, otherwise <code class="literal">FALSE</code></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.6</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
|
|
@ -676,6 +677,24 @@ The attribute's <span class="type">GVariantType</span> is shown in brackets.</p>
|
|||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p> [<span class="type">G_VARIANT_TYPE_INT64</span>] Key expiration Unix timestamp (0 if no
|
||||
expiration or if the key is missing)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP-PRIMARY:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p> [<span class="type">G_VARIANT_TYPE_INT64</span>] Key expiration Unix timestamp of the signing key's
|
||||
primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP
|
||||
if the signing key is the primary key and 0 if no expiration or if the key
|
||||
is missing)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ and checksums. The data will be loaded from the repo lazily as needed.</p>
|
|||
<p>A new tree. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -358,6 +359,7 @@ does not exist in the tree</p></td>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.9</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -412,6 +414,43 @@ ostree_mutable_tree_lookup (<em class="parameter"><code><a class="link" href="os
|
|||
<em class="parameter"><code><span class="type">char</span> **out_file_checksum</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-lookup.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>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>name</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_file_checksum</p></td>
|
||||
<td class="parameter_description"><p>checksum. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_subdir</p></td>
|
||||
<td class="parameter_description"><p>subdirectory. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -569,6 +608,7 @@ if it was not possible.</p>
|
|||
checksums are not loaded or checked when this function is called. Instead
|
||||
the contents will be loaded only when needed.</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.7</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
|
|
|
|||
|
|
@ -770,6 +770,14 @@
|
|||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-write-archive-to-mtree-from-fd" title="ostree_repo_write_archive_to_mtree_from_fd ()">ostree_repo_write_archive_to_mtree_from_fd</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-write-mtree" title="ostree_repo_write_mtree ()">ostree_repo_write_mtree</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -1279,6 +1287,33 @@ collection IDs, see <code class="function">ostree_validate_collection_id()</code
|
|||
ostree_repo_mode_from_string (<em class="parameter"><code>const <span class="type">char</span> *mode</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepoMode" title="enum OstreeRepoMode"><span class="type">OstreeRepoMode</span></a> *out_mode</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-mode-from-string.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>mode</p></td>
|
||||
<td class="parameter_description"><p>a repo mode as a string</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_mode</p></td>
|
||||
<td class="parameter_description"><p>the corresponding <a class="link" href="ostree-OstreeRepo.html#OstreeRepoMode" title="enum OstreeRepoMode"><span class="type">OstreeRepoMode</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span> if the string is not a valid mode</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1320,6 +1355,7 @@ already extant repository. If you want to create one, use <a class="link" href=
|
|||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.10</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1598,6 +1634,7 @@ the mode or configuration (<code class="literal">repo/config</code>) of an exist
|
|||
<p>A new OSTree repository reference. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.10</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1721,6 +1758,43 @@ ostree_repo_get_mode (<em class="parameter"><code><a class="link" href="ostree-O
|
|||
ostree_repo_get_min_free_space_bytes (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint64</span> *out_reserved_bytes</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Determine the number of bytes of free disk space that are reserved according
|
||||
to the repo config and return that number in <em class="parameter"><code>out_reserved_bytes</code></em>
|
||||
. See the
|
||||
documentation for the core.min-free-space-size and
|
||||
core.min-free-space-percent repo config options.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-get-min-free-space-bytes.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>Repo</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_reserved_bytes</p></td>
|
||||
<td class="parameter_description"><p>Location to store the result. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Return location for a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-get-min-free-space-bytes.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> otherwise.</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.9</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1762,6 +1836,7 @@ repository (to see whether a ref was written).</p>
|
|||
<p> File descriptor for repository root - owned by <em class="parameter"><code>self</code></em>
|
||||
</p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2283,18 +2358,18 @@ from the remote named <em class="parameter"><code>name</code></em>
|
|||
<tr>
|
||||
<td class="parameter_name"><p>source_stream</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GInputStream</span>, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key_ids</p></td>
|
||||
<td class="parameter_description"><p>a <code class="literal">NULL</code>-terminated array of GPG key IDs, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_imported</p></td>
|
||||
<td class="parameter_description"><p>return location for the number of imported
|
||||
keys, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
|
|
@ -2464,6 +2539,7 @@ signature data, or <code class="literal">NULL</code>. </p></td>
|
|||
<a name="ostree-repo-remote-fetch-summary-with-options.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> on failure</p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2501,6 +2577,7 @@ own repo/config data. This API can be used to reload it.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2569,6 +2646,7 @@ is not present</p></td>
|
|||
<p> <code class="literal">TRUE</code> on success, otherwise <code class="literal">FALSE</code> with <em class="parameter"><code>error</code></em>
|
||||
set</p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2630,6 +2708,7 @@ of strings. The list should be freed with
|
|||
<p> <code class="literal">TRUE</code> on success, otherwise <code class="literal">FALSE</code> with <em class="parameter"><code>error</code></em>
|
||||
set</p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -2696,6 +2775,7 @@ is not present. </p></td>
|
|||
<p> <code class="literal">TRUE</code> on success, otherwise <code class="literal">FALSE</code> with <em class="parameter"><code>error</code></em>
|
||||
set</p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -3170,6 +3250,7 @@ ostree_repo_set_alias_ref_immediate (<em class="parameter"><code><a class="link"
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.10</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -3222,6 +3303,7 @@ write permissions in the repo, where the cache is normally stored.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -4032,6 +4114,7 @@ is true and it does not exist. </p></td>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -4154,6 +4237,7 @@ remote name) to checksums. Differently from <a class="link" href="ostree-OstreeR
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -4668,6 +4752,7 @@ this will simply be a fast Unix hard link operation.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -5357,6 +5442,70 @@ file structure to <em class="parameter"><code>mtree</code></em>
|
|||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-write-archive-to-mtree-from-fd"></a><h3>ostree_repo_write_archive_to_mtree_from_fd ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_repo_write_archive_to_mtree_from_fd
|
||||
(<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> fd</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *mtree</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepoCommitModifier" title="OstreeRepoCommitModifier"><span class="type">OstreeRepoCommitModifier</span></a> *modifier</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> autocreate_parents</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Read an archive from <em class="parameter"><code>fd</code></em>
|
||||
and import it into the repository, writing
|
||||
its file structure to <em class="parameter"><code>mtree</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-write-archive-to-mtree-from-fd.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>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>fd</p></td>
|
||||
<td class="parameter_description"><p>A file descriptor to read the archive from</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>mtree</p></td>
|
||||
<td class="parameter_description"><p>The <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> to write to</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>modifier</p></td>
|
||||
<td class="parameter_description"><p>Optional commit modifier. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>autocreate_parents</p></td>
|
||||
<td class="parameter_description"><p>Autocreate parent directories</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-write-mtree"></a><h3>ostree_repo_write_mtree ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_repo_write_mtree (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>,
|
||||
|
|
@ -5708,6 +5857,7 @@ ostree_repo_checkout_at_options_set_devino
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.13</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -5919,6 +6069,7 @@ cache.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.8</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -7029,6 +7180,7 @@ statistics on objects that would be deleted, without actually deleting them.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.1</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -7535,6 +7687,7 @@ the verifications using GPG keys in the keyrings of all remotes.</p>
|
|||
<p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>, or <code class="literal">NULL</code> on error. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -7713,6 +7866,7 @@ configured for <em class="parameter"><code>remote</code></em>
|
|||
<p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>, or <code class="literal">NULL</code> on error. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.14</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
|
|||
|
|
@ -493,6 +493,39 @@ ostree_sysroot_load_if_changed (<em class="parameter"><code><a class="link" href
|
|||
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-load-if-changed.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><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_changed</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out%20caller-allocates"><span class="acronym">out caller-allocates</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1103,6 +1136,7 @@ has been invoked successfully.</p>
|
|||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1178,6 +1212,7 @@ ostree_sysroot_get_staged_deployment (<em class="parameter"><code><a class="link
|
|||
<p>The currently staged deployment, or <code class="literal">NULL</code> if none. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1222,6 +1257,7 @@ is required for generating a deployment.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1376,6 +1412,7 @@ across reboots.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1526,6 +1563,7 @@ if for example you want to control pruning of the repository.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -1653,6 +1691,7 @@ shutdown time.</p>
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ ostree_sepolicy_new_at (<em class="parameter"><code><span class="type">int</span
|
|||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -310,6 +311,7 @@ ostree_sepolicy_get_csum (<em class="parameter"><code><a class="link" href="ostr
|
|||
<p>Checksum of current policy. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ or concatenate it with the full <a class="link" href="ostree-Root-partition-moun
|
|||
<a name="ostree-deployment-get-unlocked"></a><h3>ostree_deployment_get_unlocked ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">OstreeDeploymentUnlockedState</span>
|
||||
ostree_deployment_get_unlocked (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -553,6 +554,7 @@ ostree_deployment_clone (<em class="parameter"><code><a class="link" href="ostre
|
|||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_deployment_unlocked_state_to_string
|
||||
(<em class="parameter"><code><span class="type">OstreeDeploymentUnlockedState</span> state</code></em>);</pre>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="str
|
|||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
|
|||
|
|
@ -166,6 +166,38 @@ ostree_repo_file_get_xattrs (<em class="parameter"><code><a class="link" href="o
|
|||
<em class="parameter"><code><span class="type">GVariant</span> **out_xattrs</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-get-xattrs.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><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_xattrs</p></td>
|
||||
<td class="parameter_description"><p>the extended attributes. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -237,6 +269,38 @@ ostree_repo_file_tree_find_child (<em class="parameter"><code><a class="link" hr
|
|||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> *is_dir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> **out_container</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-find-child.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><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>name of the child</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>is_dir</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out%20caller-allocates"><span class="acronym">out caller-allocates</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_container</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
|
|
@ -249,6 +313,38 @@ ostree_repo_file_tree_query_child (<em class="parameter"><code><a class="link" h
|
|||
<em class="parameter"><code><span class="type">GFileInfo</span> **out_info</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-query-child.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><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_info</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
<keyword type="function" name="ostree_checksum_inplace_to_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-inplace-to-bytes"/>
|
||||
<keyword type="function" name="ostree_checksum_bytes_peek ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-bytes-peek"/>
|
||||
<keyword type="function" name="ostree_checksum_bytes_peek_validate ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-bytes-peek-validate"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_from_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-from-bytes"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_to_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-to-bytes"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_from_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-from-bytes" since="2016.8"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_to_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-to-bytes" since="2016.8"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_inplace_from_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-inplace-from-bytes"/>
|
||||
<keyword type="function" name="ostree_checksum_b64_inplace_to_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-checksum-b64-inplace-to-bytes"/>
|
||||
<keyword type="function" name="ostree_cmp_checksum_bytes ()" link="ostree-Core-repository-independent-functions.html#ostree-cmp-checksum-bytes"/>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<keyword type="function" name="ostree_content_stream_parse ()" link="ostree-Core-repository-independent-functions.html#ostree-content-stream-parse"/>
|
||||
<keyword type="function" name="ostree_content_file_parse ()" link="ostree-Core-repository-independent-functions.html#ostree-content-file-parse"/>
|
||||
<keyword type="function" name="ostree_content_file_parse_at ()" link="ostree-Core-repository-independent-functions.html#ostree-content-file-parse-at"/>
|
||||
<keyword type="function" name="ostree_raw_file_to_archive_z2_stream ()" link="ostree-Core-repository-independent-functions.html#ostree-raw-file-to-archive-z2-stream"/>
|
||||
<keyword type="function" name="ostree_raw_file_to_archive_z2_stream ()" link="ostree-Core-repository-independent-functions.html#ostree-raw-file-to-archive-z2-stream" since="2016.6"/>
|
||||
<keyword type="function" name="ostree_raw_file_to_archive_z2_stream_with_options ()" link="ostree-Core-repository-independent-functions.html#ostree-raw-file-to-archive-z2-stream-with-options" since="2017.3"/>
|
||||
<keyword type="function" name="ostree_raw_file_to_content_stream ()" link="ostree-Core-repository-independent-functions.html#ostree-raw-file-to-content-stream"/>
|
||||
<keyword type="function" name="ostree_break_hardlink ()" link="ostree-Core-repository-independent-functions.html#ostree-break-hardlink" since="2017.15"/>
|
||||
|
|
@ -68,8 +68,8 @@
|
|||
<keyword type="function" name="ostree_validate_structureof_dirmeta ()" link="ostree-Core-repository-independent-functions.html#ostree-validate-structureof-dirmeta"/>
|
||||
<keyword type="function" name="ostree_commit_get_parent ()" link="ostree-Core-repository-independent-functions.html#ostree-commit-get-parent"/>
|
||||
<keyword type="function" name="ostree_commit_get_timestamp ()" link="ostree-Core-repository-independent-functions.html#ostree-commit-get-timestamp"/>
|
||||
<keyword type="function" name="ostree_commit_get_content_checksum ()" link="ostree-Core-repository-independent-functions.html#ostree-commit-get-content-checksum"/>
|
||||
<keyword type="function" name="ostree_check_version ()" link="ostree-Core-repository-independent-functions.html#ostree-check-version"/>
|
||||
<keyword type="function" name="ostree_commit_get_content_checksum ()" link="ostree-Core-repository-independent-functions.html#ostree-commit-get-content-checksum" since="2018.2"/>
|
||||
<keyword type="function" name="ostree_check_version ()" link="ostree-Core-repository-independent-functions.html#ostree-check-version" since="2017.4"/>
|
||||
<keyword type="macro" name="OSTREE_MAX_METADATA_SIZE" link="ostree-Core-repository-independent-functions.html#OSTREE-MAX-METADATA-SIZE:CAPS"/>
|
||||
<keyword type="macro" name="OSTREE_MAX_METADATA_WARN_SIZE" link="ostree-Core-repository-independent-functions.html#OSTREE-MAX-METADATA-WARN-SIZE:CAPS"/>
|
||||
<keyword type="enum" name="enum OstreeObjectType" link="ostree-Core-repository-independent-functions.html#OstreeObjectType"/>
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<keyword type="macro" name="OSTREE_SUMMARY_GVARIANT_STRING" link="ostree-Core-repository-independent-functions.html#OSTREE-SUMMARY-GVARIANT-STRING:CAPS"/>
|
||||
<keyword type="macro" name="OSTREE_SUMMARY_GVARIANT_FORMAT" link="ostree-Core-repository-independent-functions.html#OSTREE-SUMMARY-GVARIANT-FORMAT:CAPS"/>
|
||||
<keyword type="function" name="ostree_repo_mode_from_string ()" link="ostree-OstreeRepo.html#ostree-repo-mode-from-string"/>
|
||||
<keyword type="function" name="ostree_repo_open_at ()" link="ostree-OstreeRepo.html#ostree-repo-open-at"/>
|
||||
<keyword type="function" name="ostree_repo_open_at ()" link="ostree-OstreeRepo.html#ostree-repo-open-at" since="2017.10"/>
|
||||
<keyword type="function" name="ostree_repo_new ()" link="ostree-OstreeRepo.html#ostree-repo-new"/>
|
||||
<keyword type="function" name="ostree_repo_new_for_sysroot_path ()" link="ostree-OstreeRepo.html#ostree-repo-new-for-sysroot-path"/>
|
||||
<keyword type="function" name="ostree_repo_new_default ()" link="ostree-OstreeRepo.html#ostree-repo-new-default"/>
|
||||
|
|
@ -94,14 +94,14 @@
|
|||
<keyword type="function" name="ostree_repo_get_disable_fsync ()" link="ostree-OstreeRepo.html#ostree-repo-get-disable-fsync"/>
|
||||
<keyword type="function" name="ostree_repo_is_system ()" link="ostree-OstreeRepo.html#ostree-repo-is-system"/>
|
||||
<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" since="2017.10"/>
|
||||
<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_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" since="2018.9"/>
|
||||
<keyword type="function" name="ostree_repo_get_config ()" link="ostree-OstreeRepo.html#ostree-repo-get-config"/>
|
||||
<keyword type="function" name="ostree_repo_get_dfd ()" link="ostree-OstreeRepo.html#ostree-repo-get-dfd"/>
|
||||
<keyword type="function" name="ostree_repo_get_dfd ()" link="ostree-OstreeRepo.html#ostree-repo-get-dfd" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_repo_get_default_repo_finders ()" link="ostree-OstreeRepo.html#ostree-repo-get-default-repo-finders" since="2018.9"/>
|
||||
<keyword type="function" name="ostree_repo_hash ()" link="ostree-OstreeRepo.html#ostree-repo-hash" since="2017.12"/>
|
||||
<keyword type="function" name="ostree_repo_equal ()" link="ostree-OstreeRepo.html#ostree-repo-equal" since="2017.12"/>
|
||||
|
|
@ -115,11 +115,11 @@
|
|||
<keyword type="function" name="ostree_repo_remote_get_gpg_verify_summary ()" link="ostree-OstreeRepo.html#ostree-repo-remote-get-gpg-verify-summary"/>
|
||||
<keyword type="function" name="ostree_repo_remote_gpg_import ()" link="ostree-OstreeRepo.html#ostree-repo-remote-gpg-import"/>
|
||||
<keyword type="function" name="ostree_repo_remote_fetch_summary ()" link="ostree-OstreeRepo.html#ostree-repo-remote-fetch-summary"/>
|
||||
<keyword type="function" name="ostree_repo_remote_fetch_summary_with_options ()" link="ostree-OstreeRepo.html#ostree-repo-remote-fetch-summary-with-options"/>
|
||||
<keyword type="function" name="ostree_repo_reload_config ()" link="ostree-OstreeRepo.html#ostree-repo-reload-config"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_boolean_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-boolean-option"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_list_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-list-option"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-option"/>
|
||||
<keyword type="function" name="ostree_repo_remote_fetch_summary_with_options ()" link="ostree-OstreeRepo.html#ostree-repo-remote-fetch-summary-with-options" since="2016.6"/>
|
||||
<keyword type="function" name="ostree_repo_reload_config ()" link="ostree-OstreeRepo.html#ostree-repo-reload-config" since="2017.2"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_boolean_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-boolean-option" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_list_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-list-option" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_repo_get_remote_option ()" link="ostree-OstreeRepo.html#ostree-repo-get-remote-option" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_repo_get_parent ()" link="ostree-OstreeRepo.html#ostree-repo-get-parent"/>
|
||||
<keyword type="function" name="ostree_repo_write_config ()" link="ostree-OstreeRepo.html#ostree-repo-write-config"/>
|
||||
<keyword type="function" name="ostree_repo_scan_hardlinks ()" link="ostree-OstreeRepo.html#ostree-repo-scan-hardlinks"/>
|
||||
|
|
@ -129,8 +129,8 @@
|
|||
<keyword type="function" name="ostree_repo_transaction_set_refspec ()" link="ostree-OstreeRepo.html#ostree-repo-transaction-set-refspec"/>
|
||||
<keyword type="function" name="ostree_repo_transaction_set_ref ()" link="ostree-OstreeRepo.html#ostree-repo-transaction-set-ref"/>
|
||||
<keyword type="function" name="ostree_repo_set_ref_immediate ()" link="ostree-OstreeRepo.html#ostree-repo-set-ref-immediate"/>
|
||||
<keyword type="function" name="ostree_repo_set_alias_ref_immediate ()" link="ostree-OstreeRepo.html#ostree-repo-set-alias-ref-immediate"/>
|
||||
<keyword type="function" name="ostree_repo_set_cache_dir ()" link="ostree-OstreeRepo.html#ostree-repo-set-cache-dir"/>
|
||||
<keyword type="function" name="ostree_repo_set_alias_ref_immediate ()" link="ostree-OstreeRepo.html#ostree-repo-set-alias-ref-immediate" since="2017.10"/>
|
||||
<keyword type="function" name="ostree_repo_set_cache_dir ()" link="ostree-OstreeRepo.html#ostree-repo-set-cache-dir" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_repo_sign_delta ()" link="ostree-OstreeRepo.html#ostree-repo-sign-delta"/>
|
||||
<keyword type="function" name="ostree_repo_has_object ()" link="ostree-OstreeRepo.html#ostree-repo-has-object"/>
|
||||
<keyword type="function" name="ostree_repo_mark_commit_partial ()" link="ostree-OstreeRepo.html#ostree-repo-mark-commit-partial" since="2017.15"/>
|
||||
|
|
@ -144,9 +144,9 @@
|
|||
<keyword type="function" name="ostree_repo_write_content_async ()" link="ostree-OstreeRepo.html#ostree-repo-write-content-async"/>
|
||||
<keyword type="function" name="ostree_repo_write_content_finish ()" link="ostree-OstreeRepo.html#ostree-repo-write-content-finish"/>
|
||||
<keyword type="function" name="ostree_repo_resolve_rev ()" link="ostree-OstreeRepo.html#ostree-repo-resolve-rev"/>
|
||||
<keyword type="function" name="ostree_repo_resolve_rev_ext ()" link="ostree-OstreeRepo.html#ostree-repo-resolve-rev-ext"/>
|
||||
<keyword type="function" name="ostree_repo_resolve_rev_ext ()" link="ostree-OstreeRepo.html#ostree-repo-resolve-rev-ext" since="2016.7"/>
|
||||
<keyword type="function" name="ostree_repo_list_refs ()" link="ostree-OstreeRepo.html#ostree-repo-list-refs"/>
|
||||
<keyword type="function" name="ostree_repo_list_refs_ext ()" link="ostree-OstreeRepo.html#ostree-repo-list-refs-ext"/>
|
||||
<keyword type="function" name="ostree_repo_list_refs_ext ()" link="ostree-OstreeRepo.html#ostree-repo-list-refs-ext" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_repo_remote_list_refs ()" link="ostree-OstreeRepo.html#ostree-repo-remote-list-refs"/>
|
||||
<keyword type="function" name="ostree_repo_load_variant ()" link="ostree-OstreeRepo.html#ostree-repo-load-variant"/>
|
||||
<keyword type="function" name="ostree_repo_load_commit ()" link="ostree-OstreeRepo.html#ostree-repo-load-commit"/>
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
<keyword type="function" name="ostree_repo_load_object_stream ()" link="ostree-OstreeRepo.html#ostree-repo-load-object-stream"/>
|
||||
<keyword type="function" name="ostree_repo_query_object_storage_size ()" link="ostree-OstreeRepo.html#ostree-repo-query-object-storage-size"/>
|
||||
<keyword type="function" name="ostree_repo_import_object_from ()" link="ostree-OstreeRepo.html#ostree-repo-import-object-from"/>
|
||||
<keyword type="function" name="ostree_repo_import_object_from_with_trust ()" link="ostree-OstreeRepo.html#ostree-repo-import-object-from-with-trust"/>
|
||||
<keyword type="function" name="ostree_repo_import_object_from_with_trust ()" link="ostree-OstreeRepo.html#ostree-repo-import-object-from-with-trust" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_repo_import_archive_to_mtree ()" link="ostree-OstreeRepo.html#ostree-repo-import-archive-to-mtree"/>
|
||||
<keyword type="function" name="ostree_repo_export_tree_to_archive ()" link="ostree-OstreeRepo.html#ostree-repo-export-tree-to-archive"/>
|
||||
<keyword type="function" name="ostree_repo_delete_object ()" link="ostree-OstreeRepo.html#ostree-repo-delete-object"/>
|
||||
|
|
@ -175,15 +175,16 @@
|
|||
<keyword type="function" name="ostree_repo_write_directory_to_mtree ()" link="ostree-OstreeRepo.html#ostree-repo-write-directory-to-mtree"/>
|
||||
<keyword type="function" name="ostree_repo_write_dfd_to_mtree ()" link="ostree-OstreeRepo.html#ostree-repo-write-dfd-to-mtree"/>
|
||||
<keyword type="function" name="ostree_repo_write_archive_to_mtree ()" link="ostree-OstreeRepo.html#ostree-repo-write-archive-to-mtree"/>
|
||||
<keyword type="function" name="ostree_repo_write_archive_to_mtree_from_fd ()" link="ostree-OstreeRepo.html#ostree-repo-write-archive-to-mtree-from-fd"/>
|
||||
<keyword type="function" name="ostree_repo_write_mtree ()" link="ostree-OstreeRepo.html#ostree-repo-write-mtree"/>
|
||||
<keyword type="function" name="ostree_repo_write_commit ()" link="ostree-OstreeRepo.html#ostree-repo-write-commit"/>
|
||||
<keyword type="function" name="ostree_repo_write_commit_with_time ()" link="ostree-OstreeRepo.html#ostree-repo-write-commit-with-time"/>
|
||||
<keyword type="function" name="ostree_repo_read_commit_detached_metadata ()" link="ostree-OstreeRepo.html#ostree-repo-read-commit-detached-metadata"/>
|
||||
<keyword type="function" name="ostree_repo_write_commit_detached_metadata ()" link="ostree-OstreeRepo.html#ostree-repo-write-commit-detached-metadata"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_at_options_set_devino ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-at-options-set-devino"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_at_options_set_devino ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-at-options-set-devino" since="2017.13"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_tree ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-tree"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_tree_at ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-tree-at" deprecated=""/>
|
||||
<keyword type="function" name="ostree_repo_checkout_at ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-at"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_at ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-at" since="2016.8"/>
|
||||
<keyword type="function" name="ostree_repo_checkout_gc ()" link="ostree-OstreeRepo.html#ostree-repo-checkout-gc"/>
|
||||
<keyword type="function" name="ostree_repo_read_commit ()" link="ostree-OstreeRepo.html#ostree-repo-read-commit"/>
|
||||
<keyword type="function" name="ostree_repo_list_objects ()" link="ostree-OstreeRepo.html#ostree-repo-list-objects"/>
|
||||
|
|
@ -207,7 +208,7 @@
|
|||
<keyword type="function" name="ostree_repo_prune ()" link="ostree-OstreeRepo.html#ostree-repo-prune"/>
|
||||
<keyword type="function" name="ostree_repo_prune_static_deltas ()" link="ostree-OstreeRepo.html#ostree-repo-prune-static-deltas"/>
|
||||
<keyword type="function" name="ostree_repo_traverse_reachable_refs ()" link="ostree-OstreeRepo.html#ostree-repo-traverse-reachable-refs" since="2018.6"/>
|
||||
<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" since="2017.1"/>
|
||||
<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_with_options ()" link="ostree-OstreeRepo.html#ostree-repo-pull-with-options" since="2019.2"/>
|
||||
|
|
@ -215,10 +216,10 @@
|
|||
<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_add_gpg_signature_summary ()" link="ostree-OstreeRepo.html#ostree-repo-add-gpg-signature-summary"/>
|
||||
<keyword type="function" name="ostree_repo_gpg_verify_data ()" link="ostree-OstreeRepo.html#ostree-repo-gpg-verify-data"/>
|
||||
<keyword type="function" name="ostree_repo_gpg_verify_data ()" link="ostree-OstreeRepo.html#ostree-repo-gpg-verify-data" since="2016.6"/>
|
||||
<keyword type="function" name="ostree_repo_verify_commit ()" link="ostree-OstreeRepo.html#ostree-repo-verify-commit"/>
|
||||
<keyword type="function" name="ostree_repo_verify_commit_ext ()" link="ostree-OstreeRepo.html#ostree-repo-verify-commit-ext"/>
|
||||
<keyword type="function" name="ostree_repo_verify_commit_for_remote ()" link="ostree-OstreeRepo.html#ostree-repo-verify-commit-for-remote"/>
|
||||
<keyword type="function" name="ostree_repo_verify_commit_for_remote ()" link="ostree-OstreeRepo.html#ostree-repo-verify-commit-for-remote" since="2016.14"/>
|
||||
<keyword type="function" name="ostree_repo_verify_summary ()" link="ostree-OstreeRepo.html#ostree-repo-verify-summary"/>
|
||||
<keyword type="function" name="ostree_repo_regenerate_summary ()" link="ostree-OstreeRepo.html#ostree-repo-regenerate-summary"/>
|
||||
<keyword type="typedef" name="OstreeRepo" link="ostree-OstreeRepo.html#OstreeRepo"/>
|
||||
|
|
@ -242,27 +243,27 @@
|
|||
<keyword type="enum" name="enum OstreeRepoPruneFlags" link="ostree-OstreeRepo.html#OstreeRepoPruneFlags"/>
|
||||
<keyword type="enum" name="enum OstreeRepoPullFlags" link="ostree-OstreeRepo.html#OstreeRepoPullFlags"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_new ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_new_from_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-checksum"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_new_from_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-checksum" since="2018.7"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_check_error ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-check-error" since="2018.7"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_set_metadata_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-metadata-checksum"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_get_metadata_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-metadata-checksum"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_set_contents_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-contents-checksum"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_get_contents_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-contents-checksum"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_replace_file ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-replace-file"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_remove ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-remove"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_remove ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-remove" since="2018.9"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_ensure_dir ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-dir"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_lookup ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-lookup"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_ensure_parent_dirs ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-parent-dirs"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_walk ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-walk"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_get_subdirs ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-subdirs"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_get_files ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-files"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_fill_empty_from_dirtree ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-fill-empty-from-dirtree"/>
|
||||
<keyword type="function" name="ostree_mutable_tree_fill_empty_from_dirtree ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-fill-empty-from-dirtree" since="2018.7"/>
|
||||
<keyword type="typedef" name="OstreeMutableTree" link="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree"/>
|
||||
<keyword type="function" name="ostree_sysroot_new ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-new"/>
|
||||
<keyword type="function" name="ostree_sysroot_new_default ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-new-default"/>
|
||||
<keyword type="function" name="ostree_sysroot_get_path ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-get-path"/>
|
||||
<keyword type="function" name="ostree_sysroot_load ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-load"/>
|
||||
<keyword type="function" name="ostree_sysroot_load_if_changed ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-load-if-changed"/>
|
||||
<keyword type="function" name="ostree_sysroot_load_if_changed ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-load-if-changed" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_sysroot_lock ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-lock"/>
|
||||
<keyword type="function" name="ostree_sysroot_try_lock ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-try-lock"/>
|
||||
<keyword type="function" name="ostree_sysroot_lock_async ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-lock-async"/>
|
||||
|
|
@ -281,18 +282,18 @@
|
|||
<keyword type="function" name="ostree_sysroot_cleanup ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-cleanup"/>
|
||||
<keyword type="function" name="ostree_sysroot_prepare_cleanup ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-prepare-cleanup"/>
|
||||
<keyword type="function" name="ostree_sysroot_cleanup_prune_repo ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-cleanup-prune-repo" since="2018.6"/>
|
||||
<keyword type="function" name="ostree_sysroot_repo ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-repo"/>
|
||||
<keyword type="function" name="ostree_sysroot_repo ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-repo" since="2017.7"/>
|
||||
<keyword type="function" name="ostree_sysroot_get_repo ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-get-repo"/>
|
||||
<keyword type="function" name="ostree_sysroot_get_staged_deployment ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-get-staged-deployment"/>
|
||||
<keyword type="function" name="ostree_sysroot_init_osname ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-init-osname"/>
|
||||
<keyword type="function" name="ostree_sysroot_get_staged_deployment ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-get-staged-deployment" since="2018.5"/>
|
||||
<keyword type="function" name="ostree_sysroot_init_osname ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-init-osname" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_sysroot_deployment_set_kargs ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-kargs"/>
|
||||
<keyword type="function" name="ostree_sysroot_deployment_set_mutable ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-mutable"/>
|
||||
<keyword type="function" name="ostree_sysroot_deployment_unlock ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-unlock"/>
|
||||
<keyword type="function" name="ostree_sysroot_deployment_unlock ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-unlock" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_sysroot_deployment_set_pinned ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-pinned" since="2018.3"/>
|
||||
<keyword type="function" name="ostree_sysroot_write_deployments ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments"/>
|
||||
<keyword type="function" name="ostree_sysroot_write_deployments_with_options ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments-with-options"/>
|
||||
<keyword type="function" name="ostree_sysroot_write_deployments_with_options ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-write-deployments-with-options" since="2017.4"/>
|
||||
<keyword type="function" name="ostree_sysroot_write_origin_file ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-write-origin-file"/>
|
||||
<keyword type="function" name="ostree_sysroot_stage_tree ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-stage-tree"/>
|
||||
<keyword type="function" name="ostree_sysroot_stage_tree ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-stage-tree" since="2018.5"/>
|
||||
<keyword type="function" name="ostree_sysroot_deploy_tree ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-deploy-tree"/>
|
||||
<keyword type="function" name="ostree_sysroot_get_merge_deployment ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-get-merge-deployment"/>
|
||||
<keyword type="function" name="ostree_sysroot_query_deployments_for ()" link="ostree-Root-partition-mount-point.html#ostree-sysroot-query-deployments-for" since="2017.7"/>
|
||||
|
|
@ -315,11 +316,11 @@
|
|||
<keyword type="function" name="ostree_async_progress_finish ()" link="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-finish"/>
|
||||
<keyword type="typedef" name="OstreeAsyncProgress" link="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress"/>
|
||||
<keyword type="function" name="ostree_sepolicy_new ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-new"/>
|
||||
<keyword type="function" name="ostree_sepolicy_new_at ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-new-at"/>
|
||||
<keyword type="function" name="ostree_sepolicy_new_at ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-new-at" since="2017.4"/>
|
||||
<keyword type="function" name="ostree_sepolicy_get_path ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-get-path"/>
|
||||
<keyword type="function" name="ostree_sepolicy_get_name ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-get-name"/>
|
||||
<keyword type="function" name="ostree_sepolicy_get_label ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-get-label"/>
|
||||
<keyword type="function" name="ostree_sepolicy_get_csum ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-get-csum"/>
|
||||
<keyword type="function" name="ostree_sepolicy_get_csum ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-get-csum" since="2016.5"/>
|
||||
<keyword type="function" name="ostree_sepolicy_restorecon ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-restorecon"/>
|
||||
<keyword type="function" name="ostree_sepolicy_setfscreatecon ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon"/>
|
||||
<keyword type="function" name="ostree_sepolicy_fscreatecon_cleanup ()" link="ostree-SELinux-policy-management.html#ostree-sepolicy-fscreatecon-cleanup"/>
|
||||
|
|
@ -346,7 +347,7 @@
|
|||
<keyword type="function" name="ostree_gpg_verify_result_get_all ()" link="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all"/>
|
||||
<keyword type="function" name="ostree_gpg_verify_result_describe ()" link="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe"/>
|
||||
<keyword type="function" name="ostree_gpg_verify_result_describe_variant ()" link="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe-variant"/>
|
||||
<keyword type="function" name="ostree_gpg_verify_result_require_valid_signature ()" link="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-require-valid-signature"/>
|
||||
<keyword type="function" name="ostree_gpg_verify_result_require_valid_signature ()" link="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-require-valid-signature" since="2016.6"/>
|
||||
<keyword type="enum" name="enum OstreeGpgError" link="ostree-GPG-signature-verification-results.html#OstreeGpgError" since="2017.10"/>
|
||||
<keyword type="typedef" name="OstreeGpgVerifyResult" link="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult"/>
|
||||
<keyword type="enum" name="enum OstreeGpgSignatureAttr" link="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr"/>
|
||||
|
|
@ -376,7 +377,7 @@
|
|||
<keyword type="function" name="ostree_deployment_get_bootconfig ()" link="ostree-ostree-deployment.html#ostree-deployment-get-bootconfig"/>
|
||||
<keyword type="function" name="ostree_deployment_get_origin ()" link="ostree-ostree-deployment.html#ostree-deployment-get-origin"/>
|
||||
<keyword type="function" name="ostree_deployment_get_origin_relpath ()" link="ostree-ostree-deployment.html#ostree-deployment-get-origin-relpath"/>
|
||||
<keyword type="function" name="ostree_deployment_get_unlocked ()" link="ostree-ostree-deployment.html#ostree-deployment-get-unlocked"/>
|
||||
<keyword type="function" name="ostree_deployment_get_unlocked ()" link="ostree-ostree-deployment.html#ostree-deployment-get-unlocked" since="2016.4"/>
|
||||
<keyword type="function" name="ostree_deployment_is_pinned ()" link="ostree-ostree-deployment.html#ostree-deployment-is-pinned" since="2018.3"/>
|
||||
<keyword type="function" name="ostree_deployment_is_staged ()" link="ostree-ostree-deployment.html#ostree-deployment-is-staged" since="2018.3"/>
|
||||
<keyword type="function" name="ostree_deployment_set_index ()" link="ostree-ostree-deployment.html#ostree-deployment-set-index"/>
|
||||
|
|
@ -385,12 +386,12 @@
|
|||
<keyword type="function" name="ostree_deployment_set_origin ()" link="ostree-ostree-deployment.html#ostree-deployment-set-origin"/>
|
||||
<keyword type="function" name="ostree_deployment_origin_remove_transient_state ()" link="ostree-ostree-deployment.html#ostree-deployment-origin-remove-transient-state" since="2018.3"/>
|
||||
<keyword type="function" name="ostree_deployment_clone ()" link="ostree-ostree-deployment.html#ostree-deployment-clone"/>
|
||||
<keyword type="function" name="ostree_deployment_unlocked_state_to_string ()" link="ostree-ostree-deployment.html#ostree-deployment-unlocked-state-to-string"/>
|
||||
<keyword type="function" name="ostree_deployment_unlocked_state_to_string ()" link="ostree-ostree-deployment.html#ostree-deployment-unlocked-state-to-string" since="2016.4"/>
|
||||
<keyword type="struct" name="OstreeDeployment" link="ostree-ostree-deployment.html#OstreeDeployment"/>
|
||||
<keyword type="function" name="ostree_diff_item_ref ()" link="ostree-ostree-diff.html#ostree-diff-item-ref"/>
|
||||
<keyword type="function" name="ostree_diff_item_unref ()" link="ostree-ostree-diff.html#ostree-diff-item-unref"/>
|
||||
<keyword type="function" name="ostree_diff_dirs ()" link="ostree-ostree-diff.html#ostree-diff-dirs"/>
|
||||
<keyword type="function" name="ostree_diff_dirs_with_options ()" link="ostree-ostree-diff.html#ostree-diff-dirs-with-options"/>
|
||||
<keyword type="function" name="ostree_diff_dirs_with_options ()" link="ostree-ostree-diff.html#ostree-diff-dirs-with-options" since="2017.4"/>
|
||||
<keyword type="function" name="ostree_diff_print ()" link="ostree-ostree-diff.html#ostree-diff-print"/>
|
||||
<keyword type="enum" name="enum OstreeDiffFlags" link="ostree-ostree-diff.html#OstreeDiffFlags"/>
|
||||
<keyword type="struct" name="struct OstreeDiffItem" link="ostree-ostree-diff.html#OstreeDiffItem"/>
|
||||
|
|
@ -497,6 +498,8 @@
|
|||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_ATTR_USER_NAME" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-ATTR-USER-NAME:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-ATTR-USER-EMAIL:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-ATTR-FINGERPRINT-PRIMARY:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP-PRIMARY:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT" link="ostree-GPG-signature-verification-results.html#OSTREE-GPG-SIGNATURE-FORMAT-DEFAULT:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_DIFF_FLAGS_NONE" link="ostree-ostree-diff.html#OSTREE-DIFF-FLAGS-NONE:CAPS"/>
|
||||
<keyword type="constant" name="OSTREE_DIFF_FLAGS_IGNORE_XATTRS" link="ostree-ostree-diff.html#OSTREE-DIFF-FLAGS-IGNORE-XATTRS:CAPS"/>
|
||||
|
|
|
|||
|
|
@ -525,6 +525,83 @@ ostree_collection_ref_new, function in ostree-ref
|
|||
<a class="link" href="ostree-Core-repository-independent-functions.html#ostree-hash-object-name" title="ostree_hash_object_name ()">ostree_hash_object_name</a>, function in <a class="link" href="ostree-Core-repository-independent-functions.html" title="Core repository-independent functions">Core repository-independent functions</a>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<a name="idxK"></a><h3 class="title">K</h3>
|
||||
<dt>
|
||||
OstreeKernelArgs, struct in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_append, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_append_argv, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_append_argv_filtered, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_append_proc_cmdline, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_cleanup, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_delete, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_delete_key_entry, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_free, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_from_string, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_get_last_value, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_new, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_new_replace, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_parse_append, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_replace, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_replace_argv, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_replace_take, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_to_string, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
ostree_kernel_args_to_strv, function in ostree-kernel-args
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<a name="idxM"></a><h3 class="title">M</h3>
|
||||
<dt>
|
||||
<a class="link" href="ostree-Core-repository-independent-functions.html#OSTREE-MAX-METADATA-SIZE:CAPS" title="OSTREE_MAX_METADATA_SIZE">OSTREE_MAX_METADATA_SIZE</a>, macro in <a class="link" href="ostree-Core-repository-independent-functions.html" title="Core repository-independent functions">Core repository-independent functions</a>
|
||||
|
|
@ -1414,6 +1491,10 @@ ostree_repo_transaction_set_collection_ref, function in ostree-misc-experimental
|
|||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-write-archive-to-mtree-from-fd" title="ostree_repo_write_archive_to_mtree_from_fd ()">ostree_repo_write_archive_to_mtree_from_fd</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-write-commit" title="ostree_repo_write_commit ()">ostree_repo_write_commit</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ ostree_repo_devino_cache_get_type
|
|||
ostree_repo_write_directory_to_mtree
|
||||
ostree_repo_write_dfd_to_mtree
|
||||
ostree_repo_write_archive_to_mtree
|
||||
ostree_repo_write_archive_to_mtree_from_fd
|
||||
ostree_repo_write_mtree
|
||||
ostree_repo_write_commit
|
||||
ostree_repo_write_commit_with_time
|
||||
|
|
@ -668,3 +669,26 @@ ostree_repo_set_collection_ref_immediate
|
|||
ostree_repo_transaction_set_collection_ref
|
||||
ostree_repo_resolve_collection_ref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ostree-kernel-args</FILE>
|
||||
OstreeKernelArgs
|
||||
ostree_kernel_args_free
|
||||
ostree_kernel_args_new
|
||||
ostree_kernel_args_cleanup
|
||||
ostree_kernel_args_replace_take
|
||||
ostree_kernel_args_replace
|
||||
ostree_kernel_args_replace_argv
|
||||
ostree_kernel_args_append
|
||||
ostree_kernel_args_append_argv
|
||||
ostree_kernel_args_append_argv_filtered
|
||||
ostree_kernel_args_new_replace
|
||||
ostree_kernel_args_delete
|
||||
ostree_kernel_args_delete_key_entry
|
||||
ostree_kernel_args_append_proc_cmdline
|
||||
ostree_kernel_args_parse_append
|
||||
ostree_kernel_args_get_last_value
|
||||
ostree_kernel_args_from_string
|
||||
ostree_kernel_args_to_strv
|
||||
ostree_kernel_args_to_string
|
||||
</SECTION>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2019.2
|
||||
2019.3
|
||||
|
|
@ -952,6 +952,7 @@ _ostree_refs() {
|
|||
--collections -c
|
||||
--delete
|
||||
--list
|
||||
--force
|
||||
"
|
||||
|
||||
local options_with_args="
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@
|
|||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to disable internal GPGME support */
|
||||
#undef OSTREE_DISABLE_GPGME
|
||||
|
||||
/* Define if experimental API should be enabled */
|
||||
#undef OSTREE_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for libostree 2019.2.
|
||||
# Generated by GNU Autoconf 2.69 for libostree 2019.3.
|
||||
#
|
||||
# Report bugs to <walters@verbum.org>.
|
||||
#
|
||||
|
|
@ -590,8 +590,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='libostree'
|
||||
PACKAGE_TARNAME='libostree'
|
||||
PACKAGE_VERSION='2019.2'
|
||||
PACKAGE_STRING='libostree 2019.2'
|
||||
PACKAGE_VERSION='2019.3'
|
||||
PACKAGE_STRING='libostree 2019.3'
|
||||
PACKAGE_BUGREPORT='walters@verbum.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
|
@ -721,6 +721,8 @@ GTKDOC_MKPDF
|
|||
GTKDOC_REBASE
|
||||
GTKDOC_CHECK_PATH
|
||||
GTKDOC_CHECK
|
||||
USE_GPGME_FALSE
|
||||
USE_GPGME_TRUE
|
||||
GPG_ERROR_CONFIG
|
||||
OT_DEP_GPG_ERROR_LIBS
|
||||
OT_DEP_GPG_ERROR_CFLAGS
|
||||
|
|
@ -933,6 +935,7 @@ with_soup
|
|||
enable_libsoup_client_certs
|
||||
enable_trivial_httpd_cmdline
|
||||
enable_introspection
|
||||
with_gpgme
|
||||
with_gpgme_prefix
|
||||
with_html_dir
|
||||
enable_gtk_doc
|
||||
|
|
@ -1553,7 +1556,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libostree 2019.2 to adapt to many kinds of systems.
|
||||
\`configure' configures libostree 2019.3 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
|
@ -1623,7 +1626,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libostree 2019.2:";;
|
||||
short | recursive ) echo "Configuration of libostree 2019.3:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
|
@ -1689,6 +1692,7 @@ Optional Packages:
|
|||
compiler's sysroot if not specified).
|
||||
--with-curl Use libcurl [default=no]
|
||||
--with-soup Use libsoup [default=yes]
|
||||
--with-gpgme Use gpgme [default=yes]
|
||||
--with-gpgme-prefix=PFX prefix where GPGME is installed (optional)
|
||||
--with-html-dir=PATH path to installed docs
|
||||
--without-libarchive Do not use libarchive
|
||||
|
|
@ -1881,7 +1885,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libostree configure 2019.2
|
||||
libostree configure 2019.3
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
|
@ -2353,7 +2357,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libostree $as_me 2019.2, which was
|
||||
It was created by libostree $as_me 2019.3, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
|
@ -3221,7 +3225,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libostree'
|
||||
VERSION='2019.2'
|
||||
VERSION='2019.3'
|
||||
|
||||
|
||||
# Some tools Automake needs.
|
||||
|
|
@ -5955,9 +5959,9 @@ test -n "$YACC" || YACC="yacc"
|
|||
|
||||
YEAR_VERSION=2019
|
||||
|
||||
RELEASE_VERSION=2
|
||||
RELEASE_VERSION=3
|
||||
|
||||
PACKAGE_VERSION=2019.2
|
||||
PACKAGE_VERSION=2019.3
|
||||
|
||||
|
||||
if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then :
|
||||
|
|
@ -15531,6 +15535,13 @@ fi
|
|||
|
||||
LIBGPGME_DEPENDENCY="1.1.8"
|
||||
|
||||
# Check whether --with-gpgme was given.
|
||||
if test "${with_gpgme+set}" = set; then :
|
||||
withval=$with_gpgme;
|
||||
else
|
||||
with_gpgme=yes
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-gpgme-prefix was given.
|
||||
if test "${with_gpgme_prefix+set}" = set; then :
|
||||
|
|
@ -15611,6 +15622,8 @@ fi
|
|||
gpgme_version_micro=`echo $gpgme_version | \
|
||||
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
|
||||
|
||||
if test x$with_gpgme != xno; then :
|
||||
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPGME" >&5
|
||||
|
|
@ -15866,12 +15879,12 @@ else
|
|||
$as_echo "yes" >&6; }
|
||||
have_gpgme=yes
|
||||
fi
|
||||
if test x$have_gpgme = xno ; then :
|
||||
if test x$have_gpgme = xno ; then :
|
||||
|
||||
as_fn_error $? "Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later" "$LINENO" 5
|
||||
|
||||
fi
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES gpgme"
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES gpgme"
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OT_DEP_GPG_ERROR" >&5
|
||||
|
|
@ -16031,8 +16044,26 @@ else
|
|||
$as_echo "yes" >&6; }
|
||||
|
||||
fi
|
||||
OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}"
|
||||
OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}"
|
||||
OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}"
|
||||
OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}"
|
||||
|
||||
else
|
||||
|
||||
|
||||
$as_echo "#define OSTREE_DISABLE_GPGME 1" >>confdefs.h
|
||||
|
||||
with_gpgme=no
|
||||
|
||||
|
||||
fi
|
||||
if test "x$have_gpgme" = xyes; then
|
||||
USE_GPGME_TRUE=
|
||||
USE_GPGME_FALSE='#'
|
||||
else
|
||||
USE_GPGME_TRUE='#'
|
||||
USE_GPGME_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
|
||||
# What's in RHEL7.2.
|
||||
|
|
@ -18095,6 +18126,9 @@ OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type"
|
|||
# P2P API is public in OSTree >= 2018.6
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES p2p"
|
||||
|
||||
# Strip leading whitespace
|
||||
OSTREE_FEATURES=$(echo ${OSTREE_FEATURES})
|
||||
|
||||
ac_config_files="$ac_config_files Makefile apidoc/Makefile src/libostree/ostree-1.pc src/libostree/ostree-version.h"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
|
|
@ -18286,6 +18320,10 @@ if test -z "${BUILDOPT_INTROSPECTION_TRUE}" && test -z "${BUILDOPT_INTROSPECTION
|
|||
as_fn_error $? "conditional \"BUILDOPT_INTROSPECTION\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${USE_GPGME_TRUE}" && test -z "${USE_GPGME_FALSE}"; then
|
||||
as_fn_error $? "conditional \"USE_GPGME\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then
|
||||
as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
|
@ -18795,7 +18833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libostree $as_me 2019.2, which was
|
||||
This file was extended by libostree $as_me 2019.3, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
|
@ -18861,7 +18899,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
libostree config.status 2019.2
|
||||
libostree config.status 2019.3
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
|||
35
configure.ac
35
configure.ac
|
|
@ -4,7 +4,7 @@ dnl update libostree-released.sym from libostree-devel.sym, and update the check
|
|||
dnl in test-symbols.sh, and also set is_release_build=yes below. Then make
|
||||
dnl another post-release commit to bump the version, and set is_release_build=no.
|
||||
m4_define([year_version], [2019])
|
||||
m4_define([release_version], [2])
|
||||
m4_define([release_version], [3])
|
||||
m4_define([package_version], [year_version.release_version])
|
||||
AC_INIT([libostree], [package_version], [walters@verbum.org])
|
||||
is_release_build=yes
|
||||
|
|
@ -210,25 +210,35 @@ m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
|
|||
AM_CONDITIONAL(BUILDOPT_INTROSPECTION, test "x$found_introspection" = xyes)
|
||||
|
||||
LIBGPGME_DEPENDENCY="1.1.8"
|
||||
|
||||
PKG_CHECK_MODULES(OT_DEP_GPGME, gpgme-pthread >= $LIBGPGME_DEPENDENCY, have_gpgme=yes, [
|
||||
AC_ARG_WITH(gpgme,
|
||||
AS_HELP_STRING([--with-gpgme], [Use gpgme @<:@default=yes@:>@]),
|
||||
[], [with_gpgme=yes])
|
||||
AS_IF([test x$with_gpgme != xno], [
|
||||
PKG_CHECK_MODULES(OT_DEP_GPGME, gpgme-pthread >= $LIBGPGME_DEPENDENCY, have_gpgme=yes, [
|
||||
m4_ifdef([AM_PATH_GPGME_PTHREAD], [
|
||||
AM_PATH_GPGME_PTHREAD($LIBGPGME_DEPENDENCY, have_gpgme=yes, have_gpgme=no)
|
||||
],[ have_gpgme=no ])
|
||||
])
|
||||
AS_IF([ test x$have_gpgme = xno ], [
|
||||
])
|
||||
AS_IF([ test x$have_gpgme = xno ], [
|
||||
AC_MSG_ERROR([Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later])
|
||||
])
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES gpgme"
|
||||
PKG_CHECK_MODULES(OT_DEP_GPG_ERROR, [gpg-error], [], [
|
||||
])
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES gpgme"
|
||||
PKG_CHECK_MODULES(OT_DEP_GPG_ERROR, [gpg-error], [], [
|
||||
dnl This apparently doesn't ship a pkg-config file either, and we need
|
||||
dnl to link to it directly.
|
||||
AC_PATH_PROG(GPG_ERROR_CONFIG, [gpg-error-config], [AC_MSG_ERROR([Missing gpg-error-config])])
|
||||
OT_DEP_GPG_ERROR_CFLAGS="$( $GPG_ERROR_CONFIG --cflags )"
|
||||
OT_DEP_GPG_ERROR_LIBS="$( $GPG_ERROR_CONFIG --libs )"
|
||||
])
|
||||
OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}"
|
||||
OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}"
|
||||
])
|
||||
OT_DEP_GPGME_CFLAGS="${OT_DEP_GPGME_CFLAGS} ${OT_DEP_GPG_ERROR_CFLAGS}"
|
||||
OT_DEP_GPGME_LIBS="${OT_DEP_GPGME_LIBS} ${OT_DEP_GPG_ERROR_LIBS}"
|
||||
],
|
||||
[
|
||||
AC_DEFINE([OSTREE_DISABLE_GPGME], 1, [Define to disable internal GPGME support])
|
||||
with_gpgme=no
|
||||
]
|
||||
)
|
||||
AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes)
|
||||
|
||||
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
|
||||
# What's in RHEL7.2.
|
||||
|
|
@ -584,6 +594,9 @@ OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type"
|
|||
# P2P API is public in OSTree >= 2018.6
|
||||
OSTREE_FEATURES="$OSTREE_FEATURES p2p"
|
||||
|
||||
# Strip leading whitespace
|
||||
OSTREE_FEATURES=$(echo ${OSTREE_FEATURES})
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
apidoc/Makefile
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ Boston, MA 02111-1307, USA.
|
|||
<term><option>--tree</option>="dir=PATH" or "tar=TARFILE" or "ref=COMMIT"</term>
|
||||
|
||||
<listitem><para>
|
||||
Overlay the given argument as a tree.
|
||||
Overlay the given argument as a tree. When committing an archive, the TARFILE can be specified as <literal>-</literal> to read the archive from standard input.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,16 @@ Boston, MA 02111-1307, USA.
|
|||
PREFIX are deleted.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--force</option></term>
|
||||
|
||||
<listitem><para>
|
||||
When creating <literal>NEWREF</literal> with
|
||||
<option>--create</option>, allow an existing ref to be
|
||||
updated instead of erroring.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
***/
|
||||
|
||||
/* Add new symbols here. Release commits should copy this section into -released.sym. */
|
||||
LIBOSTREE_2019.3 {
|
||||
} LIBOSTREE_2018.9;
|
||||
|
||||
/* Stub section for the stable release *after* this development one; don't
|
||||
* edit this other than to update the year. This is just a copy/paste
|
||||
|
|
|
|||
|
|
@ -548,6 +548,28 @@ LIBOSTREE_2019.2 {
|
|||
ostree_repo_get_bootloader;
|
||||
} LIBOSTREE_2018.9;
|
||||
|
||||
LIBOSTREE_2019.3 {
|
||||
global:
|
||||
ostree_repo_write_archive_to_mtree_from_fd;
|
||||
ostree_kernel_args_free;
|
||||
ostree_kernel_args_new;
|
||||
ostree_kernel_args_cleanup;
|
||||
ostree_kernel_args_replace_take;
|
||||
ostree_kernel_args_replace;
|
||||
ostree_kernel_args_replace_argv;
|
||||
ostree_kernel_args_append;
|
||||
ostree_kernel_args_append_argv;
|
||||
ostree_kernel_args_append_argv_filtered;
|
||||
ostree_kernel_args_new_replace;
|
||||
ostree_kernel_args_delete;
|
||||
ostree_kernel_args_delete_key_entry;
|
||||
ostree_kernel_args_append_proc_cmdline;
|
||||
ostree_kernel_args_parse_append;
|
||||
ostree_kernel_args_get_last_value;
|
||||
ostree_kernel_args_from_string;
|
||||
ostree_kernel_args_to_strv;
|
||||
ostree_kernel_args_to_string;
|
||||
} LIBOSTREE_2018.9;
|
||||
|
||||
/* NOTE: Only add more content here in release commits! See the
|
||||
* comments at the top of this file.
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeAsyncProgress, g_object_unref)
|
|||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeBootconfigParser, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeDeployment, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeGpgVerifyResult, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeKernelArgs, ostree_kernel_args_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeMutableTree, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepo, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFile, g_object_unref)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ append_system_uenv (OstreeBootloaderUboot *self,
|
|||
const char *uenv_path = NULL;
|
||||
const char *ostree_arg = NULL;
|
||||
|
||||
kargs = _ostree_kernel_args_from_string (bootargs);
|
||||
ostree_arg = _ostree_kernel_args_get_last_value (kargs, "ostree");
|
||||
kargs = ostree_kernel_args_from_string (bootargs);
|
||||
ostree_arg = ostree_kernel_args_get_last_value (kargs, "ostree");
|
||||
if (!ostree_arg)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
|
|
|
|||
|
|
@ -190,9 +190,11 @@ _ostree_repo_mode_is_bare (OstreeRepoMode mode)
|
|||
mode == OSTREE_REPO_MODE_BARE_USER_ONLY;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
GVariant *
|
||||
_ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata,
|
||||
GBytes *signature_bytes);
|
||||
#endif
|
||||
|
||||
GFile *
|
||||
_ostree_get_default_sysroot_path (void);
|
||||
|
|
|
|||
|
|
@ -485,6 +485,8 @@ _ostree_raw_file_to_archive_stream (GInputStream *input,
|
|||
*
|
||||
* Convert from a "bare" file representation into an
|
||||
* OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.
|
||||
*
|
||||
* Since: 2016.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_raw_file_to_archive_z2_stream (GInputStream *input,
|
||||
|
|
@ -1472,6 +1474,8 @@ ostree_checksum_to_bytes_v (const char *checksum)
|
|||
* @checksum: An ASCII checksum
|
||||
*
|
||||
* Returns: (transfer full) (array fixed-size=32): Binary version of @checksum.
|
||||
*
|
||||
* Since: 2016.8
|
||||
*/
|
||||
guchar *
|
||||
ostree_checksum_b64_to_bytes (const char *checksum)
|
||||
|
|
@ -1571,6 +1575,8 @@ ostree_checksum_from_bytes_v (GVariant *csum_v)
|
|||
*
|
||||
* The "modified" term refers to the fact that instead of '/', the '_'
|
||||
* character is used.
|
||||
*
|
||||
* Since: 2016.8
|
||||
*/
|
||||
char *
|
||||
ostree_checksum_b64_from_bytes (const guchar *csum)
|
||||
|
|
@ -2395,6 +2401,8 @@ ostree_commit_get_timestamp (GVariant *commit_variant)
|
|||
* root "dirmeta" checksum (both in binary form, not hexadecimal).
|
||||
*
|
||||
* Returns: (nullable): A SHA-256 hex string, or %NULL if @commit_variant is not well-formed
|
||||
*
|
||||
* Since: 2018.2
|
||||
*/
|
||||
gchar *
|
||||
ostree_commit_get_content_checksum (GVariant *commit_variant)
|
||||
|
|
@ -2454,6 +2462,7 @@ _ostree_compare_timestamps (const char *current_rev,
|
|||
}
|
||||
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
GVariant *
|
||||
_ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata,
|
||||
GBytes *signature_bytes)
|
||||
|
|
@ -2479,6 +2488,7 @@ _ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata,
|
|||
|
||||
return g_variant_dict_end (&metadata_dict);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
/**
|
||||
* _ostree_get_default_sysroot_path:
|
||||
|
|
@ -2513,6 +2523,8 @@ _ostree_get_default_sysroot_path (void)
|
|||
* @required_release: Release version required
|
||||
*
|
||||
* Returns: %TRUE if current libostree has at least the requested version, %FALSE otherwise
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_check_version (guint required_year, guint required_release)
|
||||
|
|
|
|||
|
|
@ -302,6 +302,11 @@ ostree_deployment_get_origin_relpath (OstreeDeployment *self)
|
|||
ostree_deployment_get_deployserial (self));
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_deployment_unlocked_state_to_string:
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
const char *
|
||||
ostree_deployment_unlocked_state_to_string (OstreeDeploymentUnlockedState state)
|
||||
{
|
||||
|
|
@ -317,6 +322,11 @@ ostree_deployment_unlocked_state_to_string (OstreeDeploymentUnlockedState state)
|
|||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_deployment_get_unlocked:
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
OstreeDeploymentUnlockedState
|
||||
ostree_deployment_get_unlocked (OstreeDeployment *self)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@ ostree_diff_dirs (OstreeDiffFlags flags,
|
|||
*
|
||||
* Compute the difference between directory @a and @b as 3 separate
|
||||
* sets of #OstreeDiffItem in @modified, @removed, and @added.
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_diff_dirs_with_options (OstreeDiffFlags flags,
|
||||
|
|
|
|||
|
|
@ -219,9 +219,9 @@ _ostree_fetcher_should_retry_request (const GError *error,
|
|||
}
|
||||
|
||||
/* Convert a HTTP status code representing an error from libsoup or libcurl to
|
||||
* a #GIOError. This will return %G_IO_ERROR_FAILED if the status code is
|
||||
* a #GIOErrorEnum. This will return %G_IO_ERROR_FAILED if the status code is
|
||||
* unknown or otherwise unhandled. */
|
||||
GIOError
|
||||
GIOErrorEnum
|
||||
_ostree_fetcher_http_status_code_to_io_error (guint status_code)
|
||||
{
|
||||
switch (status_code)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void _ostree_fetcher_journal_failure (const char *remote_name,
|
|||
gboolean _ostree_fetcher_should_retry_request (const GError *error,
|
||||
guint n_retries_remaining);
|
||||
|
||||
GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code);
|
||||
GIOErrorEnum _ostree_fetcher_http_status_code_to_io_error (guint status_code);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ verify_result_finalized_cb (gpointer data,
|
|||
* finalize() method, but I didn't want this keyring hack
|
||||
* bleeding into multiple classes. */
|
||||
|
||||
ot_gpgme_kill_agent (tmp_dir);
|
||||
(void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,303 @@
|
|||
/*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
* Copyright (C) 2019 Collabora Ltd.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "libglnx.h"
|
||||
|
||||
#include "ostree-gpg-verify-result.h"
|
||||
|
||||
/**
|
||||
* SECTION: ostree-gpg-verify-result
|
||||
* @title: GPG signature verification results
|
||||
* @short_description: Dummy functions for detached GPG signatures
|
||||
*
|
||||
* This file contain dummy functions for GPG signatures checks to
|
||||
* provide API backward compatibility.
|
||||
*/
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
#error This file should not be compiled if GPG support is enabled
|
||||
#endif
|
||||
|
||||
/**
|
||||
* OstreeGpgVerifyResult:
|
||||
*
|
||||
* Private instance structure.
|
||||
*/
|
||||
struct OstreeGpgVerifyResult {
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
GObjectClass parent_class;
|
||||
} OstreeGpgVerifyResultClass;
|
||||
|
||||
static void ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (OstreeGpgVerifyResult,
|
||||
ostree_gpg_verify_result,
|
||||
G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
|
||||
ostree_gpg_verify_result_initable_iface_init))
|
||||
|
||||
static void
|
||||
ostree_gpg_verify_result_class_init (OstreeGpgVerifyResultClass *class)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
ostree_gpg_verify_result_init (OstreeGpgVerifyResult *result)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_count_all:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
*
|
||||
* Counts all the signatures in @result.
|
||||
*
|
||||
* Returns: signature count
|
||||
*/
|
||||
guint
|
||||
ostree_gpg_verify_result_count_all (OstreeGpgVerifyResult *result)
|
||||
{
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_count_valid:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
*
|
||||
* Counts only the valid signatures in @result.
|
||||
*
|
||||
* Returns: valid signature count
|
||||
*/
|
||||
guint
|
||||
ostree_gpg_verify_result_count_valid (OstreeGpgVerifyResult *result)
|
||||
{
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_lookup:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
* @key_id: a GPG key ID or fingerprint
|
||||
* @out_signature_index: (out): return location for the index of the signature
|
||||
* signed by @key_id, or %NULL
|
||||
*
|
||||
* Searches @result for a signature signed by @key_id. If a match is found,
|
||||
* the function returns %TRUE and sets @out_signature_index so that further
|
||||
* signature details can be obtained through ostree_gpg_verify_result_get().
|
||||
* If no match is found, the function returns %FALSE and leaves
|
||||
* @out_signature_index unchanged.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
**/
|
||||
gboolean
|
||||
ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result,
|
||||
const gchar *key_id,
|
||||
guint *out_signature_index)
|
||||
{
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_get:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
* @signature_index: which signature to get attributes from
|
||||
* @attrs: (array length=n_attrs): Array of requested attributes
|
||||
* @n_attrs: Length of the @attrs array
|
||||
*
|
||||
* Builds a #GVariant tuple of requested attributes for the GPG signature at
|
||||
* @signature_index in @result. See the #OstreeGpgSignatureAttr description
|
||||
* for the #GVariantType of each available attribute.
|
||||
*
|
||||
* It is a programmer error to request an invalid #OstreeGpgSignatureAttr or
|
||||
* an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to
|
||||
* find the number of signatures in @result.
|
||||
*
|
||||
* Returns: a new, floating, #GVariant tuple
|
||||
**/
|
||||
GVariant *
|
||||
ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
|
||||
guint signature_index,
|
||||
OstreeGpgSignatureAttr *attrs,
|
||||
guint n_attrs)
|
||||
{
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_get_all:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
* @signature_index: which signature to get attributes from
|
||||
*
|
||||
* Builds a #GVariant tuple of all available attributes for the GPG signature
|
||||
* at @signature_index in @result.
|
||||
*
|
||||
* The child values in the returned #GVariant tuple are ordered to match the
|
||||
* #OstreeGpgSignatureAttr enumeration, which means the enum values can be
|
||||
* used as index values in functions like g_variant_get_child(). See the
|
||||
* #OstreeGpgSignatureAttr description for the #GVariantType of each
|
||||
* available attribute.
|
||||
*
|
||||
* <note>
|
||||
* <para>
|
||||
* The #OstreeGpgSignatureAttr enumeration may be extended in the future
|
||||
* with new attributes, which would affect the #GVariant tuple returned by
|
||||
* this function. While the position and type of current child values in
|
||||
* the #GVariant tuple will not change, to avoid backward-compatibility
|
||||
* issues <emphasis>please do not depend on the tuple's overall size or
|
||||
* type signature</emphasis>.
|
||||
* </para>
|
||||
* </note>
|
||||
*
|
||||
* It is a programmer error to request an invalid @signature_index. Use
|
||||
* ostree_gpg_verify_result_count_all() to find the number of signatures in
|
||||
* @result.
|
||||
*
|
||||
* Returns: a new, floating, #GVariant tuple
|
||||
**/
|
||||
GVariant *
|
||||
ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result,
|
||||
guint signature_index)
|
||||
{
|
||||
g_return_val_if_fail (OSTREE_IS_GPG_VERIFY_RESULT (result), NULL);
|
||||
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_describe:
|
||||
* @result: an #OstreeGpgVerifyResult
|
||||
* @signature_index: which signature to describe
|
||||
* @output_buffer: a #GString to hold the description
|
||||
* @line_prefix: (allow-none): optional line prefix string
|
||||
* @flags: flags to adjust the description format
|
||||
*
|
||||
* Appends a brief, human-readable description of the GPG signature at
|
||||
* @signature_index in @result to the @output_buffer. The description
|
||||
* spans multiple lines. A @line_prefix string, if given, will precede
|
||||
* each line of the description.
|
||||
*
|
||||
* The @flags argument is reserved for future variations to the description
|
||||
* format. Currently must be 0.
|
||||
*
|
||||
* It is a programmer error to request an invalid @signature_index. Use
|
||||
* ostree_gpg_verify_result_count_all() to find the number of signatures in
|
||||
* @result.
|
||||
*/
|
||||
void
|
||||
ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result,
|
||||
guint signature_index,
|
||||
GString *output_buffer,
|
||||
const gchar *line_prefix,
|
||||
OstreeGpgSignatureFormatFlags flags)
|
||||
{
|
||||
g_autoptr(GVariant) variant = NULL;
|
||||
|
||||
g_return_if_fail (OSTREE_IS_GPG_VERIFY_RESULT (result));
|
||||
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
|
||||
variant = ostree_gpg_verify_result_get_all (result, signature_index);
|
||||
|
||||
ostree_gpg_verify_result_describe_variant (variant, output_buffer, line_prefix, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_describe_variant:
|
||||
* @variant: a #GVariant from ostree_gpg_verify_result_get_all()
|
||||
* @output_buffer: a #GString to hold the description
|
||||
* @line_prefix: (allow-none): optional line prefix string
|
||||
* @flags: flags to adjust the description format
|
||||
*
|
||||
* Similar to ostree_gpg_verify_result_describe() but takes a #GVariant of
|
||||
* all attributes for a GPG signature instead of an #OstreeGpgVerifyResult
|
||||
* and signature index.
|
||||
*
|
||||
* The @variant <emphasis>MUST</emphasis> have been created by
|
||||
* ostree_gpg_verify_result_get_all().
|
||||
*/
|
||||
void
|
||||
ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
||||
GString *output_buffer,
|
||||
const gchar *line_prefix,
|
||||
OstreeGpgSignatureFormatFlags flags)
|
||||
{
|
||||
const char *type_string;
|
||||
|
||||
g_return_if_fail (variant != NULL);
|
||||
g_return_if_fail (output_buffer != NULL);
|
||||
|
||||
/* Verify the variant's type string. This code is
|
||||
* not prepared to handle just any random GVariant. */
|
||||
type_string = g_variant_get_type_string (variant);
|
||||
g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssssxx)") == 0);
|
||||
|
||||
g_string_append (output_buffer,
|
||||
"GPG feature is disabled in a build time\n");
|
||||
|
||||
g_critical ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_require_valid_signature:
|
||||
* @result: (nullable): an #OstreeGpgVerifyResult
|
||||
* @error: A #GError
|
||||
*
|
||||
* Checks if the result contains at least one signature from the
|
||||
* trusted keyring. You can call this function immediately after
|
||||
* ostree_repo_verify_summary() or ostree_repo_verify_commit_ext() -
|
||||
* it will handle the %NULL @result and filled @error too.
|
||||
*
|
||||
* Returns: %TRUE if @result was not %NULL and had at least one
|
||||
* signature from trusted keyring, otherwise %FALSE
|
||||
*
|
||||
* Since: 2016.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_gpg_verify_result_require_valid_signature (OstreeGpgVerifyResult *result,
|
||||
GError **error)
|
||||
{
|
||||
if (result == NULL)
|
||||
return FALSE;
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
G_DEFINE_QUARK (OstreeGpgError, ostree_gpg_error)
|
||||
|
|
@ -65,7 +65,9 @@ static OstreeGpgSignatureAttr all_signature_attrs[] = {
|
|||
OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_USER_NAME,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY
|
||||
OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
|
||||
};
|
||||
|
||||
static void ostree_gpg_verify_result_initable_iface_init (GInitableIface *iface);
|
||||
|
|
@ -331,7 +333,9 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
|
|||
{
|
||||
if (attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_USER_NAME ||
|
||||
attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL ||
|
||||
attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY)
|
||||
attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY ||
|
||||
attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP ||
|
||||
attrs[ii] == OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY)
|
||||
{
|
||||
(void) gpgme_get_key (result->context, signature->fpr, &key, 0);
|
||||
break;
|
||||
|
|
@ -345,6 +349,7 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
|
|||
GVariant *child;
|
||||
gboolean v_boolean;
|
||||
const char *v_string = NULL;
|
||||
gint64 v_int64;
|
||||
|
||||
switch (attrs[ii])
|
||||
{
|
||||
|
|
@ -423,6 +428,29 @@ ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
|
|||
child = g_variant_new_string (v_string);
|
||||
break;
|
||||
|
||||
case OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP:
|
||||
v_int64 = 0;
|
||||
if (key != NULL)
|
||||
{
|
||||
gpgme_subkey_t subkey = key->subkeys;
|
||||
|
||||
while (subkey != NULL && (g_strcmp0 (subkey->fpr, signature->fpr) != 0))
|
||||
subkey = subkey->next;
|
||||
|
||||
if (subkey != NULL)
|
||||
v_int64 = subkey->expires;
|
||||
}
|
||||
child = g_variant_new_int64 (v_int64);
|
||||
break;
|
||||
|
||||
case OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY:
|
||||
if (key != NULL && key->subkeys != NULL)
|
||||
v_int64 = key->subkeys->expires;
|
||||
else
|
||||
v_int64 = 0;
|
||||
child = g_variant_new_int64 (v_int64);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_critical ("Invalid signature attribute (%d)", attrs[ii]);
|
||||
g_variant_builder_clear (&builder);
|
||||
|
|
@ -513,6 +541,49 @@ ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result,
|
|||
ostree_gpg_verify_result_describe_variant (variant, output_buffer, line_prefix, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
append_expire_info (GString *output_buffer,
|
||||
const gchar *line_prefix,
|
||||
const gchar *exp_type,
|
||||
gint64 exp_timestamp,
|
||||
gboolean expired)
|
||||
{
|
||||
g_autoptr(GDateTime) date_time_utc = NULL;
|
||||
g_autoptr(GDateTime) date_time_local = NULL;
|
||||
g_autofree char *formatted_date_time = NULL;
|
||||
|
||||
if (line_prefix != NULL)
|
||||
g_string_append (output_buffer, line_prefix);
|
||||
|
||||
date_time_utc = g_date_time_new_from_unix_utc (exp_timestamp);
|
||||
if (date_time_utc == NULL)
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"%s expiry timestamp (%" G_GINT64_FORMAT ") is invalid\n",
|
||||
exp_type,
|
||||
exp_timestamp);
|
||||
return;
|
||||
}
|
||||
|
||||
date_time_local = g_date_time_to_local (date_time_utc);
|
||||
formatted_date_time = g_date_time_format (date_time_local, "%c");
|
||||
|
||||
if (expired)
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"%s expired %s\n",
|
||||
exp_type,
|
||||
formatted_date_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"%s expires %s\n",
|
||||
exp_type,
|
||||
formatted_date_time);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_gpg_verify_result_describe_variant:
|
||||
* @variant: a #GVariant from ostree_gpg_verify_result_get_all()
|
||||
|
|
@ -538,6 +609,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
g_autofree char *formatted_date_time = NULL;
|
||||
gint64 timestamp;
|
||||
gint64 exp_timestamp;
|
||||
gint64 key_exp_timestamp;
|
||||
gint64 key_exp_timestamp_primary;
|
||||
const char *type_string;
|
||||
const char *fingerprint;
|
||||
const char *fingerprint_primary;
|
||||
|
|
@ -547,6 +620,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
const char *key_id;
|
||||
gboolean valid;
|
||||
gboolean sig_expired;
|
||||
gboolean key_expired;
|
||||
gboolean key_revoked;
|
||||
gboolean key_missing;
|
||||
gsize len;
|
||||
|
||||
|
|
@ -556,7 +631,7 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
/* Verify the variant's type string. This code is
|
||||
* not prepared to handle just any random GVariant. */
|
||||
type_string = g_variant_get_type_string (variant);
|
||||
g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssss)") == 0);
|
||||
g_return_if_fail (strcmp (type_string, "(bbbbbsxxsssssxx)") == 0);
|
||||
|
||||
/* The default format roughly mimics the verify output generated by
|
||||
* check_sig_and_print() in gnupg/g10/mainproc.c, though obviously
|
||||
|
|
@ -566,6 +641,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
"b", &valid);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED,
|
||||
"b", &sig_expired);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED,
|
||||
"b", &key_expired);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED,
|
||||
"b", &key_revoked);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING,
|
||||
"b", &key_missing);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT,
|
||||
|
|
@ -582,6 +661,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
"&s", &user_name);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL,
|
||||
"&s", &user_email);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP,
|
||||
"x", &key_exp_timestamp);
|
||||
g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
|
||||
"x", &key_exp_timestamp_primary);
|
||||
|
||||
len = strlen (fingerprint);
|
||||
key_id = (len > 16) ? fingerprint + len - 16 : fingerprint;
|
||||
|
|
@ -623,6 +706,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
"Good signature from \"%s <%s>\"\n",
|
||||
user_name, user_email);
|
||||
}
|
||||
else if (key_revoked)
|
||||
{
|
||||
g_string_append (output_buffer, "Key revoked\n");
|
||||
}
|
||||
else if (sig_expired)
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
|
|
@ -652,35 +739,14 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
}
|
||||
|
||||
if (exp_timestamp > 0)
|
||||
{
|
||||
if (line_prefix != NULL)
|
||||
g_string_append (output_buffer, line_prefix);
|
||||
|
||||
date_time_utc = g_date_time_new_from_unix_utc (exp_timestamp);
|
||||
if (date_time_utc == NULL)
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"Signature expiry timestamp (%" G_GINT64_FORMAT ") is invalid\n",
|
||||
exp_timestamp);
|
||||
return;
|
||||
}
|
||||
|
||||
date_time_local = g_date_time_to_local (date_time_utc);
|
||||
formatted_date_time = g_date_time_format (date_time_local, "%c");
|
||||
|
||||
if (sig_expired)
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"Signature expired %s\n",
|
||||
formatted_date_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_string_append_printf (output_buffer,
|
||||
"Signature expires %s\n",
|
||||
formatted_date_time);
|
||||
}
|
||||
}
|
||||
append_expire_info (output_buffer, line_prefix, "Signature", exp_timestamp,
|
||||
sig_expired);
|
||||
if (key_exp_timestamp > 0)
|
||||
append_expire_info (output_buffer, line_prefix, "Key", key_exp_timestamp,
|
||||
key_expired);
|
||||
if (key_exp_timestamp_primary > 0 && (g_strcmp0 (fingerprint, fingerprint_primary) != 0))
|
||||
append_expire_info (output_buffer, line_prefix, "Primary key",
|
||||
key_exp_timestamp_primary, key_expired);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -695,6 +761,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant,
|
|||
*
|
||||
* Returns: %TRUE if @result was not %NULL and had at least one
|
||||
* signature from trusted keyring, otherwise %FALSE
|
||||
*
|
||||
* Since: 2016.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_gpg_verify_result_require_valid_signature (OstreeGpgVerifyResult *result,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,14 @@ typedef struct OstreeGpgVerifyResult OstreeGpgVerifyResult;
|
|||
* (will be the same as OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT if the
|
||||
* the signature is already from the primary key rather than a subkey,
|
||||
* and will be the empty string if the key is missing.)
|
||||
* @OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP:
|
||||
* [#G_VARIANT_TYPE_INT64] Key expiration Unix timestamp (0 if no
|
||||
* expiration or if the key is missing)
|
||||
* @OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY:
|
||||
* [#G_VARIANT_TYPE_INT64] Key expiration Unix timestamp of the signing key's
|
||||
* primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP
|
||||
* if the signing key is the primary key and 0 if no expiration or if the key
|
||||
* is missing)
|
||||
*
|
||||
* Signature attributes available from an #OstreeGpgVerifyResult.
|
||||
* The attribute's #GVariantType is shown in brackets.
|
||||
|
|
@ -88,6 +96,8 @@ typedef enum {
|
|||
OSTREE_GPG_SIGNATURE_ATTR_USER_NAME,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP,
|
||||
OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
|
||||
} OstreeGpgSignatureAttr;
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
|
|
@ -161,6 +171,11 @@ typedef enum {
|
|||
OSTREE_GPG_ERROR_MISSING_KEY,
|
||||
} OstreeGpgError;
|
||||
|
||||
/**
|
||||
* ostree_gpg_error_quark:
|
||||
*
|
||||
* Since: 2017.10
|
||||
*/
|
||||
_OSTREE_PUBLIC
|
||||
GQuark ostree_gpg_error_quark (void);
|
||||
#define OSTREE_GPG_ERROR (ostree_gpg_error_quark ())
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "ostree-kernel-args.h"
|
||||
#include "libglnx.h"
|
||||
#include "otutil.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -60,8 +61,24 @@ _arg_has_prefix (const char *arg,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
strcmp0_equal (gconstpointer v1,
|
||||
gconstpointer v2)
|
||||
{
|
||||
return g_strcmp0 (v1, v2) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_new: (skip)
|
||||
*
|
||||
* Initializes a new OstreeKernelArgs structure and returns it
|
||||
*
|
||||
* Returns: (transfer full): A newly created #OstreeKernelArgs for kernel arguments
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
OstreeKernelArgs *
|
||||
_ostree_kernel_args_new (void)
|
||||
ostree_kernel_args_new (void)
|
||||
{
|
||||
OstreeKernelArgs *ret;
|
||||
ret = g_new0 (OstreeKernelArgs, 1);
|
||||
|
|
@ -71,8 +88,16 @@ _ostree_kernel_args_new (void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_free:
|
||||
* @kargs: An OstreeKernelArgs that represents kernel arguments
|
||||
*
|
||||
* Frees the kargs structure
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_free (OstreeKernelArgs *kargs)
|
||||
ostree_kernel_args_free (OstreeKernelArgs *kargs)
|
||||
{
|
||||
if (!kargs)
|
||||
return;
|
||||
|
|
@ -81,8 +106,237 @@ _ostree_kernel_args_free (OstreeKernelArgs *kargs)
|
|||
g_free (kargs);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_cleanup:
|
||||
* @loc: Address of an OstreeKernelArgs pointer
|
||||
*
|
||||
* Frees the OstreeKernelArgs structure pointed by *loc
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_replace_take (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_cleanup (void *loc)
|
||||
{
|
||||
ostree_kernel_args_free (*((OstreeKernelArgs**)loc));
|
||||
}
|
||||
|
||||
/**
|
||||
* _ostree_kernel_arg_get_kargs_table:
|
||||
* @kargs: An OstreeKernelArgs that represents kernel arguments
|
||||
*
|
||||
* Returns: (transfer none): #GHashTable that associates with the @kargs
|
||||
*
|
||||
* Note: this function is private for now, since the data structures underneath might be changed
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
GHashTable*
|
||||
_ostree_kernel_arg_get_kargs_table (OstreeKernelArgs *kargs)
|
||||
{
|
||||
if (kargs != NULL)
|
||||
return kargs->table;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* _ostree_kernel_arg_get_key_array:
|
||||
* @kargs: An OstreeKernelArgs that represents kernel arguments
|
||||
*
|
||||
* Returns: (transfer none) (element-type utf8): #GPtrArray that associates with @kargs
|
||||
*
|
||||
* Note: this function is private for now, since the data structures underneath might be changed
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
GPtrArray*
|
||||
_ostree_kernel_arg_get_key_array (OstreeKernelArgs *kargs)
|
||||
{
|
||||
if (kargs != NULL)
|
||||
return kargs->order;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_new_replace:
|
||||
* @kargs: OstreeKernelArgs instance
|
||||
* @arg: a string argument
|
||||
* @error: error instance
|
||||
*
|
||||
* This function implements the basic logic behind key/value pair
|
||||
* replacement. Do note that the arg need to be properly formatted
|
||||
*
|
||||
* When replacing key with exact one value, the arg can be in
|
||||
* the form:
|
||||
* key, key=new_val, or key=old_val=new_val
|
||||
* The first one swaps the old_val with the key to an empty value
|
||||
* The second and third replace the old_val into the new_val
|
||||
*
|
||||
* When replacing key with multiple values, the arg can only be
|
||||
* in the form of:
|
||||
* key=old_val=new_val. Unless there is a special case where
|
||||
* there is an empty value associated with the key, then
|
||||
* key=new_val will work because old_val is empty. The empty
|
||||
* val will be swapped with the new_val in that case
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure (and in some other instances such as:
|
||||
* 1. key not found in @kargs
|
||||
* 2. old value not found when @arg is in the form of key=old_val=new_val
|
||||
* 3. multiple old values found when @arg is in the form of key=old_val)
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
gboolean
|
||||
ostree_kernel_args_new_replace (OstreeKernelArgs *kargs,
|
||||
const char *arg,
|
||||
GError **error)
|
||||
{
|
||||
g_autofree char *arg_owned = g_strdup (arg);
|
||||
const char *key = arg_owned;
|
||||
const char *val = split_keyeq (arg_owned);
|
||||
|
||||
GPtrArray *values = g_hash_table_lookup (kargs->table, key);
|
||||
if (!values)
|
||||
return glnx_throw (error, "No key '%s' found", key);
|
||||
g_assert_cmpuint (values->len, >, 0);
|
||||
|
||||
/* first handle the case where the user just wants to replace an old value */
|
||||
if (val && strchr (val, '='))
|
||||
{
|
||||
g_autofree char *old_val = g_strdup (val);
|
||||
const char *new_val = split_keyeq (old_val);
|
||||
g_assert (new_val);
|
||||
|
||||
guint i = 0;
|
||||
if (!ot_ptr_array_find_with_equal_func (values, old_val, strcmp0_equal, &i))
|
||||
return glnx_throw (error, "No karg '%s=%s' found", key, old_val);
|
||||
|
||||
g_clear_pointer (&values->pdata[i], g_free);
|
||||
values->pdata[i] = g_strdup (new_val);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* can't know which val to replace without the old_val=new_val syntax */
|
||||
if (values->len > 1)
|
||||
return glnx_throw (error, "Multiple values for key '%s' found", key);
|
||||
|
||||
g_clear_pointer (&values->pdata[0], g_free);
|
||||
values->pdata[0] = g_strdup (val);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_delete_key_entry
|
||||
* @kargs: an OstreeKernelArgs instance
|
||||
* @key: the key to remove
|
||||
* @error: an GError instance
|
||||
*
|
||||
* This function removes the key entry from the hashtable
|
||||
* as well from the order pointer array inside kargs
|
||||
*
|
||||
* Note: since both table and order inside kernel args
|
||||
* are with free function, no extra free functions are
|
||||
* being called as they are done automatically by GLib
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
gboolean
|
||||
ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs,
|
||||
const char *key,
|
||||
GError **error)
|
||||
{
|
||||
if (!g_hash_table_remove (kargs->table, key))
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to find kernel argument '%s'",
|
||||
key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Then remove the key from order table */
|
||||
guint key_index;
|
||||
g_assert (ot_ptr_array_find_with_equal_func (kargs->order, key, g_str_equal, &key_index));
|
||||
g_assert (g_ptr_array_remove_index (kargs->order, key_index));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_delete:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @arg: key or key/value pair for deletion
|
||||
* @error: an GError instance
|
||||
*
|
||||
* There are few scenarios being handled for deletion:
|
||||
*
|
||||
* 1: for input arg with a single key(i.e without = for split),
|
||||
* the key/value pair will be deleted if there is only
|
||||
* one value that is associated with the key
|
||||
*
|
||||
* 2: for input arg wth key/value pair, the specific key
|
||||
* value pair will be deleted from the pointer array
|
||||
* if those exist.
|
||||
*
|
||||
* 3: If the found key has only one value
|
||||
* associated with it, the key entry in the table will also
|
||||
* be removed, and the key will be removed from order table
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
gboolean
|
||||
ostree_kernel_args_delete (OstreeKernelArgs *kargs,
|
||||
const char *arg,
|
||||
GError **error)
|
||||
{
|
||||
g_autofree char *arg_owned = g_strdup (arg);
|
||||
const char *key = arg_owned;
|
||||
const char *val = split_keyeq (arg_owned);
|
||||
|
||||
GPtrArray *values = g_hash_table_lookup (kargs->table, key);
|
||||
if (!values)
|
||||
return glnx_throw (error, "No key '%s' found", key);
|
||||
g_assert_cmpuint (values->len, >, 0);
|
||||
|
||||
/* special-case: we allow deleting by key only if there's only one val */
|
||||
if (values->len == 1)
|
||||
{
|
||||
/* but if a specific val was passed, check that it's the same */
|
||||
if (val && !strcmp0_equal (val, values->pdata[0]))
|
||||
return glnx_throw (error, "No karg '%s=%s' found", key, val);
|
||||
return ostree_kernel_args_delete_key_entry (kargs, key, error);
|
||||
}
|
||||
|
||||
/* note val might be NULL here, in which case we're looking for `key`, not `key=` or
|
||||
* `key=val` */
|
||||
guint i = 0;
|
||||
if (!ot_ptr_array_find_with_equal_func (values, val, strcmp0_equal, &i))
|
||||
{
|
||||
if (!val)
|
||||
/* didn't find NULL -> only key= key=val1 key=val2 style things left, so the user
|
||||
* needs to be more specific */
|
||||
return glnx_throw (error, "Multiple values for key '%s' found", arg);
|
||||
return glnx_throw (error, "No karg '%s' found", arg);
|
||||
}
|
||||
|
||||
g_ptr_array_remove_index (values, i);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_replace_take:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @arg: (transfer full): key or key/value pair for replacement
|
||||
*
|
||||
* Finds and replaces the old key if @arg is already in the hash table,
|
||||
* otherwise adds @arg as new key and split_keyeq (arg) as value.
|
||||
* Note that when replacing old key, the old values are freed.
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
ostree_kernel_args_replace_take (OstreeKernelArgs *kargs,
|
||||
char *arg)
|
||||
{
|
||||
gboolean existed;
|
||||
|
|
@ -105,15 +359,37 @@ _ostree_kernel_args_replace_take (OstreeKernelArgs *kargs,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_replace:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @arg: key or key/value pair for replacement
|
||||
*
|
||||
* Finds and replaces the old key if @arg is already in the hash table,
|
||||
* otherwise adds @arg as new key and split_keyeq (arg) as value.
|
||||
* Note that when replacing old key value pair, the old values are freed.
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_replace (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_replace (OstreeKernelArgs *kargs,
|
||||
const char *arg)
|
||||
{
|
||||
_ostree_kernel_args_replace_take (kargs, g_strdup (arg));
|
||||
ostree_kernel_args_replace_take (kargs, g_strdup (arg));
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_append:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @arg: key or key/value pair to be added
|
||||
*
|
||||
* Appends @arg which is in the form of key=value pair to the hash table kargs->table
|
||||
* (appends to the value list if key is already in the hash table)
|
||||
* and appends key to kargs->order if it is not in the hash table already.
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_append (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_append (OstreeKernelArgs *kargs,
|
||||
const char *arg)
|
||||
{
|
||||
gboolean existed = TRUE;
|
||||
|
|
@ -141,8 +417,19 @@ _ostree_kernel_args_append (OstreeKernelArgs *kargs,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_replace_argv:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @argv: an array of key or key/value pairs
|
||||
*
|
||||
* Finds and replaces each non-null arguments of @argv in the hash table,
|
||||
* otherwise adds individual arg as new key and split_keyeq (arg) as value.
|
||||
* Note that when replacing old key value pair, the old values are freed.
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs,
|
||||
char **argv)
|
||||
{
|
||||
char **strviter;
|
||||
|
|
@ -150,12 +437,22 @@ _ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs,
|
|||
for (strviter = argv; strviter && *strviter; strviter++)
|
||||
{
|
||||
const char *arg = *strviter;
|
||||
_ostree_kernel_args_replace (kargs, arg);
|
||||
ostree_kernel_args_replace (kargs, arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_append_argv_filtered:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @argv: an array of key=value argument pairs
|
||||
* @prefixes: an array of prefix strings
|
||||
*
|
||||
* Appends each argument that does not have one of the @prefixes as prefix to the @kargs
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs,
|
||||
char **argv,
|
||||
char **prefixes)
|
||||
{
|
||||
|
|
@ -166,19 +463,42 @@ _ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs,
|
|||
const char *arg = *strviter;
|
||||
|
||||
if (!_arg_has_prefix (arg, prefixes))
|
||||
_ostree_kernel_args_append (kargs, arg);
|
||||
ostree_kernel_args_append (kargs, arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_append_argv:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @argv: an array of key=value argument pairs
|
||||
*
|
||||
* Appends each value in @argv to the corresponding value array and
|
||||
* appends key to kargs->order if it is not in the hash table already.
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_append_argv (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_append_argv (OstreeKernelArgs *kargs,
|
||||
char **argv)
|
||||
{
|
||||
_ostree_kernel_args_append_argv_filtered (kargs, argv, NULL);
|
||||
ostree_kernel_args_append_argv_filtered (kargs, argv, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_append_proc_cmdline:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @cancellable: optional GCancellable object, NULL to ignore
|
||||
* @error: an GError instance
|
||||
*
|
||||
* Appends the command line arguments in the file "/proc/cmdline"
|
||||
* that does not have "BOOT_IMAGE=" and "initrd=" as prefixes to the @kargs
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
gboolean
|
||||
_ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
|
|
@ -202,14 +522,23 @@ _ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
|
|||
g_strchomp (proc_cmdline);
|
||||
|
||||
proc_cmdline_args = g_strsplit (proc_cmdline, " ", -1);
|
||||
_ostree_kernel_args_append_argv_filtered (kargs, proc_cmdline_args,
|
||||
ostree_kernel_args_append_argv_filtered (kargs, proc_cmdline_args,
|
||||
filtered_prefixes);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_parse_append:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @options: a string representing command line arguments
|
||||
*
|
||||
* Parses @options by separating it by whitespaces and appends each argument to @kargs
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
void
|
||||
_ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
|
||||
ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
|
||||
const char *options)
|
||||
{
|
||||
char **args = NULL;
|
||||
|
|
@ -222,24 +551,47 @@ _ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
|
|||
for (iter = args; *iter; iter++)
|
||||
{
|
||||
char *arg = *iter;
|
||||
_ostree_kernel_args_append (kargs, arg);
|
||||
ostree_kernel_args_append (kargs, arg);
|
||||
}
|
||||
g_strfreev (args);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_from_string: (skip)
|
||||
* @options: a string representing command line arguments
|
||||
*
|
||||
* Initializes a new OstreeKernelArgs then parses and appends @options
|
||||
* to the empty OstreeKernelArgs
|
||||
*
|
||||
* Returns: (transfer full): newly allocated #OstreeKernelArgs with @options appended
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
OstreeKernelArgs *
|
||||
_ostree_kernel_args_from_string (const char *options)
|
||||
ostree_kernel_args_from_string (const char *options)
|
||||
{
|
||||
OstreeKernelArgs *ret;
|
||||
|
||||
ret = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_parse_append (ret, options);
|
||||
ret = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_parse_append (ret, options);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_to_strv:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
*
|
||||
* Extracts all key value pairs in @kargs and appends to a temporary
|
||||
* array in forms of "key=value" or "key" if value is NULL, and returns
|
||||
* the temporary array with the GPtrArray wrapper freed
|
||||
*
|
||||
* Returns: (transfer full): an array of "key=value" pairs or "key" if value is NULL
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
char **
|
||||
_ostree_kernel_args_to_strv (OstreeKernelArgs *kargs)
|
||||
ostree_kernel_args_to_strv (OstreeKernelArgs *kargs)
|
||||
{
|
||||
GPtrArray *strv = g_ptr_array_new ();
|
||||
guint i;
|
||||
|
|
@ -266,8 +618,25 @@ _ostree_kernel_args_to_strv (OstreeKernelArgs *kargs)
|
|||
return (char**)g_ptr_array_free (strv, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_to_string:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
*
|
||||
* Extracts all key value pairs in @kargs and appends to a temporary
|
||||
* GString in forms of "key=value" or "key" if value is NULL separated
|
||||
* by a single whitespace, and returns the temporary string with the
|
||||
* GString wrapper freed
|
||||
*
|
||||
* Note: the application will be terminated if one of the values array
|
||||
* in @kargs is NULL
|
||||
*
|
||||
* Returns: (transfer full): a string of "key=value" pairs or "key" if value is NULL,
|
||||
* separated by single whitespaces
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
char *
|
||||
_ostree_kernel_args_to_string (OstreeKernelArgs *kargs)
|
||||
ostree_kernel_args_to_string (OstreeKernelArgs *kargs)
|
||||
{
|
||||
GString *buf = g_string_new ("");
|
||||
gboolean first = TRUE;
|
||||
|
|
@ -302,8 +671,22 @@ _ostree_kernel_args_to_string (OstreeKernelArgs *kargs)
|
|||
return g_string_free (buf, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_kernel_args_get_last_value:
|
||||
* @kargs: a OstreeKernelArgs instance
|
||||
* @key: a key to look for in @kargs hash table
|
||||
*
|
||||
* Finds and returns the last element of value array
|
||||
* corresponding to the @key in @kargs hash table. Note that the application
|
||||
* will be terminated if the @key is found but the value array is empty
|
||||
*
|
||||
* Returns: NULL if @key is not found in the @kargs hash table,
|
||||
* otherwise returns last element of value array corresponding to @key
|
||||
*
|
||||
* Since: 2019.3
|
||||
**/
|
||||
const char *
|
||||
_ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key)
|
||||
ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key)
|
||||
{
|
||||
GPtrArray *values = g_hash_table_lookup (kargs->table, key);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,41 +19,88 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "libglnx.h"
|
||||
#include <gio/gio.h>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include "ostree-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _OstreeKernelArgs OstreeKernelArgs;
|
||||
void _ostree_kernel_args_free (OstreeKernelArgs *kargs);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OstreeKernelArgs, _ostree_kernel_args_free);
|
||||
|
||||
OstreeKernelArgs *_ostree_kernel_args_new (void);
|
||||
void _ostree_kernel_args_replace_take (OstreeKernelArgs *kargs,
|
||||
char *key);
|
||||
void _ostree_kernel_args_replace (OstreeKernelArgs *kargs,
|
||||
const char *key);
|
||||
void _ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs,
|
||||
GHashTable *_ostree_kernel_arg_get_kargs_table (OstreeKernelArgs *kargs);
|
||||
|
||||
GPtrArray *_ostree_kernel_arg_get_key_array (OstreeKernelArgs *kargs);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_free (OstreeKernelArgs *kargs);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
OstreeKernelArgs *ostree_kernel_args_new (void);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_cleanup (void *loc);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_replace_take (OstreeKernelArgs *kargs,
|
||||
char *arg);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_replace (OstreeKernelArgs *kargs,
|
||||
const char *arg);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_replace_argv (OstreeKernelArgs *kargs,
|
||||
char **argv);
|
||||
void _ostree_kernel_args_append (OstreeKernelArgs *kargs,
|
||||
const char *key);
|
||||
void _ostree_kernel_args_append_argv (OstreeKernelArgs *kargs,
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_append (OstreeKernelArgs *kargs,
|
||||
const char *arg);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_append_argv (OstreeKernelArgs *kargs,
|
||||
char **argv);
|
||||
void _ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs,
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_append_argv_filtered (OstreeKernelArgs *kargs,
|
||||
char **argv,
|
||||
char **prefixes);
|
||||
|
||||
gboolean _ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_kernel_args_new_replace (OstreeKernelArgs *kargs,
|
||||
const char *arg,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_kernel_args_delete (OstreeKernelArgs *kargs,
|
||||
const char *arg,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_kernel_args_delete_key_entry (OstreeKernelArgs *kargs,
|
||||
const char *key,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_kernel_args_append_proc_cmdline (OstreeKernelArgs *kargs,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void _ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_kernel_args_parse_append (OstreeKernelArgs *kargs,
|
||||
const char *options);
|
||||
|
||||
const char *_ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs, const char *key);
|
||||
_OSTREE_PUBLIC
|
||||
const char *ostree_kernel_args_get_last_value (OstreeKernelArgs *kargs,
|
||||
const char *key);
|
||||
|
||||
OstreeKernelArgs * _ostree_kernel_args_from_string (const char *options);
|
||||
_OSTREE_PUBLIC
|
||||
OstreeKernelArgs *ostree_kernel_args_from_string (const char *options);
|
||||
|
||||
char ** _ostree_kernel_args_to_strv (OstreeKernelArgs *kargs);
|
||||
char * _ostree_kernel_args_to_string (OstreeKernelArgs *kargs);
|
||||
_OSTREE_PUBLIC
|
||||
char **ostree_kernel_args_to_strv (OstreeKernelArgs *kargs);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
char *ostree_kernel_args_to_string (OstreeKernelArgs *kargs);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ typedef struct archive OtAutoArchiveRead;
|
|||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OtAutoArchiveRead, archive_read_free)
|
||||
|
||||
static inline OtAutoArchiveRead *
|
||||
ot_open_archive_read (const char *path, GError **error)
|
||||
ot_archive_read_new (void)
|
||||
{
|
||||
g_autoptr(OtAutoArchiveRead) a = archive_read_new ();
|
||||
OtAutoArchiveRead *a = archive_read_new ();
|
||||
|
||||
#ifdef HAVE_ARCHIVE_READ_SUPPORT_FILTER_ALL
|
||||
archive_read_support_filter_all (a);
|
||||
|
|
@ -54,10 +54,34 @@ ot_open_archive_read (const char *path, GError **error)
|
|||
archive_read_support_compression_all (a);
|
||||
#endif
|
||||
archive_read_support_format_all (a);
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
static inline OtAutoArchiveRead *
|
||||
ot_open_archive_read (const char *path, GError **error)
|
||||
{
|
||||
g_autoptr(OtAutoArchiveRead) a = ot_archive_read_new ();
|
||||
|
||||
if (archive_read_open_filename (a, path, 8192) != ARCHIVE_OK)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"%s", archive_error_string (a));
|
||||
"archive_read_open_filename: %s", archive_error_string (a));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return g_steal_pointer (&a);
|
||||
}
|
||||
|
||||
static inline OtAutoArchiveRead *
|
||||
ot_open_archive_read_fd (int fd, GError **error)
|
||||
{
|
||||
g_autoptr(OtAutoArchiveRead) a = ot_archive_read_new ();
|
||||
|
||||
if (archive_read_open_fd (a, fd, 8192) != ARCHIVE_OK)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"archive_read_open_fd: %s", archive_error_string (a));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,6 +331,8 @@ ostree_mutable_tree_replace_file (OstreeMutableTree *self,
|
|||
* @error: a #GError
|
||||
*
|
||||
* Remove the file or subdirectory named @name from the mutable tree @self.
|
||||
*
|
||||
* Since: 2018.9
|
||||
*/
|
||||
gboolean
|
||||
ostree_mutable_tree_remove (OstreeMutableTree *self,
|
||||
|
|
@ -399,6 +401,14 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_mutable_tree_lookup:
|
||||
* @self: Tree
|
||||
* @name: name
|
||||
* @out_file_checksum: (out) (transfer full): checksum
|
||||
* @out_subdir: (out) (transfer full): subdirectory
|
||||
* @error: a #GError
|
||||
*/
|
||||
gboolean
|
||||
ostree_mutable_tree_lookup (OstreeMutableTree *self,
|
||||
const char *name,
|
||||
|
|
@ -494,6 +504,8 @@ const char empty_tree_csum[] = "6e340b9cffb37a989ca544e6bb780a2c78901d3fb3373876
|
|||
* This function enables optimisations when composing trees. The provided
|
||||
* checksums are not loaded or checked when this function is called. Instead
|
||||
* the contents will be loaded only when needed.
|
||||
*
|
||||
* Since: 2018.7
|
||||
*/
|
||||
gboolean
|
||||
ostree_mutable_tree_fill_empty_from_dirtree (OstreeMutableTree *self,
|
||||
|
|
@ -654,6 +666,8 @@ ostree_mutable_tree_new (void)
|
|||
* and checksums. The data will be loaded from the repo lazily as needed.
|
||||
*
|
||||
* Returns: (transfer full): A new tree
|
||||
*
|
||||
* Since: 2018.7
|
||||
*/
|
||||
OstreeMutableTree *
|
||||
ostree_mutable_tree_new_from_checksum (OstreeRepo *repo,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ G_DEFINE_BOXED_TYPE (OstreeCollectionRef, ostree_collection_ref,
|
|||
* refspec; no remote name is included), which can be used for non-P2P
|
||||
* operations.
|
||||
*
|
||||
* Returns: (transfer full): a new #OstreeCollectionRef
|
||||
* Returns: (transfer full) (nullable): a new #OstreeCollectionRef
|
||||
* Since: 2018.6
|
||||
*/
|
||||
OstreeCollectionRef *
|
||||
|
|
@ -69,7 +69,7 @@ ostree_collection_ref_new (const gchar *collection_id,
|
|||
|
||||
/**
|
||||
* ostree_collection_ref_dup:
|
||||
* @ref: an #OstreeCollectionRef
|
||||
* @ref: (not nullable): an #OstreeCollectionRef
|
||||
*
|
||||
* Create a copy of the given @ref.
|
||||
*
|
||||
|
|
@ -104,7 +104,7 @@ ostree_collection_ref_free (OstreeCollectionRef *ref)
|
|||
|
||||
/**
|
||||
* ostree_collection_ref_hash:
|
||||
* @ref: an #OstreeCollectionRef
|
||||
* @ref: (not nullable): an #OstreeCollectionRef
|
||||
*
|
||||
* Hash the given @ref. This function is suitable for use with #GHashTable.
|
||||
* @ref must be non-%NULL.
|
||||
|
|
@ -125,8 +125,8 @@ ostree_collection_ref_hash (gconstpointer ref)
|
|||
|
||||
/**
|
||||
* ostree_collection_ref_equal:
|
||||
* @ref1: an #OstreeCollectionRef
|
||||
* @ref2: another #OstreeCollectionRef
|
||||
* @ref1: (not nullable): an #OstreeCollectionRef
|
||||
* @ref2 : (not nullable): another #OstreeCollectionRef
|
||||
*
|
||||
* Compare @ref1 and @ref2 and return %TRUE if they have the same collection ID and
|
||||
* ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL.
|
||||
|
|
|
|||
|
|
@ -1321,6 +1321,8 @@ ostree_repo_checkout_tree_at (OstreeRepo *self,
|
|||
* Note in addition that unlike ostree_repo_checkout_tree(), the
|
||||
* default is not to use the repository-internal uncompressed objects
|
||||
* cache.
|
||||
*
|
||||
* Since: 2016.8
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_checkout_at (OstreeRepo *self,
|
||||
|
|
@ -1391,6 +1393,8 @@ ostree_repo_checkout_at (OstreeRepo *self,
|
|||
*
|
||||
* Note that cache does *not* have its refcount incremented - the lifetime of
|
||||
* @cache must be equal to or greater than that of @opts.
|
||||
*
|
||||
* Since: 2017.13
|
||||
*/
|
||||
void
|
||||
ostree_repo_checkout_at_options_set_devino (OstreeRepoCheckoutAtOptions *opts,
|
||||
|
|
|
|||
|
|
@ -2065,6 +2065,8 @@ ostree_repo_set_ref_immediate (OstreeRepo *self,
|
|||
* @error: GError
|
||||
*
|
||||
* Like ostree_repo_set_ref_immediate(), but creates an alias.
|
||||
*
|
||||
* Since: 2017.10
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_set_alias_ref_immediate (OstreeRepo *self,
|
||||
|
|
|
|||
|
|
@ -292,6 +292,13 @@ ostree_repo_file_ensure_resolved (OstreeRepoFile *self,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_file_get_xattrs:
|
||||
* @self: #OstreeRepoFile
|
||||
* @out_xattrs: (out) (optional): the extended attributes
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_file_get_xattrs (OstreeRepoFile *self,
|
||||
GVariant **out_xattrs,
|
||||
|
|
@ -724,6 +731,13 @@ query_child_info_dir (OstreeRepo *repo,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_file_tree_find_child:
|
||||
* @self: #OstreeRepoFile
|
||||
* @name: name of the child
|
||||
* @is_dir: (out caller-allocates):
|
||||
* @out_container: (out):
|
||||
*/
|
||||
int
|
||||
ostree_repo_file_tree_find_child (OstreeRepoFile *self,
|
||||
const char *name,
|
||||
|
|
@ -769,6 +783,16 @@ ostree_repo_file_tree_find_child (OstreeRepoFile *self,
|
|||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_file_tree_query_child:
|
||||
* @self: #OstreeRepoFile
|
||||
* @n:
|
||||
* @attributes:
|
||||
* @flags:
|
||||
* @out_info: (out):
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_file_tree_query_child (OstreeRepoFile *self,
|
||||
int n,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ GPtrArray *ostree_repo_finder_resolve_all_finish (GAsyncResult *result,
|
|||
* which allow ostree_repo_pull_from_remotes_async() (for example) to prioritise
|
||||
* how to pull the refs.
|
||||
*
|
||||
* An #OstreeRepoFinderResult is immutable after construction.
|
||||
*
|
||||
* The @priority is used as one input of many to ordering functions like
|
||||
* ostree_repo_finder_result_compare().
|
||||
*
|
||||
|
|
|
|||
|
|
@ -901,6 +901,37 @@ ostree_repo_import_archive_to_mtree (OstreeRepo *self,
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
static gboolean
|
||||
write_archive_to_mtree (OstreeRepo *self,
|
||||
OtAutoArchiveRead *archive,
|
||||
OstreeMutableTree *mtree,
|
||||
OstreeRepoCommitModifier *modifier,
|
||||
gboolean autocreate_parents,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
OstreeRepoImportArchiveOptions opts = { 0, };
|
||||
|
||||
opts.autocreate_parents = !!autocreate_parents;
|
||||
|
||||
if (!ostree_repo_import_archive_to_mtree (self, &opts, archive, mtree, modifier, cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (archive_read_close (archive) != ARCHIVE_OK)
|
||||
{
|
||||
propagate_libarchive_error (error, archive);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
(void)archive_read_close (archive);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ostree_repo_write_archive_to_mtree:
|
||||
* @self: An #OstreeRepo
|
||||
|
|
@ -924,31 +955,46 @@ ostree_repo_write_archive_to_mtree (OstreeRepo *self,
|
|||
GError **error)
|
||||
{
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
gboolean ret = FALSE;
|
||||
g_autoptr(OtAutoArchiveRead) a = archive_read_new ();
|
||||
OstreeRepoImportArchiveOptions opts = { 0, };
|
||||
|
||||
a = ot_open_archive_read (gs_file_get_path_cached (archive), error);
|
||||
if (!a)
|
||||
goto out;
|
||||
opts.autocreate_parents = !!autocreate_parents;
|
||||
|
||||
if (!ostree_repo_import_archive_to_mtree (self, &opts, a, mtree, modifier, cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (archive_read_close (a) != ARCHIVE_OK)
|
||||
{
|
||||
propagate_libarchive_error (error, a);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
g_autoptr(OtAutoArchiveRead) a = ot_open_archive_read (gs_file_get_path_cached (archive), error);
|
||||
if (a)
|
||||
{
|
||||
(void)archive_read_close (a);
|
||||
}
|
||||
return ret;
|
||||
return write_archive_to_mtree (self, a, mtree, modifier, autocreate_parents, cancellable, error);
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"This version of ostree is not compiled with libarchive support");
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_write_archive_to_mtree_from_fd:
|
||||
* @self: An #OstreeRepo
|
||||
* @fd: A file descriptor to read the archive from
|
||||
* @mtree: The #OstreeMutableTree to write to
|
||||
* @modifier: (allow-none): Optional commit modifier
|
||||
* @autocreate_parents: Autocreate parent directories
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*
|
||||
* Read an archive from @fd and import it into the repository, writing
|
||||
* its file structure to @mtree.
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_write_archive_to_mtree_from_fd (OstreeRepo *self,
|
||||
int fd,
|
||||
OstreeMutableTree *mtree,
|
||||
OstreeRepoCommitModifier *modifier,
|
||||
gboolean autocreate_parents,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
g_autoptr(OtAutoArchiveRead) a = ot_open_archive_read_fd (fd, error);
|
||||
if (a)
|
||||
return write_archive_to_mtree (self, a, mtree, modifier, autocreate_parents, cancellable, error);
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"This version of ostree is not compiled with libarchive support");
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ _ostree_repo_commit_modifier_apply (OstreeRepo *self,
|
|||
gboolean
|
||||
_ostree_repo_remote_name_is_file (const char *remote_name);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
OstreeGpgVerifyResult *
|
||||
_ostree_repo_gpg_verify_with_metadata (OstreeRepo *self,
|
||||
GBytes *signed_data,
|
||||
|
|
@ -350,6 +351,7 @@ _ostree_repo_verify_commit_internal (OstreeRepo *self,
|
|||
GFile *extra_keyring,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
typedef enum {
|
||||
_OSTREE_REPO_IMPORT_FLAGS_NONE,
|
||||
|
|
|
|||
|
|
@ -473,6 +473,8 @@ ostree_repo_prune (OstreeRepo *self,
|
|||
* statistics on objects that would be deleted, without actually deleting them.
|
||||
*
|
||||
* Locking: exclusive
|
||||
*
|
||||
* Since: 2017.1
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_prune_from_reachable (OstreeRepo *self,
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@ typedef struct {
|
|||
gint n_scanned_metadata;
|
||||
|
||||
gboolean gpg_verify;
|
||||
gboolean gpg_verify_summary;
|
||||
gboolean require_static_deltas;
|
||||
gboolean disable_static_deltas;
|
||||
gboolean gpg_verify_summary;
|
||||
gboolean has_tombstone_commits;
|
||||
|
||||
GBytes *summary_data;
|
||||
|
|
@ -114,7 +114,7 @@ typedef struct {
|
|||
GVariant *summary;
|
||||
GHashTable *summary_deltas_checksums;
|
||||
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 *verified_commits; /* Set<checksum> of commits that have been verified */
|
||||
GHashTable *ref_keyring_map; /* Maps OstreeCollectionRef to keyring remote name */
|
||||
GPtrArray *static_delta_superblocks;
|
||||
GHashTable *expected_commit_sizes; /* Maps commit checksum to known size */
|
||||
|
|
@ -261,7 +261,7 @@ static gboolean scan_one_metadata_object (OtPullData *pull_data,
|
|||
GError **error);
|
||||
static void scan_object_queue_data_free (ScanObjectQueueData *scan_data);
|
||||
static gboolean
|
||||
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
||||
ostree_verify_unwritten_commit (OtPullData *pull_data,
|
||||
const char *checksum,
|
||||
GVariant *commit,
|
||||
GVariant *detached_metadata,
|
||||
|
|
@ -269,7 +269,6 @@ gpg_verify_unwritten_commit (OtPullData *pull_data,
|
|||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
static gboolean
|
||||
update_progress (gpointer user_data)
|
||||
{
|
||||
|
|
@ -1294,21 +1293,21 @@ meta_fetch_on_complete (GObject *object,
|
|||
if (!_ostree_verify_metadata_object (objtype, checksum, metadata, error))
|
||||
goto out;
|
||||
|
||||
/* For commit objects, check the GPG signature before writing to the repo,
|
||||
/* For commit objects, check the signature before writing to the repo,
|
||||
* and also write the .commitpartial to say that we're still processing
|
||||
* this commit.
|
||||
*/
|
||||
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
|
||||
{
|
||||
/* Do GPG verification. `detached_data` may be NULL if no detached
|
||||
/* Do signature verification. `detached_data` may be NULL if no detached
|
||||
* metadata was found during pull; that's handled by
|
||||
* gpg_verify_unwritten_commit(). If we ever change the pull code to
|
||||
* ostree_ostree_verify_unwritten_commit(). If we ever change the pull code to
|
||||
* not always fetch detached metadata, this bit will have to learn how
|
||||
* to look up from the disk state as well, or insert the on-disk
|
||||
* metadata into this hash.
|
||||
*/
|
||||
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 (!ostree_verify_unwritten_commit (pull_data, checksum, metadata, detached_data,
|
||||
fetch_data->requested_ref, pull_data->cancellable, error))
|
||||
goto out;
|
||||
|
||||
|
|
@ -1433,6 +1432,7 @@ static_deltapart_fetch_on_complete (GObject *object,
|
|||
g_clear_pointer (&fetch_data, fetch_static_delta_data_free);
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static gboolean
|
||||
process_verify_result (OtPullData *pull_data,
|
||||
const char *checksum,
|
||||
|
|
@ -1458,13 +1458,14 @@ process_verify_result (OtPullData *pull_data,
|
|||
* the case of "written but not verified". But we also don't want to check
|
||||
* twice, as that'd result in duplicate signals.
|
||||
*/
|
||||
g_hash_table_add (pull_data->gpg_verified_commits, g_strdup (checksum));
|
||||
g_hash_table_add (pull_data->verified_commits, g_strdup (checksum));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
static gboolean
|
||||
gpg_verify_unwritten_commit (OtPullData *pull_data,
|
||||
ostree_verify_unwritten_commit (OtPullData *pull_data,
|
||||
const char *checksum,
|
||||
GVariant *commit,
|
||||
GVariant *detached_metadata,
|
||||
|
|
@ -1472,12 +1473,13 @@ gpg_verify_unwritten_commit (OtPullData *pull_data,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (pull_data->gpg_verify)
|
||||
{
|
||||
const char *keyring_remote = NULL;
|
||||
|
||||
/* 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->verified_commits, checksum))
|
||||
return TRUE;
|
||||
|
||||
if (ref != NULL)
|
||||
|
|
@ -1494,6 +1496,7 @@ gpg_verify_unwritten_commit (OtPullData *pull_data,
|
|||
if (!process_verify_result (pull_data, checksum, result, error))
|
||||
return FALSE;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1702,6 +1705,7 @@ ostree_repo_resolve_keyring_for_collection (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
gsize i;
|
||||
g_auto(GStrv) remotes = NULL;
|
||||
g_autoptr(OstreeRemote) keyring_remote = NULL;
|
||||
|
|
@ -1763,6 +1767,12 @@ ostree_repo_resolve_keyring_for_collection (OstreeRepo *self,
|
|||
collection_id);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return NULL;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBCURL_OR_LIBSOUP
|
||||
|
|
@ -1792,11 +1802,12 @@ scan_commit_object (OtPullData *pull_data,
|
|||
GINT_TO_POINTER (depth));
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/* See comment in process_verify_result() - we now gpg check before writing,
|
||||
* but also ensure we've done it here if not already.
|
||||
*/
|
||||
if (pull_data->gpg_verify &&
|
||||
!g_hash_table_contains (pull_data->gpg_verified_commits, checksum))
|
||||
!g_hash_table_contains (pull_data->verified_commits, checksum))
|
||||
{
|
||||
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
||||
const char *keyring_remote = NULL;
|
||||
|
|
@ -1814,6 +1825,7 @@ scan_commit_object (OtPullData *pull_data,
|
|||
if (!process_verify_result (pull_data, checksum, result, error))
|
||||
return FALSE;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
/* If we found a legacy transaction flag, assume we have to scan.
|
||||
* We always do a scan of dirtree objects; see
|
||||
|
|
@ -2401,7 +2413,7 @@ process_one_static_delta (OtPullData *pull_data,
|
|||
g_autofree char *detached_path = _ostree_get_relative_static_delta_path (from_revision, to_revision, "commitmeta");
|
||||
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 (!ostree_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data,
|
||||
ref, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -2742,6 +2754,7 @@ on_superblock_fetched (GObject *src,
|
|||
ot_checksum_update_bytes (&hasher, delta_superblock_data);
|
||||
ot_checksum_get_digest (&hasher, actual_summary_digest, sizeof (actual_summary_digest));
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/* At this point we've GPG verified the data, so in theory
|
||||
* could trust that they provided the right data, but let's
|
||||
* make this a hard error.
|
||||
|
|
@ -2752,6 +2765,7 @@ on_superblock_fetched (GObject *src,
|
|||
"GPG verification enabled, but no summary signatures found (use gpg-verify-summary=false in remote config to disable)");
|
||||
goto out;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
if (expected_summary_digest && memcmp (expected_summary_digest, actual_summary_digest, sizeof (actual_summary_digest)))
|
||||
{
|
||||
|
|
@ -2868,7 +2882,7 @@ _ostree_repo_load_cache_summary_if_same_sig (OstreeRepo *self,
|
|||
if (prev_fd < 0)
|
||||
return TRUE; /* Note early return */
|
||||
|
||||
g_autoptr(GBytes) old_sig_contents = glnx_fd_readall_bytes (prev_fd, cancellable, error);
|
||||
g_autoptr(GBytes) old_sig_contents = ot_fd_readall_or_mmap (prev_fd, 0, error);
|
||||
if (!old_sig_contents)
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -3618,6 +3632,17 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
pull_data->remote_name = g_strdup (pull_data->remote_refspec_name);
|
||||
}
|
||||
|
||||
#ifdef OSTREE_DISABLE_GPGME
|
||||
/* Explicitly fail here if gpg verification is requested and we have no GPG support */
|
||||
if (opt_gpg_verify_set || opt_gpg_verify_summary_set)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
|
||||
g_return_val_if_fail (pull_data->maxdepth >= -1, FALSE);
|
||||
g_return_val_if_fail (!pull_data->timestamp_check || pull_data->maxdepth == 0, FALSE);
|
||||
|
|
@ -3671,7 +3696,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
pull_data->ref_original_commits = g_hash_table_new_full (ostree_collection_ref_hash, ostree_collection_ref_equal,
|
||||
(GDestroyNotify)NULL,
|
||||
(GDestroyNotify)g_free);
|
||||
pull_data->gpg_verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
pull_data->verified_commits = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
(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);
|
||||
|
|
@ -3745,6 +3770,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
g_free (pull_data->remote_name);
|
||||
pull_data->remote_name = g_strdup (remote_name_or_baseurl);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/* Fetch GPG verification settings from remote if it wasn't already
|
||||
* explicitly set in the options. */
|
||||
if (!opt_gpg_verify_set)
|
||||
|
|
@ -3756,6 +3782,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name,
|
||||
&pull_data->gpg_verify_summary, error))
|
||||
goto out;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
/* NOTE: If changing this, see the matching implementation in
|
||||
* ostree-sysroot-upgrader.c
|
||||
|
|
@ -4060,12 +4087,14 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
goto out;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (!bytes_summary && pull_data->gpg_verify_summary)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||
"GPG verification enabled, but no summary found (use gpg-verify-summary=false in remote config to disable)");
|
||||
goto out;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
if (!bytes_summary && pull_data->require_static_deltas)
|
||||
{
|
||||
|
|
@ -4074,6 +4103,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
goto out;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (!bytes_sig && pull_data->gpg_verify_summary)
|
||||
{
|
||||
g_set_error (error, OSTREE_GPG_ERROR, OSTREE_GPG_ERROR_NO_SIGNATURE,
|
||||
|
|
@ -4132,6 +4162,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
if (bytes_summary)
|
||||
{
|
||||
|
|
@ -4334,39 +4365,40 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
GLNX_HASH_TABLE_FOREACH_KV (requested_refs_to_fetch, const OstreeCollectionRef*, ref,
|
||||
const char*, override_commitid)
|
||||
{
|
||||
g_autofree char *contents = NULL;
|
||||
g_autofree char *checksum = NULL;
|
||||
g_autoptr(OstreeCollectionRef) ref_with_collection = NULL;
|
||||
|
||||
/* Support specifying "" for an override commitid */
|
||||
if (override_commitid && *override_commitid)
|
||||
{
|
||||
g_hash_table_replace (updated_requested_refs_to_fetch, ostree_collection_ref_dup (ref), g_strdup (override_commitid));
|
||||
ref_with_collection = ostree_collection_ref_dup (ref);
|
||||
checksum = g_strdup (override_commitid);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_autoptr(OstreeCollectionRef) ref_with_collection = NULL;
|
||||
|
||||
if (pull_data->summary)
|
||||
{
|
||||
gsize commit_size = 0;
|
||||
guint64 *malloced_size;
|
||||
g_autofree gchar *collection_id = NULL;
|
||||
|
||||
if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &contents, &commit_size, &collection_id, error))
|
||||
if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &checksum, &commit_size, &collection_id, error))
|
||||
goto out;
|
||||
|
||||
ref_with_collection = ostree_collection_ref_new (collection_id, ref->ref_name);
|
||||
|
||||
malloced_size = g_new0 (guint64, 1);
|
||||
*malloced_size = commit_size;
|
||||
g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (contents), malloced_size);
|
||||
g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (checksum), malloced_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!fetch_ref_contents (pull_data, main_collection_id, ref, &contents, cancellable, error))
|
||||
if (!fetch_ref_contents (pull_data, main_collection_id, ref, &checksum, cancellable, error))
|
||||
goto out;
|
||||
|
||||
ref_with_collection = ostree_collection_ref_dup (ref);
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have timestamp checking enabled, find the current value of
|
||||
* the ref, and store its timestamp in the hash map, to check later.
|
||||
|
|
@ -4388,8 +4420,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
|
||||
g_hash_table_replace (updated_requested_refs_to_fetch,
|
||||
g_steal_pointer (&ref_with_collection),
|
||||
g_steal_pointer (&contents));
|
||||
}
|
||||
g_steal_pointer (&checksum));
|
||||
}
|
||||
|
||||
g_hash_table_unref (requested_refs_to_fetch);
|
||||
|
|
@ -4613,17 +4644,23 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
g_string_append_printf (msg, "libostree pull from '%s' for %u refs complete",
|
||||
pull_data->remote_name, g_hash_table_size (requested_refs_to_fetch));
|
||||
|
||||
const char *gpg_verify_state;
|
||||
const char *verify_state;
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (pull_data->gpg_verify_summary)
|
||||
{
|
||||
if (pull_data->gpg_verify)
|
||||
gpg_verify_state = "summary+commit";
|
||||
verify_state = "summary+commit";
|
||||
else
|
||||
gpg_verify_state = "summary-only";
|
||||
verify_state = "summary-only";
|
||||
}
|
||||
else
|
||||
gpg_verify_state = (pull_data->gpg_verify ? "commit" : "disabled");
|
||||
g_string_append_printf (msg, "\nsecurity: GPG: %s ", gpg_verify_state);
|
||||
verify_state = (pull_data->gpg_verify ? "commit" : "disabled");
|
||||
g_string_append_printf (msg, "\nsecurity: GPG: %s ", verify_state);
|
||||
#else
|
||||
verify_state = "disabled";
|
||||
g_string_append_printf (msg, "\nsecurity: %s ", verify_state);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0];
|
||||
g_autofree char *first_scheme = _ostree_fetcher_uri_get_scheme (first_uri);
|
||||
if (g_str_has_prefix (first_scheme, "http"))
|
||||
|
|
@ -4658,7 +4695,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
ot_journal_send ("MESSAGE=%s", msg->str,
|
||||
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_MESSAGE_FETCH_COMPLETE_ID),
|
||||
"OSTREE_REMOTE=%s", pull_data->remote_name,
|
||||
"OSTREE_GPG=%s", gpg_verify_state,
|
||||
"OSTREE_GPG=%s", verify_state,
|
||||
"OSTREE_SECONDS=%u", n_seconds,
|
||||
"OSTREE_XFER_SIZE=%s", formatted_xferred,
|
||||
NULL);
|
||||
|
|
@ -4718,7 +4755,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||
g_clear_pointer (&pull_data->fetched_detached_metadata, (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->gpg_verified_commits, (GDestroyNotify) g_hash_table_unref);
|
||||
g_clear_pointer (&pull_data->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_fallback_content, (GDestroyNotify) g_hash_table_unref);
|
||||
|
|
@ -5970,7 +6007,11 @@ ostree_repo_pull_from_remotes_async (OstreeRepo *self,
|
|||
|
||||
g_variant_dict_insert (&local_options_dict, "flags", "i", OSTREE_REPO_PULL_FLAGS_UNTRUSTED | flags);
|
||||
g_variant_dict_insert_value (&local_options_dict, "collection-refs", g_variant_builder_end (&refs_to_pull_builder));
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
g_variant_dict_insert (&local_options_dict, "gpg-verify", "b", TRUE);
|
||||
#else
|
||||
g_variant_dict_insert (&local_options_dict, "gpg-verify", "b", FALSE);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
g_variant_dict_insert (&local_options_dict, "gpg-verify-summary", "b", FALSE);
|
||||
g_variant_dict_insert (&local_options_dict, "inherit-transaction", "b", TRUE);
|
||||
if (result->remote->refspec_name != NULL)
|
||||
|
|
@ -6103,6 +6144,8 @@ ostree_repo_pull_from_remotes_finish (OstreeRepo *self,
|
|||
* means return errors without retrying
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on failure
|
||||
*
|
||||
* Since: 2016.6
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
||||
|
|
@ -6116,8 +6159,10 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
|||
g_autofree char *metalink_url_string = NULL;
|
||||
g_autoptr(GBytes) summary = NULL;
|
||||
g_autoptr(GBytes) signatures = NULL;
|
||||
gboolean ret = FALSE;
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
gboolean gpg_verify_summary;
|
||||
#endif
|
||||
gboolean ret = FALSE;
|
||||
gboolean summary_is_from_cache;
|
||||
|
||||
g_return_val_if_fail (OSTREE_REPO (self), FALSE);
|
||||
|
|
@ -6138,6 +6183,7 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
|||
error))
|
||||
goto out;
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (!ostree_repo_remote_get_gpg_verify_summary (self, name, &gpg_verify_summary, error))
|
||||
goto out;
|
||||
|
||||
|
|
@ -6191,6 +6237,10 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
g_message ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
if (out_summary != NULL)
|
||||
*out_summary = g_steal_pointer (&summary);
|
||||
|
||||
|
|
|
|||
|
|
@ -482,6 +482,8 @@ ostree_repo_resolve_rev (OstreeRepo *self,
|
|||
*
|
||||
* The flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY is implied so
|
||||
* using it has no effect.
|
||||
*
|
||||
* Since: 2016.7
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_resolve_rev_ext (OstreeRepo *self,
|
||||
|
|
@ -856,6 +858,8 @@ ostree_repo_list_refs (OstreeRepo *self,
|
|||
* @out_all_refs will be returned as a mapping from refspecs (including the
|
||||
* remote name) to checksums. Differently from ostree_repo_list_refs(), the
|
||||
* @refspec_prefix will not be removed from the refspecs in the hash table.
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_list_refs_ext (OstreeRepo *self,
|
||||
|
|
|
|||
|
|
@ -139,9 +139,11 @@ G_STATIC_ASSERT(sizeof(OstreeRepoPruneOptions) ==
|
|||
typedef struct {
|
||||
GObjectClass parent_class;
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
void (*gpg_verify_result) (OstreeRepo *self,
|
||||
const char *checksum,
|
||||
OstreeGpgVerifyResult *result);
|
||||
#endif
|
||||
} OstreeRepoClass;
|
||||
|
||||
enum {
|
||||
|
|
@ -157,7 +159,9 @@ enum {
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (OstreeRepo, ostree_repo, G_TYPE_OBJECT)
|
||||
|
||||
|
|
@ -786,6 +790,8 @@ _ostree_repo_remote_name_is_file (const char *remote_name)
|
|||
* option name. If an error is returned, @out_value will be set to %NULL.
|
||||
*
|
||||
* Returns: %TRUE on success, otherwise %FALSE with @error set
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_get_remote_option (OstreeRepo *self,
|
||||
|
|
@ -864,6 +870,8 @@ ostree_repo_get_remote_option (OstreeRepo *self,
|
|||
* to %NULL.
|
||||
*
|
||||
* Returns: %TRUE on success, otherwise %FALSE with @error set
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_get_remote_list_option (OstreeRepo *self,
|
||||
|
|
@ -939,6 +947,8 @@ ostree_repo_get_remote_list_option (OstreeRepo *self,
|
|||
* error is returned, @out_value will be set to %FALSE.
|
||||
*
|
||||
* Returns: %TRUE on success, otherwise %FALSE with @error set
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_get_remote_boolean_option (OstreeRepo *self,
|
||||
|
|
@ -1161,6 +1171,7 @@ ostree_repo_class_init (OstreeRepoClass *klass)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/**
|
||||
* OstreeRepo::gpg-verify-result:
|
||||
* @self: an #OstreeRepo
|
||||
|
|
@ -1183,23 +1194,27 @@ ostree_repo_class_init (OstreeRepoClass *klass)
|
|||
G_TYPE_NONE, 2,
|
||||
G_TYPE_STRING,
|
||||
OSTREE_TYPE_GPG_VERIFY_RESULT);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
static void
|
||||
ostree_repo_init (OstreeRepo *self)
|
||||
{
|
||||
static gsize gpgme_initialized;
|
||||
const GDebugKey test_error_keys[] = {
|
||||
{ "pre-commit", OSTREE_REPO_TEST_ERROR_PRE_COMMIT },
|
||||
{ "invalid-cache", OSTREE_REPO_TEST_ERROR_INVALID_CACHE },
|
||||
};
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static gsize gpgme_initialized;
|
||||
|
||||
if (g_once_init_enter (&gpgme_initialized))
|
||||
{
|
||||
gpgme_check_version (NULL);
|
||||
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
|
||||
g_once_init_leave (&gpgme_initialized, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
self->test_error_flags = g_parse_debug_string (g_getenv ("OSTREE_REPO_TEST_ERROR"),
|
||||
test_error_keys, G_N_ELEMENTS (test_error_keys));
|
||||
|
|
@ -1255,6 +1270,8 @@ repo_open_at_take_fd (int *dfd,
|
|||
* already extant repository. If you want to create one, use ostree_repo_create_at().
|
||||
*
|
||||
* Returns: (transfer full): An accessor object for an OSTree repository located at @dfd + @path
|
||||
*
|
||||
* Since: 2017.10
|
||||
*/
|
||||
OstreeRepo*
|
||||
ostree_repo_open_at (int dfd,
|
||||
|
|
@ -2009,8 +2026,17 @@ ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
||||
TRUE, out_gpg_verify, error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
if (out_gpg_verify != NULL)
|
||||
*out_gpg_verify = FALSE;
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2032,17 +2058,26 @@ ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
|||
gboolean *out_gpg_verify_summary,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify-summary",
|
||||
FALSE, out_gpg_verify_summary, error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
if (out_gpg_verify_summary != NULL)
|
||||
*out_gpg_verify_summary = FALSE;
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_remote_gpg_import:
|
||||
* @self: Self
|
||||
* @name: name of a remote
|
||||
* @source_stream: (allow-none): a #GInputStream, or %NULL
|
||||
* @key_ids: (array zero-terminated=1) (element-type utf8) (allow-none): a %NULL-terminated array of GPG key IDs, or %NULL
|
||||
* @out_imported: (allow-none): return location for the number of imported
|
||||
* @source_stream: (nullable): a #GInputStream, or %NULL
|
||||
* @key_ids: (array zero-terminated=1) (element-type utf8) (nullable): a %NULL-terminated array of GPG key IDs, or %NULL
|
||||
* @out_imported: (out) (optional): return location for the number of imported
|
||||
* keys, or %NULL
|
||||
* @cancellable: a #GCancellable
|
||||
* @error: a #GError
|
||||
|
|
@ -2066,6 +2101,7 @@ ostree_repo_remote_gpg_import (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
OstreeRemote *remote;
|
||||
g_auto(gpgme_ctx_t) source_context = NULL;
|
||||
g_auto(gpgme_ctx_t) target_context = NULL;
|
||||
|
|
@ -2292,15 +2328,25 @@ out:
|
|||
if (remote != NULL)
|
||||
ostree_remote_unref (remote);
|
||||
|
||||
if (source_tmp_dir != NULL)
|
||||
if (source_tmp_dir != NULL) {
|
||||
ot_gpgme_kill_agent (source_tmp_dir);
|
||||
(void) glnx_shutil_rm_rf_at (AT_FDCWD, source_tmp_dir, NULL, NULL);
|
||||
}
|
||||
|
||||
if (target_tmp_dir != NULL)
|
||||
if (target_tmp_dir != NULL) {
|
||||
ot_gpgme_kill_agent (target_tmp_dir);
|
||||
(void) glnx_shutil_rm_rf_at (AT_FDCWD, target_tmp_dir, NULL, NULL);
|
||||
}
|
||||
|
||||
g_prefix_error (error, "GPG: ");
|
||||
|
||||
return ret;
|
||||
#else /* OSTREE_DISABLE_GPGME */
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2377,6 +2423,12 @@ ostree_repo_mode_to_string (OstreeRepoMode mode,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_mode_from_string:
|
||||
* @mode: a repo mode as a string
|
||||
* @out_mode: (out): the corresponding #OstreeRepoMode
|
||||
* @error: a #GError if the string is not a valid mode
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_mode_from_string (const char *mode,
|
||||
OstreeRepoMode *out_mode,
|
||||
|
|
@ -2570,6 +2622,8 @@ ostree_repo_create (OstreeRepo *self,
|
|||
* - collection-id: s: Set as collection ID in repo/config (Since 2017.9)
|
||||
*
|
||||
* Returns: (transfer full): A new OSTree repository reference
|
||||
*
|
||||
* Since: 2017.10
|
||||
*/
|
||||
OstreeRepo *
|
||||
ostree_repo_create_at (int dfd,
|
||||
|
|
@ -3149,6 +3203,8 @@ reload_sysroot_config (OstreeRepo *self,
|
|||
*
|
||||
* By default, an #OstreeRepo will cache the remote configuration and its
|
||||
* own repo/config data. This API can be used to reload it.
|
||||
*
|
||||
* Since: 2017.2
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_reload_config (OstreeRepo *self,
|
||||
|
|
@ -3313,6 +3369,8 @@ ostree_repo_set_disable_fsync (OstreeRepo *self,
|
|||
* per-remote summary caches. Setting this manually is useful when
|
||||
* doing operations on a system repo as a user because you don't have
|
||||
* write permissions in the repo, where the cache is normally stored.
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_set_cache_dir (OstreeRepo *self,
|
||||
|
|
@ -3394,6 +3452,7 @@ ostree_repo_get_path (OstreeRepo *self)
|
|||
* repository (to see whether a ref was written).
|
||||
*
|
||||
* Returns: File descriptor for repository root - owned by @self
|
||||
* Since: 2016.4
|
||||
*/
|
||||
int
|
||||
ostree_repo_get_dfd (OstreeRepo *self)
|
||||
|
|
@ -3466,12 +3525,15 @@ ostree_repo_get_mode (OstreeRepo *self)
|
|||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_get_min_free_space:
|
||||
* ostree_repo_get_min_free_space_bytes:
|
||||
* @self: Repo
|
||||
* @out_reserved_bytes: (out): Location to store the result
|
||||
* @error: Return location for a #GError
|
||||
*
|
||||
* It can be used to query the value (in bytes) of min-free-space-* config option.
|
||||
* Determine the number of bytes of free disk space that are reserved according
|
||||
* to the repo config and return that number in @out_reserved_bytes. See the
|
||||
* documentation for the core.min-free-space-size and
|
||||
* core.min-free-space-percent repo config options.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE otherwise.
|
||||
* Since: 2018.9
|
||||
|
|
@ -4334,6 +4396,8 @@ ostree_repo_import_object_from (OstreeRepo *self,
|
|||
* this will simply be a fast Unix hard link operation.
|
||||
*
|
||||
* Otherwise, a copy will be performed.
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_repo_import_object_from_with_trust (OstreeRepo *self,
|
||||
|
|
@ -4874,6 +4938,7 @@ ostree_repo_append_gpg_signature (OstreeRepo *self,
|
|||
error))
|
||||
return FALSE;
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
g_autoptr(GVariant) new_metadata =
|
||||
_ostree_detached_metadata_append_gpg_sig (metadata, signature_bytes);
|
||||
|
||||
|
|
@ -4885,8 +4950,15 @@ ostree_repo_append_gpg_signature (OstreeRepo *self,
|
|||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static gboolean
|
||||
sign_data (OstreeRepo *self,
|
||||
GBytes *input_data,
|
||||
|
|
@ -4947,6 +5019,7 @@ sign_data (OstreeRepo *self,
|
|||
*out_signature = g_mapped_file_get_bytes (signature_file);
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
/**
|
||||
* ostree_repo_sign_commit:
|
||||
|
|
@ -4967,6 +5040,7 @@ ostree_repo_sign_commit (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
g_autoptr(GBytes) commit_data = NULL;
|
||||
g_autoptr(GBytes) signature = NULL;
|
||||
|
||||
|
|
@ -5030,6 +5104,10 @@ ostree_repo_sign_commit (OstreeRepo *self,
|
|||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
/* FIXME: Return false until refactoring */
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5076,6 +5154,7 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
glnx_autofd int fd = -1;
|
||||
if (!glnx_openat_rdonly (self->repo_dir_fd, "summary", TRUE, &fd, error))
|
||||
return FALSE;
|
||||
|
|
@ -5118,8 +5197,15 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
|
|||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/* Special remote for _ostree_repo_gpg_verify_with_metadata() */
|
||||
static const char *OSTREE_ALL_REMOTES = "__OSTREE_ALL_REMOTES__";
|
||||
|
||||
|
|
@ -5353,6 +5439,7 @@ _ostree_repo_verify_commit_internal (OstreeRepo *self,
|
|||
keyringdir, extra_keyring,
|
||||
cancellable, error);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
/**
|
||||
* ostree_repo_verify_commit:
|
||||
|
|
@ -5376,6 +5463,7 @@ ostree_repo_verify_commit (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
||||
|
||||
result = ostree_repo_verify_commit_ext (self, commit_checksum,
|
||||
|
|
@ -5385,6 +5473,13 @@ ostree_repo_verify_commit (OstreeRepo *self,
|
|||
if (!ostree_gpg_verify_result_require_valid_signature (result, error))
|
||||
return glnx_prefix_error (error, "Commit %s", commit_checksum);
|
||||
return TRUE;
|
||||
#else
|
||||
/* FIXME: Return false until refactoring */
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return FALSE;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5409,6 +5504,7 @@ ostree_repo_verify_commit_ext (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return _ostree_repo_verify_commit_internal (self,
|
||||
commit_checksum,
|
||||
NULL,
|
||||
|
|
@ -5416,6 +5512,12 @@ ostree_repo_verify_commit_ext (OstreeRepo *self,
|
|||
extra_keyring,
|
||||
cancellable,
|
||||
error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return NULL;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5431,6 +5533,8 @@ ostree_repo_verify_commit_ext (OstreeRepo *self,
|
|||
* configured for @remote.
|
||||
*
|
||||
* Returns: (transfer full): an #OstreeGpgVerifyResult, or %NULL on error
|
||||
*
|
||||
* Since: 2016.14
|
||||
*/
|
||||
OstreeGpgVerifyResult *
|
||||
ostree_repo_verify_commit_for_remote (OstreeRepo *self,
|
||||
|
|
@ -5439,6 +5543,7 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return _ostree_repo_verify_commit_internal (self,
|
||||
commit_checksum,
|
||||
remote_name,
|
||||
|
|
@ -5446,6 +5551,12 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self,
|
|||
NULL,
|
||||
cancellable,
|
||||
error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return NULL;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5466,6 +5577,8 @@ ostree_repo_verify_commit_for_remote (OstreeRepo *self,
|
|||
* the verifications using GPG keys in the keyrings of all remotes.
|
||||
*
|
||||
* Returns: (transfer full): an #OstreeGpgVerifyResult, or %NULL on error
|
||||
*
|
||||
* Since: 2016.6
|
||||
*/
|
||||
OstreeGpgVerifyResult *
|
||||
ostree_repo_gpg_verify_data (OstreeRepo *self,
|
||||
|
|
@ -5481,6 +5594,7 @@ ostree_repo_gpg_verify_data (OstreeRepo *self,
|
|||
g_return_val_if_fail (data != NULL, NULL);
|
||||
g_return_val_if_fail (signatures != NULL, NULL);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return _ostree_repo_gpg_verify_data_internal (self,
|
||||
(remote_name != NULL) ? remote_name : OSTREE_ALL_REMOTES,
|
||||
data,
|
||||
|
|
@ -5489,6 +5603,12 @@ ostree_repo_gpg_verify_data (OstreeRepo *self,
|
|||
extra_keyring,
|
||||
cancellable,
|
||||
error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return NULL;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5523,6 +5643,7 @@ ostree_repo_verify_summary (OstreeRepo *self,
|
|||
signatures_variant = g_variant_new_from_bytes (OSTREE_SUMMARY_SIG_GVARIANT_FORMAT,
|
||||
signatures, FALSE);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
return _ostree_repo_gpg_verify_with_metadata (self,
|
||||
summary,
|
||||
signatures_variant,
|
||||
|
|
@ -5530,6 +5651,12 @@ ostree_repo_verify_summary (OstreeRepo *self,
|
|||
NULL, NULL,
|
||||
cancellable,
|
||||
error);
|
||||
#else
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"'%s': GPG feature is disabled in a build time",
|
||||
__FUNCTION__);
|
||||
return NULL;
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
/* Add an entry for a @ref ↦ @checksum mapping to an `a(s(t@ay@a{sv}))`
|
||||
|
|
|
|||
|
|
@ -199,18 +199,6 @@ gboolean ostree_repo_remote_get_url (OstreeRepo *self,
|
|||
char **out_url,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
|
||||
const char *name,
|
||||
gboolean *out_gpg_verify,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||
const char *name,
|
||||
gboolean *out_gpg_verify_summary,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_get_remote_option (OstreeRepo *self,
|
||||
const char *remote_name,
|
||||
|
|
@ -234,14 +222,6 @@ gboolean ostree_repo_get_remote_boolean_option (OstreeRepo *self,
|
|||
gboolean *out_value,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_gpg_import (OstreeRepo *self,
|
||||
const char *name,
|
||||
GInputStream *source_stream,
|
||||
const char * const *key_ids,
|
||||
guint *out_imported,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_fetch_summary (OstreeRepo *self,
|
||||
|
|
@ -737,6 +717,16 @@ gboolean ostree_repo_write_archive_to_mtree (OstreeRepo *
|
|||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_write_archive_to_mtree_from_fd (OstreeRepo *self,
|
||||
int fd,
|
||||
OstreeMutableTree *mtree,
|
||||
OstreeRepoCommitModifier *modifier,
|
||||
gboolean autocreate_parents,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/**
|
||||
* OstreeRepoImportArchiveTranslatePathname:
|
||||
* @repo: Repo
|
||||
|
|
@ -1327,9 +1317,37 @@ gboolean ostree_repo_sign_delta (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean
|
||||
ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
|
||||
gboolean ostree_repo_verify_commit (OstreeRepo *self,
|
||||
const gchar *commit_checksum,
|
||||
GFile *keyringdir,
|
||||
GFile *extra_keyring,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
|
||||
const char *name,
|
||||
gboolean *out_gpg_verify,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||
const char *name,
|
||||
gboolean *out_gpg_verify_summary,
|
||||
GError **error);
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_remote_gpg_import (OstreeRepo *self,
|
||||
const char *name,
|
||||
GInputStream *source_stream,
|
||||
const char * const *key_ids,
|
||||
guint *out_imported,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
|
||||
const gchar **key_id,
|
||||
const gchar *homedir,
|
||||
GCancellable *cancellable,
|
||||
|
|
@ -1342,14 +1360,6 @@ gboolean ostree_repo_append_gpg_signature (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_repo_verify_commit (OstreeRepo *self,
|
||||
const gchar *commit_checksum,
|
||||
GFile *keyringdir,
|
||||
GFile *extra_keyring,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
OstreeGpgVerifyResult * ostree_repo_verify_commit_ext (OstreeRepo *self,
|
||||
const gchar *commit_checksum,
|
||||
|
|
|
|||
|
|
@ -430,6 +430,8 @@ ostree_sepolicy_new (GFile *path,
|
|||
* @error: Error
|
||||
*
|
||||
* Returns: (transfer full): An accessor object for SELinux policy in root located at @rootfs_dfd
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
OstreeSePolicy*
|
||||
ostree_sepolicy_new_at (int rootfs_dfd,
|
||||
|
|
@ -472,6 +474,8 @@ ostree_sepolicy_get_name (OstreeSePolicy *self)
|
|||
* @self:
|
||||
*
|
||||
* Returns: (transfer none): Checksum of current policy
|
||||
*
|
||||
* Since: 2016.5
|
||||
*/
|
||||
const char *
|
||||
ostree_sepolicy_get_csum (OstreeSePolicy *self)
|
||||
|
|
|
|||
|
|
@ -1374,7 +1374,7 @@ fsfreeze_thaw_cycle (OstreeSysroot *self,
|
|||
* the filesystem is already frozen (EBUSY).
|
||||
* OK, let's just do a syncfs.
|
||||
*/
|
||||
if (G_IN_SET (errno, EOPNOTSUPP, EPERM, EBUSY))
|
||||
if (G_IN_SET (errno, EOPNOTSUPP, ENOSYS, EPERM, EBUSY))
|
||||
{
|
||||
/* Warn if the filesystem was already frozen */
|
||||
if (errno == EBUSY)
|
||||
|
|
@ -1759,7 +1759,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
|||
ostree_bootconfig_parser_set (bootconfig, "linux", boot_relpath);
|
||||
|
||||
val = ostree_bootconfig_parser_get (bootconfig, "options");
|
||||
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_from_string (val);
|
||||
g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_from_string (val);
|
||||
|
||||
if (kernel_layout->initramfs_namever)
|
||||
{
|
||||
|
|
@ -1772,7 +1772,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
|||
prepare_root_arg = g_strdup_printf ("init=/ostree/boot.%d/%s/%s/%d/usr/lib/ostree/ostree-prepare-root",
|
||||
new_bootversion, osname, bootcsum,
|
||||
ostree_deployment_get_bootserial (deployment));
|
||||
_ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg));
|
||||
ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg));
|
||||
}
|
||||
|
||||
if (kernel_layout->devicetree_namever)
|
||||
|
|
@ -1785,9 +1785,9 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
|||
g_autofree char *ostree_kernel_arg = g_strdup_printf ("ostree=/ostree/boot.%d/%s/%s/%d",
|
||||
new_bootversion, osname, bootcsum,
|
||||
ostree_deployment_get_bootserial (deployment));
|
||||
_ostree_kernel_args_replace_take (kargs, g_steal_pointer (&ostree_kernel_arg));
|
||||
ostree_kernel_args_replace_take (kargs, g_steal_pointer (&ostree_kernel_arg));
|
||||
|
||||
g_autofree char *options_key = _ostree_kernel_args_to_string (kargs);
|
||||
g_autofree char *options_key = ostree_kernel_args_to_string (kargs);
|
||||
ostree_bootconfig_parser_set (bootconfig, "options", options_key);
|
||||
|
||||
glnx_autofd int bootconf_dfd = -1;
|
||||
|
|
@ -1895,9 +1895,9 @@ get_deployment_nonostree_kargs (OstreeDeployment *deployment)
|
|||
/* pick up kernel arguments but filter out ostree= */
|
||||
OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (deployment);
|
||||
const char *boot_options = ostree_bootconfig_parser_get (bootconfig, "options");
|
||||
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_from_string (boot_options);
|
||||
_ostree_kernel_args_replace (kargs, "ostree");
|
||||
return _ostree_kernel_args_to_string (kargs);
|
||||
g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_from_string (boot_options);
|
||||
ostree_kernel_args_replace (kargs, "ostree");
|
||||
return ostree_kernel_args_to_string (kargs);
|
||||
}
|
||||
|
||||
static char*
|
||||
|
|
@ -2170,6 +2170,8 @@ write_deployments_finish (OstreeSysroot *self,
|
|||
* ostree_sysroot_cleanup() at some point after the transaction, or specify
|
||||
* `do_postclean` in @opts. Skipping the post-transaction cleanup is useful
|
||||
* if for example you want to control pruning of the repository.
|
||||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_write_deployments_with_options (OstreeSysroot *self,
|
||||
|
|
@ -2461,9 +2463,9 @@ _ostree_deployment_set_bootconfig_from_kargs (OstreeDeployment *deployment,
|
|||
*/
|
||||
if (override_kernel_argv)
|
||||
{
|
||||
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_append_argv (kargs, override_kernel_argv);
|
||||
g_autofree char *new_options = _ostree_kernel_args_to_string (kargs);
|
||||
g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_append_argv (kargs, override_kernel_argv);
|
||||
g_autofree char *new_options = ostree_kernel_args_to_string (kargs);
|
||||
ostree_bootconfig_parser_set (bootconfig, "options", new_options);
|
||||
}
|
||||
}
|
||||
|
|
@ -2756,6 +2758,8 @@ _ostree_sysroot_deserialize_deployment_from_variant (GVariant *v,
|
|||
*
|
||||
* Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS
|
||||
* shutdown time.
|
||||
*
|
||||
* Since: 2018.5
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_stage_tree (OstreeSysroot *self,
|
||||
|
|
@ -3000,9 +3004,9 @@ ostree_sysroot_deployment_set_kargs (OstreeSysroot *self,
|
|||
g_autoptr(OstreeDeployment) new_deployment = ostree_deployment_clone (deployment);
|
||||
OstreeBootconfigParser *new_bootconfig = ostree_deployment_get_bootconfig (new_deployment);
|
||||
|
||||
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_append_argv (kargs, new_kargs);
|
||||
g_autofree char *new_options = _ostree_kernel_args_to_string (kargs);
|
||||
g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_append_argv (kargs, new_kargs);
|
||||
g_autofree char *new_options = ostree_kernel_args_to_string (kargs);
|
||||
ostree_bootconfig_parser_set (new_bootconfig, "options", new_options);
|
||||
|
||||
g_autoptr(GPtrArray) new_deployments = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "libglnx.h"
|
||||
#include "ostree.h"
|
||||
#include "ostree-kernel-args.h"
|
||||
#include "ostree-bootloader.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
|
|
|||
|
|
@ -855,6 +855,15 @@ _ostree_sysroot_reload_staged (OstreeSysroot *self,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_sysroot_load_if_changed:
|
||||
* @self: #OstreeSysroot
|
||||
* @out_changed: (out caller-allocates):
|
||||
* @cancellable: Cancellable
|
||||
* @error: Error
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_load_if_changed (OstreeSysroot *self,
|
||||
gboolean *out_changed,
|
||||
|
|
@ -1033,6 +1042,8 @@ ostree_sysroot_get_booted_deployment (OstreeSysroot *self)
|
|||
* @self: Sysroot
|
||||
*
|
||||
* Returns: (transfer none): The currently staged deployment, or %NULL if none
|
||||
*
|
||||
* Since: 2018.5
|
||||
*/
|
||||
OstreeDeployment *
|
||||
ostree_sysroot_get_staged_deployment (OstreeSysroot *self)
|
||||
|
|
@ -1144,6 +1155,8 @@ ostree_sysroot_get_repo (OstreeSysroot *self,
|
|||
* has been invoked successfully.
|
||||
*
|
||||
* Returns: (transfer none): The OSTree repository in sysroot @self.
|
||||
*
|
||||
* Since: 2017.7
|
||||
*/
|
||||
OstreeRepo *
|
||||
ostree_sysroot_repo (OstreeSysroot *self)
|
||||
|
|
@ -1475,6 +1488,8 @@ ostree_sysroot_lock_finish (OstreeSysroot *self,
|
|||
* Initialize the directory structure for an "osname", which is a
|
||||
* group of operating system deployments, with a shared `/var`. One
|
||||
* is required for generating a deployment.
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_init_osname (OstreeSysroot *self,
|
||||
|
|
@ -1673,12 +1688,12 @@ clone_deployment (OstreeSysroot *sysroot,
|
|||
/* Copy the bootloader config options */
|
||||
OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (merge_deployment);
|
||||
g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1);
|
||||
g_autoptr(OstreeKernelArgs) kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
g_autoptr(OstreeKernelArgs) kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
|
||||
/* Deploy the copy */
|
||||
g_autoptr(OstreeDeployment) new_deployment = NULL;
|
||||
g_auto(GStrv) kargs_strv = _ostree_kernel_args_to_strv (kargs);
|
||||
g_auto(GStrv) kargs_strv = ostree_kernel_args_to_strv (kargs);
|
||||
if (!ostree_sysroot_deploy_tree (sysroot,
|
||||
ostree_deployment_get_osname (target_deployment),
|
||||
ostree_deployment_get_csum (target_deployment),
|
||||
|
|
@ -1729,6 +1744,8 @@ static gboolean mkdir_unmasked (int dfd,
|
|||
*
|
||||
* The `OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX` state is persistent
|
||||
* across reboots.
|
||||
*
|
||||
* Since: 2016.4
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_deployment_unlock (OstreeSysroot *self,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_RELEASE_VERSION (2)
|
||||
#define OSTREE_RELEASE_VERSION (3)
|
||||
|
||||
/**
|
||||
* OSTREE_VERSION
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_VERSION (2019.2)
|
||||
#define OSTREE_VERSION (2019.3)
|
||||
|
||||
/**
|
||||
* OSTREE_VERSION_S:
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
*
|
||||
* Since: 2017.4
|
||||
*/
|
||||
#define OSTREE_VERSION_S "2019.2"
|
||||
#define OSTREE_VERSION_S "2019.3"
|
||||
|
||||
#define OSTREE_ENCODE_VERSION(year,release) \
|
||||
((year) << 16 | (release))
|
||||
|
|
@ -91,3 +91,13 @@
|
|||
#define OSTREE_CHECK_VERSION(year,release) \
|
||||
(OSTREE_YEAR_VERSION > (year) || \
|
||||
(OSTREE_YEAR_VERSION == (year) && OSTREE_RELEASE_VERSION >= (release)))
|
||||
|
||||
/**
|
||||
* OSTREE_BUILT_FEATURES:
|
||||
*
|
||||
* Whitespace separated set of features this libostree was configured with at build time.
|
||||
* Consult the source code in configure.ac (or the CLI `ostree --version`) for examples.
|
||||
*
|
||||
* Since: 2019.3
|
||||
*/
|
||||
#define OSTREE_BUILT_FEATURES "libcurl libsoup gpgme libarchive selinux openssl libmount release p2p"
|
||||
|
|
|
|||
|
|
@ -91,3 +91,13 @@
|
|||
#define OSTREE_CHECK_VERSION(year,release) \
|
||||
(OSTREE_YEAR_VERSION > (year) || \
|
||||
(OSTREE_YEAR_VERSION == (year) && OSTREE_RELEASE_VERSION >= (release)))
|
||||
|
||||
/**
|
||||
* OSTREE_BUILT_FEATURES:
|
||||
*
|
||||
* Whitespace separated set of features this libostree was configured with at build time.
|
||||
* Consult the source code in configure.ac (or the CLI `ostree --version`) for examples.
|
||||
*
|
||||
* Since: 2019.3
|
||||
*/
|
||||
#define OSTREE_BUILT_FEATURES "@OSTREE_FEATURES@"
|
||||
|
|
|
|||
|
|
@ -39,5 +39,6 @@
|
|||
#include <ostree-repo-finder-config.h>
|
||||
#include <ostree-repo-finder-mount.h>
|
||||
#include <ostree-repo-finder-override.h>
|
||||
#include <ostree-kernel-args.h>
|
||||
#include <ostree-autocleanups.h>
|
||||
#include <ostree-version.h>
|
||||
|
|
|
|||
|
|
@ -437,3 +437,29 @@ ot_gpgme_new_ctx (const char *homedir,
|
|||
|
||||
return g_steal_pointer (&context);
|
||||
}
|
||||
|
||||
void
|
||||
ot_gpgme_kill_agent (const char *homedir)
|
||||
{
|
||||
g_return_if_fail (homedir != NULL);
|
||||
|
||||
/* Run gpg-connect-agent killagent /bye */
|
||||
g_autoptr(GError) local_error = NULL;
|
||||
g_autoptr(GSubprocess) proc = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_SILENCE,
|
||||
&local_error,
|
||||
"gpg-connect-agent",
|
||||
"--homedir",
|
||||
homedir,
|
||||
"killagent",
|
||||
"/bye",
|
||||
NULL);
|
||||
if (proc == NULL) {
|
||||
g_debug ("Spawning gpg-connect-agent failed: %s", local_error->message);
|
||||
return;
|
||||
}
|
||||
if (!g_subprocess_wait_check (proc, NULL, &local_error)) {
|
||||
g_debug ("Killing GPG agent with gpg-connect-agent failed: %s",
|
||||
local_error->message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,4 +46,6 @@ gpgme_data_t ot_gpgme_data_output (GOutputStream *output_stream);
|
|||
gpgme_ctx_t ot_gpgme_new_ctx (const char *homedir,
|
||||
GError **error);
|
||||
|
||||
void ot_gpgme_kill_agent (const char *homedir);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
|||
|
|
@ -62,3 +62,55 @@ ot_parse_keyvalue (const char *keyvalue,
|
|||
*out_value = g_strdup (eq + 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: temporarily copied from GLib: https://github.com/GNOME/glib/blob/a419146578a42c760cff684292465b38df855f75/glib/garray.c#L1664
|
||||
* See documentation at: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-find-with-equal-func
|
||||
*
|
||||
* ot_ptr_array_find_with_equal_func: (skip)
|
||||
* @haystack: pointer array to be searched
|
||||
* @needle: pointer to look for
|
||||
* @equal_func: (nullable): the function to call for each element, which should
|
||||
* return %TRUE when the desired element is found; or %NULL to use pointer
|
||||
* equality
|
||||
* @index_: (optional) (out caller-allocates): return location for the index of
|
||||
* the element, if found
|
||||
*
|
||||
* Checks whether @needle exists in @haystack, using the given @equal_func.
|
||||
* If the element is found, %TRUE is returned and the element’s index is
|
||||
* returned in @index_ (if non-%NULL). Otherwise, %FALSE is returned and @index_
|
||||
* is undefined. If @needle exists multiple times in @haystack, the index of
|
||||
* the first instance is returned.
|
||||
*
|
||||
* @equal_func is called with the element from the array as its first parameter,
|
||||
* and @needle as its second parameter. If @equal_func is %NULL, pointer
|
||||
* equality is used.
|
||||
*
|
||||
* Returns: %TRUE if @needle is one of the elements of @haystack
|
||||
* Since: 2.54
|
||||
*/
|
||||
gboolean
|
||||
ot_ptr_array_find_with_equal_func (GPtrArray *haystack,
|
||||
gconstpointer needle,
|
||||
GEqualFunc equal_func,
|
||||
guint *index_)
|
||||
{
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (haystack != NULL, FALSE);
|
||||
|
||||
if (equal_func == NULL)
|
||||
equal_func = g_direct_equal;
|
||||
|
||||
for (i = 0; i < haystack->len; i++)
|
||||
{
|
||||
if (equal_func (g_ptr_array_index (haystack, i), needle))
|
||||
{
|
||||
if (index_ != NULL)
|
||||
*index_ = i;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,5 +34,10 @@ ot_parse_keyvalue (const char *keyvalue,
|
|||
char **out_key,
|
||||
char **out_value,
|
||||
GError **error);
|
||||
gboolean
|
||||
ot_ptr_array_find_with_equal_func (GPtrArray *haystack,
|
||||
gconstpointer needle,
|
||||
GEqualFunc equal_func,
|
||||
guint *index_);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ gboolean
|
|||
ot_util_filename_validate (const char *name,
|
||||
GError **error)
|
||||
{
|
||||
if (name == NULL)
|
||||
return glnx_throw (error, "Invalid NULL filename");
|
||||
if (strcmp (name, ".") == 0)
|
||||
return glnx_throw (error, "Invalid self-referential filename '.'");
|
||||
if (strcmp (name, "..") == 0)
|
||||
|
|
|
|||
|
|
@ -60,5 +60,9 @@
|
|||
#include <ot-variant-utils.h>
|
||||
#include <ot-variant-builder.h>
|
||||
#include <ot-checksum-utils.h>
|
||||
#include <ot-gpg-utils.h>
|
||||
#include <ot-checksum-instream.h>
|
||||
#include <ot-tool-util.h>
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
#include <ot-gpg-utils.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -72,9 +72,11 @@ static OstreeCommand commands[] = {
|
|||
{ "fsck", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ostree_builtin_fsck,
|
||||
"Check the repository for consistency" },
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
{ "gpg-sign", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ostree_builtin_gpg_sign,
|
||||
"Sign a commit" },
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
{ "init", OSTREE_BUILTIN_FLAG_NO_CHECK,
|
||||
ostree_builtin_init,
|
||||
"Initialize a new empty repository" },
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
#include "ostree.h"
|
||||
#include "otutil.h"
|
||||
|
||||
#include "../libostree/ostree-kernel-args.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
static gboolean opt_retain;
|
||||
|
|
@ -133,20 +131,20 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat
|
|||
g_autoptr(OstreeKernelArgs) kargs = NULL;
|
||||
if (opt_kernel_arg_none)
|
||||
{
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
kargs = ostree_kernel_args_new ();
|
||||
}
|
||||
else if (opt_kernel_proc_cmdline)
|
||||
{
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
if (!_ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error))
|
||||
kargs = ostree_kernel_args_new ();
|
||||
if (!ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
else if (merge_deployment && (opt_kernel_argv || opt_kernel_argv_append))
|
||||
{
|
||||
OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (merge_deployment);
|
||||
g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1);
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
}
|
||||
|
||||
/* Now replace/extend the above set. Note that if no options are specified,
|
||||
|
|
@ -156,19 +154,19 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat
|
|||
if (opt_kernel_argv)
|
||||
{
|
||||
if (!kargs)
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_replace_argv (kargs, opt_kernel_argv);
|
||||
kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_replace_argv (kargs, opt_kernel_argv);
|
||||
}
|
||||
|
||||
if (opt_kernel_argv_append)
|
||||
{
|
||||
if (!kargs)
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
_ostree_kernel_args_append_argv (kargs, opt_kernel_argv_append);
|
||||
kargs = ostree_kernel_args_new ();
|
||||
ostree_kernel_args_append_argv (kargs, opt_kernel_argv_append);
|
||||
}
|
||||
|
||||
g_autoptr(OstreeDeployment) new_deployment = NULL;
|
||||
g_auto(GStrv) kargs_strv = kargs ? _ostree_kernel_args_to_strv (kargs) : NULL;
|
||||
g_auto(GStrv) kargs_strv = kargs ? ostree_kernel_args_to_strv (kargs) : NULL;
|
||||
if (opt_stage)
|
||||
{
|
||||
if (opt_retain_pending || opt_retain_rollback)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@
|
|||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
static gboolean opt_modern;
|
||||
|
||||
static GOptionEntry options[] = {
|
||||
{ "modern", 0, 0, G_OPTION_ARG_NONE, &opt_modern, "Only create /boot and /ostree", NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
@ -58,10 +61,21 @@ ot_admin_builtin_init_fs (int argc, char **argv, OstreeCommandInvocation *invoca
|
|||
if (!glnx_opendirat (AT_FDCWD, sysroot_path, TRUE, &root_dfd, error))
|
||||
return FALSE;
|
||||
|
||||
const char *normal_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"};
|
||||
for (guint i = 0; i < G_N_ELEMENTS (normal_toplevels); i++)
|
||||
/* It's common to want to mount this outside of a deployment as well */
|
||||
if (!glnx_shutil_mkdir_p_at (root_dfd, "boot", 0755, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
/* See https://github.com/coreos/coreos-assembler/pull/688
|
||||
* For Fedora CoreOS at least, we have this now to the point where we don't
|
||||
* need this stuff in the physical sysroot. I'm not sure we ever really did,
|
||||
* but to be conservative, make it opt-in to the new model of just boot/ and ostree/.
|
||||
*/
|
||||
if (!opt_modern)
|
||||
{
|
||||
if (!glnx_shutil_mkdir_p_at (root_dfd, normal_toplevels[i], 0755,
|
||||
const char *traditional_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"};
|
||||
for (guint i = 0; i < G_N_ELEMENTS (traditional_toplevels); i++)
|
||||
{
|
||||
if (!glnx_shutil_mkdir_p_at (root_dfd, traditional_toplevels[i], 0755,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -78,6 +92,8 @@ ot_admin_builtin_init_fs (int argc, char **argv, OstreeCommandInvocation *invoca
|
|||
glnx_set_prefix_error_from_errno (error, "chmod: %s", "tmp");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
g_autoptr(GFile) dir = g_file_new_for_path (sysroot_path);
|
||||
g_autoptr(OstreeSysroot) sysroot = ostree_sysroot_new (dir);
|
||||
if (!ostree_sysroot_ensure_initialized (sysroot, cancellable, error))
|
||||
|
|
|
|||
|
|
@ -52,24 +52,39 @@ ot_admin_builtin_pin (int argc, char **argv, OstreeCommandInvocation *invocation
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
const char *deploy_index_str = argv[1];
|
||||
unsigned int nsuccess = 0;
|
||||
for (unsigned int i = 1; i < argc; i++)
|
||||
{
|
||||
const char *deploy_index_str = argv[i];
|
||||
const int deploy_index = atoi (deploy_index_str);
|
||||
|
||||
g_autoptr(OstreeDeployment) target_deployment = ot_admin_get_indexed_deployment (sysroot, deploy_index, error);
|
||||
g_autoptr(GError) e = NULL;
|
||||
g_autoptr(OstreeDeployment) target_deployment = ot_admin_get_indexed_deployment (sysroot, deploy_index, &e);
|
||||
if (!target_deployment)
|
||||
return FALSE;
|
||||
|
||||
{
|
||||
g_print ("Invalid deployment %s: %s\n", deploy_index_str, e->message);
|
||||
continue;
|
||||
}
|
||||
|
||||
gboolean current_pin = ostree_deployment_is_pinned (target_deployment);
|
||||
const gboolean desired_pin = !opt_unpin;
|
||||
if (current_pin == desired_pin)
|
||||
g_print ("Deployment is already %s\n", current_pin ? "pinned" : "unpinned");
|
||||
{
|
||||
g_print ("Deployment %s is already %s\n", deploy_index_str, current_pin ? "pinned" : "unpinned");
|
||||
nsuccess++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ostree_sysroot_deployment_set_pinned (sysroot, target_deployment, desired_pin, error))
|
||||
return FALSE;
|
||||
g_print ("Deployment is now %s\n", desired_pin ? "pinned" : "unpinned");
|
||||
g_autoptr(GError) e = NULL;
|
||||
if (ostree_sysroot_deployment_set_pinned (sysroot, target_deployment, desired_pin, &e))
|
||||
{
|
||||
g_print ("Deployment %s is now %s\n", deploy_index_str, desired_pin ? "pinned" : "unpinned");
|
||||
nsuccess++;
|
||||
}
|
||||
else
|
||||
g_print ("Failed to %s deployment %s: %s\n", desired_pin ? "pin" : "unpin", deploy_index_str, e->message);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return nsuccess > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "ot-admin-builtins.h"
|
||||
#include "ot-admin-functions.h"
|
||||
#include "ostree.h"
|
||||
#include "ot-tool-util.h"
|
||||
#include "otutil.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ static GOptionEntry options[] = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static gboolean
|
||||
deployment_get_gpg_verify (OstreeDeployment *deployment,
|
||||
OstreeRepo *repo)
|
||||
|
|
@ -61,6 +62,7 @@ deployment_get_gpg_verify (OstreeDeployment *deployment,
|
|||
|
||||
return gpg_verify;
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
|
||||
static gboolean
|
||||
|
|
@ -136,6 +138,7 @@ deployment_print_status (OstreeSysroot *sysroot,
|
|||
g_print (" `- %s\n", source_title);
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (deployment_get_gpg_verify (deployment, repo))
|
||||
{
|
||||
g_autoptr(GString) output_buffer = g_string_sized_new (256);
|
||||
|
|
@ -168,6 +171,7 @@ deployment_print_status (OstreeSysroot *sysroot,
|
|||
|
||||
g_print ("%s", output_buffer->str);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
#include "ostree.h"
|
||||
#include "otutil.h"
|
||||
|
||||
#include "../libostree/ostree-kernel-args.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <err.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@
|
|||
#include "ot-admin-instutil-builtins.h"
|
||||
|
||||
#include "otutil.h"
|
||||
|
||||
#include "../libostree/ostree-kernel-args.h"
|
||||
#include "ostree.h"
|
||||
|
||||
static gboolean opt_proc_cmdline;
|
||||
static gboolean opt_merge;
|
||||
|
|
@ -69,14 +68,14 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat
|
|||
}
|
||||
first_deployment = deployments->pdata[0];
|
||||
|
||||
kargs = _ostree_kernel_args_new ();
|
||||
kargs = ostree_kernel_args_new ();
|
||||
|
||||
/* If they want the current kernel's args, they very likely don't
|
||||
* want the ones from the merge.
|
||||
*/
|
||||
if (opt_proc_cmdline)
|
||||
{
|
||||
if (!_ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error))
|
||||
if (!ostree_kernel_args_append_proc_cmdline (kargs, cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
else if (opt_merge)
|
||||
|
|
@ -84,24 +83,24 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat
|
|||
OstreeBootconfigParser *bootconfig = ostree_deployment_get_bootconfig (first_deployment);
|
||||
g_auto(GStrv) previous_args = g_strsplit (ostree_bootconfig_parser_get (bootconfig, "options"), " ", -1);
|
||||
|
||||
_ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
ostree_kernel_args_append_argv (kargs, previous_args);
|
||||
}
|
||||
|
||||
if (opt_replace)
|
||||
{
|
||||
_ostree_kernel_args_replace_argv (kargs, opt_replace);
|
||||
ostree_kernel_args_replace_argv (kargs, opt_replace);
|
||||
}
|
||||
|
||||
if (opt_append)
|
||||
{
|
||||
_ostree_kernel_args_append_argv (kargs, opt_append);
|
||||
ostree_kernel_args_append_argv (kargs, opt_append);
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
_ostree_kernel_args_append (kargs, argv[i]);
|
||||
ostree_kernel_args_append (kargs, argv[i]);
|
||||
|
||||
{
|
||||
g_auto(GStrv) kargs_strv = _ostree_kernel_args_to_strv (kargs);
|
||||
g_auto(GStrv) kargs_strv = ostree_kernel_args_to_strv (kargs);
|
||||
|
||||
if (!ostree_sysroot_deployment_set_kargs (sysroot, first_deployment,
|
||||
kargs_strv,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "ot-builtins.h"
|
||||
#include "ostree.h"
|
||||
#include "otutil.h"
|
||||
#include "ot-tool-util.h"
|
||||
|
||||
static gboolean opt_user_mode;
|
||||
static gboolean opt_allow_noent;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "ot-editor.h"
|
||||
#include "ostree.h"
|
||||
#include "otutil.h"
|
||||
#include "ot-tool-util.h"
|
||||
#include "parse-datetime.h"
|
||||
#include "ostree-repo-private.h"
|
||||
#include "ostree-libarchive-private.h"
|
||||
|
|
@ -61,8 +60,10 @@ static char **opt_trees;
|
|||
static gint opt_owner_uid = -1;
|
||||
static gint opt_owner_gid = -1;
|
||||
static gboolean opt_table_output;
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static char **opt_key_ids;
|
||||
static char *opt_gpg_homedir;
|
||||
#endif
|
||||
static gboolean opt_generate_sizes;
|
||||
static gboolean opt_disable_fsync;
|
||||
static char *opt_timestamp;
|
||||
|
|
@ -115,8 +116,10 @@ static GOptionEntry options[] = {
|
|||
{ "skip-list", 0, 0, G_OPTION_ARG_FILENAME, &opt_skiplist_file, "File containing list of files to skip", "PATH" },
|
||||
{ "consume", 0, 0, G_OPTION_ARG_NONE, &opt_consume, "Consume (delete) content after commit (for local directories)", NULL },
|
||||
{ "table-output", 0, 0, G_OPTION_ARG_NONE, &opt_table_output, "Output more information in a KEY: VALUE format", NULL },
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
{ "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"},
|
||||
{ "gpg-homedir", 0, 0, G_OPTION_ARG_FILENAME, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"},
|
||||
#endif
|
||||
{ "generate-sizes", 0, 0, G_OPTION_ARG_NONE, &opt_generate_sizes, "Generate size information along with commit metadata", NULL },
|
||||
{ "disable-fsync", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL },
|
||||
{ "fsync", 0, 0, G_OPTION_ARG_CALLBACK, parse_fsync_cb, "Specify how to invoke fsync()", "POLICY" },
|
||||
|
|
@ -635,13 +638,24 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
else if (strcmp (tree_type, "tar") == 0)
|
||||
{
|
||||
if (!opt_tar_pathname_filter)
|
||||
{
|
||||
if (strcmp (tree, "-") == 0)
|
||||
{
|
||||
if (!ostree_repo_write_archive_to_mtree_from_fd (repo, STDIN_FILENO, mtree, modifier,
|
||||
opt_tar_autocreate_parents,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
{
|
||||
object_to_commit = g_file_new_for_path (tree);
|
||||
|
||||
if (!ostree_repo_write_archive_to_mtree (repo, object_to_commit, mtree, modifier,
|
||||
opt_tar_autocreate_parents,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_LIBARCHIVE
|
||||
|
|
@ -666,7 +680,13 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
goto out;
|
||||
}
|
||||
opts.translate_pathname_user_data = &tpdata;
|
||||
g_autoptr(OtAutoArchiveRead) archive = ot_open_archive_read (tree, error);
|
||||
|
||||
g_autoptr(OtAutoArchiveRead) archive;
|
||||
if (strcmp (tree, "-") == 0)
|
||||
archive = ot_open_archive_read_fd (STDIN_FILENO, error);
|
||||
else
|
||||
archive = ot_open_archive_read (tree, error);
|
||||
|
||||
if (!archive)
|
||||
goto out;
|
||||
if (!ostree_repo_import_archive_to_mtree (repo, &opts, archive, mtree,
|
||||
|
|
@ -797,6 +817,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
goto out;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (opt_key_ids)
|
||||
{
|
||||
char **iter;
|
||||
|
|
@ -814,6 +835,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
goto out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (opt_branch)
|
||||
ostree_repo_transaction_set_ref (repo, NULL, opt_branch, commit_checksum);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ static GOptionEntry options[] = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
static void
|
||||
gpg_verify_result_cb (OstreeRepo *repo,
|
||||
const char *checksum,
|
||||
|
|
@ -93,6 +94,7 @@ gpg_verify_result_cb (OstreeRepo *repo,
|
|||
|
||||
glnx_console_lock (console);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
static gboolean printed_console_progress;
|
||||
|
||||
|
|
@ -360,9 +362,11 @@ ostree_builtin_pull (int argc, char **argv, OstreeCommandInvocation *invocation,
|
|||
|
||||
if (console.is_tty)
|
||||
{
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
signal_handler_id = g_signal_connect (repo, "gpg-verify-result",
|
||||
G_CALLBACK (gpg_verify_result_cb),
|
||||
&console);
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
}
|
||||
|
||||
options = g_variant_ref_sink (g_variant_builder_end (&builder));
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ static gboolean opt_list;
|
|||
static gboolean opt_alias;
|
||||
static char *opt_create;
|
||||
static gboolean opt_collections;
|
||||
static gboolean opt_force;
|
||||
|
||||
/* ATTENTION:
|
||||
* Please remember to update the bash-completion script (bash/ostree) and
|
||||
|
|
@ -44,6 +45,7 @@ static GOptionEntry options[] = {
|
|||
{ "alias", 'A', 0, G_OPTION_ARG_NONE, &opt_alias, "If used with --create, create an alias, otherwise just list aliases", NULL },
|
||||
{ "create", 0, 0, G_OPTION_ARG_STRING, &opt_create, "Create a new ref for an existing commit", "NEWREF" },
|
||||
{ "collections", 'c', 0, G_OPTION_ARG_NONE, &opt_collections, "Enable listing collection IDs for refs", NULL },
|
||||
{ "force", 0, 0, G_OPTION_ARG_NONE, &opt_force, "Overwrite existing refs when creating", NULL },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
@ -89,7 +91,7 @@ do_ref_with_collections (OstreeRepo *repo,
|
|||
else goto out;
|
||||
}
|
||||
|
||||
if (checksum_existing != NULL)
|
||||
if (!opt_force && checksum_existing != NULL)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"--create specified but ref %s already exists", opt_create);
|
||||
|
|
@ -205,9 +207,11 @@ static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellab
|
|||
else goto out;
|
||||
}
|
||||
|
||||
/* We want to allow replacing an existing alias */
|
||||
/* We want to allow replacing an existing alias or a normal ref when
|
||||
* forced
|
||||
*/
|
||||
gboolean replacing_alias = opt_alias && g_hash_table_contains (ref_aliases, opt_create);
|
||||
if (!replacing_alias && checksum_existing != NULL)
|
||||
if (!replacing_alias && !opt_force && checksum_existing != NULL)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"--create specified but ref %s already exists", opt_create);
|
||||
|
|
|
|||
|
|
@ -40,9 +40,11 @@ static OstreeCommand remote_subcommands[] = {
|
|||
{ "list", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ot_remote_builtin_list,
|
||||
"List remote repository names" },
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
{ "gpg-import", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ot_remote_builtin_gpg_import,
|
||||
"Import GPG keys" },
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
#ifdef HAVE_LIBCURL_OR_LIBSOUP
|
||||
{ "add-cookie", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ot_remote_builtin_add_cookie,
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ print_object (OstreeRepo *repo,
|
|||
flags |= OSTREE_DUMP_UNSWAPPED;
|
||||
ot_dump_object (objtype, checksum, variant, flags);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
|
||||
{
|
||||
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
||||
|
|
@ -207,6 +208,7 @@ print_object (OstreeRepo *repo,
|
|||
g_print ("%s", buffer->str);
|
||||
}
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
|
|||
if (!ostree_repo_regenerate_summary (repo, additional_metadata, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (opt_key_ids)
|
||||
{
|
||||
if (!ostree_repo_add_gpg_signature_summary (repo,
|
||||
|
|
@ -202,6 +203,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
|
|||
error))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (opt_view || opt_raw)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ BUILTINPROTO(diff);
|
|||
BUILTINPROTO(export);
|
||||
BUILTINPROTO(find_remotes);
|
||||
BUILTINPROTO(create_usb);
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
BUILTINPROTO(gpg_sign);
|
||||
#endif
|
||||
BUILTINPROTO(init);
|
||||
BUILTINPROTO(log);
|
||||
BUILTINPROTO(pull);
|
||||
|
|
|
|||
|
|
@ -152,11 +152,6 @@ ostree_run (int argc,
|
|||
}
|
||||
}
|
||||
|
||||
else if (g_str_equal (argv[in], "--"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
argv[out] = argv[in];
|
||||
}
|
||||
|
||||
|
|
@ -348,6 +343,22 @@ ostree_option_context_parse (GOptionContext *context,
|
|||
if (!g_option_context_parse (context, argc, argv, error))
|
||||
return FALSE;
|
||||
|
||||
/* Filter out the first -- we see; g_option_context_parse() leaves it in */
|
||||
int in, out;
|
||||
gboolean removed_double_dashes = FALSE;
|
||||
for (in = 1, out = 1; in < *argc; in++, out++)
|
||||
{
|
||||
if (g_str_equal ((*argv)[in], "--") && !removed_double_dashes)
|
||||
{
|
||||
removed_double_dashes = TRUE;
|
||||
out--;
|
||||
continue;
|
||||
}
|
||||
|
||||
(*argv)[out] = (*argv)[in];
|
||||
}
|
||||
*argc = out;
|
||||
|
||||
if (opt_version)
|
||||
{
|
||||
/* This should now be YAML, like `docker version`, so it's both nice to read
|
||||
|
|
@ -491,6 +502,7 @@ ostree_ensure_repo_writable (OstreeRepo *repo,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
void
|
||||
ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result)
|
||||
{
|
||||
|
|
@ -511,6 +523,7 @@ ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result)
|
|||
|
||||
g_print ("%s", buffer->str);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
gboolean
|
||||
ot_enable_tombstone_commits (OstreeRepo *repo, GError **error)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include "config.h"
|
||||
|
||||
#include "otutil.h"
|
||||
#include "ot-tool-util.h"
|
||||
|
||||
#include "ot-main.h"
|
||||
#include "ot-remote-builtins.h"
|
||||
|
|
@ -134,10 +133,12 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
subkey, g_variant_new_variant (g_variant_new_string (subvalue)));
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (opt_no_gpg_verify)
|
||||
g_variant_builder_add (optbuilder, "{s@v}",
|
||||
"gpg-verify",
|
||||
g_variant_new_variant (g_variant_new_boolean (FALSE)));
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
if (opt_collection_id != NULL)
|
||||
g_variant_builder_add (optbuilder, "{s@v}", "collection-id",
|
||||
|
|
@ -158,6 +159,7 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
/* This is just a convenience option and is not as flexible as the full
|
||||
* "ostree remote gpg-import" command. It imports all keys from a file,
|
||||
* which is likely the most common case.
|
||||
|
|
@ -184,6 +186,7 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
|
|||
g_print ("Imported %u GPG key%s to remote \"%s\"\n",
|
||||
imported, (imported == 1) ? "" : "s", remote_name);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc
|
|||
g_autoptr(GBytes) summary_bytes = NULL;
|
||||
g_autoptr(GBytes) signature_bytes = NULL;
|
||||
OstreeDumpFlags flags = OSTREE_DUMP_NONE;
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
gboolean gpg_verify_summary;
|
||||
#endif
|
||||
gboolean ret = FALSE;
|
||||
|
||||
context = g_option_context_new ("NAME");
|
||||
|
|
@ -92,6 +94,7 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc
|
|||
|
||||
ot_dump_summary_bytes (summary_bytes, flags);
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
if (!ostree_repo_remote_get_gpg_verify_summary (repo, remote_name,
|
||||
&gpg_verify_summary,
|
||||
error))
|
||||
|
|
@ -124,6 +127,7 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc
|
|||
g_print ("\n");
|
||||
ostree_print_gpg_verify_result (result);
|
||||
}
|
||||
#endif /* OSTREE_DISABLE_GPGME */
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue