* [PATCH] chunkd: configure now detects location of cld program
@ 2009-07-29 21:26 Matthew Farrellee
2009-07-30 1:35 ` Jeff Garzik
2009-07-30 1:43 ` Jeff Garzik
0 siblings, 2 replies; 7+ messages in thread
From: Matthew Farrellee @ 2009-07-29 21:26 UTC (permalink / raw)
To: hail-devel
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.
Signed-off-by: Matthew Farrellee <matt@redhat.com>
---
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
diff --git a/configure.ac b/configure.ac
index 7e51b84..942d446 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/test/Makefile.am b/test/Makefile.am
index cc84187..4221b9f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,6 +7,7 @@ EXTRA_DIST = \
server-test.cfg \
prep-db \
start-daemon \
+ start-daemon.real \
pid-exists \
daemon-running \
stop-daemon \
diff --git a/test/start-daemon b/test/start-daemon
index 7d21e2f..74333d9 100755
--- a/test/start-daemon
+++ b/test/start-daemon
@@ -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
diff --git a/test/start-daemon.real.in b/test/start-daemon.real.in
new file mode 100644
index 0000000..2e1df1d
--- /dev/null
+++ b/test/start-daemon.real.in
@@ -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
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-29 21:26 [PATCH] chunkd: configure now detects location of cld program Matthew Farrellee
@ 2009-07-30 1:35 ` Jeff Garzik
2009-07-30 14:27 ` Matthew Farrellee
2009-07-30 1:43 ` Jeff Garzik
1 sibling, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2009-07-30 1:35 UTC (permalink / raw)
To: Matthew Farrellee; +Cc: hail-devel
Matthew Farrellee wrote:
> 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.
>
> Signed-off-by: Matthew Farrellee <matt@redhat.com>
> ---
> 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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-29 21:26 [PATCH] chunkd: configure now detects location of cld program Matthew Farrellee
2009-07-30 1:35 ` Jeff Garzik
@ 2009-07-30 1:43 ` Jeff Garzik
2009-07-30 14:28 ` Matthew Farrellee
1 sibling, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2009-07-30 1:43 UTC (permalink / raw)
To: Matthew Farrellee; +Cc: hail-devel
Matthew Farrellee wrote:
> 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.
>
> Signed-off-by: Matthew Farrellee <matt@redhat.com>
> ---
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-30 1:35 ` Jeff Garzik
@ 2009-07-30 14:27 ` Matthew Farrellee
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Farrellee @ 2009-07-30 14:27 UTC (permalink / raw)
To: Jeff Garzik; +Cc: hail-devel
Jeff Garzik wrote:
> Matthew Farrellee wrote:
>> 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.
>>
>> Signed-off-by: Matthew Farrellee <matt@redhat.com>
>> ---
>> 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?
Indeed. I hadn't gotten to compiling tabled yet.
Best,
matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-30 1:43 ` Jeff Garzik
@ 2009-07-30 14:28 ` Matthew Farrellee
2009-07-30 20:46 ` Jeff Garzik
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Farrellee @ 2009-07-30 14:28 UTC (permalink / raw)
To: Jeff Garzik; +Cc: hail-devel
Jeff Garzik wrote:
> Matthew Farrellee wrote:
>> 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.
>>
>> Signed-off-by: Matthew Farrellee <matt@redhat.com>
>> ---
>> 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
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-30 14:28 ` Matthew Farrellee
@ 2009-07-30 20:46 ` Jeff Garzik
2009-07-30 21:34 ` Matthew Farrellee
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2009-07-30 20:46 UTC (permalink / raw)
To: Matthew Farrellee; +Cc: hail-devel
Matthew Farrellee wrote:
> Jeff Garzik wrote:
>> Matthew Farrellee wrote:
>>> 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.
>>>
>>> Signed-off-by: Matthew Farrellee <matt@redhat.com>
>>> ---
>>> 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
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] chunkd: configure now detects location of cld program
2009-07-30 20:46 ` Jeff Garzik
@ 2009-07-30 21:34 ` Matthew Farrellee
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Farrellee @ 2009-07-30 21:34 UTC (permalink / raw)
To: Jeff Garzik; +Cc: hail-devel
Jeff Garzik wrote:
> Matthew Farrellee wrote:
>> Jeff Garzik wrote:
>>> Matthew Farrellee wrote:
>>>> 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.
>>>>
>>>> Signed-off-by: Matthew Farrellee <matt@redhat.com>
>>>> ---
>>>> 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
>>
>> 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
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-30 21:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 21:26 [PATCH] chunkd: configure now detects location of cld program Matthew Farrellee
2009-07-30 1:35 ` Jeff Garzik
2009-07-30 14:27 ` Matthew Farrellee
2009-07-30 1:43 ` Jeff Garzik
2009-07-30 14:28 ` Matthew Farrellee
2009-07-30 20:46 ` Jeff Garzik
2009-07-30 21:34 ` Matthew Farrellee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.