Hi Seema,

First, a small adjustment on what José said: please note that
TZ_USER_NAME is *not* available as a macro because it doesn't make
sense. The name (or uid) for a given user can't be known at build time
(in mic) or even after (multiple users will exist, not only one).

More generally, all variables TZ_XXX are available at runtime through
the API . But the TZ_USER_XXXX variables are *not* available as macros
at build time.


Secondly, for the same reasons, you can't use an uid inside the spec
file. But if you need a gid (which is valid, even in multiuser mode),
you can use the following trick.

For example, to get the gid for the video group:

   video_gid=$(getent group video | cut -f3 -d':')

or for the users group (whatever the group is):

   users_gid=$(getent group %TZ_SYS_USER_GROUP | cut -f3 -d':')


Best regards,
Stéphane

-- 
Stéphane Desneux
Intel OTC - Vannes/FR
gpg:1CA35726/DFA9B0232EF80493AF2891FA24E3A2841CA35726

On 24/01/2014 06:55, Seema Singh wrote:
> Hi Jos Bollo,
> 
>  
> 
>>No there is no way to refer to numeric ids. That is intentional.
> 
>>In spec files, the names can be used in place of ids almost everywhere.
>>Using the macros %TZ_USER_NAME, %TZ_SYS_USER_GROUP, ... where you are
>>finding a numeric id in spec files is correct.
> 
> 
>  
> 
> Thank you for your response and clarification..
> 
>  
> 
>  
> 
> Thanks & Regards,
> 
> Seema Singh.
> 
>  
> 
> ------- *Original Message* -------
> 
> *Sender* : [email protected]<[email protected]>
> 
> *Date* : Jan 23, 2014 22:19 (GMT+09:00)
> 
> *Title* : Dev Digest, Vol 5, Issue 86
> 
>  
> 
> Send Dev mailing list submissions to
> [email protected]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.tizen.org/listinfo/dev
> or, via email, send a message with subject or body 'help' to
> [email protected]
> 
> You can reach the person managing the list at
> [email protected]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Regarding Multi-User architecture,
>       https://bugs.tizen.org/jira/i#browse/PTREL-373   (Seema Singh)
>       (Jos? Bollo)
>    2. Re: Regarding Multi-User architecture,
>       https://bugs.tizen.org/jira/i#browse/PTREL-373 (RAJENDRA NAIK VADTHE)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 23 Jan 2014 13:32:26 +0100
> From: Jos? Bollo
> To: [email protected]
> Subject: Re: [Dev] Regarding Multi-User architecture,
> https://bugs.tizen.org/jira/i#browse/PTREL-373   (Seema Singh)
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="UTF-8"
> 
> On gio, 2014-01-23 at 11:49 +0000, Seema Singh wrote:
>> Hi Stephane,
>>
>>  
>>
>> As part of Tizen open source member ,I started looking into
>> Multi-architecture Connectivity-NFC module. Need information regarding
>> UID/GID hard-coded values used in .spec files
>> In .spec file there are few hard coded UID values like "5000".
>> tizen-platform.meta file does not have any Macros defined for UID/GID.
>> Also "libtzplatform-config" provides API to get uid/gid
>> tzplatform_getuid()/tzplatform_getgid() respectively.
>> Which can't be used in .spec files. As per UID value definition ,
>> value should be greater than 99 and greater than every other user.
>> Defining a Macro would not solve the purpose as UID value can vary.
>>
>> Is there a way to get/refer the uid value from spec file?
> 
> No there is no way to refer to numeric ids. That is intentional.
> 
> In spec files, the names can be used in place of ids almost everywhere.
> Using the macros %TZ_USER_NAME, %TZ_SYS_USER_GROUP, ... where you are
> finding a numeric id in spec files is correct.
> 
> Best regards
> Jos?
> 
>> Would request you to provide your suggestion/inputs.
>>
>> Thanks & Regards,
>> Seema Singh.
>>
>>  
>>
>>  
>>
>>
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> https://lists.tizen.org/listinfo/dev
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 23 Jan 2014 13:21:36 +0000 (GMT)
> From: RAJENDRA NAIK VADTHE
> To: "[email protected]" ,
> "[email protected]" , [email protected]
> Cc: "[email protected]"
> Subject: Re: [Dev] Regarding Multi-User architecture,
> https://bugs.tizen.org/jira/i#browse/PTREL-373
> Message-ID:
> Content-Type: text/plain; charset="us-ascii"
> 
> An HTML attachment was scrubbed...
> URL:
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 201401231851435_N3WZA6X7.gif
> Type: image/gif
> Size: 14036 bytes
> Desc: not available
> URL:
> 
> ------------------------------
> 
> _______________________________________________
> Dev mailing list
> [email protected]
> https://lists.tizen.org/listinfo/dev
> 
> 
> End of Dev Digest, Vol 5, Issue 86
> **********************************
> 
>  
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> Dev mailing list
> [email protected]
> https://lists.tizen.org/listinfo/dev
> 
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to