]> git.pld-linux.org Git - packages/cvsd.git/blob - cvsd.spec
- remove remnants from template.init
[packages/cvsd.git] / cvsd.spec
1 # TODO:
2 # - cvsadmin uid,gid
3 # - check permissions
4 Summary:        cvsd, a chroot/suid wrapper for running a cvs pserver
5 Summary(pl):    cvsd - nak³adka na cvs pserver korzystaj±ca z chroot/suid
6 Name:           cvsd
7 Version:        1.0.9
8 Release:        0.1
9 License:        GPL
10 Group:          Development/Version Control
11 Source0:        http://ch.tudelft.nl/~arthur/cvsd/%{name}-%{version}.tar.gz
12 # Source0-md5:  ee67d1a5366f804580c08ca1d48b85fd
13 Source1:        %{name}.init
14 #Source1:       %{name}.conf
15 #Source2:       %{name}-passwd
16 URL:            http://ch.tudelft.nl/~arthur/cvsd/
17 BuildRequires:  rpmbuild(macros) >= 1.202
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
26 Requires(pre):  cvs
27 Requires(pre):  fileutils
28 Requires(pre):  textutils
29 Requires:       cvs
30 Requires:       rc-scripts
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)
36
37 %define         homedir         /var/lib/cvsowner
38 %define         rootdir         %{homedir}/cvsd-root
39
40 %description
41 cvsd is a chroot/suid wrapper for running a cvs pserver more securely.
42 cvs is a version control system for managing projects.
43
44 %description -l pl
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.
48
49 %prep
50 %setup -q
51
52 %build
53 %configure
54
55 %{__make}
56
57 %install
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
61
62 %{__make} install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
66 #install %{SOURCE2} $RPM_BUILD_ROOT%{rootdir}/etc/passwd
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %pre
72 %groupadd -g 53 cvsadmin
73 %useradd -u 128 -g 53 -c "CVS UID" -d %{homedir} cvsowner
74
75 if [ ! -f %{rootdir}/bin/cvs ] ; then
76         echo "Setting up %{rootdir}..."
77         cd /lib
78         install -m755 -o root -g root `ldd /usr/bin/cvs | cut -d " " -f 1` /lib/libnss_files.so.1 \
79                 %{rootdir}/lib
80         install -m755 /usr/bin/cvs %{rootdir}/bin
81 fi
82
83 %post
84 /sbin/chkconfig --add cvsd
85 if [ -f /var/lock/subsys/cvsd ]; then
86         /etc/rc.d/init.d/cvsd restart 1>&2
87 else
88         echo "Type \"/etc/rc.d/init.d/cvsd start\" to start cvsd." 1>&2
89 fi
90
91 echo "Now check out /etc/cvsd.conf and initialise the repository using: "
92 echo "\"cvs -d :pserver:cvsadmin@localhost:/cvsroot init\" "
93 echo "Also edit/modify/whatever the /home/cvsowner/cvsd-root/etc/passwd file."
94 echo "Default user/passwds are cvs/cvs (for ro anon), user/pass. Change these!"
95
96 %preun
97 if [ "$1" = "0" ]; then
98         if [ -f /var/lock/subsys/cvsd ]; then
99                 /etc/rc.d/init.d/cvsd stop 1>&2
100         fi
101         /sbin/chkconfig --del cvsd
102 fi
103
104 %postun
105 if [ "$1" = "0" ]; then
106         %userremove cvsowner
107         %groupremove cvsadmin
108 fi
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS ChangeLog FAQ NEWS README TODO
113 %attr(755,root,root) %{_sbindir}/cvsd
114 %attr(755,root,root) %{_sbindir}/cvsd-buildroot
115 %attr(755,root,root) %{_sbindir}/cvsd-passwd
116 %dir %{_sysconfdir}/cvsd
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvsd/cvsd.conf
118 %attr(754,root,root) /etc/rc.d/init.d/cvsd
119 %{_mandir}/man[58]/*
120 %dir %{homedir}
121 %dir %{rootdir}
122 %dir %{rootdir}/bin
123 %attr(755,cvsowner,cvsadmin) %dir %{rootdir}/cvsroot
124 %dir %{rootdir}/dev
125 %dev(c,1,3) %{rootdir}/dev/null
126 %dir %{rootdir}/lib
127 %dir %{rootdir}/tmp
128 #%config(noreplace) %verify(not size mtime md5) %{rootdir}/etc/passwd
This page took 0.146093 seconds and 3 git commands to generate.