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...

相关推荐
fox_lht5 分钟前
第一章 不可变的变量
开发语言·后端·rust
舒一笑4 小时前
PandaCoder:致敬MyBatis Log Plugin,但我们做得更极致!
后端·程序员·intellij idea
简单点了6 小时前
go前后端项目的启动 、打包和部署
开发语言·后端·golang
雨夜之寂7 小时前
mcp java实战 第一章-第一节-MCP协议简介.md
java·后端
摇滚侠7 小时前
Spring Boot 3零基础教程,WEB 开发 Thymeleaf 核心语法 笔记39
spring boot·笔记·后端·thymeleaf
Code blocks9 小时前
GB28181视频服务wvp搭建(二)
后端·音视频
码事漫谈9 小时前
C++与C#布尔类型深度解析:从语言设计到跨平台互操作
后端
程序新视界9 小时前
在MySQL中,一条SQL语句的执行全流程是怎样的?
数据库·后端·mysql
lang201509289 小时前
打造专属Spring Boot Starter
java·spring boot·后端
码事漫谈10 小时前
解决Python调用C++ DLL失败的问题:extern "C"的关键作用
后端