chunkd: configure now detects location of cld program
PATCH 1/1 chunkd: configure now detects location of cld program
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.
--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.in
configure.ac +19 -0
@@ -80,6 +80,24 @@ AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) AC_CHECK_LIB(socket, bind, SOCKET_LIBS=-lsocket) PKG_CHECK_MODULES(CLDC, libcldc) +dnl ----------------------------- +dnl Check for cld program, used +dnl in the test process. +dnl +dnl Either use pkg-config or +dnl define CLDC_PREFIX in +dnl configure's environment. +dnl ----------------------------- +_PKG_CONFIG([CLDC_PREFIX], [variable=prefix], [libcldc]) +AS_IF([test "x$pkg_failed" = xyes], + [AC_WARN([No CLDC_PREFIX defined, using /usr]) + CLDC_PREFIX="/usr"], + [CLDC_PREFIX=$pkg_cv_CLDC_PREFIX]) +AC_PATH_PROG([CLDC_CMD], [cld], [no], + [$PATH$PATH_SEPARATOR$CLDC_PREFIX/bin$PATH_SEPARATOR$CLDC_PREFIX/sbin$PATH_SEPARATOR$CLDC_PREFIX/libexec]) +AS_IF([test "x$CLDC_CMD" = xno], + [AC_MSG_ERROR([Missing cld program])]) + dnl ------------------------------------- dnl Checks for optional library functions dnl -------------------------------------
@@ -111,5 +129,6 @@ AC_CONFIG_FILES([doc/Makefile include/Makefile server/Makefile test/Makefile + test/start-daemon.real Makefile]) AC_OUTPUT
test/Makefile.am +1 -0
@@ -7,6 +7,7 @@ EXTRA_DIST = \ server-test.cfg \ prep-db \ start-daemon \ + start-daemon.real \ pid-exists \ daemon-running \ stop-daemon \
test/start-daemon +1 -19
@@ -1,21 +1,3 @@ #!/bin/sh -if [ -f cld.pid ] -then - echo "cld.pid file found. daemon still running?" - exit 1 -fi -if [ -f chunkd.pid ] -then - echo "chunkd.pid file found. daemon still running?" - exit 1 -fi - -# May be different on Solaris... like /usr/libexec or such. -cld -d data/cld -P cld.pid -p 18081 - -../server/chunkd -C $top_srcdir/test/server-test.cfg -E $* - -sleep 3 - -exit 0 +exec sh ./start-daemon.real
test/start-daemon.real.in new file +20 -0
@@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -f cld.pid ] +then + echo "cld.pid file found. daemon still running?" + exit 1 +fi +if [ -f chunkd.pid ] +then + echo "chunkd.pid file found. daemon still running?" + exit 1 +fi + +@CLDC_CMD@ -d data/cld -P cld.pid -p 18081 + +../server/chunkd -C $top_srcdir/test/server-test.cfg -E $* + +sleep 3 + +exit 0
Signature · 1 line
1.6.0.6
Jeff Garzik
AppliedQuoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.
Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.in
applied
wanna gen a patch for tabled as well?
Quoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.
Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.in
oh, FYI: this missed updating test/.gitignore to tell git to ignore the generated file.
Typically you want to run "git status" after builds and such, to make sure that git is aware of the status of all files (in repo, or ignored).
Running "git status" is a good habit to get into. At least for me, I have sent out patches that accidentally omit newly added files, because I forgot to run "git status".
Thanks!
Jeff
Quoted 14 lines · Jeff Garzik
Quoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.in
Quoted 3 lines
applied
wanna gen a patch for tabled as well?
Indeed. I hadn't gotten to compiling tabled yet.
Best,
matt
Quoted 20 lines · Jeff Garzik
Quoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.inoh, FYI: this missed updating test/.gitignore to tell git to ignore the generated file.
Typically you want to run "git status" after builds and such, to make sure that git is aware of the status of all files (in repo, or ignored).
Quoted 7 lines
Running "git status" is a good habit to get into. At least for me, I have sent out patches that accidentally omit newly added files, because I forgot to run "git status".
Thanks!
Jeff
So, I do run git status, but my normal workflow does not include heavy use of .gitignore.
I'm actually not a fan of this use of .gitignore, mostly because I like git clean as a means to reset things.
Best,
matt
Quoted 24 lines · Matthew Farrellee
Quoted 23 lines · Jeff Garzik
Quoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.inoh, FYI: this missed updating test/.gitignore to tell git to ignore the generated file.
Typically you want to run "git status" after builds and such, to make sure that git is aware of the status of all files (in repo, or ignored).
Running "git status" is a good habit to get into. At least for me, I have sent out patches that accidentally omit newly added files, because I forgot to run "git status".
Quoted 7 lines
Quoted 3 lines
Thanks!
Jeff
So, I do run git status, but my normal workflow does not include heavy use of .gitignore.
I'm actually not a fan of this use of .gitignore, mostly because I like git clean as a means to reset things.
I hear ya :) But we do have non-git tarball users, which implies that "make distclean" should clean everything... which implies truly needing to use 'git clean' is more a bug than a feature.
I wouldn't ask you to change your workflow, but 'git status' and 'make distclean' are the norm for these projects (as well as the kernel, where we have the actual git author critique us :))
Jeff
Quoted 39 lines · Jeff Garzik
Quoted 26 lines · Matthew Farrellee
Quoted 25 lines · Jeff Garzik
Quoted 4 lines · Matthew Farrellee
make check attempts to start cld, but cannot find it if it is not already in PATH. This patch uses
CLDC_PREFIX, possibly from pkg-config, to detect the location of cld with configure.Quoted 8 lines
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 19 +++++++++++++++++++ test/Makefile.am | 1 + test/start-daemon | 20 +------------------- test/start-daemon.real.in | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 test/start-daemon.real.inoh, FYI: this missed updating test/.gitignore to tell git to ignore the generated file.
Typically you want to run "git status" after builds and such, to make sure that git is aware of the status of all files (in repo, or ignored).
Running "git status" is a good habit to get into. At least for me, I have sent out patches that accidentally omit newly added files, because I forgot to run "git status".
Thanks!
Quoted 7 lines
Quoted 1 line
Jeff
So, I do run git status, but my normal workflow does not include heavy use of .gitignore.
I'm actually not a fan of this use of .gitignore, mostly because I like git clean as a means to reset things.
I hear ya :) But we do have non-git tarball users, which implies that
"make distclean" should clean everything... which implies truly
needing to use 'git clean' is more a bug than a feature.
Quoted 5 lines
I wouldn't ask you to change your workflow, but 'git status' and 'make distclean' are the norm for these projects (as well as the kernel, where we have the actual git author critique us :))
Jeff
I'd be nice if git-clean could be told to ignore the ignore file, ha. distclean doesn't clean up autotool file, like configure.
Best,
matt