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