4 Summary: cvsd, a chroot/suid wrapper for running a cvs pserver
5 Summary(pl.UTF-8): cvsd - nakładka na cvs pserver korzystająca z chroot/suid
10 Group: Development/Version Control
11 Source0: http://ch.tudelft.nl/~arthur/cvsd/%{name}-%{version}.tar.gz
12 # Source0-md5: ee67d1a5366f804580c08ca1d48b85fd
14 #Source1: %{name}.conf
15 #Source2: %{name}-passwd
16 URL: http://ch.tudelft.nl/~arthur/cvsd/
17 BuildRequires: rpmbuild(macros) >= 1.268
18 Requires(post,preun): /sbin/chkconfig
19 Requires(postun): /usr/sbin/groupdel
20 Requires(postun): /usr/sbin/userdel
21 Requires(pre): /bin/id
22 Requires(pre): /usr/bin/getgid
23 Requires(pre): /usr/bin/ldd
24 Requires(pre): /usr/sbin/groupadd
25 Requires(pre): /usr/sbin/groupmod
27 Requires(pre): fileutils
28 Requires(pre): textutils
31 Provides: group(cvsadmin)
32 Provides: user(cvsowner)
33 Obsoletes: cvs-nserver-pserver
34 Obsoletes: cvs-pserver
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define homedir /var/lib/cvsowner
38 %define rootdir %{homedir}/cvsd-root
41 cvsd is a chroot/suid wrapper for running a cvs pserver more securely.
42 cvs is a version control system for managing projects.
44 %description -l pl.UTF-8
45 cvsd jest nakładką służącą do bezpieczniejszego uruchamiania programu
46 cvs pserver, korzystającą z chroot/suid. cvs jest systemem kontroli
47 wersji zasobów służącym do zarządzania projektami.
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{rootdir}/{etc,bin,lib,tmp,dev,cvsroot} \
60 $RPM_BUILD_ROOT/etc/rc.d/init.d
63 DESTDIR=$RPM_BUILD_ROOT
65 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
66 #install %{SOURCE2} $RPM_BUILD_ROOT%{rootdir}%{_sysconfdir}/passwd
69 rm -rf $RPM_BUILD_ROOT
72 %groupadd -g 53 cvsadmin
73 %useradd -u 128 -g 53 -c "CVS UID" -d %{homedir} cvsowner
75 if [ ! -f %{rootdir}/bin/cvs ] ; then
76 echo "Setting up %{rootdir}..."
78 install -m755 -o root -g root `ldd /usr/bin/cvs | cut -d " " -f 1` /lib/libnss_files.so.1 \
80 install -m755 /usr/bin/cvs %{rootdir}/bin
84 /sbin/chkconfig --add cvsd
85 %service cvsd restart "cvsd"
88 %banner -e %{name} <<EOF
89 Now check out %{_sysconfdir}/cvsd.conf and initialise the repository using:
90 cvs -d :pserver:cvsadmin@localhost:/cvsroot init
92 Also edit/modify/whatever the /home/cvsowner/cvsd-root%{_sysconfdir}/passwd file.
93 Default user/passwds are cvs/cvs (for ro anon), user/pass. Change these!
98 if [ "$1" = "0" ]; then
100 /sbin/chkconfig --del cvsd
104 if [ "$1" = "0" ]; then
106 %groupremove cvsadmin
110 %defattr(644,root,root,755)
111 %doc AUTHORS ChangeLog FAQ NEWS README TODO
112 %attr(755,root,root) %{_sbindir}/cvsd
113 %attr(755,root,root) %{_sbindir}/cvsd-buildroot
114 %attr(755,root,root) %{_sbindir}/cvsd-passwd
115 %dir %{_sysconfdir}/cvsd
116 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvsd/cvsd.conf
117 %attr(754,root,root) /etc/rc.d/init.d/cvsd
122 %attr(755,cvsowner,cvsadmin) %dir %{rootdir}/cvsroot
124 %dev(c,1,3) %{rootdir}/dev/null
127 #%config(noreplace) %verify(not size mtime md5) %{rootdir}%{_sysconfdir}/passwd