# TODO
# - somewhy empty /var/cache/vservers is needed when building pld vserver
+# - make build create /dev/std{in,out,err} links
#
# m68k and mips are the only not supported archs
#
%bcond_without doc # don't build documentation which needed LaTeX
%bcond_with xalan # use the xalan xslt processor
#
+%define _vproc_version 0.01
+# fails with ccache in %{__cc}
+%undefine with_ccache
+#
Summary: Linux virtual server utilities
Summary(pl): Narzêdzia dla linuksowych serwerów wirtualnych
Name: util-vserver
Version: 0.30.210
-Release: 5
+Release: 5.4
License: GPL
Group: Applications/System
Source0: http://www.13thfloor.at/~ensc/util-vserver/files/alpha/%{name}-%{version}.tar.bz2
# http://www.paul.sladen.org/vserver/archives/200505/0078.html
Source9: %{name}-pkgmgmt.txt
Source10: %{name}-initpost.sh
+Source11: http://www.13thfloor.at/vserver/s_release/v1.2.10/vproc-%{_vproc_version}.tar.bz2
+# Source11-md5: 1d030717bdbc958ea4b35fd2410dad85
Patch0: %{name}-vsysvwrapper.patch
Patch1: %{name}-pld.patch
Patch2: %{name}-vrpm.patch
Patch5: %{name}-cpuset.patch
Patch6: %{name}-build-umask.patch
Patch7: %{name}-utmpx.patch
+Patch8: %{name}-vprocunhide.patch
+Patch9: %{name}-dev.patch
URL: http://savannah.nongnu.org/projects/util-vserver/
BuildRequires: autoconf
BuildRequires: automake >= 1.9
konfiguracjê w starym stylu.
%prep
-%setup -q
+%setup -q -a11
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p1
install %{SOURCE9} package-management.txt
%{__make} all
%{?with_doc:%{__make} doc}
+%{__make} -C vproc-%{_vproc_version} \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags}"
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/vrootdevices
install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/vrootdevices
install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac/initpost
+install vproc-%{_vproc_version}/vproc $RPM_BUILD_ROOT%{_sbindir}
ln -sf null $RPM_BUILD_ROOT/dev/initctl
/sbin/chkconfig --del vservers-legacy
fi
-%triggerpostun build -- %{name}-build < 0.30.209-2.1
+%triggerpostun build -- %{name}-build < 0.30.210-5.2
if [ -f /etc/vservers/.distributions/pld2.0/poldek/poldek.conf.rpmsave ]; then
mv -f /etc/vservers/.distributions/{pld2.0,pld-ac}/poldek/poldek.conf.rpmsave
fi
+# kill old vserver specific package ignores which are no longer needed
+l=`egrep '^ignore.*(basesystem|SysVinit|rc-scripts)' /etc/vservers/*/apps/pkgmgmt/base/poldek/etc/poldek.conf -l 2>/dev/null`
+if [ "$l" ]; then
+ %{__sed} -i -e '/^ignore/s, \(basesystem\|SysVinit\|rc-scripts\),,g' $l
+fi
+
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
%attr(755,root,root) %{_sbindir}/vkill
%attr(755,root,root) %{_sbindir}/vlimit
%attr(755,root,root) %{_sbindir}/vdu
+%attr(755,root,root) %{_sbindir}/vproc
%attr(755,root,root) %{_sbindir}/vps
%attr(755,root,root) %{_sbindir}/vpstree
%attr(755,root,root) %{_sbindir}/vrsetup
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/pld-ac/poldek/*.conf
%attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
%dir %{_libdir}/%{name}/distributions
-%attr(-, root, root) %{_libdir}/%{name}/distributions/defaults
-%attr(-, root, root) %{_libdir}/%{name}/distributions/pld*
-%attr(-, root, root) %{_libdir}/%{name}/distributions/template
-%attr(-, root, root) %{_libdir}/%{name}/distributions/redhat*
+%attr(-,root,root) %{_libdir}/%{name}/distributions/defaults
+%attr(-,root,root) %{_libdir}/%{name}/distributions/pld*
+%dir %{_libdir}/%{name}/distributions/template
+%attr(755,root,root) %{_libdir}/%{name}/distributions/template/init*
+%attr(-,root,root) %{_libdir}/%{name}/distributions/redhat
%{_libdir}/%{name}/vserver-build.*
%{_libdir}/%{name}/vserver-setup.functions
%{_libdir}/%{name}/defaults/fstab