Archive for the 'General' Category

Gentoo Binary Packages

Sunday, April 9th, 2006

In an effort to save myself some time, I’m looking into setting up a share on my network dedicated to hosting precompiled gentoo packages (that I’ve compiled myself). This way when I unmerge a package and want to remerge it later, or I want to merge the same package on identically configured (same architecture and optimizations), I don’t have to go through all the trouble of recompiling everything.

I’m using a samba share because I already have one. If you want to use NFS or something else, then that is fine, but you’ll have to transpose this list as necessary. Also note that to use a samba share, you’ll want to have the smbfs module compiled and inserted, or compiled into the kernel. The basic process works as follows:

UPDATED: I’ve updated this now due to a problem with newer versions of portage getting ACCESS DENIED errors when creating the binaries. Because of the way the sandbox works, you can’t have symlinks inside the package directory (PKGDIR) that point outside the sandbox’s directory write list.

  1. [Server A] Set up a centralized directory with read/write access for storing the binary packages. Share it with samba.
  2. [Server B] Set up a centralized web server (apache in my case) that can point to the share. This could be the same box as “A”, but mine is not.
  3. [Client] Mount the samba share somewhere. Mine is called “pub” because it was already created and I mount it in /mnt/pub, for instance.
  4. [Client] cd into the share, and create a folder for your architecture. This should be something like i686-pc-linux-gnu-4.1.0/pentium4/O2. The first directory name (e.g. i686-pc-linux-gnu) is the compiler architecture (CHOST) being used (from `gcc-config -c`). The next directory name (e.g. pentium4) is the architecture. This comes from the -march in CFLAGS in /etc/make.conf. The next is the compiler optimization used (e.g. O2 for -O2) in the CFLAGS of /etc/make.conf.
  5. [Client] Add PKGDIR variable to /etc/make.conf that points to the directory you created in the previous step
  6. [Client] Add to /etc/make.conf: FEATURES=”buildpkg”
  7. [Client] (optional, see caveat) Use quickpkg to create binary packages of everything you already have built. Caveat: if the package contains any files you’ve modified, these go into your binary package. So this isn’t really safe. The better thing to do is to re-emerge everything.
  8. [Client] Add the following alias to your /etc/bash/bashrc aliases, alias emerge=”emerge –usepkg –getbinpkg”
  9. [Client] Add to /etc/make.conf: PORTAGE_BINHOST=”http:///path/to/share/i686-pc-linux-gnu/pentium4/O2/” (Try not to miss the last slash as it results in a redirect from the server and an annoying message from emerge)

The basic idea, here, is that steps 1 and 2 create a central repository. Steps 3-8 ensure that binaries are cached for existing builds and new builds, and step 9 sets the system up to use the cached binaries if they are available.

Tips:

One thing I noticed is that I have some machines configured to use the -march k8 and some to use -march athlon64, but that these are aliases for the same thing and produce identical binaries. So, if you want to share binaries between these machines, you can symlink the k8 and athlon64 directories under the x86_64* dir.

Caveats:

  1. I believe that different glibc versions might cause problems and this could potentially be remedied by adding a glibc version into the PKGDIR and PORTAGE_BINHOST paths.
  2. If you upgrade gcc, gcc-config will not fix /etc/make for you to put the new binaries in a new folder, so you just have to remember to do that. I experimented with having make.conf detect the current version, but that caused problems with gcc-config.
  3. If you share these among machines, it looks like the USE flags are compiled into the binaries so the two machines are forced to use the same USE flags or compile separately. Compiling separately might cause some confusing problems since the paths to the binary packages will be identical causing overwrites.

Geek Training

Thursday, March 30th, 2006

Here’s a picture of me playing a really simple flash video game to entertain the boys. The game itself isn’t loads of fun, but Ethan and Isaac love to sit on my lap and watch me make the Fancy Pants Man jump over the angry penguin. Ethan gets really excited. He asks me to play the “Pantsy Fants” game, and Isaac asks me to jump over the “Anggy Penggin.”

[EDIT] The game can be found here for all that are interested.

Elegant Data Representation Draft

Friday, February 17th, 2006

I have set up a page to describe my idea for an elegant representation of data to replace the unelegant standard XML simply because I can’t bear to work with it anymore than I have to. This should also fit nicely as a component in an application framework I’ve been conceptualizing for some time now too.

For now, all I have is a draft. The hope is that the draft will be clear about the basic concept of elegant data representation. Later, I will add technical specifications to the draft once they are complete. I would also like comments and questions on the draft. (They can be posted here as comments).

Contact Form on warrenfalk.com

Saturday, February 11th, 2006

The “contact” link has been sitting on the current version of my warrenfalk.com site which must be almost two years old if not more.  But it never actually did anything because I never got around to making it work.  Now I have.

Clicking “contact” shows a form on which you can enter a name, email, and a message, and even select a “priority” checkbox which will text my cellphone with the message.

I also have a “works” link on there now which I have to get around to building.  This will be a “portfolio” of some of my web design which I’m attempting to get back into.

Wordpress and Themes

Wednesday, February 8th, 2006

I’ve been doing a lot of work on my wordpress installation lately. I migrated my blog to it, then built a theme for it, then trashed it and built another theme for it. I then put up a family weblog and built a theme for that. Then I built a plugin which facilitates photo blogging. It turned out so well, that I think I’ll polish that up some more and publish it. Just lateley I completed work on a website for my extended family on my Mom’s side, 816pine.com. I also built a theme for that one and am reusing my photo blogger plugin. I expect that blog to require some other new plugins also.

I’m quite impressed with wordpress. So far, it is the easiest blog software I’ve worked with. Creating themes is easy and fun, and the extensibility through plugins is also the best I’ve seen so far. I am able to run all my different blogs by modifying the config file to load the config based on the site domain name. The only issue so far is some poor calculation of the upload directory filesystem path and url path which forces you to share the upload path among all blogs. I solved that by making a modification to the code to translate the filesystem path from the url path which is now configurable via the options pages in the admin area as of 2.0.1.

The Family Weblog

Tuesday, January 24th, 2006

I’ve completed my family blog now. The main reason for setting it up was so that Lynn could post pictures and things. This is something she’s been willing to do for a long time, but I have just now finally gotten around to setting the whole thing up. The new blog is quite a good looking one if I do say so myself. Take a look at The Falk Family Weblog when you get a chance.