build.sh fails with permission denied on a systemd based system
Running build with user privileges fails at the stage of building app/xdm
. The error is
/usr/bin/mkdir -p '/usr/lib/systemd/system'
/usr/bin/install -c -m 644 xdm.service '/usr/lib/systemd/system'
/usr/bin/install: cannot create regular file '/usr/lib/systemd/system/xdm.service': Permission denied
make[2]: *** [Makefile:538: install-systemdsystemunitDATA] Error 1
make[2]: Leaving directory '/home/user/xsrc/app/xdm'
make[1]: *** [Makefile:871: install-am] Error 2
make[1]: Leaving directory '/home/user/xsrc/app/xdm'
make: *** [Makefile:565: install-recursive] Error 1
The build.sh
script sets prefix, but systemd unit path is not overriden by it and it still tries to install it to the system directory instead of the prefix (where the write access is assumed).
Running build.sh
with --confflags '--with-systemdsystemunitdir=/home/user/xbuild/lib/systemd/system'
helps, but I believe this kind of settings should be handled by the build system.