开发者

Debian packaging: deploying files to the user home directory

I use Debhelper to create Debian packages. To deploy files and directories, I use the debian/install and debian/dirs files.

Now I would like my package to deploy the default user configuration file to $HOME/.mypackagerc (just like .bashrc and frien开发者_如何学Pythonds).

Does Debhelper provide a way to do this, or should I just:

  • Do it in postinst script
  • Or even do this in my program, at first execution


You should do it in your own program.

You can't get debhelper to do this. A postinst script may be able to install in all current user accounts, but you lose control of what happens after the user has performed the installation. So new users won't get the ~/.mypackagerc files, unless you put it in /etc/skel also which is overdoing it, in my opinion.

I also say this because the package is installed by root. Root shouldn't have to mess around with other user's files. I don't know whether Debian Policy has anything on this, but you'll save yourself writing a lot of ugly code if you program made these files itself.

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜