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 9, 2022
1 parent 0237c06 commit f735b3e
Show file tree
Hide file tree
Showing 6 changed files with 646 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile-libostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ endif # USE_GPGME
symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym

# Uncomment this include when adding new development symbols.
#if BUILDOPT_IS_DEVEL_BUILD
#symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
#endif
if BUILDOPT_IS_DEVEL_BUILD
symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
endif

# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
wl_versionscript_arg = -Wl,--version-script=
Expand All @@ -182,12 +182,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
10 changes: 10 additions & 0 deletions src/libostree/libostree-devel.sym
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
- uncomment the include in Makefile-libostree.am
*/

LIBOSTREE_2022.5 {
global:
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
* edit this other than to update the year. This is just a copy/paste
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 f735b3e

Please sign in to comment.