docker: Adjust rpm and deb packaging for multi-platform.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-17 01:46:44 +00:00
parent cd8648dce5
commit 73c179b20a
3 changed files with 14 additions and 13 deletions

View File

@@ -158,7 +158,7 @@ jobs:
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: ${{inputs.sys_targets}}
machines: '["X64"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
release_url: ${{inputs.release_url}}
@@ -166,12 +166,10 @@ jobs:
{
"deb": {
"dst": "tuwunel.deb",
"src": "tuwunel_1.0.0-1_amd64.deb",
"mime": "application/vnd.debian.binary-package"
},
"rpm": {
"dst": "tuwunel.rpm",
"src": "tuwunel-1.0.0-1.x86_64.rpm",
"mime": "application/x-rpm"
}
}
@@ -197,6 +195,6 @@ jobs:
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: ${{inputs.sys_targets}}
machines: '["X64"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}

View File

@@ -55,15 +55,16 @@ RUN \
--output "${pkg_dir}" \
${deb_args}
dpkg --info ${pkg_dir}/*
dpkg --contents ${pkg_dir}/*
mv ${pkg_dir}/* "${pkg_dir}/tuwunel.deb"
dpkg --info "${pkg_dir}/tuwunel.deb"
dpkg --contents "${pkg_dir}/tuwunel.deb"
EOF
FROM scratch AS deb
ARG pkg_dir
COPY --from=input ${pkg_dir}/* .
COPY --from=input ${pkg_dir}/tuwunel.deb .
FROM input AS deb-install
@@ -76,7 +77,7 @@ WORKDIR ${pkg_dir}
COPY --from=deb . .
RUN <<EOF
set -eux
dpkg --info *
dpkg --contents *
dpkg --install *
dpkg --info tuwunel.deb
dpkg --contents tuwunel.deb
dpkg --install tuwunel.deb
EOF

View File

@@ -47,13 +47,15 @@ RUN \
--payload-compress zstd \
--output "${pkg_dir}" \
${gen_rpm_args}
mv ${pkg_dir}/* "${pkg_dir}/tuwunel.rpm"
EOF
FROM scratch AS rpm
ARG pkg_dir
COPY --link --from=input ${pkg_dir}/* .
COPY --from=input ${pkg_dir}/tuwunel.rpm .
FROM input AS rpm-install
@@ -66,6 +68,6 @@ WORKDIR ${pkg_dir}
COPY --link --from=rpm . .
RUN <<EOF
set -eux
rpm -i --test *
rpm -i *
rpm -i --test tuwunel.rpm
rpm -i tuwunel.rpm
EOF