# m68k and mips are the only not supported archs
#
# Conditional build:
-%bcond_without dietlibc # don't use dietlibc (ask for troubles)
-%bcond_without doc # don't build documentation which needed LaTeX
-%bcond_with xalan # use the xalan xslt processor
+%bcond_without dietlibc # don't use dietlibc (ask for troubles)
+%bcond_without doc # don't build documentation which needed LaTeX
+%bcond_without no_dynamic_context # disable enforcement of disabled dynamic context
+%bcond_with xalan # use the xalan xslt processor
#
%define _vproc_version 0.01
-# fails with ccache in %{__cc}
+# diet compile 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: 7
+Version: 0.30.212
+Release: 1
License: GPL
Group: Applications/System
-Source0: http://www.13thfloor.at/~ensc/util-vserver/files/alpha/%{name}-%{version}.tar.bz2
-# Source0-md5: 1e8fff7cb6246d21ed029f082123019b
+Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%{name}-%{version}.tar.bz2
+# Source0-md5: 386b91732b7f0f132b4e9d978389dcc2
Source1: vprocunhide.init
Source2: vservers.init
Source3: vservers-legacy.init
Source10: %{name}-initpost.sh
Source11: http://www.13thfloor.at/vserver/s_release/v1.2.10/vproc-%{_vproc_version}.tar.bz2
# Source11-md5: 1d030717bdbc958ea4b35fd2410dad85
+Source12: %{name}-vhashify.cron
Patch0: %{name}-vsysvwrapper.patch
Patch1: %{name}-pld.patch
Patch2: %{name}-vrpm.patch
Patch3: %{name}-include.patch
Patch4: %{name}-m4-diet.patch
-Patch5: %{name}-cpuset.patch
Patch6: %{name}-build-umask.patch
Patch7: %{name}-utmpx.patch
Patch8: %{name}-vprocunhide.patch
Patch9: %{name}-dev.patch
Patch10: %{name}-no-dynamic-ctx.patch
+Patch11: %{name}-more-ip.patch
+Patch12: %{name}-rpm-fake-resolver-badperm-errorlogging.patch
URL: http://savannah.nongnu.org/projects/util-vserver/
BuildRequires: autoconf
BuildRequires: automake >= 1.9
BuildRequires: beecrypt-devel
%{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.29}
+BuildRequires: e2fsprogs-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 1.5.14
%ifarch %{x8664}
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-lib = %{version}-%{release}
Requires: issue
+Requires: mktemp >= 1.5-18
Requires: rc-scripts
Requires: util-linux
Obsoletes: util-vserver-core
Summary(pl): Narzêdzia do budowania vserverów
Group: Applications/System
Requires: %{name} = %{version}-%{release}
-Requires: e2fsprogs
Requires: /etc/pld-release
+Requires: e2fsprogs
+Requires: which
Conflicts: poldek < 0.18.8-10
%description build
Requires: yum
%description -n vserver-distro-centos
-VServer build template for CentOS 4.2.
+VServer build template for CentOS 4.
%description -n vserver-distro-centos -l pl
-Szablon budowania VServera dla CentOS 4.2.
+Szablon budowania VServera dla CentOS 4.
+
+%package -n vserver-distro-gentoo
+Summary: VServer build template for Gentoo
+Summary(pl): Szablon budowania VServera dla Gentoo
+Group: Applications/System
+Requires: util-vserver-build
+
+%description -n vserver-distro-gentoo
+VServer build template for Gentoo.
+
+%description -n vserver-distro-gentoo -l pl
+Szablon budowania VServera dla Gentoo.
%package init
Summary: initscripts for vserver
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
-%patch10 -p1
+%{?with_no_dynamic_context:%patch10 -p1}
+%patch11 -p1
+%patch12 -p1
install %{SOURCE9} package-management.txt
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts} \
+install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d,cron.d},/dev/pts} \
$RPM_BUILD_ROOT{%{_sysconfdir}/vservices,/vservers/.pkg}
%{__make} install install-distribution \
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}
+install %{SOURCE12} $RPM_BUILD_ROOT%{_libdir}/%{name}/vhashify.cron
+
+cat > $RPM_BUILD_ROOT/etc/cron.d/vservers << EOF
+02 2 * * 0 root %{_libdir}/%{name}/vhashify.cron
+EOF
ln -sf null $RPM_BUILD_ROOT/dev/initctl
%attr(755,root,root) %{_sbindir}/chxid
%attr(755,root,root) %{_sbindir}/exec-cd
%attr(755,root,root) %{_sbindir}/lsxid
+%attr(755,root,root) %{_sbindir}/naddress
+%attr(755,root,root) %{_sbindir}/nattribute
+%attr(755,root,root) %{_sbindir}/ncontext
%attr(755,root,root) %{_sbindir}/reducecap
%attr(755,root,root) %{_sbindir}/setattr
%attr(755,root,root) %{_sbindir}/showattr
%{_libdir}/%{name}/defaults/*
%attr(755,root,root) %{_libdir}/%{name}/capchroot
%attr(755,root,root) %{_libdir}/%{name}/chain-echo
+%attr(755,root,root) %{_libdir}/%{name}/chbind-compat
%attr(755,root,root) %{_libdir}/%{name}/check-unixfile
%attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
%attr(755,root,root) %{_libdir}/%{name}/chroot-sh
%attr(755,root,root) %{_libdir}/%{name}/start-vservers
%attr(755,root,root) %{_libdir}/%{name}/vprocunhide
%{_libdir}/%{name}/vserver.*
+%{_libdir}/%{name}/vserver-setup.*
+%attr(755,root,root) %{_libdir}/%{name}/vserver-build
+%{_libdir}/%{name}/vserver-build.*
%attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
+%attr(755,root,root) %{_libdir}/%{name}/vhashify
+%attr(755,root,root) %{_libdir}/%{name}/vhashify.cron
%attr(755,root,root) %{_libdir}/%{name}/vshelper
%attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
%{_mandir}/man8/chbind.8*
%attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vrootdevices
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers
+%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/vservers
%attr(754,root,root) /etc/rc.d/init.d/vprocunhide
%attr(754,root,root) /etc/rc.d/init.d/vrootdevices
%attr(754,root,root) /etc/rc.d/init.d/vservers
%dir %{_libdir}/%{name}/distributions/template
%attr(755,root,root) %{_libdir}/%{name}/distributions/template/init*
%attr(-,root,root) %{_libdir}/%{name}/distributions/redhat
+%{_libdir}/%{name}/magic.mime
%{_libdir}/%{name}/vserver-build.*
%{_libdir}/%{name}/vserver-setup.functions
%{_libdir}/%{name}/defaults/fstab
%attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
%attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
%attr(755,root,root) %{_libdir}/%{name}/vcopy
-%attr(755,root,root) %{_libdir}/%{name}/vhashify
%attr(755,root,root) %{_libdir}/%{name}/vpkg
%attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
%attr(755,root,root) %{_libdir}/%{name}/vrpm-*
%files -n vserver-distro-centos
%defattr(644,root,root,755)
-%{_libdir}/util-vserver/distributions/centos42
+%{_libdir}/util-vserver/distributions/centos4
+
+%files -n vserver-distro-gentoo
+%defattr(644,root,root,755)
+%dir %{_libdir}/util-vserver/distributions/gentoo
+%attr(755,root,root) %{_libdir}/util-vserver/distributions/gentoo/*
+%attr(755,root,root) %{_sbindir}/vdispatch-conf
+%attr(755,root,root) %{_sbindir}/vemerge
+%attr(755,root,root) %{_sbindir}/vesync
+%attr(755,root,root) %{_sbindir}/vupdateworld
%files legacy
%defattr(644,root,root,755)