Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

big changes for pve-qemu-kvm: 8.1.2-1,please update,thanks #11

Closed
gamma05772 opened this issue Nov 18, 2023 · 10 comments
Closed

big changes for pve-qemu-kvm: 8.1.2-1,please update,thanks #11

gamma05772 opened this issue Nov 18, 2023 · 10 comments

Comments

@gamma05772
Copy link

big changes for pve-qemu-kvm: 8.1.2-1,please update,thanks

@gamma05772
Copy link
Author

[Inject]Surprised Detector's Mother Fucker !!!

patch -p1 < 001-anti-detection.patch
patching file block/vhdx.c
patching file block/vvfat.c
patching file chardev/msmouse.c
patching file chardev/wctablet.c
patching file contrib/vhost-user-gpu/vhost-user-gpu.c
Hunk #1 succeeded at 1251 (offset 61 lines).
patching file hw/acpi/aml-build.c
patching file hw/acpi/vmgenid.c
patching file hw/arm/nseries.c
patching file hw/arm/sbsa-ref.c
Hunk #1 FAILED at 851.
1 out of 1 hunk FAILED -- saving rejects to file hw/arm/sbsa-ref.c.rej
patching file hw/audio/hda-codec.c
patching file hw/char/escc.c
Hunk #1 succeeded at 1037 (offset 78 lines).
patching file hw/display/edid-generate.c
patching file hw/i386/acpi-build.c
Hunk #1 succeeded at 947 (offset 4 lines).
Hunk #2 succeeded at 1772 (offset 1 line).
patching file hw/i386/pc_piix.c
Hunk #1 FAILED at 198.

看起来您正在尝试使用 patch 命令应用一个补丁,但是有一些补丁未能成功应用。让我们来分析一下输出:

成功的补丁:

block/vhdx.c、block/vvfat.c、chardev/msmouse.c等文件成功地被应用了补丁。
部分成功:

contrib/vhost-user-gpu/vhost-user-gpu.c 在偏移量1251处成功应用了一个补丁。
hw/acpi/aml-build.c 有一些成功的补丁。
hw/char/escc.c 在偏移量1037处成功应用了一个补丁。
失败的补丁:

hw/arm/sbsa-ref.c 在偏移量851处有一个失败的补丁。它无法应用,并且创建了一个拒绝文件 hw/arm/sbsa-ref.c.rej。
hw/i386/pc_piix.c 在偏移量198处有一个失败的补丁。
当一个补丁失败时,意味着补丁中的更改与原始文件中预期应用补丁的行不匹配。这可能是因为原始文件中的代码已被修改,导致其与补丁中的更改不兼容。

您可能需要手动解决这些失败的部分。打开拒绝文件(在这种情况下是 hw/arm/sbsa-ref.c.rej)以查看冲突的更改。在解决冲突后,您可以重新应用补丁。

请注意,手动解决可能涉及理解补丁和拒绝文件中更改的上下文,并决定如何合并或修改代码以使其生效。

@zhaodice
Copy link
Owner

zhaodice commented Nov 20, 2023

It it looks like a endless work, maybe we can create a program to deal with the future versions.

@zhaodice zhaodice pinned this issue Nov 20, 2023
@gamma05772
Copy link
Author

Good idea, this is what we have been dreaming of.

@rayanmestiri
Copy link

rayanmestiri commented Dec 18, 2023

@gamma05772 In the meantime, you can grab the patch for 8.1.0 in the qemu-anti-detection repo : https://github.com/zhaodice/qemu-anti-detection/blob/main/qemu-8.1.0.patch. They're same patches for qemu used here.

I successfully built the qemu deb on proxmox 8.1 like this.

@gamma05772
Copy link
Author

@rayanmestiri Thank you very much. I compiled pve-qemu-kvm 8.1.3-5 successfully by using your method.

@crypticnewbie
Copy link

@rayanmestiri Thank you very much. I compiled pve-qemu-kvm 8.1.3-5 successfully by using your method.

Hello, would it be possible to provide a step-by-step guide on how to do that? I would like to try but I am not proficient with this kind of tinkering.

@gamma05772
Copy link
Author

1.Login System

2.Remove the old:

mv /etc/apt/sources.list /etc/apt/sources.list.deleted
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.deleted

3.1.nano /etc/apt/sources.list

deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
#pve源
deb https://mirrors.ustc.edu.cn/proxmox/debian bookworm pve-no-subscription
#ceph源
#deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm main
#开发源,必须
deb https://mirrors.ustc.edu.cn/proxmox/debian/devel bookworm main

3.2 nano /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise

3.3 nano /etc/apt/sources.list.d/ceph.list
#deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription

3.4 nano /etc/apt/sources.list.d/pve-no-subscription.list
deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription

3.5 update & upgrade your systtem
apt update -y && apt dist-upgrade -y

4.(This patch is made at commit f366bb97ae67910cb36a9f6e36d26e8d6070ad57)
git clone git://git.proxmox.com/git/pve-qemu.git
cd pve-qemu
git reset --hard f366bb97ae67910cb36a9f6e36d26e8d6070ad57
apt install devscripts
mk-build-deps --install

5.Open your webbrowser ,visit "https://github.com/zhaodice/qemu-anti-detection/blob/main/qemu-8.1.0.patch",download raw file ,copy the file to ./qemu/001-anti-detection.patch

  1. nano debian/rules
    FIND LINE:

    guest-agent is only required for guest systems

Inject a line :
# [Inject]Surprised Detector's Mother Fucker !!!
patch -p1 < 001-anti-detection.patch

# guest-agent is only required for guest systems
...
  1. Current folder is git's root path and make it
    make clean
    make

  2. install deb
    dpkg -i --force-all pve-qemu-kvm_8.1.2-6_amd64.deb

@mustafa1750
Copy link

Dude, do you have a chance to explain what you did in a video? I'm getting errors in some places, something is wrong.

@vavasoul
Copy link

vavasoul commented Feb 18, 2024

@gamma05772 Hi, I get this kind of output at the end. I am new to git. Can you please tell me what's wrong? I tried on different versions and on proxmox 8.0.2 with zhadoice steps , now updated to 8.1.4 and have same errors

root@pve1:/pve-qemu# make clean
rm -rf pve-qemu-kvm-[0-9]/ pve-qemu-kvm.tar* *.deb *.dsc *.build *.buildinfo *.changes
root@pve1:
/pve-qemu# make
git submodule update --init --recursive
Submodule 'qemu' (git://git.proxmox.com/git/mirror_qemu) registered for path 'qemu'
fatal: destination path '/root/pve-qemu/qemu' already exists and is not an empty directory.
fatal: clone of 'git://git.proxmox.com/git/mirror_qemu' into submodule path '/root/pve-qemu/qemu' failed
Failed to clone 'qemu'. Retry scheduled
fatal: destination path '/root/pve-qemu/qemu' already exists and is not an empty directory.
fatal: clone of 'git://git.proxmox.com/git/mirror_qemu' into submodule path '/root/pve-qemu/qemu' failed
Failed to clone 'qemu' a second time, aborting
make: *** [Makefile:21: submodule] Error 1
root@pve1:~/pve-qemu#

@JoaGamo
Copy link

JoaGamo commented Mar 3, 2024

@gamma05772 Hi, I get this kind of output at the end. I am new to git. Can you please tell me what's wrong? I tried on different versions and on proxmox 8.0.2 with zhadoice steps , now updated to 8.1.4 and have same errors

root@pve1:/pve-qemu# make clean rm -rf pve-qemu-kvm-[0-9]/ pve-qemu-kvm.tar* *.deb *.dsc *.build *.buildinfo *.changes root@pve1:/pve-qemu# make git submodule update --init --recursive Submodule 'qemu' (git://git.proxmox.com/git/mirror_qemu) registered for path 'qemu' fatal: destination path '/root/pve-qemu/qemu' already exists and is not an empty directory. fatal: clone of 'git://git.proxmox.com/git/mirror_qemu' into submodule path '/root/pve-qemu/qemu' failed Failed to clone 'qemu'. Retry scheduled fatal: destination path '/root/pve-qemu/qemu' already exists and is not an empty directory. fatal: clone of 'git://git.proxmox.com/git/mirror_qemu' into submodule path '/root/pve-qemu/qemu' failed Failed to clone 'qemu' a second time, aborting make: *** [Makefile:21: submodule] Error 1 root@pve1:~/pve-qemu#

The workaround i've found on another issue is simply moving the .patch to the main git folder /pve-qemu, doing the git submodule update command you did, then moving back the .patch to qemu/ and continue with compiling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants