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

@@ -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