-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Wip make dist rpm 3 #4911
Wip make dist rpm 3 #4911
Conversation
@osynge would you mind rebasing instead of creating new pull requests ? Unless there is a specific reason to do so, it saves a little time with pull request triage :-) |
@dachary sure, I will do in future, some thing funny happened when I tried to reorder so no commit would break anything (for bisecting) |
The general concept is good here. One detail regarding implementation: I'd really like this RPM generation process to be outside of autoconf entirely. The fact that we have to do a full Sage wrote a Can we do the same thing with a " |
Re: my comment above, there's some background information about the " |
@ktdreyer do you have any reason apart from performance ? This is a very bad idea in my opinion. By not using configure to set the paths in the spec or debian files.
A good example would be the file : src/ceph-osd-prestart.sh By using configure we in a wrapper script such as ./make_rpm.sh we can set the paths to distribution in one place :) |
The RPMs and DEBs will still run The problem is that right now we have to run |
@ktdreyer this seems a very small issue compared to the potentially lost features. I answered on the mailing list in more depth why I feel this is wrong. |
|
Note "./make_rpm.sh" and "make rpm" applications provide different features.
They are two different use cases addressed. |
It's not clear to me what features we'd be losing by moving this out of autoconf and into a standalone script. |
You will loose the ability to apply templates to things like "ceph.spec"
|
Maybe I should have merged this patch and the #4871 and suggested they be used together. |
can you give some further examples?
This is annoying. Ceph's .spec is a lot messier than anything else I've worked on. But os-specific conditionals have to go somewhere, and this follows the conventions that a lot of other projects and packages follow.
Right, that's what " |
So we are agreed the arguments about this duplicating functionality of "make_dist.sh" is irrelevant? You agree now that I only need to provide examples of why variables are useful well I have to make a union of a few patches to show you :) |
Being able to make nearly everything a variable in ceph.spec.in will prevent he turbulence caused by different conditionals being merged, ie where does this go?
clearly in the spec.in file it would be nice to be:
Clearly the second line is better. We could even have configure find the directory, on every distribution if not set in the options :) Its just a few lines in configure.ac and its done making the job easier :) |
In summary
tip: If you explicitly set autotools options it can some times run faster, as it does not have to find out a default. Explicitly turning off java may help in configure run time. |
Using The particular example with the |
Adding more autoconf variables into ceph.spec.in means building more layers of complexity to allow the variables, to be variable and stored else wear. In the end it comes down to isolating the changed values from the debian defaults to SUSE and redhat and making them variable, and handling the conditionals in a language with nicer conditionals the an rpm spec file makes a lot of sence. |
Aded options --with-rpm-dir=/yourrpmdir Default is `pwd`/RPM rpm topdir. Signed-off-by: Owen Synge <osynge@suse.com>
54bbde8
to
fd2a08a
Compare
when tested on fedora it did not work reasons where: 1 not adding patch file to sources for fedora builds.
2 fedora already defines _topodir so typo in _topdir definition caused failures.
These are now fixed in latest commit. |
Add "make rpm" to Makefile.am Use RPM_DIR created in configure.ac to define rpmtopdir. Signed-off-by: Owen Synge <osynge@suse.com>
Add "make srpm" to Makefile.am as a build dependency to "make rpm" Signed-off-by: Owen Synge <osynge@suse.com>
fd2a08a
to
6e48fd8
Compare
Added a comment between testing and making patch that caused build to fail. This comment is now in style of previous comments and no longer produces interesting errors. |
@osynge this needs rebasing. And maybe a gentle ping ;-) |
@osynge feel free to re-open when you have time to rebase |
replaces #4905