Skip to content

Commit

Permalink
Release 20240808 (#5135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkippes authored Aug 8, 2024
2 parents ea9abfb + 792cefd commit 6a98509
Show file tree
Hide file tree
Showing 85 changed files with 5,390 additions and 2,042 deletions.
4 changes: 2 additions & 2 deletions .github/actions/package-nfpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ runs:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}

# Update if condition to true to get packages as artifacts
- if: ${{ false }}
# Add to your PR the label upload-artifacts to get packages as artifacts
- if: ${{ contains(github.event.pull_request.labels.*.name, 'upload-artifacts') }}
name: Upload package artifacts
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
Expand Down
32 changes: 32 additions & 0 deletions .github/patch/fpm-deb.rb.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- deb-save.rb 2024-07-12 16:04:30.785256976 +0000
+++ deb.rb 2024-07-12 16:21:22.035244607 +0000
@@ -709,10 +709,19 @@
end.flatten

if origin == FPM::Package::CPAN
+
+ # By default, we'd prefer to name Debian-targeted Perl packages using the
+ # same naming scheme that Debian itself uses, which is usually something
+ # like "lib<module-name-hyphenated>-perl", such as libregexp-common-perl
+ #
+ logger.info("Changing package name to match Debian's typical libmodule-name-perl style")
+ self.name = "lib#{self.name.sub(/^perl-/, "")}-perl"
+
# The fpm cpan code presents dependencies and provides fields as perl(ModuleName)
# so we'll need to convert them to something debian supports.

- # Replace perl(ModuleName) > 1.0 with Debian-style perl-ModuleName (> 1.0)
+ # Replace perl(Module::Name) > 1.0 with Debian-style libmodule-name-perl (> 1.0)
+ # per: https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html
perldepfix = lambda do |dep|
m = dep.match(/perl\((?<name>[A-Za-z0-9_:]+)\)\s*(?<op>.*$)/)
if m.nil?
@@ -723,7 +732,7 @@
modulename = m["name"].gsub("::", "-")

# Fix any upper-casing or other naming concerns Debian has about packages
- name = "#{attributes[:cpan_package_name_prefix]}-#{modulename}"
+ name = "lib#{modulename}-perl"

if m["op"].empty?
name
17 changes: 14 additions & 3 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,12 @@ jobs:
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64]
name:
[
"ARGV::Struct",
"Authen::SCRAM::Client",
"Config::AWS",
"Convert::EBCDIC",
"Crypt::Blowfish_PP",
"DataStruct::Flat",
"DateTime::Format::Duration::ISO8601",
"Device::Modbus",
"Digest::SHA1",
Expand Down Expand Up @@ -371,6 +374,10 @@ jobs:
image: packaging-plugins-bullseye-arm64
arch: arm64
runner_name: ["self-hosted", "collect-arm64"]
- name: "Paws"
use_dh_make_perl: "false"
deb_dependencies: "libmoose-perl libmoosex-classattribute-perl libjson-maybexs-perl liburl-encode-perl libargv-struct-perl libmoo-perl libtype-tiny-perl libdatastruct-flat-perl libmodule-find-perl libthrowable-perl liburi-template-perl libnet-amazon-signature-v4-perl"
no-auto-depends: true
- name: "Statistics::Regression"
build_distribs: "bullseye"
version: "0.53"
Expand Down Expand Up @@ -416,8 +423,6 @@ jobs:
run: |
apt-get install -y ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev
PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'`
if [ -z "${{ matrix.deb_dependencies }}" ]; then
PACKAGE_DEPENDENCIES=""
else
Expand All @@ -426,11 +431,17 @@ jobs:
done
fi
if [ ! -z "${{ matrix.no-auto-depends }}" ]; then
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
cpanm Module::Build::Tiny
cpanm Module::Install
gem install fpm
fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released.
patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb")
fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,9 @@ jobs:
strategy:
fail-fast: false
matrix:
distrib: [el8, el9, jammy, bullseye, bookworm]
image: [testing-plugins-alma8, testing-plugins-alma9, testing-plugins-jammy, testing-plugins-bullseye, testing-plugins-bookworm]
include:
- runner_name: ubuntu-22.04
- package_extension: rpm
image: testing-plugins-alma8
distrib: el8
Expand All @@ -265,8 +266,13 @@ jobs:
- package_extension: deb
image: testing-plugins-jammy
distrib: jammy
- package_extension: deb
image: testing-plugins-bullseye-arm64
distrib: bullseye
arch: arm64
runner_name: ["self-hosted", "collect-arm64"]

runs-on: ubuntu-22.04
runs-on: ${{ matrix.runner_name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
credentials:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
log.html
output.xml
report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dependencies": [
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_hpe_primera_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"storage/hp/primera/restapi/"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dependencies": [
]
}
1 change: 1 addition & 0 deletions packaging/centreon-plugin-Network-Aruba-Cppm-Snmp/pkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"snmp_standard/mode/cpu.pm",
"snmp_standard/mode/swap.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/interfaces.pm",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/automation/ansible/tower/plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub new {
'schedules' => 'apps::automation::ansible::tower::mode::schedules'
};

$self->{custom_modes}->{api} = 'apps::automation::ansible::tower::custom::api';
$self->{custom_modes}->{api} = 'apps::automation::ansible::tower::custom::api';
$self->{custom_modes}->{towercli} = 'apps::automation::ansible::tower::custom::towercli';

return $self;
Expand Down
Loading

0 comments on commit 6a98509

Please sign in to comment.