X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=bootcd.spec;fp=bootcd.spec;h=c14816ef20c30f3ec41ea227362ac151e978d37d;hb=410e611d4a63b0d69fd1ddcf45b791697eb7ade7;hp=0000000000000000000000000000000000000000;hpb=2a7febbdd2e5b263e9eeea52af6a97c2b8e4b2b0;p=bootcd.git diff --git a/bootcd.spec b/bootcd.spec new file mode 100644 index 0000000..c14816e --- /dev/null +++ b/bootcd.spec @@ -0,0 +1,90 @@ +%define name bootcd +%define version 3.3 +%define release 1%{?pldistro:.%{pldistro}}%{?date:.%{date}} +# XXX Get this from /etc/planetlab +%define configuration default + +Vendor: PlanetLab +Packager: PlanetLab Central +Distribution: PlanetLab 3.2 +URL: http://cvs.planet-lab.org/cvs/bootcd_v3 + +Summary: The PlanetLab Boot CD +Name: bootcd +Version: %{version} +Release: %{release} +License: BSD +Group: System Environment/Base +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +AutoReqProv: no +%define debug_package %{nil} + +%description +The PlanetLab Boot CD securely boots PlanetLab nodes into an immutable +environment. + +%prep +%setup -q + +%build +./build.sh build %{configuration} + +%install +install -d $RPM_BUILD_ROOT/var/www/html/download +pushd build/%{configuration} +rm -f $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.md5 +bzip2 -c PlanetLab-BootCD-%{version}.iso > \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.iso.bz2 +md5sum $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.iso.bz2 >> \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.md5 + +bzip2 -c PlanetLab-BootCD-%{version}.usb > \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.usb.bz2 +md5sum $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.usb.bz2 >> \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.md5 + +bzip2 -c PlanetLab-BootCD-%{version}-biginitrd.usb > \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}-biginitrd.usb.bz2 +md5sum $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}-biginitrd.usb.bz2 >> \ + $RPM_BUILD_ROOT/var/www/html/download/PlanetLab-BootCD-%{version}.md5 +popd + +# If run under sudo, allow user to delete the build directory +if [ -n "$SUDO_USER" ] ; then + chown -R $SUDO_USER . + # Some temporary cdroot files like /var/empty/sshd and + # /usr/bin/sudo get created with non-readable permissions. + find . -not -perm +0600 -exec chmod u+rw {} \; +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +# If run under sudo, allow user to delete the built RPM +if [ -n "$SUDO_USER" ] ; then + chown $SUDO_USER %{_rpmdir}/%{_arch}/%{name}-%{version}-%{release}.%{_arch}.rpm +fi + +%post +cat < - +- added biginitrd usb image + +* Fri Sep 2 2005 Mark Huang - +- Initial build. +