Back to list

Binary Package Management and Object Oriented Shell Scripting under FreeBSD

Dominic Fandrey
Author Description:
Born 1982 in Cologne/Germany I was raised in Hofheim and later in Höchst (Odenwald). In 2003 I began studying at the computer science department of the Technical University Darmstadt. Enjoying the leisures of student life I became involved with the iCTF team, the international Capture The Flag hacker contest between universities around the globe. In 2005 I did my first install of FreeBSD 5.3 on my Notebook, it has been my primary operating system ever since.
Among all the excitement and fun my studies did not progress at all.

In 2006 I dropped out and began anew at the Karlsruhe University of Applied Sciences. I concentrated on my studies and dropped nearly all my other pastimes, apart from those FreeBSD related. In the meantime my involvement in the German BSD community has grown, I maintain a number of FreeBSD ports two of which are scripted solutions of my own making. The first one is sysutils/bsdadminscripts, a collection of scripts performing useful tasks, mostly related to the FreeBSD ports, among them pkg_upgrade. The other one is sysutils/automounter a script that dynamically creates amd configurations ( for plugable media like disc drives and USB mass storage.

Till the reception of my Bachelor of Science degree in 2009 I was employed by the Porsche AG, currently I am employed by the Karlsruhe University of Applied Sciences, where I also study for my Master degree.
This talk covers three topics. In 2009 the author released pkg_upgrade with his collection of FreeBSD shell scripts, unimaginatively named bsdadminscripts. Pkg_upgrade was, to the author's knowledge, the first package management tool for FreeBSD that allowed updating packages without a local copy of the ports tree.

Instead it relies on the INDEX produced by the pointyhat build servers, which is an accurate list of the available packages and their dependency relations. The extent of pkg_upgrade's user base is unknown to the author. Occasional support enquiries suggest that the main body of users consists of system administrators who use pkg_upgrade to deploy packages within the FreeBSD server farms, which they are responsible for. A complete object oriented re-write of pkg_upgrade is scheduled to be released in September 2010.

The first part of the talk will cover the development goals and constraints for the initial design that made /bin/sh the chosen interpreter, as well as the complexities and redundancies that led to the decision to re-write pkg_upgrade under an object oriented programming paradigm.

The second part of the talk will give an overview of previous endeavours and research in object oriented shell scripting and present concepts and ideas. It will conclude with presenting the capabilities of bsda:obj, the framework created for the pkg_upgrade re-write, originally begun at the GPN8 conference in Karlsruhe.

The final part of the talk will present pkg_upgrade and bsda:obj, their design and implementation, the advantages and cost of using the object oriented paradigm as well as future development plans. In detail information about unusual features like output duplication or parallelization and synchronization can be presented. Implementation details like nested eval calls with successive variable resolution, serialization, call stacks and using prefixes and dynamic function generation to imitate closures can also be covered.
Target Audience:
Target OS:
Paper Download:
View PDF
Back to list

EuroBSDCon Organizer

see all Sponsors

©2015 · All rights reserved. Imprint