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

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





On 05/12/2017 02:45, Drew Parsons wrote:
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...

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)

Hi.
I quite like the solution of using a clone of upstream...
So I did clone the upstream repo, checked out the relevant branch and copied over the debian/ directory from the debian git repo that I had used to build the local copy of the experimental package. I also had to copy over the "docs" directory (maybe it needs to be generated in the upstream repo, but I am not concerned with docs right now). In the same spirit I replaced debian/docs.patch with an empy file since it would not apply and had no will to invetigate why at present (probably since I copied over the "docs" dir where the patch had been already applied).
Then I modified debian/rules updating the version number in
     export PETSC_VERSION=3.8.2$(PETSC_EXT)
and removing the line of scotch-related options in CONFIGURATION_OPTIONS (again, it would error out and I decided to press on without investigating...)
Now
    dh_quilt_patch
completes without errors and
    fakeroot debian/rules binary
seems to build the 4 packages (real/complex, dev/dbg) but then errors out:

====================================
Copy to DESTDIR /home/matteo/software/petsc/debian/tmp/petsc3.8-complex-debug/usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-complex-debug is now complete. Before use - please copy/install over to specified prefix: /usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-complex-debug
====================================
/usr/bin/make  --no-print-directory PETSC_ARCH=x86_64-linux-gnu-complex-debug PETSC_DIR=/home/matteo/software/petsc mpi4py-install petsc4py-install
make[3]: Nothing to be done for 'mpi4py-install'.
make[3]: Nothing to be done for 'petsc4py-install'.
make[2]: Leaving directory '/home/matteo/software/petsc'
make[1]: Leaving directory '/home/matteo/software/petsc'
   debian/rules override_dh_install
make[1]: Entering directory '/home/matteo/software/petsc'
dh_install -plibpetsc-real3.8 --sourcedir debian/tmp/petsc3.8-real --exclude=*html /usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-real/lib/libpetsc_real.so.3.8.2 usr/lib/x86_64-linux-gnu dh_install: Cannot find (any matches for) "/usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-real/lib/libpetsc_real.so.3.8.2" (tried in "debian/tmp/petsc3.8-real" and "debian/tmp") dh_install: libpetsc-real3.8 missing files: /usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-real/lib/libpetsc_real.so.3.8.2
dh_install: missing files, aborting
debian/rules:249: recipe for target 'override_dh_install' failed
make[1]: *** [override_dh_install] Error 2
make[1]: Leaving directory '/home/matteo/software/petsc'
debian/rules:119: recipe for target 'binary' failed
make: *** [binary] Error 2

The cause of the error is that the files are named .3.08.2 instead of .3.8.2:

$ ls debian/tmp/petsc3.8-real//usr/lib/petscdir/petsc3.8/x86_64-linux-gnu-real/lib/ libpetsc_real.so  libpetsc_real.so.3.08  libpetsc_real.so.3.08.2 petsc  pkgconfig

Do you have any hints?

Best,
    Matteo


Reply to: