diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2021-06-08 21:50:44 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-06-09 08:49:21 -0700 |
| commit | 8fc9ecc767196e9dac45c1e3d70ccf35c75b90ad (patch) | |
| tree | d17741fd99c86dd9cfcbf55da66c32de8eb3f4b5 /meta-networking/recipes-connectivity/samba/samba_4.14.5.bb | |
| parent | 8260253c8768a1891ba224e2ac1e2a6fa8f12275 (diff) | |
| download | meta-openembedded-8fc9ecc767196e9dac45c1e3d70ccf35c75b90ad.tar.gz | |
samba: upgrade 4.14.4 -> 4.14.5
Changelog:
https://www.samba.org/samba/history/samba-4.14.5.html
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba_4.14.5.bb')
| -rw-r--r-- | meta-networking/recipes-connectivity/samba/samba_4.14.5.bb | 324 |
1 files changed, 324 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb new file mode 100644 index 0000000000..bc4c615a73 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb | |||
| @@ -0,0 +1,324 @@ | |||
| 1 | HOMEPAGE = "https://www.samba.org/" | ||
| 2 | SECTION = "console/network" | ||
| 3 | |||
| 4 | LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 6 | file://${COREBASE}/meta/files/common-licenses/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \ | ||
| 7 | file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c" | ||
| 8 | |||
| 9 | SAMBA_MIRROR = "http://samba.org/samba/ftp" | ||
| 10 | MIRRORS += "\ | ||
| 11 | ${SAMBA_MIRROR} http://mirror.internode.on.net/pub/samba \n \ | ||
| 12 | ${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ | ||
| 16 | file://smb.conf \ | ||
| 17 | file://volatiles.03_samba \ | ||
| 18 | file://0001-Don-t-check-xsltproc-manpages.patch \ | ||
| 19 | file://0002-do-not-import-target-module-while-cross-compile.patch \ | ||
| 20 | file://0003-Add-config-option-without-valgrind.patch \ | ||
| 21 | file://0004-Add-options-to-configure-the-use-of-libbsd.patch \ | ||
| 22 | file://0005-samba-build-dnsserver_common-code.patch \ | ||
| 23 | file://0006-samba-defeat-iconv-test.patch \ | ||
| 24 | file://0007-wscript_configure_system_gnutls-disable-check-gnutls.patch \ | ||
| 25 | file://0008-source3-wscript-disable-check-fcntl-F_OWNER_EX.patch \ | ||
| 26 | file://0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch \ | ||
| 27 | " | ||
| 28 | |||
| 29 | SRC_URI_append_libc-musl = " \ | ||
| 30 | file://netdb_defines.patch \ | ||
| 31 | file://samba-pam.patch \ | ||
| 32 | file://samba-4.3.9-remove-getpwent_r.patch \ | ||
| 33 | file://cmocka-uintptr_t.patch \ | ||
| 34 | file://samba-fix-musl-lib-without-innetgr.patch \ | ||
| 35 | " | ||
| 36 | |||
| 37 | SRC_URI[md5sum] = "96d275e31387e6c403d6c16465d15b7e" | ||
| 38 | SRC_URI[sha256sum] = "bb6ef5d2f16b85288d823578abc453d9a80514c42e5a2ea2c4e3c60dc42335c3" | ||
| 39 | |||
| 40 | UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz" | ||
| 41 | |||
| 42 | inherit systemd waf-samba cpan-base perlnative update-rc.d | ||
| 43 | # remove default added RDEPENDS on perl | ||
| 44 | RDEPENDS_${PN}_remove = "perl" | ||
| 45 | |||
| 46 | DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 jansson libparse-yapp-perl-native gnutls" | ||
| 47 | |||
| 48 | inherit features_check | ||
| 49 | REQUIRED_DISTRO_FEATURES = "pam" | ||
| 50 | |||
| 51 | DEPENDS_append_libc-musl = " libtirpc" | ||
| 52 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" | ||
| 53 | LDFLAGS_append_libc-musl = " -ltirpc" | ||
| 54 | |||
| 55 | COMPATIBLE_HOST_riscv32 = "null" | ||
| 56 | |||
| 57 | INITSCRIPT_NAME = "samba" | ||
| 58 | INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ." | ||
| 59 | |||
| 60 | SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind" | ||
| 61 | SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service" | ||
| 62 | SYSTEMD_SERVICE_${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}" | ||
| 63 | SYSTEMD_SERVICE_winbind = "winbind.service" | ||
| 64 | |||
| 65 | # There are prerequisite settings to enable ad-dc, so disable the service by default. | ||
| 66 | # Reference: | ||
| 67 | # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller | ||
| 68 | SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" | ||
| 69 | |||
| 70 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
| 71 | #to cross Popen | ||
| 72 | export WAF_NO_PREFORK="yes" | ||
| 73 | |||
| 74 | # Use krb5. Build active domain controller. | ||
| 75 | # | ||
| 76 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ | ||
| 77 | acl cups ad-dc ldap mitkrb5 \ | ||
| 78 | " | ||
| 79 | |||
| 80 | RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt" | ||
| 81 | |||
| 82 | PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl" | ||
| 83 | PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin" | ||
| 84 | PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" | ||
| 85 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" | ||
| 86 | PACKAGECONFIG[sasl] = ",,cyrus-sasl" | ||
| 87 | PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" | ||
| 88 | PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi" | ||
| 89 | PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi" | ||
| 90 | PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind," | ||
| 91 | PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" | ||
| 92 | PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" | ||
| 93 | PACKAGECONFIG[libunwind] = ", , libunwind" | ||
| 94 | PACKAGECONFIG[gpgme] = ",--without-gpgme,," | ||
| 95 | PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," | ||
| 96 | PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd" | ||
| 97 | PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython," | ||
| 98 | PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5," | ||
| 99 | |||
| 100 | SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2" | ||
| 101 | SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4" | ||
| 102 | SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4" | ||
| 103 | SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}" | ||
| 104 | |||
| 105 | # These libraries are supposed to replace others supplied by packages, but decorate the names of | ||
| 106 | # .so files so there will not be a conflict. This is not done consistantly, so be very careful | ||
| 107 | # when adding to this list. | ||
| 108 | # | ||
| 109 | SAMBA4_LIBS="heimdal,cmocka,NONE" | ||
| 110 | |||
| 111 | EXTRA_OECONF += "--enable-fhs \ | ||
| 112 | --with-piddir=/run \ | ||
| 113 | --with-sockets-dir=/run/samba \ | ||
| 114 | --with-modulesdir=${libdir}/samba \ | ||
| 115 | --with-lockdir=${localstatedir}/lib/samba \ | ||
| 116 | --with-cachedir=${localstatedir}/lib/samba \ | ||
| 117 | --disable-rpath-install \ | ||
| 118 | --with-shared-modules=${SAMBA4_MODULES} \ | ||
| 119 | --bundled-libraries=${SAMBA4_LIBS} \ | ||
| 120 | ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ | ||
| 121 | --with-cluster-support \ | ||
| 122 | --with-profiling-data \ | ||
| 123 | --with-libiconv=${STAGING_DIR_HOST}${prefix} \ | ||
| 124 | --with-pam --with-pammodulesdir=${base_libdir}/security \ | ||
| 125 | " | ||
| 126 | |||
| 127 | LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
| 128 | |||
| 129 | do_install_append() { | ||
| 130 | for section in 1 5 7; do | ||
| 131 | install -d ${D}${mandir}/man$section | ||
| 132 | install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section | ||
| 133 | done | ||
| 134 | for section in 1 5 7 8; do | ||
| 135 | install -d ${D}${mandir}/man$section | ||
| 136 | install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section | ||
| 137 | done | ||
| 138 | |||
| 139 | install -d ${D}${systemd_system_unitdir} | ||
| 140 | install -m 0644 ${S}/bin/default/packaging/systemd/*.service ${D}${systemd_system_unitdir}/ | ||
| 141 | sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \ | ||
| 142 | -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \ | ||
| 143 | -i ${D}${systemd_system_unitdir}/*.service | ||
| 144 | |||
| 145 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then | ||
| 146 | rm -f ${D}${systemd_system_unitdir}/samba.service | ||
| 147 | fi | ||
| 148 | |||
| 149 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 150 | install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf | ||
| 151 | echo "d ${localstatedir}/log/samba 0755 root root -" \ | ||
| 152 | >> ${D}${sysconfdir}/tmpfiles.d/samba.conf | ||
| 153 | install -d ${D}${sysconfdir}/init.d | ||
| 154 | install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba | ||
| 155 | sed -e 's,/opt/samba/bin,${sbindir},g' \ | ||
| 156 | -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \ | ||
| 157 | -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \ | ||
| 158 | -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \ | ||
| 159 | -e 's,/usr/bin,${base_bindir},g' \ | ||
| 160 | -i ${D}${sysconfdir}/init.d/samba | ||
| 161 | |||
| 162 | install -d ${D}${sysconfdir}/samba | ||
| 163 | echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts | ||
| 164 | install -m644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf | ||
| 165 | install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba | ||
| 166 | |||
| 167 | install -d ${D}${sysconfdir}/default | ||
| 168 | install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba | ||
| 169 | |||
| 170 | # the items are from ctdb/tests/run_tests.sh | ||
| 171 | for d in cunit eventd eventscripts onnode shellcheck takeover takeover_helper tool; do | ||
| 172 | testdir=${D}${datadir}/ctdb-tests/UNIT/$d | ||
| 173 | install -d $testdir | ||
| 174 | cp ${S}/ctdb/tests/UNIT/$d/*.sh $testdir | ||
| 175 | cp -r ${S}/ctdb/tests/UNIT/$d/scripts ${S}/ctdb/tests/UNIT/$d/stubs $testdir || true | ||
| 176 | done | ||
| 177 | |||
| 178 | # fix file-rdeps qa warning | ||
| 179 | if [ -f ${D}${bindir}/onnode ]; then | ||
| 180 | sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode | ||
| 181 | fi | ||
| 182 | |||
| 183 | chmod 0750 ${D}${sysconfdir}/sudoers.d || true | ||
| 184 | rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log | ||
| 185 | |||
| 186 | for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; do | ||
| 187 | if [ -f "${D}${sbindir}/$f" ]; then | ||
| 188 | sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f | ||
| 189 | fi | ||
| 190 | done | ||
| 191 | if [ -f "${D}${bindir}/samba-tool" ]; then | ||
| 192 | sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool | ||
| 193 | fi | ||
| 194 | |||
| 195 | } | ||
| 196 | |||
| 197 | PACKAGES =+ "${PN}-python3 ${PN}-pidl \ | ||
| 198 | ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ | ||
| 199 | winbind \ | ||
| 200 | ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ | ||
| 201 | smbclient ${PN}-client ${PN}-server ${PN}-test" | ||
| 202 | |||
| 203 | python samba_populate_packages() { | ||
| 204 | def module_hook(file, pkg, pattern, format, basename): | ||
| 205 | pn = d.getVar('PN') | ||
| 206 | d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg) | ||
| 207 | |||
| 208 | mlprefix = d.getVar('MLPREFIX') or '' | ||
| 209 | pam_libdir = d.expand('${base_libdir}/security') | ||
| 210 | pam_pkgname = mlprefix + 'pam-plugin%s' | ||
| 211 | do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True) | ||
| 212 | |||
| 213 | libdir = d.getVar('libdir') | ||
| 214 | do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True) | ||
| 215 | pkglibdir = '%s/samba' % libdir | ||
| 216 | do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True) | ||
| 217 | moduledir = '%s/samba/auth' % libdir | ||
| 218 | do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True) | ||
| 219 | moduledir = '%s/samba/pdb' % libdir | ||
| 220 | do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True) | ||
| 221 | } | ||
| 222 | |||
| 223 | PACKAGESPLITFUNCS_prepend = "samba_populate_packages " | ||
| 224 | PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*" | ||
| 225 | |||
| 226 | RDEPENDS_${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3" | ||
| 227 | RDEPENDS_${PN}-python3 += "pytalloc python3-tdb" | ||
| 228 | |||
| 229 | FILES_${PN}-base = "${sbindir}/nmbd \ | ||
| 230 | ${sbindir}/smbd \ | ||
| 231 | ${sysconfdir}/init.d \ | ||
| 232 | ${systemd_system_unitdir}/nmb.service \ | ||
| 233 | ${systemd_system_unitdir}/smb.service" | ||
| 234 | |||
| 235 | FILES_${PN}-ad-dc = "${sbindir}/samba \ | ||
| 236 | ${systemd_system_unitdir}/samba.service \ | ||
| 237 | ${libdir}/krb5/plugins/kdb/samba.so \ | ||
| 238 | " | ||
| 239 | RDEPENDS_${PN}-ad-dc = "krb5-kdc" | ||
| 240 | |||
| 241 | FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ | ||
| 242 | ${bindir}/ctdb_run_cluster_tests \ | ||
| 243 | ${sysconfdir}/ctdb/nodes \ | ||
| 244 | ${datadir}/ctdb-tests \ | ||
| 245 | ${datadir}/ctdb/tests \ | ||
| 246 | ${localstatedir}/lib/ctdb \ | ||
| 247 | " | ||
| 248 | |||
| 249 | FILES_${BPN}-common = "${sysconfdir}/default \ | ||
| 250 | ${sysconfdir}/samba \ | ||
| 251 | ${sysconfdir}/tmpfiles.d \ | ||
| 252 | ${localstatedir}/lib/samba \ | ||
| 253 | ${localstatedir}/spool/samba \ | ||
| 254 | " | ||
| 255 | |||
| 256 | FILES_${PN} += "${libdir}/vfs/*.so \ | ||
| 257 | ${libdir}/charset/*.so \ | ||
| 258 | ${libdir}/*.dat \ | ||
| 259 | ${libdir}/auth/*.so \ | ||
| 260 | ${datadir}/ctdb/events/* \ | ||
| 261 | " | ||
| 262 | |||
| 263 | FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb" | ||
| 264 | |||
| 265 | FILES_${PN}-testsuite = "${bindir}/gentest \ | ||
| 266 | ${bindir}/locktest \ | ||
| 267 | ${bindir}/masktest \ | ||
| 268 | ${bindir}/ndrdump \ | ||
| 269 | ${bindir}/smbtorture" | ||
| 270 | |||
| 271 | FILES_registry-tools = "${bindir}/regdiff \ | ||
| 272 | ${bindir}/regpatch \ | ||
| 273 | ${bindir}/regshell \ | ||
| 274 | ${bindir}/regtree" | ||
| 275 | |||
| 276 | FILES_winbind = "${sbindir}/winbindd \ | ||
| 277 | ${bindir}/wbinfo \ | ||
| 278 | ${bindir}/ntlm_auth \ | ||
| 279 | ${libdir}/samba/idmap \ | ||
| 280 | ${libdir}/samba/nss_info \ | ||
| 281 | ${libdir}/winbind_krb5_locator.so \ | ||
| 282 | ${libdir}/winbind-krb5-localauth.so \ | ||
| 283 | ${sysconfdir}/init.d/winbind \ | ||
| 284 | ${systemd_system_unitdir}/winbind.service" | ||
| 285 | |||
| 286 | FILES_${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" | ||
| 287 | |||
| 288 | FILES_smbclient = "${bindir}/cifsdd \ | ||
| 289 | ${bindir}/rpcclient \ | ||
| 290 | ${bindir}/smbcacls \ | ||
| 291 | ${bindir}/smbclient \ | ||
| 292 | ${bindir}/smbcquotas \ | ||
| 293 | ${bindir}/smbget \ | ||
| 294 | ${bindir}/smbspool \ | ||
| 295 | ${bindir}/smbtar \ | ||
| 296 | ${bindir}/smbtree \ | ||
| 297 | ${libdir}/samba/smbspool_krb5_wrapper" | ||
| 298 | |||
| 299 | RDEPENDS_${PN}-pidl_append = " perl" | ||
| 300 | FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse" | ||
| 301 | |||
| 302 | RDEPENDS_${PN}-client = "\ | ||
| 303 | smbclient \ | ||
| 304 | winbind \ | ||
| 305 | registry-tools \ | ||
| 306 | ${PN}-pidl \ | ||
| 307 | " | ||
| 308 | |||
| 309 | ALLOW_EMPTY_${PN}-client = "1" | ||
| 310 | |||
| 311 | RDEPENDS_${PN}-server = "\ | ||
| 312 | ${PN} \ | ||
| 313 | winbind \ | ||
| 314 | registry-tools \ | ||
| 315 | " | ||
| 316 | |||
| 317 | ALLOW_EMPTY_${PN}-server = "1" | ||
| 318 | |||
| 319 | RDEPENDS_${PN}-test = "\ | ||
| 320 | ${PN}-ctdb-tests \ | ||
| 321 | ${PN}-testsuite \ | ||
| 322 | " | ||
| 323 | |||
| 324 | ALLOW_EMPTY_${PN}-test = "1" | ||
