Setting tag nodeimage-5.2-9
[bootstrapfs.git] / noderepo.spec
1 # build is expected to export the following rpm variables
2 # %{distroname}     : e.g. Fedora
3 # %{distrorelease}  : e.g. 8
4 # %{node_rpms_plus} : as a +++ separated list of rpms from the build dir
5
6 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
7 %define obsolete_nodefamily %{pldistro}-%{_arch}
8
9 %define name noderepo-%{nodefamily}
10 %define version 5.2
11 %define taglevel 9
12
13 # pldistro already in the rpm name
14 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
15 %define release %{taglevel}%{?date:.%{date}}
16
17 # we don't really need the standard postinstall process from rpm that
18 # strips files and byte-compiles python files. all files in this
19 # package are comming from other rpm files and they've already went
20 # through this post install processing. - baris
21 %define __os_install_post %{nil}
22
23 Vendor: OneLab
24 Packager: PlanetLab Europe <build@onelab.eu>
25 Distribution: PlanetLab %{plrelease}
26 URL: %{SCMURL}
27
28 Summary: The yum repository for nodes, to be installed on the myplc-side
29 Name: %{name}
30 Version: %{version}
31 Release: %{release}
32 License: BSD
33 Group: System Environment/Base
34 Source0: %{name}-%{version}.tar.gz
35 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
36 # other archs must be able to install this
37 BuildArch: noarch
38
39 BuildRequires: rsync 
40 Requires: myplc
41
42 # 5.0 now has 3-fold nodefamily
43 %define obsolete_nodefamily %{pldistro}-%{_arch}
44 Obsoletes: noderepo-%{obsolete_nodefamily}
45
46 %define debug_package %{nil}
47
48 %description
49 This rpm contains all the rpms designed for running on a PlanetLab node
50 they come organized into a yum repository 
51
52 %prep
53 %setup -q
54
55 %build
56 echo nothing to do at build time for noderepo
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 repo=%{nodefamily}
62 install -d -m 755 $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
63 rpms=$(echo %{node_rpms_plus} | sed -e 's,+++, ,g')
64 for rpm in $rpms; do rsync %{_topdir}/$rpm $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/ ; done
65 ### yumgroups
66 install -D -m 644 %{_topdir}/RPMS/yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/yumgroups.xml
67 # do not do this yet, as plc.d/packages will do it anyway
68 #createrepo -g yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 # it would at first glance seem to make sense to invoke service plc start gpg here as well, 
75 # as noderepo might get installed before myplc gets even started 
76 # this however exhibit a deadlock, as rpm --almatches -e gpg-pubkey waits for transaction lock
77 # that is help by the calling yum/rpm
78 if [ ! -e /bin/systemctl ] ; then
79    echo "Systemd is not there. Just starting PLC to handle packages (may fail if PLC is not configured) ..."
80    service plc start packages
81 elif /bin/systemctl status plc >/dev/null ; then
82    echo "Restarting PLC to handle packages ..."
83    service plc restart packages
84 else
85    echo "PLC is not running. Skipping a restart ..."
86 fi
87
88 %files
89 %defattr(-,root,root,-)
90 /var/www/html/install-rpms/%{nodefamily}
91 # don't overwrite yumgroups.xml if exists
92 %config(noreplace) /var/www/html/install-rpms/%{nodefamily}/yumgroups.xml
93
94 %changelog
95 * Mon Jan 07 2019 Thierry <Parmentelat> - nodeimage-5.2-9
96 - ok for f27 and f29
97 - cleanup old distros
98
99 * Sun Jul 16 2017 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-8
100 - fix the fedora and fedora-updates repo definitions for f25
101 - add /etc/plc.d/packages index
102
103 * Sun Jul 10 2016 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-7
104 - yum config ; deprecates old fedora releases, add support for f23/f24
105
106 * Fri Nov 13 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-6
107 - fix for f22 and dnf.conf
108
109 * Fri Jun 26 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-5
110 - the yum config for nodes on f21 and f22
111 - define a new config_file for /etc/dnf/dnf.conf so that /etc/yum.myplc.d
112 - is taken into account on f22
113
114 * Wed Feb 18 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-4
115 - minor change; start plc packages only at run-time, not build-time
116 - only available on systems that have systemctl
117
118 * Tue Jul 22 2014 Thomas Dreibholz <dreibh@simula.no> - nodeimage-5.2-4
119 - Post-install fix: trying to start PLC only when it is running, in order to avoid false-positive error message during build.
120
121 * Fri Mar 21 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-3
122 - template for f20 yum config
123
124 * Sun Jul 14 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-2
125 - more timestamps during build
126
127 * Thu Mar 07 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-1
128 - add support for f18 yum config
129
130 * Mon Feb 11 2013 Stephen Soltesz <soltesz@opentechinstitute.org> - nodeimage-2.1-4
131
132 * Mon Nov 26 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-3
133 - fix /etc/plc.d/packages for empty install dirs
134
135 * Fri Sep 28 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-2
136 - exclude slice repos when running plc.d/packages start
137
138 * Fri Apr 13 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-1
139 - renamed as nodeimage - works on both mainline and lxc
140
141 * Thu Feb 16 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-14
142 - changes needed for build with yumexcludes defined in a separate pkgs file
143
144 * Wed Aug 31 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-13
145 - plc.d/packages: rewrote comments about some corner cases where it fails
146 - plc.d/packages: marginally more robust
147
148 * Fri Jun 10 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-12
149 - minor tweak in plc.d/packages
150
151 * Mon Jun 06 2011 Baris Metin <bmetin@verivue.com> - bootstrapfs-2.0-11
152 - sl6 templates
153
154 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-10
155 - bugfix for multi-flavour deployments
156
157 * Fri Feb 04 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-9
158 - for multi-flavours : 'packages' step in plc.d now handles vserver links and related hacks in yumgroups
159
160 * Thu Jan 27 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-8
161 - no semantic change - attempt to speed up build
162
163 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-7
164 - yum repo template for f14 nodes
165 - tweaks the way /etc/plc.d/packages works
166
167 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-6
168 - add sha1sum
169 - module name changes
170
171 * Tue Apr 27 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-5
172 - support different flavours of vservers on nodes
173
174 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-4
175 - fix unmatched $ in URL svn keywords
176
177 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-3
178 - choice between various pldistros is not made at build time, but at run time
179 - relies on GetNodeFlavour to expose the node's fcdistro - requires PLCAPI-5.0-5
180 - in addition, the baseurl for the myplc repo is http:// and not https:// anymore
181 - the https method does not work on fedora 12, and GPG is used below anyway
182
183 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-2
184 - new slicerepo package for exposing stuff to slivers
185
186 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-1
187 - first working version of 5.0:
188 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
189 - nodefailiy is 3-fold with pldistro-fcdistro-arch
190 - new module nodeyum; first draft has the php scripts and conf_files for tweaking nodes yum config
191
192 * Mon Jan 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-11
193 - for building on fedora12
194
195 * Thu Oct 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-10
196 - cosmetic change in message at build-time
197
198 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-9
199 - can use groups in the pkgs file with +++ for space
200
201 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-8
202 - bugfix for when a .post script is not needed
203
204 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-7
205 - search post-install scripts (.post) in path (distro, then planetlab)
206 - mostly useful for externally-defined pldistros
207
208 * Thu Jan 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-6
209 - fix build bug when dealing with extensions
210
211 * Thu Dec 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-5
212 - optional package bootstrapfs-<pldiftr>-<arch>-plain comes with uncompressed images for faster tests
213
214 * Fri Nov 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-4
215 - cosmetic changes in build: displays duration, and shows up in summary
216
217 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-3
218 - Do not overwrite yumgroups.xml upon updates of noderepo
219
220 * Thu Jul 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-2
221 - uses the right yum.conf when building images
222
223 * Mon May 05 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-1.0-1
224 - rpm release tag does not need pldistro as it is already part of the rpm name
225
226 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-0.1-2 BootstrapFS-1.0-0
227 - naming scheme changed, tarball name now contains ''nodefamily'' as <pldistro>-<arch>
228 - new package named 'noderepo' allows to ship the full set of node rpms to another (arch) myplc
229
230 * Tue Mar 4 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> -
231 - Initial build.
232
233 %define module_current_branch 1.0