diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 040c6e3612324cfb9c836a719cd7e2bbcc2b362e..b4f5bba09294dca4b7989a763e4a5acd671f12ba 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -14,6 +14,12 @@ tbd Cluster File Systems, Inc. <info@clusterfs.com> * Note that reiserfs quotas are disabled on SLES 10 in this kernel. * bug fixes +Severity : enhancement +Bugzilla : 12194 +Description: add optional extra BUILD_VERSION info +Details : add a new environment variable (namely LUSTRE_VERS) which allows + to override the lustre version. + Severity : normal Frequency : 2.6.18 servers only Bugzilla : 12546 diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am index 3e6e59bc8e4bbafc848bfee4c99943d782076e71..53ae48a629a2fb974974ec4bacc339759e2be1a2 100644 --- a/lustre/autoMakefile.am +++ b/lustre/autoMakefile.am @@ -53,7 +53,7 @@ sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version all-recursive: lustre_build_version -BUILD_VER_H=$(top_builddir)/lustre/include/linux/lustre_build_version.h +BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h lustre_build_version: perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver diff --git a/lustre/obdclass/autoMakefile.am b/lustre/obdclass/autoMakefile.am index e0982cac98bd53583d94a2dc4af8e00b80c0729b..9aeee6167b2c18a0a26bd4f848a784f1357595e6 100644 --- a/lustre/obdclass/autoMakefile.am +++ b/lustre/obdclass/autoMakefile.am @@ -12,7 +12,7 @@ liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c liblustreclass_a_SOURCES += prng.c #llog_ioctl.c rbtree.c -liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) -DLUSTRE_VERSION=\"32\" -DBUILD_VERSION=\"1\" +liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) liblustreclass_a_CFLAGS = $(LLCFLAGS) endif diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 1684e728a029a61036342d669724dd77024847fe..0b5cc50960097ee379d2889f4803a03085280abf 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -39,9 +39,7 @@ #include <obd_class.h> #include <lustre_debug.h> #include <lprocfs_status.h> -#ifdef __KERNEL__ -#include <linux/lustre_build_version.h> -#endif +#include <lustre/lustre_build_version.h> #include <libcfs/list.h> #include "llog_internal.h" diff --git a/lustre/obdclass/darwin/darwin-sysctl.c b/lustre/obdclass/darwin/darwin-sysctl.c index b12156a1befaa7b8a02b9b7e107371f60579c646..f953cf84b630746aa91c0a23435fedb077c9e73d 100644 --- a/lustre/obdclass/darwin/darwin-sysctl.c +++ b/lustre/obdclass/darwin/darwin-sysctl.c @@ -6,7 +6,7 @@ #include <sys/proc.h> #include <sys/unistd.h> #include <mach/mach_types.h> -#include <linux/lustre_build_version.h> +#include <lustre/lustre_build_version.h> #define DEBUG_SUBSYSTEM S_CLASS diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index e8e3d1fb866fe5de33e2602373ce0f76cf6af813..17fe1de5563fba3d70ae2eecd8934cd3d08d288a 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -66,8 +66,8 @@ #include <obd_class.h> #include <lprocfs_status.h> #include <lustre_ver.h> +#include <lustre/lustre_build_version.h> #ifdef __KERNEL__ -#include <linux/lustre_build_version.h> #include <linux/lustre_version.h> int proc_version; diff --git a/lustre/scripts/version_tag.pl.in b/lustre/scripts/version_tag.pl.in index c25221253e17c8fd19c79e6f16e6ed1f56507b52..c3416425ea5f8c16f58e875df669cd71df70a32b 100644 --- a/lustre/scripts/version_tag.pl.in +++ b/lustre/scripts/version_tag.pl.in @@ -156,7 +156,12 @@ sub generate_ver($$$) $hour, $min, $sec); print "#define BUILD_VERSION \""; - if ($pristine) { + + my $lustre_vers = $ENV{LUSTRE_VERS}; + + if ($lustre_vers) { + print "$tag-$lustre_vers\"\n"; + } elsif ($pristine) { print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n"; } else { print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n"; diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index cc29553e43902ae278d5f70d89bb2a92e0b241d9..5f4b5f4aa9ca6f1a6b1019d64a549ad59948bf70 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -40,7 +40,7 @@ #include <lustre_dlm.h> #include <obd.h> /* for struct lov_stripe_md */ #include <obd_lov.h> -#include <linux/lustre_build_version.h> +#include <lustre/lustre_build_version.h> #include <unistd.h> #include <sys/un.h> diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index fdd18cf519a69bc0fbec1914a545cd76033f7ac9..5b2b2507ce113d5db11ebcc2df21ce076dd28826 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -39,7 +39,7 @@ #include "obdctl.h" #include <obd.h> /* for struct lov_stripe_md */ -#include <linux/lustre_build_version.h> +#include <lustre/lustre_build_version.h> #include <unistd.h> #include <sys/un.h>