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