FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-01-2008, 05:47 PM
Thomas Bächler
 
Default Make strip paths configurable

This patch introduces a new STRIP_DIRS makepkg.conf option
to change makepkg's search path when stripping binaries.
---
etc/makepkg.conf.in | 2 ++
scripts/makepkg.sh.in | 8 +++++---
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index bb2018f..75dd0e9 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -73,6 +73,8 @@ OPTIONS=(strip docs libtool emptydirs zipman)
INTEGRITY_CHECK=(md5)
#-- Info and doc directories to remove (if option set correctly above)
DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/*/{info,doc,gtk-doc})
+#-- Directories to be searched for the strip option
+STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})

################################################## #######################
# PACKAGE OUTPUT
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c809498..4a6f9b2 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -737,9 +737,11 @@ tidy_install() {

if [ "$(check_option strip)" = "y" ]; then
msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")"
- local binary bindirs
- bindirs="bin lib sbin usr/bin usr/lib usr/sbin usr/local/bin usr/local/lib usr/local/sbin opt/*/bin opt/*/lib opt/*/sbin"
- find ${bindirs} -type f 2>/dev/null | while read binary ; do
+ local binary
+ if [ -z "${STRIP_DIRS[@]}" ]; then
+ STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
+ fi
+ find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do
case "$(file -biz "$binary")" in
*application/x-sharedlib*) # Libraries
/usr/bin/strip --strip-debug "$binary";;
--
1.5.6


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 07-01-2008, 06:08 PM
"Dan McGee"
 
Default Make strip paths configurable

On Tue, Jul 1, 2008 at 12:47 PM, Thomas Bächler <thomas@archlinux.org> wrote:
> This patch introduces a new STRIP_DIRS makepkg.conf option
> to change makepkg's search path when stripping binaries.
> ---
> etc/makepkg.conf.in | 2 ++
> scripts/makepkg.sh.in | 8 +++++---
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
> index bb2018f..75dd0e9 100644
> --- a/etc/makepkg.conf.in
> +++ b/etc/makepkg.conf.in
> @@ -73,6 +73,8 @@ OPTIONS=(strip docs libtool emptydirs zipman)
> INTEGRITY_CHECK=(md5)
> #-- Info and doc directories to remove (if option set correctly above)
> DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/*/{info,doc,gtk-doc})
> +#-- Directories to be searched for the strip option
> +STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
>
> ################################################## #######################
> # PACKAGE OUTPUT
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index c809498..4a6f9b2 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -737,9 +737,11 @@ tidy_install() {
>
> if [ "$(check_option strip)" = "y" ]; then
> msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")"
> - local binary bindirs
> - bindirs="bin lib sbin usr/bin usr/lib usr/sbin usr/local/bin usr/local/lib usr/local/sbin opt/*/bin opt/*/lib opt/*/sbin"
> - find ${bindirs} -type f 2>/dev/null | while read binary ; do
> + local binary
> + if [ -z "${STRIP_DIRS[@]}" ]; then
> + STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
> + fi
> + find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do
This breaks what was fixed here; you'll need to resubmit with that in mind:
http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=27943a04d6dd135628c23 13525ebffbcd76cc514

> case "$(file -biz "$binary")" in
> *application/x-sharedlib*) # Libraries
> /usr/bin/strip --strip-debug "$binary";;
> --

Otherwise I think it makes sense, anyone object?

-Dan
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 07-01-2008, 07:27 PM
Thomas Bächler
 
Default Make strip paths configurable

Dan McGee schrieb:

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c809498..4a6f9b2 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -737,9 +737,11 @@ tidy_install() {

if [ "$(check_option strip)" = "y" ]; then
msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")"
- local binary bindirs
- bindirs="bin lib sbin usr/bin usr/lib usr/sbin usr/local/bin usr/local/lib usr/local/sbin opt/*/bin opt/*/lib opt/*/sbin"
- find ${bindirs} -type f 2>/dev/null | while read binary ; do
+ local binary
+ if [ -z "${STRIP_DIRS[@]}" ]; then
+ STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
+ fi
+ find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do

This breaks what was fixed here; you'll need to resubmit with that in mind:
http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=27943a04d6dd135628c23 13525ebffbcd76cc514


I don't understand what you mean. The "find" line is unchanged. Can you
elaborate?


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 10:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org