summaryrefslogtreecommitdiff
path: root/dh_strip
AgeCommit message (Collapse)AuthorFilesLines
2019-09-08dh_strip: Avoid impossible copy manual dbg pkgs + dh_dwzNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-14dh_strip: Skip stripping of guile-2.2 filesNiels Thykier1-1/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-16dh_{shlibdeps,strip}: Remove regex anchor to fix regressionNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-13dh_{shlibdeps,strip}: Pass --no-sandbox to file under fakerootNiels Thykier1-2/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-13dh_{shlibdeps,strip}: Use file --brief and anchor output parsing regexesNiels Thykier1-4/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-13dh_strip: Be more robust about catching errors from file(1)Niels Thykier1-6/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-09When the buildid cannot be find, show a warning. Would have madeSylvestre Ledru1-0/+1
our life much easier in bug #913946 & #916975
2018-09-21dh_strip: Remove empty dirs caused by dh_dwz's outputNiels Thykier1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-09Make -k/--keep a per helper optionNiels Thykier1-1/+1
2018-05-10dh_strip: Move .../debug/.dwz to the -dbgsym/-dbg packageNiels Thykier1-0/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-02dh_strip: Do not strip debug symbols in the .build-id dirNiels Thykier1-0/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-31Replace some ad-hoc checks with excludefile()Niels Thykier1-5/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-16dh_strip: Fix bug generating Build-Id field with --dbg-packageNiels Thykier1-13/+17
The problem occurred because we overrode the list of recorded build-ids after each package. This works perfectly fine for dbgsym packages as they always have a 1:1 with the original package. However, a manual --dbg-package can host debug symbols for multiple binary packages. There are two paths to triggering this issue: dh_strip -p pkg1 -p pkg2 --dbg-package=foo-dbg and: dh_strip -p pkg1 --dbg-package=foo-dbg dh_strip -p pkg2 --dbg-package=foo-dbg (This case was observed in krb5/1.15.2-2 where it loops over most of the packages and calls dh_strip on each of them with the same --dbg-package parameter.) They fundamentally have the same issue and fix but the second case is slightly more involved (as we have to merge with the previous run). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-12dh_strip: Remove redundant if-statementNiels Thykier1-8/+5
2017-11-11dh_strip: Fix regression that broke "make_debug"Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-11Make cross_command package specificNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-11dh_strip/dh_makeshlibs: Move cross_commands into DOPACKAGES loopsNiels Thykier1-7/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-10-23dh_strip: Improve the --exclude speedNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-10-21Create a helper for locating the dbgsym tmpdirNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-10-14dh_strip: Avoid potential unsafe stat(_) callNiels Thykier1-5/+8
In practise, compat would never issue a stat call itself, but in the future, we may remove the compat call that happens before this code path is run. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-09-16Use file header instead of filenames to detect ELF [c11]Niels Thykier1-20/+42
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-09-14dh_strip: Refactor to reduce code sizeNiels Thykier1-30/+14
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-08-26dh_strip: Make --dbg-package run in serialNiels Thykier1-2/+10
Ideally, people would migrate to the automatic dbgsym packages, which do not seem trigger this problem. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12reset_perm_and_owner: Use perl functions instead of fork+execNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-07Dh_Lib: Embed tool versions into auto-generated snippetsNiels Thykier1-0/+2
Use $main::VERSION to determine the version of the tool and embed that into auto-generated snippets (e.g. via autoscript). This enables lintian to extract the tool + version and display it on: https://lintian.debian.org/tags/debhelper-autoscript-in-maintainer-scripts.html Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-03Set Emacs file variables directory-wideSven Joachim1-6/+0
Set the local variables for Emacs in the central placed intended for it, rather than in (currently) 95 individual files. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26dh_strip: Re-indent codeNiels Thykier1-89/+89
2017-06-26dh_strip: Process packages in parallelNiels Thykier1-1/+3
Re-indent of code pending next commit... Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26Avoid some unnecessary stat callsNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26Avoid fork+exec for rm -f and ln -s in non-deprecated toolsNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-04include present/wanted architecture in error messageMichael Stapelberg1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-30dh_strip: Correct dbgsym creation checkNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-19dh_strip: Consistently use $dh{DEBUGPACKAGE}Niels Thykier1-2/+2
The pural version ($dh{DEBUGPACKAGES}) should no longer be used. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-02Dh_Lib: Add a reset_perm_and_owner functionNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-02Refactor install_dir usage to avoid the "if -d " testsNiels Thykier1-5/+3
They were not needed in the first place (as "install -d" DTRT). Signed-off-by: Niels Thykier <niels@thykier.net>
2016-09-28dh_strip: Avoid duplicate conditionNiels Thykier1-1/+1
Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Niels Thykier <niels@thykier.net>
2016-07-01dh_strip: disable file(1) cache when not using build-idsNiels Thykier1-5/+9
It breaks in fun and exciting ways for hardlinked ELF binaries if we are not using build-ids. For now just disable the file(1) caching in that case as it is not critical and an uncommon case. The build-id case works (thanks to Sven Joachim) since the deattached debug symbol is in a predictable location we can test for. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-07-01dh_strip: Fix handling of hardlinked ELF when using build-idsSven Joachim1-1/+2
Improve handling of hardlinked ELF files when extracting dbgsyms using build-ids. This patches does not cover manual dbg packages under compat 8 or older. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Pass -e to file to avoid unncessary testsNiels Thykier1-4/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Cache file(1) outputNiels Thykier1-21/+27
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Re-use file(1) output to determine build-idNiels Thykier1-15/+17
Might as well, since it can save a fork+exec for readelf. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Use strip -D unconditionally for static libsNiels Thykier1-8/+4
Since binutils in stable supports "--enable-deterministic-archives" just pass it unconditionally. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Add debuglinks even under D_B_O=noautodbgsymNiels Thykier1-2/+16
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15dh_strip: Refactor a few linesNiels Thykier1-5/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15Replace $dh{DEBUGPACKAGES} with $dh{DEBUGPACKAGE}Niels Thykier1-4/+4
All uses are now singular, so change the code to only accept one package (the latest passed) and only store one value. The original $dh{DEBUGPACKAGES} is preserved for backwards compatibility (e.g. dh_clistrip uses it), although it will now always have at most one value in the array. Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15Remove support for compat 4Niels Thykier1-22/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-01Drop .* from the beginning of unanchored regular expressionsPeter Pentchev1-3/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-01dh_strip: Only match *.a files that start with "lib"Peter Pentchev1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-02-21dh_strip: Don't create dbgsym root for udebsNiels Thykier1-2/+5
This ensures we do not collect build-ids for the udeb at all (unless it actually contains debug symbols). Signed-off-by: Niels Thykier <niels@thykier.net>
2016-02-20dh_strip: Remove unused sub argumentNiels Thykier1-3/+3
Signed-off-by: Niels Thykier <niels@thykier.net>