Skip to content

Commit

Permalink
feat(packaging): package for Debian 12 (#4826)
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroomempires authored Jan 25, 2024
2 parents e856a05 + 931e94c commit 26a0285
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 32 deletions.
8 changes: 8 additions & 0 deletions .github/actions/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ inputs:
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true
stability:
description: "The package stability (stable, testing, unstable, canary)"
required: true

runs:
using: composite
Expand All @@ -53,6 +56,11 @@ runs:
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
else
if [ "${{ inputs.stability }}" = "unstable" ] || [ "${{ inputs.stability }}" = "canary" ]; then
export RELEASE="$RELEASE-${{ inputs.distrib }}"
elif [ "${{ inputs.stability }}" = "testing" ]; then
export RELEASE="${{ inputs.distrib }}"
fi
export DIST=""
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ runs:
shell: bash

- name: Promote DEB package to stable
if: ${{ startsWith(inputs.distrib, 'bullseye') }}
if: ${{ startsWith(inputs.distrib, 'bullseye') || startsWith(inputs.distrib, 'bookworm' }}
run: |
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
Expand Down
53 changes: 53 additions & 0 deletions .github/docker/Dockerfile.packaging-plugins-bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/debian:bookworm

ENV DEBIAN_FRONTEND noninteractive

# fix locale
RUN bash -e <<EOF

apt-get update
apt-get install -y locales
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean

EOF

ENV LANG en_US.utf8

RUN bash -e <<EOF

apt-get update

echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder

apt-get install -y \
dh-make \
aptitude \
ca-certificates \
libssh-dev \
lintian \
quilt \
git-buildpackage \
debmake \
devscripts \
fakeroot \
curl \
gcc \
git \
python3 \
libjson-perl \
libapp-fatpacker-perl \
libfile-copy-recursive-perl \
jq \
zstd

echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm

apt-get clean

EOF
6 changes: 5 additions & 1 deletion .github/workflows/connector-vmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
Expand All @@ -66,6 +69,7 @@ jobs:
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}

deliver-rpm:
needs:
Expand Down Expand Up @@ -100,7 +104,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-builder-packaging-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- runner: ["self-hosted", "collect-arm64"]
dockerfile: packaging-plugins-bullseye
image: packaging-plugins-bullseye-arm64
- runner: ubuntu-22.04
dockerfile: packaging-plugins-bookworm
image: packaging-plugins-bookworm

runs-on: ${{ matrix.runner }}

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nrpe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
Expand Down Expand Up @@ -106,6 +109,7 @@ jobs:
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}

deliver-rpm:
needs: [get-environment, package]
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]
name:
[
"Authen::SASL::SASLprep",
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
"ZMQ::LibZMQ4"
]
include:
- build_distribs: "el8,el9,bullseye"
- build_distribs: "el8,el9,bullseye,bookworm"
- rpm_dependencies: ""
- deb_dependencies: ""
- rpm_provides: ""
Expand All @@ -114,6 +114,9 @@ jobs:
- distrib: bullseye
package_extension: deb
image: packaging-plugins-bullseye
- distrib: bookworm
package_extension: deb
image: packaging-plugins-bookworm
- name: "BSON"
build_distribs: "el8,el9"
rpm_provides: "perl(BSON::Bytes) perl(BSON::Code) perl(BSON::DBRef) perl(BSON::OID) perl(BSON::Raw) perl(BSON::Regex) perl(BSON::Time) perl(BSON::Timestamp) perl(BSON::Types) perl(BSON)"
Expand Down Expand Up @@ -145,7 +148,7 @@ jobs:
build_distribs: "el8,el9"
version: "0.31"
- name: "ZMQ::Constants"
build_distribs: "el9,bullseye"
build_distribs: "el9,bullseye,bookworm"
- name: "ZMQ::FFI"
build_distribs: "el8,el9"
rpm_dependencies: "zeromq"
Expand Down Expand Up @@ -301,16 +304,19 @@ jobs:
download-and-cache-deb:
needs: [package]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [bullseye, bookworm]
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: packages-deb-bullseye
name: packages-deb-${{ matrix.distrib }}
path: ./

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-bullseye
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}

deliver-rpm:
needs: [get-environment, sign-rpm]
Expand Down Expand Up @@ -341,7 +347,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -362,7 +368,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/perl-crypt-argon2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ jobs:
package_extension: deb
runner: ubuntu-22.04
arch: amd64
- image: packaging-plugins-bookworm
distrib: bookworm
package_extension: deb
runner: ubuntu-22.04
arch: amd64
- image: packaging-plugins-bullseye-arm64
distrib: bullseye
package_extension: deb
Expand All @@ -68,7 +73,7 @@ jobs:

- name: Install locally Crypt::Argon2
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
apt-get update
apt-get install -y cpanminus gcc
else
Expand All @@ -80,7 +85,7 @@ jobs:

- name: Set package name and paths according to distrib
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
NAME="libcrypt-argon2-perl"
if [ "${{ matrix.arch }}" = "amd64" ]; then
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
Expand Down Expand Up @@ -158,6 +163,8 @@ jobs:
include:
- distrib: bullseye
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down Expand Up @@ -189,6 +196,8 @@ jobs:
arch: amd64
- distrib: bullseye
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-filesys-smbclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
include:
- image: packaging-plugins-bullseye
distrib: bullseye
- image: packaging-plugins-bookworm
distrib: bookworm
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
Expand Down Expand Up @@ -172,7 +174,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -193,7 +195,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/perl-json-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- image: packaging-plugins-bullseye
distrib: bullseye
package_extension: deb
- image: packaging-plugins-bookworm
distrib: bookworm
package_extension: deb

runs-on: ubuntu-22.04

Expand All @@ -55,7 +58,7 @@ jobs:

- name: Install locally JSON::Path
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
apt-get update
apt-get install -y cpanminus gcc
else
Expand All @@ -72,7 +75,7 @@ jobs:
- name: Set package name and paths according to distrib
run: |
VERSION="1.0.3"
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
NAME="libjson-path-perl"
PERL_VENDORLIB="/usr/share/perl5"
else
Expand Down Expand Up @@ -145,8 +148,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]

distrib: [bullseye, bookworm]

name: Deliver ${{ matrix.distrib }}

Expand All @@ -169,7 +171,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-keepass-reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ jobs:
include:
- image: bullseye
distrib: bullseye
- image: bookworm
distrib: bookworm
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/packaging-plugins-${{ matrix.image }}:latest
Expand Down Expand Up @@ -180,7 +182,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -201,7 +203,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
Loading

0 comments on commit 26a0285

Please sign in to comment.