Hi Domnic, Thanks for the response, 
The use case here is, there is a customized rpm package which will be installed in different servers owned by different applications. 
Say like if am installing the rpm on a server while put the files in /opt, I want the root installed files to be owned by that application user ID. 
Right now I can do that in two steps 
1. Install the rpm
2. Fire chown on the installed files with the application user 

Now I want to do both steps in a single shot while installing the rpm itself.. So I want to know how we can pass the application id as a parameter at installation time to the rpm ? 




Regards, MK

On Wed, 1 Jul 2020, 3:25 pm Dominik 'Rathann' Mierzejewski, <dominik@greysector.net> wrote:
On Saturday, 27 June 2020 at 17:16, Mohankumar S wrote:
> Hi
>
> I have a customized rpm which will be shared by different applications,
> when I do a rpm install , I want to pass the app userid and groupid at
> install time so that directories /files installed by rpm will be owned by
> the app ids which I pass .
>
> The idea is to make it work on a single shot both installation and
> permissions applying.
>
> Note : we have different ids owned by different applications
>
> Any suggestions on this will be helpful.

Why do you think you need the files installed by the RPM package be
owned by an arbitrary UID configurable at install time? You'd have to
describe your particular use case in more details, but I think it's
enough to have the files deployed via RPM owned by root and
world-readable and create any UID-specific files at runtime.

What you described so far doesn't sound like a job for RPM.

Regards,
Dominik
--
Fedora   https://getfedora.org  |  RPM Fusion  http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
        -- from "Collected Sayings of Muad'Dib" by the Princess Irulan
_______________________________________________
packaging mailing list -- packaging@lists.fedoraproject.org
To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org