summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-05-03 12:48:15 -0400
committerJim Meyering <jim@meyering.net>2006-05-03 12:48:15 -0400
commit69488634bba8309474bf2153efda7feb61366670 (patch)
treec05eaca2cefd01bed9a4183ac76203f41add6ce8
parent42bf51511732ac6a7845d6a63adb8a31f05a4a03 (diff)
downloadthird_party-cobbler-69488634bba8309474bf2153efda7feb61366670.tar.gz
third_party-cobbler-69488634bba8309474bf2153efda7feb61366670.tar.xz
third_party-cobbler-69488634bba8309474bf2153efda7feb61366670.zip
Packaging for cobbler
-rw-r--r--Makefile2
-rw-r--r--cobbler.spec37
-rw-r--r--tests/tests.py (renamed from test/tests.py)15
3 files changed, 48 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index f70589d..0b24f04 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ manpage:
gzip cobbler.1
test:
- python test/tests.py
+ python tests/tests.py
install:
python setup.py sdist
diff --git a/cobbler.spec b/cobbler.spec
new file mode 100644
index 0000000..d941bd4
--- /dev/null
+++ b/cobbler.spec
@@ -0,0 +1,37 @@
+%define name cobbler
+%define version 0.1.0
+%define release 1
+
+Summary: Boot server configurator
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Source0: %{name}-%{version}.tar.gz
+License: GPL
+Group: Development/Libraries
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Prefix: %{_prefix}
+BuildArch: noarch
+Vendor: Michael DeHaan <mdehaan@redhat.com>
+Url: http://bugzilla.redhat.com
+
+%description
+
+Cobbler is a command line tool for simplified configuration of boot/provisioning servers. It is also accessible as a Python library. Cobbler supports PXE, Xen, and re-provisioning an existing Linux system via auto-kickstart. The last two modes require 'koan' to be run on the remote system.
+
+
+
+%prep
+%setup
+
+%build
+python setup.py build
+
+%install
+python setup.py install --optimize=1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f INSTALLED_FILES
+%defattr(-,root,root)
diff --git a/test/tests.py b/tests/tests.py
index 977a652..5a3a4b0 100644
--- a/test/tests.py
+++ b/tests/tests.py
@@ -1,15 +1,20 @@
-# Test cases for BootConf
+# Test cases for Cobbler
#
# Any test case that just is a 'pass' statement needs to be implemented, I just
# didn't want them cluttering up the failure list yet. And lots more beyond that...
#
# Michael DeHaan <mdehaan@redhat.com>
-import api
+
import sys
import unittest
import os
+sys.path.append('../cobbler')
+sys.path.append('./cobbler')
+
+import api
+
FAKE_INITRD="/tmp/initrd-2.6.15-1.2054_FAKE.img"
FAKE_INITRD2="/tmp/initrd-2.5.16-2.2055_FAKE.img"
FAKE_INITRD3="/tmp/initrd-1.8.18-3.9999_FAKE.img"
@@ -259,7 +264,7 @@ class TestSync(BootTest):
if __name__ == "__main__":
if os.getuid()!=0:
- print "root would be nice"
- sys.exit(1)
- unittest.main()
+ print "tests: skipping (want root)"
+ else:
+ unittest.main()