From e43d8914aa83fa1c43d2ad04fc9e4329ded7afa3 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 16 Dec 2019 10:46:37 +0100 Subject: [PATCH] RPMBUILD console updated with gotty binary file --- extras/build_rpm.sh | 12 ++++++++++++ extras/build_rpm_redhat.sh | 12 ++++++++++++ extras/build_rpm_rhel7.sh | 16 ++++++++++++++-- pandora_console/pandora_console.redhat.spec | 4 ++++ pandora_console/pandora_console.rhel7.spec | 4 ++++ pandora_console/pandora_console.spec | 4 ++++ 6 files changed, 50 insertions(+), 2 deletions(-) diff --git a/extras/build_rpm.sh b/extras/build_rpm.sh index f523eeaa7d..054434de71 100755 --- a/extras/build_rpm.sh +++ b/extras/build_rpm.sh @@ -8,8 +8,20 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console +# Extra files to be added to rpm. +if [ "$X86_64" == "" ]; then + # Fake gotty. + echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty + chmod +x pandora_console/gotty +else + cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ +fi + rpmbuild -ba $CODEHOME/pandora_console/pandora_console.spec || exit 1 +# Cleanup. +rm -f pandora_console/gotty + # Server rpmbuild -ba $CODEHOME/pandora_server/pandora_server.spec || exit 1 diff --git a/extras/build_rpm_redhat.sh b/extras/build_rpm_redhat.sh index 7f45bc6773..001120ae4d 100755 --- a/extras/build_rpm_redhat.sh +++ b/extras/build_rpm_redhat.sh @@ -8,8 +8,20 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console +# Extra files to be added to rpm. +if [ "$X86_64" == "" ]; then + # Fake gotty. + echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty + chmod +x pandora_console/gotty +else + cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ +fi + rpmbuild -ba $CODEHOME/pandora_console/pandora_console.redhat.spec || exit 1 +# Cleanup. +rm -f pandora_console/gotty + # Server rpmbuild -ba $CODEHOME/pandora_server/pandora_server.redhat.spec || exit 1 diff --git a/extras/build_rpm_rhel7.sh b/extras/build_rpm_rhel7.sh index 3684bd42e5..9ddb0aedf7 100755 --- a/extras/build_rpm_rhel7.sh +++ b/extras/build_rpm_rhel7.sh @@ -8,13 +8,25 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console +# Extra files to be added to rpm. +if [ "$X86_64" == "" ]; then + # Fake gotty. + echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty + chmod +x pandora_console/gotty +else + cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ +fi + rpmbuild -ba $CODEHOME/pandora_console/pandora_console.rhel7.spec || exit 1 +# Cleanup. +rm -f pandora_console/gotty + # Server -#rpmbuild -ba $CODEHOME/pandora_server/pandora_server.rhel7.spec || exit 1 +rpmbuild -ba $CODEHOME/pandora_server/pandora_server.redhat.spec || exit 1 # Unix agent -#rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.rhel7.spec || exit 1 +rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec || exit 1 # Enterprise console rpmbuild -ba $PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.rhel7.spec || exit 1 diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 1d2c818edf..a9e4dc262a 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -57,6 +57,10 @@ install -m 0644 pandora_console_logrotate_centos $RPM_BUILD_ROOT%{_sysconfdir}/l rm -rf $RPM_BUILD_ROOT %post +# Install GoTTY binary file. +cp -pf %{prefix}/pandora_console/gotty /usr/bin/ +chmod +x /usr/bin/gotty + # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index d74a29fa16..f8aab6db42 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -57,6 +57,10 @@ install -m 0644 pandora_console_logrotate_centos $RPM_BUILD_ROOT%{_sysconfdir}/l rm -rf $RPM_BUILD_ROOT %post +# Install GoTTY binary file. +cp -pf %{prefix}/pandora_console/gotty /usr/bin/ +chmod +x /usr/bin/gotty + # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 96594c4f5b..8017b1f295 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -58,6 +58,10 @@ fi rm -rf $RPM_BUILD_ROOT %post +# Install GoTTY binary file. +cp -pf %{prefix}/pandora_console/gotty /usr/bin/ +chmod +x /usr/bin/gotty + # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine