parent
e41bee72a5
commit
46479e2456
@ -1,15 +1,28 @@ |
||||
#!/bin/bash |
||||
# Install/get required packages on CentOS 7 |
||||
# Install/get required packages on CentOS 7 and 8 |
||||
|
||||
set -e |
||||
|
||||
DIST=`rpm --eval '%dist'` |
||||
rm -f /etc/yum.repos.d/CentOS-Media.repo |
||||
yum -y --enablerepo=extras install centos-release-scl epel-release yum-utils rpm-build qemu fio |
||||
yum -y --enablerepo='*' install devtoolset-9-gcc-c++ devtoolset-9-libatomic-devel gperftools-devel |
||||
yumdownloader --source qemu |
||||
yumdownloader --source fio |
||||
rpm --nomd5 -i qemu*.src.rpm |
||||
rpm --nomd5 -i fio*.src.rpm |
||||
cd ~/rpmbuild/SPECS |
||||
yum-builddep -y --enablerepo='*' qemu.spec |
||||
yum-builddep -y --enablerepo='*' fio.spec |
||||
if [ "$DIST" = ".el8" ]; then |
||||
dnf -y install centos-release-advanced-virtualization rpm-build |
||||
dnf -y install gcc-toolset-9 gcc-toolset-9-gcc-c++ gperftools-devel qemu fio |
||||
dnf download --disablerepo='*' --enablerepo='centos-advanced-virtualization-source' --source qemu-kvm |
||||
dnf download --source fio |
||||
rpm --nomd5 -i qemu*.src.rpm |
||||
rpm --nomd5 -i fio*.src.rpm |
||||
cd ~/rpmbuild/SPECS |
||||
dnf builddep -y --enablerepo='*' --spec qemu-kvm.spec |
||||
dnf builddep -y --enablerepo='*' --spec fio.spec |
||||
else |
||||
yum -y --enablerepo=extras install centos-release-scl epel-release yum-utils rpm-build qemu fio |
||||
yum -y --enablerepo='*' install devtoolset-9-gcc-c++ devtoolset-9-libatomic-devel gperftools-devel |
||||
yumdownloader --source qemu |
||||
yumdownloader --source fio |
||||
rpm --nomd5 -i qemu*.src.rpm |
||||
rpm --nomd5 -i fio*.src.rpm |
||||
cd ~/rpmbuild/SPECS |
||||
yum-builddep -y --enablerepo='*' qemu.spec |
||||
yum-builddep -y --enablerepo='*' fio.spec |
||||
fi |
||||
|
@ -0,0 +1,54 @@ |
||||
Name: vitastor |
||||
Version: 0.5 |
||||
Release: 1%{?dist} |
||||
Summary: Vitastor, a fast software-defined clustered block storage |
||||
|
||||
License: Vitastor Network Public License 1.0 |
||||
URL: https://vitastor.io/ |
||||
Source0: vitastor-0.5.el8.tar.gz |
||||
|
||||
BuildRequires: liburing-devel >= 0.6 |
||||
BuildRequires: gperftools-devel |
||||
BuildRequires: gcc-toolset-9-gcc-c++ |
||||
BuildRequires: nodejs >= 10 |
||||
Requires: fio = 3.7-3.el8 |
||||
Requires: qemu = 4.2.0-29.el8.6 |
||||
Requires: nodejs >= 10 |
||||
Requires: liburing >= 0.6 |
||||
|
||||
%description |
||||
Vitastor is a small, simple and fast clustered block storage (storage for VM drives), |
||||
architecturally similar to Ceph which means strong consistency, primary-replication, |
||||
symmetric clustering and automatic data distribution over any number of drives of any |
||||
size with configurable redundancy (replication or erasure codes/XOR). |
||||
|
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
|
||||
%build |
||||
. /opt/rh/gcc-toolset-9/enable |
||||
make %{?_smp_mflags} |
||||
|
||||
|
||||
%install |
||||
rm -rf $RPM_BUILD_ROOT |
||||
%make_install BINDIR=%_bindir LIBDIR=%_libdir QEMU_PLUGINDIR=%_libdir/qemu-kvm |
||||
cd mon |
||||
npm install |
||||
cd .. |
||||
cp -r mon %buildroot%_libdir/vitastor/mon |
||||
|
||||
|
||||
%files |
||||
%doc |
||||
%_bindir/vitastor-dump-journal |
||||
%_bindir/vitastor-nbd |
||||
%_bindir/vitastor-osd |
||||
%_bindir/vitastor-rm |
||||
%_libdir/qemu-kvm/block-vitastor.so |
||||
%_libdir/vitastor |
||||
|
||||
|
||||
%changelog |
Loading…
Reference in new issue