From owner-freebsd-ports@FreeBSD.ORG Mon Aug 7 18:23:08 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 403AE16A4E2; Mon, 7 Aug 2006 18:23:08 +0000 (UTC) (envelope-from danger@rulez.sk) Received: from mail.rulez.sk (DaEmoN.RuLeZ.sK [84.16.32.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5706343E7C; Mon, 7 Aug 2006 18:21:11 +0000 (GMT) (envelope-from danger@rulez.sk) Received: from localhost (localhost [127.0.0.1]) by mail.rulez.sk (Postfix) with ESMTP id BBA951CCBD; Mon, 7 Aug 2006 20:21:09 +0200 (CEST) X-Virus-Scanned: by amavisd-new at mail.rulez.sk X-Spam-Score: -2.6 X-Spam-Level: X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, NO_RELAYS=-0.001] Received: by mail.rulez.sk (Postfix, from userid 1001) id 4AA561CCAE; Mon, 7 Aug 2006 20:21:06 +0200 (CEST) Date: Mon, 7 Aug 2006 20:21:06 +0200 From: Daniel Gerzo To: freebsd-ports@freebsd.org Message-ID: <20060807182106.GA35118@daemon.rulez.sk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: ale@FreeBSD.org Subject: Hardened-PHP patch support for php port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2006 18:23:08 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello freebsd-ports, I've been trying to add support for Hardened-php patch into our PHP port (only php4 first, since that's what I'm running) and I ran into a problem with autoconf, unfortunately I have no clue what's going on there, therefore I'm asking if anybody on this list have some idea. Here's the error message: ===> Found saved configuration for php4-4.4.3_1 ===> Extracting for php4-4.4.3_1 => MD5 Checksum OK for php-4.4.3.tar.bz2. => SHA256 Checksum OK for php-4.4.3.tar.bz2. => MD5 Checksum OK for hardening-patch-4.4.3-0.4.13.patch.gz. => SHA256 Checksum OK for hardening-patch-4.4.3-0.4.13.patch.gz. ===> Patching for php4-4.4.3_1 ===> Applying distribution patches for php4-4.4.3_1 ===> Applying FreeBSD patches for php4-4.4.3_1 ===> php4-4.4.3_1 depends on file: /usr/local/sbin/apxs - found ===> php4-4.4.3_1 depends on file: /usr/local/sbin/apxs - found ===> php4-4.4.3_1 depends on file: /usr/local/bin/autoconf259 - found ===> Configuring for php4-4.4.3_1 configure.in:150: warning: AC_PROG_LEX invoked multiple times autoconf/programs.m4:438: AC_DECL_YYTEXT is expanded from... configure.in:150: the top level configure.in:622: error: possibly undefined macro: PHP_AC_BROKEN_REALPATH If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. *** Error code 1 Stop in /usr/ports/lang/php4. The patch for php4 I've produced is attached. Please cc: me when replying, since I'm not subscribed to the list, thank you for you help! -- Sincerely, Daniel Gerzo --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="php4.diff" diff -ruN php4.orig/Makefile php4/Makefile --- php4.orig/Makefile Mon Aug 7 12:38:53 2006 +++ php4/Makefile Mon Aug 7 13:55:55 2006 @@ -7,7 +7,7 @@ PORTNAME= php4 PORTVERSION= 4.4.3 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= lang devel www MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \ http://downloads.php.net/ilia/:rc \ @@ -43,7 +43,8 @@ DISCARD "Enable discard-path support (CGI only)" off \ FASTCGI "Enable fastcgi support (CGI only)" on \ PATHINFO "Enable path-info-check support (CGI only)" on \ - OPENSSL "Build static OpenSSL extension" off + OPENSSL "Build static OpenSSL extension" off \ + HARDENED "Build with Hardened-PHP security patch" off CONFLICTS= php5-5* @@ -121,6 +122,12 @@ CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \ --with-openssl-dir=${OPENSSLBASE} LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl +.endif + +.if defined(WITH_HARDENED) +PATCH_SITES+= http://www.hardened-php.net/ +PATCHFILES+= hardening-patch-4.4.3-0.4.13.patch.gz +PATCH_DIST_STRIP= -p1 .endif .if defined(WITH_DEBUG) diff -ruN php4.orig/distinfo php4/distinfo --- php4.orig/distinfo Mon Aug 7 12:38:53 2006 +++ php4/distinfo Mon Aug 7 12:44:27 2006 @@ -1,3 +1,6 @@ MD5 (php-4.4.3.tar.bz2) = 9542117551c0e79f5bf21f46493094e7 SHA256 (php-4.4.3.tar.bz2) = 0f57da4b9d94f7febd37c0bc8e608e5aafafe744d094466723e04afb283407f7 SIZE (php-4.4.3.tar.bz2) = 4461353 +MD5 (hardening-patch-4.4.3-0.4.13.patch.gz) = 1e765f70ba38d40000501f6238728ae9 +SHA256 (hardening-patch-4.4.3-0.4.13.patch.gz) = 011dfff574912a3ee011cd59c25fe2edca7fb7da3406213d7f0774eb065b7482 +SIZE (hardening-patch-4.4.3-0.4.13.patch.gz) = 61322 --EeQfGwPcQSOJBaQU--