| Wherewith do you teach tomorrow?
|
The look behind: the development of the Education-DVD...
The pattern-education-desktop and pattern-education-server packages contain the pattern files which can be found later in CD1/suse/setup/descr/*.pat (*.pat.gz since openSUSE 10.3) and also xml-pattern files to create *.ymp files. We create the patterns "on the fly" via a couple of textfiles, which are merged dynamically during the build of the package. So we can use one central place for creating patterns for all distributions and architectures. If we add or remove a package from a pattern file, we re-submit the package to the buildservice - and all patterns for all distributions are in sync again.
| A good description of the pattern content is available here. |
The skelcd-education-desktop package contains all files, which are extracted on the media. For example:
Currently we use /CD1/ as base directory and place all files below this directory in the same way the would be placed on the real media. So you would find the README files in /CD1/README if you install the skelcd-education package as root on your system.
As we need some adjustments for every distribution and architecture, the skelcd-education package is also checked in to the education buildservice repository. Currently we use it for creating the content-, the README- and media-files with the right strings for each distribution and arch.
But using a rpm for this gives us more options for the future. Perhaps the package can require all packages in the pattern files as build requires - so we can be shure that a package exists for a distribution _bevore_ we add it as required package in the pattern, or we ignore some packages for a specific architecture, or we replace some strings in the readme and content files in each distribution or architecture...
As we don't want to place all files for all distributions in the same /CD1/ directory to create our Repositories, we use the command unrpm (a bash-script which comes with the package build) and move the package content to the right place after extraction.
| You can find more information about the "meta" files on the media here. |
To get all available packages right when we need them, our CD-Creation server mirrors the Education:desktop and Education:server repository for all distributions, where we want to create CDs and repositories.
So the next step, after unpacking the meta-packages to the right location is to move all build packages to their directories in the repository.
We use the Vendor target "openSUSE-Education" in all our packages, So YaST can detect packages from us and we can update them later.
As the buildservice currently doesn't support own GPG keys, we resign all packages on their new location with our own GPG key (the one you can find in the root-directory of the CD). Yes: this is a small security hole as we currently can't be shure that we get the right packages from the buildservice - but this is what we can get so far...
Now we use some scripts from the inst-source-utils package and some simple bash scripts to create the dynamic meta files on the CD.
For our examples below, we use
The patterns file contains all pattern files. So YaST knows in a very early step all about the available pattern files. The creation of the patterns file is so simple that we just need a single "ls" for it:
pushd $DESCRDIR 1>/dev/null ls -A1 *.pat* > patterns 2>/dev/null popd 1>/dev/null
The MD5SUMS file contains the MD5SUMS of all files in a directory. YaST compares the md5sum in this file with the downloaded file to check for transmission errors.
The file directory.yast contains the whole directory content. Some FTP-Servers don't allow directory listings - but YaST needs to know which files are available in a directory to save time (for example: have a look in the i586 directory of the openSUSE-10.3 distribution) and sometimes to redirect to another workflow (if the file licence.zip is available in media.1/media - display it; if not, search for the file licence.txt in the same directory...).
So we create the files for each needed directory:
for dir in . boot $MEDIADIR $DESCRDIR; do
create_directory.yast $dir
fi
create_md5sums .
To improve security, YaST searches for SHA1-Sums for some important files in the $ROOTDIR/content file since 10.1:
The script create_sha1sums.sh from inst-source-utils does this job.
Now we have to sign the $ROOTDIR/content and the $MEDIADIR/products file with our the GPG-Key.
gpg -a -b $ROOTDIR/content gpg -a -b $MEDIADIR/products
and place our amor-exported GPG key there, too.
cp ~/gpg-pubkey $ROOTDIR/content.key cp ~/gpg-pubkey $MEDIADIR/products.key
Last step: use mkisofs to create the ISO image. The steps above should have created a valid online-repository already (you can test it with YaST, adding the $ROOTDIR as repository). So the commandline looks like:
DIST=10.3 RELEASE=Alpha1 ISODIR=/tmp REPODIR=/CD1/ ISONAME=openSUSE-Education-$DIST-$RELEASE.iso
mkisofs -p 'http://www.opensuse-education.org/' \ -publisher 'openSUSE-Education Team' -r -J -f -pad \ -A OSSEdu-$DIST -V Edu${DIST}.001 \ -o $ISODIR/$ISONAME \ $REPODIR
As you already noticed, most of the steps above are scriptable. Currenlty we've simple scritps for syncing and creating the repository. You can find them as extra directoy in our SVN: https://forgesvn1.novell.com/viewsvn/education/trunk/packages/opensuse-education-tools/trunk/opensuse-education-tools/
Patterns are responsible for the "grouping" of packages in the YaST2 Software Management. You can find the "plain text" patterns in datadir of the repository (in 10.2 they have the ending *.pat).
We currently use the patterns to provide a group of packages for:
Patterns can:
All Education pattern files are created as normal RPM packages and are "developed" using Subversion and a simple directory and file structure. So neither adding packages nor translating the descriptions is a big deal.
Here are some examples:
If someone want's a new package to be installed per default if the youth-education-desktop pattern is selected, all what's left to do is to add the package name in the file for the recommended packages above.
If someone want's to translate the pattern file into his prefered language, he can checkout the english files Cat, Des and Sum, translate them and submit them back with the locale ending of his language (for example Cat.fr, Des.fr and Sum.fr for francais).
From time to time we update the "patterns-education-desktop" and "pattern-education-server" package in the Build Service with a new checkout from the subversion repository - and all changes are placed in the resulting repository more or less automatically (see above).
© 2009 Novell, Inc. All Rights Reserved.