Hi,
I want to pass a runtime argument while installing a rpm . say like rpm -ivh sample. rpm "hello". I want to read the argument and make use of it while installing it.
Any help would be appreciated.
Regards, Mohan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On Fri, 2020-06-26 at 14:22 +0530, Mohankumar S wrote:
Hi,
I want to pass a runtime argument while installing a rpm . say like rpm -ivh sample. rpm "hello". I want to read the argument and make use of it while installing it.
Any help would be appreciated.
You can't. Neither you should. What's your use-case?
Regards, Mohan _______________________________________________ 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....
- -- Igor Raits ignatenkobrain@fedoraproject.org
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.
Regards, Mohan
On Fri, 26 Jun 2020, 2:30 pm Igor Raits, ignatenkobrain@fedoraproject.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On Fri, 2020-06-26 at 14:22 +0530, Mohankumar S wrote:
Hi,
I want to pass a runtime argument while installing a rpm . say like rpm -ivh sample. rpm "hello". I want to read the argument and make use of it while installing it.
Any help would be appreciated.
You can't. Neither you should. What's your use-case?
Regards, Mohan _______________________________________________ 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....
Igor Raits ignatenkobrain@fedoraproject.org -----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEcwgJ58gsbV5f5dMcEV1auJxcHh4FAl71uSAACgkQEV1auJxc Hh5deg/8CZ++IF85oRrIzYWT6mm+QhccgaXDouuk+9vyS6jRpduAmP4V4kZVGTk6 85TGy6bO4OhU3GPUnWYoWh7BidSHi6PBgxu6jnKgYJTGAZ/RNZ8vbM6VT4bREI/e wM1WdIaf2i5dxtjtzcH0Lm+/+RL7bDL4T37qCanGPR2PvhRXnPIhOpOAwsR1HZYv EKatxPJyBefjeQYqG46vgb2nhNEAw6CGUfVZWRdT75ILnhmr7JGhWOUG94QI6f5I s8Aqj5yNbYE2XTQ790i1rXn87fIN6sltncYsXBnDH0oOyTf45gwLu9AU8rJB9i5x N3kljIB2HWqLmNnafo7oai+lDqYps8FFrN4dnobWUFKqWxm9Guw+WfTtC/rMI8aq 136bHlnNZi3HGH48EKkqdtOWKz0pcsFIFcpoM5U73VHUazLqEe39nHbn6zIlWERF EY8kl8vDO+FISin2XxVADEqcLEoKsUvUcR+gWqOOoL2rdA8v0Zy9zej+lUa9cx8D NDiXtKAlJFFvk/+UcJpJ5Mx9ywG1ESodQ9MKcwVhfb98/6I7H6PdjrbIHfYP2GK0 Di+thu3850utLN8nDX8pc/hQ5NMFmtARuisDhw2aKalzyTwEhEkYybn1eD4IfMCX +mPD7UeankcSnGuzBBQzFPxxeZ/1iN9QWRxEgo41Gt5+AguQf4U= =jxMM -----END PGP SIGNATURE----- _______________________________________________ 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....
On Sat, 2020-06-27 at 20:46 +0530, 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.
I suspect that you are on the wrong list. There are lists dedicated to upstream rpm, and what you want is technically possible¹ with rpm (I think) so they might help you. This list is about packaging with rpm for use in Fedora, and how users/groups are assigned is a well defined process that does not need/want arbitrary ids passed at install time.
¹ Rpm is maybe not the right tool for the job though, as most people don't want to interact with the rpm cli directly in the way you suggest.
Thank you for your reply, do you have the list with you? So that I can reach to them
Regards, MK
On Tue, 30 Jun 2020, 9:09 pm James Antill, james@fedoraproject.org wrote:
On Sat, 2020-06-27 at 20:46 +0530, 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.
I suspect that you are on the wrong list. There are lists dedicated to upstream rpm, and what you want is technically possible¹ with rpm (I think) so they might help you. This list is about packaging with rpm for use in Fedora, and how users/groups are assigned is a well defined process that does not need/want arbitrary ids passed at install time.
¹ Rpm is maybe not the right tool for the job though, as most people don't want to interact with the rpm cli directly in the way you suggest. _______________________________________________ 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....
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
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....
On Wednesday, 01 July 2020 at 12:23, Mohankumar S wrote:
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.
That's the whole issue. Why do you think you need that? Application binaries and static data should not normally be owned by anything other than root.
Regards, Dominik
That's right but am checking for the possibilities to install and do a chown on the installed files as there is a requirement for me to do so..
Regards, MK
On Wed, 1 Jul 2020, 4:01 pm Dominik 'Rathann' Mierzejewski, < dominik@greysector.net> wrote:
On Wednesday, 01 July 2020 at 12:23, Mohankumar S wrote:
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.
That's the whole issue. Why do you think you need that? Application binaries and static data should not normally be owned by anything other than root.
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....
On 7/1/20 1:38 PM, Mohankumar S wrote:
That's right but am checking for the possibilities to install and do a chown on the installed files as there is a requirement for me to do so..
you cannot pass arguments to rpm packages at install time because rpm as a tool was designed for unattended installs.
you can however create the user in %pre and make that user owner using %attr in the %files section . That's the normal approach used by all packages that require a specific user
Regards, MK
On Wed, 1 Jul 2020, 4:01 pm Dominik 'Rathann' Mierzejewski, <dominik@greysector.net mailto:dominik@greysector.net> wrote:
On Wednesday, 01 July 2020 at 12:23, Mohankumar S wrote: > 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. That's the whole issue. Why do you think you need that? Application binaries and static data should not normally be owned by anything other than root. 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 <mailto:packaging@lists.fedoraproject.org> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto: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
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....
I agree with you but however the app user is created in a external system like kerberos which I get at runtime only..
Any suggestions would be appreciated
Regards, MK
On Wed, 1 Jul 2020, 4:17 pm Manuel Wolfshant, wolfy@nobugconsulting.ro wrote:
On 7/1/20 1:38 PM, Mohankumar S wrote:
That's right but am checking for the possibilities to install and do a chown on the installed files as there is a requirement for me to do so..
you cannot pass arguments to rpm packages at install time because rpm as a tool was designed for unattended installs.
you can however create the user in %pre and make that user owner using %attr in the %files section . That's the normal approach used by all packages that require a specific user
Regards, MK
On Wed, 1 Jul 2020, 4:01 pm Dominik 'Rathann' Mierzejewski, < dominik@greysector.net> wrote:
On Wednesday, 01 July 2020 at 12:23, Mohankumar S wrote:
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.
That's the whole issue. Why do you think you need that? Application binaries and static data should not normally be owned by anything other than root.
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....
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....
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....
Le mercredi 01 juillet 2020 à 16:50 +0530, Mohankumar S a écrit :
I agree with you but however the app user is created in a external system like kerberos which I get at runtime only.. Any suggestions would be appreciated
This kind of setup is hell to maintain, because not two deployed systems will be identical.
Anyway the way this situation is usually worked around is to make the rpm install all files in a neutral unchanging place owned by root, and to copy the content of this root to a transient work directory owned by the runtime user at runtime
(that will still be hell to maintain, but a lesser form of hell)
Regards,
packaging@lists.fedoraproject.org