From dcd8f5e76c6df549c5d49a8d08c3729ae83741e2 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 1 Dec 2021 02:00:14 +0300 Subject: [PATCH] Remove qemu shenanigans from vitastor build dockerfile --- debian/qemu_version | 1 - debian/raw.h | 19 +++++++++++++++++++ debian/rules | 2 +- debian/vitastor.Dockerfile | 26 ++++++-------------------- 4 files changed, 26 insertions(+), 22 deletions(-) delete mode 100644 debian/qemu_version create mode 100644 debian/raw.h diff --git a/debian/qemu_version b/debian/qemu_version deleted file mode 100644 index a333036a..00000000 --- a/debian/qemu_version +++ /dev/null @@ -1 +0,0 @@ -dep:qemu=1:5.2+dfsg-10+vitastor1 diff --git a/debian/raw.h b/debian/raw.h new file mode 100644 index 00000000..5880c242 --- /dev/null +++ b/debian/raw.h @@ -0,0 +1,19 @@ +/* Removed in Linux 5.14 */ + +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __LINUX_RAW_H +#define __LINUX_RAW_H + +#include + +#define RAW_SETBIND _IO( 0xac, 0 ) +#define RAW_GETBIND _IO( 0xac, 1 ) + +struct raw_config_request +{ + int raw_minor; + __u64 block_major; + __u64 block_minor; +}; + +#endif /* __LINUX_RAW_H */ diff --git a/debian/rules b/debian/rules index 9be6dadc..a90edb87 100755 --- a/debian/rules +++ b/debian/rules @@ -6,5 +6,5 @@ export DH_VERBOSE = 1 override_dh_installdeb: cat debian/fio_version >> debian/vitastor-fio.substvars - cat debian/qemu_version >> debian/vitastor-qemu.substvars + [ -f debian/qemu_version ] && (cat debian/qemu_version >> debian/vitastor-qemu.substvars) || true dh_installdeb diff --git a/debian/vitastor.Dockerfile b/debian/vitastor.Dockerfile index 0d228a3c..f74502f8 100644 --- a/debian/vitastor.Dockerfile +++ b/debian/vitastor.Dockerfile @@ -19,10 +19,8 @@ RUN if [ "$REL" = "buster" -o "$REL" = "bullseye" ]; then \ echo 'APT::Install-Suggests false;' >> /etc/apt/apt.conf RUN apt-get update -RUN apt-get -y install qemu fio liburing1 liburing-dev libgoogle-perftools-dev devscripts -RUN apt-get -y build-dep qemu +RUN apt-get -y install fio liburing1 liburing-dev libgoogle-perftools-dev devscripts RUN apt-get -y build-dep fio -RUN apt-get --download-only source qemu RUN apt-get --download-only source fio RUN apt-get update && apt-get -y install libjerasure-dev cmake libibverbs-dev @@ -32,34 +30,22 @@ RUN set -e -x; \ cd /root/fio-build/; \ rm -rf /root/fio-build/*; \ dpkg-source -x /root/fio*.dsc; \ - cd /root/packages/qemu-$REL/; \ - rm -rf qemu*/; \ - dpkg-source -x qemu*.dsc; \ - cd /root/packages/qemu-$REL/qemu*/; \ - debian/rules b/configure-stamp; \ - cd b/qemu; \ - make -j8 qapi/qapi-builtin-types.h; \ mkdir -p /root/packages/vitastor-$REL; \ rm -rf /root/packages/vitastor-$REL/*; \ cd /root/packages/vitastor-$REL; \ cp -r /root/vitastor vitastor-0.6.8; \ - ln -s /root/packages/qemu-$REL/qemu-*/ vitastor-0.6.8/qemu; \ - ln -s /root/fio-build/fio-*/ vitastor-0.6.8/fio; \ cd vitastor-0.6.8; \ + ln -s /root/fio-build/fio-*/ ./fio; \ FIO=$(head -n1 fio/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \ - QEMU=$(head -n1 qemu/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \ - sh copy-qemu-includes.sh; \ + ls /usr/include/linux/raw.h || cp ./debian/raw.h /usr/include/linux/raw.h; \ sh copy-fio-includes.sh; \ - rm qemu fio; \ + rm fio; \ mkdir -p a b debian/patches; \ - mv qemu-copy b/qemu; \ mv fio-copy b/fio; \ - diff -NaurpbB a b > debian/patches/qemu-fio-headers.patch || true; \ - echo qemu-fio-headers.patch >> debian/patches/series; \ + diff -NaurpbB a b > debian/patches/fio-headers.patch || true; \ + echo fio-headers.patch >> debian/patches/series; \ rm -rf a b; \ - rm -rf /root/packages/qemu-$REL/qemu*/; \ echo "dep:fio=$FIO" > debian/fio_version; \ - echo "dep:qemu=$QEMU" > debian/qemu_version; \ cd /root/packages/vitastor-$REL; \ tar --sort=name --mtime='2020-01-01' --owner=0 --group=0 --exclude=debian -cJf vitastor_0.6.8.orig.tar.xz vitastor-0.6.8; \ cd vitastor-0.6.8; \