Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2025 00:20:19 -0400
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 74a6bb524e5b - main - Makefile: Don't allow install{world,kernel} with pkgbase
Message-ID:  <CANCZdfph4nAaan2Y1gXsWnWkgitD3FHR_6%2B2KHUTQhbHNtOytg@mail.gmail.com>
In-Reply-To: <a1f77f46-a6cf-46b8-9fc3-c9a1cf485e0a@FreeBSD.org>
References:  <202510171914.59HJE0uo036247@gitrepo.freebsd.org> <228220a0-c819-4c51-92d3-5357e925c81d@FreeBSD.org> <aPZKLa0kTvovlqMP@amaryllis.le-fay.org> <CANCZdfoJSHrOWX%2BuZeFT6_UwfFi4yv8h%2BeKY9nUfB0oeHYQNPg@mail.gmail.com> <a1f77f46-a6cf-46b8-9fc3-c9a1cf485e0a@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Mon, Oct 20, 2025 at 1:44 PM John Baldwin <jhb@freebsd.org> wrote:

> On 10/20/25 10:59, Warner Losh wrote:
> > On Mon, Oct 20, 2025, 8:42 AM Lexi Winter <ivy@freebsd.org> wrote:
> >
> >> John Baldwin wrote in <228220a0-c819-4c51-92d3-5357e925c81d@FreeBSD.org
> >:
> >>> On 10/17/25 15:14, Lexi Winter wrote:
> >>>>       Makefile: Don't allow install{world,kernel} with pkgbase
> >>>
> >>> Can we document how users who want to build from source can do so from
> a
> >> new installation
> >>> that uses pkgbase?  I guess it is something like:
> >>>
> >>> - pkg install sources if not already (or git clone the right
> branch/tag)
> >>> - etcupdate bootstrap
> >>> - <destroy the pkgbase repo> (clearly can't just use pkg delete with a
> >> glob, so need
> >>>    something else)
> >>
> >> this should eventually be in the Handbook.
> >
> >
> > Install* should eventually just do the right thing like ports: stage the
> > packages, make the packages and the install from the packages.  16 time
> > frame, though.
>
> Hmm, 'make installkernel' needs to still create kernel.old for those
> of us doing development (or really, just running main.  The tb(4) driver
> turned my laptop into a brick recently and I needed kernel.old so I could
> recover).  AFAIK, pkgbase doesn't have any provision for doing that.  Also,
> `make installkernel INSTKERNNAME=test; nextboot -k test` is a key part of
> my workflow for testing kernels.  I'm fine with using packages to ship
> updates to users running stock sources, but please do not make it harder
> to do development.
>

Yes. Though I'd hope we'd get slightly better BE integration. Then it
doesn't matter... unless you're running UFS root... so something needs to
happen. But it's not clear to me if the stagekernel stuff should do that,
or if *ANY* update from pkg to /boot/kernel (or the booted kernel)
shouldn't do the /boot/kernel -> /boot/kernel.old rename, sysctl tweaks so
ps can still fine the kernel if it needs it.


> When hacking on userspace components I often need to be able to do
> just 'make install' of a single binary or library onto an installed
> system knowing that a future installworld or `make install` will revert
> to "stock" binaries later.  Please don't break that.  It's like when
> I work on changes to GDB or LLVM, I use the native build system to build
> the modified version, I don't try to hack up a port to build a package
> with the extra changes I have either in a working tree or committed on a
> feature branch.
>

Oh yes. I was thinking that only install{world,kernel} would change to
depend on the staging + packaging and then  accomplish this by doing a pkg
update. The per-directory stuff I didn't think should change (though I
honestly wish we'd have the 'stating' just be a metafile creation with a
contents= tag in the METALOG instead of so much copying.

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Oct 20, 2025 at 1:44 PM John Baldwin &lt;<a href="mailto:jhb@freebsd.org">jhb@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/20/25 10:59, Warner Losh wrote:<br>
&gt; On Mon, Oct 20, 2025, 8:42 AM Lexi Winter &lt;<a href="mailto:ivy@freebsd.org" target="_blank">ivy@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt;&gt; John Baldwin wrote in &lt;228220a0-c819-4c51-92d3-5357e925c81d@FreeBSD.org&gt;:<br>
&gt;&gt;&gt; On 10/17/25 15:14, Lexi Winter wrote:<br>
&gt;&gt;&gt;&gt;       Makefile: Don&#39;t allow install{world,kernel} with pkgbase<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Can we document how users who want to build from source can do so from a<br>
&gt;&gt; new installation<br>
&gt;&gt;&gt; that uses pkgbase?  I guess it is something like:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - pkg install sources if not already (or git clone the right branch/tag)<br>
&gt;&gt;&gt; - etcupdate bootstrap<br>
&gt;&gt;&gt; - &lt;destroy the pkgbase repo&gt; (clearly can&#39;t just use pkg delete with a<br>
&gt;&gt; glob, so need<br>
&gt;&gt;&gt;    something else)<br>
&gt;&gt;<br>
&gt;&gt; this should eventually be in the Handbook.<br>
&gt; <br>
&gt; <br>
&gt; Install* should eventually just do the right thing like ports: stage the<br>
&gt; packages, make the packages and the install from the packages.  16 time<br>
&gt; frame, though.<br>
<br>
Hmm, &#39;make installkernel&#39; needs to still create kernel.old for those<br>
of us doing development (or really, just running main.  The tb(4) driver<br>
turned my laptop into a brick recently and I needed kernel.old so I could<br>
recover).  AFAIK, pkgbase doesn&#39;t have any provision for doing that.  Also,<br>
`make installkernel INSTKERNNAME=test; nextboot -k test` is a key part of<br>
my workflow for testing kernels.  I&#39;m fine with using packages to ship<br>
updates to users running stock sources, but please do not make it harder<br>
to do development.<br></blockquote><div><br></div><div>Yes. Though I&#39;d hope we&#39;d get slightly better BE integration. Then it doesn&#39;t matter... unless you&#39;re running UFS root... so something needs to happen. But it&#39;s not clear to me if the stagekernel stuff should do that, or if *ANY* update from pkg to /boot/kernel (or the booted kernel) shouldn&#39;t do the /boot/kernel -&gt; /boot/kernel.old rename, sysctl tweaks so ps can still fine the kernel if it needs it.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
When hacking on userspace components I often need to be able to do<br>
just &#39;make install&#39; of a single binary or library onto an installed<br>
system knowing that a future installworld or `make install` will revert<br>
to &quot;stock&quot; binaries later.  Please don&#39;t break that.  It&#39;s like when<br>
I work on changes to GDB or LLVM, I use the native build system to build<br>
the modified version, I don&#39;t try to hack up a port to build a package<br>
with the extra changes I have either in a working tree or committed on a<br>
feature branch.<br></blockquote><div><br></div><div>Oh yes. I was thinking that only install{world,kernel} would change to depend on the staging + packaging and then  accomplish this by doing a pkg update. The per-directory stuff I didn&#39;t think should change (though I honestly wish we&#39;d have the &#39;stating&#39; just be a metafile creation with a contents= tag in the METALOG instead of so much copying.</div><div><br></div><div>Warner</div></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfph4nAaan2Y1gXsWnWkgitD3FHR_6%2B2KHUTQhbHNtOytg>