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