Commit graph

133 commits

Author SHA1 Message Date
David Bremner
f0e0053149 Merge branch 'release'
Conflicts:
	NEWS

Conflicts resolved by inserting the 0.10.2 stanza before 0.11
2011-12-06 19:39:33 -04:00
Tomi Ollila
2551c70131 make release: remove LATEST-$(PACKAGE)-*
The tar file of particular package (notmuch in this case) is named
as $(PACKAGE)-$(VERSION).tar.gz. Therefore the best way to remove
previous link to LATEST is to remove all files beginning with
LATEST-$(PACKAGE)- and not relying how $(VERSION) string is constructed.
2011-12-06 09:37:45 -04:00
Tomi Ollila
fc622d7e06 have LATEST-notmuch-<version>.tar.gz on releases web page
The notmuchmail/releases page used to have LATEST-notmuch-<version>
to link to the latest notmuch source tarball. This is confusing on
web page and on disk when the file has been downloaded. This change
looks a bit inconsistent with the 'rm' command just executed before.
$(TAR_FILE) is defined (currently) as $(PACKAGE)-$(VERSION).tar.gz;
as long as the prefix stays $(PACKAGE)-$(VERSION) and version begins
with a digit then this line is good in execution point of view.
2011-12-06 09:37:45 -04:00
David Bremner
8e3879b689 build system: allow decreasing debian versions for debian-snapshot
This allows the debian-snapshot to continue working between when
debian/changelog is updated and when the release is tagged.
2011-12-05 22:27:08 -04:00
Tomi Ollila
ae7814bd61 make release: use sed to check debian version
Use common sed tool instead of dpkg-parsechangelog (which is usually
available on debian systems only) to verify that debian version
information is consistent with version file.
2011-11-24 08:46:57 -04:00
Tomi Ollila
fa3e2bad39 make release: added goal verify-version-manpage
Check that the version mentioned in notmuch manual page
is consistent with the version file.
2011-11-24 08:44:45 -04:00
Tomi Ollila
12197e89ad make release: verify-version-*: change comparison logic
verfy-version-debian, verify-version-python and verify-version-components
checked noneqality of the comparison strings and if got "positive"
answer then made that goal fail. But in case of the test ([ ])
execution failed it never got to the 'then' part of the line (and
the 'if [ ... ] then ... fi ' construct doesn't make the script line
fail in case of problems inside [ ].
This commit inverses the "logic", so that only if the comparison for
equality succeeds the script line will exit with 0 and execution
can continue past the failure case to the next line (executed by another
shell) with '@echo done'
2011-11-24 08:41:22 -04:00
David Bremner
570d12b7e6 build system: add target update-versions to propagate version
The version from file "version" is propagated to the man page and the
python bindings via sed. Note that the git version is ignored because
of the check for MAKECMDGOALS.
2011-11-19 10:09:14 -04:00
David Bremner
6a9711b1fb build system: use $(filter ...) to test MAKECMDGOALS
This makes the test easier to extend to more targets. It also corrects
a bug where "special" targets were only detected when given alone.
2011-11-19 10:09:04 -04:00
David Bremner
299e187bdf build system: tweak VERSION so that debian-snapshot works for N.NN~rcN
The problem was that the version is recovered from the git tag, which
has the ~ replaced by _. This broke the sequencing of version numbers.
2011-11-17 12:40:50 -04:00
David Bremner
1dedfc90f6 xutil.c: remove duplicate copies, create new library libutil.a to contain xutil.
We keep the lib/xutil.c version. As a consequence, also factor out
_internal_error and associated macros.  It might be overkill to make a
new file error_util.c for this, but _internal_error does not really
belong in database.cc.
2011-10-30 23:09:49 -03:00
David Bremner
a1ca7e8ebb build system: target to make a Debian snapshot package.
Currently this builds a native package, but since the source package
is throw away, it should not matter too much, except for the extra
warnings from lintian.

The extra +1 is so that if $(VERSION) is the same as the last released
version (for example outside a git repo) then the versions still order
correctly.
2011-10-28 14:14:43 -03:00
David Bremner
d9868bc056 build system: remove dashes from git-describe generated version.
This makes it less confusing with released Debian versions, now that we have
non-native Debian versions.
2011-10-28 14:14:32 -03:00
David Bremner
b71405c9a4 build system: Check that python bindings have consistent version when releasing
Thanks to Sebastian Spaeth breaking out version.py, this can be done
without loading notmuch.py, or using sed. version.py is not (yet)
autogenerated because it seems more important to minimize the
differences between the tagged version and the tarball.
2011-09-05 08:47:48 -03:00
David Bremner
839b7f20f6 build-system: Add pre-release target
This is a lighter weight version of the release target, intended to
support uploading release candidates to Debian.

As a side effect, filter ~ out of VERSION to make tag names.
2011-07-29 18:56:52 +02:00
David Bremner
2d69aba586 build-system: tag debian-version as part of the release target
This allows, e.g. gitpkg debian/0.x-1 to do the right thing.  It also
helps enforce the convention that Debian upload -1 is identical to the
release tarball.
2011-07-17 11:20:51 -03:00
David Bremner
0897209f4d build-system: update version check to support non-native packages.
We could be a bit more flexible about this and support optional Debian
versions, but for the moment, we pick a policy and stick to it.
2011-07-17 11:04:08 -03:00
David Bremner
466f3b57aa build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD
This supports both testing and use by non-upload privileged
users. Along with previous commits in the series, this lets one do a
dry run of the release process and created a tarball, signature file,
and release announcement to inspect before uploading.
2011-07-17 10:59:41 -03:00
David Bremner
9b0dfd11c5 build-system: use signed tag to make tar file, if available.
This as the advantage that "make VERSION=n.m dist" will work correctly
even if the wrong branch happens to be checked out.
2011-07-17 10:59:41 -03:00
David Bremner
60173feb06 build-system: tag earlier in the release process.
If tagging fails, we really don't want to upload tarballs.
2011-07-17 10:59:41 -03:00
David Bremner
939c91b7ef build-system: remove use of git-buildpackage, dput. Add pristine-tar.
The previous setup was dependent on the git-buildpackage configuration
to find the resulting tar file, and consequently a bit fragile.

We use pristine-tar instead to save a checksum-identical copy of the
tar file. This will also faciliate "non-native" debian packages, if
desired.

dput again depends on the local configuration, and mainly is a bit too
brave for me to do automatically.
2011-07-17 10:59:41 -03:00
David Bremner
9fb9fb2986 build-system: run make clean before testing.
The reasoning is that we might have some error in the build system
that causes something not to be rebuilt; this would potentially have
the tests run on the wrong version of the code.
2011-07-17 10:59:41 -03:00
David Bremner
2e13698812 build-system: replace use of ssh with wget for checking the website
The idea is to see if the version we are already releasing exists on
the notmuch website. Using wget allows more people to run this target,
and also allows people with ssh access to run it without access to
their keys.
2011-07-17 10:59:41 -03:00
Daniel Kahn Gillmor
5143e5e840 Use stock GMimeSession by default
Our use of GMimeSession was unneeded boilerplate, and we weren't doing
anything with it.  This simplifies and clarifies that assumption.

If we want to do anything fancier later, the examples in the gmime
source are a reasonable source to work from in defining a new
GMimeSession derivative.

Since GMimeSession is going away in GMime 2.6, though, i don't
recommend using it.
2011-06-03 17:42:54 -07:00
Jameson Graef Rollins
8b18efe171 Add signature verification of PGP/MIME-signed parts with --verify.
This is primarily for notmuch-show, although the functionality is
added to show-message.  Once signatures are processed a new
part_sigstatus formatter is emitted, and the entire multipart/signed
part is replaced with the contents of the signed part.

At the moment only a json part_sigstatus formatting function is
available.  Emacs support to follow.

The original work for this patch was done by

  Daniel Kahn Gillmor <dkg@fifthhorseman.net>

whose help with this functionality I greatly appreciate.
2011-05-27 16:22:00 -07:00
Carl Worth
4f926e140f notmuch: Implement search-tags as an alias for "search --output=tags *"
Ever since we added support for "notmuch search --output=tags" the
"notmuch search-tags" command has been redundant. The recent addition
of alias support makes it easy to drop the explicit search-tags
command in favor of a simple alias that runs "notmuch search
--output=tags *".

So there's no longer any documentation of the search-tags command, but
existing scripts will not break at all.
2011-05-24 12:19:18 -07:00
Carl Worth
3e4a9d60a9 build: Add support for non-source-directory builds.
Such as:

     mkdir build
     cd build
     ../configure
     make

This is implemented by having the configure script set a srcdir
variable in Makefile.config, and then sprinkling $(srcdir) into
various make rules. We also use vpath directives to convince GNU make
to find the source files from the original source directory.
2011-03-09 15:10:03 -08:00
Carl Worth
1a915d1b38 Makefile: Quote variables used as filenames in shell commands
This allows support for filenames with spaces in them.
2011-01-26 23:36:52 +10:00
Cédric Cabessa
26b4cc4aad configure: add options to disable emacs/zsh/bash and choose install dir.
add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose
installation dir for bash/zsh completion files

Make some features optional:
  --without-emacs / --with-emacs=no do not install lisp file
  --without-bash-completion / --with-bash-completion=no  do not install bash
files
  --without-zsh-completion / --with-zsh-completion=no do not install zsh files
By default, everything is enabled. You can reenable something with
  --with-feature=yes
2011-01-26 22:30:32 +10:00
Carl Worth
122539a57b Makefile: Move the -Wl,-as-needed option earlier in the command line.
This option wasn't having the desired effect, and sure enough, the
documentation states that it only affects the linking of libraries
that appear after this option on the command line. So put it early for
the desired effect.
2010-11-01 23:24:44 -07:00
Carl Worth
c81cecf620 lib: Add GCC visibility(hidden) pragmas to private header files.
This prevents any of the private functions from being leaked out
through the library interface (at least when compiling with a
recent-enough gcc to support the visibility pragma).
2010-11-01 22:35:48 -07:00
Carl Worth
ffae2dc9da Makefile: Build library with -Wl,--as-needed
Previously, we were building the final binary with this option, but not
the library. The library can benefit from it as well, (as pointed out
by Debian's lintian).
2010-11-01 16:52:22 -07:00
Carl Worth
6b9a717c26 configure: Add a check for the -Wl,--as-needed flag.
This fits with our general build philosophy of checking at configure
time for desired support, (rather than putting platform-specific
conditionals into our Makefiles).
2010-10-30 13:20:33 -07:00
Felipe Contreras
73fbce61d7 build: only link to what we really use
At least linux has the -Wl,--as-needed option.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-10-30 13:15:51 -07:00
Carl Worth
8753b9defa configure: Test for flag to set rpath
This is better than the previous approach which had a hardcoded Linux-specific
value in the Makefile.
2010-10-30 13:15:00 -07:00
Carl Worth
0b4474f4fa Makefile: Fix notmuch binary to directly link against Xapian and GMime.
Without this, trying to link with the gold linker would fail, (which meant
that notmuch could not be compiled out of the box on recent Fedora, nor
even on Debian when the binutils-gold package is installed).
2010-10-29 14:32:48 -07:00
Carl Worth
e6ba2c63c9 test: Fix test suite to integrate with our non-recursive Makefile system.
This avoids "make test" emitting messages from three (3!) recursive
invocations of make. We change the invocations of the tests themselves
to occur directly from the shell script rather than having the shell
script invoke make again and using wildcards in the Makefile.
2010-09-17 12:16:10 -07:00
Carl Worth
d64d0cc8d9 make install: Run ldconfig or install a DT_RUNPATH in binary as appropriate.
Various users were confused as to why they couldn't run notmuch
immediately after "make install", (with linker errors saying that
libnotmuch.so could not be found). The errors came from two different
causes:

1. The user had installed to a system library directory, but had not
   yet run ldconfig.

2. The user had installed to some non-system directory, and had not
   set the LD_LIBRARY_PATH variable.

With this change we fix both problems (on Linux) without the user
having to do anything additional. We first use ldconfig to find the
system library directories. If the user is installing to one of these,
then we run ldconfig as part of "make install".

For case (2) we use the -rpath and --enable-new-dtags linker options
to install a DT_RUNPATH entry in the binary. This entry tells the
dynamic linker where to find libnotmuch. Without the
--enable-new-dtags option only a DT_RPATH option would be installed,
(which has the drawback of not allowing any override with the
LD_LIBRARY_PATH variable).

Distributions (such as Debian and Fedora) don't want to see binaries
packaged with a DT_RPATH or DT_RUNPATH entry. This should be avoided
automatically as long as the packages install to standard locations,
(such as /usr/lib).
2010-06-04 16:52:56 -07:00
Carl Worth
1d528f890a Makefile: Improve the "what to do now" message from "make install"
This was already telling the user how to run notmuch within emacs, but
not how to just run the notmuch command-line interface, (which, as it
turns out, is a prerequisite for running the emacs interface anyway).

So add a small paragraph here.
2010-06-01 10:51:42 -07:00
Carl Worth
e6d20b7b8f make release: Add Debian package building and upload
Finally, a single button to push to do all the uploading.
2010-04-16 13:20:22 -07:00
Carl Worth
80240877f8 make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these
files is canonical and the other is generated from it. Until then, add
this check to the release process to avoid a skewed release being
shipped.
2010-04-16 13:00:35 -07:00
Carl Worth
9b065ff3b2 Makefile: Avoid complaining about .first-build-message not existing
This cleans up a few spurious warnings from the build.
2010-04-16 12:10:23 -07:00
Carl Worth
b068f1cc84 Fix final link of notmuch binary to use C compiler if possible.
On Linux, a C program that depends on a C library which in turn
depends on a C++ can be linked with the C compiler, (avoiding a direct
link from the program to the C++ runtime libraries).

Other platforms with less fancy linkers need to use the C++ compiler
for this linking.
2010-04-16 11:51:56 -07:00
Carl Worth
b8f0646931 Makefile: Fix conditionals to avoid calling git when no .git is present
Otherwise, building from a tar-file snapshot or release caused a bunch
of error messages from unnecessary git invocations.
2010-04-16 11:34:48 -07:00
Carl Worth
c41a6bb786 Makefile: Add a top-level "make snapshot" target.
Useful for verifying that our tar-file creation works. The tar-file
name can't easily be used as a target directly since it depends on the
current git revision.
2010-04-16 11:34:48 -07:00
Carl Worth
5999ff8d3c Makefile: Rework the version checks slightly.
Theese were previously pointing to "make VERSION=X.Y release", but
we've recently changed to an alternate scheme involving the updated
version in a file named "version".
2010-04-16 11:34:48 -07:00
Carl Worth
b7dc24298d Makefile: Add an explicit version file to the repository.
We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).

To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).

Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.
2010-04-16 11:34:48 -07:00
Carl Worth
4906f6b9ae make release: Don't print the release message on stdout.
It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.
2010-04-16 08:33:31 -07:00
Carl Worth
ff13111cf3 Makefile: Fix "make release" to print the current release announcement.
This was accidentally hard-coded to always print the 0.1 NEWS blurb.
2010-04-16 08:31:46 -07:00
Carl Worth
00263dd1a9 make release: Enforce a clean source tree before release.
Where by clean, we check that no files are known to git to be
modified.
2010-04-15 20:14:54 -07:00