From: brian Date: Thu, 1 Jul 2004 01:15:05 +0000 (-0700) Subject: samba in makefile X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=commitdiff_plain;h=07de0e15baaca974c1d140be12e3d497030cd553 samba in makefile darcs-hash:20040701011505-24bed-5eb852d0a0bd69528eb7307e2d5de17e7533f76f.gz --- diff --git a/Makefile b/Makefile index c0eee65..1447414 100644 --- a/Makefile +++ b/Makefile @@ -388,7 +388,16 @@ TeX_COMPILERFLAGS = -o unixruntime build/tests/TeX.mips: $(tasks)/build_tex @mkdir -p `dirname $@` cp upstream/build/tex/tex.mips $@ - + +NtlmAuth_COMPILERFLAGS = -o unixruntime +build/tests/NtlmAuth.mips: $(tasks)/build_samba + mkdir -p `dirname $@` + cp upstream/build/samba/source/bin/ntlm_auth $@ + +ntlmtest: build/tests/NtlmAuth.class + @test -e smb.conf || cp upstream/build/samba/examples/smb.conf.default smb.conf + $(JAVA) -cp "$(classpath)" tests.NtlmAuth --username=brian --password=test --diagnostics -d 5 + # # Speed tests # diff --git a/upstream/Makefile b/upstream/Makefile index 194c05a..fa28cc0 100644 --- a/upstream/Makefile +++ b/upstream/Makefile @@ -237,6 +237,10 @@ patches_busybox = busybox.patch version_texinputs = 1.0 url_texinputs = http://www.megacz.com/tmp/texinputs-$(version_texinputs).tgz +version_samba = 3.0.4 +url_samba = http://us4.samba.org/samba/ftp/samba-$(version_samba).tar.gz +patches_samba = samba.patch + tasks/extract_libjpeg: tasks/download_libjpeg mkdir -p build cd build && \ @@ -340,3 +344,12 @@ tasks/build_tex: tasks/build_tex_tangle tasks/build_gpc tasks/download_texinputs && \ mips-unknown-elf-gpc $(MIPS_PCFLAGS) tex.p $(MIPS_LDFLAGS) -o tex.mips touch $@ + +tasks/build_samba: tasks/patch_samba + cd build/samba-$(version_samba)/source && \ + test -e config.status || ./configure --host=mips-unknown-elf && \ + fgrep -q '#define HAVE_GETTIMEOFDAY_TZ' include/config.h || \ + echo '#define HAVE_GETTIMEOFDAY_TZ 1' >> include/config.h && \ + make LIBS="-lglob" CFLAGS="$(MIPS_CFLAGS)" LDFLAGS="$(MIPS_LDFLAGS)" \ + CONFIGFILE="smb.conf" proto_exists bin/ntlm_auth + touch $@ diff --git a/upstream/patches/samba.patch b/upstream/patches/samba.patch new file mode 100644 index 0000000..f9d8216 --- /dev/null +++ b/upstream/patches/samba.patch @@ -0,0 +1,37 @@ +--- ../samba-3.0.4/source/lib/iconv.c 2004-04-04 03:37:34.000000000 -0400 ++++ source/lib/iconv.c 2004-06-29 20:56:57.000000000 -0400 +@@ -110,6 +110,9 @@ + static BOOL initialized; + int i; + ++ extern NTSTATUS charset_CP850_init(); ++ extern NTSTATUS charset_CP437_init(); ++ + if (!initialized) { + initialized = True; + for(i = 0; builtin_functions[i].name; i++) +diff -ru ../samba-3.0.4/source/lib/module.c source/lib/module.c +--- ../samba-3.0.4/source/lib/module.c 2004-04-04 03:37:34.000000000 -0400 ++++ source/lib/module.c 2004-06-30 20:53:24.000000000 -0400 +@@ -130,7 +130,7 @@ + + NTSTATUS smb_probe_module(const char *subsystem, const char *module) + { +- DEBUG(0,("This samba executable has not been built with plugin support, not probing\n")); ++ /*DEBUG(0,("This samba executable has not been built with plugin support, not probing\n")); */ + return NT_STATUS_NOT_SUPPORTED; + } + +diff -ru ../samba-3.0.4/source/utils/ntlm_auth_diagnostics.c source/utils/ntlm_auth_diagnostics.c +--- ../samba-3.0.4/source/utils/ntlm_auth_diagnostics.c 2004-04-20 16:42:58.000000000 -0400 ++++ source/utils/ntlm_auth_diagnostics.c 2004-06-30 01:21:08.000000000 -0400 +@@ -580,7 +580,8 @@ + {test_plaintext_lm_broken, "Plaintext LM broken"}, + {test_plaintext_nt_broken, "Plaintext NT broken"}, + {test_plaintext_nt_only, "Plaintext NT only"}, +- {test_plaintext_lm_only, "Plaintext LM only"} ++ {test_plaintext_lm_only, "Plaintext LM only"}, ++ {NULL, NULL} + }; + + BOOL diagnose_ntlm_auth(void)