Skip to content

Commit

Permalink
fix python build on photon
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 13, 2024
1 parent bcb15f4 commit e8240a0
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 4 deletions.
6 changes: 4 additions & 2 deletions custom/testing/golden-state-tree/os/photon/config/init.sls
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
include:
- .ssh_config
- config.path
- config.ulimits
- config.locale
{#-
- .ssh_config
- config.sssd
- config.timezone
- config.dhclient
- config.sshd_config
- config.timezone
#}
4 changes: 4 additions & 0 deletions custom/testing/golden-state-tree/os/photon/init.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@



include:
- .config
- .pkgs
- python

{%- if pillar.get('github_actions_runner', False) %}
- github-actions-runner
Expand Down
9 changes: 9 additions & 0 deletions custom/testing/golden-state-tree/os/photon/pkgs/init.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

install_rpm:
cmd.run:
- name: tdnf install -y rpm
- if_missing: /usr/bin/rpm
- order: 0

include:
- pkgs.cron
{#-
- pkgs.bower
- pkgs.curl
- pkgs.dmidecode
Expand Down Expand Up @@ -34,3 +42,4 @@ include:
- pkgs.rust {#-
- pkgs.awscli
- pkgs.amazon-cloudwatch-agent #}
#}
17 changes: 16 additions & 1 deletion custom/testing/golden-state-tree/python/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@
{%- endif %}

include:
- ./{{ grains['os'].lower() }}_dependencies
{%- if grains['os'] == 'Rocky' %}
- .rocky_dependencies
{%- elif grains.get("oscodename") == 'Amazon Linux 2' %}
- .rocky_dependencies
{%- elif grains.get("osfinger") == 'Amazon Linux-2023' %}
- .rocky_dependencies
{%- elif grains['os'] == 'VMware Photon OS' %}
- .photon_dependencies
{%- elif grains['os'] == 'Debian' %}
- .debian_dependencies
{%- elif grains['os'] == 'Ubuntu' %}
- .debian_dependencies
{%- else %}
- .{{ grains['os'].lower() }}_dependencies
{% endif %}


python_source_archive:
file.managed:
Expand Down
30 changes: 30 additions & 0 deletions custom/testing/golden-state-tree/python/photon_dependencies.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{#-
#}

coreutils:
pkg.installed:
- name: coreutils-selinux

python_dependencies:
pkg.latest:
- pkgs:
- gcc
- make
- findutils
- binutils
- build-essential
- pkg-config
- openssl-devel
- libffi-devel
- bzip2-devel
- zlib-devel
- readline-devel
- ncurses-devel
- gdbm-devel
- sqlite-devel
- xz-devel
- expat-devel
- util-linux-devel
- libnsl-devel
- require:
- coreutils
2 changes: 1 addition & 1 deletion custom/testing/photon-4.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN <<EOF
fi

tdnf update -y
tdnf install -y curl wget tar xz # patchelf
tdnf install -y curl 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

0 comments on commit e8240a0

Please sign in to comment.