forked from vitalif/vitastor
Fix rpm specs for building with CMake
parent
5af8eddaa9
commit
e21b14b72c
|
@ -1,5 +1,5 @@
|
|||
# Build packages for CentOS 8 inside a container
|
||||
# cd ..; podman build -t qemu-el8 -v `pwd`/build:/root/build -f rpm/qemu-el8.Dockerfile .
|
||||
# cd ..; podman build -t qemu-el8 -v `pwd`/packages:/root/packages -f rpm/qemu-el8.Dockerfile .
|
||||
|
||||
FROM centos:8
|
||||
|
||||
|
@ -14,8 +14,8 @@ RUN cd ~/rpmbuild/SPECS && dnf builddep -y --enablerepo=PowerTools --spec qemu-k
|
|||
ADD qemu-*-vitastor.patch /root/vitastor/
|
||||
|
||||
RUN set -e; \
|
||||
mkdir -p /root/build/qemu-el8; \
|
||||
rm -rf /root/build/qemu-el8/*; \
|
||||
mkdir -p /root/packages/qemu-el8; \
|
||||
rm -rf /root/packages/qemu-el8/*; \
|
||||
rpm --nomd5 -i /root/qemu*.src.rpm; \
|
||||
cd ~/rpmbuild/SPECS; \
|
||||
PN=$(grep ^Patch qemu-kvm.spec | tail -n1 | perl -pe 's/Patch(\d+).*/$1/'); \
|
||||
|
@ -27,5 +27,5 @@ RUN set -e; \
|
|||
perl -i -pe 's/(^Release:\s*\d+)/$1.vitastor/' qemu-kvm.spec; \
|
||||
cp /root/vitastor/qemu-4.2-vitastor.patch ~/rpmbuild/SOURCES; \
|
||||
rpmbuild --nocheck -ba qemu-kvm.spec; \
|
||||
cp ~/rpmbuild/RPMS/*/*qemu* /root/build/qemu-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/*qemu* /root/build/qemu-el8/
|
||||
cp ~/rpmbuild/RPMS/*/*qemu* /root/packages/qemu-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/*qemu* /root/packages/qemu-el8/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Build packages for CentOS 7 inside a container
|
||||
# cd ..; podman build -t vitastor-el7 -v `pwd`/build:/root/build -f rpm/vitastor-el7.Dockerfile .
|
||||
# cd ..; podman build -t vitastor-el7 -v `pwd`/packages:/root/packages -f rpm/vitastor-el7.Dockerfile .
|
||||
# localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
|
||||
|
||||
FROM centos:7
|
||||
|
@ -25,12 +25,12 @@ RUN set -e; \
|
|||
cd ~/rpmbuild/SPECS/; \
|
||||
. /opt/rh/devtoolset-9/enable; \
|
||||
rpmbuild -ba liburing.spec; \
|
||||
mkdir -p /root/build/liburing-el7; \
|
||||
rm -rf /root/build/liburing-el7/*; \
|
||||
cp ~/rpmbuild/RPMS/*/liburing* /root/build/liburing-el7/; \
|
||||
cp ~/rpmbuild/SRPMS/liburing* /root/build/liburing-el7/
|
||||
mkdir -p /root/packages/liburing-el7; \
|
||||
rm -rf /root/packages/liburing-el7/*; \
|
||||
cp ~/rpmbuild/RPMS/*/liburing* /root/packages/liburing-el7/; \
|
||||
cp ~/rpmbuild/SRPMS/liburing* /root/packages/liburing-el7/
|
||||
|
||||
RUN rpm -i `ls /root/build/liburing-el7/liburing-*.x86_64.rpm | grep -v debug`
|
||||
RUN rpm -i `ls /root/packages/liburing-el7/liburing-*.x86_64.rpm | grep -v debug`
|
||||
|
||||
ADD . /root/vitastor
|
||||
|
||||
|
@ -41,7 +41,7 @@ RUN set -e; \
|
|||
cp vitastor-el7.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
||||
cd ~/rpmbuild/SPECS/; \
|
||||
rpmbuild -ba vitastor.spec; \
|
||||
mkdir -p /root/build/vitastor-el7; \
|
||||
rm -rf /root/build/vitastor-el7/*; \
|
||||
cp ~/rpmbuild/RPMS/*/vitastor* /root/build/vitastor-el7/; \
|
||||
cp ~/rpmbuild/SRPMS/vitastor* /root/build/vitastor-el7/
|
||||
mkdir -p /root/packages/vitastor-el7; \
|
||||
rm -rf /root/packages/vitastor-el7/*; \
|
||||
cp ~/rpmbuild/RPMS/*/vitastor* /root/packages/vitastor-el7/; \
|
||||
cp ~/rpmbuild/SRPMS/vitastor* /root/packages/vitastor-el7/
|
||||
|
|
|
@ -14,6 +14,7 @@ BuildRequires: rh-nodejs12
|
|||
BuildRequires: rh-nodejs12-npm
|
||||
BuildRequires: jerasure-devel
|
||||
BuildRequires: gf-complete-devel
|
||||
BuildRequires: cmake
|
||||
Requires: fio = 3.7-1.el7
|
||||
Requires: qemu-kvm = 2.0.0-1.el7.6
|
||||
Requires: rh-nodejs12
|
||||
|
@ -35,12 +36,13 @@ size with configurable redundancy (replication or erasure codes/XOR).
|
|||
|
||||
%build
|
||||
. /opt/rh/devtoolset-9/enable
|
||||
make %{?_smp_mflags} BINDIR=%_bindir LIBDIR=%_libdir QEMU_PLUGINDIR=%_libdir/qemu-kvm
|
||||
%cmake . -DQEMU_PLUGINDIR=qemu-kvm
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%make_install BINDIR=%_bindir LIBDIR=%_libdir QEMU_PLUGINDIR=%_libdir/qemu-kvm
|
||||
%make_install
|
||||
. /opt/rh/rh-nodejs12/enable
|
||||
cd mon
|
||||
npm install
|
||||
|
@ -56,7 +58,11 @@ cp -r mon %buildroot/usr/lib/vitastor/mon
|
|||
%_bindir/vitastor-osd
|
||||
%_bindir/vitastor-rm
|
||||
%_libdir/qemu-kvm/block-vitastor.so
|
||||
%_libdir/vitastor
|
||||
%_libdir/libfio_vitastor.so
|
||||
%_libdir/libfio_vitastor_blk.so
|
||||
%_libdir/libfio_vitastor_sec.so
|
||||
%_libdir/libvitastor_blk.so
|
||||
%_libdir/libvitastor_client.so
|
||||
/usr/lib/vitastor
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Build packages for CentOS 8 inside a container
|
||||
# cd ..; podman build -t vitastor-el8 -v `pwd`/build:/root/build -f rpm/vitastor-el8.Dockerfile .
|
||||
# cd ..; podman build -t vitastor-el8 -v `pwd`/packages:/root/packages -f rpm/vitastor-el8.Dockerfile .
|
||||
|
||||
FROM centos:8
|
||||
|
||||
|
@ -13,8 +13,8 @@ RUN rm -rf /var/lib/dnf/*; dnf download --disablerepo='*' --enablerepo='vitastor
|
|||
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
|
||||
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
|
||||
|
||||
ADD https://vitastor.io/rpms/liburing-el7/liburing-0.7-2.el7.src.rpm /root
|
||||
|
||||
|
@ -23,12 +23,12 @@ RUN set -e; \
|
|||
cd ~/rpmbuild/SPECS/; \
|
||||
. /opt/rh/gcc-toolset-9/enable; \
|
||||
rpmbuild -ba liburing.spec; \
|
||||
mkdir -p /root/build/liburing-el8; \
|
||||
rm -rf /root/build/liburing-el8/*; \
|
||||
cp ~/rpmbuild/RPMS/*/liburing* /root/build/liburing-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/liburing* /root/build/liburing-el8/
|
||||
mkdir -p /root/packages/liburing-el8; \
|
||||
rm -rf /root/packages/liburing-el8/*; \
|
||||
cp ~/rpmbuild/RPMS/*/liburing* /root/packages/liburing-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/liburing* /root/packages/liburing-el8/
|
||||
|
||||
RUN rpm -i `ls /root/build/liburing-el7/liburing-*.x86_64.rpm | grep -v debug`
|
||||
RUN rpm -i `ls /root/packages/liburing-el7/liburing-*.x86_64.rpm | grep -v debug`
|
||||
|
||||
ADD . /root/vitastor
|
||||
|
||||
|
@ -39,7 +39,7 @@ RUN set -e; \
|
|||
cp vitastor-el8.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
||||
cd ~/rpmbuild/SPECS/; \
|
||||
rpmbuild -ba vitastor.spec; \
|
||||
mkdir -p /root/build/vitastor-el8; \
|
||||
rm -rf /root/build/vitastor-el8/*; \
|
||||
cp ~/rpmbuild/RPMS/*/vitastor* /root/build/vitastor-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/vitastor* /root/build/vitastor-el8/
|
||||
mkdir -p /root/packages/vitastor-el8; \
|
||||
rm -rf /root/packages/vitastor-el8/*; \
|
||||
cp ~/rpmbuild/RPMS/*/vitastor* /root/packages/vitastor-el8/; \
|
||||
cp ~/rpmbuild/SRPMS/vitastor* /root/packages/vitastor-el8/
|
||||
|
|
|
@ -13,6 +13,7 @@ BuildRequires: gcc-toolset-9-gcc-c++
|
|||
BuildRequires: nodejs >= 10
|
||||
BuildRequires: jerasure-devel
|
||||
BuildRequires: gf-complete-devel
|
||||
BuildRequires: cmake
|
||||
Requires: fio = 3.7-3.el8
|
||||
Requires: qemu-kvm = 4.2.0-29.el8.6
|
||||
Requires: nodejs >= 10
|
||||
|
@ -33,12 +34,13 @@ size with configurable redundancy (replication or erasure codes/XOR).
|
|||
|
||||
%build
|
||||
. /opt/rh/gcc-toolset-9/enable
|
||||
make %{?_smp_mflags} BINDIR=%_bindir LIBDIR=%_libdir QEMU_PLUGINDIR=%_libdir/qemu-kvm
|
||||
%cmake . -DQEMU_PLUGINDIR=qemu-kvm
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%make_install BINDIR=%_bindir LIBDIR=%_libdir QEMU_PLUGINDIR=%_libdir/qemu-kvm
|
||||
%make_install
|
||||
cd mon
|
||||
npm install
|
||||
cd ..
|
||||
|
@ -53,7 +55,11 @@ cp -r mon %buildroot/usr/lib/vitastor
|
|||
%_bindir/vitastor-osd
|
||||
%_bindir/vitastor-rm
|
||||
%_libdir/qemu-kvm/block-vitastor.so
|
||||
%_libdir/vitastor
|
||||
%_libdir/libfio_vitastor.so
|
||||
%_libdir/libfio_vitastor_blk.so
|
||||
%_libdir/libfio_vitastor_sec.so
|
||||
%_libdir/libvitastor_blk.so
|
||||
%_libdir/libvitastor_client.so
|
||||
/usr/lib/vitastor
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue