X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=util-vserver.spec.in;h=cb20f1dbc3c9970f283592ed67686f2c95dbca48;hb=47a6192b9ca04fa6376edeb30c24256bde5baea4;hp=c86ce7edf4785d92a3c26d64e905c0602520210b;hpb=ab7bdc5e4bb5bbc74ecea780f77cba9e2a9981d4;p=util-vserver.git diff --git a/util-vserver.spec.in b/util-vserver.spec.in index c86ce7e..cb20f1d 100644 --- a/util-vserver.spec.in +++ b/util-vserver.spec.in @@ -51,19 +51,18 @@ linuxconf. %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 @@ -74,12 +73,15 @@ test "%_initrddir" = %_sysconfdir/init.d || { mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/ } +mkdir -p ${RPM_BUILD_ROOT}/bin +ln -f ${RPM_BUILD_ROOT}%_sbindir/vsh ${RPM_BUILD_ROOT}/bin/vsh + +install -D -m 644 sysv/vcached.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/vcached %clean rm -rf $RPM_BUILD_ROOT - -%define services vcached +%define services vcached vservers %pre # 1 = install, 2 = upgrade/reinstall @@ -89,7 +91,6 @@ if [ $1 -eq 2 ] ; then done fi - %post # 1 = install, 2 = upgrade/reinstall if [ $1 -eq 1 ] ; then @@ -101,10 +102,19 @@ fi for i in %{services} ; do [ "`/sbin/runlevel`" = "unknown" ] || service $i start done +if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then + echo /bin/vsh >> /etc/shells +fi %__chattr +t /vservers || : +%postun +# 0 = erase, 1 = upgrade +if [ "$1" = 0 ] ; then + perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells +fi + %preun # 0 = erase, 1 = upgrade if [ $1 -eq 0 ] ; then @@ -115,7 +125,6 @@ if [ $1 -eq 0 ] ; then done fi - %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog NEWS README THANKS @@ -126,20 +135,26 @@ fi %_mandir/man8/* %config %_initrddir/* %config(noreplace) /etc/vservers.conf +%config(noreplace) /etc/vcached.conf +/etc/logrotate.d/vcached +%dir /etc/vservers %attr(0,root,root) %dir /vservers +%attr(4755,root,root) /usr/sbin/vsh +%attr(4755,root,root) /bin/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 0.1-1.planetlab +- added vsh + * Wed Aug 11 2004 Mark Huang 0.29-1.planetlab - initial PlanetLab 3.0 build. @@ -148,3 +163,4 @@ fi * Fri Sep 26 2003 Enrico Scholz - 0:0.23.4-1 - initial build. +