ports/80837: x11-toolkits/linux-gtk: cannot install by non-root user on amd64

KOMATSU Shinichiro koma2 at lovepeers.org
Mon May 9 21:40:03 UTC 2005


>Number:         80837
>Category:       ports
>Synopsis:       x11-toolkits/linux-gtk: cannot install by non-root user on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 09 21:40:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     KOMATSU Shinichiro
>Release:        FreeBSD 5.3-RELEASE-p5 amd64
>Organization:
>Environment:
FreeBSD 5.3-RELEASE-p5 amd64

>Description:

On amd64, when "make install" is run by non-root user,
installation of x11-toolkits/linux-gtk finishes with success 
but nothing is really installed.

    % make install
    ...(snip)...
    ===>  Installing for linux-gtk-1.2_4
    ===>   linux-gtk-1.2_4 depends on file: /compat/linux/usr/X11R6/lib/libX11.so.6 - found
    ===>   Generating temporary packing list
    ===>  Checking if x11-toolkits/linux-gtk already installed
    ===>  Switching to root credentials for 'install' target
    gtk+-1.2.9-4.i386.rpm
    package gtk+-1.2.9-4 is for a different architecture
    ===>   Registering installation for linux-gtk-1.2_4
    ===>  Returning to user credentials

    % pkg_info -qL linux-gtk-1.2_4 | xargs ls -l
    ls: /compat/linux/etc/gtk/gtkrc: No such file or directory
    ls: /compat/linux/etc/gtk/gtkrc.az: No such file or directory
    ...(snip)...

When installed by root, everything is successful.

This is because a separate make process is run (with ${SU_CMD})
when "install" target is executed by non-root user,
and ${ARCH}, which is overwritten to "i386" by the 1st make process,
is passed to the 2nd make, and the following part of the Makefile  
is not interpreted.

    .if (${ARCH} == "amd64")
    ARCH=		i386
    RPMFLAGS+=	--ignorearch
    .endif

This is the same problem as ports/80679 (so portupgrade also fails),
and the same fix should be applied.

>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/linux-gtk/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile	1 Mar 2005 21:51:48 -0000	1.30
+++ Makefile	9 May 2005 21:29:40 -0000
@@ -27,7 +27,7 @@
 
 .include <bsd.port.pre.mk>
 
-.if (${ARCH} == "amd64")
+.if (${MACHINE_ARCH} == "amd64")
 ARCH=		i386
 RPMFLAGS+=	--ignorearch
 .endif
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list