019b98ceeeb56ae5bfd748401c4c728a11a00e1b
[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 5.0
8 %define taglevel 1
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 >= 5.0
30
31 %description
32
33 The nodeconfig package provides various php scripts that are used to
34 generate configuration files for nodes. It is taken out of the PLCWWW
35 module because it has crucial impact on nodes, while PLCWWW can and
36 does have several implementations at this moment. For historical
37 reasons these scripts get installed in /var/www/html/PlanetLabConf.
38
39 %prep
40 %setup -q
41
42 %build
43 pushd yum
44
45 EXCLUDE="exclude=kernel* util-vserver* iptables iproute"
46
47 # expand list of excludes
48 for filein in $(find . -name '*.in') ; do
49     file=$(echo $filein | sed -e "s,\.in$,,")
50     sed -e "s,@EXCLUDE@,$EXCLUDE,g" $filein > $file
51 done
52
53 # scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
54
55 for fcdistro in $(ls); do
56     [ -d $fcdistro ] || continue
57     pushd $fcdistro/yum.myplc.d
58     rm f stock.repo
59     cat *.repo > stock.repo
60     popd
61 done
62
63 popd
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 echo "* nodeconfig: Installing PlanetLabConf pages"
69
70 for dir in boot PlanetLabConf PLCAPI ; do
71     mkdir -p $RPM_BUILD_ROOT/var/www/html/$dir
72     rsync -a --exclude .svn ./$dir/ $RPM_BUILD_ROOT/var/www/html/$dir/
73 done
74
75 # the yum area -- se db-config
76 # expose (fixed) myplc.repo.php as                                         https://<plc>/yum/myplc.repo.php
77 install -D -m 644 ./yum/myplc.repo.php                      $RPM_BUILD_ROOT/var/www/html/yum/myplc.repo.php
78 # expose the fcdistro-dependant yum.conf as                                https://<plc>/yum/yum.conf
79 install -D -m 644 ./yum/%{fcdistro}/yum.conf                $RPM_BUILD_ROOT/var/www/html/yum/yum.conf
80 # expose the (fcdistro-dependant) stock.repo as                            https://<plc>/yum/stock.repo
81 install -D -m 644 ./yum/%{fcdistro}/yum.myplc.d/stock.repo  $RPM_BUILD_ROOT/var/www/html/yum/stock.repo
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(-,root,root,-)
88 /var/www/html/boot
89 /var/www/html/PlanetLabConf
90 /var/www/html/PLCAPI
91 /var/www/html/yum
92
93 %changelog
94 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-5.0-1
95 - reflects new names from the data model
96
97 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-4
98 - keys.php know about monitor
99 - new sudoers.php script
100
101 * Thu Apr 03 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-2 nodeconfig-4.2-3
102 - Added support for centralized PlanetFlow.
103
104 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-1 nodeconfig-4.2-2
105 - integrated /var/www/html/{boot,PLCAPI} from PLCWWW
106 - former content has moved down into PlanetLabConf
107
108
109 %define module_current_branch 4.2