Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release openwsman deps #4778

Merged
merged 4 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
runs:
using: "composite"
steps:
- name: Remove previously delivered DEBs
run: rm -f ./*.deb
shell: bash

- name: Use cache DEB files
uses: actions/cache/restore@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/package-nfpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ runs:
using: composite

steps:
- name: Remove previously packaged DEBs and RPMs
run: |
rm -f ./*.deb
rm -f ./*.rpm
shell: bash

- name: Import gpg key
env:
RPM_GPG_SIGNING_KEY: ${{ inputs.rpm_gpg_key }}
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/rpm-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
runs:
using: "composite"
steps:
- name: Remove previously delivered RPMs
run: rm -f ./*.rpm
shell: bash

- name: Use cache RPM files
uses: actions/cache/restore@v3
with:
Expand Down Expand Up @@ -48,6 +52,7 @@ runs:
exit 1
fi

rm -rf noarch x86_64
mkdir noarch x86_64

for FILE in $FILES; do
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ jobs:
version: "0.53"
- name: "UUID"
use_dh_make_perl: "false"
build_distribs: "el8,el9"
version: "0.31"
- name: "ZMQ::Constants"
build_distribs: "el9,bullseye"
- name: "ZMQ::FFI"
Expand Down
130 changes: 107 additions & 23 deletions .github/workflows/perl-openwsman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -67,34 +71,35 @@ 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
run: |
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
Expand All @@ -103,28 +108,63 @@ 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
PERL_VENDORARCH="/usr/local/lib64/perl5/5.32"
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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
43 changes: 43 additions & 0 deletions dependencies/perl-openwsman/libwsman.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "libwsman1"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
release: "1${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"
description: |
Openwsman library for packages dependent on openwsman.
Commit: @COMMIT_HASH@
homepage: "http://www.openwsman.org/"
license: "BSD"

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}
24 changes: 11 additions & 13 deletions dependencies/perl-openwsman/perl-openwsman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,37 @@ 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 <contact@centreon.com>"
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"
homepage: "http://www.openwsman.org/"
license: "BSD"

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
Expand Down
Loading
Loading