MANIFEST.in | 2 ++
Makefile | 13 +++++++------
README | 9 ++++++---
cas | 4 ++--
cas-admin | 13 +++++++++++++
cas-admin.1 | 23 +++++++++++++++++++++++
cas.spec | 2 +-
lib/cas/util.py | 6 ++++--
setup.py | 2 +-
version | 2 +-
10 files changed, 60 insertions(+), 16 deletions(-)
New commits:
commit 47c2fc4c16485fa67157cf6d5bfe3a61dc2c2275
Author: Adam Stokes <adam(a)conans.battleaxe>
Date: Tue Dec 9 09:41:28 2008 -0500
- build cleanup
diff --git a/MANIFEST.in b/MANIFEST.in
index 02a2061..4b3ea3a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,6 @@
include cas.conf
include cas.1.gz
+include cas-admin.1.gz
include LICENSE
+include README
include version
diff --git a/Makefile b/Makefile
index 6b7193d..a927610 100644
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,12 @@
NAME = cas
VERSION = $(shell echo `awk '{ print $$1 }' version`)
RELEASE = $(shell echo `awk '{ print $$2 }' version`)
-MANPAGE = $(PWD)/cas.1
+MANPAGE1 = $(PWD)/cas.1
+MANPAGE2 = $(PWD)/cas-admin.1
SOURCE1 = version
SOURCE2 = $(PWD)/cas.conf
SOURCE3 = $(PWD)/cas.1.gz
-# $(patsubst %.gz$,%,$(SOURCE3))
+SOURCE4 = $(PWD)/cas-admin.1.gz
all:
@@ -15,12 +16,12 @@ all:
tarball: clean
@echo "Creating archive"
- @echo ${$(SOURCE3)%.gz}
- @test -f $(SOURCE3) || gzip -c $(MANPAGE) > $(SOURCE3)
+ @test -f $(SOURCE3) || gzip -c $(MANPAGE1) > $(SOURCE3)
+ @test -f $(SOURCE4) || gzip -c $(MANPAGE2) > $(SOURCE4)
@mkdir /tmp/$(NAME)
@mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION)
@python setup.py sdist -d /tmp/$(NAME)-$(VERSION)
- @cp {$(SOURCE1),$(SOURCE2),$(SOURCE3)} /tmp/$(NAME)-$(VERSION)
+ @cp {$(SOURCE1),$(SOURCE2),$(SOURCE3),$(SOURCE4)} /tmp/$(NAME)-$(VERSION)
@mkdir $(PWD)/dist
@mv /tmp/$(NAME)-$(VERSION)/* $(PWD)/dist
@echo " "
@@ -37,7 +38,7 @@ clean:
@rm -rf *.\~*
@rm -rfv /tmp/$(NAME)-$(VERSION)
@rm -rf MANIFEST
- @rm -rf $(SOURCE3)
+ @rm -rf {$(SOURCE3),$(SOURCE4)}
install:
python setup.py install
diff --git a/README b/README
index 5e18029..cc73619 100644
--- a/README
+++ b/README
@@ -1,5 +1,8 @@
CAS.README
-Fingerprint Setup:
-1) Define a directory containing the rpms you wish to fingerprint
-2) Run the fingerprint script and it will either build a new list or update an existing
one.
+* Alter /etc/cas.conf to suite your needs.
+
+* Build your rpm database and server database with cas-admin -b and cas-admin -s
+ (requires
http://fedorahosted.org/func for server process)
+
+* Grab kernel dump and run against cas, cas -i <id> -f corefile(.gz, tbz2, tgz,
etc)
diff --git a/cas b/cas
index 076c603..4035b9e 100755
--- a/cas
+++ b/cas
@@ -84,7 +84,7 @@ class TimestampHandler(object):
class CasApplication(object):
def __init__(self, args):
self.parse_options(args)
- self.tool = UtilBase()
+ self.util = UtilBase()
self.rpmTool = RPMBase()
def parse_options(self, args):
@@ -116,7 +116,7 @@ class CasApplication(object):
filter=filterString,
return_results=False)
- self.tool.buildCrashFile(self.storagePath, corefile, debugKernel)
+ self.util.buildCrashFile(self.storagePath, corefile, debugKernel)
# If func is installed we will pre-process the output from crash on
# a random machine tied to the architecture of the debug file.
# If no servers exists in your setup then this will return and
diff --git a/cas-admin b/cas-admin
index 6dff211..34c0c74 100755
--- a/cas-admin
+++ b/cas-admin
@@ -1,4 +1,17 @@
#!/usr/bin/python
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <
http://www.gnu.org/licenses/>.
+
""" casprint - fingerprinting utility for cas
"""
import os
diff --git a/cas-admin.1 b/cas-admin.1
new file mode 100644
index 0000000..b13a053
--- /dev/null
+++ b/cas-admin.1
@@ -0,0 +1,23 @@
+.TH CAS-ADMIN "1"
+
+.SH NAME
+cas-admin \- Administrator tools for building rpm/server database.
+
+.SH DESCRIPTION
+.TP
+\fIcas-admin\fP is a tool used to build necessary data for use with cas.
+
+.SH RESOURCES
+A configuration file is maintained in /etc/cas.conf.
+.SH AUTHOR
+Written by Adam Stokes
+.SH "REPORTING BUGS"
+Report bugs to <astokes(a)redhat.com>.
+.SH COPYRIGHT
+Copyright \(co 2007-2008 Adam Stokes
+.br
+This is free software. You may redistribute copies of it under the terms of
+the GNU General Public License <
http://www.gnu.org/licenses/gpl.html>.
+There is NO WARRANTY, to the extent permitted by law.
+.SH "SEE ALSO"
+Full documentation should be found in /usr/share/cas-<version>.
diff --git a/cas.spec b/cas.spec
index 3cc41f2..8d7e14d 100644
--- a/cas.spec
+++ b/cas.spec
@@ -35,7 +35,7 @@ rm -rf ${RPM_BUILD_ROOT}
%files -f INSTALLED_FILES
%defattr(-,root,root,-)
-%doc LICENSE
+%doc LICENSE README
%changelog
* Wed Aug 20 2008 Adam Stokes <ajs at redhat dot com> - 0.13
diff --git a/lib/cas/util.py b/lib/cas/util.py
index 6b8b29d..c261b16 100755
--- a/lib/cas/util.py
+++ b/lib/cas/util.py
@@ -121,8 +121,10 @@ class UtilBase(object):
""" build crash file with predefined debug
commands
"""
- crashInputCmds = ['bt -a > bt.out\n','sys >
sys.out\n','sys -c > sys-c.out\n',
- 'kmem -f > kmem-f.out\n', 'log >
log.out\n',
+ # Optional commands can be placed here, for example,
+ # kmem -f > kmem-f.out\n
+ crashInputCmds = ['bt -a > bt.out\n', 'sys > sys.out\n',
+ 'sys -c > sys-c.out\n', 'log >
log.out\n',
'mod > mod.out\n', 'exit']
# Build crash input file
diff --git a/setup.py b/setup.py
index 56ab3c0..038664c 100644
--- a/setup.py
+++ b/setup.py
@@ -18,5 +18,5 @@ setup(
scripts = ['cas','cas-admin'],
package_dir = {'': 'lib',},
data_files = [ ('/etc', ['cas.conf']),
- ('/usr/share/man/man1', ['cas.1.gz']) ]
+ ('/usr/share/man/man1',
['cas.1.gz','cas-admin.1.gz']) ]
)
diff --git a/version b/version
index 581b07b..df52f92 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.13 76
+0.13 78