]>
Commit | Line | Data |
---|---|---|
69fdf778 | 1 | # TODO: |
af1a7dda MK |
2 | # - Fix x32 asm code inside crcutil-1.0 |
3 | # - Consider using external libcrcutil package | |
db568ec4 | 4 | # - systemd service files to metalogger, cgiserver packages |
18cf1acb | 5 | # - Fix cgiserver |
db568ec4 MK |
6 | |
7 | %bcond_without systemd_service | |
d6cda542 | 8 | |
19bf9ddd MK |
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 | |
85466b53 | 13 | Release: 2 |
19bf9ddd MK |
14 | License: GPL v3 |
15 | Group: Applications | |
69fdf778 | 16 | Source0: https://github.com/lizardfs/lizardfs/archive/v.%{version}.tar.gz |
19bf9ddd | 17 | # Source0-md5: 71766d18a5066506e54d952ab6056bd3 |
db568ec4 MK |
18 | %if %{with systemd_service} |
19 | Source1: %{name}-master.service | |
20 | Source2: %{name}-chunkserver.service | |
21 | %endif | |
69fdf778 | 22 | Patch0: %{name}-cmake_fix.patch |
85466b53 | 23 | Patch1: x32.patch |
19bf9ddd | 24 | URL: https://github.com/lizardfs/lizardfs |
7b264090 | 25 | BuildRequires: /usr/bin/a2x |
69fdf778 MK |
26 | BuildRequires: asciidoc |
27 | BuildRequires: boost-devel | |
28 | BuildRequires: cmake >= 3.4.0 | |
29 | BuildRequires: docbook-dtd45-xml | |
30 | BuildRequires: libfuse-devel | |
31 | BuildRequires: pkgconfig | |
7b264090 | 32 | BuildRequires: rpmbuild(macros) >= 1.202 |
69fdf778 | 33 | BuildRequires: zlib-devel |
db568ec4 MK |
34 | %if %{with systemd_service} |
35 | BuildRequires: rpmbuild(macros) >= 1.647 | |
36 | Requires(post,preun,postun): systemd-units >= 38 | |
37 | Requires: systemd-units >= 0.38 | |
38 | %endif | |
7b264090 ER |
39 | Requires(postun): /usr/sbin/groupdel |
40 | Requires(postun): /usr/sbin/userdel | |
41 | Requires(pre): /bin/id | |
42 | Requires(pre): /usr/bin/getgid | |
43 | Requires(pre): /usr/sbin/groupadd | |
44 | Requires(pre): /usr/sbin/useradd | |
45 | Provides: group(mfs) | |
46 | Provides: user(mfs) | |
19bf9ddd MK |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %description | |
69fdf778 MK |
50 | LizardFS is a highly reliable, scalable and efficient distributed file |
51 | system. It spreads data over a number of physical servers, making it | |
52 | visible to an end user as a single file system. | |
19bf9ddd MK |
53 | |
54 | %description -l pl.UTF-8 | |
69fdf778 MK |
55 | LizardFS is jest niezawodnym, skalowalnym i efektywnym rozproszonym |
56 | systemem plików. Rozkłada dane na rózne fizyczne serwery, dająć | |
57 | użytkownikowi końcowemu widok pojedynczego systemu plików. | |
19bf9ddd | 58 | |
d6cda542 | 59 | %package master |
69fdf778 MK |
60 | Summary: Master/shadow metadata server |
61 | Group: Applications | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | ||
d6cda542 MK |
64 | %description master |
65 | Master/shadow metadata server | |
66 | ||
db568ec4 MK |
67 | %if %{with systemd_service} |
68 | %post master | |
69 | %systemd_post %{name}-master.service | |
70 | ||
71 | %preun master | |
72 | %systemd_preun %{name}-master.service | |
73 | ||
74 | %postun master | |
75 | %systemd_reload | |
76 | %endif | |
77 | ||
d6cda542 | 78 | %package chunkserver |
69fdf778 MK |
79 | Summary: Chunk server |
80 | Group: Applications | |
81 | Requires: %{name} = %{version}-%{release} | |
82 | ||
d6cda542 MK |
83 | %description chunkserver |
84 | Chunk server | |
85 | ||
db568ec4 MK |
86 | %if %{with systemd_service} |
87 | %post chunkserver | |
88 | %systemd_post %{name}-chunkserver.service | |
89 | ||
90 | %preun chunkserver | |
91 | %systemd_preun %{name}-chunkserver.service | |
92 | ||
93 | %postun chunkserver | |
94 | %systemd_reload | |
95 | %endif | |
96 | ||
d6cda542 | 97 | %package metalogger |
69fdf778 MK |
98 | Summary: Metalogger |
99 | Group: Applications | |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
d6cda542 MK |
102 | %description metalogger |
103 | Metalogger | |
104 | ||
d6cda542 | 105 | %package cgiserver |
69fdf778 MK |
106 | Summary: CGI server |
107 | Group: Applications | |
108 | Requires: %{name} = %{version}-%{release} | |
109 | ||
d6cda542 MK |
110 | %description cgiserver |
111 | CGI server | |
112 | ||
19bf9ddd | 113 | %prep |
69fdf778 | 114 | %setup -q -n %{name}-v.%{version} |
19bf9ddd | 115 | %patch0 -p1 |
85466b53 | 116 | %patch1 -p1 |
19bf9ddd MK |
117 | |
118 | %build | |
119 | install -d build | |
120 | cd build | |
85466b53 | 121 | %cmake ../ \ |
18cf1acb MK |
122 | -DBUILD_SHARED_LIBS=FALSE \ |
123 | -DCMAKE_INSTALL_PREFIX:PATH=/ \ | |
124 | -DENABLE_DEBIAN_PATHS=TRUE | |
19bf9ddd MK |
125 | %{__make} |
126 | ||
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | cd build | |
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
69fdf778 | 132 | |
d6cda542 | 133 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
d6cda542 | 134 | install -d $RPM_BUILD_ROOT/var/lib/%{name} |
152dce4a | 135 | cp $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT%{_sysconfdir}/mfs/ |
69fdf778 MK |
136 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/master |
137 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/chunkserver | |
152dce4a | 138 | mv $RPM_BUILD_ROOT/var/lib/mfs/metadata.mfs.empty $RPM_BUILD_ROOT/var/lib/%{name}/master/metadata.mfs |
19bf9ddd | 139 | |
db568ec4 MK |
140 | %if %{with systemd_service} |
141 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
18cf1acb MK |
142 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-master.service |
143 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-chunkserver.service | |
db568ec4 MK |
144 | %endif |
145 | ||
19bf9ddd MK |
146 | %clean |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
d6cda542 MK |
149 | %postun |
150 | if [ "$1" = "0" ]; then | |
7b264090 ER |
151 | %userremove mfs |
152 | %groupremove mfs | |
d6cda542 MK |
153 | fi |
154 | ||
19bf9ddd MK |
155 | %files |
156 | %defattr(644,root,root,755) | |
157 | %doc doc COPYING README UPGRADE NEWS INSTALL | |
69fdf778 MK |
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 | |
d6cda542 MK |
166 | %attr(755,root,root) %{_bindir}/lizardfs-admin |
167 | %attr(755,root,root) %{_bindir}/lizardfs-probe | |
d6cda542 MK |
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 | |
d6cda542 MK |
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 | |
d6cda542 MK |
190 | %attr(755,root,root) %{_sbindir}/mfsmetadump |
191 | %attr(755,root,root) %{_sbindir}/mfsmetarestore | |
192 | %attr(755,root,root) %{_sbindir}/mfsrestoremaster | |
093a7d1a ER |
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* | |
d6cda542 MK |
204 | |
205 | %files master | |
206 | %defattr(644,root,root,755) | |
207 | %attr(755,root,root) %{_sbindir}/mfsmaster | |
69fdf778 MK |
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 | |
db568ec4 MK |
212 | %if %{with systemd_service} |
213 | %{systemdunitdir}/%{name}-master.service | |
214 | %endif | |
215 | ||
d6cda542 MK |
216 | %files chunkserver |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_sbindir}/mfschunkserver | |
69fdf778 MK |
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 | |
db568ec4 MK |
222 | %if %{with systemd_service} |
223 | %{systemdunitdir}/%{name}-chunkserver.service | |
224 | %endif | |
d6cda542 MK |
225 | |
226 | %files metalogger | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_sbindir}/mfsmetalogger | |
69fdf778 MK |
229 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmetalogger.cfg.dist |
230 | # %dir %attr(750,mfs,mfs) /var/lib/%{name}/metalogger | |
d6cda542 MK |
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 | |
69fdf778 | 236 | %{_datadir}/mfscgi/ |