[torquedev] long configure args in pbs_server

Garrick Staples garrick at usc.edu
Wed Jan 14 19:08:48 MST 2009


Someone brought up an issue a few months ago that having a lot of configure
arguments broke strict builds of pbs_server because the string was too long.

I've had these changes sitting around in my svn repo and I don't know what to
do with them.  They seem goofy to me, but it works.

There are some other associated changes, but this is the meat of it.


$ svn diff buildutils/ac_create_generic_config.m4 src/server/pbsd_main.c
Index: buildutils/ac_create_generic_config.m4
===================================================================
--- buildutils/ac_create_generic_config.m4      (revision 2659)
+++ buildutils/ac_create_generic_config.m4      (working copy)
@@ -56,6 +56,7 @@
 echo 'target="'$target'"' >>$F
 echo 'host="'$host'"' >>$F
 echo 'build="'$build'"' >>$F
+echo 'ac_configure_args="'$ac_configure_args'"' >>$F
 echo 'hardcode_libdir_flag="'`eval echo $hardcode_libdir_flag_spec`'"' >>$F
 echo 'sys_lib_dlsearch_path="'`eval echo $sys_lib_dlsearch_path_spec`'"' >>$F
 echo 'case " $sys_lib_dlsearch_path " in' >>$F
@@ -108,6 +109,7 @@
 echo '  --host)                  o="$o $host" ;;' >>$F
 echo '  --build)                 o="$o $build" ;;' >>$F
 echo '  --data)                  o="$o -I$datadir/$package" ;;' >>$F
+echo '  --ac_configure_args)                  o="$o $ac_configure_args" ;;' >>$F
 echo '  --pkgdatadir)            o="$o $datadir/$package" ;;' >>$F
 echo '  --pkgdatainc)            o="$o -I$datadir/$package" ;;' >>$F
 echo '  --pkgdatalib)            o="$o -L$datadir/$package" ;;' >>$F
Index: src/server/pbsd_main.c
===================================================================
--- src/server/pbsd_main.c      (revision 2659)
+++ src/server/pbsd_main.c      (working copy)
@@ -91,6 +91,7 @@
 #if (PLOCK_DAEMONS & 1)
 #include <sys/lock.h>
 #endif /* PLOCK_DAEMONS */
+#include <sys/wait.h>
 #include <netinet/in.h>
 #include "pbs_ifl.h"
 #include <assert.h>
@@ -542,7 +543,6 @@
           {
           printf("package:     %s\n", PACKAGE_STRING);
           printf("sourcedir:   %s\n", PBS_SOURCE_DIR);
-          printf("configure:   %s\n", PBS_CONFIG_ARGS);
           printf("buildcflags: %s\n", PBS_CFLAGS);
           printf("buildhost:   %s\n", PBS_BUILD_HOST);
           printf("builddate:   %s\n", PBS_BUILD_DATE);
@@ -552,6 +552,13 @@
           printf("serverhome:  %s\n", PBS_SERVER_HOME);
           printf("version:     %s\n", PACKAGE_VERSION);
 
+          printf("configure:   ");
+          if (fork()) {
+             execl(BINDIR "/pbs-config",BINDIR "/pbs-config","--ac_configure_args",NULL);
+             printf("Unable to exec %s\n",BINDIR "/pbs-config");
+             exit(EXIT_FAILURE);
+          }
+          wait(NULL);
           exit(0);
           }
 

-- 
Garrick Staples, GNU/Linux HPCC SysAdmin
University of Southern California

See the Prop 8 Dishonor Roll at http://www.californiansagainsthate.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20090114/65c816f9/attachment.bin


More information about the torquedev mailing list