diff --git a/README-ru.md b/README-ru.md index 5824f4e9..cca03578 100644 --- a/README-ru.md +++ b/README-ru.md @@ -370,7 +370,7 @@ Vitastor с однопоточной NBD прокси на том же стен - Установите gcc и g++ 8.x или новее. - Склонируйте данный репозиторий с подмодулями: `git clone https://yourcmc.ru/git/vitalif/vitastor/`. - Желательно пересобрать QEMU с патчем, который делает необязательным запуск через LD_PRELOAD. - См `qemu-*.*-vitastor.patch` - выберите версию, наиболее близкую вашей версии QEMU. + См `patches/qemu-*.*-vitastor.patch` - выберите версию, наиболее близкую вашей версии QEMU. - Установите QEMU 3.0 или новее, возьмите исходные коды установленного пакета, начните его пересборку, через некоторое время остановите её и скопируйте следующие заголовки: - `/include` → `/qemu/include` diff --git a/README.md b/README.md index c3ab9e2a..34b74174 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,7 @@ Vitastor with single-thread NBD on the same hardware: * For QEMU 2.0+: `/qapi-types.h` → `/qemu/b/qemu/qapi-types.h` - `config-host.h` and `qapi` are required because they contain generated headers - You can also rebuild QEMU with a patch that makes LD_PRELOAD unnecessary to load vitastor driver. - See `qemu-*.*-vitastor.patch`. + See `patches/qemu-*.*-vitastor.patch`. - Install fio 3.7 or later, get its source and symlink it into `/fio`. - Build & install Vitastor with `mkdir build && cd build && cmake .. && make -j8 && make install`. Pay attention to the `QEMU_PLUGINDIR` cmake option - it must be set to `qemu-kvm` on RHEL. diff --git a/debian/patched-qemu.Dockerfile b/debian/patched-qemu.Dockerfile index 3709c29b..e43f2068 100644 --- a/debian/patched-qemu.Dockerfile +++ b/debian/patched-qemu.Dockerfile @@ -29,17 +29,17 @@ RUN apt-get -y build-dep fio RUN apt-get --download-only source qemu RUN apt-get --download-only source fio -ADD qemu-5.0-vitastor.patch qemu-5.1-vitastor.patch /root/vitastor/ +ADD patches/qemu-5.0-vitastor.patch patches/qemu-5.1-vitastor.patch /root/vitastor/patches/ RUN set -e; \ mkdir -p /root/packages/qemu-$REL; \ rm -rf /root/packages/qemu-$REL/*; \ cd /root/packages/qemu-$REL; \ dpkg-source -x /root/qemu*.dsc; \ if [ -d /root/packages/qemu-$REL/qemu-5.0 ]; then \ - cp /root/vitastor/qemu-5.0-vitastor.patch /root/packages/qemu-$REL/qemu-5.0/debian/patches; \ + cp /root/vitastor/patches/qemu-5.0-vitastor.patch /root/packages/qemu-$REL/qemu-5.0/debian/patches; \ echo qemu-5.0-vitastor.patch >> /root/packages/qemu-$REL/qemu-5.0/debian/patches/series; \ else \ - cp /root/vitastor/qemu-5.1-vitastor.patch /root/packages/qemu-$REL/qemu-*/debian/patches; \ + cp /root/vitastor/patches/qemu-5.1-vitastor.patch /root/packages/qemu-$REL/qemu-*/debian/patches; \ P=`ls -d /root/packages/qemu-$REL/qemu-*/debian/patches`; \ echo qemu-5.1-vitastor.patch >> $P/series; \ fi; \ diff --git a/cinder-driver/libvirt-5.0-vitastor.diff b/patches/libvirt-5.0-vitastor.diff similarity index 100% rename from cinder-driver/libvirt-5.0-vitastor.diff rename to patches/libvirt-5.0-vitastor.diff diff --git a/cinder-driver/libvirt-7.0-vitastor.diff b/patches/libvirt-7.0-vitastor.diff similarity index 100% rename from cinder-driver/libvirt-7.0-vitastor.diff rename to patches/libvirt-7.0-vitastor.diff diff --git a/cinder-driver/libvirt-7.5-vitastor.diff b/patches/libvirt-7.5-vitastor.diff similarity index 100% rename from cinder-driver/libvirt-7.5-vitastor.diff rename to patches/libvirt-7.5-vitastor.diff diff --git a/cinder-driver/libvirt-example.xml b/patches/libvirt-example.xml similarity index 100% rename from cinder-driver/libvirt-example.xml rename to patches/libvirt-example.xml diff --git a/qemu-3.1-vitastor.patch b/patches/qemu-3.1-vitastor.patch similarity index 100% rename from qemu-3.1-vitastor.patch rename to patches/qemu-3.1-vitastor.patch diff --git a/qemu-4.2-vitastor.patch b/patches/qemu-4.2-vitastor.patch similarity index 100% rename from qemu-4.2-vitastor.patch rename to patches/qemu-4.2-vitastor.patch diff --git a/qemu-5.0-vitastor.patch b/patches/qemu-5.0-vitastor.patch similarity index 100% rename from qemu-5.0-vitastor.patch rename to patches/qemu-5.0-vitastor.patch diff --git a/qemu-5.1-vitastor.patch b/patches/qemu-5.1-vitastor.patch similarity index 100% rename from qemu-5.1-vitastor.patch rename to patches/qemu-5.1-vitastor.patch diff --git a/rpm/qemu-el8.Dockerfile b/rpm/qemu-el8.Dockerfile index 0d4cc78a..a3d79419 100644 --- a/rpm/qemu-el8.Dockerfile +++ b/rpm/qemu-el8.Dockerfile @@ -11,7 +11,7 @@ RUN rm -rf /var/lib/dnf/*; dnf download --disablerepo='*' --enablerepo='centos-a RUN rpm --nomd5 -i qemu*.src.rpm RUN cd ~/rpmbuild/SPECS && dnf builddep -y --enablerepo=PowerTools --spec qemu-kvm.spec -ADD qemu-*-vitastor.patch /root/vitastor/ +ADD patches/qemu-*-vitastor.patch /root/vitastor/patches/ RUN set -e; \ mkdir -p /root/packages/qemu-el8; \ @@ -25,7 +25,7 @@ RUN set -e; \ echo "Patch$((PN+1)): qemu-4.2-vitastor.patch" >> qemu-kvm.spec; \ tail -n +2 xx01 >> qemu-kvm.spec; \ perl -i -pe 's/(^Release:\s*\d+)/$1.vitastor/' qemu-kvm.spec; \ - cp /root/vitastor/qemu-4.2-vitastor.patch ~/rpmbuild/SOURCES; \ + cp /root/vitastor/patches/qemu-4.2-vitastor.patch ~/rpmbuild/SOURCES; \ rpmbuild --nocheck -ba qemu-kvm.spec; \ cp ~/rpmbuild/RPMS/*/*qemu* /root/packages/qemu-el8/; \ cp ~/rpmbuild/SRPMS/*qemu* /root/packages/qemu-el8/