Here's an ebuild for the second beta of Netbeans 4.0. Reproducible: Always Steps to Reproduce:
Created attachment 42508 [details] First version of the ebuild
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.
Please don't assign bugs to yourself if you want Gentoo developers to take a look at it.
'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.
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.
Created attachment 45730 [details] Ebuild for Netbeans-4.0_rc2 Changed the fetch location.
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.
This same ebuild with trivial modifications seems to properly install netbeans 4.0
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.
The name of this bug should probably be changed, but I don't have the rights to do so.
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.
how come version 4.0 is still not available in portage?
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.
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.
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
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?).
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.
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
Created attachment 47898 [details] Updated ebuild Reworked the desktop icons and cleaned up the ebuild in many ways.
Created attachment 48272 [details] Fixed dep issue: dev-java/jre-1.4.2 -> virtual/jre-1.4.2
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.
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.
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. ;-)
In order to remove the broken pipe error, redirect yes's stderr to /dev/null by doing: yes yes 2>/dev/null | <whatever>
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/
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
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.
karltk and I also decided to turn off the fetch restriction for now
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
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.
The answer to why we want to build from source is already given in this bug.
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.
http://www.netbeans.org/servlets/ReadMsg?msgId=901879&listName=nbdev Disgussion about the ebuild at the nbdev mailing list.
How about ebuild for mobility add-on?
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.
To use the development ebuild you will want to see: http://gentoo-wiki.com/Experimental_Java_tree
I checked distfiles in to the svn. They need to be copied to your distfiles directory for some of the ebuilds to work.
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?
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.
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.
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
4.0 zero compiles again. Don't know what I did, but there's hope again.
(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! ;-)
Commited to CVS under package.mask.