Merge commit 'local_master/master'
[bootstrapfs.git] / noderepo.spec
1 #
2 # $Id$
3 #
4 %define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/BootstrapFS/trunk/bootstrapfs.spec $
5
6 # build is expected to export the following rpm variables
7 # %{distroname}     : e.g. Fedora
8 # %{distrorelease}  : e.g. 8
9 # %{node_rpms_plus} : as a +++ separated list of rpms from the build dir
10
11 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
12 %define obsolete_nodefamily %{pldistro}-%{_arch}
13
14 %define name noderepo-%{nodefamily}
15 %define version 2.0
16 %define taglevel 6
17
18 # pldistro already in the rpm name
19 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
20 %define release %{taglevel}%{?date:.%{date}}
21
22 Vendor: OneLab
23 Packager: PlanetLab Europe <build@onelab.eu>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 Summary: The yum repository for nodes, to be installed on the myplc-side
28 Name: %{name}
29 Version: %{version}
30 Release: %{release}
31 License: BSD
32 Group: System Environment/Base
33 Source0: %{name}-%{version}.tar.gz
34 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
35 # other archs must be able to install this
36 BuildArch: noarch
37
38 BuildRequires: rsync 
39 Requires: myplc
40
41 # 5.0 now has 3-fold nodefamily
42 %define obsolete_nodefamily %{pldistro}-%{_arch}
43 Obsoletes: noderepo-%{obsolete_nodefamily}
44
45 %define debug_package %{nil}
46
47 %description
48 This rpm contains all the rpms designed for running on a PlanetLab node
49 they come organized into a yum repository 
50
51 %prep
52 %setup -q
53
54 %build
55 echo nothing to do at build time for noderepo
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 repo=%{nodefamily}
61 install -d -m 755 $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
62 rpms=$(echo %{node_rpms_plus} | sed -e 's,+++, ,g')
63 for rpm in $rpms; do rsync %{_topdir}/$rpm $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/ ; done
64 ### yumgroups
65 install -D -m 644 %{_topdir}/RPMS/yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/yumgroups.xml
66 # do not do this yet, as plc.d/packages will do it anyway
67 #createrepo -g yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %post
73 # it would at first glance seem to make sense to invoke service plc start gpg here as well, 
74 # as noderepo might get installed before myplc gets even started 
75 # this however exhibit a deadlock, as rpm --almatches -e gpg-pubkey waits for transaction lock
76 # that is help by the calling yum/rpm
77 service plc start packages
78
79 %files
80 %defattr(-,root,root,-)
81 /var/www/html/install-rpms/%{nodefamily}
82 # don't overwrite yumgroups.xml if exists
83 %config(noreplace) /var/www/html/install-rpms/%{nodefamily}/yumgroups.xml
84
85 %changelog
86 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-6
87 - add sha1sum
88 - module name changes
89
90 * Tue Apr 27 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-5
91 - support different flavours of vservers on nodes
92
93 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-4
94 - fix unmatched $ in URL svn keywords
95
96 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-3
97 - choice between various pldistros is not made at build time, but at run time
98 - relies on GetNodeFlavour to expose the node's fcdistro - requires PLCAPI-5.0-5
99 - in addition, the baseurl for the myplc repo is http:// and not https:// anymore
100 - the https method does not work on fedora 12, and GPG is used below anyway
101
102 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-2
103 - new slicerepo package for exposing stuff to slivers
104
105 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-1
106 - first working version of 5.0:
107 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
108 - nodefailiy is 3-fold with pldistro-fcdistro-arch
109 - new module nodeyum; first draft has the php scripts and conf_files for tweaking nodes yum config
110
111 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11
112 - for building on fedora12
113
114 * Thu Oct 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-10
115 - cosmetic change in message at build-time
116
117 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-9
118 - can use groups in the pkgs file with +++ for space
119
120 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-8
121 - bugfix for when a .post script is not needed
122
123 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-7
124 - search post-install scripts (.post) in path (distro, then planetlab)
125 - mostly useful for externally-defined pldistros
126
127 * Thu Jan 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-6
128 - fix build bug when dealing with extensions
129
130 * Thu Dec 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-5
131 - optional package bootstrapfs-<pldiftr>-<arch>-plain comes with uncompressed images for faster tests
132
133 * Fri Nov 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-4
134 - cosmetic changes in build: displays duration, and shows up in summary
135
136 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-3
137 - Do not overwrite yumgroups.xml upon updates of noderepo
138
139 * Thu Jul 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-2
140 - uses the right yum.conf when building images
141
142 * Mon May 05 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-1
143 - rpm release tag does not need pldistro as it is already part of the rpm name
144
145 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-0.1-2 BootstrapFS-1.0-0
146 - naming scheme changed, tarball name now contains ''nodefamily'' as <pldistro>-<arch>
147 - new package named 'noderepo' allows to ship the full set of node rpms to another (arch) myplc
148
149 * Tue Mar 4 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> -
150 - Initial build.
151
152 %define module_current_branch 1.0