11830 adding package preparation for rpm gotty

This commit is contained in:
Rafael 2023-09-18 18:10:43 +02:00
parent 6ecd8ca899
commit 4302cbce58
10 changed files with 77 additions and 0 deletions

1
extras/pandora_gotty/.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
src/pandora_gotty filter=lfs diff=lfs merge=lfs -text

1
extras/pandora_gotty/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.rpm

View File

@ -0,0 +1,8 @@
FROM rockylinux:8
RUN dnf install -y rpm-build rpmdevtools
RUN rpmdev-setuptree
RUN mkdir /root/pandora_gotty
WORKDIR /root/pandora_gotty
#CMD bash build.sh

12
extras/pandora_gotty/build.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
VERSION=$(grep '%define version' pandora_gotty.spec | awk '{print $3}')
mkdir -p pandora_gotty-${VERSION}
cp src/* pandora_gotty-${VERSION}/
tar -cvzf pandora_gotty-${VERSION}.tar.gz pandora_gotty-${VERSION}/*
mv pandora_gotty-${VERSION}.tar.gz ${HOME}/rpmbuild/SOURCES/
rm -rf ${HOME}/rpmbuild/RPMS/x86_64/pandora_gotty*
rpmbuild -ba pandora_gotty.spec
rm -rf pandora_gotty-${VERSION}
mv ${HOME}/rpmbuild/RPMS/x86_64/pandora_gotty* .

View File

@ -0,0 +1,2 @@
docker build -t pandora_gotty_builder .
docker run --rm -it -v `pwd`:/root/pandora_gotty pandora_gotty_builder /root/pandora_gotty/build.sh

View File

@ -0,0 +1,41 @@
%define name pandora_gotty
%define version 1.0
%define release 1%{?dist}
Summary: pandora_gptty for Pandora FMS
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Vendor: PandoraFMS
Source0: %{name}-%{version}.tar.gz
URL: https://pandorafms.com
Group: System/Monitoring
Packager: PandoraFMS
BuildArch: x86_64
Provides: %{name}-%{version}
%description
pandora_gotty for Pandora FMS.
%prep
%setup -q
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p %{buildroot}/etc/pandora_gotty/
cp %{name} $RPM_BUILD_ROOT/%{_bindir}
cp pandora_gotty_ssh.conf %{buildroot}/etc/pandora_gotty/
cp pandora_gotty_telnet.conf %{buildroot}/etc/pandora_gotty/
%clean
rm -Rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%config(noreplace) /etc/pandora_gotty/pandora_gotty_ssh.conf
%config(noreplace) /etc/pandora_gotty/pandora_gotty_telnet.conf
%{_bindir}/%{name}
%changelog
* Mon Sep 18 2023 PandoraFMS - 1.0-1
- Initial RPM release

1
extras/pandora_gotty/src/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*rpm

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3758eddb64db79c6ea1dac4cb200ee8ec86ef3f51723dad5be4365a1315b952b
size 13642854

View File

@ -0,0 +1,4 @@
#to be fill
lkdslkds
sdjkfhasjdf
kdsjfslkjdhfa

View File

@ -0,0 +1,4 @@
#to be fill
dlksdlkfjs
sldjfslkjdf
kjdfhksjhdkjlfsh