[Ovirt-devel] [PATCH node-image] Only lock root account for production builds. For non-release builds leave it open

Jeremy Katz katzj at redhat.com
Fri Jan 30 03:30:09 UTC 2009


On Thursday, January 29 2009, Perry Myers said:
> Jeremy Katz wrote:
>> On Thursday, January 29 2009, Perry Myers said:
>>> Jeremy Katz wrote:
>>>> On Jan 29, 2009, at 7:50 PM, Perry Myers <pmyers at redhat.com> wrote:
>>>>> This makes it easier for developers to do work
>>>> This looks pretty fragile as the version of a -release package 
>>>> changes  over time. Why not instead have it be more explicit as to 
>>>> whether or not the image is "devel" mode and then key off of that 
>>>> either with different snippets or based on something that's 
>>>> actually set in the image
>>> We have set our build scripts so that a release number of 0 (i.e.   
>>> indicating a pre-release RPM) indicates that the package is a 
>>> developer build.
>> [snip]
>>> This is how we tag development builds using the git hash and timestamp.
>>>
>>> So only when the spec.in file has Release: 0 in it will a 
>>> 'develpment'  build occur.
>>>
>>> My understanding for the Release field is that the convention is for  
>>> production builds the field must be > 0
>>>
>>> So not sure how this would be considered fragile?
>>
>> Other things can hit the release field including mass rebuilds, rebuilds
>> for depchain changes, etc.  Making developer image vs not an explicit
>> setting will make it a lot more clear and a lot easier for other people
>> who are working with the code to have a consistent experience.
>
> Point taken.  So what do you recommend as a standard way for indicating  
> that an rpm is a development rpm without using the version or release 
> fields?
>
> Should the rpm include an empty file like:
> /usr/share/ovirt-node/devel
>
> or something like that, that we can look for later?  Or is there a better 
> way to do this?

There's not any definitive way.  What's done in anaconda, for example,
is to set BETANAG in /usr/lib/anaconda/constants.py.  Other apps end up
using compile-time definitions.  For something like the node, I'd
probably lean towards a sysconfig file (/etc/ovirt-node.cfg or similar)
and just set shell variable style variables like DEVMODE=1 or yes or
similar.  That way it's very clear what's going on and people can
trivially toggle it accordingly in their own builds

Jeremy




More information about the ovirt-devel mailing list