AppJail Reproduce is a small open source BSD-3 licensed tool for automating the creation of images using Makejails, scripts and simple text files, providing a common workflow and simplifying many things.
Reproduce is quite simple to use. Just tell it what project to build and it will do the hard work.
appjail-reproduce -b helloThe above command assumes that you have cloned the projects repository, but if you have not yet done so:
mkdir -p ~/.reproduce
git clone https://github.com/DtxdF/reproduce-projects.git ~/.reproduce/projects
git clone https://github.com/DtxdF/reproduce.git
cd reproduce
make installIf you want to run Reproduce with a non-root user, you must configure AppJail to do so.
appjail-reproduce -bappjail-reproduce -b helloappjail-reproduce -b hello:13.2,14.0appjail-reproduce -b hello%amd64,i386appjail-reproduce -b hello%amd64,i386:13.2,14.0appjail-reproduce -b \
hello%amd64,i386:13.2,14.0 \
wordpress-apache%amd64:13.2-php82-apache-6.4.1The above examples are demonstrative only, it does not mean that they can be built for a specific architecture or use a specific tag. Refer to the projects repository or the documentation of the image you want to build.
Create the configuration directory:
mkdir -p ~/.config/appjail-reproduceSet the parameters described in reproduce-spec(5) in the ~/.config/appjail-reproduce/config.conf file or the one pointed to by the -c flag.
# tree ~/.reproduce/projects/hello
/root/.reproduce/projects/hello
├── Makejail
├── reproduce.conf
└── toremove.lst
1 directory, 3 files
# cat ~/.reproduce/projects/hello/Makejail
INCLUDE gh+AppJail-makejails/hello --file build.makejail
# cat ~/.reproduce/projects/hello/reproduce.conf
tags: 13.2/13.2-RELEASE 14.0/14.0-RELEASE
arch: amd64
# cat ~/.reproduce/projects/hello/toremove.lst
-f var/log/*
-f var/cache/pkg/*
-rf usr/local/etc/pkg
-f var/run/* 2> /dev/null || :
- Before creating an image, Reproduce will remove it, so backup the image if you want to keep it.
- All jails explicitly created by Reproduce will be named using a random UUID (version 4) and
JAIL_PREFIX. Reproduce will stop and remove the jail when necessary.
/usr/local/etc/appjail/appjail.conf:
TAR_XZ_ARGS="--xz --options xz:threads=0"
TAR_ZSTD_ARGS="--zstd --options zstd:threads=0"
appjail makejail -j pkgcache -f gh+AppJail-makejails/pkgcache \
-o virtualnet=":<random> default" \
-o nat
service appjail-health restart~/.config/appjail-reproduce/config.conf:
BEFORE_MAKEJAILS=/root/reproduce/main.makejail
/root/reproduce/main.makejail:
INCLUDE pkg.makejail
/root/reproduce/pkg.makejail:
CMD mkdir -p /usr/local/etc/pkg/repos
COPY Mirror.conf /usr/local/etc/pkg/repos
/root/reproduce/Mirror.conf:
FreeBSD: {
url: "http://pkgcache/${ABI}/latest",
mirror_type: "http",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
See also: https://appjail.readthedocs.io/en/latest/configure/
If you have found a bug, have an idea or need help, use the issue tracker. Of course, PRs are welcome.