Containers bring the ability to have ready-to-use environments isolated completely from the build environment. Once users manually build it, they can launch the desired container, jump into it and have a setup ready for development. On the other hand, if users prefer to use bare metal instead of a containerized environment, it is still useful to have a the full list of the required packages.
Signed-off-by: Leo Sandoval <lsand...@redhat.com> --- Changes from v4: * Define a generic container file (Containerfile) with several build arguments, so packages are now passed through the command line instead of statically defined into the container file per distro. This is a little more work for the user when invoking the podman build command but with the benefit of having a single place defining the required distro packages for GRUB development. --- INSTALL | 148 ++++++++++++++++++++++++++++++++++++++++++++++++ container/Containerfile | 19 +++++++ 2 files changed, 167 insertions(+) create mode 100644 container/Containerfile diff --git a/INSTALL b/INSTALL index 724584c575..e440e1bab8 100644 --- a/INSTALL +++ b/INSTALL @@ -105,6 +105,13 @@ To use the gdb_grub GDB script you'll need: * GNU Debugger > 7, built with python support (gdb package) * Python >= 3.5 (python3 package) +To easier the task of package installation, the Container section list +the above packages per distribution (see the command line examples, the +--build-arg PKGS argument on the podman build command). In case the installation +of these packages is not possible on your host, one can rely on containers which +are ready-to-use container images for GRUB development. For more informacion see +Container section. + Configuring the GRUB ==================== @@ -354,3 +361,144 @@ operates. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. + +Container +========= + +Containers bring the ability to have ready-to-use environments isolated completely +from the build environment. Once users manually build it, they can launch the desired +container, jump into it and have a setup ready for development. On the other hand, if users +prefer to use bare metal instead of a containerized environment, it is still useful to have a +the full list of the required packages. + +Assuming your build OS support containers, e.g. all Linux distros, install 'podman' on +your favorite distro, move into the container folder then build a specific distro image with + +$ cd container +$ podman build \ + --build-arg BASE_IMAGE=fedora \ + --build-arg PKG_MANAGER=dnf \ + --build-arg PKGS="\ + attr \ + autoconf \ + automake \ + autopoint \ + bison \ + btrfs-progs \ + cpio \ + cryptsetup \ + dosfstools \ + e2fsprogs \ + edk2-ovmf \ + edk2-ovmf-ia32 \ + erofs-utils \ + exfatprogs \ + f2fs-tools \ + flex \ + gawk \ + genromfs \ + gettext \ + git \ + hfsplus-tools \ + jfsutils \ + libtool \ + lzop \ + make \ + mtools \ + nilfs-utils \ + ntfsprogs \ + parted \ + patch \ + pkg-config \ + python3 \ + qemu-system-arm \ + qemu-system-aarch64 \ + qemu-system-riscv \ + qemu-system-x86 \ + squashfs-tools \ + swtpm-tools \ + texi2dvi \ + tpm2-tools \ + udftools \ + unifont \ + unifont-fonts \ + which \ + words \ + xfsprogs \ + xorriso \ + zfs-fuse" \ + -t fedora-grub . + +or in case you prefer Debian + +$ cd container +$ podman build \ + --build-arg BASE_IMAGE=debian \ + --build-arg PKG_MANAGER=apt \ + --build-arg PKGS="\ + attr \ + autoconf \ + automake \ + autopoint \ + bison \ + btrfs-progs \ + cpio \ + cryptsetup \ + dosfstools \ + e2fsprogs \ + erofs-utils \ + exfatprogs \ + f2fs-tools \ + flex \ + gawk \ + genromfs \ + gettext \ + git \ + hfsplus \ + jfsutils \ + libtool \ + lzop \ + make \ + mtools \ + nilfs-tools \ + ntfs-3g \ + ovmf \ + ovmf-ia32 \ + parted \ + patch \ + pkg-config \ + python3 \ + qemu-efi-aarch64 \ + qemu-efi-arm \ + qemu-system \ + squashfs-tools \ + swtpm-tools \ + texinfo \ + texlive \ + tpm2-tools \ + udftools \ + unifont \ + wamerican \ + which \ + xfonts-unifont \ + xfsprogs \ + xorriso \ + zfs-fuse" \ + -t debian-grub . + +once built, you can run/launch any of the aboven + +$ podman run -it fedora-grub + +or + +$ podman run -it debian-grub + +and execute the standard build/test commands inside it, e.g + + # ./bootstrap + # ./configure + # ./make + # ./make html + # ./make pdf + # ./make check diff --git a/container/Containerfile b/container/Containerfile new file mode 100644 index 0000000000..f6b7d6683d --- /dev/null +++ b/container/Containerfile @@ -0,0 +1,19 @@ +ARG BASE_IMAGE +FROM ${BASE_IMAGE} + +# package arguments +ARG PKG_MANAGER +ARG PKGS + +# repostory arguments +ARG GIT_CLONE_DEPTH=1 +ARG GRUB_REPO=https://git.savannah.gnu.org/git/grub.git +ARG GRUB_DIR=/grub + +# Install required packages for configuration & compilation & check +RUN $PKG_MANAGER update -y && $PKG_MANAGER install -y ${PKGS} + +# clone GRUB +RUN git clone --depth ${GIT_CLONE_DEPTH} ${GRUB_REPO} ${GRUB_DIR} + +WORKDIR ${GRUB_DIR} _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel