Skip to content

Commit

Permalink
ci: improve maintenance of test containers
Browse files Browse the repository at this point in the history
Consolidate list of package generation into test-packages.sh tool.
  • Loading branch information
Henrik66 committed Jul 15, 2023
1 parent 30a2f8c commit 3447d5d
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 59 deletions.
61 changes: 2 additions & 59 deletions test/container/Dockerfile-Debian
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,6 @@ MAINTAINER https://github.com/dracutdevs/dracut
# Install needed packages for the dracut CI container
# Install dracut as a linux-initramfs-tool provider so that the default initramfs-tool package does not get installed
# Uninstall initramfs-tools-core as a workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994492
RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --no-install-recommends dracut && \
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 \
asciidoc \
astyle \
btrfs-progs \
busybox-static \
bzip2 \
ca-certificates \
console-setup \
cpio \
cryptsetup \
curl \
dash \
debhelper \
debhelper-compat \
dmraid \
docbook \
docbook-xml \
docbook-xsl \
fdisk \
g++ \
gawk \
git \
iputils-arping \
iputils-ping \
isc-dhcp-client \
isc-dhcp-server \
kmod \
less \
libdmraid-dev \
libkmod-dev \
linux-image-generic \
lvm2 \
make \
mdadm \
multipath-tools \
nbd-client \
nbd-server \
network-manager \
nfs-kernel-server \
ntfs-3g \
open-iscsi \
ovmf \
parted \
pigz \
pkg-config \
procps \
qemu-system-x86 \
quilt \
shellcheck \
squashfs-tools \
strace \
sudo \
systemd-boot-efi \
tcpdump \
tgt \
thin-provisioning-tools \
vim \
wget \
RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --no-install-recommends dracut && pwd && ls -la /home/ && \
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 `/home/runner/work/_temp/_github_home/tools/test-packages.sh` \
&& apt-get clean && dpkg -P --force-depends dracut dracut-core initramfs-tools-core
171 changes: 171 additions & 0 deletions tools/test-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#!/bin/sh

if [ -f /etc/os-release ]; then
# shellcheck source=somefile
. /etc/os-release
fi

# common packages
cat << EOF
asciidoc
bzip2
cryptsetup
dash
dmraid
gawk
git
kbd
lvm2
make
mdadm
parted
pigz
shfmt
sudo
strace
tar
tcpdump
wget
which
EOF

# packages for rpm based distros
if [ "$ID" = "fedora" ] || [ "$ID" = "opensuse-tumbleweed" ]; then
cat << EOF
bash-completion
dhcp-client
dhcp-server
e2fsprogs
gcc
iproute
iputils
kernel
nbd
NetworkManager
nfs-utils
ntfsprogs
rpm-build
ShellCheck
xz
EOF
fi

if [ "$ID" = "fedora" ] || [ -x /usr/bin/dpkg ] || [ -x /usr/bin/pacman ]; then
cat << EOF
astyle
biosdevname
bluez
btrfs-progs
busybox
cifs-utils
f2fs-tools
fuse3
lzop
memstrack
ndctl
ntfs-3g
nvme-cli
pcsclite
rng-tools
sbsigntools
squashfs-tools
tpm2-tools
vi
EOF
fi

if [ "$ID" = "fedora" ]; then
cat << EOF
dbus-daemon
device-mapper-multipath
fcoe-utils
iscsi-initiator-utils
kmod-devel
libkcapi-hmaccalc
libselinux-utils
mksh
pcsc-lite
qemu-system-x86-core
scsi-target-utils
systemd-boot-unsigned
systemd-networkd
systemd-resolved
EOF
fi

if [ "$ID" = "opensuse-tumbleweed" ]; then
cat << EOF
btrfsprogs
dbus-broker
iscsiuio
libkmod-devel
multipath-tools
open-iscsi
procps
qemu-kvm
squashfs
systemd-boot
tgt
/usr/bin/qemu-system-$(uname -m)
util-linux-systemd
EOF
fi

if [ -x /usr/bin/pacman ]; then
cat << EOF
connman
cpio
dhclient
dhcp
linux
multipath-tools
networkmanager
open-iscsi
pcsclite
qemu
shellcheck
tgt
EOF
fi

# packages for deb based distro's
if [ -x /usr/bin/dpkg ]; then
cat << EOF
busybox-static
ca-certificates
console-setup
cpio
curl
debhelper
debhelper-compat
docbook
docbook-xml
docbook-xsl
fdisk
g++
iputils-arping
iputils-ping
isc-dhcp-client
isc-dhcp-server
kmod
less
libdmraid-dev
libkmod-dev
linux-image-generic
multipath-tools
nbd-client
nbd-server
network-manager
nfs-kernel-server
open-iscsi
ovmf
pkg-config
procps
qemu-system-x86
quilt
shellcheck
systemd-boot-efi
tgt
thin-provisioning-tools
EOF
fi

0 comments on commit 3447d5d

Please sign in to comment.