]> git.pld-linux.org Git - packages/gfs2.git/blame_incremental - gfs2.spec
- more notes
[packages/gfs2.git] / gfs2.spec
... / ...
CommitLineData
1# NOTE:
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.
5#
6# TODO:
7# - more kernel stuff (gnbd, ...), but gnbd looks dead,
8# use iscsi, fc, aoe, nbd or sth instead
9#
10# Conditional build:
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
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
28Summary: Shared-disk cluster file system
29Summary(pl.UTF-8): Klastrowy system plików na współdzielonym dysku
30Name: gfs2
31Version: 2.03.11
32Release: %{rel}
33Epoch: 1
34License: GPL v2
35Group: Applications/System
36Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
37# Source0-md5: 712b9f583472d1de614641bc0f4a0aaf
38Patch0: %{name}-kernel-2.6.28.patch
39Patch1: %{name}-llh.patch
40Patch2: %{name}-blkid.patch
41Patch3: %{name}-quota-nolist.patch
42Patch4: cluster-kernel.patch
43URL: http://sources.redhat.com/cluster/gfs/
44BuildRequires: libblkid-devel >= 2.16
45# which exactly version merged qq_ll_next into reserved in gfs2_quota struct?
46BuildRequires: linux-libc-headers >= 7:2.6.38
47BuildRequires: ncurses-devel
48BuildRequires: perl-base
49%if %{with dist_kernel}
50BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.27
51%endif
52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54%define _sbindir /sbin
55
56%description
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
63- changes made to the filesystem on one machine show up immediately on
64all other machines in the cluster.
65
66%description -l pl.UTF-8
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
77%package -n kernel%{_alt_kernel}-misc-gfs
78Summary: gfs kernel module
79Summary(pl.UTF-8): Moduł jądra gfs
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
92%description -n kernel%{_alt_kernel}-misc-gfs -l pl.UTF-8
93Moduł jądra gfs.
94
95%package -n kernel%{_alt_kernel}-misc-gnbd
96Summary: gnbd kernel module
97Summary(pl.UTF-8): Moduł jądra gnbd
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
110%description -n kernel%{_alt_kernel}-misc-gnbd -l pl.UTF-8
111Moduł jądra gnbd.
112
113%prep
114%setup -q -n cluster-%{version}
115%patch0 -p1
116%patch1 -p1
117%patch2 -p1
118%patch3 -p1
119%patch4 -p1
120
121%{__perl} -pi -e 's/-lncurses/-lncurses -ltinfo/' gfs2/edit/Makefile
122
123%if %{with kernel}
124# gfs
125sed -i -e "s,\.\./\.\./\.\.,$PWD," gfs-kernel/src/gfs/Makefile
126sed -i -e "s,\$(OBJDIR),$PWD," gfs-kernel/src/gfs/Makefile
127# gnbd
128sed -i -e "s,\.\./\.\.,$PWD," gnbd-kernel/src/Makefile
129sed -i -e "s,\$(OBJDIR),$PWD," gnbd-kernel/src/Makefile
130%endif
131
132%build
133./configure \
134 --cc="%{__cc}" \
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} \
144 --without_gfs \
145 --without_gnbd \
146 --without_kernel_modules
147
148%if %{with userspace}
149%{__make} -C %{name}
150%endif
151
152%if %{with kernel}
153export KBUILD_NOPEDANTIC=1
154%build_kernel_modules -C gfs-kernel/src/gfs -m gfs
155#build_kernel_modules -C gnbd-kernel/src -m gnbd
156%endif
157
158%install
159rm -rf $RPM_BUILD_ROOT
160
161%if %{with userspace}
162%{__make} -C %{name} install \
163 DESTDIR=$RPM_BUILD_ROOT
164
165install -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
167%endif
168
169%if %{with kernel}
170%install_kernel_modules -m gfs-kernel/src/gfs/gfs -d misc
171#install_kernel_modules -m gnbd-kernel/src/gnbd -d misc
172%endif
173
174%clean
175rm -rf $RPM_BUILD_ROOT
176
177%if %{with userspace}
178%files
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*
189%endif
190
191%if %{with kernel}
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*
196%endif
This page took 0.038708 seconds and 5 git commands to generate.