Re: GNU Hurd .iso building HOWTO
Hi,
Please find below the steps given to me by Philip Charles to build our
own tar ball from the scripts. I didn't try it out. It doesn't build
the iso image, but may be useful for you.
Regards,
Raghesh
-----------------------------------------------------------------------------------------------------------------------
Raghesh,
I hope this solves you problem.
I hope that this will enable people to follow the tarball build
process.
The first step is to create a local Hurd archive. The important
element of this is the local fs.
/b5/debian/Hurd/debian/ is an intermediate step in creating the
local fs.
This is copy.sh which is part of my daily mirroring sysetm and
not included the uploaded system.
**********************
#! /bin/sh
STRT=`pwd`
rm -rf /b5/debian/Hurd/debian
mkdir /b5/debian/Hurd/debian
cd /b5/debian/Hurd/tmp/pool-hurd-i386
# This is a mirror of rsync.debian-ports.org::debian/pool-hurd-i386
# This archive contains those packages with may be needed, but for
# some reason cannot be uploaded to the main Debian archive.
cp -Rip */*/*/* /b5/debian/Hurd/debian
cd $STRT
# This copies all the files in the mirror to a single directory.
************************
This is how /b5/debian/Hurd/debian/ is used. local_fs.sh
***************************
#!/bin/sh
# Modifying the mirror
. CONF.sh # Defines $MIRROR etc
# Creating the local (gnuab) directory.
rm -fr $MIRROR/dists/sid/local
mkdir -p $MIRROR/dists/sid/local/binary-hurd-i386
cp -lp /b5/debian/Hurd/debian/* $MIRROR/dists/sid/local/binary-hurd-i386/
# This creates a local directory in the main archive.
# The addition of special packages goes here. Enter your own directory.
# ../hurd-pkg/ contains required packages that have been collected from
# non-standard sources.
cp -pl /b5/debian/hurd-pkg/*.deb \
$MIRROR/dists/sid/local/binary-hurd-i386/
cd $MIRROR
# The following section creates Packages, Packages.gz etc.
dpkg-scanpackages dists/sid/local/binary-hurd-i386 \
$MIRROR/indices/override.sid.main.gz \
>>dists/sid/local/binary-hurd-i386/Packages
cp dists/sid/local/binary-hurd-i386/Packages \
dists/sid/local/binary-hurd-i386/packages
gzip dists/sid/local/binary-hurd-i386/Packages
cp dists/sid/local/binary-hurd-i386/packages \
dists/sid/local/binary-hurd-i386/Packages
bzip2 dists/sid/local/binary-hurd-i386/Packages
mv dists/sid/local/binary-hurd-i386/packages \
dists/sid/local/binary-hurd-i386/Packages
# This may be needed
chown -R philipc:philipc $MIRROR/dists/sid/local/
****************************
We now have a suitable mirror to work with.
The next step is to identify the packages that should be
included in the tarball.
The major constraints are,
1. When the tarball is installed it must produce a useful system
2. It must not include packages with dependency problems.
3. It should not grow too large.
As the Hurd is under developement this stage can be labour intensive.
A suitable cache for the hurd archive needs to be created with apt-cache.
Several options need to be specified to ensure that the host system's
apt-cache is not destroyed and that the hurd's cache is quite separate.
CONF.sh does this. The Hurd cache is found in ../sid-hurd-i386
A list of all the packages in the Hurd archive is created in ../pkgs
apt-cache.sh does the work.
******************
# Conf.sh for the utilities
# apt-cache.sh was inspired by apt-selection which is found in debian-cd.
# These trivial utilities are Copyright Philip Charles
<philipc@debian.org>.
# Released under the GPL.
# This sets up an enviroment in which the Hurd archive can be examined and
# manipulated.
# These need to be set up for your own needs.
# Configuring for building the local fs
export CODENAME=sid
export ARCH=hurd-i386
export APTTMP=`pwd`
# To your main mirror
export MIRROR=/b5/debian/mirror/debian
export MAIN="main contrib"
# Where the local mirror will go
export LMIRROR=/b5/debian/mirror/debian
export LOCAL="local"
# This sets up the apt options for the Hurd apt-cache.
AA=" -q -o Dir::State::status=$APTTMP/$CODENAME-$ARCH/status "
BB=" -o Dir::State=$APTTMP/$CODENAME-$ARCH/apt-state/ "
CC=" -o Dir::Cache=$APTTMP/$CODENAME-$ARCH/apt-cache/ "
DD=" -o Dir::Etc=$APTTMP/$CODENAME-$ARCH/apt/ "
EE=" -o APT::Cache::AllVersions=0 "
FF=" -o APT::Architecture=$ARCH "
export options="$AA $BB $CC $DD $EE $FF"
******************
There are a number of trivial scripts, e.g. Info, which can
use apt-cache to examine the Hurd archive in much the same way
that apt-cache examines the host system's archive.
"Key-list" is a manually created list of packages which should
be in the tarball.
"TarBall-list.sh" checks each package in Key-list for dependencies.
These dependencies are added to key-list and saved as stage1.
This process is repeated two more times.
The final task of TarBall-list.sh is to remove the unwanted packages
from the list.
*******************
cat ./exclude.list | while read LINE; do grep -v $LINE yy \
>zz ; rm yy ; mv zz yy ; done
mv yy packages.list
rm xx
******************
The Hurd is in development. So some packages will cause problems if
they are included in the tarball. These are nomally discovered by
trial and error. exclude.list lists these packages.
The tarball build takes place in ../K15, so we cd to this directory.
build.sh creates the file system on the Hurd partition and mounts it
on /gnu
It then calls files-get.sh which creates copies all the tarball packages
into
../files as symlinks. file-list is an intermediate stage.
A number of duplicated packages usually are copied into ../files.
exclude-list
(another file of the same name) removes these duplicates. This list is
built
up by close inspection of the process and trial and error.
build.sh then calls cross-install. This is a modified version of Marcus
Brinkmans script.
It will unpack (not install) the packages from ../files into the /gnu
partition.
Linux cannot create the translators used by the Hurd so the packages
cannot be
installed at this stage. Finally dpkg-hurd and native-install are copied
into
/gnu.
If cross-install tries to download a package, something has gone wrong.
coss-install will exit with "dpkg did return unusual messages, please
investigate"
ignore. Other error messages are important.
Finally build.sh calls tarup.sh. This creates gnu-*.tar.gz and
baseGNU.tgz. A
slightly modified native-install is used for baseGNU.tgz
----------------------------------------------------------------------------------------------------------
On Sat, Apr 26, 2008 at 2:39 PM, Shakthi Kannan <shakshurd@gmail.com> wrote:
> Hi,
>
> I have downloaded tarball-scripts.tgz [1] provided by Philip Charles.
> I would like a step-by-step HOWTO on running the scripts, so I can
> create Debian GNU Hurd .iso images. I have an x86 PC which I can use
> to build.
>
> Appreciate any feedback. Thanks!
>
> SK
>
> [1] http://www.mail-archive.com/debian-hurd@lists.debian.org/msg19002.html
>
> --
> Shakthi Kannan
> http://www.shakthimaan.com
>
>
> --
> To UNSUBSCRIBE, email to debian-hurd-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
Reply to: