Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev improve rpm generation #28

Merged
merged 13 commits into from
Aug 24, 2018
Merged

Dev improve rpm generation #28

merged 13 commits into from
Aug 24, 2018

Conversation

BraulioV
Copy link
Contributor

Hi team,

in this PR I made a full rework of how the Wazuh packages for RPM based OS are made. Now, everything is built using a Docker image. This Docker image has installed all the necessary packages to compile Wazuh and build a .rpm package.

Also, I made a full rework of the scripts to build the RPM package. Now are more easy to use and easy to maintain. In addition, I add some new cool features. These are the most relevant:

  • Added support for different directories: Now you can build rpm packages to be installed in different directories. For example: /opt/ossec. By default, the package will be built to be installed in /var/ossec.
  • Added support to set the number of threads before building the package.
  • Change the release of the package dynamically.

How to use them:

  • Build a wazuh-manager package for x86_64: # ./generate_wazuh_rpm.sh -b v3.4.0 -t manager -a x86_64 -j 15 -r 2.
  • Build a wazuh-agent package for i386: # ./generate_wazuh_debs.sh -b 3.4 -t agent -a i386.
  • Build a wazuh-api package: # ./generate_wazuh_rpm.sh -b v3.4.0 -t api.

Available parameters:

# ./generate_wazuh_rpm.sh -h

Usage: ./generate_wazuh_rpm.sh [OPTIONS]

    -b, --branch <branch>     Select Git branch [master].
    -h, --help                Show this help.
    -t, --target              Target package to build: manager, api or agent.
    -a, --architecture        Target architecture of the package.
    -j, --jobs                Change number of parallel jobs.
    -l, --legacy              Build the package for CentOS 5.
    -r, --release             Package release.
    -p, --path                Installation path for the package.

Regards,
Braulio.

@jesuslinares
Copy link
Contributor

Great job!.

Please, create a folder for the temporary files:

/tmp/wazuh-builds/build-000000001

In this way, we can run several times the script.

Also, include in the output the package path.

@BraulioV
Copy link
Contributor Author

Hi @jesuslinares,

done in ad369cb. This commits is pretty similar to this one 49954bd done in #27.

Regards,
Braulio.

@BraulioV BraulioV merged commit 9325a51 into master Aug 24, 2018
Packages redesign automation moved this from In progress to Done Aug 24, 2018
@BraulioV BraulioV deleted the dev-improve-rpm-generation branch August 24, 2018 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants