]> git.pld-linux.org Git - packages/gfs2.git/blame - gfs2.spec
- removed outdated install patch
[packages/gfs2.git] / gfs2.spec
CommitLineData
25bbb966
JB
1# NOTE:
2# - for 3rd generation cluster see cluster.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.
ca6c34d8 5#
6# TODO:
25bbb966
JB
7# - more kernel stuff (gnbd, ...), but gnbd looks dead,
8# use iscsi, fc, aoe, nbd or sth instead
ca6c34d8 9#
10# Conditional build:
11%bcond_without dist_kernel # without distribution kernel
25bbb966 12%bcond_with kernel # build kernel module
ca6c34d8 13%bcond_without userspace # don't build userspace package
25bbb966 14%bcond_with verbose # verbose kernel module build
ca6c34d8 15
16%if %{without kernel}
17%undefine with_dist_kernel
18%endif
19%if "%{_alt_kernel}" != "%{nil}"
20%undefine with_userspace
21%endif
22%if %{without userspace}
23# nothing to be placed to debuginfo package
24%define _enable_debug_packages 0
25%endif
26
27%define rel 1
502c6044 28Summary: Shared-disk cluster file system
29Summary(pl.UTF-8): Klastrowy system plików na współdzielonym dysku
30Name: gfs2
ca6c34d8 31Version: 2.03.10
32Release: %{rel}
502c6044 33Epoch: 1
34License: GPL v2
35Group: Applications/System
36Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
ca6c34d8 37# Source0-md5: 379b560096e315d4b52e238a5c72ba4a
25bbb966
JB
38Patch0: %{name}-kernel-2.6.28.patch
39Patch1: %{name}-llh.patch
40Patch2: %{name}-blkid.patch
41Patch3: %{name}-quota-nolist.patch
502c6044 42URL: http://sources.redhat.com/cluster/gfs/
25bbb966
JB
43BuildRequires: libblkid-devel >= 2.16
44# which exactly version merged qq_ll_next into reserved in gfs2_quota struct?
45BuildRequires: linux-libc-headers >= 7:2.6.38
502c6044 46BuildRequires: ncurses-devel
ca6c34d8 47BuildRequires: openais-devel
553e2a47 48BuildRequires: perl-base
ca6c34d8 49%if %{with dist_kernel}
553e2a47 50BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.27
ca6c34d8 51%endif
502c6044 52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54%define _sbindir /sbin
55
117d15be 56%description
502c6044 57GFS (Global File System) is a cluster file system. It allows a cluster
58of computers to simultaneously use a block device that is shared
59between them (with FC, iSCSI, NBD, etc...). GFS reads and writes to
60the block device like a local filesystem, but also uses a lock module
61to allow the computers coordinate their I/O so filesystem consistency
62is maintained. One of the nifty features of GFS is perfect consistency
25bbb966
JB
63- changes made to the filesystem on one machine show up immediately on
64all other machines in the cluster.
502c6044 65
117d15be 66%description -l pl.UTF-8
502c6044 67GFS (Global File System) to klastrowy system plików. Pozwala klastrowi
68komputerów na jednoczesne korzystanie z urządzenia blokowego
69dzielonego między nimi (poprzez FC, iSCSI, NBD itp.). GFS odczytuje i
70zapisuje urządzenie blokowe jak lokalny system plików, ale używa
71dodatkowo modułu blokującego, aby umożliwić komputerom koordynowanie
72ich operacji I/O w celu zachowania spójności systemu plików. Jedną z
73szykownych możliwości GFS-a jest idealna spójność - zmiany wykonane w
74systemie plików na jednej maszynie natychmiast pokazują się na
75wszystkich innych maszynach w klastrze.
76
ca6c34d8 77%package -n kernel%{_alt_kernel}-misc-gfs
78Summary: gfs kernel module
25bbb966 79Summary(pl.UTF-8): Moduł jądra gfs
ca6c34d8 80Release: %{rel}@%{_kernel_ver_str}
81Group: Base/Kernel
82Requires(post,postun): /sbin/depmod
83%if %{with dist_kernel}
84%requires_releq_kernel
85Requires(postun): %releq_kernel
86%endif
87Provides: kernel(gfs) = %{version}-%{rel}
88
89%description -n kernel%{_alt_kernel}-misc-gfs
90gfs kernel module.
91
25bbb966
JB
92%description -n kernel%{_alt_kernel}-misc-gfs -l pl.UTF-8
93Moduł jądra gfs.
94
ca6c34d8 95%package -n kernel%{_alt_kernel}-misc-gnbd
96Summary: gnbd kernel module
25bbb966 97Summary(pl.UTF-8): Moduł jądra gnbd
ca6c34d8 98Release: %{rel}@%{_kernel_ver_str}
99Group: Base/Kernel
100Requires(post,postun): /sbin/depmod
101%if %{with dist_kernel}
102%requires_releq_kernel
103Requires(postun): %releq_kernel
104%endif
105Provides: kernel(gnbd) = %{version}-%{rel}
106
107%description -n kernel%{_alt_kernel}-misc-gnbd
108gnbd kernel module.
109
25bbb966
JB
110%description -n kernel%{_alt_kernel}-misc-gnbd -l pl.UTF-8
111Moduł jądra gnbd.
112
502c6044 113%prep
114%setup -q -n cluster-%{version}
25bbb966 115%patch0 -p1
ca6c34d8 116%patch1 -p1
25bbb966
JB
117%patch2 -p1
118%patch3 -p1
119
120%{__perl} -pi -e 's/-lncurses/-lncurses -ltinfo/' gfs2/edit/Makefile
502c6044 121
ca6c34d8 122%if %{with kernel}
123# gfs
124sed -i -e "s,\.\./\.\./\.\.,$PWD," gfs-kernel/src/gfs/Makefile
125sed -i -e "s,\$(OBJDIR),$PWD," gfs-kernel/src/gfs/Makefile
126# gnbd
127sed -i -e "s,\.\./\.\.,$PWD," gnbd-kernel/src/Makefile
128sed -i -e "s,\$(OBJDIR),$PWD," gnbd-kernel/src/Makefile
129%endif
502c6044 130
131%build
502c6044 132./configure \
25bbb966
JB
133 --cc="%{__cc}" \
134 --cflags="%{rpmcflags} -Wall" \
135 --ldflags="%{rpmldflags}" \
136 --incdir=%{_includedir} \
137 --ncursesincdir=%{_includedir}/ncurses \
502c6044 138 --libdir=%{_libdir} \
25bbb966 139 --libexecdir=%{_libdir} \
502c6044 140 --mandir=%{_mandir} \
141 --prefix=%{_prefix} \
ca6c34d8 142 --sbindir=%{_sbindir} \
25bbb966
JB
143 --without_gfs \
144 --without_gnbd \
ca6c34d8 145 --without_kernel_modules
146
147%if %{with userspace}
25bbb966 148%{__make} -C %{name}
ca6c34d8 149%endif
150
151%if %{with kernel}
152export KBUILD_NOPEDANTIC=1
153%build_kernel_modules -C gfs-kernel/src/gfs -m gfs
154#build_kernel_modules -C gnbd-kernel/src -m gnbd
155%endif
502c6044 156
157%install
158rm -rf $RPM_BUILD_ROOT
502c6044 159
ca6c34d8 160%if %{with userspace}
25bbb966 161%{__make} -C %{name} install \
502c6044 162 DESTDIR=$RPM_BUILD_ROOT
163
ca6c34d8 164install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
553e2a47 165mv $RPM_BUILD_ROOT/''etc/init.d/* $RPM_BUILD_ROOT/etc/rc.d/init.d
ca6c34d8 166%endif
167
168%if %{with kernel}
169%install_kernel_modules -m gfs-kernel/src/gfs/gfs -d misc
170#install_kernel_modules -m gnbd-kernel/src/gnbd -d misc
171%endif
172
502c6044 173%clean
174rm -rf $RPM_BUILD_ROOT
175
ca6c34d8 176%if %{with userspace}
117d15be 177%files
ca6c34d8 178%defattr(644,root,root,755)
25bbb966
JB
179%attr(755,root,root) %{_sbindir}/fsck.gfs2
180%attr(755,root,root) %{_sbindir}/gfs2_*
181%attr(755,root,root) %{_sbindir}/mkfs.gfs2
182%attr(755,root,root) %{_sbindir}/mount.gfs2
183%attr(755,root,root) %{_sbindir}/umount.gfs2
ca6c34d8 184%attr(754,root,root) /etc/rc.d/init.d/gfs2
25bbb966
JB
185%{_mandir}/man8/gfs2.8*
186%{_mandir}/man8/gfs2_*.8*
187%{_mandir}/man8/mkfs.gfs2.8*
ca6c34d8 188%endif
189
190%if %{with kernel}
191%files -n kernel%{_alt_kernel}-misc-gfs
553e2a47 192%defattr(644,root,root,755)
ca6c34d8 193/lib/modules/%{_kernel_ver}/misc/gfs.ko*
194#/lib/modules/%{_kernel_ver}/misc/gnbd.ko*
195%endif
This page took 0.058311 seconds and 4 git commands to generate.