commit b92e20cc3a0c4088c74a7ce4c2b8e20dd7807a16 Author: František Dvořák Date: Mon Jun 30 23:14:41 2014 +0200 Manual pages for glite-lb-logger messaging plugin tools, enable generating from perl Pod. diff --git a/org.glite.lb.logger-msg/Makefile b/org.glite.lb.logger-msg/Makefile index a10569f..2811b66 100644 --- a/org.glite.lb.logger-msg/Makefile +++ b/org.glite.lb.logger-msg/Makefile @@ -26,6 +26,7 @@ VPATH:=${top_srcdir}/src:${top_srcdir}/interface:${top_srcdir}/test:${top_srcdir SOURCES=\ config/msg.* \ + doc/*.8 \ examples/*.cpp \ project/il.conf \ src/*.cpp src/msg-* \ @@ -70,6 +71,8 @@ SOLINK:=libtool --mode=link ${CXX} -module ${LDFLAGS} -rpath ${stagedir}${prefix HDRS:= +MAN8:=glite-lb-msg-brokers.8 glite-lb-msg-config.8 + COMMON_LIB:= EXT_LIB:=${ACTIVEMQ_CPP_LIBS} @@ -93,7 +96,9 @@ endif sysdefaultdir?=${sysconfdir}/default -all compile: ${PLUGIN_LIB} ${EXAMPLES} ${SCRIPTS} +all: man compile + +compile: ${PLUGIN_LIB} ${EXAMPLES} ${SCRIPTS} ${PLUGIN_LIB}: ${PLUGIN_LOBJS} ${SOLINK} -o $@ ${PLUGIN_LOBJS} ${EXT_LIB} -lglite_lb_common${default_flavour} -lglite_jobid -lglite_lbu_log @@ -104,7 +109,7 @@ ${PLUGIN_LIB}: ${PLUGIN_LOBJS} glite-lb-cmsclient: cmsclient.o $(CXX) $< ${EXT_LIB} -o $@ -man: ${MAN_GZ} +man: glite-lb-msg-brokers.8 stage: compile $(MAKE) install PREFIX=${stagedir} @@ -123,12 +128,14 @@ install: -mkdir -p ${DESTDIR}${PREFIX}${prefix}/sbin -mkdir -p ${DESTDIR}${PREFIX}${sysconfdir}/glite-lb -mkdir -p ${DESTDIR}${PREFIX}${sysconfdir}/cron.d + -mkdir -p ${DESTDIR}${PREFIX}${prefix}/share/man/man8 ${INSTALL} -m 644 ${top_srcdir}/config/msg.conf.example ${DESTDIR}${PREFIX}${docdir} ${INSTALL} -m 755 ${PLUGIN_LIB} ${DESTDIR}${PREFIX}${prefix}/${libdir} ${INSTALL} -m 755 ${EXAMPLES} ${DESTDIR}${PREFIX}${prefix}/${libdir}/glite-lb/examples ${INSTALL} -m 755 ${top_srcdir}/src/msg-brokers ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-msg-brokers ${INSTALL} -m 755 msg-config.new ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-msg-config ${INSTALL} -m 644 msg.cron.new ${DESTDIR}${PREFIX}${sysconfdir}/cron.d/glite-lb-logger-msg + ${INSTALL} -m 644 glite-lb-msg-brokers.8 ${top_srcdir}/doc/*.8 ${DESTDIR}${PREFIX}${prefix}/share/man/man8 %.lo %.o: %.cpp ${COMPILEXX} -c $< -o $@ @@ -139,8 +146,13 @@ install: clean: rm -rvf .libs/ *.o *.lo ${PLUGIN_LIB} ${MAN_GZ} ${EXAMPLES} ${SCRIPTS} rm -rvf dist ${package}-*.tar.gz + rm -fv glite-lb-msg-brokers.8 distclean: rm -rvf project/changelog Makefile.inc *.spec debian/ +glite-lb-msg-brokers.8: msg-brokers + perldoc -M Pod::Man $< > $@ + sed -i 's/^\.TH.*/.TH GLITE-LB-MSG-BROKERS 8 "June 2014" "CESNET" "Logging\&Bookkeeping"/' $@ + .PHONY: default all compile man stage check install clean dist distclean distcheck diff --git a/org.glite.lb.logger-msg/doc/glite-lb-msg-config.8 b/org.glite.lb.logger-msg/doc/glite-lb-msg-config.8 new file mode 100644 index 0000000..032d2a9 --- /dev/null +++ b/org.glite.lb.logger-msg/doc/glite-lb-msg-config.8 @@ -0,0 +1,53 @@ +.TH GLITE_LB_MSG_CONFIG 8 "June 2014" "CESNET" "Logging&Bookkeeping" + + +.SH NAME +glite-lb-msg-config - glite-lb-logger messaging plugin configuration generator + + +.SH SYNOPSIS +\fBglite-lb-msg-config\fR \fITEMPLATE\fR [\fITARGET\fR] + + +.SH DESCRIPTION +\fBglite-lb-msg-config\fR is a script for generating or updating glite-lb-logger messaging plugin configuration. Configuration parameters can be specified by environment variables. \fITEMPLATE\fR is the original configuration file, basic content is generated in case the original doesn't exist. \fITARGET\fR is the target configuration file. If \fITARGET\fR is not specified, the \fITEMPLATE\fR is modified instead. + +This script is intended primarily to be run by cron, but can be run manually by site admins to avoid waiting for the next cron cycle. + + +.SH ENVIRONMENT + +.TP +.B GLITE_LOCATION \fR[prefix] +Standard prefix (typically /usr). + +.TP +.B GLITE_LB_MSG_BROKER \fR[] +The special values are: \fBfalse\fR (do nothing), \fBauto\fR (refresh messaging brokers from BDII), \fBonce\fR (refresh messaging brokers only when \fB$GLITE_LB_SETUP\fR is not set). Empty value means \fBauto\fR, any other values means broker URL list. + +For refreshing messaging brokers the \fBglite-lb-msg-brokers\fR(8) utility is called. + +.TP +.B GLITE_LB_MSG_NETWORK \fR[PROD] +Let \fBglite-lb-msg-brokers\fR(8) search only in specified network. Typical values are PROD or TEST-NWOB. + +.TP +.B LCG_GFAL_INFOSYS \fR[lcg-bdii.cern.ch:2170] +\fIhost\fR[:\fIport\fR] of the BDII server. + +.TP +.B GLITE_LB_SETUP \fR[] +Helper variable. It should be set, when this configuration generator is called during setup stage (when \fBonce\fR value in \fB$GLITE_LB_MSG_BROKER\fR should trigger BDII search). + + +.SH BUGS +Please report all bugs to CESNET gLite L&B issue tracker available at +.I https://github.com/CESNET/glite-lb/issues + + +.SH AUTHORS +L&B Product Team, CESNET. + + +.SH SEE ALSO +\fBglite-lb-msg-brokers\fR(8) diff --git a/org.glite.lb.logger-msg/project/debian.glite-lb-logger-msg.install b/org.glite.lb.logger-msg/project/debian.glite-lb-logger-msg.install index 345a6cf..5a22e86 100644 --- a/org.glite.lb.logger-msg/project/debian.glite-lb-logger-msg.install +++ b/org.glite.lb.logger-msg/project/debian.glite-lb-logger-msg.install @@ -2,3 +2,4 @@ etc/cron.d/* usr/lib/activemq_cpp_plugin.so* usr/lib/glite-lb/examples/* usr/sbin/glite-lb-msg-* +usr/share/man/man8/* diff --git a/org.glite.lb.logger-msg/project/glite-lb-logger-msg.spec b/org.glite.lb.logger-msg/project/glite-lb-logger-msg.spec index 1b94beb..884aad0 100644 --- a/org.glite.lb.logger-msg/project/glite-lb-logger-msg.spec +++ b/org.glite.lb.logger-msg/project/glite-lb-logger-msg.spec @@ -26,7 +26,11 @@ BuildRequires: glite-lbjp-common-log-devel BuildRequires: glite-lbjp-common-trio-devel BuildRequires: libtool BuildRequires: perl +%if 0%{?rhel} >= 7 || 0%{?fedora} +BuildRequires: perl-Pod-Perldoc +%endif BuildRequires: perl(Getopt::Long) +BuildRequires: perl(Pod::Man) BuildRequires: perl(POSIX) BuildRequires: pkgconfig Requires: crontabs @@ -70,6 +74,7 @@ rm -rf %{buildroot} %{_libdir}/activemq_cpp_plugin.so.0.0.0 %{_libdir}/glite-lb/examples/glite-lb-cmsclient %{_sbindir}/glite-lb-msg-* +%{_mandir}/man8/*.8* %changelog diff --git a/org.glite.lb.logger-msg/src/msg-brokers b/org.glite.lb.logger-msg/src/msg-brokers index eea24a9..a330850 100755 --- a/org.glite.lb.logger-msg/src/msg-brokers +++ b/org.glite.lb.logger-msg/src/msg-brokers @@ -1,7 +1,7 @@ #!/usr/bin/perl #+############################################################################## # # -# File: msg-brokers # +# File: glite-lb-msg-brokers # # # # Description: manipulate messaging brokers information # # # @@ -274,17 +274,15 @@ __END__ =head1 NAME -msg-brokers - manipulate messaging brokers information +glite-lb-msg-brokers - manipulate messaging brokers information =head1 SYNOPSIS -B [I] B|B +B [I] B|B =head1 DESCRIPTION -B has three different modes of operation. In all cases, -it manipulates information about messaging brokers and reports a -(possibly empty) list of broker URIs, one per line. +B has two different modes of operation. In all cases, it manipulates information about messaging brokers and reports a (possibly empty) list of broker URIs, one per line. =over @@ -336,11 +334,11 @@ show the complete man page =item B<--network> I -consider only the brokers for this network +consider only the brokers for this network (for example PROD or TEST-NWOB) =item B<--quiet>, B<-q> -supress the printing of warnings +suppress the printing of warnings =item B<--sort>, B<-s> @@ -348,10 +346,27 @@ sort the brokers per elapsed time to perform the test =back -=head1 SEE ALSO +=head1 ENVIRONMENT -L +=over + +=item B + +I[:I] of the BDII to contact + +=back -=head1 AUTHOR +=head1 BUGS + +Please report all bugs to CESNET gLite L&B issue tracker available at +I + +=head1 AUTHORS Lionel Cons L + +L&B Product Team, CESNET L + +=head1 SEE ALSO + +L