diff options
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch | 19 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch | 25 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch | 19 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba_4.7.0.bb (renamed from meta-networking/recipes-connectivity/samba/samba_4.6.7.bb) | 67 |
4 files changed, 117 insertions, 13 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch new file mode 100644 index 0000000000..0c7592f8e2 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | samba: build dnsserver_common code | ||
2 | |||
3 | Just 'install' does not seem to do it. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
8 | |||
9 | --- a/source4/dns_server/wscript_build | ||
10 | +++ b/source4/dns_server/wscript_build | ||
11 | @@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common', | ||
12 | source='dnsserver_common.c', | ||
13 | deps='samba-util samba-errors ldbsamba clidns', | ||
14 | private_library=True, | ||
15 | - install=bld.AD_DC_BUILD_IS_ENABLED() | ||
16 | + enabled=bld.AD_DC_BUILD_IS_ENABLED() | ||
17 | ) | ||
18 | |||
19 | bld.SAMBA_MODULE('service_dns', | ||
diff --git a/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch new file mode 100644 index 0000000000..5ae8c59783 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | samba: defeat iconv test | ||
2 | |||
3 | A test was added when configuring samba which requires target code | ||
4 | to be executed. In general, this will not work, so we eliminate it. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
9 | |||
10 | --- a/lib/util/charset/wscript_configure | ||
11 | +++ b/lib/util/charset/wscript_configure | ||
12 | @@ -17,6 +17,8 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'i | ||
13 | |||
14 | conf.DEFINE('HAVE_NATIVE_ICONV', 1) | ||
15 | |||
16 | +""" | ||
17 | +[added for 4.7.0, but breaks cross-compilation] | ||
18 | conf.CHECK_CODE(''' | ||
19 | uint8_t inbuf[2] = { 0x30, 0xdf }; | ||
20 | uint8_t outbuf[4] = { 0 }; | ||
21 | @@ -36,3 +38,4 @@ conf.CHECK_CODE(''' | ||
22 | msg='Checking errno of iconv for illegal multibyte sequence', | ||
23 | lib='iconv', | ||
24 | headers='errno.h iconv.h') | ||
25 | +""" | ||
diff --git a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch new file mode 100644 index 0000000000..77c8b3626b --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | samba: correct log files location | ||
2 | |||
3 | We use /var/log/samba. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
8 | |||
9 | --- a/packaging/RHEL/setup/smb.conf | ||
10 | +++ b/packaging/RHEL/setup/smb.conf | ||
11 | @@ -63,7 +63,7 @@ | ||
12 | |||
13 | # this tells Samba to use a separate log file for each machine | ||
14 | # that connects | ||
15 | - log file = /usr/local/samba/var/log.%m | ||
16 | + log file = /var/log/samba/log.%m | ||
17 | |||
18 | # Put a capping on the size of the log files (in Kb). | ||
19 | max log size = 50 | ||
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb b/meta-networking/recipes-connectivity/samba/samba_4.7.0.bb index 59d7425c8d..f33c1384bf 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.6.7.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.7.0.bb | |||
@@ -20,6 +20,9 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ | |||
20 | file://0006-avoid-using-colon-in-the-checking-msg.patch \ | 20 | file://0006-avoid-using-colon-in-the-checking-msg.patch \ |
21 | file://netdb_defines.patch \ | 21 | file://netdb_defines.patch \ |
22 | file://glibc_only.patch \ | 22 | file://glibc_only.patch \ |
23 | file://iconv-4.7.0.patch \ | ||
24 | file://dnsserver-4.7.0.patch \ | ||
25 | file://smb_conf-4.7.0.patch \ | ||
23 | file://volatiles.03_samba \ | 26 | file://volatiles.03_samba \ |
24 | " | 27 | " |
25 | SRC_URI_append_libc-musl = " \ | 28 | SRC_URI_append_libc-musl = " \ |
@@ -27,14 +30,20 @@ SRC_URI_append_libc-musl = " \ | |||
27 | file://samba-4.3.9-remove-getpwent_r.patch \ | 30 | file://samba-4.3.9-remove-getpwent_r.patch \ |
28 | " | 31 | " |
29 | 32 | ||
30 | SRC_URI[md5sum] = "c6ee5c766016d59908c8fb672fbbd445" | 33 | SRC_URI[md5sum] = "cf5eaf34f510e3d5643c0dcfd49fcc40" |
31 | SRC_URI[sha256sum] = "9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa" | 34 | SRC_URI[sha256sum] = "bd16d169988eb513e685a87e9964a5210482498fa9b3a22aaa8287a061e3c936" |
35 | |||
36 | #SRC_URI[md5sum] = "c6ee5c766016d59908c8fb672fbbd445" | ||
37 | #SRC_URI[sha256sum] = "9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa" | ||
32 | 38 | ||
33 | inherit systemd waf-samba cpan-base perlnative update-rc.d | 39 | inherit systemd waf-samba cpan-base perlnative update-rc.d |
34 | # remove default added RDEPENDS on perl | 40 | # remove default added RDEPENDS on perl |
35 | RDEPENDS_${PN}_remove = "perl" | 41 | RDEPENDS_${PN}_remove = "perl" |
36 | 42 | ||
37 | DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio libpam" | 43 | #DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam" |
44 | DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libbsd libaio libpam" | ||
45 | DEPENDS += "libldb" | ||
46 | |||
38 | DEPENDS_append_libc-musl = " libtirpc" | 47 | DEPENDS_append_libc-musl = " libtirpc" |
39 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" | 48 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" |
40 | LDFLAGS_append_libc-musl = " -ltirpc" | 49 | LDFLAGS_append_libc-musl = " -ltirpc" |
@@ -45,12 +54,20 @@ LSB_linuxstdbase = "lsb" | |||
45 | INITSCRIPT_NAME = "samba" | 54 | INITSCRIPT_NAME = "samba" |
46 | INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ." | 55 | INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ." |
47 | 56 | ||
48 | SYSTEMD_PACKAGES = "${PN}-base winbind" | 57 | SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind" |
49 | SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service" | 58 | SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service" |
59 | SYSTEMD_SERVICE_${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}" | ||
50 | SYSTEMD_SERVICE_winbind = "winbind.service" | 60 | SYSTEMD_SERVICE_winbind = "winbind.service" |
51 | 61 | ||
62 | # There are prerequisite settings to enable ad-dc, so disable the service by default. | ||
63 | # Reference: | ||
64 | # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller | ||
65 | SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" | ||
66 | |||
67 | # Use krb5. Build active domain controller. | ||
68 | # | ||
52 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ | 69 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ |
53 | acl cups ldap \ | 70 | acl ad-dc cups gnutls ldap mitkrb5 \ |
54 | " | 71 | " |
55 | 72 | ||
56 | RDEPENDS_${PN}-base += "${LSB}" | 73 | RDEPENDS_${PN}-base += "${LSB}" |
@@ -68,13 +85,30 @@ PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind," | |||
68 | PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" | 85 | PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" |
69 | PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" | 86 | PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" |
70 | 87 | ||
88 | # Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS, | ||
89 | # And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to: | ||
90 | # http://samba.2283325.n4.nabble.com/samba-4-6-6-Unknown-dependency-kdc-in-service-kdc-objlist-td4722096.html | ||
91 | # So the working combination is: | ||
92 | # 1) ad-dc: enable, gnutls: enable, mitkrb5: disable | ||
93 | # 2) ad-dc: disable, gnutls: enable/disable, mitkrb5: enable | ||
94 | # | ||
95 | # We are now at 4.7.0, so take the above with a grain of salt. We do not need to know where | ||
96 | # krb5kdc is unless ad-dc is enabled, but we tell configure anyhow. | ||
97 | # | ||
98 | PACKAGECONFIG[ad-dc] = ",--without-ad-dc,," | ||
99 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," | ||
100 | PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5," | ||
71 | 101 | ||
72 | SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2" | 102 | SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2" |
73 | SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4" | 103 | SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4" |
74 | SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4" | 104 | SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4" |
75 | SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}" | 105 | SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}" |
76 | 106 | ||
77 | SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb" | 107 | # These libraries are supposed to replace others supplied by packages, but decorate the names of |
108 | # .so files so there will not be a conflict. This is not done consistantly, so be very careful | ||
109 | # when adding to this list. | ||
110 | # | ||
111 | SAMBA4_LIBS="heimdal,cmocka,NONE" | ||
78 | 112 | ||
79 | EXTRA_OECONF += "--enable-fhs \ | 113 | EXTRA_OECONF += "--enable-fhs \ |
80 | --with-piddir=/run \ | 114 | --with-piddir=/run \ |
@@ -82,12 +116,9 @@ EXTRA_OECONF += "--enable-fhs \ | |||
82 | --with-modulesdir=${libdir}/samba \ | 116 | --with-modulesdir=${libdir}/samba \ |
83 | --with-lockdir=${localstatedir}/lib/samba \ | 117 | --with-lockdir=${localstatedir}/lib/samba \ |
84 | --with-cachedir=${localstatedir}/lib/samba \ | 118 | --with-cachedir=${localstatedir}/lib/samba \ |
85 | --disable-gnutls \ | ||
86 | --disable-rpath-install \ | 119 | --disable-rpath-install \ |
87 | --with-shared-modules=${SAMBA4_MODULES} \ | 120 | --with-shared-modules=${SAMBA4_MODULES} \ |
88 | --bundled-libraries=${SAMBA4_LIBS} \ | 121 | --bundled-libraries=${SAMBA4_LIBS} \ |
89 | --with-system-mitkrb5 \ | ||
90 | --without-ad-dc \ | ||
91 | ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ | 122 | ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ |
92 | --with-cluster-support \ | 123 | --with-cluster-support \ |
93 | --with-profiling-data \ | 124 | --with-profiling-data \ |
@@ -113,6 +144,10 @@ do_install_append() { | |||
113 | -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \ | 144 | -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \ |
114 | -i ${D}${systemd_system_unitdir}/*.service | 145 | -i ${D}${systemd_system_unitdir}/*.service |
115 | 146 | ||
147 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then | ||
148 | rm -f ${D}${systemd_system_unitdir}/samba.service | ||
149 | fi | ||
150 | |||
116 | install -d ${D}${sysconfdir}/tmpfiles.d | 151 | install -d ${D}${sysconfdir}/tmpfiles.d |
117 | install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf | 152 | install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf |
118 | echo "d ${localstatedir}/log/samba 0755 root root -" \ | 153 | echo "d ${localstatedir}/log/samba 0755 root root -" \ |
@@ -133,7 +168,7 @@ do_install_append() { | |||
133 | 168 | ||
134 | install -d ${D}${sysconfdir}/samba | 169 | install -d ${D}${sysconfdir}/samba |
135 | echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts | 170 | echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts |
136 | install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf | 171 | install -m644 packaging/RHEL/setup/smb.conf ${D}${sysconfdir}/samba/smb.conf |
137 | install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba | 172 | install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba |
138 | 173 | ||
139 | install -d ${D}${sysconfdir}/default | 174 | install -d ${D}${sysconfdir}/default |
@@ -161,7 +196,7 @@ do_install_append() { | |||
161 | PACKAGES =+ "${PN}-python ${PN}-pidl \ | 196 | PACKAGES =+ "${PN}-python ${PN}-pidl \ |
162 | ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ | 197 | ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ |
163 | winbind \ | 198 | winbind \ |
164 | ${PN}-common ${PN}-base ${PN}-ctdb-tests \ | 199 | ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ |
165 | smbclient" | 200 | smbclient" |
166 | 201 | ||
167 | python samba_populate_packages() { | 202 | python samba_populate_packages() { |
@@ -186,7 +221,8 @@ python samba_populate_packages() { | |||
186 | 221 | ||
187 | PACKAGESPLITFUNCS_prepend = "samba_populate_packages " | 222 | PACKAGESPLITFUNCS_prepend = "samba_populate_packages " |
188 | 223 | ||
189 | RDEPENDS_${PN} += "${PN}-base" | 224 | RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules" |
225 | RDEPENDS_${PN}-python += "pytalloc python-tdb" | ||
190 | 226 | ||
191 | FILES_${PN}-base = "${sbindir}/nmbd \ | 227 | FILES_${PN}-base = "${sbindir}/nmbd \ |
192 | ${sbindir}/smbd \ | 228 | ${sbindir}/smbd \ |
@@ -195,9 +231,14 @@ FILES_${PN}-base = "${sbindir}/nmbd \ | |||
195 | ${localstatedir}/nmbd \ | 231 | ${localstatedir}/nmbd \ |
196 | ${localstatedir}/spool/samba \ | 232 | ${localstatedir}/spool/samba \ |
197 | ${systemd_system_unitdir}/nmb.service \ | 233 | ${systemd_system_unitdir}/nmb.service \ |
198 | ${systemd_system_unitdir}/samba.service \ | ||
199 | ${systemd_system_unitdir}/smb.service" | 234 | ${systemd_system_unitdir}/smb.service" |
200 | 235 | ||
236 | FILES_${PN}-ad-dc = "${sbindir}/samba \ | ||
237 | ${systemd_system_unitdir}/samba.service \ | ||
238 | ${libdir}/krb5/plugins/kdb/samba.so \ | ||
239 | " | ||
240 | RDEPENDS_${PN}-ad-dc = "krb5-kdc" | ||
241 | |||
201 | FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ | 242 | FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ |
202 | ${bindir}/ctdb_run_cluster_tests \ | 243 | ${bindir}/ctdb_run_cluster_tests \ |
203 | ${sysconfdir}/ctdb/nodes \ | 244 | ${sysconfdir}/ctdb/nodes \ |