SOURCE RPM打补丁编译,自己增加补丁

spec文件变更

 1 D:\qemu-kvm-ev>diff -Nuar qemu-kvm-old.spec qemu-kvm.spec
 2 --- qemu-kvm-old.spec   2023-02-14 13:02:49.000000000 +0800
 3 +++ qemu-kvm.spec       2023-03-14 20:51:36.740264300 +0800
 4 @@ -7,7 +7,7 @@
 5  %global have_spice    1
 6  %global have_opengl   1
 7  %global have_fdt      0
 8 -%global have_gluster  1
 9 +%global have_gluster  0
10  %global have_kvm_setup 0
11  %global have_seccomp 1
12  %global have_memlock_limits 0
13 @@ -2006,6 +2006,8 @@
14  Patch921: kvm-e1000-don-t-raise-interrupt-in-pre_save.patch
15  # For bz#2165681 - [qemu-kvm bug] Guest's time jumped forward by 12 minutes _after_ live-migration completes (in 30 seconds) [rhel-7.9.z]
16  Patch922: kvm-kvmclock-read-clock-value-from-guest-memory-if-sourc.patch
17 +# qemu live-migration-kvm coredump [rhel-7.9.z]
18 +Patch923: char-socket-null_pointer.patch
19 
20  BuildRequires: zlib-devel
21  BuildRequires: glib2-devel
22 @@ -3146,6 +3148,8 @@
23  %patch920 -p1
24  %patch921 -p1
25  %patch922 -p1
26 +%patch923 -p1
27 +

 1 diff  -Nuar a/chardev/char-socket.c  b/chardev/char-socket.c
 2 --- a/chardev/char-socket.c     2023-03-14 20:36:09.910360722 +0800
 3 +++ b/chardev/char-socket.c     2023-03-14 20:36:34.551591389 +0800
 4 @@ -348,6 +348,9 @@
 5  static GSource *tcp_chr_add_watch(Chardev *chr, GIOCondition cond)
 6  {
 7      SocketChardev *s = SOCKET_CHARDEV(chr);
 8 +    if (!s->ioc) {
 9 +        return NULL;
10 +    }
11      return qio_channel_create_watch(s->ioc, cond);
12  }

编译rpm

 1 /usr/bin/cp -rf * /root/rpmbuild/SOURCES/ 2 3 4 5 rpmbuild -bb ./qemu-kvm.spec 

 

 
posted @ 2023-03-14 22:27  maojun1998  阅读(53)  评论(0编辑  收藏  举报