rpmbuild + git

Paula Ferlini <[email protected]> Thu, 9 Sep 2010 14:57:25 -0300
Newsgroups gmane.linux.mandrake.newbie
Message-ID <[email protected]>
--001485f27432096f2c048fd75e30
Content-Type: text/plain; charset=ISO-8859-1

Hey all,

 I'm trying to understand how git and rpmbuild integration works in
Mandriva. Everything in this post is based on what I read in
http://wiki.mandriva.com/en/Rpmbuild_and_git
 I created a project in a git repository. This project is a rpm package that
I installed, and now I wanna start to work on it, making changes.
 OK, then I made the setup steps, like, changing the spec file to have the
%git_get_source line just like the wiki says to do.
 Then I tried to apply some patches in the project with git apply, and git
commit. Everything ok.
 Now, the problem: when I try to build the project again (rpmbuild -ba..) it
fails, of course, because it tries to apply the patches that are in the spec
files, and these  patches are already applied. So, is this rpmbuild + git
not suppose to have patches in the spec file? Or am I missing something?
 I also tried to build with --with git_repository option, but it does not
work. And I didn't understand pretty well how it works:

  %_after_setup %{?_with_git_repository:GIT_URL="%{?git_url}"
GIT_REPOSITORY_CACHE=%{?git_repository_cache}
/usr/lib/rpm/mandriva/git-repository--after-tarball}
  %_patch %{?_with_git_repository:PKG_NAME=%{name}
/usr/lib/rpm/mandriva/git-repository--apply-patch}%{?!_with_git_repository:%__patch
-U}

 this macros, _after_setup and _patch, when they are called? I'm assuming
that _patch is not the same as __patch, and the __patch macro is the one
that is defined to really patch.


Thanks in advance,

Paula.
____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

--001485f27432096f2c048fd75e30
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hey all,<br><br>=A0I&#39;m trying to understand how git and rpmbuild integr=
ation works in Mandriva. Everything in this post is based on what I read in=
 <a href=3D"http://wiki.mandriva.com/en/Rpmbuild_and_git">http://wiki.mandr=
iva.com/en/Rpmbuild_and_git</a><br>

=A0I created a project in a git repository. This project is a rpm package t=
hat I installed, and now I wanna start to work on it, making changes.<br>=
=A0OK, then I made the setup steps, like, changing the spec file to have th=
e %git_get_source line just like the wiki says to do.<br>

=A0Then I tried to apply some patches in the project with git apply, and gi=
t commit. Everything ok.<br>=A0Now, the problem: when I try to build the pr=
oject again (rpmbuild -ba..) it fails, of course, because it tries to apply=
 the patches that are in the spec files, and these=A0 patches are already a=
pplied. So, is this rpmbuild + git not suppose to have patches in the spec =
file? Or am I missing something? <br>

=A0I also tried to build with --with git_repository option, but it does not=
 work. And I didn&#39;t understand pretty well how it works:<br><br>=A0 %_a=
fter_setup %{?_with_git_repository:GIT_URL=3D&quot;%{?git_url}&quot; GIT_RE=
POSITORY_CACHE=3D%{?git_repository_cache} /usr/lib/rpm/mandriva/git-reposit=
ory--after-tarball}<br>

=A0 %_patch %{?_with_git_repository:PKG_NAME=3D%{name} /usr/lib/rpm/mandriv=
a/git-repository--apply-patch}%{?!_with_git_repository:%__patch -U}<br><br>=
=A0this macros, _after_setup and _patch, when they are called? I&#39;m assu=
ming that _patch is not the same as __patch, and the __patch macro is the o=
ne that is defined to really patch.<br>

<br><br>Thanks in advance,<br><br>Paula.<br>

--001485f27432096f2c048fd75e30--