I'm using fpm to create a deb package, but when I install that deb package, it is installed into the wrong location, my fpm command is:
fpm -f -s "dir" -t "deb" -a "all" -n "my_project" -v 1 -C "/tmp/tmpjWTuVp" /tmp/tmpjWTuVp/my_project
The folder i want to package up exists at /tmp/tmpjWTuVp/my_project
, but every time i install it with:
dpkg -i my_package.deb
it installs it into /tmp/tmpjWTuVp/my_project
, ideally i'd like it to install into /var/lib/my_project
. I have tried --installdir
and --root
with my dpkg
command, but it complains with cannot access archive: No such file or directory
Other information:
fpm
and happy to hear other viable suggestionsmy_project
is a python virtualenv
and my django projectI have randomly found the answer to this immediately after writing this question...
basically the last, unnamed argument within the fpm command can contain an equals separator which defines the directory to come from, and to install to, so the command I ended up using was:
fpm -f -s "dir" -t "deb" -a "all" -n "my_project" -v 1 -C "/tmp/tmpjWTuVp" my_project=/var/lib/my_project
Notice the my_project=/var/lib/my_project
, the left side is the directory name of my project (relative, because I used -C
to change directory to /tmp/tmpjWTuVp
before looking for packages) and on the right side is where I want to install to on the remote machine...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With