On Mon, Nov 12, 2012 at 03:52:20PM +0100, Kurt Roeckx wrote: > On Mon, Nov 12, 2012 at 02:15:48PM +0000, Adam D. Barratt wrote: > > On Sat, 2012-10-27 at 20:08 +0200, Kurt Roeckx wrote: > > > So Neil told me on IRC to just fix #684825 via t-p-u using the patch > > > that's in that bug report. > > > > > > I looked in to that and found that to due multi-arch changes in > > > glibc I now run into #691612. > > > > > > So if I want to fix it via t-p-u I would also need to backport the > > > multi-arch changes. > > > > Looking at the diff, are there any changes required outside of the > > --libdir setting in debian/rules and the path changes in *.install? > > As far as I know the changed for multiarch would require: > - newer debhelper, new compat level > - control file changes > - *.install changes > - the --libdir option to configure
So I uploaded a version that doesn't require multiarch to t-p-u. The debdiff is attached. Kurt
diff -Nru elfutils-0.152/debian/changelog elfutils-0.152/debian/changelog --- elfutils-0.152/debian/changelog 2011-02-26 15:09:58.000000000 +0100 +++ elfutils-0.152/debian/changelog 2012-11-12 21:03:09.000000000 +0100 @@ -1,3 +1,16 @@ +elfutils (0.152-1+wheezy1) testing-proposed-updates; urgency=low + + [ Sébastien Villemot ] + * strict-aliasing.diff: new patch taken from upstream (Closes: #684825). + Thanks to Mark Wielaard for pointing to the relevant upstream commit. + + [ Kurt Roeckx ] + * Use elf_end_unlock.patch from unstable (Closes: #662041) + * Use dlopen() with "lib" instead of "$LIB" to open the backends. + (Closes: #691612) + + -- Kurt Roeckx <k...@roeckx.be> Mon, 12 Nov 2012 20:22:05 +0100 + elfutils (0.152-1) unstable; urgency=low * New upstream release diff -Nru elfutils-0.152/debian/patches/backend_dlopen.patch elfutils-0.152/debian/patches/backend_dlopen.patch --- elfutils-0.152/debian/patches/backend_dlopen.patch 1970-01-01 01:00:00.000000000 +0100 +++ elfutils-0.152/debian/patches/backend_dlopen.patch 2012-11-12 21:03:23.000000000 +0100 @@ -0,0 +1,24 @@ +From: Kurt Roeckx <k...@roeckx.be> +Subject: Use dlopen() with "lib" instead of "$LIB" to open the backends +Bug-Debian: http://bugs.debian.org/691612 +Forwarded: not-needed + +We give dlopen() an absolute path based on $ORIGIN and $LIB. But $LIB +is different in case of multiarch. Just use "lib" instead. + +The other way to solve this is to move the libraries to the multiarch locations +like done in 0.153-1. + +Index: elfutils-0.152/libebl/eblopenbackend.c +=================================================================== +--- elfutils-0.152.orig/libebl/eblopenbackend.c 2012-11-12 20:42:26.000000000 +0100 ++++ elfutils-0.152/libebl/eblopenbackend.c 2012-11-12 20:51:01.000000000 +0100 +@@ -334,7 +334,7 @@ + #ifndef LIBEBL_SUBDIR + # define LIBEBL_SUBDIR PACKAGE + #endif +-#define ORIGINDIR "$ORIGIN/../$LIB/" LIBEBL_SUBDIR "/" ++#define ORIGINDIR "$ORIGIN/../lib/" LIBEBL_SUBDIR "/" + + /* Give it a try. At least the machine type matches. First + try to load the module. */ diff -Nru elfutils-0.152/debian/patches/elf_end_unlock.patch elfutils-0.152/debian/patches/elf_end_unlock.patch --- elfutils-0.152/debian/patches/elf_end_unlock.patch 1970-01-01 01:00:00.000000000 +0100 +++ elfutils-0.152/debian/patches/elf_end_unlock.patch 2012-11-12 20:24:24.000000000 +0100 @@ -0,0 +1,17 @@ +From: Kurt Roeckx <k...@roeckx.be> +Subject: Call rwlock_unlock() before rwlock_fini() +Applied-Upstream: commit:495501611820a9d5c462fda56045c146f7b922d7 +Bug-Debian: http://bugs.debian.org/662041 + +diff --git a/libelf/elf_end.c b/libelf/elf_end.c +index 5112eae..6392eaf 100644 +--- a/libelf/elf_end.c ++++ b/libelf/elf_end.c +@@ -241,6 +241,7 @@ elf_end (elf) + munmap (elf->map_address, elf->maximum_size); + } + ++ rwlock_unlock (elf->lock); + rwlock_fini (elf->lock); + + /* Finally the descriptor itself. */ diff -Nru elfutils-0.152/debian/patches/series elfutils-0.152/debian/patches/series --- elfutils-0.152/debian/patches/series 2011-02-26 15:11:22.000000000 +0100 +++ elfutils-0.152/debian/patches/series 2012-11-12 20:30:48.000000000 +0100 @@ -7,3 +7,6 @@ do-autoreconf.diff testsuite-ignore-elflint.diff elf_additions.diff +strict-aliasing.diff +elf_end_unlock.patch +backend_dlopen.patch diff -Nru elfutils-0.152/debian/patches/strict-aliasing.diff elfutils-0.152/debian/patches/strict-aliasing.diff --- elfutils-0.152/debian/patches/strict-aliasing.diff 1970-01-01 01:00:00.000000000 +0100 +++ elfutils-0.152/debian/patches/strict-aliasing.diff 2012-10-27 17:15:08.000000000 +0200 @@ -0,0 +1,69 @@ +Description: Fix strict aliasing issues in MD5 and SHA1 code +Origin: upstream, http://git.fedorahosted.org/cgit/elfutils.git/commit/?id=32899ac4f69d4ca4856d5282464c1f9cee928c8a +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684825 +Last-Update: 2012-09-08 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/md5.c ++++ b/lib/md5.c +@@ -82,6 +82,16 @@ + return resbuf; + } + ++static void ++le64_copy (char *dest, uint64_t x) ++{ ++ for (size_t i = 0; i < 8; ++i) ++ { ++ dest[i] = (uint8_t) x; ++ x >>= 8; ++ } ++} ++ + /* Process the remaining bytes in the internal buffer and the usual + prolog according to the standard and write the result to RESBUF. + +@@ -105,9 +115,10 @@ + memcpy (&ctx->buffer[bytes], fillbuf, pad); + + /* Put the 64-bit file length in *bits* at the end of the buffer. */ +- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); +- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | +- (ctx->total[0] >> 29)); ++ const uint64_t bit_length = ((ctx->total[0] << 3) ++ + ((uint64_t) ((ctx->total[1] << 3) | ++ (ctx->total[0] >> 29)) << 32)); ++ le64_copy (&ctx->buffer[bytes + pad], bit_length); + + /* Process last bytes. */ + md5_process_block (ctx->buffer, bytes + pad + 8, ctx); +--- a/lib/sha1.c ++++ b/lib/sha1.c +@@ -83,6 +83,13 @@ + return resbuf; + } + ++static void ++be64_copy (char *dest, uint64_t x) ++{ ++ for (size_t i = 8; i-- > 0; x >>= 8) ++ dest[i] = (uint8_t) x; ++} ++ + /* Process the remaining bytes in the internal buffer and the usual + prolog according to the standard and write the result to RESBUF. + +@@ -106,9 +113,10 @@ + memcpy (&ctx->buffer[bytes], fillbuf, pad); + + /* Put the 64-bit file length in *bits* at the end of the buffer. */ +- *(sha1_uint32 *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) | +- (ctx->total[0] >> 29)); +- *(sha1_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3); ++ const uint64_t bit_length = ((ctx->total[0] << 3) ++ + ((uint64_t) ((ctx->total[1] << 3) | ++ (ctx->total[0] >> 29)) << 32)); ++ be64_copy (&ctx->buffer[bytes + pad], bit_length); + + /* Process last bytes. */ + sha1_process_block (ctx->buffer, bytes + pad + 8, ctx);