[-- Attachment #1: Type: text/plain, Size: 952 bytes --] There is a new pull request by tornaria against master on the void-packages repository https://github.com/tornaria/void-packages nostrip_files https://github.com/void-linux/void-packages/pull/34886 nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This is inconvenient in a case where there are two binaries with the same name and only one must be stripped. Case in point: maxima contains executables /usr/lib/maxima/5.45.1/binary-ecl/maxima /usr/lib/maxima/5.45.1/binary-sbcl/maxima The second one breaks if stripped, but the first one is ok. See: https://github.com/void-linux/void-packages/issues/34861#issuecomment-1006197772 This commit makes it so that `nostrip_files` can take either the filename or the full path. A patch file from https://github.com/void-linux/void-packages/pull/34886.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-nostrip_files-34886.patch --] [-- Type: text/x-diff, Size: 1035 bytes --] From 093a1fa78ac0c78ecf4d189d4fecabcdcb516fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy> Date: Wed, 5 Jan 2022 20:59:20 -0300 Subject: [PATCH] nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This commit makes it so that `nostrip_files` can take either the filename or the full path. --- common/hooks/post-install/06-strip-and-debug-pkgs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2cec68412c50..191c025e552c 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -72,7 +72,7 @@ hook() { fname=${f##*/} for x in ${nostrip_files}; do - if [ "$x" = "$fname" ]; then + if [ "$x" = "$fname" -o "$x" = "${f#$PKGDESTDIR}" ]; then found=1 break fi
[-- Attachment #1: Type: text/plain, Size: 990 bytes --] There is an updated pull request by tornaria against master on the void-packages repository https://github.com/tornaria/void-packages nostrip_files https://github.com/void-linux/void-packages/pull/34886 nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This is inconvenient in a case where there are two binaries with the same name and only one must be stripped. Case in point: maxima contains executables /usr/lib/maxima/5.45.1/binary-ecl/maxima /usr/lib/maxima/5.45.1/binary-sbcl/maxima The second one breaks if stripped, but the first one is ok to strip (desirable: 59M -> 13M). See: https://github.com/void-linux/void-packages/issues/34861#issuecomment-1006197772 This commit makes it so that `nostrip_files` can take either the filename or the full path. A patch file from https://github.com/void-linux/void-packages/pull/34886.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-nostrip_files-34886.patch --] [-- Type: text/x-diff, Size: 2080 bytes --] From 2c99d14ba40a2a4c9d94869da89f821f7413e7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy> Date: Wed, 5 Jan 2022 20:59:20 -0300 Subject: [PATCH] nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This commit makes it so that `nostrip_files` can take either the filename or the full path. --- Manual.md | 4 ++-- common/hooks/post-install/06-strip-and-debug-pkgs.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 2a7a990d37a1..3e641633ba6a 100644 --- a/Manual.md +++ b/Manual.md @@ -644,7 +644,7 @@ Example: `conf_files="/etc/foo.conf /etc/foo2.conf /etc/foo/*.conf"`. default all binaries are stripped. - `nostrip_files` White-space separated list of ELF binaries that won't be stripped of -debugging symbols. +debugging symbols. Files can be given by full path or by filename. - `noshlibprovides` If set, the ELF binaries won't be inspected to collect the provided sonames in shared libraries. @@ -690,7 +690,7 @@ This appends to the generated file rather than replacing it. features (PIE, relro, etc). Not necessary for most packages. - `nopie_files` White-space seperated list of ELF binaries that won't be checked -for PIE. +for PIE. Files must be given by full path. - `reverts` xbps supports a unique feature which allows to downgrade from broken packages automatically. In the `reverts` field one can define a list of broken 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 2cec68412c50..191c025e552c 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -72,7 +72,7 @@ hook() { fname=${f##*/} for x in ${nostrip_files}; do - if [ "$x" = "$fname" ]; then + if [ "$x" = "$fname" -o "$x" = "${f#$PKGDESTDIR}" ]; then found=1 break fi
[-- Attachment #1: Type: text/plain, Size: 268 bytes --] New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34886#issuecomment-1007857528 Comment: > Thanks. Could you mention this in Manual.md? Done. I also added a comment for `nopie_files`, which only takes full path.
[-- Attachment #1: Type: text/plain, Size: 990 bytes --] There is an updated pull request by tornaria against master on the void-packages repository https://github.com/tornaria/void-packages nostrip_files https://github.com/void-linux/void-packages/pull/34886 nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This is inconvenient in a case where there are two binaries with the same name and only one must be stripped. Case in point: maxima contains executables /usr/lib/maxima/5.45.1/binary-ecl/maxima /usr/lib/maxima/5.45.1/binary-sbcl/maxima The second one breaks if stripped, but the first one is ok to strip (desirable: 59M -> 13M). See: https://github.com/void-linux/void-packages/issues/34861#issuecomment-1006197772 This commit makes it so that `nostrip_files` can take either the filename or the full path. A patch file from https://github.com/void-linux/void-packages/pull/34886.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-nostrip_files-34886.patch --] [-- Type: text/x-diff, Size: 2080 bytes --] From bbaa83c936e195679806a4357dc909f548aedcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy> Date: Wed, 5 Jan 2022 20:59:20 -0300 Subject: [PATCH] nostrip_files: allow full path The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This commit makes it so that `nostrip_files` can take either the filename or the full path. --- Manual.md | 4 ++-- common/hooks/post-install/06-strip-and-debug-pkgs.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 2a7a990d37a1..3e641633ba6a 100644 --- a/Manual.md +++ b/Manual.md @@ -644,7 +644,7 @@ Example: `conf_files="/etc/foo.conf /etc/foo2.conf /etc/foo/*.conf"`. default all binaries are stripped. - `nostrip_files` White-space separated list of ELF binaries that won't be stripped of -debugging symbols. +debugging symbols. Files can be given by full path or by filename. - `noshlibprovides` If set, the ELF binaries won't be inspected to collect the provided sonames in shared libraries. @@ -690,7 +690,7 @@ This appends to the generated file rather than replacing it. features (PIE, relro, etc). Not necessary for most packages. - `nopie_files` White-space seperated list of ELF binaries that won't be checked -for PIE. +for PIE. Files must be given by full path. - `reverts` xbps supports a unique feature which allows to downgrade from broken packages automatically. In the `reverts` field one can define a list of broken 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 2cec68412c50..191c025e552c 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -72,7 +72,7 @@ hook() { fname=${f##*/} for x in ${nostrip_files}; do - if [ "$x" = "$fname" ]; then + if [ "$x" = "$fname" -o "$x" = "${f#$PKGDESTDIR}" ]; then found=1 break fi
[-- Attachment #1: Type: text/plain, Size: 826 bytes --] There's a merged pull request on the void-packages repository nostrip_files: allow full path https://github.com/void-linux/void-packages/pull/34886 Description: The option `nostrip_files` takes a filename without path, in contrast to option `nopie_files` which takes only full path. This is inconvenient in a case where there are two binaries with the same name and only one must be stripped. Case in point: maxima contains executables /usr/lib/maxima/5.45.1/binary-ecl/maxima /usr/lib/maxima/5.45.1/binary-sbcl/maxima The second one breaks if stripped, but the first one is ok to strip (desirable: 59M -> 13M). See: https://github.com/void-linux/void-packages/issues/34861#issuecomment-1006197772 This commit makes it so that `nostrip_files` can take either the filename or the full path.