ports/79655: linux_base-8 fails to install as non-root

Greg Lewis glewis at eyesbeyond.com
Tue Apr 26 14:20:13 PDT 2005


The following reply was made to PR ports/79655; it has been noted by GNATS.

From: Greg Lewis <glewis at eyesbeyond.com>
To: freebsd-gnats-submit at FreeBSD.org
Cc:  
Subject: Re: ports/79655: linux_base-8 fails to install as non-root
Date: Tue, 26 Apr 2005 15:11:31 -0600

 I ran into the same problem as John.  Unfortunately although the patch
 allows a non-root user to start the installation, it is failing for me
 on 5.4-RC3/amd64 with an up to date ports collection.  I think the problem
 is related to the handling of ARCH, in particular the following section in
 the Makefile:
 
 .if (${ARCH} == "amd64")
 LATEST_LINK:=		${LATEST_LINK:C/linux/linux32/}
 ARCH=			i386
 FALLBACK_ELF_MIB=	kern.elf32.fallback_brand
 RPMFLAGS+=		--noscripts
 .else
 FALLBACK_ELF_MIB=	kern.fallback_elf_brand
 .endif
 
 When we su to do something a sub make process is invoked as part of the
 su command to perform the privileged task(s).  I believe this invocation
 is inheriting the altered ARCH setting, which then breaks the installation
 of the RPMs during pre-install as the sub make doesn't have LATEST_LINK,
 FALLBACK_ELF_MIB or RPMFLAGS set correctly (which in this case leads to
 the glibc-common RPM failing to execute its post-install scripts, which
 it wouldn't try to do if --noscripts was set).
 
 One possible solution would be to only use ARCH to set these flags and
 then set a variable named LINUX_ARCH that could be used in the names
 of the RPM files, etc.  E.g. the above would become:
 
 .if (${ARCH} == "amd64")
 LATEST_LINK:=		${LATEST_LINK:C/linux/linux32/}
 TRUE_ARCH=		i386
 FALLBACK_ELF_MIB=	kern.elf32.fallback_brand
 RPMFLAGS+=		--noscripts
 .else
 TRUE_ARCH=		${ARCH}
 FALLBACK_ELF_MIB=	kern.fallback_elf_brand
 .endif
 
 and all the other occurences of ${ARCH} would become ${TRUE_ARCH}.
 
 Comments?
 -- 
 Greg Lewis                          Email   : glewis at eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-emulation mailing list