summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae597be)
mkosi is a tool to build operating system images, possibly with some
software pre-built inside it. This commit adds mkosi configuration files
for building the Debian packages for Gigi on any distribution supported
by mkosi. The *.deb files will be placed in the srv/ directory of the
resulting image (image/srv/*.deb).
Note that mkosi doesn’t include git information in the build tree, so
the changelog used for the packages is whatever is currently in the
source tree. Consider running doc/scripts/genchangelog before mkosi.
The packages are also, unfortunately, not yet deterministic. The
strip-nondeterminism debhelper step uses the date from the changelog (so
if doc/scripts/genchangelog was run before the build started, that part
is deterministic), but it only seems to adjust the timestamps of the
three files in the .deb archives, not of the files within those .tar.*
archives.
A post-install script is included that could potentially be used to
actually install the packages inside the built image. However, that part
doesn’t yet work, so it’s disabled for now: the post-install scripts of
the packages have some extra requirements (more packages, an internet
connection) which mkosi doesn’t satisfy by default, and I didn’t want to
spend more time to find out if it can be made to work. This might be
fixed in a future commit, but even then, it’s not clear if such an image
would be very useful.
Change-Id: Ib966760b31f75cf0e8892428b6a8c6dba5ec5f2e
--- /dev/null
+#!/bin/sh
+
+set -e
+
+cd -- "$SRCDIR"
+
+# doc/scripts/genchangelog # mkosi doesn’t copy .git
+
+dpkg-buildpackage -b -us -uc
+
+mkdir -- "$DESTDIR/srv/"
+cp -v ../*.deb -- "$DESTDIR/srv/"
--- /dev/null
+[Distribution]
+Distribution=debian
+Release=stretch
+
+[Output]
+Format=directory
+
+[Packages]
+Packages=default-jre-headless libpostgresql-jdbc-java libdnsjava-java debconf init-system-helpers
+BuildPackages=debhelper dh-systemd default-jdk-headless build-essential ant wget
+Cache=/var/cache/apt/archives
--- /dev/null
+#!/bin/sh
+
+if [ "$1" = "final" ]; then
+ # disabled for now; the postinst scripts can’t run in the built image
+ #dpkg --install /*.deb
+ : # `if` bodies can’t be empty
+fi