Currently the lustre spec file doesn't handle the case when SNMP
is missing. So even if the user does configure --disable-snmp our
rpm build process will ignore this and fail to build rpms. Pass
to the rpm build process the missing SNMP case.
Test-Parameters: trivial
Change-Id: Ia6dcfd31b50f4f67afe7a4545fe417c32df6e559
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28494
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if test x$USE_DLC = xyes ; then
RPMBINARGS="$RPMBINARGS --with lnet_dlc"
fi
if test x$USE_DLC = xyes ; then
RPMBINARGS="$RPMBINARGS --with lnet_dlc"
fi
+if test x$enable_snmp != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without snmp"
+fi
if test x$enable_manpages != xyes ; then
RPMBINARGS="$RPMBINARGS --without manpages"
fi
if test x$enable_manpages != xyes ; then
RPMBINARGS="$RPMBINARGS --without manpages"
fi
%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with lnet_dlc
%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with lnet_dlc
%bcond_without manpages
%bcond_without shared
%bcond_without static
%bcond_without manpages
%bcond_without shared
%bcond_without static
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_lnet_dlc:--disable-dlc} \
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_lnet_dlc:--disable-dlc} \
+ %{!?with_snmp:--disable-snmp} \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
echo '%{_libdir}/libiam.a' >>lustre.files
%endif
echo '%{_libdir}/libiam.a' >>lustre.files
%endif
-if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
- echo '%{_libdir}/lustre/snmp' >>lustre.files
-fi
+%if %{with snmp}
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/lustre/snmp
+echo '%{_libdir}/lustre/snmp' >>lustre.files
+%endif
%if %{with lustre_utils}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/lustre
%if %{with lustre_utils}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/lustre
-find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ -name \*.la -type f -exec rm -f {} \;
+if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre ] ; then
+ find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ -name \*.la -type f -exec rm -f {} \;
+fi
%endif
%if %{with lustre_modules}
%endif
%if %{with lustre_modules}