Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] add library xmlsec1
@ 2019-02-09 21:53 Bastian Breit
  2019-02-10  9:37 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Bastian Breit @ 2019-02-09 21:53 UTC (permalink / raw)
  To: buildroot

---
 package/Config.in                  |  1 +
 package/libxmlsec1/COPYING         |  1 +
 package/libxmlsec1/Config.in       | 11 +++++++++++
 package/libxmlsec1/libxmlsec1.hash |  1 +
 package/libxmlsec1/libxmlsec1.mk   | 17 +++++++++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 package/libxmlsec1/COPYING
 create mode 100644 package/libxmlsec1/Config.in
 create mode 100644 package/libxmlsec1/libxmlsec1.hash
 create mode 100644 package/libxmlsec1/libxmlsec1.mk

diff --git a/package/Config.in b/package/Config.in
index 29862c478c..18acfd9db8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1428,6 +1428,7 @@ menu "JSON/XML"
 	source "package/libxml2/Config.in"
 	source "package/libxmlpp/Config.in"
 	source "package/libxmlrpc/Config.in"
+	source "package/libxmlsec1/Config.in"
 	source "package/libxslt/Config.in"
 	source "package/libyaml/Config.in"
 	source "package/mxml/Config.in"
diff --git a/package/libxmlsec1/COPYING b/package/libxmlsec1/COPYING
new file mode 100644
index 0000000000..9f0da96c81
--- /dev/null
+++ b/package/libxmlsec1/COPYING
@@ -0,0 +1 @@
+prop lic do not copy
diff --git a/package/libxmlsec1/Config.in b/package/libxmlsec1/Config.in
new file mode 100644
index 0000000000..836d4db674
--- /dev/null
+++ b/package/libxmlsec1/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_LIBXMLSEC1
+	bool "libxmlsec1"
+	select BR2_PACKAGE_LIBXML2
+	select BR2_PACKAGE_LIBXSLT
+	select BR2_PACKAGE_OPENSSL
+	help
+	XMLSec library provides C based implementation for major XML
+	Security standards:
+	- XML Signature Syntax and Processing
+	- XML Encryption Syntax and Processing
+	https://www.aleksey.com/xmlsec/
diff --git a/package/libxmlsec1/libxmlsec1.hash b/package/libxmlsec1/libxmlsec1.hash
new file mode 100644
index 0000000000..ce44e23ac5
--- /dev/null
+++ b/package/libxmlsec1/libxmlsec1.hash
@@ -0,0 +1 @@
+md5  508bee7e4f1b99f2d50aaa7d38ede56e  xmlsec1-1.2.27.tar.gz
diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
new file mode 100644
index 0000000000..6bf8944f1e
--- /dev/null
+++ b/package/libxmlsec1/libxmlsec1.mk
@@ -0,0 +1,17 @@
+LIBXMLSEC1_VERSION = 1.2.27
+LIBXMLSEC1_SOURCE = xmlsec1-${LIBXMLSEC1_VERSION}.tar.gz
+LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
+LIBXMLSEC1_INSTALL_STAGING = YES
+LIBXMLSEC1_INSTALL_TARGET = YES
+LIBXMLSEC1_LICENSE = MIT
+LIBXMLSEC1_LICENSE_FILES = Copyright
+
+LIBXMLSEC1_CONF_OPTS += --disable-static
+LIBXMLSEC1_CONF_OPTS += --enable-crypto-dl=no
+LIBXMLSEC1_CONF_OPTS += --with-openssl=${STAGING_DIR}/usr
+LIBXMLSEC1_CONF_OPTS += --with-libxslt=no
+LIBXMLSEC1_CONF_OPTS += --with-gnutls=no
+LIBXMLSEC1_CONF_OPTS += --with-gcrypt=no
+LIBXMLSEC1_DEPENDENCIES = libxml2 libxslt openssl
+
+$(eval $(autotools-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] add library xmlsec1
  2019-02-09 21:53 [Buildroot] [PATCH] add library xmlsec1 Bastian Breit
@ 2019-02-10  9:37 ` Thomas Petazzoni
  2019-02-10 14:12   ` Bastian Breit
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-02-10  9:37 UTC (permalink / raw)
  To: buildroot

Hello Bastian,

Thanks for your contribution!

First of all, the commit title should be:

	package/xmlsec1: new package

On Sat,  9 Feb 2019 22:53:51 +0100
Bastian Breit <basti171@gmail.com> wrote:

> ---
>  package/Config.in                  |  1 +
>  package/libxmlsec1/COPYING         |  1 +

What is this file about ?

>  package/libxmlsec1/Config.in       | 11 +++++++++++
>  package/libxmlsec1/libxmlsec1.hash |  1 +
>  package/libxmlsec1/libxmlsec1.mk   | 17 +++++++++++++++++
>  5 files changed, 31 insertions(+)

Please add an entry to the DEVELOPERS file for this package.

> diff --git a/package/libxmlsec1/Config.in b/package/libxmlsec1/Config.in
> new file mode 100644
> index 0000000000..836d4db674
> --- /dev/null
> +++ b/package/libxmlsec1/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBXMLSEC1
> +	bool "libxmlsec1"
> +	select BR2_PACKAGE_LIBXML2
> +	select BR2_PACKAGE_LIBXSLT
> +	select BR2_PACKAGE_OPENSSL
> +	help
> +	XMLSec library provides C based implementation for major XML
> +	Security standards:
> +	- XML Signature Syntax and Processing
> +	- XML Encryption Syntax and Processing
> +	https://www.aleksey.com/xmlsec/

The indentation of the help is text is one tab + two spaces, and there
should be one blank line before the upstream URL of the project.

Could you make sure to run "make check-package" ? This validates some
basic coding styles rules in packages.

> diff --git a/package/libxmlsec1/libxmlsec1.hash b/package/libxmlsec1/libxmlsec1.hash
> new file mode 100644
> index 0000000000..ce44e23ac5
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.hash
> @@ -0,0 +1 @@
> +md5  508bee7e4f1b99f2d50aaa7d38ede56e  xmlsec1-1.2.27.tar.gz

Where does this hash comes from ? Please add a comment above it that
says where it was from. If it was locally calculated, then use a sha256
hash instead, and say so:

# Locally calculated
sha256 .... xmlsec1-1.2.27.tar.gz

If you found this md5 on the upstream website, then say so, and also
include a locally calculated sha256 hash:

# From http://somewhere.com
md5 ... xmlsec1-1.2.27.tar.gz
# Locally calculated
sha256 ... xmlsec1-1.2.27.tar.gz

And finally, add a hash for the license file.

> diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
> new file mode 100644
> index 0000000000..6bf8944f1e
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.mk
> @@ -0,0 +1,17 @@

Please include the typical comment header that we have in all
package .mk files.

> +LIBXMLSEC1_VERSION = 1.2.27
> +LIBXMLSEC1_SOURCE = xmlsec1-${LIBXMLSEC1_VERSION}.tar.gz

Please use $(...) instead of ${...}

> +LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
> +LIBXMLSEC1_INSTALL_STAGING = YES
> +LIBXMLSEC1_INSTALL_TARGET = YES

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

> +LIBXMLSEC1_LICENSE = MIT
> +LIBXMLSEC1_LICENSE_FILES = Copyright
> +
> +LIBXMLSEC1_CONF_OPTS += --disable-static

Please don't pass --disable-static. Passing
--{enable,disable}-{static,shared} is automatically done by the
autotools-package infrastructure.

> +LIBXMLSEC1_CONF_OPTS += --enable-crypto-dl=no
> +LIBXMLSEC1_CONF_OPTS += --with-openssl=${STAGING_DIR}/usr

Use $(...) instead of ${...}

> +LIBXMLSEC1_CONF_OPTS += --with-libxslt=no

Why ? You have a dependency on libxslt. Also, if this dependency is not
mandatory, it should be made optional.

> +LIBXMLSEC1_CONF_OPTS += --with-gnutls=no
> +LIBXMLSEC1_CONF_OPTS += --with-gcrypt=no

So OpenSSL is not mandatory and GnuTLS or GCrypt could be used ? If
that is the case, then it should be supported.

> +LIBXMLSEC1_DEPENDENCIES = libxml2 libxslt openssl
> +
> +$(eval $(autotools-package))

Could you rework your package to address those comments ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] add library xmlsec1
  2019-02-10  9:37 ` Thomas Petazzoni
@ 2019-02-10 14:12   ` Bastian Breit
  2019-02-10 14:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Bastian Breit @ 2019-02-10 14:12 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

> > +LIBXMLSEC1_CONF_OPTS += --with-libxslt=no
>
> Why ? You have a dependency on libxslt. Also, if this dependency is not
> mandatory, it should be made optional.
>
> > +LIBXMLSEC1_CONF_OPTS += --with-gnutls=no
> > +LIBXMLSEC1_CONF_OPTS += --with-gcrypt=no
>
> So OpenSSL is not mandatory and GnuTLS or GCrypt could be used ? If
> that is the case, then it should be supported.
>
> > +LIBXMLSEC1_DEPENDENCIES = libxml2 libxslt openssl
> > +
> > +$(eval $(autotools-package))
>
> Could you rework your package to address those comments ?
>
> Thanks a lot!

I locally fixed the formatting and licence part.
I had some trouble with the mailing list and will use
bastian.breit.buildroot at gmail.com from now on. We use libxmlsec1 in
this context and haven't used another configuration. I am not sure,
how the library works in other configuration. I would create config
options for each option based on that list at
https://www.aleksey.com/xmlsec/faq.html
Should I send changes for formatting & licences with a different patch
or should I send an all in one patch?

Sincerely

Bastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] add library xmlsec1
  2019-02-10 14:12   ` Bastian Breit
@ 2019-02-10 14:20     ` Thomas Petazzoni
  2019-02-10 14:40       ` Bastian Breit
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-02-10 14:20 UTC (permalink / raw)
  To: buildroot

Hello Bastian,

On Sun, 10 Feb 2019 15:12:48 +0100
Bastian Breit <bastian.breit.buildroot@gmail.com> wrote:

> I locally fixed the formatting and licence part.

Great, thanks!

> I had some trouble with the mailing list and will use
> bastian.breit.buildroot at gmail.com from now on. 

Which trouble did you encounter ?

> We use libxmlsec1 in
> this context and haven't used another configuration. I am not sure,
> how the library works in other configuration. I would create config
> options for each option based on that list at
> https://www.aleksey.com/xmlsec/faq.html

No you don't have to support all options. If you don't support an
option (like gnutls or gcrypt), then do like you did: disable support
for it explicitly in the .mk file.

> Should I send changes for formatting & licences with a different patch
> or should I send an all in one patch?

Send all in one patch, labeled as "v2", with a changelog below the
"---" sign:

	git format-patch -v2 HEAD^

Edit the 0001-...patch file, and below the --- sign, add some notes
that explains what you changed since v1.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] add library xmlsec1
  2019-02-10 14:20     ` Thomas Petazzoni
@ 2019-02-10 14:40       ` Bastian Breit
  0 siblings, 0 replies; 5+ messages in thread
From: Bastian Breit @ 2019-02-10 14:40 UTC (permalink / raw)
  To: buildroot

Hello Thomas

> Which trouble did you encounter ?

Too much emails to my main account. I therefore was not sure how to
answer to the mailinglist, but it seemed to work.
Therefore git send-email needed the password in the gitconfig.
I also wanted to better seperate opensource & private account. So
everything is fine now.

> No you don't have to support all options. If you don't support an
> option (like gnutls or gcrypt), then do like you did: disable support
> for it explicitly in the .mk file.

in the faqs, there seems to be problems with other libraries. Maybe we
will try out gnutls, then I will push changes upstream.

> Send all in one patch, labeled as "v2", with a changelog below the
> "---" sign:
>
>         git format-patch -v2 HEAD^
>
> Edit the 0001-...patch file, and below the --- sign, add some notes
> that explains what you changed since v1.

Okay.
Sincerely

Bastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-10 14:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-09 21:53 [Buildroot] [PATCH] add library xmlsec1 Bastian Breit
2019-02-10  9:37 ` Thomas Petazzoni
2019-02-10 14:12   ` Bastian Breit
2019-02-10 14:20     ` Thomas Petazzoni
2019-02-10 14:40       ` Bastian Breit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox