diff mbox series

cutelyst: new package

Message ID 20180717204613.22028-1-dantti12@gmail.com
State Accepted
Headers show
Series cutelyst: new package | expand

Commit Message

Daniel Nicoletti July 17, 2018, 8:46 p.m. UTC
A C++ Web Framework built on top of Qt, using
the simple approach of Catalyst (Perl) framework.

Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
---
 package/Config.in              |  1 +
 package/cutelyst/Config.in     |  9 +++++++++
 package/cutelyst/cutelyst.hash |  3 +++
 package/cutelyst/cutelyst.mk   | 36 ++++++++++++++++++++++++++++++++++
 4 files changed, 49 insertions(+)
 create mode 100644 package/cutelyst/Config.in
 create mode 100644 package/cutelyst/cutelyst.hash
 create mode 100644 package/cutelyst/cutelyst.mk

Comments

Thomas Petazzoni July 18, 2018, 10:59 a.m. UTC | #1
Hello Daniel,

On Tue, 17 Jul 2018 17:46:13 -0300, Daniel Nicoletti wrote:
> A C++ Web Framework built on top of Qt, using
> the simple approach of Catalyst (Perl) framework.
> 
> Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>

Thanks for this new iteration. I applied it after doing some changes,
which I'll describe below.

However, first of all, when you send a new iteration of a patch, it is
recommended to adjust the patch subject prefix to be [PATCH v2], and to
include a changelog...

> ---

... here, i.e below the "---" sign.

This way, it is clear that it is a new iteration, and we know what has
changed since the previous iteration.

See http://patchwork.ozlabs.org/patch/944700/ for an example of that.

To generate a patch with such a prefix, you can use:

	git format-patch -v2

or:

	git format-patch --subject-prefix="PATCH v2"

>  package/Config.in              |  1 +
>  package/cutelyst/Config.in     |  9 +++++++++
>  package/cutelyst/cutelyst.hash |  3 +++
>  package/cutelyst/cutelyst.mk   | 36 ++++++++++++++++++++++++++++++++++
>  4 files changed, 49 insertions(+)

You forgot to add an entry to the DEVELOPERS file, so I've added that.

> diff --git a/package/cutelyst/Config.in b/package/cutelyst/Config.in
> new file mode 100644
> index 0000000000..6b78e48cea
> --- /dev/null
> +++ b/package/cutelyst/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_CUTELYST
> +	bool "cutelyst"
> +	depends on BR2_PACKAGE_QT5
> +	select BR2_PACKAGE_QT5BASE_GUI
> +	help
> +	  A C++ Web Framework built on top of Qt, using
> +	  the simple approach of Catalyst (Perl) framework.
> +
> +	  https://cutelyst.org

With this set of dependencies, cutelyst didn't build for me, with a
minimal configuration. It failed to build with:

/home/thomas/projets/buildroot/output/build/cutelyst-2.5.1/wsgi/tcpsslserver.h:44:36: error: ‘QSslConfiguration’ does not name a type
     void setSslConfiguration(const QSslConfiguration &conf);

This is because it needs SSL support in Qt. So I've added a "select
BR2_PACKAGE_OPENSSL" to make sure SSL support is present in Qt.

> index 0000000000..6653675352
> --- /dev/null
> +++ b/package/cutelyst/cutelyst.mk
> @@ -0,0 +1,36 @@
> +################################################################################
> +#
> +# cutelyst
> +#
> +################################################################################
> +
> +CUTELYST_VERSION = 2.5.1
> +CUTELYST_SITE = https://github.com/cutelyst/cutelyst/archive/v$(CUTELYST_VERSION)
> +CUTELYST_INSTALL_STAGING = YES
> +CUTELYST_SUPPORTS_IN_SOURCE_BUILD = NO
> +CUTELYST_LICENSE = LGPL-2.1+
> +CUTELYST_LICENSE_FILES = COPYING
> +CUTELYST_DEPENDENCIES = qt5base
> +
> +CUTELYST_CONF_OPTS += \
> +	-DPLUGIN_CSRFPROTECTION=ON
> +
> +$(eval $(cmake-package))

This line should always go at the end of the .mk file, i.e...

> +
> +ifeq ($(BR2_PACKAGE_GRANTLEE),y)
> +CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=ON
> +else
> +CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBPWQUALITY),y)
> +CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=ON
> +else
> +CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_JEMALLOC),y)
> +CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=ON
> +else
> +CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=OFF
> +endif

... here.

I've fixed those three issues, and applied your patch. Once again,
thanks for your contribution!

Best regards,

Thomas
Daniel Nicoletti July 18, 2018, 1:24 p.m. UTC | #2
Em qua, 18 de jul de 2018 às 07:59, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> escreveu:
>
> Hello Daniel,
>
> On Tue, 17 Jul 2018 17:46:13 -0300, Daniel Nicoletti wrote:
> > A C++ Web Framework built on top of Qt, using
> > the simple approach of Catalyst (Perl) framework.
> >
> > Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
>
> Thanks for this new iteration. I applied it after doing some changes,
> which I'll describe below.
>
> However, first of all, when you send a new iteration of a patch, it is
> recommended to adjust the patch subject prefix to be [PATCH v2], and to
> include a changelog...
>
> > ---
>
> ... here, i.e below the "---" sign.
>
> This way, it is clear that it is a new iteration, and we know what has
> changed since the previous iteration.
Ok, I'm not very used to send patches with format-patch/send-email

>
> See http://patchwork.ozlabs.org/patch/944700/ for an example of that.
>
> To generate a patch with such a prefix, you can use:
>
>         git format-patch -v2
>
> or:
>
>         git format-patch --subject-prefix="PATCH v2"
>
> >  package/Config.in              |  1 +
> >  package/cutelyst/Config.in     |  9 +++++++++
> >  package/cutelyst/cutelyst.hash |  3 +++
> >  package/cutelyst/cutelyst.mk   | 36 ++++++++++++++++++++++++++++++++++
> >  4 files changed, 49 insertions(+)
>
> You forgot to add an entry to the DEVELOPERS file, so I've added that.
Hmm speaking of that, do I need to be subscribed to this buildroot list?
It's quite high traffic, so if I can subscribe/update package/unsubscribe
it would work better for me.

>
> > diff --git a/package/cutelyst/Config.in b/package/cutelyst/Config.in
> > new file mode 100644
> > index 0000000000..6b78e48cea
> > --- /dev/null
> > +++ b/package/cutelyst/Config.in
> > @@ -0,0 +1,9 @@
> > +config BR2_PACKAGE_CUTELYST
> > +     bool "cutelyst"
> > +     depends on BR2_PACKAGE_QT5
> > +     select BR2_PACKAGE_QT5BASE_GUI
> > +     help
> > +       A C++ Web Framework built on top of Qt, using
> > +       the simple approach of Catalyst (Perl) framework.
> > +
> > +       https://cutelyst.org
>
> With this set of dependencies, cutelyst didn't build for me, with a
> minimal configuration. It failed to build with:
>
> /home/thomas/projets/buildroot/output/build/cutelyst-2.5.1/wsgi/tcpsslserver.h:44:36: error: ‘QSslConfiguration’ does not name a type
>      void setSslConfiguration(const QSslConfiguration &conf);
>
> This is because it needs SSL support in Qt. So I've added a "select
> BR2_PACKAGE_OPENSSL" to make sure SSL support is present in Qt.
hmm strange, I added a bunch of ifdefs to cutelyst for it to build without
SSL support but I guess I missed some, will try again. I guess in the
spirit of buildroot images trying to be minimal it could be a good thing.

>
> > index 0000000000..6653675352
> > --- /dev/null
> > +++ b/package/cutelyst/cutelyst.mk
> > @@ -0,0 +1,36 @@
> > +################################################################################
> > +#
> > +# cutelyst
> > +#
> > +################################################################################
> > +
> > +CUTELYST_VERSION = 2.5.1
> > +CUTELYST_SITE = https://github.com/cutelyst/cutelyst/archive/v$(CUTELYST_VERSION)
> > +CUTELYST_INSTALL_STAGING = YES
> > +CUTELYST_SUPPORTS_IN_SOURCE_BUILD = NO
> > +CUTELYST_LICENSE = LGPL-2.1+
> > +CUTELYST_LICENSE_FILES = COPYING
> > +CUTELYST_DEPENDENCIES = qt5base
> > +
> > +CUTELYST_CONF_OPTS += \
> > +     -DPLUGIN_CSRFPROTECTION=ON
> > +
> > +$(eval $(cmake-package))
>
> This line should always go at the end of the .mk file, i.e...
>
> > +
> > +ifeq ($(BR2_PACKAGE_GRANTLEE),y)
> > +CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=ON
> > +else
> > +CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=OFF
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_LIBPWQUALITY),y)
> > +CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=ON
> > +else
> > +CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=OFF
> > +endif
> > +
> > +ifeq ($(BR2_PACKAGE_JEMALLOC),y)
> > +CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=ON
> > +else
> > +CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=OFF
> > +endif
>
> ... here.
>
> I've fixed those three issues, and applied your patch. Once again,
> thanks for your contribution!
You welcome, loving this project :)

>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
Thomas Petazzoni July 18, 2018, 1:35 p.m. UTC | #3
Hello,

On Wed, 18 Jul 2018 10:24:53 -0300, Daniel Nicoletti wrote:

> > This way, it is clear that it is a new iteration, and we know what has
> > changed since the previous iteration.  
> Ok, I'm not very used to send patches with format-patch/send-email

No problem at all, it's OK to begin with some topics and learn more.
We're happy with having contributions from newcomers and share what we
believe are best practices to contribute to Buildroot (note that those
best practices also apply to a number of other embedded Linux related
open-source projects: Linux kernel, U-Boot, etc.).

> > You forgot to add an entry to the DEVELOPERS file, so I've added that.  
> Hmm speaking of that, do I need to be subscribed to this buildroot list?
> It's quite high traffic, so if I can subscribe/update package/unsubscribe
> it would work better for me.

You can also remain subscribed all the time, but disable mail delivery
(go to the mailman page, you can adjust your subscription options).
This way, you don't receive e-mails from the list, but you can post to
the list without subscribing/unsubscribing each time.


> > This is because it needs SSL support in Qt. So I've added a "select
> > BR2_PACKAGE_OPENSSL" to make sure SSL support is present in Qt.  
> hmm strange, I added a bunch of ifdefs to cutelyst for it to build without
> SSL support but I guess I missed some, will try again. I guess in the
> spirit of buildroot images trying to be minimal it could be a good thing.

Just do a minimal build with just qt5+cutelyst, and openssl disabled
(you will have to remove the select BR2_PACKAGE_OPENSSL line from
cutelyst/Config.in of course). You'll see the build fail.

> > I've fixed those three issues, and applied your patch. Once again,
> > thanks for your contribution!  
> You welcome, loving this project :)

Thanks for your contribution!

Thomas
Thomas Petazzoni July 18, 2018, 3:20 p.m. UTC | #4
Hello Daniel,

On Wed, 18 Jul 2018 12:59:49 +0200, Thomas Petazzoni wrote:

> Thanks for this new iteration. I applied it after doing some changes,
> which I'll describe below.

FYI, cutelyst fails to build when grantlee support is enabled:

  http://autobuild.buildroot.net/results/d84/d8467cdf9d12e606db39de45a19a3f62fdaf8ecc/build-end.log

Best regards,

Thomas Petazzoni
Daniel Nicoletti July 19, 2018, 1:40 p.m. UTC | #5
Thanks,

That means cmake didn't find Grantlee cmake files, maybe an issue
with Grantlee, got a bit busy with work but will try to test this soon.

Best,
Em qua, 18 de jul de 2018 às 12:21, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> escreveu:
>
> Hello Daniel,
>
> On Wed, 18 Jul 2018 12:59:49 +0200, Thomas Petazzoni wrote:
>
> > Thanks for this new iteration. I applied it after doing some changes,
> > which I'll describe below.
>
> FYI, cutelyst fails to build when grantlee support is enabled:
>
>   http://autobuild.buildroot.net/results/d84/d8467cdf9d12e606db39de45a19a3f62fdaf8ecc/build-end.log
>
> Best regards,
>
> Thomas Petazzoni
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index eedce83616..08a3eac48a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -314,6 +314,7 @@  comment "Other GUIs"
 	source "package/kf5/Config.in"
 if BR2_PACKAGE_QT || BR2_PACKAGE_QT5
 comment "QT libraries and helper libraries"
+	source "package/cutelyst/Config.in"
 	source "package/grantlee/Config.in"
 	source "package/qextserialport/Config.in"
 	source "package/qjson/Config.in"
diff --git a/package/cutelyst/Config.in b/package/cutelyst/Config.in
new file mode 100644
index 0000000000..6b78e48cea
--- /dev/null
+++ b/package/cutelyst/Config.in
@@ -0,0 +1,9 @@ 
+config BR2_PACKAGE_CUTELYST
+	bool "cutelyst"
+	depends on BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_GUI
+	help
+	  A C++ Web Framework built on top of Qt, using
+	  the simple approach of Catalyst (Perl) framework.
+
+	  https://cutelyst.org
diff --git a/package/cutelyst/cutelyst.hash b/package/cutelyst/cutelyst.hash
new file mode 100644
index 0000000000..58645e50c2
--- /dev/null
+++ b/package/cutelyst/cutelyst.hash
@@ -0,0 +1,3 @@ 
+# Locally calculated after checking pgp signature
+sha256  a5d40c5e0027982181529449ffa807492f5759c2c604cdc467e748445721ff28    cutelyst-2.5.1.tar.gz
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551    COPYING
diff --git a/package/cutelyst/cutelyst.mk b/package/cutelyst/cutelyst.mk
new file mode 100644
index 0000000000..6653675352
--- /dev/null
+++ b/package/cutelyst/cutelyst.mk
@@ -0,0 +1,36 @@ 
+################################################################################
+#
+# cutelyst
+#
+################################################################################
+
+CUTELYST_VERSION = 2.5.1
+CUTELYST_SITE = https://github.com/cutelyst/cutelyst/archive/v$(CUTELYST_VERSION)
+CUTELYST_INSTALL_STAGING = YES
+CUTELYST_SUPPORTS_IN_SOURCE_BUILD = NO
+CUTELYST_LICENSE = LGPL-2.1+
+CUTELYST_LICENSE_FILES = COPYING
+CUTELYST_DEPENDENCIES = qt5base
+
+CUTELYST_CONF_OPTS += \
+	-DPLUGIN_CSRFPROTECTION=ON
+
+$(eval $(cmake-package))
+
+ifeq ($(BR2_PACKAGE_GRANTLEE),y)
+CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=ON
+else
+CUTELYST_CONF_OPTS += -DPLUGIN_VIEW_GRANTLEE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPWQUALITY),y)
+CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=ON
+else
+CUTELYST_CONF_OPTS += -DPLUGIN_VALIDATOR_PWQUALITY=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_JEMALLOC),y)
+CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=ON
+else
+CUTELYST_CONF_OPTS += -DUSE_JEMALLOC=OFF
+endif