pkgsrc-Users archive

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

Re: Problem using a second pkgsrc unprivileged



On Sun, Oct 25, 2020 at 1:41 AM Roland Illig <roland.illig%gmx.de@localhost> wrote:
>
> On 25.10.2020 01:20, Connor McLaughlan wrote:
> > Hi,
> >
> > ...
> >
> > The problem is that it tries to access /usr/pkg and not /work/pkg,
> >
> > What have i done wrong? Is is because of the prebuilt package? Do i
> > have to build all new with the new bmake?
>
> Yes, if you change the PREFIX, you do have to build all packages again.
>
> The prefix is hardcoded in the binary packages, as well as several other
> directories.  You can see a few of them in the +BUILD_INFO file in the
> generated binary packages (LOCALBASE, PKG_SYSCONFDIR).
>
> Mixing packages with different PREFIX or VARBASE just doesn't work and
> is not supported.  Even though pkg_add allows you to override several
> directories using the -K, -P and -p options, this doesn't mean it's a
> good idea.
>
> To avoid collecting packages for different pkgsrc installations in a
> single directory, you should customize PACKAGES in each mk.conf.  You
> can even put the binary packages inside PREFIX if you add this to your
> mk.conf:
>
>      PACKAGES=          ${LOCALBASE}/binpkgs
>      CHECK_FILES_SKIP+= ${PACKAGES}/.*
>
> Roland

Wouldn't it then be easier to use some chroot to be able to use a
another pkgsrc with standard paths and packages?
Is there some howto available for creating a netbsd chroot?

(in this case my target is to compile some old application against old
libraries and run this application from within the chroot and display
it on the xserver of the outside system if possible)

Regards,
Connor


Home | Main Index | Thread Index | Old Index