From 15305c3c3fe7894d79c96f4dae0ada6713983376 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Fri, 8 Nov 2019 10:58:30 +0300 Subject: [PATCH] LU-12214 build: fix build without lustre_utils 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 Reviewed-on: https://review.whamcloud.com/36429 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexander Boyko Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Oleg Drokin --- lustre.spec.in | 25 +++++++++++---- lustre/doc/Makefile.am | 67 ++++++++++++++++++++++----------------- lustre/include/lustre/Makefile.am | 2 -- lustre/scripts/Makefile.am | 4 +-- lustre/utils/Makefile.am | 2 +- 5 files changed, 60 insertions(+), 40 deletions(-) diff --git a/lustre.spec.in b/lustre.spec.in index c51024b..cdd834e 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -34,6 +34,17 @@ %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 diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am index 2896ba2..b32e670 100644 --- a/lustre/doc/Makefile.am +++ b/lustre/doc/Makefile.am @@ -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: diff --git a/lustre/include/lustre/Makefile.am b/lustre/include/lustre/Makefile.am index 6c2772c..9cb97a4 100644 --- a/lustre/include/lustre/Makefile.am +++ b/lustre/include/lustre/Makefile.am @@ -32,10 +32,8 @@ # 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 \ diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 9d3fde8..7a3232b 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -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 \ diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 23b8a23..9e3c8a9 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -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 -- 1.8.3.1