compile libvirt

bash 复制代码
apt-get update
apt-get install build-essential
apt-get install dpkg-dev
apt-get build-dep libvirt
apt-get source --compile libvirt

apt-get source --compile libvirt 默认构建的方式是从已安装的版本构建,但是有时候需要从 github 构建, 这个命令不可行, 但是往往使用的起点都是 apt 安装好,然后发现 bug,然后尝试修复,然后回合到社区。

可以考虑把自己修复的 patch 放入这些目录下,然后继续构建。

可以看到 Debian 把 libvirt 当作上游已经有很多自己的 patch:

  • backport:有回合的代码
  • 也有属于自己操作系统定制的代码
  • 也有目前自己修改的代码

dpkg-source: info: extracting libvirt in libvirt-9.0.0

dpkg-source: info: unpacking libvirt_9.0.0.orig.tar.xz

dpkg-source: info: unpacking libvirt_9.0.0-4+deb12u2.debian.tar.xz

dpkg-source: info: using patch list from debian/patches/series

dpkg-source: info: applying backport/apparmor-Allow-umount-dev.patch

dpkg-source: info: applying backport/qemu_interface-Fix-managed-no-case-when-creating-an-ether.patch

bash 复制代码
▶ head -n 50 /tmp/build.log
Reading package lists...
NOTICE: 'libvirt' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/libvirt-team/libvirt.git
Please use:
git clone https://salsa.debian.org/libvirt-team/libvirt.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 9,111 kB of source archives.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main libvirt 9.0.0-4+deb12u2 (dsc) [5,537 B]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main libvirt 9.0.0-4+deb12u2 (tar) [9,007 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main libvirt 9.0.0-4+deb12u2 (asc) [833 B]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main libvirt 9.0.0-4+deb12u2 (diff) [98.0 kB]
dpkg-source: info: extracting libvirt in libvirt-9.0.0
dpkg-source: info: unpacking libvirt_9.0.0.orig.tar.xz
dpkg-source: info: unpacking libvirt_9.0.0-4+deb12u2.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying backport/apparmor-Allow-umount-dev.patch
dpkg-source: info: applying backport/qemu_interface-Fix-managed-no-case-when-creating-an-ether.patch
dpkg-source: info: applying backport/qemu_domain-Don-t-unref-NULL-hash-table-in-qemuDomainRefr.patch
dpkg-source: info: applying backport/qemu-Jump-to-cleanup-label-on-umount-failure.patch
dpkg-source: info: applying backport/qemu_namespace-Deal-with-nested-mounts-when-umount-ing-de.patch
dpkg-source: info: applying backport/qemuProcessRefreshDisks-Don-t-skip-filling-of-disk-inform.patch
dpkg-source: info: applying backport/qemu_extdevice-Do-cleanup-host-only-for-VIR_DOMAIN_TPM_TY.patch
dpkg-source: info: applying backport/qemu-blockjob-Handle-pending-blockjob-state-only-when-we-.patch
dpkg-source: info: applying backport/rpc-client-Don-t-check-return-value-of-virNetMessageNew.patch
dpkg-source: info: applying backport/rpc-Don-t-warn-about-max_client_requests-in-single-thread.patch
dpkg-source: info: applying backport/conf-Fix-migration-in-some-firmware-autoselection-scenari.patch
dpkg-source: info: applying backport/virpci-Resolve-leak-in-virPCIVirtualFunctionList-cleanup.patch
dpkg-source: info: applying backport/virsh-Make-domif-setlink-work-more-than-once.patch
dpkg-source: info: applying backport/storage-Fix-returning-of-locked-objects-from-virStoragePo.patch
dpkg-source: info: applying backport/Fix-off-by-one-error-in-udevListInterfacesByStatus.patch
dpkg-source: info: applying backport/remote-check-for-negative-array-lengths-before-allocation.patch
dpkg-source: info: applying backport/interface-fix-udev_device_get_sysattr_value-return-value-.patch
dpkg-source: info: applying backport/qemu-domain-Fix-logic-when-tainting-domain.patch
dpkg-source: info: applying backport/qemu_process-Skip-over-non-virtio-non-TAP-NIC-models-when.patch
dpkg-source: info: applying backport/apparmor-Allow-running-i686-VMs-on-Debian-12.patch
dpkg-source: info: applying forward/Skip-vircgrouptest.patch
dpkg-source: info: applying forward/Reduce-udevadm-settle-timeout-to-10-seconds.patch
dpkg-source: info: applying forward/Pass-GPG_TTY-env-var-to-the-ssh-binary.patch
dpkg-source: info: applying debian/Debianize-libvirt-guests.patch
dpkg-source: info: applying debian/Debianize-systemd-service-files.patch
dpkg-source: info: applying debian/apparmor_profiles_local_include.patch
dpkg-source: info: applying debian/Use-sensible-editor-by-default.patch
dpkg-source: info: applying debian/Disable-passt-support.patch
dpkg-buildpackage: info: source package libvirt
dpkg-buildpackage: info: source version 9.0.0-4+deb12u2
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Andrea Bolognani <eof@kiyuko.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using options from libvirt-9.0.0/debian/source/options: --tar-ignore=debian/gbp.conf --tar-ignore=debian/salsa-ci.yml --tar-ignore=debian/scripts
dh clean --builddirectory=/root/gitee/libvirt-9.0.0/debian/build

参考: answers.launchpad.net/ubuntu/+sou...

相关推荐
武子康4 小时前
Java-80 深入浅出 RPC Dubbo 动态服务降级:从雪崩防护到配置中心秒级生效
java·分布式·后端·spring·微服务·rpc·dubbo
舒一笑5 小时前
我的开源项目-PandaCoder迎来史诗级大更新啦
后端·程序员·intellij idea
@昵称不存在6 小时前
Flask input 和datalist结合
后端·python·flask
zhuyasen6 小时前
Go 分布式任务和定时任务太难?sasynq 让异步任务从未如此简单
后端·go
东林牧之6 小时前
Django+celery异步:拿来即用,可移植性高
后端·python·django
超浪的晨7 小时前
Java UDP 通信详解:从基础到实战,彻底掌握无连接网络编程
java·开发语言·后端·学习·个人开发
AntBlack7 小时前
从小不学好 ,影刀 + ddddocr 实现图片验证码认证自动化
后端·python·计算机视觉
Pomelo_刘金8 小时前
Clean Architecture 整洁架构:借一只闹钟讲明白「整洁架构」的来龙去脉
后端·架构·rust
双力臂4048 小时前
Spring Boot 单元测试进阶:JUnit5 + Mock测试与切片测试实战及覆盖率报告生成
java·spring boot·后端·单元测试
midsummer_woo9 小时前
基于spring boot的医院挂号就诊系统(源码+论文)
java·spring boot·后端