[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-snmp][PATCH] Cleanup autotools files to produce rpmlint compliant rpms.



Added manpage for libvirtMib_subagent and ChangeLog generation.
---
 INSTALL                      |   48 ------------------------
 INSTALL.1st                  |   48 ++++++++++++++++++++++++
 Makefile.am                  |   17 ++++++++-
 NEWS                         |    3 +
 configure.ac                 |    2 +-
 docs/Makefile.am             |   10 +++++
 docs/libvirtMib_subagent.pod |   84 ++++++++++++++++++++++++++++++++++++++++++
 libvirt-snmp.spec.in         |    4 +-
 8 files changed, 164 insertions(+), 52 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 INSTALL
 create mode 100644 INSTALL.1st
 create mode 100644 docs/Makefile.am
 create mode 100644 docs/libvirtMib_subagent.pod

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index e69de29..0000000
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 31345d8..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,48 +0,0 @@
-To create configure script just run:
-    autoreconf -i
-
-which runs aclocal, autoconf, automake and all other
-GNU Autotools in right order producing configure script,
-Makefile.in, etc.
-
-Then just run:
-    ./configure
-
-which will check for dependencies (see src/README.txt
-for further info).
-
-Now it's time for make:
-    make
-    su -c "make install"
-
-This compile all sources producing runable SNMP subagent
-libvirtMib_subagent, which is installed right after.
-But before we run it, we need to edit /etc/snmp/snmpd.conf
-so it contains this two lines:
-
-rwcommunity public
-master agentx
-
-and then restart snmpd:
-    /etc/init.d/snmpd restart
-
-Now it's the right time to run the subagent (as root):
-    libvirtMib_subagent -f -L
-
-From now on, you can use SNMP tools to manipulate domains.
-E.g. to list domains:
-    snmpwalk -m ALL -v 2c -c public localhost libvirtMIB
-or:
-    snmptable -m ALL -v 2c -c public -Cb localhost libvirtGuestTable
-
-Note -m ALL switch witch load all MIBs installed.
-This is needed since we do have libvirt's MIB in
-the right place, but default it won't be loaded.
-The other way of solving this problem is to edit
-snmp.config, usually located in /etc/snmp/, or
-/usr/local/share/snmp.conf or per-user configuration
-$HOME/.snmp/snmp.conf. Or you can just run:
-    net-snmp-config --snmpconfpath
-
-All you need to do is add:
-    mibs +LIBVIRT-MIB
diff --git a/INSTALL.1st b/INSTALL.1st
new file mode 100644
index 0000000..31345d8
--- /dev/null
+++ b/INSTALL.1st
@@ -0,0 +1,48 @@
+To create configure script just run:
+    autoreconf -i
+
+which runs aclocal, autoconf, automake and all other
+GNU Autotools in right order producing configure script,
+Makefile.in, etc.
+
+Then just run:
+    ./configure
+
+which will check for dependencies (see src/README.txt
+for further info).
+
+Now it's time for make:
+    make
+    su -c "make install"
+
+This compile all sources producing runable SNMP subagent
+libvirtMib_subagent, which is installed right after.
+But before we run it, we need to edit /etc/snmp/snmpd.conf
+so it contains this two lines:
+
+rwcommunity public
+master agentx
+
+and then restart snmpd:
+    /etc/init.d/snmpd restart
+
+Now it's the right time to run the subagent (as root):
+    libvirtMib_subagent -f -L
+
+From now on, you can use SNMP tools to manipulate domains.
+E.g. to list domains:
+    snmpwalk -m ALL -v 2c -c public localhost libvirtMIB
+or:
+    snmptable -m ALL -v 2c -c public -Cb localhost libvirtGuestTable
+
+Note -m ALL switch witch load all MIBs installed.
+This is needed since we do have libvirt's MIB in
+the right place, but default it won't be loaded.
+The other way of solving this problem is to edit
+snmp.config, usually located in /etc/snmp/, or
+/usr/local/share/snmp.conf or per-user configuration
+$HOME/.snmp/snmp.conf. Or you can just run:
+    net-snmp-config --snmpconfpath
+
+All you need to do is add:
+    mibs +LIBVIRT-MIB
diff --git a/Makefile.am b/Makefile.am
index fae2848..36590dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1,16 @@
-SUBDIRS=src/
+SUBDIRS=src/ docs/
+
+EXTRA_DIST = \
+	libvirt-snmp.spec libvirt-snmp.spec.in \
+	autobuild.sh \
+	autogen.sh
+
+rpm: clean
+		@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
+
+.PHONY: gen-Changelog
+gen-ChangeLog:
+		if [ -d .git ]; then \
+			git log --oneline | sed 's/[0-9a-f]* \(.*\)/\1/' > ChangeLog; \
+		fi
+
diff --git a/NEWS b/NEWS
index e69de29..6023f6b 100644
--- a/NEWS
+++ b/NEWS
@@ -0,0 +1,3 @@
+0.0.1: Feb 3 2011:
+    - Initial revision
+    - Basic libvirt functionality (get/set domain status)
diff --git a/configure.ac b/configure.ac
index a5fcb4e..468fb07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,5 +86,5 @@ fi
 
 AC_SUBST([MIB_DIR])
 
-AC_OUTPUT(Makefile src/Makefile libvirt-snmp.spec)
+AC_OUTPUT(Makefile src/Makefile docs/Makefile libvirt-snmp.spec)
 
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..a9c66fb
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,10 @@
+POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
+
+EXTRA_DIST = \
+	libvirtMib_subagent.pod
+
+dist_man1_MANS = libvirtMib_subagent.1
+
+libvirtMib_subagent.1: libvirtMib_subagent.pod
+		$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
+
diff --git a/docs/libvirtMib_subagent.pod b/docs/libvirtMib_subagent.pod
new file mode 100644
index 0000000..96faaab
--- /dev/null
+++ b/docs/libvirtMib_subagent.pod
@@ -0,0 +1,84 @@
+=head1 NAME
+
+libvirtMib_subagent - SNMP subagent for libvirt
+
+=head1 SYNOPSIS
+
+B<libvirtMib_subagent> [I<OPTIONS>] [I<LISTENING ADDRESSES>]
+
+=head1 DESCRIPTION
+
+The B<libvirtMib_subagent> provides SNMP functionality for libvirt.
+Therefore it is now possible to gather and set domain status over
+SNMP from one place. This allows to create views of entire platforms
+end to end.
+
+It communicates with SNMP agent over AgentX protocol (RFC 2741) and
+extends agent's set of infomation provided. Therefore, we need a running
+SNMP agent. This behaviour can be avoided using I<-M> option.
+
+The B<libvirtMib_subagent> understands these I<OPTIONS>:
+
+=over 4
+
+=item B<-f>
+
+Don't fork. Run in foreground.
+
+=item B<-D>[I<token>[,I<...>]]
+
+Turn on debugging output for the given TOKEN(s).
+Without any tokens specified, it defaults to printing
+all the tokens (which is equivalent to the keyword 'C<ALL>').
+You might want to try ALL for extremely verbose output.
+B<Note>: You can't put a space between the B<-D> and the I<token>s.
+
+=item B<-H>
+
+Display a list of configuration file directives
+understood by the agent and then exit.
+
+=item B<-M>
+
+Run as a normal SNMP Agent instead of an AgentX sub-agent.
+
+=item B<-x>I<ADDRESS>
+
+Connect to master agent at ADDRESS (default C</var/agentx/master>). The address
+can either be a Unix domain socket path, or the address of a network interface.
+The format is the same as the format of listening addresses described below. 
+
+=item B<-L>
+
+Do not open a log file; print all messages to stderr.
+
+=back
+
+The last optional I<LISTENING ADDRESSES> specify on which addresses should 
+subagent running in normal SNMP Agent mode listen for incoming requests.
+See B<snmpd> for further information.
+
+=head1 BUGS
+
+Report any bugs discovered to the libvirt community via the mailing list
+"http://libvirt.org/contact.html"; or bug tracker "http://libvirt.org/bugs.html";.
+Alternatively report bugs to your software distributor / vendor.
+
+=head1 AUTHORS
+
+Please refer to the AUTHORS file distributed with libvirt.
+
+=head1 COPYRIGHT
+
+Copyright (C) 2011 Red Hat, Inc., and the authors listed in the
+libvirt-snmp AUTHORS file.
+
+=head1 LICENSE
+
+libvirt-snmp is distributed under the terms of the GNU GPL v3.
+This is free software; see the source for copying conditions.
+There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
+
+=head1 SEE ALSO
+L<snmpd>, L<http://www.libvirt.org>
+
diff --git a/libvirt-snmp.spec.in b/libvirt-snmp.spec.in
index 6082a7a..3a55503 100644
--- a/libvirt-snmp.spec.in
+++ b/libvirt-snmp.spec.in
@@ -6,7 +6,7 @@ Summary:	SNMP functionality for libvirt
 Group:		Development/Libraries
 License:	GPLv3
 URL:		http://libvirt.org
-Source0:	libvirt-snmp-%{version}.tar.gz
+Source0:	http://www.libvirt.org/sources/snmp/libvirt-snmp-%{version}.tar.gz
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:	net-snmp-perl net-snmp net-snmp-utils net-snmp-devel libvirt-devel
@@ -38,7 +38,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/libvirtMib_subagent
 %{_datadir}/snmp/mibs/LIBVIRT-MIB.txt
 %doc README NEWS ChangeLog AUTHORS
-
+%{_mandir}/man1/libvirtMib_subagent.1*
 
 
 %changelog
-- 
1.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]