BIGTOP-3527: replace ${PWD} with ${CURDIR} in debian rules files (#760)
According to
https://lintian.debian.org/tags/debian-rules-calls-pwd.html,
CURDIR is the preferred way in a makefile (like rules) to refer to the
current directory. For some reason I got building failures when running
a Debian 10 bigtop docker imagei and trying to build the hadoop pkg,
that got solved only applying this fix.
Applied the same fix to all the debian rules files with ${PWD}.
(cherry picked from commit 0351fdac364d3182ec26df8364ccfb49774df15f)
diff --git a/bigtop-packages/src/deb/gpdb/rules b/bigtop-packages/src/deb/gpdb/rules
index ec85f87..31bac46 100755
--- a/bigtop-packages/src/deb/gpdb/rules
+++ b/bigtop-packages/src/deb/gpdb/rules
@@ -37,7 +37,7 @@
override_dh_auto_install:
install -d -p -m 755 debian/gpdb
- bash -x debian/install_gpdb.sh ${PWD}/debian/gpdb
+ bash -x debian/install_gpdb.sh ${CURDIR}/debian/gpdb
override_dh_auto_test:
@echo Tests are disabled
diff --git a/bigtop-packages/src/deb/hadoop/rules b/bigtop-packages/src/deb/hadoop/rules
index c587fcc..c6c78f6 100755
--- a/bigtop-packages/src/deb/hadoop/rules
+++ b/bigtop-packages/src/deb/hadoop/rules
@@ -56,7 +56,7 @@
bash debian/install_hadoop.sh \
--prefix=debian/tmp/ \
--distro-dir=debian \
- --build-dir=${PWD}/build \
+ --build-dir=${CURDIR}/build \
--httpfs-dir=debian/tmp/usr/lib/hadoop-httpfs \
--httpfs-etc-dir=debian/tmp/etc/hadoop-httpfs \
--kms-dir=debian/tmp/usr/lib/hadoop-kms \
@@ -85,7 +85,7 @@
override_dh_install: $(hadoop_svcs)
dh_install
# Drop misc fuse_dfs directories
- rm -Rf debian/hadoop/usr/lib/hadoop/bin/fuse_dfs
+ rm -Rf debian/hadoop/usr/lib/hadoop/bin/fuse_dfs
rm -Rf debian/hadoop/usr/lib/hadoop/contrib/fuse-dfs
rm -Rf debian/hadoop/usr/lib/hadoop/hdfs/contrib/fuse-dfs
diff --git a/bigtop-packages/src/deb/phoenix/rules b/bigtop-packages/src/deb/phoenix/rules
index 7be0a19..b5ce84e 100755
--- a/bigtop-packages/src/deb/phoenix/rules
+++ b/bigtop-packages/src/deb/phoenix/rules
@@ -46,6 +46,6 @@
cp debian/phoenix.default debian/${phoenix_pkg_name}/etc/default/${phoenix_pkg_name}
cp debian/phoenix-queryserver.default debian/${phoenix_pkg_name}/etc/default/${phoenix_pkg_name}-queryserver
bash -x debian/install_phoenix.sh \
- --build-dir=$${PWD}/build \
+ --build-dir=${CURDIR}/build \
--prefix=debian/tmp