Whamcloud - gitweb
LU-7699 build: Eliminate lustre_build_version.h 08/18108/11
authorChristopher J. Morrone <morrone2@llnl.gov>
Wed, 23 Mar 2016 23:35:50 +0000 (19:35 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 Apr 2016 20:51:23 +0000 (20:51 +0000)
The lustre_build_version.h is no longer necessary.  With the new
versioning system the lustre version can now be retrieved from
standard autotools defines and/or lustre_ver.h.

To make compatibility easier for the upstream lustre client in
the linux kernel, we use LUSTRE_VERSION_STRING from lustre_ver.h.

Change-Id: I08233d8547bc4af7bf2fb0c15bee8e306f6fa0f0
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/18108
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
autoMakefile.am
lustre/autoMakefile.am
lustre/include/lustre/.gitignore
lustre/obdclass/class_obd.c
lustre/obdclass/linux/linux-module.c
lustre/utils/lustre_cfg.c
lustre/utils/obd.c

index 70a967e..ed22c70 100644 (file)
@@ -61,20 +61,17 @@ doxygen-%: build/doxyfile.%
        doxygen $<
 
 if MODULES
-.PHONY: ldiskfs-sources lustre-sources
+.PHONY: ldiskfs-sources
 
 ldiskfs-sources:
 if LDISKFS_ENABLED
        $(MAKE) sources -C @LDISKFS_SUBDIR@ || exit $$?
 endif
 
-lustre-sources:
-       $(MAKE) sources -C lustre || exit $$?
-
 if LINUX
 all-am: modules
 
-modules: undef.h ldiskfs-sources lustre-sources
+modules: undef.h ldiskfs-sources
        $(MAKE) CC="$(CC)" -C $(LINUX_OBJ) \
        -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
        LINUXINCLUDE='-I$$(srctree)/arch/$$(SRCARCH)/include -Iarch/$$(SRCARCH)/include/generated -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -I$$(srctree)/arch/$$(SRCARCH)/include/uapi -Iarch/$$(SRCARCH)/include/generated/uapi -I$$(srctree)/include/uapi -Iinclude/generated/uapi -include $(CONFIG_INCLUDE)' \
index fb41119..a25fe05 100644 (file)
@@ -60,18 +60,3 @@ endif
 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)
 
 EXTRA_DIST = BUGS kernel_patches BUILDING
-
-sources: lustre_build_version
-
-all-recursive: lustre_build_version
-
-BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h
-
-lustre_build_version:
-       echo -n "#define BUILD_VERSION \"" > tmpver
-       cat $(top_builddir)/LUSTRE-VERSION-FILE | tr -d '\n' | \
-               sed -e 's/^LUSTRE_VERSION = //' >> tmpver
-       echo "\"" >> tmpver
-       cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null &&          \
-                $(RM) tmpver tmpdiff ||                                        \
-               mv -f tmpver $(BUILD_VER_H)
index b742b51..91e3371 100644 (file)
@@ -47,7 +47,7 @@
 #include <lnet/lnetctl.h>
 #include <lustre_debug.h>
 #include <lprocfs_status.h>
-#include <lustre/lustre_build_version.h>
+#include <lustre_ver.h>
 #include <libcfs/list.h>
 #include <cl_object.h>
 #ifdef HAVE_SERVER_SUPPORT
@@ -255,24 +255,24 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
                 GOTO(out, err);
         }
 
-        case OBD_GET_VERSION:
-                if (!data->ioc_inlbuf1) {
-                        CERROR("No buffer passed in ioctl\n");
-                        GOTO(out, err = -EINVAL);
-                }
+       case OBD_GET_VERSION:
+               if (!data->ioc_inlbuf1) {
+                       CERROR("No buffer passed in ioctl\n");
+                       GOTO(out, err = -EINVAL);
+               }
 
-                if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
-                        CERROR("ioctl buffer too small to hold version\n");
-                        GOTO(out, err = -EINVAL);
-                }
+               if (strlen(LUSTRE_VERSION_STRING) + 1 > data->ioc_inllen1) {
+                       CERROR("ioctl buffer too small to hold version\n");
+                       GOTO(out, err = -EINVAL);
+               }
 
-                memcpy(data->ioc_bulk, BUILD_VERSION,
-                       strlen(BUILD_VERSION) + 1);
+               memcpy(data->ioc_bulk, LUSTRE_VERSION_STRING,
+                      strlen(LUSTRE_VERSION_STRING) + 1);
 
                err = obd_ioctl_popdata((void __user *)arg, data, len);
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
+               if (err)
+                       err = -EFAULT;
+               GOTO(out, err);
 
         case OBD_IOC_NAME2DEV: {
                 /* Resolve a device name.  This does not change the
@@ -500,7 +500,7 @@ static int __init obdclass_init(void)
        INIT_LIST_HEAD(&obd_stale_exports);
        atomic_set(&obd_stale_export_num, 0);
 
-       LCONSOLE_INFO("Lustre: Build Version: "BUILD_VERSION"\n");
+       LCONSOLE_INFO("Lustre: Build Version: "LUSTRE_VERSION_STRING"\n");
 
        spin_lock_init(&obd_types_lock);
        obd_zombie_impexp_init();
index c019863..c4c556d 100644 (file)
@@ -73,7 +73,6 @@
 #include <lprocfs_status.h>
 #include <lustre_ioctl.h>
 #include <lustre_ver.h>
-#include <lustre/lustre_build_version.h>
 
 int proc_version;
 
@@ -217,7 +216,7 @@ static int obd_proc_version_seq_show(struct seq_file *m, void *v)
 {
        seq_printf(m, "lustre: %s\nkernel: %s\nbuild:  %s\n",
                   LUSTRE_VERSION_STRING, "patchless_client",
-                  BUILD_VERSION);
+                  LUSTRE_VERSION_STRING);
        return 0;
 }
 LPROC_SEQ_FOPS_RO(obd_proc_version);
index f0c5d5d..23ca708 100644 (file)
@@ -61,7 +61,7 @@
 #include <lustre_cfg.h>
 #include <lustre_ioctl.h>
 #include <lustre/lustre_idl.h>
-#include <lustre/lustre_build_version.h>
+#include <lustre_ver.h>
 
 #include <sys/un.h>
 #include <time.h>
index 393c61a..796140c 100644 (file)
@@ -73,7 +73,7 @@
 #include <lustre/lustre_idl.h>
 #include <lustre_cfg.h>
 #include <lustre_ioctl.h>
-#include <lustre/lustre_build_version.h>
+#include <lustre_ver.h>
 
 #include <lnet/lnetctl.h>
 #include <lustre/lustreapi.h>