tech-pkg archive

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

Re: Bulk builds do not run on NetBSD 9.2



nia <nia%NetBSD.org@localhost> writes:

> due to the PKGDB changes bulk builds do not run on a fresh NetBSD 9.2
> chroot, instead failing with the error:
>
> Compatibility pkgdb location exists, but PKG_DBDIR not specified.
> This may cause unexpected issues. To avoid problems, add
> PKG_DBDIR=/var/db/pkg to /etc/mk.conf.

I am very fuzzy on this now, but I think this is basically that there is
automatic code to use the old location if it exists, and otherwise the
new location (location of record / correct location), and that use of
automatic mechanisms is not clearly robust against config changes.

> I'm not really sure what the unexpected issues are or whether it
> matters where the package database is on a build server, so I've
> just set it to use the legacy location in mk.conf. I noticed the
> TNF builders on nyftp do the same.

It doesn't matter where the build server stores package files, but I
think PKG_DBDIR gets compiled into package-management tools so this
could result in a pkgin and pkg_install that operates in /var/db/pkg.

> Does anyone know what the unexpected issues are and why this
> message is required?

It still seems needed to me.   My view is more or less (and I think this
is all #if NetBSD):

  - a system with /var/db/pkg that is not explicitly configured to use
    it (mk.conf and pkg_install.conf both) is misconfigured

  - packages built on a system configured with /var/db/pkg should not be
    distributed

  - supported versions (8/9/current) of NetBSD should not vreate
    /var/db/pkg on installation.  Maybe that's already true.

  - Existing machines used for package building should be migrated to
    /usr/pkg/pkgdb.

  - Probably the warning/check should be changed to:

      * If both /var/db/pkg and /usr/pkg/pkgdb exist, error out with a
        pointer to https://pkgsrc.org/pkgdb-change/.  Same for
        /var/db/pkg and a differing PKG_DBDIR.   This is basically
        "fatal error on split brain pkgdb".

      * If /var/db/pkg exists and PKG_DBDIR is not set to /var/db/pkg,
        error as above, but change message to "Package database found in
        old location /var/db/pkg and PKG_DBDIR is not set."  with
        pointer to (new?) section in pkgdb-change.

but I am a bit foggy, having recovered from the pain of dealing with
this last December.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index