[Buildroot] [PATCH 1/1] support/testing: php: fix test by switching to "Debian" filesystem layout

Julien Olivain via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
Buildroot commit [1] (package/apache: use "Debian" filesystem
layout to fix read-only rootfs) changed the filesystem layout.
This had the effect of installing files to different locations
and breaking the test_php runtime test.

This commit fixes the issue by updating the file paths to their
right locations. The "httpd.conf" was updated by following the
same recipe described in the comment (starting from a config
file as installed by the apache Buildroot package).

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/16060152979

[1] https://gitlab.com/buildroot.org/buildroot/-/commit/1006666f67ba2837ba4cf1014186f3b1cc8f3415

Signed-off-by: Julien Olivain <[email protected]>
---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/16075500679
---
 .../rootfs-overlay/etc/apache2/httpd.conf     | 22 +++++++++----------
 .../apache2/default-site}/htdocs/script.php   |  0
 2 files changed, 11 insertions(+), 11 deletions(-)
 rename support/testing/tests/package/test_php/rootfs-overlay/usr/{ => share/apache2/default-site}/htdocs/script.php (100%)

diff --git a/support/testing/tests/package/test_php/rootfs-overlay/etc/apache2/httpd.conf b/support/testing/tests/package/test_php/rootfs-overlay/etc/apache2/httpd.conf
index 109247514b..75bad163db 100644
--- a/support/testing/tests/package/test_php/rootfs-overlay/etc/apache2/httpd.conf
+++ b/support/testing/tests/package/test_php/rootfs-overlay/etc/apache2/httpd.conf
@@ -5,14 +5,14 @@
 # - "ServerName localhost:80" added to remove startup warning,
 # - "AddType application/x-httpd-php .php" added to enable php.
 
-ServerRoot "/usr"
+ServerRoot "/"
 Listen 80
 
-LoadModule authz_core_module modules/mod_authz_core.so
-LoadModule mime_module modules/mod_mime.so
-LoadModule log_config_module modules/mod_log_config.so
-LoadModule unixd_module modules/mod_unixd.so
-LoadModule php_module modules/libphp.so
+LoadModule authz_core_module usr/lib/apache2/modules/mod_authz_core.so
+LoadModule mime_module usr/lib/apache2/modules/mod_mime.so
+LoadModule log_config_module usr/lib/apache2/modules/mod_log_config.so
+LoadModule unixd_module usr/lib/apache2/modules/mod_unixd.so
+LoadModule php_module usr/lib/apache2/modules/libphp.so
 
 <IfModule unixd_module>
 User daemon
@@ -27,8 +27,8 @@ ServerName localhost:80
     Require all denied
 </Directory>
 
-DocumentRoot "/usr/htdocs"
-<Directory "/usr/htdocs">
+DocumentRoot "/usr/share/apache2/default-site/htdocs"
+<Directory "/usr/share/apache2/default-site/htdocs">
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted
@@ -38,7 +38,7 @@ DocumentRoot "/usr/htdocs"
     Require all denied
 </Files>
 
-ErrorLog "/var/logs/error_log"
+ErrorLog "var/log/apache2/error_log"
 LogLevel warn
 
 <IfModule log_config_module>
@@ -49,10 +49,10 @@ LogLevel warn
       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
     </IfModule>
 
-    CustomLog "/var/logs/access_log" common
+    CustomLog "var/log/apache2/access_log" common
 </IfModule>
 
 <IfModule mime_module>
-    TypesConfig /etc/apache2/mime.types
+    TypesConfig etc/apache2/mime.types
     AddType application/x-httpd-php .php
 </IfModule>
diff --git a/support/testing/tests/package/test_php/rootfs-overlay/usr/htdocs/script.php b/support/testing/tests/package/test_php/rootfs-overlay/usr/share/apache2/default-site/htdocs/script.php
similarity index 100%
rename from support/testing/tests/package/test_php/rootfs-overlay/usr/htdocs/script.php
rename to support/testing/tests/package/test_php/rootfs-overlay/usr/share/apache2/default-site/htdocs/script.php
-- 
2.55.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.