lsof: fix permission of extracted files
authorDamian Kaczmarek <damian@veritymedical.co.uk>
Thu, 20 Oct 2011 22:05:23 +0000 (00:05 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 24 Nov 2011 22:07:09 +0000 (23:07 +0100)
Closes #4369

Default tar permissiong make it impossible to apply patches to some of
the files.

Change extraction command to skip permissions by using "-O" tar option
and a pipe tar chain.

Solution suggested by: Arnout Vandecappelle <arnout@mind.be>

[Peter: rework to use define as suggested by Thomas]
Signed-off-by: Damian Kaczmarek <damian@veritymedical.co.uk>
Tested-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/lsof/lsof.mk

diff --git a/CHANGES b/CHANGES
index 289a6b2631921681f8f1c33273726c613629c93a..9fbfe9f58f788be22f3fcae77cf216e3eea10d2f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,10 @@
        Updated/fixed packages: busybox, freetype, mplayer, opencv,
        rsyslog, xapp_xf86dga
 
+       Issues resolved (http://bugs.uclibc.org):
+
+       #4369: Fix permissions on untared lsof archive
+
 2011.11-rc2, Released November 18th, 2011:
 
        Fixes all over the tree and new features.
index ff76f92c6dab1e489eb73e960b8c1a847c96afec..c07fb2da36a2d8dbcb3049ce5c5259a6f1d963f9 100644 (file)
@@ -33,13 +33,12 @@ endef
 endif
 
 # The .tar.bz2 contains another .tar, which contains the source code.
-define LSOF_EXTRACT_TAR
-       $(TAR) $(TAR_STRIP_COMPONENTS)=1 -xf $(@D)/lsof_$(LSOF_VERSION)_src.tar -C $(@D)
-       rm -f $(@D)/lsof_$(LSOF_VERSION)_src.tar
+define LSOF_EXTRACT_CMDS
+        $(INFLATE.bz2) $(DL_DIR)/$(LSOF_SOURCE) | \
+                $(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \
+        $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LSOF_DIR) $(TAR_OPTIONS) -
 endef
 
-LSOF_POST_EXTRACT_HOOKS += LSOF_EXTRACT_TAR
-
 define LSOF_CONFIGURE_CMDS
        (cd $(@D) ; \
                echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \