Adding /usr/src using freebsd-update

715 views
Skip to first unread message

Doug Denault

unread,
Mar 20, 2021, 10:42:34 PM3/20/21
to freebsd-...@freebsd.org
My motivation for wanting to do this is basically because updating
11.3-->12.2 broke my Lenovo Ideapad. This is a "well known" and apparently
has a workaround but I could not find a combination that worked following
the very helpful suggestion out of the X11 mailing list or google. What did
work was 13.0-RC2. Out of the box following UPDATING and pkg notes.
Whatever the issue was it was obviously complex involving the interaction
of several components in Xorg, FreeBSD and whether or nor EFI booting was
used. All except the last one are perfectly obvious. I only mention this as
background for why not use git or subversion (for a while anyway).

The fix required that kernel sources be available. On the Lenovo that
happened not to be a problem. On another laptop I did not have /usr/src so
freebsd-update did not add/update it and I saw no option to add /usr/src.
The conf file apparently says take care of it if it is there.

On my HP no /usr/src. I did a package add for git adding 32 required
packages and the installed failed to deliver a working git command. So on
to subversion with similar results. This with 12.2.

As I had already updated to 12.2 and it was working I removed all packages,
copied a 12.1 /usr/src from another server and did a fetch. This added in
the files new to 12.2 and did report doing anything else, so I rather doubt
this is a "good" version of the src tree.

All of the above for my real question. since I had a number of 11.3
/usr/src trees, if I had just added that before doing an upgrade I think
that will work. Correct?


_____
Douglas Denault
http://www.safeport.com
do...@safeport.com
Voice: 301-217-9220
Fax: 301-217-9277
_______________________________________________
freebsd-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Valeri Galtsev

unread,
Mar 20, 2021, 11:07:14 PM3/20/21
to Doug Denault, freebsd-...@freebsd.org

> On Mar 20, 2021, at 9:42 PM, Doug Denault <do...@safeport.com> wrote:
>
> My motivation for wanting to do this is basically because updating 11.3-->12.2 broke my Lenovo Ideapad. This is a "well known" and apparently has a workaround but I could not find a combination that worked following the very helpful suggestion out of the X11 mailing list or google. What did work was 13.0-RC2. Out of the box following UPDATING and pkg notes. Whatever the issue was it was obviously complex involving the interaction of several components in Xorg, FreeBSD and whether or nor EFI booting was used. All except the last one are perfectly obvious. I only mention this as background for why not use git or subversion (for a while anyway).
>
> The fix required that kernel sources be available. On the Lenovo that happened not to be a problem. On another laptop I did not have /usr/src so freebsd-update did not add/update it and I saw no option to add /usr/src. The conf file apparently says take care of it if it is there.

Did you try to use svn? Something in lines

svn co https://svn0.us-east.freebsd.org/base/releng/12.2 /usr/src

(confessing: I’m lazy guy, and about a week or so ago I still used svn, successfully).

> On my HP no /usr/src. I did a package add for git adding 32 required packages and the installed failed to deliver a working git command. So on to subversion with similar results. This with 12.2.
>
> As I had already updated to 12.2 and it was working I removed all packages, copied a 12.1 /usr/src from another server and did a fetch. This added in the files new to 12.2 and did report doing anything else, so I rather doubt this is a "good" version of the src tree.
>
> All of the above for my real question. since I had a number of 11.3 /usr/src trees, if I had just added that before doing an upgrade I think that will work. Correct?
>

I would just move existing /usr/src off the way (rename) and pull fresh new of the release you need (say, using svn command if git doesn’t work on that machine for whatever reason).

Valeri

Doug Denault

unread,
Mar 23, 2021, 11:45:14 AM3/23/21
to Valeri Galtsev, freebsd-...@freebsd.org
On Sat, 20 Mar 2021, Valeri Galtsev wrote:

>
>
>> On Mar 20, 2021, at 9:42 PM, Doug Denault <do...@safeport.com> wrote:
>>
>> My motivation for wanting to do this is basically because updating
>> 11.3-->12.2 broke my Lenovo Ideapad. This is a "well known" and
>> apparently has a workaround but I could not find a combination that
>> worked following the very helpful suggestion out of the X11 mailing list
>> or google. What did work was 13.0-RC2. Out of the box following UPDATING
>> and pkg notes. Whatever the issue was it was obviously complex involving
>> the interaction of several components in Xorg, FreeBSD and whether or
>> nor EFI booting was used. All except the last one are perfectly obvious.
>> I only mention this as background for why not use git or subversion (for
>> a while anyway).
>>
>> The fix required that kernel sources be available. On the Lenovo that
>> happened not to be a problem. On another laptop I did not have /usr/src
>> so freebsd-update did not add/update it and I saw no option to add
>> /usr/src. The conf file apparently says take care of it if it is there.
>
> Did you try to use svn? Something in lines
>
> svn co https://svn0.us-east.freebsd.org/base/releng/12.2 /usr/src
>
> (confessing: I?m lazy guy, and about a week or so ago I still used svn,
> successfully).

First Thank you for the suggestion. Re Lazy, me too, hence looking for an
"easy" answer. The svn port had similar [non]success. On the system in
question this was an "I wonder if this works". I have 500+ packages on this
workstation and have not yet added gimp, yet so there is no need for more
interlocking dependencies. On a Lenovo laptop src was required to install
the drm package required in 13.0 to make it work. Happily it was already
there.

>> On my HP no /usr/src. I did a package add for git adding 32 required
>> packages and the installed failed to deliver a working git command. So
>> on to subversion with similar results. This with 12.2.
>>
>> As I had already updated to 12.2 and it was working I removed all
>> packages, copied a 12.1 /usr/src from another server and did a fetch.
>> This added in the files new to 12.2 and did report doing anything else,
>> so I rather doubt this is a "good" version of the src tree.
>>
>> All of the above for my real question. since I had a number of 11.3
>> /usr/src trees, if I had just added that before doing an upgrade I think
>> that will work. Correct?
>>
>
> I would just move existing /usr/src off the way (rename) and pull fresh
> new of the release you need (say, using svn command if git doesn?t work
> on that machine for whatever reason).

Probably a good idea. On the servers we go the poudriere route. On
workstations I have never gotten xorg to build and usually do not have the
time to see if it will work this time. I will probably continue my thought
experiement when the workstation morphs to 13.

I will learn git going forward. I would be nice if for the non internals
folks if this could just be done via the browser. I have no idea if that's
even possible

Kevin Oberman

unread,
Mar 24, 2021, 12:12:30 AM3/24/21
to Doug Denault, Valeri Galtsev, freebsd-...@freebsd.org
Your point is exactly the one I made back when the last security advisory
came out. That led to a long discussion which led to the addition of the
sequence number to the hash. All future security and erratas will show the
sequence number to resolve the issue. Search for a thread on the stable@
mail archive with a subject of "How do I know if my 13-stable has security
patches?" It was the discussion and includes several ways at determining
the answer from just the hashes. None are pretty though all are clever,
but they won't be needed in the future.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkob...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

PstreeM China

unread,
Mar 25, 2021, 6:19:55 AM3/25/21
to Kevin Oberman, Doug Denault, Valeri Galtsev, freebsd-...@freebsd.org
Just download the src.txz from official site.
Then tar -C / xfvz src.txz will add the src component into the system.
Then, I think you can use the FreeBSD-update to update the src code tree.

RW via freebsd-questions

unread,
Mar 25, 2021, 10:27:39 AM3/25/21
to freebsd-...@freebsd.org
On Sat, 20 Mar 2021 22:42:21 -0400 (EDT)
Doug Denault wrote:


> The fix required that kernel sources be available. On the Lenovo that
> happened not to be a problem. On another laptop I did not have
> /usr/src so freebsd-update did not add/update it and I saw no option
> to add /usr/src. The conf file apparently says take care of it if it
> is there.

By default, but see "StrictComponents" in freebsd-update.conf(5)

doug

unread,
Mar 25, 2021, 1:00:37 PM3/25/21
to RW via freebsd-questions
On Thu, 25 Mar 2021, RW via freebsd-questions wrote:

> On Sat, 20 Mar 2021 22:42:21 -0400 (EDT)
> Doug Denault wrote:
>
>
>> The fix required that kernel sources be available. On the Lenovo that
>> happened not to be a problem. On another laptop I did not have
>> /usr/src so freebsd-update did not add/update it and I saw no option
>> to add /usr/src. The conf file apparently says take care of it if it
>> is there.
>
> By default, but see "StrictComponents" in freebsd-update.conf(5)
>
Thank you
Reply all
Reply to author
Forward
0 new messages