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

Jonathan D Reed jdreed at mit.edu
Thu Sep 11 12:14:34 EDT 2014


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> 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
> http://mailman.mit.edu/mailman/listinfo/config-package-dev




More information about the config-package-dev mailing list