Skip to content

Commit ef948df

Browse files
dmnksffesti
authored andcommitted
Make the test image toolbox-ready
Adjust the Dockerfile a bit so that one can use it to build a toolbox [*] image for developing rpm, like so: podman build --target base -t <tag> -f tests/Dockerfile . toolbox create -i <tag> toolbox enter <tag> This is convenient since the image already contains all the dependencies that one would have to install manually otherwise. Specifically, add a podman shim (see the previous commit for details) so that "make check" works as expected when run in a toolbox. While at it, also install a couple of useful development tools. Add a LABEL that marks the image as toolbox-ready, as per [*]. [*] https://containertoolbx.org/doc/
1 parent 1e0f609 commit ef948df

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Dockerfile.fedora

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Supported Fedora releases: 41 42
22
FROM registry.fedoraproject.org/fedora:42 AS base
3+
LABEL com.github.containers.toolbox="true"
34
MAINTAINER rpm-maint@lists.rpm.org
45

56
RUN echo -e "deltarpm=0\ninstall_weak_deps=0\ntsflags=nodocs" >> /etc/dnf/dnf.conf
@@ -61,8 +62,23 @@ RUN dnf -y install \
6162
RUN rm -f /usr/lib/rpm/macros.d/macros.transaction_ima
6263
# If updates to specific packages are needed, do it here
6364
RUN dnf -y --enablerepo=rawhide install "sequoia-sq >= 1.3" "rpm-sequoia >= 1.9" "crypto-policies >= 20250402"
65+
66+
# Install some development tools
67+
RUN dnf -y install \
68+
flatpak-spawn \
69+
gdb \
70+
strace \
71+
valgrind
72+
6473
RUN dnf clean all
6574

75+
# Install podman shim for use in toolbox containers
76+
RUN cat <<EOF > /usr/local/bin/podman
77+
#!/bin/bash
78+
exec flatpak-spawn --host podman "\$@"
79+
EOF
80+
RUN chmod +x /usr/local/bin/podman
81+
6682
# Workaround for pkgconf(1)'s unlisted dependency on rpm.
6783
# This is needed for cmake to work without an rpm installation.
6884
RUN ln -sf $(rpm --eval '%{_target_platform}%{?_gnu}')-pkg-config \

0 commit comments

Comments
 (0)