LINBIT/drbd-utils

Build drbd-utils without sudo privilege

caglarkarahan opened this issue · 1 comments

Dear DRBD comminity,

I am planning to use drbd in my project and I want to compile and build it from drbd-utils repository. I use Ubuntu 20.04 as an environment. While processing make install command, it creates symbolic links and directories into root directory which is also defined as destination directory in Makefile. Is there any way to change destination directory (DESTDIR)? I want to use it without any sudo privilege.

caglar@caglar-VirtualBox:~/Documents/drbd-utils-9.22.0$ make install
make[1]: Entering directory '/home/caglar/Documents/drbd-utils-9.22.0/user/shared'
make[1]: Leaving directory '/home/caglar/Documents/drbd-utils-9.22.0/user/shared'
make[1]: Entering directory '/home/caglar/Documents/drbd-utils-9.22.0/user/v9'
install -d //home/caglar/Documents/drbd-utils/sbin
install -d //home/caglar/Documents/drbd-utils/var/lib/drbd
install -d //home/caglar/Documents/drbd-utils/var/run/drbd
install -d //home/caglar/Documents/drbd-utils/var/lock
if getent group haclient > /dev/null 2> /dev/null ; then	\
	install -g haclient -m 4750 drbdsetup //home/caglar/Documents/drbd-utils/sbin ;	\
	install -g haclient -m 4750 drbdmeta //home/caglar/Documents/drbd-utils/sbin ;	\
	install -m 755 drbdadm //home/caglar/Documents/drbd-utils/sbin ;		\
else								\
	install -m 755 drbdsetup //home/caglar/Documents/drbd-utils/sbin ;		\
	install -m 755 drbdmeta //home/caglar/Documents/drbd-utils/sbin ;		\
	install -m 755 drbdadm //home/caglar/Documents/drbd-utils/sbin ;		\
fi
if test -d //sbin && \
 ! test //sbin -ef //home/caglar/Documents/drbd-utils/sbin ; then		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdsetup //sbin ;		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdmeta //sbin ;		\
	ln -sf /home/caglar/Documents/drbd-utils/sbin/drbdadm //sbin ;		\
fi
ln: failed to create symbolic link '//sbin/drbdsetup': Permission denied
ln: failed to create symbolic link '//sbin/drbdmeta': Permission denied
ln: failed to create symbolic link '//sbin/drbdadm': Permission denied
Makefile:144: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/caglar/Documents/drbd-utils-9.22.0/user/v9'
Makefile:155: recipe for target 'install-tools' failed
make: *** [install-tools] Error 2
rck commented

make install DESTDIR=/whatever