Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 46582

Summary: dev-java/rhino-1.5-r5 don't honor gentoo-mirror and ftp/http-proxy
Product: Gentoo Linux Reporter: Per Pomsel <phantom4>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: axxo, halcy0n, miaomx5, rizzo, sotaegui, svein.brostigen
Priority: Highest    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: proxy patch for toolsrc/build.xml
ebuild which uses the proxy.patch
rhino-1.5-r5.ebuild.diff
add-package-line.diff

Description Per Pomsel 2004-04-02 03:01:29 UTC
It seems to be the same bug as 42357. It should have been fixed but it isn't.
I have to use proxies to get the packages. My proxies work well with all other packages. Ant (java) has no proxy settings.

Reproducible: Always
Steps to Reproduce:
1. emerge dev-java/rhino
2.
3.

Actual Results:  
     [copy] Copying 2 files to /var/tmp/portage/rhino-1.5-
r5/work/rhino1_5R5/build/classes

properties:

get-swing-ex:
      [get] Getting: 
http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
      [get] Error getting 
http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip 
to /var/tmp/portage/rhino-1.5-r5/work/rhino1_5R5/build/swingExSrc.zip

BUILD FAILED
/var/tmp/portage/rhino-1.5-r5/work/rhino1_5R5/build.xml:51: Following error 
occured while executing this line
/var/tmp/portage/rhino-1.5-r5/work/rhino1_5R5/toolsrc/build.xml:23: 
java.net.ConnectException: Connection refused

Total time: 21 seconds

!!! ERROR: dev-java/rhino-1.5-r5 failed.
!!! Function src_compile, Line 25, Exitcode 1
!!! compilation error



emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 
2.4.25)
=================================================================
System uname: 2.4.25 i686 Pentium II (Deschutes)
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2
/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/
config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/shar
e/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf
/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apache2 apm arts avi berkdb bonobo crypt cups dedicated encode esd 
ethereal fam flac foomaticdb gd gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml 
imagemagick imlib ipv6 java jikes jpeg kde ldap libg++ libgda libwww mad 
maildir mikmod mmx motif mozilla mpeg ncurses nls odbc oggvorbis opengl oss pam 
pdflib perl png postgres ppds python qt quicktime readline samba sasl sdl slang 
spell ssl svga tcltk tcpd tetex tiff truetype x86 xml xml2 xmms xv zlib"
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2004-04-02 16:42:25 UTC
I'm experiencing this same problem.  Ant does have support for proxies, I just don't know enough about it to fix the problem.
Comment 2 Benjamin Coles 2004-04-02 17:20:33 UTC
not mine, sorry
Comment 3 Gregory Shimansky 2004-04-05 04:05:53 UTC
Ant supports proxies. The build.xml file has to be patched to use <setproxy> ant task if user has http_proxy and ftp_proxy environment variables. Task description is here: http://ant.apache.org/manual/OptionalTasks/setproxy.html
Comment 4 Gabe Yoder 2004-04-19 09:50:44 UTC
Here's a quick and dirty ebuild hack to work around things until the ebuild is fixed.  Just after the "src_compile() {" line, add something like:
echo '8a9
>   &lt;setproxy proxyhost="proxy_name"/>' | patch build.xml

Replace proxy_name with the name of your proxy server.
Comment 5 Don Seiler (RETIRED) gentoo-dev 2004-04-19 10:55:14 UTC
I'm getting this from portage when I try that:

/var/tmp/portage/rhino-1.5-r5/work/rhino1_5R5/build.xml:9: Could not create task
 or type of type: setproxy.

The build.xml file looks like it should.
Comment 6 Gabe Yoder 2004-04-20 05:58:56 UTC
That should be a "<" character instead of "&lt;".  If that isn't your problem, then I don't know enough to be able to help you.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2004-04-20 07:34:07 UTC
Getting it to work manually isn't that difficult.  I was trying to make it so it would pull in the environmental variables, passing them during the ant command using -Dproperty=value, but it was not taking the port number.  I'll look into this further tonight.  If you need to get it to compile (I'm at work, so this is going to be alittle fuzzy), go into toolsrc/build.xml.  Add <setproxy proxyhost="your.proxy.com" proxyhost="proxyPort" /> right before the get command, which is about 10-15 lines down from the top.  That made it work fine for me.
Comment 8 Lim Swee Tat (RETIRED) gentoo-dev 2004-04-22 07:54:04 UTC
*** Bug 47246 has been marked as a duplicate of this bug. ***
Comment 9 Mark Loeser (RETIRED) gentoo-dev 2004-05-14 20:47:23 UTC
Created attachment 31454 [details, diff]
proxy patch for toolsrc/build.xml

Alright, here's my best efforts.  Made the one liner patch and an updated
ebuild which should pull in HTTP_PROXY from the environment, then split it so
we have host and port separate, then pass those to ant.  I definately didn't
update all the version numbers in the ebuild right, I just incremented the
revision number for the file.  Works fine on my system.  Hope it helps.
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2004-05-14 20:48:01 UTC
Created attachment 31455 [details]
ebuild which uses the proxy.patch
Comment 11 Mark Loeser (RETIRED) gentoo-dev 2004-05-14 21:25:08 UTC
You know, I didn't quite think everything through, and I don't handle when the person doesn't have a proxy set up.  The patch will be useful for those that have one though, and should be a good starting point though. :)
Comment 12 Tony Vroon (RETIRED) gentoo-dev 2004-06-06 08:38:46 UTC
Created attachment 32779 [details, diff]
rhino-1.5-r5.ebuild.diff

This ebuild diff will add the src.zip to SRC_URI, and do the magic that
build.xml does with a patchfile. No fetches will happen in the middle of
building anymore.
Comment 13 Tony Vroon (RETIRED) gentoo-dev 2004-06-06 08:39:50 UTC
Created attachment 32780 [details, diff]
add-package-line.diff

This is some "replace file" magic from build.xml, it adds a package line to a
few .java files. The modified ebuild will epatch it.
Comment 14 Tony Vroon (RETIRED) gentoo-dev 2004-06-08 13:20:34 UTC
That work has already been done by Sven Wegener almost a month ago. Keeping that bug open.

*** This bug has been marked as a duplicate of 50615 ***
Comment 15 Thomas Matthijs (RETIRED) gentoo-dev 2004-06-19 13:46:56 UTC
setproxy is provied by ant-optional, and that rhino is a DEPEND of that

so that might not be the best solution for this