Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemonHome #945

Closed
champtar opened this issue Mar 11, 2017 · 3 comments · Fixed by #1536
Closed

daemonHome #945

champtar opened this issue Mar 11, 2017 · 3 comments · Fixed by #1536

Comments

@champtar
Copy link

champtar commented Mar 11, 2017

Hi,

by default daemonUser is created with home == /home/<username> (which doesn't exists)
as this is a daemon user that would make sense to point to /usr/share/<packageName> or /var/lib/<packageName>
or at least to have a config option

EDIT:
Using version 1.2.0-M8 packaging .deb for Ubuntu/Debian (but relevant for rpm), creating the package on Ubuntu 16.04 for now

Thanks
Etienne

@muuki88
Copy link
Contributor

muuki88 commented Mar 12, 2017

Hi @champtar

Thanks for your report. Could you add some details :)

  • Which native-packager version are you using
  • Which package type are you building (rpm or debian)
  • What's your target system (Debian, RHEL, CentOS, Ubuntu,...)
  • What system do you use to build your package (OSX, Ubuntu, ... )

The current implementation handling the user creation is in the control-functions template. There is no home defined. The configuration options are

# Adding system user
# $1 = user
# $2 = uid
# $3 = group
# $4 = description
# $5 = shell (defaults to /bin/false)

The actual call is

useradd $uid_flags --gid $group -r --shell $shell -c "$descr" $user

@champtar
Copy link
Author

Hi @muuki88,
Thanks for your answer
I just edited my initial description because <...> where hidden (i forgot to put them between quotes) and I also added missing infos

This is definitely a feature request :) (I know this is not implemented)

Basically we just need to add -d "$home" (haven't checked on all supported platform yet) that point by default to a dir really owned by the package

Regards
Etienne

@muuki88
Copy link
Contributor

muuki88 commented Mar 12, 2017

Ah 😄

I'm happy to merge a pull request that adds this feature if you have time.
It should be implemented like the uid setting. Meaning a user can optionally
add a home directory.

I'm not sure were to directly put this and if native-packager should take care of creating
the folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants