Skip to content

Commit

Permalink
Fix rocky depends and systemd builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 14, 2024
1 parent a0e2ff7 commit 562d775
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
22 changes: 22 additions & 0 deletions custom/testing/golden-state-tree/python/rocky_dependencies.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ install_config_command:
- name: dnf install -y 'dnf-command(config-manager)'


{%- if grains['lsb_distrib_release'].startswith("9") %}
# Use config manager to enable powertools repo. This is needed for libnsl2-devel
enable_devel_repo:
cmd.run:
- name: dnf config-manager --set-enabled devel
- require:
- install_config_command
{%- else %}
# Use config manager to enable powertools repo. This is needed for libnsl2-devel
enable_powertools_repo:
cmd.run:
- name: dnf config-manager --set-enabled powertools
- require:
- install_config_command
{% endif %}


python_dependencies:
Expand All @@ -30,4 +39,17 @@ python_dependencies:
- xz-devel
- libnsl2-devel
- require:
{%- if grains['lsb_distrib_release'].startswith("9") %}
- enable_devel_repo
{%- else %}
- enable_powertools_repo
{% endif %}

{%- if grains['lsb_distrib_release'].startswith("9") %}
# Use config manager to enable powertools repo. This is needed for libnsl2-devel
disable_devel_repo:
cmd.run:
- name: dnf config-manager --set-disabled devel
- require:
- python_dependencies
{%- endif %}
2 changes: 1 addition & 1 deletion custom/testing/rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN <<EOF

yum update -y
yum install -y epel-release
yum install -y curl wget tar xz patchelf
yum install -y wget tar xz patchelf

wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz
Expand Down
4 changes: 2 additions & 2 deletions custom/testing/systemd-rockylinux-8.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rockylinux:9
FROM rockylinux:8

COPY golden-pillar-tree golden-pillar-tree
COPY golden-state-tree golden-state-tree
Expand All @@ -16,7 +16,7 @@ RUN <<EOF

yum update -y
yum install -y epel-release
yum install -y curl wget tar xz patchelf systemd
yum install -y wget tar xz patchelf systemd

wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz
Expand Down
2 changes: 1 addition & 1 deletion custom/testing/systemd-rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN <<EOF

yum update -y
yum install -y epel-release
yum install -y curl wget tar xz patchelf systemd
yum install -y wget tar xz patchelf systemd

wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz
Expand Down
20 changes: 9 additions & 11 deletions custom/testing/systemd-ubuntu-22.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ SHELL ["/bin/bash", "-c"]

RUN <<EOF
set -e
# init and systemd are the only real requirements for systemd.
#
# tar wget x-utils can be used to fetch and extract a salt onedir.
#
# apt-utils was required by golden states, this may/should be fixed in those
# states.
#
# tree is used by workflows for debugging
#
# coreutils provides tail
RUN apt update -y

if [ $(uname -m) = "x86_64" ]; then
export ARCH=x86_64
else
export ARCH=arm64
fi

apt update -y
echo 'tzdata tzdata/Areas select America' | debconf-set-selections
echo 'tzdata tzdata/Zones/America select Phoenix' | debconf-set-selections
DEBIAN_FRONTEND="noninteractive" apt install -y coreutils tree tar \
Expand All @@ -37,6 +34,7 @@ RUN <<EOF

mv /usr/bin/tail /usr/bin/tail.real
EOF

# Set the root password, this was done before single user mode worked.
# RUN echo "root\nroot" | passwd -q root

Expand Down

0 comments on commit 562d775

Please sign in to comment.