git diff > test.patch
git format-patch
不要再用diff命令 对比生成patch了,太土
原来的rpm制作,打patch方法(土):
http://blog.csdn.net/qq_26437925/article/details/73864258
centos下 rpm制作
运行环境
[root@localhost myrpm_build]# uname -a
Linux localhost 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
不同的运行环境需要调整自己的spec文件
[root@localhost myrpm_build]# tree helloworld-0.1
helloworld-0.1
├── configure
├── helloworld.c
└── readme
0 directories, 3 files
[root@localhost myrpm_build]#
configure
#!/bin/sh
cat >Makefile << EOF
all:helloworld
helloworld.o:helloworld.c
gcc -c helloworld.c
helloworld:helloworld.o
gcc helloworld.o -o helloworld
fresh:
rm -f Makefile
clean:
rm -f helloworld helloworld.o
install:
cp helloworld /usr/bin
uninstall:
rm -f /usr/bin/helloworld
EOF
helloword.c