Remove ABI compliance checker code.
It's broken, unmaintained, poorly implemented and obsoleted by saner debug-info methods. Note: To do the compliance check properly would require much more extensive work to clearly define public and private interfaces (without manual bookeeping of files or symbols either, of course, because who would want that...). Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a Reviewed-on: https://code.wireshark.org/review/33928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
cdac470a60
commit
6e5ba74b31
|
@ -1416,10 +1416,6 @@ set(DATAFILE_DIR ${_datafile_dir} CACHE INTERNAL "Build time data file location.
|
|||
# learn about the directory location.
|
||||
add_subdirectory( wsutil )
|
||||
|
||||
if(NOT WIN32)
|
||||
add_custom_target(dumpabi DEPENDS dumpabi-libwireshark dumpabi-libwiretap dumpabi-libwsutil)
|
||||
endif()
|
||||
|
||||
if(BUILD_wireshark AND QT_FOUND)
|
||||
add_subdirectory( ui/qt )
|
||||
endif()
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<descriptor>
|
||||
<version>
|
||||
0.0.0
|
||||
</version>
|
||||
<headers>
|
||||
{RELPATH}/abi-check-headers
|
||||
</headers>
|
||||
<libs>
|
||||
@LIBRARY_OUTPUT_PATH@
|
||||
</libs>
|
||||
<include_paths>@INCLUDE_DIRS@
|
||||
</include_paths>
|
||||
<gcc_options>
|
||||
-D_U_="__attribute((unused))"
|
||||
</gcc_options>
|
||||
<include_preamble>
|
||||
config.h
|
||||
</include_preamble>
|
||||
</descriptor>
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# ABI Check related macros
|
||||
#
|
||||
# ABI compliance checker can be obtained from
|
||||
# http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
|
||||
# Checked using version 1.21.12
|
||||
|
||||
MACRO(ABICHECK _libname)
|
||||
set(ABICHECK_TMPDIR ${CMAKE_CURRENT_BINARY_DIR}/abi-check-headers)
|
||||
set(ABICHECK_COMMAND abi-compliance-checker -l ${_libname} -v2 ${FULL_SO_VERSION}
|
||||
-relpath ${CMAKE_CURRENT_BINARY_DIR} -dump-abi abi-descriptor.xml
|
||||
|| cat ${CMAKE_CURRENT_BINARY_DIR}/logs/${_libname}/[0-9]*/log.txt)
|
||||
get_directory_property(INCLUDE_DIRS INCLUDE_DIRECTORIES)
|
||||
list(REMOVE_DUPLICATES INCLUDE_DIRS)
|
||||
string(REGEX REPLACE ";" "\n" INCLUDE_DIRS "${INCLUDE_DIRS}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/abi-descriptor.template" abi-descriptor.xml)
|
||||
# discover and substitute list of include directories for ABI compatibility
|
||||
# checks
|
||||
file(GLOB ABICHECK_HEADERS RELATIVE ${CMAKE_CURRENT_BINARY_DIR} *.h)
|
||||
set(ABICHECK_HEADERS ${ABICHECK_HEADERS} ${CMAKE_SOURCE_DIR}/ws_symbol_export.h)
|
||||
add_custom_target(dumpabi-${_libname} DEPENDS ${_libname}.abi.tar.gz)
|
||||
set_target_properties(dumpabi-${_libname} PROPERTIES FOLDER "Auxiliary")
|
||||
if (WIN32)
|
||||
set(ABI_COPY_COMMAND xcopy)
|
||||
set(ABI_COPY_FLAGS /d)
|
||||
else()
|
||||
set(ABI_COPY_COMMAND cp)
|
||||
set(ABI_COPY_FLAGS)
|
||||
endif()
|
||||
ENDMACRO()
|
|
@ -7,8 +7,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
|
||||
include(UseABICheck)
|
||||
|
||||
if (HAVE_HFI_SECTION_INIT)
|
||||
add_definitions(
|
||||
-DHAVE_HFI_SECTION_INIT
|
||||
|
@ -325,52 +323,8 @@ set_target_properties(epan PROPERTIES
|
|||
LINK_FLAGS "${WS_LINK_FLAGS}"
|
||||
VERSION "0.0.0" SOVERSION 0
|
||||
INSTALL_RPATH "${LIBRARY_INSTALL_RPATH}"
|
||||
)
|
||||
|
||||
ABICHECK(libwireshark)
|
||||
|
||||
set(TOP_LEVEL_HEADERS ${CMAKE_BINARY_DIR}/config.h)
|
||||
file(GLOB CRYPT_HEADERS crypt/*.h)
|
||||
file(GLOB DFILTER_HEADERS dfilter/*.h ../tools/lemon/cppmagic.h)
|
||||
file(GLOB D_HEADERS dissectors/*.h)
|
||||
file(GLOB FTYPES_HEADERS ftypes/*.h)
|
||||
file(GLOB WMEM_HEADERS wmem/*.h)
|
||||
|
||||
add_custom_command(OUTPUT libwireshark.abi.tar.gz
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/epan
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/crypt
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/dfilter
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/dissectors
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/ftypes
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}/wmem
|
||||
COMMAND ${ABI_COPY_COMMAND} ${TOP_LEVEL_HEADERS} ${ABICHECK_TMPDIR} ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${ABICHECK_HEADERS} ${ABICHECK_TMPDIR}/epan ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${CRYPT_HEADERS} ${ABICHECK_TMPDIR}/crypt ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${DFILTER_HEADERS} ${ABICHECK_TMPDIR}/dfilter ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${D_HEADERS} ${ABICHECK_TMPDIR}/dissectors ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${FTYPES_HEADERS} ${ABICHECK_TMPDIR}/ftypes ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${WMEM_HEADERS} ${ABICHECK_TMPDIR}/wmem ${ABI_COPY_FLAGS}
|
||||
COMMAND rm -f ${ABICHECK_TMPDIR}/dissectors/x11-extension-implementation.h
|
||||
${ABICHECK_TMPDIR}/dissectors/packet-rtps.h
|
||||
${ABICHECK_TMPDIR}/dissectors/x11-glx-render-enum.h
|
||||
${ABICHECK_TMPDIR}/dissectors/x11-register-info.h
|
||||
${ABICHECK_TMPDIR}/dissectors/packet-idmp.h
|
||||
COMMAND ${ABICHECK_COMMAND}
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/libwireshark/libwireshark_* ${CMAKE_CURRENT_BINARY_DIR}/libwireshark.abi.tar.gz
|
||||
COMMAND rm -rf ${ABICHECK_TMPDIR} ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps
|
||||
# COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps ${ABICHECK_TMPDIR}/config.h
|
||||
# ${ABICHECK_TMPDIR}/epan/* ${ABICHECK_TMPDIR}/crypt/*
|
||||
# ${ABICHECK_TMPDIR}/dfilter/* ${ABICHECK_TMPDIR}/dissectors/*
|
||||
# ${ABICHECK_TMPDIR}/ftypes/* ${ABICHECK_TMPDIR}/wmem/*
|
||||
DEPENDS ${HEADERS}
|
||||
${CRYPT_HEADERS} ${DFILTER_HEADERS} ${D_HEADERS}
|
||||
${FTYPES_HEADERS} ${WMEM_HEADERS} epan)
|
||||
|
||||
# By default the name for a library with target name epan will be libepan,
|
||||
# but Ethereal is now named Wireshark
|
||||
set_target_properties(epan PROPERTIES
|
||||
# By default the name for a library with target name epan will be libepan,
|
||||
# but Ethereal is now named Wireshark
|
||||
OUTPUT_NAME "wireshark"
|
||||
PREFIX "lib"
|
||||
FOLDER "DLLs"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#ifdef _WIN32
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/win32-utils.h>
|
||||
#endif
|
||||
|
||||
#include <wsutil/socket.h>
|
||||
|
@ -38,7 +39,6 @@
|
|||
#endif
|
||||
|
||||
#include <wsutil/strtoi.h>
|
||||
#include <wsutil/win32-utils.h>
|
||||
|
||||
#include "sharkd.h"
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Compare ABIs of two Wireshark working copies
|
||||
#
|
||||
# Copyright 2013 Balint Reczey <balint at balintreczey.hu>
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
# Copyright 1998 Gerald Combs
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Tested with abi-compliance-checker 1.96.1
|
||||
|
||||
function acc () {
|
||||
LIBNAME=$1
|
||||
DIR=$2
|
||||
# compare only dumped ABI descriptions first, then fall back to full comparison
|
||||
# if no difference is found
|
||||
if abi-compliance-checker -l $LIBNAME \
|
||||
-d1 $V1_PATH/$DIR/$REL_DUMP_PATH/$LIBNAME.abi.tar.gz \
|
||||
-d2 $V2_PATH/$DIR/$REL_DUMP_PATH/$LIBNAME.abi.tar.gz ; then
|
||||
abi-compliance-checker -l $LIBNAME \
|
||||
-d1 $V1_PATH/$DIR/abi-descriptor.xml -relpath1 $V1_PATH/$DIR \
|
||||
-v1 `ls $V1_PATH/$DIR/$REL_LIB_PATH/$LIBNAME.so.?.*.*|sed 's/.*\.so\.//'` \
|
||||
-d2 $V2_PATH/$DIR/abi-descriptor.xml -relpath2 $V2_PATH/$DIR \
|
||||
-v2 `ls $V2_PATH/$DIR/$REL_LIB_PATH/$LIBNAME.so.?.*.*|sed 's/.*\.so\.//'` \
|
||||
-check-implementation
|
||||
fi
|
||||
}
|
||||
|
||||
V1_PATH=$1
|
||||
V2_PATH=$2
|
||||
|
||||
# both working copies have to be built first with cmake
|
||||
# make -C $V1_PATH all dumpabi
|
||||
# make -C $V2_PATH all dumpabi
|
||||
|
||||
REL_LIB_PATH=../lib
|
||||
REL_DUMP_PATH=.
|
||||
|
||||
acc libwiretap wiretap $V1_PATH $V2_PATH
|
||||
RET=$?
|
||||
acc libwsutil wsutil $V1_PATH $V2_PATH
|
||||
RET=$(($RET + $?))
|
||||
acc libwireshark epan $V1_PATH $V2_PATH
|
||||
exit $(($RET + $?))
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# checks if Wireshark's ABI has been changes since last release (tag)
|
||||
#
|
||||
# Copyright 2011 Balint Reczey <balint@balintreczey.hu>
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
# Copyright 1998 Gerald Combs
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set -e
|
||||
|
||||
if test -z "$1"; then
|
||||
echo "Usage:"
|
||||
echo "$0 \"<build commands>\""
|
||||
echo "e.g. $0 \"./autogen.sh && ./configure && make -j3 && make dumpabi\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# build current version
|
||||
bash -c "$1"
|
||||
|
||||
cd `git rev-parse --show-toplevel`
|
||||
# we are at top level
|
||||
|
||||
# Stable branches with releases
|
||||
#LAST_TAG=`git describe --tags --abbrev=0`
|
||||
#LAST_TAG_DIR=$LAST_TAG
|
||||
|
||||
# Use latest commit
|
||||
LAST_TAG=HEAD
|
||||
LAST_TAG_DIR=master
|
||||
|
||||
rm -rf $LAST_TAG_DIR
|
||||
mkdir $LAST_TAG_DIR
|
||||
git archive $LAST_TAG | tar -x -C $LAST_TAG_DIR
|
||||
|
||||
# build latest tag
|
||||
(cd $LAST_TAG_DIR && bash -c "$1")
|
||||
|
||||
exec tools/compare-abis.sh `pwd`/$LAST_TAG_DIR `pwd`
|
||||
|
|
@ -7,8 +7,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
|
||||
include(UseABICheck)
|
||||
|
||||
set(WIRETAP_PUBLIC_HEADERS
|
||||
file_wrappers.h
|
||||
merge.h
|
||||
|
@ -126,18 +124,6 @@ set_target_properties(wiretap PROPERTIES
|
|||
INSTALL_RPATH "${LIBRARY_INSTALL_RPATH}"
|
||||
)
|
||||
|
||||
ABICHECK(libwiretap)
|
||||
|
||||
add_custom_command(OUTPUT libwiretap.abi.tar.gz
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${ABI_COPY_COMMAND} ../config.h ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${ABICHECK_HEADERS} ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABICHECK_COMMAND}
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/libwiretap/libwiretap_* ${CMAKE_CURRENT_BINARY_DIR}/libwiretap.abi.tar.gz
|
||||
COMMAND rm -rf ${ABICHECK_TMPDIR} ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps
|
||||
DEPENDS ${HEADERS} wiretap)
|
||||
|
||||
target_link_libraries(wiretap
|
||||
PUBLIC
|
||||
wsutil
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
|
||||
include(UseABICheck)
|
||||
|
||||
add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}\")
|
||||
add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\")
|
||||
add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}\")
|
||||
|
@ -251,18 +249,6 @@ set_target_properties(wsutil PROPERTIES
|
|||
INSTALL_RPATH "${LIBRARY_INSTALL_RPATH}"
|
||||
)
|
||||
|
||||
ABICHECK(libwsutil)
|
||||
|
||||
add_custom_command(OUTPUT libwsutil.abi.tar.gz
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}
|
||||
COMMAND ${ABI_COPY_COMMAND} ../config.h ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABI_COPY_COMMAND} ${ABICHECK_HEADERS} ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
||||
COMMAND ${ABICHECK_COMMAND}
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/libwsutil/libwsutil_* ${CMAKE_CURRENT_BINARY_DIR}/libwsutil.abi.tar.gz
|
||||
COMMAND rm -rf ${ABICHECK_TMPDIR} ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps
|
||||
DEPENDS ${HEADERS} wsutil)
|
||||
|
||||
target_link_libraries(wsutil
|
||||
PUBLIC
|
||||
${CMAKE_DL_LIBS}
|
||||
|
|
|
@ -11,12 +11,6 @@
|
|||
#ifndef __WIN32UTIL_H__
|
||||
#define __WIN32UTIL_H__
|
||||
|
||||
/*
|
||||
* This is included in ABI checking, so protect it with #ifdef _WIN32,
|
||||
* so it doesn't break ABI checking on UN*X.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
@ -90,6 +84,4 @@ BOOL win32_create_process(const char *application_name, const char *command_line
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#endif /* __WIN32UTIL_H__ */
|
||||
|
|
Loading…
Reference in New Issue