Skip to contentSkip to conversation

package/apache: fixing apxs path mangling

PATCH New Angelo Compagnucci 3 participants 3 messages Apr 24, 2020 – May 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/apache: fixing apxs path mangling

Latest version of Apache introduce a new apxs with a slightly modified path handling logic. In order to simplify the crosscompilation, the software removes the common prefix from bin install dir and build install dir, but for this to work they both should have a common prefix. So we introduce a new regexp to fix /usr/bin to staging dir, the regexps are also fixed to replace only the exact path between double quotes.a

Fixes:
http://autobuild.buildroot.net/results/c41f31566974209897a3a1ec35afe2536fb248cc
http://autobuild.buildroot.net/results/b93f19976ce96e79ea159c25ed74a7377c78f334

---
 package/apache/apache.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/apache/apache.mk +2 -1
index 48a64ea..f0775e6 100644
@@ -99,7 +99,8 @@ APACHE_CONF_OPTS += --disable-deflate
 endif
 
 define APACHE_FIX_STAGING_APACHE_CONFIG
-	$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
+	$(SED) 's%"/usr/bin"%"$(STAGING_DIR)/usr/bin"%' $(STAGING_DIR)/usr/bin/apxs
+	$(SED) 's%"/usr/build"%"$(STAGING_DIR)/usr/build"%' $(STAGING_DIR)/usr/bin/apxs
 	$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
 endef
 APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 package/apache: fixing apxs path mangling

Angelo, All,

On 2020-04-24 10:31 +0200, Angelo Compagnucci spake thusly:

Quoted 7 lines

Latest version of Apache introduce a new apxs with a slightly modified path handling logic. In order to simplify the crosscompilation, the software removes the common prefix from bin install dir and build install dir, but for this to work they both should have a common prefix. So we introduce a new regexp to fix /usr/bin to staging dir, the regexps are also fixed to replace only the exact path between double quotes.a

There was a stray 'a' at the end of the sentence, so I replaced it with:

', to avoid replacing the she-bang line.'

Also, I did not see the point of enclosing the existing /usr/build pattern in double-quotes, as it still works without. Yes, i see the consistency with /usr/bin, but then it woudl still be inconsustent with the prefix replacement pattern anyway... So I dropped the double quotes for /usr/build.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 30 lines

Fixes:
http://autobuild.buildroot.net/results/c41f31566974209897a3a1ec35afe2536fb248cc
http://autobuild.buildroot.net/results/b93f19976ce96e79ea159c25ed74a7377c78f334

---
 package/apache/apache.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/apache/apache.mk +2 -1
index 48a64ea..f0775e6 100644
@@ -99,7 +99,8 @@ APACHE_CONF_OPTS += --disable-deflate
 endif
 
 define APACHE_FIX_STAGING_APACHE_CONFIG
-	$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
+	$(SED) 's%"/usr/bin"%"$(STAGING_DIR)/usr/bin"%' $(STAGING_DIR)/usr/bin/apxs
+	$(SED) 's%"/usr/build"%"$(STAGING_DIR)/usr/build"%' $(STAGING_DIR)/usr/bin/apxs
 	$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
 endef
 APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/apache: fixing apxs path mangling

In reply to Angelo Compagnucci
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Angelo" == Angelo Compagnucci <[email protected]> writes:

Latest version of Apache introduce a new apxs with a slightly modified path handling logic. In order to simplify the crosscompilation, the software removes the common prefix from bin install dir and build install dir, but for this to work they both should have a common prefix. So we introduce a new regexp to fix /usr/bin to staging dir, the regexps are also fixed to replace only the exact path between double quotes.a

Quoted 5 lines

Fixes:
http://autobuild.buildroot.net/results/c41f31566974209897a3a1ec35afe2536fb248cc
http://autobuild.buildroot.net/results/b93f19976ce96e79ea159c25ed74a7377c78f334

Committed to 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard