Skip to contentSkip to conversation

eja: new package

PATCH New Ubaldo Porcheddu 2 participants 3 messages Apr 30, 2016 – May 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eja: new package

Hi everybody,

as the new version is approaching I would like to add "eja" which is a forking and extensible micro web server based on Lua 5.2 with embedded support for sockets, fork and dirent. There are several years of development and it is at the moment on production on small devices based on Buildroot like the Rpi, Android based STB and Debian/Ubuntu servers.

The source code is available at https://github.com/ubaldus/eja, a Buildroot based version is also available at https://github.com/ubaldus/box and precompiled binaries and images are availables at http://get.eja.it .

Any feedback is of course welcome :)

---
 package/Config.in     |  1 +
 package/eja/Config.in |  4 ++++
 package/eja/eja.mk    | 14 ++++++++++++++
 3 files changed, 19 insertions(+)
 create mode 100644 package/eja/Config.in
 create mode 100644 package/eja/eja.mk
package/Config.in +1 -0
index 9d668bf..29eafb1 100644
@@ -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 +4 -0
new file mode 100644
index 0000000..5833a78
@@ -0,0 +1,4 @@
+    config BR2_PACKAGE_EJA
+    bool "eja"
+    help
+            eja micro web server
package/eja/eja.mk new file +14 -0
new file mode 100644
index 0000000..8e170f6
@@ -0,0 +1,14 @@
+EJA_VERSION:= 9.4.22
+EJA_SOURCE:= $(EJA_VERSION).tar.gz
+EJA_SITE:= https://github.com/ubaldus/eja/archive
+EJA_INSTALL_TARGET:=YES
+
+define EJA_BUILD_CMDS
+        $(MAKE) CC="$(TARGET_CC)" -C $(@D) static
+endef
+
+define EJA_INSTALL_TARGET_CMDS
+        $(INSTALL) -D -m 0755 $(@D)/eja $(TARGET_DIR)/usr/bin/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 eja: new package

Hello,

Thanks for your contribution! See below for some comments.

Quoted 1 line · Ubaldo Porcheddu

as the new version is approaching I would like to add "eja" which is a

Such personal/contextual message should not be part of the commit log. Remember that the commit log gets preserved forever in the Git history of the project, so we don't want to see something like "as the new version is approaching...". Which makes sense today, but won't make any sense a few months from now when someone will look at the Git history of Buildroot.

Instead, such personal/contextual messages should be part of a cover letter (i.e a separate e-mail that introduces your patch series), or be put below the "---" mark that follows your Signed-off-by line (anything after the --- is not preserved when the patch is applied).

Quoted 1 line

Any feedback is of course welcome :)

This is also a 'personal' message, which shouldn't be in the commit log.

package/eja/Config.in line 1

Quoted 8 lines

if BR2_PACKAGE_ERLANG

package/eja/Config.in new file +1 -0
new file mode 100644
index 0000000..5833a78
@@ -0,0 +1,4 @@
+    config BR2_PACKAGE_EJA

This line should not be intended.

package/eja/Config.in line 3

Quoted 2 lines
package/eja/Config.in new file +2 -0
+    bool "eja"
+    help

Those lines should be intended with one tab.

package/eja/Config.in line 4

Quoted 1 line
package/eja/Config.in new file +1 -0
+            eja micro web server

And this one with one tab + two spaces. Also, a better description (such as the one from your commit log) would be better. And you also need to finish the description with an empty line followed by the URL of the upstream project homepage.

See the Buildroot documentation for more details on those conventions, as well as other packages in Buildroot.

package/eja/eja.mk

Quoted 6 lines
package/eja/eja.mk new file +0 -0
new file mode 100644
index 0000000..8e170f6
@@ -0,0 +1,14 @@

This file lacks the comment header that we like every package to have. Look at other packages.

package/eja/eja.mk line 1

Quoted 1 line
package/eja/eja.mk new file +1 -0
+EJA_VERSION:= 9.4.22

Use = sign only, and with a space before and after.

package/eja/eja.mk line 2

Quoted 1 line
package/eja/eja.mk new file +1 -0
+EJA_SOURCE:= $(EJA_VERSION).tar.gz

Ditto.

package/eja/eja.mk line 3

Quoted 1 line
package/eja/eja.mk new file +1 -0
+EJA_SITE:= https://github.com/ubaldus/eja/archive

Ditto.

Also, please add a hash file (refer to the Buildroot manual and other packages for details).

package/eja/eja.mk line 4

Quoted 1 line
package/eja/eja.mk new file +1 -0
+EJA_INSTALL_TARGET:=YES

This line is not useful, as it is the default.

package/eja/eja.mk line 7

Quoted 3 lines
package/eja/eja.mk new file +3 -0
+
+define EJA_BUILD_CMDS
+        $(MAKE) CC="$(TARGET_CC)" -C $(@D) static

Can you try:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) static

Also, why do you build the static variant?

package/eja/eja.mk line 11

Quoted 2 lines
package/eja/eja.mk new file +2 -0
+define EJA_INSTALL_TARGET_CMDS
+        $(INSTALL) -D -m 0755 $(@D)/eja $(TARGET_DIR)/usr/bin/

Please use a full destination path, i.e $(TARGET_DIR)/usr/bin/eja

Could you rework your patch to take into account those comments and send an updated version?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 eja: new package

Hello Thomas,

thank you for your comments and sorry for the misunderstanding about the cover letter, I didn't know that the "head" would be committed with the patch.

Quoted 9 lines

package/eja/eja.mk line 7

Quoted 3 lines
package/eja/eja.mk new file +3 -0
+
+define EJA_BUILD_CMDS
+        $(MAKE) CC="$(TARGET_CC)" -C $(@D) static

Can you try:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) static

Also, why do you build the static variant?

I tried to compile with this build syntax but I couldn't get it working fine so I had a look at the Lua package and after rewriting a little bit eja.mk it is now working both for static and shared libraries.

Quoted 2 lines

Could you rework your patch to take into account those comments and send an updated version?

I reworked the rest of the points and I am going to submit a new patch right now.