bbef345f38ae20530f3e455d3dad76e54319a5cf
[nodemanager.git] / NodeManager.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name NodeManager
7 %define version 1.6
8 %define taglevel 1
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Summary: PlanetLab Node Manager
13 Name: %{name}
14 Version: %{version}
15 Release: %{release}
16 License: PlanetLab
17 Group: System Environment/Daemons
18 Source0: %{name}-%{version}.tar.gz
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
20
21 Vendor: PlanetLab
22 Packager: PlanetLab Central <support@planet-lab.org>
23 Distribution: PlanetLab %{plrelease}
24 URL: %(echo %{url} | cut -d ' ' -f 2)
25
26 # Old Node Manager
27 Obsoletes: sidewinder, sidewinder-common
28
29 # vuseradd, vuserdel
30 Requires: vserver-reference
31 Requires: util-vserver >= 0.30.208-17
32
33 # vserver.py
34 Requires: util-vserver-python
35
36 # Signed tickets
37 Requires: gnupg
38
39 # Contact API server
40 Requires: curl
41
42 # Uses function decorators
43 Requires: python >= 2.4
44
45 %description
46 The PlanetLab Node Manager manages all aspects of PlanetLab node and
47 slice management once the node has been initialized and configured by
48 the Boot Manager. It periodically contacts its management authority
49 for configuration updates. It provides an XML-RPC API for performing
50 local operations on slices.
51
52 %prep
53 %setup -q
54
55 %build
56 %{__make} %{?_smp_mflags}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT"
61
62 install -D -m 755 conf_files.init $RPM_BUILD_ROOT/%{_initrddir}/conf_files
63 install -D -m 755 nm.init $RPM_BUILD_ROOT/%{_initrddir}/nm
64 install -D -m 644 nm.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nm
65
66 %post
67 chkconfig --add conf_files
68 chkconfig conf_files on
69 chkconfig --add nm
70 chkconfig nm on
71 if [ "$PL_BOOTCD" != "1" ] ; then
72         service nm restart
73 fi
74
75
76 %preun
77 # 0 = erase, 1 = upgrade
78 if [ $1 -eq 0 ] ; then
79     chkconfig nm off
80     chkconfig --del nm
81     chkconfig conf_files off
82     chkconfig --del conf_files
83 fi
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(-,root,root,-)
90 %doc
91 %dir %{_datadir}/NodeManager
92 %{_datadir}/NodeManager/*
93 %{_bindir}/forward_api_calls
94 %{_initrddir}/nm
95 %{_initrddir}/conf_files
96 %{_sysconfdir}/logrotate.d/nm
97
98 %changelog
99 * Wed Oct 03 2007 Faiyaz Ahmed <faiyaza@cs.princeton.edu> .
100 - Switched to SVN.
101
102 * Mon Nov 13 2006 Mark Huang <mlhuang@paris.CS.Princeton.EDU> - 
103 - Initial build.