diff --git a/.github/docker/packaging/Dockerfile.packaging-plugins-alma8 b/.github/docker/packaging/Dockerfile.packaging-plugins-alma8 index c320444449..620a7b3cc3 100644 --- a/.github/docker/packaging/Dockerfile.packaging-plugins-alma8 +++ b/.github/docker/packaging/Dockerfile.packaging-plugins-alma8 @@ -17,7 +17,7 @@ cpanm App::FatPacker cpanm File::Copy::Recursive # For cpan libs -dnf install -y libcurl-devel libssh-devel expat-devel libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny +dnf install -y cpio libcurl-devel libssh-devel expat-devel libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny cpanm Module::Build::Tiny cpanm Module::Install # Install fpm (ruby 3 is required) diff --git a/.github/docker/packaging/Dockerfile.packaging-plugins-alma9 b/.github/docker/packaging/Dockerfile.packaging-plugins-alma9 index 18db17cdcb..a3086c8181 100644 --- a/.github/docker/packaging/Dockerfile.packaging-plugins-alma9 +++ b/.github/docker/packaging/Dockerfile.packaging-plugins-alma9 @@ -17,7 +17,7 @@ cpanm App::FatPacker cpanm File::Copy::Recursive # For cpan libs -dnf install -y libcurl-devel libssh-devel expat-devel libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny +dnf install -y cpio libcurl-devel libssh-devel expat-devel libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny cpanm Module::Build::Tiny cpanm Module::Install # Install fpm (ruby 3 is required) diff --git a/.github/docker/packaging/Dockerfile.packaging-plugins-bookworm b/.github/docker/packaging/Dockerfile.packaging-plugins-bookworm index 9b7f90b073..ec18679707 100644 --- a/.github/docker/packaging/Dockerfile.packaging-plugins-bookworm +++ b/.github/docker/packaging/Dockerfile.packaging-plugins-bookworm @@ -55,6 +55,8 @@ apt-get install -y \ cpanm Module::Build::Tiny cpanm Module::Install +cpanm Crypt::OpenSSL::Guess + gem install fpm echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list @@ -64,3 +66,7 @@ apt-get install -y nfpm=2.41.0 apt-get clean EOF + +COPY .github/patch/fpm-deb.rb.diff /tmp/fpm-deb.rb.diff +# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released (https://github.com/jordansissel/fpm/pull/1947). +RUN patch -i /tmp/fpm-deb.rb.diff $(find / -type f -name "deb.rb") diff --git a/.github/docker/packaging/Dockerfile.packaging-plugins-bullseye b/.github/docker/packaging/Dockerfile.packaging-plugins-bullseye index 1acb04043c..2d18a5e331 100644 --- a/.github/docker/packaging/Dockerfile.packaging-plugins-bullseye +++ b/.github/docker/packaging/Dockerfile.packaging-plugins-bullseye @@ -64,3 +64,7 @@ apt-get install -y nfpm=2.41.0 apt-get clean EOF + +COPY .github/patch/fpm-deb.rb.diff /tmp/fpm-deb.rb.diff +# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released (https://github.com/jordansissel/fpm/pull/1947). +RUN patch -i /tmp/fpm-deb.rb.diff $(find / -type f -name "deb.rb") diff --git a/.github/docker/packaging/Dockerfile.packaging-plugins-jammy b/.github/docker/packaging/Dockerfile.packaging-plugins-jammy index ddd4f993b8..8133e7c779 100644 --- a/.github/docker/packaging/Dockerfile.packaging-plugins-jammy +++ b/.github/docker/packaging/Dockerfile.packaging-plugins-jammy @@ -66,3 +66,7 @@ apt-get install -y nfpm=2.41.0 apt-get clean EOF + +COPY .github/patch/fpm-deb.rb.diff /tmp/fpm-deb.rb.diff +# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released (https://github.com/jordansissel/fpm/pull/1947). +RUN patch -i /tmp/fpm-deb.rb.diff $(find / -type f -name "deb.rb") diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 081dfb616a..5e9ab1f7ed 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -197,7 +197,10 @@ jobs: export SYBASE="/usr" - fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION ${{ matrix.name }} + temp_file=$(mktemp) + created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') + # Check rpm + rpm2cpio $created_package | cpio -t shell: bash - if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_distribs, matrix.distrib) && matrix.spec_file != '' }} @@ -445,12 +448,19 @@ jobs: if [ ! -z "${{ matrix.no-auto-depends }}" ]; then PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends" fi - fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} + + temp_file=$(mktemp) + created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') + # Check deb + dpkg-deb --contents $created_package shell: bash - if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} run: | - DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-infos.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }} + temp_file=$(mktemp) + created_package=$(DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-infos.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }} | tee "$temp_file" | grep "building package" | grep -oP "(?<=in '..\/).*.deb(?=')") + # Check deb + dpkg-deb --contents $created_package shell: bash - if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_distribs, matrix.distrib) }}