diff options
author | Marty E. Plummer <[email protected]> | 2019-05-21 17:02:04 -0500 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-22 10:30:33 +0200 |
commit | 7db1a953a39dc89585ae12fb6632a05fd04be5cd (patch) | |
tree | 7ee1c663bfb4e98c714d4009a26f5f01fc565136 | |
parent | a30185610beb815648854207cb2a29d0fa9303dc (diff) | |
download | mate-desktop-7db1a953a39dc89585ae12fb6632a05fd04be5cd.tar.bz2 mate-desktop-7db1a953a39dc89585ae12fb6632a05fd04be5cd.tar.xz |
add abi check
Signed-off-by: Marty E. Plummer <[email protected]>
-rwxr-xr-x | abi-check | 45 | ||||
-rw-r--r-- | libmate-desktop/mate-desktop.abi | 247 | ||||
-rw-r--r-- | meson.build | 10 |
3 files changed, 302 insertions, 0 deletions
diff --git a/abi-check b/abi-check new file mode 100755 index 0000000..666557b --- /dev/null +++ b/abi-check @@ -0,0 +1,45 @@ +#!/bin/bash +set -eu + +RET=0 + +if ! [[ -f "${LIB}" ]]; then + echo "Test library \"${LIB}\" does not exist" + exit 99; +fi + +if ! [[ -n "${NM}" ]]; then + echo "NM environment variable not set" + exit 99; +fi + +AVAIL_FUNCS="$(${NM} -D --format=bsd --defined-only ${LIB} | awk '{print $3}')" + +REQ_FUNCS="$(cat ${ABI})" + +NEW_ABI=$(echo "$AVAIL_FUNCS" | while read func; do + echo "$func" | grep -q "^_" && continue + echo "${REQ_FUNCS}" | grep -q "^${func}$" && continue + + echo "$func" +done) + +if [[ -n ${NEW_ABI} ]]; then + echo "New ABI detected - If intentional, update ${ABI}." + echo "${NEW_ABI}" + RET=1; +fi + +REMOVED_ABI=$(echo "${REQ_FUNCS}" | while read func; do + echo "${AVAIL_FUNCS}" | grep -q "^${func}$" && continue + + echo "${func}" +done) + +if [[ -n ${REMOVED_ABI} ]]; then + echo "ABI break detected - required symbols no longer exported!" + echo "${REMOVED_ABI}" + RET=1 +fi + +exit ${RET} diff --git a/libmate-desktop/mate-desktop.abi b/libmate-desktop/mate-desktop.abi new file mode 100644 index 0000000..df4617f --- /dev/null +++ b/libmate-desktop/mate-desktop.abi @@ -0,0 +1,247 @@ +mate_bg_changes_with_time +mate_bg_create_frame_thumbnail +mate_bg_create_surface +mate_bg_create_surface_scale +mate_bg_create_thumbnail +mate_bg_crossfade_get_type +mate_bg_crossfade_is_started +mate_bg_crossfade_new +mate_bg_crossfade_set_end_surface +mate_bg_crossfade_set_start_surface +mate_bg_crossfade_start +mate_bg_crossfade_start_widget +mate_bg_crossfade_stop +mate_bg_draw +mate_bg_get_color +mate_bg_get_draw_background +mate_bg_get_filename +mate_bg_get_image_size +mate_bg_get_placement +mate_bg_get_surface_from_root +mate_bg_get_type +mate_bg_has_multiple_sizes +mate_bg_is_dark +mate_bg_load_from_gsettings +mate_bg_load_from_preferences +mate_bg_load_from_system_gsettings +mate_bg_load_from_system_preferences +mate_bg_new +mate_bg_save_to_gsettings +mate_bg_save_to_preferences +mate_bg_set_color +mate_bg_set_draw_background +mate_bg_set_filename +mate_bg_set_placement +mate_bg_set_surface_as_root +mate_bg_set_surface_as_root_with_crossfade +mate_color_button_get_alpha +mate_color_button_get_color +mate_color_button_get_rgba +mate_color_button_get_title +mate_color_button_get_type +mate_color_button_get_use_alpha +mate_color_button_new +mate_color_button_new_with_color +mate_color_button_set_alpha +mate_color_button_set_color +mate_color_button_set_rgba +mate_color_button_set_title +mate_color_button_set_use_alpha +mate_color_selection_dialog_get_color_selection +mate_color_selection_dialog_get_type +mate_color_selection_dialog_new +mate_color_selection_get_color +mate_color_selection_get_current_alpha +mate_color_selection_get_current_color +mate_color_selection_get_has_opacity_control +mate_color_selection_get_has_palette +mate_color_selection_get_previous_alpha +mate_color_selection_get_previous_color +mate_color_selection_get_type +mate_color_selection_is_adjusting +mate_color_selection_new +mate_color_selection_palette_from_string +mate_color_selection_palette_to_string +mate_color_selection_set_change_palette_hook +mate_color_selection_set_change_palette_with_screen_hook +mate_color_selection_set_color +mate_color_selection_set_current_alpha +mate_color_selection_set_current_color +mate_color_selection_set_has_opacity_control +mate_color_selection_set_has_palette +mate_color_selection_set_previous_alpha +mate_color_selection_set_previous_color +mate_dconf_list_subdirs +mate_dconf_recursive_reset +mate_dconf_sync +mate_dconf_write_sync +mate_desktop_gtk_style_get_dark_color +mate_desktop_gtk_style_get_light_color +mate_desktop_item_attr_exists +mate_desktop_item_clear_localestring +mate_desktop_item_clear_section +mate_desktop_item_copy +mate_desktop_item_drop_uri_list +mate_desktop_item_drop_uri_list_with_env +mate_desktop_item_error_quark +mate_desktop_item_exists +mate_desktop_item_find_icon +mate_desktop_item_get_attr_locale +mate_desktop_item_get_boolean +mate_desktop_item_get_entry_type +mate_desktop_item_get_file_status +mate_desktop_item_get_icon +mate_desktop_item_get_languages +mate_desktop_item_get_localestring +mate_desktop_item_get_localestring_lang +mate_desktop_item_get_location +mate_desktop_item_get_string +mate_desktop_item_get_strings +mate_desktop_item_get_type +mate_desktop_item_launch +mate_desktop_item_launch_on_screen +mate_desktop_item_launch_with_env +mate_desktop_item_new +mate_desktop_item_new_from_basename +mate_desktop_item_new_from_file +mate_desktop_item_new_from_string +mate_desktop_item_new_from_uri +mate_desktop_item_ref +mate_desktop_item_save +mate_desktop_item_set_boolean +mate_desktop_item_set_entry_type +mate_desktop_item_set_launch_time +mate_desktop_item_set_localestring +mate_desktop_item_set_localestring_lang +mate_desktop_item_set_location +mate_desktop_item_set_location_file +mate_desktop_item_set_string +mate_desktop_item_set_strings +mate_desktop_item_unref +mate_desktop_prepend_terminal_to_vector +mate_desktop_thumbnail_factory_can_thumbnail +mate_desktop_thumbnail_factory_create_failed_thumbnail +mate_desktop_thumbnail_factory_generate_thumbnail +mate_desktop_thumbnail_factory_get_type +mate_desktop_thumbnail_factory_has_valid_failed_thumbnail +mate_desktop_thumbnail_factory_lookup +mate_desktop_thumbnail_factory_new +mate_desktop_thumbnail_factory_save_thumbnail +mate_desktop_thumbnail_has_uri +mate_desktop_thumbnail_is_valid +mate_desktop_thumbnail_md5 +mate_desktop_thumbnail_path_for_uri +mate_desktop_thumbnail_scale_down_pixbuf +mate_gdk_spawn_command_line_on_screen +mate_get_all_locales +mate_get_country_from_code +mate_get_country_from_locale +mate_get_language_from_code +mate_get_language_from_locale +mate_gsettings_append_strv +mate_gsettings_is_valid_keyname +mate_gsettings_remove_all_from_strv +mate_gsettings_schema_exists +mate_gsettings_strv_to_gslist +mate_hsv_get_color +mate_hsv_get_metrics +mate_hsv_get_type +mate_hsv_is_adjusting +mate_hsv_new +mate_hsv_set_color +mate_hsv_set_metrics +mate_language_has_translations +mate_normalize_locale +mate_parse_locale +mate_rr_config_applicable +mate_rr_config_apply_from_filename_with_time +mate_rr_config_apply_with_time +mate_rr_config_ensure_primary +mate_rr_config_equal +mate_rr_config_get_backup_filename +mate_rr_config_get_clone +mate_rr_config_get_intended_filename +mate_rr_config_get_outputs +mate_rr_config_get_type +mate_rr_config_load_current +mate_rr_config_load_filename +mate_rr_config_match +mate_rr_config_new_current +mate_rr_config_new_stored +mate_rr_config_sanitize +mate_rr_config_save +mate_rr_config_set_clone +mate_rr_crtc_can_drive_output +mate_rr_crtc_get_current_mode +mate_rr_crtc_get_current_rotation +mate_rr_crtc_get_gamma +mate_rr_crtc_get_id +mate_rr_crtc_get_position +mate_rr_crtc_get_rotations +mate_rr_crtc_get_type +mate_rr_crtc_set_config +mate_rr_crtc_set_config_with_time +mate_rr_crtc_set_gamma +mate_rr_crtc_supports_rotation +mate_rr_error_quark +mate_rr_labeler_get_rgba_for_output +mate_rr_labeler_get_type +mate_rr_labeler_hide +mate_rr_labeler_new +mate_rr_mode_get_freq +mate_rr_mode_get_height +mate_rr_mode_get_id +mate_rr_mode_get_type +mate_rr_mode_get_width +mate_rr_output_can_clone +mate_rr_output_get_connector_type +mate_rr_output_get_crtc +mate_rr_output_get_current_mode +mate_rr_output_get_edid_data +mate_rr_output_get_height_mm +mate_rr_output_get_id +mate_rr_output_get_is_primary +mate_rr_output_get_name +mate_rr_output_get_position +mate_rr_output_get_possible_crtcs +mate_rr_output_get_preferred_mode +mate_rr_output_get_type +mate_rr_output_get_width_mm +mate_rr_output_info_get_aspect_ratio +mate_rr_output_info_get_display_name +mate_rr_output_info_get_geometry +mate_rr_output_info_get_name +mate_rr_output_info_get_preferred_height +mate_rr_output_info_get_preferred_width +mate_rr_output_info_get_primary +mate_rr_output_info_get_product +mate_rr_output_info_get_refresh_rate +mate_rr_output_info_get_rotation +mate_rr_output_info_get_serial +mate_rr_output_info_get_type +mate_rr_output_info_get_vendor +mate_rr_output_info_is_active +mate_rr_output_info_is_connected +mate_rr_output_info_set_active +mate_rr_output_info_set_geometry +mate_rr_output_info_set_primary +mate_rr_output_info_set_refresh_rate +mate_rr_output_info_set_rotation +mate_rr_output_is_connected +mate_rr_output_is_laptop +mate_rr_output_list_modes +mate_rr_output_supports_mode +mate_rr_screen_get_crtc_by_id +mate_rr_screen_get_output_by_id +mate_rr_screen_get_output_by_name +mate_rr_screen_get_ranges +mate_rr_screen_get_timestamps +mate_rr_screen_get_type +mate_rr_screen_list_clone_modes +mate_rr_screen_list_crtcs +mate_rr_screen_list_modes +mate_rr_screen_list_outputs +mate_rr_screen_new +mate_rr_screen_refresh +mate_rr_screen_set_primary_output +mate_rr_screen_set_size diff --git a/meson.build b/meson.build index cdd701a..7ca7c5e 100644 --- a/meson.build +++ b/meson.build @@ -52,6 +52,7 @@ age = 1 libversion = '@0@.@1@.@2@'.format(current, age, revision) cc = meson.get_compiler('c') +nm = find_program('nm') config_h = configuration_data() @@ -112,3 +113,12 @@ configure_file( ) meson.add_install_script('utils/post_install.py') + +test('libmate-desktop symbols check', + find_program('abi-check'), + env: [ + 'LIB=@0@'.format(libmate_desktop.full_path()), + 'NM=@0@'.format(nm.path()), + 'ABI=@0@/libmate-desktop/mate-desktop.abi'.format(meson.source_root()) + ] +) |