Whamcloud - gitweb
LU-12214 build: fix build with gss enabled 30/36430/18
authorAlexey Lyashkov <c17817@cray.com>
Fri, 4 Oct 2019 13:04:50 +0000 (16:04 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jun 2020 08:11:58 +0000 (08:11 +0000)
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 <c17817@cray.com>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/36430
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
autoMakefile.am
lustre.spec.in

index 7a1e355..84c3eb1 100644 (file)
@@ -260,6 +260,13 @@ debs: undef.h
        fi; \
        if test "x@ENABLE_GSS@" = "xyes"; then \
                export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gss"; \
        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; \
        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]}; \
        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; \
        }; \
                [ $${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 && \
        export KPKG_DEST_DIR="$$(pwd)/.." && \
        version=$$(sed -ne '1s/^lustre (\(.*\)).*$$/\1/p' debian/changelog) && \
        rm -rf debian/tmp/modules-deb && \
index 345f726..00b592d 100644 (file)
@@ -191,6 +191,10 @@ BuildRequires: pkgconfig
 %else
 BuildRequires: pkg-config
 %endif
 %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
 %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}
 %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
 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
 #suse don't support selinux
 BuildRequires: libselinux-devel