build: support CentOS Stream 9
Change-Id: I851b76d8159a2c1023f2a743340005795f315a6a
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index cd4afee..147fc7e 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -37,4 +37,8 @@
sudo apt-get -qy install doxygen graphviz
;;
esac
+
+elif has CentOS $NODE_LABELS; then
+ sudo dnf -y install gcc-c++ libasan pkgconf-pkg-config python3 \
+ boost-devel openssl-devel sqlite-devel
fi
diff --git a/.jenkins.d/01-ndn-cxx.sh b/.jenkins.d/01-ndn-cxx.sh
index 4e0e154..5da6d35 100755
--- a/.jenkins.d/01-ndn-cxx.sh
+++ b/.jenkins.d/01-ndn-cxx.sh
@@ -35,19 +35,14 @@
pushd ndn-cxx >/dev/null
-if has CentOS-8 $NODE_LABELS; then
- # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
- PCH="--without-pch"
-fi
-
-./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
+./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain
./waf --color=yes build -j$WAF_JOBS
sudo_preserve_env PATH -- ./waf --color=yes install
popd >/dev/null
popd >/dev/null
-if has CentOS-8 $NODE_LABELS; then
+if has CentOS $NODE_LABELS; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if has Linux $NODE_LABELS; then
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 20e6bd1..25892f5 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -36,6 +36,9 @@
# Install
sudo_preserve_env PATH -- ./waf --color=yes install
+if has CentOS $NODE_LABELS; then
+ sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
+fi
if has Linux $NODE_LABELS; then
sudo ldconfig
fi
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 455c8f7..81c00b1 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -3,7 +3,6 @@
# Prepare environment
rm -rf ~/.ndn
-ndnsec key-gen "/tmp/jenkins/$NODE_NAME" | ndnsec cert-install -
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
ASAN_OPTIONS="color=always"
diff --git a/wscript b/wscript
index 40e0602..f5a330e 100644
--- a/wscript
+++ b/wscript
@@ -9,7 +9,8 @@
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs'])
- opt.load(['default-compiler-flags', 'coverage', 'sanitizers',
+ opt.load(['default-compiler-flags',
+ 'coverage', 'sanitizers',
'boost', 'openssl', 'sqlite3'],
tooldir=['.waf-tools'])
@@ -19,10 +20,16 @@
def configure(conf):
conf.load(['compiler_cxx', 'gnu_dirs',
- 'default-compiler-flags', 'boost', 'openssl', 'sqlite3'])
+ 'default-compiler-flags',
+ 'boost', 'openssl', 'sqlite3'])
conf.env.WITH_TESTS = conf.options.with_tests
+ # Prefer pkgconf if it's installed, because it gives more correct results
+ # on Fedora/CentOS/RHEL/etc. See https://bugzilla.redhat.com/show_bug.cgi?id=1953348
+ # Store the result in env.PKGCONFIG, which is the variable used inside check_cfg()
+ conf.find_program(['pkgconf', 'pkg-config'], var='PKGCONFIG')
+
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)