MAKE during pbulk scan

View: New views
8 Messages — Rating Filter:   Alert me  

MAKE during pbulk scan

by Sean Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




Hi:

I've been playing with the pbulk stuff.  When operating
in master mode I get stuff like the following from the
clients.  Turns out MAKE is not set correctly in the
client bmake(s).  Attached is a suggested diff.

Thanks,

-seanb


Scanning...
..........sh: bmake: cannot execute - No such file or
directory
bmake: "../../mk/../../mk/pkg-build-options.mk" line 31:
warning: "echo "";  /home/pbulk/pkg/sbin/pkg_info -K
/home/pbulk/pkg/var/db/pkg -Q PKG_OPTIONS gtk2 2>/dev/null
|| { cd ../../x11/gtk2  && bmake OPSYS=QNX OS_VERSION=6.4.0
LOWER_ARCH=i386 LOWER_OPSYS=qnx
_PKGSRCDIR=/net/pkgsrc.ott.qnx.com/fs/hd0-qnx6-2/home/seanb/svn/community/pkgsrc/HEAD_640/pkgsrc
PKGTOOLS_VERSION=20081002 show-var VARNAME=PKG_OPTIONS; }"
returned non-zero status                  sh: bmake: cannot
execute - No such file or directory

Index: pkgtools/pbulk/files/pbulk/pscan/pscan.c
===================================================================
--- pkgtools/pbulk/files/pbulk/pscan/pscan.c (revision 122)
+++ pkgtools/pbulk/files/pbulk/pscan/pscan.c (working copy)
@@ -51,7 +51,6 @@
 int verbosity;
 
 static const char *bmake_path;
-static const char *bmake_cmd;
 static const char *output_file;
 static const char *pkgsrc_tree;
 
@@ -122,12 +121,6 @@
  usage();
  }
 
- bmake_cmd = strrchr(bmake_path, '/');
- if (bmake_cmd == NULL)
- bmake_cmd = bmake_path;
- else
- ++bmake_cmd;
-
  if (client_port) {
  if (limited_scan != 0 || argc != 1)
  usage();
@@ -161,7 +154,7 @@
 scan_pkglocation(const char *pkg_location)
 {
  const char * extract_pbulk_index[] = {
- bmake_cmd,
+ bmake_path,
  "pbulk-index",
  NULL
  };
@@ -194,7 +187,7 @@
 find_full_tree(void)
 {
  const char * extract_subdir[] = {
- bmake_cmd,
+ bmake_path,
  "show-subdir-var",
  "VARNAME=SUBDIR",
  NULL

Re: MAKE during pbulk scan

by Joerg Sonnenberger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 13, 2008 at 11:01:05PM -0400, Sean Boudreau wrote:
> I've been playing with the pbulk stuff.  When operating
> in master mode I get stuff like the following from the
> clients.  Turns out MAKE is not set correctly in the
> client bmake(s).  Attached is a suggested diff.

Is PREFIX/bin missing in your path? Convention is to only pass the
executable, not the full path via argv[0]. Only case where this should
matter is if PATH is not correct and you will run into a lot of issues
if that is the case.

Joerg

Re: MAKE during pbulk scan

by Sean Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Tue, Oct 14, 2008 at 11:00:12AM +0200, Joerg Sonnenberger wrote:

> On Mon, Oct 13, 2008 at 11:01:05PM -0400, Sean Boudreau wrote:
> > I've been playing with the pbulk stuff.  When operating
> > in master mode I get stuff like the following from the
> > clients.  Turns out MAKE is not set correctly in the
> > client bmake(s).  Attached is a suggested diff.
>
> Is PREFIX/bin missing in your path? Convention is to only pass the
> executable, not the full path via argv[0]. Only case where this should
> matter is if PATH is not correct and you will run into a lot of issues
> if that is the case.

It's set in my 'pbulk' user's .profile but it's not inherited
across the client pbulk-scan as they're started in the
'scan-client-start' script via "ssh user command" which doesn't
run a login shell.

What's the recommend way to set this up?

-seanb

Re: MAKE during pbulk scan

by Joerg Sonnenberger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 14, 2008 at 08:49:02AM -0400, Sean Boudreau wrote:
> It's set in my 'pbulk' user's .profile but it's not inherited
> across the client pbulk-scan as they're started in the
> 'scan-client-start' script via "ssh user command" which doesn't
> run a login shell.

Hm. Right. I guess I have never seen this as the systems I use have it
set included in the global environment. You can either modify the two
start scripts (build and scan) to pass it down explicitly by calling env
on the remote side. Alternatively you can use SendEnv PATH in the ssh
config. I'm not sure if putting it in mk.conf is early enough.

Joerg

Re: MAKE during pbulk scan

by Sean Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 14, 2008 at 03:49:49PM +0200, Joerg Sonnenberger wrote:

> On Tue, Oct 14, 2008 at 08:49:02AM -0400, Sean Boudreau wrote:
> > It's set in my 'pbulk' user's .profile but it's not inherited
> > across the client pbulk-scan as they're started in the
> > 'scan-client-start' script via "ssh user command" which doesn't
> > run a login shell.
>
> Hm. Right. I guess I have never seen this as the systems I use have it
> set included in the global environment. You can either modify the two
> start scripts (build and scan) to pass it down explicitly by calling env
> on the remote side. Alternatively you can use SendEnv PATH in the ssh
> config. I'm not sure if putting it in mk.conf is early enough.
>
Here's what I have.  Do you think it's generally useful?

-seanb

Index: pkgtools/pbulk/files/pbulk/scripts/scan-client-start
===================================================================
--- pkgtools/pbulk/files/pbulk/scripts/scan-client-start (revision 122)
+++ pkgtools/pbulk/files/pbulk/scripts/scan-client-start (working copy)
@@ -12,5 +12,5 @@
 fi
 
 for client in ${scan_clients}; do
- ssh $client "${pscan_prepare} && ${pscan} -c ${master_port_scan} -M ${make} ${pkgsrc}" &
+ ssh $client "${pscan_prepare} && env PATH=\$PATH:${prefix}/bin ${pscan} -c ${master_port_scan} -M ${make} ${pkgsrc}" &
 done
Index: pkgtools/pbulk/files/pbulk/scripts/build-client-start
===================================================================
--- pkgtools/pbulk/files/pbulk/scripts/build-client-start (revision 122)
+++ pkgtools/pbulk/files/pbulk/scripts/build-client-start (working copy)
@@ -12,5 +12,5 @@
 fi
 
 for client in ${build_clients}; do
- ssh $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" &
+ ssh $client "env PATH=\$PATH:${prefix}/bin ${pbuild} -c ${master_port_build} -b ${pbuild_script}" &
 done

Re: MAKE during pbulk scan

by Sean Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 14, 2008 at 12:58:06PM -0400, Sean Boudreau wrote:

> On Tue, Oct 14, 2008 at 03:49:49PM +0200, Joerg Sonnenberger wrote:
> > On Tue, Oct 14, 2008 at 08:49:02AM -0400, Sean Boudreau wrote:
> > > It's set in my 'pbulk' user's .profile but it's not inherited
> > > across the client pbulk-scan as they're started in the
> > > 'scan-client-start' script via "ssh user command" which doesn't
> > > run a login shell.
> >
> > Hm. Right. I guess I have never seen this as the systems I use have it
> > set included in the global environment. You can either modify the two
> > start scripts (build and scan) to pass it down explicitly by calling env
> > on the remote side. Alternatively you can use SendEnv PATH in the ssh
> > config. I'm not sure if putting it in mk.conf is early enough.
> >
>
> Here's what I have.  Do you think it's generally useful?

If not, should a note be mentioned somewhere about this?

-seanb

Re: MAKE during pbulk scan

by Joerg Sonnenberger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 16, 2008 at 09:19:47AM -0400, Sean Boudreau wrote:

> On Tue, Oct 14, 2008 at 12:58:06PM -0400, Sean Boudreau wrote:
> > On Tue, Oct 14, 2008 at 03:49:49PM +0200, Joerg Sonnenberger wrote:
> > > On Tue, Oct 14, 2008 at 08:49:02AM -0400, Sean Boudreau wrote:
> > > > It's set in my 'pbulk' user's .profile but it's not inherited
> > > > across the client pbulk-scan as they're started in the
> > > > 'scan-client-start' script via "ssh user command" which doesn't
> > > > run a login shell.
> > >
> > > Hm. Right. I guess I have never seen this as the systems I use have it
> > > set included in the global environment. You can either modify the two
> > > start scripts (build and scan) to pass it down explicitly by calling env
> > > on the remote side. Alternatively you can use SendEnv PATH in the ssh
> > > config. I'm not sure if putting it in mk.conf is early enough.
> > >
> >
> > Here's what I have.  Do you think it's generally useful?
>
> If not, should a note be mentioned somewhere about this?

I think a note is the better approach. Did you try the .ssh/config
option?

Joerg

Re: MAKE during pbulk scan

by Sean Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Thu, Oct 16, 2008 at 04:50:45PM +0200, Joerg Sonnenberger wrote:

> On Thu, Oct 16, 2008 at 09:19:47AM -0400, Sean Boudreau wrote:
> > On Tue, Oct 14, 2008 at 12:58:06PM -0400, Sean Boudreau wrote:
> > > On Tue, Oct 14, 2008 at 03:49:49PM +0200, Joerg Sonnenberger wrote:
> > > > On Tue, Oct 14, 2008 at 08:49:02AM -0400, Sean Boudreau wrote:
> > > > > It's set in my 'pbulk' user's .profile but it's not inherited
> > > > > across the client pbulk-scan as they're started in the
> > > > > 'scan-client-start' script via "ssh user command" which doesn't
> > > > > run a login shell.
> > > >
> > > > Hm. Right. I guess I have never seen this as the systems I use have it
> > > > set included in the global environment. You can either modify the two
> > > > start scripts (build and scan) to pass it down explicitly by calling env
> > > > on the remote side. Alternatively you can use SendEnv PATH in the ssh
> > > > config. I'm not sure if putting it in mk.conf is early enough.
> > > >
> > >
> > > Here's what I have.  Do you think it's generally useful?
> >
> > If not, should a note be mentioned somewhere about this?
>
> I think a note is the better approach. Did you try the .ssh/config
> option?

SendEnv / AcceptEnv PATH doesn't work.  I see it sent / accepted
but it's still overriden to _PATH_STDPATH when the session starts.
Part of the issue may be that sshd on QNX doesn't have HAVE_LOGIN_CAP.

-seanb
LightInTheBox - Buy quality products at wholesale price!