From 4443124fe8d7c12dfab62f9962939d14cbed1291 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 18 Dec 2018 11:03:51 +1100 Subject: [PATCH] ctdb-packaging: Call waf with python wrapper This allows to build packages even when python3 is not available by setting PYTHON variable. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/packaging/RPM/ctdb.spec.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 537f158b2d1..d25735e06e0 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -87,7 +87,8 @@ fi export CC -CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./buildtools/bin/waf configure \ +CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" \ +$PYTHON ./buildtools/bin/waf configure \ --builtin-libraries=replace,popt \ --bundled-libraries=!talloc,!tevent,!tdb \ --minimum-library-version=talloc:%libtalloc_version,tdb:%libtdb_version,tevent:%libtevent_version \ @@ -102,7 +103,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./buildtools/bin/waf configure \ --mandir=%{_mandir} \ --localstatedir=%{_localstatedir} -./buildtools/bin/waf build +$PYTHON ./buildtools/bin/waf build %install # Clean up in case there is trash left from a previous build @@ -111,7 +112,7 @@ rm -rf $RPM_BUILD_ROOT # Create the target build directory hierarchy mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d -DESTDIR=$RPM_BUILD_ROOT ./buildtools/bin/waf install +DESTDIR=$RPM_BUILD_ROOT $PYTHON ./buildtools/bin/waf install install -m644 config/ctdb.conf $RPM_BUILD_ROOT%{_sysconfdir}/ctdb install -m644 config/ctdb.tunables $RPM_BUILD_ROOT%{_sysconfdir}/ctdb