Commit graph

211 commits

Author SHA1 Message Date
David Bremner
59edcfd702 build: fix update-versions rule
This was missed in the rename of the 'version' file to version.txt
2020-11-08 07:27:48 -04:00
Ralph Seichter
981d5a0168 Rename version to version.txt
Building Notmuch on macOS is known to cause problems because the Notmuch
distribution archive contains two files named "version". These names
clash with the <version> header as defined in C++20. Therefore, the
existing naming will likely become a problem on other platforms as well,
once compilers adopt the new standard.

Signed-off-by: Ralph Seichter <github@seichter.de>
Amended-by: db s/keyword/header/ in commit message.
2020-10-30 16:14:24 -03:00
David Bremner
a1b1fe85c2 build: clean up sphinx.config
Follow the existing practice and remove it under "distclean", same as
sh.config and Makefile.config
2020-08-16 12:27:11 -03:00
Jonas Bernoulli
c454135376 emacs: Use makefile-gmake-mode in Makefile*s
Use `makefile-gmake-mode' instead of `makefile-mode' because the
former also highlights ifdef et al. while the latter does not.

"./Makefile.global" and one "Makefile.local" failed to specify any
major mode at all but doing so is necessary because Emacs does not
automatically figure out that these are Makefiles (of any flavor).
2020-08-09 21:14:36 -03:00
David Bremner
3f8b01a3ef build: upload html docs as part of release process
Use a URL https://notmuchmail.org/doc/latest to leave room for a
future more ambitious scheme deploying multiple versions.

This also forces the html docs to built as part of the release
process. In the future this should be updated to tolerate generating a
release without sphinx installed. This needs a new target analogous to
build-info and build-man that does nothing if sphinx is not installed.
2020-08-03 20:44:51 -03:00
David Bremner
552029f748 build: produce signatures for release candidate tarballs.
Today Defalos on #notmuch asked for a signed tarball for
0.30~rc2. This is a minimal change to support this in the future.  The
question of automagically uploading will need more thought; currently
I like the fact that tags from pre-releases are only pushed manually.
2020-07-03 07:37:00 -03:00
David Bremner
3a42abb456 bindings/python-cffi: copy version file into bindings dir
Attempt to avoid breaking "pip install ."

As far as I can tell, we need to have a copy (not just a relative
symlink) of the version file.
2020-07-03 06:38:55 -03:00
Daniel Kahn Gillmor
7ebb2f5509 debian: return an error if debian snapshot build fails
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-12-21 08:54:11 +09:00
David Bremner
46e9615621 build: optionally build python-cffi bindings
Put the build product (and tests) in a well known location so that we
can find them e.g. from the tests.
2019-12-03 08:12:30 -04:00
David Bremner
4bfbd5baa1 release: use xz compression
This produces tarballs that are roughly 30% smaller.
2019-03-27 17:59:40 -03:00
Daniel Kahn Gillmor
1f82039e0d build: Rename GPG_FILE to DETACHED_SIG_FILE
This is just a semantic cleanup -- we have multiple files that are
OpenPGP signatures.  And while we're probably making signatures with
GnuPG, they can be verified with any OpenPGP implementation, so "GPG_"
is arguably both not specific enough, and overly-specific.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-03-27 17:54:12 -03:00
Daniel Kahn Gillmor
01f9c71312 build: distribute signed sha256sums
Distribute clearsigned sha256sum file in addition to the detached
signature.

Verifies that use the sha256sum ensure that the thing signed includes
the name of the tarball. This defends the verifier by default against
a freeze, rollback, or project substitution attack.

A verifier can use something like the following (as expressed in
bash):

      set -o pipefail
      wget https://notmuchmail.org/releases/notmuch-$VERSION.tar.gz{,.sha256.asc}
      gpgv --keyring ./notmuch-signers.pgp --output - notmuch-$VERSION.tar.gz.sha256.asc | sha256sum -c -

See id:87r2b8w956.fsf@fifthhorseman.net and other messages in that
thread for discussion.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-03-27 17:53:41 -03:00
Daniel Kahn Gillmor
cc8d837d5a build: ensure that SHA256_FILE is built
The SHA256_FILE used to be built automatically because of the makefile
dependencies.

Since b8a8dbed91, it isn't getting made
properly, so the release target would fail.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-03-27 17:53:18 -03:00
David Bremner
b8a8dbed91 build: sign tarball instead of sha256sum
Adam Majer pointed out in [1] the way were signing releases was
unusual. Neither Carl nor I could think of a good reason for
explicitely signing the checksum (internally of course that's what GPG
is going anyway).

[1] mid:b3fd556d-c346-7af9-a7a2-13b0f3235071@suse.de
2019-03-11 22:28:11 -03:00
David Bremner
7a6d4a0852 doc: install build and install info pages
All of the man pages are installed as info pages, plus
the (unfinished) notmuch-emacs manual
2018-05-26 08:26:13 -07:00
David Bremner
a08c36417f build: push additional refs during release
These currently have to be pushed by hand during a release, which
isn't a big deal, but is one more thing to remember.
2018-04-28 08:34:48 -03:00
Daniel Kahn Gillmor
54982e520c fix typos 2018-01-04 20:35:58 -04:00
Tomi Ollila
d11311212e make release archive: common (or no) timestamps
The appended file 'version' has the same timestamp as the files added
by `git archive`.

The original file name and time stamp are no longer saved to the
gzip header in resulting $(PACKAGE)-$(VERSION).tar.gz file.

When build environment is close enough to another, this may
provide mutually reproducible release archive files.
2017-12-28 10:12:21 -04:00
Daniel Kahn Gillmor
197d67959b crypto: move into libnotmuch_util
This prepares us for using the crypto object in both libnotmuch and
the client.
2017-10-20 07:58:10 -03:00
David Bremner
af64530d3f build: add target to run cppcheck
The advantage of having a target as opposed to running cppcheck by
hand

  - reuse list of source files
  - output errors in a format parsable, e.g. by emacs
  - returns exit code 1 on any error, for possibly use in other
    targets.

For the moment, leave this as an optional target. If desired, it can
be added to e.g. the release targets in the same way as the test
target.

Using two levels of directory for the stamps is arguably
overengineering, but it doesn't really cost anything, and leaves open
the possibility of putting other kinds of stamp files there.

This only checks "new" source files (w.r.t. their last check). A future target
(cppcheck-all ?) could blow away the stamp files first.
2017-08-29 22:05:37 -03:00
Jani Nikula
8c7d979f5d build: add .deps to CLEAN instead of listing in clean target
Seems, uh, cleaner this way.
2017-08-29 22:05:37 -03:00
Jani Nikula
ab3ac525a0 build: add optional target parameter to quiet variable function
Sometimes using $@ as the target in the quiet build lines can be
confusing. Accept an optional second parameter in the quiet variable
function to specify the target.
2017-08-29 22:05:37 -03:00
Jani Nikula
e027711148 build: avoid an extra shell out in quiet variable function
$(word 1, $1) yields the same result as the more complicated
$(shell echo $1 | sed -e s'/ .*//')
2017-08-29 22:05:37 -03:00
Daniel Kahn Gillmor
e5beec39d6 add "notmuch reindex" subcommand
This new subcommand takes a set of search terms, and re-indexes the
list of matching messages.
2017-08-01 21:17:47 -04:00
Jani Nikula
d5ed9af0e4 build: do not export compat functions from lib
Commits 9db2145272 ("lib/gen-version-script.h: add getline and
getdelim to notmuch.sym if needed") and 3242e29e57 ("build: add
canonicalize_file_name to symbols exported from libnotmuch.so")
started exporting compat functions from libnotmuch so that the cli
could use them. But we shouldn't export such functions from the
library. They are not part of our ABI. Instead, the cli should include
its own copies of the compat functions.
2017-05-11 20:41:10 -03:00
Tomi Ollila
18ee87e7ce Makefile.local: have all files in release tarball be owned by root
The tar content `git archive` creates (reproducibly) have owner and
group set to 'root'. (GNU) tar writes user ids to the added file
`version` by default. The contents of tar archive looks better and
more consistent when owner and group in all files are the same.

While at it, split this long command line to multiple lines.
2017-04-14 16:17:46 -03:00
David Bremner
c39f6361d0 rename libutil.a to libnotmuch_util.a
Apparently some systems (MacOS?) have a system library called libutil
and the name conflict causes problems. Since this library is quite
notmuch specific, rename it to something less generic.
2017-03-18 21:37:43 -03:00
David Bremner
e60b44ecf8 build: replace remaining uses of SHA1_FILE
oops. If only there was some editor facility that allowed replacing
all instances of a string.
2017-03-12 22:31:16 -03:00
David Bremner
914c4db1f2 build: use sha256sum instead of sha1sum to sign releases 2017-03-02 17:31:15 -04:00
Jani Nikula
66c1bff416 notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop
The notmuch.desktop file is part of notmuch-emacs. Move it under
emacs, and rename as notmuch-emacs-mua.desktop to reflect this.
2016-11-26 08:16:39 -04:00
David Bremner
46a47f06a6 build: Move variable definitions to Makefile.global
I noticed when trying to use VERSION (and derived variables) in a
subdirectory that the top level Makefile.local needed to be included
first. But according to c10085c77b it
actually needs to be last. To break this conflict, move the variables
definitions into a new Makefile.global.
2016-11-26 07:46:42 -04:00
David Bremner
297d27e9f9 emacs: generate notmuch-pkg.el
This file contains metadata for the built in (as of emacs 24) packaging
system.
2016-11-16 21:45:56 -04:00
David Bremner
50a1032f87 build system: choose gnu99 as a C standard
Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to
use some c99 features.

'-std=c99' by itself is not enough for notmuch to compile.

'-std=gnu99' seems to work with clang and gcc, so I'm not convinced
configuration support is needed.
2016-09-21 20:09:14 -03:00
Tomi Ollila
e0e6a17675 Makefile.local: use $(wildcard) to check existence of ${srcdir}/.git
With this GNU Make construct one shell invocation can be skipped
and code looks shorter (narrower). This would now match to .git
being other file type than regular file or directory (or symlink
to those), but that is not a use case anyone should expect users
to do.
2016-09-04 08:14:55 -03:00
Tomi Ollila
17341ec798 Makefile.local: make IS_GIT simply expanded
By using ':=' while setting IS_GIT it is expanded to 'yes' or 'no' at
that point (and not every time when $(IS_GIT) is referenced).
2016-09-04 08:14:46 -03:00
Tomi Ollila
57bd4cf322 Makefile.local: set IS_GIT = yes when regular file $srcdir/.git exists
$srcdir/.git may also be file. E.g. `git worktree` creates .git file
while new working tree is populated.
2016-06-11 13:13:48 -03:00
Daniel Kahn Gillmor
6a833a6e83 Use https instead of http where possible
Many of the external links found in the notmuch source can be resolved
using https instead of http.  This changeset addresses as many as i
could find, without touching the e-mail corpus or expected outputs
found in tests.
2016-06-05 08:32:17 -03:00
David Bremner
bf511cb697 release: disable wget certificate check
this is a minor security hole, but no worse than what we had before. In
particular the worst that happens is someone prevents us from making a
release. Which is hardly worth the trouble of jacking the URL.
2015-10-30 07:14:41 -03:00
David Bremner
39c54df26d cli: add utility routine to print error status.
No attention to formatting here, initially just focus on getting the
relevant strings out of the library.
2015-09-20 08:04:31 -03:00
David Bremner
d038b93209 build: integrate building ruby bindings into notmuch build process
Because ruby generates a Makefile, we have to use recursive make.
Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}
in the parent directory.
2015-06-12 09:12:28 +02:00
David Bremner
aed5ec4350 python: replace hardcoding of SONAME version
Failing to update this string in globals.py causes failures when the
SONAME changes.  In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.
2015-03-08 08:30:36 +01:00
Jani Nikula
57540a1952 build: generate sh.config for feeding configure results to shell scripts
Only include the relevant information.

Amended by David Bremner:

	Use a prefix NOTMUCH_ to minimize collisions with other
	variables.
2014-07-13 12:15:47 -03:00
Tomi Ollila
6721222ea8 build: check .git directory existence in srcdir (for out-of-tree builds)
So that $(VERSION) and version.stamp uses the git-describe -based
version data instead of the content of `version' file.

For consistency also the git commands in Makefile[.local] target
`verify-no-dirty-code' uses the git --git-dir=$srcdir/.git ...
commands (inside ifeq($(IS_GIT),yes)). Attempting to make this
target outside of the tree will fail in any case.
2014-07-09 20:24:28 -03:00
David Bremner
fe8cd90f97 build: add dataclean
It turns out to be inconvenient to delete the downloaded datafiles with
distclean, so I propose a new target which does that instead.

The closest conventional target is 'maintainer-clean'; the difference
here is that having the original source tarball is not enough to
reconstruct these files.
2014-05-28 09:52:10 -03:00
David Bremner
1856574394 build: remove .tar.gz.tmp files in clean
Most people won't see these, but they annoy anyone running release
or pre-release targets.
2014-05-28 09:51:51 -03:00
David Bremner
94064a6ba2 Merge branch 'release'
A point release is slowly being built on branch release. Merge those
changes into master.
2014-05-28 09:50:32 -03:00
Felipe Contreras
90f9a5e65e build: fix order of rpath
In my system `pkg-config --libs talloc` returns
'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
LDFLAGS to be something like '-Wl,-rpath,/usr/lib
-Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
'/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
RUNPATH.

I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
the database after I updated the system (which updated the system's
notmuch). This shouldn't happen.

Let's move the RUNPATH flags before other external flags have a chance of
screwing the build.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-05-28 09:50:04 -03:00
David Bremner
21cb851a22 notmuch 0.18~rc1 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJTZXg2AAoJEPIClx2kp54shMEL/jimQji1GYwhBMfQKldBkl52
 FVbxOS4YiOc6zOcz7n8wjkjnHPEvTS/Q6mrZQTjJxtGDYkzaY27JKczXWB/ueqCJ
 /G9kEiXRbkVBLp2AQH7zHnKWRvqAQsaw9o+jyjzmW1UbJXX7dmZNmMQkWyN3bzy6
 taCDiKPxNTlwePRJUbC6O51GC6m7fZOQHSvrmrqFZiNdeT1Gs7g/Adj8Mho6x9A+
 q98Jtftk30Cyx0hXQKNXcJyTukdvVi69HZcmP+Rr9rCRZ4/L7WRbkX+iFQhvOm19
 c6ldgiwBV6+3DW4sNDHcpwZm5ZFh4I+0xUZ/r8V9F8f4yaY0SzMYtvA2xeIqXSG6
 FwkmPSGoW8A8cF8YqKkHOEZrM4ybd2XGvkDkibUncaAeAHQp4DCVG6etLG9kEtzr
 I4yqGhYTIjmjTuLXDOLEZ2mbhgayS5oAEnVqghapTNDYzzOK8h9Gr3Jvq6Kb2ckQ
 /VnEAOOvSv4bomil4NdgXaPrLZrTiq8lS6/pe2DZEg==
 =0A2e
 -----END PGP SIGNATURE-----

Merge tag '0.18_rc1'

notmuch 0.18~rc1 release
2014-05-04 08:32:05 +09:00
David Bremner
5535453495 build: use UPSTREAM_TAG and not VERSION to generate tarball
The latter can have "~" in it, which is not legal for a git tag.
2014-05-04 08:11:35 +09:00
Tomi Ollila
bc64cdce28 building from git: use --abbrev=7 for version string
Users may have set core.abbrev=n, where n != 7 in their git config
file(s) which would give them different than expected version strings
when building notmuch from git. This fixes the commit hash part of
version string to 7 hexadecimal values.
2014-04-24 14:01:05 +09:00