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