diff --git a/rpm/build-tarball.sh b/rpm/build-tarball.sh index f9c4af171..521c265a8 100755 --- a/rpm/build-tarball.sh +++ b/rpm/build-tarball.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Vitastor depends on QEMU and FIO headers, but QEMU and FIO don't have -devel packages +# Vitastor depends on QEMU and/or FIO headers, but QEMU and FIO don't have -devel packages # So we have to copy their headers into the source tarball set -e @@ -18,34 +18,11 @@ else fi cd ~/rpmbuild/SPECS rpmbuild -bp fio.spec -perl -i -pe 's/^make V=1/exit 0; make V=1/' qemu*.spec -rpmbuild -bc qemu*.spec -perl -i -pe 's/^exit 0; make V=1/make V=1/' qemu*.spec -cd ~/rpmbuild/BUILD/qemu*/ -rm -rf $VITASTOR/qemu $VITASTOR/fio -mkdir -p $VITASTOR/qemu/b/qemu -make -j8 config-host.h -cp config-host.h $VITASTOR/qemu/b/qemu -cp -r include $VITASTOR/qemu -if [ -f qapi-schema.json ]; then - # QEMU 2.0 - make qapi-types.h - cp qapi-types.h $VITASTOR/qemu/b/qemu -else - # QEMU 3.0+ - make qapi - cp -r qapi $VITASTOR/qemu/b/qemu -fi cd $VITASTOR -sh copy-qemu-includes.sh -rm -rf qemu -mv qemu-copy qemu ln -s ~/rpmbuild/BUILD/fio*/ fio sh copy-fio-includes.sh rm fio mv fio-copy fio FIO=`rpm -qi fio | perl -e 'while(<>) { /^Epoch[\s:]+(\S+)/ && print "$1:"; /^Version[\s:]+(\S+)/ && print $1; /^Release[\s:]+(\S+)/ && print "-$1"; }'` -QEMU=`rpm -qi qemu qemu-kvm | perl -e 'while(<>) { /^Epoch[\s:]+(\S+)/ && print "$1:"; /^Version[\s:]+(\S+)/ && print $1; /^Release[\s:]+(\S+)/ && print "-$1"; }'` perl -i -pe 's/(Requires:\s*fio)([^\n]+)?/$1 = '$FIO'/' $VITASTOR/rpm/vitastor-el$EL.spec -perl -i -pe 's/(Requires:\s*qemu(?:-kvm)?)([^\n]+)?/$1 = '$QEMU'/' $VITASTOR/rpm/vitastor-el$EL.spec tar --transform 's#^#vitastor-0.6.8/#' --exclude 'rpm/*.rpm' -czf $VITASTOR/../vitastor-0.6.8$(rpm --eval '%dist').tar.gz * diff --git a/rpm/vitastor-el7.Dockerfile b/rpm/vitastor-el7.Dockerfile index 669ae460e..ef1518d39 100644 --- a/rpm/vitastor-el7.Dockerfile +++ b/rpm/vitastor-el7.Dockerfile @@ -9,15 +9,11 @@ WORKDIR /root RUN rm -f /etc/yum.repos.d/CentOS-Media.repo RUN yum -y --enablerepo=extras install centos-release-scl epel-release yum-utils rpm-build RUN yum -y install https://vitastor.io/rpms/centos/7/vitastor-release-1.0-1.el7.noarch.rpm -RUN yum -y install devtoolset-9-gcc-c++ devtoolset-9-libatomic-devel gperftools-devel qemu-kvm fio rh-nodejs12 jerasure-devel gf-complete-devel -RUN yumdownloader --disablerepo=centos-sclo-rh --source qemu-kvm +RUN yum -y install devtoolset-9-gcc-c++ devtoolset-9-libatomic-devel gperftools-devel fio rh-nodejs12 jerasure-devel gf-complete-devel rdma-core-devel RUN yumdownloader --disablerepo=centos-sclo-rh --source fio -RUN rpm --nomd5 -i qemu*.src.rpm RUN rpm --nomd5 -i fio*.src.rpm RUN rm -f /etc/yum.repos.d/CentOS-Media.repo -RUN cd ~/rpmbuild/SPECS && yum-builddep -y qemu-kvm.spec RUN cd ~/rpmbuild/SPECS && yum-builddep -y fio.spec -RUN yum -y install rdma-core-devel ADD https://vitastor.io/rpms/liburing-el7/liburing-0.7-2.el7.src.rpm /root diff --git a/rpm/vitastor-el7.spec b/rpm/vitastor-el7.spec index 22d9b1e2a..304dc0c45 100644 --- a/rpm/vitastor-el7.spec +++ b/rpm/vitastor-el7.spec @@ -21,7 +21,6 @@ Requires: vitastor-mon = %{version}-%{release} Requires: vitastor-client = %{version}-%{release} Requires: vitastor-client-devel = %{version}-%{release} Requires: vitastor-fio = %{version}-%{release} -Requires: vitastor-qemu = %{version}-%{release} %description Vitastor is a small, simple and fast clustered block storage (storage for VM drives), @@ -83,24 +82,13 @@ Requires: fio = 3.7-1.el7 Vitastor fio drivers for benchmarking. -%package -n vitastor-qemu -Summary: Vitastor - QEMU driver -Group: Development/Libraries -Requires: vitastor-client = %{version}-%{release} -Requires: qemu-kvm = 2.0.0-1.el7.6 - - -%description -n vitastor-qemu -Vitastor QEMU block device driver. - - %prep %setup -q %build . /opt/rh/devtoolset-9/enable -%cmake . -DQEMU_PLUGINDIR=qemu-kvm +%cmake . %make_build @@ -150,8 +138,4 @@ cp -r mon %buildroot/usr/lib/vitastor %_libdir/libfio_vitastor_sec.so -%files -n vitastor-qemu -%_libdir/qemu-kvm/block-vitastor.so - - %changelog diff --git a/rpm/vitastor-el8.Dockerfile b/rpm/vitastor-el8.Dockerfile index 916044a33..19002c1d5 100644 --- a/rpm/vitastor-el8.Dockerfile +++ b/rpm/vitastor-el8.Dockerfile @@ -8,14 +8,11 @@ WORKDIR /root RUN rm -f /etc/yum.repos.d/CentOS-Media.repo RUN dnf -y install centos-release-advanced-virtualization epel-release dnf-plugins-core RUN yum -y install https://vitastor.io/rpms/centos/8/vitastor-release-1.0-1.el8.noarch.rpm -RUN dnf --enablerepo='centos-advanced-virtualization' -y install gcc-toolset-9 gcc-toolset-9-gcc-c++ gperftools-devel qemu-kvm fio nodejs rpm-build jerasure-devel gf-complete-devel -RUN rm -rf /var/lib/dnf/*; dnf download --disablerepo='*' --enablerepo='vitastor' --source qemu-kvm +RUN dnf --enablerepo='centos-advanced-virtualization' -y install gcc-toolset-9 gcc-toolset-9-gcc-c++ gperftools-devel \ + fio nodejs rpm-build jerasure-devel gf-complete-devel libibverbs-devel libarchive cmake RUN dnf download --source fio -RUN rpm --nomd5 -i qemu*.src.rpm RUN rpm --nomd5 -i fio*.src.rpm -RUN cd ~/rpmbuild/SPECS && dnf builddep -y --enablerepo=powertools --spec qemu-kvm.spec -RUN cd ~/rpmbuild/SPECS && dnf builddep -y --enablerepo=powertools --spec fio.spec && dnf install -y cmake -RUN yum -y install libibverbs-devel libarchive +RUN cd ~/rpmbuild/SPECS && dnf builddep -y --enablerepo=powertools --spec fio.spec ADD https://vitastor.io/rpms/liburing-el7/liburing-0.7-2.el7.src.rpm /root diff --git a/rpm/vitastor-el8.spec b/rpm/vitastor-el8.spec index d8a09b89a..a2cb2d812 100644 --- a/rpm/vitastor-el8.spec +++ b/rpm/vitastor-el8.spec @@ -20,7 +20,6 @@ Requires: vitastor-mon = %{version}-%{release} Requires: vitastor-client = %{version}-%{release} Requires: vitastor-client-devel = %{version}-%{release} Requires: vitastor-fio = %{version}-%{release} -Requires: vitastor-qemu = %{version}-%{release} %description Vitastor is a small, simple and fast clustered block storage (storage for VM drives), @@ -81,24 +80,13 @@ Requires: fio = 3.7-3.el8 Vitastor fio drivers for benchmarking. -%package -n vitastor-qemu -Summary: Vitastor - QEMU driver -Group: Development/Libraries -Requires: vitastor-client = %{version}-%{release} -Requires: qemu-kvm = 4.2.0-29.el8.6 - - -%description -n vitastor-qemu -Vitastor QEMU block device driver. - - %prep %setup -q %build . /opt/rh/gcc-toolset-9/enable -%cmake . -DQEMU_PLUGINDIR=qemu-kvm +%cmake . %make_build @@ -147,8 +135,4 @@ cp -r mon %buildroot/usr/lib/vitastor %_libdir/libfio_vitastor_sec.so -%files -n vitastor-qemu -%_libdir/qemu-kvm/block-vitastor.so - - %changelog