Re: pkg_add can't find target depend package during bulk make package

2008-11-30 Thread Jason Beaudoin
 snip 


 thanks for the references. viq pointed me towards dpb earlier today, I
 still need to read into how it functions. My only outstanding question
 is if it accepts a list of packages to build, or simply builds
 everything.

 It can accept a SUBDIRLIST, see the comments in the file itself.


for completeness, the root of the original issue - pkg_add not being
able to install the package - was due to the packages being 0 bytes in
size. I am now trying to figure out *why* they were broken [1], which
seems to be connected to either symlinking /usr/ports or building
ports inside a chroot environment.


regards,
~Jason


[1] http://marc.info/?l=openbsd-portsm=122809247327274w=4



Re: pkg_add can't find target depend package during bulk make package

2008-11-18 Thread Jason Beaudoin
On Sat, Nov 15, 2008 at 5:07 AM, Stuart Henderson [EMAIL PROTECTED] wrote:
 On 2008/11/15 10:05, Stuart Henderson wrote:
 On 2008/11/14 22:58, Jason Beaudoin wrote:
  I've bulk built a number of packages over the last week, and I often
  run into the situation where building a package requires a dependency
  (that ends up either being built or found on a mirror), but when make
  tries to pkg_add the dependency, pkg_add fails saying it can't find
  the target package.

 I think you need to figure out what you're doing that's different
 to everyone else.

that's what I'm trying for :)

here is some more info and context.. first of all, this is occuring in
the middle of a bulk package build running the command:

  cd /usr/ports;
  make BULK=yes REFETCH=true REPORT_PROBLEMS=true
SUBDIRLIST=/root/pkg_list.txt package;

and here is my mk.conf:

  (chroot) # cat /etc/mk.conf
  ACCEPT_JRL_LICENSE=Yes  # to build jdk for openoffice
  FETCH_PACKAGES=yes

  # keeping the tree clean..
  WRKOBJDIR=/usr/obj/ports/


 Is your ports tree clean and up-to-date?

after my initial message to the list, I wiped the ports tree,
retested, then wiped the entire chroot last night. Continuing this
morning, I hit the same fatal error with the jpeg package.

I have done some more testing and confirmed a few more odditites about
this, maybe someone can shed some light where I have gone astray.


  Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz

 No wonder this fails, the package is called glib-2.18.2.tgz...

to clarify, this particular error came from the bulk build, when it
tried to pkg_add glib2 itself.. this isn't me.

--

the problem seems to surface with packages that exist on mirrors, and
don't need to  be built locally, the following example shows this
(clean chroot and ports tree - it just happens to be glib2 again):

  === Returning to build of glib2-2.18.2
  ===  glib2-2.18.2 depends on: pcre-=7.2 - found
  ===  glib2-2.18.2 depends on: gettext-=0.17 - found
  ===  glib2-2.18.2 depends on: gmake-* - found
  ===  glib2-2.18.2 depends on: libtool-* - found
  ===  glib2-2.18.2 depends on: bzip2-* - found
  ===  Verifying specs: intl.=4 iconv.=4 pcre c
  ===  found intl.4.0 iconv.5.0 pcre.2.2 c.49.0
  ===  Installing glib2-2.18.2 from /usr/ports/packages/i386/all/
  Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz
  /usr/sbin/pkg_add: /usr/ports/packages/i386/all/glib2-2.18.2.tgz:Fatal error
  *** Error code 1

  Stop in /usr/ports/devel/glib2 (line 1452 of
/usr/ports/infrastructure/mk/bsd.port.mk).
  *** Error code 1

interjection
so pkg_add /usr/ports/packages/i386/all/glib2-2.18.2.tgz attempted
to install glib2  during the bulk build, though pkg_add failed.
/interjection


  Stop in /usr/ports/devel/libIDL (line 1601 of
/usr/ports/infrastructure/mk/bsd.port.mk).
  *** Error code 1

snip redundant error

  Stop in /usr/ports/devel/ORBit2 (line 1964 of
/usr/ports/infrastructure/mk/bsd.port.mk).
  === Exiting devel/ORBit2 with an error
  *** Error code 1
  Stop in /usr/ports (line 124 of
/usr/ports/infrastructure/mk/bsd.port.subdir.mk).

-
ok, so let us attempt the pkg_add ourselves:

  (chroot) # pkg_add /usr/ports/packages/i386/all/glib2-2.18.2.tgz
  Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz
  /usr/sbin/pkg_add: /usr/ports/packages/i386/all/glib2-2.18.2.tgz:Fatal error

-
let's try another package that is in the $PKG_PATH:

  (chroot) # pkg_add /usr/ports/packages/i386/all/python-2.5.2p7.tgz
  Can't find /usr/ports/packages/i386/all/python-2.5.2p7.tgz
  /usr/sbin/pkg_add: /usr/ports/packages/i386/all/python-2.5.2p7.tgz:Fatal error


ok, let's try the package name, not full path:

  (chroot) # pkg_add glib2
  Error from 
ftp://ftp3.usa.openbsd.org//pub/OpenBSD/snapshots/i386/glib2-2.18.2.tgz:
  550 glib2-2.18.2.tgz: No such file or directory.
  glib2-2.18.2: complete

-
so it appears that glib2-2.18.2.tgz from the local repository was not
used, but rather my third PKG_PATH location:

export 
PKG_PATH=/usr/ports/packages/i386/all/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/i386/:ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/;

let's verify this by changing the PKG_PATH to include only the local
repository, even though glib2 was already installed, pkg_add needs to
find the package first:

  (chroot) # export PKG_PATH=/usr/ports/packages/i386/all/
  (chroot) # pkg_add glib2
  Can't find glib2-2.18.2
  /usr/sbin/pkg_add: glib2-2.18.2:Fatal error

-
so now that glib2 has been installed, and we seem to have a problem
with using packages copied to the local repository from ftp (but ftp
pkg_add's fine), I continue with the bulk build.. we will see if
things break again:

  === Returning to build of enchant-1.4.0p1
  ===  enchant-1.4.0p1 depends on: aspell-* - found
  ===  enchant-1.4.0p1 depends on: dbus-glib-* - not found
  ===  Verifying install for dbus-glib-* in x11/dbus-glib
  ===  

Re: pkg_add can't find target depend package during bulk make package

2008-11-18 Thread Jason Beaudoin
Just an update, and some added info..


 alright.. let's retry the bulk build.. it continues past dbus, but
 dies again at dbus-glib. after installing dbus-glib from the ftp
 package.. the bulk build continues.

 the example I've included here is from my work yesterday (with a clean
 ports tree, but the same chroot). As mentioned before, I created a
 clean chroot and ports tree last night, which I have since tested the
 bulk build on, running into the same issue. I started a bulk build on
 my laptop (with a clean -current ports tree) this morning. It hasn't
 crapped out yet, but we'll see what happens.

 what is going wrong here, or where am I going wrong?
 I can post my full prep/chroot/bulk-build process, if that is of
 interest please let me know.


so my laptop is running through the build just fine (all day). the
chroot'ed build is not, so I thought I would share my chroot process:


# here are the steps I take in preparing
# the chroot for bulk building packages.

# get the latest snapshot install sets:

  cd /exports/OpenBSD/snapshots/
  export $FTPROOT=ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/;
  ftp $FTPROOT/i386/*.tgz

---
# zero-out the old partition and mount:

  newfs wd0i
  export CHROOT=/mnt/rover
  mount /dev/wd0i $CHROOT

---
# extract the install-sets:
# (still in .../snapshots/)

  for i in `ls *.tgz`:
do;
tar xzpf $i -C $CHROOT;
done;

---
# copy over a few other files:

  cp /etc/{localtime,resolv.conf} /root/chroot/mk.conf $CHROOT/etc/
  cp /root/chroot/IN_CHROOT $CHROOT/

---
# create device nodes:

  cd $CHROOT/dev  ./MAKEDEV all

---
# get, extract and cvsup the snapshots ports tar.gz:

  cd /exports/OpenBSD/release_tar/
  tar xzpf ports.tar.gz -C $CHROOT/usr/
  cd $CHROOT/usr/ports
  export $CVSROOT=[EMAIL PROTECTED]:/cvs
  cvs -d $CVSROOT up -dP

---
# what does mk.conf look like?

  cat $CHROOT/etc/mk.conf
ACCEPT_JRL_LICENSE=Yes  # to build jdk for openoffice
FETCH_PACKAGES=yes  # get a pkg before building

WRKOBJDIR=/usr/obj/ports/   # keeping the tree clean..

#FETCH_CMD=wget  # use wget for fetch
#PLIST=${PORTSDIR}/plist/# pkg_create saves plists here..
#USE_SYSTRACE=Yes# keeping us safe..

---
# enter the chroot:

  chroot $CHROOT /bin/ksh -l
  ldconfig /usr/lib /usr/local/lib/ /usr/X11R6/lib/

---
# what is our bulk build cmd like?
# (from root's .profile)

  alias bulk_pkg=cd /usr/ports/; make BULK=yes REPORT_PROBLEMS=true \
  REFETCH=true SUBDIRLIST=/root/package_list.txt package



Re: pkg_add can't find target depend package during bulk make package

2008-11-18 Thread Stuart Henderson
On 2008/11/18 09:09, Jason Beaudoin wrote:
   FETCH_PACKAGES=yes

this doesn't make much sense for a bulk build. you're building
packages yourself, why would you want to use packages from,
in all likelihood, 5+ days ago to fulfil dependencies? some of
them won't even match the ports tree or your base OS libraries.

 export 
 PKG_PATH=/usr/ports/packages/i386/all/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/i386/:ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/;

listing just one entry here usually makes things much simpler.
but see above..

for mk.conf, you may also want ACCEPT_GRAPHVIZ_LICENSE=Yes.
also look into /usr/ports/infrastructure/build/dpb, it's the
easiest way to do a bulk build (and, if you're running MP,
makes better use of your CPUs).



Re: pkg_add can't find target depend package during bulk make package

2008-11-18 Thread Jason Beaudoin
On Tue, Nov 18, 2008 at 5:16 PM, Stuart Henderson [EMAIL PROTECTED] wrote:
 On 2008/11/18 09:09, Jason Beaudoin wrote:
   FETCH_PACKAGES=yes

 this doesn't make much sense for a bulk build. you're building
 packages yourself, why would you want to use packages from,
 in all likelihood, 5+ days ago to fulfil dependencies? some of
 them won't even match the ports tree or your base OS libraries.

indeed, I understand that this was an option. though FETCH_PACKAGES
can be handy for some packages.

but either way, that error still doesn't make sense, given that things
are working on my laptop, I've got to be goofing something up.

 export 
 PKG_PATH=/usr/ports/packages/i386/all/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/i386/:ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/;

 listing just one entry here usually makes things much simpler.
 but see above..

 for mk.conf, you may also want ACCEPT_GRAPHVIZ_LICENSE=Yes.
 also look into /usr/ports/infrastructure/build/dpb, it's the
 easiest way to do a bulk build (and, if you're running MP,
 makes better use of your CPUs).

thanks for the references. viq pointed me towards dpb earlier today, I
still need to read into how it functions. My only outstanding question
is if it accepts a list of packages to build, or simply builds
everything.

thanks for your help :)


regards,
~jason



Re: pkg_add can't find target depend package during bulk make package

2008-11-18 Thread Stuart Henderson
On 2008/11/18 17:34, Jason Beaudoin wrote:
 On Tue, Nov 18, 2008 at 5:16 PM, Stuart Henderson [EMAIL PROTECTED] wrote:
  On 2008/11/18 09:09, Jason Beaudoin wrote:
FETCH_PACKAGES=yes
 
  this doesn't make much sense for a bulk build. you're building
  packages yourself, why would you want to use packages from,
  in all likelihood, 5+ days ago to fulfil dependencies? some of
  them won't even match the ports tree or your base OS libraries.
 
 indeed, I understand that this was an option. though FETCH_PACKAGES
 can be handy for some packages.

I use it occasionally, but normally do that manually:

$ make FETCH_PACKAGES=yes

same for FORCE_UPDATE when I use it.

 but either way, that error still doesn't make sense, given that things
 are working on my laptop, I've got to be goofing something up.
 
  export 
  PKG_PATH=/usr/ports/packages/i386/all/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/i386/:ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/;
 
  listing just one entry here usually makes things much simpler.
  but see above..
 
  for mk.conf, you may also want ACCEPT_GRAPHVIZ_LICENSE=Yes.
  also look into /usr/ports/infrastructure/build/dpb, it's the
  easiest way to do a bulk build (and, if you're running MP,
  makes better use of your CPUs).
 
 thanks for the references. viq pointed me towards dpb earlier today, I
 still need to read into how it functions. My only outstanding question
 is if it accepts a list of packages to build, or simply builds
 everything.

It can accept a SUBDIRLIST, see the comments in the file itself.



Re: pkg_add can't find target depend package during bulk make package

2008-11-15 Thread Stuart Henderson
On 2008/11/14 22:58, Jason Beaudoin wrote:
 I've bulk built a number of packages over the last week, and I often
 run into the situation where building a package requires a dependency
 (that ends up either being built or found on a mirror), but when make
 tries to pkg_add the dependency, pkg_add fails saying it can't find
 the target package.

I think you need to figure out what you're doing that's different
to everyone else.

Is your ports tree clean and up-to-date?

 Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz

No wonder this fails, the package is called glib-2.18.2.tgz...



Re: pkg_add can't find target depend package during bulk make package

2008-11-15 Thread Stuart Henderson
On 2008/11/15 10:05, Stuart Henderson wrote:
 On 2008/11/14 22:58, Jason Beaudoin wrote:
  I've bulk built a number of packages over the last week, and I often
  run into the situation where building a package requires a dependency
  (that ends up either being built or found on a mirror), but when make
  tries to pkg_add the dependency, pkg_add fails saying it can't find
  the target package.
 
 I think you need to figure out what you're doing that's different
 to everyone else.
 
 Is your ports tree clean and up-to-date?
 
  Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz
 
 No wonder this fails, the package is called glib-2.18.2.tgz...
 

oh hmm.oops, I was looking at PKGNAME not PKGNAME-main




pkg_add can't find target depend package during bulk make package

2008-11-14 Thread Jason Beaudoin
ports!

I've bulk built a number of packages over the last week, and I often
run into the situation where building a package requires a dependency
(that ends up either being built or found on a mirror), but when make
tries to pkg_add the dependency, pkg_add fails saying it can't find
the target package. In testing pkg_add out myself, I experience the
same error when I run pkg_add with the full path of the package just
created (either grabbed from a mirror or built locally), though all is
fine if I use the package's basename (and not full path). pkg_add is
also fine to use the full path to the package if the package was not
the dependency make just attempted to pkg_add see the following
example with xfe):

 (chroot) # lls /usr/ports/packages/i386/all/xfe-1.19.2.tgz
-rw-r--r--  1 root  wheel   2.0M Nov  8 10:10
/usr/ports/packages/i386/all/xfe-1.19.2.tgz
(chroot) # pkg_add fox
fox-1.6.28: complete
(chroot) # pkg_add  /usr/ports/packages/i386/all/xfe-1.19.2.tgz
xfe-1.19.2: complete

here is the last chunk of the bulk package build, including where
pkg_add fails, then my attempts to manually pkg_add the newly
available dependency:

=== Returning to build of glib2-2.18.2
===  glib2-2.18.2 depends on: pcre-=7.2 - found
===  glib2-2.18.2 depends on: gettext-=0.17 - found
===  glib2-2.18.2 depends on: gmake-* - found
===  glib2-2.18.2 depends on: libtool-* - found
===  glib2-2.18.2 depends on: bzip2-* - found
===  Verifying specs: intl.=4 iconv.=4 pcre c
===  found intl.4.0 iconv.5.0 pcre.2.2 c.49.0
===  Installing glib2-2.18.2 from /usr/ports/packages/i386/all/
Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz
/usr/sbin/pkg_add: /usr/ports/packages/i386/all/glib2-2.18.2.tgz:Fatal error
*** Error code 1

Stop in /usr/ports/devel/glib2 (line 1452 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1601 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1998 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1424 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1424 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1961 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/desktop-file-utils (line 1452 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/print/cups (line 1601 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/editors/abiword (line 1998 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/editors/abiword (line 1424 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/editors/abiword (line 1424 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/editors/abiword (line 1964 of
/usr/ports/infrastructure/mk/bsd.port.mk).
=== Exiting editors/abiword with an error
*** Error code 1

Stop in /usr/ports (line 124 of
/usr/ports/infrastructure/mk/bsd.port.subdir.mk).
(chroot) # pkg_add /usr/ports/packages/i386/all/glib2-2.18.2.tgz
Can't find /usr/ports/packages/i386/all/glib2-2.18.2.tgz
/usr/sbin/pkg_add: /usr/ports/packages/i386/all/glib2-2.18.2.tgz:Fatal error
(chroot) # pkg_add glib2
glib2-2.18.2: complete


I have experienced this same behaviour on both my snapshots
workstation from last week, and more recently from inside my chroot
bulk build environment based off a snapshot from yesterday (the 13th).

please let me know if there is more information I may provide.


best,
~Jason