Small fixes

- Do not link with the pcmk libraries
- Generate runtests.py and boothtestenv.py with -Es as make check does

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Jan Friesse 2020-06-03 15:17:51 +02:00
parent e9097d2ad0
commit 6513e1ad33
2 changed files with 41 additions and 3 deletions

View File

@ -0,0 +1,33 @@
From 2f944ea46b1b39113a34ca586cd8e3cd8f0d1d70 Mon Sep 17 00:00:00 2001
From: Jan Friesse <jfriesse@redhat.com>
Date: Wed, 3 Jun 2020 15:04:56 +0200
Subject: [PATCH] build: Do not link with pcmk libraries
Patch 4205de05fe337d1b1127fae302e6e6c2f0613ccf introduced better way to
check for pacemaker headers but also usage of PCMK_LIBS when linking
boothd.
This is not needed, because boothd uses just crm/services.h header file
for inclusion of OCF return codes, so patch removes the use of PCMK_LIBS.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 8598725..4023791 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@ boothd_SOURCES += auth.c
endif
boothd_LDFLAGS = $(OS_DYFLAGS) -L./
-boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS) $(PCMK_LIBS)
+boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS)
boothd_CFLAGS = $(GLIB_CFLAGS) $(PCMK_CFLAGS)
if !LOGGING_LIBQB
--
2.18.2

View File

@ -61,11 +61,12 @@
Name: booth
Version: %{boothver}
Release: %{boothrel}%{?dist}.2
Release: %{boothrel}%{?dist}.3
Summary: Ticket Manager for Multi-site Clusters
License: GPLv2+
Url: https://github.com/%{github_owner}/%{name}
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch
# direct build process dependencies
BuildRequires: autoconf
@ -228,14 +229,14 @@ mkdir -p %{buildroot}/%{test_path}/src
ln -s -t %{buildroot}/%{test_path}/src \
-- %{_sbindir}/boothd
# Generate runtests.py and boothtestenv.py
sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \
sed -e 's#PYTHON_SHEBANG#%{__python3} -Es#g' \
-e 's#TEST_SRC_DIR#%{test_path}/test#g' \
-e 's#TEST_BUILD_DIR#%{test_path}/test#g' \
%{buildroot}/%{test_path}/test/runtests.py.in > %{buildroot}/%{test_path}/test/runtests.py
chmod +x %{buildroot}/%{test_path}/test/runtests.py
sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \
sed -e 's#PYTHON_SHEBANG#%{__python3} -Es#g' \
-e 's#TEST_SRC_DIR#%{test_path}/test#g' \
-e 's#TEST_BUILD_DIR#%{test_path}/test#g' \
%{buildroot}/%{test_path}/test/boothtestenv.py.in > %{buildroot}/%{test_path}/test/boothtestenv.py
@ -291,6 +292,10 @@ VERBOSE=1 make check
%{_usr}/lib/ocf/resource.d/booth/sharedrsc
%changelog
* Wed Jun 3 2020 Jan Friesse <jfriesse@redhat.com> - 1.0-6.ac1d34c.git.3
- Do not link with the pcmk libraries
- Generate runtests.py and boothtestenv.py with -Es as make check does
* Tue Jun 2 2020 Jan Friesse <jfriesse@redhat.com> - 1.0-6.ac1d34c.git.2
- Require the Python interpreter directly instead of using the package name