[ostree] lib: Introduce versioned symbols



commit 16979cc5ed9b158b1a9b5ba929c8af32baa41d9d
Author: Colin Walters <walters verbum org>
Date:   Tue Mar 1 17:42:59 2016 -0500

    lib: Introduce versioned symbols
    
    As rpm-ostree evolves, it keeps driving API additions to libostree.
    This creates a relatively tight coupling.
    
    However, if delivering via e.g. RPM, unless one manually remembers to
    increment the `Requires:` in the spec file, it's possible for the two
    to become desynchronized.
    
    RPM handles versioned symbols and will ensure a dependency if the
    application starts using a newer version.
    
    To implement this, switch to `-fvisibility=hidden`, along with an
    annotation in the header, and finally add a `.sym` file.
    
    This matches what other projects like systemd and libvirt do.
    
    Although rather than attempting to retroactively version symbols, glom
    them all onto the current one.

 Makefile-libostree.am                        |    5 +-
 src/libostree/libostree.sym                  |  313 ++++++++++++++++++++++++++
 src/libostree/ostree-async-progress.h        |   10 +
 src/libostree/ostree-bootconfig-parser.h     |    9 +
 src/libostree/ostree-chain-input-stream.h    |    2 +
 src/libostree/ostree-checksum-input-stream.h |    2 +
 src/libostree/ostree-cmdprivate.h            |    3 +-
 src/libostree/ostree-core.h                  |   45 ++++-
 src/libostree/ostree-deployment.h            |   18 ++
 src/libostree/ostree-diff.h                  |    5 +
 src/libostree/ostree-enumtypes.h.template    |    1 +
 src/libostree/ostree-gpg-verify-result.h     |    8 +
 src/libostree/ostree-mutable-tree.h          |   14 +-
 src/libostree/ostree-repo-file.h             |   14 ++
 src/libostree/ostree-repo.h                  |  116 +++++++++-
 src/libostree/ostree-sepolicy.h              |    8 +
 src/libostree/ostree-sysroot-upgrader.h      |   13 +
 src/libostree/ostree-sysroot.h               |   31 +++
 src/libostree/ostree-types.h                 |    4 +
 19 files changed, 608 insertions(+), 13 deletions(-)
---
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index 23fa949..5dbe774 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -137,8 +137,9 @@ libostree_1_la_SOURCES += \
 endif
 
 libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil 
-I$(srcdir)/src/libostree -I$(builddir)/src/libostree \
-       $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS)
-libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions -export-symbols-regex '^ostree_'
+       $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) 
$(OT_DEP_ZLIB_CFLAGS) \
+       -fvisibility=hidden '-D_OSTREE_PUBLIC=__attribute__((visibility("default"))) extern'
+libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions 
-Wl,--version-script=$(top_srcdir)/src/libostree/libostree.sym
 libostree_1_la_LIBADD = libotutil.la libbupsplit.la libglnx.la libbsdiff.la libostree-kernel-args.la 
$(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS)
 
 if USE_LIBARCHIVE
diff --git a/src/libostree/libostree.sym b/src/libostree/libostree.sym
new file mode 100644
index 0000000..ee6c2e7
--- /dev/null
+++ b/src/libostree/libostree.sym
@@ -0,0 +1,313 @@
+/***
+  Copyright (C) 2016 Colin Walters <walters verbum org>
+ 
+  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.
+***/
+
+
+/*
+ Retroactively make all of these symbols 2016.3, which is
+ the first release where we started using versioned symbols.  See
+ also https://www.berrange.com/posts/2011/01/13/versioning-in-the-libvirt-library/
+ */ 
+LIBOSTREE_2016.3 {
+global:
+        ostree_async_progress_finish;
+        ostree_async_progress_get_status;
+        ostree_async_progress_get_type;
+        ostree_async_progress_get_uint;
+        ostree_async_progress_get_uint64;
+        ostree_async_progress_new;
+        ostree_async_progress_new_and_connect;
+        ostree_async_progress_set_status;
+        ostree_async_progress_set_uint;
+        ostree_async_progress_set_uint64;
+        ostree_bootconfig_parser_clone;
+        ostree_bootconfig_parser_get;
+        ostree_bootconfig_parser_get_type;
+        ostree_bootconfig_parser_new;
+        ostree_bootconfig_parser_parse;
+        ostree_bootconfig_parser_parse_at;
+        ostree_bootconfig_parser_set;
+        ostree_bootconfig_parser_write;
+        ostree_bootconfig_parser_write_at;
+        ostree_chain_input_stream_get_type;
+        ostree_chain_input_stream_new;
+        ostree_checksum_b64_inplace_from_bytes;
+        ostree_checksum_b64_inplace_to_bytes;
+        ostree_checksum_bytes_peek;
+        ostree_checksum_bytes_peek_validate;
+        ostree_checksum_file;
+        ostree_checksum_file_async;
+        ostree_checksum_file_async_finish;
+        ostree_checksum_file_from_input;
+        ostree_checksum_from_bytes;
+        ostree_checksum_from_bytes_v;
+        ostree_checksum_inplace_from_bytes;
+        ostree_checksum_inplace_to_bytes;
+        ostree_checksum_input_stream_get_type;
+        ostree_checksum_input_stream_new;
+        ostree_checksum_to_bytes;
+        ostree_checksum_to_bytes_v;
+        ostree_cmd__private__;
+        ostree_cmp_checksum_bytes;
+        ostree_commit_get_parent;
+        ostree_commit_get_timestamp;
+        ostree_content_file_parse;
+        ostree_content_file_parse_at;
+        ostree_content_stream_parse;
+        ostree_create_directory_metadata;
+        ostree_deployment_clone;
+        ostree_deployment_equal;
+        ostree_deployment_get_bootconfig;
+        ostree_deployment_get_bootcsum;
+        ostree_deployment_get_bootserial;
+        ostree_deployment_get_csum;
+        ostree_deployment_get_deployserial;
+        ostree_deployment_get_index;
+        ostree_deployment_get_origin;
+        ostree_deployment_get_origin_relpath;
+        ostree_deployment_get_osname;
+        ostree_deployment_get_type;
+        ostree_deployment_hash;
+        ostree_deployment_new;
+        ostree_deployment_set_bootconfig;
+        ostree_deployment_set_bootserial;
+        ostree_deployment_set_index;
+        ostree_deployment_set_origin;
+        ostree_diff_dirs;
+        ostree_diff_item_get_type;
+        ostree_diff_item_ref;
+        ostree_diff_item_unref;
+        ostree_diff_print;
+        ostree_fetcher_config_flags_get_type;
+        ostree_gpg_verify_result_count_all;
+        ostree_gpg_verify_result_count_valid;
+        ostree_gpg_verify_result_describe;
+        ostree_gpg_verify_result_describe_variant;
+        ostree_gpg_verify_result_get;
+        ostree_gpg_verify_result_get_all;
+        ostree_gpg_verify_result_get_type;
+        ostree_gpg_verify_result_lookup;
+        ostree_hash_object_name;
+        ostree_metadata_variant_type;
+        ostree_mutable_tree_ensure_dir;
+        ostree_mutable_tree_ensure_parent_dirs;
+        ostree_mutable_tree_get_contents_checksum;
+        ostree_mutable_tree_get_files;
+        ostree_mutable_tree_get_metadata_checksum;
+        ostree_mutable_tree_get_subdirs;
+        ostree_mutable_tree_get_type;
+        ostree_mutable_tree_lookup;
+        ostree_mutable_tree_new;
+        ostree_mutable_tree_replace_file;
+        ostree_mutable_tree_set_contents_checksum;
+        ostree_mutable_tree_set_metadata_checksum;
+        ostree_mutable_tree_walk;
+        ostree_object_from_string;
+        ostree_object_name_deserialize;
+        ostree_object_name_serialize;
+        ostree_object_to_string;
+        ostree_object_type_from_string;
+        ostree_object_type_to_string;
+        ostree_parse_refspec;
+        ostree_raw_file_to_content_stream;
+        ostree_repo_abort_transaction;
+        ostree_repo_add_gpg_signature_summary;
+        ostree_repo_append_gpg_signature;
+        ostree_repo_checkout_gc;
+        ostree_repo_checkout_tree;
+        ostree_repo_checkout_tree_at;
+        ostree_repo_commit_modifier_get_type;
+        ostree_repo_commit_modifier_new;
+        ostree_repo_commit_modifier_ref;
+        ostree_repo_commit_modifier_set_devino_cache;
+        ostree_repo_commit_modifier_set_sepolicy;
+        ostree_repo_commit_modifier_set_xattr_callback;
+        ostree_repo_commit_modifier_unref;
+        ostree_repo_commit_transaction;
+        ostree_repo_commit_traverse_iter_cleanup;
+        ostree_repo_commit_traverse_iter_clear;
+        ostree_repo_commit_traverse_iter_get_dir;
+        ostree_repo_commit_traverse_iter_get_file;
+        ostree_repo_commit_traverse_iter_init_commit;
+        ostree_repo_commit_traverse_iter_init_dirtree;
+        ostree_repo_commit_traverse_iter_next;
+        ostree_repo_copy_config;
+        ostree_repo_create;
+        ostree_repo_delete_object;
+        ostree_repo_devino_cache_get_type;
+        ostree_repo_devino_cache_new;
+        ostree_repo_devino_cache_ref;
+        ostree_repo_devino_cache_unref;
+        ostree_repo_export_tree_to_archive;
+        ostree_repo_file_ensure_resolved;
+        ostree_repo_file_get_checksum;
+        ostree_repo_file_get_repo;
+        ostree_repo_file_get_root;
+        ostree_repo_file_get_type;
+        ostree_repo_file_get_xattrs;
+        ostree_repo_file_tree_find_child;
+        ostree_repo_file_tree_get_contents;
+        ostree_repo_file_tree_get_contents_checksum;
+        ostree_repo_file_tree_get_metadata;
+        ostree_repo_file_tree_get_metadata_checksum;
+        ostree_repo_file_tree_query_child;
+        ostree_repo_file_tree_set_metadata;
+        ostree_repo_get_config;
+        ostree_repo_get_disable_fsync;
+        ostree_repo_get_mode;
+        ostree_repo_get_parent;
+        ostree_repo_get_path;
+        ostree_repo_get_type;
+        ostree_repo_has_object;
+        ostree_repo_import_archive_to_mtree;
+        ostree_repo_import_object_from;
+        ostree_repo_is_system;
+        ostree_repo_is_writable;
+        ostree_repo_list_commit_objects_starting_with;
+        ostree_repo_list_objects;
+        ostree_repo_list_refs;
+        ostree_repo_list_static_delta_names;
+        ostree_repo_load_commit;
+        ostree_repo_load_file;
+        ostree_repo_load_object_stream;
+        ostree_repo_load_variant;
+        ostree_repo_load_variant_if_exists;
+        ostree_repo_mode_from_string;
+        ostree_repo_new;
+        ostree_repo_new_default;
+        ostree_repo_new_for_sysroot_path;
+        ostree_repo_open;
+        ostree_repo_prepare_transaction;
+        ostree_repo_prune;
+        ostree_repo_prune_static_deltas;
+        ostree_repo_pull;
+        ostree_repo_pull_default_console_progress_changed;
+        ostree_repo_pull_one_dir;
+        ostree_repo_pull_with_options;
+        ostree_repo_query_object_storage_size;
+        ostree_repo_read_commit;
+        ostree_repo_read_commit_detached_metadata;
+        ostree_repo_regenerate_summary;
+        ostree_repo_remote_add;
+        ostree_repo_remote_change;
+        ostree_repo_remote_delete;
+        ostree_repo_remote_fetch_summary;
+        ostree_repo_remote_get_gpg_verify;
+        ostree_repo_remote_get_gpg_verify_summary;
+        ostree_repo_remote_get_url;
+        ostree_repo_remote_gpg_import;
+        ostree_repo_remote_list;
+        ostree_repo_remote_list_refs;
+        ostree_repo_resolve_rev;
+        ostree_repo_scan_hardlinks;
+        ostree_repo_set_disable_fsync;
+        ostree_repo_set_ref_immediate;
+        ostree_repo_sign_commit;
+        ostree_repo_sign_delta;
+        ostree_repo_static_delta_execute_offline;
+        ostree_repo_static_delta_generate;
+        ostree_repo_transaction_set_ref;
+        ostree_repo_transaction_set_refspec;
+        ostree_repo_transaction_stats_get_type;
+        ostree_repo_traverse_commit;
+        ostree_repo_traverse_commit_union;
+        ostree_repo_traverse_new_reachable;
+        ostree_repo_verify_commit;
+        ostree_repo_verify_commit_ext;
+        ostree_repo_verify_summary;
+        ostree_repo_write_archive_to_mtree;
+        ostree_repo_write_commit;
+        ostree_repo_write_commit_detached_metadata;
+        ostree_repo_write_commit_with_time;
+        ostree_repo_write_config;
+        ostree_repo_write_content;
+        ostree_repo_write_content_async;
+        ostree_repo_write_content_finish;
+        ostree_repo_write_content_trusted;
+        ostree_repo_write_dfd_to_mtree;
+        ostree_repo_write_directory_to_mtree;
+        ostree_repo_write_metadata;
+        ostree_repo_write_metadata_async;
+        ostree_repo_write_metadata_finish;
+        ostree_repo_write_metadata_stream_trusted;
+        ostree_repo_write_metadata_trusted;
+        ostree_repo_write_mtree;
+        ostree_sepolicy_fscreatecon_cleanup;
+        ostree_sepolicy_get_label;
+        ostree_sepolicy_get_name;
+        ostree_sepolicy_get_path;
+        ostree_sepolicy_get_type;
+        ostree_sepolicy_new;
+        ostree_sepolicy_restorecon;
+        ostree_sepolicy_setfscreatecon;
+        ostree_sysroot_cleanup;
+        ostree_sysroot_deployment_set_kargs;
+        ostree_sysroot_deployment_set_mutable;
+        ostree_sysroot_deploy_tree;
+        ostree_sysroot_ensure_initialized;
+        ostree_sysroot_get_booted_deployment;
+        ostree_sysroot_get_bootversion;
+        ostree_sysroot_get_deployment_directory;
+        ostree_sysroot_get_deployment_dirpath;
+        ostree_sysroot_get_deployment_origin_path;
+        ostree_sysroot_get_deployments;
+        ostree_sysroot_get_fd;
+        ostree_sysroot_get_merge_deployment;
+        ostree_sysroot_get_path;
+        ostree_sysroot_get_repo;
+        ostree_sysroot_get_subbootversion;
+        ostree_sysroot_get_type;
+        ostree_sysroot_load;
+        ostree_sysroot_lock;
+        ostree_sysroot_lock_async;
+        ostree_sysroot_lock_finish;
+        ostree_sysroot_new;
+        ostree_sysroot_new_default;
+        ostree_sysroot_origin_new_from_refspec;
+        ostree_sysroot_prepare_cleanup;
+        ostree_sysroot_simple_write_deployment;
+        ostree_sysroot_try_lock;
+        ostree_sysroot_unload;
+        ostree_sysroot_unlock;
+        ostree_sysroot_upgrader_check_timestamps;
+        ostree_sysroot_upgrader_deploy;
+        ostree_sysroot_upgrader_dup_origin;
+        ostree_sysroot_upgrader_flags_get_type;
+        ostree_sysroot_upgrader_get_origin;
+        ostree_sysroot_upgrader_get_origin_description;
+        ostree_sysroot_upgrader_get_type;
+        ostree_sysroot_upgrader_new;
+        ostree_sysroot_upgrader_new_for_os;
+        ostree_sysroot_upgrader_new_for_os_with_flags;
+        ostree_sysroot_upgrader_pull;
+        ostree_sysroot_upgrader_pull_one_dir;
+        ostree_sysroot_upgrader_set_origin;
+        ostree_sysroot_write_deployments;
+        ostree_sysroot_write_origin_file;
+        ostree_validate_checksum_string;
+        ostree_validate_rev;
+        ostree_validate_structureof_checksum_string;
+        ostree_validate_structureof_commit;
+        ostree_validate_structureof_csum_v;
+        ostree_validate_structureof_dirmeta;
+        ostree_validate_structureof_dirtree;
+        ostree_validate_structureof_file_mode;
+        ostree_validate_structureof_objtype;
+local:
+       *;
+};
diff --git a/src/libostree/ostree-async-progress.h b/src/libostree/ostree-async-progress.h
index 81ed5ef..ae0e5fa 100644
--- a/src/libostree/ostree-async-progress.h
+++ b/src/libostree/ostree-async-progress.h
@@ -41,29 +41,39 @@ struct OstreeAsyncProgressClass
   void (*changed) (OstreeAsyncProgress *self, gpointer user_data);
 };
 
+_OSTREE_PUBLIC
 GType   ostree_async_progress_get_type (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 OstreeAsyncProgress *ostree_async_progress_new (void);
 
+_OSTREE_PUBLIC
 OstreeAsyncProgress *ostree_async_progress_new_and_connect (void (*changed) (OstreeAsyncProgress *self, 
gpointer user_data), gpointer user_data);
 
+_OSTREE_PUBLIC
 char *ostree_async_progress_get_status (OstreeAsyncProgress       *self);
 
+_OSTREE_PUBLIC
 guint ostree_async_progress_get_uint (OstreeAsyncProgress       *self,
                                       const char                *key);
+_OSTREE_PUBLIC
 guint64 ostree_async_progress_get_uint64 (OstreeAsyncProgress       *self,
                                           const char                *key);
 
+_OSTREE_PUBLIC
 void ostree_async_progress_set_status (OstreeAsyncProgress       *self,
                                        const char                *status);
 
+_OSTREE_PUBLIC
 void ostree_async_progress_set_uint (OstreeAsyncProgress       *self,
                                      const char                *key,
                                      guint                      value);
+_OSTREE_PUBLIC
 void ostree_async_progress_set_uint64 (OstreeAsyncProgress       *self,
                                        const char                *key,
                                        guint64                    value);
 
+_OSTREE_PUBLIC
 void ostree_async_progress_finish (OstreeAsyncProgress *self);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-bootconfig-parser.h b/src/libostree/ostree-bootconfig-parser.h
index 47dac9c..cd52460 100644
--- a/src/libostree/ostree-bootconfig-parser.h
+++ b/src/libostree/ostree-bootconfig-parser.h
@@ -30,38 +30,47 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootconfigParser OstreeBootconfigParser;
 
+_OSTREE_PUBLIC
 GType ostree_bootconfig_parser_get_type (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 OstreeBootconfigParser * ostree_bootconfig_parser_new (void);
 
+_OSTREE_PUBLIC
 OstreeBootconfigParser * ostree_bootconfig_parser_clone (OstreeBootconfigParser *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_bootconfig_parser_parse (OstreeBootconfigParser  *self,
                                          GFile           *path,
                                          GCancellable    *cancellable,
                                          GError         **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_bootconfig_parser_parse_at (OstreeBootconfigParser  *self,
                                             int                      dfd,
                                             const char              *path,
                                             GCancellable    *cancellable,
                                             GError         **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_bootconfig_parser_write (OstreeBootconfigParser   *self,
                                          GFile            *output,
                                          GCancellable     *cancellable,
                                          GError          **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_bootconfig_parser_write_at (OstreeBootconfigParser   *self,
                                             int                       dfd,
                                             const char               *path,
                                             GCancellable             *cancellable,
                                             GError                  **error);
 
+_OSTREE_PUBLIC
 void ostree_bootconfig_parser_set (OstreeBootconfigParser  *self,
                                    const char      *key,
                                    const char      *value);
 
+_OSTREE_PUBLIC
 const char *ostree_bootconfig_parser_get (OstreeBootconfigParser  *self,
                                           const char      *key);
 
diff --git a/src/libostree/ostree-chain-input-stream.h b/src/libostree/ostree-chain-input-stream.h
index 7ad074a..dee3895 100644
--- a/src/libostree/ostree-chain-input-stream.h
+++ b/src/libostree/ostree-chain-input-stream.h
@@ -59,8 +59,10 @@ struct _OstreeChainInputStreamClass
   void (*_g_reserved5) (void);
 };
 
+_OSTREE_PUBLIC
 GType          ostree_chain_input_stream_get_type     (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 OstreeChainInputStream * ostree_chain_input_stream_new          (GPtrArray *streams);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-checksum-input-stream.h b/src/libostree/ostree-checksum-input-stream.h
index 2ec8e0c..cb5b240 100644
--- a/src/libostree/ostree-checksum-input-stream.h
+++ b/src/libostree/ostree-checksum-input-stream.h
@@ -57,8 +57,10 @@ struct _OstreeChecksumInputStreamClass
   void (*_g_reserved5) (void);
 };
 
+_OSTREE_PUBLIC
 GType          ostree_checksum_input_stream_get_type     (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 OstreeChecksumInputStream * ostree_checksum_input_stream_new          (GInputStream   *stream,
                                                                        GChecksum      *checksum);
 
diff --git a/src/libostree/ostree-cmdprivate.h b/src/libostree/ostree-cmdprivate.h
index 7746406..8106156 100644
--- a/src/libostree/ostree-cmdprivate.h
+++ b/src/libostree/ostree-cmdprivate.h
@@ -29,7 +29,8 @@ typedef struct {
   gboolean (* ostree_static_delta_dump) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, 
GError **error);
 } OstreeCmdPrivateVTable;
 
-const OstreeCmdPrivateVTable *
+/* Note this not really "public", we just export the symbol, but not the header */
+_OSTREE_PUBLIC const OstreeCmdPrivateVTable *
 ostree_cmd__private__ (void);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h
index c5b42a7..29ef7b2 100644
--- a/src/libostree/ostree-core.h
+++ b/src/libostree/ostree-core.h
@@ -23,6 +23,7 @@
 #pragma once
 
 #include <gio/gio.h>
+#include <ostree-types.h>
 
 G_BEGIN_DECLS
 
@@ -164,63 +165,86 @@ typedef enum {
   OSTREE_REPO_MODE_BARE_USER
 } OstreeRepoMode;
 
-const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);
+const _OSTREE_PUBLIC
+GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_checksum_string (const char *sha256,
                                           GError    **error);
 
+_OSTREE_PUBLIC
 guchar *ostree_checksum_to_bytes (const char *checksum);
+_OSTREE_PUBLIC
 GVariant *ostree_checksum_to_bytes_v (const char *checksum);
+_OSTREE_PUBLIC
 void ostree_checksum_b64_inplace_to_bytes (const char *checksum,
                                            guint8     *buf);
 
+_OSTREE_PUBLIC
 char * ostree_checksum_from_bytes (const guchar *csum);
+_OSTREE_PUBLIC
 char * ostree_checksum_from_bytes_v (GVariant *csum_v);
 
+_OSTREE_PUBLIC
 void ostree_checksum_inplace_from_bytes (const guchar *csum,
                                          char         *buf);
+_OSTREE_PUBLIC
 void ostree_checksum_b64_inplace_from_bytes (const guchar *csum,
                                              char         *buf);
 
+_OSTREE_PUBLIC
 void ostree_checksum_inplace_to_bytes (const char *checksum,
                                        guchar     *buf);
 
+_OSTREE_PUBLIC
 const guchar *ostree_checksum_bytes_peek (GVariant *bytes);
 
+_OSTREE_PUBLIC
 const guchar *ostree_checksum_bytes_peek_validate (GVariant *bytes, GError **error);
 
+_OSTREE_PUBLIC
 int ostree_cmp_checksum_bytes (const guchar *a, const guchar *b);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_rev (const char *rev, GError **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_parse_refspec (const char *refspec,
                                char      **out_remote,
                                char      **out_ref,
                                GError    **error);
 
+_OSTREE_PUBLIC
 void ostree_checksum_update_meta (GChecksum *checksum, GFileInfo *file_info, GVariant  *xattrs);
 
+_OSTREE_PUBLIC
 const char * ostree_object_type_to_string (OstreeObjectType objtype);
 
+_OSTREE_PUBLIC
 OstreeObjectType ostree_object_type_from_string (const char *str);
 
+_OSTREE_PUBLIC
 guint ostree_hash_object_name (gconstpointer a);
 
+_OSTREE_PUBLIC
 GVariant *ostree_object_name_serialize (const char *checksum,
                                         OstreeObjectType objtype);
 
+_OSTREE_PUBLIC
 void ostree_object_name_deserialize (GVariant         *variant,
                                      const char      **out_checksum,
                                      OstreeObjectType *out_objtype);
 
+_OSTREE_PUBLIC
 char * ostree_object_to_string (const char *checksum,
                                 OstreeObjectType objtype);
 
+_OSTREE_PUBLIC
 void ostree_object_from_string (const char *str,
                                 gchar     **out_checksum,
                                 OstreeObjectType *out_objtype);
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_content_stream_parse (gboolean                compressed,
                              GInputStream           *input,
                              guint64                 input_length,
@@ -231,6 +255,7 @@ ostree_content_stream_parse (gboolean                compressed,
                              GCancellable           *cancellable,
                              GError                **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_content_file_parse (gboolean                compressed,
                                     GFile                  *content_path,
                                     gboolean                trusted,
@@ -240,6 +265,7 @@ gboolean ostree_content_file_parse (gboolean                compressed,
                                     GCancellable           *cancellable,
                                     GError                **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_content_file_parse_at (gboolean                compressed,
                                        int                     parent_dfd,
                                        const char             *path,
@@ -250,6 +276,7 @@ gboolean ostree_content_file_parse_at (gboolean                compressed,
                                        GCancellable           *cancellable,
                                        GError                **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_raw_file_to_content_stream (GInputStream       *input,
                                             GFileInfo          *file_info,
                                             GVariant           *xattrs,
@@ -258,6 +285,7 @@ gboolean ostree_raw_file_to_content_stream (GInputStream       *input,
                                             GCancellable       *cancellable,
                                             GError            **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_checksum_file_from_input (GFileInfo        *file_info,
                                           GVariant         *xattrs,
                                           GInputStream     *in,
@@ -266,12 +294,14 @@ gboolean ostree_checksum_file_from_input (GFileInfo        *file_info,
                                           GCancellable     *cancellable,
                                           GError          **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_checksum_file (GFile             *f,
                                OstreeObjectType   objtype,
                                guchar           **out_csum,
                                GCancellable      *cancellable,
                                GError           **error);
 
+_OSTREE_PUBLIC
 void ostree_checksum_file_async (GFile                 *f,
                                  OstreeObjectType       objtype,
                                  int                    io_priority,
@@ -279,38 +309,49 @@ void ostree_checksum_file_async (GFile                 *f,
                                  GAsyncReadyCallback    callback,
                                  gpointer               user_data);
 
+_OSTREE_PUBLIC
 gboolean ostree_checksum_file_async_finish (GFile          *f,
                                             GAsyncResult   *result,
                                             guchar        **out_csum,
                                             GError        **error);
 
+_OSTREE_PUBLIC
 GVariant *ostree_create_directory_metadata (GFileInfo *dir_info,
                                             GVariant  *xattrs);
 
 /* VALIDATION */
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_objtype (guchar    objtype,
                                               GError   **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_csum_v (GVariant  *checksum,
                                              GError   **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_checksum_string (const char *checksum,
                                                       GError   **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_file_mode (guint32            mode,
                                                 GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_commit (GVariant      *commit,
                                              GError       **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_dirtree (GVariant      *dirtree,
                                               GError       **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_validate_structureof_dirmeta (GVariant      *dirmeta,
                                               GError       **error);
 
+_OSTREE_PUBLIC
 gchar *  ostree_commit_get_parent            (GVariant  *commit_variant);
+_OSTREE_PUBLIC
 guint64  ostree_commit_get_timestamp         (GVariant  *commit_variant);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-deployment.h b/src/libostree/ostree-deployment.h
index dc28d63..a474b35 100644
--- a/src/libostree/ostree-deployment.h
+++ b/src/libostree/ostree-deployment.h
@@ -30,11 +30,15 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeDeployment OstreeDeployment;
 
+_OSTREE_PUBLIC
 GType ostree_deployment_get_type (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 guint ostree_deployment_hash (gconstpointer v);
+_OSTREE_PUBLIC
 gboolean ostree_deployment_equal (gconstpointer ap, gconstpointer bp);
 
+_OSTREE_PUBLIC
 OstreeDeployment * ostree_deployment_new (int    index,
                                   const char  *osname,
                                   const char  *csum,
@@ -42,22 +46,36 @@ OstreeDeployment * ostree_deployment_new (int    index,
                                   const char  *bootcsum,
                                   int    bootserial);
 
+_OSTREE_PUBLIC
 int ostree_deployment_get_index (OstreeDeployment *self);
+_OSTREE_PUBLIC
 const char *ostree_deployment_get_osname (OstreeDeployment *self);
+_OSTREE_PUBLIC
 int ostree_deployment_get_deployserial (OstreeDeployment *self);
+_OSTREE_PUBLIC
 const char *ostree_deployment_get_csum (OstreeDeployment *self);
+_OSTREE_PUBLIC
 const char *ostree_deployment_get_bootcsum (OstreeDeployment *self);
+_OSTREE_PUBLIC
 int ostree_deployment_get_bootserial (OstreeDeployment *self);
+_OSTREE_PUBLIC
 OstreeBootconfigParser *ostree_deployment_get_bootconfig (OstreeDeployment *self);
+_OSTREE_PUBLIC
 GKeyFile *ostree_deployment_get_origin (OstreeDeployment *self);
 
+_OSTREE_PUBLIC
 void ostree_deployment_set_index (OstreeDeployment *self, int index);
+_OSTREE_PUBLIC
 void ostree_deployment_set_bootserial (OstreeDeployment *self, int index);
+_OSTREE_PUBLIC
 void ostree_deployment_set_bootconfig (OstreeDeployment *self, OstreeBootconfigParser *bootconfig);
+_OSTREE_PUBLIC
 void ostree_deployment_set_origin (OstreeDeployment *self, GKeyFile *origin);
 
+_OSTREE_PUBLIC
 OstreeDeployment *ostree_deployment_clone (OstreeDeployment *self);
 
+_OSTREE_PUBLIC
 char *ostree_deployment_get_origin_relpath (OstreeDeployment *self);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-diff.h b/src/libostree/ostree-diff.h
index ea6db03..f4db23e 100644
--- a/src/libostree/ostree-diff.h
+++ b/src/libostree/ostree-diff.h
@@ -47,11 +47,15 @@ struct _OstreeDiffItem
   char *target_checksum;
 };
 
+_OSTREE_PUBLIC
 OstreeDiffItem *ostree_diff_item_ref (OstreeDiffItem *diffitem);
+_OSTREE_PUBLIC
 void ostree_diff_item_unref (OstreeDiffItem *diffitem);
 
+_OSTREE_PUBLIC
 GType ostree_diff_item_get_type (void);
 
+_OSTREE_PUBLIC
 gboolean ostree_diff_dirs (OstreeDiffFlags flags,
                            GFile          *a,
                            GFile          *b,
@@ -61,6 +65,7 @@ gboolean ostree_diff_dirs (OstreeDiffFlags flags,
                            GCancellable   *cancellable,
                            GError        **error);
 
+_OSTREE_PUBLIC
 void ostree_diff_print (GFile          *a,
                         GFile          *b,
                         GPtrArray      *modified,
diff --git a/src/libostree/ostree-enumtypes.h.template b/src/libostree/ostree-enumtypes.h.template
index 85ec41e..40899d7 100644
--- a/src/libostree/ostree-enumtypes.h.template
+++ b/src/libostree/ostree-enumtypes.h.template
@@ -33,6 +33,7 @@ G_BEGIN_DECLS
 
 /*** BEGIN enumeration-production ***/
 #define @ENUMPREFIX _TYPE_@ENUMSHORT@ (@enum_name _get_type ())
+_OSTREE_PUBLIC
 GType @enum_name _get_type (void) G_GNUC_CONST;
 
 /*** END enumeration-production ***/
diff --git a/src/libostree/ostree-gpg-verify-result.h b/src/libostree/ostree-gpg-verify-result.h
index ce20718..61180fb 100644
--- a/src/libostree/ostree-gpg-verify-result.h
+++ b/src/libostree/ostree-gpg-verify-result.h
@@ -82,21 +82,27 @@ typedef enum {
   OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL
 } OstreeGpgSignatureAttr;
 
+_OSTREE_PUBLIC
 GType ostree_gpg_verify_result_get_type (void);
 
+_OSTREE_PUBLIC
 guint ostree_gpg_verify_result_count_all (OstreeGpgVerifyResult *result);
 
+_OSTREE_PUBLIC
 guint ostree_gpg_verify_result_count_valid (OstreeGpgVerifyResult *result);
 
+_OSTREE_PUBLIC
 gboolean ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result,
                                           const gchar *key_id,
                                           guint *out_signature_index);
 
+_OSTREE_PUBLIC
 GVariant * ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
                                          guint signature_index,
                                          OstreeGpgSignatureAttr *attrs,
                                          guint n_attrs);
 
+_OSTREE_PUBLIC
 GVariant * ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result,
                                              guint signature_index);
 
@@ -113,12 +119,14 @@ typedef enum {
   OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT = 0
 } OstreeGpgSignatureFormatFlags;
 
+_OSTREE_PUBLIC
 void ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result,
                                         guint signature_index,
                                         GString *output_buffer,
                                         const gchar *line_prefix,
                                         OstreeGpgSignatureFormatFlags flags);
 
+_OSTREE_PUBLIC
 void ostree_gpg_verify_result_describe_variant (GVariant *variant,
                                                 GString *output_buffer,
                                                 const gchar *line_prefix,
diff --git a/src/libostree/ostree-mutable-tree.h b/src/libostree/ostree-mutable-tree.h
index bc8539c..30425d8 100644
--- a/src/libostree/ostree-mutable-tree.h
+++ b/src/libostree/ostree-mutable-tree.h
@@ -45,50 +45,62 @@ struct OstreeMutableTreeClass
   GObjectClass parent_class;
 };
 
+_OSTREE_PUBLIC
 GType   ostree_mutable_tree_get_type (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 OstreeMutableTree *ostree_mutable_tree_new (void);
 
+_OSTREE_PUBLIC
 void ostree_mutable_tree_set_metadata_checksum (OstreeMutableTree *self,
                                                 const char        *checksum);
 
+_OSTREE_PUBLIC
 const char *ostree_mutable_tree_get_metadata_checksum (OstreeMutableTree *self);
 
+_OSTREE_PUBLIC
 void ostree_mutable_tree_set_contents_checksum (OstreeMutableTree *self,
                                                 const char        *checksum);
 
+_OSTREE_PUBLIC
 const char *ostree_mutable_tree_get_contents_checksum (OstreeMutableTree *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_mutable_tree_replace_file (OstreeMutableTree *self,
                                            const char        *name,
                                            const char        *checksum,
                                            GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
                                          const char        *name,
                                          OstreeMutableTree **out_subdir,
                                          GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_mutable_tree_lookup (OstreeMutableTree   *self,
                                      const char          *name,
                                      char               **out_file_checksum,
                                      OstreeMutableTree  **out_subdir,
                                      GError             **error);
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree  *self,
                                         GPtrArray          *split_path,
                                         const char         *metadata_checksum,
                                         OstreeMutableTree **out_parent,
                                         GError            **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_mutable_tree_walk (OstreeMutableTree   *self,
                                    GPtrArray           *split_path,
                                    guint                start,
                                    OstreeMutableTree  **out_subdir,
                                    GError             **error);
 
+_OSTREE_PUBLIC
 GHashTable * ostree_mutable_tree_get_subdirs (OstreeMutableTree *self);
+_OSTREE_PUBLIC
 GHashTable * ostree_mutable_tree_get_files (OstreeMutableTree *self);
 
 G_END_DECLS
diff --git a/src/libostree/ostree-repo-file.h b/src/libostree/ostree-repo-file.h
index 925a502..fb65164 100644
--- a/src/libostree/ostree-repo-file.h
+++ b/src/libostree/ostree-repo-file.h
@@ -40,38 +40,52 @@ struct _OstreeRepoFileClass
   GObjectClass parent_class;
 };
 
+_OSTREE_PUBLIC
 GType   ostree_repo_file_get_type (void) G_GNUC_CONST;
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_file_ensure_resolved (OstreeRepoFile  *self,
                                             GError         **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_file_get_xattrs (OstreeRepoFile  *self,
                                       GVariant       **out_xattrs,
                                       GCancellable    *cancellable,
                                       GError         **error);
 
+_OSTREE_PUBLIC
 OstreeRepo * ostree_repo_file_get_repo (OstreeRepoFile  *self);
+_OSTREE_PUBLIC
 OstreeRepoFile * ostree_repo_file_get_root (OstreeRepoFile  *self);
 
+_OSTREE_PUBLIC
 void ostree_repo_file_make_empty_tree (OstreeRepoFile  *self);
 
+_OSTREE_PUBLIC
 void ostree_repo_file_tree_set_metadata (OstreeRepoFile *self,
                                           const char     *checksum,
                                           GVariant       *metadata);
 
+_OSTREE_PUBLIC
 const char *ostree_repo_file_tree_get_contents_checksum (OstreeRepoFile  *self);
+_OSTREE_PUBLIC
 const char *ostree_repo_file_tree_get_metadata_checksum (OstreeRepoFile  *self);
 
+_OSTREE_PUBLIC
 GVariant *ostree_repo_file_tree_get_contents (OstreeRepoFile *self);
+_OSTREE_PUBLIC
 GVariant *ostree_repo_file_tree_get_metadata (OstreeRepoFile *self);
 
+_OSTREE_PUBLIC
 const char * ostree_repo_file_get_checksum (OstreeRepoFile  *self);
 
+_OSTREE_PUBLIC
 int     ostree_repo_file_tree_find_child  (OstreeRepoFile  *self,
                                             const char      *name,
                                             gboolean        *is_dir,
                                             GVariant       **out_container);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_file_tree_query_child (OstreeRepoFile  *self,
                                              int              n,
                                              const char      *attributes,
diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h
index 4629ea5..288dca0 100644
--- a/src/libostree/ostree-repo.h
+++ b/src/libostree/ostree-repo.h
@@ -36,46 +36,62 @@ G_BEGIN_DECLS
 #define OSTREE_IS_REPO(obj) \
   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OSTREE_TYPE_REPO))
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_mode_from_string (const char      *mode,
                                        OstreeRepoMode  *out_mode,
                                        GError         **error);
 
+_OSTREE_PUBLIC
 GType ostree_repo_get_type (void);
 
+_OSTREE_PUBLIC
 OstreeRepo* ostree_repo_new (GFile *path);
 
+_OSTREE_PUBLIC
 OstreeRepo* ostree_repo_new_for_sysroot_path (GFile *repo_path,
                                               GFile *sysroot_path);
 
+_OSTREE_PUBLIC
 OstreeRepo* ostree_repo_new_default (void);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_open   (OstreeRepo     *self,
                                   GCancellable   *cancellable,
                                   GError        **error);
 
+_OSTREE_PUBLIC
 void          ostree_repo_set_disable_fsync (OstreeRepo    *self,
                                              gboolean       disable_fsync);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_get_disable_fsync (OstreeRepo    *self);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_is_system (OstreeRepo   *repo);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_is_writable (OstreeRepo  *self,
                                        GError     **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_create (OstreeRepo     *self,
                                   OstreeRepoMode  mode,
                                   GCancellable   *cancellable,
                                   GError        **error);
 
+_OSTREE_PUBLIC
 GFile *       ostree_repo_get_path (OstreeRepo  *self);
 
+_OSTREE_PUBLIC
 OstreeRepoMode ostree_repo_get_mode (OstreeRepo  *self);
 
+_OSTREE_PUBLIC
 GKeyFile *    ostree_repo_get_config (OstreeRepo *self);
 
+_OSTREE_PUBLIC
 GKeyFile *    ostree_repo_copy_config (OstreeRepo *self);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_remote_add (OstreeRepo     *self,
                                       const char     *name,
                                       const char     *url,
@@ -83,6 +99,7 @@ gboolean      ostree_repo_remote_add (OstreeRepo     *self,
                                       GCancellable   *cancellable,
                                       GError        **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_remote_delete (OstreeRepo     *self,
                                          const char     *name,
                                          GCancellable   *cancellable,
@@ -95,6 +112,7 @@ typedef enum {
   OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS
 } OstreeRepoRemoteChange;
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_remote_change (OstreeRepo     *self,
                                          GFile          *sysroot,
                                          OstreeRepoRemoteChange changeop,
@@ -104,24 +122,29 @@ gboolean      ostree_repo_remote_change (OstreeRepo     *self,
                                          GCancellable   *cancellable,
                                          GError        **error);
 
+_OSTREE_PUBLIC
 char **       ostree_repo_remote_list    (OstreeRepo *self,
                                           guint      *out_n_remotes);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_remote_get_url (OstreeRepo   *self,
                                           const char   *name,
                                           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_remote_gpg_import (OstreeRepo         *self,
                                              const char         *name,
                                              GInputStream       *source_stream,
@@ -130,6 +153,7 @@ gboolean      ostree_repo_remote_gpg_import (OstreeRepo         *self,
                                              GCancellable       *cancellable,
                                              GError            **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_remote_fetch_summary (OstreeRepo    *self,
                                                 const char    *name,
                                                 GBytes       **out_summary,
@@ -137,8 +161,10 @@ gboolean      ostree_repo_remote_fetch_summary (OstreeRepo    *self,
                                                 GCancellable  *cancellable,
                                                 GError       **error);
 
+_OSTREE_PUBLIC
 OstreeRepo * ostree_repo_get_parent (OstreeRepo  *self);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_config (OstreeRepo *self,
                                         GKeyFile   *new_config,
                                         GError    **error);
@@ -174,35 +200,43 @@ struct _OstreeRepoTransactionStats {
   guint64 padding4;
 };
 
+_OSTREE_PUBLIC
 GType ostree_repo_transaction_stats_get_type (void);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_scan_hardlinks      (OstreeRepo     *self,
                                                GCancellable   *cancellable,
                                                GError        **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_prepare_transaction (OstreeRepo     *self,
                                                gboolean       *out_transaction_resume,
                                                GCancellable   *cancellable,
                                                GError        **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_commit_transaction (OstreeRepo                  *self,
                                               OstreeRepoTransactionStats  *out_stats,
                                               GCancellable                *cancellable,
                                               GError                     **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_abort_transaction (OstreeRepo     *self,
                                              GCancellable   *cancellable,
                                              GError        **error);
 
+_OSTREE_PUBLIC
 void          ostree_repo_transaction_set_refspec (OstreeRepo *self,
                                                    const char *refspec,
                                                    const char *checksum);
 
+_OSTREE_PUBLIC
 void          ostree_repo_transaction_set_ref     (OstreeRepo *self,
                                                    const char *remote,
                                                    const char *ref,
                                                    const char *checksum);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_set_ref_immediate (OstreeRepo *self,
                                              const char *remote,
                                              const char *ref,
@@ -210,6 +244,7 @@ gboolean      ostree_repo_set_ref_immediate (OstreeRepo *self,
                                              GCancellable  *cancellable,
                                              GError       **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_has_object (OstreeRepo           *self,
                                       OstreeObjectType      objtype,
                                       const char           *checksum,
@@ -217,6 +252,7 @@ gboolean      ostree_repo_has_object (OstreeRepo           *self,
                                       GCancellable         *cancellable,
                                       GError              **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_metadata (OstreeRepo        *self,
                                           OstreeObjectType   objtype,
                                           const char        *expected_checksum,
@@ -225,6 +261,7 @@ gboolean      ostree_repo_write_metadata (OstreeRepo        *self,
                                           GCancellable      *cancellable,
                                           GError           **error);
 
+_OSTREE_PUBLIC
 void          ostree_repo_write_metadata_async (OstreeRepo              *self,
                                                 OstreeObjectType         objtype,
                                                 const char              *expected_checksum,
@@ -233,11 +270,13 @@ void          ostree_repo_write_metadata_async (OstreeRepo              *self,
                                                 GAsyncReadyCallback      callback,
                                                 gpointer                 user_data);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_metadata_finish (OstreeRepo        *self,
                                                  GAsyncResult      *result,
                                                  guchar           **out_csum,
                                                  GError           **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_content (OstreeRepo       *self,
                                          const char       *expected_checksum,
                                          GInputStream     *object_input,
@@ -246,6 +285,7 @@ gboolean      ostree_repo_write_content (OstreeRepo       *self,
                                          GCancellable     *cancellable,
                                          GError          **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_metadata_trusted (OstreeRepo        *self,
                                                   OstreeObjectType   objtype,
                                                   const char        *checksum,
@@ -253,6 +293,7 @@ gboolean      ostree_repo_write_metadata_trusted (OstreeRepo        *self,
                                                   GCancellable      *cancellable,
                                                   GError           **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_metadata_stream_trusted (OstreeRepo        *self,
                                                          OstreeObjectType   objtype,
                                                          const char        *checksum,
@@ -261,6 +302,7 @@ gboolean      ostree_repo_write_metadata_stream_trusted (OstreeRepo        *self
                                                          GCancellable      *cancellable,
                                                          GError           **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_content_trusted (OstreeRepo       *self,
                                                  const char       *checksum,
                                                  GInputStream     *object_input,
@@ -268,6 +310,7 @@ gboolean      ostree_repo_write_content_trusted (OstreeRepo       *self,
                                                  GCancellable     *cancellable,
                                                  GError          **error);
 
+_OSTREE_PUBLIC
 void          ostree_repo_write_content_async (OstreeRepo              *self,
                                                const char              *expected_checksum,
                                                GInputStream            *object,
@@ -276,35 +319,41 @@ void          ostree_repo_write_content_async (OstreeRepo              *self,
                                                GAsyncReadyCallback      callback,
                                                gpointer                 user_data);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_content_finish (OstreeRepo        *self,
                                                 GAsyncResult      *result,
                                                 guchar           **out_csum,
                                                 GError           **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_resolve_rev (OstreeRepo  *self,
                                        const char  *refspec,
                                        gboolean     allow_noent,
                                        char       **out_rev,
                                        GError     **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_list_refs (OstreeRepo       *self,
                                      const char       *refspec_prefix,
                                      GHashTable      **out_all_refs,
                                      GCancellable     *cancellable,
                                      GError          **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_remote_list_refs (OstreeRepo       *self,
                                        const char       *remote_name,
                                        GHashTable      **out_all_refs,
                                        GCancellable     *cancellable,
                                        GError          **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_load_variant (OstreeRepo  *self,
                                         OstreeObjectType objtype,
                                         const char    *sha256, 
                                         GVariant     **out_variant,
                                         GError       **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_load_variant_if_exists (OstreeRepo  *self,
                                                   OstreeObjectType objtype,
                                                   const char    *sha256, 
@@ -315,12 +364,14 @@ typedef enum {
   OSTREE_REPO_COMMIT_STATE_PARTIAL = (1 << 0),
 } OstreeRepoCommitState;
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_load_commit (OstreeRepo            *self,
                                        const char            *checksum, 
                                        GVariant             **out_commit,
                                        OstreeRepoCommitState *out_state,
                                        GError               **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_load_file (OstreeRepo         *self,
                                 const char         *checksum,
                                 GInputStream      **out_input,
@@ -329,6 +380,7 @@ gboolean ostree_repo_load_file (OstreeRepo         *self,
                                 GCancellable       *cancellable,
                                 GError            **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_load_object_stream (OstreeRepo         *self,
                                          OstreeObjectType    objtype,
                                          const char         *checksum,
@@ -337,6 +389,7 @@ gboolean ostree_repo_load_object_stream (OstreeRepo         *self,
                                          GCancellable       *cancellable,
                                          GError            **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_query_object_storage_size (OstreeRepo           *self,
                                                      OstreeObjectType      objtype,
                                                      const char           *sha256, 
@@ -344,6 +397,7 @@ gboolean      ostree_repo_query_object_storage_size (OstreeRepo           *self,
                                                      GCancellable         *cancellable,
                                                      GError              **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_import_object_from (OstreeRepo           *self,
                                               OstreeRepo           *source,
                                               OstreeObjectType      objtype,
@@ -351,6 +405,7 @@ gboolean      ostree_repo_import_object_from (OstreeRepo           *self,
                                               GCancellable         *cancellable,
                                               GError              **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_delete_object (OstreeRepo           *self,
                                          OstreeObjectType      objtype,
                                          const char           *sha256, 
@@ -400,11 +455,13 @@ typedef enum {
  */
 typedef struct OstreeRepoCommitModifier OstreeRepoCommitModifier;
 
+_OSTREE_PUBLIC
 OstreeRepoCommitModifier *ostree_repo_commit_modifier_new (OstreeRepoCommitModifierFlags  flags,
                                                            OstreeRepoCommitFilter         commit_filter,
                                                            gpointer                       user_data,
                                                            GDestroyNotify                 destroy_notify);
 
+_OSTREE_PUBLIC
 GType ostree_repo_commit_modifier_get_type (void);
 
 typedef GVariant *(*OstreeRepoCommitModifierXattrCallback) (OstreeRepo     *repo,
@@ -412,20 +469,26 @@ typedef GVariant *(*OstreeRepoCommitModifierXattrCallback) (OstreeRepo     *repo
                                                             GFileInfo      *file_info,
                                                             gpointer        user_data);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_modifier_set_xattr_callback (OstreeRepoCommitModifier              *modifier,
                                                      OstreeRepoCommitModifierXattrCallback  callback,
                                                      GDestroyNotify                         destroy,
                                                      gpointer                               user_data);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_modifier_set_sepolicy (OstreeRepoCommitModifier              *modifier,
                                                OstreeSePolicy                        *sepolicy);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_modifier_set_devino_cache (OstreeRepoCommitModifier              *modifier,
                                                    OstreeRepoDevInoCache                 *cache);
 
+_OSTREE_PUBLIC
 OstreeRepoCommitModifier *ostree_repo_commit_modifier_ref (OstreeRepoCommitModifier *modifier);
+_OSTREE_PUBLIC
 void ostree_repo_commit_modifier_unref (OstreeRepoCommitModifier *modifier);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_directory_to_mtree (OstreeRepo                 *self,
                                                     GFile                      *dir,
                                                     OstreeMutableTree          *mtree,
@@ -433,6 +496,7 @@ gboolean      ostree_repo_write_directory_to_mtree (OstreeRepo                 *
                                                     GCancellable               *cancellable,
                                                     GError                    **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_dfd_to_mtree (OstreeRepo                 *self,
                                               int                         dfd,
                                               const char                 *path,
@@ -442,6 +506,7 @@ gboolean      ostree_repo_write_dfd_to_mtree (OstreeRepo                 *self,
                                               GError                    **error);
 
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_archive_to_mtree (OstreeRepo                   *self,
                                                   GFile                        *archive,
                                                   OstreeMutableTree            *mtree,
@@ -466,6 +531,7 @@ typedef struct {
   gpointer unused_ptrs[8];
 } OstreeRepoImportArchiveOptions;
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_import_archive_to_mtree (OstreeRepo                   *self,
                                                    OstreeRepoImportArchiveOptions  *opts,
                                                    void                         *archive, /* Really struct 
archive * */
@@ -490,6 +556,7 @@ typedef struct {
   gpointer unused_ptrs[8];
 } OstreeRepoExportArchiveOptions;
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_export_tree_to_archive (OstreeRepo                *self,
                                              OstreeRepoExportArchiveOptions  *opts,
                                              OstreeRepoFile            *root,
@@ -497,12 +564,14 @@ gboolean ostree_repo_export_tree_to_archive (OstreeRepo                *self,
                                              GCancellable             *cancellable,
                                              GError                  **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_mtree (OstreeRepo         *self,
                                        OstreeMutableTree  *mtree,
                                        GFile             **out_file,
                                        GCancellable       *cancellable,
                                        GError            **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_commit (OstreeRepo      *self,
                                         const char      *parent,
                                         const char      *subject,
@@ -513,6 +582,7 @@ gboolean      ostree_repo_write_commit (OstreeRepo      *self,
                                         GCancellable    *cancellable,
                                         GError         **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_commit_with_time (OstreeRepo      *self,
                                                   const char      *parent,
                                                   const char      *subject,
@@ -524,12 +594,14 @@ gboolean      ostree_repo_write_commit_with_time (OstreeRepo      *self,
                                                   GCancellable    *cancellable,
                                                   GError         **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_read_commit_detached_metadata (OstreeRepo      *self,
                                                          const char      *checksum,
                                                          GVariant       **out_metadata,
                                                          GCancellable    *cancellable,
                                                          GError         **error);
 
+_OSTREE_PUBLIC
 gboolean      ostree_repo_write_commit_detached_metadata (OstreeRepo      *self,
                                                           const char      *checksum,
                                                           GVariant        *metadata,
@@ -556,7 +628,7 @@ typedef enum {
   OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES = 1
 } OstreeRepoCheckoutOverwriteMode;
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_checkout_tree (OstreeRepo               *self,
                            OstreeRepoCheckoutMode    mode,
                            OstreeRepoCheckoutOverwriteMode    overwrite_mode,
@@ -592,11 +664,16 @@ typedef struct {
   gpointer unused_ptrs[7];
 } OstreeRepoCheckoutOptions;
 
+_OSTREE_PUBLIC
 GType ostree_repo_devino_cache_get_type (void);
+_OSTREE_PUBLIC
 OstreeRepoDevInoCache *ostree_repo_devino_cache_new (void);
+_OSTREE_PUBLIC
 OstreeRepoDevInoCache * ostree_repo_devino_cache_ref (OstreeRepoDevInoCache *cache);
+_OSTREE_PUBLIC
 void ostree_repo_devino_cache_unref (OstreeRepoDevInoCache *cache);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_checkout_tree_at (OstreeRepo                         *self,
                                        OstreeRepoCheckoutOptions          *options,
                                        int                                 destination_dfd,
@@ -605,10 +682,12 @@ gboolean ostree_repo_checkout_tree_at (OstreeRepo                         *self,
                                        GCancellable                       *cancellable,
                                        GError                            **error);
 
+_OSTREE_PUBLIC
 gboolean       ostree_repo_checkout_gc (OstreeRepo        *self,
                                         GCancellable      *cancellable,
                                         GError           **error);
 
+_OSTREE_PUBLIC
 gboolean       ostree_repo_read_commit (OstreeRepo    *self,
                                         const char    *ref,
                                         GFile        **out_root,
@@ -636,18 +715,21 @@ typedef enum {
  */
 #define OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE (G_VARIANT_TYPE ("(bas)")
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_list_objects (OstreeRepo                  *self,
                                    OstreeRepoListObjectsFlags   flags,
                                    GHashTable                 **out_objects,
                                    GCancellable                *cancellable,
                                    GError                     **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_list_commit_objects_starting_with ( OstreeRepo                  *self,
                                                          const char                  *start,
                                                          GHashTable                 **out_commits,
                                                          GCancellable                *cancellable,
                                                          GError                     **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_list_static_delta_names (OstreeRepo                  *self,
                                               GPtrArray                  **out_deltas,
                                               GCancellable                *cancellable,
@@ -665,6 +747,7 @@ typedef enum {
   OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR
 } OstreeStaticDeltaGenerateOpt;
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_static_delta_generate (OstreeRepo                   *self,
                                             OstreeStaticDeltaGenerateOpt  opt,
                                             const char                   *from,
@@ -674,14 +757,17 @@ gboolean ostree_repo_static_delta_generate (OstreeRepo                   *self,
                                             GCancellable                 *cancellable,
                                             GError                      **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_static_delta_execute_offline (OstreeRepo                    *self,
                                                    GFile                         *dir_or_file,
                                                    gboolean                       skip_validation,
                                                    GCancellable                  *cancellable,
                                                    GError                      **error);
 
+_OSTREE_PUBLIC
 GHashTable *ostree_repo_traverse_new_reachable (void);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_traverse_commit (OstreeRepo         *repo,
                                       const char         *commit_checksum,
                                       int                 maxdepth,
@@ -689,6 +775,7 @@ gboolean ostree_repo_traverse_commit (OstreeRepo         *repo,
                                       GCancellable       *cancellable,
                                       GError            **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_traverse_commit_union (OstreeRepo         *repo,
                                             const char         *commit_checksum,
                                             int                 maxdepth,
@@ -708,14 +795,14 @@ typedef enum {
   OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE = (1 << 0)
 } OstreeRepoCommitTraverseFlags;
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_commit_traverse_iter_init_commit (OstreeRepoCommitTraverseIter    *iter,
                                               OstreeRepo                      *repo,
                                               GVariant                        *commit,
                                               OstreeRepoCommitTraverseFlags    flags,
                                               GError                         **error);
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_commit_traverse_iter_init_dirtree (OstreeRepoCommitTraverseIter    *iter,
                                                OstreeRepo                      *repo,
                                                GVariant                        *dirtree,
@@ -729,22 +816,26 @@ typedef enum {
   OSTREE_REPO_COMMIT_ITER_RESULT_DIR
 } OstreeRepoCommitIterResult;
 
+_OSTREE_PUBLIC
 OstreeRepoCommitIterResult ostree_repo_commit_traverse_iter_next (OstreeRepoCommitTraverseIter *iter,
                                                                   GCancellable       *cancellable,
                                                                   GError            **error);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_traverse_iter_get_file (OstreeRepoCommitTraverseIter *iter,
                                                 char                        **out_name,
                                                 char                        **out_checksum);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_traverse_iter_get_dir (OstreeRepoCommitTraverseIter *iter,
                                                char                        **out_name,
                                                char                        **out_content_checksum,
                                                char                        **out_meta_checksum);
 
-void
+_OSTREE_PUBLIC void
 ostree_repo_commit_traverse_iter_clear (OstreeRepoCommitTraverseIter *iter);
 
+_OSTREE_PUBLIC
 void ostree_repo_commit_traverse_iter_cleanup (void *p);
 
 #define ostree_cleanup_repo_commit_traverse_iter __attribute__ 
((cleanup(ostree_repo_commit_traverse_iter_cleanup)))
@@ -761,11 +852,12 @@ typedef enum {
   OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY
 } OstreeRepoPruneFlags;
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_prune_static_deltas (OstreeRepo *self, const char *commit,
                                  GCancellable      *cancellable,
                                  GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_prune (OstreeRepo        *self,
                             OstreeRepoPruneFlags   flags,
                             gint               depth,
@@ -787,6 +879,7 @@ typedef enum {
   OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY = (1 << 1)
 } OstreeRepoPullFlags;
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_pull (OstreeRepo             *self,
                            const char             *remote_name,
                            char                  **refs_to_fetch,
@@ -795,7 +888,7 @@ gboolean ostree_repo_pull (OstreeRepo             *self,
                            GCancellable           *cancellable,
                            GError                **error);
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_pull_one_dir (OstreeRepo               *self,
                           const char               *remote_name,
                           const char               *dir_to_pull,
@@ -805,6 +898,7 @@ ostree_repo_pull_one_dir (OstreeRepo               *self,
                           GCancellable             *cancellable,
                           GError                  **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_pull_with_options (OstreeRepo             *self,
                                         const char             *remote_name,
                                         GVariant               *options,
@@ -812,9 +906,11 @@ gboolean ostree_repo_pull_with_options (OstreeRepo             *self,
                                         GCancellable           *cancellable,
                                         GError                **error);
 
+_OSTREE_PUBLIC
 void ostree_repo_pull_default_console_progress_changed (OstreeAsyncProgress *progress,
                                                         gpointer             user_data);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_sign_commit (OstreeRepo     *self,
                                   const gchar    *commit_checksum,
                                   const gchar    *key_id,
@@ -822,6 +918,7 @@ gboolean ostree_repo_sign_commit (OstreeRepo     *self,
                                   GCancellable   *cancellable,
                                   GError        **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_sign_delta (OstreeRepo     *self,
                                  const gchar    *from_commit,
                                  const gchar    *to_commit,
@@ -830,19 +927,21 @@ gboolean ostree_repo_sign_delta (OstreeRepo     *self,
                                  GCancellable   *cancellable,
                                  GError        **error);
 
-gboolean
+_OSTREE_PUBLIC gboolean
 ostree_repo_add_gpg_signature_summary (OstreeRepo     *self,
                                        const gchar    **key_id,
                                        const gchar    *homedir,
                                        GCancellable   *cancellable,
                                        GError        **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_append_gpg_signature (OstreeRepo     *self,
                                            const gchar    *commit_checksum,
                                            GBytes         *signature_bytes,
                                            GCancellable   *cancellable,
                                            GError        **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_verify_commit (OstreeRepo   *self,
                                     const gchar  *commit_checksum,
                                     GFile        *keyringdir,
@@ -850,6 +949,7 @@ gboolean ostree_repo_verify_commit (OstreeRepo   *self,
                                     GCancellable *cancellable,
                                     GError      **error);
 
+_OSTREE_PUBLIC
 OstreeGpgVerifyResult * ostree_repo_verify_commit_ext (OstreeRepo    *self,
                                                        const gchar   *commit_checksum,
                                                        GFile         *keyringdir,
@@ -857,6 +957,7 @@ OstreeGpgVerifyResult * ostree_repo_verify_commit_ext (OstreeRepo    *self,
                                                        GCancellable  *cancellable,
                                                        GError       **error);
 
+_OSTREE_PUBLIC
 OstreeGpgVerifyResult * ostree_repo_verify_summary (OstreeRepo    *self,
                                                     const char    *remote_name,
                                                     GBytes        *summary,
@@ -864,6 +965,7 @@ OstreeGpgVerifyResult * ostree_repo_verify_summary (OstreeRepo    *self,
                                                     GCancellable  *cancellable,
                                                     GError       **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_repo_regenerate_summary (OstreeRepo     *self,
                                          GVariant       *additional_metadata,
                                          GCancellable   *cancellable,
diff --git a/src/libostree/ostree-sepolicy.h b/src/libostree/ostree-sepolicy.h
index ac8a0e9..83e3b37 100644
--- a/src/libostree/ostree-sepolicy.h
+++ b/src/libostree/ostree-sepolicy.h
@@ -30,16 +30,21 @@ G_BEGIN_DECLS
 #define OSTREE_IS_SEPOLICY(obj) \
   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OSTREE_TYPE_SEPOLICY))
 
+_OSTREE_PUBLIC
 GType ostree_sepolicy_get_type (void);
 
+_OSTREE_PUBLIC
 OstreeSePolicy* ostree_sepolicy_new (GFile         *path,
                                      GCancellable  *cancellable,
                                      GError       **error);
 
+_OSTREE_PUBLIC
 GFile * ostree_sepolicy_get_path (OstreeSePolicy  *self);
 
+_OSTREE_PUBLIC
 const char *ostree_sepolicy_get_name (OstreeSePolicy *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_sepolicy_get_label (OstreeSePolicy    *self,
                                     const char       *relpath,
                                     guint32           unix_mode,
@@ -53,6 +58,7 @@ typedef enum {
   OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING = (1 << 1)
 } OstreeSePolicyRestoreconFlags;
 
+_OSTREE_PUBLIC
 gboolean ostree_sepolicy_restorecon (OstreeSePolicy   *self,
                                      const char       *path,
                                      GFileInfo        *info,
@@ -62,11 +68,13 @@ gboolean ostree_sepolicy_restorecon (OstreeSePolicy   *self,
                                      GCancellable     *cancellable,
                                      GError          **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sepolicy_setfscreatecon (OstreeSePolicy   *self,
                                          const char       *path,
                                          guint32           mode,
                                          GError          **error);
 
+_OSTREE_PUBLIC
 void ostree_sepolicy_fscreatecon_cleanup (void **unused);
 
 #define ostree_cleanup_sepolicy_fscreatecon __attribute__ ((cleanup(ostree_sepolicy_fscreatecon_cleanup)))
diff --git a/src/libostree/ostree-sysroot-upgrader.h b/src/libostree/ostree-sysroot-upgrader.h
index 394e31a..77bc8a1 100644
--- a/src/libostree/ostree-sysroot-upgrader.h
+++ b/src/libostree/ostree-sysroot-upgrader.h
@@ -42,32 +42,42 @@ typedef enum {
   OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED = (1 << 1),
 } OstreeSysrootUpgraderFlags;
 
+_OSTREE_PUBLIC
 GType ostree_sysroot_upgrader_get_type (void);
 
+_OSTREE_PUBLIC
 GType ostree_sysroot_upgrader_flags_get_type (void);
 
+_OSTREE_PUBLIC
 OstreeSysrootUpgrader *ostree_sysroot_upgrader_new (OstreeSysroot *sysroot,
                                                     GCancellable  *cancellable,
                                                     GError       **error);
 
+_OSTREE_PUBLIC
 OstreeSysrootUpgrader *ostree_sysroot_upgrader_new_for_os (OstreeSysroot *sysroot,
                                                            const char    *osname,
                                                            GCancellable  *cancellable,
                                                            GError       **error);
 
+_OSTREE_PUBLIC
 OstreeSysrootUpgrader *ostree_sysroot_upgrader_new_for_os_with_flags (OstreeSysroot              *sysroot,
                                                                       const char                 *osname,
                                                                       OstreeSysrootUpgraderFlags  flags,
                                                                       GCancellable               
*cancellable,
                                                                       GError                    **error);
 
+_OSTREE_PUBLIC
 GKeyFile *ostree_sysroot_upgrader_get_origin (OstreeSysrootUpgrader *self);
+_OSTREE_PUBLIC
 GKeyFile *ostree_sysroot_upgrader_dup_origin (OstreeSysrootUpgrader *self);
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self, GKeyFile *origin,
                                              GCancellable *cancellable, GError **error);
 
+_OSTREE_PUBLIC
 char *ostree_sysroot_upgrader_get_origin_description (OstreeSysrootUpgrader *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_upgrader_check_timestamps (OstreeRepo     *repo,
                                                    const char     *from_rev,
                                                    const char     *to_rev,
@@ -78,6 +88,7 @@ typedef enum {
   OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER = (1 << 0)
 } OstreeSysrootUpgraderPullFlags;
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader  *self,
                                        OstreeRepoPullFlags     flags,
                                        OstreeSysrootUpgraderPullFlags     upgrader_flags,
@@ -86,6 +97,7 @@ gboolean ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader  *self,
                                        GCancellable           *cancellable,
                                        GError                **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader  *self,
                                       const char                   *dir_to_pull,
                                       OstreeRepoPullFlags     flags,
@@ -95,6 +107,7 @@ gboolean ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader  *self,
                                       GCancellable           *cancellable,
                                       GError                **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader  *self,
                                          GCancellable           *cancellable,
                                          GError                **error);
diff --git a/src/libostree/ostree-sysroot.h b/src/libostree/ostree-sysroot.h
index bd3ecea..bce8698 100644
--- a/src/libostree/ostree-sysroot.h
+++ b/src/libostree/ostree-sysroot.h
@@ -31,82 +31,109 @@ G_BEGIN_DECLS
 #define OSTREE_IS_SYSROOT(obj) \
   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OSTREE_TYPE_SYSROOT))
 
+_OSTREE_PUBLIC
 GType ostree_sysroot_get_type (void);
 
+_OSTREE_PUBLIC
 OstreeSysroot* ostree_sysroot_new (GFile *path);
 
+_OSTREE_PUBLIC
 OstreeSysroot* ostree_sysroot_new_default (void);
 
+_OSTREE_PUBLIC
 GFile *ostree_sysroot_get_path (OstreeSysroot *self);
 
+_OSTREE_PUBLIC
 int ostree_sysroot_get_fd (OstreeSysroot *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_load (OstreeSysroot  *self,
                               GCancellable   *cancellable,
                               GError        **error);
 
+_OSTREE_PUBLIC
 void ostree_sysroot_unload (OstreeSysroot  *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_ensure_initialized (OstreeSysroot  *self,
                                             GCancellable   *cancellable,
                                             GError        **error);
 
+_OSTREE_PUBLIC
 int ostree_sysroot_get_bootversion (OstreeSysroot   *self);
+_OSTREE_PUBLIC
 int ostree_sysroot_get_subbootversion (OstreeSysroot   *self);
+_OSTREE_PUBLIC
 GPtrArray *ostree_sysroot_get_deployments (OstreeSysroot  *self);
+_OSTREE_PUBLIC
 OstreeDeployment *ostree_sysroot_get_booted_deployment (OstreeSysroot *self);
 
+_OSTREE_PUBLIC
 GFile *ostree_sysroot_get_deployment_directory (OstreeSysroot    *self,
                                                 OstreeDeployment *deployment);
 
+_OSTREE_PUBLIC
 char *ostree_sysroot_get_deployment_dirpath (OstreeSysroot    *self,
                                              OstreeDeployment *deployment);
 
+_OSTREE_PUBLIC
 GFile * ostree_sysroot_get_deployment_origin_path (GFile   *deployment_path);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_lock (OstreeSysroot  *self, GError **error);
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_try_lock (OstreeSysroot         *self,
                                   gboolean              *out_acquired,
                                   GError               **error);
+_OSTREE_PUBLIC
 void     ostree_sysroot_lock_async (OstreeSysroot         *self,
                                     GCancellable          *cancellable,
                                     GAsyncReadyCallback    callback,
                                     gpointer               user_data);
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_lock_finish (OstreeSysroot         *self,
                                      GAsyncResult          *result,
                                      GError               **error);
+_OSTREE_PUBLIC
 void ostree_sysroot_unlock (OstreeSysroot  *self);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_cleanup (OstreeSysroot       *self,
                                  GCancellable        *cancellable,
                                  GError             **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_prepare_cleanup (OstreeSysroot  *self,
                                          GCancellable   *cancellable,
                                          GError        **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_write_origin_file (OstreeSysroot         *sysroot,
                                            OstreeDeployment      *deployment,
                                            GKeyFile              *new_origin,
                                            GCancellable          *cancellable,
                                            GError               **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_get_repo (OstreeSysroot         *self,
                                   OstreeRepo           **out_repo,
                                   GCancellable          *cancellable,
                                   GError               **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_deployment_set_kargs (OstreeSysroot     *self,
                                               OstreeDeployment  *deployment,
                                               char             **new_kargs,
                                               GCancellable      *cancellable,
                                               GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_write_deployments (OstreeSysroot     *self,
                                            GPtrArray         *new_deployments,
                                            GCancellable      *cancellable,
                                            GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_deploy_tree (OstreeSysroot     *self,
                                      const char        *osname,
                                      const char        *revision,
@@ -117,16 +144,19 @@ gboolean ostree_sysroot_deploy_tree (OstreeSysroot     *self,
                                      GCancellable      *cancellable,
                                      GError           **error);
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_deployment_set_mutable (OstreeSysroot     *self,
                                                 OstreeDeployment  *deployment,
                                                 gboolean           is_mutable,
                                                 GCancellable      *cancellable,
                                                 GError           **error);
 
+_OSTREE_PUBLIC
 OstreeDeployment *ostree_sysroot_get_merge_deployment (OstreeSysroot     *self,
                                                        const char        *osname);
 
 
+_OSTREE_PUBLIC
 GKeyFile *ostree_sysroot_origin_new_from_refspec (OstreeSysroot      *self,
                                                   const char         *refspec);
 
@@ -135,6 +165,7 @@ typedef enum {
   OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN = (1 << 0)
 } OstreeSysrootSimpleWriteDeploymentFlags;
 
+_OSTREE_PUBLIC
 gboolean ostree_sysroot_simple_write_deployment (OstreeSysroot      *sysroot,
                                                  const char         *osname,
                                                  OstreeDeployment   *new_deployment,
diff --git a/src/libostree/ostree-types.h b/src/libostree/ostree-types.h
index 691f128..f6aea0f 100644
--- a/src/libostree/ostree-types.h
+++ b/src/libostree/ostree-types.h
@@ -24,6 +24,10 @@
 
 #include <gio/gio.h>
 
+#ifndef _OSTREE_PUBLIC
+#define _OSTREE_PUBLIC extern
+#endif
+
 G_BEGIN_DECLS
 
 typedef struct OstreeRepo OstreeRepo;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]