%define cvsd_homedir /var/lib/cvsd Name: cvsd Summary: Chroot wrapper to run `cvs pserver' more securely Version: 1.0.3 Release: 2%{?dist} URL: http://tiefighter.et.tudelft.nl/~arthur/cvsd/ Source0: http://tiefighter.et.tudelft.nl/~arthur/cvsd/cvsd-%{version}.tar.gz Source1: http://tiefighter.et.tudelft.nl/~arthur/cvsd/cvsd-%{version}.tar.gz.sig License: GPL Group: Development/Tools Requires: cvs chkconfig BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: cvs Requires: cvs %description cvsd is a wrapper program for cvs in pserver mode. it will run 'cvs pserver' under a special uid/gid in a chroot jail. cvsd is run as a daemon and is controlled through a configuration file. It is relatively easy to configure and provides tools for setting up a rootjail. This server can be useful if you want to run a public cvs pserver. You should however be aware of the security limitations of running a cvs pserver. If you want any kind of authentication you should really consider using secure shell as a secure authentication mechanism and transport. Passwords used with cvs pserver are transmitted in plaintext. %prep %setup -q %build ./configure --prefix=%{_prefix} --mandir=%{_mandir} --sysconfdir=%{_sysconfdir} make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install rm %{buildroot}/%{_sysconfdir}/init.d/cvsd rmdir %{buildroot}%{_sysconfdir}/init.d/ install -d %{buildroot}%{_initrddir} install -m755 cvsd.init.redhat71 %{buildroot}%{_initrddir}/cvsd %clean rm -rf %{buildroot} %files %doc README TODO AUTHORS ChangeLog NEWS FAQ COPYING %defattr(644,root,root,755) %config(noreplace) %{_sysconfdir}/cvsd/cvsd.conf %{_mandir}/*/* %attr(755,root,root) %{_sbindir}/* %attr(755,root,root) %{_initrddir}/cvsd %pre getent group cvsd > /dev/null || \ groupadd cvsd getent passwd cvsd > /dev/null || \ useradd -r -M -d %{cvsd_homedir} -s /bin/false \ -c "cvs pserver daemon" -g cvsd cvsd [ -e %{cvsd_homedir} ] || \ mkdir -m755 %{cvsd_homedir} %post cvsd-buildroot %{cvsd_homedir} /sbin/chkconfig --add cvsd %postun if [ "$1" = 0 ]; then userdel -r cvsd 2>/dev/null || : groupdel cvsd 2>/dev/null || : rmdir %{cvsd_homedir} 2>/dev/null || : fi