[opensuse-buildservice] Building for Debian modifies binary file by adding a newline
Hello, At Kolab, we have a problem building a package for php composer. We want to add a binary file (inside the debian.tar.gz). The file is called composer.phar and starts like a php file, but actually is a binary file. Somehow, OBS will add a newline character to the file, which causes a new md5sum for the file. We have reproduced it on the public OBS: https://build.opensuse.org/package/live_build_log/home:tpokorra:kolab/compos... with some debugging in debian.rules, printing the md5sum before and after our current fix. Here is the discussion on the Kolab Devel list: http://lists.kolab.org/pipermail/devel/2015-May/015309.html I have built the package outside of OBS for testing, and it does not modify the file there. We are wondering what step in the OBS causes this, and if we can do a clean workaround, rather than cutting off the newline inside debian.rules again which seems a bit akward. We are wondering about debian transform: https://github.com/openSUSE/obs-build/blob/master/debtransform but cannot find the place that would cause this. Thank you for any insight, Timotheus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 13. Mai 2015, 08:28:09 wrote Timotheus Pokorra:
Hello,
At Kolab, we have a problem building a package for php composer. We want to add a binary file (inside the debian.tar.gz). The file is called composer.phar and starts like a php file, but actually is a binary file. Somehow, OBS will add a newline character to the file, which causes a new md5sum for the file.
can you do a local build and check if the file gets modified already in the source directory? or does it happen during packaging?
We have reproduced it on the public OBS: https://build.opensuse.org/package/live_build_log/home:tpokorra:kolab/compos... with some debugging in debian.rules, printing the md5sum before and after our current fix.
Here is the discussion on the Kolab Devel list: http://lists.kolab.org/pipermail/devel/2015-May/015309.html
I have built the package outside of OBS for testing, and it does not modify the file there.
We are wondering what step in the OBS causes this, and if we can do a clean workaround, rather than cutting off the newline inside debian.rules again which seems a bit akward.
We are wondering about debian transform: https://github.com/openSUSE/obs-build/blob/master/debtransform but cannot find the place that would cause this.
Thank you for any insight, Timotheus
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Timotheus Pokorra
Somehow, OBS will add a newline character to the file, which causes a new md5sum for the file.
When debtransform creates a patch to adds the file, it doesn't check whether the file ends in a newline and uncondionally adds one if missing. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Thanks Andreas and Adrian,
Mateusz has verified that debtransform indeed does add the newline, as
Andreas also stated.
http://lists.kolab.org/pipermail/devel/2015-May/015320.html
Sergio suggested on the Kolab devel list to uuencode the binary file,
and then decode it in debian.rules:
http://lists.kolab.org/pipermail/devel/2015-May/015321.html
I have implemented this now, and this is a good solution for us.
Thanks for your suggestions, and for working on OBS!
Timotheus
On 13 May 2015 at 09:17, Andreas Schwab
Timotheus Pokorra
writes: Somehow, OBS will add a newline character to the file, which causes a new md5sum for the file.
When debtransform creates a patch to adds the file, it doesn't check whether the file ends in a newline and uncondionally adds one if missing.
Andreas.
-- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
-- Kontaktdaten: Zu Hause: 03741 4490423 in Plauen: 03741 7424995 Mobil: 0176-29920835 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Adrian Schröter
-
Andreas Schwab
-
Timotheus Pokorra