aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-10-25 23:01:24 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-10-25 23:01:24 +0200
commit469a0fc93c7455ecb4a1a519e01ae4f7918a13a2 (patch)
treef578c264114c413c700f33070f05d8535763337d
parentcdc3b9d79dc99983bcf2f481bcde0f58b3615e3a (diff)
downloadlibrb-469a0fc93c7455ecb4a1a519e01ae4f7918a13a2.tar.gz
librb-469a0fc93c7455ecb4a1a519e01ae4f7918a13a2.tar.bz2
librb-469a0fc93c7455ecb4a1a519e01ae4f7918a13a2.zip
add: sanity check for creating deb packages
no_buildbot
-rwxr-xr-xpkg/debian/create-pkg.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkg/debian/create-pkg.sh b/pkg/debian/create-pkg.sh
index 11b356c..d5fddf0 100755
--- a/pkg/debian/create-pkg.sh
+++ b/pkg/debian/create-pkg.sh
@@ -80,10 +80,27 @@ dpkg -i "${project}-dev_${version}_${arch}.deb" || exit 1
failed=0
gcc ${project}/pkg/test.c -o testprog -lrb || failed=1
+
+if ldd ./testprog | grep "\/usr\/bofc"
+then
+ # sanity check to make sure test program uses system libraries
+ # and not locally installed ones (which are used as build
+ # dependencies for other programs
+
+ echo "test prog uses libs from manualyl installed /usr/bofc \
+ instead of system path!"
+ failed=1
+fi
+
./testprog || failed=1
dpkg -r "${project}${abi_version}" "${project}-dev" || exit 1
+if [ ${failed} -eq 1 ]
+then
+ exit 1
+fi
+
if [ -n "${scp_server}" ]
then
echo "copying data to ${scp_server}:${project}/${host_os}/${arch}"
@@ -97,5 +114,3 @@ then
"${project}_${version}_${arch}.changes" \
"${scp_server}:${project}/${host_os}/${arch}" || exit 1
fi
-
-exit ${failed}