[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Towards multi-arch: "Multi-Arch: same" file conflicts



Peter Samuelson <peter@p12n.org> writes:

> [Jakub Wilk]
>> If a package is marked as "Multi-Arch: same", files with the same
>> name have to be (byte-to-byte) identical across all architectures.
>> Unfortunately, not all packages obey this requirement.
>
>     [libsvn-java 1.6.17dfsg-2+b1]
>     usr/share/java/svn-javahl.jar
>
> This file is in a package that also contains some JNI, so it is
> Architecture: any.  I could split the JNI and jar into two packages,
> but it really doesn't seem worth it, two packages, tightly coupled,
> each with one small file.
>
> Is it reasonable to build or repack a jar file deterministically?
> Something like this, to normalize file timestamps and ordering?
>
>     mkdir TMP
>     unzip $jarfile -d TMP
>     find TMP -exec touch 198001010000 {} +
>     (cd TMP; find | sort | xargs zip -9 ../TMP.zip {} +)
>     mv TMP.zip $jarfile
>     rm -fr TMP
>
> Is this what I should do?

Ugly, but if it works ... You only have those 2 choices for Multi-Arch:
same: Split the package or make the files equal.

Since you are building the jarfile somewhere in your source you could
fix the place where it is created in the first place. But that probably
means patching the upstream Makefile.

I'm assuming you are not the only one building jarfiles. So maybe a tool
to do this or a patch for zip to create sorted and timestamped archives
would be overall more helpfull.

MfG
        Goswin


Reply to: