@ -2,8 +2,8 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := samba
PKG_NAME := samba
PKG_VERSION := 4.9.15
PKG_RELEASE := 2
PKG_VERSION := 4.9.16
PKG_RELEASE := 1
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE_URL := https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
PKG_SOURCE_URL := https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
@ -12,15 +12,15 @@ PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
http://samba.mirror.bit.nl/samba/ftp/stable/ \
http://samba.mirror.bit.nl/samba/ftp/stable/ \
https://download.samba.org/pub/samba/stable/
https://download.samba.org/pub/samba/stable/
PKG_HASH := 377102b80b97941bf0d131b828cae8415190e5bdd2928c2e2c954e29f190449 6
PKG_HASH := 613987fac719ed90f3daad6ca12517329f0754dd51c573f6b3623e6b03cb391 6
PKG_MAINTAINER := Andy Walsh <andy.walsh44+github@gmail.com>
PKG_MAINTAINER := Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE := GPL-3.0-only
PKG_LICENSE := GPL-3.0-only
PKG_LICENSE_FILES := COPYING
PKG_LICENSE_FILES := COPYING
PKG_CPE_ID := cpe:/a:samba:samba
PKG_CPE_ID := cpe:/a:samba:samba
# samba4=(asn1_compile) e2fsprogs=( compile_et) nfs-kernel-server=(rpcgen)
HOST_BUILD_DEPENDS := python/host nfs-kernel-server/host e2fsprogs/host
# samba4=(asn1_compile, compile_et) nfs-kernel-server=(rpcgen)
HOST_BUILD_DEPENDS := python/host nfs-kernel-server/host
PKG_BUILD_DEPENDS := samba4/host
PKG_BUILD_DEPENDS := samba4/host
PKG_CONFIG_DEPENDS := \
PKG_CONFIG_DEPENDS := \
@ -30,8 +30,6 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_SAMBA4_SERVER_VFSX \
CONFIG_SAMBA4_SERVER_VFSX \
CONFIG_SAMBA4_SERVER_QUOTAS \
CONFIG_SAMBA4_SERVER_QUOTAS \
CONFIG_SAMBA4_SERVER_ACL \
CONFIG_SAMBA4_SERVER_ACL \
CONFIG_SAMBA4_SERVER_AD_DC \
CONFIG_SAMBA4_SERVER_WINBIND \
CONFIG_PACKAGE_kmod-fs-btrfs \
CONFIG_PACKAGE_kmod-fs-btrfs \
CONFIG_PACKAGE_kmod-fs-xfs
CONFIG_PACKAGE_kmod-fs-xfs
@ -58,13 +56,11 @@ endef
d e f i n e P a c k a g e / s a m b a 4 - l i b s
d e f i n e P a c k a g e / s a m b a 4 - l i b s
$( call Package/samba4/Default)
$( call Package/samba4/Default)
TITLE += libs
TITLE += libs
DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libreadline \
+PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +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_VFS:attr \
+SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
+SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:python-crypto +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
+SAMBA4_SERVER_AVAHI:libavahi-client
e n d e f
e n d e f
d e f i n e P a c k a g e / s a m b a 4 - s e r v e r
d e f i n e P a c k a g e / s a m b a 4 - s e r v e r
@ -80,7 +76,6 @@ define Package/samba4-server/description
HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
e n d e f
e n d e f
# BUG: We cant add DEPENDS:= +SAMBA4_SERVER_AD_DC:python-crypto, so this only happens here via select!
d e f i n e P a c k a g e / s a m b a 4 - s e r v e r / c o n f i g
d e f i n e P a c k a g e / s a m b a 4 - s e r v e r / c o n f i g
select PACKAGE_wsdd2
select PACKAGE_wsdd2
source " $( SOURCE) /Config.in "
source " $( SOURCE) /Config.in "
@ -240,24 +235,13 @@ ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
e l s e
e l s e
CONFIGURE_ARGS += --without-acl-support
CONFIGURE_ARGS += --without-acl-support
e n d i f
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
TARGET_CFLAGS := -I$( STAGING_DIR) /usr/include/python2.7 $( TARGET_CFLAGS)
e l s e
CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
--disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS = "" \
python_LIBDIR = ""
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_WINBIND ) , y )
CONFIGURE_ARGS += --with-winbind
e l s e
CONFIGURE_ARGS += --without-winbind
e n d i f
# features
CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
--disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS = "" \
python_LIBDIR = ""
SAMBA4_IDMAP_MODULES :=
SAMBA4_IDMAP_MODULES_SHARED :=
SAMBA4_PDB_MODULES := pdb_smbpasswd,pdb_tdbsam,
SAMBA4_PDB_MODULES := pdb_smbpasswd,pdb_tdbsam,
SAMBA4_AUTH_MODULES := auth_builtin,auth_sam,auth_unix,auth_script,
SAMBA4_AUTH_MODULES := auth_builtin,auth_sam,auth_unix,auth_script,
SAMBA4_VFS_MODULES := vfs_default,
SAMBA4_VFS_MODULES := vfs_default,
@ -283,24 +267,9 @@ ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
# vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
# vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
# vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
# vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
e n d i f
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
SAMBA4_PDB_MODULES := $( SAMBA4_PDB_MODULES) pdb_samba_dsdb,pdb_ldapsam,
SAMBA4_AUTH_MODULES := $( SAMBA4_AUTH_MODULES) auth_samba4,
SAMBA4_VFS_MODULES_SHARED := $( SAMBA4_VFS_MODULES_SHARED) vfs_audit,vfs_extd_audit,vfs_full_audit,
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_WINBIND ) , y )
SAMBA4_IDMAP_MODULES := $( SAMBA4_IDMAP_MODULES) idmap_tdb,idmap_passdb,idmap_nss,nss_info_template,
SAMBA4_IDMAP_MODULES_SHARED := $( SAMBA4_IDMAP_MODULES_SHARED) idmap_autorid,idmap_rid,idmap_hash,idmap_tdb2,idmap_script,
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
SAMBA4_IDMAP_MODULES_SHARED := $( SAMBA4_IDMAP_MODULES_SHARED) idmap_ad,idmap_ldap,idmap_rfc2307,
# idmap_ad needs --with-ads
# idmap_rfc2307 needs ldap headers
e n d i f
SAMBA4_AUTH_MODULES := $( SAMBA4_AUTH_MODULES) auth_winbind,
e n d i f
SAMBA4_MODULES := ${ SAMBA4_VFS_MODULES } ${ SAMBA4_AUTH_MODULES } ${ SAMBA4_PDB_MODULES } ${ SAMBA4_IDMAP_MODULES }
SAMBA4_MODULES_SHARDED := ${ SAMBA4_VFS_MODULES_SHARED } ${ SAMBA4_IDMAP_MODULES_SHARED }
SAMBA4_MODULES := ${ SAMBA4_VFS_MODULES } ${ SAMBA4_AUTH_MODULES } ${ SAMBA4_PDB_MODULES }
SAMBA4_MODULES_SHARDED := ${ SAMBA4_VFS_MODULES_SHARED }
CONFIGURE_ARGS += \
CONFIGURE_ARGS += \
--with-static-modules= $( SAMBA4_MODULES) !DEFAULT,!FORCED \
--with-static-modules= $( SAMBA4_MODULES) !DEFAULT,!FORCED \
@ -320,12 +289,6 @@ endif
i f e q ( $( CONFIG_SAMBA 4_SERVER_NETBIOS ) , y )
i f e q ( $( CONFIG_SAMBA 4_SERVER_NETBIOS ) , y )
BUILD_TARGETS_SERVER := $( BUILD_TARGETS_SERVER) ,nmbd
BUILD_TARGETS_SERVER := $( BUILD_TARGETS_SERVER) ,nmbd
e n d i f
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
BUILD_TARGETS_SERVER := $( BUILD_TARGETS_SERVER) ,samba,nsstest,ntlm_auth,samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_WINBIND ) , y )
BUILD_TARGETS_SERVER := $( BUILD_TARGETS_SERVER) ,winbindd,wbinfo,winbind_krb5_locator
e n d i f
# CONFIG_PACKAGE_samba4-client
# CONFIG_PACKAGE_samba4-client
BUILD_TARGETS_CLIENT := client/smbclient,client/cifsdd
BUILD_TARGETS_CLIENT := client/smbclient,client/cifsdd
# CONFIG_PACKAGE_samba4-admin
# CONFIG_PACKAGE_samba4-admin
@ -336,13 +299,9 @@ BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
# lib bundling
# lib bundling
# NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
# 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
HOST_CONFIGURE_ARGS += --builtin-libraries= replace --nonshared-binary= asn1_compile
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
CONFIGURE_ARGS += --bundled-libraries= talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
e l s e
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,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
e n d i f
# BUG: --private-libraries, Does not work for System possible libs, will not get "samba4" suffix!
# 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
# CONFIGURE_ARGS += --disable-symbol-versions
# CONFIGURE_ARGS += --disable-symbol-versions
@ -350,23 +309,22 @@ CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,
d e f i n e H o s t / C o m p i l e
d e f i n e H o s t / C o m p i l e
( cd $( HOST_BUILD_DIR) ; \
( cd $( HOST_BUILD_DIR) ; \
./buildtools/bin/waf build \
./buildtools/bin/waf build \
--targets= asn1_compile \
--targets= asn1_compile,compile_et \
)
)
e n d e f
e n d e f
d e f i n e H o s t / I n s t a l l
d e f i n e H o s t / I n s t a l l
$( INSTALL_DIR) $( STAGING_DIR_HOSTPKG) /bin/
$( INSTALL_DIR) $( STAGING_DIR_HOSTPKG) /bin/
$( INSTALL_BIN) $( HOST_BUILD_DIR) /bin/asn1_compile $( 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/
e n d e f
e n d e f
d e f i n e B u i l d / P r e p a r e
d e f i n e B u i l d / P r e p a r e
$( Build/Prepare/Default)
$( Build/Prepare/Default)
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , )
# un-bundle dnspython
# un-bundle dnspython
$( SED) '/"dns.resolver":/d' $( PKG_BUILD_DIR) /third_party/wscript
$( SED) '/"dns.resolver":/d' $( PKG_BUILD_DIR) /third_party/wscript
# unbundle iso8601
# unbundle iso8601
$( SED) '/"iso8601":/d' $( PKG_BUILD_DIR) /third_party/wscript
$( SED) '/"iso8601":/d' $( PKG_BUILD_DIR) /third_party/wscript
e n d i f
e n d e f
e n d e f
d e f i n e B u i l d / C o n f i g u r e
d e f i n e B u i l d / C o n f i g u r e
@ -379,7 +337,7 @@ define Build/Configure
$( call Build/Configure/Default)
$( call Build/Configure/Default)
e n d e f
e n d e f
# BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
# Note: We need to build via "waf install --targets=". Why do we also need to add the modules as targets here?
d e f i n e B u i l d / C o m p i l e
d e f i n e B u i l d / C o m p i l e
( cd $( PKG_BUILD_DIR) ; \
( cd $( PKG_BUILD_DIR) ; \
./buildtools/bin/waf install \
./buildtools/bin/waf install \
@ -398,20 +356,13 @@ define Package/samba4-libs/install
$( CP) $( PKG_INSTALL_DIR) /usr/lib/*.so* $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/*.so* $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/*.so* $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/*.so* $( 1) /usr/lib/
$( INSTALL_DIR) $( 1) /usr/lib/samba/vfs $( 1) /usr/lib/samba/idmap $( 1) /usr/lib/samba/ldb $( 1) /usr/lib/samba/krb5
if [ -d $( PKG_INSTALL_DIR) /usr/lib/samba/idmap ] ; then \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/idmap $( 1) /usr/lib/samba/; \
fi
$( INSTALL_DIR) $( 1) /usr/lib/samba/vfs $( 1) /usr/lib/samba/ldb $( 1) /usr/lib/samba/krb5
if [ -d $( PKG_INSTALL_DIR) /usr/lib/samba/vfs ] ; then \
if [ -d $( PKG_INSTALL_DIR) /usr/lib/samba/vfs ] ; then \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/vfs $( 1) /usr/lib/samba/; \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/vfs $( 1) /usr/lib/samba/; \
fi
fi
if [ -d $( PKG_INSTALL_DIR) /usr/lib/samba/krb5 ] ; then \
if [ -d $( PKG_INSTALL_DIR) /usr/lib/samba/krb5 ] ; then \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/krb5 $( 1) /usr/lib/samba/; \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/samba/krb5 $( 1) /usr/lib/samba/; \
fi
fi
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
$( INSTALL_DIR) $( 1) /usr/lib/python2.7
$( CP) $( PKG_INSTALL_DIR) /usr/lib/python2.7 $( 1) /usr/lib/
e n d i f
e n d e f
e n d e f
d e f i n e P a c k a g e / s a m b a 4 - c l i e n t / i n s t a l l
d e f i n e P a c k a g e / s a m b a 4 - c l i e n t / i n s t a l l
@ -436,19 +387,9 @@ define Package/samba4-server/install
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/{ smbpasswd,pdbedit,testparm} $( 1) /usr/bin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/{ smbpasswd,pdbedit,testparm} $( 1) /usr/bin/
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/smbd $( 1) /usr/sbin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/smbd $( 1) /usr/sbin/
i f e q ( $( CONFIG_SAMBA 4_SERVER_AD_DC ) , y )
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/{ samba-tool,ntlm_auth,smbtar} $( 1) /usr/bin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/{ samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $( 1) /usr/sbin/
# waf does not install those?
$( INSTALL_BIN) $( PKG_BUILD_DIR) /bin/{ samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil} $( 1) /usr/bin/
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_NETBIOS ) , y )
i f e q ( $( CONFIG_SAMBA 4_SERVER_NETBIOS ) , y )
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/nmbd $( 1) /usr/sbin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/nmbd $( 1) /usr/sbin/
e n d i f
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_WINBIND ) , y )
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/wbinfo $( 1) /usr/bin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/winbindd $( 1) /usr/sbin/
e n d i f
i f e q ( $( CONFIG_SAMBA 4_SERVER_ACL ) , y )
i f e q ( $( CONFIG_SAMBA 4_SERVER_ACL ) , y )
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/sharesec $( 1) /usr/bin/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/bin/sharesec $( 1) /usr/bin/
e n d i f
e n d i f
@ -465,10 +406,6 @@ define Package/samba4-server/conffiles
/ e t c / s a m b a / s m b p a s s w d
/ e t c / s a m b a / s m b p a s s w d
/ e t c / s a m b a / s e c r e t s . t d b
/ e t c / s a m b a / s e c r e t s . t d b
/ e t c / s a m b a / p a s s d b . t d b
/ e t c / s a m b a / p a s s d b . t d b
/ e t c / s a m b a / i d m a p . l d b
/ e t c / s a m b a / l m h o s t s
/ e t c / n s s w i t c h . c o n f
/ e t c / k r b 5 . c o n f
e n d e f
e n d e f
$( eval $ ( call HostBuild ) )
$( eval $ ( call HostBuild ) )