[devel] git Howto

Pavel Solntsev p_solntsev_devel на meta.ua
Чт Июн 11 13:24:41 MSD 2009


Изучаю git.

Задача:
научится создавать рабочие патчи.

имеем:
branch 5.0

$ mkdir molden && cd molden
$ git init-db
$ cp ....../molden-4.7.tar.gz .
$ tar zxvf molden-4.7.tar.gz
$ mv molden-4.7 moden
$ cp ....../molden.spec .
$ mkdir .gear
$ echo "tar.gz: moden" > .gear/rules
$ git add .
$ git commit -a -m "First build for git. Small bug fix"
$ vim molden/xwin.c (правим: заменяем linkat на linkat_new)
$ rm -f molden/xwin.c~
$ git commit -a -m "Edit xwin.c file"
$ git diff > olden-glibc-2.10.patch # git diff -p тоже использовался
$ git add olden-glibc-2.10.patch
$ echo "copy: *.patch" >> .gear/rules
$ gear --rpmbuild -- rpm -ba
Выполняется(%prep): /bin/sh -e /home/group/RPM/tmp/rpm-tmp.46848
+ umask 022
+ /bin/mkdir -p /home/group/RPM/BUILD
+ cd /home/group/RPM/BUILD
+ cd /home/group/RPM/BUILD
+ rm -rf molden-4.7
+ echo 'Source #0 (molden-4.7.tar.gz):'
Source #0 (molden-4.7.tar.gz):
+ /bin/gzip -dc /home/group/tmp/gear.673MXzhj/out/molden-4.7.tar.gz
+ /bin/tar -xf -
+ cd molden-4.7
+ /bin/chmod -c -Rf u+rwX,go-w .
+ echo 'Patch #0 (molden-glibc-2.10.patch):'
Patch #0 (molden-glibc-2.10.patch):
+ /usr/bin/patch -p1
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/molden/xwin.c b/molden/xwin.c
|index 9333498..706c109 100644
|--- a/molden/xwin.c
|+++ b/molden/xwin.c
--------------------------
File to patch:

И все.

в спеке

...
Patch0:         %name-glibc-2.10.patch
...
%patch -p1
...









Подробная информация о списке рассылки Devel