Initial commit.
Marco Yuen [Tue, 23 Oct 2012 14:56:43 +0000 (10:56 -0400)]
mpi-reference-0.2.tar.bz2 [new file with mode: 0644]
mpi-reference.spec [new file with mode: 0644]

diff --git a/mpi-reference-0.2.tar.bz2 b/mpi-reference-0.2.tar.bz2
new file mode 100644 (file)
index 0000000..b9052f3
Binary files /dev/null and b/mpi-reference-0.2.tar.bz2 differ
diff --git a/mpi-reference.spec b/mpi-reference.spec
new file mode 100644 (file)
index 0000000..a8efd3a
--- /dev/null
@@ -0,0 +1,70 @@
+%define name mpi-reference
+%define version 0.2
+%define taglevel 5
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+# tmp - build is down
+%define source http://www.cs.princeton.edu/~marcoy/mpi-reference-%{version}.tar.bz2
+
+Name:          %{name} 
+Version:       %{version}
+Release:       %{release}
+Summary:       MPI reference image.
+
+Group:         Applications/System
+License:       GPL     
+URL:           None
+Source0:       %{source}
+BuildRoot:     %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+Requires:       btrfs-progs
+
+%description
+A simple package to deploy reference images for mpi
+
+%prep
+wget %{source}
+
+%install
+mkdir -p /vservers/.lvref
+install -D -m 644 $RPM_BUILD_DIR/mpi-reference-%{version}.tar.bz2 $RPM_BUILD_ROOT/vservers/mpi-reference-%{version}.tar.bz2
+
+%pre
+# 1 - Initial install, 2 - Upgrade
+if [ "$1" = "2" ]; then
+  rm -rf /vservers/.vref/mpi*
+fi
+
+%post
+pushd /vservers/.vref/
+[ -d /vservers/.lvref/mpi-f12-x86_64 ] && btrfs subvolume delete /vservers/.lvref/mpi-f12-x86_64
+btrfs subvolume create /vservers/.lvref/mpi-f12-x86_64
+tar jxpf $RPM_BUILD_ROOT/vservers/mpi-reference-%{version}.tar.bz2 -C /vservers/.lvref/
+rm -f $RPM_BUILD_ROOT/vservers/mpi-reference-%{version}.tar.bz2
+popd
+
+%preun
+# 0 - Uninstall, 1 - Upgrade
+if [ "$1" = "0" ]; then
+  btrfs subvolume delete /vservers/.lvref/mpi-f12-x86_64
+  rm -rf /vservers/.vref/mpi*
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_DIR/*
+
+%files
+/vservers/mpi-reference-%{version}.tar.bz2
+
+%changelog
+* Fri Oct 19 2012 Marco Yuen <marcoy@cs.princeton.edu> - mpi-reference-0.3
+- Change to use btrfs subvolume
+
+* Tue Aug 07 2012 Marco Yuen <marcoy@cs.princeton.edu> - mpi-reference-0.2
+- Fix resolve.conf
+- Fix mpi-init
+- Fix %preun by adding guard
+- Fix a problem in the reference image
+
+* Fri Aug 03 2012 Marco Yuen <marcoy@cs.princeton.edu> - mpi-reference-0.1
+- MPI image