tech-pkg archive

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

Does pkg_comp with libkver still work with currentt pkgsrc?



I am trying to make my usual pkg_comp arena, which gets NetBSD 3.0
binary sets installed, and a libkver

The general arena building works, the upgrade of pkg_install (from
the very ancient version in the NetBSD 3.0 sets) even seems to work
now too, but libkver looks to be impossible (it might also not work
outside of pkg_comp, I'm not sure - at least for standalone-install).

For instaalling libkver pkg_comp does ...


makeroot_libkver()
{       
    local prefix script statfile

    if [ "$NETBSD_RELEASE" != "no" ]; then
        _BUILD_TARGET="$BUILD_TARGET"
        BUILD_TARGET="standalone-install"
        pkg_build pkgtools/libkver
        BUILD_TARGET="$_BUILD_TARGET" 
        ln -s "$NETBSD_RELEASE" $DESTDIR/libkver_osrelease
    fi
}

(and a few extra lines I deleted that just add stuff to the shell
startup files, etc - those parts work fine)

pkg_build is (more or less) just:
        cd /usr/pkgsrc/$1; make $BUILD_TARGET
with chroot hoops jumped, etc.

So, essentially what is happening there is
        make standalone-install
in pkgsrc/pkgtools/libkver

pkg_comp has been doing this a long time now, nothing has changed
in this area recently.

The Makefile for libkver has 2 sections in it that seem relevant,
first ...


PKG_INSTALLATION_TYPES= overwrite pkgviews

.include "../../mk/bsd.prefs.mk"

CHECK_PERMS=            no

NO_PKGTOOLS_REQD_CHECK= yes
NO_CHECKSUM=            yes
NO_MTREE=               yes

The relevant part there is the NO_PKGTOOLS_REQD_CHECK - frmo what
I can see, that variable isn't used anywhere under pkgsrc/mk which
suggests that there is perhaps some obsolete code happening here.

Then (still from libkver/Makefile)


LIBKVER_STANDALONE_PREFIX?=     /libkver
standalone-install:
        ${MAKE} ${MAKEFLAGS} PKG_DBDIR=${LIBKVER_STANDALONE_PREFIX:Q}/pkg \
          PREFIX=${LIBKVER_STANDALONE_PREFIX:Q} install

This is (clearly the target that's being used, so
        make standalone-install
is equivalent to "make install" with a few variables set to non-default
values - for our purposes, PREFIX in particular.

What happens when this runs is ...

/usr/bin/make _MAKE=/usr/bin/make OPSYS=NetBSD OS_VERSION=3.99.15 LOWER_OPSYS=ne
tbsd _PKGSRCDIR=/usr/pkgsrc PKGTOOLS_VERSION=20051122 _CC=/usr/bin/cc _PATH_ORIG
=/home/kre/bin:/usr/local/sbin:/usr/local/bin:/usr/pkg/sbin:/usr/pkg/bin:/sbin:/
bin:/usr/sbin:/usr/bin:/usr/games:/usr/X11R6/bin PKG_DBDIR=/libkver/pkg  PREFIX=
/libkver install
===> Trying to handle out-dated pkg_install...
===> Cleaning for pkg_install-20080423  
===> Binary install for pkg_install-20080423
/pkg_comp/obj/pkgsrc/pkgtools/pkg_install/default/pkg_install-20080423/info/pkg_
info: not found
=> Installing pkg_install-20080423 from /pkg_comp/packages/All
env: /pkg_comp/obj/pkgsrc/pkgtools/pkg_install/default/pkg_install-20080423/add/
pkg_add: No such file or directory
/pkg_comp/obj/pkgsrc/pkgtools/pkg_install/default/pkg_install-20080423/info/pkg_
info: not found
=> No binary package found for pkg_install-20080423; installing from source.
===> Installing dependencies for pkg_install-20080423

after which there's all the config/compilation noise from pkg_install,
followed by ...

=> Unwrapping files-to-be-installed.
===> Installing for pkg_install-20080423
ERROR: pkg_install-20080423 is already installed - perhaps an older version?
ERROR: If so, you may use either of:
ERROR:     - "pkg_delete pkg_install-20080423" and "/usr/bin/make reinstall"
ERROR:       to upgrade properly
ERROR:     - "/usr/bin/make update" to rebuild the package and all
ERROR:       of its dependencies  
ERROR:     - "/usr/bin/make replace" to replace only the package without
ERROR:       re-linking dependencies, risking various problems.
*** Error code 1


Now, of course, that version of pkg_install is already in the pkg_comp
arena - kjust not in PREFIX=/libkver

After all this is done, the pkg_comp/default/libkver directory os
kind of interesting, it contains nothing that looks even slightly
related to libkver (hardly surprising, as thngs haven't nearly reached
the stage of compiling libkver yet) but does contain ...

pkg_comp:default.conf# ls -l /libkver
total 4
drwxr-xr-x  8 root  wheel  512 May 13 06:35 man
drwxr-xr-x  3 root  wheel  512 May 13 06:35 pkg
drwxr-xr-x  2 root  wheel  512 May 13 06:35 sbin
drwxr-xr-x  3 root  wheel  512 May 13 06:35 share

pkg_comp:default.conf# ls -l /libkver/man/man1
total 92
-r--r--r--  1 root  wheel   9301 May 13 06:35 audit-packages.1
-r--r--r--  1 root  wheel   8475 May 13 06:35 download-vulnerability-list.1
-r--r--r--  1 root  wheel   4343 May 13 06:35 linkfarm.1
-r--r--r--  1 root  wheel  16503 May 13 06:35 pkg_add.1
-r--r--r--  1 root  wheel   9494 May 13 06:35 pkg_admin.1
-r--r--r--  1 root  wheel  14485 May 13 06:35 pkg_create.1
-r--r--r--  1 root  wheel   8058 May 13 06:35 pkg_delete.1
-r--r--r--  1 root  wheel   9837 May 13 06:35 pkg_info.1
-r--r--r--  1 root  wheel   7584 May 13 06:35 pkg_view.1

(etc) ...

It looks as if something in pkgsrc has changed that has badly broken
the way libkver (the packagesrc build mechanism) attempts to work.
Perhaps all the standalone packages, this is the only one I use
(and until it is fixed, I cant' really try building anything else,
as all my packages get built using pkg_comp and libkber).)

I'm not sure when this occurred - something more than a month ago
I suspect (or approximately that) - the last packages I successfully
compiled date from April 5.   I'm not sure what the gpp was between
then and the next time I attempted to build stuff however - this problem
did occur sometime back near then however, I just didn't have the
opportunity to do mor ethan notuce "it is broken, again" until today.

Does anyone have any idea what happened, or better yet, how to fix it?

kre

ps: I am going to file a PR, immediately after this message...


Home | Main Index | Thread Index | Old Index