[csw-maintainers] GAR classes list variable name

Dagobert Michelsen dam at opencsw.org
Tue Sep 22 10:09:49 CEST 2009


Hi Maciej,

Am 22.09.2009 um 10:02 schrieb Maciej (Matchek) Blizinski:
> On Tue, Sep 22, 2009 at 8:38 AM, Peter Bonivart  
> <bonivart at opencsw.org> wrote:
>> On Tue, Sep 22, 2009 at 9:30 AM, Maciej (Matchek) Blizinski
>> <maciej at opencsw.org> wrote:
>>> Is it CLASSES as described at [1] or SPKG_CLASSES as used in [2]?
>>
>> It's CLASSES when doing manual stuff in pkginfo and it's SPKG_CLASSES
>> when using mGAR v2. But now it's even simpler to do when using GAR so
>> you don't even have to bother with setting the classes.
>
> I've read the instructions on the and they don't seem complete to me.
> There are 2 things needed to set the file ownership:
>
> 1. A file defining users and groups (USERGROUP = ...)
> 2. A prototype with the ugfiles class
>
> The second bit needs to be done by filtering the prototype, is that
> right? A sample piece of code:
>
> USERGROUP = /opt/csw/etc/pkg/CSWmysql5/cswusergroup
> PROTOTYPE_FILTER = awk ' \
>    $$$$3 ~ /\/var\/opt\/csw\/mysql5$$$$/ { $$$$2 = "ugfiles"; \
>                                            $$$$4 = "0700"; \
>                                            $$$$5 = "mysql"; \
>                                            $$$$6 = "mysql" } \
>    { print }'
> SPKG_CLASSES = none ugfiles
>
> Without the last line (SPKG_CLASSES), my ugfiles-class file wasn't
> created on the disk during package installation.

What do you think about my proposal I sent some time ago?

Am 06.09.2009 um 22:14 schrieb Dagobert Michelsen:
> Am 05.09.2009 um 18:21 schrieb Maciej (Matchek) Blizinski:
>> My day-to-day environment has umask set to 027; but many packages,
>> when built with this umask, end up with binaries having permissions
>> 0750. Perhaps it would be a good idea to do a GAR sanity check: bail
>> out if umask is set to anything else than 022 when building a  
>> package?
>
> The standard user:group are already set in cswproto, as are the  
> permissions
> for directories:
>
>> # Prototype defaults
>> $StdOwn     = 'root';
>> $StdGrp     = 'bin';
>> $StdDirPerm = '0755';
>
> I could imagine setting a default for files. Or changing the umask  
> to 022
> automatically on GAR invocation. BTW, we still a way of easily  
> tweaking
> the prototype as PROTOTYPE_FILTERs are still too complex.
>
> Something like this could be useful:
>
> PROTOTYPE_FILES_mytweaks = $(bindir)/.*\.conf
> PROTOTYPE_PERMS_mytweaks = 0644
> PROTOTYPE_CLASS_mytweaks = cswconffile
>
> PROTOTYPE_MODIFIERS = mytweaks
>
> Here, PROTOTYPE_MODIFIERS is a list of modifiers to apply where for  
> each
> modifier one or more fields can be changed.


And
   PROTOTYPE_USER_mytweaks = myuser
which would trigger the addition of 'ugfiles' to classes.


Sounds good?


Best regards

   -- Dago


More information about the maintainers mailing list