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

Re: custom petsc package based on "next" upstream release



On Mon, 2017-12-04 at 19:39 +0100, Christophe Trophime wrote:
> ----- Original Message -----
> > From: "Matteo Semplice" <matteo.semplice@unito.it>
> > To: "Debian Science List" <debian-science@lists.debian.org>
> > Sent: Monday, December 4, 2017 6:56:40 PM
> > Subject: custom petsc package based on "next" upstream release
> > 
> > Hi,
> > 
> > this is really a question on Debian package build, but since the
> > package
> > in question is petsc, I'll try here...
> > 
> > I have cloned locally the debian git repository for petsc since I
> > had to
> > locally modify it for my needs (see "petsc interface to other
> > packages"
> > few weeks ago on this list).
> > 
> > In the meanwhile I have found a bug in petsc, it has been fixed
> > upstream
> > and they are asking me to test the fix. I see 2 options:
> > 
> > 1) clone the upstream git in a virtual machine (i.e. no debian
> > package),
> > build and test... which I can always do, but in case I like the fix
> > it
> > would not give me a Debian package to install on my main machine)
> > 
> > 2) build a new debian package based on the "next" upstream branch,
> > which
> > would require to update/create a new branch in my local git clone
> > of the
> > debian repo so that I can base my build on the correct upstream
> > branch.
> > 
> > Is option 2 feasible (and not too involved?)... if so, would you
> > give me
> > some hints?
> 
> I think there is a convention for the patches that say that 00-
> patch.patch
> is a patch submitted to upstream. Sticking to this convention may
> help to solve
> your issue if your patch apply to "standard" petsc...

Following on from Christophe's comment, our build system uses quilt to
manage patches. You could use that manually to help form any patch you
want to add, if needed (including, to refresh other patches if
necessary).  

However you create the patch (git commit diffs might work directly),
the main thing is to make sure your patch is placed in debian/patches
in order for it to get applied by a build using dpkg-buildpackage.  

You can test it applies smoothly using dh_quilt_patch (and
dh_quilt_unpatch to restore back to original)

If you do a "manual" build using fakeroot debian/rules binary, then
you'll need to manually run dh_quilt_patch beforehand.

But answering more directly about your option 2, working off upstream's
next branch will probably work without too much trouble.  You'd copy
the debian dir across and update the changelog.  You may have to
refresh the existing patches (e.g. applying quilt as discussed above)

Drew


Reply to: