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