bugfix, wrong command name
[nodeimage.git] / bootstrapfs.spec
1 #
2
3 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
4 %define extensionfamily %{distroname}-%{_arch}
5
6 %define name bootstrapfs-%{nodefamily}
7 %define version 2.0
8 %define taglevel 13
9
10 # pldistro already in the rpm name
11 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12 %define release %{taglevel}%{?date:.%{date}}
13
14 # we don't really need the standard postinstall process from rpm that
15 # strips files and byte-compiles python files. all files in this
16 # package are comming from other rpm files and they've already went
17 # through this post install processing. - baris
18 %define __os_install_post %{nil}
19
20 Vendor: PlanetLab
21 Packager: PlanetLab Central <support@planet-lab.org>
22 Distribution: PlanetLab %{plrelease}
23 URL: %{SCMURL}
24
25 Summary: The PlanetLab Bootstrap Filesystems for %{nodefamily}
26 Name: %{name}
27 Version: %{version}
28 Release: %{release}
29 License: BSD
30 Group: System Environment/Base
31 Source0: %{name}-%{version}.tar.gz
32 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
33 # other archs must be able to install this
34 BuildArch: noarch
35
36 Requires: tar, gnupg, sharutils, bzip2
37 # this is for plc.d/packages that uses ed for hacking yumgroups.xml
38 Requires: ed
39
40 # 5.0 now has 3-fold nodefamily
41 %define obsolete_nodefamily %{pldistro}-%{_arch}
42 Obsoletes: bootstrapfs-%{obsolete_nodefamily}
43
44 AutoReqProv: no
45 %define debug_package %{nil}
46
47 %description
48
49 The PlanetLab Bootstrap Filesystem(s) are downloaded by the
50 BootManager to instantiate a node with a new filesystem.
51
52 %package plain
53 Summary: The (uncompressed) PlanetLab Bootstrap Filesystems for %{nodefamily}
54 Group: System Environment/Base
55 %description plain
56 This package provides the same functions as %{name} but with uncompressed tarball for faster tests.
57
58 %package -n nodeyum
59 Summary: the MyPLC-side utilities for tweaking nodes yum configs
60 Group: System Environment/Base
61 %description -n nodeyum 
62 Utility scripts for configuring node updates. This package is designed
63 for the MyPLC side.
64
65 %prep
66 %setup -q
67
68 %build
69
70 ############################## node-side
71 [ -d bootstrapfs ] || ln -s BootstrapFS bootstrapfs
72 pushd bootstrapfs
73 ./build.sh %{pldistro} 
74 for tar in *.tar *.tar.bz2; do 
75    echo "* Computing SHA1 checksum for $tar"
76    sha1sum $tar > $tar.sha1sum
77    chmod 444 $tar.sha1sum
78 done
79 popd
80
81 ############################## server-side
82 # ship all fcdistros for multi-fcdistros myplc, and let the php scripts do the right thing
83 pushd bootstrapfs/nodeconfig/yum
84 # scan fcdistros and catenate all repos in 'stock.repo' so db-config can be distro-independant
85 for fcdistro in $(ls); do
86     [ -d $fcdistro ] || continue
87     # get packages to exclude on nodes for that fcdistro/pldistro
88     NODEYUMEXCLUDE="exclude=$(../../../build/nodeyumexclude.sh $fcdistro $pldistro)"
89     pushd $fcdistro/yum.myplc.d
90     echo "* Handling NODEYUMEXCLUDE in yum repo for $fcdistro/$pldistro ($NODEYUMEXCLUDE)"
91     for filein in $(find . -name '*.in') ; do
92         file=$(echo $filein | sed -e "s,\.in$,,")
93         sed -e "s,@NODEYUMEXCLUDE@,$NODEYUMEXCLUDE,g" $filein > $file
94     done
95     rm -f stock.repo
96     cat *.repo > stock.repo
97     popd
98 done
99 popd
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 ############################## node-side
105 pushd bootstrapfs
106 for out in *.tar *.tar.bz2 ; do
107     echo "* Installing $out"
108     install -D -m 644 $out $RPM_BUILD_ROOT/var/www/html/boot/$out
109 done
110 for out in *.sha1sum; do
111     echo "* Installing $out"
112     install -D -m 444 $out $RPM_BUILD_ROOT/var/www/html/boot/$out
113 done
114 popd
115
116 ############################## server-side
117 # ship all fcdistros for multi-fcdistros myplc, and let the php scripts do the right thing
118 pushd bootstrapfs
119 echo "* Installing MyPLC-side nodes yum config utilities (support for multi-fcdistro)"
120 mkdir -p $RPM_BUILD_ROOT/var/www/html/yum/
121 rsync -av ./nodeconfig/yum/     $RPM_BUILD_ROOT/var/www/html/yum/
122
123 # Install initscripts
124 echo "* Installing plc.d initscripts"
125 find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
126 chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
127
128 echo "* Installing db-config.d files"
129 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
130 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
131 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
132 popd
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137
138 %files
139 %defattr(-,root,root,-)
140 /var/www/html/boot/bootstrapfs*.tar.bz2
141 /var/www/html/boot/bootstrapfs*.tar.bz2.sha1sum
142
143 %files plain
144 %defattr(-,root,root,-)
145 /var/www/html/boot/bootstrapfs*.tar
146 /var/www/html/boot/bootstrapfs*.tar.sha1sum
147
148 %files -n nodeyum
149 %defattr(-,root,root,-)
150 /var/www/html/yum
151 /etc/planetlab/db-config.d
152 /etc/plc.d
153
154 %changelog
155 * Wed Aug 31 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-13
156 - plc.d/packages: rewrote comments about some corner cases where it fails
157 - plc.d/packages: marginally more robust
158
159 * Fri Jun 10 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-12
160 - minor tweak in plc.d/packages
161
162 * Mon Jun 06 2011 Baris Metin <bmetin@verivue.com> - bootstrapfs-2.0-11
163 - sl6 templates
164
165 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-10
166 - bugfix for multi-flavour deployments
167
168 * Fri Feb 04 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-9
169 - for multi-flavours : 'packages' step in plc.d now handles vserver links and related hacks in yumgroups
170
171 * Thu Jan 27 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-8
172 - no semantic change - attempt to speed up build
173
174 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-7
175 - yum repo template for f14 nodes
176 - tweaks the way /etc/plc.d/packages works
177
178 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-6
179 - add sha1sum
180 - module name changes
181
182 * Tue Apr 27 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-5
183 - support different flavours of vservers on nodes
184
185 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-4
186 - fix unmatched $ in URL svn keywords
187
188 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-3
189 - choice between various pldistros is not made at build time, but at run time
190 - relies on GetNodeFlavour to expose the node's fcdistro - requires PLCAPI-5.0-5
191 - in addition, the baseurl for the myplc repo is http:// and not https:// anymore
192 - the https method does not work on fedora 12, and GPG is used below anyway
193
194 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-2
195 - new slicerepo package for exposing stuff to slivers
196
197 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-1
198 - first working version of 5.0:
199 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
200 - nodefailiy is 3-fold with pldistro-fcdistro-arch
201 - new module nodeyum; first draft has the php scripts and conf_files for tweaking nodes yum config
202
203 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11
204 - for building on fedora12
205
206 * Thu Oct 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-10
207 - cosmetic change in message at build-time
208
209 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-9
210 - can use groups in the pkgs file with +++ for space
211
212 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-8
213 - bugfix for when a .post script is not needed
214
215 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-7
216 - search post-install scripts (.post) in path (distro, then planetlab)
217 - mostly useful for externally-defined pldistros
218
219 * Thu Jan 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-6
220 - fix build bug when dealing with extensions
221
222 * Thu Dec 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-5
223 - optional package bootstrapfs-<pldiftr>-<arch>-plain comes with uncompressed images for faster tests
224
225 * Fri Nov 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-4
226 - cosmetic changes in build: displays duration, and shows up in summary
227
228 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-3
229 - Do not overwrite yumgroups.xml upon updates of noderepo
230
231 * Thu Jul 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-2
232 - uses the right yum.conf when building images
233
234 * Mon May 05 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-1
235 - rpm release tag does not need pldistro as it is already part of the rpm name
236
237 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-0.1-2 BootstrapFS-1.0-0
238 - naming scheme changed, tarball name now contains ''nodefamily'' as <pldistro>-<arch>
239 - new package named 'noderepo' allows to ship the full set of node rpms to another (arch) myplc
240
241 * Fri Jan 18 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-0.1-1 bootstrapfs-0.1-2
242 - search more carefully for alternate pkgs files
243 - handling of sysconfig/crontab and creation of site_admin reviewed
244 - (this tag is set with module-tag.py)
245
246 * Fri Sep  2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> - 
247 - Initial build.
248
249 %define module_current_branch 1.0