[csw-maintainers] GAR classes list variable name
skayser at opencsw.org
Tue Sep 22 11:08:54 CEST 2009
Maciej (Matchek) Blizinski wrote on 22.09.2009 10:42:
> On Tue, Sep 22, 2009 at 9:09 AM, Dagobert Michelsen <dam at opencsw.org> wrote:
>> 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
>>> 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.
> I would suggest having something like this in the ~/.garrc file:
> STOP_ON_WRONG_UMASK = 1
> If the umask is not 022, the build would stop.
>>> 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.
>> PROTOTYPE_USER_mytweaks = myuser
>> which would trigger the addition of 'ugfiles' to classes.
>> Sounds good?
+1 For the idea to introduce an easier interface to PROTOTYPE_FILTER.
>>From the user's perspective, it's easier to think in terms of
> accomplishing a specific task. If I want to set user/group/permissions
> for a specific file, I'd find it more intuitive to use "USERGROUP"
> prefix rather than "PROTOTYPE", even though it's where the tweaking
> takes place under the hood. How about the following?
> USERGROUP_PASSWD = /etc/opt/csw/pkg/CSWfoo/cswusergroup
> USERGROUP_MODIFIERS = mytweaks
> USERGROUP_mytweaks_USER = mysql
> USERGROUP_mytweaks_GROUP = mysql
> USERGROUP_mytweaks_PERMS = 0700
> USERGROUP_mytweaks_FILES = /var/opt/csw/mysql5
I don't quite like the PROTOTYPE_ prefix from a user perspective when it
comes to variable naming (it exposes internal details), but it feels a
bit cleaner to me right now.
1) Generic: possible prototype adjustments are not restricted to
USERGROUP related actions. You might only want to set the suid bit for
2) Consistent naming: GAR has a suffix way of declaring things right now
(PKGFILES_, CATALOGNAME_, ...), which i think we should be consistent
with when it comes to new features.
More information about the maintainers