Packaging Digest::Elf - licensing question
Dear list,
I would like to package the CPAN module Digest::Elf, but the upstream
package contains no details about its license [1].
The distribution contains the following information about the algorithm used:
"The actual algorith was culled from a Dr. Dobbs Journal article and
they culled it, I think, from the source for the GNU c complier. If
you know better, please let me know."
The elfhash algorithm contained in the Perl XS imlementation [2] is
essentially the same as that found in the GNU binutils software [3],
available in the Debian GNU/Linux binutils package, which is GPL3+
licensed.
----
Digest::Elf:
unsigned long
elf ( sval )
char * sval;
CODE:
unsigned long h = 0, g;
while ( *sval )
{
h = ( h << 4 ) + *sval++;
if ( g = h & 0xF0000000 )
h ^= g >> 24;
h &= ~g;
}
RETVAL = h;
OUTPUT:
RETVAL
----
binutils/bfd/elf.c
unsigned long
bfd_elf_hash (const char *namearg)
{
const unsigned char *name = (const unsigned char *) namearg;
unsigned long h = 0;
unsigned long g;
int ch;
while ((ch = *name++) != '\0')
{
h = (h << 4) + ch;
if ((g = (h & 0xf0000000)) != 0)
{
h ^= g >> 24;
/* The ELF ABI says `h &= ~g', but this is equivalent in
this case and on some machines one insn instead of two. */
h ^= g;
}
}
return h & 0xffffffff;
}
----
In light of this, is the module acceptable to Debian under the DFSG as-is?
If not, is there anything that can be done to make it compatible?
Thanks,
Nick
--
[1] https://metacpan.org/release/Digest-Elf
[2] https://metacpan.org/source/MCKAY/Digest-Elf-1.4/Elf.xs
[3] https://sourceware.org/git/?p=binutils.git;a=blob_plain;f=bfd/elf.c
Reply to: