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