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