Skip to contentSkip to conversation

matrix-gui-apps: Add handling of .cgi files

PATCH New Sam Nelson 1 participant 7 messages Jan 23, 2015

lore
Share & tools
lore

Sam Nelson

author
#0 lore raw

PATCH v2 1/7 matrix-gui-apps: Add handling of .cgi files

- .cgi files will be copied to cgi-bin in application directory.

---
 .../recipes-core/matrix/matrix-gui-apps.inc        |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
meta-arago-extras/recipes-core/matrix/matrix-gui-apps.inc +10 -1
index 4d3b609..cba6337 100644
@@ -16,7 +16,7 @@ do_install_append(){
         install -d ${D}${MATRIX_APP_DIR}/$appdir
 
         # Get the non-script files which are the matrix metadata
-        matrix_apps=`find $appdir -type f ! -name "*\.sh"`
+        matrix_apps=`find $appdir -type f ! -name "*\.sh" -or -name "*\.cgi"`
         for m in $matrix_apps
         do
             install -m 0644 ${MATRIX_FILES_DIR}/$m ${D}${MATRIX_APP_DIR}/$appdir/
@@ -32,6 +32,15 @@ do_install_append(){
             fi
             install -m 0755 ${MATRIX_FILES_DIR}/$s ${D}${bindir}/
         done
+
+        # Put the cgi files in cg-bin directory
+        matrix_cgi=`find $appdir -type f -name "*\.cgi"`
+
+        for c in $matrix_cgi
+        do
+            install -d ${D}${MATRIX_APP_DIR}/$appdir/cgi-bin
+            install -m 0755 ${MATRIX_FILES_DIR}/$c ${D}${MATRIX_APP_DIR}/$appdir/cgi-bin/
+        done
     done
 
     # Go back to the directory we started from in case there are
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH v2 2/7 lighttpd: Add handling of .cgi & .out files in conf.matrix

- Add into .cgi & .out into static-file.exclude-exception list
- Add cgi assignment for .cgi & .out

---
 .../matrix-lighttpd-config/lighttpd.conf.matrix    |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta-arago-extras/recipes-core/matrix/matrix-lighttpd-config/lighttpd.conf.matrix +5 -4
index 82a9fb8..062f9c1 100755
@@ -134,10 +134,11 @@ $HTTP["url"] =~ "\.pdf$" {
 }
 
 ##
-# which extensions should not be handle via static-file transfer
+# which extensions should not be handled via static-file transfer
 #
-# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
-static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+# .php, .pl, .fcgi, are most often handled by mod_fastcgi or mod_cgi
+# Also exclude .cgi and .out files not be handled via static-file transfer
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi", ".out" )
 
 ######### Options that are good to be but not neccesary to be changed #######
 
@@ -225,7 +226,7 @@ compress.filetype          = ("text/plain", "text/html","text/javascript","text/
 #                            )
 
 #### CGI module
-cgi.assign                 = ( ".php"  => "/usr/bin/php-cgi")
+cgi.assign                 = ( ".php"  => "/usr/bin/php-cgi", ".cgi" =>	"/bin/sh", ".out" => "" )
 #cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
 #                               ".cgi" => "/usr/bin/perl" )
 #
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH v2 3/7 lighttpd: Updated lighttpd.conf to accept larger file uploads

In reply to Sam Nelson

- Added server parameter to accept larger file uploads

---
 .../matrix-lighttpd-config/lighttpd.conf.matrix    |    5 +++++
 1 file changed, 5 insertions(+)
meta-arago-extras/recipes-core/matrix/matrix-lighttpd-config/lighttpd.conf.matrix +5 -0
index 062f9c1..8525956 100755
@@ -343,3 +343,8 @@ etag.use-inode = "enable"
 etag.use-mtime = "enable"
 etag.use-size = "enable"
 static-file.etags = "enable"
+
+### Server parameters
+server.upload-dirs = ( "/dev/shm" )
+server.max-request-size = 1000000
+server.network-backend = "writev"
Signature · 1 line
1.7.9.5
author
#3 lore raw

PATCH v2 4/7 matrix-gui-*: Add recipe for keystone2 specific images

In reply to Sam Nelson

- Keystone matrix gui files are maintained in a different git (keystone-demos/matrix-apps)
- Add common include file for ks2 git, so that other keystone modules can reuse
- Add recipe for including images used by keystone2 apps matrix gui

---
 .../matrix/matrix-gui-apps-ks2-git.inc             |   10 ++++++++++
 .../matrix/matrix-gui-apps-ks2-images_2.0.bb       |   18 ++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui-apps-ks2-git.inc
 create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui-apps-ks2-images_2.0.bb
meta-arago-extras/recipes-core/matrix/matrix-gui-apps-ks2-git.inc new file +10 -0
new file mode 100644
index 0000000..7ae97d7
@@ -0,0 +1,10 @@
+# Pull in the base package for installing matrix applications
+require matrix-gui-apps-git.inc
+
+# Change SRC URL and revision
+BRANCH = "master"
+SRC_URI = "git://git.ti.com/keystone-demos/matrix-apps.git;protocol=git;branch=${BRANCH}"
+# commit corresponds to DEV.MATRIX.APPS.01.00.00.04
+SRCREV = "04a9a07d600cf26a114fbb60a6f7fc6c3c70f506"
+
+INC_PR = "r0"
meta-arago-extras/recipes-core/matrix/matrix-gui-apps-ks2-images_2.0.bb new file +18 -0
new file mode 100644
index 0000000..a8e49b6
@@ -0,0 +1,18 @@
+DESCRIPTION = "Images package for Matrix GUI v2 Applications for Keystone II"
+HOMEPAGE = "http://git.ti.com/cgit/cgit.cgi/keystone-demos/matrix-apps.git"
+
+require matrix-gui-apps-ks2-git.inc
+require matrix-gui-paths.inc
+
+PR = "${INC_PR}.0"
+
+inherit allarch
+
+S = "${WORKDIR}/git/images"
+
+do_install(){
+    install -d ${D}${MATRIX_APP_DIR}
+    cp -rf ${S} ${D}${MATRIX_APP_DIR}
+}
+
+FILES_${PN} += "${MATRIX_BASE_DIR}/*"
Signature · 1 line
1.7.9.5
author
#4 lore raw

PATCH v2 5/7 matrix-gui: Add submenus for keystone2 apps

In reply to Sam Nelson

- Adds demos and utility submenus

---
 .../matrix/matrix-gui-submenus-ks2_2.0.bb          |   36 ++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui-submenus-ks2_2.0.bb
meta-arago-extras/recipes-core/matrix/matrix-gui-submenus-ks2_2.0.bb new file +36 -0
new file mode 100644
index 0000000..2e3ff43
@@ -0,0 +1,36 @@
+DESCRIPTION = "Submenu packages for Matrix GUI v2 for Keystone II"
+HOMEPAGE = "http://git.ti.com/cgit/cgit.cgi/keystone-demos/matrix-apps.git"
+
+require matrix-gui-apps-ks2-git.inc
+
+# This package does not use a subdirectory as ${S} so we need to
+# reset the LIC_FILES_CHKSUM setting from the matrix-gui-apps-git.inc file
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6e0ae7214f6c74c149cb25f373057fa9"
+
+PR = "${INC_PR}.0"
+
+# These packages make submenus in matrix and are not architecture specific
+inherit allarch
+
+S = "${WORKDIR}/git"
+
+# List of submenus to build packages for
+SUBMENUS = "utilities_submenu demos_submenu"
+
+do_install(){
+    install -d ${D}${MATRIX_APP_DIR}
+
+    for x in ${SUBMENUS}
+    do
+        cp -rf ${S}/$x ${D}${MATRIX_APP_DIR}/
+    done
+}
+
+PACKAGES += "${PN}-utility ${PN}-demos"
+
+# Make sure app images has been installed
+RDEPENDS_${PN} += "matrix-gui-apps-ks2-images"
+
+# Add the files for each submenu package
+FILES_${PN}-utility = "${MATRIX_APP_DIR}/utilities_submenu/*"
+FILES_${PN}-demos = "${MATRIX_APP_DIR}/demos_submenu/*"
Signature · 1 line
1.7.9.5
author
#5 lore raw

PATCH v2 6/7 matrix-gui: Add recipe for matrix GUI for keystone2 demo applications

In reply to Sam Nelson

- Add additional demo application GUI for keysone2 demo applications.

---
 .../matrix/matrix-gui-ks2-demos_2.0.bb             |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui-ks2-demos_2.0.bb
meta-arago-extras/recipes-core/matrix/matrix-gui-ks2-demos_2.0.bb new file +17 -0
new file mode 100644
index 0000000..1d53122
@@ -0,0 +1,17 @@
+DESCRIPTION = "Matrix GUI for kesytone2 applications"
+HOMEPAGE = "http://git.ti.com/cgit/cgit.cgi/keystone-demos/matrix-apps.git"
+
+require matrix-gui-apps-ks2-git.inc
+
+PR = "${INC_PR}.0"
+
+inherit allarch
+
+S = "${WORKDIR}/git/demo_apps"
+
+PACKAGES += "${PN}-demos"
+
+# Make sure app images and submenus for ks2 has been installed.
+RDEPENDS_${PN} += "matrix-gui-apps-ks2-images matrix-gui-submenus-ks2"
+
+FILES_${PN} += "${MATRIX_BASE_DIR}/*"
Signature · 1 line
1.7.9.5
author
#6 lore raw

PATCH v2 7/7 matrix-gui: Add matrix gui for utility applications

In reply to Sam Nelson

- Add matrix gui for keystone2 specific utility applications

---
 ...demos_2.0.bb => matrix-gui-utility-apps_2.0.bb} |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
 copy meta-arago-extras/recipes-core/matrix/{matrix-gui-ks2-demos_2.0.bb => matrix-gui-utility-apps_2.0.bb} (57%)
meta-arago-extras/recipes-core/matrix/matrix-gui-utility-apps_2.0.bb renamed from meta-arago-extras/recipes-core/matrix/matrix-gui-ks2-demos_2.0.bb +5 -5
similarity index 57%
copy from meta-arago-extras/recipes-core/matrix/matrix-gui-ks2-demos_2.0.bb
copy to meta-arago-extras/recipes-core/matrix/matrix-gui-utility-apps_2.0.bb
index 1d53122..d6b1d69 100644
@@ -1,4 +1,4 @@
-DESCRIPTION = "Matrix GUI for kesytone2 applications"
+DESCRIPTION = "Utility application GUI for Keystone2"
 HOMEPAGE = "http://git.ti.com/cgit/cgit.cgi/keystone-demos/matrix-apps.git"
 
 require matrix-gui-apps-ks2-git.inc
@@ -7,11 +7,11 @@ PR = "${INC_PR}.0"
 
 inherit allarch
 
-S = "${WORKDIR}/git/demo_apps"
+S = "${WORKDIR}/git/utility_apps"
 
-PACKAGES += "${PN}-demos"
+PACKAGES += "${PN}-utility"
 
-# Make sure app images and submenus for ks2 has been installed.
-RDEPENDS_${PN} += "matrix-gui-apps-ks2-images matrix-gui-submenus-ks2"
+# Make sure keystone2 app images and submenus has been installed.
+RDEPENDS_${PN} += "matrix-gui-apps-ks2-images matrix-gui-submenus-ks2-"
 
 FILES_${PN} += "${MATRIX_BASE_DIR}/*"
Signature · 1 line
1.7.9.5