Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Thu, 30 Aug 2012 13:02:06 -1000
On 08/30/2012 07:32 AM, John Baldwin wrote:
> On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote:
>> On 30 Aug 2012 18:03, "John Baldwin" <jhb_at_freebsd.org> wrote:
>>>
>>> On Thursday, August 30, 2012 10:39:17 am Tijl Coosemans wrote:
>>>> On 27-08-2012 18:24, John Baldwin wrote:
>>>>> On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote:
>>>>>> The problem is that we don't really support the idea of things in the
>>>>>> base magically deleting themselves.
>>>>>>
>>>>>> As I have said in previous messages, the bootstrapping problem is being
>>>>>> overblown by several orders of magnitude. For newly installed systems
>>>>>> where pkg is the default, /usr/local/bin/pkg will be installed. So there
>>>>>> is no bootstrapping problem.
>>>>>>
>>>>>> For already-installed systems who wish to switch to pkg, they can
>>>>>> install from /usr/ports, or use the pkg bootstrap tool in the base.
>>>>>> Given that they will be intentionally making this change, and there will
>>>>>> be instructions written up on how to do this which include the
>>>>>> bootstrapping step, once again this is a non-issue.
>>>>>>
>>>>>> The whole idea of having every call to /usr/local/sbin/pkg pass through
>>>>>> /usr/sbin/pkg in order to help a tiny minority of users with a one-time
>>>>>> bootstrapping issue is just plain ludicrous.
>>>>>
>>>>> I agree.  Even if we keep /usr/sbin/pkg, we will presumably want to remove
>>>>> it from the base in a year or so via 'make delete-old', etc.  Given that,
>>>>> I'm not sure we need it there in the first place.
>>>>
>>>> What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot"
>>>> pkg then?
>>>
>>> Yes, if we've decided it (pkgng) should not be part of the base.  This
>>> doesn't strike me as that weird.  It seems similar to how one has to
>>> bootstrap, say, MacPorts.
>>
>> Difference is, MacPorts isn't the official Mac distribution centre.
>>
>> Leaving out pkg-bootstrap (or whatever) is marginalising ports as a
>> non-integral part of the OS.
> 
> *sigh*  I sadly expected an emotional red herring reply such as this.
> 
> This has nothing to do with "marginalising ports".  Prior to this it has been
> a key argument and point that pkg* should _not_ be tied to the base system as
> that limits flexibility in the pkg tools.  I completely agree with that
> argument and having /usr/sbin/pkg doesn't appear to be consistent with that.
> 
> For example, we've already shipped a binary in 9.1 release that has a
> hardcoded URL of "http://pkgbeta.FreeBSD.org".  So now you are stuck keeping
> that URL around for the next N years, albeit pointing to the production
> (not-beta) repository.  You can't safely reuse pkgbeta.FreeBSD.org for anything
> until 9.1 is EOL'd.  And you'd have to change that before 9.2 and 10.0 if you
> want to avoid being in the same boat for even longer.  That is directly contrary
> to the goal of having pkg* not being tied to the base.  A much more flexible
> and scalable approach would be for each pkg repository to include a binary/script
> whatever that you can make available at a URL (which is easily changeable in
> documentation on our website) that when you run self-extracts and bootstraps
> pkgng.  (The pkg-static stuff is already basically this AFAICT.)
> 
> If you wish to support existing users of, say, 8.2 or 8.3 release then you need
> something like this anyway.  Also, as a downstream consumer who plans to use
> a custom pkgng repository on top of a modified FreeBSD distribution, this approach
> is less failure prone (i.e. if someone runs 'pkg' and it tries to download something
> from some hardcoded URL that's completely wrong).

I agree with John on all counts here. Further, the idea of a
self-installing package, at least for the pkg stuff itself, addresses
the issue that someone else brought up about how to handle installation
of pkg by the installer for a new system.

For example it's pretty common in the Linux world to have a package
which is wrapped in a shell script which unpacks the tarball, verifies
it with a digital signature, then installs the bits from the tarball
where they need to go. Since pkg brings a lot of the pieces of this to
the party already, it wouldn't be hard to add the rest.

... and please feel free to insert your favorite version of my "We have
to get away from the idea that something is only good/cool/really part
of FreeBSD if it's in the base" rant here. :)

Doug
Received on Thu Aug 30 2012 - 21:02:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC