samba4: make host-buildtools private/add suffix
authorAndy Walsh <andy.walsh44+github@gmail.com>
Tue, 3 Dec 2019 15:06:07 +0000 (16:06 +0100)
committerAndy Walsh <andy.walsh44+github@gmail.com>
Tue, 3 Dec 2019 15:06:07 +0000 (16:06 +0100)
* fix openwrt/packages#10700
* add suffix to asn1_compile, compile_et to avoid krb5 conflicts
* bundle samba's com_err

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
net/samba4/Makefile
net/samba4/patches/012-add_host_tools_suffix.patch [new file with mode: 0644]

index b4e7690f6fe7e083fe9dec9a5ac521363d039dcb..7385223988a1d2aa0bc6e92237ed122dad9c9c0c 100644 (file)
@@ -56,7 +56,7 @@ endef
 define Package/samba4-libs
   $(call Package/samba4/Default)
   TITLE+= libs
-  DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libreadline +libcap \
+  DEPENDS:= +zlib +libtirpc +libpopt +libreadline +libcap \
        +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
        +SAMBA4_SERVER_VFS:attr \
        +SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
@@ -298,12 +298,12 @@ BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
 
 # lib bundling
 # NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
-CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,com_err
 HOST_CONFIGURE_ARGS += --builtin-libraries=replace --nonshared-binary=asn1_compile,compile_et
 #CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,!asn1_compile,!compile_et,!popt
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,com_err,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
 # BUG: --private-libraries, Does not work for System possible libs, will not get "samba4" suffix!
-CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace
+CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,com_err
 # CONFIGURE_ARGS += --disable-symbol-versions
 
 define Host/Compile
@@ -315,8 +315,9 @@ endef
 
 define Host/Install
        $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/compile_et $(STAGING_DIR_HOSTPKG)/bin/
+       # add host tools suffix, prevent conflicts with krb5
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/compile_et $(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
 endef
 
 define Build/Prepare
diff --git a/net/samba4/patches/012-add_host_tools_suffix.patch b/net/samba4/patches/012-add_host_tools_suffix.patch
new file mode 100644 (file)
index 0000000..383002f
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/source4/heimdal_build/wscript_configure  2019-12-03
++++ b/source4/heimdal_build/wscript_configure  2019-12-03
+@@ -199,7 +199,7 @@ def check_system_heimdal_lib(name, funct
+ def check_system_heimdal_binary(name):
+     if conf.LIB_MAY_BE_BUNDLED(name):
+         return False
+-    if not conf.find_program(name, var=name.upper()):
++    if not conf.find_program(name + '_samba', var=name.upper()):
+         return False
+     conf.define('USING_SYSTEM_%s' % name.upper(), 1)
+     return True