noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

Fix cross platform RPM builds

Open b-ranto opened this issue 1 year ago • 2 comments

Explain the changes

  1. This PR restructures how we do the RPM builds today.

What changed?

  • Instead of fetching NooBaa runtime dependencies in the Dockerfile, we fetch them in the RPM build process.
  • We make sure the environment has all the dependencies that NooBaa requires for the build process

Why changed?

  • This approach allows generating a true architecture independent SRPM, hence a SRPM can be generated once (per RHEL version) and then rpmbuild --rebuild can be used to generate RPMS for different architectures.
  • This approach allows us to use mock to build the RPMs

Note: Usage remains same, that is use, make rpm. This will generate a SRPM and a RPM. Use the SRPM to generate the RPMs for other architectures. The command also supports make rpm SRPM_ONLY=true which is significantly faster and jsut generates SRPMs.

  • [ ] Doc added/updated
  • [ ] Tests added

b-ranto avatar Feb 23 '24 06:02 b-ranto

FYI: I had to disable BUILD_S3SELECT to get this to pass when testing locally.

b-ranto avatar Feb 23 '24 08:02 b-ranto

@tangledbytes I have invited you to my fork of the repo, you should be able to update this PR if necessary.

b-ranto avatar Feb 23 '24 09:02 b-ranto

@b-ranto let's close this PR

tangledbytes avatar Mar 21 '24 11:03 tangledbytes