1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
# if you make changes, the it is advised to increment this number, and provide
# a descriptive suffix to identify who owns or what the change represents
# e.g. release_version 2.MSW
%define release 1
# if you wish to compile an rpm without ibverbs support, compile like this...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ibverbs
%{?_without_ibverbs:%define _without_ibverbs --disable-ibverbs}
# if you wish to compile an rpm without building the client RPMs...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without client
%{?_without_client:%define _without_client --disable-fuse-client}
# if you wish to compile an rpm without BDB translator...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without bdb
%{?_without_bdb:%define _without_bdb --disable-bdb}
# if you wish to compile an rpm without libglusterfsclient...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without libglfsclient
%{?_without_libglfsclient:%define _without_libglfsclient --disable-libglusterclient}
# if you wish to compile an rpm without mod_glusterfs support...
# rpmbuild -ta @PACKAGE_NAME-@PACKAGE_VERSION@.tar.gz --without modglfs
%{?_without_modglfs:%define _without_modglfs --disable-mod_glusterfs}
# if you wish to compile an rpm with apache at nonstandard location
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without apxs_default --define 'apxs_path /usr/local/apache/bin'
%{!?apxs_path: %define apxs_path %{nil}}
%{?_without_apxs_default:%define _without_apxs_default --with-apxs=%{?apxs_path:%apxs_path}}
# if you wish to compile an rpm with apache binaries at nonstandard path
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without apache_auto -define 'apxs_bin_path /usr/local/apache/bin/apxs'
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without apache_auto -define 'apache_bin_path /usr/local/apache/bin/apache2'
%define with_apache_auto %{?_without_apache_auto:0}%{?!_without_apache_auto:1}
%{!?apxs_bin_path: %define apxs_bin_path %{nil}}
%{!?apache_bin_path: %define apache_bin_path %{nil}}
Summary: Cluster File System
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: %{release}
License: GPLv3+
Group: System Environment/Base
Vendor: Z RESEARCH Inc
Packager: @PACKAGE_BUGREPORT@
URL: http://www.gluster.org/docs/index.php/GlusterFS
Source0: ftp://ftp.gluster.com/pub/gluster/glusterfs/2.0/@PACKAGE_VERSION@/@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
%{!?_without_ibverbs:BuildRequires: libibverbs-devel}
%{!?_without_bdb:BuildRequires: db4-devel}
%{!?_without_client:BuildRequires: fuse-devel}
%if 0%{!?_without_modglfs:1}
%if 0%{!?_without_apxs_default:1}
BuildRequires: httpd-devel >= 2.2
%endif
%endif
BuildRequires: bison flex
BuildRequires: gcc make
%description
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
%package common
Summary: GlusterFS common files for both the client and the server
Group: System Environment/Libraries
%description common
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
This package includes the glusterfs binary, libglusterfs and glusterfs
translator modules common to both GlusterFS server and client framework.
%package client
Summary: GlusterFS Client
Group: Applications/File
Requires: fuse
Requires: %{name}-common = %{version}-%{release}
%description client
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
This package provides the FUSE based GlusterFS client.
%package server
Summary: GlusterFS Server
Group: System Environment/Daemons
Requires: %{name}-common = %{version}-%{release}
%description server
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
This package provides the glusterfs server daemon.
%package devel
Summary: GlusterFS Development Libraries
Group: Development/Libraries
Requires: %{name}-common = %{version}-%{release}
%description devel
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
This package provides the development libraries.
%prep
%setup -q -n %{name}-%{version}
%build
%if 0%{!?_without_modglfs:1}
%if "%{with_apache_auto}" == "0"
%define apxs_bin_options --with-apxspath=%{?apxs_bin_path:%apxs_bin_path}
%define apache_bin_options --with-apachepath=%{?apache_bin_path:%apache_bin_path}
%endif
%endif
%configure %{?_without_ibverbs} %{?_without_bdb} %{?_without_libglfsclient} %{?_without_client} %{?_without_modglfs} %{?_without_apxs_default} %{?apxs_bin_options:%apxs_bin_options} %{?apache_bin_options:%apache_bin_options}
# Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs
%{__mkdir_p} %{buildroot}/var/log/glusterfs
%{__install} -p -m 0644 libglusterfs/src/*.h \
%{buildroot}%{_includedir}/glusterfs/
# Remove unwanted files from all the shared libraries
find %{buildroot}%{_libdir}/glusterfs -name '*.la' | xargs rm -f
%clean
%{__rm} -rf %{buildroot}
%post common
/sbin/ldconfig -n %{_libdir}
%if 0%{!?_without_modglfs:1}
%if 0%{!?_without_apxs_default:1}
%{_sbindir}/apxs -i -a -n glusterfs %{_libdir}/glusterfs/%{version}/apache/2.2/mod_glusterfs.so
%else
%{apxs_path}/apxs -i -a -n glusterfs %{_libdir}/glusterfs/%{version}/apache/2.2/mod_glusterfs.so
%endif
%endif
%postun common
/sbin/ldconfig -n %{_libdir}
%post server
/sbin/chkconfig --add glusterfsd
%preun server
if [ $1 -eq 0 ]; then
/sbin/service glusterfsd stop &>/dev/null || :
/sbin/chkconfig --del glusterfsd
fi
%postun
if [ $1 -ge 1 ]; then
/sbin/service glusterfsd condrestart &>/dev/null || :
fi
%files common
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
%doc /usr/share/doc/glusterfs
%if 0%{!?_without_client:1}
%exclude %{_libdir}/glusterfs/%{version}/xlator/mount
%endif
%{_libdir}/glusterfs
%{_libdir}/*.so.*
%{_sbindir}/glusterfs*
%{_mandir}/man8/glusterfs.8*
%dir /var/log/glusterfs
%if 0%{!?_without_client:1}
%files client
%defattr(-,root,root)
/sbin/mount.glusterfs
%{_libdir}/glusterfs/%{version}/xlator/mount
%endif
%files server
%defattr(-,root,root)
%config %{_sysconfdir}/glusterfs
%{_sysconfdir}/init.d/glusterfsd
%files devel
%defattr(-,root,root,-)
%{_includedir}/glusterfs
%{_includedir}/libglusterfsclient.h
%exclude %{_includedir}/glusterfs/y.tab.h
%{_libdir}/*.a
%exclude %{_libdir}/*.la
%{_libdir}/*.so
%changelog
* Thu Apr 16 2009 Harshavardhana <harsha@gluster.com> - 2.0
- Galore of updates including new packages added common,
client,server splitting the original package. rpmbuild
fully restructured to adhere to Fedora rpm standards.
Older changelog removed as there were warnings when
tried with 'rpmlint'.
|