From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 26 21:20:13 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E3F716A4CE for ; Tue, 26 Apr 2005 21:20:13 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4838143D2D for ; Tue, 26 Apr 2005 21:20:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j3QLKDAq054727 for ; Tue, 26 Apr 2005 21:20:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j3QLKDYI054726; Tue, 26 Apr 2005 21:20:13 GMT (envelope-from gnats) Date: Tue, 26 Apr 2005 21:20:13 GMT Message-Id: <200504262120.j3QLKDYI054726@freefall.freebsd.org> To: emulation@FreeBSD.org From: Greg Lewis Subject: Re: ports/79655: linux_base-8 fails to install as non-root X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Greg Lewis List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2005 21:20:13 -0000 The following reply was made to PR ports/79655; it has been noted by GNATS. From: Greg Lewis To: freebsd-gnats-submit@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@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org