%define freevsd_vrs 1.4.10 %define freevsd_dir freevsd-%freevsd_vrs Summary: A program to create true Linux virtual servers Name: freevsd Version: %freevsd_vrs Release: 1 Copyright: GPL Group: Applications/System Source: ftp://ftp.freevsd.org/%freevsd_dir/%freevsd_dir.tar.gz BuildRoot: /var/tmp/%{name}-root Prefix: %{_prefix} Vendor: Idaya Packager: Nigel Marett Requires: perl, openssl >= 0.9.6 Prereq: perl %description FreeVSD facilitates true Linux Virtual Servers within a `chroot' environment, allowing web servers and other applications to be deployed and administered discretely, without compromise to security. Each Virtual Server has its own IP address(es), Apache webserver, and a view of the process table. FreeVSD expands the Linux system by creating a pseudo-`super user' (admin) for each Virtual Server. The admin user has the ability to create extra POP3/FTP and Telnet users and also administrate vital services such as the webserver. %package pkgs Summary: FreeVSD third party packages Copyright: GPL Group: Applications/System %description pkgs Third party packages patched to create the pseudo-`super user' (admin). %package skelutils Summary: FreeVSD utilities for inclusion in a skel Copyright: GPL Group: Application/System %description skelutils Set of utilities to be included in a skel, for use within a virtual server. %package skelfiles Summary: FreeVSD modified configuration files for inclusion in a skel. Copyright: GPL Group: Application/System %description skelfiles Set of configuration files for use within a skel. %prep %setup -q %build autoheader autoconf %configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --with-siteconf=./site/linux --enable-addons=./freevsd-pkgs make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p $RPM_BUILD_ROOT/{usr/bin,usr/sbin,usr/share} cd $RPM_BUILD_DIR/%freevsd_dir install host/linux/doc/vsd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/vsd make ROOT="${RPM_BUILD_ROOT}" install cp ${RPM_BUILD_ROOT}/etc/vsd/freevsd.conf ${RPM_BUILD_ROOT}/freevsd.conf sed -e "/third party/d" -e "/add_ons/d" < ${RPM_BUILD_ROOT}/freevsd.conf \ > ${RPM_BUILD_ROOT}/etc/freevsd.conf rm -f ${RPM_BUILD_ROOT}/freevsd.conf # install skel utils mkdir -p $RPM_BUILD_ROOT/home/vsd/skel/skel-%freevsd_vrs cp -r $RPM_BUILD_ROOT/%{_prefix}/share/freevsd/skel-repo/{etc,home,lib,usr} \ $RPM_BUILD_ROOT/home/vsd/skel/skel-%freevsd_vrs CVS_DIRS=`find $RPM_BUILD_ROOT/home/vsd/skel/skel-%freevsd_vrs -name CVS -type d -print` for file in $CVS_DIRS; do rm -rf $file; done %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add vsd cp -f %{_prefix}/share/freevsd/VSD.pm `%{_prefix}/share/freevsd/lib_perl.pl` if [ ! -d `%{_prefix}/share/freevsd/lib_perl.pl`/VSD ]; then mkdir `%{_prefix}/share/freevsd/lib_perl.pl`/VSD fi cp -fr %{_prefix}/share/freevsd/VSD/* `%{_prefix}/share/freevsd/lib_perl.pl`/VSD/ # Create all of the vsd_ca symbolic links, as RPM won't include them in the file: ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-lncrl ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-lncrt ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-mkca ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-mkcrt ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-rmca ln -sf %{_prefix}/sbin/vsd-ca %{_prefix}/sbin/vsd-rmcrt %post pkgs if [ -e /etc/vsd/freevsd.conf ]; then echo "# Path to third party RPMs to install" >>/etc/vsd/freevsd.conf echo "\$add_ons = '/usr/share/freevsd/pkgs';" >>/etc/vsd/freevsd.conf fi if [ -e /usr/local/etc/vsd/freevsd.conf ]; then echo "# Path to third party RPMs to install" >>/usr/local/etc/vsd/freevsd.conf echo "\$add_ons = '/usr/share/freevsd/pkgs';" >>/usr/local/etc/vsd/freevsd.conf fi #%preun #if [ $1 = 0 ]; then # /sbin/chkconfig --del vsd #fi #%triggerpostun -- freevsd #/sbin/chkconfig --add vsd %files %defattr(-,root,root) %config /etc/rc.d/init.d/vsd %config(noreplace) /etc/vsd/openssl.cnf %config(noreplace) /etc/vsd/freevsd.conf %config(noreplace) /etc/vsd/vsd.conf %doc INSTALL NEWS README doc/* %attr(4755, root, root) %{_prefix}/bin/bevs %attr(0750, root, root) %{_prefix}/sbin/vsboot %attr(0755, root, root) %{_prefix}/sbin/virtuald %attr(0750, root, root) %{_prefix}/sbin/vsdadm %attr(0750, root, root) %{_prefix}/sbin/vsd %attr(0750, root, root) %{_prefix}/sbin/svsdadm %attr(0750, root, root) %{_prefix}/sbin/svsd %attr(0750, root, root) %{_prefix}/sbin/vsd-genskel.pl %attr(0750, root, root) %{_prefix}/sbin/vsd-refreshskel.pl %attr(0750, root, root) %{_prefix}/sbin/vsd-vsbatch.pl %attr(0750, root, root) %{_prefix}/sbin/vsd-install %attr(0750, root, root) %{_prefix}/sbin/vsd-uninstall.pl %attr(0750, root, root) %{_prefix}/sbin/vsd-linkvs.pl %attr(0750, root, root) %{_prefix}/sbin/vsd-ca %attr(0755, root, root) %{_prefix}/include/libvsd.h %attr(0755, root, root) %{_prefix}/lib/libvsd.a %{_prefix}/share/freevsd/VSD.pm %{_prefix}/share/freevsd/VSD/Config.pm %{_prefix}/share/freevsd/VSD/Change.pm %{_prefix}/share/freevsd/VSD/Undo.pm %{_prefix}/share/freevsd/VSD/Old.pm %{_prefix}/share/freevsd/lib_perl.pl %{_prefix}/share/freevsd/scripts %{_prefix}/share/freevsd/skel-repo %files pkgs %{_prefix}/share/freevsd/pkgs %files skelutils /home/vsd/skel/skel-%freevsd_vrs/usr /home/vsd/skel/skel-%freevsd_vrs/lib %files skelfiles /home/vsd/skel/skel-%freevsd_vrs/etc /home/vsd/skel/skel-%freevsd_vrs/home %changelog * Thu Sep 6 2001 Damion Parry damion@idaya.co.uk - Added section to post install to create the symbolic links for the new ca scripts. * Tue Jun 21 2001 Damion Parry damion@idaya.co.uk - Added new pkg: skelutils * Thu Jun 14 2001 Nigel Marett nigel@idaya.co.uk - raised version number * Mon May 14 2001 Nigel Marett nigel@idaya.co.uk - added postpkgs statement to check for /usr/local/etc/freevsd.conf - to simplify source installs * Wed Apr 25 2001 Nigel Marett nigel@idaya.co.uk - Tweeked for move of vsd.conf;freevsd.conf to /etc/vsd/ * Thu Apr 19 2001 Damion Parry damion.parry@idaya.co.uk - Added vsd-linkvs.pl to list of files * Wed Apr 11 2001 Sol Sol Burt sol@idaya.co.uk - Added and tweaked VSD::* module install in post build script - Removed bit that adds vsd to /etc/services and edits inetd.conf / xinetd.conf * Fri Feb 16 2001 Nigel Marett nigel.lynskey-marett@idaya.co.uk - Tweeked for 1.4.6-1 rpm's added %{_prefix}/sbin/vsd-refreshskel.pl - Added Vendor,packager * Mon Nov 13 2000 Tim Sellar - use install/uninstall scripts * Thu Nov 02 2000 Tim Sellar - remove dependencies between rpms * Thu Jul 06 2000 Nick Burrett - split into two rpms * Wed May 31 2000 Nick Burrett - initial rpm build