Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Apr 2016 14:24:48 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Russell Haley <russ.haley@gmail.com>, Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Installworld failed
Message-ID:  <1459974288.1091.284.camel@freebsd.org>
In-Reply-To: <CABx9NuS-NwmAr0PB8htigZYuetHegP8vBAbtN5=oXKeLp6%2BK2A@mail.gmail.com>
References:  <CABx9NuR_ykXYnwtiamdBij%2B2wwKcXW1VJndEsX=iae%2B4ji4udw@mail.gmail.com> <CANCZdfoRgxNbT-OnCxDQ2kT7DNmS6C7J2jEQVwhM22bZBAe3HQ@mail.gmail.com> <20160403193538.4390989.68535.4518@gmail.com> <CABx9NuS-NwmAr0PB8htigZYuetHegP8vBAbtN5=oXKeLp6%2BK2A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2016-04-05 at 23:14 -0700, Russell Haley wrote:
> On Sun, Apr 3, 2016 at 12:35 PM, Russell Haley <russ.haley@gmail.com> wrote:
> 
> > 
[mixed top/bottom posting stuff trimmed]
> > 
> > This usually is because MAKEOBJDIRPREFIX isn't set anymore
> > now that you are root.
> > 
> 
> So what's interesting for me is I've always run my cross builds in a jail
> and just run it from /usr/src. The idea that I don't need sudo to build
> (just install) is new to me.
> 
> I tried adding MAKEOBJDIRPREFIX=$(PWD)/../obj to all my make commands but
> that didn't work (and later noted Ian's script indicates this is an issue).
> I lucked out and found something that said sudo can retain the current
> users environment. The FreeBSD flag is -E. So I tried that with limited
> success. The final problem was my destdir was not an absolute path.  SO the
> update to the wiki would be:
> 
> export MAKEOBJDIRPREFIX=$(pwd)/obj
> export DEST=$(pwd)/nfsroot
> 
> cd src
> make buildworld TARGET_ARCH=armv6
> make buildkernel TARGET_ARCH=armv6 KERNCONF=IMX6
> 
> sudo -E make installworld TARGET_ARCH=armv6 DESTDIR=$DEST
> sudo -E make distribution TARGET_ARCH=armv6 DESTDIR=$DEST
> sudo -E make installkernelTARGET_ARCH=armv6 KERNCONF=IMX6 DESTDIR=$DEST
> 
> Alternatively I tested DESTDIR as DESTDIR=$(pwd)/../nfsroot which also
> worked.
> 
> So now after looking back at Ian's cross build script further down, my
> question is why doesn't it  fail due to the same issue?
> 
> Thanks,
> 
> Russ

Doh!  It works for me because my sudoers file contains:

Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR PACKAGEROOT PACKAGESITE PKGDIR"
Defaults env_keep += "TMPDIR FTP_PASSIVE_MODE XDG_SESSION_COOKIE"
Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
Defaults env_keep += "MAKEOBJDIRPREFIX MODULES_OVERRIDE SUBDIR_OVERRIDE"

I guess I should mention that on the wiki page.

-- Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1459974288.1091.284.camel>