Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] gettext: fixup library permissions
@ 2013-09-18 13:38 Gustavo Zacarias
  2013-09-18 13:38 ` [Buildroot] [PATCH 2/3] libiconv: " Gustavo Zacarias
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-18 13:38 UTC (permalink / raw)
  To: buildroot

libintl.so* is installed without +x permissions thus preventing
stripping. Fix it up in the post install target hooks.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gettext/gettext.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index baf42ef..7af2035 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -58,5 +58,12 @@ endef
 endif
 endif # GETTEXT_TOOLS = n
 
+# Library lacks +x so strip skips it
+define GETTEXT_FIX_LIBRARY_MODE
+	-chmod +x $(TARGET_DIR)/usr/lib/libintl.so*
+endef
+
+GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_FIX_LIBRARY_MODE
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] libiconv: fixup library permissions
  2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
@ 2013-09-18 13:38 ` Gustavo Zacarias
  2013-09-18 13:38 ` [Buildroot] [PATCH 3/3] pciutils: " Gustavo Zacarias
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-18 13:38 UTC (permalink / raw)
  To: buildroot

libiconv.so* and libcharset.so* are installed without +x permissions
thus preventing stripping. Fix it up in the post install target hooks.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/libiconv/libiconv.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/libiconv/libiconv.mk b/package/libiconv/libiconv.mk
index d6a1d6f..aa6d6de 100644
--- a/package/libiconv/libiconv.mk
+++ b/package/libiconv/libiconv.mk
@@ -21,6 +21,14 @@ endef
 LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS
 LIBICONV_POST_INSTALL_STAGING_HOOKS += LIBICONV_STAGING_REMOVE_PRELOADABLE_LIBS
 
+# Library lacks +x so strip skips it
+define LIBICONV_FIX_LIBRARY_MODE
+	-chmod +x $(TARGET_DIR)/usr/lib/libcharset.so*
+	-chmod +x $(TARGET_DIR)/usr/lib/libiconv.so*
+endef
+
+LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_FIX_LIBRARY_MODE
+
 $(eval $(autotools-package))
 
 # Configurations where the toolchain supports locales and the libiconv
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] pciutils: fixup library permissions
  2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
  2013-09-18 13:38 ` [Buildroot] [PATCH 2/3] libiconv: " Gustavo Zacarias
@ 2013-09-18 13:38 ` Gustavo Zacarias
  2013-09-18 14:57 ` [Buildroot] [PATCH 1/3] gettext: " Peter Korsgaard
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-18 13:38 UTC (permalink / raw)
  To: buildroot

libpci.so* is installed without +x permissions thus preventing
stripping. Fix it up in the post install target hooks.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/pciutils/pciutils.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk
index 350ca0d..fd6f8aa 100644
--- a/package/pciutils/pciutils.mk
+++ b/package/pciutils/pciutils.mk
@@ -65,4 +65,12 @@ define PCIUTILS_INSTALL_STAGING_CMDS
 		SHARED=$(PCIUTILS_SHARED) install install-lib
 endef
 
+
+# Library lacks +x so strip skips it
+define PCIUTILS_FIX_LIBRARY_MODE
+	-chmod +x $(TARGET_DIR)/usr/lib/libpci.so*
+endef
+
+PCIUTILS_POST_INSTALL_TARGET_HOOKS += PCIUTILS_FIX_LIBRARY_MODE
+
 $(eval $(generic-package))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] gettext: fixup library permissions
  2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
  2013-09-18 13:38 ` [Buildroot] [PATCH 2/3] libiconv: " Gustavo Zacarias
  2013-09-18 13:38 ` [Buildroot] [PATCH 3/3] pciutils: " Gustavo Zacarias
@ 2013-09-18 14:57 ` Peter Korsgaard
  2013-09-18 16:49 ` Thomas Petazzoni
  2013-09-18 20:51 ` Arnout Vandecappelle
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2013-09-18 14:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> libintl.so* is installed without +x permissions thus preventing
 Gustavo> stripping. Fix it up in the post install target hooks.

Committed series, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] gettext: fixup library permissions
  2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
                   ` (2 preceding siblings ...)
  2013-09-18 14:57 ` [Buildroot] [PATCH 1/3] gettext: " Peter Korsgaard
@ 2013-09-18 16:49 ` Thomas Petazzoni
  2013-09-18 20:51 ` Arnout Vandecappelle
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2013-09-18 16:49 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Wed, 18 Sep 2013 10:38:01 -0300, Gustavo Zacarias wrote:
> libintl.so* is installed without +x permissions thus preventing
> stripping. Fix it up in the post install target hooks.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

There are apparently a few other packages affected by this, see
http://patchwork.ozlabs.org/patch/246622/.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] gettext: fixup library permissions
  2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
                   ` (3 preceding siblings ...)
  2013-09-18 16:49 ` Thomas Petazzoni
@ 2013-09-18 20:51 ` Arnout Vandecappelle
  4 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-09-18 20:51 UTC (permalink / raw)
  To: buildroot

On 18/09/13 15:38, Gustavo Zacarias wrote:
> libintl.so* is installed without +x permissions thus preventing
> stripping. Fix it up in the post install target hooks.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

  I wonder if this is the right path to take. There is really no reason 
why shared libs should be executable. And in the target of my 
allpackageyesconfig I find a lot more than these three:

$ find target -type f -a \
   \( -name \*.so -o -name \*.so.[0-9]* \) -a \
   \! -executable
target/usr/libexec/sudoers.so
target/usr/libexec/sudo_noexec.so
target/usr/lib/libisc.so.57.1.2
target/usr/lib/python2.7/site-packages/_omniidlmodule.so.4.1
target/usr/lib/libdvbsec.so
target/usr/lib/libesg.so
target/usr/lib/libacl.so.1.1.0
target/usr/lib/libCOSDynamic4.so.1.6
target/usr/lib/libomniDynamic4.so.1.6
target/usr/lib/libhogweed.so.2.5
target/usr/lib/libdns.so.113.0.1
target/usr/lib/libpci.so.3.2.0
target/usr/lib/nm-n.libdirectfb-1.6.so.0
target/usr/lib/libisccfg.so.50.0.9
target/usr/lib/lua/cjson.so
target/usr/lib/nm-n.libdirect-1.6.so.0
target/usr/lib/libattr.so.1.1.0
target/usr/lib/libomniORB4.so.1.6
target/usr/lib/nm-n.libfusion-1.6.so.0
target/usr/lib/libbind9.so.50.0.10
target/usr/lib/libucsi.so
target/usr/lib/libisccc.so.50.0.4
target/usr/lib/libdvbcfg.so
target/usr/lib/libomniConnectionMgmt4.so.1.6
target/usr/lib/libebml.so.3
target/usr/lib/libproxychains4.so
target/usr/lib/libdvben50221.so
target/usr/lib/libomniCodeSets4.so.1.6
target/usr/lib/libmatroska.so.5
target/usr/lib/liblwres.so.50.0.9
target/usr/lib/libdvbapi.so
target/usr/lib/libCOS4.so.1.6
target/usr/lib/liblockdev.1.0.3.so
target/usr/lib/libnettle.so.4.7
target/usr/lib/libomnithread.so.3.4


  In addition, such patches are not really future-safe in case a package 
adds a new library.

  So I would propose to instead change the find command to

STRIP_FIND_CMD += -type f
STRIP_FIND_CMD += \( -perm /111 -o -name \*.so -o -name \*.so.[0-9]* \)

  Regards,
  Arnout

> ---
>   package/gettext/gettext.mk | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
> index baf42ef..7af2035 100644
> --- a/package/gettext/gettext.mk
> +++ b/package/gettext/gettext.mk
> @@ -58,5 +58,12 @@ endef
>   endif
>   endif # GETTEXT_TOOLS = n
>
> +# Library lacks +x so strip skips it
> +define GETTEXT_FIX_LIBRARY_MODE
> +	-chmod +x $(TARGET_DIR)/usr/lib/libintl.so*
> +endef
> +
> +GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_FIX_LIBRARY_MODE
> +
>   $(eval $(autotools-package))
>   $(eval $(host-autotools-package))
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-18 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 13:38 [Buildroot] [PATCH 1/3] gettext: fixup library permissions Gustavo Zacarias
2013-09-18 13:38 ` [Buildroot] [PATCH 2/3] libiconv: " Gustavo Zacarias
2013-09-18 13:38 ` [Buildroot] [PATCH 3/3] pciutils: " Gustavo Zacarias
2013-09-18 14:57 ` [Buildroot] [PATCH 1/3] gettext: " Peter Korsgaard
2013-09-18 16:49 ` Thomas Petazzoni
2013-09-18 20:51 ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox