mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
fix(packaging): handle specific case of libssh-session packaging name (#5505)
This commit is contained in:
parent
c69ef4f5c5
commit
5da5683f94
19
.github/workflows/perl-cpan-libraries.yml
vendored
19
.github/workflows/perl-cpan-libraries.yml
vendored
@ -497,7 +497,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "package_version=$(echo $PACKAGE_VERSION)" >> $GITHUB_OUTPUT
|
echo "package_version=$(echo $PACKAGE_VERSION)" >> $GITHUB_OUTPUT
|
||||||
CPAN_PACKAGE_NAME=$(echo $cpan_info | sed 's/.*\///g' | sed 's/-[0-9\.]*\.tar\.gz//g' | tr '[:upper:]' '[:lower:]')
|
CPAN_PACKAGE_NAME=$(echo $cpan_info | sed 's/.*\///g' | sed 's/-[0-9\.]*\.tar\.gz//g' | tr '[:upper:]' '[:lower:]')
|
||||||
PACKAGE_NAME="lib$CPAN_PACKAGE_NAME-perl"
|
|
||||||
|
# Handle specific cases of libssh-session
|
||||||
|
if [[ "$CPAN_PACKAGE_NAME" == "lib"* ]];then
|
||||||
|
PACKAGE_NAME="$CPAN_PACKAGE_NAME-perl"
|
||||||
|
else
|
||||||
|
PACKAGE_NAME="lib$CPAN_PACKAGE_NAME-perl"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "package_name=$(echo $PACKAGE_NAME)" >> $GITHUB_OUTPUT
|
echo "package_name=$(echo $PACKAGE_NAME)" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
@ -550,12 +557,20 @@ jobs:
|
|||||||
|
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
echo "default.local" | tee /etc/mailname
|
echo "default.local" | tee /etc/mailname
|
||||||
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
|
|
||||||
|
# Handle specific case for libssh-session
|
||||||
|
if [[ "${{ matrix.name }}" == "Libssh::Session" ]]; then
|
||||||
|
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES -v ${{ steps.package-infos.outputs.package_version }} --name ssh-session ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
|
||||||
|
else
|
||||||
|
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
# Check package name
|
# Check package name
|
||||||
if [ -z "$created_package" ]; then
|
if [ -z "$created_package" ]; then
|
||||||
echo "Error: fpm command failed"
|
echo "Error: fpm command failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check deb
|
# Check deb
|
||||||
dpkg-deb --contents $created_package || { echo "Error: dpkg-deb failed for package $created_package"; exit 1; }
|
dpkg-deb --contents $created_package || { echo "Error: dpkg-deb failed for package $created_package"; exit 1; }
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user