diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-13 13:58:15 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-13 14:37:53 +0200 |
commit | afd70256706ccd1ea416636eb61cb5160cffbe3c (patch) | |
tree | f64e7525c4bb9a192a180bb804c8c205384a8ffa /meta-oe/recipes-connectivity/samba | |
parent | 2ccf9373c1d8e03cad11b06ac2b4fe545e92f604 (diff) | |
download | meta-openembedded-afd70256706ccd1ea416636eb61cb5160cffbe3c.tar.gz |
samba 3.5.6: import from OE rev a54456425ea3ce4c7cdfa958cec3ba34539cfeec
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-connectivity/samba')
15 files changed, 708 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/samba/samba-basic.inc b/meta-oe/recipes-connectivity/samba/samba-basic.inc new file mode 100644 index 000000000..f0a9bd776 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba-basic.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | SRC_URI += "file://config-lfs.patch \ | ||
2 | file://quota.patch;striplevel=0 \ | ||
3 | " | ||
4 | |||
5 | EXTRA_OECONF += "\ | ||
6 | --without-ads \ | ||
7 | --without-winbind \ | ||
8 | --without-ldap \ | ||
9 | --without-krb5" | ||
10 | |||
11 | PACKAGES =+ "libnetapi libtdb libsmbsharemodes libsmbclient libsmbclient-dev cifs cifs-doc swat" | ||
12 | |||
13 | FILES_libnetapi = "${libdir}/libnetapi.so.*" | ||
14 | FILES_libsmbsharemodes = "${libdir}/libsmbsharemodes.so.*" | ||
15 | FILES_libtdb = "${libdir}/libtdb.so.*" | ||
16 | FILES_cifs = "${base_sbindir}/mount.cifs ${base_sbindir}/umount.cifs" | ||
17 | FILES_cifs-doc = "${mandir}/man8/mount.cifs.8 ${mandir}/man8/umount.cifs.8" | ||
18 | FILES_libsmbclient = "${libdir}/libsmbclient.so.*" | ||
19 | FILES_libsmbclient-dev = "${libdir}/libsmbclient.so ${includedir}" | ||
20 | FILES_swat = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg" | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc new file mode 100644 index 000000000..e5fa06ef6 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba.inc | |||
@@ -0,0 +1,88 @@ | |||
1 | SECTION = "console/network" | ||
2 | LICENSE = "GPL" | ||
3 | DEPENDS = "readline virtual/libiconv talloc" | ||
4 | |||
5 | SRC_URI = "http://samba.org/samba/ftp/stable/samba-${PV}.tar.gz \ | ||
6 | file://volatiles.03_samba \ | ||
7 | file://smb.conf \ | ||
8 | file://init \ | ||
9 | file://tdb.pc \ | ||
10 | " | ||
11 | |||
12 | S = "${WORKDIR}/samba-${PV}/source" | ||
13 | |||
14 | inherit autotools update-rc.d | ||
15 | |||
16 | FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat \ | ||
17 | ${libdir}/auth/*.so ${libdir}/security/*.so" | ||
18 | FILES_${PN}-dbg += "${libdir}/vfs/.debug/*.so ${libdir}/charset/.debug/*.so \ | ||
19 | ${libdir}/auth/.debug/*.so ${libdir}/security/.debug/*.so" | ||
20 | |||
21 | SAMBAMMAP = "no" | ||
22 | SAMBAMMAP_libc-glibc = "yes" | ||
23 | |||
24 | # The file system settings --foodir=dirfoo and overridden unconditionally | ||
25 | # in the samba config by --with-foodir=dirfoo - even if the --with is not | ||
26 | # specified! Fix that here. Set the privatedir to /etc/samba/private. | ||
27 | EXTRA_OECONF='--disable-cups \ | ||
28 | --with-readline=${STAGING_LIBDIR}/.. \ | ||
29 | --with-libiconv=${STAGING_LIBDIR}/.. \ | ||
30 | --without-automount \ | ||
31 | --with-configdir=${sysconfdir}/samba \ | ||
32 | --with-privatedir=${sysconfdir}/samba/private \ | ||
33 | --with-lockdir=${localstatedir}/lock \ | ||
34 | --with-piddir=${localstatedir}/run \ | ||
35 | --with-logfilebase=${localstatedir}/log \ | ||
36 | --with-libdir=${libdir} \ | ||
37 | --with-mandir=${mandir} \ | ||
38 | --with-swatdir=${datadir}/swat \ | ||
39 | --with-aio-support \ | ||
40 | --without-libtalloc \ | ||
41 | samba_cv_struct_timespec=yes \ | ||
42 | libreplace_cv_HAVE_MMAP=${SAMBAMMAP}' | ||
43 | |||
44 | INITSCRIPT_NAME = "samba" | ||
45 | # No dependencies, goes in at level 20 (NOTE: take care with the | ||
46 | # level, later levels put the shutdown later too - see the links | ||
47 | # in rc6.d, the shutdown must precede network shutdown). | ||
48 | INITSCRIPT_PARAMS = "defaults" | ||
49 | CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf" | ||
50 | |||
51 | do_configure_prepend () { | ||
52 | ./script/mkversion.sh | ||
53 | if [ ! -e acinclude.m4 ]; then | ||
54 | touch aclocal.m4 | ||
55 | cat aclocal.m4 > acinclude.m4 | ||
56 | fi | ||
57 | } | ||
58 | |||
59 | do_compile () { | ||
60 | oe_runmake proto_exists | ||
61 | base_do_compile | ||
62 | } | ||
63 | |||
64 | do_install_append() { | ||
65 | install -d ${D}${libdir}/pkgconfig/ | ||
66 | cp ${WORKDIR}/tdb.pc ${D}${libdir}/pkgconfig/ | ||
67 | mv ${D}${libdir}/libsmbclient.so ${D}${libdir}/libsmbclient.so.0 || true | ||
68 | ln -sf libsmbclient.so.0 ${D}${libdir}/libsmbclient.so | ||
69 | mkdir -p ${D}${base_sbindir} | ||
70 | rm -f ${D}${bindir}/*.old | ||
71 | rm -f ${D}${sbindir}/*.old | ||
72 | [ -f ${D}${sbindir}/mount.cifs ] && mv ${D}${sbindir}/mount.cifs ${D}${base_sbindir}/ | ||
73 | [ -f ${D}${sbindir}/umount.cifs ] && mv ${D}${sbindir}/umount.cifs ${D}${base_sbindir}/ | ||
74 | |||
75 | # This is needed for < 3.2.4 | ||
76 | rm -f ${D}${sbindir}/mount.smbfs ${D}${base_sbindir}/mount.smbfs | ||
77 | if [ -f ${D}${bindir}/smbmount ]; then | ||
78 | ln -sf ${bindir}/smbmount ${D}${base_sbindir}/mount.smb | ||
79 | ln -sf ${bindir}/smbmount ${D}${base_sbindir}/mount.smbfs | ||
80 | fi | ||
81 | |||
82 | install -D -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/samba | ||
83 | install -D -m 644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf | ||
84 | install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/volatiles.03_samba | ||
85 | install -d ${D}/var/log/samba | ||
86 | install -d ${D}/var/spool/samba | ||
87 | } | ||
88 | |||
diff --git a/meta-oe/recipes-connectivity/samba/samba/Managing-Samba.txt b/meta-oe/recipes-connectivity/samba/samba/Managing-Samba.txt new file mode 100644 index 000000000..01f759282 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/Managing-Samba.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | This device is running a bare-bone Samba server which allows easy | ||
2 | transfer of files and directories between any networked desktop PC and | ||
3 | your networked PDA. | ||
4 | |||
5 | Since it is generally a bad idea to allow everyone read and write access | ||
6 | to your PDA, you will have to configure at least one user to get access to | ||
7 | any shared folder. | ||
8 | |||
9 | How to create a Samba user with password: | ||
10 | |||
11 | - If you haven't already created a non-root user, do so now: | ||
12 | root@poodle:/usr/bin# adduser testuser | ||
13 | Changing password for testuser | ||
14 | Enter the new password (minimum of 5, maximum of 8 characters) | ||
15 | Please use a combination of upper and lower case letters and numbers. | ||
16 | Enter new password: | ||
17 | Bad password: too short. | ||
18 | |||
19 | Warning: weak password (continuing). | ||
20 | Re-enter new password: | ||
21 | Password changed. | ||
22 | root@poodle:/usr/bin# | ||
23 | |||
24 | - Note that the password you entered will _not_ be your samba password. | ||
25 | Samba uses its own password database. | ||
26 | |||
27 | - Add a Samba password for your user: | ||
28 | root@poodle:/usr/bin# smbpasswd -a testuser | ||
29 | New SMB password: | ||
30 | Retype new SMB password: | ||
31 | Added user testuser. | ||
32 | root@poodle:/usr/bin# | ||
33 | |||
34 | - After you have added your new samba user, you'll have to restart the samba | ||
35 | server by running "/etc/init.d/samba restart" or by rebooting the device | ||
36 | |||
37 | - Use the newly created username / password combination to access your network | ||
38 | shares. Please note the the Samba username must also exist as a unix username! | ||
39 | |||
40 | |||
diff --git a/meta-oe/recipes-connectivity/samba/samba/cifs.patch b/meta-oe/recipes-connectivity/samba/samba/cifs.patch new file mode 100644 index 000000000..ee6dab567 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/cifs.patch | |||
@@ -0,0 +1,10 @@ | |||
1 | --- source/client/mount.cifs.c.old 2004-11-28 02:33:52.000000000 +1030 | ||
2 | +++ source/client/mount.cifs.c 2004-11-28 02:33:59.000000000 +1030 | ||
3 | @@ -36,6 +36,7 @@ | ||
4 | #include <string.h> | ||
5 | #include <mntent.h> | ||
6 | #include <fcntl.h> | ||
7 | +#include <linux/limits.h> | ||
8 | |||
9 | #define MOUNT_CIFS_VERSION_MAJOR "1" | ||
10 | #define MOUNT_CIFS_VERSION_MINOR "2" | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/config-h.patch b/meta-oe/recipes-connectivity/samba/samba/config-h.patch new file mode 100644 index 000000000..eeb22684e --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/config-h.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | diff -urN source.old//include/config.h.in source//include/config.h.in | ||
2 | --- source.old//include/config.h.in 2008-11-20 14:45:04.000000000 +0000 | ||
3 | +++ source//include/config.h.in 2008-11-30 21:04:17.990008933 +0000 | ||
4 | @@ -2672,7 +2672,7 @@ | ||
5 | #undef USE_SETEUID | ||
6 | |||
7 | /* Whether setresuid() is available */ | ||
8 | -#undef USE_SETRESUID | ||
9 | +#define USE_SETRESUID 1 | ||
10 | |||
11 | /* Whether setreuid() is available */ | ||
12 | #undef USE_SETREUID | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/config-lfs.patch b/meta-oe/recipes-connectivity/samba/samba/config-lfs.patch new file mode 100644 index 000000000..b37ed690c --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/config-lfs.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Cache the check for Linux LFS support, so it can be prepopulated from | ||
2 | the site cache for configure variables for cross-compiling. Without this, | ||
3 | samba gets the idea that it can use dirent64 and friends without defining | ||
4 | the flags it needs to get it, such as _GNU_SOURCE and _LARGEFILE64_SOURCE. | ||
5 | |||
6 | Symptoms of getting the configuration wrong on cross-compile inculde | ||
7 | warnings such as | ||
8 | |||
9 | smbd/trans2.c: In function `get_lanman2_dir_entry': | ||
10 | smbd/trans2.c:1065: warning: right shift count >= width of type | ||
11 | |||
12 | and errors like | ||
13 | |||
14 | smbd/vfs.c:630: error: dereferencing pointer to incomplete type | ||
15 | |||
16 | (when trying to dereference dirent64.) | ||
17 | |||
18 | --- source/configure.in.orig 2005-05-29 14:46:18.000000000 -0700 | ||
19 | +++ source/configure.in 2005-05-29 14:51:57.000000000 -0700 | ||
20 | @@ -588,7 +588,7 @@ | ||
21 | # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. | ||
22 | # | ||
23 | *linux*) | ||
24 | - AC_MSG_CHECKING([for LFS support]) | ||
25 | + AC_CACHE_CHECK([for LFS support], samba_cv_LINUX_LFS_SUPPORT,[ | ||
26 | old_CPPFLAGS="$CPPFLAGS" | ||
27 | CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" | ||
28 | AC_TRY_RUN([ | ||
29 | @@ -627,15 +627,14 @@ | ||
30 | exit(1); | ||
31 | #endif | ||
32 | } | ||
33 | -], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) | ||
34 | - CPPFLAGS="$old_CPPFLAGS" | ||
35 | - if test x$LINUX_LFS_SUPPORT = xyes ; then | ||
36 | +], [samba_cv_LINUX_LFS_SUPPORT=yes], [samba_cv_LINUX_LFS_SUPPORT=no], [samba_cv_LINUX_LFS_SUPPORT=cross]) | ||
37 | + CPPFLAGS="$old_CPPFLAGS"]) | ||
38 | + if test x"$samba_cv_LINUX_LFS_SUPPORT" = x"yes" ; then | ||
39 | CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" | ||
40 | AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) | ||
41 | AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) | ||
42 | AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) | ||
43 | fi | ||
44 | - AC_MSG_RESULT([$LINUX_LFS_SUPPORT]) | ||
45 | ;; | ||
46 | |||
47 | # | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/configure-3.3.0.patch b/meta-oe/recipes-connectivity/samba/samba/configure-3.3.0.patch new file mode 100644 index 000000000..19fb9864d --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/configure-3.3.0.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | diff -urN source.old//configure source//configure | ||
2 | --- source.old//configure 2009-01-27 07:53:11.000000000 +0000 | ||
3 | +++ source//configure 2009-01-31 21:07:25.811887936 +0000 | ||
4 | @@ -43860,13 +43860,7 @@ | ||
5 | *linux*) | ||
6 | # glibc <= 2.3.2 has a broken getgrouplist | ||
7 | if test "$cross_compiling" = yes; then | ||
8 | - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 | ||
9 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | ||
10 | -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling | ||
11 | -See \`config.log' for more details." >&5 | ||
12 | -$as_echo "$as_me: error: cannot run test program while cross compiling | ||
13 | -See \`config.log' for more details." >&2;} | ||
14 | - { (exit 1); exit 1; }; }; } | ||
15 | +linux_getgrouplist_ok=no | ||
16 | else | ||
17 | cat >conftest.$ac_ext <<_ACEOF | ||
18 | /* confdefs.h. */ | ||
19 | diff -urN source.old//configure.in source//configure.in | ||
20 | --- source.old//configure.in 2009-01-26 13:56:34.000000000 +0000 | ||
21 | +++ source//configure.in 2009-01-31 21:04:39.051889949 +0000 | ||
22 | @@ -280,6 +280,8 @@ | ||
23 | fi | ||
24 | AC_SUBST(BROKEN_CC) | ||
25 | |||
26 | +AC_TRY_COMPILE([],[(void)sizeof(char[-1])],AC_MSG_ERROR([configure's compilation assert doesn't work with $CC])) | ||
27 | + | ||
28 | dnl Check if the C compiler understands -Werror | ||
29 | AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ | ||
30 | AC_TRY_RUN_STRICT([ | ||
31 | @@ -330,25 +332,11 @@ | ||
32 | # a runtime test is needed here | ||
33 | AC_SUBST(PIDL_ARGS) | ||
34 | AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ | ||
35 | - AC_TRY_RUN( | ||
36 | + AC_TRY_COMPILE([], | ||
37 | [ | ||
38 | - #include <stdio.h> | ||
39 | enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; | ||
40 | - int main(void) { | ||
41 | - enum negative_values v1 = NEGATIVE_VALUE; | ||
42 | - unsigned v2 = NEGATIVE_VALUE; | ||
43 | - | ||
44 | - if (v1 != 0xFFFFFFFF) { | ||
45 | - printf("%u != 0xFFFFFFFF\n", v1); | ||
46 | - return 1; | ||
47 | - } | ||
48 | - if (v2 != 0xFFFFFFFF) { | ||
49 | - printf("%u != 0xFFFFFFFF\n", v2); | ||
50 | - return 1; | ||
51 | - } | ||
52 | - | ||
53 | - return 0; | ||
54 | - } | ||
55 | + (void)sizeof(char[1-2*( (unsigned)NEGATIVE_VALUE != 0xFFFFFFFF)]); | ||
56 | + (void)sizeof(char[1-2*((enum negative_values)NEGATIVE_VALUE != 0xFFFFFFFF)]); | ||
57 | ], | ||
58 | samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)]) | ||
59 | if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then | ||
60 | @@ -1224,22 +1212,12 @@ | ||
61 | case "$host_os" in | ||
62 | *linux*) | ||
63 | # glibc <= 2.3.2 has a broken getgrouplist | ||
64 | - AC_TRY_RUN([ | ||
65 | -#include <unistd.h> | ||
66 | + AC_TRY_COMPILE([ | ||
67 | #include <sys/utsname.h> | ||
68 | -main() { | ||
69 | - /* glibc up to 2.3 has a broken getgrouplist */ | ||
70 | +],[ | ||
71 | #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) | ||
72 | - int libc_major = __GLIBC__; | ||
73 | - int libc_minor = __GLIBC_MINOR__; | ||
74 | - | ||
75 | - if (libc_major < 2) | ||
76 | - exit(1); | ||
77 | - if ((libc_major == 2) && (libc_minor <= 3)) | ||
78 | - exit(1); | ||
79 | + (void)sizeof(char[1-2*(__GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)]); | ||
80 | #endif | ||
81 | - exit(0); | ||
82 | -} | ||
83 | ], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) | ||
84 | if test x"$linux_getgrouplist_ok" = x"yes"; then | ||
85 | AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/init b/meta-oe/recipes-connectivity/samba/samba/init new file mode 100644 index 000000000..cb57b17de --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/init | |||
@@ -0,0 +1,58 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/samba and type | ||
5 | # > update-rc.d samba defaults 60 | ||
6 | # | ||
7 | |||
8 | |||
9 | smbd=/usr/sbin/smbd | ||
10 | test -x "$smbd" || exit 0 | ||
11 | nmbd=/usr/sbin/nmbd | ||
12 | test -x "$nmbd" || exit 0 | ||
13 | |||
14 | |||
15 | case "$1" in | ||
16 | start) | ||
17 | echo -n "Starting Samba: smbd" | ||
18 | start-stop-daemon --start --quiet --exec $smbd | ||
19 | echo -n " nmbd" | ||
20 | start-stop-daemon --start --quiet --exec $nmbd | ||
21 | echo "." | ||
22 | ;; | ||
23 | stop) | ||
24 | echo -n "Stopping Samba: smbd" | ||
25 | start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid | ||
26 | echo -n " nmbd" | ||
27 | start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid | ||
28 | echo "." | ||
29 | ;; | ||
30 | reload|force-reload) | ||
31 | start-stop-daemon --stop --quiet --signal 1 --exec $smbd | ||
32 | start-stop-daemon --stop --quiet --signal 1 --exec $nmbd | ||
33 | ;; | ||
34 | restart) | ||
35 | echo -n "Stopping Samba: smbd" | ||
36 | start-stop-daemon --stop --quiet --pidfile /var/run/smbd.pid | ||
37 | echo -n " nmbd" | ||
38 | start-stop-daemon --stop --quiet --pidfile /var/run/nmbd.pid | ||
39 | echo "" | ||
40 | echo -n "Waiting for samba processes to die off" | ||
41 | for i in 1 2 3 ; | ||
42 | do | ||
43 | sleep 1 | ||
44 | echo -n "." | ||
45 | done | ||
46 | echo "" | ||
47 | echo -n "Starting Samba: smbd" | ||
48 | start-stop-daemon --start --quiet --exec $smbd | ||
49 | echo -n " nmbd" | ||
50 | start-stop-daemon --start --quiet --exec $nmbd | ||
51 | echo "." | ||
52 | ;; | ||
53 | *) | ||
54 | echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" | ||
55 | exit 1 | ||
56 | esac | ||
57 | |||
58 | exit 0 \ No newline at end of file | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/mtab.patch b/meta-oe/recipes-connectivity/samba/samba/mtab.patch new file mode 100644 index 000000000..2ee8ba094 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/mtab.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | diff -urN source/client/mtab.c samba-3.2.7//source/client/mtab.c | ||
2 | --- source/client/mtab.c 2008-12-19 13:57:33.000000000 +0000 | ||
3 | +++ source/client/mtab.c 2009-01-09 23:14:00.717671075 +0000 | ||
4 | @@ -32,6 +32,7 @@ | ||
5 | #include <errno.h> | ||
6 | #include <stdio.h> | ||
7 | #include <sys/time.h> | ||
8 | +#include <sys/stat.h> | ||
9 | #include <time.h> | ||
10 | #include <fcntl.h> | ||
11 | #include <mntent.h> | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/quota.patch b/meta-oe/recipes-connectivity/samba/samba/quota.patch new file mode 100644 index 000000000..6f42ff868 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/quota.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- lib/sysquotas_4A.c.old 2005-07-03 17:16:00.000000000 +0200 | ||
2 | +++ lib/sysquotas_4A.c 2005-07-03 17:10:09.000000000 +0200 | ||
3 | @@ -28,6 +28,8 @@ | ||
4 | /* long quotactl(int cmd, char *special, qid_t id, caddr_t addr) */ | ||
5 | /* this is used by: HPUX,IRIX */ | ||
6 | |||
7 | + #define _LINUX_QUOTA_VERSION 1 | ||
8 | + | ||
9 | #ifdef HAVE_SYS_TYPES_H | ||
10 | #include <sys/types.h> | ||
11 | #endif | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/smb.conf b/meta-oe/recipes-connectivity/samba/samba/smb.conf new file mode 100644 index 000000000..f07e3e4ec --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/smb.conf | |||
@@ -0,0 +1,266 @@ | |||
1 | # This is the main Samba configuration file. You should read the | ||
2 | # smb.conf(5) manual page in order to understand the options listed | ||
3 | # here. Samba has a huge number of configurable options (perhaps too | ||
4 | # many!) most of which are not shown in this example | ||
5 | # | ||
6 | # For a step to step guide on installing, configuring and using samba, | ||
7 | # read the Samba-HOWTO-Collection. This may be obtained from: | ||
8 | # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf | ||
9 | # | ||
10 | # Many working examples of smb.conf files can be found in the | ||
11 | # Samba-Guide which is generated daily and can be downloaded from: | ||
12 | # http://www.samba.org/samba/docs/Samba-Guide.pdf | ||
13 | # | ||
14 | # Any line which starts with a ; (semi-colon) or a # (hash) | ||
15 | # is a comment and is ignored. In this example we will use a # | ||
16 | # for commentry and a ; for parts of the config file that you | ||
17 | # may wish to enable | ||
18 | # | ||
19 | # NOTE: Whenever you modify this file you should run the command "testparm" | ||
20 | # to check that you have not made any basic syntactic errors. | ||
21 | # | ||
22 | #======================= Global Settings ===================================== | ||
23 | [global] | ||
24 | |||
25 | # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH | ||
26 | workgroup = MYGROUP | ||
27 | |||
28 | # server string is the equivalent of the NT Description field | ||
29 | server string = Samba Server | ||
30 | |||
31 | # Security mode. Defines in which mode Samba will operate. Possible | ||
32 | # values are share, user, server, domain and ads. Most people will want | ||
33 | # user level security. See the Samba-HOWTO-Collection for details. | ||
34 | security = user | ||
35 | |||
36 | # This option is important for security. It allows you to restrict | ||
37 | # connections to machines which are on your local network. The | ||
38 | # following example restricts access to two C class networks and | ||
39 | # the "loopback" interface. For more examples of the syntax see | ||
40 | # the smb.conf man page | ||
41 | ; hosts allow = 192.168.1. 192.168.2. 127. | ||
42 | |||
43 | # If you want to automatically load your printer list rather | ||
44 | # than setting them up individually then you'll need this | ||
45 | load printers = yes | ||
46 | |||
47 | # you may wish to override the location of the printcap file | ||
48 | ; printcap name = /etc/printcap | ||
49 | |||
50 | # on SystemV system setting printcap name to lpstat should allow | ||
51 | # you to automatically obtain a printer list from the SystemV spool | ||
52 | # system | ||
53 | ; printcap name = lpstat | ||
54 | |||
55 | # It should not be necessary to specify the print system type unless | ||
56 | # it is non-standard. Currently supported print systems include: | ||
57 | # bsd, cups, sysv, plp, lprng, aix, hpux, qnx | ||
58 | ; printing = cups | ||
59 | |||
60 | # Uncomment this if you want a guest account, you must add this to /etc/passwd | ||
61 | # otherwise the user "nobody" is used | ||
62 | ; guest account = pcguest | ||
63 | |||
64 | # this tells Samba to use a separate log file for each machine | ||
65 | # that connects | ||
66 | log file = /var/log/samba/log.%m | ||
67 | |||
68 | # Put a capping on the size of the log files (in Kb). | ||
69 | max log size = 50 | ||
70 | |||
71 | # Use password server option only with security = server | ||
72 | # The argument list may include: | ||
73 | # password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name] | ||
74 | # or to auto-locate the domain controller/s | ||
75 | # password server = * | ||
76 | ; password server = <NT-Server-Name> | ||
77 | |||
78 | # Use the realm option only with security = ads | ||
79 | # Specifies the Active Directory realm the host is part of | ||
80 | ; realm = MY_REALM | ||
81 | |||
82 | # Backend to store user information in. New installations should | ||
83 | # use either tdbsam or ldapsam. smbpasswd is available for backwards | ||
84 | # compatibility. tdbsam requires no further configuration. | ||
85 | ; passdb backend = tdbsam | ||
86 | |||
87 | # Using the following line enables you to customise your configuration | ||
88 | # on a per machine basis. The %m gets replaced with the netbios name | ||
89 | # of the machine that is connecting. | ||
90 | # Note: Consider carefully the location in the configuration file of | ||
91 | # this line. The included file is read at that point. | ||
92 | ; include = /usr/local/samba/lib/smb.conf.%m | ||
93 | |||
94 | # Configure Samba to use multiple interfaces | ||
95 | # If you have multiple network interfaces then you must list them | ||
96 | # here. See the man page for details. | ||
97 | ; interfaces = 192.168.12.2/24 192.168.13.2/24 | ||
98 | |||
99 | # Browser Control Options: | ||
100 | # set local master to no if you don't want Samba to become a master | ||
101 | # browser on your network. Otherwise the normal election rules apply | ||
102 | ; local master = no | ||
103 | |||
104 | # OS Level determines the precedence of this server in master browser | ||
105 | # elections. The default value should be reasonable | ||
106 | ; os level = 33 | ||
107 | |||
108 | # Domain Master specifies Samba to be the Domain Master Browser. This | ||
109 | # allows Samba to collate browse lists between subnets. Don't use this | ||
110 | # if you already have a Windows NT domain controller doing this job | ||
111 | ; domain master = yes | ||
112 | |||
113 | # Preferred Master causes Samba to force a local browser election on startup | ||
114 | # and gives it a slightly higher chance of winning the election | ||
115 | ; preferred master = yes | ||
116 | |||
117 | # Enable this if you want Samba to be a domain logon server for | ||
118 | # Windows95 workstations. | ||
119 | ; domain logons = yes | ||
120 | |||
121 | # if you enable domain logons then you may want a per-machine or | ||
122 | # per user logon script | ||
123 | # run a specific logon batch file per workstation (machine) | ||
124 | ; logon script = %m.bat | ||
125 | # run a specific logon batch file per username | ||
126 | ; logon script = %U.bat | ||
127 | |||
128 | # Where to store roving profiles (only for Win95 and WinNT) | ||
129 | # %L substitutes for this servers netbios name, %U is username | ||
130 | # You must uncomment the [Profiles] share below | ||
131 | ; logon path = \\%L\Profiles\%U | ||
132 | |||
133 | # Windows Internet Name Serving Support Section: | ||
134 | # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server | ||
135 | ; wins support = yes | ||
136 | |||
137 | # WINS Server - Tells the NMBD components of Samba to be a WINS Client | ||
138 | # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both | ||
139 | ; wins server = w.x.y.z | ||
140 | |||
141 | # WINS Proxy - Tells Samba to answer name resolution queries on | ||
142 | # behalf of a non WINS capable client, for this to work there must be | ||
143 | # at least one WINS Server on the network. The default is NO. | ||
144 | ; wins proxy = yes | ||
145 | |||
146 | # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names | ||
147 | # via DNS nslookups. The default is NO. | ||
148 | dns proxy = no | ||
149 | |||
150 | # These scripts are used on a domain controller or stand-alone | ||
151 | # machine to add or delete corresponding unix accounts | ||
152 | ; add user script = /usr/sbin/useradd %u | ||
153 | ; add group script = /usr/sbin/groupadd %g | ||
154 | ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u | ||
155 | ; delete user script = /usr/sbin/userdel %u | ||
156 | ; delete user from group script = /usr/sbin/deluser %u %g | ||
157 | ; delete group script = /usr/sbin/groupdel %g | ||
158 | |||
159 | |||
160 | #============================ Share Definitions ============================== | ||
161 | [homes] | ||
162 | comment = Home Directories | ||
163 | browseable = yes | ||
164 | writable = yes | ||
165 | |||
166 | # Un-comment the following and create the netlogon directory for Domain Logons | ||
167 | ; [netlogon] | ||
168 | ; comment = Network Logon Service | ||
169 | ; path = /usr/local/samba/lib/netlogon | ||
170 | ; guest ok = yes | ||
171 | ; writable = no | ||
172 | ; share modes = no | ||
173 | |||
174 | |||
175 | # Un-comment the following to provide a specific roving profile share | ||
176 | # the default is to use the user's home directory | ||
177 | ;[Profiles] | ||
178 | ; path = /usr/local/samba/profiles | ||
179 | ; browseable = no | ||
180 | ; guest ok = yes | ||
181 | |||
182 | |||
183 | # NOTE: If you have a BSD-style print system there is no need to | ||
184 | # specifically define each individual printer | ||
185 | [printers] | ||
186 | comment = All Printers | ||
187 | path = /var/spool/samba | ||
188 | browseable = no | ||
189 | # Set public = yes to allow user 'guest account' to print | ||
190 | guest ok = no | ||
191 | writable = no | ||
192 | printable = yes | ||
193 | |||
194 | # This one is useful for people to share files | ||
195 | ;[tmp] | ||
196 | ; comment = Temporary file space | ||
197 | ; path = /tmp | ||
198 | ; read only = no | ||
199 | ; public = yes | ||
200 | |||
201 | # A publicly accessible directory, but read only, except for people in | ||
202 | # the "staff" group | ||
203 | ;[public] | ||
204 | ; comment = Public Stuff | ||
205 | ; path = /home/samba | ||
206 | ; public = yes | ||
207 | ; writable = yes | ||
208 | ; printable = no | ||
209 | ; write list = @staff | ||
210 | |||
211 | # Other examples. | ||
212 | # | ||
213 | # A private printer, usable only by fred. Spool data will be placed in fred's | ||
214 | # home directory. Note that fred must have write access to the spool directory, | ||
215 | # wherever it is. | ||
216 | ;[fredsprn] | ||
217 | ; comment = Fred's Printer | ||
218 | ; valid users = fred | ||
219 | ; path = /homes/fred | ||
220 | ; printer = freds_printer | ||
221 | ; public = no | ||
222 | # A private directory, usable only by fred. Note that fred requires write | ||
223 | # access to the directory. | ||
224 | ;[fredsdir] | ||
225 | ; comment = Fred's Service | ||
226 | ; path = /usr/somewhere/private | ||
227 | ; valid users = fred | ||
228 | ; public = no | ||
229 | ; writable = yes | ||
230 | ; printable = no | ||
231 | |||
232 | # a service which has a different directory for each machine that connects | ||
233 | # this allows you to tailor configurations to incoming machines. You could | ||
234 | # also use the %U option to tailor it by user name. | ||
235 | # The %m gets replaced with the machine name that is connecting. | ||
236 | ;[pchome] | ||
237 | ; comment = PC Directories | ||
238 | ; path = /usr/pc/%m | ||
239 | ; public = no | ||
240 | ; writable = yes | ||
241 | |||
242 | # A publicly accessible directory, read/write to all users. Note that all files | ||
243 | # created in the directory by users will be owned by the default user, so | ||
244 | # any user with access can delete any other user's files. Obviously this | ||
245 | # directory must be writable by the default user. Another user could of course | ||
246 | # be specified, in which case all files would be owned by that user instead. | ||
247 | ;[public] | ||
248 | ; path = /usr/somewhere/else/public | ||
249 | ; public = yes | ||
250 | ; only guest = yes | ||
251 | ; writable = yes | ||
252 | ; printable = no | ||
253 | |||
254 | # The following two entries demonstrate how to share a directory so that two | ||
255 | # users can place files there that will be owned by the specific users. In this | ||
256 | # setup, the directory should be writable by both users and should have the | ||
257 | # sticky bit set on it to prevent abuse. Obviously this could be extended to | ||
258 | # as many users as required. | ||
259 | ;[myshare] | ||
260 | ; comment = Mary's and Fred's stuff | ||
261 | ; path = /usr/somewhere/shared | ||
262 | ; valid users = mary fred | ||
263 | ; public = no | ||
264 | ; writable = yes | ||
265 | ; printable = no | ||
266 | ; create mask = 0765 | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/tdb.pc b/meta-oe/recipes-connectivity/samba/samba/tdb.pc new file mode 100644 index 000000000..6307a20a0 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/tdb.pc | |||
@@ -0,0 +1,11 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=/usr | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: tdb | ||
7 | Description: A trivial database | ||
8 | Version: 1.1.2 | ||
9 | Libs: -L${libdir} -ltdb | ||
10 | Cflags: -I${includedir} | ||
11 | URL: http://tdb.samba.org/ | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba/tdbheaderfix.patch b/meta-oe/recipes-connectivity/samba/samba/tdbheaderfix.patch new file mode 100644 index 000000000..e37c9b0d5 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/tdbheaderfix.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Index: source/lib/tdb/include/tdb.h | ||
2 | =================================================================== | ||
3 | --- source.orig/lib/tdb/include/tdb.h 2009-05-17 17:42:41.000000000 +0100 | ||
4 | +++ source/lib/tdb/include/tdb.h 2009-05-17 17:42:46.000000000 +0100 | ||
5 | @@ -1,6 +1,9 @@ | ||
6 | #ifndef __TDB_H__ | ||
7 | #define __TDB_H__ | ||
8 | |||
9 | +#include <signal.h> | ||
10 | + | ||
11 | + | ||
12 | /* | ||
13 | Unix SMB/CIFS implementation. | ||
14 | |||
diff --git a/meta-oe/recipes-connectivity/samba/samba/volatiles.03_samba b/meta-oe/recipes-connectivity/samba/samba/volatiles.03_samba new file mode 100644 index 000000000..469bc9e7b --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba/volatiles.03_samba | |||
@@ -0,0 +1,2 @@ | |||
1 | # <type> <owner> <group> <mode> <path> <linksource> | ||
2 | d root root 0755 /var/log/samba none | ||
diff --git a/meta-oe/recipes-connectivity/samba/samba_3.5.6.bb b/meta-oe/recipes-connectivity/samba/samba_3.5.6.bb new file mode 100644 index 000000000..d5945f962 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba_3.5.6.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | require samba.inc | ||
2 | require samba-basic.inc | ||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://../COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
5 | |||
6 | SRC_URI += "file://config-h.patch \ | ||
7 | file://tdbheaderfix.patch;patchdir=.." | ||
8 | |||
9 | SRC_URI[md5sum] = "bf6c09ea497a166df8bd672db1d8da8f" | ||
10 | SRC_URI[sha256sum] = "466410868375d19a286ac3fc5d9f3c267ce359189f8e0d76e72ec10bd54247da" | ||
11 | |||
12 | S = "${WORKDIR}/samba-${PV}/source3" | ||
13 | |||
14 | EXTRA_OECONF += "\ | ||
15 | SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \ | ||
16 | samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ | ||
17 | linux_getgrouplist_ok=no \ | ||
18 | samba_cv_HAVE_BROKEN_GETGROUPS=no \ | ||
19 | samba_cv_HAVE_FTRUNCATE_EXTEND=yes \ | ||
20 | samba_cv_have_setresuid=yes \ | ||
21 | samba_cv_have_setresgid=yes \ | ||
22 | samba_cv_HAVE_WRFILE_KEYTAB=yes \ | ||
23 | samba_cv_linux_getgrouplist_ok=yes \ | ||
24 | " | ||
25 | |||
26 | do_configure() { | ||
27 | oe_runconf | ||
28 | } | ||
29 | |||
30 | do_compile () { | ||
31 | base_do_compile | ||
32 | } | ||
33 | |||