From: Alexey Lyashkov Date: Fri, 4 Oct 2019 13:04:50 +0000 (+0300) Subject: LU-12214 build: fix build with gss enabled X-Git-Tag: 2.13.55~102 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e1bf37870d8654d24a1e49a1822bb02aa97a6672;hp=e08ac764867a0e36b303f511c94a0fa27e3dd53d LU-12214 build: fix build with gss enabled provide a right dependences for the gss enabled lustre Cray-bug-id: LUS-6033, LUS-7204 Test-parameters: trivial Change-Id: Ib530a112f7f1629f7aea35cd4bad7c3f89e781ff Signed-off-by: Alexey Lyashkov Signed-off-by: Sebastien Buisson Reviewed-on: https://review.whamcloud.com/36430 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexander Boyko Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Oleg Drokin --- diff --git a/autoMakefile.am b/autoMakefile.am index 7a1e355..84c3eb1 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -260,6 +260,13 @@ debs: undef.h fi; \ if test "x@ENABLE_GSS@" = "xyes"; then \ export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gss"; \ + debiantmp=$$(mktemp -t -d debbuild-$$USER-XXXXXXXX) ; \ + cp debian/control $$debiantmp/control.bkp ; \ + cp debian/control.main $$debiantmp/control.main.bkp ; \ + cp debian/control.modules.in $$debiantmp/control.modules.in.bkp ; \ + sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.main ; \ + awk 'BEGIN{change=0} $$1 == "Package:" {if (($$2 == "lustre-client-utils") || ($$2 == "lustre-server-utils")) change=1; else change=0; fi } {if (($$1 == "Depends:") && change) print $$0 ", libgssapi-krb5-2, libkrb5-3, libssl1.1+"; else print; fi}' debian/control.main > $$debiantmp/control.main && mv $$debiantmp/control.main debian/control.main ; \ + sed -i "s+^\(Build-Depends: .*\)$$+\1, libkrb5-dev, libssl-dev+" debian/control.modules.in ; \ elif test "x@ENABLE_GSS@" = "xno"; then \ export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogss"; \ fi; \ @@ -288,9 +295,15 @@ debs: undef.h fi; \ dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \ rc=$${PIPESTATUS[0]}; \ + cp $$debiantmp/control.bkp debian/control || true && \ + cp $$debiantmp/control.main.bkp debian/control.main || true && \ + cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \ [ $${rc} -gt 1 ] && exit $${rc}; \ exit 0; \ }; \ + cp $$debiantmp/control.bkp debian/control || true && \ + cp $$debiantmp/control.main.bkp debian/control.main || true && \ + cp $$debiantmp/control.modules.in.bkp debian/control.modules.in || true && \ export KPKG_DEST_DIR="$$(pwd)/.." && \ version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \ rm -rf debian/tmp/modules-deb && \ diff --git a/lustre.spec.in b/lustre.spec.in index 345f726..00b592d 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -191,6 +191,10 @@ BuildRequires: pkgconfig %else BuildRequires: pkg-config %endif +%if %{with gss} +BuildRequires: krb5-devel openssl-devel +Requires: krb5-libs openssl-libs +%endif %if %{with servers} Requires: lustre-osd Requires: lustre-osd-mount @@ -199,8 +203,6 @@ Provides: lustre-server = %{version}-%{release} %endif Obsoletes: lustre-client < %{version} Provides: lustre-client = %{version}-%{release} - -# GSS requires this: BuildRequires: libgssapi-devel >= 0.10 %if %{_vendor}=="redhat" || %{_vendor}=="fedora" #suse don't support selinux BuildRequires: libselinux-devel