diff mbox series

[v2] package/xmlsec1: new package

Message ID 20190210151207.18441-1-bastian.breit.buildroot@gmail.com
State Changes Requested
Headers show
Series [v2] package/xmlsec1: new package | expand

Commit Message

Bastian Breit Feb. 10, 2019, 3:12 p.m. UTC
This fixes spaces and tab formatting in the package folder.
Therefore an enty in DEVELOPERS is created.
Change from md5 to sha256 for checksums.
Remove unneeded libxslt dependency.
---
 DEVELOPERS                         |  3 +++
 package/Config.in                  |  1 +
 package/libxmlsec1/Config.in       | 11 +++++++++++
 package/libxmlsec1/libxmlsec1.hash |  4 ++++
 package/libxmlsec1/libxmlsec1.mk   | 20 ++++++++++++++++++++
 5 files changed, 39 insertions(+)
 create mode 100644 package/libxmlsec1/Config.in
 create mode 100644 package/libxmlsec1/libxmlsec1.hash
 create mode 100644 package/libxmlsec1/libxmlsec1.mk

Comments

Bastian Breit Feb. 12, 2019, 4:13 p.m. UTC | #1
I would summit options with later commits for the dependencies like
gnutls which is currently deactivated for this package. Should that be
mentioned in the help text? It should be clear by reading the current
dependencies. Does anyone prefer gnutls over openssl for non licencing
reasons? I am not sure how to handle licence changing by selecting
different dependencies (gnutls vs openssl)

Am So., 10. Feb. 2019 um 16:12 Uhr schrieb Bastian Breit
<bastian.breit.buildroot@gmail.com>:
>
> This fixes spaces and tab formatting in the package folder.
> Therefore an enty in DEVELOPERS is created.
> Change from md5 to sha256 for checksums.
> Remove unneeded libxslt dependency.
> ---
>  DEVELOPERS                         |  3 +++
>  package/Config.in                  |  1 +
>  package/libxmlsec1/Config.in       | 11 +++++++++++
>  package/libxmlsec1/libxmlsec1.hash |  4 ++++
>  package/libxmlsec1/libxmlsec1.mk   | 20 ++++++++++++++++++++
>  5 files changed, 39 insertions(+)
>  create mode 100644 package/libxmlsec1/Config.in
>  create mode 100644 package/libxmlsec1/libxmlsec1.hash
>  create mode 100644 package/libxmlsec1/libxmlsec1.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f2e69cc041..2bcd561805 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -250,6 +250,9 @@ F:  package/tcpdump/
>  F:     package/ti-uim/
>  F:     package/uhubctl/
>
> +N: Bastian Breit <bastian.breit.buildroot@gmail.com>
> +F: package/libxmlsec1/
> +
>  N:     Ben Boeckel <mathstuf@gmail.com>
>  F:     package/taskd/
>
> 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/Config.in b/package/libxmlsec1/Config.in
> new file mode 100644
> index 0000000000..ce3384e7b7
> --- /dev/null
> +++ b/package/libxmlsec1/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBXMLSEC1
> +       bool "libxmlsec1"
> +       select BR2_PACKAGE_LIBXML2
> +       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..9ff3b35454
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256 97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6  xmlsec1-1.2.27.tar.gz
> +# Locally calculated
> +sha256 526285395dd39627199ba20fd7f70a2608c8c8c70e4fea04aceddd71baa53d07  Copyright
> diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
> new file mode 100644
> index 0000000000..e6a0a375e9
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# libxmlsec1
> +#
> +################################################################################
> +
> +LIBXMLSEC1_VERSION = 1.2.27
> +LIBXMLSEC1_SOURCE = xmlsec1-$(LIBXMLSEC1_VERSION).tar.gz
> +LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
> +LIBXMLSEC1_LICENSE = MIT
> +LIBXMLSEC1_LICENSE_FILES = Copyright
> +
> +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 openssl
> +
> +$(eval $(autotools-package))
> --
> 2.17.1
>
Bastian Breit Feb. 16, 2019, 12:53 p.m. UTC | #2
Hi Thomas,

it would be nice if you could review the patch.
I have some more patches which I wanted to contribute (e.g. chrome,
libwebsocket, netcat6, etc), which I will do, if I know everything is
okay with the libxmlsec.


sincerely

Bastian

Am So., 10. Feb. 2019 um 16:12 Uhr schrieb Bastian Breit
<bastian.breit.buildroot@gmail.com>:
>
> This fixes spaces and tab formatting in the package folder.
> Therefore an enty in DEVELOPERS is created.
> Change from md5 to sha256 for checksums.
> Remove unneeded libxslt dependency.
> ---
>  DEVELOPERS                         |  3 +++
>  package/Config.in                  |  1 +
>  package/libxmlsec1/Config.in       | 11 +++++++++++
>  package/libxmlsec1/libxmlsec1.hash |  4 ++++
>  package/libxmlsec1/libxmlsec1.mk   | 20 ++++++++++++++++++++
>  5 files changed, 39 insertions(+)
>  create mode 100644 package/libxmlsec1/Config.in
>  create mode 100644 package/libxmlsec1/libxmlsec1.hash
>  create mode 100644 package/libxmlsec1/libxmlsec1.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f2e69cc041..2bcd561805 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -250,6 +250,9 @@ F:  package/tcpdump/
>  F:     package/ti-uim/
>  F:     package/uhubctl/
>
> +N: Bastian Breit <bastian.breit.buildroot@gmail.com>
> +F: package/libxmlsec1/
> +
>  N:     Ben Boeckel <mathstuf@gmail.com>
>  F:     package/taskd/
>
> 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/Config.in b/package/libxmlsec1/Config.in
> new file mode 100644
> index 0000000000..ce3384e7b7
> --- /dev/null
> +++ b/package/libxmlsec1/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBXMLSEC1
> +       bool "libxmlsec1"
> +       select BR2_PACKAGE_LIBXML2
> +       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..9ff3b35454
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256 97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6  xmlsec1-1.2.27.tar.gz
> +# Locally calculated
> +sha256 526285395dd39627199ba20fd7f70a2608c8c8c70e4fea04aceddd71baa53d07  Copyright
> diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
> new file mode 100644
> index 0000000000..e6a0a375e9
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# libxmlsec1
> +#
> +################################################################################
> +
> +LIBXMLSEC1_VERSION = 1.2.27
> +LIBXMLSEC1_SOURCE = xmlsec1-$(LIBXMLSEC1_VERSION).tar.gz
> +LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
> +LIBXMLSEC1_LICENSE = MIT
> +LIBXMLSEC1_LICENSE_FILES = Copyright
> +
> +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 openssl
> +
> +$(eval $(autotools-package))
> --
> 2.17.1
>
Thomas Petazzoni April 13, 2019, 8:35 p.m. UTC | #3
Hello Bastian,

Sorry for the very slow feedback. I wanted to apply this patch (after
some rework), but some fundamental thing is missing, which requires
another iteration: the commit log lacks your Signed-off-by line. So
I'll do a full review below.

First, the commit title should match the package name:

	package/libxmlsec1: new package

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

> This fixes spaces and tab formatting in the package folder.
> Therefore an enty in DEVELOPERS is created.
> Change from md5 to sha256 for checksums.
> Remove unneeded libxslt dependency.

The changelog should be after the "---" sign below, so that it doesn't
end up in the commit log when the patch is applied.

And more critically, we need your Signed-off-by at the end of the
commit log.

> ---
>  DEVELOPERS                         |  3 +++
>  package/Config.in                  |  1 +
>  package/libxmlsec1/Config.in       | 11 +++++++++++
>  package/libxmlsec1/libxmlsec1.hash |  4 ++++
>  package/libxmlsec1/libxmlsec1.mk   | 20 ++++++++++++++++++++
>  5 files changed, 39 insertions(+)
>  create mode 100644 package/libxmlsec1/Config.in
>  create mode 100644 package/libxmlsec1/libxmlsec1.hash
>  create mode 100644 package/libxmlsec1/libxmlsec1.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f2e69cc041..2bcd561805 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -250,6 +250,9 @@ F:	package/tcpdump/
>  F:	package/ti-uim/
>  F:	package/uhubctl/
>  
> +N: Bastian Breit <bastian.breit.buildroot@gmail.com>
> +F: package/libxmlsec1/

Please fix the indentation here to comply with the rest of the file.

> diff --git a/package/libxmlsec1/libxmlsec1.hash b/package/libxmlsec1/libxmlsec1.hash
> new file mode 100644
> index 0000000000..9ff3b35454
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256 97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6  xmlsec1-1.2.27.tar.gz
> +# Locally calculated
> +sha256 526285395dd39627199ba20fd7f70a2608c8c8c70e4fea04aceddd71baa53d07  Copyright
> diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
> new file mode 100644
> index 0000000000..e6a0a375e9
> --- /dev/null
> +++ b/package/libxmlsec1/libxmlsec1.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# libxmlsec1
> +#
> +################################################################################
> +
> +LIBXMLSEC1_VERSION = 1.2.27
> +LIBXMLSEC1_SOURCE = xmlsec1-$(LIBXMLSEC1_VERSION).tar.gz
> +LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
> +LIBXMLSEC1_LICENSE = MIT
> +LIBXMLSEC1_LICENSE_FILES = Copyright
> +
> +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

One assignment is enough, and use --enable/--disable and
--with/--without. I.e:

LIBXMLSEC1_CONF_OPTS = \
	--disable-crypto-dl=no \
	--with-openssl=$(STAGING_DIR)/usr \
	--without-libxslt \
	--without-gnutls \
	--without-gcrypt

Thanks!

Thomas
Thomas Petazzoni April 13, 2019, 8:38 p.m. UTC | #4
Hello Bastian,

On Tue, 12 Feb 2019 17:13:08 +0100
Bastian Breit <bastian.breit.buildroot@gmail.com> wrote:

> I would summit options with later commits for the dependencies like
> gnutls which is currently deactivated for this package. Should that be
> mentioned in the help text? It should be clear by reading the current
> dependencies.

We don't typically document all possible dependencies of packages in
the help text, it would be annoying to maintain. Handling them in
the .mk file is enough.

> Does anyone prefer gnutls over openssl for non licencing
> reasons? I am not sure how to handle licence changing by selecting
> different dependencies (gnutls vs openssl)

Why would the license change ? The license of libxmlsec1 itself remains
MIT.

I guess that openssl/gnutls/libgcrypt is actually a choice, i.e one
would use one of the three, correct ?

If so, then you can do:

	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS && !BR2_PACKAGE_LIBGCRYPT

in the Config.in file, and:

ifeq ($(BR2_PACKAGE_OPENSSL),y)
LIBXMLSEC1_DEPENDENCIES += openssl
LIBXMLSEC1_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
else ifeq ($(BR2_PACKAGE_GNUTLS),y)
...
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
...
endif

You could also do the same to support libxslt as an optional
dependency. All of this can be done as part of the initial libxmlsec1
submission, or as follow-up patches.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index f2e69cc041..2bcd561805 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -250,6 +250,9 @@  F:	package/tcpdump/
 F:	package/ti-uim/
 F:	package/uhubctl/
 
+N: Bastian Breit <bastian.breit.buildroot@gmail.com>
+F: package/libxmlsec1/
+
 N:	Ben Boeckel <mathstuf@gmail.com>
 F:	package/taskd/
 
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/Config.in b/package/libxmlsec1/Config.in
new file mode 100644
index 0000000000..ce3384e7b7
--- /dev/null
+++ b/package/libxmlsec1/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_LIBXMLSEC1
+	bool "libxmlsec1"
+	select BR2_PACKAGE_LIBXML2
+	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..9ff3b35454
--- /dev/null
+++ b/package/libxmlsec1/libxmlsec1.hash
@@ -0,0 +1,4 @@ 
+# Locally calculated
+sha256 97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6  xmlsec1-1.2.27.tar.gz
+# Locally calculated
+sha256 526285395dd39627199ba20fd7f70a2608c8c8c70e4fea04aceddd71baa53d07  Copyright
diff --git a/package/libxmlsec1/libxmlsec1.mk b/package/libxmlsec1/libxmlsec1.mk
new file mode 100644
index 0000000000..e6a0a375e9
--- /dev/null
+++ b/package/libxmlsec1/libxmlsec1.mk
@@ -0,0 +1,20 @@ 
+################################################################################
+#
+# libxmlsec1
+#
+################################################################################
+
+LIBXMLSEC1_VERSION = 1.2.27
+LIBXMLSEC1_SOURCE = xmlsec1-$(LIBXMLSEC1_VERSION).tar.gz
+LIBXMLSEC1_SITE = http://www.aleksey.com/xmlsec/download
+LIBXMLSEC1_LICENSE = MIT
+LIBXMLSEC1_LICENSE_FILES = Copyright
+
+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 openssl
+
+$(eval $(autotools-package))