[Kolab-devel] Kolab Development packages now requiring a package for composer

Mateusz Kijowski mateusz.kijowski at gmail.com
Wed May 13 01:42:37 CEST 2015


2015-05-12 17:40 GMT+02:00 Daniel Hoffend <dh at dotlan.net>:

> I've the strong feeling that this is not the right approach.


Well, it's a dirty hack at best but it solves the problem.

My guess is that dpkg-source is doing some kind of strange magic to ensure
> the "php textfile" is in the right format or ends with a newline whatever.
>

There's also the [   59s] running debian transformer... step in
https://obs.kolabsys.com/package/live_build_log/home:timotheus:branches:Kolab:Development/composer/Debian_8.0/i586
build log . I think this is also where the newline might get added, but
perhaps you're right and OBS (ab?)use of dpkg-source is the reason.


> Here's a hexdump before and during build:
>
> # before
>
> -rw-r--r-- 1 griffon griffon 1029319 May  7 10:24 composer.phar
>
> $ hexdump composer.phar | tail -n 3
> 00fb4b0 2ede 808f bce5 30a8 9e1d b3ff 3c76 0285
> 00fb4c0 0000 4700 4d42 0042
> 00fb4c7
>
> # during build
>
> -rw-r--r--. 1 root root 1029320 May 12 15:12 composer.phar
>
> $ hexdump debian/composer.phar | tail -n 3
> 00fb4b0 2ede 808f bce5 30a8 9e1d b3ff 3c76 0285
> 00fb4c0 0000 4700 4d42 0a42
> 00fb4c8
>
>
> So yes, the filesize seems to be 2 byte off, but also the last 2 bytes are
> different 0042 vs 0a42.


The file is one byte off, the linefeed aka newline byte (0a) is inserted at
the end of the file. hexdump displays 0042 for formatting reasons, but in
fact 42 is the last byte in the original file.


> Something is odd tbh. So removing one byte seems to be okay to get the
> filesize right but still the file has changed.
>

Well, the md5 checksums match, so the file is almost certainly the same or
we are extremely unlucky and ran into md5 collision.

What wonders me is the fact that composer.phar is listed in
> debian/source/include-binaries and therefore shouldn't be touched when
> dpkg-source is extracting the debian package. But it seems that dpkg-source
> is modifing the cause it things it's a textfile and ensure the newlines are
> correct (especially the last).
>

I don't think that the file is modified in any other way than the added
newline at the end because of the matching md5 sums. Also the Ubuntu
package is propably biult right when using Ubuntu toolchain (where the
package source originates from) and it is safe to assume that the newline
doesn't get added then. Therefore I would suspect OBS magic.


> Maybe we can find the right way to get this composer package done right in
> this obs mix.
>

Perhaps, I guess it would help a lot if we could get the source package
generated by OBS and inspect it, or add verbosity to the OBS steps. Does
anyone know how to do that?

Regards,


Mateusz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/devel/attachments/20150513/0134cdb4/attachment.html>


More information about the devel mailing list