use external openais
PATCH 2/8 use external openais
This is an updated version of a patch that has been recently sent to the mailinglist to use external openais. Feel free to ignore it for now.
cman/daemon/Makefile +8 -45
@@ -12,31 +12,25 @@ top_srcdir=.. UNINSTALL=${top_srcdir}/scripts/uninstall.pl -AISDIR=openais20060622 -AISTAG=trunk include ${top_srcdir}/make/defines.mk CFLAGS+= -fPIC -g -I${ccsincdir} -I${incdir} -I${top_srcdir}/config \ -DCMAN_RELEASE_NAME=\"${RELEASE}\" -I../lib -DDEBUG \ - -I ${AISDIR}/${AISTAG}/exec -L ${AISDIR}/${AISTAG}/exec \ - -I ${AISDIR}/${AISTAG}/include + -I /usr/include/openais/totem \ + -I /usr/include/openais \ + -L /usr/lib/openais TARGET=service_cman.lcrso CMAN_OBJS=daemon.o config.o logging.o ais.o commands.o barrier.o cmanccs.o -AIS_LIBS=libSaClm libSaAmf libSaCkpt libSaEvt libSaLck libSaMsg libcpg libais libevs -AIS_HEADERS=cpg.h evs.h openaisCfg.h saAis.h saCkpt.h saClm.h saEvt.h saLck.h saMsg.h -all: ${AISDIR}/${AISTAG}/exec/aisexec ${TARGET} +all: ${TARGET} copytobin: all cp ${TARGET} ${top_srcdir}/bin -service_cman.lcrso: ${CMAN_OBJS} ${AISDIR}/${AISTAG}/exec/aisexec +service_cman.lcrso: ${CMAN_OBJS} $(CC) $(CFLAGS) -shared -Wl,-soname,service_cman.lcrso -o $@ ${CMAN_OBJS} -L../lib -L${ccslibdir} -lccs - cp ${TARGET} ${AISDIR}/${AISTAG}/exec - rm -f openais - ln -sf ${AISDIR} openais daemon.o: daemon.c list.h cnxman-socket.h cnxman-private.h \ daemon.h logging.h commands.h barrier.h cmanccs.h
@@ -63,46 +57,15 @@ logging.o: logging.c list.h cnxman-socket.h cnxman-private.h $(CC) $(CFLAGS) -c -o $@ $< -# Target to download openAIS -${AISDIR}/${AISDIR}.tar.gz: - mkdir -p ${AISDIR} - cd ${AISDIR} && wget http://people.redhat.com/pcaulfie/${AISDIR}.tar.gz - -# Unpack the tarball -${AISDIR}/${AISTAG}: ${AISDIR}/${AISDIR}.tar.gz - cd ${AISDIR} && tar -xzf ${AISDIR}.tar.gz - touch ${AISDIR}/${AISTAG} - -${AISDIR}/${AISTAG}/exec/aisexec: ${AISDIR}/${AISTAG} - cd ${AISDIR}/${AISTAG} && make BUILD_DYNAMIC=1 OPENAIS_BUILD=DEBUG - install: - install -d ${libexecdir} - install -d ${libexecdir}/cman - install ${AISDIR}/${AISTAG}/exec/aisexec ${libexecdir}/cman/ - install ${AISDIR}/${AISTAG}/exec/*.lcrso ${libexecdir}/cman/ - install ${AISDIR}/${AISTAG}/exec/keygen ${sbindir}/ais-keygen - install -d ${incdir} - cd ${AISDIR}/${AISTAG}/include; install ${AIS_HEADERS} ${incdir} - cd ${AISDIR}/${AISTAG}/lib; for i in ${AIS_LIBS}; do \ - install $$i.a $$i.so.1.0 ${libdir}; \ - ln -sf ${libdir}/$$i.so.1.0 ${libdir}/$$i.so.1; \ - ln -sf ${libdir}/$$i.so.1 ${libdir}/$$i.so; \ - done - + install -d ${libdir}/openais/lcrso + install service_cman.lcrso ${libdir}/openais/lcrso/service_cman.lcrso uninstall: - rm -rf ${libexecdir}/cman - ${UNINSTALL} ais-keygen ${sbindir} - ${UNINSTALL} ${AIS_HEADERS} ${incdir} - for i in ${AIS_LIBS}; do \ - ${UNINSTALL} $$i.a $$i.so.1.0 $$i.so.1 $$i.so ${libdir}; done + rm -rf ${libdir}/openais/lcrso/service_cman.lcrso clean: rm -f *.o service_cman.lcrso - rm -rf ${AISDIR}/${AISTAG} - rm -f openais reallyclean: clean - rm -rf ${AISDIR}
group/daemon/Makefile +4 -3
@@ -14,7 +14,9 @@ include ${top_srcdir}/make/defines.mk UNINSTALL=${top_srcdir}/scripts/uninstall.pl -CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ -I../../cman/daemon/openais/trunk/include/ +CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ -I/usr/include/openais + +LDFLAGS+=-L/usr/lib/openais -lcpg TARGET=groupd
@@ -25,8 +27,7 @@ cman.o \ joinleave.o \ main.o \ - ../../cman/lib/libcman.a \ - ../../cman/daemon/openais/trunk/lib/libcpg.a + ../../cman/lib/libcman.a $(CC) $(LDFLAGS) -o $@ $^ app.o: app.c gd_internal.h
group/gfs_controld/Makefile +3 -2
@@ -22,7 +22,9 @@ -I../include/ \ -I../lib/ \ -I../../cman/lib/ \ - -I../../cman/daemon/openais/trunk/include/ + -I/usr/include/openais/ + +LDFLAGS+=-L/usr/lib/openais -lcpg TARGET=gfs_controld
@@ -38,7 +40,6 @@ plock.o \ recover.o \ ../../cman/lib/libcman.a \ - ../../cman/daemon/openais/trunk/lib/libcpg.a \ ../lib/libgroup.a $(CC) $(LDFLAGS) -o $@ $^
PATCH 2/8 use external openais
Fabio,
Thanks for updating the patch. I was meaning to do that, but haven't got to it yet :)
Patrick this should be applied, and then builds of cman can be done when the openais RPM is installed.
Regards
-steve
Quoted 140 lines · Fabio M. Di Nitto
This is an updated version of a patch that has been recently sent to the mailinglist to use external openais. Feel free to ignore it for now.
diff -urNad redhat-cluster-suite-2.20060627~/cman/daemon/Makefile redhat-cluster-suite-2.20060627/cman/daemon/Makefile
cman/daemon/Makefile +8
-45@@ -12,31 +12,25 @@ top_srcdir=.. UNINSTALL=${top_srcdir}/scripts/uninstall.pl -AISDIR=openais20060622 -AISTAG=trunk include ${top_srcdir}/make/defines.mk CFLAGS+= -fPIC -g -I${ccsincdir} -I${incdir} -I${top_srcdir}/config \ -DCMAN_RELEASE_NAME=\"${RELEASE}\" -I../lib -DDEBUG \ - -I ${AISDIR}/${AISTAG}/exec -L ${AISDIR}/${AISTAG}/exec \ - -I ${AISDIR}/${AISTAG}/include + -I /usr/include/openais/totem \ + -I /usr/include/openais \ + -L /usr/lib/openais TARGET=service_cman.lcrso CMAN_OBJS=daemon.o config.o logging.o ais.o commands.o barrier.o cmanccs.o -AIS_LIBS=libSaClm libSaAmf libSaCkpt libSaEvt libSaLck libSaMsg libcpg libais libevs -AIS_HEADERS=cpg.h evs.h openaisCfg.h saAis.h saCkpt.h saClm.h saEvt.h saLck.h saMsg.h -all: ${AISDIR}/${AISTAG}/exec/aisexec ${TARGET} +all: ${TARGET} copytobin: all cp ${TARGET} ${top_srcdir}/bin -service_cman.lcrso: ${CMAN_OBJS} ${AISDIR}/${AISTAG}/exec/aisexec +service_cman.lcrso: ${CMAN_OBJS} $(CC) $(CFLAGS) -shared -Wl,-soname,service_cman.lcrso -o $@ ${CMAN_OBJS} -L../lib -L${ccslibdir} -lccs - cp ${TARGET} ${AISDIR}/${AISTAG}/exec - rm -f openais - ln -sf ${AISDIR} openais daemon.o: daemon.c list.h cnxman-socket.h cnxman-private.h \ daemon.h logging.h commands.h barrier.h cmanccs.h@@ -63,46 +57,15 @@ logging.o: logging.c list.h cnxman-socket.h cnxman-private.h $(CC) $(CFLAGS) -c -o $@ $< -# Target to download openAIS -${AISDIR}/${AISDIR}.tar.gz: - mkdir -p ${AISDIR} - cd ${AISDIR} && wget http://people.redhat.com/pcaulfie/${AISDIR}.tar.gz - -# Unpack the tarball -${AISDIR}/${AISTAG}: ${AISDIR}/${AISDIR}.tar.gz - cd ${AISDIR} && tar -xzf ${AISDIR}.tar.gz - touch ${AISDIR}/${AISTAG} - -${AISDIR}/${AISTAG}/exec/aisexec: ${AISDIR}/${AISTAG} - cd ${AISDIR}/${AISTAG} && make BUILD_DYNAMIC=1 OPENAIS_BUILD=DEBUG - install: - install -d ${libexecdir} - install -d ${libexecdir}/cman - install ${AISDIR}/${AISTAG}/exec/aisexec ${libexecdir}/cman/ - install ${AISDIR}/${AISTAG}/exec/*.lcrso ${libexecdir}/cman/ - install ${AISDIR}/${AISTAG}/exec/keygen ${sbindir}/ais-keygen - install -d ${incdir} - cd ${AISDIR}/${AISTAG}/include; install ${AIS_HEADERS} ${incdir} - cd ${AISDIR}/${AISTAG}/lib; for i in ${AIS_LIBS}; do \ - install $$i.a $$i.so.1.0 ${libdir}; \ - ln -sf ${libdir}/$$i.so.1.0 ${libdir}/$$i.so.1; \ - ln -sf ${libdir}/$$i.so.1 ${libdir}/$$i.so; \ - done - + install -d ${libdir}/openais/lcrso + install service_cman.lcrso ${libdir}/openais/lcrso/service_cman.lcrso uninstall: - rm -rf ${libexecdir}/cman - ${UNINSTALL} ais-keygen ${sbindir} - ${UNINSTALL} ${AIS_HEADERS} ${incdir} - for i in ${AIS_LIBS}; do \ - ${UNINSTALL} $$i.a $$i.so.1.0 $$i.so.1 $$i.so ${libdir}; done + rm -rf ${libdir}/openais/lcrso/service_cman.lcrso clean: rm -f *.o service_cman.lcrso - rm -rf ${AISDIR}/${AISTAG} - rm -f openais reallyclean: clean - rm -rf ${AISDIR}diff -urNad redhat-cluster-suite-2.20060627~/group/daemon/Makefile redhat-cluster-suite-2.20060627/group/daemon/Makefile
group/daemon/Makefile +4
-3@@ -14,7 +14,9 @@ include ${top_srcdir}/make/defines.mk UNINSTALL=${top_srcdir}/scripts/uninstall.pl -CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ -I../../cman/daemon/openais/trunk/include/ +CFLAGS+= -g -I. -I../include/ -I../../cman/lib/ -I../lib/ -I/usr/include/openais + +LDFLAGS+=-L/usr/lib/openais -lcpg TARGET=groupd@@ -25,8 +27,7 @@ cman.o \ joinleave.o \ main.o \ - ../../cman/lib/libcman.a \ - ../../cman/daemon/openais/trunk/lib/libcpg.a + ../../cman/lib/libcman.a $(CC) $(LDFLAGS) -o $@ $^ app.o: app.c gd_internal.hdiff -urNad redhat-cluster-suite-2.20060627~/group/gfs_controld/Makefile redhat-cluster-suite-2.20060627/group/gfs_controld/Makefile
group/gfs_controld/Makefile +3
-2@@ -22,7 +22,9 @@ -I../include/ \ -I../lib/ \ -I../../cman/lib/ \ - -I../../cman/daemon/openais/trunk/include/ + -I/usr/include/openais/ + +LDFLAGS+=-L/usr/lib/openais -lcpg TARGET=gfs_controld@@ -38,7 +40,6 @@ plock.o \ recover.o \ ../../cman/lib/libcman.a \ - ../../cman/daemon/openais/trunk/lib/libcpg.a \ ../lib/libgroup.a $(CC) $(LDFLAGS) -o $@ $^
PATCH 2/8 use external openais
Quoted 10 lines · Steven Dake
Fabio,
Thanks for updating the patch. I was meaning to do that, but haven't got to it yet :)
Patrick this should be applied, and then builds of cman can be done when the openais RPM is installed.
Regards
-steve
Hi Steven,
no problem at all. Just be aware that some bits of the patch are binded to the openais packages i did for ubuntu. They might not be state of the art yet. I also noticed in the previous patch that you asked to ignore (yeah i can't keep my nose out of stuff ;)) that you were changing some include files to be compliant with the openais include layout
-#include "foo.h"
+#include <openais/foo.h>
that i don't have in my tree yet. We should definetely make sure we converge the openais rpm and debs to avoid too much diff over distros.
Thanks
Fabio
Signature · 1 line
I'm going to make him an offer he can't refuse.
PATCH 2/8 use external openais
In reply to Steven DakeQuoted 8 lines · Steven Dake
Fabio,
Thanks for updating the patch. I was meaning to do that, but haven't got to it yet :)
Patrick this should be applied, and then builds of cman can be done when the openais RPM is installed.
Is that RPM ready now?. I have had this patch sitting in my build tree for a while now waiting for the right time to commit it.
Signature · 1 line
patrick
PATCH 2/8 use external openais
Patrick,
The RPM is in fc6-dist for a week or so and should be available through yum updates I think. If not, the SRPM is in the standard place.
Regards
-steve
Quoted 13 lines · Patrick Caulfield
Quoted 8 lines · Steven Dake
Fabio,
Thanks for updating the patch. I was meaning to do that, but haven't got to it yet :)
Patrick this should be applied, and then builds of cman can be done when the openais RPM is installed.
Is that RPM ready now?. I have had this patch sitting in my build tree for a while now waiting for the right time to commit it.