tech-install archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Sysinst GSOC project
Hello Zach!
> My name is Zach Wegner. I am 20 years old, and I attend Austin
> Community College in Austin, TX. I have been selected for the Google
> Summer of Code to help out the NetBSD project.
Great to hear that. Hands-off installation has sorely been missing
from NetBSD until now. I wish you the best of luck!
> The most important part of this project is the file format.
While I would not totally agree to this, you are correct that the
file format plays an important role.
> wanting in this format is to be easily readable and editable by
> humans, as well as being very flexible. Because of this, I think it
> would be best to use a very simple, sh script-like format.
Hmmm.... this looks to me like a design that tries to fit artificial
constraints. (I know that to you these constraints are very real, i.e.
what you can do in the alotted time).
> say so. But again, I don't have the time to implement a very
> complicated parser, and I think the sample format should handle the
> task well, so I'd prefer that we don't have a flamewar over this.
I am not trying to start a flame war here, but have you considered XML?
I don't think I need to list all the advantages that a standardized
machine-readable format has.
Ready-made XML parsers are available, with good C APIs.
> So in conclusion, this is a pretty basic but important project. The
> configuration file will be usable for a long time to come
Exactly. So please do not reinvent the wheel. Instead capitalize on
the many tools others have built before you.
Here is a quick XML rendering of your example file:
------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE sysinst SYSTEM "/usr/share/lib/xml/dtd/netbsd_sysinst.dtd">
<!-- Configuration file for sysinst -->
<!-- Describes a default installation -->
<!-- Port name. This will be checked against the compiled-in constant -->
<!-- in the back end. -->
<sysinst port="amd64">
<!-- Installation medium: where the installation files come from. -->
<!-- Some mediums need arguments. CDROM installations need a device -->
<!-- and a directory on the CD. -->
<medium name="CD-ROM" dev="/dev/cd0" path="/installation">
<!-- Kernel name. For this and other fields, a slash in front of an -->
<!-- option will indicate that the user must still select between the -->
<!-- ones in the slash-separated list in the front end. That is, this -->
<!-- file does not fully describe an installation. This will only be -->
<!-- in a "default" file, the files generated by sysinst will be -->
<!-- completely specified. -->
<kernel>
<option name="GENERIC"/>
<option name="GENERIC_MP"/>
<option name="GENERIC_TINY"/>
</kernel>
<!-- Sets. In this example, the compiler set is optional. -->
<set>
<option name="BASE" sel="required"/>
<option name="ETC" sel="required"/>
<option name="COMP" sel="optional"/>
<option name="GAMES" sel="required"/>
<option name="MAN" sel="required"/>
<option name="X11" sel="required"/>
<!-- Custom sets. These are made available both per-port and by custom -->
<!-- installation distributions. E.g. someone could distribute NetBSD -->
<!-- with a KDE set and a GNOME set, and the user will select between -->
<!-- them. Entries with slashes will be present on these custom -->
<!-- sysinst.conf's. -->
<option name="SOME_AMD_SET" sel="custom"/>
<option name="KDE" sel="custom"/>
<option name="GNOME" sel="custom"/>
</set>
<disks>
<!-- Partitions, in the main NetBSD partition -->
<partition name="SWAP" percent="10" minsize="16M" maxsize="1G"/>
<partition name="/usr" percent="40" minsize="128M"/>
<partition name="/" minsize="256M">
<!-- For this particular conf., the minimum disk size is 16+128+256=400M. -->
</disks>
</sysinst>
------------------------------------------------------------
I believe this is actually easier to read than your example.
(I hope it will not be wrapped. I can send it you you directly if
you wish.)
Best regards -- Volker
--
------------------------------------------------------------------------
Volker A. Brandt Consulting and Support for Sun Solaris
Brandt & Brandt Computer GmbH WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim Email:
vab%bb-c.de@localhost
Handelsregister: Amtsgericht Bonn, HRB 10513 Schuhgröße: 45
Geschäftsführer: Rainer J. H. Brandt und Volker A. Brandt
Home |
Main Index |
Thread Index |
Old Index