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