lsof: fix permission of extracted files
PATCH 1/3 lsof: fix permission of extracted files
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 <[email protected]>
--- package/lsof/lsof.mk | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
package/lsof/lsof.mk +4 -6
@@ -33,13 +33,11 @@ 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) - chmod +w -R $(@D) - rm -f $(@D)/lsof_$(LSOF_VERSION)_src.tar -endef +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) - -LSOF_POST_EXTRACT_HOOKS += LSOF_EXTRACT_TAR define LSOF_CONFIGURE_CMDS (cd $(@D) ; \
Signature · 1 line
1.7.3.4
PATCH 1/3 lsof: fix permission of extracted files
Le Fri, 21 Oct 2011 00:05:23 +0200,
Damian Kaczmarek <[email protected]> a ?crit :
package/lsof/lsof.mk endef · line 39
Quoted 4 lines
package/lsof/lsof.mk +4
-0+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) -
I would prefer:
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
since this is what we use for all other pkg_something_CMDS.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/3 lsof: fix permission of extracted files
Damian, Thomas, All,
Quoted 10 lines · On Friday 21 October 2011 08:55:40 Thomas Petazzoni wrote:
Le Fri, 21 Oct 2011 00:05:23 +0200,
Damian Kaczmarek <[email protected]> a ?crit :package/lsof/lsof.mk endef · line 39
Quoted 4 lines
package/lsof/lsof.mk +4
-0+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) -I would prefer:
Quoted 7 lines
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
since this is what we use for all other
pkg_something_CMDS.
Valid for both solutions:
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 lsof: fix permission of extracted files
In reply to Damian KaczmarekQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Damian" == Damian Kaczmarek <[email protected]> writes:
Damian> Default tar permissiong make it impossible to apply patches to some of the files Damian> Change extraction command to skip permissions by using "-O" tar option Damian> and a pipe tar chain. Solution suggested by: Arnout Vandecappelle <[email protected]>
Committed (With Thomas' suggested change), thanks.
Signature · 1 line
Bye, Peter Korsgaard