diff --git a/.github/workflows/perl-openwsman.yml b/.github/workflows/perl-openwsman.yml index 9ca2b1e5d..a3c479916 100644 --- a/.github/workflows/perl-openwsman.yml +++ b/.github/workflows/perl-openwsman.yml @@ -32,21 +32,25 @@ jobs: package_extension: rpm runner: ubuntu-22.04 arch: amd64 + version: 2.7.2 - image: packaging-plugins-alma9 distrib: el9 package_extension: rpm runner: ubuntu-22.04 arch: amd64 + version: 2.7.2 - image: packaging-plugins-bullseye distrib: bullseye package_extension: deb runner: ubuntu-22.04 arch: amd64 + version: 2.7.2 - image: packaging-plugins-bullseye-arm64 distrib: bullseye package_extension: deb runner: ["self-hosted", "collect-arm64"] arch: arm64 + version: 2.7.2 runs-on: ${{ matrix.runner }} @@ -67,17 +71,22 @@ jobs: if [ "${{ matrix.distrib }}" = "bullseye" ]; then apt-get update apt-get install -y libcurl4-openssl-dev + cd /tmp + wget -O - https://github.com/kkaempf/sblim-sfcc/archive/refs/tags/SFCC_2_2_8.tar.gz|tar zxvf - + cd sblim-sfcc-SFCC_2_2_8 + ./autoconfiscate.sh + ./configure --prefix=/usr + make + make install else - dnf install -y wget automake libtool libcurl-devel gcc-c++ + dnf install -y 'dnf-command(config-manager)' + if [ "${{ matrix.distrib }}" = "el8" ]; then + dnf config-manager --set-enabled powertools + else + dnf config-manager --set-enabled crb + fi + dnf install -y sblim-sfcc-devel fi - - cd /tmp - wget -O - https://github.com/kkaempf/sblim-sfcc/archive/refs/tags/SFCC_2_2_8.tar.gz|tar zxvf - - cd sblim-sfcc-SFCC_2_2_8 - ./autoconfiscate.sh - ./configure --prefix=/usr - make - make install shell: bash - name: Build openwsman @@ -85,16 +94,12 @@ jobs: if [ "${{ matrix.distrib }}" = "bullseye" ]; then apt-get install -y cmake libssl-dev libpam-dev swig libxml2-dev else - if [ "${{ matrix.distrib }}" = "el9" ]; then - dnf install -y 'dnf-command(config-manager)' - dnf config-manager --set-enabled crb - fi - dnf install -y cmake pam-devel swig libxml2-devel openssl-devel + dnf install -y wget cmake gcc-c++ libcurl-devel pam-devel swig libxml2-devel openssl-devel fi cd /tmp - wget -O - https://github.com/Openwsman/openwsman/archive/refs/tags/v2.7.2.tar.gz|tar zxvf - - cd openwsman-2.7.2/ + wget -O - https://github.com/Openwsman/openwsman/archive/refs/tags/v${{ matrix.version }}.tar.gz|tar zxvf - + cd openwsman-${{ matrix.version }}/ mkdir build cd build cmake .. -DBUILD_PYTHON=No -DBUILD_PYTHON3=No -DBUILD_JAVA=No -DBUILD_RUBY=No -DBUILD_PERL=Yes @@ -103,14 +108,16 @@ jobs: - name: Set package name and paths according to distrib run: | if [ "${{ matrix.distrib }}" = "bullseye" ]; then - NAME="libopenwsman-perl" + NAME_PERL="libopenwsman-perl" + USRLIB="/usr/lib/" if [ "${{ matrix.arch }}" = "amd64" ]; then PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32" else PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl5/5.32" fi else - NAME="openwsman-perl" + NAME_PERL="openwsman-perl" + USRLIB="/usr/lib64/" if [ "${{ matrix.distrib }}" = "el8" ]; then PERL_VENDORARCH="/usr/local/lib64/perl5" else @@ -118,13 +125,46 @@ jobs: fi fi - sed -i "s/@NAME@/$NAME/g" dependencies/perl-openwsman/perl-openwsman.yaml + sed -i "s/@VERSION@/${{ matrix.version }}/g" dependencies/perl-openwsman/libwsman.yaml + sed -i "s#@USRLIB@#$USRLIB#g" dependencies/perl-openwsman/libwsman.yaml + + sed -i "s/@NAME@/$NAME_PERL/g" dependencies/perl-openwsman/perl-openwsman.yaml + sed -i "s/@VERSION@/${{ matrix.version }}/g" dependencies/perl-openwsman/perl-openwsman.yaml sed -i "s#@PERL_VENDORARCH@#$PERL_VENDORARCH#g" dependencies/perl-openwsman/perl-openwsman.yaml + cat dependencies/perl-openwsman/sblim-sfcc.yaml + cat dependencies/perl-openwsman/libwsman.yaml cat dependencies/perl-openwsman/perl-openwsman.yaml shell: bash - - name: Package + - name: Package sblim-sfcc + if: ${{ matrix.distrib == 'bullseye' }} + uses: ./.github/actions/package-nfpm + with: + nfpm_file_pattern: "dependencies/perl-openwsman/sblim-sfcc.yaml" + distrib: ${{ matrix.distrib }} + package_extension: ${{ matrix.package_extension }} + arch: ${{ matrix.arch }} + commit_hash: ${{ github.sha }} + cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} + 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 }} + + - name: Package libwsman + uses: ./.github/actions/package-nfpm + with: + nfpm_file_pattern: "dependencies/perl-openwsman/libwsman.yaml" + distrib: ${{ matrix.distrib }} + package_extension: ${{ matrix.package_extension }} + arch: ${{ matrix.arch }} + commit_hash: ${{ github.sha }} + cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} + 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 }} + + - name: Package perl-openwsman uses: ./.github/actions/package-nfpm with: nfpm_file_pattern: "dependencies/perl-openwsman/perl-openwsman.yaml" @@ -161,7 +201,16 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - - name: Delivery + - name: Delivery libwsman + uses: ./.github/actions/rpm-delivery + with: + module_name: libwsman-amd64 + distrib: ${{ matrix.distrib }} + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + cache_key: cache-${{ github.sha }}-rpm-libwsman-${{ matrix.distrib }}-amd64-${{ github.head_ref || github.ref_name }} + stability: ${{ needs.get-environment.outputs.stability }} + + - name: Delivery perl-openwsman uses: ./.github/actions/rpm-delivery with: module_name: perl-openwsman-amd64 @@ -189,7 +238,25 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - - name: Delivery + - name: Delivery sblim-sfcc + uses: ./.github/actions/deb-delivery + with: + module_name: sblim-sfcc-${{ matrix.arch }} + distrib: ${{ matrix.distrib }} + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + cache_key: cache-${{ github.sha }}-deb-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} + stability: ${{ needs.get-environment.outputs.stability }} + + - name: Delivery libwsman + uses: ./.github/actions/deb-delivery + with: + module_name: libwsman-${{ matrix.arch }} + distrib: ${{ matrix.distrib }} + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + cache_key: cache-${{ github.sha }}-deb-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} + stability: ${{ needs.get-environment.outputs.stability }} + + - name: Delivery perl-openwsman uses: ./.github/actions/deb-delivery with: module_name: perl-openwsman-${{ matrix.arch }} @@ -218,7 +285,24 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - - name: Promote ${{ matrix.distrib }} ${{ matrix.arch }} to stable + - name: Promote sblim-sfcc ${{ matrix.distrib }} ${{ matrix.arch }} to stable + if: ${{ matrix.distrib == 'bullseye' }} + uses: ./.github/actions/promote-to-stable + with: + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + module: sblim-sfcc-${{ matrix.arch }} + distrib: ${{ matrix.distrib }} + stability: ${{ needs.get-environment.outputs.stability }} + + - name: Promote libwsman ${{ matrix.distrib }} ${{ matrix.arch }} to stable + uses: ./.github/actions/promote-to-stable + with: + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + module: libwsman-${{ matrix.arch }} + distrib: ${{ matrix.distrib }} + stability: ${{ needs.get-environment.outputs.stability }} + + - name: Promote perl-openwsman ${{ matrix.distrib }} ${{ matrix.arch }} to stable uses: ./.github/actions/promote-to-stable with: artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} diff --git a/dependencies/perl-openwsman/libwsman.yaml b/dependencies/perl-openwsman/libwsman.yaml new file mode 100644 index 000000000..a09dffe48 --- /dev/null +++ b/dependencies/perl-openwsman/libwsman.yaml @@ -0,0 +1,44 @@ +name: "libwsman1" +arch: "${ARCH}" +platform: "linux" +version_schema: "none" +version: "@VERSION@" +release: "1${DIST}" +section: "default" +priority: "optional" +maintainer: "Centreon " +description: | + Openwsman library for packages dependent on openwsman. + Commit: @COMMIT_HASH@ +vendor: "Centreon" +homepage: "https://www.centreon.com" +license: "Apache-2.0" + +contents: + - src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman.so.*" + dst: "@USRLIB@" + file_info: + mode: 0644 + - src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman_client.so.*" + dst: "@USRLIB@" + file_info: + mode: 0644 + - src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman_curl_client_transport.so.*" + dst: "@USRLIB@" + file_info: + mode: 0644 + +overrides: + rpm: + depends: + - sblim-sfcc + deb: + depends: + - sblim-sfcc + +rpm: + summary: Open source Implementation of WS-Management + compression: zstd + signature: + key_file: ${RPM_SIGNING_KEY_FILE} + key_id: ${RPM_SIGNING_KEY_ID} diff --git a/dependencies/perl-openwsman/perl-openwsman.yaml b/dependencies/perl-openwsman/perl-openwsman.yaml index 770411f81..3dec5b066 100644 --- a/dependencies/perl-openwsman/perl-openwsman.yaml +++ b/dependencies/perl-openwsman/perl-openwsman.yaml @@ -2,39 +2,38 @@ name: "@NAME@" arch: "${ARCH}" platform: "linux" version_schema: "none" -version: "2.7.2" -release: "2${DIST}" +version: "@VERSION@" +release: "3${DIST}" section: "default" priority: "optional" maintainer: "Centreon " description: | - Openwsman is an open source implementation of WS-Management; enabling the in-band management of Linux/uni*/Windows platforms. - Openwsman supports the generic WS-Management protocol as well as specific protocol extensions for the Common Information Model (CIM) - Web Services for Management (WS-Management, WS-MAN) is a specification for managing computer systems using Web services standards. - WS-Management is a SOAP based transport protocol for managing (create, enumerate, access, change, destroy) resources. + This package provides Perl bindings to access the OpenWSMAN client API. Commit: @COMMIT_HASH@ vendor: "Centreon" homepage: "https://www.centreon.com" license: "Apache-2.0" contents: - - src: "/tmp/openwsman-2.7.2/build/bindings/perl/openwsman.so" + - src: "/tmp/openwsman-@VERSION@/build/bindings/perl/openwsman.so" dst: "@PERL_VENDORARCH@/" file_info: mode: 0644 - - src: "/tmp/openwsman-2.7.2/build/bindings/perl/openwsman.pm" + - src: "/tmp/openwsman-@VERSION@/build/bindings/perl/openwsman.pm" dst: "@PERL_VENDORARCH@/" file_info: mode: 0644 overrides: rpm: + depends: + - libwsman1 provides: - perl(openwsman) deb: - provides: - - libopenwsman-perl + depends: + - libwsman1 rpm: summary: Perl interface for openwsman diff --git a/dependencies/perl-openwsman/sblim-sfcc.yaml b/dependencies/perl-openwsman/sblim-sfcc.yaml new file mode 100644 index 000000000..88f6374db --- /dev/null +++ b/dependencies/perl-openwsman/sblim-sfcc.yaml @@ -0,0 +1,37 @@ +name: "sblim-sfcc" +arch: "${ARCH}" +platform: "linux" +version_schema: "none" +version: "2.7.2" +release: "1${DIST}" +section: "default" +priority: "optional" +maintainer: "Centreon " +description: | + Small Footprint CIM Client Library Runtime Libraries + Commit: @COMMIT_HASH@ +vendor: "Centreon" +homepage: "https://www.centreon.com" +license: "Apache-2.0" + +contents: + - src: "/tmp/sblim-sfcc-SFCC_2_2_8/.libs/lib*.so*" + dst: "/usr/lib/" + file_info: + mode: 0644 + +overrides: + deb: + conflicts: + - libsblim-sfcc + replaces: + - libsblim-sfcc + provides: + - libsblim-sfcc + +rpm: + summary: Small Footprint CIM Client Library + compression: zstd + signature: + key_file: ${RPM_SIGNING_KEY_FILE} + key_id: ${RPM_SIGNING_KEY_ID}