Whamcloud - gitweb
LU-12214 build: fix build without lustre_utils 29/36429/11
authorAlexey Lyashkov <c17817@cray.com>
Fri, 8 Nov 2019 07:58:30 +0000 (10:58 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:39:53 +0000 (05:39 +0000)
fix build without_lustre_utils enabled.
library and tools man pages separated to avoid package
build breakage.

Cray-bug-id: LUS-6036
Test-parameters: trivial
Change-Id: I0dbf821cff85b336d26555b6f2a8b659d9203de9
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-on: https://review.whamcloud.com/36429
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>
lustre.spec.in
lustre/doc/Makefile.am
lustre/include/lustre/Makefile.am
lustre/scripts/Makefile.am
lustre/utils/Makefile.am

index c51024b..cdd834e 100644 (file)
     %undefine with_zfs
 %endif
 
+%if %{without shared} && %{without static}
+# need exit to stop build because error only displays a message
+%{error: you can't disable both library types}
+%{exit 1}
+%endif
+
+# lustre_tests depends on lustre_utils
+%if %{without lustre_utils}
+%undefine with_lustre_tests
+%endif
+
 %{!?version: %global version @VERSION@}
 # if you want a custom kernel version set it variable with $ver.$arch
 %{!?kver:    %global kver    %(uname -r)}
@@ -572,26 +583,28 @@ fi
 %{_bindir}/llobdstat
 %{_bindir}/llstat
 %{_bindir}/plot-llstat
+%{_datadir}/lustre
 
 %{_bindir}/lfs
 %{_bindir}/lfs_migrate
 /sbin/mount.lustre
 /sbin/mount.lustre_tgt
+%{_datadir}/bash-completion/completions/*
+%endif
+
+%if %{with manpages}
+%{_mandir}/man?/*
+%endif
+
 %if %{with static}
 %{_libdir}/liblustreapi.a
 %endif
 %if %{with shared}
 %{_libdir}/liblustreapi.so*
 %endif
-%if %{with manpages}
-%{_mandir}/man?/*
-%endif
-%{_datadir}/lustre
-%{_datadir}/bash-completion/completions/*
 %{_includedir}/lustre
 %{_includedir}/linux/lnet
 %{_includedir}/linux/lustre
-%endif
 %{_sysconfdir}/udev/rules.d/99-lustre.rules
 %if %{with servers}
 %{_sysconfdir}/udev/rules.d/99-lustre-server.rules
index 2896ba2..b32e670 100644 (file)
@@ -75,10 +75,25 @@ MANFILES =                                  \
        lfs-setdirstripe.1                      \
        lfs-setquota.1                          \
        lfs-setstripe.1                         \
-       l_getidentity.8                         \
-       l_getsepol.8                            \
-       lgss_sk.8                               \
        lhbadm.8                                \
+       ll_decode_linkea.8                      \
+       llobdstat.8                             \
+       llog_reader.8                           \
+       llsom_sync.8                            \
+       llstat.8                                \
+       lnetctl.8                               \
+       lst.8                                   \
+       lustre.7                                \
+       lustre_routes_config.8                  \
+       lustre_routes_conversion.8              \
+       lustre_rsync.8                          \
+       nids.5                                  \
+       plot-llstat.8                           \
+       routerstat.8
+
+
+LIBMAN =                                       \
+       lustreapi.7                             \
        llapi_create_volatile_param.3           \
        llapi_fd2parent.3                       \
        llapi_fid_parse.3                       \
@@ -153,7 +168,7 @@ MANFILES =                                  \
        llapi_pcc_detach_fid.3                  \
        llapi_pcc_detach_fid_fd.3               \
        llapi_pcc_detach_fid_str.3              \
-       llapi_pcc_detach_file.3         \
+       llapi_pcc_detach_file.3                 \
        llapi_pccdev_get.3                      \
        llapi_pccdev_set.3                      \
        llapi_pcc_state_get.3                   \
@@ -162,24 +177,7 @@ MANFILES =                                 \
        llapi_rmfid.3                           \
        llapi_search_mdt.3                      \
        llapi_search_ost.3                      \
-       llapi_search_tgt.3                      \
-       ll_decode_linkea.8                      \
-       llobdstat.8                             \
-       llog_reader.8                           \
-       llsom_sync.8                            \
-       llstat.8                                \
-       lnetctl.8                               \
-       lst.8                                   \
-       lustre.7                                \
-       lustreapi.7                             \
-       lustre_routes_config.8                  \
-       lustre_routes_conversion.8              \
-       lustre_rsync.8                          \
-       mount.lustre.8                          \
-       mount.lustre_tgt.8                      \
-       nids.5                                  \
-       plot-llstat.8                           \
-       routerstat.8
+       llapi_search_tgt.3
 
 SERVER_MANFILES =                              \
        lctl-barrier.8                          \
@@ -211,22 +209,33 @@ SERVER_MANFILES =                         \
        llverdev.8                              \
        lshowmount.8                            \
        mkfs.lustre.8                           \
-       tunefs.lustre.8
+       l_getidentity.8                         \
+       l_getsepol.8                            \
+       lgss_sk.8                               \
+       tunefs.lustre.8                         \
+       ll_decode_linkea.8                      \
+       llobdstat.8                             \
+       llog_reader.8                           \
+       llsom_sync.8                            \
+       llstat.8                                \
+       lnetctl.8                               \
+       lst.8                                   \
+       mount.lustre.8                          \
+       mount.lustre_tgt.8
 
+if MANPAGES
+man_MANS = $(LIBMAN)
 if SERVER
-MANFILES += $(SERVER_MANFILES)
-else
-DISTONLY_MANFILES = $(SERVER_MANFILES)
+man_MANS += $(SERVER_MANFILES)
 endif
 
 if UTILS
-if MANPAGES
-man_MANS = $(MANFILES)
+man_MANS += $(MANFILES)
 endif
 endif
 
 CLEANFILES = *.aux *.tex *.log *.pdf
 
-EXTRA_DIST = $(MANFILES) $(DISTONLY_MANFILES)
+EXTRA_DIST = $(MANFILES) $(SERVER_MANFILES) $(LIBMAN)
 
 all:
index 6c2772c..9cb97a4 100644 (file)
 # Lustre is a trademark of Sun Microsystems, Inc.
 #
 
-if UTILS
 pkginclude_HEADERS = lustreapi.h lustre_user.h liblustreapi.h ll_fiemap.h \
                        lustre_lfsck_user.h lustre_barrier_user.h
-endif
 
 EXTRA_DIST = libiam.h \
        liblustreapi.h \
index 9d3fde8..7a3232b 100644 (file)
@@ -80,14 +80,14 @@ if ZFS_ENABLED
 sbin_SCRIPTS += zfsobj2fid
 endif
 
-endif # UTILS
-
 if ENABLE_BASH_COMPLETION
 bashcompletiondir = $(BASH_COMPLETION_DIR)
 dist_bashcompletion_DATA = bash-completion/lustre bash-completion/lctl \
                           bash-completion/lfs
 endif
 
+endif # UTILS
+
 EXTRA_DIST = license-status lustre_rmmod ldev lc_mon lhbadm \
             lc_servip lustre_routes_config lustre_routes_conversion \
             $(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \
index 23b8a23..9e3c8a9 100644 (file)
@@ -48,6 +48,7 @@ if GETSEPOL
 sbin_PROGRAMS += l_getsepol
 endif
 endif
+endif # UTILS
 
 lib_LIBRARIES =
 noinst_LIBRARIES =
@@ -58,7 +59,6 @@ endif
 
 pkglib_LTLIBRARIES =
 lib_LTLIBRARIES = liblustreapi.la
-endif # UTILS
 
 lctl_SOURCES = portals.c debug.c obd.c lustre_cfg.c lctl.c obdctl.h
 if SERVER