2 # - obsolete, for 3rd generation cluster see cluster.spec and gfs2-utils.spec
3 # - gfs2 and dlm kernel modules are in the kernel package
4 # (2.6.28.9-3 for example); gfs is the old GFS.
7 # - more kernel stuff (gnbd, ...), but gnbd looks dead,
8 # use iscsi, fc, aoe, nbd or sth instead
11 %bcond_without dist_kernel # without distribution kernel
12 %bcond_with kernel # build kernel module
13 %bcond_without userspace # don't build userspace package
14 %bcond_with verbose # verbose kernel module build
17 %undefine with_dist_kernel
19 %if "%{_alt_kernel}" != "%{nil}"
20 %undefine with_userspace
22 %if %{without userspace}
23 # nothing to be placed to debuginfo package
24 %define _enable_debug_packages 0
28 Summary: Shared-disk cluster file system
29 Summary(pl.UTF-8): Klastrowy system plików na współdzielonym dysku
35 Group: Applications/System
36 Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
37 # Source0-md5: 712b9f583472d1de614641bc0f4a0aaf
38 Patch0: %{name}-kernel-2.6.28.patch
39 Patch1: %{name}-llh.patch
40 Patch2: %{name}-blkid.patch
41 Patch3: %{name}-quota-nolist.patch
42 Patch4: cluster-kernel.patch
43 URL: http://sources.redhat.com/cluster/gfs/
44 BuildRequires: libblkid-devel >= 2.16
45 # which exactly version merged qq_ll_next into reserved in gfs2_quota struct?
46 BuildRequires: linux-libc-headers >= 7:2.6.38
47 BuildRequires: ncurses-devel
48 BuildRequires: perl-base
49 %if %{with dist_kernel}
50 BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.27
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _sbindir /sbin
57 GFS (Global File System) is a cluster file system. It allows a cluster
58 of computers to simultaneously use a block device that is shared
59 between them (with FC, iSCSI, NBD, etc...). GFS reads and writes to
60 the block device like a local filesystem, but also uses a lock module
61 to allow the computers coordinate their I/O so filesystem consistency
62 is maintained. One of the nifty features of GFS is perfect consistency
63 - changes made to the filesystem on one machine show up immediately on
64 all other machines in the cluster.
66 %description -l pl.UTF-8
67 GFS (Global File System) to klastrowy system plików. Pozwala klastrowi
68 komputerów na jednoczesne korzystanie z urządzenia blokowego
69 dzielonego między nimi (poprzez FC, iSCSI, NBD itp.). GFS odczytuje i
70 zapisuje urządzenie blokowe jak lokalny system plików, ale używa
71 dodatkowo modułu blokującego, aby umożliwić komputerom koordynowanie
72 ich operacji I/O w celu zachowania spójności systemu plików. Jedną z
73 szykownych możliwości GFS-a jest idealna spójność - zmiany wykonane w
74 systemie plików na jednej maszynie natychmiast pokazują się na
75 wszystkich innych maszynach w klastrze.
77 %package -n kernel%{_alt_kernel}-misc-gfs
78 Summary: gfs kernel module
79 Summary(pl.UTF-8): Moduł jądra gfs
80 Release: %{rel}@%{_kernel_ver_str}
82 Requires(post,postun): /sbin/depmod
83 %if %{with dist_kernel}
84 %requires_releq_kernel
85 Requires(postun): %releq_kernel
87 Provides: kernel(gfs) = %{version}-%{rel}
89 %description -n kernel%{_alt_kernel}-misc-gfs
92 %description -n kernel%{_alt_kernel}-misc-gfs -l pl.UTF-8
95 %package -n kernel%{_alt_kernel}-misc-gnbd
96 Summary: gnbd kernel module
97 Summary(pl.UTF-8): Moduł jądra gnbd
98 Release: %{rel}@%{_kernel_ver_str}
100 Requires(post,postun): /sbin/depmod
101 %if %{with dist_kernel}
102 %requires_releq_kernel
103 Requires(postun): %releq_kernel
105 Provides: kernel(gnbd) = %{version}-%{rel}
107 %description -n kernel%{_alt_kernel}-misc-gnbd
110 %description -n kernel%{_alt_kernel}-misc-gnbd -l pl.UTF-8
114 %setup -q -n cluster-%{version}
121 %{__perl} -pi -e 's/-lncurses/-lncurses -ltinfo/' gfs2/edit/Makefile
125 sed -i -e "s,\.\./\.\./\.\.,$PWD," gfs-kernel/src/gfs/Makefile
126 sed -i -e "s,\$(OBJDIR),$PWD," gfs-kernel/src/gfs/Makefile
128 sed -i -e "s,\.\./\.\.,$PWD," gnbd-kernel/src/Makefile
129 sed -i -e "s,\$(OBJDIR),$PWD," gnbd-kernel/src/Makefile
135 --cflags="%{rpmcflags} -Wall" \
136 --ldflags="%{rpmldflags}" \
137 --incdir=%{_includedir} \
138 --ncursesincdir=%{_includedir}/ncurses \
139 --libdir=%{_libdir} \
140 --libexecdir=%{_libexecdir} \
141 --mandir=%{_mandir} \
142 --prefix=%{_prefix} \
143 --sbindir=%{_sbindir} \
146 --without_kernel_modules
148 %if %{with userspace}
153 export KBUILD_NOPEDANTIC=1
154 %build_kernel_modules -C gfs-kernel/src/gfs -m gfs
155 #build_kernel_modules -C gnbd-kernel/src -m gnbd
159 rm -rf $RPM_BUILD_ROOT
161 %if %{with userspace}
162 %{__make} -C %{name} install \
163 DESTDIR=$RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
166 %{__mv} $RPM_BUILD_ROOT/''etc/init.d/* $RPM_BUILD_ROOT/etc/rc.d/init.d
170 %install_kernel_modules -m gfs-kernel/src/gfs/gfs -d misc
171 #install_kernel_modules -m gnbd-kernel/src/gnbd -d misc
175 rm -rf $RPM_BUILD_ROOT
177 %if %{with userspace}
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_sbindir}/fsck.gfs2
181 %attr(755,root,root) %{_sbindir}/gfs2_*
182 %attr(755,root,root) %{_sbindir}/mkfs.gfs2
183 %attr(755,root,root) %{_sbindir}/mount.gfs2
184 %attr(755,root,root) %{_sbindir}/umount.gfs2
185 %attr(754,root,root) /etc/rc.d/init.d/gfs2
186 %{_mandir}/man8/gfs2.8*
187 %{_mandir}/man8/gfs2_*.8*
188 %{_mandir}/man8/mkfs.gfs2.8*
192 %files -n kernel%{_alt_kernel}-misc-gfs
193 %defattr(644,root,root,755)
194 /lib/modules/%{_kernel_ver}/misc/gfs.ko*
195 #/lib/modules/%{_kernel_ver}/misc/gnbd.ko*