LU-17065 build: Remove snmp support Last patched in 2012 and not well tended to before that, snmp support can probably be removed. Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com> Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: I1831aed42e560531e57a6ff8aa978f3e5286fd44 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52194 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-17095 build: avoid modules.order nonexistence failure The modules.order is a temporary output file generated by kbuild while running "make" command. Sometimes, there is a race condition that causes the file not created and makes make command fail as follows: cat: ...//modules.order: No such file or directory This patch creates an empty modules.order file to avoid the error. Test-Parameters: trivial Change-Id: If779a727731f18e9409c35c0cd0deddd79559d3a Signed-off-by: Jian Yu <yujian@whamcloud.com> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52323 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16518 build: llvm/clang support Other projects, notably Linux, have build support for LLVM and Clang via special environment variables. This is implemented for Lustre, in the style of: https://www.kernel.org/doc/html/latest/kbuild/llvm.html Instances in which GCC is explicitly called are replaced by the use of $CC. The proper environment variables as passed to make invocations as needed. All checks which influence global compiler and toolchain settings are collected in 'config/lustre-toolchain.m4'. A configure option is added to disable the strict error flags that are passes to the C compiler by default. CFLAGS and EXTRA_CFLAGS are made to work in the typical way. Having fine grained control over compiler options makes experimenting with Clang smoother. Some compile checks in 'lustre-core.m4' have been improved by using unused variables and explicitly setting the compile flag to be used during the test. This also sets the execute bit on autogen.sh. Tested with: Linux (mainline) - 5.15.94 openZFS - 2.1.99 Lustre (latest master) - 2.15.55 CentOS - 8.5 Clang (default on CentOS) - 12.0.1 Test-Parameters: trivial Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: Ia8654c22fa8fca7bfb96c545ac144a1d3737fa00 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50063 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-6142 build: add SPD/GPL license to build files Update the file header to have the SPDX license and use the standard format. Convert spaces to tabs. Test-Parameters: trivial Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: Id02218aa5b435bc0de96a39d3daa53a83a51c857 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50347 Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-14707 tests: Prefer #!/bin/bash Change remaining #!/bin/sh to use bash. Add a warning to the git-hook about using sh in shebangs. Using bash allows scripts to freely use bash-isms and lowers the risks of bugs on Debian based platforms. Also, change remaining callers to use bash rather than sh. Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: I10f3e8f71435c38cfc1650dd13168d7ed5d3b31f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49479 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: jsimmons <jsimmons@infradead.org>
LU-6429 tests: fix external journal usage add ability to specify a external journal for each target. Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com> Change-Id: I41005d3b78935185b3498513691fc250e9c57fe2 Reviewed-on: http://review.whamcloud.com/14426 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4606 utils: Mount uses so for backing fstype Make mount/mkfs/tunefs functionality a per backing FSTYPE shared object that is loadable, and seperately buildable and installable in the appropriate lustre-osd-FSTYPE rpm. For ZFS this allows the shared object to be directly linked to libzfs and thus remove the hardcoding of a libzfs.so version in the lustre source. This also has the benefit of making lustre-osd-zfs explicitly requires libzfs (which it needs to do mount/mkfs operations). Adjust build system to allow building of loadable module. Including requiering libtool as part of the build. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: I8fc0f41161dc08405c1f951f12e675f364ff62c3 Reviewed-on: http://review.whamcloud.com/10193 Tested-by: Jenkins Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4961 build: remove libsysio and liblustre autoconf tests Remove the libsysio and liblustre tests from config/lustre-build.m4, lnet/autoconf/lustre-lnet.m4, and lustre/autoconf/lustre-core.m4, leaving a temporary AM_CONDITIONAL(LIBLUSTRE, false) in their place. Remove related bits from lustre-spec.in and debian/rules. Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I9483bc9114fa0682b84e6a9014123e5838f1c1a7 Reviewed-on: http://review.whamcloud.com/10201 Tested-by: Jenkins Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4052 build: simplify autogen.sh The concept of conditional subdirectories dates back to the days when we had Lustre spread across multiple CVS repositories. For years now we have used git, and the tree is entirely available at all times. Therefore we can simplify autogen.sh a bit more. Change-Id: I3d7c8e5e93b57c492bb61554a546ceb6d90b2ffe Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/7840 Tested-by: Hudson Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3466 iokit: Make lustre-iokit a subpackage of lustre Remove build_iokit from lbuild Remove lustre-iokit.spec.in and merge with lustre.spec.in Use of --disable-iokit and remove support for building external Remove iokit script from main lustre package. Add lustre-iokit dependency to lustre-tests rpm Disable building iokit rpm for client build Signed-off-by: Minh Diep <minh.diep@intel.com> Change-Id: I34889b97b5bdbb201ee88d71e1668f419e640cdb Reviewed-on: http://review.whamcloud.com/7314 Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Tested-by: Hudson Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3462 ldiskfs: Subsume ldiskfs's build system into lustre Remove ldiskfs's independant build system (configure, spec file, etc.) and merge its build into lustre's build system. Move the ldiskfs/ldiskfs directory up one level. The extra directory level is no longer needed without the independant ldiskfs build system. Add a make dependency on ldiskfs's "sources" target in ldiskfs/autoMakefile.am rather than explicitly launching a separate make instance from the top level autoMakefile.am. Remove unused "sources" targets in libcfs, lnet, and lustre/obdclass. Improve the handling of the --disable-ldiskfs option, and make it interact with other configure options more cleanly. Change-Id: Id0787f27269e938032e480c7c627327c0adf2672 Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/6850 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3434 build: disable automatic Git hook install Don't automatically install the Git commit hooks for checking code and commit message style into .git/hooks/{prepare-,}commit-msg. This should be done manually by the developer and/or checked when the patch is pushed to Gerrit. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ie44be3baa5f04eb71a3d7f76556c455fd5fa7052 Reviewed-on: http://review.whamcloud.com/7046 Reviewed-by: Ned Bass <bass6@llnl.gov> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2771 dlmlock: compress out unused space * lustre/include/lustre_dlm.h: Remove all bit fields and the unused weighing callback procedure. respell LDLM_AST_DISCARD_DATA as LDLM_FL_AST_DISCARD_DATA to match other flags. * .gitignore: ignore emacs temporary files * autogen.sh: rebuild the lock bits, if autogen is available. * contrib/bit-masks/lustre_dlm_flags.def: define the ldlm_lock flags * contrib/bit-masks/lustre_dlm_flags.tpl: template for emitting text * contrib/bit-masks/Makefile: construct the .c and .h files The .c file is for constructing a crash extension and is not preserved. * contrib/bit-masks/.gitignore: ignore built products * lustre/contrib/wireshark/packet-lustre.c: use built files instead of local versions of the defines. In the rest of the modified sources, replace flag field references with bit mask references. * lustre/osc/osc_lock.c: removed osc_lock_weigh, too Signed-off-by: Bruce Korb <bruce_korb@xyratex.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Change-Id: I104522e4012deb0dd8b9d12c2d1f3fd3851708cb Reviewed-on: http://review.whamcloud.com/5312 Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: <bruce.korb@gmail.com>
LU-1199 build: Improve git hook link installation Check for .git/hooks directory before trying anything else. Removes one barrier to compiling lustre without .git being present. Change-Id: I5fdf8fae9a4958099a40772d927fa59e42446a5b Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/5879 Tested-by: Hudson Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1199 build: Clean out the build directory Clean up the build directory. Move in the direction of reserving "build/" for the special-purpose Makefile that lives there. Eventually we could rewrite the autoconf tests to eliminate that Makfile, and the build directory could disappear altogether (after finding homes for anything else that is left). The autoconf m4 file move into a top level "config" directory. Most other things that have moved are put in the new "contrib" top-level directory. For instance, "contrib/lbuild" contains all of the lbuild-related files, and "contrib/git-hooks" contains the git hooks for lustre developers. Most of the moved files were unchanged, however the lbuild scripts needed some tweaking to deal with the new location. Because of the way that Intel's build farm and git hooks expect to find certain files in fixed locations I have had to leave a few symlinks in place that point to the new locations. Change-Id: I04dc529d4f4060b892e1e4eaa8613bbc3337c414 Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/5035 Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2083 build: install git commit hooks automatically Fix for previous commit http://review.whamcloud.com/4175 Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Change-Id: I014455aa4e73b7a384356c8d6e65f3feb28e7e1c Reviewed-on: http://review.whamcloud.com/5494 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1199 build: Simplify autotools version checks Simplify the check for minumum autoconf and automake versions by using standard macros in configure.ac rather than using shell functions in autogen.sh. Note that I am bumping the minimum automake version from 1.9 to 1.10. Change-Id: I009c316a54d8d517abea0d1808dc244e2353b2aa Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/4693 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com> Reviewed-by: Minh Diep <minh.diep@intel.com>
LU-1199 build: Untangle the ldiskfs build system from lustre Make ldiskfs have its own independant build system, with no sharing of files from higher up the tree in lustre. To begin with, this means some minor duplication of functions in build scripts. However, it is my opinion that the simpicity that is gained by having a clear separation of the build systems far outweighs the costs of some initial duplication. It also opens up the possibility of easily moving ldiskfs into its own separate git repo should we choose to do so in the future. The separation of the build systems began by removing the ldiskfs/build->lustre/build symbolic link, and making a complete copy of the lustre/build tree into ldiskfs/build. Then I iterated on removing everything from ldiskfs/build that was unnecessary to build ldiskfs. Since lustre's build/autogen.sh is no longer shared between two build systems, I removed the wrapper autogen.sh scripts and made the upper-level autogen.sh in both lustre and ldiskfs full-fledged scripts. This meant making a minor change to remove bash specific language (pushd/popd). Now the ldiskfs subtree is capable of being built completely absent of the lustre tree. There are no doubt more things that can be trimmed and cleaned up, but that much is now complete. Also, along the way I noted build/Makefile is being ignored by git, even though it is part of the source tree, and not auto-generated by the build system. I added "!Makefile" to .gitignore in the lustre/build directory so that it is no longer ignored. Change-Id: I98e437a0da897680e3ea6f21f15bcd6287367166 Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/4409 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
LU-2083 build: install git commit hooks automatically Install the Lustre Git commit hooks into .git/hooks/ by default when autogen.sh is run, so that they are present when patches are being committed. This avoids the relatively common case where a new tree is checked out by new or experienced developers and is missing the commit hooks when patches are being submitted. While the commit hooks are sure to be installed for in any tree that was built, this isn't a guarantee that the hooks will be installed in every tree that has a commit, but it is very likely to be the case. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Change-Id: I6a15420fb7a35b790c1e816c67e20a8004500c1e Reviewed-on: http://review.whamcloud.com/4175 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Yu Jian <yujian@whamcloud.com> Reviewed-by: Wei Liu <wei3.liu@intel.com> Reviewed-by: Bruce Korb <bruce_korb@xyratex.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
Branch b1_4 b=11048 r=brian Fix infinite loop when used with newer bash version (3.1.17)