Skip to content

Commit 0546e6a

Browse files
committed
Makefile.in: Use a local libpcap in the releasecheck target
This may avoid errors in make check, depending on the system's libpcap version. Update the Cirrus CI configuration, linux_task, accordingly.
1 parent 063b2e7 commit 0546e6a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ linux_task:
3939
script:
4040
- apt-get -qy update >/dev/null
4141
- apt-get -qy install autoconf make gcc libpcap-dev >/dev/null # for "./configure"
42+
- apt-get -qy install flex bison libdbus-1-dev libbluetooth-dev libnl-genl-3-dev libibverbs-dev >/dev/null # for libpcap
4243
- apt-get -qy install cmake git binutils-dev >/dev/null # for "make releasecheck"
4344
- apt-get -qy install shellcheck >/dev/null
4445
- ./autogen.sh

Makefile.in

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,22 @@ releasecheck: releasetar
493493
INSTALL_DIR=/tmp/install_"$$TAG"_$$$$ && \
494494
DIR=`pwd` && \
495495
cd /tmp && \
496+
rm -rf libpcap && \
497+
rm -rf install_libpcap && \
498+
echo "[$@] $$ git clone [...] libpcap.git" && \
499+
git clone --depth 3 --quiet https://github.com/the-tcpdump-group/libpcap.git && \
500+
echo "[$@] $$ cd libpcap" && \
501+
cd libpcap && \
502+
echo "[$@] $$ ./autogen.sh" && \
503+
./autogen.sh && \
504+
echo "[$@] $$ ./configure --quiet --prefix=/tmp/install_libpcap" && \
505+
./configure --quiet --prefix=/tmp/install_libpcap && \
506+
echo "[$@] $$ make -s " && \
507+
make -s && \
508+
echo "[$@] $$ make -s install" && \
509+
make -s install && \
510+
echo "[$@] $$ cd .." && \
511+
cd .. && \
496512
rm -rf "$$TAG" && \
497513
rm -rf "$$INSTALL_DIR" && \
498514
tar xf "$$DIR"/"$$TAG".tar.gz && \
@@ -514,6 +530,8 @@ releasecheck: releasetar
514530
touch .devel && \
515531
mkdir build && \
516532
cd build && \
533+
echo "[$@] $$ export PKG_CONFIG_PATH=/tmp/install_libpcap/lib/pkgconfig" && \
534+
export PKG_CONFIG_PATH=/tmp/install_libpcap/lib/pkgconfig && \
517535
echo '[$@] $$ cmake -DENABLE_SMB=yes [...] ..' && \
518536
cmake -DENABLE_SMB=yes \
519537
-DCMAKE_INSTALL_PREFIX="$$INSTALL_DIR" \
@@ -528,6 +546,8 @@ releasecheck: releasetar
528546
cd ../.. && \
529547
rm -rf "$$TAG" && \
530548
rm -rf "$$INSTALL_DIR" && \
549+
rm -rf install_libpcap && \
550+
rm -rf libpcap && \
531551
echo '[$@] Done.'
532552

533553
whitespacecheck:

0 commit comments

Comments
 (0)