Merge lp:~albaguirre/mir/remove-abi-compliance-checker into lp:mir
- remove-abi-compliance-checker
- Merge into development-branch
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 |
Related bugs: |
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-
Remove unused abi-compliance-
Description of the change
To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : | # |
review:
Approve
(continuous-integration)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2017-09-07 05:58:13 +0000 | |||
3 | +++ CMakeLists.txt 2017-10-11 16:02:41 +0000 | |||
4 | @@ -313,7 +313,6 @@ | |||
5 | 313 | endif () | 313 | endif () |
6 | 314 | 314 | ||
7 | 315 | enable_coverage_report(mirserver) | 315 | enable_coverage_report(mirserver) |
8 | 316 | include (cmake/ABICheck.cmake) | ||
9 | 317 | 316 | ||
10 | 318 | add_custom_target(ptest | 317 | add_custom_target(ptest |
11 | 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" |
12 | 320 | 319 | ||
13 | === removed file 'cmake/ABICheck.cmake' | |||
14 | --- cmake/ABICheck.cmake 2017-05-08 03:04:26 +0000 | |||
15 | +++ cmake/ABICheck.cmake 1970-01-01 00:00:00 +0000 | |||
16 | @@ -1,114 +0,0 @@ | |||
17 | 1 | cmake_minimum_required (VERSION 2.6) | ||
18 | 2 | |||
19 | 3 | find_program(ABI_COMPLIANCE_CHECKER abi-compliance-checker) | ||
20 | 4 | if (NOT ABI_COMPLIANCE_CHECKER) | ||
21 | 5 | message(WARNING "no ABI checks possible: abi-compliance-checker was not found") | ||
22 | 6 | return() | ||
23 | 7 | endif() | ||
24 | 8 | |||
25 | 9 | set(ENABLE_ABI_CHECK_TEST $ENV{MIR_ENABLE_ABI_CHECK_TEST}) | ||
26 | 10 | execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE ABI_CHECK_TARGET_MACH OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
27 | 11 | |||
28 | 12 | set(ABI_DUMPS_DIR "${CMAKE_BINARY_DIR}/abi_dumps/${ABI_CHECK_TARGET_MACH}") | ||
29 | 13 | |||
30 | 14 | # Given a list of key value pairs such as "key1 value1 key2 value2...keyN valueN" | ||
31 | 15 | # extract the value corresponding to the given key | ||
32 | 16 | function(get_value_for_key a_list key value) | ||
33 | 17 | list(FIND a_list ${key} idx) | ||
34 | 18 | if (idx GREATER -1) | ||
35 | 19 | math(EXPR idx "${idx} + 1") | ||
36 | 20 | list(GET a_list ${idx} tmp_value) | ||
37 | 21 | set(${value} "${tmp_value}" PARENT_SCOPE) | ||
38 | 22 | endif() | ||
39 | 23 | endfunction() | ||
40 | 24 | |||
41 | 25 | # Makes a one-entry per line list of all include paths used | ||
42 | 26 | # to compile the given library target | ||
43 | 27 | function(get_includes libname output) | ||
44 | 28 | get_property(lib_includes TARGET ${libname} PROPERTY INCLUDE_DIRECTORIES) | ||
45 | 29 | list(REMOVE_DUPLICATES lib_includes) | ||
46 | 30 | string(REPLACE ";" "\n " tmp_out "${lib_includes}") | ||
47 | 31 | set(${output} "${tmp_out}" PARENT_SCOPE) | ||
48 | 32 | endfunction() | ||
49 | 33 | |||
50 | 34 | # Creates the XML descriptor file that describes the given library target | ||
51 | 35 | # suitable for abi-compliance-checker | ||
52 | 36 | function(make_lib_descriptor name) | ||
53 | 37 | set(libname "mir${name}") | ||
54 | 38 | |||
55 | 39 | # Optional argument LIBRARY_HEADER - use the given header to describe | ||
56 | 40 | # the binary library instead of assuming its described by include/<name> | ||
57 | 41 | get_value_for_key("${ARGN}" "LIBRARY_HEADER" library_header) | ||
58 | 42 | if ("${library_header}" STREQUAL "") | ||
59 | 43 | set(LIB_DESC_HEADERS "${CMAKE_SOURCE_DIR}/include/${name}\n ${private_headers}") | ||
60 | 44 | else() | ||
61 | 45 | set(LIB_DESC_HEADERS ${library_header}) | ||
62 | 46 | endif() | ||
63 | 47 | |||
64 | 48 | # FIXME: Property "LOCATION" is now deprecated | ||
65 | 49 | if (NOT ${CMAKE_MAJOR_VERSION} LESS 3) | ||
66 | 50 | cmake_policy(SET CMP0026 OLD) | ||
67 | 51 | endif() | ||
68 | 52 | get_property(LIB_DESC_LIBS TARGET ${libname} PROPERTY LOCATION) | ||
69 | 53 | |||
70 | 54 | get_includes(${libname} LIB_DESC_INCLUDE_PATHS) | ||
71 | 55 | set(LIB_DESC_GCC_OPTS "${CMAKE_CXX_FLAGS}") | ||
72 | 56 | |||
73 | 57 | # Optional EXCLUDE_HEADERS - a list | ||
74 | 58 | # while attempting an abi dump | ||
75 | 59 | get_value_for_key("${ARGN}" "EXCLUDE_HEADERS" LIB_DESC_SKIP_HEADERS) | ||
76 | 60 | |||
77 | 61 | configure_file(${CMAKE_SOURCE_DIR}/tools/lib_descriptor.xml.skel ${libname}_desc.xml) | ||
78 | 62 | endfunction() | ||
79 | 63 | |||
80 | 64 | #These headers are not part of the libmirplatform ABI | ||
81 | 65 | set(mirplatform-exclude-headers "${CMAKE_SOURCE_DIR}/include/platform/mir/input") | ||
82 | 66 | |||
83 | 67 | make_lib_descriptor(core) | ||
84 | 68 | make_lib_descriptor(client) | ||
85 | 69 | make_lib_descriptor(server) | ||
86 | 70 | make_lib_descriptor(common) | ||
87 | 71 | make_lib_descriptor(cookie) | ||
88 | 72 | make_lib_descriptor(platform EXCLUDE_HEADERS ${mirplatform-exclude-headers}) | ||
89 | 73 | if(MIR_BUILD_PLATFORM_MESA_KMS) | ||
90 | 74 | make_lib_descriptor(clientplatformmesa LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/src/include/client/mir/client_platform_factory.h) | ||
91 | 75 | make_lib_descriptor(platformgraphicsmesakms LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/graphics/platform.h) | ||
92 | 76 | endif() | ||
93 | 77 | make_lib_descriptor(platforminputevdev LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/input/) | ||
94 | 78 | |||
95 | 79 | |||
96 | 80 | macro(_define_abi_dump_for libname) | ||
97 | 81 | set(ABI_DUMP_NAME ${ABI_DUMPS_DIR}/${libname}_next.abi.tar.gz) | ||
98 | 82 | |||
99 | 83 | add_custom_command(OUTPUT ${ABI_DUMP_NAME} | ||
100 | 84 | COMMAND abi-compliance-checker -gcc-path ${CMAKE_CXX_COMPILER} -l ${libname} -v1 next -dump-path ${ABI_DUMP_NAME} -dump-abi ${libname}_desc.xml | ||
101 | 85 | DEPENDS ${libname} | ||
102 | 86 | ) | ||
103 | 87 | add_custom_target(abi-dump-${libname} DEPENDS ${ABI_DUMP_NAME}) | ||
104 | 88 | endmacro(_define_abi_dump_for) | ||
105 | 89 | |||
106 | 90 | macro(_define_abi_check_for libname) | ||
107 | 91 | add_custom_target(abi-check-${libname} | ||
108 | 92 | COMMAND /bin/bash -c '${CMAKE_SOURCE_DIR}/tools/abi_check.sh ${libname} ${ABI_DUMPS_DIR} ${CMAKE_SOURCE_DIR}' | ||
109 | 93 | DEPENDS abi-dump-${libname} | ||
110 | 94 | ) | ||
111 | 95 | endmacro(_define_abi_check_for) | ||
112 | 96 | |||
113 | 97 | set(the_libs mircore mirserver mirclient mircommon mirplatform mircookie mirplatforminputevdev) | ||
114 | 98 | if(MIR_BUILD_PLATFORM_MESA_KMS) | ||
115 | 99 | set(the_libs ${the_libs} mirclientplatformmesa mirplatformgraphicsmesakms) | ||
116 | 100 | endif() | ||
117 | 101 | |||
118 | 102 | foreach(libname ${the_libs}) | ||
119 | 103 | _define_abi_dump_for(${libname}) | ||
120 | 104 | _define_abi_check_for(${libname}) | ||
121 | 105 | list(APPEND abi-dump-list abi-dump-${libname}) | ||
122 | 106 | list(APPEND abi-check-list abi-check-${libname}) | ||
123 | 107 | endforeach(libname) | ||
124 | 108 | |||
125 | 109 | add_custom_target(abi-dump DEPENDS ${abi-dump-list}) | ||
126 | 110 | add_custom_target(abi-check DEPENDS ${abi-check-list}) | ||
127 | 111 | |||
128 | 112 | if (MIR_ENABLE_TESTS AND ENABLE_ABI_CHECK_TEST) | ||
129 | 113 | add_test(abi-compliance-check make abi-check) | ||
130 | 114 | endif() | ||
131 | 115 | 0 | ||
132 | === modified file 'debian/control' | |||
133 | --- debian/control 2017-10-11 16:02:41 +0000 | |||
134 | +++ debian/control 2017-10-11 16:02:41 +0000 | |||
135 | @@ -35,7 +35,6 @@ | |||
136 | 35 | valgrind [amd64 i386 armhf arm64], | 35 | valgrind [amd64 i386 armhf arm64], |
137 | 36 | libglib2.0-dev, | 36 | libglib2.0-dev, |
138 | 37 | libfreetype6-dev, | 37 | libfreetype6-dev, |
139 | 38 | abi-compliance-checker, | ||
140 | 39 | libevdev-dev, | 38 | libevdev-dev, |
141 | 40 | libinput-dev (>= 0.21), | 39 | libinput-dev (>= 0.21), |
142 | 41 | uuid-dev, | 40 | uuid-dev, |
143 | 42 | 41 | ||
144 | === removed file 'doc/abi_compatibility_tools.md' | |||
145 | --- doc/abi_compatibility_tools.md 2017-05-08 03:04:26 +0000 | |||
146 | +++ doc/abi_compatibility_tools.md 1970-01-01 00:00:00 +0000 | |||
147 | @@ -1,26 +0,0 @@ | |||
148 | 1 | Tracking ABI compatibility {#abi_compatibility_tools} | ||
149 | 2 | ================================ | ||
150 | 3 | |||
151 | 4 | A few make targets exist to help us track ABI compatibility across | ||
152 | 5 | different Mir versions and ensure we increase the ABI version properly. | ||
153 | 6 | These targets invoke the abi-compliance-checker tool for the actual ABI check. | ||
154 | 7 | |||
155 | 8 | The targets are: | ||
156 | 9 | |||
157 | 10 | * **make abi-check** | ||
158 | 11 | |||
159 | 12 | Compiles all the public libraries in the current tree and checks their ABI against the latest released archive version | ||
160 | 13 | |||
161 | 14 | * **make abi-check-\<library>** | ||
162 | 15 | |||
163 | 16 | Compiles only the specified library in the current tree and checks its ABI against the latest released archive version | ||
164 | 17 | |||
165 | 18 | - *library* can be any of the public library targets such as mirclient, mirserver, mirplatform, mircommon, etc. | ||
166 | 19 | |||
167 | 20 | Sample usage | ||
168 | 21 | ------------ | ||
169 | 22 | |||
170 | 23 | $ bzr branch lp:mir && cd mir | ||
171 | 24 | $ debian/rules override_dh_auto_configure | ||
172 | 25 | $ cd <build-dir> | ||
173 | 26 | $ make abi-check | ||
174 | 27 | 0 | ||
175 | === removed file 'tools/abi_check.sh' | |||
176 | --- tools/abi_check.sh 2017-05-08 03:04:26 +0000 | |||
177 | +++ tools/abi_check.sh 1970-01-01 00:00:00 +0000 | |||
178 | @@ -1,315 +0,0 @@ | |||
179 | 1 | #!/bin/bash | ||
180 | 2 | |||
181 | 3 | set -e | ||
182 | 4 | |||
183 | 5 | declare -A abi_var_for=(\ | ||
184 | 6 | ["mircore"]="MIRCORE_ABI" \ | ||
185 | 7 | ["mirclient"]="MIRCLIENT_ABI" \ | ||
186 | 8 | ["mircommon"]="MIRCOMMON_ABI" \ | ||
187 | 9 | ["mirplatform"]="MIRPLATFORM_ABI" \ | ||
188 | 10 | ["mirserver"]="MIRSERVER_ABI" \ | ||
189 | 11 | ["mircookie"]="MIRCOOKIE_ABI" \ | ||
190 | 12 | ["mirclientplatformmesa"]="MIR_CLIENT_PLATFORM_ABI" \ | ||
191 | 13 | ["mirplatformgraphicsmesakms"]="MIR_SERVER_GRAPHICS_PLATFORM_ABI" \ | ||
192 | 14 | ["mirplatforminputevdev"]="MIR_SERVER_INPUT_PLATFORM_ABI" ) | ||
193 | 15 | |||
194 | 16 | declare -A libtype=(\ | ||
195 | 17 | ["mirclientplatformmesa"]="plugin-client" \ | ||
196 | 18 | ["mirplatformgraphicsmesakms"]="plugin" \ | ||
197 | 19 | ["mirplatforminputevdev"]="plugin" ) | ||
198 | 20 | |||
199 | 21 | declare -A package_name=(\ | ||
200 | 22 | ["mirclientplatformmesa"]="mir-client-platform-mesa" \ | ||
201 | 23 | ["mirplatformgraphicsmesakms"]="mir-platform-graphics-mesa-kms" \ | ||
202 | 24 | ["mirplatforminputevdev"]="mir-platform-input-evdev" ) | ||
203 | 25 | |||
204 | 26 | declare -A libsoname=(\ | ||
205 | 27 | ["mirclientplatformmesa"]="mir/client-platform/mesa" \ | ||
206 | 28 | ["mirplatformgraphicsmesakms"]="mir/server-platform/graphics-mesa-kms" \ | ||
207 | 29 | ["mirplatforminputevdev"]="mir/server-platform/input-evdev" ) | ||
208 | 30 | |||
209 | 31 | declare -A headers_for=(\ | ||
210 | 32 | ["mirclientplatformmesa"]="src/include/client/mir/client_platform_factory.h" \ | ||
211 | 33 | ["mirplatformgraphicsmesakms"]="mirplatform/mir/graphics/platform.h" \ | ||
212 | 34 | ["mirplatforminputevdev"]="mirplatform/mir/input" ) | ||
213 | 35 | |||
214 | 36 | declare -A exclusions_for=(\ | ||
215 | 37 | ["mirplatform"]="mir/input" \ | ||
216 | 38 | ["mirserver"]="mir/input/input_device_hub.h" ) | ||
217 | 39 | |||
218 | 40 | function print_help_and_exit() | ||
219 | 41 | { | ||
220 | 42 | local prog=$(basename $0) | ||
221 | 43 | |||
222 | 44 | local all_libs=${!abi_var_for[@]} | ||
223 | 45 | local all_libs=${all_libs// /|} | ||
224 | 46 | echo "Usage: $prog <libname> <abi_dump_dir> <source_dir>" | ||
225 | 47 | echo "Runs a full ABI check on the given library." | ||
226 | 48 | echo "" | ||
227 | 49 | echo " libname=[${all_libs}]" | ||
228 | 50 | exit 0 | ||
229 | 51 | } | ||
230 | 52 | |||
231 | 53 | function get_abi_number() | ||
232 | 54 | { | ||
233 | 55 | local abi_var=${1} | ||
234 | 56 | local search_dir=${2} | ||
235 | 57 | grep -hR --include=CMakeLists.txt "set($abi_var [[:digit:]]\+)" ${search_dir}/src | grep -o '[[:digit:]]\+' | ||
236 | 58 | } | ||
237 | 59 | |||
238 | 60 | function is_plugin() | ||
239 | 61 | { | ||
240 | 62 | local name=${1} | ||
241 | 63 | if [[ ${libtype[${name}]} == "plugin"* ]]; | ||
242 | 64 | then | ||
243 | 65 | return 0 | ||
244 | 66 | else | ||
245 | 67 | return 1 | ||
246 | 68 | fi | ||
247 | 69 | } | ||
248 | 70 | |||
249 | 71 | function package_abi_for() | ||
250 | 72 | { | ||
251 | 73 | local name=${1} | ||
252 | 74 | local pkg_name=lib${name} | ||
253 | 75 | |||
254 | 76 | if is_plugin ${name}; | ||
255 | 77 | then | ||
256 | 78 | pkg_name=${package_name[${name}]} | ||
257 | 79 | fi | ||
258 | 80 | |||
259 | 81 | apt-cache show ${pkg_name}* | grep Package: | grep -o '[[:digit:]]\+' | sort -n -r | head -n 1 | ||
260 | 82 | } | ||
261 | 83 | |||
262 | 84 | function needs_abi_check() | ||
263 | 85 | { | ||
264 | 86 | local name=${1} | ||
265 | 87 | local source_dir=${2} | ||
266 | 88 | local abi_var=${abi_var_for[${name}]} | ||
267 | 89 | |||
268 | 90 | local old_abi=$(package_abi_for ${name}) | ||
269 | 91 | local new_abi=$(get_abi_number ${abi_var} ${source_dir}) | ||
270 | 92 | if [ -z "${old_abi}" ]; | ||
271 | 93 | then | ||
272 | 94 | echo "Failed to find old ${abi_var}" >&2 | ||
273 | 95 | exit 1 | ||
274 | 96 | fi | ||
275 | 97 | |||
276 | 98 | if [ -z "${new_abi}" ]; | ||
277 | 99 | then | ||
278 | 100 | echo "Failed to find new ${abi_var}" >&2 | ||
279 | 101 | exit 1 | ||
280 | 102 | fi | ||
281 | 103 | echo "Detected ${abi_var}_new=${new_abi}" | ||
282 | 104 | echo "Detected ${abi_var}_old=${old_abi}" | ||
283 | 105 | |||
284 | 106 | if [ "${old_abi}" == "${new_abi}" ]; | ||
285 | 107 | then | ||
286 | 108 | return 0 | ||
287 | 109 | else | ||
288 | 110 | return 1 | ||
289 | 111 | fi | ||
290 | 112 | } | ||
291 | 113 | |||
292 | 114 | function prepare_pkg_dir() | ||
293 | 115 | { | ||
294 | 116 | local pkg_dir=${1} | ||
295 | 117 | |||
296 | 118 | # "partial" is required by apt-get | ||
297 | 119 | mkdir -p ${pkg_dir}/partial | ||
298 | 120 | } | ||
299 | 121 | |||
300 | 122 | function package_name_for() | ||
301 | 123 | { | ||
302 | 124 | local name=${1} | ||
303 | 125 | local pkg_name=lib${name} | ||
304 | 126 | |||
305 | 127 | if is_plugin ${name}; | ||
306 | 128 | then | ||
307 | 129 | pkg_name=${package_name[${name}]} | ||
308 | 130 | fi | ||
309 | 131 | |||
310 | 132 | local abi_number=$(package_abi_for ${name}) | ||
311 | 133 | echo ${pkg_name}${abi_number} | ||
312 | 134 | } | ||
313 | 135 | |||
314 | 136 | function header_packages_for() | ||
315 | 137 | { | ||
316 | 138 | local name=${1} | ||
317 | 139 | local pkg=lib${name}-dev | ||
318 | 140 | |||
319 | 141 | if is_plugin ${name}; | ||
320 | 142 | then | ||
321 | 143 | # Some plugin headers are defined in this package | ||
322 | 144 | pkg="libmirplatform-dev" | ||
323 | 145 | fi | ||
324 | 146 | |||
325 | 147 | # Only interested in other mir dev package deps | ||
326 | 148 | local dev_deps=$(apt-cache depends ${pkg} | grep Depends: | grep -o "\<libmir.*-dev\>"| tr '\n' ' ') | ||
327 | 149 | |||
328 | 150 | # Workaround missing dependency | ||
329 | 151 | if [ ${name} == "mirserver" ] || [ ${name} == "mirplatforminputevdev" ]; | ||
330 | 152 | then | ||
331 | 153 | dev_deps="${dev_deps} libmirclient-dev" | ||
332 | 154 | fi | ||
333 | 155 | |||
334 | 156 | echo "${pkg} ${dev_deps}" | ||
335 | 157 | } | ||
336 | 158 | |||
337 | 159 | function soname_for() | ||
338 | 160 | { | ||
339 | 161 | local name=${1} | ||
340 | 162 | local pkg_dir=${2} | ||
341 | 163 | local arch=$(gcc -dumpmachine) | ||
342 | 164 | local abi_number=$(package_abi_for ${name}) | ||
343 | 165 | local so_name=lib${name} | ||
344 | 166 | |||
345 | 167 | if is_plugin ${name}; | ||
346 | 168 | then | ||
347 | 169 | so_name=${libsoname[${name}]} | ||
348 | 170 | fi | ||
349 | 171 | |||
350 | 172 | echo ${pkg_dir}/usr/lib/${arch}/${so_name}.so.${abi_number} | ||
351 | 173 | } | ||
352 | 174 | |||
353 | 175 | function download_packages() | ||
354 | 176 | { | ||
355 | 177 | local name=${1} | ||
356 | 178 | local pkg_dir=${2} | ||
357 | 179 | local pkg_name=$(package_name_for ${name}) | ||
358 | 180 | local header_pkgs=$(header_packages_for ${name}) | ||
359 | 181 | |||
360 | 182 | echo "Downloading: ${pkg_name} ${header_pkgs} for ${name}" | ||
361 | 183 | apt-get -d -o Dir::Cache=${pkg_dir} -o Debug::NoLocking=1 install --reinstall -y ${pkg_name} ${header_pkgs} | ||
362 | 184 | } | ||
363 | 185 | |||
364 | 186 | function download_mir_source_into() | ||
365 | 187 | { | ||
366 | 188 | local pkg_dir=${1} | ||
367 | 189 | pushd ${pkg_dir} > /dev/null | ||
368 | 190 | |||
369 | 191 | apt-get source --download-only mir | ||
370 | 192 | mkdir -p mirsource | ||
371 | 193 | |||
372 | 194 | local src_pkg=$(apt-cache showsrc mir | grep -o "mir.*orig.tar.gz" | head -n 1) | ||
373 | 195 | tar xf ${src_pkg} -C mirsource --strip-components 1 | ||
374 | 196 | |||
375 | 197 | popd > /dev/null | ||
376 | 198 | } | ||
377 | 199 | |||
378 | 200 | function unpack_debs() | ||
379 | 201 | { | ||
380 | 202 | local pkg_dir=${1} | ||
381 | 203 | |||
382 | 204 | for deb in ${pkg_dir}/archives/* ; | ||
383 | 205 | do | ||
384 | 206 | if [ ! -d ${deb} ] ; then | ||
385 | 207 | echo "unpacking: ${deb}" | ||
386 | 208 | dpkg -x ${deb} ${pkg_dir} | ||
387 | 209 | fi | ||
388 | 210 | done | ||
389 | 211 | } | ||
390 | 212 | |||
391 | 213 | function make_lib_descriptor() | ||
392 | 214 | { | ||
393 | 215 | local name=${1} | ||
394 | 216 | local pkg_dir=${2} | ||
395 | 217 | local descriptor_file=${3} | ||
396 | 218 | |||
397 | 219 | local abi_number=$(package_abi_for ${name}) | ||
398 | 220 | local lib=$(soname_for ${name} ${pkg_dir}) | ||
399 | 221 | |||
400 | 222 | local lib_includes= | ||
401 | 223 | for path in $(ls ${pkg_dir}/usr/include); | ||
402 | 224 | do | ||
403 | 225 | lib_includes=${lib_includes}${pkg_dir}/usr/include/${path}"\n" | ||
404 | 226 | done | ||
405 | 227 | |||
406 | 228 | local lib_headers=${pkg_dir}/usr/include/${name} | ||
407 | 229 | local lib_skip_headers= | ||
408 | 230 | for path in ${exclusions_for[${name}]}; | ||
409 | 231 | do | ||
410 | 232 | lib_skip_headers=${lib_excludes}${pkg_dir}/usr/include/${name}/${path}"\n" | ||
411 | 233 | done | ||
412 | 234 | |||
413 | 235 | if [ "${libtype[${name}]}" == "plugin-client" ]; | ||
414 | 236 | then | ||
415 | 237 | download_mir_source_into ${pkg_dir} | ||
416 | 238 | lib_headers=${pkg_dir}/mirsource/${headers_for[${name}]} | ||
417 | 239 | elif [ "${libtype[${name}]}" == "plugin" ]; | ||
418 | 240 | then | ||
419 | 241 | lib_headers=${pkg_dir}/usr/include/${headers_for[${name}]} | ||
420 | 242 | fi | ||
421 | 243 | |||
422 | 244 | cp ${SOURCE_DIR}/tools/lib_descriptor.xml.skel ${descriptor_file} | ||
423 | 245 | sed -i 's@${LIB_DESC_LIBS}@'${lib}'@g' ${descriptor_file} | ||
424 | 246 | sed -i 's@${LIB_DESC_HEADERS}@'${lib_headers}'@g' ${descriptor_file} | ||
425 | 247 | sed -i 's@${LIB_DESC_INCLUDE_PATHS}@'${lib_includes}'@g' ${descriptor_file} | ||
426 | 248 | sed -i 's/${LIB_DESC_GCC_OPTS}/-std=c++14/g' ${descriptor_file} | ||
427 | 249 | sed -i 's@${LIB_DESC_SKIP_HEADERS}@'${lib_skip_headers}'@g' ${descriptor_file} | ||
428 | 250 | sed -i 's/${LIB_DESC_DEFINES}//g' ${descriptor_file} | ||
429 | 251 | } | ||
430 | 252 | |||
431 | 253 | function dump_abi_for_prev_release() | ||
432 | 254 | { | ||
433 | 255 | local name=${1} | ||
434 | 256 | local abi_dump_dir=${2} | ||
435 | 257 | local abi_dump=${3} | ||
436 | 258 | local pkg_dir=${abi_dump_dir}/prev-release-pkgs | ||
437 | 259 | |||
438 | 260 | if [ ! -s "${abi_dump}" ]; | ||
439 | 261 | then | ||
440 | 262 | echo "Generating ${abi_dump}" | ||
441 | 263 | prepare_pkg_dir ${pkg_dir} | ||
442 | 264 | download_packages ${name} ${pkg_dir} | ||
443 | 265 | unpack_debs ${pkg_dir} | ||
444 | 266 | |||
445 | 267 | local descriptor_file=${pkg_dir}/${name}_desc.xml | ||
446 | 268 | make_lib_descriptor ${name} ${pkg_dir} ${descriptor_file} | ||
447 | 269 | |||
448 | 270 | abi-compliance-checker -gcc-path g++ -l ${name} -v1 previous -dump-path ${abi_dump} -dump-abi ${descriptor_file} | ||
449 | 271 | fi | ||
450 | 272 | |||
451 | 273 | if [ ! -s "${abi_dump}" ]; | ||
452 | 274 | then | ||
453 | 275 | echo "Error: failed to generate abi dump for ${name}" | ||
454 | 276 | exit 1; | ||
455 | 277 | fi | ||
456 | 278 | } | ||
457 | 279 | |||
458 | 280 | function run_abi_check() | ||
459 | 281 | { | ||
460 | 282 | local name=${1} | ||
461 | 283 | local old_dump=${2} | ||
462 | 284 | local new_dump=${3} | ||
463 | 285 | local skip_symbols_file=${4} | ||
464 | 286 | |||
465 | 287 | if [ -f ${skip_symbols_file} ]; | ||
466 | 288 | then | ||
467 | 289 | local skip_symbols_opt="-skip-symbols ${skip_symbols_file}" | ||
468 | 290 | fi | ||
469 | 291 | |||
470 | 292 | echo "Running abi-compliance-checker for ${name}" | ||
471 | 293 | abi-compliance-checker -l ${NAME} -old "${old_dump}" -new "${new_dump}" ${skip_symbols_opt} | ||
472 | 294 | } | ||
473 | 295 | |||
474 | 296 | if [ $# -ne 3 ]; | ||
475 | 297 | then | ||
476 | 298 | print_help_and_exit | ||
477 | 299 | fi | ||
478 | 300 | |||
479 | 301 | NAME=${1} | ||
480 | 302 | ABI_DUMP_DIR=${2} | ||
481 | 303 | SOURCE_DIR=${3} | ||
482 | 304 | |||
483 | 305 | OLD_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_prev.abi.tar.gz | ||
484 | 306 | NEW_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_next.abi.tar.gz | ||
485 | 307 | SKIP_SYMBOLS_FILE=${SOURCE_DIR}/tools/abi-check-${NAME}-skip-symbols | ||
486 | 308 | |||
487 | 309 | if needs_abi_check ${NAME} ${SOURCE_DIR}; | ||
488 | 310 | then | ||
489 | 311 | dump_abi_for_prev_release ${NAME} ${ABI_DUMP_DIR} ${OLD_ABI_DUMP_FILE} | ||
490 | 312 | run_abi_check ${NAME} ${OLD_ABI_DUMP_FILE} ${NEW_ABI_DUMP_FILE} ${SKIP_SYMBOLS_FILE} | ||
491 | 313 | else | ||
492 | 314 | echo "No need for abi-compliance-checker, ABI has already been bumped for ${NAME}" | ||
493 | 315 | fi | ||
494 | 316 | 0 | ||
495 | === modified file 'tools/setup-partial-armhf-chroot.sh' | |||
496 | --- tools/setup-partial-armhf-chroot.sh 2017-05-08 03:04:26 +0000 | |||
497 | +++ tools/setup-partial-armhf-chroot.sh 2017-10-11 16:02:41 +0000 | |||
498 | @@ -10,9 +10,9 @@ | |||
499 | 10 | usage() { | 10 | usage() { |
500 | 11 | echo "Usage: ${name} [options] mychroot-dir" | 11 | echo "Usage: ${name} [options] mychroot-dir" |
501 | 12 | echo "options:" | 12 | echo "options:" |
505 | 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" |
506 | 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" |
507 | 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" |
508 | 16 | echo | 16 | echo |
509 | 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)" |
510 | 18 | } | 18 | } |
511 | @@ -39,7 +39,7 @@ | |||
512 | 39 | sources="$sources source$sourceid" | 39 | sources="$sources source$sourceid" |
513 | 40 | ;; | 40 | ;; |
514 | 41 | :) | 41 | :) |
516 | 42 | echo "Option -$OPTARG requires an argument" | 42 | echo "Option -$OPTARG requires an argument" |
517 | 43 | usage | 43 | usage |
518 | 44 | exit 1 | 44 | exit 1 |
519 | 45 | ;; | 45 | ;; |
520 | @@ -48,7 +48,7 @@ | |||
521 | 48 | exit 0 | 48 | exit 0 |
522 | 49 | ;; | 49 | ;; |
523 | 50 | \?) | 50 | \?) |
525 | 51 | echo "Invalid option: -$OPTARG" | 51 | echo "Invalid option: -$OPTARG" |
526 | 52 | usage | 52 | usage |
527 | 53 | exit 1 | 53 | exit 1 |
528 | 54 | ;; | 54 | ;; |
529 | @@ -66,7 +66,7 @@ | |||
530 | 66 | echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}" | 66 | echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}" |
531 | 67 | 67 | ||
532 | 68 | if [ ! -d ${directory} ]; then | 68 | if [ ! -d ${directory} ]; then |
534 | 69 | mkdir -p ${directory} | 69 | mkdir -p ${directory} |
535 | 70 | fi | 70 | fi |
536 | 71 | 71 | ||
537 | 72 | DEBCONTROL=$(pwd)/../debian/control | 72 | DEBCONTROL=$(pwd)/../debian/control |
538 | @@ -83,7 +83,7 @@ | |||
539 | 83 | # dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr | 83 | # dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr |
540 | 84 | builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 ) | 84 | builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 ) |
541 | 85 | if [ $? -eq 0 ] ; then | 85 | if [ $? -eq 0 ] ; then |
543 | 86 | exit 0 | 86 | exit 0 |
544 | 87 | fi | 87 | fi |
545 | 88 | echo "${builddeps}" | 88 | echo "${builddeps}" |
546 | 89 | 89 | ||
547 | @@ -97,7 +97,6 @@ | |||
548 | 97 | -e 's/Unmet build dependencies://g' \ | 97 | -e 's/Unmet build dependencies://g' \ |
549 | 98 | -e 's/build-essential:native//g') | 98 | -e 's/build-essential:native//g') |
550 | 99 | builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g') | 99 | builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g') |
551 | 100 | builddeps=$(echo ${builddeps} | sed -e 's/abi-compliance-checker//g') | ||
552 | 101 | builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g') | 100 | builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g') |
553 | 102 | 101 | ||
554 | 103 | case ${arch} in | 102 | case ${arch} in |
555 | @@ -143,7 +142,7 @@ | |||
556 | 143 | done | 142 | done |
557 | 144 | 143 | ||
558 | 145 | # Fakeroot is required to stop the apt update command giving up | 144 | # Fakeroot is required to stop the apt update command giving up |
560 | 146 | fakeroot multistrap -f mstrap.conf | 145 | fakeroot multistrap -f mstrap.conf |
561 | 147 | 146 | ||
562 | 148 | rm -f var/cache/apt/archives/lock | 147 | rm -f var/cache/apt/archives/lock |
563 | 149 | 148 | ||
564 | @@ -163,4 +162,4 @@ | |||
565 | 163 | ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink} | 162 | ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink} |
566 | 164 | done | 163 | done |
567 | 165 | 164 | ||
569 | 166 | popd > /dev/null | 165 | popd > /dev/null |
PASSED: Continuous integration, rev:4283 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3722/ /mir-jenkins. ubuntu. com/job/ build-mir/ 5107 /mir-jenkins. ubuntu. com/job/ build-0- fetch/5345 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= artful/ 5332 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 5332 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/5332 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= artful/ 5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= artful/ 5151/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/5151/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 5151/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 5151/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/5151/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 5151/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/5151/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 5151 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 5151/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3722/rebuild
https:/