Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Apr 2020 22:53:12 +0500
From:      Ruslan Garipov <ruslanngaripov@gmail.com>
To:        Tomasz CEDRO <tomek@cedro.info>
Cc:        FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>, FreeBSD Stable <freebsd-stable@freebsd.org>, freebsd-ports <freebsd-ports@freebsd.org>
Subject:   Re: /usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped)
Message-ID:  <67026913-5a6d-4763-a985-e2739de9d147@gmail.com>
In-Reply-To: <CAFYkXj=hZqLnArPxvAfMjhGoRkZoS4JjSUidxiL4g%2BrJfjLn_A@mail.gmail.com>
References:  <CAFYkXj=p0C7gHmVr1UfkG=SFmgHLn-25sMmOLUShd-fc1SSDUQ@mail.gmail.com> <d08bf3ac-9a3a-f62e-f8b8-23914ebd5de7@gmail.com> <CAFYkXjkChjMvhKEOckudVxtQejJPYXyOvDh=OiiFp1BWT_q_uQ@mail.gmail.com> <281e95ff-a1c2-c759-2918-783cb8edf1b7@gmail.com> <CAFYkXj=hZqLnArPxvAfMjhGoRkZoS4JjSUidxiL4g%2BrJfjLn_A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/5/2020 10:05 PM, Tomasz CEDRO wrote:
> On Sun, Apr 5, 2020 at 4:59 PM Ruslan Garipov wrote:
>> I'm sorry, I forgot to ask how do you call /usr/src/release/release.sh?
>> Do you pass a configuration file to this script?
>>
>> By default /usr/src/release/release.sh checks out the source tree for
>> the CURRENT branch (svn://svn.FreeBSD.org/base/head@rHEAD).  In this
>> case (if you doesn't change it) chrooted environment definitely will
>> fail to run on STABLE and/or RELEASE.
>>
>> May be it's easy for you to use `make release` directly.
> 
> Case solved! =)
> 
> I wrongly assumed that release will simply update this svn repo that I
> am working on.. but it fetches HEAD.. so I was trying to build
> 13/HEAD/CURRENT on 12/STABLE/RELEASE that have different ABI thus bad
> syscall.. and I need CURRENT to build CURRENT, right? :-)
I believe in order to build the source tree you just need a compatible
toolchain.  So you can build the source tree for 13.0-CURRENT on
12.1-RELEASE system.  But you need CURRENT to **run** userland with ABI
from the CURRENT.

In order to build, for example, 12.1-RELEASE image with release(7) you
should assign the SRCBRANCH variable to "base/release/12.1.0@rHEAD", and
for 12.0-STABLE: SRCBRANCH="base/stable/12@rHEAD".  Either in your
configuration file for release(7) or directly in your shell:

env SRCBRANCH="base/release/12.1.0@rHEAD" /usr/src/release/release.sh

> 
> I will provide a release.conf, make.conf, src.conf and maybe KERNCONF
> if I need something beyond GENERIC. For now I just need to work with
> 12-STABLE. Good hint! :-)
Sure.  Just as a note, by default (when the caller doesn't provide a
configuration file to release(7), or the file provided doesn't exists),
release(7) builds GENERIC kernel and uses no make.conf and src.conf.

Once again: for native build `make release` may be quite easy and fast.
release(7) guarantees "absolutely clean	build environment".

> 
> Thank you Ruslan!! :-)
> 
> Tomek
> 
> ps/2: Can I provide a patch that will print out what actually is being
> fetched by release.sh? That could save some time for first time users
> :-)
Why not :-)

For me reading /usr/src/release/release.sh and default configs for ARM
saved me a lot of time.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67026913-5a6d-4763-a985-e2739de9d147>