Re: [ptxdist] [PATCH] host-systemd: Add option to install dev files

2021-07-09 Thread Michael Olbrich
On Fri, Jul 09, 2021 at 09:28:32AM -0400, Jon Ringle wrote:
> On Thu, Jul 8, 2021 at 12:59 AM Michael Olbrich 
> wrote:
> 
> > On Wed, Jul 07, 2021 at 05:06:56PM -0400, Jon Ringle wrote:
> > > On Fri, Jun 25, 2021 at 5:41 AM Michael Olbrich <
> > m.olbr...@pengutronix.de>
> > > wrote:
> > >
> > > > On Tue, Jun 22, 2021 at 04:35:04PM +, j...@ringle.org wrote:
> > > > > From: Jon Ringle 
> > > > >
> > > > > Doing a full install that include dev files is
> > > > > helpful if a project needs this support.
> > > > >
> > > > > I created a host-sdbus-cpp project that depends
> > > > > on libsystemd. The -Drootprefix=/ was required
> > > > > to have cmake pkg-config work properly.
> > > > >
> > > > > Signed-off-by: Jon Ringle 
> > > > > ---
> > > > >  rules/host-systemd.in   | 7 +++
> > > > >  rules/host-systemd.make | 7 +++
> > > > >  2 files changed, 14 insertions(+)
> > > > >
> > > > > diff --git a/rules/host-systemd.in b/rules/host-systemd.in
> > > > > index f80d9de10..828694f80 100644
> > > > > --- a/rules/host-systemd.in
> > > > > +++ b/rules/host-systemd.in
> > > > > @@ -7,3 +7,10 @@ config HOST_SYSTEMD
> > > > >   select HOST_GPERF
> > > > >   select HOST_UTIL_LINUX_NG
> > > > >   select HOST_LIBCAP
> > > > > +
> > > > > +config HOST_SYSTEMD_INSTALL_DEV
> > > > > + bool
> > > > > + default n
> > > > > + help
> > > > > +  Install host systemd development headers/libs
> > > > > +
> > > > > diff --git a/rules/host-systemd.make b/rules/host-systemd.make
> > > > > index 42409d7b5..58b44a683 100644
> > > > > --- a/rules/host-systemd.make
> > > > > +++ b/rules/host-systemd.make
> > > > > @@ -20,6 +20,7 @@ HOST_SYSTEMD_CONF_TOOL  := meson
> > > > >  HOST_SYSTEMD_CONF_OPT:= \
> > > > >   $(HOST_MESON_OPT) \
> > > > >   -Dprefix=/usr \
> > > > > + -Drootprefix=/ \
> > > >
> > > > This breaks hwdb: The path for the output file is hardcoded as
> > > > "${destdir}${rootprefix}/lib/udev/hwdb.bin"
> > > >
> > > > This breaks hwdb for the host package?
> > >
> > >
> > > > Hmmm, maybe we could add '/usr' to the destdir. Please try that. This
> > is
> > > > the '--root' argument the systemd-hwdb package.
> > > > If it works then the systemd-hwdb package should generate a hwdb that
> > is
> > > > about 10MB in size.
> > > >
> > > > If it works, remove the prefix instead of adding the rootprefix.
> > > >
> > > >
> > > I'm trying to work out how the systemd-hwdb package relates to the
> > > host-systemd package...
> >
> > host-systemd provides the systemd-hwdb host tool that the systemd-hwdb
> > package uses to generate the hwdb database at build-time.
> >
> > The (relative) path, where the database is created is hardcoded and defined
> > by the rootprefix.
> >
> >
> I have never built systemd-hwdb before, but when I do it fails like this:
> 
> 
> target: systemd-hwdb.install
> 
> 
> install: creating directory
> '/src/build/platform-ec2k/packages/systemd-hwdb-1/usr/lib/udev'
> /src/build/platform-ec2k/sysroot-host/bin/systemd-hwdb: error while loading
> shared libraries: libsystemd-shared-248.so: cannot open shared object file:
> No such file or directory
> make: *** [/src/build/rules/systemd-hwdb.make:26:
> /src/build/platform-ec2k/state/systemd-hwdb.install] Error 127
> 
> I find this file here:
> jringle@-arm-v7a-linux-gnueabihf:~/build$ find
> /src/build/platform-ec2k/sysroot-host/ -name libsystemd-shared-248.so
> /src/build/platform-ec2k/sysroot-host/lib/systemd/libsystemd-shared-248.so

Take a look at host-systemd.make. We move libsystemd-shared-248.so to
sysroot-host/lib/ in the install stage. It's ugly but it works :-). With
your change, that no longer happens and libsystemd-shared-248.so is not
found. Maybe create a symlink for this after world/install?

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- |

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


Re: [ptxdist] [PATCH] host-systemd: Add option to install dev files

2021-07-09 Thread Jon Ringle
On Thu, Jul 8, 2021 at 12:59 AM Michael Olbrich 
wrote:

> On Wed, Jul 07, 2021 at 05:06:56PM -0400, Jon Ringle wrote:
> > On Fri, Jun 25, 2021 at 5:41 AM Michael Olbrich <
> m.olbr...@pengutronix.de>
> > wrote:
> >
> > > On Tue, Jun 22, 2021 at 04:35:04PM +, j...@ringle.org wrote:
> > > > From: Jon Ringle 
> > > >
> > > > Doing a full install that include dev files is
> > > > helpful if a project needs this support.
> > > >
> > > > I created a host-sdbus-cpp project that depends
> > > > on libsystemd. The -Drootprefix=/ was required
> > > > to have cmake pkg-config work properly.
> > > >
> > > > Signed-off-by: Jon Ringle 
> > > > ---
> > > >  rules/host-systemd.in   | 7 +++
> > > >  rules/host-systemd.make | 7 +++
> > > >  2 files changed, 14 insertions(+)
> > > >
> > > > diff --git a/rules/host-systemd.in b/rules/host-systemd.in
> > > > index f80d9de10..828694f80 100644
> > > > --- a/rules/host-systemd.in
> > > > +++ b/rules/host-systemd.in
> > > > @@ -7,3 +7,10 @@ config HOST_SYSTEMD
> > > >   select HOST_GPERF
> > > >   select HOST_UTIL_LINUX_NG
> > > >   select HOST_LIBCAP
> > > > +
> > > > +config HOST_SYSTEMD_INSTALL_DEV
> > > > + bool
> > > > + default n
> > > > + help
> > > > +  Install host systemd development headers/libs
> > > > +
> > > > diff --git a/rules/host-systemd.make b/rules/host-systemd.make
> > > > index 42409d7b5..58b44a683 100644
> > > > --- a/rules/host-systemd.make
> > > > +++ b/rules/host-systemd.make
> > > > @@ -20,6 +20,7 @@ HOST_SYSTEMD_CONF_TOOL  := meson
> > > >  HOST_SYSTEMD_CONF_OPT:= \
> > > >   $(HOST_MESON_OPT) \
> > > >   -Dprefix=/usr \
> > > > + -Drootprefix=/ \
> > >
> > > This breaks hwdb: The path for the output file is hardcoded as
> > > "${destdir}${rootprefix}/lib/udev/hwdb.bin"
> > >
> > > This breaks hwdb for the host package?
> >
> >
> > > Hmmm, maybe we could add '/usr' to the destdir. Please try that. This
> is
> > > the '--root' argument the systemd-hwdb package.
> > > If it works then the systemd-hwdb package should generate a hwdb that
> is
> > > about 10MB in size.
> > >
> > > If it works, remove the prefix instead of adding the rootprefix.
> > >
> > >
> > I'm trying to work out how the systemd-hwdb package relates to the
> > host-systemd package...
>
> host-systemd provides the systemd-hwdb host tool that the systemd-hwdb
> package uses to generate the hwdb database at build-time.
>
> The (relative) path, where the database is created is hardcoded and defined
> by the rootprefix.
>
>
I have never built systemd-hwdb before, but when I do it fails like this:


target: systemd-hwdb.install


install: creating directory
'/src/build/platform-ec2k/packages/systemd-hwdb-1/usr/lib/udev'
/src/build/platform-ec2k/sysroot-host/bin/systemd-hwdb: error while loading
shared libraries: libsystemd-shared-248.so: cannot open shared object file:
No such file or directory
make: *** [/src/build/rules/systemd-hwdb.make:26:
/src/build/platform-ec2k/state/systemd-hwdb.install] Error 127

I find this file here:
jringle@-arm-v7a-linux-gnueabihf:~/build$ find
/src/build/platform-ec2k/sysroot-host/ -name libsystemd-shared-248.so
/src/build/platform-ec2k/sysroot-host/lib/systemd/libsystemd-shared-248.so

-Jon
___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] [PATCH] host-systemd: Add option to install dev files

2021-07-07 Thread Michael Olbrich
On Wed, Jul 07, 2021 at 05:06:56PM -0400, Jon Ringle wrote:
> On Fri, Jun 25, 2021 at 5:41 AM Michael Olbrich 
> wrote:
> 
> > On Tue, Jun 22, 2021 at 04:35:04PM +, j...@ringle.org wrote:
> > > From: Jon Ringle 
> > >
> > > Doing a full install that include dev files is
> > > helpful if a project needs this support.
> > >
> > > I created a host-sdbus-cpp project that depends
> > > on libsystemd. The -Drootprefix=/ was required
> > > to have cmake pkg-config work properly.
> > >
> > > Signed-off-by: Jon Ringle 
> > > ---
> > >  rules/host-systemd.in   | 7 +++
> > >  rules/host-systemd.make | 7 +++
> > >  2 files changed, 14 insertions(+)
> > >
> > > diff --git a/rules/host-systemd.in b/rules/host-systemd.in
> > > index f80d9de10..828694f80 100644
> > > --- a/rules/host-systemd.in
> > > +++ b/rules/host-systemd.in
> > > @@ -7,3 +7,10 @@ config HOST_SYSTEMD
> > >   select HOST_GPERF
> > >   select HOST_UTIL_LINUX_NG
> > >   select HOST_LIBCAP
> > > +
> > > +config HOST_SYSTEMD_INSTALL_DEV
> > > + bool
> > > + default n
> > > + help
> > > +  Install host systemd development headers/libs
> > > +
> > > diff --git a/rules/host-systemd.make b/rules/host-systemd.make
> > > index 42409d7b5..58b44a683 100644
> > > --- a/rules/host-systemd.make
> > > +++ b/rules/host-systemd.make
> > > @@ -20,6 +20,7 @@ HOST_SYSTEMD_CONF_TOOL  := meson
> > >  HOST_SYSTEMD_CONF_OPT:= \
> > >   $(HOST_MESON_OPT) \
> > >   -Dprefix=/usr \
> > > + -Drootprefix=/ \
> >
> > This breaks hwdb: The path for the output file is hardcoded as
> > "${destdir}${rootprefix}/lib/udev/hwdb.bin"
> >
> > This breaks hwdb for the host package?
> 
> 
> > Hmmm, maybe we could add '/usr' to the destdir. Please try that. This is
> > the '--root' argument the systemd-hwdb package.
> > If it works then the systemd-hwdb package should generate a hwdb that is
> > about 10MB in size.
> >
> > If it works, remove the prefix instead of adding the rootprefix.
> >
> >
> I'm trying to work out how the systemd-hwdb package relates to the
> host-systemd package...

host-systemd provides the systemd-hwdb host tool that the systemd-hwdb
package uses to generate the hwdb database at build-time.

The (relative) path, where the database is created is hardcoded and defined
by the rootprefix.

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- |

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


Re: [ptxdist] [PATCH] host-systemd: Add option to install dev files

2021-07-07 Thread Jon Ringle
Hi Michael

On Fri, Jun 25, 2021 at 5:41 AM Michael Olbrich 
wrote:

> On Tue, Jun 22, 2021 at 04:35:04PM +, j...@ringle.org wrote:
> > From: Jon Ringle 
> >
> > Doing a full install that include dev files is
> > helpful if a project needs this support.
> >
> > I created a host-sdbus-cpp project that depends
> > on libsystemd. The -Drootprefix=/ was required
> > to have cmake pkg-config work properly.
> >
> > Signed-off-by: Jon Ringle 
> > ---
> >  rules/host-systemd.in   | 7 +++
> >  rules/host-systemd.make | 7 +++
> >  2 files changed, 14 insertions(+)
> >
> > diff --git a/rules/host-systemd.in b/rules/host-systemd.in
> > index f80d9de10..828694f80 100644
> > --- a/rules/host-systemd.in
> > +++ b/rules/host-systemd.in
> > @@ -7,3 +7,10 @@ config HOST_SYSTEMD
> >   select HOST_GPERF
> >   select HOST_UTIL_LINUX_NG
> >   select HOST_LIBCAP
> > +
> > +config HOST_SYSTEMD_INSTALL_DEV
> > + bool
> > + default n
> > + help
> > +  Install host systemd development headers/libs
> > +
> > diff --git a/rules/host-systemd.make b/rules/host-systemd.make
> > index 42409d7b5..58b44a683 100644
> > --- a/rules/host-systemd.make
> > +++ b/rules/host-systemd.make
> > @@ -20,6 +20,7 @@ HOST_SYSTEMD_CONF_TOOL  := meson
> >  HOST_SYSTEMD_CONF_OPT:= \
> >   $(HOST_MESON_OPT) \
> >   -Dprefix=/usr \
> > + -Drootprefix=/ \
>
> This breaks hwdb: The path for the output file is hardcoded as
> "${destdir}${rootprefix}/lib/udev/hwdb.bin"
>
> This breaks hwdb for the host package?


> Hmmm, maybe we could add '/usr' to the destdir. Please try that. This is
> the '--root' argument the systemd-hwdb package.
> If it works then the systemd-hwdb package should generate a hwdb that is
> about 10MB in size.
>
> If it works, remove the prefix instead of adding the rootprefix.
>
>
I'm trying to work out how the systemd-hwdb package relates to the
host-systemd package...

-Jon
___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] [PATCH] host-systemd: Add option to install dev files

2021-06-25 Thread Michael Olbrich
On Tue, Jun 22, 2021 at 04:35:04PM +, j...@ringle.org wrote:
> From: Jon Ringle 
> 
> Doing a full install that include dev files is
> helpful if a project needs this support.
> 
> I created a host-sdbus-cpp project that depends
> on libsystemd. The -Drootprefix=/ was required
> to have cmake pkg-config work properly.
> 
> Signed-off-by: Jon Ringle 
> ---
>  rules/host-systemd.in   | 7 +++
>  rules/host-systemd.make | 7 +++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/rules/host-systemd.in b/rules/host-systemd.in
> index f80d9de10..828694f80 100644
> --- a/rules/host-systemd.in
> +++ b/rules/host-systemd.in
> @@ -7,3 +7,10 @@ config HOST_SYSTEMD
>   select HOST_GPERF
>   select HOST_UTIL_LINUX_NG
>   select HOST_LIBCAP
> +
> +config HOST_SYSTEMD_INSTALL_DEV
> + bool
> + default n
> + help
> +  Install host systemd development headers/libs
> +
> diff --git a/rules/host-systemd.make b/rules/host-systemd.make
> index 42409d7b5..58b44a683 100644
> --- a/rules/host-systemd.make
> +++ b/rules/host-systemd.make
> @@ -20,6 +20,7 @@ HOST_SYSTEMD_CONF_TOOL  := meson
>  HOST_SYSTEMD_CONF_OPT:= \
>   $(HOST_MESON_OPT) \
>   -Dprefix=/usr \
> + -Drootprefix=/ \

This breaks hwdb: The path for the output file is hardcoded as
"${destdir}${rootprefix}/lib/udev/hwdb.bin"

Hmmm, maybe we could add '/usr' to the destdir. Please try that. This is
the '--root' argument the systemd-hwdb package.
If it works then the systemd-hwdb package should generate a hwdb that is
about 10MB in size.

If it works, remove the prefix instead of adding the rootprefix.

Michael

>   -Dacl=false \
>   -Dadm-group=true \
>   -Danalyze=false \
> @@ -157,7 +158,9 @@ HOST_SYSTEMD_CONF_OPT := \
>   -Dzlib=false \
>   -Dzstd=false
>  
> +ifndef PTXCONF_HOST_SYSTEMD_INSTALL_DEV
>  HOST_SYSTEMD_MAKE_OPT := systemd-hwdb
> +endif
>  
>  # 
> 
>  # Install
> @@ -165,11 +168,15 @@ HOST_SYSTEMD_MAKE_OPT := systemd-hwdb
>  
>  $(STATEDIR)/host-systemd.install:
>   @$(call targetinfo)
> +ifdef PTXCONF_HOST_SYSTEMD_INSTALL_DEV
> + @$(call world/install, HOST_SYSTEMD)
> +else
>   @rm -rf $(HOST_SYSTEMD_PKGDIR)
>   @install -vD -m755 $(HOST_SYSTEMD_DIR)-build/systemd-hwdb \
>   $(HOST_SYSTEMD_PKGDIR)/bin/systemd-hwdb
>   @install -vD -m755 
> $(HOST_SYSTEMD_DIR)-build/src/shared/libsystemd-shared-$(SYSTEMD_VERSION_MAJOR).so
>  \
>   
> $(HOST_SYSTEMD_PKGDIR)/lib/libsystemd-shared-$(SYSTEMD_VERSION_MAJOR).so
>   @$(call touch)
> +endif
>  
>  # vim: syntax=make
> -- 
> 2.25.1
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to 
> ptxdist-requ...@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- |

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