]> git.pld-linux.org Git - packages/cvs-nserver.git/blob - cvs-nserver.spec
- include several security fixes. Needs testing. I hope that all CVE issues are now...
[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.1
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        /srv/cvsroot
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 Obsoletes:      cvs-npclient
109 Obsoletes:      cvs
110 Provides:       cvs = %{version}
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:       cvs-nserver-client
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:       cvs-nserver-common
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:       cvs-nserver-common
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 #REPOSITORY="%{_cvsroot}"
238 EOF
239
240 mv -f   $RPM_BUILD_ROOT%{_datadir}/cvs-nserver/contrib/rcs2log \
241         $RPM_BUILD_ROOT%{_bindir}
242
243 %clean
244 rm -rf $RPM_BUILD_ROOT
245
246 %post client
247 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
248
249 %postun client
250 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
251
252 %pre common
253 if [ -n "`getgid cvs`" ]; then
254         if [ "`getgid cvs`" != "52" ]; then
255                 echo "Error: group cvs doesn't have gid=52. Correct this before installing cvs-nserver." 1>&2
256                 exit 1
257         fi
258 else
259         echo "Adding group cvs GID=52."
260         /usr/sbin/groupadd -g 52 -r -f cvs
261 fi
262 if [ -n "`getgid cvsadmin`" ]; then
263         if [ "`getgid cvsadmin`" != "53" ]; then
264                 echo "Error: group cvsadmin doesn't have gid=53. Correct this before installing cvs-nserver." 1>&2
265                 exit 1
266         fi
267 else
268         echo "Adding group cvsadmin GID=53."
269         /usr/sbin/groupadd -g 53 -r -f cvsadmin
270 fi
271 if [ -n "`id -u cvs 2>/dev/null`" ]; then
272         if [ "`id -u cvs`" != "52" ]; then
273                 echo "Error: user cvs doesn't have uid=52. Correct this before installing cvs-nserver." 1>&2
274                 exit 1
275         fi
276 else
277         echo "Adding user cvs UID=52."
278         /usr/sbin/useradd -u 52 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvs cvs 1>&2
279 fi
280 if [ -n "`id -u cvsadmin 2>/dev/null`" ]; then
281         if [ "`id -u cvsadmin`" != "53" ]; then
282                 echo "Error: user cvsadmin doesn't have uid=53. Correct this before installing cvs-nserver." 1>&2
283                 exit 1
284         fi
285 else
286         echo "Adding user cvsadmin UID=53."
287         /usr/sbin/useradd -u 53 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvsadmin -G cvs cvsadmin 1>&2
288 fi
289 if [ "$1" = 1 ]; then
290         echo "Initializing repository..."
291         %{_bindir}/cvs -d :local:%{_cvsroot} init
292         chown -R cvsadmin:cvsadmin %{_cvsroot}/CVSROOT
293 fi
294
295 %postun common
296 if [ "$1" = "0" ]; then
297         echo "Removing user cvs."
298         /usr/sbin/userdel cvs
299         echo "Removing user cvsadmin."
300         /usr/sbin/userdel cvsadmin
301         echo "Removing group cvs."
302         /usr/sbin/groupdel cvs
303         echo "Removing group cvsadmin."
304         /usr/sbin/groupdel cvsadmin
305 fi
306
307 %post pserver
308 if [ -f /var/lock/subsys/rc-inetd ]; then
309         /etc/rc.d/init.d/rc-inetd reload
310 fi
311
312 %postun pserver
313 if [ -f /var/lock/subsys/rc-inetd ]; then
314         /etc/rc.d/init.d/rc-inetd reload
315 fi
316
317 %post nserver
318 if [ -f /var/lock/subsys/rc-inetd ]; then
319         /etc/rc.d/init.d/rc-inetd reload
320 fi
321
322 %postun nserver
323 if [ -f /var/lock/subsys/rc-inetd ]; then
324         /etc/rc.d/init.d/rc-inetd reload
325 fi
326
327 %files client
328 %defattr(644,root,root,755)
329 %doc AUTHORS BUGS ChangeLog FAQ FAQ.nserver NEWS NEWS.nserver PROJECTS
330 %doc README README.checkpassword TODO
331 %attr(755,root,root) %{_bindir}/cvs
332 %attr(755,root,root) %{_bindir}/cvsbug
333 %{_infodir}/cvs*
334 %{_mandir}/man[15]/cvs.*
335 %{_mandir}/man8/cvsbug.8*
336
337 %files common
338 %defattr(644,root,root,755)
339 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/cvs
340 %attr(4754,cvsadmin,cvs) %{_bindir}/cvspasswd
341 %attr(755,root,root) %{_bindir}/cvschkpw
342 %attr(755,root,root) %{_bindir}/rcs2log
343 %dir %{_datadir}/cvs-nserver
344 %dir %{_datadir}/cvs-nserver/contrib
345 %{_datadir}/cvs-nserver/contrib/*
346 %attr(770,cvsadmin,cvs) %dir %{_cvsroot}
347 %{_mandir}/man8/cvs-server.8*
348 %attr(770,cvsadmin,cvs) %dir /var/lock/cvs
349
350 %files pserver
351 %defattr(644,root,root,755)
352 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/cvs-pserver
353 %attr(755,root,root) %{_bindir}/cvs-pserver*
354 %{_mandir}/man8/cvs-pserver.8*
355
356 %files nserver
357 %defattr(644,root,root,755)
358 %doc NEWS.nserver FAQ.nserver
359 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/cvs-nserver
360 %attr(755,root,root) %{_bindir}/cvs-nserver*
361 %{_mandir}/man8/cvs-nserver.8*
This page took 0.98164 seconds and 3 git commands to generate.