From: Colin Walters Date: Thu, 15 Jun 2017 01:44:04 +0000 (-0400) Subject: lib: Split symbol versioning into -released and -devel X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~36^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2bab43fb224edc5b0bfacc79881e387b8de67c4a;p=ostree.git lib: Split symbol versioning into -released and -devel So far a lot of submitted PR have added symbols into the first section. Split the file into `-released` and `-devel` to make this more obvious. To further enforce things, we hardcode a checksum of the `-released` file in `test-symbols.sh`. Only release commits should update that checksum. Did you notice I like checksums? Closes: #931 Approved by: pwithnall --- diff --git a/Makefile-libostree.am b/Makefile-libostree.am index 7f2e2a4a..3c2b6237 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -155,24 +155,24 @@ libostree_1_la_SOURCES += \ $(NULL) endif +symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym \ + $(top_srcdir)/src/libostree/libostree-devel.sym +if ENABLE_EXPERIMENTAL_API +symbol_files += $(top_srcdir)/src/libostree/libostree-experimental.sym +endif +# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html +wl_versionscript_arg = -Wl,--version-script= +EXTRA_DIST += $(symbol_files) + + 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) $(OT_DEP_OPENSSL_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_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la libostree-kernel-args.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_OPENSSL_LIBS) libostree_1_la_LIBADD += $(bupsplitpath) -EXTRA_libostree_1_la_DEPENDENCIES = $(top_srcdir)/src/libostree/libostree.sym - -EXTRA_DIST += \ - src/libostree/libostree.sym \ - src/libostree/libostree-experimental.sym \ - $(NULL) - -if ENABLE_EXPERIMENTAL_API -libostree_1_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libostree/libostree-experimental.sym -EXTRA_libostree_1_la_DEPENDENCIES += $(top_srcdir)/src/libostree/libostree-experimental.sym -endif +EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files) if USE_LIBARCHIVE libostree_1_la_CFLAGS += $(OT_DEP_LIBARCHIVE_CFLAGS) diff --git a/configure.ac b/configure.ac index 0efe6530..cf8a01b8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,7 @@ AC_PREREQ([2.63]) -dnl If incrementing the version here, remember to update libostree.sym too +dnl If doing a final release, remember to follow the instructions to +dnl update libostree-released.sym from libostree-devel.sym, and update the checksum +dnl in test-symbols.sh m4_define([year_version], [2017]) m4_define([release_version], [7]) m4_define([package_version], [year_version.release_version]) diff --git a/src/libostree/libostree-devel.sym b/src/libostree/libostree-devel.sym new file mode 100644 index 00000000..6616432b --- /dev/null +++ b/src/libostree/libostree-devel.sym @@ -0,0 +1,35 @@ +/* DEVEL symbol file - add new symbols here + Copyright (C) 2016 Colin Walters + + 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. +***/ + +/* Add new symbols here. Release commits should copy this section into -released.sym. */ +LIBOSTREE_2017.7 { +global: + ostree_sysroot_repo; + ostree_sysroot_query_deployments_for; +} LIBOSTREE_2017.6; + +/* Stub section for the stable release *after* this development one; don't + * edit this other than to update the last number. This is just a copy/paste + * source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION + * with whatever the next version with new symbols will be. +LIBOSTREE_2017.$NEWVERSION { +global: + someostree_symbol_deleteme; +} LIBOSTREE_2017.$LASTSTABLE; +*/ diff --git a/src/libostree/libostree-released.sym b/src/libostree/libostree-released.sym new file mode 100644 index 00000000..b201dcab --- /dev/null +++ b/src/libostree/libostree-released.sym @@ -0,0 +1,403 @@ +/* Released symbol file: DO NOT EDIT except in release commits! + Edit libostree-devel.sym instead. + + Copyright (C) 2016 Colin Walters + + 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. +***/ + +/* DO NOT EDIT this file - use libostree-devel.sym instead. Release + * commits will move symbols from libostree-devel.sym to libostree-released.sym. + */ + +/* + 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: + *; +}; + +LIBOSTREE_2016.4 { +global: + ostree_repo_get_dfd; + ostree_repo_list_refs_ext; + ostree_sysroot_init_osname; + ostree_sysroot_load_if_changed; + ostree_sysroot_deployment_unlock; + ostree_deployment_get_unlocked; + ostree_deployment_unlocked_state_to_string; +} LIBOSTREE_2016.3; + +LIBOSTREE_2016.5 { +global: + ostree_repo_import_object_from_with_trust; + ostree_sepolicy_get_csum; + ostree_repo_get_remote_option; + ostree_repo_get_remote_list_option; + ostree_repo_get_remote_boolean_option; + ostree_repo_set_cache_dir; +} LIBOSTREE_2016.4; + +LIBOSTREE_2016.6 { +global: + ostree_gpg_verify_result_require_valid_signature; + ostree_raw_file_to_archive_z2_stream; + ostree_repo_gpg_verify_data; + ostree_repo_remote_fetch_summary_with_options; +} LIBOSTREE_2016.5; + +LIBOSTREE_2016.7 { +global: + ostree_repo_resolve_rev_ext; +} LIBOSTREE_2016.6; + +LIBOSTREE_2016.8 { +global: + ostree_checksum_b64_to_bytes; + ostree_checksum_b64_from_bytes; + ostree_repo_checkout_at; +} LIBOSTREE_2016.7; + +/* No new symbols in 2016.9 */ +/* No new symbols in 2016.10 */ +/* No new symbols in 2016.11 */ +/* No new symbols in 2016.12 */ +/* No new symbols in 2016.13 */ + +LIBOSTREE_2016.14 { +global: + ostree_repo_verify_commit_for_remote; +} LIBOSTREE_2016.8; + +/* No new symbols in 2016.15 */ + +LIBOSTREE_2017.1 { +global: + ostree_repo_prune_from_reachable; +} LIBOSTREE_2016.14; + +LIBOSTREE_2017.2 { +global: + ostree_repo_reload_config; +} LIBOSTREE_2017.1; + +LIBOSTREE_2017.3 { +global: + ostree_raw_file_to_archive_z2_stream_with_options; +} LIBOSTREE_2017.2; + +LIBOSTREE_2017.4 { +global: + ostree_check_version; + ostree_diff_dirs_with_options; + ostree_sepolicy_new_at; + ostree_sysroot_write_deployments_with_options; +} LIBOSTREE_2017.3; + +LIBOSTREE_2017.6 { +global: + ostree_async_progress_get; + ostree_async_progress_set; + ostree_async_progress_get_variant; + ostree_async_progress_set_variant; +} LIBOSTREE_2017.4; diff --git a/src/libostree/libostree.sym b/src/libostree/libostree.sym deleted file mode 100644 index b307548d..00000000 --- a/src/libostree/libostree.sym +++ /dev/null @@ -1,419 +0,0 @@ -/*** - Copyright (C) 2016 Colin Walters - - 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: - *; -}; - -LIBOSTREE_2016.4 { -global: - ostree_repo_get_dfd; - ostree_repo_list_refs_ext; - ostree_sysroot_init_osname; - ostree_sysroot_load_if_changed; - ostree_sysroot_deployment_unlock; - ostree_deployment_get_unlocked; - ostree_deployment_unlocked_state_to_string; -} LIBOSTREE_2016.3; - -LIBOSTREE_2016.5 { -global: - ostree_repo_import_object_from_with_trust; - ostree_sepolicy_get_csum; - ostree_repo_get_remote_option; - ostree_repo_get_remote_list_option; - ostree_repo_get_remote_boolean_option; - ostree_repo_set_cache_dir; -} LIBOSTREE_2016.4; - -LIBOSTREE_2016.6 { -global: - ostree_gpg_verify_result_require_valid_signature; - ostree_raw_file_to_archive_z2_stream; - ostree_repo_gpg_verify_data; - ostree_repo_remote_fetch_summary_with_options; -} LIBOSTREE_2016.5; - -LIBOSTREE_2016.7 { -global: - ostree_repo_resolve_rev_ext; -} LIBOSTREE_2016.6; - -LIBOSTREE_2016.8 { -global: - ostree_checksum_b64_to_bytes; - ostree_checksum_b64_from_bytes; - ostree_repo_checkout_at; -} LIBOSTREE_2016.7; - -/* No new symbols in 2016.9 */ -/* No new symbols in 2016.10 */ -/* No new symbols in 2016.11 */ -/* No new symbols in 2016.12 */ -/* No new symbols in 2016.13 */ - -LIBOSTREE_2016.14 { -global: - ostree_repo_verify_commit_for_remote; -} LIBOSTREE_2016.8; - -/* No new symbols in 2016.15 */ - -LIBOSTREE_2017.1 { -global: - ostree_repo_prune_from_reachable; -} LIBOSTREE_2016.14; - -LIBOSTREE_2017.2 { -global: - ostree_repo_reload_config; -} LIBOSTREE_2017.1; - -LIBOSTREE_2017.3 { -global: - ostree_raw_file_to_archive_z2_stream_with_options; -} LIBOSTREE_2017.2; - -LIBOSTREE_2017.4 { -global: - ostree_check_version; - ostree_diff_dirs_with_options; - ostree_sepolicy_new_at; - ostree_sysroot_write_deployments_with_options; -} LIBOSTREE_2017.3; - -LIBOSTREE_2017.6 { -global: - ostree_async_progress_get; - ostree_async_progress_set; - ostree_async_progress_get_variant; - ostree_async_progress_set_variant; -} LIBOSTREE_2017.4; - -/* NOTE NOTE NOTE - * Versions above here are released. Only add symbols below this line. - * NOTE NOTE NOTE - */ - -LIBOSTREE_2017.7 { -global: - ostree_sysroot_repo; - ostree_sysroot_query_deployments_for; -} LIBOSTREE_2017.6; - -/* Stub section for the stable release *after* this development one; don't - * edit this other than to update the last number. This is just a copy/paste - * source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION - * with whatever the next version with new symbols will be. -LIBOSTREE_2017.$NEWVERSION { -global: - someostree_symbol_deleteme; -} LIBOSTREE_2017.$LASTSTABLE; -*/ diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 54f469fb..9018e6f3 100755 --- a/tests/test-symbols.sh +++ b/tests/test-symbols.sh @@ -17,10 +17,12 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -set -euo pipefail +set -xeuo pipefail -echo '1..2' +echo '1..3' +released_syms=${G_TEST_SRCDIR}/src/libostree/libostree-released.sym +devel_syms=${G_TEST_SRCDIR}/src/libostree/libostree-devel.sym if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "experimental"; then experimental_sym="${G_TEST_SRCDIR}/src/libostree/libostree-experimental.sym" experimental_sections="${G_TEST_SRCDIR}/apidoc/ostree-experimental-sections.txt" @@ -30,7 +32,7 @@ else fi echo "Verifying all expected symbols are actually exported..." -grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${G_TEST_SRCDIR}/src/libostree/libostree.sym $experimental_sym | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt +grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${released_syms} ${devel_syms} ${experimental_sym} | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt eu-readelf -a ${G_TEST_BUILDDIR}/.libs/libostree-1.so | grep 'FUNC.*GLOBAL.*DEFAULT.*@@LIBOSTREE_' | sed -e 's,^.* \(ostree_[A-Za-z0-9_]*\)@@LIBOSTREE_[0-9A-Z_.]*,\1,' |sort -u > found-symbols.txt diff -u expected-symbols.txt found-symbols.txt echo "ok exports" @@ -43,3 +45,11 @@ grep --no-filename '^ostree_' ${G_TEST_SRCDIR}/apidoc/ostree-sections.txt $exper diff -u expected-documented.txt found-documented.txt echo 'ok documented symbols' + +# ONLY update this checksum in release commits! +cat > released-sha256.txt <