-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: add option to set %_target_os #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but RPM will always override all %_target
, %_target_arch
, and %_target_os
no matter what values we decide to put here.
If these values will be allowed to be set by the user, you could simply just use .rpmmacros
to override them, or just make changes to the installer so it can accept arch: x86_64-felipe-gnu
rather than two additional options.
This is all done so people don't build for a wrong architecture and OS, you can read more here https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpmbuild.html
Thank you @fcastilloec for your feedback! 👍 I think I've not explain myself very well 😅 My intention was to change %_target_os but throw This is based on the rpmbuild documentation where it says
In my case, with this PR merged, I'm able to successfully create a linux targeted rpm from a macOS (darwin) host. |
Given that #176 has been already merged, do you find possible to try to push this forward? 😉 |
@fcastilloec is it possible to address @hicom150's response to your feedback? ❤️ |
I'll be taking another look at this PR in the next weeks. I've just been very busy. I'm still a little hesitant into introducing this feature, I do believe that it's always better to build the package in the same machine that's intended for use. Nonetheless, I see that this is not always possible, even with so many free CI services around. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some changes. The most important ones: rebasing against our latest main
branch so we can run the tests under macOS, and fixing the tests which weren't asserting anything.
This PR adds the option to define the
%_target_os
that it is used in thetarget
option of rpmbuild.This PR is related to webtorrent/webtorrent-desktop#1849 as the maintainer uses osx (darwin) to generate linux packages.