Solaris
ThreatLockDown provides an automated way of building Solaris 10 and 11 packages, keep in mind that to build these packages you must use the corresponding system.
To create an Solaris package follow these steps:
Requirements
Git
Download our wazuh-packages repository from GitHub and go to the solaris
directory.
$ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/solaris && git checkout v4.9.0
Choose the version of solaris you want to build the package for and go to that directory.
Run the generate_wazuh_packages.sh
script to build the package. Here you can see all the different parameters:
# ./generate_wazuh_packages.sh -h
Usage: ./generate_wazuh_packages.sh [OPTIONS]
-b, --branch <branch> Select Git branch or tag.
-e, --environment Install all the packages necessaries to build the pkg package.
-s, --store <pkg_directory> Directory to store the resulting pkg package. By default, an output folder will be created.
-p, --install-path <pkg_home> Installation path for the package. By default: /var.
-c, --checksum Compute the SHA512 checksum of the pkg package.
-h, --help Shows this help.
Below, you will find an example of how to build a Solaris package.
First install the needed dependencies:
# ./generate_wazuh_packages.sh -e
Download and build the sources:
# ./generate_wazuh_packages.sh -b v4.9.0
To build a SPARC package you just need to run the same script in a SPARC system.
We also provide an automated way of building packages for i386 Solaris systems using Vagrant. Follow the following steps to learn how to do it.
Requirements
Virtual Box
Vagrant
Bring the machine up vagrant [OPTION] ... up solaris10/solaris11/both
:
# vagrant -h up
-- CUSTOM USE OF VAGRANT FOR THIS MACHINE --
vagrant [OPTION] ... up X
To bring up a Solaris machine, X must be solaris10 or solaris11 or both.
vagrant [OPTION] ... ssh/provision/delete
Example:
vagrant --branch-tag=v4.9.0 --ram=1024 --cpus=4 up solaris10 solaris11
-h, --help:
Show help
--branch-tag x, -b x:
Generate package for branch/tag x
--ram x
Select the amount of ram assigned to the new machine.
--cpus x
Select the number of CPUs assigned to the new machine.
-- DEFAULT USE OF VAGRANT (FOR ALL MACHINES) --
Usage: vagrant [options] <command> [<args>]
-v, --version Print the version and exit.
-h, --help Print this help.
Clone our wazuh-packages repository from GitHub and switch to your target branch. Copy the source files for your Solaris 10 or Solaris 11 target system into wazuh-packages/solaris/package_generation/src
. Change to the wazuh-packages/solaris/package_generation
directory before building the package.
$ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/solaris && git checkout v4.9.0
$ cp solaris10 package_generation/src/
$ cd package_generation
$ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/solaris && git checkout v4.9.0
$ cp solaris11 package_generation/src/
$ cd package_generation
Below, you will find some examples of how to build a Solaris package using this tool.
# vagrant --branch-tag=v4.9.0 up solaris10_cmake
This will generate a 4.9.0 ThreatLockDown agent package for Solaris 10
# vagrant --branch-tag=v4.9.0 up solaris11_cmake
This will generate a 4.9.0 ThreatLockDown agent package for Solaris 11
# vagrant --branch-tag=v4.9.0 up solaris10_cmake solaris11_cmake
This will generate a 4.9.0 ThreatLockDown agent package for Solaris 10 and Solaris 11
After the process has ended the package will be stored in the src
folder.
To finish destroy the machines:
# vagrant destroy solaris10_cmake solaris11_cmake