]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - Fix x32 asm code inside crcutil-1.0 | |
3 | # - Consider using external libcrcutil package | |
4 | # - systemd service files to metalogger, cgiserver packages | |
5 | # - Fix cgiserver | |
6 | ||
7 | %bcond_without systemd_service | |
8 | ||
9 | Summary: Open Source Distributed File System | |
10 | Summary(pl.UTF-8): Rozporoszony system plików Open Source | |
11 | Name: lizardfs | |
12 | Version: 3.9.4 | |
13 | Release: 1 | |
14 | License: GPL v3 | |
15 | Group: Applications | |
16 | Source0: https://github.com/lizardfs/lizardfs/archive/v.%{version}.tar.gz | |
17 | # Source0-md5: 71766d18a5066506e54d952ab6056bd3 | |
18 | %if %{with systemd_service} | |
19 | Source1: %{name}-master.service | |
20 | Source2: %{name}-chunkserver.service | |
21 | %endif | |
22 | Patch0: %{name}-cmake_fix.patch | |
23 | URL: https://github.com/lizardfs/lizardfs | |
24 | BuildRequires: /usr/bin/a2x | |
25 | BuildRequires: asciidoc | |
26 | BuildRequires: boost-devel | |
27 | BuildRequires: cmake >= 3.4.0 | |
28 | BuildRequires: docbook-dtd45-xml | |
29 | BuildRequires: libfuse-devel | |
30 | BuildRequires: pkgconfig | |
31 | BuildRequires: rpmbuild(macros) >= 1.202 | |
32 | BuildRequires: zlib-devel | |
33 | %if %{with systemd_service} | |
34 | BuildRequires: rpmbuild(macros) >= 1.647 | |
35 | Requires(post,preun,postun): systemd-units >= 38 | |
36 | Requires: systemd-units >= 0.38 | |
37 | %endif | |
38 | ExclusiveArch: %{ix86} %{x8664} | |
39 | # Requires: | |
40 | Requires(postun): /usr/sbin/groupdel | |
41 | Requires(postun): /usr/sbin/userdel | |
42 | Requires(pre): /bin/id | |
43 | Requires(pre): /usr/bin/getgid | |
44 | Requires(pre): /usr/sbin/groupadd | |
45 | Requires(pre): /usr/sbin/useradd | |
46 | Provides: group(mfs) | |
47 | Provides: user(mfs) | |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | LizardFS is a highly reliable, scalable and efficient distributed file | |
52 | system. It spreads data over a number of physical servers, making it | |
53 | visible to an end user as a single file system. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | LizardFS is jest niezawodnym, skalowalnym i efektywnym rozproszonym | |
57 | systemem plików. Rozkłada dane na rózne fizyczne serwery, dająć | |
58 | użytkownikowi końcowemu widok pojedynczego systemu plików. | |
59 | ||
60 | %package master | |
61 | Summary: Master/shadow metadata server | |
62 | Group: Applications | |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description master | |
66 | Master/shadow metadata server | |
67 | ||
68 | %if %{with systemd_service} | |
69 | %post master | |
70 | %systemd_post %{name}-master.service | |
71 | ||
72 | %preun master | |
73 | %systemd_preun %{name}-master.service | |
74 | ||
75 | %postun master | |
76 | %systemd_reload | |
77 | %endif | |
78 | ||
79 | %package chunkserver | |
80 | Summary: Chunk server | |
81 | Group: Applications | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | ||
84 | %description chunkserver | |
85 | Chunk server | |
86 | ||
87 | %if %{with systemd_service} | |
88 | %post chunkserver | |
89 | %systemd_post %{name}-chunkserver.service | |
90 | ||
91 | %preun chunkserver | |
92 | %systemd_preun %{name}-chunkserver.service | |
93 | ||
94 | %postun chunkserver | |
95 | %systemd_reload | |
96 | %endif | |
97 | ||
98 | %package metalogger | |
99 | Summary: Metalogger | |
100 | Group: Applications | |
101 | Requires: %{name} = %{version}-%{release} | |
102 | ||
103 | %description metalogger | |
104 | Metalogger | |
105 | ||
106 | %package cgiserver | |
107 | Summary: CGI server | |
108 | Group: Applications | |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description cgiserver | |
112 | CGI server | |
113 | ||
114 | %prep | |
115 | %setup -q -n %{name}-v.%{version} | |
116 | %patch0 -p1 | |
117 | ||
118 | %build | |
119 | install -d build | |
120 | cd build | |
121 | %cmake ../ \ | |
122 | -DBUILD_SHARED_LIBS=FALSE \ | |
123 | -DCMAKE_INSTALL_PREFIX:PATH=/ \ | |
124 | -DENABLE_DEBIAN_PATHS=TRUE | |
125 | %{__make} | |
126 | ||
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | cd build | |
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
134 | install -d $RPM_BUILD_ROOT/var/lib/%{name} | |
135 | cp $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT%{_sysconfdir}/mfs/ | |
136 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/master | |
137 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/chunkserver | |
138 | mv $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT/var/lib/%{name}/master/metadata.mfs | |
139 | ||
140 | %if %{with systemd_service} | |
141 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
142 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-master.service | |
143 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-chunkserver.service | |
144 | %endif | |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %postun | |
150 | if [ "$1" = "0" ]; then | |
151 | %userremove mfs | |
152 | %groupremove mfs | |
153 | fi | |
154 | ||
155 | %files | |
156 | %defattr(644,root,root,755) | |
157 | %doc doc COPYING README UPGRADE NEWS INSTALL | |
158 | %dir %{_sysconfdir}/mfs | |
159 | %dir %attr(750,root,root) /var/lib/%{name} | |
160 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/globaliolimits.cfg.dist | |
161 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/iolimits.cfg.dist | |
162 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsexports.cfg.dist | |
163 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsgoals.cfg.dist | |
164 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmount.cfg.dist | |
165 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfstopology.cfg.dist | |
166 | %attr(755,root,root) %{_bindir}/lizardfs-admin | |
167 | %attr(755,root,root) %{_bindir}/lizardfs-probe | |
168 | %attr(755,root,root) %{_bindir}/mfsappendchunks | |
169 | %attr(755,root,root) %{_bindir}/mfscheckfile | |
170 | %attr(755,root,root) %{_bindir}/mfsdeleattr | |
171 | %attr(755,root,root) %{_bindir}/mfsdirinfo | |
172 | %attr(755,root,root) %{_bindir}/mfsfileinfo | |
173 | %attr(755,root,root) %{_bindir}/mfsfilerepair | |
174 | %attr(755,root,root) %{_bindir}/mfsgeteattr | |
175 | %attr(755,root,root) %{_bindir}/mfsgetgoal | |
176 | %attr(755,root,root) %{_bindir}/mfsgettrashtime | |
177 | %attr(755,root,root) %{_bindir}/mfsmakesnapshot | |
178 | %attr(755,root,root) %{_bindir}/mfsmount | |
179 | %attr(755,root,root) %{_bindir}/mfsrepquota | |
180 | %attr(755,root,root) %{_bindir}/mfsrgetgoal | |
181 | %attr(755,root,root) %{_bindir}/mfsrgettrashtime | |
182 | %attr(755,root,root) %{_bindir}/mfsrsetgoal | |
183 | %attr(755,root,root) %{_bindir}/mfsrsettrashtime | |
184 | %attr(755,root,root) %{_bindir}/mfsseteattr | |
185 | %attr(755,root,root) %{_bindir}/mfssetgoal | |
186 | %attr(755,root,root) %{_bindir}/mfssetquota | |
187 | %attr(755,root,root) %{_bindir}/mfssettrashtime | |
188 | %attr(755,root,root) %{_bindir}/mfssnapshot | |
189 | %attr(755,root,root) %{_bindir}/mfstools | |
190 | %attr(755,root,root) %{_sbindir}/mfsmetadump | |
191 | %attr(755,root,root) %{_sbindir}/mfsmetarestore | |
192 | %attr(755,root,root) %{_sbindir}/mfsrestoremaster | |
193 | %{_mandir}/man1/mfs*.1* | |
194 | %{_mandir}/man5/globaliolimits.cfg.5* | |
195 | %{_mandir}/man5/iolimits.cfg.5* | |
196 | %{_mandir}/man5/mfs*.cfg.5* | |
197 | %{_mandir}/man7/lizardfs.7* | |
198 | %{_mandir}/man7/mfs.7 | |
199 | %{_mandir}/man7/moosefs.7 | |
200 | %{_mandir}/man8/lizardfs-admin.8* | |
201 | %{_mandir}/man8/lizardfs-cgiserver.8* | |
202 | %{_mandir}/man8/lizardfs-probe.8 | |
203 | %{_mandir}/man8/mfs*.8* | |
204 | ||
205 | %files master | |
206 | %defattr(644,root,root,755) | |
207 | %attr(755,root,root) %{_sbindir}/mfsmaster | |
208 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmaster.cfg.dist | |
209 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/metadata.mfs.empty | |
210 | %dir %attr(750,mfs,mfs) /var/lib/%{name}/master | |
211 | %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/master/metadata.mfs | |
212 | %if %{with systemd_service} | |
213 | %{systemdunitdir}/%{name}-master.service | |
214 | %endif | |
215 | ||
216 | %files chunkserver | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_sbindir}/mfschunkserver | |
219 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfschunkserver.cfg.dist | |
220 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfshdd.cfg.dist | |
221 | %dir %attr(750,mfs,mfs) /var/lib/%{name}/chunkserver | |
222 | %if %{with systemd_service} | |
223 | %{systemdunitdir}/%{name}-chunkserver.service | |
224 | %endif | |
225 | ||
226 | %files metalogger | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_sbindir}/mfsmetalogger | |
229 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmetalogger.cfg.dist | |
230 | # %dir %attr(750,mfs,mfs) /var/lib/%{name}/metalogger | |
231 | ||
232 | %files cgiserver | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_sbindir}/lizardfs-cgiserver | |
235 | %attr(755,root,root) %{_sbindir}/mfscgiserv | |
236 | %{_datadir}/mfscgi/ |