opennebula 補丁製做與補丁升級

參考文章:
http://www.cnblogs.com/itech/archive/2009/08/19/1549729.html
http://www.ibm.com/developerworks/cn/linux/l-diffp/html

1、創建源碼包和工做包
[root@opennebula opennebula-dcloud]# ls -l
total 12
drwxrwxr-x 5 root root 4096 Jun 11 21:36 opennebula-4.6.2 #官方源碼
drwxr-xr-x. 5 root root 4096 Sep 28 18:03 opennebula-4.6.2-patched #開發工做目錄,新的分支
drwxr-xr-x. 3 root root 4096 Sep 23 14:27 scripts
[root@opennebula opennebula-dcloud]# linux


2、比較修改的源碼,並將其製做成patched
diff -uNr opennebula-4.6.2 opennebula-4.6.2-patched > opennebula-4.6.2-patched.patched測試

3、測試patched
mkdir testpatch
[root@opennebula testpatch]# ls -al
total 12
drwxr-xr-x 3 root root 4096 Oct 10 10:16 .
dr-xr-x---. 41 root root 4096 Oct 10 10:08 ..
drwxr-xr-x 5 root root 4096 Oct 10 10:17 opennebula-4.6.2
[root@opennebula testpatch]# cd opennebula-4.6.2/
[root@opennebula opennebula-4.6.2]# ls #測試補丁目錄
include install.sh LICENSE NOTICE opennebula-4.6.2-patched.patched README.md SConstruct share src
[root@opennebula opennebula-4.6.2]#patch -p1 < opennebula-4.6.2-patched.patched #開始打補丁htm

相關文章
相關標籤/搜索