Browse Source

Add a Dockerfile to build patched QEMU for Debian (Buster)

tags/v0.5.1
Vitaliy Filippov 2 months ago
parent
commit
a3fc9f8d7d
1 changed files with 36 additions and 0 deletions
  1. +36
    -0
      debian/vitastor-buster.Dockerfile

+ 36
- 0
debian/vitastor-buster.Dockerfile View File

@@ -0,0 +1,36 @@
# Build packages for Debian 10 inside a container
# cd ..; podman build -v `pwd`/qemu-build:/root/qemu-build -f debian/vitastor-buster.Dockerfile .

FROM debian:buster

WORKDIR /root

RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list; \
grep '^deb ' /etc/apt/sources.list | perl -pe 's/^deb/deb-src/' >> /etc/apt/sources.list; \
echo 'APT::Install-Recommends false;' > /etc/apt/apt.conf

RUN apt-get update
RUN apt-get -t buster-backports -y install qemu fio liburing1 liburing-dev libgoogle-perftools-dev devscripts
RUN apt-get -t buster-backports -y build-dep qemu
RUN apt-get -y build-dep fio
RUN apt-get -t buster-backports --download-only source qemu-kvm
RUN apt-get --download-only source fio

ADD qemu-5.0-vitastor.patch qemu-5.1-vitastor.patch /root/vitastor/
RUN set -e; \
mkdir -p /root/qemu-build; \
rm -rf /root/qemu-build/*; \
cd /root/qemu-build; \
dpkg-source -x /root/qemu*.dsc; \
if [ -d /root/qemu-build/qemu-5.0 ]; then \
cp /root/vitastor/qemu-5.0-vitastor.patch /root/qemu-build/qemu-5.0/debian/patches; \
echo qemu-5.0-vitastor.patch >> /root/qemu-build/qemu-5.0/debian/patches/series; \
else \
cp /root/vitastor/qemu-5.1-vitastor.patch /root/qemu-build/qemu-*/debian/patches; \
echo qemu-5.1-vitastor.patch >> /root/qemu-build/qemu-*/debian/patches/series; \
fi; \
cd /root/qemu-build/qemu-*/; \
V=$(head -n1 debian/changelog | perl -pe 's/^.*\((.*?)(~bpo[\d\+]*)\).*$/$1/')~vitastor1; \
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D buster -v $V 'Plug Vitastor block driver'; \
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto; \
rm -rf /root/qemu-build/qemu-*/

Loading…
Cancel
Save