Setting tag bootstrapfs-2.0-12
[bootstrapfs.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 12
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 kexcludes for that distro
88     KEXCLUDE="exclude=$(../../../build/getkexcludes.sh -f $fcdistro)"
89     pushd $fcdistro/yum.myplc.d
90     echo "* Handling KEXCLUDE in yum repo for $fcdistro ($KEXCLUDE)"
91     for filein in $(find . -name '*.in') ; do
92         file=$(echo $filein | sed -e "s,\.in$,,")
93         sed -e "s,@KEXCLUDE@,$KEXCLUDE,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 * Fri Jun 10 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-12
156 - minor tweak in plc.d/packages
157
158 * Mon Jun 06 2011 Baris Metin <bmetin@verivue.com> - bootstrapfs-2.0-11
159 - sl6 templates
160
161 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-10
162 - bugfix for multi-flavour deployments
163
164 * Fri Feb 04 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-9
165 - for multi-flavours : 'packages' step in plc.d now handles vserver links and related hacks in yumgroups
166
167 * Thu Jan 27 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-8
168 - no semantic change - attempt to speed up build
169
170 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-7
171 - yum repo template for f14 nodes
172 - tweaks the way /etc/plc.d/packages works
173
174 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-6
175 - add sha1sum
176 - module name changes
177
178 * Tue Apr 27 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-5
179 - support different flavours of vservers on nodes
180
181 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-4
182 - fix unmatched $ in URL svn keywords
183
184 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-3
185 - choice between various pldistros is not made at build time, but at run time
186 - relies on GetNodeFlavour to expose the node's fcdistro - requires PLCAPI-5.0-5
187 - in addition, the baseurl for the myplc repo is http:// and not https:// anymore
188 - the https method does not work on fedora 12, and GPG is used below anyway
189
190 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-2
191 - new slicerepo package for exposing stuff to slivers
192
193 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-1
194 - first working version of 5.0:
195 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
196 - nodefailiy is 3-fold with pldistro-fcdistro-arch
197 - new module nodeyum; first draft has the php scripts and conf_files for tweaking nodes yum config
198
199 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11
200 - for building on fedora12
201
202 * Thu Oct 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-10
203 - cosmetic change in message at build-time
204
205 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-9
206 - can use groups in the pkgs file with +++ for space
207
208 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-8
209 - bugfix for when a .post script is not needed
210
211 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-7
212 - search post-install scripts (.post) in path (distro, then planetlab)
213 - mostly useful for externally-defined pldistros
214
215 * Thu Jan 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-6
216 - fix build bug when dealing with extensions
217
218 * Thu Dec 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-5
219 - optional package bootstrapfs-<pldiftr>-<arch>-plain comes with uncompressed images for faster tests
220
221 * Fri Nov 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-4
222 - cosmetic changes in build: displays duration, and shows up in summary
223
224 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-3
225 - Do not overwrite yumgroups.xml upon updates of noderepo
226
227 * Thu Jul 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-2
228 - uses the right yum.conf when building images
229
230 * Mon May 05 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-1
231 - rpm release tag does not need pldistro as it is already part of the rpm name
232
233 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-0.1-2 BootstrapFS-1.0-0
234 - naming scheme changed, tarball name now contains ''nodefamily'' as <pldistro>-<arch>
235 - new package named 'noderepo' allows to ship the full set of node rpms to another (arch) myplc
236
237 * Fri Jan 18 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-0.1-1 bootstrapfs-0.1-2
238 - search more carefully for alternate pkgs files
239 - handling of sysconfig/crontab and creation of site_admin reviewed
240 - (this tag is set with module-tag.py)
241
242 * Fri Sep  2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> - 
243 - Initial build.
244
245 %define module_current_branch 1.0