Subject: Re: pkg/31899: Linux-related fixes to mk/sandbox and mk/tools
To: None <gnats-bugs@netbsd.org>
From: grant beattie <grant@NetBSD.org>
List: pkgsrc-bugs
Date: 10/27/2005 20:02:56
On Wed, Oct 26, 2005 at 11:35:02PM +0000, Jeremy C. Reed wrote:

> The following reply was made to PR pkg/31899; it has been noted by GNATS.
> 
> From: "Jeremy C. Reed" <reed@reedmedia.net>
> To: gnats-bugs@netbsd.org
> Cc: svs@ropnet.ru
> Subject: Re: pkg/31899: Linux-related fixes to mk/sandbox and mk/tools
> Date: Wed, 26 Oct 2005 16:34:14 -0700 (PDT)
> 
>  On Sun, 23 Oct 2005, Sergey Svishchev wrote:
>  
>  > Also, su is in /bin, not /usr/bin, which matters for rc.subr:
>  >
>  > --- pkgtools/rc.subr/files/rc.subr	11 Oct 2004 19:32:14 -0000	1.5
>  > +++ pkgtools/rc.subr/files/rc.subr	3 Oct 2005 12:26:16 -0000
>  > @@ -56,7 +56,7 @@
>  >  _RCCMD_rcs="/usr/bin/rcs"
>  >  _RCCMD_rm="/bin/rm"
>  >  _RCCMD_sh="/bin/sh"
>  > -_RCCMD_su="/usr/bin/su"
>  > +_RCCMD_su="/bin/su"
>  
>  This should be later in the file -- down in the "Linux)" section -- 
>  instead of for all.
>  
>  Better yet, it should just use the settings as defined by pkgsrc build 
>  system itself. And use FILES_SUBST. For example, SU contains the path to 
>  su (as defined in mk/platform/Linux.mk).
>  
>  I already suggested this and did work on this. I didn't get okay to 
>  commit, so my changes (now quite old) are in pkgsrc-wip's wip/rc.subr.
>  
>  This would also help simplify the rc.subr script provided by the package. 
>  (I don't see any need for the rc.subr script to be used on different 
>  platforms so paths can be hard-coded.)

indeed, the locations of the binaries in question are *not* fixed, so
any hardcoded path change to a different hardcoded path is wrong.

I agree with Jeremy here, the values should be sourced from pkgsrc
itself, as it contains the logic to determine the location of various
tools.

grant.