Bug 46363 - patch for building misc/sh-utils on 5.X and 4.7-STABLE
Summary: patch for building misc/sh-utils on 5.X and 4.7-STABLE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-18 23:00 UTC by Sebastien Gioria
Modified: 2003-02-04 00:14 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (599 bytes, patch)
2002-12-18 23:00 UTC, Sebastien Gioria
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Gioria freebsd_committer freebsd_triage 2002-12-18 23:00:13 UTC
	Actually misc/sh-utils does not build because redefinition of eaccess.

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).
How-To-Repeat: 	cd /usr/ports/misc/sh-utils ; make
Comment 1 Cyrille Lefevre 2003-02-03 03:43:59 UTC
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
Comment 2 Cyrille Lefevre 2003-02-03 21:11:01 UTC
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
Comment 3 Christian Weisgerber freebsd_committer freebsd_triage 2003-02-04 00:13:31 UTC
State Changed
From-To: open->closed

Final patch committed, thanks.