]> git.pld-linux.org Git - packages/lizardfs.git/blob - lizardfs.spec
4f173219da2885d4e0a8bd38d71ebe33dc1ff204
[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:        2
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 %post master
117 %systemd_post %{name}-master.service
118
119 %preun master
120 %systemd_preun %{name}-master.service
121
122 %postun master
123 %systemd_reload
124
125 %post chunkserver
126 %systemd_post %{name}-chunkserver.service
127
128 %preun chunkserver
129 %systemd_preun %{name}-chunkserver.service
130
131 %postun chunkserver
132 %systemd_reload
133
134 %postun
135 if [ "$1" = "0" ]; then
136         %userremove mfs
137         %groupremove mfs
138 fi
139
140 %files
141 %defattr(644,root,root,755)
142 %doc doc COPYING README UPGRADE NEWS INSTALL
143 %dir %{_sysconfdir}/mfs
144 %dir %attr(750,root,root) /var/lib/%{name}
145 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/globaliolimits.cfg.dist
146 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/iolimits.cfg.dist
147 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsexports.cfg.dist
148 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsgoals.cfg.dist
149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmount.cfg.dist
150 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfstopology.cfg.dist
151 %attr(755,root,root) %{_bindir}/lizardfs-admin
152 %attr(755,root,root) %{_bindir}/lizardfs-probe
153 %attr(755,root,root) %{_bindir}/mfsappendchunks
154 %attr(755,root,root) %{_bindir}/mfscheckfile
155 %attr(755,root,root) %{_bindir}/mfsdeleattr
156 %attr(755,root,root) %{_bindir}/mfsdirinfo
157 %attr(755,root,root) %{_bindir}/mfsfileinfo
158 %attr(755,root,root) %{_bindir}/mfsfilerepair
159 %attr(755,root,root) %{_bindir}/mfsgeteattr
160 %attr(755,root,root) %{_bindir}/mfsgetgoal
161 %attr(755,root,root) %{_bindir}/mfsgettrashtime
162 %attr(755,root,root) %{_bindir}/mfsmakesnapshot
163 %attr(755,root,root) %{_bindir}/mfsmount
164 %attr(755,root,root) %{_bindir}/mfsrepquota
165 %attr(755,root,root) %{_bindir}/mfsrgetgoal
166 %attr(755,root,root) %{_bindir}/mfsrgettrashtime
167 %attr(755,root,root) %{_bindir}/mfsrsetgoal
168 %attr(755,root,root) %{_bindir}/mfsrsettrashtime
169 %attr(755,root,root) %{_bindir}/mfsseteattr
170 %attr(755,root,root) %{_bindir}/mfssetgoal
171 %attr(755,root,root) %{_bindir}/mfssetquota
172 %attr(755,root,root) %{_bindir}/mfssettrashtime
173 %attr(755,root,root) %{_bindir}/mfssnapshot
174 %attr(755,root,root) %{_bindir}/mfstools
175 %attr(755,root,root) %{_sbindir}/mfsmetadump
176 %attr(755,root,root) %{_sbindir}/mfsmetarestore
177 %attr(755,root,root) %{_sbindir}/mfsrestoremaster
178 %{_mandir}/man1/mfs*.1*
179 %{_mandir}/man5/globaliolimits.cfg.5*
180 %{_mandir}/man5/iolimits.cfg.5*
181 %{_mandir}/man5/mfs*.cfg.5*
182 %{_mandir}/man7/lizardfs.7*
183 %{_mandir}/man7/mfs.7
184 %{_mandir}/man7/moosefs.7
185 %{_mandir}/man8/lizardfs-admin.8*
186 %{_mandir}/man8/lizardfs-cgiserver.8*
187 %{_mandir}/man8/lizardfs-probe.8
188 %{_mandir}/man8/mfs*.8*
189
190 %files master
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_sbindir}/mfsmaster
193 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmaster.cfg.dist
194 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/metadata.mfs.empty
195 %dir %attr(750,mfs,mfs) /var/lib/%{name}/master
196 %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/master/metadata.mfs
197 %{systemdunitdir}/%{name}-master.service
198
199 %files chunkserver
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_sbindir}/mfschunkserver
202 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfschunkserver.cfg.dist
203 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfshdd.cfg.dist
204 %dir %attr(750,mfs,mfs) /var/lib/%{name}/chunkserver
205 %{systemdunitdir}/%{name}-chunkserver.service
206
207 %files metalogger
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_sbindir}/mfsmetalogger
210 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmetalogger.cfg.dist
211 # %dir %attr(750,mfs,mfs) /var/lib/%{name}/metalogger
212
213 %files cgiserver
214 %defattr(644,root,root,755)
215 %attr(755,root,root) %{_sbindir}/lizardfs-cgiserver
216 %attr(755,root,root) %{_sbindir}/mfscgiserv
217 %{_datadir}/mfscgi/
This page took 0.084053 seconds and 3 git commands to generate.