[Python-modules-commits] r19021 - in packages/gamera/trunk/debian (4 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Fri Oct 21 17:14:31 UTC 2011
Date: Friday, October 21, 2011 @ 17:14:28
Author: jwilk
Revision: 19021
Move detached debugging symbols to /usr/lib/debug/.build-id/.
Added:
packages/gamera/trunk/debian/dh_buildid
Modified:
packages/gamera/trunk/debian/changelog
packages/gamera/trunk/debian/copyright
packages/gamera/trunk/debian/rules
Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog 2011-10-21 16:46:34 UTC (rev 19020)
+++ packages/gamera/trunk/debian/changelog 2011-10-21 17:14:28 UTC (rev 19021)
@@ -1,8 +1,10 @@
gamera (3.3.2-2) UNRELEASED; urgency=low
* Use dpkg-buildflags to set CPPFLAGS.
+ * Move detached debugging symbols to /usr/lib/debug/.build-id/ (using a
+ dedicated dh_buildid script).
- -- Jakub Wilk <jwilk at debian.org> Wed, 19 Oct 2011 19:07:06 +0200
+ -- Jakub Wilk <jwilk at debian.org> Fri, 21 Oct 2011 19:13:26 +0200
gamera (3.3.2-1) unstable; urgency=low
Modified: packages/gamera/trunk/debian/copyright
===================================================================
--- packages/gamera/trunk/debian/copyright 2011-10-21 16:46:34 UTC (rev 19020)
+++ packages/gamera/trunk/debian/copyright 2011-10-21 17:14:28 UTC (rev 19021)
@@ -121,7 +121,11 @@
Copyright: 2009-2011, Jakub Wilk <jwilk at debian.org>
License: GPL-2
+Files: debian/dh_buildid
+Copyright: 2011, Jakub Wilk <jwilk at debian.org>
+License: Expat
+
License: GPL-2
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Added: packages/gamera/trunk/debian/dh_buildid
===================================================================
--- packages/gamera/trunk/debian/dh_buildid (rev 0)
+++ packages/gamera/trunk/debian/dh_buildid 2011-10-21 17:14:28 UTC (rev 19021)
@@ -0,0 +1,84 @@
+#!/usr/bin/perl
+
+# Copyright © 2011 Jakub Wilk <jwilk at debian.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=head1 NAME
+
+dh_buildid - move /usr/lib/debug/* files into build-id locations
+
+=cut
+
+use strict;
+use warnings;
+
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_buildid> [S<I<debhelper options>>] [B<-X>I<item>]
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $debug_root = tmpdir($package) . "/usr/lib/debug";
+ my $build_id_root = "$debug_root/.build-id";
+ next unless -d $debug_root;
+ my $wanted = sub {
+ return unless -f $_;
+ my $path = $_;
+ my $elfnotes = `readelf -n $path`;
+ my ($build_id_dir, $build_id_path);
+ if ($elfnotes=~/^\s+Build ID: ([0-9a-f]{2})([0-9a-f]+)$/m) {
+ $build_id_dir = "$build_id_root/$1";
+ $build_id_path = "$build_id_dir/$2.debug"
+ } else {
+ # May built with old GCC? Or readelf is too old? Or it's not an ELF
+ # at all? Anyway, leaving it as it won't hurt.
+ return;
+ }
+ doit('mkdir', '-p', '-m', '755', $build_id_dir)
+ unless -d $build_id_dir;
+ doit('mv', $path, $build_id_path);
+ };
+ find({wanted => $wanted, no_chdir => 1}, $debug_root);
+ # Pure empty directories:
+ doit('find', $debug_root, '-type', 'd', '-empty', '-delete');
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+=head1 AUTHOR
+
+Jakub Wilk <jwilk at debian.org>
+
+=cut
+
+# vim:ts=4 sw=4 et
Property changes on: packages/gamera/trunk/debian/dh_buildid
___________________________________________________________________
Added: svn:executable
+ *
Modified: packages/gamera/trunk/debian/rules
===================================================================
--- packages/gamera/trunk/debian/rules 2011-10-21 16:46:34 UTC (rev 19020)
+++ packages/gamera/trunk/debian/rules 2011-10-21 17:14:28 UTC (rev 19021)
@@ -116,10 +116,8 @@
.PHONY: override_dh_strip
override_dh_strip:
-ifeq ($(filter nostrip,$(DEB_BUILD_OPTIONS)),)
dh_strip --dbg-package=python-gamera-dbg
- cd debian/*-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules
-endif
+ debian/dh_buildid
.PHONY: override_dh_builddeb
override_dh_builddeb:
More information about the Python-modules-commits
mailing list