Re: Cross compiling user applications for armv7
- In reply to: Mark Millard : "Re: Cross compiling user applications for armv7"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Sep 2025 20:20:51 UTC
Top posting, but I found I had to set
export METALOG=${TOP}/_.${ARCHOS}.metalog
export IGNORE_OSVERSION=yes # of the host vs binaries
export OSVERSION=$(( OSMAJOR * 100000 + OSMINOR * 1000 + OSTRIV ))
export ABI=FreeBSD:${OSMAJOR}:${ARCH}
export PKG_CACHEDIR=${TOP}/repos/${ABI}
export REPOS_DIR=${W}/etc/pkg
and then do
pkg -o INSTALL_AS_USER=yes -r ${W} update
pkg -o INSTALL_AS_USER=yes -o FILES_IGNORE_GLOB='/usr/local/share/man*' -r
${W} install -y $PKG_LIST
to get things to work. I couldn't get INSTALL_AS_USER to work when set in
the environment, however. Maybe I did something wrong?
W/o doing that, I got the same error about uid/gid mismatch.
Warner
On Sat, Sep 20, 2025 at 11:56 AM Mark Millard <marklmi@yahoo.com> wrote:
> On Sep 20, 2025, at 10:10, Michał Kruszewski <mkru@protonmail.com> wrote:
>
> > Basiclly everything has 1001/0.
> > Maybe because I install world and kernel with NO_ROOT=YES?
>
> Seems likely.
>
> > However, in such a case, why the following poudriere config does not
> work:
> > BUILD_AS_NON_ROOT=YES
> > PORTBUILD_USER=mkru
> > PORTBUILD_GROUP=wheel
> > PORTBUILD_UID=1001
> > PORTBUILD_GID=0
>
> poudriere(-devel) is not what is producing the error
> message or rejecting what you have. The pkg command
> is what is doing so and poudriere is just respecting
> that pkg indicated a failure.
>
> It looks like pkg is imposing ownership security to
> limit access to just root/wheel only --without
> poudriere(-devel) knowing that.
>
> I do not run into such because I do such activities
> as root in the first place. (Just me, with a small
> local network that does not provide external
> services and has a very limited range of activity on
> the FreeBSD systems.)
>
> ===
> Mark Millard
> marklmi at yahoo.com
>
>
>