-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SRPM output (continuation of #1657) #1952
base: main
Are you sure you want to change the base?
Conversation
5ea7162
to
1d076ea
Compare
* Modify RPM build process to generate and collect SRPM and RPM artifacts by default * Create a spec file that will allow for a natural `rpmbuild --rebuild <thing>.src.rpm` approach * Ensure that required components are present in the RPM spec file * At this time, not feature flagged. If users don't want the src.rpm output, they simply don't have to use it. Closes #237
* Remove deprecated Buildroot option from the RPM template
When building an rpm with rpmbuild, the default cpu architecture seems to be the host cpu. However, fpm's default architecture is what rpm calls `noarch`, so to achieve this, I found that we need to set the _target_cpu value to the same one used by fpm and the same that we would use for the `--target` rpmbuild flag.
This avoids copying files from one temporary path (staging_path) to another path rpmbuild build path. This doesn't necessarily solve any particular bug. I thought this copying appeared a bit unnecessary and tried using the staging_path as the _builddir. It seems to work :) The code history was that the rpm spec %install section was copying the files. Then, in PR #552, fpm copies files into rpm's build dir and the %install was made a no-op. As of this commit, no extra copying happens.
This reduces the lines of code used to generate the source tarball.
1d076ea
to
69d71dd
Compare
@trevor-vaughan Hello again! I'm open to however you'd like to handle this. We can discuss here or if you prefer back over on the fpm PR you filed. Changes from your PR:
The fpm test suite for rpm passes ✅
Testing expectations, I would expect fpm and Testing this:
Cool. So far so good. Both filenames are the same and
Checksums for both rpms match (if we exclude 'Build Date'). Nice! Checking file lists:
File names listing are identical There's timestamp differences on the files, but that might also be due to external clock aka build time variables.
|
@jordansissel |
This is for cases like `fpm -p hello.rpm` and it seems like we'd want the srpm named "hello.src.rpm" instead of whatever was generated by rpmbuild. I don't know if this will make things less confusing, but I hope it will make things more predictable :)
This flag allows a user to ask for an SRPM in addition to the binary rpm. This also adds fallback case if the file extension seems weird. That is, if someone asks for a package file named "foobar" then fpm will also output an SRPM named "foobar.src.rpm" in addition to the rpm file named "foobar"
8edb1f8
to
7ced3f1
Compare
Otherwise, built just the binary rpm
Continuation of #1657 from @trevor-vaughan's work.