pkgsrc-Users archive

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

Re: Am i using it wrong?



On Fri, Aug 28, 2020 at 4:14 PM Greg Troxel <gdt%lexort.com@localhost> wrote:
>
>
> Connor McLaughlan <cont6pro3%gmail.com@localhost> writes:
>
> > i think i must be using pkgsrc the wrong way in some aspect:
>
> Probably but I can't tell exactly how!
>
> > From time to time i need to clear out my system and remove /usr/pkg
> > and /usr/pkgsrc completely.
>
> Why?  You really should not need to do this.  I have been running pkgsrc
> for a really long time on systems and just keep doing pkg_rr, and
> pkg_admin audit, and pkg_admin rebuild-tree occasionally.
>
> You didn't mention OS, but you said "bootstrap" so presumably you mean
> not NetBSD.  If you are bootstrapping on NetBSD, then 1) don't do that
> and 2) if you do, make sure that the pkg_add from the bootstrap is in
> your path ahead of the base system pkg_add, 3) make sure you understand
> which pkgdb is which and probably make one a symlink to the other so you
> only have 1 and 4) please tell us where you were suggested to bootstrap
> on NetBSD so that can either be changed, or augmented to caution against
> what we figure out you are doing that you shouldn't be.
>
> Keep in mind that there is a pkgdb which records what is installed.  On
> NetBSD that is in /var/db/pkg.  This is logically part of /usr/pkg.  If
> you remove /usr/pkg but not /var/db/pkg, you have mesed up the db.
>
> If you want to remove all your packages, just pkg_delete them.  Then you
> can see what stray files are left.  Some might be in /usr/pkg/etc.
>
> If you rm /usr/pkg, also remvoe all the files in /var/db/pkg.
>
> Always run "pkg_admin audit" before and after any serious munging.
>
> > I then extract a fresh /usr/pkgsrc, bootstrap it and install basic
> > stuff via "bmake install", like pkgtools/pkgin, pkgtools/pkgclean and
> > pkgtools/pkg_install.
>
> Isn't pkg_install part of bootstrap?
>
> Why are you 'extracting' rather than using CVS or some mirror?
> Generally, if you are a user it is best to check out the latest stable
> branch and track it.  If you are more adventurous or trying to be a
> pkgsrc developer, then HEAD.
>
> > After this i copy my saved packages from the previous pkgsrc-tree to
> > /usr/pkgsrc/packages/All and install all of them via "pkg_add *".
>
> If you are reinstalling, what was the point of nuking the whole tree?  I
> don't understand what problem you are trying to solve.  Perhaps describe
> your problem.
>
> > Somehow this must be wrong, because sure the packages get installed,
> > but pkg_info tells me i only have the three packages installed that i
> > installed earlier with "bmake install".
>
> How many copies of pkg_add do you have?  How many PKGDB directories?
>
> (The rest of your trouble follows from this issue, I think.)

Hi Greg,

thank you for your  insights.

The problem comes from my learning path I guess...

I was trying to get some sparc64 machines working with modern and
reasonably safe software.
First I figured that there are not many OSes and distributions are
providing support for sparc64 anymore.

And the ones left don't support it very well with most software just
not running (debian) or are in the stage of abandoning it (FreeBSD).

I first tried to run debian as a base and to replace their non-working
software packages with pkgsrc ones. This worked very well and most
software would compile and run.
This teached me the need for bootstrapping.

But after a while i figured that some packages would only compile on
NetBSD. So I switched the base system to NetBSD to get broader
software possibilities.

There are websites and tutorials that tell to bootstrap also on
NetBSD,  so I kept it that way:
https://opensource.com/article/19/11/pkgsrc-netbsd-linux

So far pkgsrc provides the most working software, but is also in a
slightly inconsistent state with packages requiring others that are
not available or not compiling in a current quarterly release. So I
was forced to mix old and new releases to get some stuff working.

This was under the impression that a quarterly release is some kind of
a stable and checked thing, when it really seems to be just a snapshot
of a quarterly cvs state.

I am  not using cvs because the old machines are slow and I am in fear
of constant recompiling on every slight update.
This might change once NetBSD starts to support sparc64 T1 - T5 cpus.
Fast and parallel compiling should be possible then.

So all in all i am pleased. pkgsrc is currently the best way to have a
modern desktop and software on these machines.

Regards,
Connor


Home | Main Index | Thread Index | Old Index