Skip to contentSkip to conversation

package/audit: not available for musl

PATCH New Yann E. MORIN 3 participants 3 messages Aug 13, 2015 – Aug 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/audit: not available for musl

audit uses strndupa() which is missing from musl.

Even though the implementation of strndupa is not too complex, we won't go as far as duplicating it in audit, and we just disable audit for the musl C library.

Fixes;
    http://autobuild.buildroot.org/results/e22/e22a70f9ff14bc52f642a6135da44c14e41b6cbb/
    http://autobuild.buildroot.org/results/233/2333c9b3d8f81b15602263b918d422e440f09d60/
    ...
Cc Clayton Shotwell <[email protected]>
Cc Matthew Weber <[email protected]>
Cc Ryan Barnett <[email protected]>

---
Note: musl does have strdupa() so maybe strndupa is just a few commits away. Need to revisit later?

---
 package/audit/0001-Missed-cross-compile-fixes.patch | 0
 package/audit/Config.in                             | 6 ++++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 package/audit/0001-Missed-cross-compile-fixes.patch
package/audit/0001-Missed-cross-compile-fixes.patch +0 -0
old mode 100755
new mode 100644
package/audit/Config.in +4 -2
index 8ac1b4f..717c364 100644
@@ -9,6 +9,7 @@ config BR2_PACKAGE_AUDIT
 	depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	help
 	  The audit package contains the user space utilities for
 	  storing and searching the audit records generated by
@@ -18,6 +19,7 @@ config BR2_PACKAGE_AUDIT
 
 	  http://people.redhat.com/sgrubb/audit/
 
-comment "audit needs a toolchain w/ threads, dynamic library"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+comment "audit needs a uClibc or (e)glibc toolchain w/ threads, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
+		|| BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/audit: not available for musl

Dear Yann E. MORIN,

Quoted 16 lines · Yann E. MORIN

audit uses strndupa() which is missing from musl.

Even though the implementation of strndupa is not too complex, we won't go as far as duplicating it in audit, and we just disable audit for the musl C library.

Fixes;
    http://autobuild.buildroot.org/results/e22/e22a70f9ff14bc52f642a6135da44c14e41b6cbb/
    http://autobuild.buildroot.org/results/233/2333c9b3d8f81b15602263b918d422e440f09d60/
    ...
Cc Clayton Shotwell <[email protected]>
Cc Matthew Weber <[email protected]>
Cc Ryan Barnett <[email protected]>
Quoted 8 lines

---
Note: musl does have strdupa() so maybe strndupa is just a few commits away. Need to revisit later?

---
 package/audit/0001-Missed-cross-compile-fixes.patch | 0
 package/audit/Config.in                             | 6 ++++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 package/audit/0001-Missed-cross-compile-fixes.patch

Applied, thanks.

Thomas

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

PATCH 1/1 package/audit: not available for musl

In reply to Yann E. MORIN
Quoted 34 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

audit uses strndupa() which is missing from musl.
Even though the implementation of strndupa is not too complex, we won't go as far as duplicating it in audit, and we just disable audit for the musl C library.

Fixes;
    http://autobuild.buildroot.org/results/e22/e22a70f9ff14bc52f642a6135da44c14e41b6cbb/
    http://autobuild.buildroot.org/results/233/2333c9b3d8f81b15602263b918d422e440f09d60/
    ...
Cc Clayton Shotwell <[email protected]>
Cc Matthew Weber <[email protected]>
Cc Ryan Barnett <[email protected]>

---
Note: musl does have strdupa() so maybe strndupa is just a few commits away. Need to revisit later?

---
 package/audit/0001-Missed-cross-compile-fixes.patch | 0
 package/audit/Config.in                             | 6 ++++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 package/audit/0001-Missed-cross-compile-fixes.patch
package/audit/0001-Missed-cross-compile-fixes.patch +0 -0
old mode 100755
new mode 100644
package/audit/Config.in +0 -0
index 8ac1b4f..717c364 100644

package/audit/Config.in config BR2_PACKAGE_AUDIT · line 12

Quoted 4 lines
package/audit/Config.in +1 -0
@@ -9,6 +9,7 @@ config BR2_PACKAGE_AUDIT
 	depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL

Minor nit: It would have been good to add a comment like

# no strndupa()

So it is clear why we don't allow it without looking at the git history.

Signature · 1 line
Bye, Peter Korsgaard