Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation
@ 2017-07-23 13:36 Bernd Kuhls
  2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bernd Kuhls @ 2017-07-23 13:36 UTC (permalink / raw)
  To: buildroot

This patch allows building samba4 with uClibc again after rpc support
was removed from uClibc. Building with musl is still broken:

The first error

../nsswitch/wins.c: In function ?_nss_wins_gethostbyname_r?:
../nsswitch/wins.c:272:15: error: ?NETDB_INTERNAL? undeclared (first use in this function)
   *h_errnop = NETDB_INTERNAL;
               ^~~~~~~~~~~~~~
../nsswitch/wins.c:272:15: note: each undeclared identifier is reported only once for each function it appears in
../nsswitch/wins.c:349:14: error: ?NETDB_SUCCESS? undeclared (first use in this function)
  *h_errnop = NETDB_SUCCESS;
              ^~~~~~~~~~~~~

could be solved by applying
https://git.alpinelinux.org/cgit/aports/tree/main/samba/netdb-defines.patch

but then the build fails at

../ctdb/tests/src/test_mutex_raw.c: In function ?main?:
../ctdb/tests/src/test_mutex_raw.c:170:28: error: ?pthread_mutex_t {aka struct <anonymous>}? has no member named ?__data?
    printf("pid=%u\n", mutex->__data.__owner);
                            ^~

Therefore we disable musl support until a fix can be found.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
Tested with test-pkg using this defconfig

BR2_PACKAGE_SAMBA4=y
BR2_PACKAGE_SAMBA4_AD_DC=y

                armv5-ctng-linux-gnueabi [ 1/47]: OK
              armv7-ctng-linux-gnueabihf [ 2/47]: OK
                        br-aarch64-glibc [ 3/47]: OK
                           br-arcle-hs38 [ 4/47]: OK
                            br-arm-basic [ 5/47]: SKIPPED
                  br-arm-cortex-a9-glibc [ 6/47]: OK
                   br-arm-cortex-a9-musl [ 7/47]: SKIPPED
                   br-arm-cortex-m4-full [ 8/47]: SKIPPED
                             br-arm-full [ 9/47]: OK
                    br-arm-full-nothread [10/47]: SKIPPED
                      br-arm-full-static [11/47]: SKIPPED
                            br-bfin-full [12/47]: SKIPPED
                   br-i386-pentium4-full [13/47]: OK
                br-i386-pentium-mmx-musl [14/47]: SKIPPED
                       br-m68k-5208-full [15/47]: SKIPPED
                      br-m68k-68040-full [16/47]: SKIPPED
                    br-microblazeel-full [17/47]: SKIPPED
                 br-mips32r6-el-hf-glibc [18/47]: OK
                      br-mips64-n64-full [19/47]: OK
                 br-mips64r6-el-hf-glibc [20/47]: OK
                      br-mipsel-o32-full [21/47]: OK
                          br-nios2-glibc [22/47]: SKIPPED
                      br-openrisc-uclibc [23/47]: SKIPPED
               br-powerpc-603e-basic-cpp [24/47]: SKIPPED
             br-powerpc64le-power8-glibc [25/47]: OK
               br-powerpc64-power7-glibc [26/47]: OK
                  br-powerpc-e500mc-full [27/47]: OK
                             br-sh4-full [28/47]: OK
                        br-sparc64-glibc [29/47]: OK
                         br-sparc-uclibc [30/47]: SKIPPED
                    br-x86-64-core2-full [31/47]: OK
                          br-x86-64-musl [32/47]: SKIPPED
                          br-xtensa-full [33/47]: OK
                     i686-ctng-linux-gnu [34/47]: OK
                          linaro-aarch64 [35/47]: OK
                              linaro-arm [36/47]: OK
             mips64el-ctng_n32-linux-gnu [37/47]: OK
             mips64el-ctng_n64-linux-gnu [38/47]: OK
        powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK
                     sourcery-arm-armv4t [40/47]: OK
                            sourcery-arm [41/47]: OK
                     sourcery-arm-thumb2 [42/47]: OK
                         sourcery-mips64 [43/47]: OK
                           sourcery-mips [44/47]: OK
                          sourcery-nios2 [45/47]: SKIPPED
                         sourcery-x86-64 [46/47]: OK
           x86_64-ctng_locales-linux-gnu [47/47]: OK
47 builds, 16 skipped, 0 build failed, 0 legal-info failed

 package/samba4/Config.in | 7 ++++---
 package/samba4/samba4.mk | 7 +++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/package/samba4/Config.in b/package/samba4/Config.in
index ba48b8ab3..298fdc660 100644
--- a/package/samba4/Config.in
+++ b/package/samba4/Config.in
@@ -1,6 +1,6 @@
-comment "samba4 needs a toolchain w/ RPC, wchar, dynamic library, NPTL"
+comment "samba4 needs a uClibc or glibc toolchain w/ wchar, dynamic library, NPTL"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_NATIVE_RPC \
+	depends on !BR2_USE_WCHAR || BR2_TOOLCHAIN_USES_MUSL \
 		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_USE_MMU
 
@@ -8,12 +8,13 @@ config BR2_PACKAGE_SAMBA4
 	bool "samba4"
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR # python
-	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # python -> libffi
 	depends on !BR2_STATIC_LIBS # python, gnutls
 	depends on !BR2_nios2 # binary too large, relocations don't fit
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_E2FSPROGS
+	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_ZLIB
diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk
index 72fbd7448..ccdd13e2f 100644
--- a/package/samba4/samba4.mk
+++ b/package/samba4/samba4.mk
@@ -18,6 +18,13 @@ SAMBA4_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_READLINE),readline) \
 	$(TARGET_NLS_DEPENDENCIES)
 
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+SAMBA4_CONF_ENV += \
+	CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \
+	LDFLAGS="$(TARGET_LDFLAGS) `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
+SAMBA4_DEPENDENCIES += libtirpc
+endif
+
 ifeq ($(BR2_PACKAGE_ACL),y)
 SAMBA4_CONF_OPTS += --with-acl-support
 SAMBA4_DEPENDENCIES += acl
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus
  2017-07-23 13:36 [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Bernd Kuhls
@ 2017-07-23 13:36 ` Bernd Kuhls
  2017-08-02 15:32   ` Thomas Petazzoni
  2017-09-04 21:33   ` Peter Korsgaard
  2017-07-23 13:36 ` [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6 Bernd Kuhls
  2017-08-01 22:25 ` [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Thomas Petazzoni
  2 siblings, 2 replies; 7+ messages in thread
From: Bernd Kuhls @ 2017-07-23 13:36 UTC (permalink / raw)
  To: buildroot

samba4 picks up dbus as dependency if it was built before:

Checking for dbus                : yes
Checking for header dbus/dbus.h  : yes
Checking for library dbus-1      : yes

There is no configure option to control dbus support so we just make
sure dbus is built before samba4 to have reproducible builds.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/samba4/samba4.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk
index ccdd13e2f..ab3f67dc9 100644
--- a/package/samba4/samba4.mk
+++ b/package/samba4/samba4.mk
@@ -40,6 +40,10 @@ else
 SAMBA4_CONF_OPTS += --disable-cups
 endif
 
+ifeq ($(BR2_PACKAGE_DBUS),y)
+SAMBA4_DEPENDENCIES += dbus
+endif
+
 ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
 SAMBA4_CONF_OPTS += --enable-avahi
 SAMBA4_DEPENDENCIES += avahi
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6
  2017-07-23 13:36 [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Bernd Kuhls
  2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
@ 2017-07-23 13:36 ` Bernd Kuhls
  2017-08-02 15:32   ` Thomas Petazzoni
  2017-08-01 22:25 ` [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Thomas Petazzoni
  2 siblings, 1 reply; 7+ messages in thread
From: Bernd Kuhls @ 2017-07-23 13:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/samba4/samba4.hash | 2 +-
 package/samba4/samba4.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/samba4/samba4.hash b/package/samba4/samba4.hash
index 0783b37d0..a2a0cd3a3 100644
--- a/package/samba4/samba4.hash
+++ b/package/samba4/samba4.hash
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 f4c17123e3cc852a5ecc7e38884b00deab57632b9519aebc243e2a94b9b5ace4  samba-4.5.12.tar.gz
+sha256 fc31c809f7d85ae30f2b7dcddcb8404201b626047458cb5f2b743d4f6f3f1a8e  samba-4.6.6.tar.gz
diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk
index ab3f67dc9..9b9f5495c 100644
--- a/package/samba4/samba4.mk
+++ b/package/samba4/samba4.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SAMBA4_VERSION = 4.5.12
+SAMBA4_VERSION = 4.6.6
 SAMBA4_SITE = https://download.samba.org/pub/samba/stable
 SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
 SAMBA4_INSTALL_STAGING = YES
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation
  2017-07-23 13:36 [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Bernd Kuhls
  2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
  2017-07-23 13:36 ` [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6 Bernd Kuhls
@ 2017-08-01 22:25 ` Thomas Petazzoni
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-01 22:25 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Jul 2017 15:36:18 +0200, Bernd Kuhls wrote:
> This patch allows building samba4 with uClibc again after rpc support
> was removed from uClibc. Building with musl is still broken:
> 
> The first error
> 
> ../nsswitch/wins.c: In function ?_nss_wins_gethostbyname_r?:
> ../nsswitch/wins.c:272:15: error: ?NETDB_INTERNAL? undeclared (first use in this function)
>    *h_errnop = NETDB_INTERNAL;
>                ^~~~~~~~~~~~~~
> ../nsswitch/wins.c:272:15: note: each undeclared identifier is reported only once for each function it appears in
> ../nsswitch/wins.c:349:14: error: ?NETDB_SUCCESS? undeclared (first use in this function)
>   *h_errnop = NETDB_SUCCESS;
>               ^~~~~~~~~~~~~
> 
> could be solved by applying
> https://git.alpinelinux.org/cgit/aports/tree/main/samba/netdb-defines.patch
> 
> but then the build fails at
> 
> ../ctdb/tests/src/test_mutex_raw.c: In function ?main?:
> ../ctdb/tests/src/test_mutex_raw.c:170:28: error: ?pthread_mutex_t {aka struct <anonymous>}? has no member named ?__data?
>     printf("pid=%u\n", mutex->__data.__owner);
>                             ^~
> 
> Therefore we disable musl support until a fix can be found.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> Tested with test-pkg using this defconfig

Applied to master, with the following changes:

    [Thomas:
     - instead of setting SAMBA4_CONF_ENV within the libtirpc condition,
       introduce SAMBA4_CFLAGS and SAMBA4_LDFLAGS variables and use them
     - add missing dependency on host-pkgconf, needed because we call
       pkg-config to get the flags from libtirpc]

Thanks!

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus
  2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
@ 2017-08-02 15:32   ` Thomas Petazzoni
  2017-09-04 21:33   ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-02 15:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Jul 2017 15:36:19 +0200, Bernd Kuhls wrote:
> samba4 picks up dbus as dependency if it was built before:
> 
> Checking for dbus                : yes
> Checking for header dbus/dbus.h  : yes
> Checking for library dbus-1      : yes
> 
> There is no configure option to control dbus support so we just make
> sure dbus is built before samba4 to have reproducible builds.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/samba4/samba4.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to master, thanks.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6
  2017-07-23 13:36 ` [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6 Bernd Kuhls
@ 2017-08-02 15:32   ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-02 15:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Jul 2017 15:36:20 +0200, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/samba4/samba4.hash | 2 +-
>  package/samba4/samba4.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus
  2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
  2017-08-02 15:32   ` Thomas Petazzoni
@ 2017-09-04 21:33   ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2017-09-04 21:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

 > samba4 picks up dbus as dependency if it was built before:
 > Checking for dbus                : yes
 > Checking for header dbus/dbus.h  : yes
 > Checking for library dbus-1      : yes

 > There is no configure option to control dbus support so we just make
 > sure dbus is built before samba4 to have reproducible builds.

 > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-04 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-23 13:36 [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Bernd Kuhls
2017-07-23 13:36 ` [Buildroot] [PATCH 2/3] package/samba4: add optional dependency to dbus Bernd Kuhls
2017-08-02 15:32   ` Thomas Petazzoni
2017-09-04 21:33   ` Peter Korsgaard
2017-07-23 13:36 ` [Buildroot] [PATCH 3/3] package/samba4: bump version to 4.6.6 Bernd Kuhls
2017-08-02 15:32   ` Thomas Petazzoni
2017-08-01 22:25 ` [Buildroot] [PATCH 1/3] package/samba4: allow to use libtirpc instead of internal C implementation Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox