diff mbox

[RFC,1/2] Add configuration item for custom JavaScript install path

Message ID 1340088964-10630-2-git-send-email-spdawson@gmail.com
State Rejected
Headers show

Commit Message

Simon Dawson June 19, 2012, 6:56 a.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/Config.in            |    1 +
 package/javascript/Config.in |    5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 package/javascript/Config.in

Comments

Arnout Vandecappelle June 20, 2012, 11:38 p.m. UTC | #1
On 06/19/12 08:56, spdawson@gmail.com wrote:
> From: Simon Dawson<spdawson@gmail.com>
>
> Signed-off-by: Simon Dawson<spdawson@gmail.com>
> ---
>   package/Config.in            |    1 +
>   package/javascript/Config.in |    5 +++++
>   2 files changed, 6 insertions(+)
>   create mode 100644 package/javascript/Config.in
>
> diff --git a/package/Config.in b/package/Config.in
> index 1044e9f..b60ba2b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -378,6 +378,7 @@ source "package/libv4l/Config.in"
>   endmenu
>
>   menu "Javascript"
> +source "package/javascript/Config.in"
>   source "package/explorercanvas/Config.in"
>   source "package/flot/Config.in"
>   source "package/jquery/Config.in"
> diff --git a/package/javascript/Config.in b/package/javascript/Config.in
> new file mode 100644
> index 0000000..c837e9e
> --- /dev/null
> +++ b/package/javascript/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_JAVASCRIPT_INSTALL_PATH
> +	string "Target install path for JavaScript"
> +	default "/var/www"
> +	help
> +	  Specify a target install path for JavaScript files

  I would instead define a WWW_INSTALL_PATH, which can also be used to set the
wwwroot of the various http servers.  We could still have a javascript path
to point to a subdirectory of the wwwroot, but I don't think there's much point.

  Question is where this config option should go then.  We could put it next to
the webservers, but it is possible that you use some javascript libraries without
webserver (e.g. because it's custom-written in another application).  We could
also put it in target/generic/Config.in, but there's currently nothing similar
there...

  BTW personally, I'm in favour of defaulting to /www for this path instead of
/var/www.  However, the Linux Foundation's draft Filesystem Hierarchy Standard [1]
puts it at /srv/www.  Sounds even better to me, but it's a big change from our
current layout.


  Regards,
  Arnout

[1] http://bzr.linuxfoundation.org/loggerhead/lsb/devel/fhs-spec/annotate/head:/root-filesystem.xml#L1700
Simon Dawson June 26, 2012, 8:32 a.m. UTC | #2
Thanks for the feedback Arnout.

On 21 June 2012 00:38, Arnout Vandecappelle <arnout@mind.be> wrote:
>  I would instead define a WWW_INSTALL_PATH, which can also be used to set
> the wwwroot of the various http servers.

It's a good idea, but I don't know quite how it would be achieved
cleanly. A quick grep through Buildroot reveals the following
potential problem files.

* package/boa/boa.conf
* package/tinyhttpd/S85tinyhttpd
* package/tinyhttpd/tinyhttpd.patch

The configuration files could be fixed up during installation of the
relevant packages, but the httpd patch is more of a problem.

Does anyone have a suggestion for how to deal with this?

Simon.
Arnout Vandecappelle June 28, 2012, 10:12 p.m. UTC | #3
On 06/26/12 10:32, Simon Dawson wrote:
> Thanks for the feedback Arnout.
>
> On 21 June 2012 00:38, Arnout Vandecappelle<arnout@mind.be>  wrote:
>>   I would instead define a WWW_INSTALL_PATH, which can also be used to set
>> the wwwroot of the various http servers.
>
> It's a good idea, but I don't know quite how it would be achieved
> cleanly. A quick grep through Buildroot reveals the following
> potential problem files.
>
> * package/boa/boa.conf
> * package/tinyhttpd/S85tinyhttpd
> * package/tinyhttpd/tinyhttpd.patch
>
> The configuration files could be fixed up during installation of the
> relevant packages, but the httpd patch is more of a problem.
>
> Does anyone have a suggestion for how to deal with this?


  Add -DWWW_INSTALL_PATH='"$(WWW_INSTALL_PATH)"' to CFLAGS.

  Regards,
  Arnout
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 1044e9f..b60ba2b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -378,6 +378,7 @@  source "package/libv4l/Config.in"
 endmenu
 
 menu "Javascript"
+source "package/javascript/Config.in"
 source "package/explorercanvas/Config.in"
 source "package/flot/Config.in"
 source "package/jquery/Config.in"
diff --git a/package/javascript/Config.in b/package/javascript/Config.in
new file mode 100644
index 0000000..c837e9e
--- /dev/null
+++ b/package/javascript/Config.in
@@ -0,0 +1,5 @@ 
+config BR2_JAVASCRIPT_INSTALL_PATH
+	string "Target install path for JavaScript"
+	default "/var/www"
+	help
+	  Specify a target install path for JavaScript files