First, this is a tremendously useful project. I've been looking for a
straightforward way to install opensource software in a NFS-shareable
location that would properly enforce library dependencies. The openpkg
tools work very well for this.
I bootstrapped openpkg but had considerable problems building source
packages until I discovered that on my system, BUFSIZ is defined to be 1024
in /usr/include/iso/stdio_iso.h, included from /usr/include/stdio.h. This
is much smaller than the 8192 that (seems to be) the value that RPM expects
(noted in the comments /Volumes/app/appman/RPM/SRC/rpm-4.0.2).
The effect was that the long installation path name (not my choice),
/net/gsun492/Volumes/app/appman/, was causing the __build_pre macro to
overflow its buffer and get truncated, resulting in general havoc. (It
seems likely that short paths (/cm/) would not cause the problem to occur.)
As a fix, I made a bad hack to the openpkg.spec file:
*** openpkg.spec-2 Fri Jul 12 20:15:50 2002
--- openpkg.spec Fri Jul 12 20:43:03 2002
***************
*** 416,422 ****
* ) nlsopt="--enable-nls --with-included-gettext" ;;
esac
nlsopt="--disable-nls"
! CC="${l_cc} -DOPENPKG -I$br/db-%{V_db}/build_unix
-I$br/zib-%{V_zlib} -I$br/bzip2-%{V_bzip2}" \
CFLAGS="-DOPENPKG -I$br/db-%{V_db}/build_unix -I$br/zlib-%{V_zlib}
-I$b/bzip2-%{V_bzip2}" \
CPPFLAGS="-DOPENPKG -I$br/db-%{V_db}/build_unix -I$br/zlib-%{V_zlib}
-Ibr/bzip2-%{V_bzip2}" \
LDFLAGS="-L$br/db-%{V_db}/build_unix -L$br/zlib-%{V_zlib}
-L$br/bzip2-%V_bzip2}" \
--- 416,423 ----
* ) nlsopt="--enable-nls --with-included-gettext" ;;
esac
nlsopt="--disable-nls"
! perl -pi.bak -e 's/\bBUFSIZ\b/RPMBUFSIZ/g' `find . -name "*.[ch]"
-prin`
! CC="${l_cc} -DRPMBUFSIZ=8192 -DOPENPKG -I$br/db-%{V_db}/build_unix
-I$b/zlib-%{V_zlib} -I$br/bzip2-%{V_bzip2}" \
CFLAGS="-DOPENPKG -I$br/db-%{V_db}/build_unix -I$br/zlib-%{V_zlib}
-I$b/bzip2-%{V_bzip2}" \
CPPFLAGS="-DOPENPKG -I$br/db-%{V_db}/build_unix -I$br/zlib-%{V_zlib}
-Ibr/bzip2-%{V_bzip2}" \
LDFLAGS="-L$br/db-%{V_db}/build_unix -L$br/zlib-%{V_zlib}
-L$br/bzip2-%V_bzip2}" \
This simply runs find+perl to replace all references to BUFSIZ with
RPMBUFSIZ, then adds the macro definition RPMBUFSIZ=8192 to the compilation
CFLAGS. This seems to work fine, but it might be a good idea to make a
permanent fix in a more portable way, which would probably also involve
adding a test to configure.
I've compiled a pile of packages, but still have a couple of (hopefully
unrelated problems). I'll detail those in another message.
-Greg
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged.
It is intended for the addressee(s) only. Access to this E-mail by anyone else is
unauthorized. If you are not an addressee, any disclosure or copying of the contents
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized
and may be unlawful. If you are not an addressee, please inform the sender immediately.
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [EMAIL PROTECTED]