diff options
author | Oyvind Repvik <nail@nslu2-linux.org> | 2005-07-11 10:25:30 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-11 10:25:30 +0000 |
commit | 047c20edd445e7210f4e3dcce9d545f71c4cada6 (patch) | |
tree | 817adbee63c8a9bf6b9ed7f200747579ec827477 | |
parent | 53aeb8cb6a60d88703adc6a63703288f77224ff8 (diff) |
Fix samba LINUX_LFS problem in a proper way. FIXES #58 (OE)
-rw-r--r-- | packages/samba/files/config-lfs.patch | 47 | ||||
-rw-r--r-- | packages/samba/files/configure.lfs.patch | 12 | ||||
-rw-r--r-- | packages/samba/samba_3.0.14a.bb | 10 | ||||
-rw-r--r-- | site/armeb-linux | 1 | ||||
-rw-r--r-- | site/mipsel-linux-uclibc | 57 |
5 files changed, 107 insertions, 20 deletions
diff --git a/packages/samba/files/config-lfs.patch b/packages/samba/files/config-lfs.patch new file mode 100644 index 0000000000..b37ed690ce --- /dev/null +++ b/packages/samba/files/config-lfs.patch @@ -0,0 +1,47 @@ +Cache the check for Linux LFS support, so it can be prepopulated from +the site cache for configure variables for cross-compiling. Without this, +samba gets the idea that it can use dirent64 and friends without defining +the flags it needs to get it, such as _GNU_SOURCE and _LARGEFILE64_SOURCE. + +Symptoms of getting the configuration wrong on cross-compile inculde +warnings such as + + smbd/trans2.c: In function `get_lanman2_dir_entry': + smbd/trans2.c:1065: warning: right shift count >= width of type + +and errors like + + smbd/vfs.c:630: error: dereferencing pointer to incomplete type + +(when trying to dereference dirent64.) + +--- source/configure.in.orig 2005-05-29 14:46:18.000000000 -0700 ++++ source/configure.in 2005-05-29 14:51:57.000000000 -0700 +@@ -588,7 +588,7 @@ + # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. + # + *linux*) +- AC_MSG_CHECKING([for LFS support]) ++ AC_CACHE_CHECK([for LFS support], samba_cv_LINUX_LFS_SUPPORT,[ + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + AC_TRY_RUN([ +@@ -627,15 +627,14 @@ + exit(1); + #endif + } +-], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) +- CPPFLAGS="$old_CPPFLAGS" +- if test x$LINUX_LFS_SUPPORT = xyes ; then ++], [samba_cv_LINUX_LFS_SUPPORT=yes], [samba_cv_LINUX_LFS_SUPPORT=no], [samba_cv_LINUX_LFS_SUPPORT=cross]) ++ CPPFLAGS="$old_CPPFLAGS"]) ++ if test x"$samba_cv_LINUX_LFS_SUPPORT" = x"yes" ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) + AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) + AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) + fi +- AC_MSG_RESULT([$LINUX_LFS_SUPPORT]) + ;; + + # diff --git a/packages/samba/files/configure.lfs.patch b/packages/samba/files/configure.lfs.patch deleted file mode 100644 index f0355ecd8d..0000000000 --- a/packages/samba/files/configure.lfs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- source/configure.in.virgin 2005-06-27 07:22:15.000000000 +0200 -+++ source/configure.in 2005-06-27 07:23:11.000000000 +0200 -@@ -628,7 +628,8 @@ - #endif - } - ], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) -- CPPFLAGS="$old_CPPFLAGS" -+# Ugly hack for cross compile. Just set the CPPFLAGS and go on. -+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $old_CPPFLAGS" - if test x$LINUX_LFS_SUPPORT = xyes ; then - CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) diff --git a/packages/samba/samba_3.0.14a.bb b/packages/samba/samba_3.0.14a.bb index 68a261cbc1..395decfdf8 100644 --- a/packages/samba/samba_3.0.14a.bb +++ b/packages/samba/samba_3.0.14a.bb @@ -1,15 +1,9 @@ - -PR = "r7" - -# Ugly patch to hack configure.in to set the CPPFLAGS without actually checking for LFS support -# For nslu2. Will probably work for forcing for other archs as well. -LFS_SRC_URI = "" -LFS_SRC_URI_nslu2 = "file://configure.lfs.patch;patch=1" +PR = "r8" SRC_URI = "http://us2.samba.org/samba/ftp/stable/samba-${PV}.tar.gz \ file://configure.patch;patch=1 \ file://cifs.patch;patch=1 \ - ${LFS_SRC_URI} \ + file://config-lfs.patch;patch=1 \ file://init \ file://quota.patch;patch=1;pnum=0 \ " diff --git a/site/armeb-linux b/site/armeb-linux index 89a2a3f104..21f7397da4 100644 --- a/site/armeb-linux +++ b/site/armeb-linux @@ -98,6 +98,7 @@ samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes} samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes} samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes} samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes} +samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes} # sleepycat db db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} diff --git a/site/mipsel-linux-uclibc b/site/mipsel-linux-uclibc index 45b3d7d147..cdf6fc5cf3 100644 --- a/site/mipsel-linux-uclibc +++ b/site/mipsel-linux-uclibc @@ -77,3 +77,60 @@ wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes} # gettext am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# samba +# from samba 3.0.14a on 5/29/2005 +ac_cv_func_memcmp_working=${ac_cv_func_memcmp_working=yes} +ac_cv_have_asprintf_decl=${ac_cv_have_asprintf_decl=yes} +ac_cv_have_setresgid_decl=${ac_cv_have_setresgid_decl=yes} +ac_cv_have_setresuid_decl=${ac_cv_have_setresuid_decl=yes} +ac_cv_have_vasprintf_decl=${ac_cv_have_vasprintf_decl=yes} +fu_cv_sys_stat_statvfs64=${fu_cv_sys_stat_statvfs64=yes} +samba_cv_FTRUNCATE_NEEDS_ROOT=${samba_cv_FTRUNCATE_NEEDS_ROOT=no} +samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no} +samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no} +samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=no} +samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes} +samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no} +samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes} +samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes} +samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=${samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes} +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} +samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes} +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} +samba_cv_HAVE_IFACE_AIX=${samba_cv_HAVE_IFACE_AIX=no} +samba_cv_HAVE_IFACE_IFCONF=${samba_cv_HAVE_IFACE_IFCONF=yes} +samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no} +samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes} +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes} +samba_cv_HAVE_MAKEDEV=${samba_cv_HAVE_MAKEDEV=yes} +samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes} +samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no} +samba_cv_HAVE_QUOTACTL_4A=${samba_cv_HAVE_QUOTACTL_4A=yes} +samba_cv_HAVE_ROOT=${samba_cv_HAVE_ROOT=no} +samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes} +samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes} +samba_cv_HAVE_STRUCT_DIRENT64=${samba_cv_HAVE_STRUCT_DIRENT64=yes} +samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes} +samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no} +samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=no} +samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=no} +samba_cv_HAVE_Werror=${samba_cv_HAVE_Werror=yes} +samba_cv_REALPATH_TAKES_NULL=${samba_cv_REALPATH_TAKES_NULL=no} +samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no} +samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes} +samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes} +samba_cv_SYSCONF_SC_NGROUPS_MAX=${samba_cv_SYSCONF_SC_NGROUPS_MAX=yes} +samba_cv_SYSCONF_SC_NPROC_ONLN=${samba_cv_SYSCONF_SC_NPROC_ONLN=no} +samba_cv_SYSQUOTA_FOUND=${samba_cv_SYSQUOTA_FOUND=yes} +samba_cv_SYSQUOTA_WORKS=${samba_cv_SYSQUOTA_WORKS=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} +samba_cv_have_longlong=${samba_cv_have_longlong=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_sysquotas_file=${samba_cv_sysquotas_file=lib/sysquotas_4A.c} +# This cached value needs a local patch to pick it up, upstream 3.0.14a +# doesn't cache it. +samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes} |