revert this one to (should have done it while reverting BM).
[nodeconfig.git] / nodeconfig.spec
1 #
2 # $Id$
3 #
4 %define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/WWW/trunk/PLCWWW.spec $
5
6 %define name nodeconfig
7 %define version 4.3
8 %define taglevel 6
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Summary: PlanetLab Central (PLC) nodes configuration files generator
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 BuildArch: noarch
21
22 Vendor: PlanetLab
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 # We use set everywhere
28 Requires: php >= 5.0
29 Requires: PLCAPI >= 4.3
30 # need the apache user at install-time
31 Requires: httpd 
32
33 %description
34
35 The nodeconfig package provides various php scripts that are used to
36 generate configuration files for nodes. It is taken out of the PLCWWW
37 module because it has crucial impact on nodes, while PLCWWW can and
38 does have several implementations at this moment. For historical
39 reasons these scripts get installed in /var/www/html/PlanetLabConf.
40
41 %prep
42 %setup -q
43
44 %build
45 pushd nodeconfig/yum
46
47 KEXCLUDE="exclude=$(../../build/getkexcludes.sh)"
48
49 # expand list of kexcludes
50 for filein in $(find . -name '*.in') ; do
51     file=$(echo $filein | sed -e "s,\.in$,,")
52     sed -e "s,@KEXCLUDE@,$KEXCLUDE,g" $filein > $file
53 done
54
55 # scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
56
57 for fcdistro in $(ls); do
58     [ -d $fcdistro ] || continue
59     pushd $fcdistro/yum.myplc.d
60     rm -f stock.repo
61     cat *.repo > stock.repo
62     popd
63 done
64
65 popd
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 pushd nodeconfig
71
72 echo "* nodeconfig: Installing PlanetLabConf pages"
73
74 for dir in boot PlanetLabConf PLCAPI ; do
75     mkdir -p $RPM_BUILD_ROOT/var/www/html/$dir
76     rsync -a --exclude .svn ./$dir/ $RPM_BUILD_ROOT/var/www/html/$dir/
77 done
78
79 # the yum area -- se db-config
80 # expose (fixed) myplc.repo.php as                                          https://<plc>/yum/myplc.repo.php
81 install -D -m 644 ./yum/myplc.repo.php                       $RPM_BUILD_ROOT/var/www/html/yum/myplc.repo.php
82 # expose the fcdistro-dependant yum.conf as                                 https://<plc>/yum/yum.conf
83 install -D -m 644 ./yum/%{distroname}/yum.conf               $RPM_BUILD_ROOT/var/www/html/yum/yum.conf
84 # expose the (fcdistro-dependant) stock.repo as                             https://<plc>/yum/stock.repo
85 install -D -m 644 ./yum/%{distroname}/yum.myplc.d/stock.repo $RPM_BUILD_ROOT/var/www/html/yum/stock.repo
86
87 popd
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post
93 # the boot manager upload area
94 mkdir -p /var/log/bm
95 chown apache:apache /var/log/bm
96 chmod 700 /var/log/bm
97
98 %files
99 %defattr(-,root,root,-)
100 /var/www/html/boot
101 /var/www/html/PlanetLabConf
102 /var/www/html/PLCAPI
103 /var/www/html/yum
104
105 %changelog
106 * Sun Nov 22 2009 Marc Fiuczynski <mef@cs.princeton.edu> - nodeconfig-4.3-6
107 - For all MyPLC nodes deployed at Polish Telecom (PLC, PLE and CoBlitz),
108 - use the TP local NTP servers.
109
110 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.3-5
111 - new script for updating the exentions set
112 - keys.php reviewed
113 - cleanup useless scripts
114
115 * Sat Jul 04 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - nodeconfig-4.3-4
116 - add two views to the PLC config data, limited and unlimited.
117 - unlimited view reports all values.  Requires the 'infrastructure=1' tag and
118 - that the call originates from the node.
119
120 * Fri May 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.3-3
121 - changes to sysctl.conf for co* relating to tcp window scaling
122
123 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.3-2
124 - renumbered 4.3
125 - new script upload-bmlog.php
126 - attempts to ship decent yum configs for stock repos to nodes
127 - cleanup old stuff
128 - attempts to be 4.2 compatible
129
130 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.3-1
131 - reflects new names from the data model
132
133 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-4
134 - keys.php know about monitor
135 - new sudoers.php script
136
137 * Thu Apr 03 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-2 nodeconfig-4.2-3
138 - Added support for centralized PlanetFlow.
139
140 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-1 nodeconfig-4.2-2
141 - integrated /var/www/html/{boot,PLCAPI} from PLCWWW
142 - former content has moved down into PlanetLabConf
143
144
145 %define module_current_branch 4.2