eja: new package (revised)
PATCH 1/1 eja: new package (revised)
--- package/Config.in | 1 + package/eja/Config.in | 7 +++++++ package/eja/eja.hash | 2 ++ package/eja/eja.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 package/eja/Config.in create mode 100644 package/eja/eja.hash create mode 100644 package/eja/eja.mk
package/Config.in +1 -0
@@ -476,6 +476,7 @@ endif endmenu menu "Interpreter languages and scripting" + source "package/eja/Config.in" source "package/enscript/Config.in" source "package/erlang/Config.in" if BR2_PACKAGE_ERLANG
package/eja/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_EJA + bool "eja" + help + eja is a forking and Lua extensible micro web server that can + serve static and dynamic generated content. + + http://github.com/ubaldus/eja
package/eja/eja.hash new file +2 -0
@@ -0,0 +1,2 @@ +#locally computed +sha256 5354ca3d353b8e3696eecc1b224898b1f9af5ac0f2c2f5cc2a022e5e30157c74 9.4.22.tar.gz
package/eja/eja.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# eja +# +################################################################################ + +EJA_VERSION = 9.4.22 +EJA_SOURCE = $(EJA_VERSION).tar.gz +EJA_SITE = https://github.com/ubaldus/eja/archive + +ifeq ($(BR2_STATIC_LIBS),y) +EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL +EJA_MYLIBS = -static -w +else +EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL -DLUA_USE_DLOPEN +EJA_MYLIBS = -ldl +endif + +define EJA_BUILD_CMDS + $(MAKE) \ + CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ + CFLAGS="$(TARGET_CFLAGS) $(EJA_CFLAGS)" \ + MYLIBS="$(EJA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" -C $(@D) +endef + +define EJA_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/eja $(TARGET_DIR)/usr/bin/eja +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH 1/1 eja: new package (revised)
Hello,
Thanks for this new iteration. However, I did not realize that eja was your own creation. How widely is it used? Looking at the Github page, it really looks like a personal project that isn't that widely used, so I am not sure to which point a Buildroot package makes sense.
I also have some other comments.
First, your commit title should not contain "(revised)" otherwise this will be kept forever in the Git history. See the Buildroot manual for details on how to send new iterations of a patch: adding a version and a changelog.
package/Config.in endif · line 479
Quoted 2 lines · Ubaldo Porcheddu
menu "Interpreter languages and scripting"
package/Config.in +1
-0+ source "package/eja/Config.in"
Does it quality as a Language interpreter, or as a web-server? I couldn't really understand.
Quoted 8 lines
package/eja/eja.mk new file +8
-0+EJA_VERSION = 9.4.22 +EJA_SOURCE = $(EJA_VERSION).tar.gz +EJA_SITE = https://github.com/ubaldus/eja/archive + +ifeq ($(BR2_STATIC_LIBS),y) +EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL +EJA_MYLIBS = -static -w +else
package/eja/eja.mk line 24
Quoted 10 lines
package/eja/eja.mk new file +10
-0+EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL -DLUA_USE_DLOPEN +EJA_MYLIBS = -ldl +endif + +define EJA_BUILD_CMDS + $(MAKE) \ + CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ + CFLAGS="$(TARGET_CFLAGS) $(EJA_CFLAGS)" \ + MYLIBS="$(EJA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" -C $(@D) +endef
Instead of duplicating the Lua interpreter source code into the Eja project, why don't you link with the Lua interpreter library instead? This makes sure that when the Lua interpreter is updated (to fix bugs, etc.), Eja also gets fixed.
Finally, if it's a server, shouldn't it have an initscript? I see that you've added one in your ejabox project, why isn't it part of this package?
But again, overall, I'm questioning the value of packaging a piece of software that seems to be very confidential, but I admit that my position may be controversial, and other people in the Buildroot community may prefer that we accept patches for all packages, regardless of their "popularity".
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 eja: new package (revised)
Hello Thomas,
Il 2016-06-09 23:27 Thomas Petazzoni ha scritto:
Quoted 6 lines
Hello,
Thanks for this new iteration. However, I did not realize that eja was your own creation. How widely is it used? Looking at the Github page, it really looks like a personal project that isn't that widely used, so I am not sure to which point a Buildroot package makes sense.
eja is mostly a standard Lua interpreter with embedded support for sockets, forking, ioctl and very basic http support that can compile libraries in machine portable bytecode. I of course don't know how widely it is used apart the installations under my direct knowledge which are several thousand of ARM STB and some hundreds of servers, the only "oficial" data in my hands are the number of time it has been downloaded from SourceForge
(https://sourceforge.net/projects/eja/files/stats/timeline?dates=2016-01-01+to+2016-06-10).
If it could help it is in Debian Sid and Testing
(https://packages.debian.org/testing/eja) and going to be in the next version of Ubuntu (http://packages.ubuntu.com/yakkety/web/eja).
My idea was to contribute to this project, which I really like a lot, with a piece of software that I think and hope could be useful for others because it has been designed to run on a very similar environment.
Quoted 6 lines
I also have some other comments.
First, your commit title should not contain "(revised)" otherwise this will be kept forever in the Git history. See the Buildroot manual for details on how to send new iterations of a patch: adding a version and a changelog.
ok
Quoted 7 lines · Ubaldo Porcheddu
package/Config.in endif · line 479
Quoted 3 lines
menu "Interpreter languages and scripting"
package/Config.in +1
-0+ source "package/eja/Config.in"Does it quality as a Language interpreter, or as a web-server? I couldn't really understand.
I thought to put it under this section because on Buildroot I personally tend to use it more like a Lua interpreter than a web server.
Quoted 15 lines
Quoted 15 lines
package/eja/eja.mk new file +15
-0+EJA_VERSION = 9.4.22 +EJA_SOURCE = $(EJA_VERSION).tar.gz +EJA_SITE = https://github.com/ubaldus/eja/archive + +ifeq ($(BR2_STATIC_LIBS),y) +EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL +EJA_MYLIBS = -static -w +else +EJA_CFLAGS = -DLUA_USE_POSIX -DLUA_COMPAT_ALL -DLUA_USE_DLOPEN +EJA_MYLIBS = -ldl +endif + +define EJA_BUILD_CMDS + $(MAKE) \ + CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \
Quoted 8 lines
package/eja/eja.mk line 24
Quoted 3 lines
package/eja/eja.mk new file +3
-0+ CFLAGS="$(TARGET_CFLAGS) $(EJA_CFLAGS)" \ + MYLIBS="$(EJA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" -C $(@D) +endefInstead of duplicating the Lua interpreter source code into the Eja project, why don't you link with the Lua interpreter library instead? This makes sure that when the Lua interpreter is updated (to fix bugs, etc.), Eja also gets fixed.
The new Makefile is indeed checking if the libraries are already installed or not and if so it is using the installed ones, I didn't test it on Buildroot yet because I am waiting to update ejaBox to the Buildroot 16.05. I still have to keep the Lua source code in case I need to compile static like on Android for instance
(https://play.google.com/store/apps/details?id=it.eja.box)
Quoted 9 lines
Finally, if it's a server, shouldn't it have an initscript? I see that you've added one in your ejabox project, why isn't it part of this package?
But again, overall, I'm questioning the value of packaging a piece of software that seems to be very confidential, but I admit that my position may be controversial, and other people in the Buildroot community may prefer that we accept patches for all packages, regardless of their "popularity".
As I said before I really like Buildroot and I tend to think about it as a Linux "distro" focused on minimal devices thus by my point of view it would make sense to have selected piece of software that can be useful for this kind of environment even if they are not widely used.