Is it possible to set home dir?

Asked by Artem

Some build tools may need "$HOME/.config" directory to store their settings. However looking in user environments list in buildlog gives HOME=/sbuild-nonexistent. This crashs my build. As example:

lazbuild --pcp=/tmp/.lazarus hellolazgui.lpi
SetPrimaryConfigPath NewValue="/tmp/.lazarus" -> "/tmp/.lazarus"
CopySecondaryConfigFile /etc/lazarus/environmentoptions.xml -> /tmp/.lazarus/environmentoptions.xml
InitializeFppkg failed: Unable to create file "/sbuild-nonexistent/.config/fppkg.cfg": No such file or directory <-----------
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Px86_64" "-Tlinux"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Px86_64" "-Tlinux"
Error: (lazbuild) Broken dependency: lazbarcodes
make[1]: *** [debian/rules:16: override_dh_auto_build] Error 3
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:25: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

I tried to create home dir manually, but have no luck:
usermod -d /tmp/home/ buildd
usermod: user buildd is currently used by process 11417

Any ideas how to solve this problem?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Best Colin Watson (cjwatson) said :
#1

Try just exporting a different value of HOME from your debian/rules (see the documentation for "make" if you don't know how to do that). You shouldn't normally need to run usermod.

Revision history for this message
Artem (artem78) said :
#2

Thanks Colin Watson, that solved my question.