From owner-freebsd-ports Sun Nov 24 13:10:12 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DBCA37B404 for ; Sun, 24 Nov 2002 13:10:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7468D43EAA for ; Sun, 24 Nov 2002 13:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAOLA3x3028546 for ; Sun, 24 Nov 2002 13:10:03 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAOLA3eb028545; Sun, 24 Nov 2002 13:10:03 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECB1837B401 for ; Sun, 24 Nov 2002 13:05:51 -0800 (PST) Received: from fatpipi.cirx.org (fatpipi.cirx.org [211.23.144.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79E3643E4A for ; Sun, 24 Nov 2002 13:05:50 -0800 (PST) (envelope-from clive@fatpipi.cirx.org) Received: from fatpipi.cirx.org (clive@localhost.cirx.org [127.0.0.1]) by fatpipi.cirx.org (8.12.6/8.12.6) with ESMTP id gAOL5npD091022 for ; Mon, 25 Nov 2002 05:05:49 +0800 (CST) (envelope-from clive@fatpipi.cirx.org) Received: (from clive@localhost) by fatpipi.cirx.org (8.12.6/8.12.6/Submit) id gAOL5nUK091021; Mon, 25 Nov 2002 05:05:49 +0800 (CST) Message-Id: <200211242105.gAOL5nUK091021@fatpipi.cirx.org> Date: Mon, 25 Nov 2002 05:05:49 +0800 (CST) From: Clive Lin Reply-To: Clive Lin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/45691: Add option to disable samba optimization. Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 45691 >Category: ports >Synopsis: Add option to disable samba optimization. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 24 13:10:03 PST 2002 >Closed-Date: >Last-Modified: >Originator: Clive Lin >Release: FreeBSD 4.7-RELEASE-p1 i386 >Organization: tongi.org >Environment: System: FreeBSD fatpipi.cirx.org 4.7-RELEASE-p1 FreeBSD 4.7-RELEASE-p1 #1: Mon Oct 28 03:38:43 CST 2002 root@fatpipi.cirx.org:/usr/obj/usr/src/sys/ROSE45 i386 # cc -v Using builtin specs. gcc version 2.95.4 20020320 [FreeBSD] >Description: Disable compiling samba with -O flag to get samba functions correctly. Otherwise samba is easy to get signal (SIGSEGV internally) and exit or core dump (depends on sysctl kern.sugid_coredump setting) in certain condition. >How-To-Repeat: Usually seen on RELENG_4 boxes. On -CURRENT, I haven't seen it. If a divx/xvid/vosub/etc.. plugins equipped Windows Media Player is used, it's more easily to trigger this. >Fix: diff -ruN samba.orig/Makefile samba/Makefile --- samba.orig/Makefile Mon Nov 25 04:20:17 2002 +++ samba/Makefile Mon Nov 25 03:39:50 2002 @@ -21,6 +19,7 @@ USE_GMAKE= YES USE_LIBTOOL= YES USE_AUTOCONF= YES +USE_REINPLACE= YES # directories .if !defined(BATCH) && !defined(PACKAGE_BUILDING) @@ -172,6 +171,9 @@ .endif pre-build: +.if defined(WITHOUT_OPTIMIZATION) + ${REINPLACE_CMD} -e 's!-O!!g' ${WRKSRC}/Makefile +.endif ${RM} -fr ${WRKSRC}/include/proto.h (cd ${WRKSRC} && make proto) diff -ruN samba.orig/files/patch-configure.in samba/files/patch-configure.in --- samba.orig/files/patch-configure.in Thu Jan 1 08:00:00 1970 +++ samba/files/patch-configure.in Thu Nov 7 17:53:30 2002 @@ -0,0 +1,11 @@ +--- source/configure.in.orig Thu Nov 7 17:52:42 2002 ++++ source/configure.in Thu Nov 7 17:53:09 2002 +@@ -168,7 +168,7 @@ + AC_SUBST(LIBSMBCLIENT) + + # compile with optimization and without debugging by default +-CFLAGS="-O ${CFLAGS}" ++CFLAGS="${CFLAGS}" + + AC_ARG_ENABLE(debug, + [ --enable-debug Turn on compiler debugging information (default=no)], diff -ruN samba.orig/scripts/configure.samba samba/scripts/configure.samba --- samba.orig/scripts/configure.samba Thu Jul 11 21:32:55 2002 +++ samba/scripts/configure.samba Mon Nov 25 03:23:12 2002 @@ -13,7 +13,7 @@ else /usr/bin/dialog --title "configuration options" --clear \ --checklist "\n\ -Please select desired options:" -1 -1 12 \ +Please select desired options:" -1 -1 13 \ syslog "With syslog support" OFF \ ssl "With ssl support" OFF \ ldap "With LDAP2 support" OFF \ @@ -26,6 +26,7 @@ audit "With Audit" OFF \ winbind "With Winbind" OFF \ wbauth "With Winbind Auth Challenge" OFF \ +nooptimize "Without optimization" OFF \ 2> $tempfile retval=$? @@ -86,6 +87,9 @@ ;; \"wbauth\") echo "WITH_WINBIND_AUTH_CHALLENGE=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + \"nooptimize\") + echo "WITHOUT_OPTIMIZATION=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ;; *) echo "Invalid option: $1" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message