no more unversioned obsolete
[vserver-reference.git] / sliceimage.spec
1 %define slicefamily %{pldistro}-%{distroname}-%{_arch}
2
3 # historically there was one dummy 'sliceimage' package, and 
4 # then 2 subpackages with {slicefamily} and system-{slicefamily}
5 # however the python spec2make that we need to use on f>=15 is dumb
6 # it cannot detect it's an empty/dummy package, and thus includes it
7 # in e.g. noderepo, which fails
8 # so we now only have the 2 relevant packages
9
10 %define name sliceimage
11 %define version 5.1
12 %define taglevel 12
13
14 # pldistro already in the rpm name
15 %define release %{taglevel}%{?date:.%{date}}
16
17
18 # we don't really need the standard postinstall process from rpm that
19 # strips files and byte-compiles python files. all files in this
20 # package are comming from other rpm files and they've already went
21 # through this post install processing. - baris
22 %define __os_install_post %{nil}
23 %define debug_package %{nil}
24
25 # this is needed as of f27 to prevent rpmbuild from inserting a huge
26 # /usr/lib/.build-id area, that not only is not helping:
27 # it comes in the way when creating the node image
28 %global _build_id_links none
29
30 Vendor: PlanetLab
31 Packager: PlanetLab Central <support@planet-lab.org>
32 Distribution: PlanetLab %{plrelease}
33 URL: %{SCMURL}
34
35 # sliceimage per se is just a placeholder
36 Summary: Slice reference image so node can create slivers of type %{slicefamily}
37 Name: %{name}-%{slicefamily}
38 Version: %{version}
39 Release: %{release}
40 Source0: %{name}-%{version}.tar.bz2
41 License: GPL
42 Group: Applications/System
43 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
44 # in 5.0, this package was named vserver-<>
45 # Obsoletes: vserver-{slicefamily}
46 # this would not be right
47 #BuildArch: noarch
48 AutoReqProv: no
49
50 %description
51 This package provides the nodes with the root image used as the 
52 installation base for new slivers of type %{slicefamily}.
53
54 %package -n sliceimage-system-%{slicefamily}
55 Summary: Reference image for system slices
56 Group: Applications/System
57 AutoReqProv: no
58 Requires: sliceimage-%{slicefamily} >= %{version}-%{release}
59 # in 5.0, this package was named vserver-systemslices-<>
60 Obsoletes: vserver-systemslices-%{slicefamily}
61
62 %description -n sliceimage-system-%{slicefamily} 
63 This package installs the stubs necessary to create system slices
64 (typically planetflow) on top of the reference image.
65
66 %prep
67 %setup -q
68
69 %build
70 pushd sliceimage
71 ./build.sh %{pldistro} %{slicefamily}
72 popd
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 pushd sliceimage
78 # the path for the root of these is still /vservers/ for compat
79 find vservers | cpio -p -d -u $RPM_BUILD_ROOT/
80 popd
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(-,root,root)
87 /vservers/.vref/%{slicefamily}
88
89 %files -n sliceimage-system-%{slicefamily}
90 %defattr(-,root,root)
91 /vservers/.vstub/%{slicefamily}
92
93 ### for upgrades
94 %post
95 if [ "$PL_BOOTCD" = "1" ] ; then
96    exit 0
97 fi
98 # remove explicit reference to vserver, find out all relevant scripts
99 initScripts=`find /etc/init.d/ -name '*sliceimage*'`
100 if [ "$initScripts" != "" ] ; then
101    for initscript in $initScripts ; do $initscript start ; done
102 fi
103
104 # need to do this for system slices, for when a new image shows up
105 # we've already the service installed and enabled, as systemslices requires the plain package
106 %post -n sliceimage-system-%{slicefamily}
107 if [ "$PL_BOOTCD" = "1" ] ; then
108    exit 0
109 fi
110 # remove explicit reference to vserver, find out all relevant scripts
111 initScripts=`find /etc/init.d/ -name '*sliceimage*'`
112 if [ "$initScripts" != "" ] ; then
113    for initscript in $initScripts ; do $initscript force ; done
114 fi
115
116
117 #%define vcached_pid /var/run/vcached.pid
118
119 %changelog
120 * Mon Jan 07 2019 Thierry <Parmentelat> - sliceimage-5.1-12
121 - fix for optimizing build on fedora27
122
123 * Tue Jan 19 2016 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-11
124 - make cronjob hourly instead of daily
125
126 * Wed Feb 18 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-10
127 - fixed taglevel in specfile
128
129 * Tue Jul 22 2014 Thomas Dreibholz <dreibh@simula.no> - sliceimage-5.1-9
130 - Post-install fix: exit instead of return
131 - Post-install fix: only call init script when there are init scripts
132
133 * Wed Jul 16 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-8
134 - use systemd unit files to initialize lxc-sliceimage instead of a sysv script
135
136 * Mon Apr 28 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-7
137 - can build pips and gems in sliceimage (currently only gem used in omf)
138 - requires a recent build/pkgs.py if pkgs file does mention pip or gem
139
140 * Wed Jul 03 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-6
141 - attempt to make lxc-sliceimage (update lxc ref. images) more robust
142 - in particular by avoiding chroot when simple file operations are involved
143 - also this activity gets logged into /var/log/lxc-sliceimage.log
144 - it is still unclear whether stub-based images are correctly updated
145
146 * Wed Jun 26 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-5
147 - fixes for heterogeneous slice/nodes
148 - addresses PATH and missing eth0 among others
149
150 * Fri May 24 2013 Andy Bavier <acb@cs.princeton.edu> - sliceimage-5.1-4
151 - Fix machine arch in slivers
152
153 * Wed Oct 24 2012 Andy Bavier <acb@cs.princeton.edu> - sliceimage-5.1-3
154 - More flexible <interface> element generation
155
156 * Mon Jul 09 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-2
157 - for linux-containers: populates refs from stubs (for system slices)
158 - for linux-containers: memory bump to 512M, and add acpi
159
160 * Fri Apr 13 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-1
161 - first working draft for both mainline and lxc
162
163 * Mon Jan 24 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-reference-5.0-6
164 - no semantic change - just fixed specfile for git URL
165
166 * Wed Dec 29 2010 Daniel Hokka Zakrisson <dhokka@cs.princeton.edu> - vserver-reference-5.0-5
167 - Remove ugly hack that breaks su/sudo on upgrades.
168
169 * Tue Dec 07 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-reference-5.0-4
170 - optimize rpm construction - skips stripping and the like
171
172 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - VserverReference-5.0-3
173 - module name changes
174
175 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-5.0-2
176 - iron out system slices reference image update
177
178 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-5.0-1
179 - first working version of 5.0:
180 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
181 - nodefamily is 3-fold with pldistro-fcdistro-arch
182 - new module layout
183
184 * Tue Oct 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-16
185 - fix issue about locating the post-install script(s)
186 - this was causing the onelab distro to miss the /etc/sudoers patch
187
188 * Mon Oct 19 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - VserverReference-4.2-15
189 - - comment out requiretty
190
191 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-14
192 - can use groups in the pkgs file with +++ for space
193
194 * Mon Aug 10 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - VserverReference-4.2-13
195 - Added remove for all VROOTs rather than the last one.  BUG FIX.
196
197 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-12
198 - fix for fedora 10
199
200 * Thu Oct 02 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-11
201 - on 64bits archs, locates util-vserver's config file correctly
202
203 * Thu Jul 03 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - VserverReference-4.2-10
204 - Use the correct yum.conf to get access to required packages such as pf2slice.
205
206 * Mon Jun 30 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - VserverReference-4.2-9
207 - Scriptlet fix.
208
209 * Fri Jun 27 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - VserverReference-4.2-8
210 - Unset the immutable and iunlink bits to make sure we can install the package.
211
212 * Fri Jun 27 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - VserverReference-4.2-7
213 - Let rpm remove the files.
214
215 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-6
216 - empty change, this should *not* be a noarch package
217
218 * Mon Apr 21 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-5
219 - tweaked pre script that was removing everything under /vservers/.vref
220 - dismantle vcached (as far as this module is concerned)
221 - sudo to log in /var/log/sudo
222
223 * Fri Mar 28 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-3 VserverReference-4.2-4
224 - bugfix, 4.2-3 was broken as the slicefamily stamp could not get created, thus nm issued 'vuseradd -t default'
225
226 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - VserverReference-4.2-2 VserverReference-4.2-3
227 - a single node can now install several instances of this package
228 - package name contains slicefamily - <pldistro>-<fcdistro>-<arch>
229 - setattr --iunlink or --~iunlink appropriately (uses /proc/virtual/info)
230 - does not copy yum.conf from host anymore
231
232 * Fri Feb 15 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-4.2-1 vserver-4.2-2
233 - vserver image to properly use links rather than copies
234
235 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-4.2-0 vserver-4.2-1
236 - more careful scan of the vserver-*.pkgs image specifications
237
238 * Tue Sep  1 2005 Mark Huang <mlhuang@cs.princeton.edu> 3.1-1.planetlab
239 - Pre-package vserver-reference instead of building it on nodes
240
241 * Tue Nov 30 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-5.planetlab
242 - PL3118 and PL3131 fix: set barrier bit on /vservers instead of old
243   immulink bit. Do not reset the immutable bit on the new
244   vserver-reference directory when deleting it after an error.
245
246 * Mon Nov 15 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-4.planetlab
247 - bump release to install Fedora Core 2 updates as of Tue Nov  9 2004
248 - PL3017 fix: rebuild vserver-reference image in case it was built
249   with i386 glibc
250
251 * Mon Nov 15 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-4.planetlab
252 - bump release to install Fedora Core 2 updates as of Tue Nov  9 2004
253 - PL3017 fix: rebuild vserver-reference image in case it was built
254   with i386 glibc
255
256 * Sun Oct 10 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-3.planetlab
257 - dynamically install reference image at init time
258
259 * Sun Oct 10 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-2.planetlab
260 - dynamically install reference image
261
262 * Tue Sep 14 2004 Mark Huang <mlhuang@cs.princeton.edu> 3.0-1.planetlab
263 - initial build
264
265 %define module_current_branch 4.2