Re: Evolving standards for unpacked sources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/30/2012 09:42 AM, Richard W.M. Jones wrote:
On Wed, May 30, 2012 at 09:33:06AM -0400, Peter Jones wrote:
On 05/29/2012 05:58 PM, Richard W.M. Jones wrote:
On Tue, May 29, 2012 at 09:57:46PM +0200, Hans Ulrich Niedermann wrote:
On 29/05/12 18:46, Richard W.M. Jones wrote:

Has anyone written any tools for converting git repos into patches?
Currently I use 'git format-patch' and then I copy the patches.

Should we have a naming convention for patches?  I proposed to use
the 000*-*.patch files directly from git format-patch without
renaming them.

How should we comment the spec files for packages maintained this way?

For Fedora's "erlang" package, Peter Lemenkov and I have been doing
something similar. This is probably not suitable for large scale
emulation, but it more or less works for us.

We both maintain a fork of upstream's Erlang/OTP git repository in our
respective github accounts. The RPMs are built from upstream's release
tarballs plus Fedora specific patch files. Whoever does the new Fedora
package, creates a fedora specific branch (re)based on that release's
git tag and commits the patches for the RPM to that branch (doing
cherry-pick, rebase, or whatever).

The otp-get-patches.sh script extracts the commits on that fedora
specific branch as patch files, hooks those into the spec file and also
changes the git index to account for old patch files removed and new
ones added. Specific lines from the commit messages are copied into the
spec files as comments, and as RPM %if... conditionals.

See the source in erlang.spec and otp-get-patches.sh for details.

Thanks, I will have a look.

Here is the change (simplification, really) I made to ocaml.spec:

http://pkgs.fedoraproject.org/gitweb/?p=ocaml.git;a=commitdiff;h=a07112286bf310652eb2d719e64bf4936a045bc1

Just glancing at what you've got - have you considered something like:

diff --git a/ocaml.spec b/ocaml.spec
index bbf2669..2ab0ecc 100644
--- a/ocaml.spec
+++ b/ocaml.spec
@@ -233,9 +233,13 @@ man pages and info files.
  git init
  git config user.email "noone@xxxxxxxxxxx"
  git config user.name "no one"
+git config sendemail.to "%{name}-owner@xxxxxxxxxxxxxxxxx"

According to the docs, this would send email to the package owner if
'git send-email' was used.  But since git-send-email isn't being used,
doesn't it do nothing?

Well, it isn't by you.  But it means if somebody does "rpmbuild -bp" and works
on a patch in build/BUILD/%{name}-%{version} , they can just commit and run
"git send-email" without having to find the other tree.  Anyway, I find it
useful, but it's your package :)


  git add .
  git commit -a -q -m "%{version} baseline"
  git am %{patches}
+git config --unset user.email
+git config --unset user.name
+echo "Use 'git config user.email \"foo@xxxxxxxxxxx\" to set an address for patc

I guess the last line was clipped.

Yes.  Should have ended with 'es."'

--
        Peter
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux