Package: libscrypt Version: 1-2 Severity: important Tags: upstream patch Justification: fails to build from source
libscrypt fails to build from source on big endian architectures, due to testsuite errors: | TEST EIGHT: Create an MCF format output | TEST EIGHT: SUCCESSFUL, calculated mcf | $s1$0e0801$U29kaXVtQ2hsb3JpZGU=$cCO9yzr9c0hGHAbNgf046/2o+7qQT44+qbVD9lRdofLVQylVYT8Pz2LUlwUkKpr55h6F3A1lHkDfzwF7RVdYhw== | TEST NINE: Password verify on given MCF | TEST NINE: FAILED, hash failed to calculate | make[1]: *** [check] Error 1 This is due to code in modp_b64.c which is endianness dependent. A big and a little endian version of the code are provided, but the selection mechanism is supposed to be done by modifying the source code, which is not really compatible with a Debian source package. This leads to the little endian code to be always used. The patch below fixes the problem by getting the endianness from <endian.h>. --- libscrypt-1.orig/modp_b64.c +++ libscrypt-1/modp_b64.c @@ -45,10 +45,14 @@ #include "modp_b64.h" -/* if on motoral, sun, ibm; uncomment this */ -/* #define WORDS_BIGENDIAN 1 */ -/* else for Intel, Amd; uncomment this */ -/* #undef WORDS_BIGENDIAN */ +#include <endian.h> +#if __BYTE_ORDER == __BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# undef WORDS_BIGENDIAN +#else +#error "Unknown endianess" +#endif #include "modp_b64_data.h" It has been tested on mips, powerpc and s390x. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: mips (mips64) Kernel: Linux 3.2.0-4-5kc-malta Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org