Skip to content

Commit

Permalink
switched back to building pnp4nagios using BuildRequires
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Schoeller committed Oct 22, 2024
1 parent dc4446a commit afb46cf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,56 +148,56 @@ jobs:
name: Thruk RPMs
path: ${{ steps.build.outputs.rpm_dir_path }}

# build-pnp4nagios:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Install dependencies
# run: sudo apt-get install -y rrdtool librrd-dev librrds-perl php-gd php-xml php-mbstring
#
# - name: build PNP4Nagios packages
# id: build
# uses: UCBoulder/oit-sepe-rpmbuild@master
# with:
# spec_file: "pnp4nagios.spec"
# additional_repos: '["epel-release"]'
#
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: PNP4Nagios RPMs
# path: ${{ steps.build.outputs.rpm_dir_path }}

fetch-pnp4nagios:
build-pnp4nagios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create x86_64 directory
run: mkdir -p x86_64

- name: Fetch PNP4Nagios RPM
run: curl -L -o x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm https://github.com/pnp4nagios/pnp4nagios/releases/download/v0.6.27-5/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm
- name: Install dependencies
run: sudo apt-get install -y rrdtool librrd-dev librrds-perl php-gd php-xml php-mbstring

- name: debugging
run: |
if [ ! -f x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm ]; then
echo "Failed to download the PNP4Nagios RPM"
exit 1
else
echo "PNP4Nagios RPM fetched successfully"
fi
- name: List files in the current directory
run: ls -la
- name: build PNP4Nagios packages
id: build
uses: UCBoulder/oit-sepe-rpmbuild@master
with:
spec_file: "pnp4nagios.spec"
additional_repos: '["epel-release"]'

- name: Upload PNP4Nagios RPM as artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PNP4Nagios RPMs
path: ./x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm
if-no-files-found: error # This ensures it fails if the file isn't found
path: ${{ steps.build.outputs.rpm_dir_path }}

# fetch-pnp4nagios:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Create x86_64 directory
# run: mkdir -p x86_64
#
# - name: Fetch PNP4Nagios RPM
# run: curl -L -o x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm https://github.com/pnp4nagios/pnp4nagios/releases/download/v0.6.27-5/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm
#
# - name: debugging
# run: |
# if [ ! -f x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm ]; then
# echo "Failed to download the PNP4Nagios RPM"
# exit 1
# else
# echo "PNP4Nagios RPM fetched successfully"
# fi

# - name: List files in the current directory
# run: ls -la
#
# - name: Upload PNP4Nagios RPM as artifact
# uses: actions/upload-artifact@v4
# with:
# name: PNP4Nagios RPMs
# path: ./x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm
# if-no-files-found: error # This ensures it fails if the file isn't found

publish-rpms:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand Down
2 changes: 1 addition & 1 deletion pnp4nagios.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ URL: https://github.com/pnp4nagios/pnp4nagios
Source0: https://github.com/pnp4nagios/pnp4nagios/archive/refs/tags/v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: autoconf, automake, libtool
BuildRequires: autoconf, automake, libtool, rrdtool
Requires: rrdtool-perl
Requires: perl(Time::HiRes)
Requires: httpd
Expand Down

0 comments on commit afb46cf

Please sign in to comment.