[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Mon Oct 4 08:04:14 MDT 2010


The branch, master has been updated
       via  c676c95 compile_et: Support using system compile_et.
       via  0bda3f8 heimdal: Support using system com_err.
      from  587315f land-remote: Force running in foreground when pushing to master.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c676c950dbb022004e7224b39355decfa74e6032
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Oct 4 15:23:24 2010 +0200

    compile_et: Support using system compile_et.

commit 0bda3f8cfb34cc23fac8745decfbfb2f97a8fb65
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Oct 4 14:13:24 2010 +0200

    heimdal: Support using system com_err.

-----------------------------------------------------------------------

Summary of changes:
 source4/heimdal_build/et_compile_wrapper.sh |   35 ++++++-----------
 source4/heimdal_build/wscript_build         |   56 ++++++++++++++------------
 source4/heimdal_build/wscript_configure     |   20 ++++++---
 3 files changed, 55 insertions(+), 56 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal_build/et_compile_wrapper.sh b/source4/heimdal_build/et_compile_wrapper.sh
index ec3b39f..b267bb5 100755
--- a/source4/heimdal_build/et_compile_wrapper.sh
+++ b/source4/heimdal_build/et_compile_wrapper.sh
@@ -4,18 +4,11 @@
 SELF=$0
 SELFDIR=`dirname ${SELF}`
 
-BUILDDIR=$1
-DESTDIR=$2
-
-CMD=$3
-FILE=$4
-SOURCE=$5
-shift 5
-
-test -z "${BUILDDIR}" && {
-	echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
-	exit 1;
-}
+DESTDIR=$1
+CMD=$2
+FILE=$3
+SOURCE=$4
+shift 4
 
 test -z "${DESTDIR}" && {
 	echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
@@ -39,16 +32,12 @@ test -z "${SOURCE}" && {
 
 CURDIR=`pwd`
 
-cd ${BUILDDIR} && {
-	ABS_BUILDDIR=`pwd`
-	cd ${CURDIR}
-} || {
-	echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
-	exit 1;
-}
-
 cd ${DESTDIR} && {
-	${ABS_BUILDDIR}/${CMD} ${FILE} >&2 || exit 1;
+	# Remove older copies beforehand - MIT's compile_et uses odd permissions for these
+	# files, which makes Heimdal's compile_et fail mysteriously when writing to them.
+	rm -f `basename ${FILE} .et`.c
+	rm -f `basename ${FILE} .et`.h
+	${CMD} ${FILE} >&2 || exit 1;
 	cd ${CURDIR}
 	TMP="${SOURCE}.$$"
 	mv ${SOURCE} ${TMP} && {
@@ -56,9 +45,9 @@ cd ${DESTDIR} && {
 			cat ${TMP} >> ${SOURCE}
 		}
 	}
-	rm ${TMP}
+	rm -f ${TMP}
 } || {
-	echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
+	echo "${SELF}:cannot cd into '${DESTDIR}'" >&2;
 	exit 1;
 }
 
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index 1b45fb7..257796f 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -69,7 +69,7 @@ def HEIMDAL_ASN1(bld, name, source,
             target = cfile,
             shell = True,
             on_results=True,
-	    ext_out = '.c',
+        ext_out = '.c',
             ext_in = '.x',
             depends_on = name + '_ASN1',
             name = name + '_C')
@@ -124,12 +124,17 @@ def HEIMDAL_ERRTABLE(bld, name, source):
     out_files.append('%s.c' % bname)
     out_files.append('%s.h' % bname)
 
-    t = bld(rule='${SRC[1].abspath(env)} . ${TGT[0].parent.abspath(env)} default/source4/heimdal_build/compile_et ${SRC[0].abspath(env)} ${TGT[0].bldpath(env)}',
+    sources = [source, 'et_compile_wrapper.sh']
+
+    if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
+        sources.append('compile_et')
+
+    t = bld(rule='${SRC[1].abspath(env)} ${TGT[0].parent.abspath(env)} ${COMPILE_ET} ${SRC[0].abspath(env)} ${TGT[0].bldpath(env)}',
             ext_out = '.c',
             before  = 'cc',
             on_results = True,
             shell   = True,
-            source  = [source, 'et_compile_wrapper.sh', 'compile_et'],
+            source  = sources,
             target  = out_files,
             name    = name)
 Build.BuildContext.HEIMDAL_ERRTABLE = HEIMDAL_ERRTABLE
@@ -427,10 +432,10 @@ bld.HEIMDAL_LIBRARY('HEIMDAL_HDB',
                               ../heimdal/lib/hdb/ext.c ../heimdal/lib/hdb/keytab.c ../heimdal/lib/hdb/hdb-keytab.c
                               ../heimdal/lib/hdb/mkey.c ../heimdal/lib/hdb/ndbm.c ../heimdal/lib/hdb/hdb_err.c
                               hdb-glue.c''',
-                    includes='../heimdal/lib/hdb ../heimdal/lib/com_err',
+                    includes='../heimdal/lib/hdb',
                     heimdal_autoproto='../heimdal/lib/hdb/hdb-protos.h',
                     heimdal_autoproto_private='../heimdal/lib/hdb/hdb-private.h',
-                    deps='HDB_LDB HEIMDAL_KRB5 HEIMDAL_HDB_KEYS HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_COM_ERR HEIMDAL_HDB_ASN1',
+                    deps='HDB_LDB HEIMDAL_KRB5 HEIMDAL_HDB_KEYS HEIMDAL_ROKEN HEIMDAL_HCRYPTO com_err HEIMDAL_HDB_ASN1',
     )
 
 
@@ -530,8 +535,8 @@ bld.HEIMDAL_LIBRARY('HEIMDAL_KRB5',
                                store_mem.c ticket.c time.c transited.c
                                v4_glue.c version.c warn.c krb5_err.c
                                heim_err.c k524_err.c krb_err.c''') + ' krb5-glue.c',
-                    includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/lib/com_err',
-                    public_deps='HEIMDAL_COM_ERR',
+                    includes='../heimdal/lib/krb5 ../heimdal/lib/asn1',
+                    public_deps='com_err',
                     heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h',
                     heimdal_autoproto_options='-E KRB5_LIB -q -P comment -o',
                     heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h',
@@ -543,7 +548,7 @@ bld.HEIMDAL_LIBRARY('HEIMDAL_KRB5',
 bld.SAMBA_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
     '../heimdal/lib/asn1/der_get.c ../heimdal/lib/asn1/der_put.c ../heimdal/lib/asn1/der_free.c ../heimdal/lib/asn1/der_format.c ../heimdal/lib/asn1/der_length.c ../heimdal/lib/asn1/der_copy.c ../heimdal/lib/asn1/der_cmp.c ../heimdal/lib/asn1/extra.c ../heimdal/lib/asn1/timegm.c ../heimdal/lib/asn1/asn1_err.c',
         includes='../heimdal/lib/asn1',
-    deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR'
+    deps='HEIMDAL_ROKEN com_err'
     )
 
 
@@ -567,14 +572,14 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO',
 bld.HEIMDAL_LIBRARY('HEIMDAL_HX509',
     '../heimdal/lib/hx509/ca.c ../heimdal/lib/hx509/cert.c ../heimdal/lib/hx509/cms.c ../heimdal/lib/hx509/collector.c ../heimdal/lib/hx509/crypto.c ../heimdal/lib/hx509/error.c ../heimdal/lib/hx509/env.c ../heimdal/lib/hx509/file.c ../heimdal/lib/hx509/keyset.c ../heimdal/lib/hx509/ks_dir.c ../heimdal/lib/hx509/ks_file.c ../heimdal/lib/hx509/ks_keychain.c ../heimdal/lib/hx509/ks_mem.c ../heimdal/lib/hx509/ks_null.c ../heimdal/lib/hx509/ks_p11.c ../heimdal/lib/hx509/ks_p12.c ../heimdal/lib/hx509/lock.c ../heimdal/lib/hx509/name.c ../heimdal/lib/hx509/peer.c ../heimdal/lib/hx509/print.c ../heimdal/lib/hx509/req.c ../heimdal/lib/hx509/revoke.c ../heimdal/lib/hx509/sel.c ../heimdal/lib/hx509/hx509_err.c ../heimdal/lib/hx509/sel-lex.c ../heimdal/lib/hx509/sel-gram.c',
     includes='../heimdal/lib/hx509',
-    deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO HEIMDAL_CMS_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_PKCS10_ASN1 HEIMDAL_WIND',
+    deps='HEIMDAL_ROKEN com_err HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO HEIMDAL_CMS_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_PKCS10_ASN1 HEIMDAL_WIND',
     )
 
 
 bld.HEIMDAL_LIBRARY('HEIMDAL_WIND',
     '../heimdal/lib/wind/wind_err.c ../heimdal/lib/wind/stringprep.c ../heimdal/lib/wind/errorlist.c ../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/normalize.c ../heimdal/lib/wind/normalize_table.c ../heimdal/lib/wind/combining.c ../heimdal/lib/wind/combining_table.c ../heimdal/lib/wind/utf8.c ../heimdal/lib/wind/bidi.c ../heimdal/lib/wind/bidi_table.c ../heimdal/lib/wind/ldap.c ../heimdal/lib/wind/map.c ../heimdal/lib/wind/map_table.c',
     includes='../heimdal/lib/wind',
-    deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR',
+    deps='HEIMDAL_ROKEN com_err',
     )
 
 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_HOSTCC',
@@ -587,14 +592,12 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_HOSTCC',
     deps='LIBREPLACE_HOSTCC',
     )
 
-
-bld.SAMBA_SUBSYSTEM('HEIMDAL_COM_ERR',
-    '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c',
-    includes='../heimdal/lib/com_err',
-    deps='HEIMDAL_ROKEN',
-        enabled=not bld.CONFIG_SET('HAVE_COM_ERR')
-    )
-
+if not bld.CONFIG_SET('USING_SYSTEM_COM_ERR'):
+    bld.HEIMDAL_LIBRARY('com_err',
+        '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c',
+        includes='../heimdal/lib/com_err',
+        deps='HEIMDAL_ROKEN',
+        )
 
 # here is the asn1 compiler build rule
 bld.SAMBA_BINARY('asn1_compile',
@@ -604,22 +607,23 @@ bld.SAMBA_BINARY('asn1_compile',
         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
         includes='../heimdal/lib/asn1 ../heimdal/lib/roken',
         group='build_compilers',
-    deps='HEIMDAL_ROKEN_HOSTCC LIBREPLACE_HOSTCC',
+        deps='HEIMDAL_ROKEN_HOSTCC',
         install=False
     )
 
 
-bld.SAMBA_BINARY('compile_et',
-    '../heimdal/lib/vers/print_version.c ../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
-    use_hostcc=True,
+if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
+    bld.SAMBA_BINARY('compile_et',
+        '../heimdal/lib/vers/print_version.c ../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
+        use_hostcc=True,
         use_global_deps=False,
-    includes='../heimdal/lib/com_err',
+        includes='../heimdal/lib/com_err',
         group='build_compilers',
         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
-    deps='HEIMDAL_ROKEN_HOSTCC LIBREPLACE_HOSTCC',
+        deps='HEIMDAL_ROKEN_HOSTCC',
         install=False
-    )
-
+        )
+    bld.env['COMPILE_ET'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'compile_et')
 
 bld.SAMBA_BINARY('samba4kinit',
     '../heimdal/kuser/kinit.c ../heimdal/lib/vers/print_version.c',
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 1f08119..74b1794 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -7,16 +7,16 @@ conf.CHECK_HEADERS('err.h')
 
 conf.CHECK_HEADERS('ifaddrs.h')
 conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
-	              sys/file.h sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h
-		      sys/utsname.h time.h timezone.h ttyname.h netinet/in.h
-		      netinet/in6.h netinet6/in6.h libintl.h''')
+                  sys/file.h sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h
+              sys/utsname.h time.h timezone.h ttyname.h netinet/in.h
+              netinet/in6.h netinet6/in6.h libintl.h''')
 
 conf.CHECK_HEADERS('curses.h term.h termcap.h', together=True)
 
 conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
                     putenv rcmd readv sendmsg setitimer strlwr strncasecmp
-		    strptime strsep strsep_copy	strtok_r strupr swab umask uname unsetenv
-		    closefrom err warn errx warnx flock writev''')
+            strptime strsep strsep_copy    strtok_r strupr swab umask uname unsetenv
+            closefrom err warn errx warnx flock writev''')
 
 conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
 conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
@@ -34,9 +34,9 @@ conf.CHECK_FUNCS('bswap32')
 
 conf.CHECK_TYPE('struct winsize', define='HAVE_STRUCT_WINSIZE', headers='sys/termios.h sys/ioctl.h')
 conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_xpixel',
-				    define='HAVE_WS_XPIXEL', headers='sys/termios.h sys/ioctl.h')
+                    define='HAVE_WS_XPIXEL', headers='sys/termios.h sys/ioctl.h')
 conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_ypixel',
-				    define='HAVE_WS_YPIXEL', headers='sys/termios.h sys/ioctl.h')
+                    define='HAVE_WS_YPIXEL', headers='sys/termios.h sys/ioctl.h')
 conf.DEFINE('HAVE_KRB_STRUCT_WINSIZE', 1)
 conf.DEFINE('VOID_RETSIGTYPE', 1)
 
@@ -59,3 +59,9 @@ conf.CHECK_DECLS('dirfd', reverse=True, headers='dirent.h')
 conf.CHECK_STRUCTURE_MEMBER('DIR', 'dd_fd', define='HAVE_DIR_DD_FD',  headers='dirent.h')
 
 conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
+
+if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_err', headers='com_err.h'):
+    conf.define('USING_SYSTEM_COM_ERR', 1)
+
+if conf.find_program('compile_et', var='COMPILE_ET'):
+    conf.define('USING_SYSTEM_COMPILE_ET', 1)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list