NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/55257: make and bmake do not work with paths beginning with tildes on variables defined on mk.conf
>Number: 55257
>Category: toolchain
>Synopsis: make and bmake do not work with paths beginning with tildes on variables defined on mk.conf
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed May 13 03:30:00 +0000 2020
>Originator: João Paulo Vinha Bittar
>Release: 9.0
>Organization:
home user
>Environment:
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
If /etc/mk.conf or ~/pkg/etc/mk.conf have beginning tildes on variables, make and bmake throws a message that the directory could not be written.
For example, if WRKOBJDIR=~/WORK instead of WRKOBJDIR=$HOME/WORK, or if DISTDIR=~/DISTFILES instead of DISTDIR=/home/my_name/DISTFILES, or if PACKAGES=~/PACKAGES instead of PACKAGES=${HOME}/PACKAGES, make and bmake cannot fetch the source files, nor build packages neither store the packages built, as they cannot write to paths begining with tildes.
The manual page at https://netbsd.gw.com/cgi-bin/man-cgi?mk.conf+5+NetBSD-current does not say that mk.conf should not have tildes on beginning of paths and the user should use the $HOME or ${HOME} or the full path.
>How-To-Repeat:
1. On a system with NetBSD and pkgsrc installed, run "/usr/pkgsrc/bootstrap/bootstrap --unprivileged" so bmake can be tested. Add ~/pkg/bin:~/pkg/sbin to your PATH environment variable.
2. Edit /mk.conf and ~/pkg/etc/mk.conf to define variables as WRKOBJDIR, DISTDIR and PACKAGES to contain paths beginning with tildes, such as WRKOBJDIR=~/WORK, DISTDIR=~/DISTFILES and PACKAGES=~/PACKAGES.
3. Try to build any package as root with make or as non-root with bmake: They will throw an error they could not write to those paths beginning with tildes.
>Fix:
I do not think there is any need to fix the make and bmake binaries, as we can use $HOME or ${HOME} instead of tildes, as in WRKOBJDIR=$HOME/WORK.
However, the manual page for mk.conf (https://netbsd.gw.com/cgi-bin/man-cgi?mk.conf+5+NetBSD-current) should tell the user to not use tildes and use $HOME on mk.conf, be it at /etc/mk.conf or at ~/pkg/etc/mk.conf.
Home |
Main Index |
Thread Index |
Old Index