Skip to contentSkip to conversation

Misc fixes

PATCH New Samuel Martin 4 participants 29 messages Jan 18, 2014 – Feb 11, 2014

lore
Share & tools
lore
#0 lore raw

cover Misc fixes

All,

Here is a series of random packages fixes.

Yours,
Samuel

Samuel Martin (10):
eigen: add C++ toolchain dependency
transmission: add url in Config.in
transmission: use <PKG>_INSTALL_INIT_SYSV infra instead of custom hook pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB
qt: add an option to install the test module
opencv: fix qt selection when highgui is enable
connman: add systemd unit file
support: mkusers: add warning when using mkpasswd from the host system
urg: make sdl support optional
hostapd: fix static build failure

 package/connman/connman.mk           | 10 ++++++++--
 package/connman/connman.service      | 12 ++++++++++++
 package/eigen/Config.in              |  4 ++++
 package/hostapd/hostapd.mk           |  1 +
 package/opencv/Config.in             |  4 +++-
 package/pkg-cmake.mk                 |  1 +
 package/qt/Config.in                 |  7 +++++++
 package/qt/qt.mk                     |  3 +++
 package/transmission/Config.in       |  2 ++
 package/transmission/transmission.mk |  3 +--
 package/urg/Config.in                |  5 ++---
 package/urg/urg.mk                   | 10 +++++++---
 support/scripts/mkusers              | 17 +++++++++++++++++
 13 files changed, 68 insertions(+), 11 deletions(-)
 create mode 100644 package/connman/connman.service

--
1.8.5.3

#1 lore raw

PATCH 1/10 eigen: add C++ toolchain dependency

As said in its help text, eigen heavily uses C++ features. So, explicit this dependency in the Config.in.

---
changes v1 -> v2:
- add Reviewed-by tag

---
 package/eigen/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/eigen/Config.in +4 -0
index c7fcde2..e94f9a3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_EIGEN
 	bool "eigen"
+	depends on BR2_INSTALL_LIBSTDCPP
 	help
 	  Eigen is a C++ template library for linear algebra: vectors,
 	  matrices, and related algorithms. It is versatile, fast, elegant
@@ -11,3 +12,6 @@ config BR2_PACKAGE_EIGEN
 	  template library defined in the headers.
 
 	  http://eigen.tuxfamily.org/
+
+comment "eigen needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
Signature · 1 line
1.8.5.3
#2 lore raw

PATCH 1/10 eigen: add C++ toolchain dependency

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 5 lines

As said in its help text, eigen heavily uses C++ features. So, explicit this dependency in the Config.in.

Regards,
Yann E. MORIN.

Quoted 32 lines

---
changes v1 -> v2:
- add Reviewed-by tag

---
 package/eigen/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/eigen/Config.in +4 -0
index c7fcde2..e94f9a3 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_EIGEN
 	bool "eigen"
+	depends on BR2_INSTALL_LIBSTDCPP
 	help
 	  Eigen is a C++ template library for linear algebra: vectors,
 	  matrices, and related algorithms. It is versatile, fast, elegant
@@ -11,3 +12,6 @@ config BR2_PACKAGE_EIGEN
 	  template library defined in the headers.
 
 	  http://eigen.tuxfamily.org/
+
+comment "eigen needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
Signature · 6 lines
1.8.5.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/10 eigen: add C++ toolchain dependency

In reply to Samuel Martin
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

As said in its help text, eigen heavily uses C++ features. So, explicit this dependency in the Config.in.

---
changes v1 -> v2:
- add Reviewed-by tag

Committed, thanks.

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

PATCH 2/10 transmission: add url in Config.in

In reply to Samuel Martin
---
 package/transmission/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/transmission/Config.in +2 -0
index 8d413c6..596b0ed 100644
@@ -10,6 +10,8 @@ config BR2_PACKAGE_TRANSMISSION
 	help
 	  Transmission is a cross-platform BitTorrent client.
 
+	  https://trac.transmissionbt.com/
+
 if BR2_PACKAGE_TRANSMISSION
 
 config BR2_PACKAGE_TRANSMISSION_UTP
Signature · 1 line
1.8.5.3
#5 lore raw

PATCH 2/10 transmission: add url in Config.in

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 10 lines
---
 package/transmission/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/transmission/Config.in +0 -0
index 8d413c6..596b0ed 100644

package/transmission/Config.in config BR2_PACKAGE_TRANSMISSION · line 13

Quoted 4 lines
package/transmission/Config.in +1 -0
@@ -10,6 +10,8 @@ config BR2_PACKAGE_TRANSMISSION
 	help
 	  Transmission is a cross-platform BitTorrent client.
 
+	  https://trac.transmissionbt.com/

This link yields an error page:

---8<---
Trac Error

TracError: No Trac environment found@/trac/Transmission [Errno 24] Too many open files: '/trac/Transmission/VERSION' ---8<---

OTOH, http://www.transmissionbt.com/ works as expected.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 2/10 transmission: add url in Config.in

In reply to Samuel Martin
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

---
 package/transmission/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/transmission/Config.in +0 -0
index 8d413c6..596b0ed 100644

package/transmission/Config.in config BR2_PACKAGE_TRANSMISSION · line 13

Quoted 4 lines
package/transmission/Config.in +1 -0
@@ -10,6 +10,8 @@ config BR2_PACKAGE_TRANSMISSION
 	help
 	  Transmission is a cross-platform BitTorrent client.
 
+	  https://trac.transmissionbt.com/

Committed with the URL changed to the homepage as pointed out by Yann, thanks.

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

PATCH 3/10 transmission: use <PKG>_INSTALL_INIT_SYSV infra instead of custom hook

In reply to Samuel Martin
---
 package/transmission/transmission.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/transmission/transmission.mk +1 -2
index 3ced558..e52c7be 100644
@@ -19,7 +19,7 @@ TRANSMISSION_CONF_OPT = \
 	--disable-libnotify \
 	--enable-lightweight
 
-define TRANSMISSION_INIT_SCRIPT_INSTALL
+define TRANSMISSION_INSTALL_INIT_SYSV
 	[ -f $(TARGET_DIR)/etc/init.d/S92transmission ] || \
 		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
 			$(TARGET_DIR)/etc/init.d/S92transmission
@@ -39,7 +39,6 @@ endif
 
 ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y)
 	TRANSMISSION_CONF_OPT += --enable-daemon
-	TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INIT_SCRIPT_INSTALL
 else
 	TRANSMISSION_CONF_OPT += --disable-daemon
 endif
Signature · 1 line
1.8.5.3
#8 lore raw

PATCH 3/10 transmission: use <PKG>_INSTALL_INIT_SYSV infra instead of custom hook

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 1 line

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 3/10 transmission: use <PKG>_INSTALL_INIT_SYSV infra instead of custom hook

In reply to Samuel Martin
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

---
 package/transmission/transmission.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/transmission/transmission.mk +1 -1
index 3ced558..e52c7be 100644
@@ -19,7 +19,7 @@ TRANSMISSION_CONF_OPT = \
 	--disable-libnotify \
 	--enable-lightweight
 
-define TRANSMISSION_INIT_SCRIPT_INSTALL
+define TRANSMISSION_INSTALL_INIT_SYSV
 	[ -f $(TARGET_DIR)/etc/init.d/S92transmission ] || \
 		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
 			$(TARGET_DIR)/etc/init.d/S92transmission

package/transmission/transmission.mk endif · line 42

Quoted 4 lines
package/transmission/transmission.mk +0 -1
@@ -39,7 +39,6 @@ endif
 
 ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y)
 	TRANSMISSION_CONF_OPT += --enable-daemon
-	TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INIT_SCRIPT_INSTALL

With this change we're installing the init script even if _DAEMON isn't enabled, so I've fixed it by moving TRANSMISSION_INSTALL_INIT_SYSV here.

Committed with that change, thanks.

Quoted 10 lines
package/transmission/transmission.mk +0 -0
 else
 	TRANSMISSION_CONF_OPT += --disable-daemon
 endif
Signature · 6 lines
1.8.5.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 4/10 pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB

In reply to Samuel Martin
---
 package/pkg-cmake.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-cmake.mk +1 -0
index 463cd63..aedd1fc 100644
@@ -64,6 +64,7 @@ define $(2)_CONFIGURE_CMDS
 	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
+		-DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \
 		$$($$(PKG)_CONF_OPT) \
 	)
 endef
Signature · 1 line
1.8.5.3
#11 lore raw

PATCH 4/10 pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB

Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

---
 package/pkg-cmake.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-cmake.mk +0 -0
index 463cd63..aedd1fc 100644

package/pkg-cmake.mk define $(2)_CONFIGURE_CMDS · line 67

Quoted 4 lines
package/pkg-cmake.mk +1 -0
@@ -64,6 +64,7 @@ define $(2)_CONFIGURE_CMDS
 	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
+		-DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \

I don't know much about cmake, but what exact problem does this fix and with how many packages did you test this?

Quoted 10 lines
package/pkg-cmake.mk +0 -0
 		$$($$(PKG)_CONF_OPT) \
 	)
 endef
Signature · 6 lines
1.8.5.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#12 lore raw

PATCH 4/10 pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB

In reply to Samuel Martin

Smauel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 10 lines
---
 package/pkg-cmake.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-cmake.mk +0 -0
index 463cd63..aedd1fc 100644

package/pkg-cmake.mk define $(2)_CONFIGURE_CMDS · line 70

Quoted 7 lines
package/pkg-cmake.mk +1 -0
@@ -64,6 +64,7 @@ define $(2)_CONFIGURE_CMDS
 	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
+		-DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \
 		$$($$(PKG)_CONF_OPT) \
 	)
 endef

This change breaks the rpi-userland build.

It is not obvious that the build is broken, since the rpi-userland package itself still seems to build fine, but packages that use it (eg. omxplayer that I'm integrating) now fail to build.

To reproduce (recipe untested, may need some tweaking, adjust accordingly):

git checkout master
git pull git at gitorious.org:buildroot/buildroot.git yem/omxplayer make menuconfig
-> arm, arm1176jzf-s, EABIhf, vfpv2
-> Target packages -> Audio and video applications -> omxplayer
make
# Coffee/tea/beer/...
# watch it fail
make clean
git revert 9fa7f2b # pkg-cmake.mk: build shared library when !BR2_PREFER_STATIC_LIB make
# Coffee/tea/beer/...
# It builds. Yeah!

Thanks to Maxime for finding the culprit!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH 5/10 qt: add an option to install the test module

In reply to Samuel Martin

When building Qt in a minimal configuration, a couple of Qt modules (QtNetwork, QtSql, QtTest and QtXml) are built in addition to QtCore, so they are installed in the sysroot but they are not copied into the target tree.

Among these modules that could be built but optionally installed, only QtTest had no option to allow being installed in the target fs.

Thus, programs linking against QtTest would successfully build, but would miserably fail at runtime due to this missing dependency.

So far, the only package triggering this issue is OpenCV (the highgui module built with Qt support).

A followup patch will add this missing dependency in OpenCV using this new option.

---
 package/qt/Config.in | 7 +++++++
 package/qt/qt.mk     | 3 +++
 2 files changed, 10 insertions(+)
package/qt/Config.in +7 -0
index 926d54c..bd6496c 100644
@@ -413,4 +413,11 @@ config BR2_PACKAGE_QT_DECLARATIVE
 	  Build the Qt Declarative Module for qml support
 	  if unsure, say n.
 
+config BR2_PACKAGE_QT_TEST
+	bool "Test Module"
+	default y
+	help
+	  Install the Test module.
+	  if unsure, say y
+
 endif # BR2_PACKAGE_QT
package/qt/qt.mk +3 -0
index 867b798..b63fa6f 100644
@@ -586,6 +586,9 @@ endif
 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y)
 QT_INSTALL_LIBS    += pvrQWSWSEGL
 endif
+ifeq ($(BR2_PACKAGE_QT_TEST),y)
+QT_INSTALL_LIBS    += QtTest
+endif
 
 QT_CONF_FILE=$(HOST_DIR)/usr/bin/qt.conf
 
Signature · 1 line
1.8.5.3
#14 lore raw

PATCH 5/10 qt: add an option to install the test module

ping (for next)?

Signature · 1 line
Samuel
#15 lore raw

PATCH 6/10 opencv: fix qt selection when highgui is enable

In reply to Samuel Martin

The OpenCV highgui module links against QtGui and QtTest. The latter is built by default but was never installed. Thanks to the previous patch on Qt, this can be rectified.

So, update the OpenCV Config.in with the missing Qt module selection.

---
 package/opencv/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/opencv/Config.in +3 -1
index 146011a..79c7b0b 100644
@@ -174,9 +174,11 @@ config BR2_PACKAGE_OPENCV_WITH_QT
 	depends on !BR2_avr32 # qt
 	select BR2_PACKAGE_QT
 	select BR2_PACKAGE_QT_STL
+	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT_TEST       if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	default y
 	help
-	  Use Qt with STL support
+	  Use Qt with QtTest module and STL support
 
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
Signature · 1 line
1.8.5.3
#16 lore raw

PATCH 6/10 opencv: fix qt selection when highgui is enable

ping (for next)?

Signature · 1 line
Samuel
#17 lore raw

PATCH 7/10 connman: add systemd unit file

In reply to Samuel Martin

This patch cleans up the init material installation:
- it uses the *_INSTALL_INIT_SYSV infra instead of the custom hook;
- it add and install the systemd unit file

---
 package/connman/connman.mk      | 10 ++++++++--
 package/connman/connman.service | 12 ++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 package/connman/connman.service
package/connman/connman.mk +8 -2
index 64c1f0e..9161cce 100644
@@ -24,11 +24,17 @@ CONNMAN_DEPENDENCIES += \
 	$(if $(BR2_PACKAGE_CONNMAN_NEARD),neard) \
 	$(if $(BR2_PACKAGE_CONNMAN_OFONO),ofono)
 
-define CONNMAN_INSTALL_INITSCRIPT
+define CONNMAN_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman
 endef
 
-CONNMAN_POST_INSTALL_TARGET_HOOKS = CONNMAN_INSTALL_INITSCRIPT
+define CONNMAN_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/connman/connman.service \
+		$(TARGET_DIR)/etc/systemd/system/connman.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -fs ../connman.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/connman.service
+endef
 
 ifeq ($(BR2_PACKAGE_CONNMAN_CLIENT),y)
 CONNMAN_CONF_OPT += --enable-client
package/connman/connman.service new file +12 -0
new file mode 100644
index 0000000..bb6b3c0
@@ -0,0 +1,12 @@
+[Unit]
+Description=Connection service
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=net.connman
+Restart=on-failure
+ExecStart=/usr/bin/connmand -n
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
1.8.5.3
#18 lore raw

PATCH 7/10 connman: add systemd unit file

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 3 lines

This patch cleans up the init material installation:
- it uses the *_INSTALL_INIT_SYSV infra instead of the custom hook;
- it add and install the systemd unit file

Please split this patch in two, then. One to switch to using the _INSTALL_INIT_SYSV infra, the second to actually add the systemd unit.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH 7/10 connman: add systemd unit file

In reply to Samuel Martin
Quoted 11 lines · Samuel Martin

This patch cleans up the init material installation:
- it uses the *_INSTALL_INIT_SYSV infra instead of the custom hook;
- it add and install the systemd unit file

---
 package/connman/connman.mk      | 10 ++++++++--
 package/connman/connman.service | 12 ++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 package/connman/connman.service

Why not enable the configure flag to install the systemd service from upstream?

Lucas De Marchi

package/connman/connman.mk CONNMAN_DEPENDENCIES += \ · line 28

Quoted 12 lines
package/connman/connman.mk +1 -1
index 64c1f0e..9161cce 100644
@@ -24,11 +24,17 @@ CONNMAN_DEPENDENCIES += \
        $(if $(BR2_PACKAGE_CONNMAN_NEARD),neard) \
        $(if $(BR2_PACKAGE_CONNMAN_OFONO),ofono)
 
-define CONNMAN_INSTALL_INITSCRIPT
+define CONNMAN_INSTALL_INIT_SYSV
        $(INSTALL) -m 0755 -D package/connman/S45connman

$(TARGET_DIR)/etc/init.d/S45connman

package/connman/connman.mk CONNMAN_DEPENDENCIES += \

Quoted 9 lines
package/connman/connman.mk +6 -1
 endef
 
-CONNMAN_POST_INSTALL_TARGET_HOOKS = CONNMAN_INSTALL_INITSCRIPT
+define CONNMAN_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/connman/connman.service \
+               $(TARGET_DIR)/etc/systemd/system/connman.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../connman.service \
+

$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/connman.service

Review

Quoted 5 lines
package/connman/connman.mk +1 -0
+endef
 
 ifeq ($(BR2_PACKAGE_CONNMAN_CLIENT),y)
 CONNMAN_CONF_OPT += --enable-client
(quoted diff) +0 -0

b/package/connman/connman.service

Quoted 20 lines

new file mode 100644
index 0000000..bb6b3c0

package/connman/connman.service new file +12 -1
@@ -0,0 +1,12 @@
+[Unit]
+Description=Connection service
+After=syslog.target
+
+[Service]
+Type=dbus
+BusName=net.connman
+Restart=on-failure
+ExecStart=/usr/bin/connmand -n
+
+[Install]
+WantedBy=multi-user.target
--

1.8.5.3

Quoted 4 lines

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140118/cf96d51f/attachment.html>

#20 lore raw

PATCH 8/10 support: mkusers: add warning when using mkpasswd from the host system

In reply to Samuel Martin

Because the mkpasswd provided by some distribution does not support all options used in the mkusers script, mkpasswd has been integrated as a package.

However, using a custom rootfs skeleton, the host-mkpasswd target is not automatically built, even if some packages add users.

In this case, to help the Buildroot users understanding what happen when the mkpasswd from the host system is used (so, might fail), mkusers now print a warning message explaining how to solve this.

Cc "Yann E. MORIN" <[email protected]>
---
 support/scripts/mkusers | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
support/scripts/mkusers +17 -0
index 3b287b8..dd011eb 100755
@@ -52,6 +52,22 @@ PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;'
                 )"
 
 #----------------------------------------------------------------------------
+check_mkpasswd() {
+    local mkpasswd_path="$(readlink -f $(which mkpasswd 2>/dev/null))"
+    local host_dir="$(readlink -f "${HOST_DIR}")"
+    case "${mkpasswd_path}" in
+        "${host_dir}"*) ;;
+        *)
+            error \
+                "WARNING: using mkpasswd from the host system: '%s'. %s%s%s\n" \
+                "${mkpasswd_path}"                                             \
+                "To avoid build failures because of unsupported options by "   \
+                "your host system's mkpasswd, make sure to use the one "       \
+                "Buildroot provides, by building the 'host-mkpasswd' target."
+            ;;
+    esac
+}
+#----------------------------------------------------------------------------
 get_uid() {
     local username="${1}"
 
@@ -264,6 +280,7 @@ add_user_to_group() {
 encode_password() {
     local passwd="${1}"
 
+    check_mkpasswd
     mkpasswd -m "${PASSWD_METHOD}" "${passwd}"
 }
 
Signature · 1 line
1.8.5.3
#21 lore raw

PATCH 8/10 support: mkusers: add warning when using mkpasswd from the host system

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Because the mkpasswd provided by some distribution does not support all options used in the mkusers script, mkpasswd has been integrated as a package.

Quoted 6 lines

However, using a custom rootfs skeleton, the host-mkpasswd target is not automatically built, even if some packages add users.

In this case, to help the Buildroot users understanding what happen when the mkpasswd from the host system is used (so, might fail), mkusers now print a warning message explaining how to solve this.

Why not just fix it to always use our mkpasswd? E.G. something like adding host-mkpasswd to dependencies in fs/common.mk if PACKAGE_USERS isn't empty?

Quoted 48 lines
Cc "Yann E. MORIN" <[email protected]>
---
 support/scripts/mkusers | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
support/scripts/mkusers +17 -0
index 3b287b8..dd011eb 100755
@@ -52,6 +52,22 @@ PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;'
                 )"
 
 #----------------------------------------------------------------------------
+check_mkpasswd() {
+    local mkpasswd_path="$(readlink -f $(which mkpasswd 2>/dev/null))"
+    local host_dir="$(readlink -f "${HOST_DIR}")"
+    case "${mkpasswd_path}" in
+        "${host_dir}"*) ;;
+        *)
+            error \
+                "WARNING: using mkpasswd from the host system: '%s'. %s%s%s\n" \
+                "${mkpasswd_path}"                                             \
+                "To avoid build failures because of unsupported options by "   \
+                "your host system's mkpasswd, make sure to use the one "       \
+                "Buildroot provides, by building the 'host-mkpasswd' target."
+            ;;
+    esac
+}
+#----------------------------------------------------------------------------
 get_uid() {
     local username="${1}"
 
@@ -264,6 +280,7 @@ add_user_to_group() {
 encode_password() {
     local passwd="${1}"
 
+    check_mkpasswd
     mkpasswd -m "${PASSWD_METHOD}" "${passwd}"
 }
 
Signature · 6 lines
1.8.5.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#22 lore raw

PATCH 8/10 support: mkusers: add warning when using mkpasswd from the host system

Peter, All,

On 2014-01-19 21:29 +0100, Peter Korsgaard spake thusly:

Quoted 9 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Because the mkpasswd provided by some distribution does not support all options used in the mkusers script, mkpasswd has been integrated as a package.

However, using a custom rootfs skeleton, the host-mkpasswd target is not automatically built, even if some packages add users.

Quoted 7 lines
Quoted 3 lines

In this case, to help the Buildroot users understanding what happen when the mkpasswd from the host system is used (so, might fail), mkusers now print a warning message explaining how to solve this.

Why not just fix it to always use our mkpasswd? E.G. something like adding host-mkpasswd to dependencies in fs/common.mk if PACKAGE_USERS isn't empty?

We've already spoke about it with Samuel on IRC, and I was rather leaning toward this: if the user uses a custom skeleton, lets just rely on him to provide a proper set of users.

As an afterthought, I think this would not be correct from us, and that we should indeed continue to generate those users.

So, agreed with Peter on that one. Sorry Samuel... :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#23 lore raw

PATCH 9/10 urg: make sdl support optional

In reply to Samuel Martin

Only enable SDL support if SDL and SDL_net are already enabled in the configuration.

---
 package/urg/Config.in |  5 ++---
 package/urg/urg.mk    | 10 +++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)
package/urg/Config.in +2 -3
index ded8204..232f4c4 100644
@@ -1,11 +1,10 @@
 config BR2_PACKAGE_URG
 	bool "urg"
 	depends on BR2_INSTALL_LIBSTDCPP
-	select BR2_PACKAGE_SDL
-	select BR2_PACKAGE_SDL_NET
 	help
 	  Library to control Hokuyo's URG series sensors.
-	  Requires SDL & SDL_net.
+
+	  If SDL and SDL_net are enable, SDL support will be automatically added.
 
 	  http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/
 
package/urg/urg.mk +7 -3
index e16393a..075a0b3 100644
@@ -12,10 +12,14 @@ URG_LICENSE_FILES = COPYING
 
 URG_INSTALL_STAGING = YES
 
-URG_DEPENDENCIES = sdl sdl_net
-
-URG_CONF_OPT = --with-sdl-prefix=$(STAGING_DIR)/usr \
+ifeq ($(BR2_PACKAGE_SDL)$(BR2_PACKAGE_SDL_NET),yy)
+URG_DEPENDENCIES += sdl sdl_net
+URG_CONF_OPT += --with-sdl-prefix=$(STAGING_DIR)/usr \
 		--with-sdl-exec-prefix=$(STAGING_DIR)/usr
+else
+URG_CONF_OPT = --without-sdl
+URG_CONF_ENV += ac_cv_path_SDL_CONFIG=""
+endif
 
 URG_CONFIG_SCRIPTS = c_urg-config urg-config
 
Signature · 1 line
1.8.5.3
#24 lore raw

PATCH 9/10 urg: make sdl support optional

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 4 lines

Only enable SDL support if SDL and SDL_net are already enabled in the configuration.

However, I have a comment, see below...

Quoted 10 lines
---
 package/urg/Config.in |  5 ++---
 package/urg/urg.mk    | 10 +++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)
package/urg/Config.in +0 -0
index ded8204..232f4c4 100644

package/urg/Config.in line 7

Quoted 10 lines
package/urg/Config.in +2 -3
@@ -1,11 +1,10 @@
 config BR2_PACKAGE_URG
 	bool "urg"
 	depends on BR2_INSTALL_LIBSTDCPP
-	select BR2_PACKAGE_SDL
-	select BR2_PACKAGE_SDL_NET
 	help
 	  Library to control Hokuyo's URG series sensors.
-	  Requires SDL & SDL_net.
+
+	  If SDL and SDL_net are enable, SDL support will be automatically added.

I don't think we systematically add such info in the help entries. I wonder if we should.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#25 lore raw

PATCH 9/10 urg: make sdl support optional

In reply to Samuel Martin
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Only enable SDL support if SDL and SDL_net are already enabled in the configuration.

---
 package/urg/Config.in |  5 ++---
 package/urg/urg.mk    | 10 +++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)
package/urg/Config.in +0 -0
index ded8204..232f4c4 100644

package/urg/Config.in line 7

Quoted 10 lines
package/urg/Config.in +2 -3
@@ -1,11 +1,10 @@
 config BR2_PACKAGE_URG
 	bool "urg"
 	depends on BR2_INSTALL_LIBSTDCPP
-	select BR2_PACKAGE_SDL
-	select BR2_PACKAGE_SDL_NET
 	help
 	  Library to control Hokuyo's URG series sensors.
-	  Requires SDL & SDL_net.
+
+	  If SDL and SDL_net are enable, SDL support will be automatically added.

Committed with this line dropped as pointed out by Yann, thanks.

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

PATCH 10/10 hostapd: fix static build failure

In reply to Samuel Martin

When building statically hostapd with openssl support, it is necessary to add -lz to LIBS to avoid undefined symbols when linking against libcrypto.a.

---
 package/hostapd/hostapd.mk | 1 +
 1 file changed, 1 insertion(+)
package/hostapd/hostapd.mk +1 -0
index 0fbd8bc..a978094 100644
@@ -32,6 +32,7 @@ endef
 # Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 	HOSTAPD_DEPENDENCIES += openssl
+	HOSTAPD_LIBS += $(if $(BR2_PREFER_STATIC_LIB),-lcrypto -lz)
 define HOSTAPD_TLS_CONFIG
 	$(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG)
 	$(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG)
Signature · 1 line
1.8.5.3
#27 lore raw

PATCH 10/10 hostapd: fix static build failure

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 5 lines

When building statically hostapd with openssl support, it is necessary to add -lz to LIBS to avoid undefined symbols when linking against libcrypto.a.

Shouldn't we fix openssl's libcrypto.pc instead? Adding -lz to Libs.private should do the trick, I guess, no?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#28 lore raw

PATCH 10/10 hostapd: fix static build failure

Quoted 12 lines · Yann E. MORIN

Samuel, All,

On 2014-01-18 20:23 +0100, Samuel Martin spake thusly:

Quoted 5 lines

When building statically hostapd with openssl support, it is necessary to add -lz to LIBS to avoid undefined symbols when linking against libcrypto.a.

Shouldn't we fix openssl's libcrypto.pc instead? Adding -lz to Libs.private should do the trick, I guess, no?

Well, both openssl and hostapd use custom build-system (ie. handwritten configure script and makefiles)... What a pity! :-(

- on the openssl side:
when building the static library, the libcrypto.pc is wrong because of what Yann points out (no -lz in Libs.private);

- on the hostapd side:
they just don't care/check about linking against the static library of libcrypto, they just only add -lcrypto to the ldflags.

So, the right fix would be fixing the *.pc generation in openssl and call pkg-config to set the cflags and ldflags in hostapd but add a host-pkgconf dependency.
OTOH, the quickest fix is this patch...

Any input about the preferred way to fix it is welcome.

Regards,

Signature · 1 line
Samuel