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

相关推荐
IT_10243 小时前
Spring Boot项目开发实战销售管理系统——系统设计!
大数据·spring boot·后端
ai小鬼头4 小时前
AIStarter最新版怎么卸载AI项目?一键删除操作指南(附路径设置技巧)
前端·后端·github
Touper.4 小时前
SpringBoot -- 自动配置原理
java·spring boot·后端
一只叫煤球的猫4 小时前
普通程序员,从开发到管理岗,为什么我越升职越痛苦?
前端·后端·全栈
一只鹿鹿鹿4 小时前
信息化项目验收,软件工程评审和检查表单
大数据·人工智能·后端·智慧城市·软件工程
专注VB编程开发20年5 小时前
开机自动后台运行,在Windows服务中托管ASP.NET Core
windows·后端·asp.net
程序员岳焱5 小时前
Java 与 MySQL 性能优化:MySQL全文检索查询优化实践
后端·mysql·性能优化
一只叫煤球的猫5 小时前
手撕@Transactional!别再问事务为什么失效了!Spring-tx源码全面解析!
后端·spring·面试
旷世奇才李先生6 小时前
Ruby 安装使用教程
开发语言·后端·ruby
沃夫上校9 小时前
Feign调Post接口异常:Incomplete output stream
java·后端·微服务