Skip to contentSkip to conversation

Create Containerfiles with required grub packages for development

PATCH Superseded Leo Sandoval via Grub-devel 4 participants 7 messages Jun 21, 2025 – Jul 9, 2025

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Create Containerfiles with required grub packages for development

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD) gnulib/regexec: Fix resource leak

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really an isolated system, as any other benchmark, do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real	1m15.486s
    user	0m51.869s
    sys	        0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real	1m18.679s
    user	0m51.352s
    sys	        0m27.417s

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26  About a minute ago  2.34 GB
    localhost/fedora-grub                      latest      b2dd8ef96b85  15 minutes ago      2.04 GB

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian, compilation failed on the Fedora container with the following error (already reported but not yet at upstream)

    lib/gnulib/base64.c:65:3: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]
       65 |   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and patch the repo

[root@4eabb29f0ef2 grub]# b4 shazam https://lore.kernel.org/grub-devel/[email protected]/
Grabbing thread from lore.kernel.org/all/[email protected]/t.mbox.gz Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

* make check results

Debian:

    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19

Fedora:

    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56 +++++++++++++++++++++++++++++++++++++++++
 container/Containerfile.fedora | 57 ++++++++++++++++++++++++++++++++++++++++++
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
container/Containerfile.debian new file +56 -0
new file mode 100644
index 0000000000..8906b2921e
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub
+
+WORKDIR /grub
container/Containerfile.fedora new file +57 -0

57 lines not on this page · raw message

container/README new file +22 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+
+once built, you can run/launch any of the above
+
+$ 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 check
\ No newline at end of file

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reviewed-by on v2 1/1
#1 lore raw

Thank you for doing this, this is very helpful.

I tested both and they worked well for me. I submitted a separate patch just a moment ago to fix 2 of the test failures (not caused by this update).

Thanks,
Andrew

Quoted 293 lines · Leo Sandoval via Grub-devel

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD)
gnulib/regexec: Fix resource leak

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really an isolated system, as any other benchmark,
do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real        1m15.486s
    user        0m51.869s
    sys         0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real        1m18.679s
    user        0m51.352s
    sys         0m27.417s

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26
About a minute ago  2.34 GB
    localhost/fedora-grub                      latest      b2dd8ef96b85
15 minutes ago      2.04 GB

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian, compilation failed on the Fedora container
with the following error (already reported but not yet at upstream)

lib/gnulib/base64.c:65:3: error: initializer-string for array of
‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]

       65 |
 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and patch the repo

    [root@4eabb29f0ef2 grub]# b4 shazam

https://lore.kernel.org/grub-devel/[email protected]/
Grabbing thread from
lore.kernel.org/all/[email protected]/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗
DKIM/ibm.com)
✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗
DKIM/ibm.com)
---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

* make check results

Debian:

============================================================================
Testsuite summary for GRUB 2.13

============================================================================

    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19

Fedora:

============================================================================
Testsuite summary for GRUB 2.13

============================================================================

    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56
+++++++++++++++++++++++++++++++++++++++++
 container/Containerfile.fedora | 57
++++++++++++++++++++++++++++++++++++++++++
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
container/Containerfile.debian new file +54 -0
new file mode 100644
index 0000000000..8906b2921e
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

container/Containerfile.debian new file +2 -0
+
+WORKDIR /grub
container/Containerfile.fedora new file +55 -0
new file mode 100644
index 0000000000..e5b33bfd71
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        unifont-fonts \
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

container/Containerfile.fedora new file +2 -0
+
+WORKDIR /grub
container/README new file +22 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+
+once built, you can run/launch any of the above
+
+$ 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 check
\ No newline at end of file
Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw
In reply to Leo Sandoval via Grub-devel
Quoted 164 lines · Leo Sandoval via Grub-devel

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD) gnulib/regexec: Fix resource leak

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really an isolated system, as any other benchmark, do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real	1m15.486s
    user	0m51.869s
    sys	        0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real	1m18.679s
    user	0m51.352s
    sys	        0m27.417s

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26  About a minute ago  2.34 GB
    localhost/fedora-grub                      latest      b2dd8ef96b85  15 minutes ago      2.04 GB

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian, compilation failed on the Fedora container with the following error (already reported but not yet at upstream)

    lib/gnulib/base64.c:65:3: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]
       65 |   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and patch the repo

[root@4eabb29f0ef2 grub]# b4 shazam https://lore.kernel.org/grub-devel/[email protected]/
Grabbing thread from lore.kernel.org/all/[email protected]/t.mbox.gz Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

* make check results

Debian:

    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19

Fedora:

    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56 +++++++++++++++++++++++++++++++++++++++++
 container/Containerfile.fedora | 57 ++++++++++++++++++++++++++++++++++++++++++
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
container/Containerfile.debian new file +44 -0
new file mode 100644
index 0000000000..8906b2921e
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \

container/Containerfile.debian line 54

Quoted 10 lines
container/Containerfile.debian new file +10 -0
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub

s/https.git/git/

Quoted 49 lines
container/Containerfile.debian new file +1 -0
+WORKDIR /grub
container/Containerfile.fedora new file +42 -0
new file mode 100644
index 0000000000..e5b33bfd71
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \

container/Containerfile.fedora line 52

Quoted 10 lines
container/Containerfile.fedora new file +10 -0
+        swtpm-tools \
+        tpm2-tools \
+        udftools \
+        unifont \
+        unifont-fonts \
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse

Could you add list of Fedora packages to the INSTALL file?

container/Containerfile.fedora line 54

Quoted 2 lines
container/Containerfile.fedora new file +2 -0
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub

s/https.git/git/

Quoted 19 lines
container/Containerfile.fedora new file +1 -0
+WORKDIR /grub
container/README new file +12 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+
+once built, you can run/launch any of the above
+
+$ podman run -it fedora-grub
+

container/README line 22

Quoted 10 lines
container/README new file +10 -0
+or
+
+$ podman run -it debian-grub
+
+and execute the standard build/test commands inside it, e.g
+
+# ./bootstrap
+# ./configure
+# ./make
+# ./make check

Please do not create separate documentation file. Put all of that into the INSTALL file.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
In reply to Leo Sandoval via Grub-devel
Quoted 8 lines · On Fri, 20 Jun 2025 18:03:41 -0600 Leo Sandoval via Grub-devel…

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

As noted there already is a list of packages in the INSTALL file. In contrast to Daniel, I actually prefer code as documentation, and have the INSTALL point to here. Or perhaps the container file can be modified to extract the list of packages from the INSTALL file (which, I imagine, would require a more machine readable format of the package list).

Quoted 73 lines

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD) gnulib/regexec: Fix resource leak

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really an isolated system, as any other benchmark, do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real	1m15.486s
    user	0m51.869s
    sys	        0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real	1m18.679s
    user	0m51.352s
    sys	        0m27.417s

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26  About a minute ago  2.34 GB
    localhost/fedora-grub                      latest      b2dd8ef96b85  15 minutes ago      2.04 GB

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian, compilation failed on the Fedora container with the following error (already reported but not yet at upstream)

    lib/gnulib/base64.c:65:3: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]
       65 |   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and patch the repo

[root@4eabb29f0ef2 grub]# b4 shazam https://lore.kernel.org/grub-devel/[email protected]/
Grabbing thread from lore.kernel.org/all/[email protected]/t.mbox.gz Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗ DKIM/ibm.com)
---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

* make check results

Debian:

Quoted 10 lines
    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19

This indicates that you're not properly running the tests. There should be no errors, IIRC. Look at the

Quoted 162 lines

Fedora:

    ============================================================================
    Testsuite summary for GRUB 2.13
    ============================================================================
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56 +++++++++++++++++++++++++++++++++++++++++
 container/Containerfile.fedora | 57 ++++++++++++++++++++++++++++++++++++++++++
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
container/Containerfile.debian new file +56 -0
new file mode 100644
index 0000000000..8906b2921e
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub
+
+WORKDIR /grub
container/Containerfile.fedora new file +57 -0
new file mode 100644
index 0000000000..e5b33bfd71
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        unifont-fonts \
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub
+
+WORKDIR /grub
container/README new file +8 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+

container/README line 18

Quoted 10 lines
container/README new file +10 -0
+once built, you can run/launch any of the above
+
+$ podman run -it fedora-grub
+
+or
+
+$ podman run -it debian-grub
+
+and execute the standard build/test commands inside it, e.g
+

An issue I suspect unrelated to the errors is that you've not included step #2 nor #9 of the section "Building the GRUB" in the INSTALL file. Also it should be noted that this does not test non-native architectures.

container/README line 22

Quoted 4 lines
container/README new file +4 -0
+# ./bootstrap
+# ./configure
+# ./make
+# ./make check

Would this series of commands leave residual files that can be seen upon a second invocation of the container? I have some build/test scripts that would probably be good for this script to leverage.

Glenn

Quoted 7 lines

\ No newline at end of file

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw
Quoted 12 lines · Glenn Washburn
Quoted 8 lines · On Fri, 20 Jun 2025 18:03:41 -0600 Leo Sandoval via Grub-devel…

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

Quoted 7 lines

As noted there already is a list of packages in the INSTALL file. In contrast to Daniel, I actually prefer code as documentation, and have the INSTALL point to here. Or perhaps the container file can be modified to extract the list of packages from the INSTALL file (which, I imagine, would require a more machine readable format of the package list).

I will try following dkiper's suggestion but I am not 100% convience.

Quoted 100 lines
Quoted 10 lines

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD)

gnulib/regexec: Fix resource leak

Quoted 4 lines

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really

an isolated system, as any other benchmark,

Quoted 17 lines

do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real      1m15.486s
    user      0m51.869s
    sys               0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real      1m18.679s
    user      0m51.352s
    sys               0m27.417s
Quoted 4 lines

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26

About a minute ago 2.34 GB

Quoted 1 line

localhost/fedora-grub latest b2dd8ef96b85

15 minutes ago 2.04 GB

Quoted 6 lines

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian,

compilation failed on the Fedora container

Quoted 3 lines

with the following error (already reported but not yet at upstream)

lib/gnulib/base64.c:65:3: error: initializer-string for array of

‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]

Quoted 1 line
       65 |

"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

Quoted 3 lines
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and

patch the repo

Quoted 2 lines
    [root@4eabb29f0ef2 grub]# b4 shazam

https://lore.kernel.org/grub-devel/[email protected]/

Quoted 1 line

Grabbing thread from

lore.kernel.org/all/[email protected]/t.mbox.gz

Quoted 8 lines

Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗

DKIM/ibm.com)

Quoted 2 lines

✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗

DKIM/ibm.com)

Quoted 9 lines

---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

Quoted 4 lines

* make check results

Debian:

============================================================================

Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 7 lines
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19
Quoted 2 lines

This indicates that you're not properly running the tests. There should be no errors, IIRC. Look at the

That's what I expected also but that is not the case when running inside these containers.

Quoted 177 lines
Quoted 5 lines

Fedora:

============================================================================

Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 11 lines
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56

+++++++++++++++++++++++++++++++++++++++++

Quoted 1 line
 container/Containerfile.fedora | 57

++++++++++++++++++++++++++++++++++++++++++

Review

Quoted 7 lines
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
(quoted diff) +0 -0

b/container/Containerfile.debian

Quoted 49 lines

new file mode 100644
index 0000000000..8906b2921e

container/Containerfile.debian new file +44 -0
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \

container/Containerfile.debian line 54

Quoted 10 lines
container/Containerfile.debian new file +10 -0
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

Review

Quoted 3 lines
container/Containerfile.debian new file +2 -0
+
+WORKDIR /grub
(quoted diff) +0 -0

b/container/Containerfile.fedora

Quoted 50 lines

new file mode 100644
index 0000000000..e5b33bfd71

container/Containerfile.fedora new file +45 -0
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \
+        tpm2-tools \
+        udftools \

container/Containerfile.fedora line 55

Quoted 10 lines
container/Containerfile.fedora new file +10 -0
+        unifont \
+        unifont-fonts \
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

Quoted 21 lines
container/Containerfile.fedora new file +2 -0
+
+WORKDIR /grub
container/README new file +13 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+
+once built, you can run/launch any of the above
+
+$ podman run -it fedora-grub
+
+or
Quoted 9 lines

container/README line 18

Quoted 5 lines
container/README new file +5 -0
+
+$ podman run -it debian-grub
+
+and execute the standard build/test commands inside it, e.g
+

An issue I suspect unrelated to the errors is that you've not included step #2 nor #9 of the section "Building the GRUB" in the INSTALL file.

for step #2, grub code is based on a shallow clone so the ./bootstrap applies in this case.

for step #9, this is related to documentation, and I can include on the commit description

Quoted 3 lines

Also it should be noted that this does not test non-native architectures.

good point.

Quoted 10 lines

container/README line 22

Quoted 5 lines
container/README new file +4 -0
+# ./bootstrap
+# ./configure
+# ./make
+# ./make check

Would this series of commands leave residual files that can be seen upon a second invocation of the container? I have some build/test scripts that would probably be good for this script to leverage.

yes, build artifacts, I believe most of the stuff described on the .gitignore

The image just contains the set of required packages and a shallow clone of grub, so any command executed inside the container that results on new files will be lost after exiting the environment, as any standard container.

Quoted 11 lines

Glenn

Quoted 7 lines

\ No newline at end of file

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw
Quoted 125 lines · On Mon, 30 Jun 2025 14:15:59 -0600 Leo Sandoval <[email protected]> wrote:
Quoted 12 lines · Glenn Washburn
Quoted 8 lines · On Fri, 20 Jun 2025 18:03:41 -0600 Leo Sandoval via Grub-devel…

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container, jump into 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 file explicitly indicating the required packages.

Quoted 7 lines

As noted there already is a list of packages in the INSTALL file. In contrast to Daniel, I actually prefer code as documentation, and have the INSTALL point to here. Or perhaps the container file can be modified to extract the list of packages from the INSTALL file (which, I imagine, would require a more machine readable format of the package list).

I will try following dkiper's suggestion but I am not 100% convience.

Quoted 100 lines
Quoted 10 lines

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD)

gnulib/regexec: Fix resource leak

Quoted 4 lines

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not really

an isolated system, as any other benchmark,

Quoted 17 lines

do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real      1m15.486s
    user      0m51.869s
    sys               0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real      1m18.679s
    user      0m51.352s
    sys               0m27.417s
Quoted 4 lines

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest      e789c1f8da26

About a minute ago 2.34 GB

Quoted 1 line

localhost/fedora-grub latest b2dd8ef96b85

15 minutes ago 2.04 GB

Quoted 6 lines

so debian is a 'bit' heavier than fedora.

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian,

compilation failed on the Fedora container

Quoted 3 lines

with the following error (already reported but not yet at upstream)

lib/gnulib/base64.c:65:3: error: initializer-string for array of

‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (65 chars into 64 available) [-Werror=unterminated-string-initialization]

Quoted 1 line
       65 |

"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

Quoted 3 lines
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4 and

patch the repo

Quoted 2 lines
    [root@4eabb29f0ef2 grub]# b4 shazam

https://lore.kernel.org/grub-devel/[email protected]/

Quoted 1 line

Grabbing thread from

lore.kernel.org/all/[email protected]/t.mbox.gz

Quoted 8 lines

Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15 compile
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗

DKIM/ibm.com)

Quoted 2 lines

✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
+ Reviewed-by: Sudhakar Kuppusamy <[email protected]> (✗

DKIM/ibm.com)

Quoted 9 lines

---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

Quoted 4 lines

* make check results

Debian:

============================================================================

Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 7 lines
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19
Quoted 6 lines
Quoted 2 lines

This indicates that you're not properly running the tests. There should be no errors, IIRC. Look at the

That's what I expected also but that is not the case when running inside these containers.

I'm not sure I understand you. What is "not the case"? Please provide a list of the 19 tests which cause an ERROR. I realize this is not technically related to the building of the container and thus this patch. However, I'd like to figure out why there are tests erroring and what needs to be done to get them working. I suspect its the filesystem tests which require root. If so, does that mean podman doesn't do UID mapping, or is that something you need to enable in the container file?

Quoted 189 lines
Quoted 179 lines
Quoted 7 lines

Fedora:

============================================================================

Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 11 lines
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56

+++++++++++++++++++++++++++++++++++++++++

Quoted 1 line
 container/Containerfile.fedora | 57

++++++++++++++++++++++++++++++++++++++++++

Review

Quoted 7 lines
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
(quoted diff) +0 -0

b/container/Containerfile.debian

Quoted 49 lines

new file mode 100644
index 0000000000..8906b2921e

container/Containerfile.debian new file +44 -0
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \

container/Containerfile.debian line 54

Quoted 10 lines
container/Containerfile.debian new file +10 -0
+        unifont \
+        wamerican \
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

Review

Quoted 3 lines
container/Containerfile.debian new file +2 -0
+
+WORKDIR /grub
(quoted diff) +0 -0

b/container/Containerfile.fedora

Quoted 50 lines

new file mode 100644
index 0000000000..e5b33bfd71

container/Containerfile.fedora new file +45 -0
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \
+        tpm2-tools \
+        udftools \

container/Containerfile.fedora line 55

Quoted 10 lines
container/Containerfile.fedora new file +10 -0
+        unifont \
+        unifont-fonts \
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git

/grub

Quoted 21 lines
container/Containerfile.fedora new file +2 -0
+
+WORKDIR /grub
container/README new file +13 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+
+once built, you can run/launch any of the above
+
+$ podman run -it fedora-grub
+
+or
Quoted 9 lines

container/README line 18

Quoted 5 lines
container/README new file +5 -0
+
+$ podman run -it debian-grub
+
+and execute the standard build/test commands inside it, e.g
+

An issue I suspect unrelated to the errors is that you've not included step #2 nor #9 of the section "Building the GRUB" in the INSTALL file.

Quoted 2 lines

for step #2, grub code is based on a shallow clone so the ./bootstrap applies in this case.

Not sure which INSTALL version you're reading, but the one I'm looking at has ./bootstrap as #3. #2 is "If you want translations type `./linguas.sh'" It would be useful to add this because its commonly forgotten.

Glenn

Quoted 23 lines

for step #9, this is related to documentation, and I can include on the commit description

Quoted 3 lines

Also it should be noted that this does not test non-native architectures.

good point.

Quoted 10 lines

container/README line 22

Quoted 5 lines
container/README new file +4 -0
+# ./bootstrap
+# ./configure
+# ./make
+# ./make check

Would this series of commands leave residual files that can be seen upon a second invocation of the container? I have some build/test scripts that would probably be good for this script to leverage.

Quoted 19 lines

yes, build artifacts, I believe most of the stuff described on the .gitignore

The image just contains the set of required packages and a shallow clone of grub, so any command executed inside the container that results on new files will be lost after exiting the environment, as any standard container.

Quoted 11 lines

Glenn

Quoted 7 lines

\ No newline at end of file

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#6 lore raw
Quoted 153 lines · Glenn Washburn
Quoted 1 line · On Mon, 30 Jun 2025 14:15:59 -0600 Leo Sandoval <[email protected]> wrote:

On Mon, Jun 30, 2025 at 1:45 PM Glenn Washburn <

[email protected]>

Quoted 10 lines
Quoted 8 lines · wrote:
Quoted 5 lines · On Fri, 20 Jun 2025 18:03:41 -0600 Leo Sandoval via Grub-devel…

Containers bring the ability to have ready-to-use environments and in this case complete Fedora and Debian container files are described containing all required packages for building and testing grub2.

Once users manually build it, they can run the desired container,

jump

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

into a setup ready for development. On the other hand, if users prefer to use bare metal instead of a containerized environment, it

is

Quoted 1 line
Quoted 1 line
Quoted 1 line

still useful to have a file explicitly indicating the required

packages.

Quoted 9 lines
Quoted 8 lines

As noted there already is a list of packages in the INSTALL file. In contrast to Daniel, I actually prefer code as documentation, and have the INSTALL point to here. Or perhaps the container file can be modified to extract the list of packages from the INSTALL file (which, I imagine, would require a more machine readable format of the package list).

Quoted 17 lines

I will try following dkiper's suggestion but I am not 100% convience.

Quoted 15 lines
Quoted 10 lines

---
Some facts observed while creating and testing these containes:

NOTE: all the below results are based on

    root@a613d2d32efa:/grub# git log --oneline
    db506b3 (grafted, HEAD -> master, origin/master, origin/HEAD)

gnulib/regexec: Fix resource leak

Quoted 4 lines

* compilation time

Done on my mostly idle-laptop (20 i7-12800H cores) so this is not

really

Quoted 18 lines
Quoted 18 lines

an isolated system, as any other benchmark,

Quoted 17 lines

do not trust too much on these numbers

Debian:

    root@a613d2d32efa:/grub# time make &>/dev/null
    real      1m15.486s
    user      0m51.869s
    sys               0m23.338s

Fedora:

    [root@4eabb29f0ef2 grub]# time make &>/dev/null

    real      1m18.679s
    user      0m51.352s
    sys               0m27.417s
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

* image sizes:

    $ podman images | grep '\-grub'
    localhost/debian-grub                      latest

e789c1f8da26

Quoted 2 lines
Quoted 2 lines

About a minute ago 2.34 GB

Quoted 1 line

localhost/fedora-grub latest

b2dd8ef96b85

Quoted 4 lines
Quoted 4 lines

15 minutes ago 2.04 GB

Quoted 3 lines

so debian is a 'bit' heavier than fedora.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

* compilation issue

Due to a more recent gcc version on Fedora compared to Debian,

compilation failed on the Fedora container

Quoted 3 lines

with the following error (already reported but not yet at upstream)

lib/gnulib/base64.c:65:3: error: initializer-string for array of

‘char’ truncates NUL terminator but destination lacks ‘nonstring’

attribute

Quoted 1 line
Quoted 1 line

(65 chars into 64 available)

[-Werror=unterminated-string-initialization]

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
       65 |

"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

Quoted 3 lines
    |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

whereas not observed in Debian. To fix the above, one can install b4

and

Quoted 4 lines
Quoted 4 lines

patch the repo

Quoted 2 lines
    [root@4eabb29f0ef2 grub]# b4 shazam

https://lore.kernel.org/grub-devel/[email protected]/

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

Grabbing thread from

lore.kernel.org/all/[email protected]/t.mbox.gz

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Checking for newer revisions
Grabbing search results from lore.kernel.org Analyzing 6 messages in the thread
Analyzing 3 code-review messages
Checking attestation on all messages, may take a moment...
---
✗ [PATCH v2 1/2] gnulib: Add patch to allow GRUB w/GCC-15

compile

Quoted 1 line
Quoted 1 line
Quoted 1 line

+ Reviewed-by: Sudhakar Kuppusamy <[email protected]>

(✗

Quoted 2 lines
Quoted 2 lines

DKIM/ibm.com)

Quoted 1 line

✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err'

Variable

Quoted 1 line
Quoted 1 line
Quoted 1 line

+ Reviewed-by: Sudhakar Kuppusamy <[email protected]>

(✗

Quoted 10 lines
Quoted 10 lines

DKIM/ibm.com)

Quoted 9 lines

---
✗ BADSIG: DKIM/gmail.com
---
Total patches: 2
---
Applying: gnulib: Add patch to allow GRUB w/GCC-15 compile
Applying: util/grub-protect: Correct uninit 'err' Variable

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

* make check results

Debian:

============================================================================

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
    # TOTAL: 88
    # PASS:  64
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  2
    # XPASS: 0
    # ERROR: 19
Quoted 6 lines
Quoted 2 lines

This indicates that you're not properly running the tests. There should be no errors, IIRC. Look at the

That's what I expected also but that is not the case when running inside these containers.

Quoted 8 lines

I'm not sure I understand you. What is "not the case"? Please provide a list of the 19 tests which cause an ERROR. I realize this is not technically related to the building of the container and thus this patch. However, I'd like to figure out why there are tests erroring and what needs to be done to get them working. I suspect its the filesystem tests which require root. If so, does that mean podman doesn't do UID mapping, or is that something you need to enable in the container file?

I do not know. I did not spend much time digging into each error but let me get them and share. BTW, you can also get them now that we have (well not yet at upstream) containers. Perhaps this is worth another email thread.

Quoted 194 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

Fedora:

============================================================================

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Testsuite summary for GRUB 2.13

============================================================================

Quoted 73 lines
Quoted 73 lines
Quoted 11 lines
    # TOTAL: 88
    # PASS:  63
    # SKIP:  3
    # XFAIL: 0
    # FAIL:  3
    # XPASS: 0
    # ERROR: 19

In general, the same results in both distros.

---
 container/Containerfile.debian | 56

+++++++++++++++++++++++++++++++++++++++++

Quoted 1 line
 container/Containerfile.fedora | 57

++++++++++++++++++++++++++++++++++++++++++

Review

Quoted 7 lines
 container/README               | 22 ++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 container/Containerfile.debian
 create mode 100644 container/Containerfile.fedora
 create mode 100644 container/README
(quoted diff) +0 -0

b/container/Containerfile.debian

Quoted 51 lines

new file mode 100644
index 0000000000..8906b2921e

container/Containerfile.debian new file +46 -0
@@ -0,0 +1,56 @@
+FROM debian
+
+# Install required packages for configuration & compilation & check
+RUN apt update -y  && \
+    apt install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        wamerican \
Quoted 8 lines
Quoted 8 lines

container/Containerfile.debian

Quoted 8 lines
container/Containerfile.debian new file +8 -0
+        which \
+        xfonts-unifont \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1

https://https.git.savannah.gnu.org/git/grub.git

Quoted 57 lines
Quoted 57 lines

/grub

Review

Quoted 3 lines
container/Containerfile.debian new file +2 -0
+
+WORKDIR /grub
(quoted diff) +0 -0

b/container/Containerfile.fedora

Quoted 52 lines

new file mode 100644
index 0000000000..e5b33bfd71

container/Containerfile.fedora new file +47 -0
@@ -0,0 +1,57 @@
+FROM registry.fedoraproject.org/fedora
+
+# Install required packages for configuration & compilation & check
+RUN dnf update -y && \
+    dnf install -y \
+        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 \
+        tpm2-tools \
+        udftools \
+        unifont \
+        unifont-fonts \
Quoted 8 lines
Quoted 8 lines

container/Containerfile.fedora

Quoted 8 lines
container/Containerfile.fedora new file +8 -0
+        which \
+        words \
+        xfsprogs \
+        xorriso \
+        zfs-fuse
+
+# clone tip of grub repository
+RUN git clone --depth 1

https://https.git.savannah.gnu.org/git/grub.git

Quoted 32 lines
Quoted 31 lines

/grub

Quoted 16 lines
container/Containerfile.fedora new file +2 -0
+
+WORKDIR /grub
container/README new file +8 -0
new file mode 100644
index 0000000000..be5e988b9d
@@ -0,0 +1,22 @@
+install `podman` on your favorite distro then build it with
+
+$ podman build -t fedora-grub -f Containerfile.fedora .
+
+or in case you prefer Debian
+
+$ podman build -t debian-grub -f Containerfile.debian .
+

container/README line 18

Quoted 10 lines
container/README new file +10 -0
+once built, you can run/launch any of the above
+
+$ podman run -it fedora-grub
+
+or
+
+$ podman run -it debian-grub
+
+and execute the standard build/test commands inside it, e.g
+

An issue I suspect unrelated to the errors is that you've not included step #2 nor #9 of the section "Building the GRUB" in the INSTALL file.

Quoted 8 lines
Quoted 2 lines

for step #2, grub code is based on a shallow clone so the ./bootstrap applies in this case.

Not sure which INSTALL version you're reading, but the one I'm looking at has ./bootstrap as #3. #2 is "If you want translations type `./linguas.sh'" It would be useful to add this because its commonly forgotten.

you are right. I missed that step, I will document it in the next series bump.

Quoted 26 lines

Glenn

Quoted 23 lines

for step #9, this is related to documentation, and I can include on the commit description

Quoted 3 lines

Also it should be noted that this does not test non-native architectures.

good point.

Quoted 10 lines

container/README line 22

Quoted 5 lines
container/README new file +4 -0
+# ./bootstrap
+# ./configure
+# ./make
+# ./make check

Would this series of commands leave residual files that can be seen upon a second invocation of the container? I have some build/test scripts that would probably be good for this script to leverage.

Quoted 23 lines
Quoted 4 lines

yes, build artifacts, I believe most of the stuff described on the .gitignore

The image just contains the set of required packages and a shallow clone

of

Quoted 2 lines

grub, so any command executed inside the container that results on new files will be lost after exiting the environment, as any standard

container.

Quoted 13 lines
Quoted 13 lines

Glenn

Quoted 7 lines

\ No newline at end of file

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel