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

Improve generation process for RPM package #20

Closed
13 of 14 tasks
jesuslinares opened this issue Jul 5, 2018 · 6 comments
Closed
13 of 14 tasks

Improve generation process for RPM package #20

jesuslinares opened this issue Jul 5, 2018 · 6 comments
Assignees
Labels

Comments

@jesuslinares
Copy link
Contributor

jesuslinares commented Jul 5, 2018

The current script to build the RPM packages is too complex. It also needs other dependencies as mock and it takes too much time to build the packages.

Tasks to do:

  • Simplify the build script.
    • Clean up the script.
    • Improve the parameter handler.
    • Remove all the unnecessary stuff to create a package. Remove everything else.
  • Remove mock from the build process. The installation and maintenance of mock is too hard.
  • Use Docker containers to build the packages.
  • Make a script/tool to build and prepare the environment.
  • Create the Dockerfiles to build i386 and x86_64 rpm packages.
  • Create the Dockerfiles to build i386 and x86_64 rpm legacy packages (CentOS 5 / RHEL 5).
  • The RPM packages must copy the CHANGELOG file from the sources, rather than the one in rpmbuild/SOURCES.
  • The RPM packages must install the wazuh-manager.init and wazuh-agent.init files from the sources, rather than the one in rpmbuild/SOURCES.
  • Add compatibility for previous Wazuh versions. This means that the new tool to build the rpm packages must be able to build all the Wazuh 3.x versions.
  • Add support to build the packages in different directories using rpm macros.
  • Testing.
@jesuslinares jesuslinares added this to To do in Packages redesign via automation Jul 5, 2018
@BraulioV BraulioV added the type/refactor Enhancement label Jul 13, 2018
@BraulioV BraulioV moved this from To do to In progress in Packages redesign Jul 21, 2018
@BraulioV
Copy link
Contributor

BraulioV commented Jul 21, 2018

Hi team,

I just uploaded the new scripts and Dockerfiles to build the RPM packages. For now, you can build an RPM package in a CentOS 6 that can be installed in Fedora, CentOS, RHEL, Amazon Linux, Suse 12, etc., but I'm having some issues to build the Docker image for CentOS 5 with the CentOS 5 repositories.

For now, you only need git and Docker to build the packages.

@BraulioV
Copy link
Contributor

BraulioV commented Jul 21, 2018

In addition to what I said before, the RPM specs from previous versions need this changes:

  • The RPM packages must copy the CHANGELOG file from the sources, rather than the one in rpmbuild/SOURCES.
  • The RPM packages must install the wazuh-manager.init and wazuh-agent.init files from the sources, rather than the one in rpmbuild/SOURCES.

Without this, you can't build a package with this new system.

@BraulioV
Copy link
Contributor

This commit 5e884a8 solves the previous comment.

In addition, I just added the RPM specs for 3.4.0 in this branch.

@BraulioV
Copy link
Contributor

Hi team,

I solved this two issues:

  • The RPM packages must copy the CHANGELOG file from the sources, rather than the one in rpmbuild/SOURCES.
  • The RPM packages must install the wazuh-manager.init and wazuh-agent.init files from the sources, rather than the one in rpmbuild/SOURCES.

in this commit: 5e884a8.

Regards,
Braulio.

@BraulioV
Copy link
Contributor

BraulioV commented Aug 11, 2018

Hi team,

with this commit: 1d7a1ce, I add simplify even more the rpm build script and I add the following features:

  • Added support for different directories.
  • Added support to set the number of threads and the release of the package dynamically using rpm macros.
  • Added support for all the previous versions of Wazuh.

Everything is done by defining rpmmacros and using them in the rpm spec file. I will continue with the process to build rpm packages for CentOS 5.

Regards,
Braulio.

@BraulioV
Copy link
Contributor

Hi team,

right now, the Docker image to build the CentOS 5 packages for x86_64 works like a charm, but, I'm having some issues with the i386 image when linking the Wazuh binaries with the compiled OpenSSL in src/external.

For now, this image will have to wait in order to improve the RPM specs, so I made this PR (#28) to add this features.

Regards,
Braulio.

Packages redesign automation moved this from In progress to Done Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants