move the /var/log/bm creation into %post.
[nodeconfig.git] / nodeconfig.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name nodeconfig
7 %define version 4.2
8 %define taglevel 15
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.0
30 # need the apache user at install-time 
31 Requires: httpd  
32 %description
33
34 The nodeconfig package provides various php scripts that are used to
35 generate configuration files for nodes. It is taken out of the PLCWWW
36 module because it has crucial impact on nodes, while PLCWWW can and
37 does have several implementations at this moment. For historical
38 reasons these scripts get installed in /var/www/html/PlanetLabConf.
39
40 %prep
41 %setup -q
42
43 %build
44 EXCLUDE="exclude=kernel* util-vserver* iptables iproute"
45 for filein in $(find . -name '*.in') ; do
46     file=$(echo $filein | sed -e "s,\.in$,,")
47     sed -e "s,@EXCLUDE@,$EXCLUDE,g" $filein > $file
48 done
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 echo "* nodeconfig: Installing PlanetLabConf pages"
54
55 for dir in boot PlanetLabConf PLCAPI ; do
56     mkdir -p $RPM_BUILD_ROOT/var/www/html/$dir
57 done
58 # let's be conservative and exclude codebase files, though there should not be any
59 rsync -a --exclude \*.spec --exclude .svn --exclude \*.in ./ $RPM_BUILD_ROOT/var/www/html/
60
61 %post
62 # the boot manager upload area
63 mkdir -p /var/log/bm
64 chown apache:apache /var/log/bm
65 chmod 700 /var/log/bm
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
71 %defattr(-,root,root,-)
72 /var/www/html/boot
73 /var/www/html/PlanetLabConf
74 /var/www/html/PLCAPI
75
76 %changelog
77 * Wed Feb 25 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-15
78 - merge changes in upload-bmlog from the trunk
79
80 * Fri Feb 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-14
81 - bootmanager upload script
82
83 * Fri Sep 19 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-13
84 - This configuration file has a single line addition to the standard configuration and it's based on state maintained in the DB.  This has been deprecated in favor of maintaining it in NM.  The standard configuration is in the iptables module and the nodegroup specific addition is created when the ipset is created by NM.
85
86 * Mon Sep 15 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-12
87 - yum config for nodes needs to mention the additional 'newkey' repository
88
89 * Mon Aug 04 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - nodeconfig-4.2-11
90 - PlanetFlow/codemux fix
91 - Used "./module-tag -b 4.2 nodeconfig:4.2".
92
93 * Fri Jul 25 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-10
94 - syntax error. Fixed.
95
96 * Fri Jul 25 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-9
97 - Updated ntp conf files.
98 - I2 iptables for nodes on I2.
99
100 * Thu Jul 24 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-8
101 - iptables superceded by svn/iptables/planetlab-config
102
103 * Sat Jul 19 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-7
104 - svn keyword expansion fixed, no functional change
105
106 * Fri Jul 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-6
107 - yum config on nodes improved -- see https://svn.planet-lab.org/ticket/342
108
109 * Wed Jun 25 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-5
110 - yum.conf.php handles nodegroups and slicefamily
111 - svn keywords fixed
112
113 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-4
114 - keys.php know about monitor
115 - new sudoers.php script
116
117 * Thu Apr 03 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - nodeconfig-4.2-2 nodeconfig-4.2-3
118 - Added support for centralized PlanetFlow.
119
120 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeconfig-4.2-1 nodeconfig-4.2-2
121 - integrated /var/www/html/{boot,PLCAPI} from PLCWWW
122 - former content has moved down into PlanetLabConf
123