Tagging module BootstrapFS - BootstrapFS-1.0-3
[bootstrapfs.git] / bootstrapfs.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define nodefamily %{pldistro}-%{_arch}
7
8 %define name bootstrapfs-%{nodefamily}
9 %define version 1.0
10 %define taglevel 3
11
12 # pldistro already in the rpm name
13 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
14 %define release %{taglevel}%{?date:.%{date}}
15
16 Vendor: PlanetLab
17 Packager: PlanetLab Central <support@planet-lab.org>
18 Distribution: PlanetLab %{plrelease}
19 URL: %(echo %{url} | cut -d ' ' -f 2)
20
21 Summary: The PlanetLab Bootstrap Filesystems for %{nodefamily}
22 Name: %{name}
23 Version: %{version}
24 Release: %{release}
25 License: BSD
26 Group: System Environment/Base
27 Source0: %{name}-%{version}.tar.gz
28 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
29 # other archs must be able to install this
30 BuildArch: noarch
31
32 Requires: tar, gnupg, sharutils, bzip2
33
34 AutoReqProv: no
35 %define debug_package %{nil}
36
37 %description
38
39 The PlanetLab Bootstrap Filesystem(s) are downloaded by the
40 BootManager to instantiate a node with a new filesystem.
41
42 %prep
43 %setup -q
44
45 %build
46 pushd BootstrapFS
47 ./build.sh %{pldistro} 
48 popd BootstrapFS
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 pushd BootstrapFS
54 arch=$(uname -i)
55
56 install -D -m 644 bootstrapfs-%{pldistro}-${arch}.tar.bz2 \
57         $RPM_BUILD_ROOT/var/www/html/boot/bootstrapfs-%{pldistro}-${arch}.tar.bz2
58
59 for pkgs in $(ls ../build/config.%{pldistro}/bootstrapfs-*.pkgs) ; do 
60     NAME=$(basename $pkgs .pkgs | sed -e s,bootstrapfs-,,)
61     install -D -m 644 %{pldistro}-filesystems/bootstrapfs-${NAME}-${arch}.tar.bz2 \
62                 $RPM_BUILD_ROOT/var/www/html/boot/bootstrapfs-${NAME}-${arch}.tar.bz2 
63 done
64
65 popd
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 # If run under sudo
71 if [ -n "$SUDO_USER" ] ; then
72     # Allow user to delete the build directory
73     chown -h -R $SUDO_USER .
74     # Some temporary cdroot files like /var/empty/sshd and
75     # /usr/bin/sudo get created with non-readable permissions.
76     find . -not -perm +0600 -exec chmod u+rw {} \;
77     # Allow user to delete the built RPM(s)
78     chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
79 fi
80
81 %post
82
83 %files
84 %defattr(-,root,root,-)
85 /var/www/html/boot/bootstrapfs*.tar.bz2
86
87 %changelog
88 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-3
89 - Do not overwrite yumgroups.xml upon updates of noderepo
90
91 * Thu Jul 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-2
92 - uses the right yum.conf when building images
93
94 * Mon May 05 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-1
95 - rpm release tag does not need pldistro as it is already part of the rpm name
96
97 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-0.1-2 BootstrapFS-1.0-0
98 - naming scheme changed, tarball name now contains ''nodefamily'' as <pldistro>-<arch>
99 - new package named 'noderepo' allows to ship the full set of node rpms to another (arch) myplc
100
101 * Fri Jan 18 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-0.1-1 bootstrapfs-0.1-2
102 - search more carefully for alternate pkgs files
103 - handling of sysconfig/crontab and creation of site_admin reviewed
104 - (this tag is set with module-tag.py)
105
106 * Fri Sep  2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> - 
107 - Initial build.