1 |
%define major 0 |
2 |
%define libname %mklibname glusterfs %{major} |
3 |
%define develname %mklibname -d glusterfs |
4 |
|
5 |
# (cg) Temporary hack to make it build |
6 |
%define _disable_ld_no_undefined 1 |
7 |
|
8 |
Summary: GlusterFS network/cluster filesystem |
9 |
Name: glusterfs |
10 |
Version: 3.3.1 |
11 |
Release: %mkrel 2 |
12 |
License: GPLv3+ |
13 |
Group: Networking/Other |
14 |
URL: http://www.gluster.org/docs/index.php/GlusterFS |
15 |
Source0: http://ftp.gluster.com/pub/gluster/glusterfs/3.2/%{version}/%{name}-%{version}.tar.gz |
16 |
Source1: glusterfsd.init |
17 |
Source2: glusterfsd.sysconfig |
18 |
Source3: glusterfsd.logrotate |
19 |
Source4: glusterfs.logrotate |
20 |
Source5: %{name}-tmpfiles.conf |
21 |
Patch1: glusterd-3.3.1-workdir.patch |
22 |
BuildRequires: autoconf |
23 |
BuildRequires: bison |
24 |
BuildRequires: flex |
25 |
BuildRequires: gcc |
26 |
BuildRequires: make |
27 |
BuildRequires: fuse-devel >= 2.6.0 |
28 |
BuildRequires: libibverbs-devel |
29 |
BuildRequires: pkgconfig(libxml-2.0) >= 2.6.19 |
30 |
BuildRequires: readline-devel |
31 |
BuildRequires: libtool |
32 |
BuildRequires: openssl-devel |
33 |
|
34 |
%description |
35 |
GlusterFS is a clustered file-system capable of scaling to several |
36 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
37 |
or TCP/IP interconnect into one large parallel network file |
38 |
system. GlusterFS is one of the most sophisticated file system in |
39 |
terms of features and extensibility. It borrows a powerful concept |
40 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
41 |
is in userspace and easily manageable. |
42 |
|
43 |
Please visit http://www.gluster.org/docs/index.php/GlusterFS for more info. |
44 |
|
45 |
%package -n %{libname} |
46 |
Summary: GlusterFS network/cluster filesystem library |
47 |
Group: System/Libraries |
48 |
Provides: glusterfs-libs, libglusterfs |
49 |
|
50 |
%description -n %{libname} |
51 |
GlusterFS is a clustered file-system capable of scaling to several |
52 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
53 |
or TCP/IP interconnect into one large parallel network file |
54 |
system. GlusterFS is one of the most sophisticated file system in |
55 |
terms of features and extensibility. It borrows a powerful concept |
56 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
57 |
is in userspace and easily manageable. |
58 |
|
59 |
Please visit http://www.gluster.org/docs/index.php/GlusterFS for more info. |
60 |
|
61 |
This package includes the libglusterfs and glusterfs translator modules common |
62 |
to both GlusterFS server and client framework. |
63 |
|
64 |
%package -n %{develname} |
65 |
Summary: Static library and header files for the GlusterFS library |
66 |
Group: Development/C |
67 |
Provides: %{name}-devel = %{version} |
68 |
Requires: %{libname} = %{version} |
69 |
|
70 |
%description -n %{develname} |
71 |
GlusterFS is a clustered file-system capable of scaling to several |
72 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
73 |
or TCP/IP interconnect into one large parallel network file |
74 |
system. GlusterFS is one of the most sophisticated file system in |
75 |
terms of features and extensibility. It borrows a powerful concept |
76 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
77 |
is in userspace and easily manageable. |
78 |
|
79 |
Please visit http://www.gluster.org/docs/index.php/GlusterFS for more info. |
80 |
|
81 |
This package contains the static GlusterFS library and its header files. |
82 |
|
83 |
%package common |
84 |
Summary: The common files needed by GlusterFS for client and server |
85 |
Group: Networking/Other |
86 |
Requires: fuse >= 2.6.0 |
87 |
Requires: libglusterfs |
88 |
|
89 |
%description common |
90 |
GlusterFS is a clustered file-system capable of scaling to several |
91 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
92 |
or TCP/IP interconnect into one large parallel network file |
93 |
system. GlusterFS is one of the most sophisticated file system in |
94 |
terms of features and extensibility. It borrows a powerful concept |
95 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
96 |
is in userspace and easily manageable. |
97 |
|
98 |
Please visit http://www.gluster.org/docs/index.php/GlusterFS for more info. |
99 |
|
100 |
This package includes the glusterfs binaries and documentation. These are needed by both glusterfs |
101 |
client and server. |
102 |
|
103 |
%package client |
104 |
Summary: GlusterFS client |
105 |
Group: Networking/Other |
106 |
Requires: %{name}-common = %{version} |
107 |
Requires(post): rpm-helper |
108 |
|
109 |
%description client |
110 |
GlusterFS is a clustered file-system capable of scaling to several |
111 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
112 |
or TCP/IP interconnect into one large parallel network file |
113 |
system. GlusterFS is one of the most sophisticated file system in |
114 |
terms of features and extensibility. It borrows a powerful concept |
115 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
116 |
is in userspace and easily manageable. |
117 |
|
118 |
This package is the client needed to mount a GlusterFS fs. |
119 |
|
120 |
%package server |
121 |
Summary: GlusterFS server |
122 |
Group: Networking/Other |
123 |
Requires: %{name}-common = %{version} |
124 |
Requires: %{name}-client = %{version} |
125 |
Requires(post): systemd >= %{systemd_required_version} |
126 |
Requires(post): rpm-helper |
127 |
Requires(preun): rpm-helper |
128 |
Requires(post): sed |
129 |
|
130 |
%description server |
131 |
GlusterFS is a clustered file-system capable of scaling to several |
132 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
133 |
or TCP/IP interconnect into one large parallel network file |
134 |
system. GlusterFS is one of the most sophisticated file system in |
135 |
terms of features and extensibility. It borrows a powerful concept |
136 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
137 |
is in userspace and easily manageable. |
138 |
|
139 |
This package is the server. |
140 |
|
141 |
%package geo-replication |
142 |
Summary: GlusterFS Geo-replication |
143 |
Group: Networking/Other |
144 |
Requires: %{name}-common = %{version} |
145 |
Requires: %{name}-client = %{version} |
146 |
|
147 |
%description geo-replication |
148 |
GlusterFS is a clustered file-system capable of scaling to several |
149 |
peta-bytes. It aggregates various storage bricks over Infiniband RDMA |
150 |
or TCP/IP interconnect into one large parallel network file |
151 |
system. GlusterFS is one of the most sophisticated file system in |
152 |
terms of features and extensibility. It borrows a powerful concept |
153 |
called Translators from GNU Hurd kernel. Much of the code in GlusterFS |
154 |
is in userspace and easily manageable. |
155 |
|
156 |
This package provides support to geo-replication. |
157 |
|
158 |
%prep |
159 |
%setup -q %{name}-%{version} |
160 |
%patch1 -p1 |
161 |
cp %{SOURCE1} glusterfsd.init |
162 |
cp %{SOURCE2} glusterfsd.sysconfig |
163 |
cp %{SOURCE3} glusterfsd.logrotate |
164 |
cp %{SOURCE4} glusterfs.logrotate |
165 |
|
166 |
%build |
167 |
%configure2_5x --disable-static |
168 |
# Remove rpath |
169 |
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
170 |
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
171 |
%make |
172 |
|
173 |
%install |
174 |
%{__rm} -rf %{buildroot} |
175 |
%makeinstall_std |
176 |
# (cg) No need to put the mount command in / |
177 |
mv %{buildroot}/sbin/* %{buildroot}%{_sbindir} |
178 |
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs |
179 |
%{__mkdir_p} %{buildroot}/var/log/glusterfs |
180 |
%{__install} -p -m 0644 libglusterfs/src/*.h \ |
181 |
%{buildroot}%{_includedir}/glusterfs/ |
182 |
|
183 |
# Remove unwanted files from all the shared libraries |
184 |
find %{buildroot} -name '*.la' | xargs rm -f |
185 |
|
186 |
install -d %{buildroot}%{_initrddir} |
187 |
install -d %{buildroot}%{_sysconfdir}/sysconfig |
188 |
install -d %{buildroot}%{_sysconfdir}/logrotate.d |
189 |
|
190 |
install -m0755 glusterfsd.init %{buildroot}%{_initrddir}/glusterfsd |
191 |
install -m0644 glusterfsd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/glusterfsd |
192 |
install -m0644 glusterfsd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd |
193 |
install -m0644 glusterfs.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs |
194 |
install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf |
195 |
|
196 |
touch %{buildroot}/var/log/glusterfs/glusterfs.log |
197 |
touch %{buildroot}/var/log/glusterfs/glusterfsd.log |
198 |
|
199 |
# remove default startup script |
200 |
%{__rm} %{buildroot}/etc/init.d/glusterd |
201 |
|
202 |
%post client |
203 |
%create_ghostfile /var/log/glusterfs/glusterfs.log root root 0644 |
204 |
|
205 |
%post server |
206 |
%create_ghostfile /var/log/glusterfs/glusterfsd.log root root 0644 |
207 |
%_tmpfilescreate %{name} |
208 |
%_post_service glusterfsd |
209 |
if [ -e /etc/glusterfs/glusterfs-server.vol ]; then |
210 |
echo "Updating /etc/sysconfig/glusterfsd to point to old /etc/glusterfs/glusterfs-server.vol file" |
211 |
sed -i 's|GLUSTERFSD_CONFIG_FILE="/etc/glusterfs/glusterfsd.vol"|GLUSTERFSD_CONFIG_FILE="/etc/glusterfs/glusterfs-server.vol"|g' /etc/sysconfig/glusterfsd |
212 |
# mv -n /etc/glusterfs/glusterfs-server.vol /etc/glusterfs/glusterfsd.vol |
213 |
fi |
214 |
|
215 |
%preun server |
216 |
%_preun_service glusterfsd |
217 |
|
218 |
%clean |
219 |
rm -rf %{buildroot} |
220 |
|
221 |
%files -n %{libname} |
222 |
%defattr(-,root,root) |
223 |
# %doc README AUTHORS NEWS |
224 |
%{_libdir}/*.so.%{major}* |
225 |
%{_libdir}/glusterfs |
226 |
|
227 |
%files -n %{develname} |
228 |
%defattr(-,root,root,-) |
229 |
%{_includedir}/glusterfs |
230 |
%{_libdir}/*.so |
231 |
|
232 |
%files common |
233 |
%defattr(-,root,root) |
234 |
# %doc AUTHORS ChangeLog COPYING INSTALL NEWS README |
235 |
# %doc installed_docs/* |
236 |
%docdir %{_docdir}/glusterfs |
237 |
%doc %{_docdir}/glusterfs/* |
238 |
%{_sysconfdir}/glusterfs/* |
239 |
%{_mandir}/man8/gluster* |
240 |
%dir /var/log/glusterfs |
241 |
%{_sbindir}/glusterfs |
242 |
%{_sbindir}/glusterfsd |
243 |
%{_sbindir}/gluster |
244 |
%{_sbindir}/glusterd |
245 |
|
246 |
%files client |
247 |
%defattr(-,root,root) |
248 |
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/glusterfs |
249 |
%{_sbindir}/mount.glusterfs |
250 |
%attr(0644,root,root) %ghost %config(noreplace) /var/log/glusterfs/glusterfs.log |
251 |
|
252 |
%files server |
253 |
%defattr(-,root,root) |
254 |
%attr(0755,root,root) %{_initrddir}/glusterfsd |
255 |
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/glusterfsd |
256 |
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/glusterfsd |
257 |
%attr(0644,root,root) %ghost %config(noreplace) /var/log/glusterfs/glusterfsd.log |
258 |
%{_tmpfilesdir}/%{name}.conf |
259 |
|
260 |
%files geo-replication |
261 |
%defattr(-,root,root) |
262 |
%{_libexecdir}/glusterfs/gsyncd |
263 |
%{_libexecdir}/glusterfs/python/syncdaemon/* |