-
Notifications
You must be signed in to change notification settings - Fork 201
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
spec: Use vdsm.spec directly rather than generating it #296
base: master
Are you sure you want to change the base?
Conversation
ping |
lgtm |
Generally I'm ok with the taken direction, but could you elaborate on what problem are we specifically trying to solve?
|
It should ease automated d/s builds but I think having a less or more directly usable .spec file in the repo is good generally. @galitf can provide details about the particular needs for d/s builds.
Yes (just a missing ending slash in
A very good idea!
Right, thanks for pointing this out. @galitf may need to include additional lines in the spec file but I think this is a separate problem that can be solved either by adding another |
We currently generate vdsm.spec from vdsm.spec.in. This means that whatever we want to do regarding building Vdsm packages, we must run auto* stuff first and having all the necessary tools available before we start with the building process, which is not always convenient or even possible. The only thing that is replaced in vdsm.spec.in when generating vdsm.spec from it is @PACKAGE_RELEASE@. We can set 1 as its default value and use vdsm.spec instead of vdsm.spec.in directly. If the value needs to be different, it can be overridden using ‘rpmbuild --define’. This is what ‘rpm’ target in Makefile.am already does so the release is set as intended as long as ‘make rpm’ is used to build the rpm’s. Tagged releases work fine with the default value.
How about this simplified version? Does it miss anything we need? As why we cannot generate the release dynamically from the spec file, it's explained in d9dc07f: "A spec file doesn't know the location of the source directory when generating a SRPM and thus can't run pkg-version script from it." This simplified version may not make @galitf particularly happy because it doesn't allow including additional stuff, but this can be resolved either by adding the lines to the .spec file from the repo or by another patch, based on the particular needs. |
We currently generate vdsm.spec from vdsm.spec.in. This means that
whatever we want to do regarding building Vdsm packages, we must run
auto* stuff first and having all the necessary tools available before
we start with the building process, which is not always convenient or
even possible.
The only thing that is replaced in vdsm.spec.in when generating
vdsm.spec from it is @PACKAGE_RELEASE@. We can set 1 as its default
value and use vdsm.spec instead of vdsm.spec.in directly. If the
value needs to be different, it can be overridden using
‘rpmbuild --define’. This is what ‘rpm’ target in Makefile.am already
does so the release is set as intended as long as ‘make rpm’ is used
to build the rpm’s. Tagged releases work fine with the default value.