diff --git a/packaging/appimage/README.md b/packaging/appimage/README.md new file mode 100644 index 00000000..ac629128 --- /dev/null +++ b/packaging/appimage/README.md @@ -0,0 +1,32 @@ +# AppImage building + +The image must be built on Ubuntu 16.04 Xenial, to ensure compatibility with +older systems. + +LXD can be used to setup a suitable container from any distro. + +If not done already (all default settings are usually fine): + + lxd init + +Initialize a new container named `ubuntu`: + + lxc launch images:ubuntu/xenial/amd64 ubuntu + +Now, you can either clone the repo from inside the container...: + + lxc exec ubuntu -- apt install -y git + lxc exec ubuntu -- git pull https://github.com/mirukana/mirage + +...or directly copy a repository from your local filesystem inside: + + lxc exec ubuntu -- /bin/mkdir -p /root/mirage + lxc file push -vr /* ubuntu/root/mirage + +Run the build script inside the container: + + lxc exec ubuntu -- /root/mirage/packaging/appimage/build.sh + +You can also start a shell inside (e.g. if something goes wrong): + + lxc exec ubuntu -- /bin/bash diff --git a/packaging/appimage/build.sh b/packaging/appimage/build.sh index c327fcb4..1d62fb47 100755 --- a/packaging/appimage/build.sh +++ b/packaging/appimage/build.sh @@ -1,37 +1,4 @@ #!/usr/bin/env bash - -# The image must be built on Ubuntu 16.04 Xenial, to ensure compatibility with -# older systems. -# -# LXD/LXC can be used to setup a suitable container from any distro. -# -# If using LXD and not done already (all default settings are fine): -# -# lxd init -# -# To restart from scratch if you already had a container: -# -# lxc stop ubuntu; lxc delete ubuntu -# -# Initialize the container: -# -# lxc launch images:ubuntu/xenial/amd64 ubuntu -# -# If you want to build an image for something else than the official unmodified -# repo, either change the MIRAGE_REPO_URL variable or directly copy your -# repository inside the container. Example: -# -# lxc exec ubuntu -- /bin/mkdir -p /root/mirage -# lxc file push -vr /* ubuntu/root/mirage -# -# Run this script inside the container: -# -# lxc exec ubuntu -- /root/mirage/packaging/appimage/build.sh -# -# You can also start a shell inside (e.g. if something goes wrong): -# -# lxc exec ubuntu -- /bin/bash - set -eo pipefail MIRAGE_REPO_URL='https://github.com/mirukana/mirage' @@ -41,7 +8,7 @@ check_distro() { if grep -q '^\s*Ubuntu\s*16.04' /etc/issue; then return; fi echo "Not running on expected distribution or version, aborting!" >&2 - echo "Read the instructions inside this script for more info." >&2 + echo "See /packaging/appimage/README.md for more info." >&2 exit 99 }