bug fix: defaulting to the /share dir causes the PREFIX variable to be ignored

Yarin yarin at warpmail.net
Tue Dec 28 13:47:52 EST 2010


Alright, here's a diff patch for the ./build/install.location included in your v2.0.01 package of MaraDNS.

Released under the two-clause BSD license.

47c47,50
< 	MAN1="/usr/local/share/man/man1"
---
> 	MAN1="$PREFIX/share/man/man1"
> 	if [ ! -d $MAN1 ] ; then
> 		MAN1="/usr/local/share/man/man1"
> 	fi
51c54,57
< 	MAN5="/usr/local/share/man/man5"
---
> 	MAN5="$PREFIX/share/man/man5"
> 	if [ ! -d $MAN5 ] ; then
> 		MAN5="/usr/local/share/man/man5"
> 	fi
54c60,63
< 	MAN8="/usr/local/share/man/man8"
---
> 	MAN8="$PREFIX/share/man/man8"
> 	if [ ! -d $MAN8 ] ; then
> 		MAN8="/usr/local/share/man/man8"
> 	fi



----- Original message -----
From: "Sam Trenholme" <strenholme.usenet at gmail.com>
To: list at maradns.org
Date: Tue, 28 Dec 2010 10:28:39 -0700
Subject: Re: bug fix: defaulting to the /share dir causes the PREFIX variable	to be ignored

> ---------
> Below, is my proposed fix of that part
> ---------
>
> # If the directory that MAN1 points to does not exist
> if [ ! -d $MAN1 ] ; then
>        # Then try the /share directory instead
>        MAN1="$PREFIX/share/man/man1"
> fi
> # Do the same with the MAN5 and MAN8 directories
> if [ ! -d $MAN5 ] ; then
>        MAN5="$PREFIX/share/man/man5"
> fi
> if [ ! -d $MAN8 ] ; then
>        MAN8="$PREFIX/share/man/man8"
> fi
>

Replacing the code in place to find where to put the man pages with
the above code is a bad idea.  Adding the above code, on the other
hand, may actually work, but we should still default to
/usr/local/share/man/whatever (actually, to make it best, try
$PREFIX/man, then try $PREFIX/share/man, then try
/usr/local/share/man, then finally try /usr/local/man)

As an aside, the only platforms I currently support MaraDNS running on
is CentOS 5 and Microsoft Windows.  The reason for this is because
paths to place files, which quite frankly don't matter except that all
the *NIXes should agree on them, are different between Linux and BSD
for no particular good reason.

The best way to get MaraDNS available for your favorite
not-LSB-compliant *NIX is to make a package for your particular
distribution.  This, of course, has the disadvantage that it requires
commitment--said package really needs to be updated whenever I update
MaraDNS (which isn't that frequent since MaraDNS is currently frozen)
with bug fixes.

- Sam



More information about the list mailing list