WebHosting Paid by #1Payday.Loans


   The ROCK Linux project has been discontinued in 2010. Here are the old data for the historical record!

About ROCK Linux
Rolling ROCK (eZine)
   September 2005
   July 2005
   April/May 2005
   March 2005
   February 2005
   January 2005
   December 2004
   November 2004
   October 2004
   September 2004
   Router PXE install
   Gaming with ROCK Linux
   Build Wrappers Overview
   Status of Sparc and PowerPC
   "Hidden" ROCK Script Features
   ROCK 2.0 Install Disks
   Multi tar-ball packages
   ISO-Testing with VMWare
   ROCK i18n Project
   Building on a Beowulf Cluster
   1.7 Status Reports
   dROCK Overview
   Alpha AXP and MIPS Status
Download
Community
Documentation
Source Trees
Architectures
Target Distributions
Related Projects
Feature Projects
PR Stuff (T-Shirts, ..)
Webpage Mirrors
The ROCK Portal Site
Sitemap
Search

  "Hidden" ROCK Script Features

Introduction to some not so well-known ROCK script features

From time to time poeple on the mailing-list or the irc channel either ask how to perform a special task or provide a script for a feature already present in the ROCK Linux build scripts. So here are some tips to not that well-known features.

Cleanup of obsolete downloaded source files

After updating the ROCK Linux source a few times and downloading the package sources many unneeded tar-balls will accumulate in the download directory. How to get rid of these? The solution is provided by ./scripts/Download -list-unknown. And example output:

Unknown file: download/base/mine/mine-0.12.tar.bz2
Unknown file: download/base/net-snmp/ucd-snmp-4.2.6.tar.bz2

So you only need to filter the filenames and remove them: ./scripts/Download -list-unknown | cut -d ' ' -f 3 | xargs rm -v Where the result will be:

removed `download/base/mine/mine-0.12.tar.bz2'
removed `download/base/net-snmp/ucd-snmp-4.2.6.tar.bz2'

Rebuilding a tree after an ROCK Linux source update

During the build of ROCK Linux, other people may provide updates and bug-fixes which might be either needed for bug fixes, or wanted due to feature or version updates. How to reschedule the modified packages for a rebuild?

Here the solution is provided by the Create-ErrList script when called with the -newdelete option. This will compare the checksum of each package configuration with the one present during the former build (stored in var/adm/packages/$pkg).

An example for such a run:

Scheduling package 'coreutils' for rebuild ...
Scheduling package 'mine' for rebuild ...
Scheduling package 'perl5' for rebuild ...

All the updated packages will be completely removed (not only the var/adm/*/*$pkg* but all files using mine -r). This prevents packaging errors due to packages that do not overwrite files already present. Those files would not be in a new flist - and so not archived in the binary package.

Updating a package

The most boring task for a maintainer is a simple version bump for a simple package. Here an example for just updating xemacs-packages to a specific version: ./scripts/Create-PkgUpdPatch xemacs-packages-2003-04-14 This would result in a patch like this:

[ xemacs-packages-2003-04-14 ]
Upgrade Patch for xemacs-packages (package/rene/xemacs-packages): 2003-02-05 -> 2003-04-14
--- ./package/rene/xemacs-packages/xemacs-packages.desc 2003-04-29 11:27:49.000000000 +0200
+++ /tmp/tmp.JcokVD6236 2003-06-23 01:18:14.000000000 +0200
@@ -33,8 +33,8 @@

[L] Free-to-use
[S] Stable
-[V] 2003-02-05
+[V] 2003-04-14
[P] X -----5---9 310.000

-[D] 1930553657 xemacs-sumo-2003-02-05.tar.bz2 ftp://ftp.at.xemacs.org/editors/xemacs/packages/
+[D] 0 xemacs-sumo-2003-04-14.tar.bz2 ftp://ftp.at.xemacs.org/editors/xemacs/packages/

simply pipe it thru patch -p1 and after a test build the patch is ready for a commit ;-)

The checksum might be inserted via: ./scripts/Create-CkSumPatch xemacs-packages. The patch will end in a cksum.patch file, which needs to be applied: patch -p1 < cksum.patch

Build a single package into a running system

Since a manual ./scripts/Build-Pkg would also overwrite changed config files a -update options is available to avoid this. This is archived by checking the checksum of all installed files of this package and creating a backup of these files - they will be automatically restored after the build.

A running system update from source

Our script collection even includes functionality to update a running system to the latest version provided in the repositories.

The main functionality resides in ./scripts/Create-UpdList. When called it generates a list of updates available. An example:

libc23: New source checksum (93bfa1b1fc5fcb0b002d63e0fe5df6ab).
dietlibc: New version (0.21 -> 0.22).
binutils: New version (2.13.90.0.18 -> 2.14.90.0.1).
gcc3: New version (3.2.2 -> 3.2.3).
bin86: New source checksum (8c0c22300ba18b207f19914274b70050).

Update-System executes Create-UpdList and uses the above list and executes Build-Pkg -update for each new pacakge.

Since often only new versions are of interest, changes to other files in the ROCK Linux package descriptions and configs can be avoided with the -ignore-chksum option which is available for both of the scripts. This would reduce the list of updates in the example to: dietlibc: New version (0.21 -> 0.22).
binutils: New version (2.13.90.0.18 -> 2.14.90.0.1).
gcc3: New version (3.2.2 -> 3.2.3).

Creating a new package

For creating a new package misc/archive/newpackage.sh can be of help. When executed with package names in the form repository/package it will create a default .desc and .conf file with useful comments.

Editing categories

For editing categories misc/archive/catedit.sh can be a help. It must be executed with a list of .desc files or -all and will present a dialog with the packages and their categories. You can simply select one and edit the category.

Our Portal Site: www.rocklinux.net
Copyright © 1998-2003 Clifford Wolf
rocklinux.org search: