Wednesday, December 18, 2013

P2 - retrospection

My work towards getting P2-RPM integration is leaning towards an end.  Patches are in gerrit, here and here. While Eclipse with the patches is being built, I have plenty of time to think.

I've been with P2 since it was announced at EclipseCon 2008 in Santa Clara. It's hard to remember how crowded was the room, but I remember my sheer enthusiasm to the idea of solving the satisfiability problem, and runnig the optimal set of bundles.

Little had I know how much influence it will have on me. But P2, and especially dropins, were supposed to be my daily bread for the next couple of years.

Then I changed the job, hoping for something new, but P2 did not let me to forget. Fedora turned out to rely on dropins (because there was *no* alternative). I tried to change Fedora, but was confronted with 20+ years of Linux releng, and got really convinced that P2 could have been quite different.

So, how the P2 could have look like now?
The core P2 functionality, responsible for installing things, should *not* be running in JVM. Java itself is not granted on every computer, and it has plenty of dependencies (at least on Linux), which makes it very unwanted member of the installer stack. Not to mention that it adds size to the installer, which is really important in the case of corporate setups and people using modems. Another problem is that P2 running in JVM cannot update that JVM because of locking. Not to mention the lack of elevated privileges support.

I can easily imagine P2 being a native, embeddable processing library that would rather work take the state of a system, the request, and respond with steps leading to another state, but without really touching anything, but just letting the installer to deal with file operations.

I'd be the first to work on it to integrate it fully into RPM and make it responsible for the whole Linux installation - not just Eclipse.

Disclaimer: Don't be afraid. Those are only my thougths, which (un)luckily I'm not able to materialize without making many people upset.

Friday, October 25, 2013

Google Talk plugin presence breaks Eclipse in Fedora 20.

This is the kind of news I really hate to announce, and at the same time, this is the reason why I'm addicted to open source. With open-source I could report it. Investigate it, or even workaround it. But the only thing I can do with a binary plugin is to remove it.

Eclipse 4.3.1 in Fedora 20 crashes shortly after content assist or javadoc is shown. ABRT discovers a crash.

Both content assist and javadoc are browser-based. Google Talk plugin interferes with webkit/SWT, and in the end JVM crashes.

Remove Google Talk plugin.
yum -y remove google-talkplugin 

Thursday, October 24, 2013

Enabling Tycho tests for P2 - lessons learned

Today's morning, after turning on Eclipse, I got this notification:

I find it to be a big step forward (at least to me), because from now on, all P2 patches pushed to gerrit will be automatically verified in a quite reasonable time - more or less 2 hours - yes, that's the time that is necessary to run the build and execute all P2 tests.

However, the road to the green build was a rather bumpy one - here is the list of issues that may impact more people doing the migration:

Issue #1 - Error code 23.

First reported as Bug 415489 - tycho-surefire occasionally fails with unexpected return code 23. Then after investigation - duplicate opened by me:
Bug 417430 - tycho-eclipserun may interfere with tycho-surefire OSGi runtime.

Tycho builds stops with an unexpected error code 23. The build is not failed, it just exits.

Tycho occasionally assembles and spins Equinox instances, if it is necessary to run OSGi-based tooling during the build. But in one place, Equinox was refusing to start, and was returning error code 23, demanding to be restarted. The sequence that lead to this was pretty simple:
  • Tycho assembled and run Equinox instance based on Kepler versions to generate API description
  • a bit later, tycho assembled and run another Equinox instance based on Luna-Nightly to run tests, but the configuration directory was not cleaned, so Equinox thought an update was happening, and demanded a restart.
  • Update to Tycho 0.19.0 - the issue has been fixed there
  • Change tycho surefire configuration area to avoid collision with api builder:

Issue #2 - Different naming schemas.

One of the tests was failing all the time, returning doubled number of artifacts in a generated P2 repository (expected:3, was:6). What happened was that P2 was copying bundles from a running application, and this Surefire application was using different naming scheme: Regular Eclipse apps use following convention: bundleId_version.qualifier.jar, but Tycho Surefire uses bundleId-version.qualifier.jar. Of course, P2 processed those files properly, and generated valid repo, just the test input was wrong.

Issue #3 - Circular dependencies.

P2 Tests, to run properly, require platform specific filesystem bundles. The only way to add those bundles to Surefire is to add parent feature - and since we are building P2, parent feature (org.eclipse.platform) would be resolved from an update site. Well, almost. The parent feature happened to include one bundle from the reactor (org.eclipse.update.configurator I think). So, almost everything was resolved from the update site, except this one bundle, which came from the reactor, and didn't satisfy feature requirements due to the changed version.

The workaround was to use api (luckily this is all about test case preparation).

Some discussion concerning this issue seems to be happening in Bug 419201 - "mvn clean verify -Pbuild-individual-bundles" fails for Platform Compare.

Side note:
There is an ongoing effort to enable running tests during the build for particular components, under the umbrella  Bug 416904 - Allow to run tests with tycho-surefire-plugin. "In order to lower entry barrier and execution of unit tests [...]".

Best regards,

Monday, October 21, 2013

Rediscovering Mylyn (Builds)

I always have a mixed feelings when I try to write anything about Mylyn. It's just impossible to cover all its greatness it in one blogpost, and the fact that it is written as an Eclipse add-on is not helping much in promoting it amongst my linux readers (it's all because of this joke:
But let's try. First of all, Mylyn is an excellent tool to keep all your bugs in one place, which is very useful for me, as I very often jump between projects and need to switch between different areas quite fast:

Mylyn Task list - bugs from different sources in one place
But that's just a tip of the ice berg.  The true power of Mylyn is 'context' management. What is a context? Well, it's a set of files you are working with, and Mylyn's ability to track which files are important for certain bug is hard to overestimate when you get a comment like:
Can you include a "description.txt" file (or similar) that describes how to rebuild them, in case it is required in the future?

The context is just one click-away - the only thing you need is to activate your task by clicking the ball next to it:

An active task, a task without context, and an inactive task with recorded context.
So now we go to the main Mylyn functionality, that really let's the entire Eclipse shine - just compare the next two screenshots:

Have you noticed which files are presented in the 'Package Explorer' view? Yes, that's those I really need! No clutter, no list scrolling! One click and you're back to task that you've left a week ago!

But even that's not all. If you have Continuous Integration running on Jenkins/Hudson, you may connect your Eclipse to it, and get this lovely view of your jobs:
Builds view. Notifications included. No more page refreshing.
Can you see the small JUnit action? Guess what does it do :). Yes, you are right - it opens tests in a JUnit view:

Jenkins/Hudson build test result loaded into Eclipse.
And now - once you double click the stack trace - Eclipse will open a file for you - no grepping, finding, searching - everything loaded into your really Integrated Development Environment!

Of course - this is just a small part of Mylyn functionality, this is just what appeals to me most in my daily work. But managers will be happy, too, with all the project-tracking functionality, integrated via OSLC, and really powerful tools (out of scope for this blog).

Quick instructions how to install Mylyn in Fedora (packaged by me):
sudo yum install eclipse-mylyn
Pretty simple - and really worth to try out!

Thursday, August 1, 2013

Why it is worth to build open source software.

Sometimes people ask me why I always want to build everything from source, and my answer is always that I have to do it because of the  Fedora policy, which states two reasons:
  • Security: Pre-packaged program binaries and program libraries not built from the source code could contain parts that are malicious, dangerous, or just broken. Also, these are functionally impossible to patch.
  • Compiler Flags: Pre-packaged program binaries and program libraries not built from the source code were probably not compiled with standard Fedora compiler flags for security and optimization.
 But it is not all. Open Source definition is a very broad definition, and some software packages may not be usable at all without proprietary, closed and well-controlled companions. In that light, building from source is the ultimate indicator whether a software creator really gives you the right to build (and, what's more important, to patch) his/her code.

This post was inspired by this answer on fedora-java.

Friday, June 28, 2013

Kepler retrospection - was CBI a net loss?

While I was reading Kepler retrospective notes, I found this statement:
CBI was a net loss for us so far. It was a very large volume of work just to get our build back to its old state. There is benefit for others in the community to make it easier for them to run builds independently. For committers it hasn't delivered value yet.
and started immediately wondering who was the "us", and why it was "a net loss".

Fedora had it's own Eclipse build system, which was 8 x faster than current CBI build (15 minutes vs 2 hours on non-SSD drive). I've spent a lot of time getting Eclipse built with Fedora and switched to CBI before the Foundation did.

All that was (and still is) a cost, but was it really "a loss"?

I find it rather as a first step towards a really necessary move - Eclipse Foundation taking responsibility on development. The build system is first, then maybe we will get vendor-neutral architects or UX designers.

Another point is that once it is possible to easily rebuild Eclipse, we can see even right now internal Eclipse teams appearing here and there, which tend to become really valuable contributors.

Not to mention that after Kim left, it took about a month to get builds running again (at the Eclipse Foundation, we had them running in Fedora). Is it ok to have so much power depending on one person (because that is what happens if you have a large ant-based build)?

I'm sorry but I can't agree with a "net loss". It was a necessary cost. Good for the Eclipse Foundation. Good for the Eclipse.

BTW. I really hope some day UX designers or architects will be hired by Eclipse Foundation.

Monday, June 24, 2013

Cascaded builds - solution or a problem?

Fedora 19 consists out of approx 14000 of packages. Could you imagine a situation, where a security fix for one basic package (let's say kernel) would cause a need for the 14000 packages rebuild*?

It sounds strange.

On the other hand, it is perfectly normal in the Eclipse world. Let's imagine that I want to put a new EMF into my Eclipse platform. So I need to build EMF, and put it into Eclipse (a.k.a. rebuild platform with proper update sites). The whole process takes quite some time, but that's not that important.

If EMF had any dependencies, I'd have to rebuild them first.

So I've started investigating how to automate those tasks. And this is an answer I've received:
[...] From my point of view, these Java module frameworks refuse to acknowledge that  there is extensive experience with distro-level release engineering. (Basically, exact dependencies and multiple versions of the same code might be convenient now, but will seriously hurt you down the road.) [...].
Florian Weimer.
Full text in the fedora-devel.

The part about strict dependency check struck me as being "just right". Eclipse definitely needs a very strict checking at the build time and during changing the installation.

But it does not, and should not be very strict about components being changed at runtime.

And yes, rebuilding the entire Eclipse to get a minor security update in one of it's dependencies is a waste of time.

So I've put up a small wiki page in which I described how I'd like to see installation handled.

The link to the wiki page.

Any comments welcome.

* such situations happen, although very rarely, especially when there are big changes done in compilers, but this happens only when a distro was not released yet.

EDIT: corrected typo and link to fedora-devel.

Wednesday, June 12, 2013

A nasty bug in dropins - read it if you use them

The nature of dropins is that they were supposed to be a transitional mechanism between old update manager and P2. Dropins have more advantages that they were supposed to have, and one of them is truly easy management - just copy a plugin, and it will work (in most cases).

This time, however, a really nasty issue managed to get into Kepler. It was discovered about two weeks ago, when some of our Fedora packages started disappearing after updates.

We often get similar issues before final build of Fedora is released, so it did not looked seriously. But after a couple of days of checking our build process and testing I've found that:

If you deploy into dropins a plugin that is already installed using P2 director, your Eclipse goes bananas, especially if this plugin is a platform dependency.
The dropins mechanism will try to uninstall it, and then, depending on your configuration, will stop working, or will break your Eclipse.

The bug was reported in the Eclipse bugzilla, but it will most likely be shipped due to the bad timing in which it was discovered.

So beware of what you put into dropins - unless you want spend the same amount of time that I did trying to understand what's going on.

Monday, June 10, 2013

EclipseCon France - Wrap up

I had a pleasure to take part in the EclipseCon held for the first time in France. Here are is my main observation:
Java has more in common with javascript than continental breakfast with breakfast.

Also, for the first time, there was a true coming out of people adjusting and packaging inhouse flavour of Eclipse. A few of my live-recorded tweets:

So, it's all about having a few people in an organization that know tools, and prepare tools for others. It just looks like the idea of "bring your own device" policy was wrong. A corporation needs standards. Period. And it's much better to have a team designated only to free software management than allow your employees to invent the wheel again and again.

I wish all those eclipse builders contributed back!

What's more, I believe that the future belongs to those small, single-purposed IDEs, and kind of natural consequence will be equally precise a IDE in the browser, where you rather point&click required solution rather than spending a couple of days figuring out how to set up certain tools to build a server app and then a mobile app. Ideally I'd like to be able to say "yes" to this tweet:

That's said, Eclipse was included into the Red Hat Developer Toolset. The Developer Toolset is a set of tools that work together, and are decoupled from the underlying base, so you will be able to use a stable work environment and up-to-date development tools, without configuring things by yourself!

Wednesday, May 29, 2013

The most significant feature of Kepler Eclipse on Fedora

Yeah, I know I'm kind of repeating myself, but look what happens after you update Eclipse in Fedora 19:

Eclipse after update in F19

P2 discovers that you're system installation had been changed, finds what you have installed as a regular user, and then asks you to install those things again, providing you a nice wizard:

Features reinstallation wizard page
This is a big step forward since previous Fedora releases, where Eclipse package update caused a loss of user installed features, or even totally broke the installation.

Of course, not only Linux will benefit from this approach, but all setups, where users have only read-only access to a master installation administered centrally.

Edit: Things never go as smoothly as one would wish. The problem that I was having with this dialog was that when I had multiple Eclipse installed, from time to time, the dialog was trying to reinstall things from "wrong" Eclipse installation.

It turned out to be a feature, not a bug. Eclipse, when shared install is run for the very first time, tries to find previous installation on the best-can-do basis. This scenario is a bug for Fedora, because Fedora Eclipse has only one location that does not change, and therefore if there is no local configuration for that location, it means that nothing should be reinstalled. I think a solution is as easy as setting this property to the Fedora installation:


Thursday, May 9, 2013

Eclipse Mylyn - quite interesting feature

Did you know that Eclipse Mylyn integrates with a History view?

Exemplary history displayed in the History view.
Unfortunately, it works this way for Red Hat bugzilla, but not for the Eclipse one :-(.

Tuesday, May 7, 2013

Eclipse Marketplace Client just got updated in Fedora 19+

Short introduction for my Fedora audience:

Eclipse Marketplace is, well, a market for Eclipse plugins.  Eclipse Marketplace Client is a tool that allows for browsing and installing plugins from within your IDE. The analogy to other application stores is quite obvious. You can install the client by invoking:

sudo yum install eclipse-mpc

Main content:

Fedora 19 release date is approaching us fast. Since the Fedora release and Eclipse release are very close to each other, and there is a freeze between the RC (Beta) and the final release, I'm updating now the Eclipse stack to the Milestone 7 - the last milestone between the final release of Eclipse.

Going from one project to another I stumbled upon Eclipse Marketplace Client. It has no new release scheduled on it's website, but the log has revealed quite interesting features, so I've decided to include those updates.

Here is a screenshot of a new Marketplace Client:

Note new attributes that are now displayed - the number of installs and favourites stars. This will definitely help to assess which solutions are well tested in the field :-).

It also looks like there will be a newsletter in the marketplace client :-)

The market place is interesting also from another point of view.  I have written a small utility mojo that transforms a p2 repository/update site into a runnable form that could be put in dropins. So the part of rpm responsible for installing the client looks like:

mvn-rpmbuild org.fedora:feclipse-maven-plugin:install  \ -DtargetLocation=%{buildroot}%{install_loc}/eclipse

Which is a great progress from manually unzipping features into destination :-).

Yes, yes, I'm aware that dropins mechanism is not really the best solution, but that's the only solution that we managed to get work together with rpm.

Monday, April 29, 2013

Is running Eclipse on Raspberry Pi possible?

During the weekend I stumbled upon Bug 406749 Create native launcher and product export option for Raspberry Pi, which prodded me to do the long postponed task of contributing patches that has been used in Fedora to built Eclipse for arm.

My patches provide generic arm bundles. It is a part of the work. According to Fedora documentation, Arm processors exist in two versions -  software and hardware floating points. I guess that Eclipse built on one of them might not work on the other one, and it will be necessary to split each arm fragment in two.

It's also worth to consider if Eclipse on arm without FPU is really something we want - it will be unbelievably slow.

But straight to the point - I tested various amounts of memory assigned to maven for the purpose of Eclipse build - and it started succeeding only if maven was granted 900MB. That eliminates Raspberry Pi forever. Sorry for sad news :-(.

However, if you are interested in building Eclipse on various mobile devices, and you'd like to try out those patches, I'd be happy to hear the results!

And a small poll for the end (results can be found here, but please do the poll first!):


Wednesday, April 24, 2013

On the evilness of split packages in the OSGi

OSGi allows for having packages split across multiple bundles. This, together with a dropins mechanism, is a true mine field.

So, what's wrong with those split packages? They are split! OSGi, in some magic way, merges them during runtime, but does not see explicit dependency between bundles providing those packages.

The P2 reconciler app, using some Equinox service, refreshes all packages that have dependency changed. So, for example, if you install a bundle providing javax.xml into dropins, you'll have almost all plugins refreshed (depending on the dependency tree).

But, since bundles with split packages are not dependent on each other, you may end up in a not so much theoretical situation, were a bundle with one split package is refreshed, and the other is not. If they do depend on each other (f.e. one has an implementation, the other an interface) you will get a nice ClassCastExceptions or other, similar runtime errors.

Real Eclipse bug can be found in the Eclipse bugzilla.

Monday, April 22, 2013

DevCrowd'13 – share knowledge, share passion - impressions

I had a pleasure of participation in a conference called DevCrowd this weekend in Szczecin. And I must admit - I underestimated it, and got very, very surprised.

First of all, the conference, held at the Szczecin University of Technology was developer community organized, meaning there was no single, leading technology, solution, nor vendor.  This resulted in a really mind-blowing mix of speakers that touched problems on the border of many spaces (technical, human and legal one) and made many people to think about what they do.

Let me mention two really noteworthy presentation fragments:
  • Adam Dudczak, "6 things that you were not taught during studies" discussed, amongst other things, the problem of choosing 3rd party dependencies for use in your project. This was a very right call in the era of social coding, and clearly outlined the need for IP management for communities that want to share their code.
  • There were two talks by JarosÅ‚aw Ratajski and Grzegorz Godlewski, related to web programming. Those talks resonated in my mind because they were about Java developers finding themselves in the JavaScript world, and giving a really strong message, that despite Web is somewhat inferior to desktop, it needs superior developers. I guess Netscape was wrong by targeting JavaScript "to nonprofessional programmers". 

 I realized apparently not so secret plan of OSGi and Fedora conquering the Java world and performed a brief introduction to it, and quite unexpectedly, found people who were really interested in migrating their applications.

I got totally convinced to small conferences, and I look forward next edition!

Thursday, April 11, 2013

Maven groupId:artifactId and OSGi Bundle-SymbolicName - how they relate to each other?

OSGi massively coming to the maven world is a new trend, and is causing quite a big disturbance (at least to me).

First of all, as you already know, Fedora policies don't allow me to use binaries. Therefore Eclipse Orbit, a project that contains 3rd party Eclipse dependencies in the form of jars, is banned for me.

I witness that more and more open source jars support OSGi by default, but sometimes not exactly in the way I'd love to - especially if it comes to the naming schemes.

Let's look at the example of JDT core - the most widely used Eclipse jar. It was used as a maven dependency long before it received its official pom. As a result, it is available in Fedora with following aliases:
  • org.eclipse:jdt.core
  • org.eclipse.tycho:org.eclipse.jdt.core
  • org.eclipse.jetty.orbit:org.eclipse.jdt.core
  • org.eclipse.jdt:org.eclipse.jdt.core
The question is, which is the right one? Well, the OSGi Bundle-SymbolicName wiki page says that:
A BSN often takes the form of a reverse domain name. If automatically generated via Maven Bundle Plugin, takes the form ${pom.groupId}.${pom.artifactId}, or ${pom.artifactId} if it already starts with ${pom.groupId}.
So, in that case, we need to go the Maven Guide to Naming, and find out that:
groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules, what means that has to be at least as a domain name you control, and you can create as many subgroups as you want. Look at More information about package names.
artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed.

The artifactId for Eclipse should be a jar name, which in turn should follow Eclipse Naming conventions. The groupId should be a reverse domain name of the project, so in case of JDT, we would get org.eclipse.jdt, thus the final and proper groupId:artifactId of JDT core is org.eclipse.jdt:org.eclipse.jdt.core.

The real problem will appear if the project does not obey Maven guidelines, and has groupId:artifactId commons-logging:commons-logging or junit:junit. In that case applying OSGI guidelines will cause invalid Bundle-SymoblicNames: commons-logging and junit, which are against OSGi guidelines, although based on them.

In this situation it would be good to reconsider group and jar name changes to reflect the organization domain:
  • org.apache.commons:logging (logging.jar shipped)
  • org.junit:org.junit (org.junit.jar shipped).
Happy renaming!

Wednesday, March 13, 2013

All roads lead to Rome

I'm a Fedora Packager. I (amongst others) take care about Eclipse in the Linux world. And one symptom of that care is prodding everyone else to update or drop dependencies. So, if your project suddenly gets a number of bugs open:
  • 398103: adopt latest jsoup
  • 402882: relax requirement on lucene
  • 398102: adopt latest jdom
  • 398100: adopt latest org.apache.commons.lang
  • and so on and so on...
you may be sure it's me. Let's just say that I believe that broad cooperation between open source projects is a must, and staying too long with an outdated dependency is harmful for both, consumer and producer.

Today, I tried to address a bug opened not that long ago:
  • 398084: Adopt rome 1.0
"ROME is a set of RSS and Atom Utilities for Java that is open source under the Apache 2.0 license." to quote their webpage and explain a bit what is this library for.

The said news is that ROME is effectively dead. The last comment from the project author is more than one year old. Project webpage offers 'Related searches'. The source repository does not contain a single tag. Their mailing lists contains spam traffic.

In a normal situation I'd just look for a replacement, but this case is different. There is NO replacement. It looks like a technology shift killed it. There's no need for a new version of RSS or Atom, so project matured and died.

Unmaintained library is a pain. It's a security hole. And will, sooner or later, damage the consumer.  But what to do, if there is no alternative? Hope for the best?

Wednesday, February 27, 2013

A big change in Eclipse P2

One of the problems that have been haunting me since I started work at Red Hat, were changes made to the master configuration. Yes, when you install Eclipse using yum, Eclipse is readonly, and all the configuration changes are stored in your local ~/.eclipse folder.

So, if any change was made to the master installation, equinox was dropping user installed bundles (in majority of cases), but P2 was totally unaware of that change.

In other words - if you installed any feature, it was lost, and you could not reinstall it, because P2 still thought it was installed.

I can't say I was totally unaware of changes happening in P2 regarding those problems, but when I prepared a package of latest Kepler release, I got a dialog:

P2 new feature
Here is the explanation of what happened:
P2 stored a timestamps of important config files during first Kepler launch.
yum changed the installation and touched files
P2 discovered the change and dropped all plugins installed by a user into user space
P2 located previously installed bundles and offered reinstalling them.

I'm sure all devops will appreciate that feature!

May you live in interesting times!

Jetty 9 is around the corner. Well, that's not a news, but a well known fact. Another fact is that Fedora distribution has 'First' in its principles, so it is no wonder that Jetty is already packaged, although still not in a main branch.

As you probably know (maybe from reading this blog), Fedora allows for only one instance of library being installed in the system, and all consumers must use symlinks if they want to consume them. This is also the case of Eclipse. So, if you look at the eclipse installation in the /usr/lib64, you will find:

ls -l eclipse/plugins | grep jetty
-rw-r--r--. 1 root root   21518 Feb 22 16:33 org.eclipse.equinox.http.jetty_3.0.100.v20130222-1445.jar
lrwxrwxrwx. 1 root root      44 Feb 22 16:38 org.eclipse.jetty.continuation_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-continuation.jar
lrwxrwxrwx. 1 root root      36 Feb 22 16:38 org.eclipse.jetty.http_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-http.jar
lrwxrwxrwx. 1 root root      34 Feb 22 16:38 org.eclipse.jetty.io_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-io.jar
lrwxrwxrwx. 1 root root      40 Feb 22 16:38 org.eclipse.jetty.security_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-security.jar
lrwxrwxrwx. 1 root root      38 Feb 22 16:38 org.eclipse.jetty.server_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-server.jar
lrwxrwxrwx. 1 root root      39 Feb 22 16:38 org.eclipse.jetty.servlet_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-servlet.jar
lrwxrwxrwx. 1 root root      36 Feb 22 16:38 org.eclipse.jetty.util_8.1.0.v20120127.jar -> /usr/share/java/jetty/jetty-util.jar

This approach works rather well for many applications, but not necessarily for Eclipse. A simple replacement of Jetty bundles would break Help (I can live without it) and P2 (I can't live without it), so I had to do some little hacking to rebuild the Eclipse with Jetty 9. It works - and probably in Fedora 19 this will be the default setup.
Eclipse Help running in Eclipse with Jetty 9
In a normal situation I'd not even mention such a change - because it's kind of my role to prod everyone to migrate to latest software :-). But this case is very special:
Jetty 9 requires java 1.7.

Eclipse community (especially Platform/RT) is rather conservative in adopting new Java versions. Such an approach has a lot of sense, although... maybe some dates first:
  • 2001: Eclipse Founded by IBM
  • 2002: Java 1.4 released. According to my friend, up to this point it was a perfect language, then they broke it.
  • 2004:  Eclipse Foundation started
  • 2004: Java 1.5 released.
  • 2006: Java 6 released.
  • 2011: Java 7 released.
  • 2013: Java 8 to be released.
Have you noticed the gap between Java 6 and 7? I'd actually dare to say that java 6 was so similar to java 5 that you'd have to count the gap from 2004 to 2011, where Eclipse could just stay one java version behind the main stream.
But things has changed. Java is under heavy development again. Java is being open-sourced. This opens a lot of questions:
  • how long will we have to stay with Java 1.4?
  • is there any plan of migrations when Java will get frequent releases?
  • what to do with features that really require latest Java  (f.e. Jetty)?
It's the question that I have been asked during my interview at Red Hat: what do you prefer and why? Frequent adoptions or staying with "stable" versions and then migrating from one "stable" to the next "stable"?

Interesting times indeed.

Monday, February 18, 2013

Fixing spacing issue in Eclipse in Gnome

Sometimes I run Eclipse on my 13" laptop without an external monitor. This used to be a really problematic, because package explorer/outline were displaying only a few items because of the huge gaps between rows. It was just a pain to me, but nothing really serious. I thought it is intentional and nothing can be done about that. But in the open source world, it is good to be vocal. Someone ( David Mansfield) reported a bug
Bug 910812 - line spacing in tree (specifically in eclipse, e.g. package explorer) is way too large.
and attached following screenshots:
This is how Eclipse used to look like on Linux:
Screenshot of Package Explorer running in a past versions of Fedora.
And this is how it looks like now:
Current appearance of Package Explorer. Note the spacing.
It's arguable which one is better. The latter looks really nice if you run Eclipse on a HD monitor, but it's barely acceptable when using something smaller.

There's solution for that - just set the style of a GTK tree to have no vertical separator - you may use the command attached below:
cat >> ~/.gtkrc.mine << EOF
style "tree" {
  GtkTreeView::vertical-separator = 0
class "GtkTreeView" style "tree"

Eclipse does not look nicer after that, but it's a way more ergonomic, isn't it?

Happy hacking!

Wednesday, January 30, 2013

Installing Counter Strike on Fedora 18 in 4 steps. And some comments.

(1) Follow the instructions listed on this blog to install Steam. Don't worry, it works well on Fedora 18, too.

(1a) If you wonder who is 'Spot', the Fedora 18 unofficial steam package provider,  checkout out his short bio on fedoraproject wiki.

(2) Install Counter Strike 1.6 using Steam Client. A piece of cake.

(3) Now the important part: go to your local steam directory
directory and create a symlink to provide all libs that are required by the game.
cd ~/.steam
ln -s bin32 sdk32
(4) Play!

I'm not hiding that I'm really excited about having Counter Strike running on my Fedora. It was exactly this game that made my switch to Linux really difficult.

I'd like also to point to one more thing. This wouldn't be possible without a major OS provider, whose attitude caused Valve to look for alternatives. It will be a bitter lesson for some people.

We, as an open source community, should never forget what happens if you ignore your users.

Happy fragging!

Tuesday, January 29, 2013

That's just unbelievable

I never thought it will happen. Thank you all, who made this. And thank you all, who caused this (including OS providers).

Counter Strike 1.6 running on Fedora 18

Instructions how to do that will follow soon.

Happy fragging!

Wednesday, January 9, 2013

Unmaintained libraries are a security hole - Call for Help

I was thinking about naming this post "A security hole in Eclipse" but that could be a bit too strong. But the truth is that unmaintained libraries are a big risk to the entire software stack, because there is nobody to look after them and release new versions.

I'm writing about this, because recently my eyes looked at Eclipse and bug 337449 - [transport] Consume httpclient 4 provider from ECF. It looks innocent, but is it indeed?

The HttpClient project website says:
The Commons HttpClient project is now end of life, and is no longer being developed. It has been replaced by the Apache HttpComponents project in its HttpClient and HttpCore modules, which offer better performance and more flexibility.
Now, if you drill down into the aforementioned bug, you will discover that there is a support for HttpClient 4 in ECF, although it looks unfinished. It is unfinished in that sense that it is not fully tested. So Eclipse Platform can't use it. So it remains untested... We really can't afford for waiting any longer.

So I have prepared an Eclipse Platform Build with httpclient4 for all major platforms. Please get it from my fedoraproject page and test it by installing anything from an update site. Especially if you are behind a proxy. And update the bug with results. It's needed to move that bug forward!

Here are direct links to Eclipse Platform with httpclient4:
Happy testing!

BTW. This would not be possible without platform CBI build system making the build process really easy.

Monday, January 7, 2013

far Orbit

I am not a biggest fan of Orbit project. I do, however, understand now, that it is needed due to the legal reasons, as it was stated in the comment to my blogpost nearly a year ago:

  • The 3rd party libs have been vetted for IP, 
  • they have been turned into OSGi bundles so they can be used
  • they are available from a p2 repo so they can be consumed by PDE builds

 The biggest fear I have is that Orbit version of projects is isolated. They get OSGi Manifests, sometimes version number that is different from what is in the original, and sometimes even different name.
All those things does not make adoption and updates easy. There is practically no way to build Eclipse with newer version of a particular library and use it for testing.
So here is my proposition - let's contribute OSGi manifests or even entire packaging back to their providers. They don't always know/care about OSGi, but they rarely object such changes.
This will make the process of new version adoption easier, because testing/3rd party products could use newer version of libraries which is not yet present in the Orbit without taking the effort to build it them themselves.
Of course, I'm not demanding everyone to do it right now, but please, give it a thought before submitting a new [version of] Orbit bundle.

We should be removing the border between Eclipse and the rest of world.

Happy bundling!

Thursday, January 3, 2013

Eclipse Git update

New Year gift to Fedora users: yet another performance update, this time to EGit and JGit, has been just submitted.

It contains a new upstream release 2.2.0 with an impressive number of new features and enhancement, among which the most important (for me) is incremental reindexing of repository.

Actually this update and last Eclipse update reduced the heap usage almost by half, and Eclipse is much more responsive now. Check it out!

sudo yum --enablerepo="updates-testing" update eclipse eclipse-egit eclipse-jgit

The entire list of EGit/JGit is here and here.

Happy New Year Hacking!