svn commit: r278447 - projects/release-pkg/release/packages/kernel

Baptiste Daroussin bapt at freebsd.org
Mon Feb 9 17:02:38 UTC 2015


On Mon, Feb 09, 2015 at 11:52:29AM -0500, John Baldwin wrote:
> On 2/9/15 11:18 AM, Baptiste Daroussin wrote:
> > On Mon, Feb 09, 2015 at 11:07:19AM -0500, John Baldwin wrote:
> >> On Monday, February 09, 2015 10:25:59 AM Baptiste Daroussin wrote:
> >>> Author: bapt
> >>> Date: Mon Feb  9 10:25:58 2015
> >>> New Revision: 278447
> >>> URL: https://svnweb.freebsd.org/changeset/base/278447
> >>>
> >>> Log:
> >>>   Rerunning kldxref after installing the kernel is still needed as
> >>> rc.d/kldxref will happen too late
> >>>
> >>> Added:
> >>>   projects/release-pkg/release/packages/kernel/post-install
> >>>      - copied unchanged from r278395,
> >>> projects/release-pkg/release/packages/kernel/post-install
> >>>
> >>> Copied: projects/release-pkg/release/packages/kernel/post-install (from
> >>> r278395, projects/release-pkg/release/packages/kernel/post-install)
> >>> ===========================================================================
> >>> === --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> >>> +++ projects/release-pkg/release/packages/kernel/post-install	Mon Feb  9
> >>> 10:25:58 2015	(r278447, copy of r278395,
> >>> projects/release-pkg/release/packages/kernel/post-install) @@ -0,0 +1 @@
> >>> +/usr/sbin/kldxref /boot/kernel
> >>
> >> Hmm, are you hardcoding /boot/kernel as the location for kernels?  I like to 
> >> keep an up-to-date GENERIC on all my boxes at /boot/kernel.GENERIC along with 
> >> /boot/kernel which runs the machine's "custom" config.  I do think I like that 
> >> the packages default to /boot/kernel in general (so I can 'pkg install kernel-
> >> <CONF>' to pick a specific conf), but it might be nice to be able to install a 
> >> fallback kernel under an alternate name.
> > 
> > We are at very early state of packaging but yes before it becomes official it
> > will allow to have custom location for the kernel (chosen at build time)
> 
> Hmm, it might be nice to choose it at runtime.  Maybe I want to use
> GENERIC as the main kernel so I want it at /boot/kernel, maybe I wnat to
> install the "official" FreeBSD GENERIC kernel as /boot/kernel.GENERIC so
> I'd like to be able to override the "prefix" as it were.  Similarly, I
> might want to install a test kernel package to /boot/test so I can use
> it with nextboot without changing the machine's default kernel.  In the
> case of the kernel all the bits live in one directory, so if you allow
> the directory to be fungible during install that should be doable.  I
> can't think of other things besides the kernel that have this sort of
> behavior.

In theory that is doable but I hate exceptions :). that would had some
complicated code in pkg(8) just for the sake of the kernel, still I'll try to
think about it.
> 
> >> Also, do you have a graceful way of switching configs?  That is, if kernel-FOO 
> >> is installed at /boot/kernel and I want to switch to kernel-BAR, do you just 
> >> have to delete FOO and install BAR?  That's fine if so, though there is a 
> >> window where you don't have a kernel if you crash / power-failure. :-P  Not 
> >> sure how easy it would be to be able to move the FOO kernel to kernel.old in 
> >> that case and install BAR as /boot/kernel?
> > Nothing planned for that so far, I'm open for suggestions, nothing is done in
> > pkg yet to allow to move a directory with its content before actually upgrading.
> > 
> > IMHO that would be a bad idea to have kernel specific hacks, but it sounds a
> > good idea to first anyway create the kernel.old directory. Still don't know how
> > to do that.
> 
> Could you use a pre-install script to move the current /boot/kernel (or
> other path if specified) to /boot/kernel.old?  That would be all that is
> needed.  The kernel Makefiles are a bit trickier in that they only save
> the previous kernel this way if it is the running kernel (by checking
> the kern.bootfile sysctl).  If you have a pre-install script you could
> incorporate the same logic.  It does mean you can't "remove" the
> previous version of the kernel using pkg, but typically you just have 1
> kernel.old that will keep getting updated on each upgrade.

If I do that in pre-install then during the upgrade pkg will complain because
the old files are not there. a cp would work but it will also be more expensive.

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20150209/92bb8143/attachment.sig>


More information about the svn-src-projects mailing list