This design document defines how the GNU Taler project manages prebuilt artifacts and other source-level dependencies in repositories that are part of project.
Some repositories have source-level dependencies on the build results of other repositories. While it is possible to build these dependencies from scratch, we often want to avoid that extra step in order to make building the software easier and faster.
Examples are:
docs.git
and consumed in exchange.git
.taler-wallet-core-embedded.js
file used
by the Android repo.Another type of source-level dependency is on other source files. Examples for this are:
build-common.git
repository that contains common build-time helpersgana.git
repositoryInstead of using a full-blown artifact management solution from the start, we make use of Git. Since Git is not very good at managing binary artifacts, prebuilt files are not managed alongside the source code. Instead, we use (orphan-)branches) in a (possibly separate) repository to manage them. This allows us to re-use Git authentication and Git commit signing.
Due to a historical accident, prebuilt files are currently stored in the
prebuilt
branch of the wallet-core.git
repository. This might change
in the future.
To enable forwards-compatibility, we are implementing the following approach:
The taler.net
HTTP server redirects requests in the form of
https://artifacts.taler.net/$component/$version/$file
to
https://git.taler.net/$repo.git/tree/$version/$file?h=$branch
, where
$component
determines $repo
and $branch
.
We are also introducing the new rule that a prebuilt artifact must be a single
archive file (preferable .tar.gz.
).
Repositories that produce artifacts MUST have phony Makefile helper targets to (a) create the prebuilt artifact (b) check out the prebuilt branch as a Git worktree, (c) move the artifact to the right place in the prebuilt branch and commit/push.
Repositories that depend on prebuilt components must download them
in their ./bootstrap
script. After downloading, the bootstrap
script SHOULD verify a checksum of the downloaded artifact.
FIXME: Link to an example bootstrap file, once the approach from this document is fully implemented.
(This should be filled in with results from discussions on mailing lists / personal communication.)