Différences entre versions de « Backport hplip »

De Cliss XXI
Sauter à la navigation Sauter à la recherche
imported>SylvainBeucler
m
imported>SylvainBeucler
m (clean-up)
Ligne 1 : Ligne 1 :
 
I needed a newer version of hpijs to support a new [[HP Officejet Pro K550|printer]].
 
I needed a newer version of hpijs to support a new [[HP Officejet Pro K550|printer]].
  
Notes to sort:
+
== Previous backport=
 +
 
 +
First, check what the previous maintainer did!
  
- PENSER D'ABORD À REGARDER CE QU'A FAIT LE MAINTENEUR PRÉCÉDENT!!!!!!
 
 
  dget http://backports.org/debian/pool/main/h/hplip/hplip_0.9.7-3bpo1.dsc
 
  dget http://backports.org/debian/pool/main/h/hplip/hplip_0.9.7-3bpo1.dsc
 
  dpkg-source -x hplip_0.9.7-3bpo1.dsc
 
  dpkg-source -x hplip_0.9.7-3bpo1.dsc
 
  debian/changelog:
 
  debian/changelog:
 
   * Backport of sid release 0.9.7-4 (no changes needed)
 
   * Backport of sid release 0.9.7-4 (no changes needed)
-> Last backport was trivial. Let's hope this one will be as well :)
+
 
 +
Ok, last backport was trivial. Let's hope this one will be as well :)
 +
 
 +
== Get the build dependencies ==
 
   
 
   
- apt-get build-dep complains about libsnmp9-dev missing... Weird.
+
<code>apt-get build-dep</code> complains about </code>libsnmp9-dev missing</code>... Weird.
Switching libsnmp9-dev | libsnmp5-dev to libsnmp5-dev | libsnmp9-dev in /var/lib/apt/... does the trick.
+
 
 +
Switching <code>libsnmp9-dev | libsnmp5-dev</code> to <code>libsnmp5-dev | libsnmp9-dev</code> in </code>/var/lib/apt/</code>... does the trick.
 
   
 
   
- missing python-support
+
== Changes ==
-> apparently related to the new python policy. A recent discussion on the list concluded that it is best not to follow the new python policy and hence avoid requiring a backported python.
+
 
 +
=== Missing Python support ===
 +
 
 +
Apparently related to the new python policy. A recent discussion on the list concluded that it is best not to follow the new python policy and hence avoid requiring a backported python.
 
   
 
   
Comment the 'dh_pysupport' call in debian/rules.
+
Comment the 'dh_pysupport' call in debian/rules.
 +
 
 +
=== debhelper ===
 
   
 
   
- use debhelper/bpo, change debhelper (>= 5.0.37.2, needed for the new Python policy version) to debhelper (>= 5.0)
+
Use debhelper/bpo, change debhelper (>= 5.0.37.2, needed for the new Python policy version) to debhelper (>= 5.0)
 
   
 
   
+
=== patch ===
  - debuild -us -uc
+
 
 +
Do:
 +
  debuild -us -uc
 
  => unknown option -U
 
  => unknown option -U
(option -U, from debian/patches/00patch-opts)
+
(option -U, from debian/patches/00patch-opts)
 
   
 
   
need to use patch/bpo
+
You need to use patch/bpo -> fix build-deps:
-> fix build-deps
 
 
  patch (>= 2.5.9-3bpo1)
 
  patch (>= 2.5.9-3bpo1)
 +
 +
=== findutils ===
 
   
 
   
  - debuild -us -uc
+
Do:
 +
  debuild -us -uc
 
  => xargs: invalid option -- d
 
  => xargs: invalid option -- d
 
   
 
   
need to use findutils/bpo
+
We need to use findutils/bpo -> fix build-deps:
-> fix build-deps:
 
 
  findutils (>= 4.2.28-1~bpo.1)
 
  findutils (>= 4.2.28-1~bpo.1)
 +
 +
=== PyQt ===
 
   
 
   
- After installation:
+
After installation:
 
  hp-print --help
 
  hp-print --help
 
  error: This program may not function properly with the version of PyQt that is installed (3.13.0).
 
  error: This program may not function properly with the version of PyQt that is installed (3.13.0).
Ligne 42 : Ligne 57 :
 
  error: PyQt/Qt initialization error. Please check install of PyQt/Qt and try again.
 
  error: PyQt/Qt initialization error. Please check install of PyQt/Qt and try again.
 
   
 
   
The package works fine with 3.13. We can safely downgrade the requirement to 3.13 in base/g.py.
+
The package works fine with 3.13. We can safely downgrade the requirement to 3.13 in base/g.py.
 +
 
 +
=== Lintian ===
 +
 
 +
After I uploaded my packages to mentors.debian.net, I got mail saying:
 +
E: hplip source: package-needs-python-policy-debhelper
 +
N:
 +
N:  The source package requests dh_python compatibility level 2 (or
 +
N:  higher) in debian/pycompat but doesn't depend on a new enough
 +
N:  debhelper. A Build-Depends on debhelper (>= 5.0.37.2) is required for
 +
N:  this support.
 +
N:
 
   
 
   
 +
We need to downgrade the Python compatibility since we don't follow the new policy -> debian/pycompat -> s/2/1/
 +
 +
We probably need to install a newer version of lintian, I didn't get that one with the sarge version.
 +
 +
 +
== Check and recheck your changes ==
 
   
 
   
   
+
  $ mkdir temp
sylvain@cliss21:/usr/src$ mkdir temp
+
  $ cd temp/
  sylvain@cliss21:/usr/src$ cd temp/
+
  $ cp ../hplip_1.6.7-2~bpo.1.diff.gz .
  sylvain@cliss21:/usr/src/temp$ cp ../hplip_1.6.7-2~bpo.1.diff.gz .
+
  $ wget http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
  sylvain@cliss21:/usr/src/temp$ wget http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
 
 
  --12:30:47--  http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
 
  --12:30:47--  http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
 
             => `hplip_1.6.7-2.diff.gz'
 
             => `hplip_1.6.7-2.diff.gz'
Ligne 61 : Ligne 92 :
 
  12:30:54 (202.10 KB/s) - « hplip_1.6.7-2.diff.gz » sauvegardé [247960/247960]
 
  12:30:54 (202.10 KB/s) - « hplip_1.6.7-2.diff.gz » sauvegardé [247960/247960]
 
   
 
   
  sylvain@cliss21:/usr/src/temp$ gunzip *
+
  $ gunzip *
  sylvain@cliss21:/usr/src/temp$ interdiff hplip_1.6.7-2.diff hplip_1.6.7-2~bpo.1.diff
+
  $ interdiff hplip_1.6.7-2.diff hplip_1.6.7-2~bpo.1.diff
 
 
mentors.debian.net:
 
E: hplip source: package-needs-python-policy-debhelper
 
N:
 
N:  The source package requests dh_python compatibility level 2 (or
 
N:  higher) in debian/pycompat but doesn't depend on a new enough
 
N:  debhelper. A Build-Depends on debhelper (>= 5.0.37.2) is required for
 
N:  this support.
 
N:
 
 
-> debian/pycompat -> s/2/1/
 
 
 
 
   
 
   
 +
=== The final ChangeLog ===
 +
 
  hplip (1.6.7-2~bpo.1) sarge-backports; urgency=low
 
  hplip (1.6.7-2~bpo.1) sarge-backports; urgency=low
 
   
 
   
Ligne 83 : Ligne 102 :
 
   * Added dependencies to patch/bpo and findutils/bpo
 
   * Added dependencies to patch/bpo and findutils/bpo
 
   * Downgraded pyqt-utils dependency from 3.14 to 3.13 (works ok)
 
   * Downgraded pyqt-utils dependency from 3.14 to 3.13 (works ok)
   * Removed Python-policy-related python-support dependency and a
+
   * Reverted Python-policy: removed python-support dependency and a
     dh_pysupport call.
+
     dh_pysupport call, changed the pycompat file, and downgraded the
 +
    debhelper dependency from (>= 5.0.37.2) to (>= 5.0.34bpo1)
 +
  * Put libsnmp5-dev before libsnmp9-dev in the Build-Depends, so
 +
    that apt-get build-dep doesn't require libsnmp9-dev
 
   
 
   
  -- Sylvain Beucler <beuc@beuc.net>  Tue, 17 Oct 2006 20:04:28 +0200
+
-- Sylvain Beucler <beuc@beuc.net>  Thu, 19 Oct 2006 12:32:03 +0200
  
 
In <code>debian/control</code>, add your name:
 
In <code>debian/control</code>, add your name:
 
  Uploaders: Torsten Landschoff <torsten@debian.org>, Sylvain Beucler <beuc@beuc.net>
 
  Uploaders: Torsten Landschoff <torsten@debian.org>, Sylvain Beucler <beuc@beuc.net>
 +
 +
== Testing ==
  
 
Once you finished compiling your packages, you can try to install them using debi:
 
Once you finished compiling your packages, you can try to install them using debi:
 
  /usr/src/hplip-1.6.7$ su -c debi
 
  /usr/src/hplip-1.6.7$ su -c debi
 
This will install all the packages generated by the hplip source package :)
 
This will install all the packages generated by the hplip source package :)
 +
 +
== A note on rebuilding ==
  
 
When testing and building your package, beware that the <code>clean</code> procedure is not complete. This means that if you build your package, fix something, and rebuild it, there will be a few extra changes. These changes are not functionnaly significants (usually they are non-removed parts of the Debian patches or the build process, but their existence makes your Debian diff unclean. Since sponsors tend to be picky about it (and they can control these changes easily using the interdiff technique), you'd better avoid those.
 
When testing and building your package, beware that the <code>clean</code> procedure is not complete. This means that if you build your package, fix something, and rebuild it, there will be a few extra changes. These changes are not functionnaly significants (usually they are non-removed parts of the Debian patches or the build process, but their existence makes your Debian diff unclean. Since sponsors tend to be picky about it (and they can control these changes easily using the interdiff technique), you'd better avoid those.
Ligne 102 : Ligne 128 :
 
  dpkg-source -x hplip_1.6.7-2~bpo.1.dsc
 
  dpkg-source -x hplip_1.6.7-2~bpo.1.dsc
  
 +
 +
== Be a good neighbour and tell your fellow upstream maintainer about the issues you encountered ==
  
 
To report to the package maintainer:
 
To report to the package maintainer:

Version du 11 novembre 2006 à 15:42

I needed a newer version of hpijs to support a new printer.

= Previous backport

First, check what the previous maintainer did!

dget http://backports.org/debian/pool/main/h/hplip/hplip_0.9.7-3bpo1.dsc
dpkg-source -x hplip_0.9.7-3bpo1.dsc
debian/changelog:
  * Backport of sid release 0.9.7-4 (no changes needed)

Ok, last backport was trivial. Let's hope this one will be as well :)

Get the build dependencies

apt-get build-dep complains about libsnmp9-dev missing... Weird.

Switching libsnmp9-dev | libsnmp5-dev to libsnmp5-dev | libsnmp9-dev in /var/lib/apt/... does the trick.

Changes

Missing Python support

Apparently related to the new python policy. A recent discussion on the list concluded that it is best not to follow the new python policy and hence avoid requiring a backported python.

Comment the 'dh_pysupport' call in debian/rules.

debhelper

Use debhelper/bpo, change debhelper (>= 5.0.37.2, needed for the new Python policy version) to debhelper (>= 5.0)

patch

Do:

debuild -us -uc
=> unknown option -U

(option -U, from debian/patches/00patch-opts)

You need to use patch/bpo -> fix build-deps:

patch (>= 2.5.9-3bpo1)

findutils

Do:

debuild -us -uc
=> xargs: invalid option -- d

We need to use findutils/bpo -> fix build-deps:

findutils (>= 4.2.28-1~bpo.1)

PyQt

After installation:

hp-print --help
error: This program may not function properly with the version of PyQt that is installed (3.13.0).
error: Incorrect version of pyQt installed. Ver. 3.14 or greater required.
error: PyQt/Qt initialization error. Please check install of PyQt/Qt and try again.

The package works fine with 3.13. We can safely downgrade the requirement to 3.13 in base/g.py.

Lintian

After I uploaded my packages to mentors.debian.net, I got mail saying:

E: hplip source: package-needs-python-policy-debhelper
N:
N:   The source package requests dh_python compatibility level 2 (or
N:   higher) in debian/pycompat but doesn't depend on a new enough
N:   debhelper. A Build-Depends on debhelper (>= 5.0.37.2) is required for
N:   this support.
N:

We need to downgrade the Python compatibility since we don't follow the new policy -> debian/pycompat -> s/2/1/

We probably need to install a newer version of lintian, I didn't get that one with the sarge version.


Check and recheck your changes

$ mkdir temp
$ cd temp/
$ cp ../hplip_1.6.7-2~bpo.1.diff.gz .
$ wget http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
--12:30:47--  http://ftp.debian.org/debian/pool/main/h/hplip/hplip_1.6.7-2.diff.gz
           => `hplip_1.6.7-2.diff.gz'
Résolution de ftp.debian.org... 128.101.240.212
Connexion vers ftp.debian.org[128.101.240.212]:80...connecté.
requête HTTP transmise, en attente de la réponse...200 OK
Longueur: 247,960 [text/plain]

100%[=================================================================================================================>] 247,960      202.63K/s

12:30:54 (202.10 KB/s) - « hplip_1.6.7-2.diff.gz » sauvegardé [247960/247960]

$ gunzip *
$ interdiff hplip_1.6.7-2.diff hplip_1.6.7-2~bpo.1.diff

The final ChangeLog

hplip (1.6.7-2~bpo.1) sarge-backports; urgency=low

  * Rebuild for Sarge - http://www.backports.org/
  * Added dependencies to patch/bpo and findutils/bpo
  * Downgraded pyqt-utils dependency from 3.14 to 3.13 (works ok)
  * Reverted Python-policy: removed python-support dependency and a
    dh_pysupport call, changed the pycompat file, and downgraded the
    debhelper dependency from (>= 5.0.37.2) to (>= 5.0.34bpo1)
  * Put libsnmp5-dev before libsnmp9-dev in the Build-Depends, so
    that apt-get build-dep doesn't require libsnmp9-dev

-- Sylvain Beucler <beuc@beuc.net>  Thu, 19 Oct 2006 12:32:03 +0200

In debian/control, add your name:

Uploaders: Torsten Landschoff <torsten@debian.org>, Sylvain Beucler <beuc@beuc.net>

Testing

Once you finished compiling your packages, you can try to install them using debi:

/usr/src/hplip-1.6.7$ su -c debi

This will install all the packages generated by the hplip source package :)

A note on rebuilding

When testing and building your package, beware that the clean procedure is not complete. This means that if you build your package, fix something, and rebuild it, there will be a few extra changes. These changes are not functionnaly significants (usually they are non-removed parts of the Debian patches or the build process, but their existence makes your Debian diff unclean. Since sponsors tend to be picky about it (and they can control these changes easily using the interdiff technique), you'd better avoid those.

Therefore, between two compilation, I usually remove the working directory and recreate it using dpkg-source:

cd /usr/src/
rm -rf hplip-1.6.7/
dpkg-source -x hplip_1.6.7-2~bpo.1.dsc


Be a good neighbour and tell your fellow upstream maintainer about the issues you encountered

To report to the package maintainer:

  • Switching libsnmp9-dev | libsnmp5-dev to libsnmp5-dev | libsnmp9-dev to work-around 'apt-get build-dep'.
  • sudo dpkg -i hplip... fails - probably because sudo cleans the environment.
  • Possibly precise the patch and findutils dependencies
  • Possibly precise the pyqt-utils dependency
    1. won't work directly w/o 3.14
    2. also work with 3.13, so maybe use 3.13