redo
packagedevel/redo
in FreshPorts
devel/jdebp-redo
in NetBSD pkgsrc
Daniel J. Bernstein's redo
idea is a system for building target files from source files.
I originally wrote improved versions of Alan Grosskurth's 2007 implementation in shell scripts.
This package is a complete reimplementation from the ground up, in a compiled programming language rather than an interpreted one, that I then wrote.
It comprises:
redo
— the main utility for rebuilding redo-ifchange
— a secondary utility for rebuilding targets if existing sources changeredo-ifcreate
— a secondary utility for rebuilding targets if non-existent sources manifestcubehash
—
a utility program that generates hashes of file contents using the same parameterization of Bernstein CubeHash as is used by the redo tools to check for changes to source and target files
Download source bundles:
You can obtain it in two ways.
It is available in source form. You can build it yourself, or someone can add it to your operating system's ports tree or package build system. Several people have, for several operating systems, as you can see.
Some pre-built binary packages are available, that install the toolset under /usr/local
.
(If your operating system has this in ports, or its packages collection, and as long as it is up-to-date with version 1.5, and the post-Brexit URLs, using that is usually simpler.)
You can configure your machine to use the package repository, and simply update using your package manager.
What binary packages are available, for what architectures and platforms, depends from what resources are available for building. I am not made of money, and all build machines and their running costs are paid for by me. Pre-built packages currently include:
redo_1.5_amd64.deb
(Debian amd64) redo-1.5.txz
(FreeBSD/PC-BSD amd64) redo-1.5.tgz
(NetBSD evbarm64)
redo is distributed as a slashpackage-style package. That's a whole subject in itself; and the things that you need to know here are:
It is known to build, run, and work on FreeBSD 10, PC-BSD 10, Debian Linux version 12, and NetBSD 10. It should similarly build, run, and work on any modern BSD and on any modern Linux flavour. (Version 1.4 built, ran, and worked on OpenBSD version 5.9. Unfortunately, the third-party OpenBSD build system that was used has since gone away. Arch Linux has not yet caught up with redo version 1.5, but version 1.4 built, ran, and worked.)
It doesn't rely upon any other build system to build itself, merely POSIX-conformant and Bourne Again shell scripts and the g++ or clang++ compilers.
In particular, it doesn't require make
to build.
It makes use of various …at()
system calls from POSIX.1:2008, for safety.
To just build the package from source:
% package/compile
This gives you:
command/
, which you can just add to your PATH
environment variable or symbolically link to;
manual/
, which you can just add to your MANPATH
environment variable or symbolically link to.
The build process updates files in these directories atomically. It doesn't create part-written executables or other files at their final names. So you can run things straight out of these directories whilst rebuilding.
To clean the build run
% package/clean
or just rm -r build/
To clean the build, packaging, and built files run
% package/distclean
or just rm -r build/ command/ manual/
To build the binary packages on FreeBSD, PC-BSD, NetBSD, or OpenBSD run
% package/bsd/prepare && bsd/rules clean build binary
On FreeBSD and PC-BSD this requires pkg version 1.2 or later in order to avoid segmentation faults and other bugs. So ensure that pkg is up to that version in your ports tree.
To build the binary packages on Debian Linux run
% package/debian/prepare && dpkg-buildpackage -b -uc
People knowledgeable enough to use GOPHER (and savvy enough to read to the bottoms of WWW pages) can obtain bonus development-tracking content.