We are creating a simple binary package for a war file and some scripts using dpkg-deb.
One issue is that say we are doing this as a local user called "goofy", then the files in the package will be owned by goofy.
When we later try to install this package as root, we were surprised that the files it put in /opt/ourpackage were all still owned by goofy.
Now goofy user wont exist on most peoples machines, so what is the best way to handle this?
We assume there are two options:
- make all the files be owned by a user we can assume exists on all servers - i.e. root.
- create some pre-installation scripts which create the goofy (or appropriate) user first.
What method is recommended?
IF the answer is 2, does anyone have any tried and tested scripts we could add to the package to do this?
We would have chosen option1, but this is hampered by the fact that the "user" who will be creating and building the packages is jenkins, so cant easily create files owned by root.