Skip to contentSkip to conversation

libgudev: New package

PATCH New Nathaniel Roach 3 participants 8 messages Aug 24, 2015 – Aug 25, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 libgudev: New package

As libgudev recently was split from the main systemd/udev source,
this library is now required to build certain packages.

This library is only relevant to systemd, as the code it contains
is still contained in eudev.

Add the package and tweak systemd's Config.in message accordingly.

---
Changes v2 -> v3
(Changes as suggested by Yann E. MORIN)
- Separate libgudev and network-manager portions into discrete patches, and a new patch for libmbim

Changes v1 -> v2
(Changes as suggested by Peter Korsgaard)
- Added the toolchain dependencies
- Dropped NM references in package
- Added _LICENSE_FILEs
- Conditionally depend on libgudev in NM if using systemd

---
 package/Config.in            |  1 +
 package/libgudev/Config.in   | 19 +++++++++++++++++++
 package/libgudev/libgudev.mk | 17 +++++++++++++++++
 package/systemd/Config.in    |  1 -
 4 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 package/libgudev/Config.in
 create mode 100644 package/libgudev/libgudev.mk
package/Config.in +1 -0
index 47d14d7..6494322 100644
@@ -852,6 +852,7 @@ menu "Hardware handling"
 	source "package/libfreefare/Config.in"
 	source "package/libftdi/Config.in"
 	source "package/libftdi1/Config.in"
+	source "package/libgudev/Config.in"
 	source "package/libhid/Config.in"
 	source "package/libiio/Config.in"
 	source "package/libinput/Config.in"
package/libgudev/Config.in new file +19 -0
new file mode 100644
index 0000000..8cdd9f6
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBGUDEV
+	bool "libgudev"
+	depends on BR2_INIT_SYSTEMD
+	depends on BR2_USE_WCHAR # gettext
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  This library provides GObject bindings for libudev.
+	  It was originally part of udev-extras, then udev, then systemd.
+	  It's now a project on its own.
+	  Required for building some programs that use udev, when using
+	  systemd.
+
+	  https://wiki.gnome.org/Projects/libgudev
+
+comment "libgudev needs a toolchain w/ wchar, threads, and systemd"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INIT_SYSTEMD
package/libgudev/libgudev.mk new file +17 -0
new file mode 100644
index 0000000..fa15b56
@@ -0,0 +1,17 @@
+################################################################################
+#
+# libgudev
+#
+################################################################################
+
+LIBGUDEV_VERSION = 230
+LIBGUDEV_SOURCE = libgudev-$(LIBGUDEV_VERSION).tar.xz
+LIBGUDEV_SITE = http://ftp.gnome.org/pub/GNOME/sources/libgudev/$(LIBGUDEV_VERSION)
+LIBGUDEV_INSTALL_STAGING = YES
+
+LIBGUDEV_DEPENDENCIES = host-pkgconf udev libglib2
+
+LIBGUDEV_LICENSE = GPLv2+
+LIBGUDEV_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
package/systemd/Config.in +0 -1
index 510badd..f7fc3bb 100644
@@ -55,7 +55,6 @@ config BR2_PACKAGE_SYSTEMD
 
 	  The selection of other packages will enable some features:
 
-	  - libglib2 package will add support for gudev.
 	  - acl package will add support for multi-seat.
 
 	  http://freedesktop.org/wiki/Software/systemd
Signature · 1 line
2.5.0
#1 lore raw

PATCH 2/3 package/network-manager: Now needs libgudev under systemd

NetworkManager uses code (originally from udev) that has since
been split from the main systemd codebase into libgudev.

Tweak the package files for NetworkManager to require libgudev
when building with systemd.

---
 package/network-manager/Config.in          | 1 +
 package/network-manager/network-manager.mk | 4 ++++
 2 files changed, 5 insertions(+)
package/network-manager/Config.in +1 -0
index bcf8f90..5a0e636 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBGUDEV if BR2_INIT_SYSTEMD
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	select BR2_PACKAGE_WIRELESS_TOOLS
package/network-manager/network-manager.mk +4 -0
index 25ad2a2..03c7d63 100644
@@ -63,6 +63,10 @@ ifeq ($(BR2_PACKAGE_DHCPCD),y)
 NETWORK_MANAGER_CONF_OPTS += --with-dhcpcd=/sbin/dhcpcd
 endif
 
+ifeq ($(BR2_INIT_SYSTEMD),y)
+NETWORK_MANAGER_DEPENDENCIES += libgudev
+endif
+
 # uClibc by default doesn't have backtrace support, so don't use it
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 NETWORK_MANAGER_CONF_OPTS += --disable-crashtrace
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/3 package/network-manager: Now needs libgudev under systemd

Dear Nathaniel Roach,

Quoted 11 lines · Nathaniel Roach

NetworkManager uses code (originally from udev) that has since
been split from the main systemd codebase into libgudev.

Tweak the package files for NetworkManager to require libgudev
when building with systemd.

---
 package/network-manager/Config.in          | 1 +
 package/network-manager/network-manager.mk | 4 ++++
 2 files changed, 5 insertions(+)

I've removed the tabs in the second lines of each paragraph in the commit log, and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 3/3 package/libmbim: Now needs libgudev under systemd

In reply to Nathaniel Roach

libmbim uses code (originally from udev) that has since
been split from the main systemd codebase into libgudev.

Tweak the package files for libmbim to require libgudev
when building with systemd.

---
 package/libmbim/Config.in  | 1 +
 package/libmbim/libmbim.mk | 4 ++++
 2 files changed, 5 insertions(+)
package/libmbim/Config.in +1 -0
index bd34dd4..e79d51f 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBMBIM
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_LIBGUDEV if BR2_INIT_SYSTEMD
 	select BR2_PACKAGE_LIBGLIB2
 	help
 	  libmbim is a glib-based library for talking to WWAN modems and
package/libmbim/libmbim.mk +4 -0
index 8d49f28..cfba08e 100644
@@ -13,6 +13,10 @@ LIBMBIM_INSTALL_STAGING = YES
 
 LIBMBIM_DEPENDENCIES = libglib2 udev
 
+ifeq ($(BR2_INIT_SYSTEMD),y)
+LIBMBIM_DEPENDENCIES += libgudev
+endif
+
 # we don't want -Werror
 LIBMBIM_CONF_OPTS = --enable-more-warnings=no
 
Signature · 1 line
2.5.0
#4 lore raw

PATCH 3/3 package/libmbim: Now needs libgudev under systemd

Quoted 9 lines · Nathaniel Roach

libmbim uses code (originally from udev) that has since
been split from the main systemd codebase into libgudev.

Tweak the package files for libmbim to require libgudev
when building with systemd.

Quoted 39 lines
---
 package/libmbim/Config.in  | 1 +
 package/libmbim/libmbim.mk | 4 ++++
 2 files changed, 5 insertions(+)
package/libmbim/Config.in +1 -0
index bd34dd4..e79d51f 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBMBIM
        depends on BR2_USE_WCHAR # libglib2
        depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
        depends on BR2_PACKAGE_HAS_UDEV
+       select BR2_PACKAGE_LIBGUDEV if BR2_INIT_SYSTEMD
        select BR2_PACKAGE_LIBGLIB2
        help
          libmbim is a glib-based library for talking to WWAN modems and
package/libmbim/libmbim.mk +4 -1
index 8d49f28..cfba08e 100644
@@ -13,6 +13,10 @@ LIBMBIM_INSTALL_STAGING = YES
 
 LIBMBIM_DEPENDENCIES = libglib2 udev
 
+ifeq ($(BR2_INIT_SYSTEMD),y)
+LIBMBIM_DEPENDENCIES += libgudev
+endif
+
 # we don't want -Werror
 LIBMBIM_CONF_OPTS = --enable-more-warnings=no
 
--

2.5.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#5 lore raw

PATCH 3/3 package/libmbim: Now needs libgudev under systemd

In reply to Nathaniel Roach

Dear Nathaniel Roach,

Quoted 5 lines · Nathaniel Roach

libmbim uses code (originally from udev) that has since
been split from the main systemd codebase into libgudev.

Quoted 8 lines

Tweak the package files for libmbim to require libgudev
when building with systemd.

---
 package/libmbim/Config.in  | 1 +
 package/libmbim/libmbim.mk | 4 ++++
 2 files changed, 5 insertions(+)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v3 1/3 libgudev: New package

In reply to Nathaniel Roach
Quoted 14 lines · Nathaniel Roach

As libgudev recently was split from the main systemd/udev source,
this library is now required to build certain packages.

This library is only relevant to systemd, as the code it contains
is still contained in eudev.

Add the package and tweak systemd's Config.in message accordingly.

---
Changes v2 -> v3
(Changes as suggested by Yann E. MORIN)
- Separate libgudev and network-manager portions into discrete patches, and a new patch for libmbim

Quoted 8 lines

Changes v1 -> v2
(Changes as suggested by Peter Korsgaard)
- Added the toolchain dependencies
- Dropped NM references in package
- Added _LICENSE_FILEs
- Conditionally depend on libgudev in NM if using systemd

Quoted 88 lines
---
 package/Config.in            |  1 +
 package/libgudev/Config.in   | 19 +++++++++++++++++++
 package/libgudev/libgudev.mk | 17 +++++++++++++++++
 package/systemd/Config.in    |  1 -
 4 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 package/libgudev/Config.in
 create mode 100644 package/libgudev/libgudev.mk
package/Config.in +1 -0
index 47d14d7..6494322 100644
@@ -852,6 +852,7 @@ menu "Hardware handling"
        source "package/libfreefare/Config.in"
        source "package/libftdi/Config.in"
        source "package/libftdi1/Config.in"
+       source "package/libgudev/Config.in"
        source "package/libhid/Config.in"
        source "package/libiio/Config.in"
        source "package/libinput/Config.in"
package/libgudev/Config.in new file +19 -0
new file mode 100644
index 0000000..8cdd9f6
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBGUDEV
+       bool "libgudev"
+       depends on BR2_INIT_SYSTEMD
+       depends on BR2_USE_WCHAR # gettext
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_USE_MMU # fork()
+       select BR2_PACKAGE_LIBGLIB2
+       help
+         This library provides GObject bindings for libudev.
+         It was originally part of udev-extras, then udev, then systemd.
+         It's now a project on its own.
+         Required for building some programs that use udev, when using
+         systemd.
+
+         https://wiki.gnome.org/Projects/libgudev
+
+comment "libgudev needs a toolchain w/ wchar, threads, and systemd"
+       depends on BR2_USE_MMU
+       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INIT_SYSTEMD
package/libgudev/libgudev.mk new file +17 -0
new file mode 100644
index 0000000..fa15b56
@@ -0,0 +1,17 @@
+################################################################################
+#
+# libgudev
+#
+################################################################################
+
+LIBGUDEV_VERSION = 230
+LIBGUDEV_SOURCE = libgudev-$(LIBGUDEV_VERSION).tar.xz
+LIBGUDEV_SITE = http://ftp.gnome.org/pub/GNOME/sources/libgudev/$(LIBGUDEV_VERSION)
+LIBGUDEV_INSTALL_STAGING = YES
+
+LIBGUDEV_DEPENDENCIES = host-pkgconf udev libglib2
+
+LIBGUDEV_LICENSE = GPLv2+
+LIBGUDEV_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
package/systemd/Config.in +0 -2
index 510badd..f7fc3bb 100644
@@ -55,7 +55,6 @@ config BR2_PACKAGE_SYSTEMD
 
          The selection of other packages will enable some features:
 
-         - libglib2 package will add support for gudev.
          - acl package will add support for multi-seat.
 
          http://freedesktop.org/wiki/Software/systemd
--

2.5.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#7 lore raw

PATCH v3 1/3 libgudev: New package

In reply to Nathaniel Roach

Nathaniel,

Quoted 6 lines · Nathaniel Roach

As libgudev recently was split from the main systemd/udev source,
this library is now required to build certain packages.

This library is only relevant to systemd, as the code it contains
is still contained in eudev.

Quoted 7 lines

Add the package and tweak systemd's Config.in message accordingly.

---
Changes v2 -> v3
(Changes as suggested by Yann E. MORIN)
- Separate libgudev and network-manager portions into discrete patches, and a new patch for libmbim

Applied after doing a few changes:

[Thomas:
- don't show the dependency comment when systemd is not available, since libgudev is anyway useless when you're not using systemd.
- fix the license, it's LGPLv2.1+ and not GPLv2+
- remove useless empty lines in the .mk file.]

In addition to this, two comments:

* Your SoB line should be before the first "---". Otherwise, it gets removed by git when applying the patch (anything after the first "---" gets ignored by git in terms of commit log)

* Don't indent the second line of paragraphs with a tab, we don't do this in general for Buildroot commit logs.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com