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