Package: google-authenticator Version: 20110413.68230188bdc7-1 Severity: normal Tags: patch User: [email protected] Usertags: origin-ubuntu oneiric ubuntu-patch
On OSes using eglibc, dlopen and friends are only accessible if the binaries are linked against libdl. google-authenticator's Makefile looks in /usr/lib for libdl, and only links libdl if /usr/lib/libdl.so exists. However, on multiarch-enabled[1] distros, such as Ubuntu, libdl was moved to /usr/lib/x86_64-linux-gnu/libdl.so (or similar, based on architecture). This causes the build to fail [2]. I have opened [3] with the upstream project to try and address this, and have additionally uploaded the attached change to Ubuntu to fix the build there. Since multiarch will soon be landing in Debian as well, I thought you might be interested in picking up the patch as well. Thanks, - Evan [1] https://wiki.debian.org/Multiarch [2] https://launchpad.net/ubuntu/+source/google-authenticator/20110413.68230188bdc7-1/+build/2479571 [3] http://code.google.com/p/google-authenticator/issues/detail?id=74 -- System Information: Debian Release: squeeze/sid APT prefers natty-updates APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-8-generic (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- debian/patches/make-multiarch-friendly 1970-01-01 00:00:00 +0000 +++ debian/patches/make-multiarch-friendly 2011-05-31 18:53:46 +0000 @@ -0,0 +1,39 @@ +Description: Switch the Makefile to be multiarch-friendly + google-authenticator looks for /usr/lib/libdl.so to determine whether + or not to link -ldl, but since the multiarch transition process moved + libdl to a different location, that test no longer finds it, leading + to a FTBFS on multiarch-enabled systems. + . + Work around that by just always linking libdl, which we definitely + always want to do with glibc. +Author: Evan Broder <[email protected]> +Origin: vendor +Bug: http://code.google.com/p/google-authenticator/issues/detail?id=74 + +Index: ubuntu/libpam/Makefile +=================================================================== +--- ubuntu.orig/libpam/Makefile 2011-05-31 11:40:31.878079519 -0700 ++++ ubuntu/libpam/Makefile 2011-05-31 11:52:43.952386500 -0700 +@@ -47,18 +47,17 @@ + pam_google_authenticator_unittest + + google-authenticator: google-authenticator.o base32.o hmac.o sha1.o +- $(CC) -g $(LDFLAGS) $(shell [ -f /usr/lib/libdl.so ] && echo " -ldl") \ +- -o $@ $+ ++ $(CC) -g $(LDFLAGS) \ ++ -o $@ $+ -ldl + + demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o + $(CC) -g $(LDFLAGS) -rdynamic \ +- $(shell [ -f /usr/lib/libdl.so ] && echo " -ldl") -o $@ $+ ++ -o $@ $+ -ldl + + pam_google_authenticator_unittest: pam_google_authenticator_unittest.o \ + base32.o hmac.o sha1.o + $(CC) -g $(LDFLAGS) -rdynamic -lc \ +- $(shell [ -f /usr/lib/libdl.so ] && echo " -ldl") \ +- -o $@ $+ ++ -o $@ $+ -ldl + + pam_google_authenticator.so: base32.o hmac.o sha1.o + pam_google_authenticator_testing.so: base32.o hmac.o sha1.o --- debian/patches/series 2011-04-13 08:14:21 +0000 +++ debian/patches/series 2011-05-31 18:32:37 +0000 @@ -1 +1,2 @@ debian-create-central-makefile +make-multiarch-friendly

