* [PR PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
@ 2021-01-28 0:19 leahneukirchen
2021-01-29 18:47 ` [PR PATCH] [Updated] " leahneukirchen
2021-01-30 14:20 ` [PR PATCH] [Merged]: " leahneukirchen
0 siblings, 2 replies; 3+ messages in thread
From: leahneukirchen @ 2021-01-28 0:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
There is a new pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages faster-strip-and-debug
https://github.com/void-linux/void-packages/pull/28278
hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
A patch file from https://github.com/void-linux/void-packages/pull/28278.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-faster-strip-and-debug-28278.patch --]
[-- Type: text/x-diff, Size: 1652 bytes --]
From 6c1f257900c82ac5d08c821f12b30bfbb6c67736 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Thu, 28 Jan 2021 01:18:07 +0100
Subject: [PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
---
.../hooks/post-install/06-strip-and-debug-pkgs.sh | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index b59dde5ab3c..d42c79b5c41 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -70,10 +70,6 @@ hook() {
continue
fi
- if [[ $(file -b "$f") =~ "no machine" ]]; then
- continue
- fi
-
fname=${f##*/}
for x in ${nostrip_files}; do
if [ "$x" = "$fname" ]; then
@@ -119,6 +115,13 @@ hook() {
fi
;;
application/x-sharedlib*|application/x-pie-executable*)
+ local type="$(file -b "$f")"
+ if [[ $type =~ "no machine" ]]; then
+ # using ELF as a container format (e.g. guile)
+ echo " Ignoring ELF file without machine set: ${f#$PKGDESTDIR}"
+ continue
+ fi
+
chmod +w "$f"
# shared library
make_debug "$f"
@@ -127,7 +130,7 @@ hook() {
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
- if [[ $(file $f) =~ "interpreter " ]]; then
+ if [[ type =~ "interpreter " ]]; then
echo " Stripped position-independent executable: ${f#$PKGDESTDIR}"
else
echo " Stripped library: ${f#$PKGDESTDIR}"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PR PATCH] [Updated] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
2021-01-28 0:19 [PR PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up leahneukirchen
@ 2021-01-29 18:47 ` leahneukirchen
2021-01-30 14:20 ` [PR PATCH] [Merged]: " leahneukirchen
1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2021-01-29 18:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
There is an updated pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages faster-strip-and-debug
https://github.com/void-linux/void-packages/pull/28278
hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
A patch file from https://github.com/void-linux/void-packages/pull/28278.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-faster-strip-and-debug-28278.patch --]
[-- Type: text/x-diff, Size: 1653 bytes --]
From cf8ff51e27a206f8487608f72bf8303f38e16615 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Thu, 28 Jan 2021 01:18:07 +0100
Subject: [PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
---
.../hooks/post-install/06-strip-and-debug-pkgs.sh | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index b59dde5ab3c..52591c38b31 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -70,10 +70,6 @@ hook() {
continue
fi
- if [[ $(file -b "$f") =~ "no machine" ]]; then
- continue
- fi
-
fname=${f##*/}
for x in ${nostrip_files}; do
if [ "$x" = "$fname" ]; then
@@ -119,6 +115,13 @@ hook() {
fi
;;
application/x-sharedlib*|application/x-pie-executable*)
+ local type="$(file -b "$f")"
+ if [[ $type =~ "no machine" ]]; then
+ # using ELF as a container format (e.g. guile)
+ echo " Ignoring ELF file without machine set: ${f#$PKGDESTDIR}"
+ continue
+ fi
+
chmod +w "$f"
# shared library
make_debug "$f"
@@ -127,7 +130,7 @@ hook() {
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
- if [[ $(file $f) =~ "interpreter " ]]; then
+ if [[ $type =~ "interpreter " ]]; then
echo " Stripped position-independent executable: ${f#$PKGDESTDIR}"
else
echo " Stripped library: ${f#$PKGDESTDIR}"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PR PATCH] [Merged]: hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
2021-01-28 0:19 [PR PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up leahneukirchen
2021-01-29 18:47 ` [PR PATCH] [Updated] " leahneukirchen
@ 2021-01-30 14:20 ` leahneukirchen
1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2021-01-30 14:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
There's a merged pull request on the void-packages repository
hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
https://github.com/void-linux/void-packages/pull/28278
Description:
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-30 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 0:19 [PR PATCH] hooks/post-install/06-strip-and-debug-pkgs.sh: speed up leahneukirchen
2021-01-29 18:47 ` [PR PATCH] [Updated] " leahneukirchen
2021-01-30 14:20 ` [PR PATCH] [Merged]: " leahneukirchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).