From root@gioria.dyndns.org  Wed Dec 18 14:53:38 2002
Return-Path: <root@gioria.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 444ED37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 18 Dec 2002 14:53:38 -0800 (PST)
Received: from gioria.dyndns.org (AFontenayssB-104-1-1-242.abo.wanadoo.fr [217.128.58.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 62F2043EDA
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 18 Dec 2002 14:53:36 -0800 (PST)
	(envelope-from root@gioria.dyndns.org)
Received: from bushmills.intra.thorm.net (bushmills.intra.thorm.net [192.168.0.3])
	by gioria.dyndns.org (Postfix) with ESMTP
	id E4A2E37485; Thu, 19 Dec 2002 00:02:40 +0100 (CET)
Received: by bushmills.intra.thorm.net (Postfix, from userid 0)
	id 0E946B3DF; Wed, 18 Dec 2002 23:53:41 +0100 (CET)
Message-Id: <20021218225341.0E946B3DF@bushmills.intra.thorm.net>
Date: Wed, 18 Dec 2002 23:53:41 +0100 (CET)
From: Sebastien Gioria <gioria@FreeBSD.ORG>
Reply-To: Sebastien Gioria <gioria@FreeBSD.ORG>
To: FreeBSD-gnats-submit@freebsd.org
Cc: cyrille.lefevre@laposte.net
Subject: patch for building misc/sh-utils on 5.X and 4.7-STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46363
>Category:       ports
>Synopsis:       patch for building misc/sh-utils on 5.X and 4.7-STABLE
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 18 15:00:13 PST 2002
>Closed-Date:    Mon Feb 03 16:14:17 PST 2003
>Last-Modified:  Mon Feb 03 16:14:17 PST 2003
>Originator:     Sebastien Gioria
>Release:        FreeBSD 5.0-RC i386
>Organization:
FreeBSD.ORG
>Environment:
System: FreeBSD bushmills.intra.thorm.net 5.0-RC FreeBSD 5.0-RC #16: Mon Dec 9 18:34:49 CET 2002 eagle@bushmills.intra.thorm.net:/usr/obj/usr/src/sys/bushmills i386

>Description:
	Actually misc/sh-utils does not build because redefinition of eaccess.
>How-To-Repeat:
	cd /usr/ports/misc/sh-utils ; make 
>Fix:
	Apply this patch to src/test.c and the ports will be build on a 5.X Box and on a 4.7-STABLE Box (according to the documentation of __FreeBSD_Version in the porter_handbook).

--- src/test.c.orig	Wed Dec 18 23:37:09 2002
+++ src/test.c	Wed Dec 18 23:37:21 2002
@@ -153,6 +153,7 @@
   return (stat (path, finfo));
 }
 
+#if (__FreeBSD_version <= 470100)
 /* Do the same thing access(2) does, but use the effective uid and gid,
    and don't make the mistake of telling root that any file is executable.
    But this loses when the containing filesystem is mounted e.g. read-only.  */
@@ -190,6 +191,7 @@
 
   return (-1);
 }
+#endif
 
 /* Increment our position in the argument list.  Check that we're not
    past the end of the argument list.  This check is supressed if the



>Release-Note:
>Audit-Trail:

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: freebsd gnats <freebsd-gnats-submit@freebsd.org>
Cc: Sebastien Gioria <gioria@freebsd.org>
Subject: Re: ports/46363: patch for building misc/sh-utils on 5.X and 4.7-STABLE
Date: Mon, 3 Feb 2003 04:43:59 +0100

 humm! forgot about that. I'll take a look tomorrow.
 
 ----- Forwarded message from Christian Weisgerber <naddy@freebsd.org> -----
 
 From: Christian Weisgerber <naddy@freebsd.org>
 Subject: Re: misc/sh-utils
 To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
 Cc: Sebastien Gioria <gioria@freebsd.org>
 Date: Sat, 4 Jan 2003 02:09:52 +0100
 
 Cyrille Lefevre:
 
 > > misc/sh-utils doesn't build on 5.0 because src/test.c defines a
 > > function eaccess() that collides with 5.0's eaccess(2).
 > 
 > see http://www.freebsd.org/cgi/query-pr.cgi?pr=46363
 
 I'm not certain that the private eaccess() function has the same
 semantics as the system call.  Specifically, the comment regarding
 the x bit handling looks different from the eaccess.2 man page.
 
 -- 
 Christian "naddy" Weisgerber                          naddy@mips.inka.de
 
 ----- End forwarded message -----
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: Christian Weisgerber <naddy@freebsd.org>
Cc: Sebastien Gioria <gioria@freebsd.org>,
	freebsd gnats <freebsd-gnats-submit@freebsd.org>
Subject: Re: ports/46363: patch for building misc/sh-utils on 5.X and 4.7-STABLE
Date: Mon, 3 Feb 2003 22:11:01 +0100

 On Sat, Jan 04, 2003 at 02:09:52AM +0100, Christian Weisgerber wrote:
 > Cyrille Lefevre:
 > 
 > > > misc/sh-utils doesn't build on 5.0 because src/test.c defines a
 > > > function eaccess() that collides with 5.0's eaccess(2).
 > > 
 > > see http://www.freebsd.org/cgi/query-pr.cgi?pr=46363
 > 
 > I'm not certain that the private eaccess() function has the same
 > semantics as the system call.  Specifically, the comment regarding
 > the x bit handling looks different from the eaccess.2 man page.
 
 you are right, in doubt, I propose the following patch :
 
 Makefile
 	PORTREVISION bumped
 files/patch-src::test.c
 	new file
 
 --- /dev/null	Mon Feb  3 22:00:06 2003
 +++ files/patch-src::test.c	Mon Feb  3 21:58:57 2003
 @@ -0,0 +1,10 @@
 +--- src/test.c.orig	Mon Feb  3 21:58:52 2003
 ++++ src/test.c	Mon Feb  3 21:58:16 2003
 +@@ -153,6 +153,7 @@
 +   return (stat (path, finfo));
 + }
 + 
 ++#define eaccess test_access
 + /* Do the same thing access(2) does, but use the effective uid and gid,
 +    and don't make the mistake of telling root that any file is executable.
 +    But this loses when the containing filesystem is mounted e.g. read-only.  */
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/misc/sh-utils/Makefile,v
 retrieving revision 1.13
 diff -u -r1.13 Makefile
 --- Makefile	1 Aug 2002 16:22:28 -0000	1.13
 +++ Makefile	3 Feb 2003 21:01:57 -0000
 @@ -7,7 +7,7 @@
  
  PORTNAME=	sh-utils
  PORTVERSION=	2.0
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	misc
  MASTER_SITES=	${MASTER_SITE_GNU}
  MASTER_SITE_SUBDIR= sh-utils
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
State-Changed-From-To: open->closed 
State-Changed-By: naddy 
State-Changed-When: Mon Feb 3 16:13:31 PST 2003 
State-Changed-Why:  
Final patch committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46363 
>Unformatted:
