Monday, May 21, 2007

Problems changing a BOINC server's name

The following email summarizes a problem that we had when we changed our server's name to make it available outside our firewall.
Solution found:
I wrote:

Okay we changed the name of our server from an internal name to an external one that can be accessed across the Internet. My problem is that bin/start reports:

Entering ENABLED mode
Starting daemons

And nothing happens. "ps aux|grep feeder" only reports the grep instance.

I have changed the server name in the mysql.user table, in /etc/sysconfig/network, in config.xml and I'm sure a few other locations. Restarted the machine, etc. I also verified the permissions on the new log_... and pid_... folders.
Found the problem. The 'stop_daemons' file was not being deleted by bin/start. I did not realize that the config.xml host setting should only be 'www'. Not the FQDN.

The config host has to match the localhost name that is internal to bin/start. This is *not* the same as what is returned by 'hostname'.

This took awhile to find, because no log files were being generated, neither did start report any errors. I only saw it by running feeder under gdb, where the output apparently goes to stdout/stderr instead of (or in addition to) the log file.

--
Ron Parker
UPDATE:
One additional file that needed changed in the SciLINC project directory was html/user/schedulers.txt.

It is also necessary to update the app_version table. The path to the application files on the server is hard coded in the XML data fields of this table. Running bin/update_versions will update it, but it may be necessary to first delete the rows that refer to the old server.

Friday, January 19, 2007

Visual Studio 2005 missing Msi.lib

Visual Studio 2005 only installs msi.lib for the AMD-64 platform. Installing the latest Platform SDK, PSDK will install it for x86, IA-64 and AMD-64. As of this post, Microsoft Platform SDK for Windows Server 2003 R2 was the most recent version. That page should say whether or not there is a more recent version.

Once it is installed, you have to tell Visual Studio where to find the PSDK files. The file path settings are part of the Visual Studio options which are accessed from the ToolsOptions... menu item.

Under Projects and Solutions, select VC++ Directories. Then, pick each item under Show directories for looking for paths have PlatformSDK in them. Insert an entry just before it that refers to the same subdirectory under $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2.

Visual Studio Options

The up- and down-arrow buttons may be used to move the new entry to the right place in the list.

Now, Rebuild any solution that needs the msi.lib library.

Tuesday, January 16, 2007

Importing Python Subversion Archive into Git

While it is not well advertised, it is possible to download a snapshot of the Python Subversion repository via rsync.
rsync -avP svn.python.org::ftp/pub/svn.python.org/snapshots/projects-svn-tarball.tar.bz2 .
Note: I discovered later that it can be downloaded by browser as well, http://svn.python.org/snapshots.

Once the file is downloaded expand it:
bunzip2 projects-svn-tarballs.tar.bz2|tar xf -
Then use git-svnimport to create the baseline git repository:
git-svnimport -v -C python.git -T python/trunk -t python/tags -b python/branches file://`pwd`/projects
Following this the archive may be brought up to date and kept upto date using:
git-svnimport -v -C python.git -T python/trunk -t python/tags -b python/branches http://svn.python.org/projects

Thursday, January 11, 2007

Importing SourceForge Subversion Projects into Git

At least for the initial import it is faster to create a local mirror of the desired repository using rsync. Taking the Simplified Wrapper and Interface Generator project, SWIG, as an example:

rsync -avz rsync://swig.svn.sourceforge.net/svn/swig/* swig.svn
Made a copy of the Subversion SWIG repository in about 10 minutes.

(On CentOS 4, I had to upgrade svn from the source to be able to access this mirror. I installed the RHEL4 RPMs that were pointed to on the Subversion download page. I needed the apr, apr-util, subversion and subversion-perl packages.)

Then I was able to import this into a git repository using:

git-svnimport -C swig.git \
file://`pwd`/swig.svn
This took about 13 minutes.

After importing a new repository, repacking recommended:

cd swig.git
git repack -a -d
This reduces the amount of space the repository requires. It can be significant on a large or active repository.

Future updates can then be done fairly effeciently from within the swig.git subdirectory with:
git-svnimport -C . https://svn.sourceforge.net/svnroot/swig
Because it is no longer needed, the swig.svn directory can now be deleted.

Just some statistics
While the rsync'd Subversion repository took up 238MiB, the git repository only used 63MiB. Most of this is the working copy of the code. The actual repository swig.git/.git only occupied 25MiB. (Barely a tenth of what Subversion required.)

Alternatives
While I could have run git-svnimport directly against the remote repository, this would have taken about 32 hours. Even using svm or SVN::Mirror in place of rsync would have required around 10 hours.

If you can use rsync or another tool to make a local copy of the repository, the import will run much more quickly.

Tuesday, January 09, 2007

Fixing Synergy Shift Behavior

When running the Synergy client on CentOS with a Window machine operating as the server, I had problems with the behavior of the [Shift] key. There was a delay from when [Shift] was pressed until it took effect and often the left [Shift] key would not take effect at all.

This was corrected by downloading, building and installing the latest source RPM from the Synergy site. You may have as much luck with the binary RPM. I just didn't try it.

Update: Fixed typo

Tuesday, December 19, 2006

BOINC and Tagging?

Following yesterday's conference, I couldn't help but keep coming back to the idea of tagging. Yes, I really do mean the popular concept of tagging used on so many social web sites like del.icio.us and MySpace.

Why tagging? It's popular and it could provide a possible answer to some of the problems discussed yesterday.

Finding Projects
If projects had various tags, a user could choose to subscribe to or ignore projects based on different tags they were labelled with. These tags could used by the account managers and other sites. Then as projects appeared and disappeared they could automatically be added to your client, if you chose to do so.

User Visibility
One of the questions yesterday had to do with retaining people and them being able to see where they sat in the BOINC world. Were they advancing or falling in the listings? Did their contributions matter?

What if users tagged themselves? Say I tagged myself with: Male, USA, Single-Computer, Linux, Missouri, MoBot. Then I could see how I placed within each of those tags. I may not show up on the overall CPDN list, but I might under Single-Computer+Linux+Missouri for example.

Well, good or bad, those were some of my thoughts.

BOINC Conference Summary

Here is a "brief" summary of the BOINC conference that was held online, December 18th. It took place over Skype with people from all over the world. At times the connections were a little week (at least on my end), but it was a very worthwhile couple of hours.

This comes from my quickly scribbled notes. Nothing is a direct quote (unless my hand and memory got lucky) and I am sure there are many errors. I may have even missed a question or two.

If you want the definitive source, get the mp3. It should be available shortly from the BOINC UK site.

The questions mostly broke down into two basic categories. Those about BOINC in general and those specifically related to SETI@home.

General Question
If you had one wish what would it be?

BOINC Questions
With all of the optimized BOINC clients available why do we still need the "vanilla" client?
How can we resolve issues with large workunits?
Have you considered subteams or a way to give users more visibility?
What scalability issues are there as the number of projects continues to grow?
What is the status of using GPUs for computation?
Question about clients and credits.
What do you see as the relationship between BOINC and the media?
What about sandboxing?

SETI@home Questions
What is the status of the Southern Hemisphere data recorder?
What does a data recorder cost?
What it the likelihood of Arecibo shutting down?
What is the status of optical SETI work?
What percentage of stars have been listened to?
What about picking up leakage of TV, radio, and other broadcasts?
What is the projected rollout date for astropulse?
What about VLA data?

Q. With all of the optimized BOINC clients available why do we still need the "vanilla" client?

A. The optimized client was a kludge for the older version of SETI so that users would get the "correct" amount of credit. Now that SETI has moved to flops based computation there is no need for the optimized client.

Now, if you are actually talking about optimized applications (projects) as opposed to the BOINC client software that coordinates fetching workunits and running the projects on your local machine, they help. But, the issue is that there are two many distinct architectures and sub-architectures to properly test all of them.

Q. Due to the size of the Climate Prediction work units, many users simply crash and are never heard from again. How can we resolve this? Perhaps with popups and other messages? --- Mo (Maureen?)

A. We support trickle messages that can update the user as they continue to work on very large work units. Climate Prediction could do a bit of work to provide screensaver updates through using these trickle messages.

While some would like popup messages that let them know when something goes awry or needs attention, others would see this as intrusive. --- Dr. David Anderson

Q. What is the status of the Southern Hemisphere data recorder for SETI at the Parkes Observatory? --- Mark (Ohio, USA)

A. With the threatened shut down of the Arecibo telescope in 5 years we have to focus there and consider the possible transfer of equipment after that. --- Dr. Eric Korpela

Q2. What does a recorder cost? --- Mike

A2. It depends upon the donations of equipment, but even with the donations received, the original recorder cost around $300,000 (US). --- Eric

Q3. What is the likelihood of Arecibo shutting down? --- Mike

A3. The problem is that there are no congressmen with voting power for Arecibo. It is in Puerto Rico and this is really a political financial decision. --- Eric

Q. What about Optical SETI work? --- Tiare (Chile)

A. The optical work we are doing is relatively primitive compared to the radio work. It would be highly unlikely for each of our three sensors to receive a flash, although it has been guessed that a laser pulse directed at us from extraterrestrial sources could give a pulse at all three wavelengths. --- Eric

Q. If you had one wish what would it be?

A. Something indistinct about Microsoft. --- David
Better hardware --- ???
A verifiable contact --- Eric
Accurate benchmarking --- David

Q. Have you considered subgroups within teams so that users would have a better chance of seeing themselves showing up on a top 10?

A. We thought that if the servers generated sufficiently refined lists based upon data available to them that this would happen automatically. So far, it has not.

Q. What percentage of stars have been listened to? --- John (USA)

A. Arecibo has had pretty good coverage, but it only sees about 25% of the sky. Multi-beam is 30%(?) more sensitive and allows us to listen to sources that are 5 times more distant. We have also done some targeting with high bandwidth, but it is a tradeoff, bandwidth vs. coverage. We can listen to a lot on a few frequencies, or listen to a few things on a lot of frequencies.

When you look at all three, bandwidth, distances and sky coverage, we have had relatively little overall coverage. --- Eric

Q. What about picking up leakage of TV, radio, and other broadcasts?

A. Omnidirectional signals like those do not go very far. Even with a directed beam we can only reach about 50(?) lightyears with broadcasts of our own, say from Arecibo.

Q. It seems the number of projects is growing rapidly. What are the limitations of BOINC as this continues? --- Maureen

A. Since the BOINC project does not supply centralized servers,there are really no limits with respect to that. It is more a problem in terms of project discovery. BOINC account managers are one solution to that problem. BOINC mutual funds may be another.

BOINC mutual funds would be where an individual could say they are interested in computing for cancer research, but they don't want to have to keep track of cancer research projects as they come and go, so they subscribe to a "cancer research mutual fund" that would keep track of these things for them. Essentially this would be using intermediaries like the American Cancer Society to keep track of these things. --- David

Q. ATI has expressed interest in working with BOINC on producing GPU accelerated interfaces and Folding@Home has had success with a similar initiative. What is the status or progress in this area? --- Ron (Missouri, USA)

A. We tried doing some work with the NVIDIA GPUs but the architecture was not really conducive to integrating with them. It is our understanding that ATI may have a more accessible architecture, but so far no projects have bit on the offer to work with them.

We are looking at using the Cell Processor in the PlayStation® 3. It may be much better. It is several times faster than a GPU and about 50x faster than a standard processor. It also give much better computational power per Watt of electricity making it more environmentally friendly. --- David

I have not given up on GPUs. If there are any GPU programmers out there that are interesting in helping out on SETI@home, I would be very interested to hear from them. --- Eric

Q. Indistinct --- Tiare (Chile)

A. We have created a new simple GUI in cooperation with the Community Grid. It will make the BOINC client skinnable. We are also looking at a unified credit system that would allow us to grant credit for donated storage space as well as for donated CPU time. We would like to retain a single credit scoring system. But, benchmarking this is difficult. --- David

Q. What is the projected rollout date for AstroPulse? --- Derek (Guam)

AstroPulse is a long promised set of work units for SETI@home. According to a previous interview there had been a grad. student that was supposed to be working on it, but he found it more interesting to work on other things, so the effort that was put forth never came to fruition.

A. We have a new grad. student working on it. Hopefully it will be in beta next month or so. That would be nice, since he will have some time off of class then. --- Eric

Q. When the BBC did its documentary on Climate Prediction.Net it greatly enhanced the participation in the project. What do you see as the relationship between BOINC and the media? --- Maureen

A. Media coverage helps greatly. But many of those participants did not stick around long, for reasons we've already discussed. --- David

Q. Indistinct question about Sandboxing? --- Ian

A. We are using user-account based sandboxing and we recommend that the application runs as a limited user. We have this setup on the Mac already. It works with a little help on Linux as well. The problem (as usual) is Windows. Although we expect to have a Windows version of sandboxing available in about 2-3 month. --- David

Q. Something about VLA usage? --- Derek (Guam)

A. None currently. Allen(?) telescope is expanding to 45 dishes. [Garbled] needs more dishes, less than 45 does not provide what we need. Originally [garbled] was supposed to have around 200 telescopes, but due to cutbacks this has not happened. --- Eric

Well that's all I have from my notes, and a little memory thrown in.

I'd like to thank Mike and all those that arranged the conference and David and Eric for taking time out to answer our questions.

Monday, December 18, 2006

Visual SourceSafe 2005 on Linux

Getting Visual SourceSafe 2005 working on Linux was a little tricky. It required a lot of experimentation, and I did not keep exact notes. So, this is just a rough outline of how I got it working.

Start by getting the latest version of wine from git. When you configure it, install any missing dependencies and reconfigure. Then, build and install it.

Install ies4linux. Only Internet Explorer 6 is required. I used a base directory of $HOME/.wine when I ran the installation script:
./ies4linux --basedir $HOME/.wine
Then, I moved all of the contents of $HOME/.wine/ie6 into $HOME/.wine and deleted the ie6 subdirectory. If you plan on using the desktop icon, you will need to edit it to match the modified path.

Run winecfg and change the Windows Version setting to Windows 2000.

The Microsoft .NET Framework Version 2.0 must also be installed. However, the installation procedure does not appear to work under wine.

So, run cabextract on the download and then run it on the netfx.msi. This extracts a lot of files with really long names. Look at the file whose name contains _INF_. In my case this was
FL_NETFXUSA_INF_92947_____X86.3643236F_FC70_11D3_A536_0090278A1BB8.
It contains a list of files and target directories.

Some of the target directories will exist in .wine/drive_c, others will need to be created.

Then, you have to find the files listed for installation into those directories. They will not appear under in the extraction directory with the names shown in the info file. Rather, they will appear with a name like the FL_NETFXUSA_INF_... file shown above.

Using it as an example, the short name would be netfxusa.inf. Simply copy those files into the appropriate target directory under the shorter name.

When I did this, at least one file was specified to be copied into two different directories.

Visual SourceSafe requires some fonts that are not normally installed for wine. I suspect it really needs Tahoma, I didn't try to narrow it down, I just copied my Windows\Fonts directory from my XP partition into the .wine/drive_c/windows/fonts subdirectory.

Copy the Program Files subdirectory from the VSS installation CD into the wine/drive_c directory. Then, run
wine $HOME/.wine/drive_c/Program\ Files/Microsoft\ Visual\ SourceSafe/ssexp.exe
If everything goes well, Visual SourceSafe should display with some minor toolbar and menu issues. If you don't see a menu, pass your mouse over where it should be and the top-level items will appear.

You might want to copy that command into a script file or create a launcher for it instead of having to type that command every time.

Thursday, December 14, 2006

BOINC Server Shared Memory Error

When I first installed uppercase as a demo project on a BOINC server, I got the following message in my client messages window:
Message from server: Project encountered internal error: shared memory
Looking at the cgi.log on the server showed:
Can't attach shmem: -146 (feeder not running?)
Running bin/status also showed that BOINC was enabled, the daemons were running and also enabled (disabled=no).

The first hint came from Nicolas Alvarez:
Maybe the shared memory block is owned by your user instead of boinc user as well. You should stop and restart server from the correct user.
$ ps aux | grep feeder
See what user owns the feeder process.
That was my exact problem. Then I got a more elaborate response from Eric Myers:
The feeder has to be able to talk to the scheduler via shared memory. There are several ways to do this. I have
chgrp apache bin/feeder
chmod g+s bin/feeder
so that it runs as group apache, and thus can share memory with the scheduler cgi when it's started by apache.

Another way to do this (which I don't like as much, but works) is to make the feeder group 'boinc' and add the apache user to that group.

Either way, the feeder (which always runs) needs to share permissions with the scheduler (cgi-bin/cgi - confusing name) so they can share memory.
Well, that pretty well summed up the problem.

I had already configured apache to be a member of my boinc group and just needed to make sure that feeder was also running as the boinc group.

Thursday, December 07, 2006

Running libtool'd Binaries in GDB or DDD

When I started gdb or ddd on my program I got a message that said:
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"..."program": not in executable format: File format not recognized
After trying some different tools and things on my own, I searched Google. It gave me two hits on the entire web with my search phrase. The first was Programování pod Linuxem pro všechny (7), unfortunately that page is in Czech.

But, having a rather bizarre gift for languages, I read what of it I could. It turns out that the problem happens when a program is built with libtool. The solution is, instead of running
gdb program
run,
libtool --mode=execute gdb program
very simple, very easy.

And... Oh, yeah this works for starting ddd with program as well.

The problem is not specific to the platform, but for the sake of the search engines, this was on CentOS-4, an RHEL4 clone, using gcc 3.4.6 20060404 (Red Hat 3.4.6-3).

Viewing JPEG2000 Images in Linux

While the installation is not automated, there is a JPEG2000 Linux Browser Plugin. It should work in any Mozilla-based browser running on 32-bit Intel. This would include at least Netscape, Mozilla, SeaMonkey, Firefox and Flock.

I went to the downloads page and picked binary release. From there I selected the npjp2_linux_glibc2.1_jasper_pthread link. This downloads a zip file. When you unpack it, it contains a LICENSE file and a npjp2.so file.

Copy npjp2.so to your ~/.mozilla/plugins directory. Close all tabs and windows in your browser, then restart it.

At this point, you should be able to view JP2000 files in the browser. The same site that provides the plugin has a test page. I was also able to use Firefox to view .JP2 files on my local drive.

Friday, December 01, 2006

Correcting delete errors

When I initially created a simple BOINC test server and project, I had the permissions set incorrectly on the projects/PROJECT_NAME/upload directory. This resulted in a number of "delete file" errors from file_deleter. This is easily corrected.

Edit config.xml so that the file_deleter line contains the -retry_error switch, for example:
file_deleter -d 3 -retry_error
Then a simple:
$ bin/stop && bin/start
will restart the file deleter and it will retry the files that previously generated errors.

When I did this the size of the upload directory dropped in half.

Monday, November 27, 2006

Virtual Desktop Size in RHEL5 Beta 1

I had trouble getting the virtual screen size in RHEL5 Beta 1 to match my monitor's native resolution. It is an HP L1706 attached to a dc5100 SFF.

RHEL defaulted to 1600x1280 (or so) and the LCD's native resolution is 1280x1024 @ 60Hz. This resulted in the display panning around the virtual desktop when the mouse reached a screen edge. It also caused the menu and task bars to not always be available on screen, since they were at the edges of the virtual desktop.

Unfortunately the settings from System-->Administration-->Display, system-config-display, did not correct this. X reverted to the larger size.

I tried to use
system-config-display --set-resolution 1280 1024
This sets the Virtual setting, but /var/log/Xorg.0.log told me there was no matching mode. Well, system-config-display has no command line switch for setting the mode(s).

So, I manually edited /etc/X11/xorg.conf to contain:
SubSection "Display"
Virtual 1280 1024
Modes "1280x1024x60"
EndSubSection
in the Screen section.

This produced the desired effect, running the monitor at its recommended settings and setting the virtual desktop size to match it.

Wednesday, November 22, 2006

Building BOINC Samples on CentOS

Why am I blogging this? Because I initially (and repeatedly) missed the "documentation" at the top of Makefile.

Previously, I was editing the makefile to be more "portable". Only, those edits did not link against the static version of libstd++, which is the prefered way of linking applications that will be pushed down to the client. Doing so avoids runtime issues with missing or mismatched library versions.

But first, you need to build the BOINC client software. Then, as mentioned above, some of the examples like uppercase require a link to the static version of libstdc++.a. The makefiles for those projects contain:
# Do this first:
# ln -s `g++ -print-file-name=libstdc++.a`
# This creates a symbolic link to the C++ library,
# which is linked statically
So, just do:
ln -s `g++ -print-file-name=libstdc++.a`
make
to get them going.

Building the BOINC Client on CentOS-4

UPDATE: Fixed directions on adding lines to curl-local.spec.

Both Red Hat Enterprise Linux 4 and its clone, CentOS-4, need some updated packages to build the BOINC client out of the box. For example, they both ship libcurl 7.12.1 and BOINC requires 7.15.5 or better. They already ship RPMs for the older version, we just need to create an RPM for the newer version.

The only instructions that should be CentOS specific are related to retrieving the source RPM files. For Red Hat, you might try:
$ sudo up2date --get-source 
On CentOS:
$ wget ftp://rpmfind.net/linux/redhat/updates/enterprise/4AS/en/os/SRPMS/curl-$(yum -C list|grep curl-devel|awk '{print $2}').src.rpm
will work. This calls yum (which does not exist in RHEL4) to find out what the current version of curl-devel is. Then awk spits out only the version information and the whole thing is plopped down into the middle of the URL passed to wget, which retrieves the file.

Once retrieved:
sudo rpm -Uhv curl*.src.rpm
will install the source and files necessary to build an RPM. Following that, everything should be available under /usr/src/redhat.

Let's change to that directory to update and build cURL.
cd /usr/src/redhat
The latest released version of cURL is always available from http://curl.haxx.se. They are very proactive in supporting the package, issuing updates, and fixing any security related bugs that are found.

If you are going to locally compile and install software on a machine, I highly recommend creating an account at freshmeat.net and subscribing to get announcements for updates to that project. This includes security fixes. I would also recommend subscribing to the CentOS or RHEL announcement mailing list.

First, we have packages such as PHP that depend upon the libcurl version 3 ABI, so we need to arrange to have both the old version, and the new version installed. Start by:
cd SPECS
Then, either get the spec files from compat-curl-local.spec and curl-local.spec, saving them into the SPECS directory or create them afther this fashion:
sudo cp curl.spec compat-curl-local.spec
Then,
  1. Edit compat-curl-local.spec:
  2. Change the Name: to compat-curl
  3. Append .local.1 to the Release: line
  4. Change the Source: line to reference curl- instead of %{name}.
  5. Add -n curl-%{version} to the end of the %setup line.
  6. Save it.
Then,
sudo rpmbuild -ba compat-curl-local.spec
Running:
sudo wget -P ../SOURCES http://curl.haxx.se/download/curl-7.16.0.tar.bz2
will place the latest (as of this writing) released source into the ../SOURCES subdirectory.
sudo cp curl.spec curl-local.spec
sudo <your-favorite-editor> curl-local.spec
Change Version: to 7.16.0
Change Release: string to 0.rhel4.local.1
Add a Prefix: /usr line near the top of the file. This makes the package relocatable.
Delete all patches except #1 and renumber it to 0.
After %setup remove all %patch lines greater than 0.
Under %files add:
%{_libdir}/pkgconfig/libcurl.pc
This will make sure that any version 7.16.0 that is released by Red Hat will replace our local one. Yet, it will also guarantee that no 7.x versions less than that will overwrite our local one.

Then,
sudo rpmbuild -ba curl-local.spec
When this is done, it's time to install:
sudo rpm --force -Uhv ../RPMS/i386/compat-curl-7.*.local.1.i386.rpm
sudo rpm --force -Uhv ../RPMS/i386/compat-curl-devel-7.*.local.1.i386.rpm
sudo rpm -e curl curl-devel
sudo rpm -Uhv --prefix=/usr/local ../RPMS/i386/curl-7.16.0-0.rhel4.local.1.i386.rpm
sudo rpm -Uhv --prefix=/usr/local ../RPMS/i386/curl-devel-7.16.0-0.rhel4.local.1.i386.rpm
We first force the installation of our new compat- RPMs, because they will conflict with the originals. (The supply the same files under a different name. The name change is necessary so that our newer version does not result in an upgrade removing the old ABI version 3 files entirely.) Once those are in place we remove (erase) the original packages to make way for the new ones. Then we load our new local versions prefixing them into the /usr/local hierarchy to avoid interfering with the old files.

Once the updated cURL is in place we need the OpenGL and JPEG development libraries.
sudo up2date xorg-x11-devel freeglut-devel libjpeg-devel
Another fairly large component that we need are the wxWidgets. We get these from building a spec file that is part of the RPMforge project. I could not find the corresponding binary RPM for RHEL4.
cd /usr/src/redhat/SPECS
sudo wget http://svn.rpmforge.net/svn/branches/rpms/matthias/wxGTK/wxGTK.spec
sudo wget -P ../SOURCES http://downloads.sourceforge.net/wxwindows/wxGTK-2.6.2.tar.bz2
sudo up2date gtk2-devel SDL-devel libgnomeprintui22-devel libpng-devel libtiff-devel
sudo rpmbuild -ba --define 'dist el4' wxGTK.spec
cd ../RPMS/<architecture>
sudo rpm -Uhv wxGTK-2.6.* wxGTK-gl-2.6* wxGTK-devel-2.6.*
For most, <architecture> is going to be i386.
cd ~/src/boinc
./configure --enable-unicode
make
I have to commend the guys working on BOINC, especially Rom Walton. Prior to revision 1.20 of clientgui/SkinManager.cpp this would blow up compiling for UNICODE due to some character width mismatch errors. I sent in a patch and the very next day it was already in their CVS repository.

That's like a breath of fresh air in FOSS development. Too many projects make it difficult to get your patches accepted into the mainstream. It shouldn't be that way.

Tuesday, November 21, 2006

Installing the BOINC Server Software

This explains the process of installing the actual BOINC server software on a machine and setting up a skeleton project.

Development Tools

If you have previously followed the guide on installing CentOS-4 for a BOINC Server, you will need to add the development tools required to compile BOINC. This may be done by going to Applications-->System Settings-->Add/Remove Applications. Then, scroll down, check Development Tools and click Update. You may be prompted to insert a CentOS CD, insert either the CD (or DVD, if you have it) and continue on.

After installing the development tools, it is a good idea to apply any available updates. Right-click on the Update Notification Icon and select Check for updates. If there are updates, apply all of them even the ones that are normally flagged to be skipped.

Accounts and Permissions

Since it is really too long for ablog post, read the rest of this document online at Google Documents and Spreadsheets.

Sunday, November 19, 2006

Running a BOINC Server on SELinux

This is a shortened excerpt of one version of a much longer document. It has enough use on its own than I am posting it here separately.

In my previous post on Creating Users and Groups for a BOINC Server, I explained how to create the boinc user and group. Here I explain how to grant the appropriate permissions to allow a project to operate without disabling or crippling SELinux.

After you have used make_project to create the basic files for a project, you need to change some of the permissions.

Assuming you have done as shown on The make_project script page and that you created a cplan project in the projects directory inside of your home directory as explained there, you will need to grant read permission to your home directory. You can do this with
$ sudo chmod 755 ~
That will allow the Apache webserver to access files hosted in your home directory. Then we need to grant the boinc group access to the new files in the project.
$ sudo chgrp -R boinc ~/projects/cplan/html
Without SELinux running this would be sufficient to allow access to the project. However, if you have SELinux enabled, a few more steps are necessary. If you loaded your project into one of the system web server directories instead of creating them within a user's directory, you should replace httpd_user_content_t with httpd_sys_content_t in the following instructions.
$ sudo chcon -R -h -t httpd_user_content_t ~/projects/cplan/html
$ sudo chcon -h -t httpd_user_content_t ~/projects/cplan
$ sudo chcon -h -t httpd_user_content_t ~/projects/cplan/config.xml
$ sudo chcon -R -h -t httpd_user_script_exec_t ~/projects/cplan/cgi-bin
The chcon command changes the SELinux context that is assigned to an object. In this case were are changing the type of the object to indicate that it is for use by httpd, but resides in a user's directory. The first command recursively gives permission to the html directory. The second gives permission to be able to see config.xml in the directory and the third grants access to the configuration file itself. The last line indicates that scripts should be allowed to run in the cgi-bin directory.

You still have the details of writing your project and configuring Apache to serve it, but hopefully this post has helped with any SELinux issues you may have had.

Creating Users and Groups for a BOINC Server

The BOINC Groups and permissions page covers most of what you need to know in order to set this up. But, I present this from the perspective of running a CentOS-4 server using graphical tools and performing these operations before the project is actually created.

Run Applications-->System Settings-->Users and Groups. Start by adding a user and group, both named "boinc". The following steps will create both at one time.
  1. Click Add User.
  2. Enter a user name, I used "boinc".
  3. Enter a "Full Name", try "BOINC Server".
  4. Enter a password and confirm it.
  5. Set Login Shell to /sbin/nologin.
  6. Uncheck Create home directory.
  7. Check Create a private group for the user.
  8. Click OK.
Now lets add the "apache" user to the "boinc" group.
  1. Click the Groups tab.
  2. Double-click the "boinc" group.
  3. Click the Group Users tab.
  4. Check the box next to "apache".
  5. Click OK.
That's all there is to it. Now you have a boinc user, a boinc group and apache has access to all files that belong to the boinc group.

Linux BOINC Server CentOS-4 Installation

This explains the process that was used to install CentOS 4 onto the workstation that is used as a BOINC server for SciLINC development. There may be subtle differences in the installation as described here and the installation as it may be seen if run again later. This may be due to differences in a pristine install and a re-install, it may also be due to the slightly modified installation procedure that was required to obtain the screen shots for this document. The most up to date version of this document is published online.

The original plan was to install Fedora Core because it is sponsored by Red Hat and ultimately its content feeds into the next official Red Hat Enterprise Linux, RHEL. The (possibly incomplete) document covering that is "Linux BOINC Server Fedora Core 6 Installation." These plans were changed for two reasons. One, the rate of change on the recently released Fedora Core 6 is too high to make it worth tracking for a test server deployment. And two, we discovered CentOS 4, the Community ENTerprise Operating System. This is a distribution that is built directly from the publicly available source RPMs for RHEL 4. The project's web site describes it this way:
CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors [sic] redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.) CentOS is free.
In essence CentOS is a synthesis of Red Hat Enterprise Linux WS, ES and AS. The administrator is free to pick and choose from among the components offered by these various versions. In that sense it is suitable for desktop, workstation, and server usage.

Since it is really too long for a blog post, read the rest of this document online at Google Documents and Spreadsheets.

Wednesday, November 15, 2006

Linux BOINC Server Fedora Core 6 Installation

This document explains the process that was used to install Fedora Core 6, FC6, onto the workstation that is used as a BOINC server for SciLINC development. FC6 is also referred to by the code name, "Zod".

...

Fedora Core actually has two separate meanings. The first is in reference to the operating system itself. The second is a reference to the Fedora Core repository. The Core repository contains a set of relatively tightly managed and non-overlapping applications that may be used to configure a server, a knowledge worker desktop or a developer workstation.

Where Fedora Core has overlapping functionality is usually a matter of widely accepted "standard" packages that provide the same functionality. The vim and emacs editors are examples of this. Also, Fedora supports both the GNOME and KDE desktops. Each desktop may have some programs with similar purposes that are better integrated into its environment. The firefox and konqueror web browsers would fall into this category.

Since it is really too long for a blog post, read the rest of this document online at Google Documents and Spreadsheets.