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