Thursday, October 8, 2009

Lots of optimisations

While mass-building for F-11, we realised that there are a lot of areas we can work on to make the build process faster. ARM boards are not as powerful as the i686 machines, so, the actual build time cannot be reduced beyond a certain limit. But, we can increase the throughput. So here's what we've been working on for some days.

1) We got some new builders in the build-pool. Each one has 2 GB RAM and 1200 bogoMIPS processor. So, now we have 8 builders total in the build pool. We hope to add 2 more in some time. With 10 builders, the mass-builds would be much much faster.

2) Eliminate buildSRPMfromSCM tasks. Frankly, they were more of a red-tape. buildSRPMfromSCM is already done on the fedoraproject koji, it would be much much better (and faster) to just pick-up the SRPM and build. So, we wrote wrapper scripts to do just that. This has been of great great help because the boards are always doing some "meaningful" work now.

3) Optimise postgresql database. We vacuumed (fully) the database and reindexed it and it is blazing fast.

4) Also, we have scripts to partially automate analyzing build failures, determining which library sonames have changed upstream so that we need to build them first, etc. The build process is now fairly defined and streamlined.

And we have already started working on the base-set of F-12!

Thursday, September 24, 2009

Fedora 11 Status

Since the last announcement of F-11 packages, a large number of packages have further been built. There currently are above 9000 rpms in the Fedora-11 repositories. Our effort has been to make available the following package groups:

Base
Core
Web-server
Gnome Desktop
Xfce desktop
Development Tools
X server
Web development
Admin Tools
System Tools
Java

The Fedora-11 updates for a large set of packages are also now available.

For Fedora-12, we would like to start tracking packages preferably when all the shared lib .so version updates are settled for f12 (thus avoiding any additional rebuild cycles at our end). Most likely this will happen by the Fedora-12 Beta Freeze date (29 Sept, in 3/4 days).

Friday, July 31, 2009

dhclient, firstboot and hald woes ...

In the last 2-3 weeks, I have run into some issues on my ARM board.

1) The first one was the udev-dhclient issue. The basic rootfs from the Fedora-ARM page worked fine for me. But, when I installed some packages, the board refused to reboot. It used to freeze on "Starting udev". After tinkering around a lot with udev, I finally decided debugging udev wasn't my thing. So instead tried to determine which package was causing the problem. After some brute-force and binary search, realised that dhclient was the culprit. After installing dhclient, the board hung at "Starting udev" on the next reboot. Weird. For now, I have just refrained from installing dhclient and everything is working fine. Any one have any ideas about this? (Probably dhclient gets the lease calculation wrong because udev accesses the hardware clock at the same time?)

2) Now firstboot. Its weirder! So, after I installed X and Gnome package group and restarted the board, it used to hang on the login prompt (run level 3). I could key in characters using the keyboard, but hitting return gave no response whatsoever. I couldn't even ssh into the board. At first, I thought it was a system freeze, but I enabled autologin on tty3 and wrote an infinite loop in .bash_profile and it worked fine. Finally, after 1-2 days of wandering off in different directions, the only option that remained was: the keyboard input is losing its way somewhere. So, copied my i386 system's /etc/sysconfig/keyboard to ARM's rootfs. And the system now responded fine to the keyboard input. But, it hung on "password:" prompt. Damn! Finally, realised that I need to run firstboot, so that it configures keyboard and authentication (using pam.d). (Now, as I didn't have a console on this rfs, took the basic working rfs, ran firstboot there and copied the generated configs on the new rfs.) Now things worked fine! firstboot!

3) hald. I still havn't been able to resolve this one. Its been 3 days and I have no headway. Problem is, whenever I start hald, the system just freezes. No I/O, no ssh nothing. A quick infinte loop in .bash_profile suggests that the system has crashed. I have posted the logs and lshal outputs to the mailing lists. Waiting for a reply. Without HAL, my USB mouse and keyboard aren't working in Gnome.

Do leave a message if you face a problem trying something out with your setup ...

Steps for getting X-Gnome working...

1) Make sure you have your kernel compiled with atleast the following options enabled:
  • Device Drivers -> Graphics support -> Direct Rendering Manager
  • Device Drivers -> Graphics support -> Display Device Support
  • Device Drivers -> Graphics support ->
  • PCI (graphics card is usually on the PCI bus)

2) With my card, I had to add the following kernel commandline so that the driver initialised my video card at init : "video=matroxfb:init,vesa:0x11B" (I have a Matrox G550 card)

With the above two steps done, you should be able to see a console on the monitor.

3) Now, install the Gnome and X server package groups (atleast the packages listed under "mandatory".
Gnome:
PolicyKit-gnome
control-center
fedora-gnome-theme
gnome-applets
gnome-panel
gnome-session
gnome-terminal
gvfs-fuse
metacity
nautilus
yelp
gdm

X:
bitmap-fonts
desktop-backgrounds-basic
xorg-x11-drivers
xorg-x11-server-Xorg
xorg-x11-xauth
xorg-x11-xinit
)


4) Now, install the "system-config-display" package and run "system-config-display --reconfig" as root to generate xorg.conf. It generates this configuration file as some temporary file, so, copy it to /etc/X11/xorg.conf. It usually contains only generic stuff. So you might want to edit it. Eg. My xorg.conf was trying to use the fbdev driver (since, I had Matrox's fbdev support enabled in the kernel). So, I edited Xorg.conf to use the "mga" driver (Matrox driver). etc

5) Install "firstboot" and run it manually so that it configures your keyboard and authentication. Optionally add a user using useradd. Make sure that /etc/sysconfig/keyboard and /etc/pam.d/* files are generated.

6) Now just run startx or init 5. Things should just work.
(you'd probably have to start HAL daemon manually and tinker with stuff here and there. But, this is the essence of what is required to get X up)

Also, you might want to edit inittab so that the next you reboot, you are presented with a graphical interface.

Let me know if you succeed in getting it working or have some issues :)

Wednesday, July 22, 2009

Fedora-ARM goes graphical ...

A picture speaks more than a 1000 words... Here is a screenshot ...

And here is the setup:
The graphics card is Matrox 550 attached to the PCI-E slot of the Kirkwood DB board.
The packages required for getting X and Gnome up aren't yet in the repos. Hopefully, I'll mash out a repo by the end of this week so that you can try it out on your boards!
yay!

Tuesday, July 14, 2009

Java Bootstrap:Part 4

Ok, the sinjdoc/xml-commons-apis dependencies is causing a real problem in build packages. Let me rebuild ant with bootstrap, and include these two in its install dependencies. Done.

Built packages antlr, jakarta-oro in koji.

Manyally built packages werken-xpath and wsdl4j in my setup (they needed xalan-j2 and ant-junit respectively) which is copied from x86 in my buildroot.

Ok, mx4j seems to be quite a critical packages, and its set of dependencies is huggeeee. I am just going the copy-x86 route with this package and build other packages. Built geronimo-specs manually based on this. It used the java-1.6.0 openjdk compiler (Just wondering whether it should have used java-1.5.0-gcj). I guess we'll find out...

Now built log4j which required jms (geronimo-specs)

Now velocity and bcel have a circular dependency. I am going to copy velocity build bcel, and then rebuild velocity. And additional there is avalon-logkit dependency in there. The avalon-logkit fails to compile. It gives up on some HTML syntax mentiond in a comment. Probably the 1.5.0 javac should be used here instead of the 1.6.0. I can't fire a build on koji yet as mx4j is not completely there. Let me copy teh jars and proceed with the bcel and velocity bootstrap.

built both of them. And now for xalan-j2.

Boyyy, I think eventually, for all the packages that I manually built, we should just run an automated script which bumps up the release sensibly (so as not to conflict with newer upstream releases) and rebuild.

xalan-j2 is now ready.
Build classpath-jaf. I can't still build avalon-logkit on koji because of missing mx4j. And in my chroot the build is failing.

Ok, in order to build mx4j, xjavadoc and xdoclet are the biggies in the sense of build dependencies. And xdoclet needs struts, which has further more deps... Lets first get to xjavadoc.
Built javacc, jrefactory deps. Now build xjavadoc. Done. Also build classpath-jaf and saxon in koji, all their buildreqs are now satisfied.

Now I plan to do a mass build of all the packages in the java-development group within dist-f11-build-javabs tag. Many of them will fail, but there will be a lot of successes I hope.

Friday, July 10, 2009

Java Bootstrap:Part 3

After about ~36 hours of build time, java-1.6.0-openjdk rpms were finally built :-) albeit in bootstrap mode.
http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=13704

Trying to build avalon-framework. That needs avalon-logkit, which again needs avalon-framework. Pick the logkit jars from x86 and build avalon-framework.

Turns out the add-group-pkg thing that I had done with xml-commons-apis and sinjdoc (discussed in Part2) didn't go quite well. The way koji performs chroot setup is
1. install default build pkg group
2. init mock user by keeping mock uid/gid constant in the builder and the chroot.
3. install BuildRequires deps.

My adding these two packages in the default group, pulled in a few other packages which install user/group in the chroot in step 1 above. Thus in step 2 when mock tried to create mock uid/gid, the identifiers clashed with those already setup, thus failing the chroot setup itself.

Ok, so I took these packages out of the default package group, and included it explicitly in failing pkgs's BuildRequires.
With this I could build clean packages: java_cup, xml_commons_resolver, jlex, junit and regexp cleanly with only the BuildRequires included.

Now quite a few pkgs required jdom. It depends on xalan-j2. Copy from x86, and rebuild. worked.

Ok, now try to build classpathx-jaf. It failed with some error. Looks like the failed symbols are provided by classpathx-jaf itself. Copied the jars and trying to rebuild again. No luck.

There were some links to /etc/alternatives, that I was not copying which should have been done. Let me try that, probably that is why xerces-j2 was not getting built.

Great! that worked.

Somehow that didn't quite fix the problem of classpathx-jaf
Let me try classpathx-mail. That did work.

Now jakarta-commons-collections is needed by quite a few other things, but that BuildRequires ant-junit, which is something I don't have yet. I'll build with nodeps, lets see where it goes... Didn't quite work.. I thought so.. Hmm.. I'll probably have to rebuild ant such that it includes junit. But before that, lets see if the copying of contents of the x86 ant-junit rpm works... Did. Great!