[config-package-dev] Fwd: transform does not work on ubuntu trusty

Jonathan D Reed jdreed at mit.edu
Tue Sep 16 11:08:24 EDT 2014


bouncing personal mail to list.

Begin forwarded message:

From: "Djokic, Slavisa" <Slavisa.Djokic at uni-hamburg.de<mailto:Slavisa.Djokic at uni-hamburg.de>>
Subject: AW: [config-package-dev] transform does not work on ubuntu trusty
Date: September 16, 2014 at 10:20:51 AM EDT
To: Jonathan D Reed <jdreed at mit.edu<mailto:jdreed at mit.edu>>

Hello Jonathan,

thank you for your fast reply! The reason why I didn't get build-errors is because I passed '-d' (don't check build-dependencies) to debuild. But exactly that might be the problem.

I want to repackage rkhunter to include a patch for our local repository. The build-machine is Ubuntu Trusty and the Target is Ubuntu Precise (the issue has been fixed in Trusty). So I tried sbuild and pbuilder but I don't seem to get the setup right.

I will try to get more into packaging and will report when succeeding. In short this error could relate to config-package-dev (with pbuilder-dist-simple):
dh: unable to load addon config-package: Can't locate Debian/Debhelper/Sequence/config_package.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 3) line 2.

My pbuilder-environment doesn't seem to work for the intended purpose, while building the source package as is works fine.

Cheers
Sascha

-----Ursprüngliche Nachricht-----
Von: Jonathan D Reed [mailto:jdreed at mit.edu]
Gesendet: Donnerstag, 11. September 2014 18:15
An: Djokic, Slavisa
Cc: config-package-dev at mit.edu<mailto:config-package-dev at mit.edu>
Betreff: Re: [config-package-dev] transform does not work on ubuntu trusty

Hi Sascha,

Per dh_configpackage(1), the transform script provides the un-transformed version of the file on stdin, and expects the transformed file on stdout, so that invocation of patch won't actually do anything.  You probably want something like:

patch -N -f -r - -o - -i rkhunter.patch

That will cause patch to send the patched file to stdout, and read the .patch file directly, without using I/O redirection.  stdin would then be ignored.  However, that's probably also a bad idea, since patch will still look for the source file (to be patched) on the filesystem.  There is, as far as I can tell, no good way to get patch to use stdin as the original (to-be-patched) file.

That having been said, I'm not sure why you saw no errors in the build process - in some cursory testing, patch errored out, and thus dh_configpackage failed, and the build stopped.

If you want to use patch, the easiest way is probably with a separate transformation script (as described in the manpage), which can read the original file on stdin, write it somewhere temporary, apply the patch and generate the result on stdout.

-Jon

On Sep 11, 2014, at 10:59 AM, Djokic, Slavisa <Slavisa.Djokic at uni-hamburg.de<mailto:Slavisa.Djokic at uni-hamburg.de>> wrote:

Hello,

How would I apply a patchfile to a file in a .transform notation? What I tried:
seait-rkhunter.transform:
/usr/bin/rkhunter.seait  patch -N -f -r - < rkhunter.patch

On Ubuntu Trusty i got the sources:
apt-get source rkhunter/precise

Added config-package and rkhunter to Build-Depends in control Put
'--with=config-package' in the rules

Altered Version:
dch -l+seait

Build the package with: debuild -us -uc -i -d

The package seems to build fine. No errors are reported in the buildlog. But /usr/bin/rkhunter is not patched neither is it linked to rkhunter.seait nor is there a rkhunter.orig.

Cheers
sascha

_______________________________________________
config-package-dev mailing list
config-package-dev at mit.edu<mailto:config-package-dev at mit.edu>
http://mailman.mit.edu/mailman/listinfo/config-package-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/config-package-dev/attachments/20140916/60d1bf81/attachment.htm


More information about the config-package-dev mailing list