CHowning files - or not?
Hi,
I am packaging some scripts (for local distribution), so I am both
upstream and maintainer ;).
The sources tree includes a Makefile providing the default targets for
building and installing.
The preinst script creates a system user, and this is the user the
scripts should be owned by (they will be called from a somewhat more
complicated environment, for now, it's easier if you trust me that this
is the way it has to be ;)).
Now, my problem is, how do I ensure that the scripts extracted from the
package will be owned by this user? There are two ways I could think of:
- Have the /usr/bin/isntall command in the source Makefile install the
files with the correct uid/gid
- Do a lot of chown in postinst
The problem with the first is that it is run at build time, not at the
"real" install time, an files in the Debian package will probably be
fakeroot'ed (or something else that spoild my whol uid/gid stuff). The
latter one doesn't really fit in with Debian Policy Manual - or if it
does, the better this is ;). But it still looks "unclean" ...
Can someone provide me with a somewhat comprehensive approach to this?
Cheers,
Nik
Reply to: