diff --git a/source/development/packaging/generate-deb-package.rst b/source/development/packaging/generate-deb-package.rst deleted file mode 100644 index 8ce7e72719..0000000000 --- a/source/development/packaging/generate-deb-package.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. meta:: - :description: Wazuh provides an automated way of building DEB packages. Learn how to build your own Wazuh DEB packages in this section of our documentation. - -.. _create-deb: - -Debian -====== - -Wazuh provides an automated way of building DEB packages using docker so there is no need for any other dependency. - -To create an Debian package follow these steps: - -Requirements -^^^^^^^^^^^^ - - * Docker - * Git - -Download our wazuh-packages repository from GitHub and go to the debs directory. - -.. code-block:: console - - $ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/debs && git checkout v|WAZUH_CURRENT| - -Execute the ``generate_debian_package.sh`` script, with the different options you desire. This script will build a Docker image with all the necessary tools to create the DEB and run a container that will build it: - -.. code-block:: console - - # ./generate_debian_package.sh -h - -.. code-block:: none - :class: output - - Usage: ./generate_debian_package.sh [OPTIONS] - - -b, --branch [Required] Select Git branch. - --packages-branch [Required] Select Git branch or tag from wazuh-packages repository. - -t, --target [Required] Target package to build: manager or agent. - -a, --architecture [Optional] Target architecture of the package [amd64/i386/ppc64le/arm64/armhf]. - -j, --jobs [Optional] Change number of parallel jobs when compiling the manager or agent. By default: 2. - -r, --revision [Optional] Package revision. By default: 1. - -s, --store [Optional] Set the destination path of package. By default, an output folder will be created. - -p, --path [Optional] Installation path for the package. By default: /var/ossec. - -d, --debug [Optional] Build the binaries with debug symbols. By default: no. - -c, --checksum [Optional] Generate checksum on the desired path (by default, if no path is specified it will be generated on the same directory than the package). - --dont-build-docker [Optional] Locally built docker image will be used instead of generating a new one. - --sources [Optional] Absolute path containing Wazuh source code. This option will use local source code instead of downloading it from GitHub. - --dev [Optional] Use the SPECS files stored in the host instead of downloading them from GitHub. - --future [Optional] Build test future package x.30.0 Used for development purposes. - -h, --help Show this help. - -Below, you will find some examples of how to build a DEB package. - -.. code-block:: console - - # ./generate_debian_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -s /tmp -t manager -a amd64 -r my_rev. - -This will generate a |WAZUH_CURRENT| Wazuh manager package DEB with revision ``my_rev`` for ``amd64`` systems. - -.. code-block:: console - - # ./generate_debian_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -s /tmp -t api -a i386 -r my_rev - -This will generate a |WAZUH_CURRENT| Wazuh api package DEB with revision ``my_rev`` for ``i386`` systems and store it in ``/tmp``. - -.. code-block:: console - - # ./generate_debian_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -t agent -a amd64 -p /opt/ossec - -This will generate a |WAZUH_CURRENT| Wazuh agent DEB package with ``/opt/ossec`` as installation directory for ``amd64`` systems. diff --git a/source/development/packaging/generate-deb-rpm-package.rst b/source/development/packaging/generate-deb-rpm-package.rst new file mode 100644 index 0000000000..afcd4976d9 --- /dev/null +++ b/source/development/packaging/generate-deb-rpm-package.rst @@ -0,0 +1,94 @@ +.. Copyright (C) 2015, Wazuh, Inc. + +.. meta:: + :description: Wazuh provides an automated way of building DEB or RPM packages. Learn how to build your own Wazuh DEB or RPM packages in this section of our documentation. + +.. _create-deb-rpm: + +Debian or RPM +============= + +Wazuh provides an automated way of building DEB or RPM packages using docker so there is no need for any other dependency. + +To create an Debian or RPM package follow these steps: + +Requirements +^^^^^^^^^^^^ + + * Docker + * Git + +Download our wazuh repository from GitHub and go to the debs directory. + +.. code-block:: console + + $ git clone https://github.com/wazuh/wazuh && cd wazuh/packages && git checkout v|WAZUH_CURRENT| + +Execute the ``generate_package.sh`` script, with the different options you desire. This script will build a Docker image with all the necessary tools to create the DEB or RPM and run a container that will build it: + +.. code-block:: console + + # ./generate_package.sh -h + +.. code-block:: none + :class: output + + Usage: ./generate_package.sh [OPTIONS] + + -b, --branch [Optional] Select Git branch []. + -t, --target [Required] Target package to build: manager or agent. + -a, --architecture [Optional] Target architecture of the package [amd64/i386/ppc64le/arm64/armhf]. + -j, --jobs [Optional] Change number of parallel jobs when compiling the manager or agent. By default: 2. + -r, --revision [Optional] Package revision. By default: 0. + -s, --store [Optional] Set the destination path of package. By default, an output folder will be created. + -p, --path [Optional] Installation path for the package. By default: /var/ossec. + -d, --debug [Optional] Build the binaries with debug symbols. By default: False. + -c, --checksum [Optional] Generate checksum on the same directory than the package. + -l, --legacy [Optional only for RPM] Build package for CentOS 5. + --dont-build-docker [Optional] Locally built docker image will be used instead of generating a new one. + --tag [Optional] Tag to use with the docker image. + --sources [Optional] Absolute path containing wazuh source code. This option will use local source code instead of downloading it from GitHub. By default use the script path. + --is_stage [Optional] Use release name in package + --system [Optional] Select Package OS [rpm, deb]. By default is 'deb'. + --src [Optional] Generate the source package in the destination directory. + --future [Optional] Build test future package x.30.0 Used for development purposes. + -h, --help Show this help. + +Below, you will find some examples of how to build a DEB or RPM package. + + +.. tabs:: + .. group-tab:: DEB + + .. code-block:: console + + + # ./generate_package.sh -s /tmp -t manager -a amd64 -r my_rev --system deb + + This will generate a |WAZUH_CURRENT| Wazuh manager package DEB with revision ``my_rev`` for ``amd64`` systems. + + .. code-block:: console + + # ./generate_package.sh -t agent -a amd64 -p /opt/ossec --system deb + + This will generate a |WAZUH_CURRENT| Wazuh agent DEB package with ``/opt/ossec`` as installation directory for ``amd64`` systems. + + .. group-tab:: RPM + + .. note:: + Use the following architecture equivalences: + * amd64 -> x86_64 + * arm64 -> aarch64 + * armhf -> armv7hl + + .. code-block:: console + + # ./generate_package.sh -s /tmp -t manager -a amd64 -r my_rev --system rpm + + This will generate a |WAZUH_CURRENT| Wazuh manager RPM package with revision ``my_rev`` for ``x86_64`` systems. + + .. code-block:: console + + # ./generate_package.sh -t agent -a amd64 -p /opt/ossec --system rpm + + This will generate a |WAZUH_CURRENT| Wazuh agent RPM package with ``/opt/ossec`` as installation directory for ``x86_64`` systems. diff --git a/source/development/packaging/generate-rpm-package.rst b/source/development/packaging/generate-rpm-package.rst deleted file mode 100644 index 2608b374d1..0000000000 --- a/source/development/packaging/generate-rpm-package.rst +++ /dev/null @@ -1,74 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. meta:: - :description: Wazuh provides an automated way of building RPM packages. Learn how to build your own Wazuh RPM packages in this section of our documentation. - -.. _create-rpm: - -RPM -=== - -Wazuh provides an automated way of building RPM packages using docker so there is no need for any other dependency. - -To create an RPM package follow these steps: - -Requirements -^^^^^^^^^^^^ - - * Docker - * Git - -Download our wazuh-packages repository from GitHub and go to the rpms directory. - -.. code-block:: console - - $ git clone https://github.com/wazuh/wazuh-packages && cd wazuh-packages/rpms && git checkout v|WAZUH_CURRENT| - -Execute the ``generate_rpm_package.sh`` script, with the different options you desire. This script will build a Docker image with all the necessary tools to create the RPM and run a container that will build it: - -.. code-block:: console - - # ./generate_rpm_package.sh -h - -.. code-block:: none - :class: output - - Usage: ./generate_rpm_package.sh [OPTIONS] - - -b, --branch [Required] Select Git branch or tag. - --packages-branch [Required] Select Git branch or tag from wazuh-packages repository. - -t, --target [Required] Target package to build [manager/api/agent]. - -a, --architecture [Optional] Target architecture of the package [x86_64/i386/ppc64le/aarch64/armv7hl]. - -r, --revision [Optional] Package revision that append to version e.g. x.x.x-rev - -l, --legacy [Optional] Build package for CentOS 5. - -s, --store [Optional] Set the destination path of package. By default, an output folder will be created. - -j, --jobs [Optional] Number of parallel jobs when compiling. - -p, --path [Optional] Installation path for the package. By default: /var/ossec. - -d, --debug [Optional] Build the binaries with debug symbols and create debuginfo packages. By default: no. - -c, --checksum [Optional] Generate checksum on the desired path (by default, if no path is specified it will be generated on the same directory than the package). - --dont-build-docker [Optional] Locally built docker image will be used instead of generating a new one. - --sources [Optional] Absolute path containing wazuh source code. This option will use local source code instead of downloading it from GitHub. - --dev [Optional] Use the SPECS files stored in the host instead of downloading them from GitHub. - --src [Optional] Generate the source package in the destination directory. - --future [Optional] Build test future package x.30.0 Used for development purposes. - -h, --help Show this help. - -Below, you will find some examples of how to build an RPM package. - -.. code-block:: console - - # ./generate_rpm_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -s /tmp -t manager -a x86_64 -r my_rev. - -This will generate a |WAZUH_CURRENT| Wazuh manager RPM package with revision ``my_rev`` for ``x86_64`` systems. - -.. code-block:: console - - # ./generate_rpm_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -s /tmp -t api -a i386 -r my_rev - -This will generate a |WAZUH_CURRENT| Wazuh api RPM package with revision ``my_rev`` for ``i386`` systems and store it in ``/tmp``. - -.. code-block:: console - - # ./generate_rpm_package.sh -b v|WAZUH_CURRENT| --packages-branch v|WAZUH_CURRENT| -t agent -a x86_64 -p /opt/ossec - -This will generate a |WAZUH_CURRENT| Wazuh agent RPM package with ``/opt/ossec`` as installation directory for ``x86_64`` systems. diff --git a/source/development/packaging/index.rst b/source/development/packaging/index.rst index cca09b60cf..bc7d2d22fd 100644 --- a/source/development/packaging/index.rst +++ b/source/development/packaging/index.rst @@ -2,7 +2,7 @@ .. meta:: :description: Learn more about how to generate your own Wazuh packages for different platforms, such as Debian, macOS, Windows, Splunk app, and others. - + .. -package-creation: Wazuh packages generation guide @@ -16,10 +16,9 @@ This section will show you how to generate your own Wazuh packages for different :maxdepth: 1 generate-aix-package - generate-deb-package + generate-deb-rpm-package generate-hpux-package generate-osx-package - generate-rpm-package generate-sol-package generate-ova generate-windows-package