Skip to contentSkip to conversation

Add package for Gnome NetworkManager

PATCH New Daniel Mack 4 participants 12 messages Dec 2, 2011 – Jan 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---
 package/Config.in                          |    1 +
 package/network-manager/Config.in          |   22 +++++++++++++
 package/network-manager/S45network-manager |   46 ++++++++++++++++++++++++++++
 package/network-manager/network-manager.mk |   42 +++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/network-manager/Config.in
 create mode 100755 package/network-manager/S45network-manager
 create mode 100644 package/network-manager/network-manager.mk
package/Config.in +1 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif
 source "package/netplug/Config.in"
 source "package/netsnmp/Config.in"
 source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
 source "package/noip/Config.in"
 source "package/nfs-utils/Config.in"
 source "package/ngircd/Config.in"
package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+	bool "NetworkManager"
+	depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  NetworkManager is a set of co-operative tools that make networking
+	  simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+	  NetworkManager allows you to quickly move from one network to
+	  another: once a network has been configured and joined once, it
+	  can be detected and re-joined automatically the next time it's
+	  available.
+
+	  http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+	depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +46 -0

46 lines not on this page · raw message

package/network-manager/network-manager.mk new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Quoted 9 lines · Daniel Mack

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

Also note that this patch depends on the libnm-3 series I posted the other day.

Daniel

Quoted 152 lines
---
 package/Config.in                          |    1 +
 package/network-manager/Config.in          |   22 +++++++++++++
 package/network-manager/S45network-manager |   46 ++++++++++++++++++++++++++++
 package/network-manager/network-manager.mk |   42 +++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/network-manager/Config.in
 create mode 100755 package/network-manager/S45network-manager
 create mode 100644 package/network-manager/network-manager.mk
package/Config.in +1 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif
 source "package/netplug/Config.in"
 source "package/netsnmp/Config.in"
 source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
 source "package/noip/Config.in"
 source "package/nfs-utils/Config.in"
 source "package/ngircd/Config.in"
package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+	bool "NetworkManager"
+	depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  NetworkManager is a set of co-operative tools that make networking
+	  simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+	  NetworkManager allows you to quickly move from one network to
+	  another: once a network has been configured and joined once, it
+	  can be detected and re-joined automatically the next time it's
+	  available.
+
+	  http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+	depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +46 -0
new file mode 100755
index 0000000..112aa66
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PID=`pidof -o %PPID NetworkManager`
+case "$1" in
+	start)
+		echo -n "Starting NetworkManager ... "
+		[ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
+		if [ -z "$PID" ]; then
+			$NETWORKMANAGER_BIN
+		fi
+		if [ ! -z "$PID" -o $? -gt 0 ]; then
+			echo "failed!"
+		else
+			echo "done."
+		fi
+		;;
+	stop)
+		echo -n "Stopping NetworkManager ... "
+			[ ! -z "$PID" ] && kill $PID &> /dev/null
+		if [ $? -gt 0 ]; then
+			echo "failed!"
+		else
+			echo "done."
+		fi
+		;;
+	restart)
+		$0 stop
+		sleep 1
+		$0 start
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|sleep|wake}"
+		;;
+esac
+exit 0
+
+
+
package/network-manager/network-manager.mk new file +42 -0
new file mode 100644
index 0000000..9fe6759
@@ -0,0 +1,42 @@
+#############################################################
+#
+# NetworkManager
+#
+#############################################################
+NETWORK_MANAGER_VERSION = 0.9.2.0
+NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.bz2
+NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/
+NETWORK_MANAGER_INSTALL_STAGING = YES
+NETWORK_MANAGER_DEPENDENCIES = host-pkg-config udev dbus-glib libnl wireless_tools gnutls util-linux
+
+NETWORK_MANAGER_CONF_OPT = --program-prefix="" \
+		--mandir=$(STAGING_DIR)/usr/man/ \
+		--with-dbus-user=dbus \
+		--disable-tests \
+		--disable-more-warnings \
+		--without-docs \
+		--disable-gtk-doc \
+		--disable-asserts \
+		--enable-abstract-sockets \
+		--disable-selinux \
+		--disable-xml-docs \
+		--disable-doxygen-docs \
+		--disable-static \
+		--enable-dnotify \
+		--localstatedir=/var \
+		--with-crypto=gnutls \
+		--with-distro=arch \
+		--disable-ppp \
+		--with-iptables=/usr/sbin/iptables
+
+# The target was built for the archlinux distribution, so we need
+# to move around things after installation
+define NETWORK_MANAGER_INSTALL_INITSCRIPT
+	$(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager
+	rm -f $(TARGET_DIR)/etc/rc.d/networkmanager
+	test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""
+endef
+
+NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_INSTALL_INITSCRIPT
+
+$(eval $(call AUTOTARGETS,package,network-manager))
#2 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

In reply to Daniel Mack
Quoted 80 lines · Daniel Mack

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---

?package/Config.in ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?package/network-manager/Config.in ? ? ? ? ?| ? 22 +++++++++++++
?package/network-manager/S45network-manager | ? 46 ++++++++++++++++++++++++++++
?package/network-manager/network-manager.mk | ? 42 +++++++++++++++++++++++++

?4 files changed, 111 insertions(+), 0 deletions(-) ?create mode 100644 package/network-manager/Config.in ?create mode 100755 package/network-manager/S45network-manager ?create mode 100644 package/network-manager/network-manager.mk

package/Config.in +0 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif

?source "package/netplug/Config.in"
?source "package/netsnmp/Config.in"
?source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
?source "package/noip/Config.in"
?source "package/nfs-utils/Config.in"
?source "package/ngircd/Config.in"

package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+ ? ? ? bool "NetworkManager"
+ ? ? ? depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+ ? ? ? select BR2_PACKAGE_DBUS_GLIB
+ ? ? ? select BR2_PACKAGE_LIBNL
+ ? ? ? select BR2_PACKAGE_GNUTLS
+ ? ? ? select BR2_PACKAGE_LIBNL
+ ? ? ? select BR2_PACKAGE_UTIL_LINUX
+ ? ? ? select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ ? ? ? help
+ ? ? ? ? NetworkManager is a set of co-operative tools that make networking
+ ? ? ? ? simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+ ? ? ? ? NetworkManager allows you to quickly move from one network to
+ ? ? ? ? another: once a network has been configured and joined once, it
+ ? ? ? ? can be detected and re-joined automatically the next time it's
+ ? ? ? ? available.
+
+ ? ? ? ? http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+ ? ? ? depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +13 -0
new file mode 100755
index 0000000..112aa66
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PID=`pidof -o %PPID NetworkManager`
+case "$1" in
+ ? ? ? start)

package/network-manager/S45network-manager line 23

Quoted 10 lines
package/network-manager/S45network-manager new file +10 -0
+ ? ? ? ? ? ? ? echo -n "Starting NetworkManager ... "
+ ? ? ? ? ? ? ? [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
+ ? ? ? ? ? ? ? if [ -z "$PID" ]; then
+ ? ? ? ? ? ? ? ? ? ? ? $NETWORKMANAGER_BIN
+ ? ? ? ? ? ? ? fi
+ ? ? ? ? ? ? ? if [ ! -z "$PID" -o $? -gt 0 ]; then
+ ? ? ? ? ? ? ? ? ? ? ? echo "failed!"
+ ? ? ? ? ? ? ? else
+ ? ? ? ? ? ? ? ? ? ? ? echo "done."
+ ? ? ? ? ? ? ? fi

Wouldn't it be more general if you test for non-equality instead of for greater-than? You are now assuming that faulty return codes are always positive, which may not be true on all platforms. Although this code will probably work fine in all cases where buildroot is used, in my opinion -ne 0 would be better.

package/network-manager/S45network-manager line 28

Quoted 5 lines
package/network-manager/S45network-manager new file +5 -0
+ ? ? ? ? ? ? ? ;;
+ ? ? ? stop)
+ ? ? ? ? ? ? ? echo -n "Stopping NetworkManager ... "
+ ? ? ? ? ? ? ? ? ? ? ? [ ! -z "$PID" ] && kill $PID &> /dev/null
+ ? ? ? ? ? ? ? if [ $? -gt 0 ]; then

Same here.

Quoted 51 lines
package/network-manager/S45network-manager new file +18 -0
+ ? ? ? ? ? ? ? ? ? ? ? echo "failed!"
+ ? ? ? ? ? ? ? else
+ ? ? ? ? ? ? ? ? ? ? ? echo "done."
+ ? ? ? ? ? ? ? fi
+ ? ? ? ? ? ? ? ;;
+ ? ? ? restart)
+ ? ? ? ? ? ? ? $0 stop
+ ? ? ? ? ? ? ? sleep 1
+ ? ? ? ? ? ? ? $0 start
+ ? ? ? ? ? ? ? ;;
+ ? ? ? *)
+ ? ? ? ? ? ? ? echo "usage: $0 {start|stop|restart|sleep|wake}"
+ ? ? ? ? ? ? ? ;;
+esac
+exit 0
+
+
+
package/network-manager/network-manager.mk new file +27 -0
new file mode 100644
index 0000000..9fe6759
@@ -0,0 +1,42 @@
+#############################################################
+#
+# NetworkManager
+#
+#############################################################
+NETWORK_MANAGER_VERSION = 0.9.2.0
+NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.bz2
+NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/
+NETWORK_MANAGER_INSTALL_STAGING = YES
+NETWORK_MANAGER_DEPENDENCIES = host-pkg-config udev dbus-glib libnl wireless_tools gnutls util-linux
+
+NETWORK_MANAGER_CONF_OPT = --program-prefix="" \
+ ? ? ? ? ? ? ? --mandir=$(STAGING_DIR)/usr/man/ \
+ ? ? ? ? ? ? ? --with-dbus-user=dbus \
+ ? ? ? ? ? ? ? --disable-tests \
+ ? ? ? ? ? ? ? --disable-more-warnings \
+ ? ? ? ? ? ? ? --without-docs \
+ ? ? ? ? ? ? ? --disable-gtk-doc \
+ ? ? ? ? ? ? ? --disable-asserts \
+ ? ? ? ? ? ? ? --enable-abstract-sockets \
+ ? ? ? ? ? ? ? --disable-selinux \
+ ? ? ? ? ? ? ? --disable-xml-docs \
+ ? ? ? ? ? ? ? --disable-doxygen-docs \
+ ? ? ? ? ? ? ? --disable-static \
+ ? ? ? ? ? ? ? --enable-dnotify \
+ ? ? ? ? ? ? ? --localstatedir=/var \
+ ? ? ? ? ? ? ? --with-crypto=gnutls \

package/network-manager/network-manager.mk line 37

Quoted 10 lines
package/network-manager/network-manager.mk new file +10 -0
+ ? ? ? ? ? ? ? --with-distro=arch \
+ ? ? ? ? ? ? ? --disable-ppp \
+ ? ? ? ? ? ? ? --with-iptables=/usr/sbin/iptables
+
+# The target was built for the archlinux distribution, so we need
+# to move around things after installation
+define NETWORK_MANAGER_INSTALL_INITSCRIPT
+ ? ? ? $(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager
+ ? ? ? rm -f $(TARGET_DIR)/etc/rc.d/networkmanager
+ ? ? ? test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""

Why not simply attempt:
rmdir $(TARGET_DIR)/etc/rc.d 2>/dev/null

If the directory is empty, it will be removed.
If not empty, rmdir will not do anything.

On my rmdir, there is even an option: --ignore-fail-on-non-empty If that is generic, you could do:
rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/rc.d

package/network-manager/network-manager.mk line 42

Quoted 5 lines
package/network-manager/network-manager.mk new file +5 -0
+endef
+
+NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_INSTALL_INITSCRIPT
+
+$(eval $(call AUTOTARGETS,package,network-manager))

Since 2011.11, the extra arguments package,network-manager are no longer needed and should be removed, thus:
$(eval $(call AUTOTARGETS))

Best regards,
Thomas

#3 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Quoted 89 lines · Thomas De Schampheleire
Quoted 88 lines · Daniel Mack

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---
 package/Config.in                          |    1 +
 package/network-manager/Config.in          |   22 +++++++++++++
 package/network-manager/S45network-manager |   46 ++++++++++++++++++++++++++++
 package/network-manager/network-manager.mk |   42 +++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/network-manager/Config.in
 create mode 100755 package/network-manager/S45network-manager
 create mode 100644 package/network-manager/network-manager.mk
package/Config.in +1 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif
 source "package/netplug/Config.in"
 source "package/netsnmp/Config.in"
 source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
 source "package/noip/Config.in"
 source "package/nfs-utils/Config.in"
 source "package/ngircd/Config.in"
package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+       bool "NetworkManager"
+       depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+       select BR2_PACKAGE_DBUS_GLIB
+       select BR2_PACKAGE_LIBNL
+       select BR2_PACKAGE_GNUTLS
+       select BR2_PACKAGE_LIBNL
+       select BR2_PACKAGE_UTIL_LINUX
+       select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+       help
+         NetworkManager is a set of co-operative tools that make networking
+         simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+         NetworkManager allows you to quickly move from one network to
+         another: once a network has been configured and joined once, it
+         can be detected and re-joined automatically the next time it's
+         available.
+
+         http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+       depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +21 -0
new file mode 100755
index 0000000..112aa66
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PID=`pidof -o %PPID NetworkManager`
+case "$1" in
+       start)
+               echo -n "Starting NetworkManager ... "
+               [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
+               if [ -z "$PID" ]; then
+                       $NETWORKMANAGER_BIN
+               fi
+               if [ ! -z "$PID" -o $? -gt 0 ]; then
+                       echo "failed!"
+               else
Quoted 8 lines

package/network-manager/S45network-manager line 23

Quoted 2 lines
package/network-manager/S45network-manager new file +2 -0
+                       echo "done."
+               fi

Wouldn't it be more general if you test for non-equality instead of for greater-than? You are now assuming that faulty return codes are always positive, which may not be true on all platforms. Although this code will probably work fine in all cases where buildroot is used, in my opinion -ne 0 would be better.

I can change this, yes. This part of the script was actually taken from the version originally provided by the upstream package, but anyway :)

Quoted 64 lines

package/network-manager/S45network-manager line 28

Quoted 5 lines
package/network-manager/S45network-manager new file +5 -0
+               ;;
+       stop)
+               echo -n "Stopping NetworkManager ... "
+                       [ ! -z "$PID" ] && kill $PID &> /dev/null
+               if [ $? -gt 0 ]; then

Same here.

Quoted 56 lines
package/network-manager/S45network-manager new file +18 -0
+                       echo "failed!"
+               else
+                       echo "done."
+               fi
+               ;;
+       restart)
+               $0 stop
+               sleep 1
+               $0 start
+               ;;
+       *)
+               echo "usage: $0 {start|stop|restart|sleep|wake}"
+               ;;
+esac
+exit 0
+
+
+
package/network-manager/network-manager.mk new file +32 -0
new file mode 100644
index 0000000..9fe6759
@@ -0,0 +1,42 @@
+#############################################################
+#
+# NetworkManager
+#
+#############################################################
+NETWORK_MANAGER_VERSION = 0.9.2.0
+NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.bz2
+NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/
+NETWORK_MANAGER_INSTALL_STAGING = YES
+NETWORK_MANAGER_DEPENDENCIES = host-pkg-config udev dbus-glib libnl wireless_tools gnutls util-linux
+
+NETWORK_MANAGER_CONF_OPT = --program-prefix="" \
+               --mandir=$(STAGING_DIR)/usr/man/ \
+               --with-dbus-user=dbus \
+               --disable-tests \
+               --disable-more-warnings \
+               --without-docs \
+               --disable-gtk-doc \
+               --disable-asserts \
+               --enable-abstract-sockets \
+               --disable-selinux \
+               --disable-xml-docs \
+               --disable-doxygen-docs \
+               --disable-static \
+               --enable-dnotify \
+               --localstatedir=/var \
+               --with-crypto=gnutls \
+               --with-distro=arch \
+               --disable-ppp \
+               --with-iptables=/usr/sbin/iptables
+
+# The target was built for the archlinux distribution, so we need
Quoted 8 lines

package/network-manager/network-manager.mk line 37

Quoted 5 lines
package/network-manager/network-manager.mk new file +5 -0
+# to move around things after installation
+define NETWORK_MANAGER_INSTALL_INITSCRIPT
+       $(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager
+       rm -f $(TARGET_DIR)/etc/rc.d/networkmanager
+       test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""

Why not simply attempt:
rmdir $(TARGET_DIR)/etc/rc.d 2>/dev/null

Jup, much easier. I'll go for this solution.

Quoted 7 lines

If the directory is empty, it will be removed.
If not empty, rmdir will not do anything.

On my rmdir, there is even an option: --ignore-fail-on-non-empty If that is generic, you could do:
rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/rc.d

I'd rather not rely on such a feature on the build host.

Quoted 9 lines

package/network-manager/network-manager.mk line 42

Quoted 5 lines
package/network-manager/network-manager.mk new file +5 -0
+endef
+
+NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_INSTALL_INITSCRIPT
+
+$(eval $(call AUTOTARGETS,package,network-manager))

Since 2011.11, the extra arguments package,network-manager are no longer needed and should be removed, thus:
$(eval $(call AUTOTARGETS))

Ok. Thanks for the review. I'll repost.

Daniel

#4 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Quoted 99 lines · Daniel Mack
Quoted 89 lines · Thomas De Schampheleire
Quoted 88 lines · Daniel Mack

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---

?package/Config.in ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?package/network-manager/Config.in ? ? ? ? ?| ? 22 +++++++++++++
?package/network-manager/S45network-manager | ? 46 ++++++++++++++++++++++++++++
?package/network-manager/network-manager.mk | ? 42 +++++++++++++++++++++++++

?4 files changed, 111 insertions(+), 0 deletions(-) ?create mode 100644 package/network-manager/Config.in ?create mode 100755 package/network-manager/S45network-manager ?create mode 100644 package/network-manager/network-manager.mk

package/Config.in +0 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif

?source "package/netplug/Config.in"
?source "package/netsnmp/Config.in"
?source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
?source "package/noip/Config.in"
?source "package/nfs-utils/Config.in"
?source "package/ngircd/Config.in"

package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+ ? ? ? bool "NetworkManager"
+ ? ? ? depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+ ? ? ? select BR2_PACKAGE_DBUS_GLIB
+ ? ? ? select BR2_PACKAGE_LIBNL
+ ? ? ? select BR2_PACKAGE_GNUTLS
+ ? ? ? select BR2_PACKAGE_LIBNL
+ ? ? ? select BR2_PACKAGE_UTIL_LINUX
+ ? ? ? select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ ? ? ? help
+ ? ? ? ? NetworkManager is a set of co-operative tools that make networking
+ ? ? ? ? simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+ ? ? ? ? NetworkManager allows you to quickly move from one network to
+ ? ? ? ? another: once a network has been configured and joined once, it
+ ? ? ? ? can be detected and re-joined automatically the next time it's
+ ? ? ? ? available.
+
+ ? ? ? ? http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+ ? ? ? depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +21 -0
new file mode 100755
index 0000000..112aa66
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PID=`pidof -o %PPID NetworkManager`
+case "$1" in
+ ? ? ? start)
+ ? ? ? ? ? ? ? echo -n "Starting NetworkManager ... "
+ ? ? ? ? ? ? ? [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
+ ? ? ? ? ? ? ? if [ -z "$PID" ]; then
+ ? ? ? ? ? ? ? ? ? ? ? $NETWORKMANAGER_BIN
+ ? ? ? ? ? ? ? fi
+ ? ? ? ? ? ? ? if [ ! -z "$PID" -o $? -gt 0 ]; then
+ ? ? ? ? ? ? ? ? ? ? ? echo "failed!"
+ ? ? ? ? ? ? ? else
Quoted 8 lines

package/network-manager/S45network-manager line 23

Quoted 2 lines
package/network-manager/S45network-manager new file +2 -0
+ ? ? ? ? ? ? ? ? ? ? ? echo "done."
+ ? ? ? ? ? ? ? fi

Wouldn't it be more general if you test for non-equality instead of for greater-than? You are now assuming that faulty return codes are always positive, which may not be true on all platforms. Although this code will probably work fine in all cases where buildroot is used, in my opinion -ne 0 would be better.

Quoted 2 lines

I can change this, yes. This part of the script was actually taken from the version originally provided by the upstream package, but anyway :)

In that case, I'd leave it as-is.

Quoted 101 lines
Quoted 65 lines

package/network-manager/S45network-manager line 28

Quoted 6 lines
package/network-manager/S45network-manager new file +5 -0
+ ? ? ? ? ? ? ? ;;
+ ? ? ? stop)
+ ? ? ? ? ? ? ? echo -n "Stopping NetworkManager ... "
+ ? ? ? ? ? ? ? ? ? ? ? [ ! -z "$PID" ] && kill $PID &> /dev/null
+ ? ? ? ? ? ? ? if [ $? -gt 0 ]; then

Same here.

Quoted 56 lines
package/network-manager/S45network-manager new file +18 -0
+ ? ? ? ? ? ? ? ? ? ? ? echo "failed!"
+ ? ? ? ? ? ? ? else
+ ? ? ? ? ? ? ? ? ? ? ? echo "done."
+ ? ? ? ? ? ? ? fi
+ ? ? ? ? ? ? ? ;;
+ ? ? ? restart)
+ ? ? ? ? ? ? ? $0 stop
+ ? ? ? ? ? ? ? sleep 1
+ ? ? ? ? ? ? ? $0 start
+ ? ? ? ? ? ? ? ;;
+ ? ? ? *)
+ ? ? ? ? ? ? ? echo "usage: $0 {start|stop|restart|sleep|wake}"
+ ? ? ? ? ? ? ? ;;
+esac
+exit 0
+
+
+
package/network-manager/network-manager.mk new file +32 -0
new file mode 100644
index 0000000..9fe6759
@@ -0,0 +1,42 @@
+#############################################################
+#
+# NetworkManager
+#
+#############################################################
+NETWORK_MANAGER_VERSION = 0.9.2.0
+NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.bz2
+NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/
+NETWORK_MANAGER_INSTALL_STAGING = YES
+NETWORK_MANAGER_DEPENDENCIES = host-pkg-config udev dbus-glib libnl wireless_tools gnutls util-linux
+
+NETWORK_MANAGER_CONF_OPT = --program-prefix="" \
+ ? ? ? ? ? ? ? --mandir=$(STAGING_DIR)/usr/man/ \
+ ? ? ? ? ? ? ? --with-dbus-user=dbus \
+ ? ? ? ? ? ? ? --disable-tests \
+ ? ? ? ? ? ? ? --disable-more-warnings \
+ ? ? ? ? ? ? ? --without-docs \
+ ? ? ? ? ? ? ? --disable-gtk-doc \
+ ? ? ? ? ? ? ? --disable-asserts \
+ ? ? ? ? ? ? ? --enable-abstract-sockets \
+ ? ? ? ? ? ? ? --disable-selinux \
+ ? ? ? ? ? ? ? --disable-xml-docs \
+ ? ? ? ? ? ? ? --disable-doxygen-docs \
+ ? ? ? ? ? ? ? --disable-static \
+ ? ? ? ? ? ? ? --enable-dnotify \
+ ? ? ? ? ? ? ? --localstatedir=/var \
+ ? ? ? ? ? ? ? --with-crypto=gnutls \
+ ? ? ? ? ? ? ? --with-distro=arch \
+ ? ? ? ? ? ? ? --disable-ppp \
+ ? ? ? ? ? ? ? --with-iptables=/usr/sbin/iptables
+
+# The target was built for the archlinux distribution, so we need
Quoted 8 lines

package/network-manager/network-manager.mk line 37

Quoted 5 lines
package/network-manager/network-manager.mk new file +5 -0
+# to move around things after installation
+define NETWORK_MANAGER_INSTALL_INITSCRIPT
+ ? ? ? $(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager
+ ? ? ? rm -f $(TARGET_DIR)/etc/rc.d/networkmanager
+ ? ? ? test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""

Why not simply attempt:
rmdir $(TARGET_DIR)/etc/rc.d 2>/dev/null

Jup, much easier. I'll go for this solution.

Quoted 7 lines

If the directory is empty, it will be removed.
If not empty, rmdir will not do anything.

On my rmdir, there is even an option: --ignore-fail-on-non-empty If that is generic, you could do:
rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/rc.d

I'd rather not rely on such a feature on the build host.

Quoted 9 lines

package/network-manager/network-manager.mk line 42

Quoted 5 lines
package/network-manager/network-manager.mk new file +5 -0
+endef
+
+NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_INSTALL_INITSCRIPT
+
+$(eval $(call AUTOTARGETS,package,network-manager))

Since 2011.11, the extra arguments package,network-manager are no longer needed and should be removed, thus:
$(eval $(call AUTOTARGETS))

Ok. Thanks for the review. I'll repost.

Daniel

#5 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

In reply to Daniel Mack

Even though it's most commonly used on Desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---
 package/Config.in                          |    1 +
 package/network-manager/Config.in          |   22 +++++++++++++
 package/network-manager/S45network-manager |   46 ++++++++++++++++++++++++++++
 package/network-manager/network-manager.mk |   42 +++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/network-manager/Config.in
 create mode 100755 package/network-manager/S45network-manager
 create mode 100644 package/network-manager/network-manager.mk
package/Config.in +1 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif
 source "package/netplug/Config.in"
 source "package/netsnmp/Config.in"
 source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
 source "package/noip/Config.in"
 source "package/nfs-utils/Config.in"
 source "package/ngircd/Config.in"
package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+	bool "NetworkManager"
+	depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  NetworkManager is a set of co-operative tools that make networking
+	  simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+	  NetworkManager allows you to quickly move from one network to
+	  another: once a network has been configured and joined once, it
+	  can be detected and re-joined automatically the next time it's
+	  available.
+
+	  http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+	depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +46 -0

46 lines not on this page · raw message

package/network-manager/network-manager.mk new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.7.7.3
#6 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

In reply to Daniel Mack

Le Fri, 2 Dec 2011 12:14:39 +0100,
Daniel Mack <[email protected]> a ?crit :

package/network-manager/network-manager.mk line 37

Quoted 1 line
package/network-manager/network-manager.mk new file +1 -0
+	test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""

Isn't rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/rc.d a bit simpler ?

Quoted 1 line

+$(eval $(call AUTOTARGETS,package,network-manager))

Should just be

$(eval $(call AUTOTARGETS))

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Quoted 7 lines · Thomas Petazzoni

Le Fri, 2 Dec 2011 12:14:39 +0100,
Daniel Mack <[email protected]> a ?crit :

package/network-manager/network-manager.mk line 37

Quoted 1 line
package/network-manager/network-manager.mk new file +1 -0
+	test -z "`ls -A $(TARGET_DIR)/etc/rc.d`" && rmdir $(TARGET_DIR)/etc/rc.d || echo ""

Isn't rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/rc.d a bit simpler ?

:) See the other thread. I solved it with a rmdir || echo "" for now, not to rely on the host's mkdir to have that particular feature.

Quoted 5 lines
Quoted 1 line

+$(eval $(call AUTOTARGETS,package,network-manager))

Should just be

$(eval $(call AUTOTARGETS))

Fixed already in the 2nd version I sent.

Thanks,
Daniel

#8 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Le Fri, 02 Dec 2011 13:04:01 +0100,
Daniel Mack <[email protected]> a ?crit :

Quoted 2 lines

:) See the other thread. I solved it with a rmdir || echo "" for now, not to rely on the host's mkdir to have that particular feature.

It's already used in quite a few places in Buildroot:

$ git grep ignore-fail-on
package/hwdata/hwdata.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
package/libglib2/libglib2.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
package/libglib2/libglib2.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
package/logrotate/logrotate.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/logrotate.d
package/tinyhttpd/tinyhttpd.mk:	@rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

PATCH 1/1 Add package for Gnome NetworkManager

Quoted 7 lines · Thomas Petazzoni

Le Fri, 02 Dec 2011 13:04:01 +0100,
Daniel Mack <[email protected]> a ?crit :

Quoted 2 lines

:) See the other thread. I solved it with a rmdir || echo "" for now, not to rely on the host's mkdir to have that particular feature.

It's already used in quite a few places in Buildroot:

Ok, then let's do it the same way here.

Daniel

Quoted 11 lines
$ git grep ignore-fail-on
package/hwdata/hwdata.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
package/libglib2/libglib2.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
package/libglib2/libglib2.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
package/logrotate/logrotate.mk:	rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/logrotate.d
package/tinyhttpd/tinyhttpd.mk:	@rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www

Regards,

Thomas

#10 lore raw

PATCH v3 1/1 Add package for Gnome NetworkManager

Even though it's most commonly used on desktops, this piece of software also works well on embedded devices.

The package file only resolved mandatory dependencies. Things like iptables and dnsmasq are only required if 'shared' connections are used, and have hence not been made hard prerequisites.

There are probably too many i18n related files installed to the target. That might need some more tweaking.

---
 package/Config.in                          |    1 +
 package/network-manager/Config.in          |   22 +++++++++++++
 package/network-manager/S45network-manager |   46 ++++++++++++++++++++++++++++
 package/network-manager/network-manager.mk |   42 +++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/network-manager/Config.in
 create mode 100755 package/network-manager/S45network-manager
 create mode 100644 package/network-manager/network-manager.mk
package/Config.in +1 -0
index 4b5e5d8..a781870 100644
@@ -442,6 +442,7 @@ endif
 source "package/netplug/Config.in"
 source "package/netsnmp/Config.in"
 source "package/netstat-nat/Config.in"
+source "package/network-manager/Config.in"
 source "package/noip/Config.in"
 source "package/nfs-utils/Config.in"
 source "package/ngircd/Config.in"
package/network-manager/Config.in new file +22 -0
new file mode 100644
index 0000000..c08d417
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_NETWORK_MANAGER
+	bool "NetworkManager"
+	depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_UDEV_ALL_EXTRAS && BR2_PACKAGE_WIRELESS_TOOLS_LIB
+	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  NetworkManager is a set of co-operative tools that make networking
+	  simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth,
+	  NetworkManager allows you to quickly move from one network to
+	  another: once a network has been configured and joined once, it
+	  can be detected and re-joined automatically the next time it's
+	  available.
+
+	  http://projects.gnome.org/NetworkManager/
+
+comment "NetworkManager not available (need DBus, UDEV_ALL_EXTRAS and WIRELESS_TOOLS_LIB)"
+	depends on !BR2_PACKAGE_DBUS || !BR2_PACKAGE_UDEV_ALL_EXTRAS || !BR2_PACKAGE_WIRELESS_TOOLS_LIB
+
package/network-manager/S45network-manager new file +46 -0

46 lines not on this page · raw message

package/network-manager/network-manager.mk new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.7.7.3
#11 lore raw

PATCH v3 1/1 Add package for Gnome NetworkManager

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

"Daniel" == Daniel Mack <[email protected]> writes:

Daniel> Even though it's most commonly used on desktops, this piece of software Daniel> also works well on embedded devices.

Daniel> The package file only resolved mandatory dependencies. Things like Daniel> iptables and dnsmasq are only required if 'shared' connections are used, Daniel> and have hence not been made hard prerequisites.

Daniel> There are probably too many i18n related files installed to the target. Daniel> That might need some more tweaking.

Committed with some modifications, thanks.

uClibc doesn't have backtrace support by default, so we need to build with --disable-crashtrace, and a patch was needed (sent upstream) to ensure execinfo.h wasn't used in that config. It furthermore depends on IPv6 support in toolchain, and ended up using the host libgcrypt-config if available.

Signature · 1 line
Bye, Peter Korsgaard