Skip to content

Commit 418edb8

Browse files
authored
[Build-System] Use unique .orig.tar.xz filenames across different Debian distributions. Update Debian distributions since stable is Trixie now. Use codename instead of suite when generating the distribution field in .changes files. (signalwire#2953)
1 parent 4c93f3c commit 418edb8

19 files changed

Lines changed: 289 additions & 279 deletions

.github/docker/debian/bookworm/amd64/public.release.Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
63-
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
62+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a amd64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
6665
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
@@ -83,21 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
8886

89-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a amd64 -z9 ${CODENAME} "$ORIGFILE"
9089

91-
RUN dpkg-source \
92-
--diff-ignore=.* \
93-
--compression=xz \
94-
--compression-level=9 \
95-
--build \
96-
. \
97-
&& debuild -b -us -uc \
98-
&& mkdir OUT \
99-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
100100

101101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
102102
FROM scratch
103-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bookworm/amd64/public.unstable.Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
63-
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
62+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a amd64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
6665
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
@@ -83,21 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
8886

89-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a amd64 -z9 ${CODENAME} "$ORIGFILE"
9089

91-
RUN dpkg-source \
92-
--diff-ignore=.* \
93-
--compression=xz \
94-
--compression-level=9 \
95-
--build \
96-
. \
97-
&& debuild -b -us -uc \
98-
&& mkdir OUT \
99-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
100100

101101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
102102
FROM scratch
103-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bookworm/arm32v7/public.release.Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
6362
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a armhf -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bookworm/arm32v7/public.unstable.Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
6362
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a armhf -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bookworm/arm64v8/public.release.Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
6362
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a arm64 -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bookworm/arm64v8/public.unstable.Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
6362
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a arm64 -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bullseye/amd64/public.release.Dockerfile

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
63-
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
62+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a amd64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
6665
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a amd64 -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

.github/docker/debian/bullseye/amd64/public.unstable.Dockerfile

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ COPY . ${DATA_DIR}
5959
WORKDIR ${DATA_DIR}
6060
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
6161

62-
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
63-
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
62+
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a amd64 ${CODENAME}
6463

6564
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
6665
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
@@ -83,20 +82,22 @@ RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
8382
rm -f /etc/apt/auth.conf
8483

8584
ENV DEB_BUILD_OPTIONS="parallel=1"
86-
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
87-
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
88-
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
89-
90-
RUN dpkg-source \
91-
--diff-ignore=.* \
92-
--compression=xz \
93-
--compression-level=9 \
94-
--build \
95-
. \
96-
&& debuild -b -us -uc \
97-
&& mkdir OUT \
98-
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
85+
RUN . ~/.env && ./debian/util.sh create-orig -n -v${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
86+
87+
RUN . ~/.env && ORIGFILE=$(find ../ -name "freeswitch_*.orig.tar.xz" -type f) \
88+
&& ./debian/util.sh create-dsc -a amd64 -z9 ${CODENAME} "$ORIGFILE"
89+
90+
WORKDIR /
91+
RUN dpkg-source -x freeswitch_*.dsc
92+
93+
RUN cd freeswitch-*/ && debuild -S -sa -d -us -uc
94+
95+
RUN cd freeswitch-*/ && debuild -b -us -uc
96+
97+
RUN mkdir OUT && mv -v *.{deb,dsc,changes,tar.*} OUT/.
98+
99+
RUN ls -lah /OUT
99100

100101
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
101102
FROM scratch
102-
COPY --from=builder /data/OUT/ /
103+
COPY --from=builder /OUT/ /

0 commit comments

Comments
 (0)