Date: Mon, 02 Jul 2001 01:02:22 +0200 From: Cynic <cynic@mail.cz> To: freebsd-ports@freebsd.org, dwcjr@FreeBSD.org Subject: samba port install failure... general question Message-ID: <5.1.0.14.2.20010701231030.020399d0@mail.cz>
next in thread | raw e-mail | index | archive | help
Hi there, (I'm sending this to dwcjr because this is a "your port is broken" mail, and to freebsd-ports@ because it deviated into general ports discussion. Apologies if this is a misbehavior.) excuse me if this question is stupid, but here it is: is there a reason for a port to assume it's installed in /usr/local? I just tried to build samba-devel, and it failed, because there's no /usr/local/samba/share/ (the command line was # make PREFIX="/usr/local/samba" install, Makefile contains post-install: ${MKDIR} ${PREFIX}/share/examples/samba and other things like that, and # make install failed with Installing SWAT in /usr/local/samba/share/swat Installing the Samba Web Administration Tool mkdir: /usr/local/samba/share: No such file or directory Failed to make directory /usr/local/samba/share/swat, does root have privileges? I tried to workaround the limitation with this: [toor(root)@freepuppy samba-devel]# mkdir /usr/local/samba/share [toor(root)@freepuppy samba-devel]# make clean [toor(root)@freepuppy samba-devel]# make PREFIX="/usr/local/samba" build [toor(root)@freepuppy samba-devel]# make install (...) ===> Generating temporary packing list /bin/mkdir -p /usr/local/share/examples/samba /bin/cp -rp /usr/ports/net/samba-devel/work/samba-2.2.0a/examples/* /usr/local/share/examples/samba Installing /usr/local/etc/rc.d/samba.sh.sample startup file. install -c -o root -g wheel -m 555 /usr/ports/net/samba-devel/work/samba-2.2.0a/source/script/mksmbpasswd.sh /usr/local/bin/make_smbpasswd if [ ! -d /usr/local/private ] ; then /bin/mkdir -p /usr/local/private ; /usr/sbin/chown root:wheel /usr/local/private ; fi /bin/chmod 700 /usr/local/private if [ ! -f /usr/local/private/smbpasswd ] ; then /bin/cat /etc/passwd | /usr/local/bin/make_smbpasswd > /usr/local/private/smbpasswd ; /bin/chmod 600 /usr/local/private/smbpasswd ; fi /bin/chmod 500 /usr/local/private /usr/sbin/chown root:wheel /usr/local/bin/smbpasswd chown: /usr/local/bin/smbpasswd: No such file or directory *** Error code 1 Stop in /usr/ports/net/samba-devel. *** Error code 1 Stop in /usr/ports/net/samba-devel. *** Error code 1 Stop in /usr/ports/net/samba-devel. So, as you can see, it relies on /usr/local heavily all over the place. Should I patch the Makefile? I'm no expert, but I can try. If it'd be welcome, do you know of any port that does it the "right" way, so that I can look at an example? Note: I read http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html and instead of clarification I'm confused even more. It says that ports' makefiles should be written relative to ${PREFIX}, but this means that instead installing man pages etc. in /usr/local/man and share/doc/<port> (as specified in hier(7)) these will be installed in ${PREFIX} subdirs, and that only if the install doesn't break... So... I'm confused - should port documentation be installed in /usr/local/share/doc/<port> or in ${PREFIX}/share/doc/<port>, no matter what ${PREFIX} contains? Even if the latter was true, I think that /urs/ports/Mk/bsd.port.mk should check whether ${PREFIX} already contains name of the software, and modify the paths accordingly (i. e. instead of /usr/local/samba/share/doc/samba it should install stuff in /usr/local/samba/share/doc). Of course, this would mean one would have to modify their environment, or the framework would have to append to /etc/manpath.config etc... Which doesn't look very nice. BTW, samba-devel and samba aren't the only two ports assuming you install them with default PREFIX (="/usr/local"). Another one I can say this about for sure is ngrep. cynic@mail.cz ------------- And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20010701231030.020399d0>