mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/3] hiredis: new package
@ 2022-02-04 16:28 Clemens Gruber
  2022-02-04 16:28 ` [ptxdist] [PATCH 2/3] systemd: add option for openssl support Clemens Gruber
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Clemens Gruber @ 2022-02-04 16:28 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

Adds a new package for hiredis, a minimalistic C client library for
Redis.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 rules/hiredis.in   |  8 ++++++
 rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 rules/hiredis.in
 create mode 100644 rules/hiredis.make

diff --git a/rules/hiredis.in b/rules/hiredis.in
new file mode 100644
index 000000000..d416d69c4
--- /dev/null
+++ b/rules/hiredis.in
@@ -0,0 +1,8 @@
+## SECTION=system_libraries
+
+config HIREDIS
+	tristate
+	select HOST_CMAKE
+	prompt "hiredis                       "
+	help
+	  Hiredis is a minimalistic C client library for the Redis database.
diff --git a/rules/hiredis.make b/rules/hiredis.make
new file mode 100644
index 000000000..10e6d81d2
--- /dev/null
+++ b/rules/hiredis.make
@@ -0,0 +1,61 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_HIREDIS) += hiredis
+
+#
+# Paths and names
+#
+HIREDIS_VERSION	:= 1.0.2
+HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
+HIREDIS		:= hiredis-$(HIREDIS_VERSION)
+HIREDIS_SUFFIX	:= tar.gz
+HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
+HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
+HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
+HIREDIS_LICENSE	:= BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+HIREDIS_CONF_TOOL	:= cmake
+
+HIREDIS_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DDISABLE_TESTS=ON \
+	-DENABLE_SSL=OFF
+
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/hiredis.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, hiredis)
+	@$(call install_fixup, hiredis,PRIORITY,optional)
+	@$(call install_fixup, hiredis,SECTION,base)
+	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
+	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
+
+	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
+	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
+
+	@$(call install_finish, hiredis)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.35.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* [ptxdist] [PATCH 2/3] systemd: add option for openssl support
  2022-02-04 16:28 [ptxdist] [PATCH 1/3] hiredis: new package Clemens Gruber
@ 2022-02-04 16:28 ` Clemens Gruber
  2022-02-14 12:43   ` [ptxdist] [APPLIED] " Michael Olbrich
  2022-02-04 16:28 ` [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4 Clemens Gruber
  2022-02-07  7:39 ` [ptxdist] [PATCH 1/3] hiredis: new package Michael Olbrich
  2 siblings, 1 reply; 16+ messages in thread
From: Clemens Gruber @ 2022-02-04 16:28 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

With the OpenSSL dependency, systemd-resolved supports DNSSEC
validation.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 rules/systemd.in   | 7 +++++++
 rules/systemd.make | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/rules/systemd.in b/rules/systemd.in
index 1a8696d2b..053991f3e 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -28,6 +28,7 @@ menuconfig SYSTEMD
 	select IPTABLES		if SYSTEMD_IPMASQUERADE
 	select LIBELF		if SYSTEMD_COREDUMP
 	select LIBELF_LIBDW	if SYSTEMD_COREDUMP
+	select OPENSSL		if SYSTEMD_OPENSSL
 	# for udev:
 	select ROOTFS_DEV
 	select LIBBLKID
@@ -108,6 +109,12 @@ config SYSTEMD_NETWORK
 	select SYSTEMD_DBUS_SERVICES
 	prompt "network configuration with systemd"
 
+config SYSTEMD_OPENSSL
+	bool
+	prompt "openssl support"
+	help
+	  OpenSSL is needed for DNSSEC support in systemd-resolved
+
 config SYSTEMD_IPMASQUERADE
 	bool
 	depends on SYSTEMD_NETWORK
diff --git a/rules/systemd.make b/rules/systemd.make
index ffa9dbd6a..c13f9abb9 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -143,7 +143,7 @@ SYSTEMD_CONF_OPT	:= \
 	-Dntp-servers= \
 	-Dok-color=green \
 	-Doomd=false \
-	-Dopenssl=false \
+	-Dopenssl=$(call ptx/truefalse,PTXCONF_SYSTEMD_OPENSSL) \
 	-Doss-fuzz=false \
 	-Dp11kit=false \
 	-Dpam=false \
-- 
2.35.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4
  2022-02-04 16:28 [ptxdist] [PATCH 1/3] hiredis: new package Clemens Gruber
  2022-02-04 16:28 ` [ptxdist] [PATCH 2/3] systemd: add option for openssl support Clemens Gruber
@ 2022-02-04 16:28 ` Clemens Gruber
  2022-02-11  9:43   ` Michael Olbrich
  2022-02-07  7:39 ` [ptxdist] [PATCH 1/3] hiredis: new package Michael Olbrich
  2 siblings, 1 reply; 16+ messages in thread
From: Clemens Gruber @ 2022-02-04 16:28 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

Running autogen.sh is no longer necessary.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 patches/protobuf-all-3.7.1/autogen.sh | 1 -
 rules/protobuf.make                   | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 120000 patches/protobuf-all-3.7.1/autogen.sh

diff --git a/patches/protobuf-all-3.7.1/autogen.sh b/patches/protobuf-all-3.7.1/autogen.sh
deleted file mode 120000
index 9f8a4cb7d..000000000
--- a/patches/protobuf-all-3.7.1/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-../autogen.sh
\ No newline at end of file
diff --git a/rules/protobuf.make b/rules/protobuf.make
index a5c126443..1cb4bd7d0 100644
--- a/rules/protobuf.make
+++ b/rules/protobuf.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_PROTOBUF) += protobuf
 #
 # Paths and names
 #
-PROTOBUF_VERSION	:= 3.7.1
-PROTOBUF_MD5		:= cda6ae370a5df941f8aa837c8a0292ba
+PROTOBUF_VERSION	:= 3.19.4
+PROTOBUF_MD5		:= e96c719ff844bc2fe635efab79e71f55
 PROTOBUF		:= protobuf-all-$(PROTOBUF_VERSION)
 PROTOBUF_SUFFIX		:= tar.gz
 PROTOBUF_URL		:= https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)/$(PROTOBUF).$(PROTOBUF_SUFFIX)
-- 
2.35.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-04 16:28 [ptxdist] [PATCH 1/3] hiredis: new package Clemens Gruber
  2022-02-04 16:28 ` [ptxdist] [PATCH 2/3] systemd: add option for openssl support Clemens Gruber
  2022-02-04 16:28 ` [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4 Clemens Gruber
@ 2022-02-07  7:39 ` Michael Olbrich
  2022-02-07  9:03   ` Clemens Gruber
  2 siblings, 1 reply; 16+ messages in thread
From: Michael Olbrich @ 2022-02-07  7:39 UTC (permalink / raw)
  To: Clemens Gruber; +Cc: ptxdist

On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> Adds a new package for hiredis, a minimalistic C client library for
> Redis.
> 
> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> ---
>  rules/hiredis.in   |  8 ++++++
>  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 69 insertions(+)
>  create mode 100644 rules/hiredis.in
>  create mode 100644 rules/hiredis.make
> 
> diff --git a/rules/hiredis.in b/rules/hiredis.in
> new file mode 100644
> index 000000000..d416d69c4
> --- /dev/null
> +++ b/rules/hiredis.in
> @@ -0,0 +1,8 @@
> +## SECTION=system_libraries
> +
> +config HIREDIS
> +	tristate
> +	select HOST_CMAKE
> +	prompt "hiredis                       "
> +	help
> +	  Hiredis is a minimalistic C client library for the Redis database.
> diff --git a/rules/hiredis.make b/rules/hiredis.make
> new file mode 100644
> index 000000000..10e6d81d2
> --- /dev/null
> +++ b/rules/hiredis.make
> @@ -0,0 +1,61 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> +
> +#
> +# Paths and names
> +#
> +HIREDIS_VERSION	:= 1.0.2
> +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> +HIREDIS_SUFFIX	:= tar.gz
> +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> +HIREDIS_LICENSE	:= BSD-3-Clause

Please add _LICENSE_FILES as well.

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# cmake
> +#
> +HIREDIS_CONF_TOOL	:= cmake
> +
> +HIREDIS_CONF_OPT	:= \
> +	$(CROSS_CMAKE_USR) \
> +	-DDISABLE_TESTS=ON \
> +	-DENABLE_SSL=OFF
> +
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/hiredis.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, hiredis)
> +	@$(call install_fixup, hiredis,PRIORITY,optional)
> +	@$(call install_fixup, hiredis,SECTION,base)
> +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> +
> +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)

In general, this link should not be needed. If it really is needed then
please add a comment why.

Michael

> +
> +	@$(call install_finish, hiredis)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.35.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07  7:39 ` [ptxdist] [PATCH 1/3] hiredis: new package Michael Olbrich
@ 2022-02-07  9:03   ` Clemens Gruber
  2022-02-07 10:39     ` Alexander Dahl
  0 siblings, 1 reply; 16+ messages in thread
From: Clemens Gruber @ 2022-02-07  9:03 UTC (permalink / raw)
  To: ptxdist

On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > Adds a new package for hiredis, a minimalistic C client library for
> > Redis.
> > 
> > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > ---
> >  rules/hiredis.in   |  8 ++++++
> >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 69 insertions(+)
> >  create mode 100644 rules/hiredis.in
> >  create mode 100644 rules/hiredis.make
> > 
> > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > new file mode 100644
> > index 000000000..d416d69c4
> > --- /dev/null
> > +++ b/rules/hiredis.in
> > @@ -0,0 +1,8 @@
> > +## SECTION=system_libraries
> > +
> > +config HIREDIS
> > +	tristate
> > +	select HOST_CMAKE
> > +	prompt "hiredis                       "
> > +	help
> > +	  Hiredis is a minimalistic C client library for the Redis database.
> > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > new file mode 100644
> > index 000000000..10e6d81d2
> > --- /dev/null
> > +++ b/rules/hiredis.make
> > @@ -0,0 +1,61 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > +
> > +#
> > +# Paths and names
> > +#
> > +HIREDIS_VERSION	:= 1.0.2
> > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > +HIREDIS_SUFFIX	:= tar.gz
> > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > +HIREDIS_LICENSE	:= BSD-3-Clause
> 
> Please add _LICENSE_FILES as well.
> 
> > +
> > +# ----------------------------------------------------------------------------
> > +# Prepare
> > +# ----------------------------------------------------------------------------
> > +
> > +#
> > +# cmake
> > +#
> > +HIREDIS_CONF_TOOL	:= cmake
> > +
> > +HIREDIS_CONF_OPT	:= \
> > +	$(CROSS_CMAKE_USR) \
> > +	-DDISABLE_TESTS=ON \
> > +	-DENABLE_SSL=OFF
> > +
> > +
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/hiredis.targetinstall:
> > +	@$(call targetinfo)
> > +
> > +	@$(call install_init, hiredis)
> > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > +	@$(call install_fixup, hiredis,SECTION,base)
> > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > +
> > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> 
> In general, this link should not be needed. If it really is needed then
> please add a comment why.

Maybe you can help me out here: If I don't call install_link, the
libhiredis.so link is not present in my rootfs image, even though it is
present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
platform-xyz/root/usr/lib
Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
It is a normal root.ext2 image with ext2fs type ext4.

Any idea why that is?

Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07  9:03   ` Clemens Gruber
@ 2022-02-07 10:39     ` Alexander Dahl
  2022-02-07 12:54       ` Clemens Gruber
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Dahl @ 2022-02-07 10:39 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 4608 bytes --]

Hei hei,

On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > Adds a new package for hiredis, a minimalistic C client library for
> > > Redis.
> > > 
> > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > ---
> > >  rules/hiredis.in   |  8 ++++++
> > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 69 insertions(+)
> > >  create mode 100644 rules/hiredis.in
> > >  create mode 100644 rules/hiredis.make
> > > 
> > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > new file mode 100644
> > > index 000000000..d416d69c4
> > > --- /dev/null
> > > +++ b/rules/hiredis.in
> > > @@ -0,0 +1,8 @@
> > > +## SECTION=system_libraries
> > > +
> > > +config HIREDIS
> > > +	tristate
> > > +	select HOST_CMAKE
> > > +	prompt "hiredis                       "
> > > +	help
> > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > new file mode 100644
> > > index 000000000..10e6d81d2
> > > --- /dev/null
> > > +++ b/rules/hiredis.make
> > > @@ -0,0 +1,61 @@
> > > +# -*-makefile-*-
> > > +#
> > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > +#
> > > +# For further information about the PTXdist project and license conditions
> > > +# see the README file.
> > > +#
> > > +
> > > +#
> > > +# We provide this package
> > > +#
> > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > +
> > > +#
> > > +# Paths and names
> > > +#
> > > +HIREDIS_VERSION	:= 1.0.2
> > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > +HIREDIS_SUFFIX	:= tar.gz
> > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > 
> > Please add _LICENSE_FILES as well.
> > 
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Prepare
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +#
> > > +# cmake
> > > +#
> > > +HIREDIS_CONF_TOOL	:= cmake
> > > +
> > > +HIREDIS_CONF_OPT	:= \
> > > +	$(CROSS_CMAKE_USR) \
> > > +	-DDISABLE_TESTS=ON \
> > > +	-DENABLE_SSL=OFF
> > > +
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Target-Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/hiredis.targetinstall:
> > > +	@$(call targetinfo)
> > > +
> > > +	@$(call install_init, hiredis)
> > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > +
> > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > 
> > In general, this link should not be needed. If it really is needed then
> > please add a comment why.
> 
> Maybe you can help me out here: If I don't call install_link, the
> libhiredis.so link is not present in my rootfs image, even though it is
> present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> platform-xyz/root/usr/lib

I would expect this. Usually you have three pieces:

libfoo.so.1.0.0 (real binary file)
libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
libfoo.so (symlink, used at build time)

> Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> It is a normal root.ext2 image with ext2fs type ext4.
> 
> Any idea why that is?

No idea why that is, but without further knowledge of that lib I would
expect to see libhiredis.so.1 on the target instead of libhiredis.so
(which is probably only needed in sysroot-target).

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 10:39     ` Alexander Dahl
@ 2022-02-07 12:54       ` Clemens Gruber
  2022-02-07 13:11         ` Alexander Dahl
  0 siblings, 1 reply; 16+ messages in thread
From: Clemens Gruber @ 2022-02-07 12:54 UTC (permalink / raw)
  To: ptxdist

Hi,

On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> Hei hei,
> 
> On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > Redis.
> > > > 
> > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > ---
> > > >  rules/hiredis.in   |  8 ++++++
> > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > >  2 files changed, 69 insertions(+)
> > > >  create mode 100644 rules/hiredis.in
> > > >  create mode 100644 rules/hiredis.make
> > > > 
> > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > new file mode 100644
> > > > index 000000000..d416d69c4
> > > > --- /dev/null
> > > > +++ b/rules/hiredis.in
> > > > @@ -0,0 +1,8 @@
> > > > +## SECTION=system_libraries
> > > > +
> > > > +config HIREDIS
> > > > +	tristate
> > > > +	select HOST_CMAKE
> > > > +	prompt "hiredis                       "
> > > > +	help
> > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > new file mode 100644
> > > > index 000000000..10e6d81d2
> > > > --- /dev/null
> > > > +++ b/rules/hiredis.make
> > > > @@ -0,0 +1,61 @@
> > > > +# -*-makefile-*-
> > > > +#
> > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > +#
> > > > +# For further information about the PTXdist project and license conditions
> > > > +# see the README file.
> > > > +#
> > > > +
> > > > +#
> > > > +# We provide this package
> > > > +#
> > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > +
> > > > +#
> > > > +# Paths and names
> > > > +#
> > > > +HIREDIS_VERSION	:= 1.0.2
> > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > 
> > > Please add _LICENSE_FILES as well.
> > > 
> > > > +
> > > > +# ----------------------------------------------------------------------------
> > > > +# Prepare
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +#
> > > > +# cmake
> > > > +#
> > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > +
> > > > +HIREDIS_CONF_OPT	:= \
> > > > +	$(CROSS_CMAKE_USR) \
> > > > +	-DDISABLE_TESTS=ON \
> > > > +	-DENABLE_SSL=OFF
> > > > +
> > > > +
> > > > +# ----------------------------------------------------------------------------
> > > > +# Target-Install
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > +	@$(call targetinfo)
> > > > +
> > > > +	@$(call install_init, hiredis)
> > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > +
> > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > 
> > > In general, this link should not be needed. If it really is needed then
> > > please add a comment why.
> > 
> > Maybe you can help me out here: If I don't call install_link, the
> > libhiredis.so link is not present in my rootfs image, even though it is
> > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > platform-xyz/root/usr/lib
> 
> I would expect this. Usually you have three pieces:
> 
> libfoo.so.1.0.0 (real binary file)
> libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> libfoo.so (symlink, used at build time)
> 
> > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > It is a normal root.ext2 image with ext2fs type ext4.
> > 
> > Any idea why that is?
> 
> No idea why that is, but without further knowledge of that lib I would
> expect to see libhiredis.so.1 on the target instead of libhiredis.so
> (which is probably only needed in sysroot-target).

I forgot to mention that the libhiredis.so.1 link is also created in
platform-xyz/packages/.. and platform-xyz/root/..
I should probably have added the create_link for that one as well but
did not need it because a binary blob not under my control dynloads
/usr/lib/libhiredis.so

Maybe Michael can shed some light on why the links are not present in
the rootfs.

Just for testing I enabled the creation of a root.tgz file
(image-root-tgz). There, the links are also missing.

Thanks,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 12:54       ` Clemens Gruber
@ 2022-02-07 13:11         ` Alexander Dahl
  2022-02-07 13:33           ` Clemens Gruber
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Dahl @ 2022-02-07 13:11 UTC (permalink / raw)
  To: ptxdist

Hello Clemens,

Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber:
> Hi,
> 
> On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> > Hei hei,
> > 
> > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > > Redis.
> > > > > 
> > > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > ---
> > > > >  rules/hiredis.in   |  8 ++++++
> > > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > >  2 files changed, 69 insertions(+)
> > > > >  create mode 100644 rules/hiredis.in
> > > > >  create mode 100644 rules/hiredis.make
> > > > > 
> > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > > new file mode 100644
> > > > > index 000000000..d416d69c4
> > > > > --- /dev/null
> > > > > +++ b/rules/hiredis.in
> > > > > @@ -0,0 +1,8 @@
> > > > > +## SECTION=system_libraries
> > > > > +
> > > > > +config HIREDIS
> > > > > +	tristate
> > > > > +	select HOST_CMAKE
> > > > > +	prompt "hiredis                       "
> > > > > +	help
> > > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > > new file mode 100644
> > > > > index 000000000..10e6d81d2
> > > > > --- /dev/null
> > > > > +++ b/rules/hiredis.make
> > > > > @@ -0,0 +1,61 @@
> > > > > +# -*-makefile-*-
> > > > > +#
> > > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > +#
> > > > > +# For further information about the PTXdist project and license conditions
> > > > > +# see the README file.
> > > > > +#
> > > > > +
> > > > > +#
> > > > > +# We provide this package
> > > > > +#
> > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > > +
> > > > > +#
> > > > > +# Paths and names
> > > > > +#
> > > > > +HIREDIS_VERSION	:= 1.0.2
> > > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > > 
> > > > Please add _LICENSE_FILES as well.
> > > > 
> > > > > +
> > > > > +# ----------------------------------------------------------------------------
> > > > > +# Prepare
> > > > > +# ----------------------------------------------------------------------------
> > > > > +
> > > > > +#
> > > > > +# cmake
> > > > > +#
> > > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > > +
> > > > > +HIREDIS_CONF_OPT	:= \
> > > > > +	$(CROSS_CMAKE_USR) \
> > > > > +	-DDISABLE_TESTS=ON \
> > > > > +	-DENABLE_SSL=OFF
> > > > > +
> > > > > +
> > > > > +# ----------------------------------------------------------------------------
> > > > > +# Target-Install
> > > > > +# ----------------------------------------------------------------------------
> > > > > +
> > > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > > +	@$(call targetinfo)
> > > > > +
> > > > > +	@$(call install_init, hiredis)
> > > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > > +
> > > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > > 
> > > > In general, this link should not be needed. If it really is needed then
> > > > please add a comment why.
> > > 
> > > Maybe you can help me out here: If I don't call install_link, the
> > > libhiredis.so link is not present in my rootfs image, even though it is
> > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > > platform-xyz/root/usr/lib
> > 
> > I would expect this. Usually you have three pieces:
> > 
> > libfoo.so.1.0.0 (real binary file)
> > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> > libfoo.so (symlink, used at build time)
> > 
> > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > > It is a normal root.ext2 image with ext2fs type ext4.
> > > 
> > > Any idea why that is?
> > 
> > No idea why that is, but without further knowledge of that lib I would
> > expect to see libhiredis.so.1 on the target instead of libhiredis.so
> > (which is probably only needed in sysroot-target).
> 
> I forgot to mention that the libhiredis.so.1 link is also created in
> platform-xyz/packages/.. and platform-xyz/root/..
> I should probably have added the create_link for that one as well but
> did not need it because a binary blob not under my control dynloads
> /usr/lib/libhiredis.so

This sound like a flaw in that binary blob?!  That ".1" usually marks
the so version and different numbers are not necessarily compatible,
so by loading libhiredis.so you are at risk of loading an incompatible
library?

> Maybe Michael can shed some light on why the links are not present in
> the rootfs.

Maybe libhiredis makes something different than usual. Haven't looked
into it. O:-)

> Just for testing I enabled the creation of a root.tgz file
> (image-root-tgz). There, the links are also missing.

Mkay.

Greets
Alex


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 13:11         ` Alexander Dahl
@ 2022-02-07 13:33           ` Clemens Gruber
  2022-02-07 15:22             ` Michael Olbrich
  2022-02-07 16:30             ` Alexander Dahl
  0 siblings, 2 replies; 16+ messages in thread
From: Clemens Gruber @ 2022-02-07 13:33 UTC (permalink / raw)
  To: ptxdist

Hi Alex,

On Mon, Feb 07, 2022 at 02:11:13PM +0100, Alexander Dahl wrote:
> Hello Clemens,
> 
> Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber:
> > Hi,
> > 
> > On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> > > Hei hei,
> > > 
> > > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > > > Redis.
> > > > > > 
> > > > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > ---
> > > > > >  rules/hiredis.in   |  8 ++++++
> > > > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > > >  2 files changed, 69 insertions(+)
> > > > > >  create mode 100644 rules/hiredis.in
> > > > > >  create mode 100644 rules/hiredis.make
> > > > > > 
> > > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > > > new file mode 100644
> > > > > > index 000000000..d416d69c4
> > > > > > --- /dev/null
> > > > > > +++ b/rules/hiredis.in
> > > > > > @@ -0,0 +1,8 @@
> > > > > > +## SECTION=system_libraries
> > > > > > +
> > > > > > +config HIREDIS
> > > > > > +	tristate
> > > > > > +	select HOST_CMAKE
> > > > > > +	prompt "hiredis                       "
> > > > > > +	help
> > > > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > > > new file mode 100644
> > > > > > index 000000000..10e6d81d2
> > > > > > --- /dev/null
> > > > > > +++ b/rules/hiredis.make
> > > > > > @@ -0,0 +1,61 @@
> > > > > > +# -*-makefile-*-
> > > > > > +#
> > > > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > +#
> > > > > > +# For further information about the PTXdist project and license conditions
> > > > > > +# see the README file.
> > > > > > +#
> > > > > > +
> > > > > > +#
> > > > > > +# We provide this package
> > > > > > +#
> > > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > > > +
> > > > > > +#
> > > > > > +# Paths and names
> > > > > > +#
> > > > > > +HIREDIS_VERSION	:= 1.0.2
> > > > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > > > 
> > > > > Please add _LICENSE_FILES as well.
> > > > > 
> > > > > > +
> > > > > > +# ----------------------------------------------------------------------------
> > > > > > +# Prepare
> > > > > > +# ----------------------------------------------------------------------------
> > > > > > +
> > > > > > +#
> > > > > > +# cmake
> > > > > > +#
> > > > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > > > +
> > > > > > +HIREDIS_CONF_OPT	:= \
> > > > > > +	$(CROSS_CMAKE_USR) \
> > > > > > +	-DDISABLE_TESTS=ON \
> > > > > > +	-DENABLE_SSL=OFF
> > > > > > +
> > > > > > +
> > > > > > +# ----------------------------------------------------------------------------
> > > > > > +# Target-Install
> > > > > > +# ----------------------------------------------------------------------------
> > > > > > +
> > > > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > > > +	@$(call targetinfo)
> > > > > > +
> > > > > > +	@$(call install_init, hiredis)
> > > > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > > > +
> > > > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > > > 
> > > > > In general, this link should not be needed. If it really is needed then
> > > > > please add a comment why.
> > > > 
> > > > Maybe you can help me out here: If I don't call install_link, the
> > > > libhiredis.so link is not present in my rootfs image, even though it is
> > > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > > > platform-xyz/root/usr/lib
> > > 
> > > I would expect this. Usually you have three pieces:
> > > 
> > > libfoo.so.1.0.0 (real binary file)
> > > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> > > libfoo.so (symlink, used at build time)
> > > 
> > > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > > > It is a normal root.ext2 image with ext2fs type ext4.
> > > > 
> > > > Any idea why that is?
> > > 
> > > No idea why that is, but without further knowledge of that lib I would
> > > expect to see libhiredis.so.1 on the target instead of libhiredis.so
> > > (which is probably only needed in sysroot-target).
> > 
> > I forgot to mention that the libhiredis.so.1 link is also created in
> > platform-xyz/packages/.. and platform-xyz/root/..
> > I should probably have added the create_link for that one as well but
> > did not need it because a binary blob not under my control dynloads
> > /usr/lib/libhiredis.so

I have to correct myself here: The libhiredis.so.1 is not created and
not present in platform-xyz/root or platform-xyz/packages/hiredis-1.0.2
This was a leftover from tests/experiments of mine.

> This sound like a flaw in that binary blob?!  That ".1" usually marks
> the so version and different numbers are not necessarily compatible,
> so by loading libhiredis.so you are at risk of loading an incompatible
> library?

Yes, you are right. This could lead to problems in the future.

> 
> > Maybe Michael can shed some light on why the links are not present in
> > the rootfs.
> 
> Maybe libhiredis makes something different than usual. Haven't looked
> into it. O:-)

It seems the libhiredis cmake config only sets VERSION but not
SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains
why there is only one symlink, but not why that one is not present in
the rootfs.

> 
> > Just for testing I enabled the creation of a root.tgz file
> > (image-root-tgz). There, the links are also missing.
> 
> Mkay.
> 
> Greets
> Alex

Thanks,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 13:33           ` Clemens Gruber
@ 2022-02-07 15:22             ` Michael Olbrich
  2022-02-07 15:25               ` Michael Olbrich
  2022-02-07 16:30             ` Alexander Dahl
  1 sibling, 1 reply; 16+ messages in thread
From: Michael Olbrich @ 2022-02-07 15:22 UTC (permalink / raw)
  To: Clemens Gruber; +Cc: ptxdist

Hi,

On Mon, Feb 07, 2022 at 02:33:29PM +0100, Clemens Gruber wrote:
> On Mon, Feb 07, 2022 at 02:11:13PM +0100, Alexander Dahl wrote:
> > Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber:
> > > On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> > > > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > > > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > > > > Redis.
> > > > > > > 
> > > > > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > ---
> > > > > > >  rules/hiredis.in   |  8 ++++++
> > > > > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > > > >  2 files changed, 69 insertions(+)
> > > > > > >  create mode 100644 rules/hiredis.in
> > > > > > >  create mode 100644 rules/hiredis.make
> > > > > > > 
> > > > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > > > > new file mode 100644
> > > > > > > index 000000000..d416d69c4
> > > > > > > --- /dev/null
> > > > > > > +++ b/rules/hiredis.in
> > > > > > > @@ -0,0 +1,8 @@
> > > > > > > +## SECTION=system_libraries
> > > > > > > +
> > > > > > > +config HIREDIS
> > > > > > > +	tristate
> > > > > > > +	select HOST_CMAKE
> > > > > > > +	prompt "hiredis                       "
> > > > > > > +	help
> > > > > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > > > > new file mode 100644
> > > > > > > index 000000000..10e6d81d2
> > > > > > > --- /dev/null
> > > > > > > +++ b/rules/hiredis.make
> > > > > > > @@ -0,0 +1,61 @@
> > > > > > > +# -*-makefile-*-
> > > > > > > +#
> > > > > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > +#
> > > > > > > +# For further information about the PTXdist project and license conditions
> > > > > > > +# see the README file.
> > > > > > > +#
> > > > > > > +
> > > > > > > +#
> > > > > > > +# We provide this package
> > > > > > > +#
> > > > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > > > > +
> > > > > > > +#
> > > > > > > +# Paths and names
> > > > > > > +#
> > > > > > > +HIREDIS_VERSION	:= 1.0.2
> > > > > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > > > > 
> > > > > > Please add _LICENSE_FILES as well.
> > > > > > 
> > > > > > > +
> > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > +# Prepare
> > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > +
> > > > > > > +#
> > > > > > > +# cmake
> > > > > > > +#
> > > > > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > > > > +
> > > > > > > +HIREDIS_CONF_OPT	:= \
> > > > > > > +	$(CROSS_CMAKE_USR) \
> > > > > > > +	-DDISABLE_TESTS=ON \
> > > > > > > +	-DENABLE_SSL=OFF
> > > > > > > +
> > > > > > > +
> > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > +# Target-Install
> > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > +
> > > > > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > > > > +	@$(call targetinfo)
> > > > > > > +
> > > > > > > +	@$(call install_init, hiredis)
> > > > > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > > > > +
> > > > > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > > > > 
> > > > > > In general, this link should not be needed. If it really is needed then
> > > > > > please add a comment why.
> > > > > 
> > > > > Maybe you can help me out here: If I don't call install_link, the
> > > > > libhiredis.so link is not present in my rootfs image, even though it is
> > > > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > > > > platform-xyz/root/usr/lib
> > > > 
> > > > I would expect this. Usually you have three pieces:
> > > > 
> > > > libfoo.so.1.0.0 (real binary file)
> > > > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> > > > libfoo.so (symlink, used at build time)
> > > > 
> > > > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > > > > It is a normal root.ext2 image with ext2fs type ext4.
> > > > > 
> > > > > Any idea why that is?
> > > > 
> > > > No idea why that is, but without further knowledge of that lib I would
> > > > expect to see libhiredis.so.1 on the target instead of libhiredis.so
> > > > (which is probably only needed in sysroot-target).
> > > 
> > > I forgot to mention that the libhiredis.so.1 link is also created in
> > > platform-xyz/packages/.. and platform-xyz/root/..
> > > I should probably have added the create_link for that one as well but
> > > did not need it because a binary blob not under my control dynloads
> > > /usr/lib/libhiredis.so
> 
> I have to correct myself here: The libhiredis.so.1 is not created and
> not present in platform-xyz/root or platform-xyz/packages/hiredis-1.0.2
> This was a leftover from tests/experiments of mine.
> 
> > This sound like a flaw in that binary blob?!  That ".1" usually marks
> > the so version and different numbers are not necessarily compatible,
> > so by loading libhiredis.so you are at risk of loading an incompatible
> > library?
> 
> Yes, you are right. This could lead to problems in the future.
> 
> > 
> > > Maybe Michael can shed some light on why the links are not present in
> > > the rootfs.
> > 
> > Maybe libhiredis makes something different than usual. Haven't looked
> > into it. O:-)
> 
> It seems the libhiredis cmake config only sets VERSION but not
> SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains
> why there is only one symlink, but not why that one is not present in
> the rootfs.

Lets see what exactly is needed first. What's the output of:

readelf -d platform-xyz/packages/hiredis-1.0.2/usr/lib/libhiredis.so.1.0.0

If the library is created correctly then there should be something like:
[...]
 0x000000000000000e (SONAME)             Library soname: [libhiredis.so.1]
[...]

The linker (at build-time) will take that and write it into the user of the
library, so this link is needed at runtime.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 15:22             ` Michael Olbrich
@ 2022-02-07 15:25               ` Michael Olbrich
  2022-02-07 15:51                 ` Clemens Gruber
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Olbrich @ 2022-02-07 15:25 UTC (permalink / raw)
  To: Clemens Gruber, ptxdist

On Mon, Feb 07, 2022 at 04:22:43PM +0100, Michael Olbrich wrote:
> On Mon, Feb 07, 2022 at 02:33:29PM +0100, Clemens Gruber wrote:
> > On Mon, Feb 07, 2022 at 02:11:13PM +0100, Alexander Dahl wrote:
> > > Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber:
> > > > On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> > > > > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > > > > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > > > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > > > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > > > > > Redis.
> > > > > > > > 
> > > > > > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > > ---
> > > > > > > >  rules/hiredis.in   |  8 ++++++
> > > > > > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > > > > >  2 files changed, 69 insertions(+)
> > > > > > > >  create mode 100644 rules/hiredis.in
> > > > > > > >  create mode 100644 rules/hiredis.make
> > > > > > > > 
> > > > > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > > > > > new file mode 100644
> > > > > > > > index 000000000..d416d69c4
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/rules/hiredis.in
> > > > > > > > @@ -0,0 +1,8 @@
> > > > > > > > +## SECTION=system_libraries
> > > > > > > > +
> > > > > > > > +config HIREDIS
> > > > > > > > +	tristate
> > > > > > > > +	select HOST_CMAKE
> > > > > > > > +	prompt "hiredis                       "
> > > > > > > > +	help
> > > > > > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > > > > > new file mode 100644
> > > > > > > > index 000000000..10e6d81d2
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/rules/hiredis.make
> > > > > > > > @@ -0,0 +1,61 @@
> > > > > > > > +# -*-makefile-*-
> > > > > > > > +#
> > > > > > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > > +#
> > > > > > > > +# For further information about the PTXdist project and license conditions
> > > > > > > > +# see the README file.
> > > > > > > > +#
> > > > > > > > +
> > > > > > > > +#
> > > > > > > > +# We provide this package
> > > > > > > > +#
> > > > > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > > > > > +
> > > > > > > > +#
> > > > > > > > +# Paths and names
> > > > > > > > +#
> > > > > > > > +HIREDIS_VERSION	:= 1.0.2
> > > > > > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > > > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > > > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > > > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > > > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > > > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > > > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > > > > > 
> > > > > > > Please add _LICENSE_FILES as well.
> > > > > > > 
> > > > > > > > +
> > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > +# Prepare
> > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > +
> > > > > > > > +#
> > > > > > > > +# cmake
> > > > > > > > +#
> > > > > > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > > > > > +
> > > > > > > > +HIREDIS_CONF_OPT	:= \
> > > > > > > > +	$(CROSS_CMAKE_USR) \
> > > > > > > > +	-DDISABLE_TESTS=ON \
> > > > > > > > +	-DENABLE_SSL=OFF
> > > > > > > > +
> > > > > > > > +
> > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > +# Target-Install
> > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > +
> > > > > > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > > > > > +	@$(call targetinfo)
> > > > > > > > +
> > > > > > > > +	@$(call install_init, hiredis)
> > > > > > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > > > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > > > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > > > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > > > > > +
> > > > > > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > > > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > > > > > 
> > > > > > > In general, this link should not be needed. If it really is needed then
> > > > > > > please add a comment why.
> > > > > > 
> > > > > > Maybe you can help me out here: If I don't call install_link, the
> > > > > > libhiredis.so link is not present in my rootfs image, even though it is
> > > > > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > > > > > platform-xyz/root/usr/lib
> > > > > 
> > > > > I would expect this. Usually you have three pieces:
> > > > > 
> > > > > libfoo.so.1.0.0 (real binary file)
> > > > > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> > > > > libfoo.so (symlink, used at build time)
> > > > > 
> > > > > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > > > > > It is a normal root.ext2 image with ext2fs type ext4.
> > > > > > 
> > > > > > Any idea why that is?
> > > > > 
> > > > > No idea why that is, but without further knowledge of that lib I would
> > > > > expect to see libhiredis.so.1 on the target instead of libhiredis.so
> > > > > (which is probably only needed in sysroot-target).
> > > > 
> > > > I forgot to mention that the libhiredis.so.1 link is also created in
> > > > platform-xyz/packages/.. and platform-xyz/root/..
> > > > I should probably have added the create_link for that one as well but
> > > > did not need it because a binary blob not under my control dynloads
> > > > /usr/lib/libhiredis.so
> > 
> > I have to correct myself here: The libhiredis.so.1 is not created and
> > not present in platform-xyz/root or platform-xyz/packages/hiredis-1.0.2
> > This was a leftover from tests/experiments of mine.
> > 
> > > This sound like a flaw in that binary blob?!  That ".1" usually marks
> > > the so version and different numbers are not necessarily compatible,
> > > so by loading libhiredis.so you are at risk of loading an incompatible
> > > library?
> > 
> > Yes, you are right. This could lead to problems in the future.
> > 
> > > 
> > > > Maybe Michael can shed some light on why the links are not present in
> > > > the rootfs.
> > > 
> > > Maybe libhiredis makes something different than usual. Haven't looked
> > > into it. O:-)
> > 
> > It seems the libhiredis cmake config only sets VERSION but not
> > SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains
> > why there is only one symlink, but not why that one is not present in
> > the rootfs.
> 
> Lets see what exactly is needed first. What's the output of:
> 
> readelf -d platform-xyz/packages/hiredis-1.0.2/usr/lib/libhiredis.so.1.0.0
> 
> If the library is created correctly then there should be something like:
> [...]
>  0x000000000000000e (SONAME)             Library soname: [libhiredis.so.1]
> [...]
> 
> The linker (at build-time) will take that and write it into the user of the
> library, so this link is needed at runtime.

On Debian I see:
 0x000000000000000e (SONAME)             Library soname: [libhiredis.so.1.0.0]

So you probably don't need any symlinks at runtime.
Check the 'NEEDED' entry in the 'readelf -d' output of the application that
uses the library.

Michael


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 15:25               ` Michael Olbrich
@ 2022-02-07 15:51                 ` Clemens Gruber
  0 siblings, 0 replies; 16+ messages in thread
From: Clemens Gruber @ 2022-02-07 15:51 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist

On Mon, Feb 07, 2022 at 04:25:43PM +0100, Michael Olbrich wrote:
> On Mon, Feb 07, 2022 at 04:22:43PM +0100, Michael Olbrich wrote:
> > On Mon, Feb 07, 2022 at 02:33:29PM +0100, Clemens Gruber wrote:
> > > On Mon, Feb 07, 2022 at 02:11:13PM +0100, Alexander Dahl wrote:
> > > > Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber:
> > > > > On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote:
> > > > > > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote:
> > > > > > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote:
> > > > > > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote:
> > > > > > > > > Adds a new package for hiredis, a minimalistic C client library for
> > > > > > > > > Redis.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > > > ---
> > > > > > > > >  rules/hiredis.in   |  8 ++++++
> > > > > > > > >  rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > > > > > >  2 files changed, 69 insertions(+)
> > > > > > > > >  create mode 100644 rules/hiredis.in
> > > > > > > > >  create mode 100644 rules/hiredis.make
> > > > > > > > > 
> > > > > > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in
> > > > > > > > > new file mode 100644
> > > > > > > > > index 000000000..d416d69c4
> > > > > > > > > --- /dev/null
> > > > > > > > > +++ b/rules/hiredis.in
> > > > > > > > > @@ -0,0 +1,8 @@
> > > > > > > > > +## SECTION=system_libraries
> > > > > > > > > +
> > > > > > > > > +config HIREDIS
> > > > > > > > > +	tristate
> > > > > > > > > +	select HOST_CMAKE
> > > > > > > > > +	prompt "hiredis                       "
> > > > > > > > > +	help
> > > > > > > > > +	  Hiredis is a minimalistic C client library for the Redis database.
> > > > > > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make
> > > > > > > > > new file mode 100644
> > > > > > > > > index 000000000..10e6d81d2
> > > > > > > > > --- /dev/null
> > > > > > > > > +++ b/rules/hiredis.make
> > > > > > > > > @@ -0,0 +1,61 @@
> > > > > > > > > +# -*-makefile-*-
> > > > > > > > > +#
> > > > > > > > > +# Copyright (C) 2022 by Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > > > > > > +#
> > > > > > > > > +# For further information about the PTXdist project and license conditions
> > > > > > > > > +# see the README file.
> > > > > > > > > +#
> > > > > > > > > +
> > > > > > > > > +#
> > > > > > > > > +# We provide this package
> > > > > > > > > +#
> > > > > > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis
> > > > > > > > > +
> > > > > > > > > +#
> > > > > > > > > +# Paths and names
> > > > > > > > > +#
> > > > > > > > > +HIREDIS_VERSION	:= 1.0.2
> > > > > > > > > +HIREDIS_MD5	:= 58e8313188f66ed1be1c220d14a7752e
> > > > > > > > > +HIREDIS		:= hiredis-$(HIREDIS_VERSION)
> > > > > > > > > +HIREDIS_SUFFIX	:= tar.gz
> > > > > > > > > +HIREDIS_URL	:= https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX)
> > > > > > > > > +HIREDIS_SOURCE	:= $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX)
> > > > > > > > > +HIREDIS_DIR	:= $(BUILDDIR)/$(HIREDIS)
> > > > > > > > > +HIREDIS_LICENSE	:= BSD-3-Clause
> > > > > > > > 
> > > > > > > > Please add _LICENSE_FILES as well.
> > > > > > > > 
> > > > > > > > > +
> > > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > > +# Prepare
> > > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > > +
> > > > > > > > > +#
> > > > > > > > > +# cmake
> > > > > > > > > +#
> > > > > > > > > +HIREDIS_CONF_TOOL	:= cmake
> > > > > > > > > +
> > > > > > > > > +HIREDIS_CONF_OPT	:= \
> > > > > > > > > +	$(CROSS_CMAKE_USR) \
> > > > > > > > > +	-DDISABLE_TESTS=ON \
> > > > > > > > > +	-DENABLE_SSL=OFF
> > > > > > > > > +
> > > > > > > > > +
> > > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > > +# Target-Install
> > > > > > > > > +# ----------------------------------------------------------------------------
> > > > > > > > > +
> > > > > > > > > +$(STATEDIR)/hiredis.targetinstall:
> > > > > > > > > +	@$(call targetinfo)
> > > > > > > > > +
> > > > > > > > > +	@$(call install_init, hiredis)
> > > > > > > > > +	@$(call install_fixup, hiredis,PRIORITY,optional)
> > > > > > > > > +	@$(call install_fixup, hiredis,SECTION,base)
> > > > > > > > > +	@$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber <clemens.gruber@pqgruber.com>")
> > > > > > > > > +	@$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis")
> > > > > > > > > +
> > > > > > > > > +	@$(call install_lib, hiredis, 0, 0, 0644, libhiredis)
> > > > > > > > > +	@$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so)
> > > > > > > > 
> > > > > > > > In general, this link should not be needed. If it really is needed then
> > > > > > > > please add a comment why.
> > > > > > > 
> > > > > > > Maybe you can help me out here: If I don't call install_link, the
> > > > > > > libhiredis.so link is not present in my rootfs image, even though it is
> > > > > > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in
> > > > > > > platform-xyz/root/usr/lib
> > > > > > 
> > > > > > I would expect this. Usually you have three pieces:
> > > > > > 
> > > > > > libfoo.so.1.0.0 (real binary file)
> > > > > > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib)
> > > > > > libfoo.so (symlink, used at build time)
> > > > > > 
> > > > > > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0
> > > > > > > It is a normal root.ext2 image with ext2fs type ext4.
> > > > > > > 
> > > > > > > Any idea why that is?
> > > > > > 
> > > > > > No idea why that is, but without further knowledge of that lib I would
> > > > > > expect to see libhiredis.so.1 on the target instead of libhiredis.so
> > > > > > (which is probably only needed in sysroot-target).
> > > > > 
> > > > > I forgot to mention that the libhiredis.so.1 link is also created in
> > > > > platform-xyz/packages/.. and platform-xyz/root/..
> > > > > I should probably have added the create_link for that one as well but
> > > > > did not need it because a binary blob not under my control dynloads
> > > > > /usr/lib/libhiredis.so
> > > 
> > > I have to correct myself here: The libhiredis.so.1 is not created and
> > > not present in platform-xyz/root or platform-xyz/packages/hiredis-1.0.2
> > > This was a leftover from tests/experiments of mine.
> > > 
> > > > This sound like a flaw in that binary blob?!  That ".1" usually marks
> > > > the so version and different numbers are not necessarily compatible,
> > > > so by loading libhiredis.so you are at risk of loading an incompatible
> > > > library?
> > > 
> > > Yes, you are right. This could lead to problems in the future.
> > > 
> > > > 
> > > > > Maybe Michael can shed some light on why the links are not present in
> > > > > the rootfs.
> > > > 
> > > > Maybe libhiredis makes something different than usual. Haven't looked
> > > > into it. O:-)
> > > 
> > > It seems the libhiredis cmake config only sets VERSION but not
> > > SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains
> > > why there is only one symlink, but not why that one is not present in
> > > the rootfs.
> > 
> > Lets see what exactly is needed first. What's the output of:
> > 
> > readelf -d platform-xyz/packages/hiredis-1.0.2/usr/lib/libhiredis.so.1.0.0
> > 
> > If the library is created correctly then there should be something like:
> > [...]
> >  0x000000000000000e (SONAME)             Library soname: [libhiredis.so.1]
> > [...]
> > 
> > The linker (at build-time) will take that and write it into the user of the
> > library, so this link is needed at runtime.

readelf -d of libhiredis.so.1.0.0 returns:
[...]
 0x0000000e (SONAME)                     Library soname: [libhiredis.so.1.0.0]
[...]

> 
> On Debian I see:
>  0x000000000000000e (SONAME)             Library soname: [libhiredis.so.1.0.0]
> 
> So you probably don't need any symlinks at runtime.
> Check the 'NEEDED' entry in the 'readelf -d' output of the application that
> uses the library.
> 
> Michael

An application of ours that uses it has the following NEEDED entry:
 0x00000001 (NEEDED)                     Shared library: [libhiredis.so.1.0.0]

It does in fact work as is! I just tested it. The problem with the
binary blob is solvable on our end.

And ptxdist_install_shared already ignores the .so links because they are only
needed at build time.. makes sense!

Thanks for your help,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 1/3] hiredis: new package
  2022-02-07 13:33           ` Clemens Gruber
  2022-02-07 15:22             ` Michael Olbrich
@ 2022-02-07 16:30             ` Alexander Dahl
  1 sibling, 0 replies; 16+ messages in thread
From: Alexander Dahl @ 2022-02-07 16:30 UTC (permalink / raw)
  To: ptxdist

Hei hei,

this tends to go offtopic, so I dropped most of the context … O:-)

Am Mon, Feb 07, 2022 at 02:33:29PM +0100 schrieb Clemens Gruber:
> > Maybe libhiredis makes something different than usual. Haven't looked
> > into it. O:-)
> 
> It seems the libhiredis cmake config only sets VERSION but not
> SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains
> why there is only one symlink, but not why that one is not present in
> the rootfs.

Made the mistake to look at this:

https://github.com/redis/hiredis/blob/master/CMakeLists.txt

Oh boy, don't even know where to start, this is miles away from how to
do modern CMake.  But it shows what you already noticed, SOVERSION is
not used at all.  Maybe someone should point them at this:

https://cmake.org/cmake/help/v3.4/prop_tgt/SOVERSION.html

A good start for modernizing (and reducing build time) would be this
PR: 

https://github.com/redis/hiredis/pull/951

But I won't dive in deeper, already put too much time in this. O:-)

Greets
Alex


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4
  2022-02-04 16:28 ` [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4 Clemens Gruber
@ 2022-02-11  9:43   ` Michael Olbrich
  2022-02-11 14:30     ` Clemens Gruber
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Olbrich @ 2022-02-11  9:43 UTC (permalink / raw)
  To: Clemens Gruber; +Cc: ptxdist

On Fri, Feb 04, 2022 at 05:28:09PM +0100, Clemens Gruber wrote:
> Running autogen.sh is no longer necessary.
> 
> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> ---
>  patches/protobuf-all-3.7.1/autogen.sh | 1 -
>  rules/protobuf.make                   | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>  delete mode 120000 patches/protobuf-all-3.7.1/autogen.sh
> 
> diff --git a/patches/protobuf-all-3.7.1/autogen.sh b/patches/protobuf-all-3.7.1/autogen.sh
> deleted file mode 120000
> index 9f8a4cb7d..000000000
> --- a/patches/protobuf-all-3.7.1/autogen.sh
> +++ /dev/null
> @@ -1 +0,0 @@
> -../autogen.sh
> \ No newline at end of file
> diff --git a/rules/protobuf.make b/rules/protobuf.make
> index a5c126443..1cb4bd7d0 100644
> --- a/rules/protobuf.make
> +++ b/rules/protobuf.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_PROTOBUF) += protobuf
>  #
>  # Paths and names
>  #
> -PROTOBUF_VERSION	:= 3.7.1
> -PROTOBUF_MD5		:= cda6ae370a5df941f8aa837c8a0292ba
> +PROTOBUF_VERSION	:= 3.19.4
> +PROTOBUF_MD5		:= e96c719ff844bc2fe635efab79e71f55

This breaks building grpc:

In file included from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.h:30,
                 from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.cc:6:
.../build-host/grpc-1.21.0/include/grpcpp/impl/codegen/proto_utils.h: In function 'grpc::Status grpc::GenericDeserialize(grpc::ByteBuffer*, grpc::protobuf::Message*)':
.../build-host/grpc-1.21.0/include/grpcpp/impl/codegen/proto_utils.h:86:48: error: no matching function for call to 'google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int, int)'
In file included from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.pb.h:23,
                 from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.cc:5:
.../sysroot-host/include/google/protobuf/io/coded_stream.h:406:8: note: candidate: 'void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)'
.../sysroot-host/include/google/protobuf/io/coded_stream.h:406:8: note: candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/grpc++_error_details.dir/build.make:108:
CMakeFiles/grpc++_error_details.dir/gens/src/proto/grpc/status/status.grpc.pb.cc.o]
Error 1

You have done most of the work on that package. Can you take a look at
that. I guess it should be updated as well.

Michael

>  PROTOBUF		:= protobuf-all-$(PROTOBUF_VERSION)
>  PROTOBUF_SUFFIX		:= tar.gz
>  PROTOBUF_URL		:= https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)/$(PROTOBUF).$(PROTOBUF_SUFFIX)
> -- 
> 2.35.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4
  2022-02-11  9:43   ` Michael Olbrich
@ 2022-02-11 14:30     ` Clemens Gruber
  0 siblings, 0 replies; 16+ messages in thread
From: Clemens Gruber @ 2022-02-11 14:30 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist

On Fri, Feb 11, 2022 at 10:43:29AM +0100, Michael Olbrich wrote:
> On Fri, Feb 04, 2022 at 05:28:09PM +0100, Clemens Gruber wrote:
> > Running autogen.sh is no longer necessary.
> > 
> > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > ---
> >  patches/protobuf-all-3.7.1/autogen.sh | 1 -
> >  rules/protobuf.make                   | 4 ++--
> >  2 files changed, 2 insertions(+), 3 deletions(-)
> >  delete mode 120000 patches/protobuf-all-3.7.1/autogen.sh
> > 
> > diff --git a/patches/protobuf-all-3.7.1/autogen.sh b/patches/protobuf-all-3.7.1/autogen.sh
> > deleted file mode 120000
> > index 9f8a4cb7d..000000000
> > --- a/patches/protobuf-all-3.7.1/autogen.sh
> > +++ /dev/null
> > @@ -1 +0,0 @@
> > -../autogen.sh
> > \ No newline at end of file
> > diff --git a/rules/protobuf.make b/rules/protobuf.make
> > index a5c126443..1cb4bd7d0 100644
> > --- a/rules/protobuf.make
> > +++ b/rules/protobuf.make
> > @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_PROTOBUF) += protobuf
> >  #
> >  # Paths and names
> >  #
> > -PROTOBUF_VERSION	:= 3.7.1
> > -PROTOBUF_MD5		:= cda6ae370a5df941f8aa837c8a0292ba
> > +PROTOBUF_VERSION	:= 3.19.4
> > +PROTOBUF_MD5		:= e96c719ff844bc2fe635efab79e71f55
> 
> This breaks building grpc:
> 
> In file included from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.h:30,
>                  from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.cc:6:
> .../build-host/grpc-1.21.0/include/grpcpp/impl/codegen/proto_utils.h: In function 'grpc::Status grpc::GenericDeserialize(grpc::ByteBuffer*, grpc::protobuf::Message*)':
> .../build-host/grpc-1.21.0/include/grpcpp/impl/codegen/proto_utils.h:86:48: error: no matching function for call to 'google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int, int)'
> In file included from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.pb.h:23,
>                  from .../build-host/grpc-1.21.0-build/gens/src/proto/grpc/status/status.grpc.pb.cc:5:
> .../sysroot-host/include/google/protobuf/io/coded_stream.h:406:8: note: candidate: 'void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)'
> .../sysroot-host/include/google/protobuf/io/coded_stream.h:406:8: note: candidate expects 1 argument, 2 provided
> make[2]: *** [CMakeFiles/grpc++_error_details.dir/build.make:108:
> CMakeFiles/grpc++_error_details.dir/gens/src/proto/grpc/status/status.grpc.pb.cc.o]
> Error 1
> 
> You have done most of the work on that package. Can you take a look at
> that. I guess it should be updated as well.
> 
> Michael

You are right. They also added more mandatory dependencies (abseil and
re2) in the meantime and I am having difficulty with the abseil library.
I get many linker errors when building current grpc. This will probably
take some time.
I'll have to take a look at how buildroot handled this.

Maybe better drop the protobuf version bump in the meantime?

Thanks,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [APPLIED] systemd: add option for openssl support
  2022-02-04 16:28 ` [ptxdist] [PATCH 2/3] systemd: add option for openssl support Clemens Gruber
@ 2022-02-14 12:43   ` Michael Olbrich
  0 siblings, 0 replies; 16+ messages in thread
From: Michael Olbrich @ 2022-02-14 12:43 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

Thanks, applied as c72da50372d3dceb210d0dcfb29055280670b0a3.

Michael

[sent from post-receive hook]

On Mon, 14 Feb 2022 13:43:39 +0100, Clemens Gruber <clemens.gruber@pqgruber.com> wrote:
> With the OpenSSL dependency, systemd-resolved supports DNSSEC
> validation.
> 
> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> Message-Id: <20220204162809.830058-2-clemens.gruber@pqgruber.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/systemd.in b/rules/systemd.in
> index 1a8696d2b821..053991f3ef99 100644
> --- a/rules/systemd.in
> +++ b/rules/systemd.in
> @@ -28,6 +28,7 @@ menuconfig SYSTEMD
>  	select IPTABLES		if SYSTEMD_IPMASQUERADE
>  	select LIBELF		if SYSTEMD_COREDUMP
>  	select LIBELF_LIBDW	if SYSTEMD_COREDUMP
> +	select OPENSSL		if SYSTEMD_OPENSSL
>  	# for udev:
>  	select ROOTFS_DEV
>  	select LIBBLKID
> @@ -108,6 +109,12 @@ config SYSTEMD_NETWORK
>  	select SYSTEMD_DBUS_SERVICES
>  	prompt "network configuration with systemd"
>  
> +config SYSTEMD_OPENSSL
> +	bool
> +	prompt "openssl support"
> +	help
> +	  OpenSSL is needed for DNSSEC support in systemd-resolved
> +
>  config SYSTEMD_IPMASQUERADE
>  	bool
>  	depends on SYSTEMD_NETWORK
> diff --git a/rules/systemd.make b/rules/systemd.make
> index ffa9dbd6a13a..c13f9abb9ea3 100644
> --- a/rules/systemd.make
> +++ b/rules/systemd.make
> @@ -143,7 +143,7 @@ SYSTEMD_CONF_OPT	:= \
>  	-Dntp-servers= \
>  	-Dok-color=green \
>  	-Doomd=false \
> -	-Dopenssl=false \
> +	-Dopenssl=$(call ptx/truefalse,PTXCONF_SYSTEMD_OPENSSL) \
>  	-Doss-fuzz=false \
>  	-Dp11kit=false \
>  	-Dpam=false \

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

end of thread, other threads:[~2022-02-14 12:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 16:28 [ptxdist] [PATCH 1/3] hiredis: new package Clemens Gruber
2022-02-04 16:28 ` [ptxdist] [PATCH 2/3] systemd: add option for openssl support Clemens Gruber
2022-02-14 12:43   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-02-04 16:28 ` [ptxdist] [PATCH 3/3] protobuf: version bump 3.7.1 -> 3.19.4 Clemens Gruber
2022-02-11  9:43   ` Michael Olbrich
2022-02-11 14:30     ` Clemens Gruber
2022-02-07  7:39 ` [ptxdist] [PATCH 1/3] hiredis: new package Michael Olbrich
2022-02-07  9:03   ` Clemens Gruber
2022-02-07 10:39     ` Alexander Dahl
2022-02-07 12:54       ` Clemens Gruber
2022-02-07 13:11         ` Alexander Dahl
2022-02-07 13:33           ` Clemens Gruber
2022-02-07 15:22             ` Michael Olbrich
2022-02-07 15:25               ` Michael Olbrich
2022-02-07 15:51                 ` Clemens Gruber
2022-02-07 16:30             ` Alexander Dahl

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