From c3270e164d1964d6ef32258dcbcbceda912add07 Mon Sep 17 00:00:00 2001 From: Tim 'timtim' Ellis Date: Sat, 31 Jan 2009 20:22:29 +0000 Subject: samba: Rework samba in preparation for separate AD support: - Move mtab.patch and config-h.patch to files as they will work for 3.3.0 - Remove AD support, krb5 and openldap deps from 3.2.7 - Move the non-AD samba specific stuff into its own include file - Ensure package conflicts with samba-ads, bump PR to pick this up --- packages/samba/files/config-h.patch | 12 +++++ packages/samba/files/configure-3.2.7.patch | 86 ++++++++++++++++++++++++++++++ packages/samba/files/mtab.patch | 11 ++++ packages/samba/samba-3.2.7/config-h.patch | 12 ----- packages/samba/samba-3.2.7/configure.patch | 86 ------------------------------ packages/samba/samba-3.2.7/mtab.patch | 11 ---- packages/samba/samba-basic.inc | 22 ++++++++ packages/samba/samba.inc | 24 +++------ packages/samba/samba_3.0.23c.bb | 10 ++-- packages/samba/samba_3.0.34.bb | 11 ++-- packages/samba/samba_3.2.7.bb | 15 +++--- 11 files changed, 156 insertions(+), 144 deletions(-) create mode 100644 packages/samba/files/config-h.patch create mode 100644 packages/samba/files/configure-3.2.7.patch create mode 100644 packages/samba/files/mtab.patch delete mode 100644 packages/samba/samba-3.2.7/config-h.patch delete mode 100644 packages/samba/samba-3.2.7/configure.patch delete mode 100644 packages/samba/samba-3.2.7/mtab.patch create mode 100644 packages/samba/samba-basic.inc (limited to 'packages') diff --git a/packages/samba/files/config-h.patch b/packages/samba/files/config-h.patch new file mode 100644 index 0000000000..eeb22684ee --- /dev/null +++ b/packages/samba/files/config-h.patch @@ -0,0 +1,12 @@ +diff -urN source.old//include/config.h.in source//include/config.h.in +--- source.old//include/config.h.in 2008-11-20 14:45:04.000000000 +0000 ++++ source//include/config.h.in 2008-11-30 21:04:17.990008933 +0000 +@@ -2672,7 +2672,7 @@ + #undef USE_SETEUID + + /* Whether setresuid() is available */ +-#undef USE_SETRESUID ++#define USE_SETRESUID 1 + + /* Whether setreuid() is available */ + #undef USE_SETREUID diff --git a/packages/samba/files/configure-3.2.7.patch b/packages/samba/files/configure-3.2.7.patch new file mode 100644 index 0000000000..94d684813e --- /dev/null +++ b/packages/samba/files/configure-3.2.7.patch @@ -0,0 +1,86 @@ +diff -urN source.old/configure source/configure +--- source.old/configure 2008-11-20 14:45:08.000000000 +0000 ++++ source/configure 2008-11-30 17:53:02.116791281 +0000 +@@ -40777,11 +40777,10 @@ + *linux*) + # glibc <= 2.3.2 has a broken getgrouplist + if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 ++# echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} ++# { (exit 1); exit 1; }; } ++linux_getgrouplist_ok=no + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +diff -urN source.old/configure.in source/configure.in +--- source.old/configure.in 2008-11-18 15:17:17.000000000 +0000 ++++ source/configure.in 2008-11-30 17:33:10.960791551 +0000 +@@ -275,6 +275,8 @@ + fi + AC_SUBST(BROKEN_CC) + ++AC_TRY_COMPILE([],[(void)sizeof(char[-1])],AC_MSG_ERROR([configure's compilation assert doesn't work with $CC])) ++ + dnl Check if the C compiler understands -Werror + AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ + AC_TRY_RUN_STRICT([ +@@ -325,25 +327,11 @@ + # a runtime test is needed here + AC_SUBST(PIDL_ARGS) + AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ +- AC_TRY_RUN( ++ AC_TRY_COMPILE([], + [ +- #include + enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; +- int main(void) { +- enum negative_values v1 = NEGATIVE_VALUE; +- unsigned v2 = NEGATIVE_VALUE; +- +- if (v1 != 0xFFFFFFFF) { +- printf("%u != 0xFFFFFFFF\n", v1); +- return 1; +- } +- if (v2 != 0xFFFFFFFF) { +- printf("%u != 0xFFFFFFFF\n", v2); +- return 1; +- } +- +- return 0; +- } ++ (void)sizeof(char[1-2*( (unsigned)NEGATIVE_VALUE != 0xFFFFFFFF)]); ++ (void)sizeof(char[1-2*((enum negative_values)NEGATIVE_VALUE != 0xFFFFFFFF)]); + ], + samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)]) + if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then +@@ -1187,22 +1175,12 @@ + case "$host_os" in + *linux*) + # glibc <= 2.3.2 has a broken getgrouplist +- AC_TRY_RUN([ +-#include ++ AC_TRY_COMPILE([ + #include +-main() { +- /* glibc up to 2.3 has a broken getgrouplist */ ++],[ + #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +- int libc_major = __GLIBC__; +- int libc_minor = __GLIBC_MINOR__; +- +- if (libc_major < 2) +- exit(1); +- if ((libc_major == 2) && (libc_minor <= 3)) +- exit(1); ++ (void)sizeof(char[1-2*(__GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)]); + #endif +- exit(0); +-} + ], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) + if test x"$linux_getgrouplist_ok" = x"yes"; then + AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) diff --git a/packages/samba/files/mtab.patch b/packages/samba/files/mtab.patch new file mode 100644 index 0000000000..2ee8ba0941 --- /dev/null +++ b/packages/samba/files/mtab.patch @@ -0,0 +1,11 @@ +diff -urN source/client/mtab.c samba-3.2.7//source/client/mtab.c +--- source/client/mtab.c 2008-12-19 13:57:33.000000000 +0000 ++++ source/client/mtab.c 2009-01-09 23:14:00.717671075 +0000 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/samba/samba-3.2.7/config-h.patch b/packages/samba/samba-3.2.7/config-h.patch deleted file mode 100644 index eeb22684ee..0000000000 --- a/packages/samba/samba-3.2.7/config-h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN source.old//include/config.h.in source//include/config.h.in ---- source.old//include/config.h.in 2008-11-20 14:45:04.000000000 +0000 -+++ source//include/config.h.in 2008-11-30 21:04:17.990008933 +0000 -@@ -2672,7 +2672,7 @@ - #undef USE_SETEUID - - /* Whether setresuid() is available */ --#undef USE_SETRESUID -+#define USE_SETRESUID 1 - - /* Whether setreuid() is available */ - #undef USE_SETREUID diff --git a/packages/samba/samba-3.2.7/configure.patch b/packages/samba/samba-3.2.7/configure.patch deleted file mode 100644 index 94d684813e..0000000000 --- a/packages/samba/samba-3.2.7/configure.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN source.old/configure source/configure ---- source.old/configure 2008-11-20 14:45:08.000000000 +0000 -+++ source/configure 2008-11-30 17:53:02.116791281 +0000 -@@ -40777,11 +40777,10 @@ - *linux*) - # glibc <= 2.3.2 has a broken getgrouplist - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -+# echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} -+# { (exit 1); exit 1; }; } -+linux_getgrouplist_ok=no - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -diff -urN source.old/configure.in source/configure.in ---- source.old/configure.in 2008-11-18 15:17:17.000000000 +0000 -+++ source/configure.in 2008-11-30 17:33:10.960791551 +0000 -@@ -275,6 +275,8 @@ - fi - AC_SUBST(BROKEN_CC) - -+AC_TRY_COMPILE([],[(void)sizeof(char[-1])],AC_MSG_ERROR([configure's compilation assert doesn't work with $CC])) -+ - dnl Check if the C compiler understands -Werror - AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ - AC_TRY_RUN_STRICT([ -@@ -325,25 +327,11 @@ - # a runtime test is needed here - AC_SUBST(PIDL_ARGS) - AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ -- AC_TRY_RUN( -+ AC_TRY_COMPILE([], - [ -- #include - enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; -- int main(void) { -- enum negative_values v1 = NEGATIVE_VALUE; -- unsigned v2 = NEGATIVE_VALUE; -- -- if (v1 != 0xFFFFFFFF) { -- printf("%u != 0xFFFFFFFF\n", v1); -- return 1; -- } -- if (v2 != 0xFFFFFFFF) { -- printf("%u != 0xFFFFFFFF\n", v2); -- return 1; -- } -- -- return 0; -- } -+ (void)sizeof(char[1-2*( (unsigned)NEGATIVE_VALUE != 0xFFFFFFFF)]); -+ (void)sizeof(char[1-2*((enum negative_values)NEGATIVE_VALUE != 0xFFFFFFFF)]); - ], - samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)]) - if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then -@@ -1187,22 +1175,12 @@ - case "$host_os" in - *linux*) - # glibc <= 2.3.2 has a broken getgrouplist -- AC_TRY_RUN([ --#include -+ AC_TRY_COMPILE([ - #include --main() { -- /* glibc up to 2.3 has a broken getgrouplist */ -+],[ - #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -- int libc_major = __GLIBC__; -- int libc_minor = __GLIBC_MINOR__; -- -- if (libc_major < 2) -- exit(1); -- if ((libc_major == 2) && (libc_minor <= 3)) -- exit(1); -+ (void)sizeof(char[1-2*(__GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)]); - #endif -- exit(0); --} - ], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) - if test x"$linux_getgrouplist_ok" = x"yes"; then - AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) diff --git a/packages/samba/samba-3.2.7/mtab.patch b/packages/samba/samba-3.2.7/mtab.patch deleted file mode 100644 index 2ee8ba0941..0000000000 --- a/packages/samba/samba-3.2.7/mtab.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN source/client/mtab.c samba-3.2.7//source/client/mtab.c ---- source/client/mtab.c 2008-12-19 13:57:33.000000000 +0000 -+++ source/client/mtab.c 2009-01-09 23:14:00.717671075 +0000 -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/packages/samba/samba-basic.inc b/packages/samba/samba-basic.inc new file mode 100644 index 0000000000..391bbb4127 --- /dev/null +++ b/packages/samba/samba-basic.inc @@ -0,0 +1,22 @@ +SRC_URI += "file://config-lfs.patch;patch=1 \ + file://quota.patch;patch=1;pnum=0 \ + " + +PACKAGES =+ "libsmbclient libsmbclient-dev cifs cifs-doc smbfs smbfs-doc swat" + +RCONFLICTS_${PN} = "samba-ads" +RCONFLICTS_libsmbclient = "libsmbclient-ads" +RCONFLICTS_libsmbclient-dev = "libsmbclient-ads-dev" +RCONFLICTS_cifs = "cifs-ads" +RCONFLICTS_cifs-doc = "cifs-ads-doc" +RCONFLICTS_smbfs = "smbfs-ads" +RCONFLICTS_smbfs-doc = "smbfs-ads-doc" +RCONFLICTS_swat = "swat-ads" + +FILES_cifs = "${base_sbindir}/mount.cifs ${base_sbindir}/umount.cifs" +FILES_cifs-doc = "${mandir}/man8/mount.cifs.8 ${mandir}/man8/umount.cifs.8" +FILES_libsmbclient = "${libdir}/libsmbclient.so.*" +FILES_libsmbclient-dev = "${libdir}/libsmbclient.so ${includedir}" +FILES_smbfs = "${bindir}/smbmount ${bindir}/smbumount ${bindir}/smbmnt ${base_sbindir}/mount.smbfs ${base_sbindir}/mount.smb" +FILES_smbfs-doc = "${mandir}/man8/smbmount.8 ${mandir}/man8/smbumount.8 ${mandir}/man8/smbmnt.8" +FILES_swat = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg" diff --git a/packages/samba/samba.inc b/packages/samba/samba.inc index 85ac612de6..de93712132 100644 --- a/packages/samba/samba.inc +++ b/packages/samba/samba.inc @@ -3,16 +3,19 @@ LICENSE = "GPL" DEPENDS = "readline virtual/libiconv" SRC_URI = "http://samba.org/samba/ftp/stable/samba-${PV}.tar.gz \ - file://configure.patch;patch=1 \ - file://config-lfs.patch;patch=1 \ - file://quota.patch;patch=1;pnum=0 \ file://smb.conf \ - file://init" + file://init \ + " S = "${WORKDIR}/samba-${PV}/source" inherit autotools update-rc.d +FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat \ + ${libdir}/auth/*.so ${libdir}/security/*.so" +FILES_${PN}-dbg += "${libdir}/vfs/.debug/*.so ${libdir}/charset/.debug/*.so \ + ${libdir}/auth/.debug/*.so ${libdir}/security/.debug/*.so" + # The file system settings --foodir=dirfoo and overridden unconditionally # in the samba config by --with-foodir=dirfoo - even if the --with is not # specified! Fix that here. Set the privatedir to /etc/samba/private. @@ -38,19 +41,6 @@ INITSCRIPT_NAME = "samba" INITSCRIPT_PARAMS = "defaults" CONFFILES_${PN} = "${sysconfdir}/samba/smb.conf" -PACKAGES =+ "libsmbclient libsmbclient-dev cifs cifs-doc smbfs smbfs-doc swat" -FILES_cifs = "${base_sbindir}/mount.cifs ${base_sbindir}/umount.cifs" -FILES_cifs-doc = "${mandir}/man8/mount.cifs.8 ${mandir}/man8/umount.cifs.8" -FILES_libsmbclient = "${libdir}/libsmbclient.so.*" -FILES_libsmbclient-dev = "${libdir}/libsmbclient.so ${includedir}" -FILES_smbfs = "${bindir}/smbmount ${bindir}/smbumount ${bindir}/smbmnt ${base_sbindir}/mount.smbfs ${base_sbindir}/mount.smb" -FILES_smbfs-doc = "${mandir}/man8/smbmount.8 ${mandir}/man8/smbumount.8 ${mandir}/man8/smbmnt.8" -FILES_swat = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg" -FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat \ - ${libdir}/auth/*.so ${libdir}/security/*.so" -FILES_${PN}-dbg += "${libdir}/vfs/.debug/*.so ${libdir}/charset/.debug/*.so \ - ${libdir}/auth/.debug/*.so ${libdir}/security/.debug/*.so" - do_configure_prepend () { ./script/mkversion.sh if [ ! -e acinclude.m4 ]; then diff --git a/packages/samba/samba_3.0.23c.bb b/packages/samba/samba_3.0.23c.bb index 3a2cfd30aa..a10c605edd 100644 --- a/packages/samba/samba_3.0.23c.bb +++ b/packages/samba/samba_3.0.23c.bb @@ -1,13 +1,13 @@ require samba.inc +require samba-basic.inc -PR = "r4" +SRC_URI += "file://configure.patch;patch=1 \ + file://cifs.patch;patch=1" -SRC_URI += "file://cifs.patch;patch=1 \ - " +PR = "r5" EXTRA_OECONF += "\ - --without-ads \ - " + --without-ads" do_compile () { oe_runmake proto_exists diff --git a/packages/samba/samba_3.0.34.bb b/packages/samba/samba_3.0.34.bb index ecd11badcc..c0e6def424 100644 --- a/packages/samba/samba_3.0.34.bb +++ b/packages/samba/samba_3.0.34.bb @@ -1,11 +1,12 @@ require samba.inc +require samba-basic.inc -PR = "r2" +SRC_URI += "file://configure.patch;patch=1 \ + " +SRC_URI_append_linux-uclibc = "file://uclibc-strlcpy-strlcat.patch;patch=1" +SRC_URI_append_linux-uclibcgnueabi = "file://uclibc-strlcpy-strlcat.patch;patch=1" -SRC_URI_append_linux-uclibc = " \ - file://uclibc-strlcpy-strlcat.patch;patch=1" -SRC_URI_append_linux-uclibcgnueabi = " \ - file://uclibc-strlcpy-strlcat.patch;patch=1" +PR = "r3" EXTRA_OECONF += "\ --without-ads \ diff --git a/packages/samba/samba_3.2.7.bb b/packages/samba/samba_3.2.7.bb index 3653a5dfe3..cde2a8f88f 100644 --- a/packages/samba/samba_3.2.7.bb +++ b/packages/samba/samba_3.2.7.bb @@ -1,25 +1,24 @@ require samba.inc +require samba-basic.inc -PR = "r1" -DEPENDS += " openldap krb5" -SRC_URI += "file://config-h.patch;patch=1 \ +SRC_URI += "file://configure-3.2.7.patch;patch=1 \ + file://config-h.patch;patch=1 \ file://mtab.patch;patch=1 \ " +PR = "r2" + EXTRA_OECONF += "\ SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \ samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ linux_getgrouplist_ok=no \ samba_cv_HAVE_BROKEN_GETGROUPS=no \ samba_cv_HAVE_FTRUNCATE_EXTEND=yes \ - ac_cv_path_KRB5CONFIG=${STAGING_BINDIR_CROSS}/krb5-config \ samba_cv_have_setresuid=yes \ samba_cv_have_setresgid=yes \ samba_cv_HAVE_WRFILE_KEYTAB=yes \ - smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes \ - smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes \ - --with-krb5=${STAGING_LIBDIR} \ - --with-ads \ + --without-ads \ + --without-winbind \ " do_configure() { -- cgit v1.2.3