misc: Add mkosi based package building with fpm

Building distro packages is great, however if they aren't built in the
correct environment with the associated dependencies, then they won't
work properly on those distros.

This patch adds an `mkosi` based image building environment that builds
the packages in their respective distros, and then copies them out into
our releases directory.

You'll now want to `make tag && make mkosi && make release` to get a new
release out. We use a small hack to trick the `make release` portion to
not re-build the distro packages if they're already present in the
releases/ directory for that version.

This commit depends on a very recent version of mkosi (it was tested
with git master) and also depends on two currently unmerged patches:
https://github.com/systemd/mkosi/pull/363 and
https://github.com/systemd/mkosi/pull/365
This commit is contained in:
James Shubin
2019-09-14 21:39:25 -04:00
parent 9dae5ef83b
commit a4db9fc8e5
10 changed files with 393 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ if [ ! -z "$YUM" ]; then
$sudo_command $YUM install -y ruby-devel rubygems
$sudo_command $YUM install -y time
# dependencies for building packages with fpm
$sudo_command $YUM install -y gcc make rpm-build libffi-devel bsdtar || true
$sudo_command $YUM install -y gcc make rpm-build libffi-devel bsdtar mkosi || true
$sudo_command $YUM install -y graphviz || true # for debugging
fi
if [ ! -z "$APT" ]; then