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

[MoM] Packaging of gatb-core



Dear Nadiya,

thanks for commiting your packaging attempt for gatb-core which is
a requirement to update minia to its latest version.  Here are some
comments:

  1. Somehow the repository is lacking the upstream and pristine-tar
     branch.  While you could probably do

         git branch upstream
         gbp import-orig --pristine-tar /path/to/gatb-core_1.3.0.orig.tar.gz

     to fix this you might possibly start from scratch as described
     in Debian Med policy[1] in paragraph

         To create a new local git repository

     Both should give you somehow the same result but may be the latter
     is better for educational reasons since this should be the more
     straightforward way to create a repository.  If you start from
     scratch you need to

         ssh git.debian.org "rm -rf /git/debian-med/gatb-core.git"

     first and recreate the repository.

     Hint for creating new repositories on git.debian.org:  I have
     written a script which injects an existing local repository on
     alioth but it relies on correct Vcs-Git field (so read below first)

  2. debian/changelog
     * Please use target distribution UNRELEASED (instead of unstable)
       as long as the package is not uploaded.  This is the flag for
       other developers that this is work in progress.
     * Use your developer ID (identically as it is in debian/control
       field Uploaders as changelog owner instead of DMTP

  3. debian/control
     * I'm usuall doing

          cme fix dpkg-control

       to fix issues in this file.  It is advisable to use cme from
       unstable (and the cme modules mentioned in the policy)
       If you apply thisit leads to the following diff

diff --git a/debian/control b/debian/control
index 8e3ab4e..8fc0440 100644
--- a/debian/control
+++ b/debian/control
@@ -1,17 +1,18 @@
 Source: gatb-core
-Section: science
-Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
 Uploaders: Nadiya Sitdykova <rovenskasa@gmail.com>
+Section: science
+Priority: optional
 Build-Depends: debhelper (>= 10)
-Standards-Version: 3.9.8
-Homepage: https://github.com/GATB/gatb-core
-Vcs-Git: git://anonscm.debian.org/debian-med/gatb-core.git
+Standards-Version: 4.1.1
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/gatb-core.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/gatb-core.git
+Homepage: https://github.com/GATB/gatb-core
 
 Package: gatb-core
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
 Description: The Genome Analysis Toolbox with de-Bruijn graph
  The GATB-CORE project provides a set of highly efficient 
  algorithms to analyse NGS data sets. These methods enable 

      * The cruxial diff item is 
         +Vcs-Git: https://anonscm.debian.org/git/debian-med/gatb-core.git
                   ^^^^^                      ^^^
        If you either use cme (as I would recommend) or at least fix this one
        you can use my script to inject local repositories into git.debian.org
        This can be used by

          svn checkout svn://anonscm.debian.org/debian-med/trunk/helper-scripts /tmp
          /tmp/helper-scripts/inject-into-alioth-git

        which is using the Vcs-Git field.
        (But keep on reading before you do this ...)

  4. debian/copyright
     * I was using
         licensecheck -r *
       and realised that in gatb-core/thirdparty are several code copies of
       third party software like boost, hdf5 and json.  Now comes the tricky
       part of packing since this code should be removed (well, actually you
       only need to make sure it is not used at build time but the most save
       way to make this sure is to remove it and if you would leave it you
       need to document all the licenses in d/copyright which is pretty
       boring for not used code chunks).  The removal of code can be easily
       done as described in the wiki[2].  If you follow this I'd recommend
       the following changes:

diff --git a/debian/changelog b/debian/changelog
index 0518e36..8550ec5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-gatb-core (1.3.0-1) unstable; urgency=medium
+gatb-core (1.3.0+dfsg-1) unstable; urgency=medium
 
   * Initial release (Closes: #873044)  
 
diff --git a/debian/copyright b/debian/copyright
index 508ae6b..2e264fd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,9 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: gatb-core
 Source: https://github.com/GATB/gatb-core
+Files-Excluded: gatb-core/thirdparty/boost
+                gatb-core/thirdparty/hdf5
+                gatb-core/thirdparty/json
 
 Files: *
 Copyright: © 2014-2017 Genscale research team
diff --git a/debian/watch b/debian/watch
index 970f806..b6ae08b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,6 +1,7 @@
 version=4
 
 # New files on Github
+opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \
 https://github.com/GATB/gatb-core/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)

         Then you simply do

             uscan --verbose --force-download

         and uscan will provide you with a stripped down tarball without
         the code mentioned in Files-Excluded.  Now you need to create a
         quilt patch to exclude these subdirs from

              gatb-core/thirdparty/CMakeLists.txt

         and convince cmake to find the according Debian packaged versions
         of the code.  I have not checked this but you are kindly invited
         to ask here or at debian-mentors@lists.debian.org for help and
         advise.  Since I know you from DebConf I like to add that there
         is really no shame in this and the fact that I'm ranking on place
         7 on the Debian Mentors stats[3] is mostly since I'm *asking*
         there a lot and way less since I'm answering questions.  So there
         is really no shame in asking since you can not know everything
         but there are lots of helpful people around.


So far my comments for the moment.  Nice you have added citations in
debian/upstream/metadata (there is some editor swap file left which
should be removed).

Thanks a lot in any case for starting to package and feel free to keep
on asking here

     Andreas.


[1] https://debian-med.alioth.debian.org/docs/policy.html#git-tips
[2] https://wiki.debian.org/UscanEnhancements
[3] http://blends.debian.net/liststats/authorstat_debian-mentors.png

-- 
http://fam-tille.de


Reply to: