Jenkins: Overhaul the build script's dependency report system to be independent
This commit is contained in:
25
.ci/build.sh
25
.ci/build.sh
@@ -156,7 +156,18 @@ do
|
|||||||
|
|
||||||
-p)
|
-p)
|
||||||
shift
|
shift
|
||||||
dep_report=1
|
|
||||||
|
# Check for lddtree and install it if required.
|
||||||
|
which lddtree > /dev/null || DEBIAN_FRONTEND=noninteractive sudo apt-get -y install pax-utils
|
||||||
|
|
||||||
|
# Default to main binary.
|
||||||
|
binary="$1"
|
||||||
|
[ -z "$binary" ] && binary="archive_tmp/usr/local/bin/$project"
|
||||||
|
|
||||||
|
# Run lddtree with AppImage lib directories included in the search path.
|
||||||
|
LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \
|
||||||
|
lddtree "$binary"
|
||||||
|
exit $?
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-s)
|
-s)
|
||||||
@@ -198,6 +209,7 @@ if [ -z "$package_name" -a -z "$tarball_name" ] || [ -n "$package_name" -a -z "$
|
|||||||
then
|
then
|
||||||
echo '[!] Usage: build.sh -b {package_name} {architecture} [-t] [cmake_flags...]'
|
echo '[!] Usage: build.sh -b {package_name} {architecture} [-t] [cmake_flags...]'
|
||||||
echo ' build.sh -s {source_tarball_name}'
|
echo ' build.sh -s {source_tarball_name}'
|
||||||
|
echo 'Dep. tree: build.sh -p [archive_tmp/path/to/binary]'
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -560,7 +572,6 @@ else
|
|||||||
|
|
||||||
# Establish general dependencies.
|
# Establish general dependencies.
|
||||||
pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream"
|
pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream"
|
||||||
[ $dep_report -ne 0 ] && pkgs="$pkgs pax-utils"
|
|
||||||
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
||||||
then
|
then
|
||||||
pkgs="$pkgs build-essential"
|
pkgs="$pkgs build-essential"
|
||||||
@@ -1146,16 +1157,6 @@ EOF
|
|||||||
|
|
||||||
# Remove appimage-builder binary on failure, just in case it's corrupted.
|
# Remove appimage-builder binary on failure, just in case it's corrupted.
|
||||||
[ $status -ne 0 ] && rm -f "$appimage_builder_binary"
|
[ $status -ne 0 ] && rm -f "$appimage_builder_binary"
|
||||||
|
|
||||||
# Generate library dependency report if requested.
|
|
||||||
if [ $dep_report -ne 0 ]
|
|
||||||
then
|
|
||||||
echo '[-] Library dependency report:'
|
|
||||||
|
|
||||||
# Run lddtree with AppImage lib directories included in the search path.
|
|
||||||
LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \
|
|
||||||
lddtree "archive_tmp/usr/local/bin/$project" 2>&1 | tee depreport.txt
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the archival succeeded.
|
# Check if the archival succeeded.
|
||||||
|
Reference in New Issue
Block a user