grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Create Containerfiles with required grub packages for development
@ 2025-06-21  0:03 Leo Sandoval via Grub-devel
  2025-06-21 15:52 ` Andrew Hamilton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Leo Sandoval via Grub-devel @ 2025-06-21  0:03 UTC (permalink / raw)
  To: grub-devel; +Cc: Leo Sandoval

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.

Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
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/20250618015826.270234-2-adhamilt@gmail.com/
    Grabbing thread from lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗ DKIM/ibm.com)
      ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
        + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗ 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

diff --git a/container/Containerfile.debian b/container/Containerfile.debian
new file mode 100644
index 0000000000..8906b2921e
--- /dev/null
+++ b/container/Containerfile.debian
@@ -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
diff --git a/container/Containerfile.fedora b/container/Containerfile.fedora
new file mode 100644
index 0000000000..e5b33bfd71
--- /dev/null
+++ b/container/Containerfile.fedora
@@ -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
diff --git a/container/README b/container/README
new file mode 100644
index 0000000000..be5e988b9d
--- /dev/null
+++ b/container/README
@@ -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
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-06-21  0:03 [PATCH v2] Create Containerfiles with required grub packages for development Leo Sandoval via Grub-devel
@ 2025-06-21 15:52 ` Andrew Hamilton
  2025-06-24 17:04 ` Daniel Kiper
  2025-06-30 19:45 ` Glenn Washburn
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Hamilton @ 2025-06-21 15:52 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Leo Sandoval


[-- Attachment #1.1: Type: text/plain, Size: 9097 bytes --]

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).

Reviewed-by: Andrew Hamilton <adhamilt@gmail.com>


Thanks,
Andrew

On Fri, Jun 20, 2025 at 7:04 PM Leo Sandoval via Grub-devel <
grub-devel@gnu.org> wrote:

> 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.
>
> Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> ---
> 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/20250618015826.270234-2-adhamilt@gmail.com/
>     Grabbing thread from
> lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗
> DKIM/ibm.com)
>       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
>         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗
> 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
>
> diff --git a/container/Containerfile.debian
> b/container/Containerfile.debian
> new file mode 100644
> index 0000000000..8906b2921e
> --- /dev/null
> +++ b/container/Containerfile.debian
> @@ -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
> diff --git a/container/Containerfile.fedora
> b/container/Containerfile.fedora
> new file mode 100644
> index 0000000000..e5b33bfd71
> --- /dev/null
> +++ b/container/Containerfile.fedora
> @@ -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
> diff --git a/container/README b/container/README
> new file mode 100644
> index 0000000000..be5e988b9d
> --- /dev/null
> +++ b/container/README
> @@ -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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #1.2: Type: text/html, Size: 11899 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-06-21  0:03 [PATCH v2] Create Containerfiles with required grub packages for development Leo Sandoval via Grub-devel
  2025-06-21 15:52 ` Andrew Hamilton
@ 2025-06-24 17:04 ` Daniel Kiper
  2025-06-30 19:45 ` Glenn Washburn
  2 siblings, 0 replies; 7+ messages in thread
From: Daniel Kiper @ 2025-06-24 17:04 UTC (permalink / raw)
  To: Leo Sandoval; +Cc: grub-devel

On Fri, Jun 20, 2025 at 06:03:41PM -0600, Leo Sandoval via Grub-devel wrote:
> 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.
>
> Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> ---
> 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/20250618015826.270234-2-adhamilt@gmail.com/
>     Grabbing thread from lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗ DKIM/ibm.com)
>       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
>         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗ 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
>
> diff --git a/container/Containerfile.debian b/container/Containerfile.debian
> new file mode 100644
> index 0000000000..8906b2921e
> --- /dev/null
> +++ b/container/Containerfile.debian
> @@ -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

s/https.git/git/

> +WORKDIR /grub
> diff --git a/container/Containerfile.fedora b/container/Containerfile.fedora
> new file mode 100644
> index 0000000000..e5b33bfd71
> --- /dev/null
> +++ b/container/Containerfile.fedora
> @@ -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

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

> +# clone tip of grub repository
> +RUN git clone --depth 1 https://https.git.savannah.gnu.org/git/grub.git /grub

s/https.git/git/

> +WORKDIR /grub
> diff --git a/container/README b/container/README
> new file mode 100644
> index 0000000000..be5e988b9d
> --- /dev/null
> +++ b/container/README
> @@ -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

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

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-06-21  0:03 [PATCH v2] Create Containerfiles with required grub packages for development Leo Sandoval via Grub-devel
  2025-06-21 15:52 ` Andrew Hamilton
  2025-06-24 17:04 ` Daniel Kiper
@ 2025-06-30 19:45 ` Glenn Washburn
  2025-06-30 20:15   ` Leo Sandoval via Grub-devel
  2 siblings, 1 reply; 7+ messages in thread
From: Glenn Washburn @ 2025-06-30 19:45 UTC (permalink / raw)
  To: Leo Sandoval via Grub-devel; +Cc: Leo Sandoval, Daniel Kiper

On Fri, 20 Jun 2025 18:03:41 -0600
Leo Sandoval via Grub-devel <grub-devel@gnu.org> wrote:

> 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).

> 
> Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> ---
> 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/20250618015826.270234-2-adhamilt@gmail.com/
>     Grabbing thread from lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗ DKIM/ibm.com)
>       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
>         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗ 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

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

> 
> 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
> 
> diff --git a/container/Containerfile.debian b/container/Containerfile.debian
> new file mode 100644
> index 0000000000..8906b2921e
> --- /dev/null
> +++ b/container/Containerfile.debian
> @@ -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
> diff --git a/container/Containerfile.fedora b/container/Containerfile.fedora
> new file mode 100644
> index 0000000000..e5b33bfd71
> --- /dev/null
> +++ b/container/Containerfile.fedora
> @@ -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
> diff --git a/container/README b/container/README
> new file mode 100644
> index 0000000000..be5e988b9d
> --- /dev/null
> +++ b/container/README
> @@ -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
> +

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.

> +# ./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

> \ No newline at end of file
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-06-30 19:45 ` Glenn Washburn
@ 2025-06-30 20:15   ` Leo Sandoval via Grub-devel
  2025-07-09  1:24     ` Glenn Washburn
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Sandoval via Grub-devel @ 2025-06-30 20:15 UTC (permalink / raw)
  To: development; +Cc: Leo Sandoval, Leo Sandoval via Grub-devel, Daniel Kiper


[-- Attachment #1.1: Type: text/plain, Size: 11144 bytes --]

On Mon, Jun 30, 2025 at 1:45 PM Glenn Washburn <development@efficientek.com>
wrote:

> On Fri, 20 Jun 2025 18:03:41 -0600
> Leo Sandoval via Grub-devel <grub-devel@gnu.org> wrote:
>
> > 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).
>

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

>
> >
> > Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> > ---
> > 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/20250618015826.270234-2-adhamilt@gmail.com/
> >     Grabbing thread from
> lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗
> DKIM/ibm.com)
> >       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
> >         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗
> 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
>
> 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.


>
>
> >
> > 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
> >
> > diff --git a/container/Containerfile.debian
> b/container/Containerfile.debian
> > new file mode 100644
> > index 0000000000..8906b2921e
> > --- /dev/null
> > +++ b/container/Containerfile.debian
> > @@ -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
> > diff --git a/container/Containerfile.fedora
> b/container/Containerfile.fedora
> > new file mode 100644
> > index 0000000000..e5b33bfd71
> > --- /dev/null
> > +++ b/container/Containerfile.fedora
> > @@ -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
> > diff --git a/container/README b/container/README
> > new file mode 100644
> > index 0000000000..be5e988b9d
> > --- /dev/null
> > +++ b/container/README
> > @@ -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
> > +
>
> 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


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

good point.


>
> > +# ./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.


> Glenn
>
> > \ No newline at end of file
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 15691 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-06-30 20:15   ` Leo Sandoval via Grub-devel
@ 2025-07-09  1:24     ` Glenn Washburn
  2025-07-09 16:54       ` Leo Sandoval via Grub-devel
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Washburn @ 2025-07-09  1:24 UTC (permalink / raw)
  To: Leo Sandoval; +Cc: Leo Sandoval via Grub-devel, Daniel Kiper

On Mon, 30 Jun 2025 14:15:59 -0600
Leo Sandoval <lsandova@redhat.com> wrote:

> On Mon, Jun 30, 2025 at 1:45 PM Glenn Washburn <development@efficientek.com>
> wrote:
> 
> > On Fri, 20 Jun 2025 18:03:41 -0600
> > Leo Sandoval via Grub-devel <grub-devel@gnu.org> wrote:
> >
> > > 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).
> >
> 
> I will try following dkiper's suggestion but I am not 100% convience.
> 
> >
> > >
> > > Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> > > ---
> > > 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/20250618015826.270234-2-adhamilt@gmail.com/
> > >     Grabbing thread from
> > lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com> (✗
> > DKIM/ibm.com)
> > >       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err' Variable
> > >         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> (✗
> > 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
> >
> > 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?

> 
> 
> >
> >
> > >
> > > 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
> > >
> > > diff --git a/container/Containerfile.debian
> > b/container/Containerfile.debian
> > > new file mode 100644
> > > index 0000000000..8906b2921e
> > > --- /dev/null
> > > +++ b/container/Containerfile.debian
> > > @@ -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
> > > diff --git a/container/Containerfile.fedora
> > b/container/Containerfile.fedora
> > > new file mode 100644
> > > index 0000000000..e5b33bfd71
> > > --- /dev/null
> > > +++ b/container/Containerfile.fedora
> > > @@ -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
> > > diff --git a/container/README b/container/README
> > > new file mode 100644
> > > index 0000000000..be5e988b9d
> > > --- /dev/null
> > > +++ b/container/README
> > > @@ -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
> > > +
> >
> > 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.

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

> 
> for step #9, this is related to documentation,  and I can include on the
> commit description
> 
> 
> > Also it should be noted that this does not test non-native
> > architectures.
> >
> 
> good point.
> 
> 
> >
> > > +# ./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.
> 
> 
> > Glenn
> >
> > > \ No newline at end of file
> > >
> > >
> > > _______________________________________________
> > > Grub-devel mailing list
> > > Grub-devel@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
> >

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Create Containerfiles with required grub packages for development
  2025-07-09  1:24     ` Glenn Washburn
@ 2025-07-09 16:54       ` Leo Sandoval via Grub-devel
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Sandoval via Grub-devel @ 2025-07-09 16:54 UTC (permalink / raw)
  To: development; +Cc: Leo Sandoval, Leo Sandoval via Grub-devel, Daniel Kiper


[-- Attachment #1.1: Type: text/plain, Size: 13907 bytes --]

On Tue, Jul 8, 2025 at 7:26 PM Glenn Washburn <development@efficientek.com>
wrote:

> On Mon, 30 Jun 2025 14:15:59 -0600
> Leo Sandoval <lsandova@redhat.com> wrote:
>
> > On Mon, Jun 30, 2025 at 1:45 PM Glenn Washburn <
> development@efficientek.com>
> > wrote:
> >
> > > On Fri, 20 Jun 2025 18:03:41 -0600
> > > Leo Sandoval via Grub-devel <grub-devel@gnu.org> wrote:
> > >
> > > > 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).
> > >
> >
> > I will try following dkiper's suggestion but I am not 100% convience.
> >
> > >
> > > >
> > > > Signed-off-by: Leo Sandoval <lsandova@redhat.com>
> > > > ---
> > > > 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/20250618015826.270234-2-adhamilt@gmail.com/
> > > >     Grabbing thread from
> > >
> lore.kernel.org/all/20250618015826.270234-2-adhamilt@gmail.com/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 <sudhakar@linux.ibm.com>
> (✗
> > > DKIM/ibm.com)
> > > >       ✗ [PATCH v2 2/2] util/grub-protect: Correct uninit 'err'
> Variable
> > > >         + Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
> (✗
> > > 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
> > >
> > > 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?
>

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.


>
> >
> >
> > >
> > >
> > > >
> > > > 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
> > > >
> > > > diff --git a/container/Containerfile.debian
> > > b/container/Containerfile.debian
> > > > new file mode 100644
> > > > index 0000000000..8906b2921e
> > > > --- /dev/null
> > > > +++ b/container/Containerfile.debian
> > > > @@ -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
> > > > diff --git a/container/Containerfile.fedora
> > > b/container/Containerfile.fedora
> > > > new file mode 100644
> > > > index 0000000000..e5b33bfd71
> > > > --- /dev/null
> > > > +++ b/container/Containerfile.fedora
> > > > @@ -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
> > > > diff --git a/container/README b/container/README
> > > > new file mode 100644
> > > > index 0000000000..be5e988b9d
> > > > --- /dev/null
> > > > +++ b/container/README
> > > > @@ -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
> > > > +
> > >
> > > 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.
>
> 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.


>
> Glenn
>
> >
> > for step #9, this is related to documentation,  and I can include on the
> > commit description
> >
> >
> > > Also it should be noted that this does not test non-native
> > > architectures.
> > >
> >
> > good point.
> >
> >
> > >
> > > > +# ./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.
> >
> >
> > > Glenn
> > >
> > > > \ No newline at end of file
> > > >
> > > >
> > > > _______________________________________________
> > > > Grub-devel mailing list
> > > > Grub-devel@gnu.org
> > > > https://lists.gnu.org/mailman/listinfo/grub-devel
> > >
> > >
>
>

[-- Attachment #1.2: Type: text/html, Size: 20324 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-07-09 16:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-21  0:03 [PATCH v2] Create Containerfiles with required grub packages for development Leo Sandoval via Grub-devel
2025-06-21 15:52 ` Andrew Hamilton
2025-06-24 17:04 ` Daniel Kiper
2025-06-30 19:45 ` Glenn Washburn
2025-06-30 20:15   ` Leo Sandoval via Grub-devel
2025-07-09  1:24     ` Glenn Washburn
2025-07-09 16:54       ` Leo Sandoval via Grub-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).