Linux: Tidy up packaging
[openafs.git] / src / packaging / RedHat / openafs.spec.in
1 # Openafs Spec $Revision$
2
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.X.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 #%define pkgrel 0.1.rc1
8 %define pkgrel @LINUX_PKGREL@
9
10 %if %{?osvers:0}%{!?osvers:1}
11 %define osvers 1
12 %endif
13
14 %{!?fedorakmod: %define fedorakmod 1}
15 %{!?build_dkmspkg: %define build_dkmspkg 1}
16
17 # Determine presence of rpmbuild command line --define arguments used for
18 # option specification
19 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
20 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
21 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
22 %define build_authlibs_on_cmdline %{?build_authlibs:1}%{!?build_authlibs:0}
23
24 # Determine the version of the kernel to build against
25 # - automatically select running kernel if there are sources in /lib/modules
26 # - note that this can be overridden on the command line
27 #
28 %if !%{kernvers_on_cmdline}
29 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
30 %endif
31
32 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
33 # appropriate - disable them.
34
35 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
36
37 %if %{kern24}
38 %define fedorakmod 0
39 %endif
40
41 %if %{fedorakmod}
42 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
43
44 %define kmod_name openafs
45 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
46
47 %define upvar ""
48 %{!?kvariants: %define kvariants %{?upvar}}
49
50 %if %{?ksrcdir:1}%{!?ksrcdir:0}
51   if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
52     %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
53   else
54     %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
55   fi
56 %endif
57
58 %else # Legacy kernel build stuff 
59
60 %define kversis %{_sourcedir}/openafs-kvers-is.sh
61 %define kvers %(%{kversis} parsev %{kernvers})
62 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
63 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
64 %define ktype %(%{kversis} parset %{kernvers})
65 %define kversion %(%{kversis} kvers %{kernvers})
66
67 # This is where to look for kernel build include files.  Default
68 # is /lib/modules/<kvers>/build, but you can define kbase and
69 # kend on the commandline to change that.
70 #
71 %if %{?kbase:0}%{!?kbase:1}
72 %define kbase /lib/modules/
73 %endif
74 %if %{?kend:0}%{!?kend:1}
75 %define kend /build
76 %endif
77 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
78 %if %{?ksrcdir:0}%{!?ksrcdir:1}
79 %define ksrcdir %{kbase}%{kernvers}%{kend}
80 %endif
81
82 %if %{?kmoddir:0}%{!?kmoddir:1}
83 %define kmoddir /lib/modules
84 %endif
85 %define kxmoddir %{kmoddir}/%{kernvers}
86
87 # End legacy kernel build stuff
88 %endif 
89
90 %define dkms_version %{osvers}.%{pkgrel}
91
92 # Set 'debugspec' to 1 if you want to debug the spec file.  This will
93 # not remove the installed tree as part of the %clean operation
94 %if %{?debugspec:0}%{!?debugspec:1}
95 %define debugspec 0
96 %endif
97
98 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
99 # to distribute aklog and asetkey
100 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
101
102 %if %{krb5support}
103 %if %{?krb5config:0}%{!?krb5config:1}
104 %define krb5config /usr/kerberos/bin/krb5-config
105 %endif
106 %endif
107
108 # Set 'bootkernelsupport' to 1 if you want to build the
109 # kernel module for Red Hat BOOT Kernels on x86.
110 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
111
112 # Define the location of your init.d directory
113 %define initdir /etc/init.d
114
115 #determine if the kernel provides an arch-specific Provides
116 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
117
118 # Define the location of the PAM security module directory
119 %define pamdir /%{_lib}/security
120
121 %if !%{fedorakmod}
122
123 # Define the set of kernel module variations to be built:
124 # For 2.4 kernels we just build everything at once for a particular
125 # kernel.   So we build up, smp, and bigmem all at once.
126 # For 2.6 kernels we have to build against the specific kernel headers
127 # for a particular kernel variation.  AFS will handle the specific smp or
128 # non-smp determination.  So just always build as if it's "up" -- the kernel
129 # version will have the 'variation' type already in the version #.
130
131 %define up_package 0
132 %define smp_package 0
133 %define bigmem_package 0
134 %define hugemem_package 0
135 %define largesmp_package 0
136
137 #######################################################################
138 # 2.4
139 %if %{kvers_is_24}
140 %define kdepend kernel-source
141 %define up_package 1
142 %define smp_package 1
143 %define smp_ext smp
144
145 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem) 
146 %if %{bigmem_package}
147 %define bigmem_ext bigmem
148 %endif
149
150 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem) 
151 %if %{hugemem_package}
152 %define hugemem_ext hugemem
153 %endif
154
155 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
156
157 #######################################################################
158 # 2.6
159 %else
160 %if %{kvers_is_26}
161 %define kvariations up
162 %ifarch s390x
163 %define ktype "smp"
164 %define up_package 1
165 %else
166 %define up_package %(%{kversis} "%{ktype}" "")
167 %define smp_package %(%{kversis} "%{ktype}" "smp")
168 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
169 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
170 %endif
171
172 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
173 %error "unknown kernel type: %{ktype}"
174 %endif
175
176 %if !%{kernvers_on_cmdline}
177 %define kdepend %{ksrcdir}/include/linux/version.h
178 %endif
179
180 #######################################################################
181 # other kernels?
182 %else
183 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
184 %endif
185 %endif
186
187 # End of legacy kernel module build
188 %endif 
189
190 #######################################################################
191 # You probably don't need to change anything beyond this line
192 # NOTE: If you do, please email me!!!
193
194 # Determine which elements of OpenAFS to build.  For non-x86 arches
195 # (subject to the ExclusiveArch setting, below), we build both userspace
196 # and modules.  For most x86 arches, we build just the kernel modules.  For
197 # i386, we build just the userspace.  If you're running an i386 kernel,
198 # you'll need to tweak that last bit.
199 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
200
201 %ifarch x86_64 ia64 s390 s390x
202 %define build_userspace 1
203 %define build_modules 1
204 %ifarch x86_64 ia64
205 %define build_authlibs 1
206 %else
207 %define build_authlibs 0
208 %endif
209 %endif
210
211 %ifarch %{ix86}
212 %define build_userspace 0
213 %define build_modules 1
214 %define build_authlibs 1
215 %endif
216
217 %ifarch i386
218 %define build_userspace 1
219 %define build_modules 0
220 %define build_authlibs 1
221 %endif
222
223 %endif
224
225 # deal with cmdline specification
226 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
227 %if !%{build_userspace_on_cmdline}
228 %define build_userspace 0
229 %endif
230 %if !%{build_modules_on_cmdline}
231 %define build_modules 0
232 %endif
233 %endif
234
235 %if !%{build_authlibs_on_cmdline}
236 %if %{build_userspace_on_cmdline}
237 %define build_authlibs 1
238 %else
239 %define build_authlibs 0
240 %endif
241 %endif
242
243 # Make sure RPM doesn't complain about installed but non-packaged files.
244 #define __check_files  %{nil}
245
246 Summary: OpenAFS distributed filesystem
247 Name: openafs
248 Version: %{pkgvers}
249 Release: %{osvers}.%{pkgrel}
250 License: IBM Public License
251 URL: http://www.openafs.org
252 BuildRoot: %{_tmppath}/%{name}-%{version}-root
253 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
254 Group: Networking/Filesystems
255 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
256 %if %{krb5support}
257 BuildRequires: krb5-devel
258 %endif
259 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
260
261 #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
262 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
263 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
264 %define srcdir openafs-%{afsvers}
265
266 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
267 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
268
269 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-02-28
270
271 Source30: openafs-kernel-version.sh
272 Source996: openafs-kvers-is.sh
273 Source997: openafs-buildfedora.pl
274 Source998: openafs-buildall.sh
275 Source999: openafs-kmodtool
276
277 %description
278 The AFS distributed filesystem.  AFS is a distributed filesystem
279 allowing cross-platform sharing of files among multiple computers.
280 Facilities are provided for access control, authentication, backup and
281 administrative management.
282
283 This package provides common files shared across all the various
284 OpenAFS packages but are not necessarily tied to a client or server.
285
286 The OpenAFS SRPM can be rebuilt with the following options to control
287 what gets built:
288
289  --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version 
290                                   to build modules against. The default is
291                                   to build against the currently-running
292                                   kernel.
293  --define "kbase /lib/modules/"   The base location to look for kernel headers
294  --define "kend /build"           The 'end' location to look for kernels
295                                   The build will define ksrvdir as
296                                   %%{kbase}<kernvers>%%{kend}
297
298  --without krb5                   Disable krb5 support (default: with krb5)
299  --with bitmap-later              Enable "bitmap later" support
300  --with bos-restricted            Enable "bos restricted" mode
301  --with fast-restart              Enable "fast restart" mode
302  --with largefiles                Enable "largefile fileserver" mode
303  --with supergroups               Enable "supergroups"
304
305  --target=i386                    The target architecture to build for.
306                                   When building for a non-default target
307                                   the build may choose whether to build
308                                   userspace or kernel modules automatically.
309                                   The defaults are probably what you want.
310
311  --define "build_userspace 1"     Request building of userspace tools
312  --define "build_modules 1"       Request building of kernel modules
313                                   You probably never need to specify these.
314
315  --define "kmoddir /lib/modules"  This is the base location where modules
316                                   will be installed.  You probably don't
317                                   need to change this ever.
318
319  --define "fedorakmod 0"          Disable the building of 'Fedora' style kernel 
320                                   modules, and use the old format.
321
322  --define "kvariants <variants>"  When building Fedora style kernel modules,
323                                   this defines the set of kernel variants
324                                   to build.
325                                   <variants> is a space seperated list which
326                                   may contain one or more of
327                                   '' (for the generic kernel), smp, PAE, xen
328                                   or kdump 
329
330 To a kernel module for your running kernel, just run:
331   rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
332
333 ##############################################################################
334 #
335 # build the userspace side of things if so requested
336 #
337 ##############################################################################
338 %if %{build_userspace}
339
340 %package client
341 Requires: binutils, openafs = %{version}
342
343 %if %{fedorakmod}
344 Requires: %{name}-kmod >= %{version}
345 Provides: %{name}-kmod-common = %{version}
346 %else
347 Requires: openafs-kernel
348 %endif
349
350 Summary: OpenAFS Filesystem Client
351 Group: Networking/Filesystem
352
353 %description client
354 The AFS distributed filesystem.  AFS is a distributed filesystem
355 allowing cross-platform sharing of files among multiple computers.
356 Facilities are provided for access control, authentication, backup and
357 administrative management.
358
359 This package provides basic client support to mount and manipulate
360 AFS.
361
362 %package server
363 Requires: openafs = %{version}
364 Summary: OpenAFS Filesystem Server
365 Group: Networking/Filesystems
366
367 %description server
368 The AFS distributed filesystem.  AFS is a distributed filesystem
369 allowing cross-platform sharing of files among multiple computers.
370 Facilities are provided for access control, authentication, backup and
371 administrative management.
372
373 This package provides basic server support to host files in an AFS
374 Cell.
375
376 %if %{build_dkmspkg}
377 %package -n dkms-%{name}
378 Summary:        DKMS-ready kernel source for AFS distributed filesystem
379 Group:          Development/Kernel
380 Provides:       openafs-kernel = %{version}
381 %if %{fedorakmod}
382 Provides: %{name}-kmod = %{version}
383 %endif
384 Requires(pre):  dkms
385 Requires(pre):  flex
386 Requires(post): dkms
387 Requires:       %{name}-kmod-common = %{version}
388
389 %description -n dkms-%{name}
390 The AFS distributed filesystem.  AFS is a distributed filesystem
391 allowing cross-platform sharing of files among multiple computers.
392 Facilities are provided for access control, authentication, backup and
393 administrative management.
394
395 This package provides the source code to allow DKMS to build an
396 AFS kernel module.
397 %endif
398
399 %if %{build_authlibs}
400 %package authlibs
401 Summary: OpenAFS authentication shared libraries
402 Group: Networking/Filesystems
403
404 %description authlibs
405 The AFS distributed filesystem.  AFS is a distributed filesystem
406 allowing cross-platform sharing of files among multiple computers.
407 Facilities are provided for access control, authentication, backup and
408 administrative management.
409
410 This package provides a shared version of libafsrpc and libafsauthent. 
411 None of the programs included with OpenAFS currently use these shared 
412 libraries; however, third-party software that wishes to perform AFS 
413 authentication may link against them.
414 %endif
415
416 %package authlibs-devel
417 %if %{build_authlibs}
418 Requires: openafs-authlibs = %{version}
419 %endif
420 Requires: openafs-devel = %{version}
421 Summary: OpenAFS shared library development
422 Group: Development/Filesystems
423
424 %description authlibs-devel
425 The AFS distributed filesystem.  AFS is a distributed filesystem
426 allowing cross-platform sharing of files among multiple computers.
427 Facilities are provided for access control, authentication, backup and
428 administrative management.
429
430 This package includes the static versions of libafsrpc and 
431 libafsauthent, and symlinks required for building against the dynamic 
432 libraries.
433
434 %package devel
435 Summary: OpenAFS Development Libraries and Headers
436 Group: Development/Filesystems
437
438 %description devel
439 The AFS distributed filesystem.  AFS is a distributed filesystem
440 allowing cross-platform sharing of files among multiple computers.
441 Facilities are provided for access control, authentication, backup and
442 administrative management.
443
444 This package provides static development libraries and headers needed
445 to compile AFS applications.  Note: AFS currently does not provide
446 shared libraries.
447
448 %package docs
449 Summary: OpenAFS user and administrator documentation
450 Requires: openafs = %{version}
451 Group: Networking/Filesystems
452
453 %description docs
454 The AFS distributed filesystem.  AFS is a distributed filesystem
455 allowing cross-platform sharing of files among multiple computers.
456 Facilities are provided for access control, authentication, backup and
457 administrative management.
458
459 This package provides HTML documentation for OpenAFS users and system
460 administrators.
461
462 %package kernel-source
463 Summary: OpenAFS Kernel Module source tree
464 Group: Networking/Filesystems
465 Provides: openafs-kernel = %{version}
466 %if %{fedorakmod}
467 Provides: %{name}-kmod = %{version}
468 %endif
469
470 %description kernel-source
471 The AFS distributed filesystem.  AFS is a distributed filesystem
472 allowing cross-platform sharing of files among multiple computers.
473 Facilities are provided for access control, authentication, backup and
474 administrative management.
475
476 This package provides the source code to build your own AFS kernel
477 module.
478
479 %package compat
480 Summary: OpenAFS client compatibility symlinks
481 Requires: openafs = %{version}, openafs-client = %{version}
482 Group: Networking/Filesystems
483 Obsoletes: openafs-client-compat
484
485 %description compat
486 The AFS distributed filesystem.  AFS is a distributed filesystem
487 allowing cross-platform sharing of files among multiple computers.
488 Facilities are provided for access control, authentication, backup and
489 administrative management.
490
491 This package provides compatibility symlinks in /usr/afsws.  It is
492 completely optional, and is only necessary to support legacy
493 applications and scripts that hard-code the location of AFS client
494 programs.
495
496 %package kpasswd
497 Summary: OpenAFS KA kpasswd support
498 Requires: openafs
499 Group: Networking/Filesystems
500
501 %description kpasswd
502 The AFS distributed filesystem.  AFS is a distributed filesystem
503 allowing cross-platform sharing of files among multiple computers.
504 Facilities are provided for access control, authentication, backup and
505 administrative management.
506
507 This package provides the compatibility symlink for kpasswd, in case
508 you are using KAserver instead of Krb5.
509
510 %if %{krb5support}
511 %package krb5
512 Summary: OpenAFS programs to use with krb5
513 Requires: openafs = %{version}
514 Group: Networking/Filesystems
515 BuildRequires: krb5-devel
516
517 %description krb5
518 The AFS distributed filesystem.  AFS is a distributed filesystem
519 allowing cross-platform sharing of files among multiple computers.
520 Facilities are provided for access control, authentication, backup and
521 administrative management.
522
523 This package provides compatibility programs so you can use krb5
524 to authenticate to AFS services, instead of using AFS's homegrown
525 krb4 lookalike services.
526 %endif
527
528 %endif
529
530 ##############################################################################
531 #
532 # build the kernel modules if so requested
533 #
534 ##############################################################################
535 %if %{build_modules}
536
537 %if %{fedorakmod}
538 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
539
540 %else
541
542 # Legacy kernel compilation code here ...
543 %define modkversion %(echo %{kernvers} | cut -d- -f1)
544 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
545 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
546
547 %if %{up_package}
548 %package kernel
549 Summary: OpenAFS Kernel Module (compiled for UP)
550 Release: %{modpkgrel}
551 Group: Networking/Filesystems
552 Provides: openafs-kernel = %{version}
553 %if %{kprovidesarch}
554 Requires: kernel-%{_target_cpu} = %{kversion}
555 %else
556 Requires: /boot/config-%{kernvers}
557 %endif
558
559 %description kernel
560 The AFS distributed filesystem.  AFS is a distributed filesystem
561 allowing cross-platform sharing of files among multiple computers.
562 Facilities are provided for access control, authentication, backup and
563 administrative management.
564
565 This package provides a precompiled AFS kernel module for %{kernvers}.
566 %endif
567
568 %if %{smp_package}
569 %package kernel-smp
570 Summary: OpenAFS Kernel Module (compiled for SMP)
571 Release: %{modpkgrel}
572 Provides: openafs-kernel = %{version}
573 %if %{kprovidesarch}
574 Requires: kernel-smp-%{_target_cpu} = %{kversion}
575 %else
576 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
577 %endif
578 Group: Networking/Filesystems
579
580 %description kernel-smp
581 The AFS distributed filesystem.  AFS is a distributed filesystem
582 allowing cross-platform sharing of files among multiple computers.
583 Facilities are provided for access control, authentication, backup and
584 administrative management.
585
586 This package provides a precompiled AFS kernel module for %{kernvers}.
587 %endif
588
589 %if %{largesmp_package}
590 %package kernel-largesmp
591 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
592 Release: %{modpkgrel}
593 Provides: openafs-kernel = %{version}
594 %if %{kprovidesarch}
595 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
596 %else
597 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
598 %endif
599 Group: Networking/Filesystems
600
601 %description kernel-largesmp
602 The AFS distributed filesystem.  AFS is a distributed filesystem
603 allowing cross-platform sharing of files among multiple computers.
604 Facilities are provided for access control, authentication, backup and
605 administrative management.
606
607 This package provides a precompiled AFS kernel module for %{kernvers}.
608 %endif
609  
610 %if %{bigmem_package}
611 %package kernel-bigmem
612 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
613 Release: %{modpkgrel}
614 Provides: openafs-kernel = %{version}
615 %if %{kprovidesarch}
616 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
617 %else
618 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
619 %endif
620 Group: Networking/Filesystems
621
622 %description kernel-bigmem
623 The AFS distributed filesystem.  AFS is a distributed filesystem
624 allowing cross-platform sharing of files among multiple computers.
625 Facilities are provided for access control, authentication, backup and
626 administrative management.
627
628 This package provides a precompiled AFS kernel module for %{kernvers}.
629 %endif
630
631 %if %{hugemem_package}
632 %package kernel-hugemem
633 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
634 Release: %{modpkgrel}
635 Provides: openafs-kernel = %{version}
636 %if %{kprovidesarch}
637 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
638 %else
639 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
640 %endif
641 Group: Networking/Filesystems
642
643 %description kernel-hugemem
644 The AFS distributed filesystem.  AFS is a distributed filesystem
645 allowing cross-platform sharing of files among multiple computers.
646 Facilities are provided for access control, authentication, backup and
647 administrative management.
648
649 This package provides a precompiled AFS kernel module for %{kernvers}.
650 %endif
651
652 %endif
653 # End legacy kernel compilation code ...
654 %endif
655
656 ##############################################################################
657 #
658 # PREP
659 #
660 ##############################################################################
661
662 %prep
663
664 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
665 : @@@
666 : @@@ kernel version:     %{kernvers}
667 %if %{fedorakmod}
668 : @@@ kernel variations:  %{kvariants}
669 %else
670 : @@@ base kernel version:%{kversion}
671 : @@@ kernel modules dir: %{kxmoddir}
672 : @@@ kernel source dir:  %{ksrcdir}
673 %if %{kvers_is_24}
674 : @@@ kernel variations:  %{kvariations}
675 %else
676 %if %{up_package}
677 : @@@ kernel type:        up
678 %else
679 : @@@ kernel type:        %{ktype}
680 %endif
681 %endif
682 %endif
683 : @@@ PAM modules dir:    %{pamdir}
684 : @@@ build userspace:    %{build_userspace}
685 : @@@ build modules:      %{build_modules}
686 : @@@ arch:               %{_arch}
687 : @@@ target cpu:         %{_target_cpu}
688 : @@@
689 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
690
691 # Install OpenAFS src and doc
692 #%setup -q -n %{srcdir}
693 %setup -q -b 1 -n %{srcdir}
694
695 ##############################################################################
696 #
697 # building
698 #
699 ##############################################################################
700 %build
701
702 case %{kernvers} in
703    2.4.*)
704        kv='24'
705        ;;
706    2.6.*)
707        kv='26'
708        ;;
709    *)
710        echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
711        exit 1
712        ;;
713 esac
714
715 case %{_arch} in
716        x86_64)                         sysname=amd64_linux${kv}        ;;
717        alpha*)                         sysname=alpha_linux_${kv}       ;;
718        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
719        *)                              sysname=%{_arch}_linux${kv}     ;;
720 esac
721
722 %ifarch %{ix86}
723 archlist="i386 i586 i686 athlon"
724 %if %{bootkernelsupport}
725   archlist="${archlist} BOOT"
726 %endif
727 %else
728 archlist=%{_arch}
729 %endif
730
731 #
732 # PrintDefine var value statements file
733 #
734 PrintDefine() {
735     case $3 in
736     *ifn*)
737         echo "#ifndef $1" >> $4
738         ;;
739     esac
740     case $3 in
741     *und*)
742         echo "#undef $1" >> $4
743         ;;
744     esac
745     case $3 in
746     *def*)
747         echo "#define $1 $2" >> $4
748         ;;
749     esac
750     case $3 in
751     *end*)
752         echo "#endif" >> $4
753         ;;
754     esac
755     case $3 in
756     *inc*)
757         echo "#include $1" >> $4
758         ;;
759     esac
760     case $3 in
761     *nl*)
762         echo "" >> $4
763         ;;
764     esac
765 }
766
767 # PrintRedhatKernelFix arch mp file
768 PrintRedhatKernelFix() {
769     arch="$1"
770     up=0
771     smp=0
772     largesmp=0
773     ent=0
774     bigmem=0
775     hugemem=0
776     boot=0
777     bootsmp=0
778
779     case "$2" in
780        up)     up=1;;
781        smp)    smp=1;;
782        largesmp) largesmp=1;;
783        bigmem) bigmem=1;;
784        hugemem) hugemem=1;;
785        *)
786                echo "$2 not supported"
787                exit 2;;
788     esac
789
790     file="$3"
791
792     rm -f $file
793     touch $file
794
795     PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
796
797     PrintDefine __BOOT_KERNEL_ENTERPRISE $ent     und,def,nl $file
798     PrintDefine __BOOT_KERNEL_BIGMEM     $bigmem  und,def,nl $file
799     PrintDefine __BOOT_KERNEL_HUGEMEM    $hugemem und,def,nl $file
800     PrintDefine __BOOT_KERNEL_SMP        $smp     und,def,nl $file
801     PrintDefine __BOOT_KERNEL_LARGESMP   $largesmp und,def,nl $file
802     PrintDefine __BOOT_KERNEL_UP         $up      und,def,nl $file
803     PrintDefine __BOOT_KERNEL_BOOT       $boot    und,def,nl $file
804     PrintDefine __BOOT_KERNEL_BOOTSMP    $bootsmp und,def,nl $file
805
806     PrintDefine '"/boot/kernel.h"' "" inc,nl $file      # include file
807
808     for ar in $archlist ; do
809         if [ "$ar" = "$arch" ]; then
810             PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
811         else
812             PrintDefine "__MODULE_KERNEL_$ar" "" und $file      # undef
813         fi
814     done
815     echo "" >> $file
816
817     PrintDefine "" "" end $file
818
819     if [ %{debugspec} = 1 ] ; then
820         echo "Kernel Configuration File for Red Hat kernels:"
821         cat $file
822     fi
823 }
824
825 config_opts="--enable-redhat-buildsys \
826         %{?_with_bitmap_later:--enable-bitmap-later} \
827         %{?_with_bos_restricted:--enable-bos-restricted-mode} \
828         %{?_with_fast_restart:--enable-fast-restart} \
829         %{?_with_largefiles:--enable-largefile-fileserver} \
830         %{?_with_supergroups:--enable-supergroups} \
831         --enable-transarc-paths"
832
833 # Configure AFS
834
835 # If we're using Fedora kmods, work out which is the best kernel module to 
836 # use for the userland configuration step. If no variants have been specified,
837 # then use the standard kernel. If variants are specified, use the standard kernel
838 # if it's listed, otherwise pick the first listed kernel.
839 ksrc=""
840 %if %{fedorakmod} 
841   for kvariant in %{kvariants} ; do
842     if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
843       if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
844         ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
845       else
846         ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
847       fi
848     fi
849   done
850 %endif
851 if [ -z "$ksrc" ] ; then
852 ksrc=%{ksrcdir}
853 fi
854
855 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
856
857 ./configure --with-afs-sysname=${sysname} \
858        --prefix=%{_prefix} \
859        --libdir=%{_libdir} \
860        --bindir=%{_bindir} \
861        --sbindir=%{_sbindir} \
862        --disable-strip-binaries \
863        --with-linux-kernel-packaging \
864        --enable-disconnected \
865 %if %{build_modules}
866        --with-linux-kernel-headers=${ksrc} \
867 %endif
868 %if %{krb5support}
869         --with-krb5-conf=%{krb5config} \
870 %endif
871        $config_opts \
872        || exit 1
873
874 # Build the libafs tree
875 make only_libafs_tree || exit 1
876
877 # Configure each of our kernel modules
878
879 %if %{fedorakmod} && %{build_modules}
880 for kvariant in %{kvariants} ; do
881   if [ -n "${kvariant}" ] ; then
882     if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
883       ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
884     else
885       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
886     fi
887
888     cp -R libafs_tree _kmod_build_${kvariant}
889     pushd _kmod_build_${kvariant}
890     ./configure --with-afs-sysname=${sysname} \
891         --prefix=%{_prefix} \
892         --libdir=%{_libdir} \
893         --bindir=%{_bindir} \
894         --sbindir=%{_sbindir} \
895         --with-linux-kernel-packaging \
896         --with-linux-kernel-headers=${ksrc} \
897         --enable-disconnected \
898 %if %{krb5support}
899         --with-krb5-conf=/usr/kerberos/bin/krb5-config \
900 %endif
901         $config_opts \
902         || exit 1
903     popd
904   fi
905 done
906 %endif
907
908 %if %{build_userspace}
909 # Build the user-space AFS stuff
910 make dest_nolibafs || exit 1
911 %endif
912
913 %if %{build_modules}
914 %if %{fedorakmod}
915 for kvariant in %{kvariants}
916 do
917   if [ -n "${kvariant}" ] ; then
918     pushd _kmod_build_$kvariant;
919     make all
920     popd
921   else
922     make dest_only_libafs
923   fi
924 done
925
926 %else
927 # Begin legacy kernel module building code
928
929 %if %{kvers_is_24}
930 # Build all the kernel modules for linux 2.4.x
931 for variation in %{kvariations}
932 do
933     if [ ${variation} = up ]
934     then
935        local_smp_def=-DREDHAT_FIX
936        suffix=
937     else
938        local_smp_def="-DAFS_SMP -DREDHAT_FIX"
939        suffix=${variation}
940     fi
941
942     PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
943     make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
944         LINUX_MODULE_NAME="${suffix}" MPS=SP
945
946 done
947 rm -f src/config/redhat-fix.h
948
949 %elseif %{kvers_is_26}
950 # Build the kernel module for this version of linux 2.6.x
951 # Notice how much easier this is than 2.4.  On the other hand,
952 # we require much more external support to build multiple modules.
953
954   # the MPS=SP just means that we don't add a '.mp' to the name.
955   make dest_only_libafs MPS=SP
956
957 %endif
958 # End legacy kernel module building code
959 %endif
960 %endif
961
962
963 ##############################################################################
964 #
965 # installation
966 #
967 ##############################################################################
968 %install
969
970 export DONT_GPRINTIFY=1
971
972 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
973
974 case %{kernvers} in
975    2.4.*)
976        kv='24'
977        kmodend=.o
978        ;;
979    2.6.*)
980        kv='26'
981        kmodend=.ko
982        ;;
983    *)
984        echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
985        exit 1
986        ;;
987 esac
988
989 case %{_arch} in
990        x86_64)                         sysname=amd64_linux${kv}        ;;
991        alpha*)                         sysname=alpha_linux_${kv}       ;;
992        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
993        *)                              sysname=%{_arch}_linux${kv}     ;;
994 esac
995
996 # Build install tree
997 %if %{build_userspace}
998 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
999 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1000 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1001 mkdir -p $RPM_BUILD_ROOT%{initdir}
1002 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1003 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1004 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1005 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1006 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1007 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1008 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1009 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1010
1011 # Copy files from dest to the appropriate places in BuildRoot
1012 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1013 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1014 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1015 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1016 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1017
1018 # Fix the location of restorevol, since it should be available for
1019 # any user in /usr/bin
1020 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1021
1022 # Link kpasswd to kapasswd
1023 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1024
1025 # Copy root.client config files
1026 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1027 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1028 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1029
1030 # Copy PAM modules
1031 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1032
1033 # PAM symlinks
1034 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1035 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1036
1037 # Populate /usr/vice/etc
1038 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1039 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1040 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1041 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1042
1043 #
1044 # install dkms source
1045 #
1046 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1047 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1048
1049 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1050
1051 PACKAGE_VERSION="%{dkms_version}"
1052
1053 # Items below here should not have to change with each driver version
1054 PACKAGE_NAME="%{name}"
1055 MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --enable-disconnected --with-linux-kernel-headers=\${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD"
1056 CLEAN="make -C src/libafs clean"
1057
1058 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1059 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1060 STRIP[0]=no
1061 AUTOINSTALL=yes
1062
1063 EOF
1064
1065 #
1066 # install kernel-source
1067 #
1068
1069 # Install the kernel module source tree
1070 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1071 tar cf - -C libafs_tree . | \
1072         tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1073
1074 # Next, copy the LICENSE Files, README
1075 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1076 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1077 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1078
1079 #
1080 # Install DOCUMENTATION
1081 #
1082
1083 # Build the DOC directory
1084 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1085 tar cf - -C doc LICENSE html pdf | \
1086     tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1087 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1088 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1089
1090 #
1091 # man pages
1092 #
1093 tar cf - -C doc/man-pages man1 man5 man8 | \
1094     tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1095
1096 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1097 %if %{krb5support}
1098 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1099 %else
1100 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1101 %endif
1102
1103 # remove unused man pages
1104 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1105     dkload knfs package runntp symlink symlink_list symlink_make \
1106     symlink_remove; do
1107         rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1108 done
1109
1110 # rename kpasswd to kapasswd
1111 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1112
1113 # gzip man pages
1114 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1115
1116 # create list of man pages that go in the 'openafs' package
1117 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1118         |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1119         >openafs-man1files
1120
1121 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1122         |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1123         >openafs-man5files
1124
1125 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1126         |egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^read_tape|^uss' \
1127         >openafs-man8files
1128
1129 #
1130 # create filelist
1131 #
1132 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1133 %{_bindir}/afsmonitor
1134 %{_bindir}/bos
1135 %{_bindir}/fs
1136 %{_bindir}/kapasswd
1137 %{_bindir}/kpasswd
1138 %{_bindir}/klog
1139 %{_bindir}/klog.krb
1140 %{_bindir}/pagsh
1141 %{_bindir}/pagsh.krb
1142 %{_bindir}/pts
1143 %{_bindir}/restorevol
1144 %{_bindir}/scout
1145 %{_bindir}/sys
1146 %{_bindir}/tokens
1147 %{_bindir}/tokens.krb
1148 %{_bindir}/translate_et
1149 %{_bindir}/udebug
1150 %{_bindir}/unlog
1151 %{_sbindir}/backup
1152 %{_sbindir}/butc
1153 %{_sbindir}/fms
1154 %{_sbindir}/fstrace
1155 %{_sbindir}/kas
1156 %{_sbindir}/read_tape
1157 %{_sbindir}/rxdebug
1158 %{_sbindir}/uss
1159 %{_sbindir}/vos
1160 %{_sbindir}/vsys
1161 EOF-openafs-file-list
1162
1163 # add man pages to the list
1164 cat openafs-man1files \
1165         | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1166         >>openafs-file-list
1167 cat openafs-man5files \
1168         | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1169         >>openafs-file-list
1170 cat openafs-man8files \
1171         | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1172         >>openafs-file-list
1173
1174 #
1175 # Install compatiblity links
1176 #
1177 for d in bin:bin etc:sbin; do
1178   olddir=`echo $d | sed 's/:.*$//'`
1179   newdir=`echo $d | sed 's/^.*://'`
1180   mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1181   for f in `cat openafs-file-list`; do
1182     if echo $f | grep -q /$newdir/; then
1183       fb=`basename $f`
1184       ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1185     fi
1186   done
1187 done
1188
1189 #
1190 # Remove files we're not installing
1191 #
1192
1193 # remove duplicated files from /usr/afs/bin
1194 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1195   rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1196 done
1197
1198 # the rest are not needed.
1199 for f in dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1200   rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1201 done
1202
1203 # not supported on Linux or duplicated
1204 for f in kdb rmtsysd kpwvalid ; do
1205   rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1206 done
1207 # sometimes install sucks and puts down a directory. kill it all.
1208 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1209
1210 # remove man pages from programs deleted above
1211 for f in 1/dlog 1/dpass 1/livesys 1/xstat_cm_test 1/xstat_fs_test 8/kdb 8/kpwvalid 8/xfs_size_check 1/package_test 5/package 8/package ; do
1212   rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1213 done
1214
1215 # PAM modules are doubly-installed  Remove the version we don't need
1216 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1217   rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1218 done
1219
1220 %if !%{build_authlibs}
1221 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1222 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1223 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1224 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1225 %endif
1226
1227 %endif
1228
1229 %if %{build_modules}
1230 %if %{fedorakmod}
1231 for kvariant in %{kvariants}
1232 do
1233   if [ -n "$kvariant" ] ; then
1234     if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1235       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1236       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1237     else
1238       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1239       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1240     fi
1241   else
1242     if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1243       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1244       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1245     else
1246       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1247       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1248     fi
1249   fi
1250
1251   mkdir -p ${dstdir}
1252   install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1253 done
1254 %else
1255 # Install the kernel modules
1256 for variation in %{kvariations}
1257 do
1258     if [ ${variation} = up ]
1259     then
1260        kvar=%{kxmoddir}
1261        modname=openafs${kmodend}
1262     else
1263        kvar=%{kxmoddir}${variation}
1264        modname=openafs${kmodend}
1265     fi
1266
1267     srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1268     dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1269
1270     mkdir -p ${dstdir}
1271
1272     install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1273 done
1274 %endif
1275 %endif
1276
1277 ##############################################################################
1278 ###
1279 ### clean
1280 ###
1281 ##############################################################################
1282 %clean
1283 rm -f openafs-file-list
1284 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1285         rm -fr $RPM_BUILD_ROOT
1286
1287
1288 ##############################################################################
1289 ###
1290 ### scripts
1291 ###
1292 ##############################################################################
1293 %if %{build_userspace}
1294
1295 %pre compat
1296 if [ -e %{_prefix}/afsws ]; then
1297         /bin/rm -fr %{_prefix}/afsws
1298 fi
1299
1300 %post client
1301 chkconfig --add openafs-client
1302 if [ ! -d /afs ]; then
1303         mkdir /afs
1304         chown root.root /afs
1305         chmod 0755 /afs
1306 fi
1307
1308 # Create the CellServDB
1309 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1310
1311 ( cd /usr/vice/etc ; \
1312   cat CellServDB.local CellServDB.dist > CellServDB ; \
1313   chmod 644 CellServDB )
1314
1315 echo
1316 echo The AFS cache is configured for 100 MB. Edit the
1317 echo /usr/vice/etc/cacheinfo file to change this before
1318 echo running AFS for the first time. You should also
1319 echo set your home cell in /usr/vice/etc/ThisCell.
1320 echo
1321 echo Also, you may want to edit /etc/pam.d/login and
1322 echo possibly others there to get an AFS token on login.
1323 echo Put the line:
1324 echo 
1325 echo    auth       sufficient   %{pamdir}/pam_afs.so try_first_pass ignore_root
1326 echo
1327 echo before the one for pwdb.
1328 echo
1329
1330 %post server
1331 chkconfig --add openafs-server
1332 %{initdir}/openafs-server condrestart
1333
1334 %if %{build_authlibs}
1335 %post authlibs
1336 /sbin/ldconfig
1337
1338 %postun authlibs
1339 /sbin/ldconfig
1340 %endif
1341
1342 %preun
1343 if [ $1 = 0 ] ; then
1344         [ -d /afs ] && rmdir /afs
1345 fi
1346
1347 %preun client
1348 if [ $1 = 0 ] ; then
1349         %{initdir}/openafs-client stop
1350         chkconfig --del openafs-client
1351 fi
1352
1353 %preun server
1354 if [ $1 = 0 ] ; then
1355         %{initdir}/openafs-server stop
1356         chkconfig --del openafs-server
1357 fi
1358
1359 %if %{build_dkmspkg}
1360 %post -n dkms-%{name}
1361 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1362 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1363 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1364
1365 %preun -n dkms-%{name}
1366 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1367 %endif
1368 %endif
1369
1370 %if %{build_modules}
1371 %if !%{fedorakmod}
1372 %if %{up_package}
1373 %post kernel
1374 /sbin/depmod -ae %{kernvers}
1375
1376 %postun kernel
1377 /sbin/depmod -ae %{kernvers}
1378
1379 %endif
1380
1381 %if %{smp_package}
1382 %post kernel-smp
1383 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1384
1385 %postun kernel-smp
1386 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1387 %endif
1388
1389 %if %{largesmp_package}
1390 %post kernel-largesmp
1391 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1392
1393 %postun kernel-largesmp
1394 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1395 %endif
1396  
1397 %if %{bigmem_package}
1398 %post kernel-bigmem
1399 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1400
1401 %postun kernel-bigmem
1402 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1403 %endif
1404
1405 %if %{hugemem_package}
1406 %post kernel-hugemem
1407 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1408
1409 %postun kernel-hugemem
1410 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1411 %endif
1412 %endif
1413 %endif
1414
1415 ##############################################################################
1416 ###
1417 ### file lists
1418 ###
1419 ##############################################################################
1420 %if %{build_userspace}
1421
1422 %files -f openafs-file-list
1423 %defattr(-,root,root)
1424 %config /etc/sysconfig/openafs
1425 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1426
1427 %files docs
1428 %defattr(-,root,root)
1429 %doc %{_docdir}/openafs-%{afsvers}
1430
1431 %files client
1432 %defattr(-,root,root)
1433 %dir %{_prefix}/vice
1434 %dir %{_prefix}/vice/cache
1435 %dir %{_prefix}/vice/etc
1436 %dir %{_prefix}/vice/etc/C
1437 %{_prefix}/vice/etc/CellServDB.dist
1438 %config %{_prefix}/vice/etc/ThisCell
1439 %config %{_prefix}/vice/etc/cacheinfo
1440 %{_bindir}/cmdebug
1441 %{_bindir}/up
1442 %{_prefix}/vice/etc/afsd
1443 %{_prefix}/vice/etc/C/afszcm.cat
1444 %{pamdir}/pam_afs.krb.so.1
1445 %{pamdir}/pam_afs.krb.so
1446 %{pamdir}/pam_afs.so.1
1447 %{pamdir}/pam_afs.so
1448 %{initdir}/openafs-client
1449 %{_mandir}/man1/cmdebug.*
1450 %{_mandir}/man1/copyauth.*
1451 %{_mandir}/man1/up.*
1452 %{_mandir}/man5/afs*
1453 %{_mandir}/man5/cacheinfo.*
1454 %{_mandir}/man8/afsd.*
1455 %{_mandir}/man8/rmtsysd.*
1456 %{_mandir}/man8/vsys.*
1457 %{_mandir}/man5/CellAlias.*
1458
1459 %files server
1460 %defattr(-,root,root)
1461 %dir %{_prefix}/afs
1462 %dir %{_prefix}/afs/bin
1463 %dir %{_prefix}/afs/etc
1464 %dir %{_prefix}/afs/logs
1465 %{_prefix}/afs/bin/bosserver
1466 %{_prefix}/afs/bin/bos_util
1467 %{_prefix}/afs/bin/buserver
1468 %{_prefix}/afs/bin/fileserver
1469 %{_prefix}/afs/bin/fssync-debug
1470 # Should we support KAServer?
1471 %{_prefix}/afs/bin/kaserver
1472 %{_prefix}/afs/bin/ka-forwarder
1473 %{_prefix}/afs/bin/pt_util
1474 %{_prefix}/afs/bin/ptserver
1475 %{_prefix}/afs/bin/salvager
1476 %{_prefix}/afs/bin/state_analyzer
1477 %{_prefix}/afs/bin/upclient
1478 %{_prefix}/afs/bin/upserver
1479 %{_prefix}/afs/bin/vlserver
1480 %{_prefix}/afs/bin/volinfo
1481 %{_prefix}/afs/bin/volserver
1482 %{_sbindir}/kadb_check
1483 %{_sbindir}/prdb_check
1484 %{_sbindir}/vldb_check
1485 %{_sbindir}/vldb_convert
1486 %{_sbindir}/voldump
1487 %{initdir}/openafs-server
1488 %{_mandir}/man5/AuthLog.*
1489 %{_mandir}/man5/BackupLog.*
1490 %{_mandir}/man5/BosConfig.*
1491 %{_mandir}/man5/BosLog.*
1492 %{_mandir}/man5/FORCESALVAGE.*
1493 %{_mandir}/man5/FileLog.*
1494 %{_mandir}/man5/KeyFile.*
1495 %{_mandir}/man5/NetInfo.*
1496 %{_mandir}/man5/NetRestrict.*
1497 %{_mandir}/man5/NoAuth.*
1498 %{_mandir}/man5/SALVAGE.fs.*
1499 %{_mandir}/man5/SalvageLog.*
1500 %{_mandir}/man5/sysid.*
1501 %{_mandir}/man5/UserList.*
1502 %{_mandir}/man5/VLLog.*
1503 %{_mandir}/man5/VolserLog.*
1504 %{_mandir}/man5/bdb.DB0.*
1505 %{_mandir}/man5/fms.log.*
1506 %{_mandir}/man5/kaserver.DB0.*
1507 %{_mandir}/man5/kaserverauxdb.*
1508 %{_mandir}/man5/krb.conf.*
1509 %{_mandir}/man5/prdb.DB0.*
1510 %{_mandir}/man5/salvage.lock.*
1511 %{_mandir}/man5/tapeconfig.*
1512 %{_mandir}/man5/vldb.DB0.*
1513 %{_mandir}/man8/buserver.*
1514 %{_mandir}/man8/fileserver.*
1515 %{_mandir}/man8/kadb_check.*
1516 %{_mandir}/man8/ka-forwarder.*
1517 %{_mandir}/man8/prdb_check.*
1518 %{_mandir}/man8/ptserver.*
1519 %{_mandir}/man8/pt_util.*
1520 %{_mandir}/man8/salvager.*
1521 %{_mandir}/man8/salvageserver.*
1522 %{_mandir}/man8/state_analyzer.*
1523 %{_mandir}/man8/upclient.*
1524 %{_mandir}/man8/upserver.*
1525 %{_mandir}/man8/vldb_check.*
1526 %{_mandir}/man8/vldb_convert.*
1527 %{_mandir}/man8/vlserver.*
1528 %{_mandir}/man8/voldump.*
1529 %{_mandir}/man8/volinfo.*
1530 %{_mandir}/man8/volserver.*
1531
1532 %if %{build_authlibs}
1533 %files authlibs
1534 %defattr(-,root,root)
1535 %{_libdir}/libafsauthent.so.*
1536 %{_libdir}/libafsrpc.so.*
1537 %{_libdir}/libkopenafs.so.*
1538 %endif
1539
1540 %files authlibs-devel
1541 %defattr(-,root,root)
1542 %{_includedir}/kopenafs.h
1543 %{_libdir}/libafsauthent.a
1544 %{_libdir}/libafsrpc.a
1545 %{_libdir}/libafsauthent_pic.a
1546 %{_libdir}/libafsrpc_pic.a
1547 %{_libdir}/libkopenafs.a
1548 %if %{build_authlibs}
1549 %{_libdir}/libafsauthent.so
1550 %{_libdir}/libafsrpc.so
1551 %{_libdir}/libkopenafs.so
1552 %endif
1553
1554 %files devel
1555 %defattr(-,root,root)
1556 %{_bindir}/afs_compile_et
1557 %{_bindir}/rxgen
1558 %{_includedir}/afs
1559 %{_includedir}/des.h
1560 %{_includedir}/des_conf.h
1561 %{_includedir}/des_odd.h
1562 %{_includedir}/des_prototypes.h
1563 %{_includedir}/lock.h
1564 %{_includedir}/lwp.h
1565 %{_includedir}/mit-cpyright.h
1566 %{_includedir}/potpourri.h
1567 %{_includedir}/preempt.h
1568 %{_includedir}/rx
1569 %{_includedir}/timer.h
1570 %{_includedir}/ubik.h
1571 %{_includedir}/ubik_int.h
1572 %{_libdir}/afs
1573 %{_libdir}/libdes.a
1574 %{_libdir}/liblwp.a
1575 %{_libdir}/librx.a
1576 %{_libdir}/librxkad.a
1577 %{_libdir}/librxstat.a
1578 %{_libdir}/libubik.a
1579 %{_mandir}/man1/rxgen.*
1580 %{_mandir}/man1/afs_compile_et.*
1581
1582 %if %{build_dkmspkg}
1583 %files -n dkms-%{name}
1584 %defattr(-,root,root)
1585 %{_prefix}/src/%{name}-%{dkms_version}
1586 %endif
1587
1588 %files kernel-source
1589 %defattr(-,root,root)
1590 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1591 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1592 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1593 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1594
1595 %files compat
1596 %defattr(-,root,root)
1597 %{_prefix}/afsws
1598
1599 %files kpasswd
1600 %defattr(-,root,root)
1601 %{_bindir}/kpasswd
1602 %{_bindir}/kpwvalid
1603
1604 %if %{krb5support}
1605 %files krb5
1606 %defattr(-,root,root)
1607 %{_bindir}/aklog
1608 %{_bindir}/klog.krb5
1609 %{_sbindir}/asetkey
1610 %{_mandir}/man1/aklog.*
1611 %{_mandir}/man8/asetkey.*
1612 %endif
1613
1614 %endif
1615
1616 %if %{build_modules}
1617
1618 %if !%{fedorakmod}
1619 %if %{up_package}
1620 %files kernel
1621 %defattr(-,root,root)
1622 %{kxmoddir}/fs/openafs/openafs.*
1623 %endif
1624
1625 %if %{smp_package}
1626 %files kernel-smp
1627 %defattr(-,root,root)
1628 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1629 %endif
1630
1631 %if %{largesmp_package}
1632 %files kernel-largesmp
1633 %defattr(-,root,root)
1634 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1635 %endif
1636  
1637 %if %{bigmem_package}
1638 %files kernel-bigmem
1639 %defattr(-,root,root)
1640 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1641 %endif
1642
1643 %if %{hugemem_package}
1644 %files kernel-hugemem
1645 %defattr(-,root,root)
1646 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1647 %endif
1648 %endif
1649
1650 %endif
1651
1652 ##############################################################################
1653 ###
1654 ### openafs.spec change log
1655 ###
1656 ##############################################################################
1657 %changelog
1658 * Wed Dec 12 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1659 - Make the RPM mockable
1660
1661 * Tue Oct 29 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1662 - Update to match the shipped 1.4.5 RPMS
1663 - Fix the kvariant stuff to only configure the 'standard' case once
1664 - Add openafs-kvers.sh back in
1665
1666 * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1667 - Use Fedora style kmods, which allows us to install multiple kernel types
1668
1669 * Thu Jun 07 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1670 - Use distributed files, rather than those in packager's SOURCE directory
1671 - Remove SuidCells stuff, which was unused
1672
1673 * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
1674 - integrate s390x changes
1675 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1676   that won't build the .so files.
1677
1678 * Wed Aug 23 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
1679 - update to 1.4.2
1680 - use installed aklog manpage.
1681 - moduleparam patch obsoleted.
1682
1683 * Tue Aug 22 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1684 - update to 1.4.2-rc1
1685 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1686   (but only add support for 2.6 kernels.  No need for the 2.4 kernels).
1687 - don't need the posixlock patch anymore.
1688
1689 * Wed Jul 12 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1690 - update to 1.4.2-beta2
1691 - add linux2.4 posixlock API patch
1692
1693 * Mon Jun 26 2006  Derek Atkins <warlord@MIT.EDU>
1694 - moduleparam and krb524 patches no longer required in OA-CVS
1695
1696 * Wed May 17 2006  Derek Atkins <warlord@MIT.EDU>
1697 - change non-target-cpu kernel dep to a file dep
1698 - make sure we use the proper kernel version for the dependency.
1699
1700 * Tue May 16 2006  Derek Atkins <warlord@MIT.EDU>
1701 - allow users to specify local CellServDB and SuidCells entries
1702   don't overwrite user's changes.  Provide a .dist an let users
1703   make entries in a ".local"
1704 - build the CellServDB and SuidCells at client startup and at
1705   client install-time
1706 - add provideskernelarch functionality to openafs-kvers-is.sh
1707 - use that functionality to Require kernel{,-<type>}-targetcpu
1708   to get better package safety due to RPM bugs where the kernel
1709   release isn't used so you can install the kernel module against
1710   any kernel of the same major version.
1711
1712 * Mon May 15 2006  Derek Atkins <warlord@MIT.EDU>
1713 - update the README in openafs-kernel-source
1714 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1715 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1716
1717 * Fri Apr 21 2006  Derek Atkins <warlord@MIT.EDU>
1718 - build requires autoconf and automake for krb5support
1719   and autoconf for standard package
1720 - dont setup the krb5 migration kit (or patches) if we don't care.
1721 - require ncurses-devel to build
1722
1723 * Wed Apr 19 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1724 - look for krb524 functions in libkrb524 if we can't find them
1725   in the standard locations.
1726
1727 * Tue Apr 18 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1728 - fix the module_param_array macro for Linux 2.6.9.
1729
1730 * Sat Apr 15 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1731 - update to 1.4.1 release.
1732 - distribute asetkey from openafs instead of krb5-migration kit
1733 - don't need to apply the FC5 patches because they are part of the distro.
1734 - install asetkey into the "proper" place
1735 - dont list a manpage twice.
1736 - package asetkey man page.  delete it when not needed.
1737
1738 * Thu Apr  6 2006  Derek Atkins <warlord@MIT.EDU>
1739 - turn authlibs back on, because RT #18767 was applied to CVS.
1740
1741 * Wed Mar 29 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1742 - update to 1.4.1rc10, build on FC5
1743 - fix the man pages (distribute into various packages)
1744 - include patches for FC5, RT #29112 and #29122
1745
1746 * Mon Dec 19 2005  Derek Atkins <warlord@MIT.EDU>
1747 - openafs-server shouldn't depend on the kernel module.
1748
1749 * Thu Nov 17 2005  Derek Atkins <warlord@MIT.EDU>
1750 - patch from Mike Polek <mike at pictage.com> to run depmod for
1751   the target kernel and not the running kernel.
1752
1753 * Tue Nov  8 2005  Derek Atkins <warlord@MIT.EDU>
1754 - build aklog from the openafs sources, not from the krb5 migration kit.
1755
1756 * Fri Nov  4 2005  Derek Atkins <warlord@MIT.EDU>
1757 - set openafs-kernel-source to Provide openafs-kernel
1758
1759 * Thu Oct 20 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1760 - update afs-krb5 res_search patch: look for res_search and __res_search
1761 - update to 1.4.0 final
1762
1763 * Mon Oct 10 2005  Derek Atkins <warlord@MIT.EDU>
1764 - remove all kdump builds.
1765
1766 * Thu Oct  6 2005  Derek Atkins <warlord@MIT.EDU>
1767 - fix openafs-kernel-version.sh so it will build an RPM for the
1768   currently-running kernel even if it's smp on 2.6.
1769
1770 * Tue Sep 27 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1771 - upgrade to 1.4.0rc5
1772 - turn off authlibs packages
1773
1774 * Fri Sep 23 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1775 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1776   it's called "openafs" and not "libafs".  This fixes the shutdown
1777   problem.
1778
1779 * Thu Sep 22 2005  Derek Atkins <warlord@MIT.EDU>
1780 - update kversis script, add 'kvers' operation
1781 - fix bug that 2.6 smp/hugemem kernels don't provide
1782   kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1783 - add patch to remove res_search from the afs-krb5 configure
1784
1785 * Thu Sep 15 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1786 - Update to 1.4.0rc4
1787 - Update the afs-krb5 krb524 patch so it actually works on
1788   some older systems like RHEL3 that still need -lkrb524.
1789 - Update the buildall script so choose better architecture support,
1790   e.g. don't build i586 on RHEL.
1791 - Update the rebuild information in the SPEC file.
1792 - Add support for finding .EL kernels in openafs-kvers-is.sh
1793 - Add additional error messages when kernel version/type parsing fails.
1794 - Update the buildall script to use the kernel srcdir directly.
1795
1796 * Wed Sep 14 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1797 - Add "hugemem" to 2.4 configs
1798 - Add checks to support scripts to determine whether to build
1799   the bigmem and/or hugemem kernels for 2.4.
1800
1801 * Mon Sep 12 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1802 - Added some afs-krb5 patches to get the migration kit to build
1803   on modern AFS and modern Kerberos.
1804 - Added authlibs and authlibs-devel packages as per UMich changes.
1805
1806 * Sun Sep 11 2005  Derek Atkins <warlord@MIT.EDU>
1807 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1808
1809 * Sat Sep 10 2005  Derek Atkins <warlord@MIT.EDU>
1810 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1811   from Red Hat.   Initial attempt at a release of 1.4.  Still need
1812   to work in a 2.6 build system.