I decided to move my blog under my domain. I’ve had the domain for almost 3 years however I only ever had email hosting. I decided to get web hosting. Because of this I am now using WordPress. WordPress lets you import all the old entries from Blogger including the comments so the process has been painless so far.
I’ve been working on a library with the lofty goal of overthrowing all package management tools (and bringing peace to the masses of Open Source/Free Software users). Failing this I will accept making package tool writers jobs easier by providing an API to add/remove/create/modify packages on a system.
The library is aptly named libpkg. It is an object based design where each package is a separate object. The contents of the object is hidden from view. There are also package repository and package database objects, these are to download from and install packages to respectively. Files are abstracted too. This is mainly to make sure the code will be safe when run as the root user.
Currently libpkg can fetch and install a package and get a list of installed packages based on some criteria, eg. all packages, packages with a name matching a regular expression, etc. I am working on deinstalling packages with package creation next on my list.
Because libpkg uses Tim Kientzle’s libarchive to extract files straight to the file system the speed of installation appears to be limited by the speed of libbz2.
If anyone is interested in working on this with me feel free to leave a comment or if you can find my Berlios email address you can email me (username: zxombie). It is currently FreeBSD specific but I would like to get it working on other Operating Systems.
Below is the announcement I made for the second beta release of FreeBSD+BSDInstaller
I am pleased to announce the second release of FreeBSD install CD’s based on the BSD Installer.
The new Lua backend is now being used in this release rather than the older, deprecated C version.
The CD image is available from ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/bsdinstaller/7.0-BSDINSTALLER-BETA-2-i386-disc1.iso.gz or your local mirror
MD5 (7.0-BSDINSTALLER-BETA-2-i386-disc1.iso) = 1becb489666ee97f5e10ebc5a0987f2d
SHA256 (7.0-BSDINSTALLER-BETA-2-i386-disc1.iso) = e5f6114258e1b66adfd84636ffbd3286c7ad41dadab42e615da68f5b0cf8cbaf
As with the previous Beta release there are three virtual consoles available:
* ttyv0: The frontend
* ttyv1: The backend
* ttyv2: A standard login screen to login as root with no password
Changes Since BETA-1
* Can now install Source
* Can now install the Ports tree
* Can now install Packages
* Change to the new Lua backend
Known Problems
* Can only install to one drive, can’t have / on ad0 and /usr on ad1
* fdisk doesn’t alter the geometry
Thank you to Scott Long for providing a computer to build this with.
I was accepted by the FreeBSD team to receive the US$4000 from Google for the Summer Of Code. This is a note to Google: thanks for the check (still waiting on the tee-shirt).
I am still working on getting the BSD Installer integrated with FreeBSD. I now have the Lua backend past the point of the BSDINSTALLER-BETA-1 release I made.
I have been building kernels without Preemption as qemu would cause a race condition to be triggered. This patch went into the FreeBSD tree. It means I don’t need the NOPREEMPTION kernel anymore for use with qemu as the race condition is fixed.
This really happened a week ago but I was too busy/slack.
The Google Summer of Code finished back on 1 September. As far as I know I finished everything but the mentors at FreeBSD have the final say on whether I will receive the full $4500 or just $500.
I’m hoping if I pass I will get the tee-shirt soon so I can use it to skite to the other Computer Science students around Uni.
I’m looking at ways to install packages with the BSD Installer.
One way is to move the few executables and libraries needed from /usr to another location on /dev/md0. These include /usr/bin/login, /usr/sbin/bsd_installer_be, /usr/sbin/bsd_installer_ncurses, /usr/lib/libaura.so, /usr/lib/libdfui.so and /usr/lib/libinstaller.so but there may be others. /usr would then be unmounted and the package CD gets mounted in it’s place. When all the packages are installed it would be unmounted and the install CD mounted back to /usr.
Another is to move /usr to a file system image. The dists would stay directly on the CD but it could be unmounted as needed without any problems.
The only problems I see with the former is I don’t know if any further files from /usr will be needed in the future. The latter will need more memory which I’m trying to keep to a minimum as swap is not available until part way through the install.
I have only started testing to see if I can unmount /usr, remove the physical CD and still access / with it.
If anyone has any other ideas on how to change the CD during the install please leave a comment.
The first testing release of the BSD Installer powered install CD’s is below. I’ve been working on this for just over a month (it seems longer).
Announcing the first test release of a BSDInstaller-ified Install ISO
for FreeBSD.
I am pleased to announce the first beta release of BSD Installer powered
FreeBSD Install CD’s. It is both for wider testing and feedback on to
gauge the progress I’ve been making for the Google Summer of Code. This
is based on RELENG_6 and unfortunately only for i386.
It is available from
ftp://ftp.freebsd.org/pub/FreeBSD/SOC2005/bsdinstaller/ and should be on
mirrors soon.
If you find any bugs not already listed in the Known Bugs section of
this email or in http://wikitest.freebsd.org/moin.cgi/BSDInstaller
please email me at soc-andrew@freebsd.org to help fix the bugs.
Details:
There are three virtual consoles running:
* ttyv0: The frontend
* ttyv1: The backend
* ttyv2: A standard login screen to login as root with no password.
To see the installation log change to console ttyv1. It is also written
to /var/log/install.log on the installed disk.
Minimum Memory:
* 64M
Known Bugs:
* Can only install to one drive, can’t have / on ad0 and /usr on ad1
* Cannot install source
* Cannot install ports tree
* Cannot install packages
* The “Display system startup messages” window dosen’t display anything
* Sendmail complains about not being able to change dir to
/var/spool/clientmqueue
Workaround: run “chown smmsp /var/spool/clientmqueue”
* “Exit to Live CD” dosn’t work
Workaround: change to ttyv2, login as root no password
* dhclient fails as /var/db is missing as well as other errors.
Testing
* There has only been minimal testing of the “Configure an Installed
System” menu. Most of the options should work.
* The “Install extra software packages” option dosn’t work
* I havn’t looked at “Setup NetBoot Install Services” menu, I have no
idea if it will work or not
I feel like having a rant on using /bin/bash in scripts so here it is:
DON’T USE /bin/bash IN SHELL SCRIPTS EVER.
If bash must be used for the script use “#!/usr/bin/env bash” otherwise use “#!/bin/sh”.
The reason is not everyone has bash installed as /bin/bash where if /bin/sh is not there the admin is asking for punishment.
The env trick works with bash wherever it is installed. eg. FreeBSD packages install bash to /usr/local/bin/bash, NetBSD installs it to /usr/pkg/bin/bash (I think, I don’t have a NetBSD system handy).
Perl and Python are the same. There might be a link from /usr/bin/perl to /usr/local/bin/perl in FreeBSD but that’s just because there used to be a copy of perl in the base system. There is no such link for python, You need to use “#!/usr/bin/env python”.
I’ve been playing with writing C code with XML and XSLT. I have been using this to look at a state machine where each state is a separate C function. eg the BSD Installer C backend.
The basic gist is:
<installer>
<window name=”foo”>
<button name=”b1″/>
<button name=”b2″/>
</window>
<window name=”bar”>
<button name=”baz”>
</window>
</installer>
The XSL file then converts each <window> to a separate function with each <button> becoming the correct definition for a button in dfui API.
I received an email from goggle in the weekend saying I was selected for the Google Summer of Code to work with the FreeBSD Project on integrating the BSD Installer to FreeBSD.
I have added a page to the FreeBSD test wiki on my project. It is currently the proposal I sent in but will soon include more detail.