-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from hubblestack/develop
Merge to master (prep v2.1.1 release)
- Loading branch information
Showing
14 changed files
with
275 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.1.0' | ||
__version__ = '2.1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,42 @@ | ||
#!/bin/bash | ||
|
||
_user=`id -u` | ||
|
||
# Installing minimum of python 2.7 | ||
_python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'` | ||
|
||
read -r -d "" _PYTHON_HELP <<EOF | ||
You are running an older version python ... \n \n | ||
Please run the following commands to setup python27 \n \n | ||
sudo yum update \n | ||
sudo yum install centos-release-scl \n | ||
sudo yum install python27 \n | ||
scl enable python27 bash \n | ||
EOF | ||
# Check if the current user is root | ||
if [ "$_user" == "0" ] | ||
then | ||
echo "This script should not be run as root ..." | ||
echo "Please run this script as regular user with sudo privileges ..." | ||
echo "Exiting ..." | ||
exit | ||
fi | ||
|
||
# Check if the python version is 2.6.6 | ||
if [ "$_python_version" == "2.6.6" ] | ||
then | ||
echo -e $_PYTHON_HELP | ||
sudo yum update -y | ||
sudo yum install centos-release-scl -y | ||
sudo yum install python27 -y | ||
cd scripts/ | ||
sudo scl enable python27 'bash installessentials.sh' | ||
sudo scl enable python27 "bash pyinstaller-hubble.sh pkg_clean $1" | ||
sudo scl enable python27 'bash libgit2-build.sh' | ||
bash osquery-build.sh | ||
sudo scl enable python27 'bash pip-install.sh' | ||
sudo scl enable python27 'bash pyinstaller-hubble.sh pkg_init' | ||
sudo scl enable python27 'bash pyinstaller-hubble.sh pkg_create' | ||
exit | ||
fi | ||
|
||
|
||
# Normal install for python 2.7 | ||
cd scripts/ | ||
sudo bash installessentials.sh | ||
sudo bash pyinstaller-hubble.sh pkg_clean $1 | ||
sudo bash libgit2-build.sh | ||
bash osquery-build.sh | ||
sudo bash pip-install.sh | ||
sudo bash pyinstaller-hubble.sh pkg_clean | ||
sudo bash pyinstaller-hubble.sh pkg_init | ||
sudo bash pyinstaller-hubble.sh pkg_create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
set -x # echo on | ||
|
||
_user=`id -u` | ||
|
||
# Check if the current user is root | ||
if [ "$_user" == "0" ] | ||
then | ||
echo "This script should not be run as root ..." | ||
echo "Please run this script as regular user with sudo privileges ..." | ||
echo "Exiting ..." | ||
exit | ||
fi | ||
|
||
cd .. | ||
|
||
bash init_pkg.sh -y | ||
cp hubble.tar.gz ~/hubble.tar.gz | ||
rm -rf ~/hubblestack-2.1.1 | ||
rm -rf ~/hubblestack-2.1.1.tar.gz | ||
mkdir ~/hubblestack-2.1.1 | ||
tar -xzvf ~/hubble.tar.gz -C ~/hubblestack-2.1.1 | ||
mkdir -p ~/hubblestack-2.1.1/etc/init.d | ||
cp pkg/hubble ~/hubblestack-2.1.1/etc/init.d | ||
mkdir -p ~/hubblestack-2.1.1/usr/lib/systemd/system | ||
cp pkg/hubble.service ~/hubblestack-2.1.1/usr/lib/systemd/system | ||
cp -f conf/hubble ~/hubblestack-2.1.1/etc/hubble/hubble | ||
cd ~ | ||
tar -czvf hubblestack-2.1.1.tar.gz hubblestack-2.1.1/ | ||
rm -rf ~/rpmbuild | ||
mkdir -p ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp} | ||
|
||
cat <<EOF >~/.rpmmacros | ||
%_topdir %(echo $HOME)/rpmbuild | ||
%_tmppath %{_topdir}/tmp | ||
EOF | ||
|
||
cp ~/hubblestack-2.1.1.tar.gz ~/rpmbuild/SOURCES/ | ||
cd ~/rpmbuild | ||
|
||
cp ~/hubble/pkg/specs/* SPECS/ | ||
|
||
rpmbuild -ba SPECS/hubblestack-el6.spec | ||
rm -rf ~/el6 | ||
mkdir ~/el6 | ||
cp ~/rpmbuild/RPMS/x86_64/* ~/el6/ | ||
rpmbuild -ba SPECS/hubblestack-el7.spec | ||
rm -rf ~/el7 | ||
mkdir ~/el7 | ||
cp ~/rpmbuild/RPMS/x86_64/* ~/el7/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Don't try fancy stuff like debuginfo, which is useless on binary-only | ||
# packages. Don't strip binary too | ||
# Be sure buildpolicy set to do nothing | ||
%define __spec_install_post %{nil} | ||
%define debug_package %{nil} | ||
%define __os_install_post %{_dbpath}/brp-compress | ||
# Don't fail out because we're not packaging the other distro's service files | ||
%define _unpackaged_files_terminate_build 0 | ||
|
||
Summary: Hubblestack is a module, open-source security compliance framework | ||
Name: hubblestack | ||
Version: 2.1.1 | ||
Release: 1 | ||
License: Apache 2.0 | ||
Group: Development/Tools | ||
SOURCE0: %{name}-%{version}.tar.gz | ||
URL: https://hubblestack.io | ||
Autoreq: 0 | ||
Requires: git | ||
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -q | ||
|
||
%build | ||
# Empty section. | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot} | ||
mkdir -p %{buildroot}/usr/bin | ||
ln -s /opt/hubble/hubble %{buildroot}/usr/bin/hubble | ||
ln -s /opt/osquery/osqueryi %{buildroot}/usr/bin/osqueryi | ||
ln -s /opt/osquery/osqueryd %{buildroot}/usr/bin/osqueryd | ||
|
||
# in builddir | ||
cp -a * %{buildroot} | ||
|
||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
|
||
%files | ||
%{_sysconfdir}/hubble | ||
%{_sysconfdir}/osquery | ||
%{_sysconfdir}/init.d/hubble | ||
/opt/* | ||
/usr/bin/* | ||
|
||
%changelog | ||
* Wed Feb 8 2017 Colton Myers <[email protected]> 2.1.0-1 | ||
- First Build | ||
|
||
* Mon Feb 13 2017 Colton Myers <[email protected]> 2.1.1-1 | ||
- Remove autoreq, add unit files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Don't try fancy stuff like debuginfo, which is useless on binary-only | ||
# packages. Don't strip binary too | ||
# Be sure buildpolicy set to do nothing | ||
%define __spec_install_post %{nil} | ||
%define debug_package %{nil} | ||
%define __os_install_post %{_dbpath}/brp-compress | ||
# Don't fail out because we're not packaging the other distro's service files | ||
%define _unpackaged_files_terminate_build 0 | ||
|
||
Summary: Hubblestack is a module, open-source security compliance framework | ||
Name: hubblestack | ||
Version: 2.1.1 | ||
Release: 1 | ||
License: Apache 2.0 | ||
Group: Development/Tools | ||
SOURCE0: %{name}-%{version}.tar.gz | ||
URL: https://hubblestack.io | ||
Autoreq: 0 | ||
Requires: git | ||
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -q | ||
|
||
%build | ||
# Empty section. | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot} | ||
mkdir -p %{buildroot}/usr/bin | ||
ln -s /opt/hubble/hubble %{buildroot}/usr/bin/hubble | ||
ln -s /opt/osquery/osqueryi %{buildroot}/usr/bin/osqueryi | ||
ln -s /opt/osquery/osqueryd %{buildroot}/usr/bin/osqueryd | ||
|
||
# in builddir | ||
cp -a * %{buildroot} | ||
|
||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
|
||
%files | ||
%{_sysconfdir}/hubble | ||
%{_sysconfdir}/osquery | ||
/opt/* | ||
/usr/bin/* | ||
/usr/lib/* | ||
|
||
%changelog | ||
* Wed Feb 8 2017 Colton Myers <[email protected]> 2.1.0-1 | ||
- First Build | ||
|
||
* Mon Feb 13 2017 Colton Myers <[email protected]> 2.1.1-1 | ||
- Remove autoreq, add unit files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.