Conary:User Info Recipe Template
From rPath Wiki
Conary packagers can write a info package recipe that inherits from UserInfoRecipe to create a Linux system user required to run a particular application installed by other Conary packages. Use the following template to start the recipe, and make the changes suggested:
class info_username(UserInfoRecipe): name = 'info-username' version = '1' def setup(r): r.User('username', 1001, group='groupname', groupid=1001, homedir='/home/directory', shell='%(essentialbindir)s/bash', supplemental=['wheel','dbusers'])
Suggested changes:
- Change the class name to a CamelCase representation of the application name
- Change the value for name to the application name as packaged
- Change the value for version to the application version
- Use r.User to create the group and define the group parameters, such as user name, user identification number (UID), member group name, group identification number, home directory location, and default shell.
- Remove the supplemental argument if no other user groups are required, but modify the existing list of groups as necessary with those that the user should be in.
