%prep
%setup -q
-
-
-%build
aclocal -I m4
autoconf
-automake
+automake --add-missing
# bootstrap to avoid BuildRequires of kernel-source
for linux in $RPM_BUILD_DIR/linux-* /lib/modules/`uname -r`/build ; do
[[ -d $linux/include ]] && %configure --with-kerneldir=$linux --enable-linuxconf && break
done
-%__make %{?_smp_mflags}
+%build
+make
+
%install
rm -rf $RPM_BUILD_ROOT
%__make DESTDIR=$RPM_BUILD_ROOT install
mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
}
-
%clean
rm -rf $RPM_BUILD_ROOT
-
%define services vcached vservers
%pre
done
fi
-
%post
# 1 = install, 2 = upgrade/reinstall
if [ $1 -eq 1 ] ; then
for i in %{services} ; do
[ "`/sbin/runlevel`" = "unknown" ] || service $i start
done
+if [ ! -f /etc/shells ] || ! grep -q '^/usr/sbin/vsh$' /etc/shells ; then
+ echo /usr/sbin/vsh >> /etc/shells
+fi
%__chattr +t /vservers || :
+%postun
+# 0 = erase, 1 = upgrade
+if [ "$1" = 0 ] ; then
+ perl -i -n -e 'next if /^\/usr\/sbin\/vsh$/; print' /etc/shells
+fi
+
%preun
# 0 = erase, 1 = upgrade
if [ $1 -eq 0 ] ; then
done
fi
-
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS
%config(noreplace) /etc/vcached.conf
%dir /etc/vservers
%attr(0,root,root) %dir /vservers
+%attr(4755,root,root) /usr/sbin/vsh
%exclude %_sbindir/newvserver
%exclude %_mandir/man8/newvserver*
-
%files linuxconf
%defattr(-,root,root)
%config(noreplace) /etc/vservers/newvserver.defaults
%_sbindir/newvserver
%_mandir/man8/newvserver*
-
%changelog
+* Mon Oct 11 2004 Marc E. Fiuczynski <mef@cs.princeton.edu> 0.1-1.planetlab
+- added vsh
+
* Wed Aug 11 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.29-1.planetlab
- initial PlanetLab 3.0 build.
* Fri Sep 26 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.4-1
- initial build.
+