forked from vitalif/vitastor
Build Vitastor packages, too
parent
a3fc9f8d7d
commit
4bd2bd48eb
|
@ -0,0 +1,15 @@
|
||||||
|
.git
|
||||||
|
build
|
||||||
|
mon/node_modules
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
osd
|
||||||
|
stub_osd
|
||||||
|
stub_uring_osd
|
||||||
|
stub_bench
|
||||||
|
osd_test
|
||||||
|
dump_journal
|
||||||
|
nbd_proxy
|
||||||
|
rm_inode
|
||||||
|
fio
|
||||||
|
qemu
|
|
@ -1,5 +1,5 @@
|
||||||
# Build packages for Debian 10 inside a container
|
# Build packages for Debian 10 inside a container
|
||||||
# cd ..; podman build -v `pwd`/qemu-build:/root/qemu-build -f debian/vitastor-buster.Dockerfile .
|
# cd ..; podman build -t vitastor-buster -v `pwd`/build:/root/build -f debian/vitastor-buster.Dockerfile .
|
||||||
|
|
||||||
FROM debian:buster
|
FROM debian:buster
|
||||||
|
|
||||||
|
@ -18,19 +18,54 @@ RUN apt-get --download-only source fio
|
||||||
|
|
||||||
ADD qemu-5.0-vitastor.patch qemu-5.1-vitastor.patch /root/vitastor/
|
ADD qemu-5.0-vitastor.patch qemu-5.1-vitastor.patch /root/vitastor/
|
||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
mkdir -p /root/qemu-build; \
|
mkdir -p /root/build/qemu-buster; \
|
||||||
rm -rf /root/qemu-build/*; \
|
rm -rf /root/build/qemu-buster/*; \
|
||||||
cd /root/qemu-build; \
|
cd /root/build/qemu-buster; \
|
||||||
dpkg-source -x /root/qemu*.dsc; \
|
dpkg-source -x /root/qemu*.dsc; \
|
||||||
if [ -d /root/qemu-build/qemu-5.0 ]; then \
|
if [ -d /root/build/qemu-buster/qemu-5.0 ]; then \
|
||||||
cp /root/vitastor/qemu-5.0-vitastor.patch /root/qemu-build/qemu-5.0/debian/patches; \
|
cp /root/vitastor/qemu-5.0-vitastor.patch /root/build/qemu-buster/qemu-5.0/debian/patches; \
|
||||||
echo qemu-5.0-vitastor.patch >> /root/qemu-build/qemu-5.0/debian/patches/series; \
|
echo qemu-5.0-vitastor.patch >> /root/build/qemu-buster/qemu-5.0/debian/patches/series; \
|
||||||
else \
|
else \
|
||||||
cp /root/vitastor/qemu-5.1-vitastor.patch /root/qemu-build/qemu-*/debian/patches; \
|
cp /root/vitastor/qemu-5.1-vitastor.patch /root/build/qemu-buster/qemu-*/debian/patches; \
|
||||||
echo qemu-5.1-vitastor.patch >> /root/qemu-build/qemu-*/debian/patches/series; \
|
echo qemu-5.1-vitastor.patch >> /root/build/qemu-buster/qemu-*/debian/patches/series; \
|
||||||
fi; \
|
fi; \
|
||||||
cd /root/qemu-build/qemu-*/; \
|
cd /root/build/qemu-buster/qemu-*/; \
|
||||||
V=$(head -n1 debian/changelog | perl -pe 's/^.*\((.*?)(~bpo[\d\+]*)\).*$/$1/')~vitastor1; \
|
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'; \
|
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D buster -v $V 'Plug Vitastor block driver'; \
|
||||||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto; \
|
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto; \
|
||||||
rm -rf /root/qemu-build/qemu-*/
|
rm -rf /root/build/qemu-buster/qemu-*/
|
||||||
|
|
||||||
|
RUN cd /root/build/qemu-buster && apt-get -y -t buster-backports install ./qemu-system-data*.deb ./qemu-system-common_*.deb ./qemu-system-x86_*.deb ./qemu_*.deb
|
||||||
|
|
||||||
|
ADD . /root/vitastor
|
||||||
|
RUN set -e; \
|
||||||
|
mkdir -p /root/fio-build/; \
|
||||||
|
cd /root/fio-build/; \
|
||||||
|
rm -rf /root/fio-build/*; \
|
||||||
|
dpkg-source -x /root/fio*.dsc; \
|
||||||
|
cd /root/build/qemu-buster/; \
|
||||||
|
rm -rf qemu*/; \
|
||||||
|
dpkg-source -x qemu*.dsc; \
|
||||||
|
cd /root/build/qemu-buster/qemu*/; \
|
||||||
|
debian/rules b/configure-stamp; \
|
||||||
|
cd b/qemu; \
|
||||||
|
make -j8 qapi; \
|
||||||
|
mkdir -p /root/build/vitastor-buster; \
|
||||||
|
rm -rf /root/build/vitastor-buster/*; \
|
||||||
|
cd /root/build/vitastor-buster; \
|
||||||
|
cp -r /root/vitastor vitastor-0.5; \
|
||||||
|
ln -s /root/build/qemu-buster/qemu-*/ vitastor-0.5/qemu; \
|
||||||
|
ln -s /root/fio-build/fio-*/ vitastor-0.5/fio; \
|
||||||
|
cd vitastor-0.5; \
|
||||||
|
sh copy-qemu-includes.sh; \
|
||||||
|
sh copy-fio-includes.sh; \
|
||||||
|
rm qemu fio; \
|
||||||
|
mv qemu-copy qemu; \
|
||||||
|
mv fio-copy fio; \
|
||||||
|
rm -rf /root/build/qemu-buster/qemu*/; \
|
||||||
|
cd /root/build/vitastor-buster; \
|
||||||
|
tar -czf vitastor_0.5.orig.tar.gz vitastor-0.5; \
|
||||||
|
cd vitastor-0.5; \
|
||||||
|
ls -l; \
|
||||||
|
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto; \
|
||||||
|
rm -rf /root/build/vitastor-buster/vitastor-*/
|
||||||
|
|
Loading…
Reference in New Issue