Setting tag sliceimage-5.1-5
[sliceimage.git] / sliceimage.spec
index 53ef747..eee3e23 100644 (file)
@@ -1,8 +1,15 @@
 %define slicefamily %{pldistro}-%{distroname}-%{_arch}
 
 %define slicefamily %{pldistro}-%{distroname}-%{_arch}
 
+# historically there was one dummy 'sliceimage' package, and 
+# then 2 subpackages with %{slicefamily} and system-%{slicefamily}
+# however the python spec2make that we need to use on f>=15 is dumb
+# it cannot detect it's an empty/dummy package, and thus includes it
+# in e.g. noderepo, which fails
+# so we now only have the 2 relevant packages
+
 %define name sliceimage
 %define version 5.1
 %define name sliceimage
 %define version 5.1
-%define taglevel 0
+%define taglevel 5
 
 # pldistro already in the rpm name
 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 
 # pldistro already in the rpm name
 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
@@ -22,35 +29,25 @@ Distribution: PlanetLab %{plrelease}
 URL: %{SCMURL}
 
 # sliceimage per se is just a placeholder
 URL: %{SCMURL}
 
 # sliceimage per se is just a placeholder
-Summary: Dummy reference image for slice family %{slicefamily}
-Name: %{name}
+Summary: Slice reference image so node can create slivers of type %{slicefamily}
+Name: %{name}-%{slicefamily}
 Version: %{version}
 Release: %{release}
 Source0: %{name}-%{version}.tar.bz2
 License: GPL
 Group: Applications/System
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 Version: %{version}
 Release: %{release}
 Source0: %{name}-%{version}.tar.bz2
 License: GPL
 Group: Applications/System
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+# in 5.0, this package was named vserver-<>
+Obsoletes: vserver-%{slicefamily}
 # this would not be right
 #BuildArch: noarch
 # this would not be right
 #BuildArch: noarch
-
-%description
-This package does not really exist.
-
-
-%package %{slicefamily}
-Summary: Slice reference image for creating slivers
-Group: Applications/System
 AutoReqProv: no
 AutoReqProv: no
-Requires: util-vserver, e2fsprogs, yum
-# in 5.0, this package was named vserver-<>
-Obsoletes: vserver-%{slicefamily}
-
-%description %{slicefamily}
-This package creates the slice reference image used
-as the installation base for new PlanetLab slivers.
 
 
+%description
+This package provides the nodes with the root image used as the 
+installation base for new slivers of type %{slicefamily}.
 
 
-%package system-%{slicefamily}
+%package -n sliceimage-system-%{slicefamily}
 Summary: Reference image for system slices
 Group: Applications/System
 AutoReqProv: no
 Summary: Reference image for system slices
 Group: Applications/System
 AutoReqProv: no
@@ -58,7 +55,7 @@ Requires: sliceimage-%{slicefamily} >= %{version}-%{release}
 # in 5.0, this package was named vserver-systemslices-<>
 Obsoletes: vserver-systemslices-%{slicefamily}
 
 # in 5.0, this package was named vserver-systemslices-<>
 Obsoletes: vserver-systemslices-%{slicefamily}
 
-%description system-%{slicefamily} 
+%description -n sliceimage-system-%{slicefamily} 
 This package installs the stubs necessary to create system slices
 (typically planetflow) on top of the reference image.
 
 This package installs the stubs necessary to create system slices
 (typically planetflow) on top of the reference image.
 
@@ -74,9 +71,6 @@ popd
 rm -rf $RPM_BUILD_ROOT
 
 pushd sliceimage
 rm -rf $RPM_BUILD_ROOT
 
 pushd sliceimage
-install -D -m 755 initscripts/sliceimage $RPM_BUILD_ROOT/%{_initrddir}/sliceimage
-install -D -m 644 cron.d/sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/sliceimage
-install -D -m 644 logrotate/sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/sliceimage
 # the path for the root of these is still /vservers/ for compat
 find vservers | cpio -p -d -u $RPM_BUILD_ROOT/
 popd
 # the path for the root of these is still /vservers/ for compat
 find vservers | cpio -p -d -u $RPM_BUILD_ROOT/
 popd
@@ -84,35 +78,48 @@ popd
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files %{slicefamily}
+%files
 %defattr(-,root,root)
 %defattr(-,root,root)
-%{_initrddir}/sliceimage
-%{_sysconfdir}/cron.d/sliceimage
-%{_sysconfdir}/logrotate.d/sliceimage
 /vservers/.vref/%{slicefamily}
 
 /vservers/.vref/%{slicefamily}
 
-%files system-%{slicefamily}
+%files -n sliceimage-system-%{slicefamily}
 %defattr(-,root,root)
 /vservers/.vstub/%{slicefamily}
 
 %defattr(-,root,root)
 /vservers/.vstub/%{slicefamily}
 
-%define vcached_pid /var/run/vcached.pid
-
-%post %{slicefamily}
-chkconfig --add sliceimage
-chkconfig sliceimage on
-[ "$PL_BOOTCD" = "1" ] || service sliceimage start
-
-# Randomize daily run time
-M=$((60 * $RANDOM / 32768))
-H=$((24 * $RANDOM / 32768))
-sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/sliceimage
+### for upgrades
+%post
+[ "$PL_BOOTCD" = "1" ] && return
+# remove explicit reference to vserver, find out all relevant scripts
+for initscript in /etc/init.d/*sliceimage*; do $initscript start ; done
 
 
-%post system-%{slicefamily}
 # need to do this for system slices, for when a new image shows up
 # we've already the service installed and enabled, as systemslices requires the plain package
 # need to do this for system slices, for when a new image shows up
 # we've already the service installed and enabled, as systemslices requires the plain package
-[ "$PL_BOOTCD" = "1" ] || service sliceimage force
+%post -n sliceimage-system-%{slicefamily}
+[ "$PL_BOOTCD" = "1" ] && return
+# remove explicit reference to vserver, find out all relevant scripts
+for initscript in /etc/init.d/*sliceimage*; do $initscript force ; done
+
+
+#%define vcached_pid /var/run/vcached.pid
 
 %changelog
 
 %changelog
+* Wed Jun 26 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-5
+- fixes for heterogeneous slice/nodes
+- addresses PATH and missing eth0 among others
+
+* Fri May 24 2013 Andy Bavier <acb@cs.princeton.edu> - sliceimage-5.1-4
+- Fix machine arch in slivers
+
+* Wed Oct 24 2012 Andy Bavier <acb@cs.princeton.edu> - sliceimage-5.1-3
+- More flexible <interface> element generation
+
+* Mon Jul 09 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-2
+- for linux-containers: populates refs from stubs (for system slices)
+- for linux-containers: memory bump to 512M, and add acpi
+
+* Fri Apr 13 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sliceimage-5.1-1
+- first working draft for both mainline and lxc
+
 * Mon Jan 24 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-reference-5.0-6
 - no semantic change - just fixed specfile for git URL
 
 * Mon Jan 24 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - vserver-reference-5.0-6
 - no semantic change - just fixed specfile for git URL