Skip to content

Commit

Permalink
lib: Add API for checking out commits into an composefs image
Browse files Browse the repository at this point in the history
This supports checking out one or more commits into a combined tree
which is then converted into a composefs image containing fs-verity
digests for all the regular files, and payloads that are relative
to a the `repo/objects` directory of a bare ostree repo.
  • Loading branch information
alexlarsson committed Jun 29, 2022
1 parent 48f4fb9 commit 19c42b9
Show file tree
Hide file tree
Showing 6 changed files with 651 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile-libostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ EXTRA_DIST += \
$(top_srcdir)/src/libostree/libostree-released.sym \
$(NULL)

libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree \
libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree -I$(srcdir)/composefs \
$(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' \
-DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files))
libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \
libostree_1_la_LIBADD = libcomposefs.la 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
libostree_1_la_LIBADD += $(bupsplitpath)
Expand Down
6 changes: 6 additions & 0 deletions src/libostree/libostree-devel.sym
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
LIBOSTREE_2022.5 {
global:
ostree_kernel_args_append_if_missing;
ostree_composefs_target_get_type;
ostree_composefs_target_new;
ostree_composefs_target_ref;
ostree_composefs_target_unref;
ostree_composefs_target_write_at;
ostree_repo_checkout_composefs;
} LIBOSTREE_2022.4;

/* Stub section for the stable release *after* this development one; don't
Expand Down
1 change: 1 addition & 0 deletions src/libostree/ostree-autocleanups.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderMount, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderOverride, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeRepoFinderResult, ostree_repo_finder_result_free)
G_DEFINE_AUTO_CLEANUP_FREE_FUNC (OstreeRepoFinderResultv, ostree_repo_finder_result_freev, NULL)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeComposefsTarget, ostree_composefs_target_unref)

G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSign, g_object_unref)
#endif
Expand Down
Loading

0 comments on commit 19c42b9

Please sign in to comment.