diff --git a/extras/pandora_gotty/.gitattributes b/extras/pandora_gotty/.gitattributes new file mode 100644 index 0000000000..ca0a55fe2e --- /dev/null +++ b/extras/pandora_gotty/.gitattributes @@ -0,0 +1 @@ +src/pandora_gotty filter=lfs diff=lfs merge=lfs -text diff --git a/extras/pandora_gotty/.gitignore b/extras/pandora_gotty/.gitignore new file mode 100644 index 0000000000..8d5bedc36a --- /dev/null +++ b/extras/pandora_gotty/.gitignore @@ -0,0 +1 @@ +*.rpm \ No newline at end of file diff --git a/extras/pandora_gotty/Dockerfile b/extras/pandora_gotty/Dockerfile new file mode 100644 index 0000000000..f708a6f4a7 --- /dev/null +++ b/extras/pandora_gotty/Dockerfile @@ -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 diff --git a/extras/pandora_gotty/build.sh b/extras/pandora_gotty/build.sh new file mode 100755 index 0000000000..e3be2587ca --- /dev/null +++ b/extras/pandora_gotty/build.sh @@ -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* . + diff --git a/extras/pandora_gotty/build_docker.sh b/extras/pandora_gotty/build_docker.sh new file mode 100755 index 0000000000..cc2c81caa3 --- /dev/null +++ b/extras/pandora_gotty/build_docker.sh @@ -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 \ No newline at end of file diff --git a/extras/pandora_gotty/pandora_gotty.spec b/extras/pandora_gotty/pandora_gotty.spec new file mode 100644 index 0000000000..5b0bde5d8e --- /dev/null +++ b/extras/pandora_gotty/pandora_gotty.spec @@ -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 diff --git a/extras/pandora_gotty/src/.gitignore b/extras/pandora_gotty/src/.gitignore new file mode 100644 index 0000000000..423058ca29 --- /dev/null +++ b/extras/pandora_gotty/src/.gitignore @@ -0,0 +1 @@ +*rpm \ No newline at end of file diff --git a/extras/pandora_gotty/src/pandora_gotty b/extras/pandora_gotty/src/pandora_gotty new file mode 100755 index 0000000000..dc71d46eaf --- /dev/null +++ b/extras/pandora_gotty/src/pandora_gotty @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3758eddb64db79c6ea1dac4cb200ee8ec86ef3f51723dad5be4365a1315b952b +size 13642854 diff --git a/extras/pandora_gotty/src/pandora_gotty_ssh.conf b/extras/pandora_gotty/src/pandora_gotty_ssh.conf new file mode 100644 index 0000000000..b00ca51e4b --- /dev/null +++ b/extras/pandora_gotty/src/pandora_gotty_ssh.conf @@ -0,0 +1,4 @@ +#to be fill +lkdslkds +sdjkfhasjdf +kdsjfslkjdhfa \ No newline at end of file diff --git a/extras/pandora_gotty/src/pandora_gotty_telnet.conf b/extras/pandora_gotty/src/pandora_gotty_telnet.conf new file mode 100644 index 0000000000..9aac8c73d0 --- /dev/null +++ b/extras/pandora_gotty/src/pandora_gotty_telnet.conf @@ -0,0 +1,4 @@ +#to be fill +dlksdlkfjs +sldjfslkjdf +kjdfhksjhdkjlfsh \ No newline at end of file