Skip to contentSkip to conversation

systemd: Build legacy pc files when liblogging is

PATCH New Vicente Olivert Riera 3 participants 7 messages Apr 10, 2014 – Apr 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 systemd: Build legacy pc files when liblogging is

The liblogging package stills searching for "libsystemd-journal.pc" in the configure phase. The default behaviour from systemd-209 and later versions is to merge the libraries and ".pc" files into single libsystemd{.pc} files, so the old "libsystemd-*{.pc}" files don't exist anymore and liblogging fails at configure phase with a message like this one:

........................................................................
checking for LIBSYSTEMD_JOURNAL... no
configure: error: Package requirements (libsystemd-journal >= 197) were not met:

Package libsystemd-journal was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd-journal.pc' to the PKG_CONFIG_PATH environment variable
No package 'libsystemd-journal' found
........................................................................

Passing the "--enable-compat-libs" option to the systemd configure script will install the separate libraries and ".pc" files, so we add that option just in case the liblogging package had been selected. We can revert this change when liblogging upstream fixes it's configure script to check for "libsystemd.pc" instead of "libsystemd-journal.pc".

Fixes:
http://autobuild.buildroot.net/results/32c/32c636020600aa3f378d326c84fac82eb1fb2871/

---
 package/systemd/systemd.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
package/systemd/systemd.mk +6 -0
index ecedfce..3d7f42e 100644
@@ -46,6 +46,12 @@ SYSTEMD_CONF_OPT += \
 	--disable-dbus \
 	--without-python
 
+# liblogging still needs the old-style libsystemd-*.pc files
+# remove this block when liblogging upstream fix it
+ifeq ($(BR2_PACKAGE_LIBLOGGING),y)
+SYSTEMD_CONF_OPT += --enable-compat-libs
+endif
+
 ifeq ($(BR2_PACKAGE_ACL),y)
 SYSTEMD_CONF_OPT += --enable-acl
 SYSTEMD_DEPENDENCIES += acl
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 liblogging: Depend on systemd

This package depends on systemd because in the configure phase it searches for a file installed by systemd. We add systemd to it's dependencies to ensure that is built before this package.

Fixes:
http://autobuild.buildroot.net/results/32c/32c636020600aa3f378d326c84fac82eb1fb2871/

---
 package/liblogging/liblogging.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
package/liblogging/liblogging.mk +1 -0
index fa181fb..3608c40 100644
@@ -13,6 +13,7 @@ LIBLOGGING_CONF_OPT = --enable-cached-man-pages
 
 ifeq ($(BR2_INIT_SYSTEMD),y)
 LIBLOGGING_CONF_OPT += --enable-journal
+LIBLOGGING_DEPENDENCIES += systemd
 else
 LIBLOGGING_CONF_OPT += --disable-journal
 endif
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 liblogging: Depend on systemd

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vicente" == Vicente Olivert Riera <[email protected]> writes:

This package depends on systemd because in the configure phase it searches for a file installed by systemd. We add systemd to it's dependencies to ensure that is built before this package.

Fixes:

   http://autobuild.buildroot.net/results/32c/32c636020600aa3f378d326c84fac82eb1fb2871/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/2 systemd: Build legacy pc files when liblogging is

In reply to Vicente Olivert Riera

Hi!

On Thu, Apr 10, 2014 at 04:59:25PM +0100, Vicente Olivert Riera wrote:
[...]

Quoted 5 lines

Passing the "--enable-compat-libs" option to the systemd configure script will install the separate libraries and ".pc" files, so we add that option just in case the liblogging package had been selected. We can revert this change when liblogging upstream fixes it's configure script to check for "libsystemd.pc" instead of "libsystemd-journal.pc".

Maybe some other packages depend on these compatibility libraries, so instead of referring to BR2_PACKAGE_LIBLOGGING in systemd.mk, it would be best to add a generic configuration option to systemd, as done for berkeleydb with BR2_PACKAGE_BERKELEYDB_COMPAT185. It could be named BR2_PACKAGE_SYSTEMD_COMPAT.

Then, in package/liblogging/Config.in, we would have:

select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD

And this would be removed when liblogging is fixed upstream.

What do think of this?

Best regards,
ELB

#4 lore raw

PATCH 1/2 systemd: Build legacy pc files when liblogging is

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

Hi,

Quoted 10 lines

Maybe some other packages depend on these compatibility libraries, so instead of referring to BR2_PACKAGE_LIBLOGGING in systemd.mk, it would be best to add a generic configuration option to systemd, as done for berkeleydb with BR2_PACKAGE_BERKELEYDB_COMPAT185. It could be named BR2_PACKAGE_SYSTEMD_COMPAT.

Then, in package/liblogging/Config.in, we would have:

select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD

And this would be removed when liblogging is fixed upstream.

Yes, I agree.

Quoted 1 line

What do think of this?

Care to send an updated patch series doing that?

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/2 systemd: Build legacy pc files when liblogging is

Quoted 13 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

Hi,

Quoted 8 lines

Maybe some other packages depend on these compatibility libraries, so instead of referring to BR2_PACKAGE_LIBLOGGING in systemd.mk, it would be best to add a generic configuration option to systemd, as done for berkeleydb with BR2_PACKAGE_BERKELEYDB_COMPAT185. It could be named BR2_PACKAGE_SYSTEMD_COMPAT.

Then, in package/liblogging/Config.in, we would have:

select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD

Quoted 8 lines
Quoted 1 line

And this would be removed when liblogging is fixed upstream.

Yes, I agree.

Quoted 1 line

What do think of this?

Care to send an updated patch series doing that?

I didn't do that in purpose, because I thought it would be a good idea to catch those packages that still look for legacy systemd files, so we could tell upstream about that, as I did for liblogging.

If we put that option as a generic one, then we will never remove it from there and we will be using the not-default systemd config forever.

Signature · 1 line
Vincent
#6 lore raw

PATCH 1/2 systemd: Build legacy pc files when liblogging is

Quoted 20 lines · Vicente Olivert Riera
Quoted 19 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

Hi,

Quoted 10 lines

Maybe some other packages depend on these compatibility libraries, so instead of referring to BR2_PACKAGE_LIBLOGGING in systemd.mk, it would be best to add a generic configuration option to systemd, as done for berkeleydb with BR2_PACKAGE_BERKELEYDB_COMPAT185. It could be named BR2_PACKAGE_SYSTEMD_COMPAT.

Then, in package/liblogging/Config.in, we would have:

select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD

And this would be removed when liblogging is fixed upstream.

Yes, I agree.

Quoted 1 line

What do think of this?

Quoted 7 lines
Quoted 2 lines

Care to send an updated patch series doing that?

I didn't do that in purpose, because I thought it would be a good idea to catch those packages that still look for legacy systemd files, so we could tell upstream about that, as I did for liblogging.

I posted an implementation of BR2_PACKAGE_SYSTEMD_COMPAT. If other packages depend on the old libsystemd-*.so, I think this will allow us to catch them too, as they will not select this new symbol yet.

Quoted 4 lines

If we put that option as a generic one, then we will never remove it from there and we will be using the not-default systemd config forever.

As a reminder, I added a comment in the log about this.

Best regards,
ELB