Skip to contentSkip to conversation

civetweb: new package

PATCH New Thomas Davis 3 participants 7 messages Aug 27, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 civetweb: new package

Sorry if this a repeat. I tried submitting this via git like specified in the documentation but I think it was not working. I checked the archive and there was no posting for it and not on pachwork either.

Thomas

#1 lore raw

PATCH 1/1 civetweb: new package

Hi Thomas,

Quoted 40 lines · Thomas Davis

Sorry if this a repeat. I tried submitting this via git like specified in the documentation but I think it was not working. I checked the archive and there was no posting for it and not on pachwork either.

Thomas

From 2dbba731f6b647ee0943c4fa46756f1f8c4a76b5 Mon Sep 17 00:00:00 2001
From: Thomas Davis <[email protected]>
Date: Sat, 24 Aug 2013 06:43:28 -0400
Subject: [PATCH 1/1] Added civetweb package

---
 package/Config.in            |    1 +
 package/civetweb/Config.in   |   34 +++++++++++++++++++++++++++++
 package/civetweb/civetweb.mk |   48
++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 package/civetweb/Config.in
 create mode 100644 package/civetweb/civetweb.mk
package/Config.in +1 -0
index 7069d77..25433b6 100644
@@ -719,6 +719,7 @@ source "package/bridge-utils/Config.in"
 source "package/bwm-ng/Config.in"
 source "package/can-utils/Config.in"
 source "package/chrony/Config.in"
+source "package/civetweb/Config.in"
 source "package/connman/Config.in"
 source "package/crda/Config.in"
 source "package/ctorrent/Config.in"
package/civetweb/Config.in new file +0 -0
new file mode 100644
index 0000000..5285b09

package/civetweb/Config.in line 3

Quoted 3 lines
package/civetweb/Config.in new file +3 -0
@@ -0,0 +1,34 @@
+config BR2_PACKAGE_CIVETWEB
+ bool "civetweb"
+ depends on BR2_TOOLCHAIN_BUILDROOT_UCLIBC && !BR2_PTHREADS_NONE

What is the reason for this uclibc check?

Quoted 37 lines
package/civetweb/Config.in new file +31 -0
+ help
+  Full featured embedded web server with LUA support.
+
+  https://sourceforge.net/projects/civetweb
+
+if BR2_PACKAGE_CIVETWEB
+
+ config BR2_CIVETWEB_WITH_IPV6
+ bool "enable IPV6 support"
+ depends on BR2_INET_IPV6
+
+ config BR2_CIVETWEB_WITH_LUA
+ bool "enable LUA support"
+ depends on BR2_LARGEFILE # util-linux
+
+ config BR2_CIVETWEB_WITH_SSL
+ bool "enable SSL support"
+ depends on BR2_PACKAGE_OPENSSL
+
+ comment "civetweb IPV6 support requires IPV6"
+ depends on !BR2_INET_IPV6
+
+ comment "civetweb LUA support requires large file support"
+ depends on !BR2_LARGEFILE
+
+ comment "civetweb SSL support requires OpenSSL"
+ depends on !BR2_PACKAGE_OPENSSL
+endif
+
+comment "civetweb requires a toolchain with PTHREAD support"
+ depends on !BR2_TOOLCHAIN_BUILDROOT_UCLIBC || BR2_PTHREADS_NONE
package/civetweb/civetweb.mk new file +0 -0
new file mode 100644
index 0000000..3f81aeb

package/civetweb/civetweb.mk line 3

Quoted 3 lines
package/civetweb/civetweb.mk new file +3 -0
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2013 No Face Press, LLC
+# License http://opensource.org/licenses/mit-license.php MIT License

Could you explain why you added this comment?
Do you want to add your copyright statement to this .mk file?

And what about the MIT license? Buildroot is GPL, so any .mk file in it will also be GPL. Do you want to dual-license this file?

Quoted 26 lines
package/civetweb/civetweb.mk new file +10 -0
+#
+################################################################################
+#
+# civetweb
+#
+################################################################################
+
+CIVETWEB_VERSION = 1.2
+CIVETWEB_SOURCE = civetweb-$(CIVETWEB_VERSION).tar.gz
+CIVETWEB_SITE =

http://github.com/sunsetbrew/civetweb/tarball/v$(CIVETWEB_VERSION)

package/civetweb/civetweb.mk new file +15 -0
+CIVETWEB_LICENSE = MIT
+CIVETWEB_LICENSE_FILES = LICENSE.md
+
+CIVETWEB_COPT = $(TARGET_CFLAGS)
+CIVETWEB_MOPT = TARGET_OS=LINUX
+CIVETWEB_LDFLAGS = $(TARGET_LDFLAGS)
+
+ifndef BR2_PACKAGE_UTIL_LINUX_FALLOCATE
+ CIVETWEB_COPT += -DHAVE_POSIX_FALLOCATE=0
+endif
+
+ifdef BR2_CIVETWEB_WITH_IPV6
+ CIVETWEB_MOPT += WITH_IPV6=1
+endif
+

package/civetweb/civetweb.mk

Quoted 10 lines
package/civetweb/civetweb.mk new file +10 -0
+ifdef BR2_CIVETWEB_WITH_LUA
+ CIVETWEB_MOPT += WITH_LUA=1
+endif
+
+ifdef BR2_CIVETWEB_WITH_SSL
+ CIVETWEB_COPT += -DNO_SSL_DL -lcrypt -lssl
+ CIVETWEB_DEPENDENCIES += openssl
+else
+ CIVETWEB_COPT += -DNO_SSL
+endif

In general we use the format
ifeq ($(BR2_FOO),y)
...
endif

instead of
ifdef BR2_FOO
...
endif

I don't know if there is a particular reason for it, but I would advocate to use that for consistency reasons.

Quoted 10 lines
package/civetweb/civetweb.mk new file +3 -0
+
+define CIVETWEB_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" -C $(@D) all $(CIVETWEB_MOPT)

COPT="$(CIVETWEB_COPT)"

package/civetweb/civetweb.mk new file +4 -0
+endef
+
+define CIVETWEB_INSTALL_TARGET_CMDS
+ $(MAKE) CC="$(TARGET_CC)" -C $(@D) install

DOCUMENT_ROOT=/usr/local/share/doc/civetweb PREFIX="$(TARGET_DIR)/usr/local" $(CIVETWEB_MOPT) COPT='$(CIVETWEB_COPT)'

package/civetweb/civetweb.mk

Quoted 4 lines
package/civetweb/civetweb.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
\ No newline at end of file

There is no newline at the end of your .mk file, this should be fixed too.

Best regards,
Thomas

#2 lore raw

PATCH 1/1 civetweb: new package

Thomas, Thomas,

Quoted 4 lines · Thomas De Schampheleire
Quoted 2 lines

+$(eval $(generic-package))
\ No newline at end of file

There is no newline at the end of your .mk file, this should be fixed too.

And also generally speaking, the patch should be sent using 'git send-email', because HTML formatted patches that are line wrapped are not really practical to be applied on Buildroot.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/1 civetweb: new package

Thank you so much for the quick review!

Quoted 1 line

What is the reason for this uclibc check?

I noticed that there were several alternatives for pthreads in uclibc and the only one that not compatible is BR2_PTHREADS_NONE. I was afraid of additional variants may occur in the future and I am basically only excluding the one option. Further, if it is possible to exclude uclibc, it would not be compatible either. If you feel it is overkill I can simply it.

Quoted 1 line

Could you explain why you added this comment?

Civetweb is MIT and the MIT license does not prevent it from being included in GPL code while the inverse is not true. If I put GPL code in Civetweb, it compromises the MIT license and currently a copy of these files are in the repository, at least until included with buildroot. If dual licensing the file is the best way, I can do that, or if preferred I can remove the statement altogether.

Quoted 2 lines

In general we use the format
ifeq ($(BR2_FOO),y)

No problem, i can fix that

Quoted 1 line

\ No newline at end of file

will fix that too

Please advise on the uclib check and the license header and I will submit a new patch.

Thank you,
Thomas Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130827/66790200/attachment-0001.html>

A message that is not in the archive (sent off-list or not yet received): CAG3-AMraW=os9fWHuukfn_poxQvwPGJ7OGshb3y66TYdCgSVFA@mail.gmail.com

#5 lore raw

PATCH 1/1 civetweb: new package

Dear Thomas Davis,

Please don't reply to me directly, always keep the list in Cc for Buildroot related discussions that started on the list.

Quoted 3 lines · Thomas Davis

I tried git send-mail twice before and it did not make it to the list. I am guessing there is some spam guard in place that is preventing it because I received the cc'ed copies just fine. Have you seen this before?

Are you sure the From: address that was shown when using 'git send-email' is really the address with which you've subscribed to the list? I strongly suspect something like that, many other contributors are using git send-email with the Buildroot mailing list without any problem.

Can you try to 'git send-email' me your patch, so that I can see if something obvious prevents your e-mail from reaching the list?

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH 1/1 civetweb: new package

Thomas, Thomas,

Quoted 8 lines · Thomas De Schampheleire
Quoted 2 lines · Thomas Petazzoni

Thomas, Thomas,

Three cheers for the concept of surnames!

Thomas

Yeah, sounded like a fun start of e-mail for something signed:

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com