Bug 80837 - x11-toolkits/linux-gtk: cannot install by non-root user on amd64
Summary: x11-toolkits/linux-gtk: cannot install by non-root user on amd64
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-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-09 22:40 UTC by KOMATSU Shinichiro
Modified: 2005-11-26 01:02 UTC (History)
0 users

See Also:


Attachments
file.diff (432 bytes, patch)
2005-05-09 22:40 UTC, KOMATSU Shinichiro
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KOMATSU Shinichiro 2005-05-09 22:40:02 UTC
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.
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2005-05-10 19:12:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-emulation

Over to maintainer
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2005-05-16 13:46:56 UTC
Responsible Changed
From-To: freebsd-emulation->emulation

Use canonical address of the emulation mailing list.
Comment 3 Volker Stolz freebsd_committer freebsd_triage 2005-10-28 15:32:35 UTC
State Changed
From-To: open->feedback

Can you please check if this is still an issue? I'm unable to repeat 
this, albeit with a hand-crafted test-setup. 
Also, using MACHINE_ARCH is usually the wrong solution, please read 
bsd.port.mk for the rationale.
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2005-11-26 01:02:18 UTC
State Changed
From-To: feedback->closed

Feedback timeout (1 month)