pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why do I want to "get pkgsrc"?



On Thu, 2 Mar 2023 at 06:50, Qingyao Sun <sunqingyao19970825%icloud.com@localhost> wrote:
>
> Dear List,
>
> While reading the pkgsrc user's guide, I find the chapters structured in an unnatural way. In particular, I wanted to install few packages like bash, tmux, and vim with pkgsrc, which I presume is the most common use case of a package manager. Unfamiliar with pkgsrc, I started reading the guide chapter-by-chapter. In chapter 3 [1], I was instructed to “get pkgsrc” by downloading a large tarball or checkout a huge CVS repository which contains the source of all packages. Not only is this step very time-consuming and took a lot of disk space, it is also completely unnecessary: I can simply set PKG_PATH and install individual packages with pkg_add or pkgin, which is not explained until chapter 5.

The pkgsrc manual - in my view - is not intended to be a first point
of contact for the user. I have no opinion about the chapter sequences
- I have never read them in sequence. It contains somewhat detailed
information about the use and the development of the pkgsrc concept.
The compressed tarball is some 72mb (48mb in .xz compression), hardly
a big download. It does not contain any software sources, just the
descriptions of the package builds. The sources are downloaded as and
when needed. It is true that building from source requires beefier
hardware, though - there exist packages requiring many gigabytes of
memory to be able to build (lang/zig for example).

Binary pkg usage - pkgin - is one of the first capabilities to notice
when installing a NetBSD system - it is offered in the configuration
menu, it sets the necessary repositories.conf details and lets you
start using pkgin from the beginning. You obviously do not have to
install pkgsrc if you are satisfied with the versions and the
availability of the packages offered by the Foundation - or by others
contributing to pkgsrc, e.g. Joyent. However, these binary packages
are usually tied to a particular NetBSD (or other OS) version,
architecture etc. and are not always suitable. On top of that, when
these packages were built, all their possible build options have been
taken by whoever built them, and these may not be what one wants or
needs. I myself always use -current, so I maintain my own local pkgin
repository which I use for the various NetBSD machines I deploy, I
point them to it during installation. I also use pkgsrc-current and
wip, so my NetBSD usage is a cadence of sysbuild/sysupgrade, followed
of cvs update of the pjgsrc tree and git pull of the wip tree,
followed by a pkg_rolling-replace, usually on weekly/bi-weekly basis.
The client machines are then upgraded with pkgin.

>
> From my perspective, chapter 5 should be in the position of chapter 3, as this is what a typical user would care most. On the other hand, I don’t see the purpose of having the source of very single package in /usr/pkgsrc: I wonder why do I, as a user, ever want to do that instead of downloading packages on demand from http://ftp.NetBSD.org/pub/pkgsrc/packages/$(uname -s)/$(uname -m)/$(uname -r|cut -f '1 2' -d.)/All?
>

Perhaps one should advertise better http://new.pkgsrc.org/ - I also
just saw it myself, it is in my view the first thing one should see
about pkgsrc/pkgin.

>
> Bests,
> Qingyao
>
>
> [1]: https://www.netbsd.org/docs/pkgsrc/getting.html

Regards,

Chavdar

-- 
----


Home | Main Index | Thread Index | Old Index