]> git.pld-linux.org Git - packages/cvs-nserver.git/blob - cvs-nserver.spec
- rel 10; fix rcs2log script (posix)
[packages/cvs-nserver.git] / cvs-nserver.spec
1 #
2 # TODO:
3 # - trigger for upgrade from old cvs - after that package stays without any 
4 #   users and nserver-common is not installed...
5 Summary:        Concurrent Versions System - nserver
6 Summary(de):    Concurrent-Versioning-System - nserver
7 Summary(fr):    Un système pour maintenir à jour des fichiers - nserver
8 Summary(pl):    Concurrent Versions System - nserver
9 Summary(tr):    Sürüm denetim sistemi - nserver
10 Name:           cvs-nserver
11 Version:        1.11.1.52
12 Release:        10
13 License:        GPL
14 Group:          Development/Version Control
15 Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
16 # Source0-md5:  357fb5f37cc556977dad79175e9c2d97
17 Source1:        %{name}.inetd
18 Source2:        cvs-pserver.inetd
19 Patch0:         %{name}-cvspasswd.patch
20 Patch1:         %{name}-info.patch
21 Patch2:         %{name}-am_ac.patch
22 Patch3:         %{name}-cvspass.patch
23 Patch4:         %{name}-home_etc.patch
24 Patch5:         %{name}-ssl-link.patch
25 Patch6:         %{name}-fix_doc_CVSUSER.patch
26 Patch7:         %{name}-segv.patch
27 Patch8:         %{name}-initgroups-rootonly.patch
28 Patch9:         %{name}-zlibfix.patch
29 Patch10:        %{name}-home_etc2.patch
30 Patch11:        %{name}-posix.patch
31 URL:            http://cvs-nserver.sourceforge.net/
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 BuildRequires:  openssl-devel >= 0.9.7d
35 BuildRequires:  texinfo
36 BuildRequires:  zlib-devel
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _cvsroot        /srv/cvsroot
40
41 %description
42 CVS is a version control system, which allows you to keep old versions
43 of files (usually source code), keep a log of who, when, and why
44 changes occurred, etc., like RCS or SCCS. Unlike the simpler systems,
45 CVS does not just operate on one file at a time or one directory at a
46 time, but operates on hierarchical collections of directories
47 consisting of version controlled files. CVS helps to manage releases
48 and to control the concurrent editing of source files among multiple
49 authors. CVS allows triggers to enable/log/control various operations
50 and works well over a wide area network.
51
52 %description -l de
53 CVS ist ein Frontend für das RCS(1)-Revisionskontrollsystem, das den
54 Begriff der Revisionskontrolle von einer Sammlung von Dateien in einem
55 einzelnen Verzeichnis auf eine ganze Hierarchie ausweitet, bestehend
56 aus revisionskontrollierten Dateien. Diese Verzeichnisse und Dateien
57 lassen sich zu einer Software-Release kombinieren. CVS bietet die
58 Funktionen, die zur Verwaltung von Software-Releases und zur
59 Überwachung der gleichzeitigen Bearbeitung von Quelldateien durch
60 mehrere Software- Entwickler notwendig sind.
61
62 %description -l fr
63 "CVS" signifie "Concurrent Version System". C'est un système de
64 comparaison de versions de fichiers, qui peut garder une trace des
65 changements apportés à des fichiers (le plus souvent, les fichiers des
66 sources d'un programme). CVS conserve seulement les différences, et
67 non l'intégralité d'un fichier récent et d'un fichier plus ancien. A
68 chaque modification d'un fichier, CVS garde (entre autres) le nom de
69 la personne ayant fait la modification, la raison justifiant cette
70 modification, et la date à laquelle celle-ci a eu lieu. CVS est très
71 utile pour gérer la mise en commun des modifications apportées par
72 plusieurs personnes travaillant en parallèle sur les mêmes fichiers.
73 Au lieu de garder plusieurs versions des fichiers dans un seul
74 répertoire, CVS crée une série de répertoires, chacun contenant une
75 nouvelle version des fichiers. Ces répertoires et ces fichiers peuvent
76 ensuite être regroupés pour former la version la plus à jour du
77 logiciel. Installez ce package si vous avez besoin d'utiliser un
78 système de contrôle de version.
79
80 %description -l pl
81 CVS jest nak³adk± na rcs (Revision Control System, czyli w wolnym
82 t³umaczeniu system kontroli wersji zasobów), który rozszerza
83 mo¿liwo¶ci rcs'a z narzêdzia do kontroli zbioru plików w pojedynczym
84 katalogu o mo¿liwo¶æ kontroli zbioru hierarchicznie u³o¿onych
85 katalogów z plikami. Z pomoc± CVS w ³atwy sposób mo¿na zarz±dzaæ kodem
86 ¼ród³owym opracowywanym przez nawet bardzo du¿e zespó³y programistów
87 umo¿liwiaj±c ¶ledzenie i kontrolê wszystkich zmian w trakcie pracy nad
88 projektami i wypuszczaniem pe³nych wersji oprogramowania (release).
89
90 %description -l tr
91 CVS (Concurrent Versioning System), tek bir dizindeki dosya
92 topluluðunun sürüm denetimini, denetimi yapýlmýþ dizinlerin hiyerarþik
93 topluluðuna geniþleten rcs(1) sürüm denetim sisteminin ön yüzüdür. Bu
94 dizin ve dosyalar, bir yazýlým yayýný oluþturma amacýyla biraraya
95 getirilebilir. CVS, bu yazýlým yayýnlarýnýn yönetilmesini ve kaynak
96 dosyalarý bakýmýnýn birden çok yazýlým geliþtiricisi tarafýndan
97 eþzamanlý olarak yapýlmasýný kontrol etmek için gereken iþlevleri
98 saðlar.
99
100 %package client
101 Summary:        Concurrent Versions System - client
102 Summary(pl):    Concurrent Versions System - klient
103 Group:          Development/Version Control
104 Obsoletes:      cvs-npclient
105 Obsoletes:      cvs
106 Provides:       cvs = %{version}
107
108 %description client
109 CVS client.
110
111 %description client -l pl
112 Klient CVS.
113
114 %package common
115 Summary:        Concurrent Versions System - common files
116 Summary(pl):    Concurrent Versions System - wspólne pliki
117 Group:          Development/Version Control
118 Requires(pre):  /bin/id
119 Requires(pre):  /usr/bin/getgid
120 Requires(pre):  /usr/sbin/groupadd
121 Requires(pre):  /usr/sbin/useradd
122 Requires(pre):  cvs-nserver-client
123 Requires(pre):  fileutils
124 Requires(postun):       /usr/sbin/userdel
125 Requires(postun):       /usr/sbin/groupdel
126 Requires:       cvs-nserver-client
127 Obsoletes:      cvs-nserver
128
129 %description common
130 CVS - common server files.
131
132 %description common -l pl
133 Wspólne pliki serwerów CVS.
134
135 %package pserver
136 Summary:        Concurrent Versions System - pserver
137 Summary(pl):    Concurrent Versions System - pserver
138 Group:          Development/Version Control
139 PreReq:         rc-inetd
140 Requires:       cvs-nserver-common
141 Obsoletes:      cvs-npserver
142 Obsoletes:      cvs-pserver
143
144 %description pserver
145 CVS server - pserver files.
146
147 %description pserver -l pl
148 Serwer CVS - pliki pservera.
149
150 %package nserver
151 Summary:        Concurrent Versions System - nserver
152 Summary(pl):    Concurrent Versions System - nserver
153 Group:          Development/Version Control
154 PreReq:         rc-inetd
155 Requires:       cvs-nserver-common
156 Obsoletes:      cvs-nserver
157
158 %description nserver
159 CVS server - nserver files.
160
161 %description nserver -l pl
162 Serwer CVS - pliki nservera.
163
164 %prep
165 %setup -q
166 %patch0 -p1
167 %patch1 -p1
168 %patch2 -p1
169 %patch3 -p1
170 %patch4 -p1
171 %patch5 -p1
172 %patch6 -p1
173 %patch7 -p1
174 %patch8 -p1
175 %patch9 -p1
176 %patch10 -p1
177 %patch11 -p1
178
179 %build
180 %{__aclocal}
181 %{__autoconf}
182 %{__automake}
183 %configure \
184         --enable-encryption \
185         --enable-client \
186         --enable-server \
187         --enable-setuid \
188         --with-openssl \
189         --without-gssapi
190 %{__make}
191
192 %install
193 rm -rf $RPM_BUILD_ROOT
194 install -d $RPM_BUILD_ROOT{/etc/sysconfig/rc-inetd,%{_cvsroot},/var/lock/cvs}
195
196 %{__make} install \
197         DESTDIR=$RPM_BUILD_ROOT
198
199 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cvs-nserver
200 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cvs-pserver
201
202 cat << EOF >$RPM_BUILD_ROOT%{_bindir}/cvs-pserver-script
203 #!/bin/sh
204 REPOSITORY="%{_cvsroot}"
205 if [ -f /etc/sysconfig/cvs ]; then
206         . /etc/sysconfig/cvs
207 fi
208
209 CVSPASSWD=%{_bindir}/cvspasswd \
210 exec %{_bindir}/cvs-pserver \$REPOSITORY -- \
211 %{_bindir}/cvschkpw %{_bindir}/cvs pserver
212 EOF
213
214 cat << EOF >$RPM_BUILD_ROOT%{_bindir}/cvs-nserver-script
215 #!/bin/sh
216 REPOSITORY="%{_cvsroot}"
217 if [ -f /etc/sysconfig/cvs ]; then
218         . /etc/sysconfig/cvs
219 fi
220
221 CVSPASSWD=%{_bindir}/cvspasswd \
222 exec %{_bindir}/cvs-nserver \$REPOSITORY -- \
223 %{_bindir}/cvschkpw %{_bindir}/cvs nserver
224 EOF
225
226 cat << EOF >$RPM_BUILD_ROOT/etc/sysconfig/cvs
227 # In this file you can specify additional repositories (separated with space)
228 # or just set different location.
229 #REPOSITORY="%{_cvsroot}"
230 EOF
231
232 mv -f   $RPM_BUILD_ROOT%{_datadir}/cvs-nserver/contrib/rcs2log \
233         $RPM_BUILD_ROOT%{_bindir}
234
235 %clean
236 rm -rf $RPM_BUILD_ROOT
237
238 %post client
239 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
240
241 %postun client
242 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
243
244 %pre common
245 if [ -n "`getgid cvs`" ]; then
246         if [ "`getgid cvs`" != "52" ]; then
247                 echo "Error: group cvs doesn't have gid=52. Correct this before installing cvs-nserver." 1>&2
248                 exit 1
249         fi
250 else
251         echo "Adding group cvs GID=52."
252         /usr/sbin/groupadd -g 52 -r -f cvs
253 fi
254 if [ -n "`getgid cvsadmin`" ]; then
255         if [ "`getgid cvsadmin`" != "53" ]; then
256                 echo "Error: group cvsadmin doesn't have gid=53. Correct this before installing cvs-nserver." 1>&2
257                 exit 1
258         fi
259 else
260         echo "Adding group cvsadmin GID=53."
261         /usr/sbin/groupadd -g 53 -r -f cvsadmin
262 fi
263 if [ -n "`id -u cvs 2>/dev/null`" ]; then
264         if [ "`id -u cvs`" != "52" ]; then
265                 echo "Error: user cvs doesn't have uid=52. Correct this before installing cvs-nserver." 1>&2
266                 exit 1
267         fi
268 else
269         echo "Adding user cvs UID=52."
270         /usr/sbin/useradd -u 52 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvs cvs 1>&2
271 fi
272 if [ -n "`id -u cvsadmin 2>/dev/null`" ]; then
273         if [ "`id -u cvsadmin`" != "53" ]; then
274                 echo "Error: user cvsadmin doesn't have uid=53. Correct this before installing cvs-nserver." 1>&2
275                 exit 1
276         fi
277 else
278         echo "Adding user cvsadmin UID=53."
279         /usr/sbin/useradd -u 53 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvsadmin -G cvs cvsadmin 1>&2
280 fi
281 if [ "$1" = 1 ]; then
282         echo "Initializing repository..."
283         %{_bindir}/cvs -d :local:%{_cvsroot} init
284         chown -R cvsadmin:cvsadmin %{_cvsroot}/CVSROOT
285 fi
286
287 %postun common
288 if [ "$1" = "0" ]; then
289         echo "Removing user cvs."
290         /usr/sbin/userdel cvs
291         echo "Removing user cvsadmin."
292         /usr/sbin/userdel cvsadmin
293         echo "Removing group cvs."
294         /usr/sbin/groupdel cvs
295         echo "Removing group cvsadmin."
296         /usr/sbin/groupdel cvsadmin
297 fi
298
299 %post pserver
300 if [ -f /var/lock/subsys/rc-inetd ]; then
301         /etc/rc.d/init.d/rc-inetd reload
302 fi
303
304 %postun pserver
305 if [ -f /var/lock/subsys/rc-inetd ]; then
306         /etc/rc.d/init.d/rc-inetd reload
307 fi
308
309 %post nserver
310 if [ -f /var/lock/subsys/rc-inetd ]; then
311         /etc/rc.d/init.d/rc-inetd reload
312 fi
313
314 %postun nserver
315 if [ -f /var/lock/subsys/rc-inetd ]; then
316         /etc/rc.d/init.d/rc-inetd reload
317 fi
318
319 %files client
320 %defattr(644,root,root,755)
321 %doc AUTHORS BUGS ChangeLog FAQ FAQ.nserver NEWS NEWS.nserver PROJECTS
322 %doc README README.checkpassword TODO
323 %attr(755,root,root) %{_bindir}/cvs
324 %attr(755,root,root) %{_bindir}/cvsbug
325 %{_infodir}/cvs*
326 %{_mandir}/man[15]/cvs.*
327 %{_mandir}/man8/cvsbug.8*
328
329 %files common
330 %defattr(644,root,root,755)
331 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/cvs
332 %attr(4754,cvsadmin,cvs) %{_bindir}/cvspasswd
333 %attr(755,root,root) %{_bindir}/cvschkpw
334 %attr(755,root,root) %{_bindir}/rcs2log
335 %dir %{_datadir}/cvs-nserver
336 %dir %{_datadir}/cvs-nserver/contrib
337 %{_datadir}/cvs-nserver/contrib/*
338 %attr(770,cvsadmin,cvs) %dir %{_cvsroot}
339 %{_mandir}/man8/cvs-server.8*
340 %attr(770,cvsadmin,cvs) %dir /var/lock/cvs
341
342 %files pserver
343 %defattr(644,root,root,755)
344 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/cvs-pserver
345 %attr(755,root,root) %{_bindir}/cvs-pserver*
346 %{_mandir}/man8/cvs-pserver.8*
347
348 %files nserver
349 %defattr(644,root,root,755)
350 %doc NEWS.nserver FAQ.nserver
351 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/cvs-nserver
352 %attr(755,root,root) %{_bindir}/cvs-nserver*
353 %{_mandir}/man8/cvs-nserver.8*
This page took 0.056917 seconds and 4 git commands to generate.