Commit Graph

16 Commits

Author SHA1 Message Date
Stephan Wiesand
407c637157 make-release: create SHA256 checksums too
Check for utilities to create both MD5 and SHA256 message digest files.

Search the PATH plus some common directories for the message digest
utilities.

Exit with an error at the end of make-release when one or more message
digest files are not generated.

In addition, omit the path component in the generated files by running
the message digest utilities in the directory containing the files being
checked.

Before:

    $ make dist
    ...
    $ cat packages/openafs-1.9.1-333-g4bf33-doc.tar.gz.md5
    920793bcd7bd9bc8fbff9016ed2cc8bb  packages/openafs-1.9.1-333-g4bf33-doc.tar.gz

After:

    $ make dist
    ...
    $ cat packages/openafs-1.9.1-333-g4bf33-doc.tar.gz.md5
    920793bcd7bd9bc8fbff9016ed2cc8bb  openafs-1.9.1-333-g4bf33-doc.tar.gz

[mmeffie: Add change directories, search PATH, update commit message.]

Change-Id: I0deddc0318846a5000aec9e6b4e189d166b8a539
Reviewed-on: https://gerrit.openafs.org/14566
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2024-04-25 12:22:19 -04:00
Michael Meffie
76f26c63c7 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) 0a58d21881 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>
2022-07-21 10:36:03 -04:00
Michael Meffie
188ca8bf52 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>
2020-06-18 21:15:15 -04:00
Michael Meffie
d0753c0ace 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>
2020-06-18 20:57:54 -04:00
Michael Meffie
d20d392091 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>
2020-06-12 02:07:14 -04:00
Michael Meffie
46eb00ffa1 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>
2020-06-12 01:06:06 -04:00
Anders Kaseorg
a7cc505d3b 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>
2016-11-06 00:36:18 -04:00
Ken Dreyer
d9db6fbd17 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>
2013-09-07 07:40:44 -07:00
Ken Dreyer
0346ed6f53 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>
2013-08-09 11:36:41 -07:00
Ken Dreyer
cd0cac7e1a 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>
2013-08-02 08:50:05 -07:00
Simon Wilkinson
69f26ece3c 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>
2012-09-04 06:55:51 -07:00
Simon Wilkinson
f775c0fb6f 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>
2011-07-13 06:29:53 -07:00
Andrew Deason
60322b4675 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>
2011-01-10 12:26:53 -08:00
Russ Allbery
01afbb03cc 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>
2010-07-14 20:40:36 -07:00
Simon Wilkinson
417d2c8f95 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>
2010-07-02 09:48:46 -07:00
Simon Wilkinson
5158766dce 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>
2010-06-28 15:19:23 -07:00