From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BCF071388BF for ; Mon, 11 Jan 2016 19:48:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DA9E21C010; Mon, 11 Jan 2016 19:48:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A27A921C010 for ; Mon, 11 Jan 2016 19:48:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 940CC340871 for ; Mon, 11 Jan 2016 19:48:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 17F29A15 for ; Mon, 11 Jan 2016 19:48:16 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1452541682.3f6e03dac9bd04d8e10b178dc47556ece13800b1.axs@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/files/, net-fs/samba/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-fs/samba/files/samba-4.2.7-disable-python-for-altabi.patch net-fs/samba/samba-4.2.7-r1.ebuild X-VCS-Directories: net-fs/samba/ net-fs/samba/files/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: 3f6e03dac9bd04d8e10b178dc47556ece13800b1 X-VCS-Branch: master Date: Mon, 11 Jan 2016 19:48:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2f83654d-f32d-4f8e-b6e4-92577e5b2b88 X-Archives-Hash: 98c40f0e0763d9c96735197f246bb76c commit: 3f6e03dac9bd04d8e10b178dc47556ece13800b1 Author: Ian Stakenvicius gentoo org> AuthorDate: Mon Jan 11 19:31:50 2016 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Mon Jan 11 19:48:02 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f6e03da net-fs/samba: convert to multilib This is the first attempt at a multilib-capable samba. The patch that allows building samba without a multilib-capable python is very large but only disables samba objects that need python; there are likely many other objects that can be disabled as well to make the alt-ABI build more efficient. Package-Manager: portage-2.2.26 .../samba-4.2.7-disable-python-for-altabi.patch | 823 +++++++++++++++++++++ net-fs/samba/samba-4.2.7-r1.ebuild | 229 ++++++ 2 files changed, 1052 insertions(+) diff --git a/net-fs/samba/files/samba-4.2.7-disable-python-for-altabi.patch b/net-fs/samba/files/samba-4.2.7-disable-python-for-altabi.patch new file mode 100644 index 0000000..c05aa17 --- /dev/null +++ b/net-fs/samba/files/samba-4.2.7-disable-python-for-altabi.patch @@ -0,0 +1,823 @@ +--- a/auth/credentials/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/auth/credentials/wscript_build 2016-01-08 19:50:12.510297249 -0500 +@@ -24,7 +24,8 @@ + source='credentials_ntlm.c', + deps='samba-credentials') + +-bld.SAMBA_PYTHON('pycredentials', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pycredentials', + source='pycredentials.c', + public_deps='samba-credentials cmdline-credentials pytalloc-util pyparam_util CREDENTIALS_KRB5 CREDENTIALS_SECRETS', + realname='samba/credentials.so' +--- a/lib/ldb/wscript 2015-12-10 04:20:09.000000000 -0500 ++++ b/lib/ldb/wscript 2016-01-08 19:50:12.450297496 -0500 +@@ -34,6 +34,8 @@ + conf.RECURSE('lib/tdb') + conf.RECURSE('lib/tevent') + ++ conf.env.disable_python = getattr(Options.options, 'disable_python', False) ++ + if conf.CHECK_FOR_THIRD_PARTY(): + conf.RECURSE('third_party/popt') + else: +@@ -47,7 +49,8 @@ + conf.find_program('xsltproc', var='XSLTPROC') + conf.check_tool('python') + conf.check_python_version((2,4,2)) +- conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) ++ if not conf.env.disable_python: ++ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) + + # where does the default LIBDIR end up? in conf.env somewhere? + # +@@ -60,7 +63,7 @@ + onlyif='talloc tdb tevent', + implied_deps='replace talloc tdb tevent'): + conf.define('USING_SYSTEM_LDB', 1) +- if conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=SYSTEM_VERSION, ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=SYSTEM_VERSION, + onlyif='talloc tdb tevent ldb', + implied_deps='replace talloc tdb tevent ldb'): + conf.define('USING_SYSTEM_PYLDB_UTIL', 1) +@@ -121,8 +124,9 @@ + bld.env.PACKAGE_VERSION = VERSION + bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + +- if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): +- bld.SAMBA_LIBRARY('pyldb-util', ++ if not bld.env.disable_python: ++ if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): ++ bld.SAMBA_LIBRARY('pyldb-util', + deps='ldb', + source='pyldb_util.c', + public_headers='pyldb.h', +--- a/lib/ntdb/wscript 2014-10-01 04:12:21.000000000 -0400 ++++ b/lib/ntdb/wscript 2016-01-08 19:50:12.460297455 -0500 +@@ -109,7 +109,7 @@ + if conf.CHECK_BUNDLED_SYSTEM('ntdb', minversion=VERSION, + implied_deps='replace'): + conf.define('USING_SYSTEM_NTDB', 1) +- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pyntdb', 'ntdb', minversion=VERSION): ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pyntdb', 'ntdb', minversion=VERSION): + conf.define('USING_SYSTEM_PYNTDB', 1) + + if not conf.env.disable_python: +--- a/lib/talloc/wscript 2015-04-15 15:27:33.000000000 -0400 ++++ b/lib/talloc/wscript 2016-01-08 19:50:12.470297414 -0500 +@@ -47,7 +47,7 @@ + if conf.CHECK_BUNDLED_SYSTEM_PKG('talloc', minversion=VERSION, + implied_deps='replace'): + conf.define('USING_SYSTEM_TALLOC', 1) +- if conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, + implied_deps='talloc replace'): + conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) + +--- a/lib/tdb/wscript 2015-07-14 06:54:24.000000000 -0400 ++++ b/lib/tdb/wscript 2016-01-08 19:50:12.480297372 -0500 +@@ -81,7 +81,7 @@ + implied_deps='replace'): + conf.define('USING_SYSTEM_TDB', 1) + conf.env.building_tdb = False +- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION): ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION): + conf.define('USING_SYSTEM_PYTDB', 1) + + conf.env.disable_python = getattr(Options.options, 'disable_python', False) +@@ -178,8 +178,9 @@ + bld.SAMBA_BINARY(b, s, 'replace tdb-test-helpers', + includes='include', install=False) + +- if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'): +- bld.SAMBA_PYTHON('pytdb', ++ if not bld.env.disable_python: ++ if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'): ++ bld.SAMBA_PYTHON('pytdb', + 'pytdb.c', + deps='tdb', + enabled=not bld.env.disable_python, +--- a/lib/tevent/wscript 2015-07-14 06:54:24.000000000 -0400 ++++ b/lib/tevent/wscript 2016-01-08 19:50:12.500297290 -0500 +@@ -34,11 +34,13 @@ + + conf.env.standalone_tevent = conf.IN_LAUNCH_DIR() + ++ conf.env.disable_python = getattr(Options.options, 'disable_python', False) ++ + if not conf.env.standalone_tevent: + if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION, + onlyif='talloc', implied_deps='replace talloc'): + conf.define('USING_SYSTEM_TEVENT', 1) +- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION): ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION): + conf.define('USING_SYSTEM_PYTEVENT', 1) + + if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'): +@@ -61,8 +63,6 @@ + if not conf.CONFIG_SET('USING_SYSTEM_TEVENT'): + conf.DEFINE('TEVENT_NUM_SIGNALS', tevent_num_signals) + +- conf.env.disable_python = getattr(Options.options, 'disable_python', False) +- + if not conf.env.disable_python: + # also disable if we don't have the python libs installed + conf.find_program('python', var='PYTHON') +--- a/libcli/nbt/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/libcli/nbt/wscript_build 2016-01-08 19:50:12.520297208 -0500 +@@ -24,7 +24,8 @@ + install=False + ) + +-bld.SAMBA_PYTHON('python_netbios', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('python_netbios', + source='pynbt.c', + public_deps='cli-nbt DYNCONFIG samba-hostconfig', + realname='samba/netbios.so' +--- a/libcli/security/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/libcli/security/wscript_build 2016-01-08 19:50:12.530297167 -0500 +@@ -7,7 +7,8 @@ + deps='talloc ndr NDR_SECURITY' + ) + +-bld.SAMBA_PYTHON('pysecurity', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pysecurity', + source='pysecurity.c', + deps='samba-security pytalloc-util', + realname='samba/security.so' +--- a/python/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/python/wscript_build 2016-01-08 19:50:12.800296055 -0500 +@@ -1,13 +1,14 @@ + #!/usr/bin/env python + +-bld.SAMBA_LIBRARY('samba_python', ++if not bld.env.disable_python: ++ bld.SAMBA_LIBRARY('samba_python', + source=[], + deps='LIBPYTHON pytalloc-util pyrpc_util', + grouping_library=True, + private_library=True, + pyembed=True) + +-bld.SAMBA_SUBSYSTEM('LIBPYTHON', ++ bld.SAMBA_SUBSYSTEM('LIBPYTHON', + source='modules.c', + public_deps='', + init_function_sentinel='{NULL,NULL}', +@@ -15,8 +16,7 @@ + pyext=True, + ) + +- +-bld.SAMBA_PYTHON('python_uuid', ++ bld.SAMBA_PYTHON('python_uuid', + source='uuidmodule.c', + deps='ndr', + realname='uuid.so', +@@ -24,7 +24,7 @@ + ) + + +-bld.SAMBA_PYTHON('python_glue', ++ bld.SAMBA_PYTHON('python_glue', + source='pyglue.c', + deps='pyparam_util samba-util netif pytalloc-util', + realname='samba/_glue.so' +@@ -32,8 +32,8 @@ + + + # install out various python scripts for use by make test +-bld.SAMBA_SCRIPT('samba_python_files', ++ bld.SAMBA_SCRIPT('samba_python_files', + pattern='samba/**/*.py', + installdir='python') + +-bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) ++ bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) +--- a/source3/param/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source3/param/wscript_build 2016-01-08 19:50:12.760296220 -0500 +@@ -14,7 +14,8 @@ + group='build_source', + rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=S3PROTO') + +-bld.SAMBA3_PYTHON('pys3param', ++if not bld.env.disable_python: ++ bld.SAMBA3_PYTHON('pys3param', + source='pyparam.c', + deps='param', + public_deps='samba-hostconfig pytalloc-util talloc', +--- a/source3/passdb/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source3/passdb/wscript_build 2016-01-08 19:50:12.770296179 -0500 +@@ -40,7 +40,8 @@ + internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED(), + enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED()) + +-bld.SAMBA3_PYTHON('pypassdb', ++if not bld.env.disable_python: ++ bld.SAMBA3_PYTHON('pypassdb', + source='py_passdb.c', + deps='pdb', + public_deps='samba-util tdb_compat talloc pyrpc_util', +--- a/source3/wscript_build 2015-07-14 06:54:24.000000000 -0400 ++++ b/source3/wscript_build 2016-01-08 19:50:12.780296137 -0500 +@@ -1452,13 +1452,14 @@ + param''', + install=False) + +-bld.SAMBA3_PYTHON('pysmbd', ++if not bld.env.disable_python: ++ bld.SAMBA3_PYTHON('pysmbd', + source='smbd/pysmbd.c', + deps='smbd_base pyrpc_util', + realname='samba/samba3/smbd.so' + ) + +-bld.SAMBA3_PYTHON('pylibsmb', ++ bld.SAMBA3_PYTHON('pylibsmb', + source='libsmb/pylibsmb.c', + deps='smbclient samba-credentials', + realname='samba/samba3/libsmb_samba_internal.so' +--- a/source4/auth/gensec/wscript_build 2014-10-01 05:06:01.000000000 -0400 ++++ b/source4/auth/gensec/wscript_build 2016-01-08 19:50:12.560297043 -0500 +@@ -34,7 +34,8 @@ + ) + + +-bld.SAMBA_PYTHON('pygensec', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pygensec', + source='pygensec.c', + deps='gensec pytalloc-util pyparam_util', + realname='samba/gensec.so' +--- a/source4/auth/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/auth/wscript_build 2016-01-08 19:50:12.580296961 -0500 +@@ -43,7 +43,8 @@ + ) + + +-bld.SAMBA_PYTHON('pyauth', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pyauth', + source='pyauth.c', + public_deps='auth_system_session', + deps='samdb pytalloc-util pyparam_util pyldb-util pycredentials auth4', +--- a/source4/dsdb/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/dsdb/wscript_build 2016-01-08 19:50:12.590296920 -0500 +@@ -58,7 +58,9 @@ + enabled=bld.AD_DC_BUILD_IS_ENABLED() + ) + +-bld.SAMBA_PYTHON('python_dsdb', ++ ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('python_dsdb', + source='pydsdb.c', + # the dependency on dcerpc here is because gensec + # depends on dcerpc but the waf circular dependency finder +--- a/source4/lib/com/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/lib/com/wscript_build 2016-01-08 19:50:12.600296878 -0500 +@@ -26,8 +26,8 @@ + init_function='com_simple_init' + ) + +- +-bld.SAMBA_PYTHON('pycom', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pycom', + source='pycom.c', + deps='COM', + realname='samba/com.so', +--- a/source4/lib/messaging/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/lib/messaging/wscript_build 2016-01-08 19:50:12.620296796 -0500 +@@ -8,7 +8,8 @@ + private_library=True + ) + +-bld.SAMBA_PYTHON('python_messaging', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('python_messaging', + source='pymessaging.c', + deps='MESSAGING events pyparam_util', + realname='samba/messaging.so' +--- a/source4/lib/policy/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/lib/policy/wscript_build 2016-01-08 20:29:35.981473795 -0500 +@@ -1,6 +1,7 @@ + #!/usr/bin/env python + +-bld.SAMBA_LIBRARY('samba-policy', ++if not bld.env.disable_python: ++ bld.SAMBA_LIBRARY('samba-policy', + source='gp_ldap.c gp_filesys.c gp_manage.c gp_ini.c', + pc_files='samba-policy.pc', + public_deps='ldb samba-net', +@@ -9,7 +10,7 @@ + public_headers='policy.h' + ) + +-bld.SAMBA_PYTHON('py_policy', ++ bld.SAMBA_PYTHON('py_policy', + source='pypolicy.c', + public_deps='samba-policy pytalloc-util', + realname='samba/policy.so' +--- a/source4/lib/registry/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/lib/registry/wscript_build 2016-01-08 19:50:12.640296714 -0500 +@@ -62,7 +62,8 @@ + ) + + +-bld.SAMBA_PYTHON('py_registry', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('py_registry', + source='pyregistry.c', + public_deps='registry pytalloc-util pyparam_util', + realname='samba/registry.so' +--- a/source4/lib/wmi/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/lib/wmi/wscript_build 2016-01-08 19:50:12.650296673 -0500 +@@ -19,7 +19,8 @@ + ) + + +-bld.SAMBA_PYTHON('pywmi', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pywmi', + source='wmi_wrap.c', + public_deps='LIBCLI_SMB ndr samba-util samba-config WMI' + ) +--- a/source4/libcli/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/libcli/wscript_build 2016-01-08 19:50:12.660296631 -0500 +@@ -31,12 +31,13 @@ + public_headers='smb_composite/smb_composite.h', + ) + +-bld.SAMBA_PYTHON('pysmb', +- source='pysmb.c', +- deps='LIBCLI_SMB_COMPOSITE LIBCLI_SMB2 tevent-util pyparam_util', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pysmb', ++ source='pysmb.c', ++ deps='LIBCLI_SMB_COMPOSITE LIBCLI_SMB2 tevent-util pyparam_util', + public_deps='cli_composite samba-credentials gensec LIBCLI_RESOLVE tevent param_options', +- realname='samba/smb.so' +- ) ++ realname='samba/smb.so' ++ ) + + bld.SAMBA_SUBSYSTEM('LIBCLI_DGRAM', + source='dgram/dgramsocket.c dgram/mailslot.c dgram/netlogon.c dgram/browse.c', +--- a/source4/libnet/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/libnet/wscript_build 2016-01-08 20:28:18.921747084 -0500 +@@ -1,6 +1,7 @@ + #!/usr/bin/env python + +-bld.SAMBA_LIBRARY('samba-net', ++if not bld.env.disable_python: ++ bld.SAMBA_LIBRARY('samba-net', + source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_samdump.c libnet_samsync_ldb.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c libnet_samsync.c', + autoproto='libnet_proto.h', + public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser PROVISION LIBCLI_SAMSYNC LIBTSOCKET', +@@ -8,13 +9,13 @@ + ) + + +-bld.SAMBA_PYTHON('python_net', ++ bld.SAMBA_PYTHON('python_net', + source='py_net.c', + deps='samba-net pyrpc_util', + realname='samba/net.so' + ) + +-bld.SAMBA_PYTHON('python_dckeytab', ++ bld.SAMBA_PYTHON('python_dckeytab', + source='py_net_dckeytab.c libnet_export_keytab.c', + deps='pyrpc_util HDB_SAMBA4 com_err', + realname='samba/dckeytab.so', +--- a/source4/librpc/wscript_build 2014-10-01 05:06:01.000000000 -0400 ++++ b/source4/librpc/wscript_build 2016-01-08 19:50:12.700296467 -0500 +@@ -143,228 +143,228 @@ + vnum='0.0.1' + ) + +-bld.SAMBA_SUBSYSTEM('pyrpc_util', ++if not bld.env.disable_python: ++ bld.SAMBA_SUBSYSTEM('pyrpc_util', + source='rpc/pyrpc_util.c', + public_deps='pytalloc-util pyparam_util dcerpc MESSAGING', + pyext=True, + ) + +- +-bld.SAMBA_PYTHON('python_dcerpc', ++ bld.SAMBA_PYTHON('python_dcerpc', + source='rpc/pyrpc.c', + public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG pyrpc_util gensec', + realname='samba/dcerpc/base.so' + ) + +-bld.SAMBA_PYTHON('python_srvsvc', +- source='../../librpc/gen_ndr/py_srvsvc.c', +- deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util', +- realname='samba/dcerpc/srvsvc.so' +- ) ++ bld.SAMBA_PYTHON('python_srvsvc', ++ source='../../librpc/gen_ndr/py_srvsvc.c', ++ deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util', ++ realname='samba/dcerpc/srvsvc.so' ++ ) + +-bld.SAMBA_PYTHON('python_echo', ++ bld.SAMBA_PYTHON('python_echo', + source='../../librpc/gen_ndr/py_echo.c', + deps='RPC_NDR_ECHO pytalloc-util pyrpc_util', + realname='samba/dcerpc/echo.so' + ) + +-bld.SAMBA_PYTHON('python_dns', ++ bld.SAMBA_PYTHON('python_dns', + source='../../librpc/gen_ndr/py_dns.c', + deps='RPC_NDR_DNS pytalloc-util pyrpc_util', + realname='samba/dcerpc/dns.so' + ) + +-bld.SAMBA_PYTHON('python_auth', ++ bld.SAMBA_PYTHON('python_auth', + source='../../librpc/gen_ndr/py_auth.c', + deps='NDR_AUTH pytalloc-util pyrpc_util', + realname='samba/dcerpc/auth.so' + ) + +-bld.SAMBA_PYTHON('python_krb5pac', ++ bld.SAMBA_PYTHON('python_krb5pac', + source='../../librpc/gen_ndr/py_krb5pac.c', + deps='ndr-krb5pac pytalloc-util pyrpc_util', + realname='samba/dcerpc/krb5pac.so' + ) + +-bld.SAMBA_PYTHON('python_winreg', ++ bld.SAMBA_PYTHON('python_winreg', + source='../../librpc/gen_ndr/py_winreg.c', + deps='RPC_NDR_WINREG pytalloc-util pyrpc_util', + realname='samba/dcerpc/winreg.so' + ) + + +-bld.SAMBA_PYTHON('python_dcerpc_misc', ++ bld.SAMBA_PYTHON('python_dcerpc_misc', + source='../../librpc/gen_ndr/py_misc.c', + deps='pytalloc-util pyrpc_util ndr-krb5pac', + realname='samba/dcerpc/misc.so' + ) + + +-bld.SAMBA_PYTHON('python_initshutdown', ++ bld.SAMBA_PYTHON('python_initshutdown', + source='../../librpc/gen_ndr/py_initshutdown.c', + deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util', + realname='samba/dcerpc/initshutdown.so' + ) + + +-bld.SAMBA_PYTHON('python_epmapper', ++ bld.SAMBA_PYTHON('python_epmapper', + source='../../librpc/gen_ndr/py_epmapper.c', + deps='dcerpc pytalloc-util pyrpc_util', + realname='samba/dcerpc/epmapper.so' + ) + + +-bld.SAMBA_PYTHON('python_mgmt', ++ bld.SAMBA_PYTHON('python_mgmt', + source='../../librpc/gen_ndr/py_mgmt.c', + deps='pytalloc-util dcerpc pyrpc_util', + realname='samba/dcerpc/mgmt.so' + ) + + +-bld.SAMBA_PYTHON('python_atsvc', ++ bld.SAMBA_PYTHON('python_atsvc', + source='../../librpc/gen_ndr/py_atsvc.c', + deps='dcerpc-atsvc pytalloc-util pyrpc_util', + realname='samba/dcerpc/atsvc.so' + ) + + +-bld.SAMBA_PYTHON('python_dcerpc_nbt', ++ bld.SAMBA_PYTHON('python_dcerpc_nbt', + source='../../librpc/gen_ndr/py_nbt.c', + deps='ndr_nbt RPC_NDR_NBT pytalloc-util pyrpc_util', + realname='samba/dcerpc/nbt.so' + ) + + +-bld.SAMBA_PYTHON('python_samr', ++ bld.SAMBA_PYTHON('python_samr', + source='../../librpc/gen_ndr/py_samr.c', + deps='dcerpc-samr pytalloc-util pyrpc_util', + realname='samba/dcerpc/samr.so' + ) + + +-bld.SAMBA_PYTHON('python_svcctl', ++ bld.SAMBA_PYTHON('python_svcctl', + source='../../librpc/gen_ndr/py_svcctl.c', + deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util', + realname='samba/dcerpc/svcctl.so' + ) + + +-bld.SAMBA_PYTHON('python_lsa', ++ bld.SAMBA_PYTHON('python_lsa', + source='../../librpc/gen_ndr/py_lsa.c', + deps='RPC_NDR_LSA pytalloc-util pyrpc_util', + realname='samba/dcerpc/lsa.so' + ) + + +-bld.SAMBA_PYTHON('python_wkssvc', ++ bld.SAMBA_PYTHON('python_wkssvc', + source='../../librpc/gen_ndr/py_wkssvc.c', + deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util', + realname='samba/dcerpc/wkssvc.so' + ) + + +-bld.SAMBA_PYTHON('python_dfs', ++ bld.SAMBA_PYTHON('python_dfs', + source='../../librpc/gen_ndr/py_dfs.c', + deps='RPC_NDR_DFS pytalloc-util pyrpc_util', + realname='samba/dcerpc/dfs.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_dcerpc', ++ bld.SAMBA_PYTHON('python_dcerpc_dcerpc', + source='../../librpc/gen_ndr/py_dcerpc.c', + deps='NDR_DCERPC pytalloc-util pyrpc_util', + realname='samba/dcerpc/dcerpc.so' + ) + +-bld.SAMBA_PYTHON('python_unixinfo', ++ bld.SAMBA_PYTHON('python_unixinfo', + source='../../librpc/gen_ndr/py_unixinfo.c', + deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util', + realname='samba/dcerpc/unixinfo.so' + ) + + +-bld.SAMBA_PYTHON('python_irpc', ++ bld.SAMBA_PYTHON('python_irpc', + source='gen_ndr/py_irpc.c', + deps='RPC_NDR_IRPC pytalloc-util pyrpc_util', + realname='samba/dcerpc/irpc.so' + ) + +-bld.SAMBA_PYTHON('python_server_id', ++ bld.SAMBA_PYTHON('python_server_id', + source='../../librpc/gen_ndr/py_server_id.c', + deps='RPC_NDR_SERVER_ID pytalloc-util pyrpc_util', + realname='samba/dcerpc/server_id.so' + ) + +-bld.SAMBA_PYTHON('python_winbind', ++ bld.SAMBA_PYTHON('python_winbind', + source='../../librpc/gen_ndr/py_winbind.c', + deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon', + realname='samba/dcerpc/winbind.so' + ) + +-bld.SAMBA_PYTHON('python_idmap', ++ bld.SAMBA_PYTHON('python_idmap', + source='../../librpc/gen_ndr/py_idmap.c', + deps='NDR_IDMAP pytalloc-util pyrpc_util', + realname='samba/dcerpc/idmap.so' + ) + + +-bld.SAMBA_PYTHON('python_drsuapi', ++ bld.SAMBA_PYTHON('python_drsuapi', + source='../../librpc/gen_ndr/py_drsuapi.c', + deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util', + realname='samba/dcerpc/drsuapi.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_security', ++ bld.SAMBA_PYTHON('python_dcerpc_security', + source='../../librpc/gen_ndr/py_security.c', + deps='pytalloc-util pyrpc_util NDR_SECURITY', + realname='samba/dcerpc/security.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_drsblobs', ++ bld.SAMBA_PYTHON('python_dcerpc_drsblobs', + source='../../librpc/gen_ndr/py_drsblobs.c', + deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS', + realname='samba/dcerpc/drsblobs.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_dnsp', ++ bld.SAMBA_PYTHON('python_dcerpc_dnsp', + source='../../librpc/gen_ndr/py_dnsp.c', + deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DNSP', + realname='samba/dcerpc/dnsp.so' + ) + + +-bld.SAMBA_PYTHON('python_dcerpc_xattr', ++ bld.SAMBA_PYTHON('python_dcerpc_xattr', + source='../../librpc/gen_ndr/py_xattr.c', + deps='pytalloc-util pyrpc_util RPC_NDR_XATTR', + realname='samba/dcerpc/xattr.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_idmap', ++ bld.SAMBA_PYTHON('python_dcerpc_idmap', + source='../../librpc/gen_ndr/py_idmap.c', + deps='pytalloc-util pyrpc_util RPC_NDR_XATTR', + realname='samba/dcerpc/idmap.so' + ) + +-bld.SAMBA_PYTHON('python_netlogon', ++ bld.SAMBA_PYTHON('python_netlogon', + source='../../librpc/gen_ndr/py_netlogon.c', + deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util', + realname='samba/dcerpc/netlogon.so' + ) + +-bld.SAMBA_PYTHON('python_dnsserver', ++ bld.SAMBA_PYTHON('python_dnsserver', + source='../../librpc/gen_ndr/py_dnsserver.c', + deps='RPC_NDR_DNSSERVER pytalloc-util pyrpc_util', + realname='samba/dcerpc/dnsserver.so' + ) + +-bld.SAMBA_PYTHON('python_dcerpc_smb_acl', ++ bld.SAMBA_PYTHON('python_dcerpc_smb_acl', + source='../../librpc/gen_ndr/py_smb_acl.c', + deps='pytalloc-util pyrpc_util', + realname='samba/dcerpc/smb_acl.so' + ) + +-bld.SAMBA_SCRIPT('python_dcerpc_init', ++ bld.SAMBA_SCRIPT('python_dcerpc_init', + pattern='rpc/dcerpc.py', + installdir='python/samba/dcerpc', + installname='__init__.py') + +-bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py') ++ bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py') +--- a/source4/ntvfs/posix/wscript_build 2014-10-01 05:06:01.000000000 -0400 ++++ b/source4/ntvfs/posix/wscript_build 2016-01-08 19:50:12.730296343 -0500 +@@ -30,7 +30,8 @@ + ) + + +-bld.SAMBA_MODULE('ntvfs_posix', ++if not bld.env.disable_python: ++ bld.SAMBA_MODULE('ntvfs_posix', + source='vfs_posix.c pvfs_util.c pvfs_search.c pvfs_dirlist.c pvfs_fileinfo.c pvfs_unlink.c pvfs_mkdir.c pvfs_open.c pvfs_read.c pvfs_flush.c pvfs_write.c pvfs_fsinfo.c pvfs_qfileinfo.c pvfs_setfileinfo.c pvfs_rename.c pvfs_resolve.c pvfs_shortname.c pvfs_lock.c pvfs_oplock.c pvfs_wait.c pvfs_seek.c pvfs_ioctl.c pvfs_xattr.c pvfs_streams.c pvfs_notify.c pvfs_sys.c xattr_system.c', + autoproto='vfs_posix_proto.h', + subsystem='ntvfs', +@@ -40,7 +41,7 @@ + ) + + +-bld.SAMBA_PYTHON('python_xattr_native', ++ bld.SAMBA_PYTHON('python_xattr_native', + source='python/pyxattr_native.c', + deps='ndr ldb samdb samba-credentials pyparam_util attr', + realname='samba/xattr_native.so' +@@ -52,13 +53,14 @@ + autoproto='posix_eadb_proto.h', + private_library=True) + +-bld.SAMBA_PYTHON('python_posix_eadb', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('python_posix_eadb', + source='python/pyposix_eadb.c', + deps='pyparam_util posix_eadb tdb_compat', + realname='samba/posix_eadb.so' + ) + +-bld.SAMBA_PYTHON('python_xattr_tdb', ++ bld.SAMBA_PYTHON('python_xattr_tdb', + source='python/pyxattr_tdb.c', + deps='pyparam_util xattr_tdb', + realname='samba/xattr_tdb.so' +--- a/source4/param/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/source4/param/wscript_build 2016-01-08 19:50:12.750296261 -0500 +@@ -1,6 +1,7 @@ + #!/usr/bin/env python + +-bld.SAMBA_SUBSYSTEM('PROVISION', ++if not bld.env.disable_python: ++ bld.SAMBA_SUBSYSTEM('PROVISION', + source='provision.c pyparam.c', + deps='LIBPYTHON pyparam_util ldb pytalloc-util pyldb-util', + pyext=True, +@@ -36,7 +37,8 @@ + ) + + +-bld.SAMBA_PYTHON('pyparam', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('pyparam', + source='pyparam.c', + deps='samba-hostconfig pytalloc-util', + realname='samba/param.so' +@@ -47,7 +49,8 @@ + deps='samba-hostconfig') + + +-bld.SAMBA_SUBSYSTEM('pyparam_util', ++if not bld.env.disable_python: ++ bld.SAMBA_SUBSYSTEM('pyparam_util', + source='pyparam_util.c', + deps='LIBPYTHON samba-hostconfig', + pyext=True, +--- a/source4/winbind/wscript_build 2014-10-01 04:12:22.000000000 -0400 ++++ b/source4/winbind/wscript_build 2016-01-08 20:31:17.741112909 -0500 +@@ -1,7 +1,7 @@ + #!/usr/bin/env python + +- +-bld.SAMBA_MODULE('service_winbind', ++if not bld.env.disable_python: ++ bld.SAMBA_MODULE('service_winbind', + source='wb_server.c wb_irpc.c wb_samba3_protocol.c wb_samba3_cmd.c wb_init_domain.c wb_dom_info.c wb_dom_info_trusted.c wb_sid2domain.c wb_name2domain.c wb_sids2xids.c wb_xids2sids.c wb_gid2sid.c wb_sid2uid.c wb_sid2gid.c wb_uid2sid.c wb_connect_lsa.c wb_connect_sam.c wb_cmd_lookupname.c wb_cmd_lookupsid.c wb_cmd_getdcname.c wb_cmd_getgrnam.c wb_cmd_getgrgid.c wb_cmd_getpwnam.c wb_cmd_getpwuid.c wb_cmd_userdomgroups.c wb_cmd_usersids.c wb_cmd_list_groups.c wb_cmd_list_trustdom.c wb_cmd_list_users.c wb_cmd_setpwent.c wb_cmd_getpwent.c wb_cmd_getgrent.c wb_cmd_setgrent.c wb_cmd_getgroups.c wb_pam_auth.c wb_sam_logon.c wb_update_rodc_dns.c', + autoproto='wb_proto.h', + subsystem='service', +--- a/wscript 2015-10-27 04:11:29.000000000 -0400 ++++ b/wscript 2016-01-08 19:50:12.510297249 -0500 +@@ -75,10 +75,15 @@ + opt.tool_options('python') # options for disabling pyc or pyo compilation + # enable options related to building python extensions + ++ opt.add_option('--disable-python', ++ help=("do not generate python modules"), ++ action="store_true", dest='disable_python', default=False) + + def configure(conf): + version = samba_version.load_version(env=conf.env) + ++ conf.env.disable_python = getattr(Options.options, 'disable_python', False) ++ + conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1) + conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True) + conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True) +@@ -96,7 +101,10 @@ + conf.find_program('xsltproc', var='XSLTPROC') + + conf.SAMBA_CHECK_PYTHON(mandatory=True, version=(2,5,0)) +- conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) ++ if conf.env.disable_python: ++ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False) ++ else: ++ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) + + if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']: + # Mac OSX needs to have this and it's also needed that the python is compiled with this +--- a/wscript_build 2014-12-20 10:27:51.000000000 -0500 ++++ b/wscript_build 2016-01-08 19:50:12.510297249 -0500 +@@ -48,7 +48,8 @@ + bld.RECURSE('lib/param') + bld.RECURSE('dynconfig') + bld.RECURSE('lib/util/charset') +-bld.RECURSE('python') ++if not bld.env.disable_python: ++ bld.RECURSE('python') + bld.RECURSE('source4/param') + bld.RECURSE('source4/librpc') + bld.RECURSE('source4/dsdb') +@@ -99,7 +100,8 @@ + bld.RECURSE('source4/utils') + bld.RECURSE('source4/ntvfs') + bld.RECURSE('source4/ntptr') +-bld.RECURSE('source4/torture') ++if not bld.env.disable_python: ++ bld.RECURSE('source4/torture') + bld.RECURSE('librpc') + bld.RECURSE('source4') + bld.RECURSE('source4/libcli') +--- a/lib/ldb-samba/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/lib/ldb-samba/wscript_build 2016-01-08 20:43:53.538486348 -0500 +@@ -19,7 +19,8 @@ + ) + + +-bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c', ++if not bld.env.disable_python: ++ bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c', + deps='ldbsamba pyparam_util ldbwrap pyldb-util', + realname='samba/_ldb.so') + +--- a/libcli/echo/tests/wscript_build 2014-10-01 04:12:21.000000000 -0400 ++++ b/libcli/echo/tests/wscript_build 2016-01-08 21:06:36.644107638 -0500 +@@ -1,6 +1,7 @@ + #!/usr/bin/env python + +-bld.SAMBA_MODULE('TORTURE_LIBCLI_ECHO', ++if not bld.env.disable_python: ++ bld.SAMBA_MODULE('TORTURE_LIBCLI_ECHO', + source='echo.c', + subsystem='smbtorture', + init_function='torture_libcli_echo_init', diff --git a/net-fs/samba/samba-4.2.7-r1.ebuild b/net-fs/samba/samba-4.2.7-r1.ebuild new file mode 100644 index 0000000..b7ff879 --- /dev/null +++ b/net-fs/samba/samba-4.2.7-r1.ebuild @@ -0,0 +1,229 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE='threads(+)' + +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils + +MY_PV="${PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" + +SRC_PATH="stable" +[[ ${PV} = *_rc* ]] && SRC_PATH="rc" + +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" +KEYWORDS="~amd64 ~hppa ~x86" +[[ ${PV} = *_rc* ]] && KEYWORDS="~hppa" + +DESCRIPTION="Samba Suite Version 4" +HOMEPAGE="http://www.samba.org/" +LICENSE="GPL-3" + +SLOT="0" + +IUSE="acl addc addns ads aio avahi client cluster cups dmapi fam gnutls iprint +ldap pam quota selinux syslog +system-mitkrb5 systemd test winbind" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/samba-4.0/policy.h +) + +# sys-apps/attr is an automagic dependency (see bug #489748) +CDEPEND="${PYTHON_DEPS} + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] + dev-libs/libbsd[${MULTILIB_USEDEP}] + dev-libs/iniparser:0 + dev-libs/popt[${MULTILIB_USEDEP}] + sys-libs/readline:= + virtual/libiconv + dev-python/subunit[${PYTHON_USEDEP}] + >=net-libs/socket_wrapper-1.1.2[${MULTILIB_USEDEP}] + sys-apps/attr[${MULTILIB_USEDEP}] + sys-libs/libcap + >=sys-libs/ldb-1.1.24[${MULTILIB_USEDEP}] + sys-libs/ncurses:0= + >=sys-libs/nss_wrapper-1.0.2[${MULTILIB_USEDEP}] + >=sys-libs/ntdb-1.0[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] + >=sys-libs/talloc-2.1.2[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] + >=sys-libs/tdb-1.3.6[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.9.25[${MULTILIB_USEDEP}] + >=sys-libs/uid_wrapper-1.0.1[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/pam + acl? ( virtual/acl ) + addns? ( net-dns/bind-tools[gssapi] ) + aio? ( dev-libs/libaio ) + cluster? ( >=dev-db/ctdb-1.0.114_p1 ) + cups? ( net-print/cups ) + dmapi? ( sys-apps/dmapi ) + fam? ( virtual/fam ) + gnutls? ( dev-libs/libgcrypt:0 + >=net-libs/gnutls-1.4.0 ) + ldap? ( net-nds/openldap ) + system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] ) + !system-mitkrb5? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd:0= )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + client? ( net-fs/cifs-utils[ads?] ) + selinux? ( sec-policy/selinux-samba ) +" + +REQUIRED_USE="addc? ( gnutls !system-mitkrb5 ) + ads? ( acl gnutls ldap ) + ${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.3-heimdal_compilefix.patch" + "${FILESDIR}/${PN}-4.2.7-pam.patch" + "${FILESDIR}/${PN}-4.2.7-disable-python-for-altabi.patch" +) + +CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" + +WAF_BINARY="${S}/buildtools/bin/waf" + +pkg_setup() { + python-single-r1_pkg_setup + if use aio ; then + if ! linux_config_exists || ! linux_chkconfig_present AIO; then + ewarn "You must enable AIO support in your kernel config, " + ewarn "to be able to support asynchronous I/O. " + ewarn "You can find it at" + ewarn + ewarn "General Support" + ewarn " Enable AIO support " + ewarn + ewarn "and recompile your kernel..." + fi + fi +} + +src_prepare() { + epatch ${PATCHES[@]} + # Allow user patches + epatch_user + multilib_copy_sources +} + +multilib_src_configure() { + local myconf=() + myconf=( + --enable-fhs + --sysconfdir=/etc + --localstatedir=/var + --with-modulesdir=/usr/$(get_libdir)/samba + --with-piddir=/var/run/${PN} + --bundled-libraries=NONE + --builtin-libraries=NONE + --disable-rpath + --disable-rpath-install + --nopyc + --nopyo + ) + if multilib_is_native_abi ; then myconf+=( + $(use_with acl acl-support) + $(usex addc '' '--without-ad-dc') + $(use_with addns dnsupdate) + $(use_with ads) + $(usex ads '--with-shared-modules=idmap_ad' '') + $(use_with aio aio-support) + $(usex cluster '--with-ctdb-dir=/usr' '') + $(use_enable avahi) + $(use_with cluster cluster-support) + $(use_enable cups) + $(use_with dmapi) + $(use_with fam) + $(use_enable gnutls) + $(use_enable iprint) + $(use_with ldap) + $(use_with pam) + $(use_with pam pam_smbpass) + $(usex pam "--with-pammodulesdir=/$(get_libdir)/security" '') + $(use_with quota quotas) + $(use_with syslog) + $(use_with systemd) + $(usex system-mitkrb5 '--with-system-mitkrb5' '') + $(use_with winbind) + $(usex test '--enable-selftest' '') + ); else myconf+=( + --without-acl-support + --without-ad-dc + --without-dnsupdate + --without-ads + --without-aio-support + --disable-avahi + --without-cluster-support + --disable-cups + --without-dmapi + --without-fam + --disable-gnutls + --disable-iprint + --without-ldap + --without-pam + --without-pam_smbpass + --without-quotas + --without-syslog + --without-systemd + $(usex system-mitkrb5 '--with-system-mitkrb5' '') + --without-winbind + --disable-python + ); fi + + CPPFLAGS="-I${SYSROOT}/usr/include/et ${CPPFLAGS}" \ + waf-utils_src_configure ${myconf[@]} +} + +multilib_src_install() { + waf-utils_src_install + + # Make all .so files executable + find "${D}" -type f -name "*.so" -exec chmod +x {} + + + if multilib_is_native_abi; then + # install ldap schema for server (bug #491002) + if use ldap ; then + insinto /etc/openldap/schema + doins examples/LDAP/samba.schema + fi + + # install example config file + insinto /etc/samba + doins examples/smb.conf.default + + # Install init script and conf.d file + newinitd "${CONFDIR}/samba4.initd-r1" samba + newconfd "${CONFDIR}/samba4.confd" samba + + systemd_dotmpfilesd "${FILESDIR}"/samba.conf + systemd_dounit "${FILESDIR}"/nmbd.service + systemd_dounit "${FILESDIR}"/smbd.{service,socket} + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' + systemd_dounit "${FILESDIR}"/winbindd.service + systemd_dounit "${FILESDIR}"/samba.service + fi +} + +multilib_src_test() { + if multilib_is_native_abi ; then + "${WAF_BINARY}" test || die "test failed" + fi +} + +pkg_postinst() { + ewarn "Be aware the this release contains the best of all of Samba's" + ewarn "technology parts, both a file server (that you can reasonably expect" + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" + ewarn "controller work previously known as 'samba4'." + + elog "For further information and migration steps make sure to read " + elog "http://samba.org/samba/history/${P}.html " + elog "http://samba.org/samba/history/${PN}-4.2.0.html and" + elog "http://wiki.samba.org/index.php/Samba4/HOWTO " +}