linux下对rpm源码手工打补丁
时间:
2019-08-23 19:11:37
阅读:
123
评论:
收藏:
0
[点我收藏+]
标签:stat set ola 文件中 int src path 源码 over
基本命令语法:
patch [-R] {-p(n)} [--dry-run] < patch_file_name
p:为path的缩写。
n:指将patch文件中的path第n条’/’及其左边部分取消。
-R:卸载patch包。
--dry-run:尝试patch软件,并不真正修改软件。
使用实例:
/home/sense/patch-2.6.19.1
=============================================================
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index d12fb97..c8f96cf 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -333,7 +333,7 @@ acpi_parse_ioapic(acpi_table_entry_heade
/*
* Parse Interrupt Source Override for the ACPI SCI
*/
-static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigger)
+static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
=============================================================
此patch文件的path=a/arch/i386/kernel/acpi
[sense@ssn src]$ pwd
/usr/src
[sense@ssn src]$ tree
.
`-- a
`-- arch
`-- i386
`-- kernel
`-- acpi
和a/同目录时:
[sense@ssn src]$ pwd
/usr/src
[sense@ssn src]$ patch -p0 < /home/sense/patch-2.6.19.1 安装补丁
[sense@ssn src]$ patch -p0 -R < /home/sense/patch-2.6.19.1 卸载补丁
和a/arch/同目录时:
[sense@ssn src]$ pwd
/usr/src/a/
[sense@ssn src]$ patch -p1 < /home/sense/patch-2.6.19.1 安装补丁
[sense@ssn src]$ patch -p1 -R < /home/sense/patch-2.6.19.1 卸载补丁
和a/arch/i386/同目录时:
[sense@ssn src]$ pwd
/usr/src/a/arch/
[sense@ssn src]$ patch -p2 < /home/sense/patch-2.6.19.1 安装补丁
[sense@ssn src]$ patch -p2 -R < /home/sense/patch-2.6.19.1 卸载补丁
linux下对rpm源码手工打补丁
标签:stat set ola 文件中 int src path 源码 over
原文地址:https://www.cnblogs.com/noxy/p/11401923.html