commit 5307d9fc94372d0e22e100470dc9e6fe70f181e5 Author: Paul Date: Sat Sep 13 13:30:20 2025 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2e7327 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/out diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8885e86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:latest + +WORKDIR /salt + +RUN apt update && apt install -y wget patchelf + +COPY install.sh install.sh +COPY require.txt require.txt diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..6ab7957 --- /dev/null +++ b/install.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +SALT_VERSION=3007.7 +ARCH=$(uname -m) + +pip3 install relenv + +wget -O /tmp/v${SALT_VERSION}.tar.gz https://github.com/saltstack/salt/archive/refs/tags/v${SALT_VERSION}.tar.gz +tar -C /tmp -xzvf /tmp/v${SALT_VERSION}.tar.gz + +relenv fetch --python=3.11.13 +relenv create /salt/salt --python=3.11.13 + +/salt/salt/bin/pip3 install ./salt-${SALT_VERSION} +/salt/salt/bin/pip3 install -r require.txt + +tar -C /salt -czvf /out/salt-${SALT_VERSION}-linux-${ARCH}.tar.gz salt diff --git a/require.txt b/require.txt new file mode 100644 index 0000000..74e95aa --- /dev/null +++ b/require.txt @@ -0,0 +1,7 @@ +tornado==6.5.2 +looseversion==1.3.0 +pyzmq +jinja2 +pycryptodomex +msgpack +packaging diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..5ef16f4 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +docker build -t salt-build . +docker run -it -v $(pwd)/out:/out salt-build /salt/install.sh