On Mon, Jun 05, 2006, Wilson Jason wrote: > [...] > The first was when attempting to use the 'openpkg build' it uses the > rpmbuild command with a ftp based URL to download the packages. > Unfortunately rpmbuild does not seem to be proxy aware. We are stuck > behind an authenticating proxy.
RPM supports a proxy but unfortunately for HTTP URLs it supports a HTTP proxy (like Squid, etc) but for FTP URLs it supports old-style FTP proxies only (those existing in early layer-7 firewalls like FWTK, etc). It is especially unable to request an FTP URL from a HTTP-style proxy (as it nowadays usually done where the client speaks HTTP with the FTP URL to the proxy and the proxy performs the FTP session to the server). > To work around this I changed the /libexec/openpkg/build script > to do the following: > # output build commands > echo "echo :::: ::::" > if [ ! -f "/..rpm" ]; then > echo "wget || exit $?" > short= > echo "/bin/openpkg rpm --rebuild || exit > $?" > fi > This works in the simplistic cases by setting the 'ftp_proxy' > environment variable with http://username:[EMAIL PROTECTED]:80/. This > certainly is not an 'elegant' solution, but it worked in my case. Hmmm.. yes, a possible workaround. I'm also rather unhappy that we still do not support proxies out of the box. > The next problem is that as soon as it tries to build the first package > (make) it fails as it cant find a compiler. Walking through the scripts > it would seem that the environment is cleared out. For the bootstrap I > used a gcc from a previous installation of openpkg and that works. Yes, OpenPKG uses a sane RPM build environment except for the bootstrap (where RPM still cannot be used). If you have the "gcc" just in a different OpenPKG instance you have to use the RPM command line option "--define 'use_cc /path/to/gcc'" when building at least "make", "binutils" and "gcc". Once the local "gcc" is available in the instance it will be picked up automatically. For the build-tool this means that you have to use the command line option "-Duse_cc=/path/to/gcc". This should do the trick for you. So, try something like: $ /prefix2/bin/openpkg build -Duse_cc=/prefix1/bin/gcc make binutils gcc | sh $ /prefix2/bin/openpkg build ... | sh > As a workaround in this case I created a symbolic link from > /bin/cc to the gcc in the other installation (under a different > directory name). Is this the right way to do this? I tried various > incarnations of setting CC and GCC before running build, but these did > not seem to work. Setting the environment variables (intentionally) doesn't work because of the sane build environment of OpenPKG' RPM. You either have to set the "use_xxx" variables for the tool "xxx" or you have to symlink the tools into the <prefix>/lib/openpkg/fallback/ directory. This is the directory where we search for fallback tools without having to change anything under <prefix>/bin/, etc. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org User Communication List openpkg-users@openpkg.org