Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68734 - NetBeans 4.0 ebuild
Summary: NetBeans 4.0 ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Development Tools Team
URL:
Whiteboard:
Keywords: EBUILD
Depends on: 59799 85116 85392 85544 85551 86140 90978
Blocks:
  Show dependency tree
 
Reported: 2004-10-24 12:29 UTC by Sean Parsons
Modified: 2005-05-17 09:32 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
First version of the ebuild (netbeans-4.0_beta2.ebuild,3.24 KB, text/plain)
2004-10-24 12:33 UTC, Sean Parsons
Details
Second version. (netbeans-4.0_beta2-r1.ebuild,3.25 KB, text/plain)
2004-10-24 16:50 UTC, Sean Parsons
Details
Netbeans 4.0 rc2 (netbeans-4.0_rc2.ebuild,3.25 KB, text/plain)
2004-12-06 01:32 UTC, Cyril Jaquier
Details
Ebuild for Netbeans-4.0_rc2 (netbeans-4.0_rc2.ebuild,3.30 KB, text/plain)
2004-12-11 04:13 UTC, Petteri Räty (RETIRED)
Details
Netbeans 4.0 ebuild (netbeans-4.0.ebuild,3.32 KB, text/plain)
2004-12-16 12:15 UTC, Petteri Räty (RETIRED)
Details
ebuild that doesn't ask about licenses. (netbeans-4.0.ebuild,3.34 KB, text/plain)
2005-01-07 12:24 UTC, Petteri Räty (RETIRED)
Details
Updated ebuild (netbeans-4.0.ebuild,1.83 KB, text/plain)
2005-01-07 14:47 UTC, Petteri Räty (RETIRED)
Details
Fixed dep issue: dev-java/jre-1.4.2 -> virtual/jre-1.4.2 (netbeans-4.0.ebuild,1.83 KB, text/plain)
2005-01-11 23:50 UTC, Danny Brain
Details
netbeans-4.0.ebuild (netbeans-4.0.ebuild,1.92 KB, text/plain)
2005-01-20 13:59 UTC, Petteri Räty (RETIRED)
Details
netbeans-4.0.ebuild (netbeans-4.0.ebuild,1.99 KB, text/plain)
2005-02-06 14:29 UTC, Petteri Räty (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Parsons 2004-10-24 12:29:54 UTC
Here's an ebuild for the second beta of Netbeans 4.0.

Reproducible: Always
Steps to Reproduce:
Comment 1 Sean Parsons 2004-10-24 12:33:04 UTC
Created attachment 42508 [details]
First version of the ebuild
Comment 2 Sean Parsons 2004-10-24 16:50:00 UTC
Created attachment 42519 [details]
Second version.

I still need to fix the LICENSE field, but this version has a fixed dependency
on the JDK and the URL for getting the sources has been fixed.
Comment 3 Maurice van der Pot (RETIRED) gentoo-dev 2004-10-27 12:00:44 UTC
Please don't assign bugs to yourself if you want Gentoo developers to take a look at it.
Comment 4 Grzegorz Dubicki 2004-11-15 00:27:15 UTC
'emerge -av netbeans' results with:
-->8-->8-->8--
These are the packages that I would merge, in order:

Calculating dependencies ...done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2934, in ?
    mydepgraph.display(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1445, in display
    if portage.portdb.fetch_check(x[2], portage.settings):
  File "/usr/lib/portage/pym/portage.py", line 5237, in fetch_check
    if x not in mysums:
TypeError: iterable argument required
-->8-->8-->8--
..although 'emerge -v netbeans' works just fine.
Comment 5 Cyril Jaquier 2004-12-06 01:32:11 UTC
Created attachment 45367 [details]
Netbeans 4.0 rc2

Ebuild for the RC2. I just changed the sources file name ;-) Make sure JDK 1.5
is your current JDK before compiling NB 4.0 RC2.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2004-12-11 04:13:21 UTC
Created attachment 45730 [details]
Ebuild for Netbeans-4.0_rc2

Changed the fetch location.
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2004-12-11 04:16:50 UTC
This ebuild works fine with my computer. The only problem is that it asked me for confirmation about licenses so many times that I lost count. I also tested that writing and compiling a Hello World! -program works. 
Comment 8 Jose Gonzalez Gomez 2004-12-16 08:08:12 UTC
This same ebuild with trivial modifications seems to properly install netbeans 4.0
Comment 9 Petteri Räty (RETIRED) gentoo-dev 2004-12-16 12:15:06 UTC
Created attachment 46157 [details]
Netbeans 4.0 ebuild

An ebuild for Netbeans 4.0. 4.0 doesn't need jdk-1.5 to compile or to be used
(I just tested this with blackdown-jdk-1.4.2.01). Of course it can be used to
create programs using the new features with jdk-1.5. I have changed the
dependencies accordingly. The installation now asks about 22 licences. I will
read all these through and see which ones have to be added to Portage. Before
the licenses are correct this can't be added to Portage.
Comment 10 Petteri Räty (RETIRED) gentoo-dev 2004-12-16 12:18:36 UTC
The name of this bug should probably be changed, but I don't have the rights to do so. 
Comment 11 Sean Parsons 2004-12-16 12:50:01 UTC
My intention with this ebuild, is to split this down, into the various components that make up Netbeans.

So that each of the individual components that have these licenses are fetch restricted individually.  Since interactivity during the build process is not allowed in Gentoo, hopefully doing all this will result in the prompts being eliminated that are initiated by ant.

Here is one of my e-mails to the Netbeans mailing list: http://www.netbeans.org/servlets/ReadMsg?msgId=847807&listName=nbdev

My apologies for not getting back to this but I've had some PC issues in the last month and a half.
Comment 12 Eyal Lior 2004-12-19 02:18:21 UTC
how come version 4.0 is still not available in portage?
Comment 13 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-23 06:18:45 UTC
Eyal: Netbeans 4.0 is not in Portage quite simply because we don't have a proper from-source ebuild for it.

The current from-source ebuild requires interactive confirmation from the user about licenses, which is not allowed for ebuilds.

I've taken a peek at the netbeans internals, and many of the required libraries which it prompts for license for are already included into Portage as separate packages.

Sean, I suggest that you :

1) Add tomcat, commons-el, ant, ... to RDEPEND and patch the build.xml files
(or use java-pkg_jar-from to symlink the jar files), so that the build process
doesn't need to unscramble these jars.

Out of the 52 scrambled files, 33 are jar files. ~10 of these we have available already. Many of the other are already in our submission queue and will show. The remaining ones should be packaged separately.

2) Sometimes, there are auxiliary .zip files containing the documentation for
a given .jar file. If it turns out that these .zip files are required, we should
put them online in an unscrambled format. Afaict, they are always covered OSI-approved licenses, so that's not a problem.


If we split netbeans up into its constituent components, we may initially get away with packaging less of the external deps, but I fear the long-term maintenance of the package will be more troublesom.
Comment 14 Chris Gaffney 2005-01-04 11:29:27 UTC
Why is it necessary to compile it from source in the first place? Netbeans has been a binary package up until now and that has worked just fine.
Comment 15 Jan Brinkmann (RETIRED) gentoo-dev 2005-01-04 12:08:32 UTC
we are a source based distribution and we try to build as much as possible from source, even java source code. here are some reasons:

http://gentoo-wiki.com/Why_Build_Java_Code_From_Source  

you maybe also want to read our java policy:

http://gentoo-wiki.com/Gentoo_Java_Policy
Comment 16 Chris Gaffney 2005-01-06 19:15:26 UTC
Thank you for the response, I understand now. On another note, there is a flag that can be passed to the ant script that allows for unscrambling of the libraries with out having to say yes during the build. I would need to look it up again but this could be an option, especially since you agree to all the licenses when you download the source (correct?).
Comment 17 Petteri Räty (RETIRED) gentoo-dev 2005-01-07 01:18:23 UTC
From nbbuild/build.xml:
  <target name="maybe-pre-unscramble" depends="init-module-list" unless="netbeans.no.pre.unscramble">
    <!-- To make things more pleasant for the user, unscramble available modules now. -->
    <!-- Otherwise the user would be prompted at intervals and it would get annoying. -->
    <echo>About to unscramble additional third-party files you will probably need.
If you do not plan to use them and wish to avoid accepting their licenses,
try building with the flag: -Dnetbeans.no.pre.unscramble=true</echo>

But I think this would mean that we can't use them. I will do some testing right away. 
Comment 18 Petteri Räty (RETIRED) gentoo-dev 2005-01-07 12:24:12 UTC
Created attachment 47889 [details]
ebuild that doesn't ask about licenses. 

Here is an ebuild, which answers yes automaticly to licenses. Here's the way
it's done at the moment:
	yes yes | ant -buildfile build.xml build-nozip
Comment 19 Petteri Räty (RETIRED) gentoo-dev 2005-01-07 14:47:51 UTC
Created attachment 47898 [details]
Updated ebuild

Reworked the desktop icons and cleaned up the ebuild in many ways.
Comment 20 Danny Brain 2005-01-11 23:50:23 UTC
Created attachment 48272 [details]
Fixed dep issue: dev-java/jre-1.4.2 -> virtual/jre-1.4.2
Comment 21 Scott Carr 2005-01-12 20:56:28 UTC
I tried the latest ebuild with "Fixed dep issue" as the title.  

After the ant build i received the following message:

Total Time:  14 minutes 0 seconds
yes: standard output: Broken pipe
yes: write error

Everything works correctly once installed.  I didn't have to do anything with interactive menus, so the fix seems to have worked to not ask for the licenses, but it also seems to have caused these errors at the end.
Comment 22 Petteri Räty (RETIRED) gentoo-dev 2005-01-13 01:09:47 UTC
The fix keeps putting yes to the pipe until the pipe is closed which causes yes-program to fail. This is nothing to worry about but I will try to think about something which wouldn't give an error at the end. 
Comment 23 Scott Carr 2005-01-13 07:50:04 UTC
Ok. I was just reporting this after running the ebuild.

Everything is working great with the IDE, though.

You may want to put an einfo that states that the above errors are normal, I believe that would be good enough for the ebuild.

Keep in mind I am just a user, although I was in the process of building this ebuild before I found it here.  ;-)
Comment 24 Juan J. García de Soria 2005-01-18 08:07:23 UTC
In order to remove the broken pipe error, redirect yes's stderr to /dev/null by doing:

yes yes 2>/dev/null | <whatever>
Comment 25 Chris Gaffney 2005-01-20 13:11:25 UTC
I'm currently gettings the following error with the latest ebuild:

bootstrap:
     [echo] Bootstrapping NetBeans-specific Ant extensions...

unscramble:

BUILD FAILED
/var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/build.xml:51: The following error occurred while executing this line:
java.lang.NoClassDefFoundError

Total time: 2 seconds
yes: standard output: Broken pipe
yes: write error
>>> Test phase [not enabled]: dev-util/netbeans-4.0

>>> Install netbeans-4.0 into /var/tmp/portage/netbeans-4.0/image/ category dev-util
/usr/lib/portage/bin/dodoc: build_info does not exist.
cp: cannot stat `bin': No such file or directory
cp: cannot stat `etc': No such file or directory
cp: cannot stat `ide4': No such file or directory
cp: cannot stat `nb4.0': No such file or directory
cp: cannot stat `platform4': No such file or directory
cp: cannot stat `build_info': No such file or directory
cp: cannot stat `moduleCluster.properties': No such file or directory
cp: cannot stat `module_tracking.xml': No such file or directory
gnome
Adding icons and shorcuts....
man:
prepallstrip:
strip:
>>> Completed installing into /var/tmp/portage/netbeans-4.0/image/
Comment 26 Petteri Räty (RETIRED) gentoo-dev 2005-01-20 13:59:45 UTC
Created attachment 49062 [details]
netbeans-4.0.ebuild

Moved yes yes error output to /dev/null and made the compile fail correctly if
there are problems
Comment 27 Petteri Räty (RETIRED) gentoo-dev 2005-02-06 14:29:25 UTC
Created attachment 50565 [details]
netbeans-4.0.ebuild

A new work version. It will now install netbeans to /usr and is slotted. I
posted to nbdev mailing list today about packed jars and hopefully we will get
that sorted out soon so we are able to add this package to the tree.
Comment 28 Petteri Räty (RETIRED) gentoo-dev 2005-02-06 14:31:06 UTC
karltk and I also decided to turn off the fetch restriction for now
Comment 29 Petteri Räty (RETIRED) gentoo-dev 2005-02-06 15:13:54 UTC
Instead of adding new attachments here all the time I decided to keep the work ebuild at http://a.bo.cx/b/gentoo/netbeans/netbeans-4.0.ebuild

It now has new icon handling according to the bug:
http://bugs.gentoo.org/show_bug.cgi?id=80877
Comment 30 Dead Schorsch 2005-02-10 06:58:56 UTC
While it was working with one of the previous ebuilds, building netbeans from source fails with the latest one, maybe due to a change in the source:

king ~ # emerge -u netbeans
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-util/netbeans-4.0 to /
>>> md5 src_uri ;-) netbeans-4_0-src-ide_sources.tar.bz2
>>> Unpacking source...
>>> Unpacking netbeans-4_0-src-ide_sources.tar.bz2 to /var/tmp/portage/netbeans-4.0/work
>>> Source unpacked.
Buildfile: build.xml

clean-cluster-flags:
    [mkdir] Created dir: /var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/netbeans

check-for-jdk-1.4:

assure-jdk-1.4:

bootstrap:
     [echo] Bootstrapping NetBeans-specific Ant extensions...

unscramble:

BUILD FAILED
/var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/build.xml:51: The following error occurred while executing this line:
java.lang.NoClassDefFoundError

Total time: 2 seconds

!!! ERROR: dev-util/netbeans-4.0 failed.
!!! Function src_compile, Line 53, Exitcode 1
!!! Compiling failed!
!!! If you need support, post the topmost build error, NOT this status message.

Looking in the build.xml file, line 51 I see no error, it calls another build.xml which unscrambles the files after the license has been accepted. I think that's where it fails. I can start the build process "by hand" but then have to accept thousands of licenses.

Btw: is it really meaningful to build netbeans from source? It's a Java application, the JVM should take care about architecture optimisation by itself.
Comment 31 Petteri Räty (RETIRED) gentoo-dev 2005-02-10 10:27:55 UTC
The answer to why we want to build from source is already given in this bug. 
Comment 32 Claes Mogren 2005-02-10 13:38:18 UTC
I guess the ebuild is hard to use when you can't get the source for it. I guess I'll have to wait and see. 
Comment 33 Petteri Räty (RETIRED) gentoo-dev 2005-02-12 15:38:38 UTC
http://www.netbeans.org/servlets/ReadMsg?msgId=901879&listName=nbdev

Disgussion about the ebuild at the nbdev mailing list. 
Comment 34 wilho 2005-03-21 11:42:29 UTC
How about ebuild for mobility add-on?
Comment 35 wilho 2005-03-21 13:10:34 UTC
I have had some minor problems with ebuild. After manually downloading sources (ebuild couldn't), I had to remove epatch ${FILESDIR}/nbbuild.patch from ebuild, becouse there was no pathc-file in files dir. Did I miss anything important with that pach?

netbeans had to be run with --jdkhome /opt/blackdown-jdk-1.4.2.01 switch. Maybe ebuild needs to set some environment variable, I didn't have any java developing tools installed before.




Comment 36 Petteri Räty (RETIRED) gentoo-dev 2005-03-21 13:36:59 UTC
To use the development ebuild you will want to see:
http://gentoo-wiki.com/Experimental_Java_tree
Comment 37 Petteri Räty (RETIRED) gentoo-dev 2005-03-22 00:28:41 UTC
I checked distfiles in to the svn. They need to be copied to your distfiles directory for some of the ebuilds to work. 
Comment 38 Daniel Feliciano Branco 2005-05-12 06:46:15 UTC
I used the ebuild from http://gentoo-wiki.com/Experimental_Java_tree and gave this error.

!!! Security Violation: A file exists that is not in the manifest.
!!! File: files/extfilecheck.rb

# ebuild netbeans-4.0.ebuild digest 

fixed it.

Then it failed with

BUILD FAILED
/var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/build.xml:2563: The following error occurred while executing this line:
/var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/build.xml:2558: The following error occurred while executing this line:
/var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild/build.xml:349: The following error occurred while executing this line:
/var/tmp/portage/netbeans-4.0/work/netbeans-src/java/javacore/build.xml:30: The following error occurred while executing this line:
java.lang.NoClassDefFoundError


/var/tmp/portage/netbeans-4.0/work/netbeans-src/java/javacore/build.xml:30 is this line:

[...]
    <target name="unscramble">
        <ant dir="${external.dir}" target="unscramble"/>
    </target>
[...]

any ideias? what can I do to help?


Comment 39 Petteri Räty (RETIRED) gentoo-dev 2005-05-12 07:03:44 UTC
ah yes. They put FEATURES="strict" as the default a while ago. I need to be more careful do run digest before committing. I am currently looking into the javacore matter. Thanks for the report. 
Comment 40 Daniel Feliciano Branco 2005-05-12 07:27:42 UTC
running ant from /var/tmp/portage/netbeans-4.0/work/netbeans-src/nbbuild compiled ok, after answering "yes" to the license questions, and netbeans loaded.
Comment 41 Petteri Räty (RETIRED) gentoo-dev 2005-05-12 11:44:02 UTC
Nothing changed in the ebuild that broke it. For some reason the Netbeans build process can't show the licenses on the command line any more. Use ant -v if you want to see the specifics. Good thing is that this error isn't in 4.1. It's possible that we don't release 4.0 at all and skip straight to 4.1
Comment 42 Petteri Räty (RETIRED) gentoo-dev 2005-05-12 12:59:57 UTC
4.0 zero compiles again. Don't know what I did, but there's hope again.
Comment 43 Daniel Feliciano Branco 2005-05-17 08:54:16 UTC
(In reply to comment #42)
> 4.0 zero compiles again. Don't know what I did, but there's hope again.

I've made a svn update, and still got the same error, if you find out what you
did please post it here! ;-)
Comment 44 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-05-17 09:32:17 UTC
Commited to CVS under package.mask.