Skip to content

Latest commit

 

History

History
170 lines (124 loc) · 5.97 KB

File metadata and controls

170 lines (124 loc) · 5.97 KB

a Debianized Perl CPAN package: backporting from Debian Sid

So far I have backported 2 CPAN packages like this: CryptX and DBD::Oracle.


Debian version history (for sound background knowledge):


We will make use of these utilities:


There is a Perl module that provides a self-contained crypto toolkit (we need this module for Passfuscator):

There is a Perl module that provides access to Oracle databases:


The Perl module CryptX was made available for Debian Linux:

The Perl module DBD::Oracle was made available for Debian Linux:


Q: which "versions" of libcryptx-perl are there? (look for the string "versions" on that web-page!)

Q: which Debian release has its own ready-made CryptX package?

These Debian releases are the only ones with a ready-made package (you will find exactly and only "testing" and "unstable" below "versions"):

  • there is "always" a Debian package for "unstable" AKA "sid" (i.e. the development trunk),
  • and there is "always" a Debian package for "testing" (as of 2018-01-22 that is "10 (buster)"),
  • there is no ready-made package for "8 (jessie)", so we have to derive a suitable package from "sid". Maybe you have to adapt the debhelper release no: There will be only one figure to change from 10 to 9, that's (the minimal release of) "debhelper" within debian/control.

retrieving the source package, the dget approach

Within the leftmost column (topmost section "general") there is also a section "versioned links" with a couple of rows. Use the row with the highest version number! There is a "download" link (".dsc"), and the hint says: ".dsc, use dget on this link to retrieve the source package". Preferredly we would do exactly this, but within some environments dget fails like this:

$ dget http://deb.debian.org/debian/pool/main/libc/libcryptx-perl/libcryptx-perl_0.056-1.dsc
dget: retrieving http://deb.debian.org/debian/pool/main/libc/libcryptx-perl/libcryptx-perl_0.056-1.dsc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (7) Failed to connect to deb.debian.org port 80: Connection refused
dget: curl libcryptx-perl_0.056-1.dsc http://deb.debian.org/debian/pool/main/libc/libcryptx-perl/libcryptx-perl_0.056-1.dsc failed

..., so we cannot choose this route. Let us discuss the alternative!

retrieving the source package, the "if dget failed" approach

There is a section "general", and there is a link labeled "libcryptx-perl" in the row labeled "source", and this is where it points to (let us follow this link!):


There is a link labeled "sid" (right context: "(misc)" or "(perl)" or ...), and this is where it points to (let us follow this link!):


Download all 3 files mentioned there

  • libcryptx-perl_0.056-1.dsc -- "use dget on the resp. link to retrieve the (entire) source package"
  • libcryptx-perl_0.056-1.debian.tar.xz
  • libcryptx-perl_0.056.orig.tar.gz

In some environments we cannot access those links, so find a way to get them anyway!


Once you have them, run md5um on the files we downloaded (*.dsc, *.orig.tar.*, *.debian.tar.*):

$ md5sum libcryptx-perl_0.056.orig.tar.gz libcryptx-perl_0.056-1.dsc libcryptx-perl_0.056-1.debian.tar.xz > $(basename libcryptx-perl_0.056-1.dsc .dsc).md5

and compare (manually) the entries with the MD5 checksums given on the web page!


Be sure to have all 3 files mentioned in your current directory!


Its option "--extract" ("-x") is exactly for passing the name of a .dsc (Debian source control) file.


Run this command line on the .dsc file downloaded right before:

$ dpkg-source --extract libcryptx-perl_0.056-1.dsc

The recent command line created this subdirectory:

  • libcryptx-perl-.../

adapting the source package

Run this command line in order to find out our release of debhelper:

$ dpkg-query --list debhelper
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  debhelper      9.20150101+d all          helper programs for debian/rules

We are interested in the value in column Version, resp. in its beginning, ie. 9 - or maybe a bigger figure later on.


Within file libcryptx-perl-0.056/debian/control:

  • replace expected (minimal) release of debhelper with ours, i.e. 10 with 9!

building and installing the Debian package

Within directory libcryptx-perl-.../ run this command line:

$ dpkg-buildpackage -b -us -uc
##$ dpkg-buildpackage --build=any,all --unsigned-source --unsigned-changes # future command line

The recent command line created two files above this subdirectory:

  • libcryptx-perl_0.056-1_amd64.deb
  • libcryptx-perl_0.056-1_amd64.changes

Install the new Debian package:

$ sudo dpkg --install libcryptx-perl_0.056-1_amd64.deb

Check whether our new Debian package is installed:

$ dpkg-query --list libcryptx-perl

...