]> git.pld-linux.org Git - packages/cvsd.git/blob - cvsd.spec
757cfb82f85e0a0d46d815ec8c75fb99a1031065
[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.UTF-8):   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.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
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.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.
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}%{_sysconfdir}/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 %service cvsd restart "cvsd"
86
87 if [ "$1" = 1 ]; then
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
91
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!
94 EOF
95 fi
96
97 %preun
98 if [ "$1" = "0" ]; then
99         %service cvsd stop
100         /sbin/chkconfig --del cvsd
101 fi
102
103 %postun
104 if [ "$1" = "0" ]; then
105         %userremove cvsowner
106         %groupremove cvsadmin
107 fi
108
109 %files
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
118 %{_mandir}/man[58]/*
119 %dir %{homedir}
120 %dir %{rootdir}
121 %dir %{rootdir}/bin
122 %attr(755,cvsowner,cvsadmin) %dir %{rootdir}/cvsroot
123 %dir %{rootdir}/dev
124 %dev(c,1,3) %{rootdir}/dev/null
125 %dir %{rootdir}/lib
126 %dir %{rootdir}/tmp
127 #%config(noreplace) %verify(not size mtime md5) %{rootdir}%{_sysconfdir}/passwd
This page took 0.048145 seconds and 2 git commands to generate.