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