From owner-svn-src-projects@FreeBSD.ORG Mon Feb 9 17:02:38 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 059DC731; Mon, 9 Feb 2015 17:02:38 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DC3CDA5; Mon, 9 Feb 2015 17:02:37 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id bs8so5520413wib.4; Mon, 09 Feb 2015 09:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gC0v2lXO10xENYhKir29oe3LLdHAAW77KRjCXHHtanU=; b=gOf2Hen2m4R6jisB6Av2Tt5/g2PcSuv1HfwzE/eT8fubZ4xnW7YVgzYrviYQ9G+H8o OCO31cYDxJPmChiGs/rGDgrK/xmYJ0BBkFJv0PxDE0aY0LMXfVVQo1WB4Epwl4K8LQgH hRNgP9KMJvo80lNtJclW4V85qTVNZY++QkgY4hSCOpEBRdZsjz+tJtWs4iFeJfW+Mm60 ry0C5mXnKuW7IMfSxYnTXqq6HZ49GVc2o7Y8hp+36y/mZXp731ZK4AdBfr7CtPmQ+DlK R1M0AliXyC5OScSkAJATAPQxsvR2d6OLmJH+JIDKemyVLOaT7/BphhE6py81WJhmzmiq MxDA== X-Received: by 10.180.206.14 with SMTP id lk14mr36973696wic.71.1423501355938; Mon, 09 Feb 2015 09:02:35 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id d10sm17105027wjn.45.2015.02.09.09.02.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 09:02:34 -0800 (PST) Sender: Baptiste Daroussin Date: Mon, 9 Feb 2015 18:02:32 +0100 From: Baptiste Daroussin To: John Baldwin Subject: Re: svn commit: r278447 - projects/release-pkg/release/packages/kernel Message-ID: <20150209170232.GI29891@ivaldir.etoilebsd.net> References: <201502091025.t19APxwK057568@svn.freebsd.org> <2379227.vPTf1TCfaA@ralph.baldwin.cx> <20150209161830.GH29891@ivaldir.etoilebsd.net> <54D8E5CD.8050304@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AptwxgnoZDC4KQWS" Content-Disposition: inline In-Reply-To: <54D8E5CD.8050304@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 17:02:38 -0000 --AptwxgnoZDC4KQWS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 (fr= om > >>> r278395, projects/release-pkg/release/packages/kernel/post-install) > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >>> =3D=3D=3D --- /dev/null 00:00:00 1970 (empty, because file is newly a= dded) > >>> +++ 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 l= ike to=20 > >> keep an up-to-date GENERIC on all my boxes at /boot/kernel.GENERIC alo= ng with=20 > >> /boot/kernel which runs the machine's "custom" config. I do think I l= ike that=20 > >> the packages default to /boot/kernel in general (so I can 'pkg install= kernel- > >> ' to pick a specific conf), but it might be nice to be able to i= nstall a=20 > >> fallback kernel under an alternate name. > >=20 > > We are at very early state of packaging but yes before it becomes offic= ial it > > will allow to have custom location for the kernel (chosen at build time) >=20 > 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. >=20 > >> Also, do you have a graceful way of switching configs? That is, if ke= rnel-FOO=20 > >> is installed at /boot/kernel and I want to switch to kernel-BAR, do yo= u just=20 > >> have to delete FOO and install BAR? That's fine if so, though there i= s a=20 > >> window where you don't have a kernel if you crash / power-failure. :-P= Not=20 > >> sure how easy it would be to be able to move the FOO kernel to kernel.= old in=20 > >> that case and install BAR as /boot/kernel? > > Nothing planned for that so far, I'm open for suggestions, nothing is d= one in > > pkg yet to allow to move a directory with its content before actually u= pgrading. > >=20 > > IMHO that would be a bad idea to have kernel specific hacks, but it sou= nds a > > good idea to first anyway create the kernel.old directory. Still don't = know how > > to do that. >=20 > 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 becau= se the old files are not there. a cp would work but it will also be more expen= sive. Best regards, Bapt --AptwxgnoZDC4KQWS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTY6CgACgkQ8kTtMUmk6EyuWgCePjlI1CFU2iV343sGT1buULOV PMgAnitW65t0tn8ss69TcUpUhlrSGZsK =nFHi -----END PGP SIGNATURE----- --AptwxgnoZDC4KQWS--