Mir

Merge lp:~albaguirre/mir/remove-abi-compliance-checker into lp:mir

Proposed by Alberto Aguirre
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 4285
Proposed branch: lp:~albaguirre/mir/remove-abi-compliance-checker
Merge into: lp:mir
Prerequisite: lp:~albaguirre/mir/remove-duplicate-pkg-config
Diff against target: 569 lines (+9/-467)
6 files modified
CMakeLists.txt (+0/-1)
cmake/ABICheck.cmake (+0/-114)
debian/control (+0/-1)
doc/abi_compatibility_tools.md (+0/-26)
tools/abi_check.sh (+0/-315)
tools/setup-partial-armhf-chroot.sh (+9/-10)
To merge this branch: bzr merge lp:~albaguirre/mir/remove-abi-compliance-checker
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+332138@code.launchpad.net

Commit message

Remove abi-compliance-checker

Remove unused abi-compliance-checker related code

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4283
https://mir-jenkins.ubuntu.com/job/mir-ci/3722/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5107
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5345
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5332
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5332
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5332
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5151/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5151
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5151/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3722/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Sure

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2017-09-07 05:58:13 +0000
+++ CMakeLists.txt 2017-10-11 16:02:41 +0000
@@ -313,7 +313,6 @@
313endif ()313endif ()
314314
315enable_coverage_report(mirserver)315enable_coverage_report(mirserver)
316include (cmake/ABICheck.cmake)
317316
318add_custom_target(ptest317add_custom_target(ptest
319 COMMAND "${CMAKE_SOURCE_DIR}/tools/run_ctests.sh" "--cost-file" "${CMAKE_BINARY_DIR}/ptest_ctest_cost_data.txt" "sh ${CMAKE_BINARY_DIR}/discover_all_tests.sh" "--" "$$ARGS"318 COMMAND "${CMAKE_SOURCE_DIR}/tools/run_ctests.sh" "--cost-file" "${CMAKE_BINARY_DIR}/ptest_ctest_cost_data.txt" "sh ${CMAKE_BINARY_DIR}/discover_all_tests.sh" "--" "$$ARGS"
320319
=== removed file 'cmake/ABICheck.cmake'
--- cmake/ABICheck.cmake 2017-05-08 03:04:26 +0000
+++ cmake/ABICheck.cmake 1970-01-01 00:00:00 +0000
@@ -1,114 +0,0 @@
1cmake_minimum_required (VERSION 2.6)
2
3find_program(ABI_COMPLIANCE_CHECKER abi-compliance-checker)
4if (NOT ABI_COMPLIANCE_CHECKER)
5 message(WARNING "no ABI checks possible: abi-compliance-checker was not found")
6 return()
7endif()
8
9set(ENABLE_ABI_CHECK_TEST $ENV{MIR_ENABLE_ABI_CHECK_TEST})
10execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE ABI_CHECK_TARGET_MACH OUTPUT_STRIP_TRAILING_WHITESPACE)
11
12set(ABI_DUMPS_DIR "${CMAKE_BINARY_DIR}/abi_dumps/${ABI_CHECK_TARGET_MACH}")
13
14# Given a list of key value pairs such as "key1 value1 key2 value2...keyN valueN"
15# extract the value corresponding to the given key
16function(get_value_for_key a_list key value)
17 list(FIND a_list ${key} idx)
18 if (idx GREATER -1)
19 math(EXPR idx "${idx} + 1")
20 list(GET a_list ${idx} tmp_value)
21 set(${value} "${tmp_value}" PARENT_SCOPE)
22 endif()
23endfunction()
24
25# Makes a one-entry per line list of all include paths used
26# to compile the given library target
27function(get_includes libname output)
28 get_property(lib_includes TARGET ${libname} PROPERTY INCLUDE_DIRECTORIES)
29 list(REMOVE_DUPLICATES lib_includes)
30 string(REPLACE ";" "\n " tmp_out "${lib_includes}")
31 set(${output} "${tmp_out}" PARENT_SCOPE)
32endfunction()
33
34# Creates the XML descriptor file that describes the given library target
35# suitable for abi-compliance-checker
36function(make_lib_descriptor name)
37 set(libname "mir${name}")
38
39 # Optional argument LIBRARY_HEADER - use the given header to describe
40 # the binary library instead of assuming its described by include/<name>
41 get_value_for_key("${ARGN}" "LIBRARY_HEADER" library_header)
42 if ("${library_header}" STREQUAL "")
43 set(LIB_DESC_HEADERS "${CMAKE_SOURCE_DIR}/include/${name}\n ${private_headers}")
44 else()
45 set(LIB_DESC_HEADERS ${library_header})
46 endif()
47
48 # FIXME: Property "LOCATION" is now deprecated
49 if (NOT ${CMAKE_MAJOR_VERSION} LESS 3)
50 cmake_policy(SET CMP0026 OLD)
51 endif()
52 get_property(LIB_DESC_LIBS TARGET ${libname} PROPERTY LOCATION)
53
54 get_includes(${libname} LIB_DESC_INCLUDE_PATHS)
55 set(LIB_DESC_GCC_OPTS "${CMAKE_CXX_FLAGS}")
56
57 # Optional EXCLUDE_HEADERS - a list
58 # while attempting an abi dump
59 get_value_for_key("${ARGN}" "EXCLUDE_HEADERS" LIB_DESC_SKIP_HEADERS)
60
61 configure_file(${CMAKE_SOURCE_DIR}/tools/lib_descriptor.xml.skel ${libname}_desc.xml)
62endfunction()
63
64#These headers are not part of the libmirplatform ABI
65set(mirplatform-exclude-headers "${CMAKE_SOURCE_DIR}/include/platform/mir/input")
66
67make_lib_descriptor(core)
68make_lib_descriptor(client)
69make_lib_descriptor(server)
70make_lib_descriptor(common)
71make_lib_descriptor(cookie)
72make_lib_descriptor(platform EXCLUDE_HEADERS ${mirplatform-exclude-headers})
73if(MIR_BUILD_PLATFORM_MESA_KMS)
74make_lib_descriptor(clientplatformmesa LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/src/include/client/mir/client_platform_factory.h)
75make_lib_descriptor(platformgraphicsmesakms LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/graphics/platform.h)
76endif()
77make_lib_descriptor(platforminputevdev LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/input/)
78
79
80macro(_define_abi_dump_for libname)
81 set(ABI_DUMP_NAME ${ABI_DUMPS_DIR}/${libname}_next.abi.tar.gz)
82
83 add_custom_command(OUTPUT ${ABI_DUMP_NAME}
84 COMMAND abi-compliance-checker -gcc-path ${CMAKE_CXX_COMPILER} -l ${libname} -v1 next -dump-path ${ABI_DUMP_NAME} -dump-abi ${libname}_desc.xml
85 DEPENDS ${libname}
86 )
87 add_custom_target(abi-dump-${libname} DEPENDS ${ABI_DUMP_NAME})
88endmacro(_define_abi_dump_for)
89
90macro(_define_abi_check_for libname)
91 add_custom_target(abi-check-${libname}
92 COMMAND /bin/bash -c '${CMAKE_SOURCE_DIR}/tools/abi_check.sh ${libname} ${ABI_DUMPS_DIR} ${CMAKE_SOURCE_DIR}'
93 DEPENDS abi-dump-${libname}
94 )
95endmacro(_define_abi_check_for)
96
97set(the_libs mircore mirserver mirclient mircommon mirplatform mircookie mirplatforminputevdev)
98if(MIR_BUILD_PLATFORM_MESA_KMS)
99 set(the_libs ${the_libs} mirclientplatformmesa mirplatformgraphicsmesakms)
100endif()
101
102foreach(libname ${the_libs})
103 _define_abi_dump_for(${libname})
104 _define_abi_check_for(${libname})
105 list(APPEND abi-dump-list abi-dump-${libname})
106 list(APPEND abi-check-list abi-check-${libname})
107endforeach(libname)
108
109add_custom_target(abi-dump DEPENDS ${abi-dump-list})
110add_custom_target(abi-check DEPENDS ${abi-check-list})
111
112if (MIR_ENABLE_TESTS AND ENABLE_ABI_CHECK_TEST)
113 add_test(abi-compliance-check make abi-check)
114endif()
1150
=== modified file 'debian/control'
--- debian/control 2017-10-11 16:02:41 +0000
+++ debian/control 2017-10-11 16:02:41 +0000
@@ -35,7 +35,6 @@
35 valgrind [amd64 i386 armhf arm64],35 valgrind [amd64 i386 armhf arm64],
36 libglib2.0-dev,36 libglib2.0-dev,
37 libfreetype6-dev,37 libfreetype6-dev,
38 abi-compliance-checker,
39 libevdev-dev,38 libevdev-dev,
40 libinput-dev (>= 0.21),39 libinput-dev (>= 0.21),
41 uuid-dev,40 uuid-dev,
4241
=== removed file 'doc/abi_compatibility_tools.md'
--- doc/abi_compatibility_tools.md 2017-05-08 03:04:26 +0000
+++ doc/abi_compatibility_tools.md 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
1Tracking ABI compatibility {#abi_compatibility_tools}
2================================
3
4A few make targets exist to help us track ABI compatibility across
5different Mir versions and ensure we increase the ABI version properly.
6These targets invoke the abi-compliance-checker tool for the actual ABI check.
7
8The targets are:
9
10* **make abi-check**
11
12 Compiles all the public libraries in the current tree and checks their ABI against the latest released archive version
13
14* **make abi-check-\<library>**
15
16 Compiles only the specified library in the current tree and checks its ABI against the latest released archive version
17
18 - *library* can be any of the public library targets such as mirclient, mirserver, mirplatform, mircommon, etc.
19
20Sample usage
21------------
22
23 $ bzr branch lp:mir && cd mir
24 $ debian/rules override_dh_auto_configure
25 $ cd <build-dir>
26 $ make abi-check
270
=== removed file 'tools/abi_check.sh'
--- tools/abi_check.sh 2017-05-08 03:04:26 +0000
+++ tools/abi_check.sh 1970-01-01 00:00:00 +0000
@@ -1,315 +0,0 @@
1#!/bin/bash
2
3set -e
4
5declare -A abi_var_for=(\
6 ["mircore"]="MIRCORE_ABI" \
7 ["mirclient"]="MIRCLIENT_ABI" \
8 ["mircommon"]="MIRCOMMON_ABI" \
9 ["mirplatform"]="MIRPLATFORM_ABI" \
10 ["mirserver"]="MIRSERVER_ABI" \
11 ["mircookie"]="MIRCOOKIE_ABI" \
12 ["mirclientplatformmesa"]="MIR_CLIENT_PLATFORM_ABI" \
13 ["mirplatformgraphicsmesakms"]="MIR_SERVER_GRAPHICS_PLATFORM_ABI" \
14 ["mirplatforminputevdev"]="MIR_SERVER_INPUT_PLATFORM_ABI" )
15
16declare -A libtype=(\
17 ["mirclientplatformmesa"]="plugin-client" \
18 ["mirplatformgraphicsmesakms"]="plugin" \
19 ["mirplatforminputevdev"]="plugin" )
20
21declare -A package_name=(\
22 ["mirclientplatformmesa"]="mir-client-platform-mesa" \
23 ["mirplatformgraphicsmesakms"]="mir-platform-graphics-mesa-kms" \
24 ["mirplatforminputevdev"]="mir-platform-input-evdev" )
25
26declare -A libsoname=(\
27 ["mirclientplatformmesa"]="mir/client-platform/mesa" \
28 ["mirplatformgraphicsmesakms"]="mir/server-platform/graphics-mesa-kms" \
29 ["mirplatforminputevdev"]="mir/server-platform/input-evdev" )
30
31declare -A headers_for=(\
32 ["mirclientplatformmesa"]="src/include/client/mir/client_platform_factory.h" \
33 ["mirplatformgraphicsmesakms"]="mirplatform/mir/graphics/platform.h" \
34 ["mirplatforminputevdev"]="mirplatform/mir/input" )
35
36declare -A exclusions_for=(\
37 ["mirplatform"]="mir/input" \
38 ["mirserver"]="mir/input/input_device_hub.h" )
39
40function print_help_and_exit()
41{
42 local prog=$(basename $0)
43
44 local all_libs=${!abi_var_for[@]}
45 local all_libs=${all_libs// /|}
46 echo "Usage: $prog <libname> <abi_dump_dir> <source_dir>"
47 echo "Runs a full ABI check on the given library."
48 echo ""
49 echo " libname=[${all_libs}]"
50 exit 0
51}
52
53function get_abi_number()
54{
55 local abi_var=${1}
56 local search_dir=${2}
57 grep -hR --include=CMakeLists.txt "set($abi_var [[:digit:]]\+)" ${search_dir}/src | grep -o '[[:digit:]]\+'
58}
59
60function is_plugin()
61{
62 local name=${1}
63 if [[ ${libtype[${name}]} == "plugin"* ]];
64 then
65 return 0
66 else
67 return 1
68 fi
69}
70
71function package_abi_for()
72{
73 local name=${1}
74 local pkg_name=lib${name}
75
76 if is_plugin ${name};
77 then
78 pkg_name=${package_name[${name}]}
79 fi
80
81 apt-cache show ${pkg_name}* | grep Package: | grep -o '[[:digit:]]\+' | sort -n -r | head -n 1
82}
83
84function needs_abi_check()
85{
86 local name=${1}
87 local source_dir=${2}
88 local abi_var=${abi_var_for[${name}]}
89
90 local old_abi=$(package_abi_for ${name})
91 local new_abi=$(get_abi_number ${abi_var} ${source_dir})
92 if [ -z "${old_abi}" ];
93 then
94 echo "Failed to find old ${abi_var}" >&2
95 exit 1
96 fi
97
98 if [ -z "${new_abi}" ];
99 then
100 echo "Failed to find new ${abi_var}" >&2
101 exit 1
102 fi
103 echo "Detected ${abi_var}_new=${new_abi}"
104 echo "Detected ${abi_var}_old=${old_abi}"
105
106 if [ "${old_abi}" == "${new_abi}" ];
107 then
108 return 0
109 else
110 return 1
111 fi
112}
113
114function prepare_pkg_dir()
115{
116 local pkg_dir=${1}
117
118 # "partial" is required by apt-get
119 mkdir -p ${pkg_dir}/partial
120}
121
122function package_name_for()
123{
124 local name=${1}
125 local pkg_name=lib${name}
126
127 if is_plugin ${name};
128 then
129 pkg_name=${package_name[${name}]}
130 fi
131
132 local abi_number=$(package_abi_for ${name})
133 echo ${pkg_name}${abi_number}
134}
135
136function header_packages_for()
137{
138 local name=${1}
139 local pkg=lib${name}-dev
140
141 if is_plugin ${name};
142 then
143 # Some plugin headers are defined in this package
144 pkg="libmirplatform-dev"
145 fi
146
147 # Only interested in other mir dev package deps
148 local dev_deps=$(apt-cache depends ${pkg} | grep Depends: | grep -o "\<libmir.*-dev\>"| tr '\n' ' ')
149
150 # Workaround missing dependency
151 if [ ${name} == "mirserver" ] || [ ${name} == "mirplatforminputevdev" ];
152 then
153 dev_deps="${dev_deps} libmirclient-dev"
154 fi
155
156 echo "${pkg} ${dev_deps}"
157}
158
159function soname_for()
160{
161 local name=${1}
162 local pkg_dir=${2}
163 local arch=$(gcc -dumpmachine)
164 local abi_number=$(package_abi_for ${name})
165 local so_name=lib${name}
166
167 if is_plugin ${name};
168 then
169 so_name=${libsoname[${name}]}
170 fi
171
172 echo ${pkg_dir}/usr/lib/${arch}/${so_name}.so.${abi_number}
173}
174
175function download_packages()
176{
177 local name=${1}
178 local pkg_dir=${2}
179 local pkg_name=$(package_name_for ${name})
180 local header_pkgs=$(header_packages_for ${name})
181
182 echo "Downloading: ${pkg_name} ${header_pkgs} for ${name}"
183 apt-get -d -o Dir::Cache=${pkg_dir} -o Debug::NoLocking=1 install --reinstall -y ${pkg_name} ${header_pkgs}
184}
185
186function download_mir_source_into()
187{
188 local pkg_dir=${1}
189 pushd ${pkg_dir} > /dev/null
190
191 apt-get source --download-only mir
192 mkdir -p mirsource
193
194 local src_pkg=$(apt-cache showsrc mir | grep -o "mir.*orig.tar.gz" | head -n 1)
195 tar xf ${src_pkg} -C mirsource --strip-components 1
196
197 popd > /dev/null
198}
199
200function unpack_debs()
201{
202 local pkg_dir=${1}
203
204 for deb in ${pkg_dir}/archives/* ;
205 do
206 if [ ! -d ${deb} ] ; then
207 echo "unpacking: ${deb}"
208 dpkg -x ${deb} ${pkg_dir}
209 fi
210 done
211}
212
213function make_lib_descriptor()
214{
215 local name=${1}
216 local pkg_dir=${2}
217 local descriptor_file=${3}
218
219 local abi_number=$(package_abi_for ${name})
220 local lib=$(soname_for ${name} ${pkg_dir})
221
222 local lib_includes=
223 for path in $(ls ${pkg_dir}/usr/include);
224 do
225 lib_includes=${lib_includes}${pkg_dir}/usr/include/${path}"\n"
226 done
227
228 local lib_headers=${pkg_dir}/usr/include/${name}
229 local lib_skip_headers=
230 for path in ${exclusions_for[${name}]};
231 do
232 lib_skip_headers=${lib_excludes}${pkg_dir}/usr/include/${name}/${path}"\n"
233 done
234
235 if [ "${libtype[${name}]}" == "plugin-client" ];
236 then
237 download_mir_source_into ${pkg_dir}
238 lib_headers=${pkg_dir}/mirsource/${headers_for[${name}]}
239 elif [ "${libtype[${name}]}" == "plugin" ];
240 then
241 lib_headers=${pkg_dir}/usr/include/${headers_for[${name}]}
242 fi
243
244 cp ${SOURCE_DIR}/tools/lib_descriptor.xml.skel ${descriptor_file}
245 sed -i 's@${LIB_DESC_LIBS}@'${lib}'@g' ${descriptor_file}
246 sed -i 's@${LIB_DESC_HEADERS}@'${lib_headers}'@g' ${descriptor_file}
247 sed -i 's@${LIB_DESC_INCLUDE_PATHS}@'${lib_includes}'@g' ${descriptor_file}
248 sed -i 's/${LIB_DESC_GCC_OPTS}/-std=c++14/g' ${descriptor_file}
249 sed -i 's@${LIB_DESC_SKIP_HEADERS}@'${lib_skip_headers}'@g' ${descriptor_file}
250 sed -i 's/${LIB_DESC_DEFINES}//g' ${descriptor_file}
251}
252
253function dump_abi_for_prev_release()
254{
255 local name=${1}
256 local abi_dump_dir=${2}
257 local abi_dump=${3}
258 local pkg_dir=${abi_dump_dir}/prev-release-pkgs
259
260 if [ ! -s "${abi_dump}" ];
261 then
262 echo "Generating ${abi_dump}"
263 prepare_pkg_dir ${pkg_dir}
264 download_packages ${name} ${pkg_dir}
265 unpack_debs ${pkg_dir}
266
267 local descriptor_file=${pkg_dir}/${name}_desc.xml
268 make_lib_descriptor ${name} ${pkg_dir} ${descriptor_file}
269
270 abi-compliance-checker -gcc-path g++ -l ${name} -v1 previous -dump-path ${abi_dump} -dump-abi ${descriptor_file}
271 fi
272
273 if [ ! -s "${abi_dump}" ];
274 then
275 echo "Error: failed to generate abi dump for ${name}"
276 exit 1;
277 fi
278}
279
280function run_abi_check()
281{
282 local name=${1}
283 local old_dump=${2}
284 local new_dump=${3}
285 local skip_symbols_file=${4}
286
287 if [ -f ${skip_symbols_file} ];
288 then
289 local skip_symbols_opt="-skip-symbols ${skip_symbols_file}"
290 fi
291
292 echo "Running abi-compliance-checker for ${name}"
293 abi-compliance-checker -l ${NAME} -old "${old_dump}" -new "${new_dump}" ${skip_symbols_opt}
294}
295
296if [ $# -ne 3 ];
297then
298 print_help_and_exit
299fi
300
301NAME=${1}
302ABI_DUMP_DIR=${2}
303SOURCE_DIR=${3}
304
305OLD_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_prev.abi.tar.gz
306NEW_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_next.abi.tar.gz
307SKIP_SYMBOLS_FILE=${SOURCE_DIR}/tools/abi-check-${NAME}-skip-symbols
308
309if needs_abi_check ${NAME} ${SOURCE_DIR};
310then
311 dump_abi_for_prev_release ${NAME} ${ABI_DUMP_DIR} ${OLD_ABI_DUMP_FILE}
312 run_abi_check ${NAME} ${OLD_ABI_DUMP_FILE} ${NEW_ABI_DUMP_FILE} ${SKIP_SYMBOLS_FILE}
313else
314 echo "No need for abi-compliance-checker, ABI has already been bumped for ${NAME}"
315fi
3160
=== modified file 'tools/setup-partial-armhf-chroot.sh'
--- tools/setup-partial-armhf-chroot.sh 2017-05-08 03:04:26 +0000
+++ tools/setup-partial-armhf-chroot.sh 2017-10-11 16:02:41 +0000
@@ -10,9 +10,9 @@
10usage() {10usage() {
11 echo "Usage: ${name} [options] mychroot-dir"11 echo "Usage: ${name} [options] mychroot-dir"
12 echo "options:"12 echo "options:"
13 echo " -a arch Select architecture, i.e. armhf, arm64, ppc... Default is armhf"13 echo " -a arch Select architecture, i.e. armhf, arm64, ppc... Default is armhf"
14 echo " -d dist Select distribution, i.e. vivid, wily. Default is vivid"14 echo " -d dist Select distribution, i.e. vivid, wily. Default is vivid"
15 echo " -r rep Select an additional repository for bootstrap. Default is none"15 echo " -r rep Select an additional repository for bootstrap. Default is none"
16 echo16 echo
17 echo "please supply at least a directory to create partial chroot in. (eg, ./setup-partial-armhf-chroot.sh mychroot-dir)"17 echo "please supply at least a directory to create partial chroot in. (eg, ./setup-partial-armhf-chroot.sh mychroot-dir)"
18}18}
@@ -39,7 +39,7 @@
39 sources="$sources source$sourceid"39 sources="$sources source$sourceid"
40 ;;40 ;;
41 :)41 :)
42 echo "Option -$OPTARG requires an argument" 42 echo "Option -$OPTARG requires an argument"
43 usage43 usage
44 exit 144 exit 1
45 ;;45 ;;
@@ -48,7 +48,7 @@
48 exit 048 exit 0
49 ;;49 ;;
50 \?)50 \?)
51 echo "Invalid option: -$OPTARG" 51 echo "Invalid option: -$OPTARG"
52 usage52 usage
53 exit 153 exit 1
54 ;;54 ;;
@@ -66,7 +66,7 @@
66echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}"66echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}"
6767
68if [ ! -d ${directory} ]; then68if [ ! -d ${directory} ]; then
69 mkdir -p ${directory} 69 mkdir -p ${directory}
70fi70fi
7171
72DEBCONTROL=$(pwd)/../debian/control72DEBCONTROL=$(pwd)/../debian/control
@@ -83,7 +83,7 @@
83# dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr83# dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr
84builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 )84builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 )
85if [ $? -eq 0 ] ; then85if [ $? -eq 0 ] ; then
86 exit 0 86 exit 0
87fi87fi
88echo "${builddeps}"88echo "${builddeps}"
8989
@@ -97,7 +97,6 @@
97 -e 's/Unmet build dependencies://g' \97 -e 's/Unmet build dependencies://g' \
98 -e 's/build-essential:native//g')98 -e 's/build-essential:native//g')
99builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g')99builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g')
100builddeps=$(echo ${builddeps} | sed -e 's/abi-compliance-checker//g')
101builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g')100builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g')
102101
103case ${arch} in102case ${arch} in
@@ -143,7 +142,7 @@
143done142done
144143
145# Fakeroot is required to stop the apt update command giving up144# Fakeroot is required to stop the apt update command giving up
146fakeroot multistrap -f mstrap.conf 145fakeroot multistrap -f mstrap.conf
147146
148rm -f var/cache/apt/archives/lock147rm -f var/cache/apt/archives/lock
149148
@@ -163,4 +162,4 @@
163 ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink}162 ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink}
164done163done
165164
166popd > /dev/null 165popd > /dev/null

Subscribers

People subscribed via source and target branches