summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba_4.1.12.bb')
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.1.12.bb182
1 files changed, 182 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
new file mode 100644
index 000000000..04df8a3ce
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
@@ -0,0 +1,182 @@
1SECTION = "console/network"
2
3LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
5 file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
6 file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
7
8SAMBA_MIRROR = "http://samba.org/samba/ftp"
9MIRRORS += "\
10${SAMBA_MIRROR} http://mirror.internode.on.net/pub/samba \n \
11${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \
12"
13
14SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
15 file://00-fix-typos-in-man-pages.patch \
16 file://01-fix-force-user-sec-ads.patch \
17 file://02-fix-ipv6-join.patch \
18 file://03-net-ads-kerberos-pac.patch \
19 file://04-ipv6-workaround.patch \
20 file://05-fix-gecos-field-with-samlogon.patch \
21 file://06-fix-nmbd-systemd-status-update.patch \
22 file://07-fix-idmap-ad-getgroups-without-gid.patch \
23 file://08-fix-idmap-ad-sfu-with-trusted-domains.patch \
24 file://09-fix-smbclient-echo-cmd-segfault.patch \
25 file://10-improve-service-principal-guessing-in-net.patch \
26 file://11-fix-overwriting-of-spns-during-net-ads-join.patch \
27 file://12-add-precreated-spns-from-AD-during-keytab-generation.patch \
28 file://13-fix-aes-enctype.patch \
29 file://14-fix-dnsupdate.patch \
30 file://15-fix-netbios-name-truncation.patch \
31 file://16-do-not-check-xsltproc-manpages.patch \
32 file://17-execute-prog-by-qemu.patch \
33 file://18-avoid-get-config-by-native-ncurses.patch \
34 file://19-systemd-daemon-is-contained-by-libsystemd.patch \
35 file://20-do-not-import-target-module-while-cross-compile.patch \
36 "
37
38SRC_URI[md5sum] = "232016d7581a1ba11e991ec2674553c4"
39SRC_URI[sha256sum] = "033604674936bf5c77d7df299b0626052b84a41505a6a6afe902f6274fc29898"
40
41inherit systemd waf-samba cpan-base perlnative
42
43DEPENDS += "readline virtual/libiconv zlib popt talloc libtdb libtevent libldb krb5 ctdb"
44
45SYSVINITTYPE_linuxstdbase = "lsb"
46SYSVINITTYPE = "sysv"
47
48PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
49 ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVINITTYPE}', '', d)} \
50 ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
51 ${@base_contains('DISTRO_FEATURES', 'zeroconf', 'zeroconf', '', d)} \
52 acl aio cups ldap \
53"
54
55RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'lsb', '', d)}"
56
57PACKAGECONFIG[acl] = "--with-acl-support,---without-acl-support,acl"
58PACKAGECONFIG[aio] = "--with-aio-support,---without-aio-support,libaio"
59PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
60PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
61PACKAGECONFIG[lsb] = ",,lsb"
62PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
63PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
64PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
65PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
66
67SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
68SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
69SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
70SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
71
72SAMBA4_LIBS="heimdal,!zlib,!popt,!talloc,!pytalloc,!pytalloc-util,!tevent,!pytevent,!tdb,!pytdb,!ldb,!pyldb"
73
74PERL_VERNDORLIB="${libdir}/perl5/vendor_perl/${PERLVERSION}"
75
76EXTRA_OECONF += "--enable-fhs \
77 --with-piddir=${localstatedir}/run \
78 --with-sockets-dir=${localstatedir}/run/samba \
79 --with-modulesdir=${libdir}/samba \
80 --with-pammodulesdir=${base_libdir}/security \
81 --with-lockdir=${localstatedir}/lib/samba \
82 --with-cachedir=${localstatedir}/lib/samba \
83 --with-perl-lib-install-dir=${PERL_VERNDORLIB} \
84 --disable-gnutls \
85 --disable-rpath-install \
86 --with-shared-modules=${SAMBA4_MODULES} \
87 --bundled-libraries=${SAMBA4_LIBS} \
88 --with-system-mitkrb5 \
89 --without-ad-dc \
90 ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
91 --with-cluster-support \
92 --enable-old-ctdb \
93 --with-profiling-data \
94 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
95 "
96
97LDFLAGS += "-Wl,-z,relro,-z,now"
98
99do_install_append() {
100 rmdir --ignore-fail-on-non-empty "${D}/${localstatedir}/run"
101
102 if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
103 install -d ${D}${systemd_unitdir}/system
104 for i in nmb smb winbind; do
105 install -m 0644 packaging/systemd/$i.service ${D}${systemd_unitdir}/system
106 done
107 sed -e 's,@BASE_BINDIR@,${base_bindir},g' \
108 -e 's,@SBINDIR@,${sbindir},g' \
109 -i ${D}${systemd_unitdir}/system/*.service
110
111 install -d ${D}${sysconfdir}/tmpfiles.d
112 echo "d ${localstatedir}/log/samba 0755 root root -" \
113 > ${D}${sysconfdir}/tmpfiles.d/99-${BPN}.conf
114 elif ${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'true', 'false', d)}; then
115 install -d ${D}${sysconfdir}/init.d
116 install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d
117 update-rc.d -r ${D} samba.sh start 20 3 5 .
118 update-rc.d -r ${D} samba.sh start 20 0 1 6 .
119 elif ${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'true', 'false', d)}; then
120 install -d ${D}${sysconfdir}/init.d
121 install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba.sh
122 update-rc.d -r ${D} samba.sh start 20 3 5 .
123 update-rc.d -r ${D} samba.sh start 20 0 1 6 .
124 fi
125
126 install -d ${D}${sysconfdir}/samba
127 echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
128 install -m644 packaging/LSB/smb.conf ${D}${sysconfdir}/samba/smb.conf
129
130 install -d ${D}${libdir}/tmpfiles.d
131 install -m644 packaging/systemd/samba.conf.tmp ${D}${libdir}/tmpfiles.d/samba.conf
132
133 install -d ${D}${sysconfdir}/sysconfig/
134 install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/sysconfig/samba
135}
136
137PACKAGES += "${PN}-python ${PN}-python-dbg ${PN}-pidl libwinbind libwinbind-dbg libwinbind-krb5-locator"
138
139FILES_${PN} += "/run \
140 ${base_libdir}/security/pam_smbpass.so \
141 ${libdir}/tmpfiles.d/* \
142 "
143
144SMB_SERVICE="${systemd_unitdir}/system/nmb.service ${systemd_unitdir}/system/smb.service"
145SMB_SYSV="${sysconfdir}/init.d ${sysconfdir}/rc?.d"
146FILES_${PN} +="${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${SMB_SERVICE}', '', d)}"
147FILES_${PN} +="${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SMB_SYSV}', '', d)}"
148
149FILES_${PN}-dbg += "${libdir}/samba/idmap/.debug/* \
150 ${libdir}/samba/pdb/.debug/* \
151 ${libdir}/samba/auth/.debug/* \
152 ${libdir}/samba/nss_info/.debug/* \
153 ${libdir}/samba/ldb/.debug/* \
154 ${libdir}/samba/vfs/.debug/* \
155 ${base_libdir}/security/.debug/pam_smbpass.so \
156 "
157
158FILES_libwinbind = "${base_libdir}/security/pam_winbind.so"
159FILES_libwinbind += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/winbind.service', '', d)}"
160FILES_libwinbind-dbg = "${base_libdir}/security/.debug/pam_winbind.so"
161FILES_libwinbind-krb5-locator = "${libdir}/winbind_krb5_locator.so"
162
163FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.so \
164 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/*.py \
165 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/*.so \
166 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/*.so \
167 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/*.py \
168 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/external/* \
169 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/netcmd/*.py \
170 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/provision/*.py \
171 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/*.py \
172 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/*.so \
173 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/tests/* \
174 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/web_server/* \
175 "
176FILES_${PN}-python-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/* \
177 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/.debug/* \
178 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/samba3/.debug/* \
179 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/samba/dcerpc/.debug/* \
180 "
181
182FILES_${PN}-pidl = "${bindir}/pidl ${PERL_VERNDORLIB}/*"