vol: always build vol-bless utility In order to avoid future bit-rot, always build vol-bless. Also add it to the clean rule. However, continue to leave it undistributed and uninstalled by default. Change-Id: I3d2dc94c28a7feeb20167223655e97538e807ce6 Reviewed-on: https://gerrit.openafs.org/14464 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
vol: de-orbit test programs The updateDirInode and listVicepx utilities are obsolete; they no longer build, are severely bitrotted, and have been largely replaced by volscan. While here, also remove other objects that have not been built by default since before the original IBM import: - ILIST ilist.exe - NAMEI_PROGS nicreate, nincdec, nino, nilist Remove all of them from the tree. Change-Id: I8f68ec425cce5e84bcc5f41d598eec23102109de Reviewed-on: https://gerrit.openafs.org/13793 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
build: declare test targets as phony Modern versions `make` will not build the 'test' target since a directory exists with the same name. $ grep -C1 '^test:' Makefile test: cd test; $(MAKE) $ make test make: 'test' is up to date. Declare these targets as .PHONY to force make to build the test programs even when the 'test' directory is present. Also use '&&' to concatenate commands instead ';' to avoid running the second command when the first fails. Change-Id: Id561d7610f80b87b59c632801fa0a4b216feb42d Reviewed-on: https://gerrit.openafs.org/13419 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
build: remove trailing whitespace from makefiles Remove trailing whitespace from the makefiles, except for trailing whitespace in the boilerplate comment headers. Change-Id: Ib8ee87a51f00633ba15e1974ac0b311969bef1bf Reviewed-on: http://gerrit.openafs.org/11456 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
Move epoch and cid generation into the rx core Now that we have hcrypto available everywhere, we can get real randomness in the rx core (both uerspace and kernel), and thus can initialize the RX epoch to a real random value when first initializing a host; there is no need to rely on rxkad to produce randomness for this purpose. Initialize a connection ID counter at the same time, and use that in rx_NewConnection, also supplanting rxkad-specific logic. The rxkad-specific logic is removed, and in particular there is no longer a need to export rxkad_EpochWasSet to the rest of the world. The code in afs_Daemon() to check whether the rxepoch was set can be removed, as if the epoch is not set, rx initialization fails. Add libafshcrypto to LIBS in the handful of places it hadn't crept already, and likewise afshcrypto.lib in the NTMakefiles. Change-Id: I1dd1015b29a600aaf72b6b4b36f8a17032453c97 Reviewed-on: http://gerrit.openafs.org/10841 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
vol: Fix build with separate objdir The volscan-main and volinfo-main source files are in the source tree, not the object tree; refer to the objects in the Makefile as dependencies, so that they will be picked up properly. The objects will be made just fine by the implicit .c.o rule. Change-Id: Ieec4b32cfbe5d260e1560a08d4ed8162720f9222 Reviewed-on: http://gerrit.openafs.org/10988 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
volinfo: separate volscan binary Refactor vol-info.c into several files and change the makefile to build a separate volscan binary, instead of using the program name to determine if the user is running volinfo or volscan. This commit adds new source files for the volinfo and volscan main() function and a common header file. Change-Id: I53a2a503812237a850170c39c81ee3fb56c8282e Reviewed-on: http://gerrit.openafs.org/10903 Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
Add "pretty" build option Add the capability to do a "pretty" build, where we output something like " CC /path/to/foo.o" to build foo.o, instead of the entire compiler invocation, similarly to how the Linux kernel build appears. Add the "pretty" building for CC and LD rules. This also prints out some helpful information when a command fails, which can sometimes otherwise be annoying to figure out post-mortem. To enable the pretty building, make with V=0. To output everything that is actually run with V=0, make with 'V=0 Q=' . Note that this does not work with all makes, since not all makes will propagate command-line-specified variables to sub-makes without -e. Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris. However, GNU make will work, as will /usr/xpg4/bin/make on Solaris. Change-Id: Idce0afffe7d5be88b0743ec3f926a52efb1a6a74 Reviewed-on: http://gerrit.openafs.org/4486 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
Move string manipulation functions out of util Some functions in libafsutil depend upon the RX libraries, which means that pulling in other functions in this library can create a dependency upon RX. This is less than ideal for low-level libraries such as cmd and comerr. So, create a new low-level library (currently named 'opr') which can contain low-level functions from util, and elsewhere. This library should have no dependencies other than on system libraries and libroken. Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25 Reviewed-on: http://gerrit.openafs.org/5363 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org>
Build system: Move install definitions to include Move the definitions of the INSTALL_* variables out to Makefile.config rather than replicating them in each file. Change-Id: I5f74dcbf544a93716994418bee3be2c51a2a82d0 Reviewed-on: http://gerrit.openafs.org/4781 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Makefile whitespace fixes Some "make"s get tripped up by recipe lines starting with anything but a tab character. Most of the time we start ours with tabs, but fix a few instances where they begin with spaces. Change-Id: I2c17c68deb1b7641ca73e84ec0043b62ce3c54ba Reviewed-on: http://gerrit.openafs.org/3961 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
libroken: Build on windows A minimal change set to get libroken to build on Windows. Sadly, libroken contains definitions for a number of platform compatibility macros which were previously scattered throughout the windows code. These scattered macros have to be removed in order to build libroken. The impact of this removal is that a very large number of files throughout the tree require the addition of "roken.h" to pick up the new compatibility code. The bulk of this change is adding these includes. In addition, some of the added includes add roken dependencies to the Unix build. So, also add libroken to the build rules in affected Unix Makefiles. Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456 Reviewed-on: http://gerrit.openafs.org/3205 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
down with assert, up with osi_Assert because NDEBUG breaks things which happen inside an assert, be done with that. instead, call osi_Assert wherever possible. doesn't work for code which builds before rx; those cases we handle by ensuring no operations happen inside the assert(). side effect: move all pthread operations wrapped in asserts to MUTEX_mumble and CV_mumble calls where those exist, so the assertions happen all in one set of macroes. Change-Id: I9fd8a0fdfdaed5ed55de3e5c0c4673d4714e7441 Reviewed-on: http://gerrit.openafs.org/3001 Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Unix: Rework build system Rework the unix build system so that we support taking CFLAGS and LDFLAGS from the command line, and don't replace them with our own settings. Also, take the opportunity to bring some sanity and consistency into our Makefiles. The standard Makefile.config now defines rules for LWP, pthreaded and shared library builds. The CFLAGS settings for these are called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively. Similarly named variables are provided for LDFLAGS. A module may select to use a particular build type for its suffix rule by including either Makefile.lwp, Makefile.pthread or Makefile.shared from src/config. This creates an appropriate .c.o suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to build, and link objects. For example: foo.o: foo.c $(AFS_CCRULE) foo.c foo: foo.o $(AFS_LDRULE) foo.o If a you wish to override the CFLAGS or LDFLAGS for an object build using these rules (or through the .c.o suffix rule) you can do so, by defining CFLAGS_<object> or LDFLAGS_<object>. For example: CFLAGS_foo.o= -DDEBUG LDFLAGS_foo = -ldebugging A module may also alter the behaviour of the compile and link steps module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS. This functionality is now used throughout the tree: *) Suffix rules are used wherever possible, removing a number of unecessary build rules. *) All link steps are replaced with AFS_LDRULE *) All standard compile steps are replaced with AFS_CCRULE *) Unusal compile steps are defined, as far as possible, int terms of the LWP_ PTH_ and SHD_ variables. *) The use of $? has been removed entirely, as it makes it impossible to provide build rules with dependency information Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2 Reviewed-on: http://gerrit.openafs.org/2896 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Eliminate $< outside of pattern rules The $< variable in makefiles is not portable when used outside of pattern rules. Replace each usage with the actual name of the file we want. Change-Id: Idc9309e7d7bd3b1bd93e8225507b8b53c9433d69 Reviewed-on: http://gerrit.openafs.org/2523 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Fix objdir install/dest targets Many 'install' and 'dest' targets were referring to source files without a srcdir prefix. Fix them so we can 'make install' / 'make dest' with objdir. Change-Id: Id76c5e326309baf8ec3f1213ecb2e40b19aea7d4 Reviewed-on: http://gerrit.openafs.org/2522 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Install DAFS and non-DAFS fssync-debug Install the non-DAFS fssync-debug along with the DAFS dafssync-debug, since fssync-debug uses some structures that are specific to DAFS or non-DAFS. Change-Id: Ib7420857cd32f33fc3cc04f67baa1fcc90abc936 Reviewed-on: http://gerrit.openafs.org/2479 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
demand attach build always always build demand attach. includes doubtless-broken windows support. installs dafileserver, dasalvager, davolserver. salvageserver keeps its (unique) name. Change-Id: Ia272dd2b0f72789b9e0f2a7712f9c206bb922095 Reviewed-on: http://gerrit.openafs.org/2403 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
More warnings cleanup Remove uneccessary warning inhibition in vol/ Update README.WARNINGS to match the current state of the tree Change-Id: Ic1e5c74e0e7c2ccce0519b1572034f3666aa75e9 Reviewed-on: http://gerrit.openafs.org/1392 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Fix make clean and make distclean Fix these make targets so they actually clean the tree. Reorder the list of file deletions in distclean so that it exactly mirrors the creation order in configure.in, which should hopefully make it easier to keep this all in sync in future. Add all of the missing files in packaging, and the shared library build tools, to this list. Make kauth and vol clean remove ka-forwarder and fssync-debug, respectively. Change-Id: Iae13419f1cb21058882c0b0e0c283e3c947e33c9 Reviewed-on: http://gerrit.openafs.org/1829 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>