build: package ltmain.sh in the libafs_tree Commit 0a58d2188[1] "cf: Run AFS_LT_INIT after setting CC" moved the location of LT_INIT (libtool initialization) to a common macro, so it is now expanded in configure-libafs. This breaks the linux DKMS packaging, which uses configure-libafs to build the kernel module, since the ltmain.sh aux file is not included in the dkms package. For now, just include the ltmain.sh aux file in the libafs_tree files to fix DKMS build. Later, we should restructure the autoconf macros so the LT_INIT macro is not expanded in the configure-libafs configure script, since we do not need libtool to build the kernel module. Thanks to Alex T Prengel for reporting this issue on the openafs-info mail list. 1) 0a58d21881d7e91deccb416e8d2c272e14b412dd cf: Run AFS_LT_INIT after setting CC Change-Id: I5aec1711ab33cc619c233889db3f55f83343c4d9 Reviewed-on: https://gerrit.openafs.org/15076 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
make-release: Run git describe once Run git describe once at the beginning of make-release to find the version information used to derive the tarball file names and saved in the .version file. This is a cleanup and refactoring change to prepare for a future commit. Change-Id: I0debeeffa5d2c63ab1498588766cb36424d15cd5 Reviewed-on: https://gerrit.openafs.org/14150 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
make-release: Create output directory if needed Automatically create the --dir directory if it does not already exist, which makes this script slightly easier to use. Remove the now uneeded mkdir from the top-level makefile. Change-Id: I1f4561120a70263b0b2b194e65fec55fb5666f40 Reviewed-on: https://gerrit.openafs.org/14115 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
make-release: Remove unused optional version argument The make-release help shows an optional version argument, but in fact the version info is always generated from the git tag name argument, which makes sense when creating releases. Continue to throw away the second positional argument just in case someone is still passing a second argument, but issue a warning if they do. Change-Id: Ie4c6e6efb7693e53a02fd009eecd64b47250c848 Reviewed-on: https://gerrit.openafs.org/14149 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
make-release: Clean up whitespace and spelling Fix whitespace errors, convert tabs to spaces, fix spelling errors, and fix pod markup in the make-release script. Change-Id: I24ede59d44a8818d89de454c0935586fccbd5d9a Reviewed-on: https://gerrit.openafs.org/14148 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
regen.sh: Use libtoolize -i, and .gitignore generated build-tools Recent libtoolize actually deletes build-tools/missing, which Git was treating as a change to the working copy. Besides, we should let libtoolize copy in its more recent version of config.guess, config.sub, and install-sh. Change-Id: If21f22649e1e1015ad3bcfbf6d34f297b56993a1 Reviewed-on: https://gerrit.openafs.org/12434 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
fix src tarball error text in make-release Correct the error message if make-release fails to create the source tarball. Change-Id: Iaf908975d56c0ee4c2959854f0ffd9c855f2c708 Reviewed-on: http://gerrit.openafs.org/10228 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
do not ship uncompressed tarballs There's not much point to shipping uncompressed tarballs in 2013. Delete them during "make-release". Change-Id: Ib52bd4a34ef0f5b0eacb973e60f7c1ef921f5ade Reviewed-on: http://gerrit.openafs.org/10116 Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
enable Perl's strict and warnings in make-release Declare the undeclared variables $help, $man, and @toCompress, delete the duplicate declaration for $last, and remove the unused $tag variable. Change-Id: I33de42722b84207dc1bbad50539dc5bf92da2f5e Reviewed-on: http://gerrit.openafs.org/10117 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Add libtool support Add support for using libtool to the Unix build system to build both pthreaded and lwp libraries. For purely pthread libraries, this just provides convenience macros to invoke the standard GNU libtool from the OpenAFS build system. For libraries that have lwp variants, we provide an initial wrapper script - lwptool, which handles building a non-PIC LWP object before asking libtool to build the pthread variants. For a given source example.c, example.o is the non-PIC pthread object, .libs/example.o is the PIC pthread object, and .lwp/example.o is the LWP object. To use libtool for a particular library directory, add the line include @TOP_OBJDIR@/src/config/Makefile.libtool to the file's preamble. Makefile.pthread, or Makefile.lwp should be included as normal to indicate whether the libraries in this Makefile are pthread only, or should be built for both pthread and LWP objects. The variables LT_current, LT_revision and LT_age may be used to control the version of the shared objects produced. They have the same meaning as that documented in the Versioning section of the libtool manual. The LT_objs variable should be set to a space separated list of the .lo objects included in the library. Note that there should _never_ be a dependency on the .o form of these objects in the Makefile, as this breaks parallel builds. LT_deps is a list of the libtool dependencies of the library, and LT_libs is a list of the external (non-OpenAFS) library dependencies. A file called <libraryname>.sym should be created which contains a newline seperated list of all of the symbols exported from this library. LWP library names remain the same as always. To distinguish the pthreaded static and shared libraries these LWP libraries should be linked using libexample.a: $(LT_objs) $(LTLWP_LDLIB) $(LT_objs) Shared libraries should be linked using libexample.la: $(LT_objs) $(LT_deps) (note that the pattern rules in the included Makefile take care of the build rule here) If necessary, static convenience libraries can be produced using: libconvenience.a: $(LT_objs) $(LTLWP_LDLIB_static) $(LT_objs) PIC convenience libaries can be linked using: libconvenience_pic.a: $(LT_objs) $(LTLWP_LDLIB_pic) $(LT_objs) Libtool libraries should be installed using the $(LT_INSTALL_DATA) macro Binaries linking agains libtool libraries should be linked using the $(LT_LDRULE) or $(LT_LRDULE_static) options, with library paths in the built locations relative to the top of the tree. For example example_test: example_test.o $(top_builddir)/src/example/libexample.la $(LT_LDRULE) example_test.o \ $(top_builddir)/src/example/libexample.la Change-Id: I32b162e8443119e8115febc532c5b5a0ec8fed32 Reviewed-on: http://gerrit.openafs.org/8033 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add make dist and make srpm targets Add targets to generate distribution tarballs, and srpms, from a tree. These will generate packages for whatever the current HEAD of the tree is - if the HEAD is a release tag, then the packages will be named for that release, if the HEAD is between releases, then git describe will be used to create an appropriate version identifier. The tarballs are generated from the current git repository contents, anything not checked in will not be included. Change-Id: Ic5cde2382f973a004406e0ef0f09708d0ba0ad5f Reviewed-on: http://gerrit.openafs.org/4984 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
git-version: Do not specify --ignore-submodules Only new git versions reognize the --ignore-submodules option to diff-index and diff-files. Do not pass this, to make git-version more likely to work across different versions, as we don't have any submodules in the tree anyway. Change-Id: Ic9dbd9ec5f332f36cec291fc3d324db14615f831 Reviewed-on: http://gerrit.openafs.org/3627 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Move build support files into build-tools Now that we have a build-tools directory, move the various support files used by Autoconf and Automake into it as well to reduce clutter at the top level. Change-Id: Ieae317524d5354e3a6168507c569378f7913b05f Reviewed-on: http://gerrit.openafs.org/2432 Tested-by: Russ Allbery <rra@stanford.edu> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Build: Rework git version detection Rework the git version detection script to handle some issues that have been pointed out. 1/ Make it work properly with objdir builds 2/ Don't try to work out if the tree is dirty if git describe failed 3/ Use the configured VERSION as a fallback if we can't obtain proper version information during a make Change-Id: I39494e1c18cf4eacbb55386334da7128fbe96310 Reviewed-on: http://gerrit.openafs.org/2283 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Use git describe to determine build version This patch makes the configure and build system use the output from 'git describe' to determine the version of the software being built. This means that all that is necessary to create a new release is to tag the repository - removing the double sources of version information. There are a couple of fallbacks for systems which do not have git available for builds. Firstly, if a file called '.version' exists in the top level of the repository, then the version information is pulled from this file. The intention is that those packaging up git checkouts for onwards distribution will use 'git describe > .version' before producing their tarballs. Secondly, if we cannot find any version information then the version will default to 'UNKNOWN' This all mirrors the way that many others have integrated git with automake and friends - although the implementation is independent. Change-Id: I7fa4605e52181d60657ad794ca8efdb5a9fb1449 Reviewed-on: http://gerrit.openafs.org/1824 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Russ Allbery <rra@stanford.edu>