Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on Hurd (the old ones; I'm trying to clean them up)
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/hurd-old.e>
#           or at <http://angg.twu.net/e/hurd-old.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.hurd-install-easy»	(to "hurd-install-easy")
# «.mke2fs»		(to "mke2fs")
# «.tarball»		(to "tarball")
# «.updating_hurd_debs»	(to "updating_hurd_debs")
# «.dpkg-cross»		(to "dpkg-cross")
# «.gnumach_from_linux»	(to "gnumach_from_linux")
# «.help-hurd»		(to "help-hurd")
# «.debian-hurd»	(to "debian-hurd")
# «.edrx_hurd»		(to "edrx_hurd")
# «.colortext»		(to "colortext")
# «.gnumach_cvs»	(to "gnumach_cvs")
# «.hurd_logo_mf»	(to "hurd_logo_mf")
# «.cross-install_localrep»	(to "cross-install_localrep")
# «.fsmunoz-template»	(to "fsmunoz-template")
# «.oskit-mach»		(to "oskit-mach")
# «.keymap»		(to "keymap")
# «.ioctls»		(to "ioctls")
# «.emptyhurd_newdpkg»	(to "emptyhurd_newdpkg")
# «.emptyhurd_apt.conf»	(to "emptyhurd_apt.conf")
# «.emptyhurd_newapt»	(to "emptyhurd_newapt")

# «.sparse_super»	(to "sparse_super")



# (find-deblistsw3 "debian-hurd-0008/msg00229.html")

# To do, urgently: adapt my use of the cross-install script to let it
# use the local mirror of dists/sid; learn to use apt-move and let
# cross-install fetch the missing packages from a remote place.

# (find-es "apache" "apt-http-local")
# (to "cross-install_localrep")



#####
#
# "The easy guide to installing Hurd on a Linux box"
# 2000jul01
#
#####

# «hurd-install-easy»  (to ".hurd-install-easy")
# (find-shttpw3 "www.pick.ucam.org/~mcv21/hurd.html")
# (find-shttpw3 "www.gnu.org/software/hurd/easy.html")

# Convert easy.html to a txt that we can link to more easily:
lynx $S/http/www.gnu.org/software/hurd/easy.html -dump > ~/tmp/hurd-easy.txt

# Or execute this...
lynx $S/http/www.gnu.org/software/hurd/easy.html

# (find-fline "~/tmp/hurd-easy.txt")
# (find-fline "~/tmp/hurd-easy.txt" "the packages you need")
# (find-fline "~/tmp/hurd-easy.txt" "chmod +x cross-install")
# (find-fline "~/tmp/hurd-easy.txt" "untar the tarball")

#*
# «mke2fs»  (to ".mke2fs")
# Format a partition with "-o hurd".
# (find-fline "~/tmp/hurd-easy.txt" "mke2fs -o")

# I'm using /dev/hda2 as my Hurd partition.
# Beware: currently Hurd can only use partitions with less that 1GB.
# (find-fline "/etc/fstab" "/gnu")
# /dev/hda2	/gnu		ext2	defaults			0 2

# Prepare to clean it...
umount /gnu

# If it doesn't have bad blocks (i.e., if "dumpe2fs -b" outputs
# nothing) then it should be safe to omit the "-c" in mke2fs.
dumpe2fs -b /dev/hda2

# Now sparse_super is the default... (to "sparse_super")
# mke2fs -c -O sparse_super -o hurd /dev/hda2
mke2fs -O sparse_super -o hurd /dev/hda2
mount /gnu

#*
# «tarball»  (to ".tarball")
# (find-fline "~/tmp/hurd-easy.txt" "Untar the tarball")
# anonftp ftp://alpha.gnu.org/gnu/hurd/contrib/marcus/

tar -xvzf $S/ftp/alpha.gnu.org/gnu/hurd/contrib/marcus/gnu-20010308.tar.gz \
  -C /gnu
# (find-fline "/gnu/dev/")

#*





# Prepare to install the base packages.
# The list of packages in the version of the easy guide that I have is
# slightly wrong; this one is fixed, as it was taken from the
# "cross-install" script itself.

# (find-fline "~/tmp/hurd-easy.txt" "the packages you need")
# (find-fline "$S/http/www.debian.org/ports/hurd/extra-files/")
# (find-fline "$S/http/www.debian.org/ports/hurd/extra-files/cross-install" "plist=")

# Detect which packages are missing and which have many versions
# (find-fline "$SDEBIAN/dists/sid/main/binary-hurd-i386/")

plist=(adduser ae base-files base-passwd bash
       bsdutils debconf libterm-stool-perl libterm-slang-perl
       debianutils diff dpkg-ftp
       dpkg-mountable dpkg e2fsprogs
       fileutils findutils gettext-base gnumach
       grep grub gzip hostname hurd
       inetutils libc0.2 libgdbmg1 libncurses5
       libnet-perl libreadline4
       libstdc++2.10
       libwrap0 mawk ncurses-base ncurses-bin
       passwd libdb2 perl-base perl perl-modules sed
       shellutils slang1 syslogd tar tcpd
       textutils libncurses4
       less ed)

# For repeated packages the "echo" in the loop below will give two or
# more package names in the same line; for the missing packages we
# should get some sort of globbing error from the shell.

cd $SDEBIAN/dists/sid/main/binary-hurd-i386/
for i in $plist; do
  echo */${i}_*
done
#*




# To get the missing packages do something like this:

# cd $SDEBIAN/dists/sid/main/binary-hurd-i386/
# anonftp $FDEBIAN/dists/sid/main/binary-hurd-i386/ \
#   'mget base/dpkg-ftp_*'	\
#   'mget base/libwrap0_*'	\
#   ...

# Here I'm using my "anonftp" script, but it should be trivial to
# change that to something more standard; wget's manpage says that it
# can deal with "*"s in file names, but I have never tried that...

# (find-fline "~/EXPECT/anonftp")
#*



# Note that in this block we need the variable "plist" defined above.

rm -Rv /tmp/hurd-easy/
mkdir  /tmp/hurd-easy/
# cd $SDEBIAN/dists/sid/main/binary-hurd-i386/
# for i in $plist; do
#   cp -v ${i}_* /tmp/hurd-easy/
# done
#
for i in $(cat ~/tmp/hurd-debs); do
  cp -v $S/ftp/$i /tmp/hurd-easy/
done

mkdir /tmp/hurd-easy/partial/
# cp -v $SSIDMB/Packages.gz /tmp/hurd-easy/partial/

cd /tmp/hurd-easy/
dpkg-scanpackages . /dev/null > partial/Packages
gzip -c6 < partial/Packages > partial/Packages.gz


cd $S/http/www.debian.org/ports/hurd/extra-files/
for i in cross-install native-install dpkg-hurd; do
  cp -v $i /tmp/hurd-easy/$i
  chmod +x /tmp/hurd-easy/$i
done

patch -p0 cross-install <<'%%%'
142c142
<        dpkg-mountable dpkg e2fsprogs
---
>        apt dpkg e2fsprogs
%%%


# (find-fline "~/tmp/hurd-easy.txt" "chmod +x cross-install")
# (find-fline "/tmp/hurd-easy/cross-install" "# CONFIGURATION")

# umount /dev/hda2
mount  /dev/hda2 /hda2

cd /tmp/hurd-easy/
./cross-install  /gnu		|& tee ~/tmp/ohurd-easy
#*
cp -v /tmp/hurd-easy/install.log ~/tmp/ohurd-easy.install.log

# (find-fline "/tmp/hurd-easy/")
# (find-fline "/tmp/hurd-easy/cross-install")
# (find-fline "/tmp/hurd-easy/cross-install" "Installing necessary packages")
# (find-fline "/tmp/hurd-easy/cross-install" "cross_install() {")

# (find-fline "~/tmp/ohurd-easy")
# (find-fline "~/tmp/ohurd-easy.install.log")
# (find-fline "/tmp/hurd-easy/cross-install" "Installing necessary packages,")

# Note that ~/tmp/ohurd-easy.install.log will now contains a series of
# dpkg-hurd errors and warnings that the cross-install script will
# ignore if they match a certain regexp:
# (find-fline "/tmp/hurd-easy/cross-install" "Installing necessary packages,")
# (find-fline "/tmp/hurd-easy/cross-install" "errors=`grep -v 'trying to")
#*
sort ~/tmp/ohurd-easy.install.log
#*


# (find-fline "~/tmp/hurd-easy.txt" "single-user")
# (find-fline "~/tmp/hurd-easy.txt" "./native-install")
# (find-fline "/gnu/native-install")
# (find-fline "/gnu/")

# I haven't tested the stuff below for a while. I gave up running the
# MAKEDEVs because I couldn't mount my usual Linux home partition from
# the Hurd (because it's >1GB, it seems), and if it's just a matter of
# remembering to do a "./native-install" after the first boot then I
# can do it without auxiliary scripts. I'll test this again when I
# have moved my /home to another partition.

cat > /gnu/tmp1.sh <<'---'
# source me after running native-install!
set -v
#./native-install
export TERM=mach
cd /dev
ls > /tmp/olsdev
./MAKEDEV hd0
./MAKEDEV hd0s1 hd0s2 hd0s3  hd0s5 hd0s6
./MAKEDEV hd2
./MAKEDEV hd2s1 hd2s2        hd2s5 hd2s6
./MAKEDEV hd3
./MAKEDEV hd3s1 hd3s2        hd3s5 hd3s6     hd3s8
./MAKEDEV fd0
ls -lAF
cd /
# (find-fline "~/tmp/hurd-easy.txt" "settrans /linux")
mkdir /hdd8
#settrans /hdd8 /hurd/ext2fs /dev/hd3s8
# Didn't work because /dev/hdd8 was too large (>1GB)...
# /sbin/reboot
set +v
---
#*



# Now we have to install Grub to boot the Hurd.
# But I moved my Grub notes to another file...
# (find-es "grub" "grub")

# Problems: kbleds and shift in the first boot; the translator I
# called to handle the linux partition complained about bad partition
# sizes (mm, it was the 1GB problem).





#####
#
# Adding more packages to make the Hurd usable
# 2000sep08
#
#####

# «updating_hurd_debs»  (to ".updating_hurd_debs")
# Note that the difficult part here is to install new .debs on the
# Hurd from Linux without resorting to updating the "oplist" variable
# in the "cross-install" script and reinstalling everything again...
# If this works then it will become slightly easier to cross-compile
# .debs in Linux and install them on the Hurd.

# Note also that the following message from Igor Khavkine gives a
# script to download with wget the missing files:
# (find-deblistsw3 "debian-hurd-0007/msg00151.html")

# Oops - it seems that the usual install scripts are able to do that
# also, but I haven't used this feature (33.6KBPS modem -> can't take
# many risks).

# (find-node "(wget)FTP Options" "`--retr-symlinks'")

# I'm still using an "anonftp"-based solution for that; see above.
#cd $SSIDMB
#anonftp $FSIDMB \
#  'mget devel/libncurses5-dev_*' \
#  'mget text/texinfo_*' \
#  'mget text/texi2html_*' \
#  quit

# (find-angg ".zshrc" "hurd")
# (find-fline "/tmp/hurd-easy/cross-install" "${dpkghurd} --unpack")
#*
(
cd $SSIDMB
dpkgihurd \
  utils/bsdmainutils_* \
  editors/emacsen-common_* \
  editors/emacs20_* \

cd $SSIDMB
dpkgihurd \
  doc/info_* \
  doc/pinfo_* \

cd $SSIDMB
dpkgihurd \
  libs/libdb2_* \
  text/groff_* \
  doc/man-db_* \
  doc/manpages_* \

cd $SSIDMB
dpkgihurd \
  misc/screen_* \

cd $SSIDMB
dpkgihurd \
  interpreters/cpp_* \
  devel/binutils_* \
  devel/gcc_* \

cd $SSIDMB
dpkgihurd \
  utils/file_* \
  utils/patch_* \
  devel/bison_* \
  devel/make_* \

cd $SSIDMB
dpkgihurd \
  interpreters/m4_* \
  devel/autoconf_* \
  devel/automake_* \

cd $SSIDMB
dpkgihurd \
  devel/debhelper_* \
  utils/cpio_* \

cd $SSIDMB
dpkgihurd \
  utils/sharutils_* \
  libs/libbz2_* \
  utils/bzip2_* \
  devel/dpkg-awk_* \

cd $SSIDMB
dpkgihurd \
  devel/libstdc++2.9-dev_* \
  devel/g++_* \

cd $SSIDMB
dpkgihurd \
  devel/gnumach-dev_* \
  devel/hurd-dev_* \
  devel/libc0.2-dev_* \
  devel/mig_* \
  devel/dpkg-hurd-dev_* \
  devel/libstdc++2.9-dev_* \

cd $SSIDMB
dpkgihurd \
  devel/gdb_* \

cd $SSIDMB
dpkgihurd \
  devel/libncurses5-dev_* \
  text/texinfo_* \
  text/texi2html_* \


) |& tee ~/o
#
# The messages that don't get filtered off by the grep below are errors.
# (find-fline "/tmp/hurd-easy/cross-install" "errors=`grep -v 'trying to")
#
grep -v 'trying to overwrite\|but is unpacked but not configured\|Preparing to replace\|Unpacking\|pre-dependency problem\|Selecting previously deselected package\|pre-depends on\|overriding problem because --force enabled\|(Reading database ...\| package architecture (hurd-i386) does not match system\|is not installed.\|but has never been configured.\|dpkg-deb: building package' ~/o

#*

# (find-gvldifile "")
# (find-gstatus "")
# (find-status "make")
# (find-angg ".zshrc" "hurd")
# (find-fline "/gnu/dpkg-hurd")
# (find-fline "/gnu/")

#*







#####
#
# Downloading new versions of Hurd .debs
# 2000aug10
#
#####

# I know that there are some more standard ways to do that, but I
# haven't learned them yet, and the trick of storing lists as Python
# code is very neat... note: even with the nice trick this is VERY
# messy and depends on other misterious tricks that I use (ls-lR.i).
# You have been warned.

# (find-es "debian-net" "ls-lR.i")
# (find-fline "$SDEBIAN/ls-lR.i.hurd")
#*

(echo 'updict = {'
 grep binary-hurd-i386 $SDEBIAN/ls-lR.i.hurd \
   | perl -nle 'm:^[ 0-9]+[^ ]+hurd-i386/([^ ]+)(| ->.*)$: && print $1' \
   | perl -nle 'm:^([^_]+)_(.+)$: && print "  \"$1\": \"$2\","'
 echo '}'
) > /tmp/updict.py

(echo 'heredict = {'
 cd $SSIDMB
 find * -type f | sort \
   | perl -nle 'm:^([^_]+)_(.+)$: && print "  \"$1\": \"$2\","'
 echo '}'
) > /tmp/heredict.py

python -c '
execfile("/tmp/heredict.py")
execfile("/tmp/updict.py")
for pkgname in heredict.keys():
  upv = updict[pkgname]
  herev = heredict[pkgname]
  if upv != herev:
    print pkgname, herev, upv
' | sort \
  | tee /tmp/hurd-changes

# Then we do something with /tmp/hurd-changes, possibly by awking it,
# then editing the result and then sh'ing or eev'ing it.

awk '{ print $1 "_" $3 }' < /tmp/hurd-changes

#*





#####
#
# The web-hurd mailing list
# 2000sep15
#
#####

echo subscribe | sendemail -s 'subscribe' \
  web-hurd-request@gnu.org
echo 'confirm 767836' | sendemail \
  web-hurd-request@gnu.org

# (find-shttpw3 "mail.gnu.org/pipermail/web-hurd/")
# (find-shttpw3 "mail.gnu.org/pipermail/web-hurd/2000-September.txt")
# (find-shttpw3 "mail.gnu.org/pipermail/web-hurd/2000-August.txt")
# (find-shttpw3 "mail.gnu.org/pipermail/web-hurd/1998-June.txt")

#*
cd $S/http/mail.gnu.org/pipermail/web-hurd/
cat 1998-June.txt \
    2000-August.txt \
    2000-September.txt \
  > /tmp/w-h.txt

mutt -R -f /tmp/w-h.txt
#*





#####
#
# dpkg-cross
# 2000jun17
#
#####

# «dpkg-cross»  (to ".dpkg-cross")
# (find-status "dpkg-cross")
# (find-vldifile "dpkg-cross.list")
# (find-fline "/usr/doc/dpkg-cross/")
# (code-c-d "dcrossdoc" "/usr/doc/dpkg-cross/")

# (find-dcrossdocfile "README.Debian.gz" "Hurd")
# (find-dcrossdocfile "README.Debian.gz" "dpkg-buildpackage -ahurd-i386")
# (find-fline "/etc/dpkg/cross-compile" "crossroot-hurd-i386 = /gnu")

# (find-vldifile "dpkg-cross.preinst" "dpkg-divert")
# (find-vldifile "dpkg-cross.postinst")
# (find-vldifile "dpkg-cross.prerm")
# (find-vldifile "dpkg-cross.postrm" "dpkg-divert")

# (find-fline "/usr/bin/dpkg-cross")
# (find-fline "/usr/bin/dpkg-shlibdeps")
# (find-fline "/usr/bin/dpkg-cross-convert")
# (find-dcrossdocfile "")
# (find-dcrossdocfile "changelog.gz")
# (find-dcrossdocfile "copyright")
# (find-dcrossdocfile "README.Debian.gz")
# (find-dcrossdocfile "README.Debian.gz" "dpkg-divert")

# (find-dcrossdocfile "README.Debian.gz" "Ok, to summarize:")
# (find-dcrossdocfile "README.Debian.gz" "2) dpkg-cross")
# (find-dcrossdocfile "README.Debian.gz" "3) dpkg-buildpackage")

# (find-fline "/usr/bin/dpkg-buildpackage")
# (find-fline "/usr/bin/dpkg-buildpackage.orig")

# (eeman "1 dpkg-cross")
# (eeman "1 dpkg-cross-convert")

# (eeman "5 cross-compile")
# (find-fline "/etc/dpkg/")
# (find-fline "/etc/dpkg/cross-compile" "crossroot-hurd-i386 = /gnu")

# ?




#####
#
# gnumach: recompiling from Linux
# 2000nov02
#
#####

# «gnumach_from_linux»  (to ".gnumach_from_linux")
# (find-fline "~/00nov04.popmail" "gnumach_1.2-5.diff.gz")
# (find-deblistsw3 "debian-hurd-0009/msg00168.html")
# (find-deblistsw3 "debian-hurd-0011/msg00286.html")
# (find-deblistsw3 "debian-hurd-0011/msg00288.html")
# (find-gnumachfile "debian/rules")
# (find-gnumachfile "om")
#*

rm -Rv /usr/src/gnumach-1.2/
# pdsc $SDEBIAN/dists/woody/main/source/base/gnumach_1.2-7.dsc
cd /usr/src/
dpkg-source -sn -x $SDEBIAN/dists/woody/main/source/base/gnumach_1.2-7.dsc
cd /usr/src/gnumach-1.2/

MIG=i386-gnu-mig CC=i386-gnu-gcc \
  ./configure --enable-floppy --enable-ide --enable-ne2000 \
    i386-pc-gnu --prefix=/gnu \
  |& tee oc

make |& tee om

mkdir -p debian/tmp
(pfx=`cd debian/tmp && pwd` \
  && make install-kernel prefix=$pfx \
) |& tee om2

strip --strip-all	debian/tmp/boot/gnumach
gzip -9fq		debian/tmp/boot/gnumach

cp -v oc  ~/tmp/gnumach-oc
cp -v om  ~/tmp/gnumach-om
cp -v om2 ~/tmp/gnumach-om2

#*
# Copy it to a grubbable place.
# (find-es "grub" "menu.lst")
mount /hda1 -o remount,rw
cp -v /usr/src/gnumach-1.2/debian/tmp/boot/gnumach.gz \
  /hda1/boot/grub/gnumach-edrx.gz

#*

# Ok, this works, but here I'm running "configure" and "make" by hand.
# How can I make "debian/rules" do that for me, and generate a
# package? Would dpkg-buildpackage work for that? The naive way of
# running it, below, breaks in the "./configure" stage; maybe there's
# some parameter missing.

# (find-gnumachfile "debian/")
# (find-gnumachfile "debian/rules")

#*
rm -Rv /usr/src/gnumach-1.2/
cd /usr/src/
dpkg-source -sn -x $SDEBIAN/dists/woody/main/source/base/gnumach_1.2-7.dsc
cd /usr/src/gnumach-1.2/
dpkg-buildpackage -ahurd-i386	|& tee odbp

cp -v odbp ~/tmp/gnumach-odbp
#*

# (find-fline "~/tmp/gnumach-odbp")
# (find-fline "~/tmp/gnumach-odbp" "`hurd-i386-unknown' not recognized")

# (find-fline "~/tmp/gnumach-oc")
# (find-fline "~/tmp/gnumach-om")
# (find-fline "~/tmp/gnumach-om2")

# (code-c-d "gnumach" "/usr/src/gnumach-1.2/")
# (find-gnumachfile "")
# (find-gnumachfile "debian/")
# (find-gnumachfile "NEWS")
# (find-gnumachfile "README")
# (find-gnumachfile "i386/")
# (find-gnumachfile "i386/README-Drivers")




dpkg-architecture -ahurd-i386
#*
pdsc $SDEBIAN/dists/woody/main/source/base/hurd_20001030.dsc
cd /usr/src/hurd-20001030/
DEB_BUILD_ARCH=i386		\
  DEB_BUILD_GNU_CPU=i386	\
  DEB_BUILD_GNU_SYSTEM=linux	\
  DEB_BUILD_GNU_TYPE=i386-linux	\
  DEB_HOST_ARCH=hurd-i386	\
  DEB_HOST_GNU_CPU=i386		\
  DEB_HOST_GNU_SYSTEM=gnu	\
  DEB_HOST_GNU_TYPE=i386-gnu	\
  debian/rules binary	|& tee odrb
#*

dpkg-buildpackage -ahurd-i386 will set them for you.





#####
#
# the hurd: recompiling from Linux
# 2000sep15
#
#####

#*
pdsc $SDEBIAN/dists/woody/main/source/base/hurd_20001030.dsc
cd /usr/src/hurd-20001030/
dpkg-buildpackage -ahurd-i386	|& tee odb
#*

# Oops, not so easy...

# (find-hurdfile "")
# (find-hurdfile "INSTALL")
# (find-hurdfile "INSTALL-cross")
# (find-hurdfile "debian/")
# (find-hurdfile "debian/rules")


# This is just a quick way to test architecture names:

# (eeman "dpkg-buildpackage" "-aarchitecture")
# (find-fline "/usr/bin/dpkg-buildpackage")
# (find-fline "/usr/bin/dpkg-architecture" "hurd")

#*
pdsc $SDEBIAN/dists/woody/main/source/x11/bdfresize_1.4-1.dsc
cd /usr/src/bdfresize-1.4/
dpkg-buildpackage -ahurd-i386
#*




#####
#
# The Hurd: kernel
# 2000may25
#
#####

# (find-fline "$SDEBIAN/ls-lR.i" "potato/main/source/base/hurd_")
# (find-fline "$SDEBIAN/ls-lR.i" "woody/main/source/base/hurd_")
# (code-c-d "hurd" "/usr/src/hurd-20000726/")
# (code-c-d "gnumach" "/usr/src/gnumach-1.2/")
# (code-c-d "grub" "/usr/src/grub-0.5.93.1/")

#*
# pdsc $SDEBIAN/dists/woody/main/source/base/hurd_20000130.dsc
# cd /usr/src/hurd-20000130/

pdsc $SDEBIAN/dists/woody/main/source/base/hurd_20000726.dsc
cd /usr/src/hurd-20000726/

DEB_BUILD_GNU_TYPE=i386-pc-linux-gnu \
  DEB_HOST_GNU_TYPE=i386-gnu \
    debian/rules binary |& tee odrb2

#*

# (find-hurdfile "odrb2")
# (find-hurdfile "pfinet/linux-inet/ip.c")
# (find-hurdfile "pfinet/linux-inet/ip.c" 523)
# (find-hurdfile "pfinet/linux-inet/ip.c" 532)
# (find-hurdfile "pfinet/linux-inet/ip.c" 542)

# Seems that "dpkg-buildpackage -ahurd-i386" should work, but it
# doesn't...

# (find-hurdfile "doc/")
# (find-hurdfile "doc/navigating")
# (find-hurdfile "doc/hurd.texi" "libtrivfs")

# (find-gvldifile "")
# (find-gstatus "libc0.2")
# (find-fline "/gnu/usr/info/" "hurd.info")

# (find-vldifile "m4.postinst")
# (find-fline "/usr/sbin/install-info")
# (eeman "8 install-info")




#####
#
# Installing the Hurd docs on Linux
# 2000jul29
#
#####

# (find-gvldifile "hurd.postinst" "install-info")

rm -v /usr/info/hurd.info*

cd /gnu/usr/info/
cp -v hurd.info*.gz /usr/info/
install-info --quiet --section "Hurd" "The Hurd" /usr/info/hurd.info.gz

#*
# Or:
# (find-hurdfile "doc/")
# (find-hurdfile "doc/Makefile")
# (find-node "(make)Quick Reference" "`$(@D)'")
# (find-hurdfile "doc/Makefile" "stamp-version")
# (find-hurdfile "Makeconf" "hurd-version")

cd /usr/src/hurd-20000726/doc/
rm -v hurd.info*
echo '@set VERSION 0.2' > version.texi
echo '@set VERSION 0.2' > version.texi.new
makeinfo hurd.texi
gzip hurd.info*
rm -v /usr/info/hurd.info*
cp -v hurd.info* /usr/info/

#*

# (find-hurdfile "odrb2")


# (find-hurdnode "Top" "Server Bootstrap\n")
# (find-hurdnode "Recursive Bootstrap" "`reboot'")
# (find-hurdnode "Trivfs Library")

#*


echo | sendemail -s 'subscribe edrx@inx.com.br' \
  help-hurd-request@prep.ai.mit.edu




#####
#
# The help-hurd list
# 2000jul27
#
#####

# «help-hurd»  (to ".help-hurd")
# (find-hurdfile "INSTALL" "help-hurd-request@prep.ai.mit.edu")
# (code-c-d "gnulists" "$S/http/ftp-mailing-list-archives.gnu.org/")
# (find-gnulistsfile "mailing-lists/help-hurd/")

mkdir /tmp/help-hurd/
cp -iv $S/http/ftp-mailing-list-archives.gnu.org/mailing-lists/help-hurd/* \
  /tmp/help-hurd/
cd /tmp/help-hurd/
gzip -dv *.gz

# Then we can run grep and mutt on the resulting files...





#####
#
#
#
#####

# (find-hurdfile "doc/navigating")




http://john-edwin-tobey.org/Hurd/
lynx http://john-edwin-tobey.org/Hurd/



# (find-hurdfile "")
# (find-hurdfile "odrb")
# (find-hurdfile "debian/rules")
# (find-hurdfile "debian/rules" "configure --build=")
# (find-hurdfile "debian/rules" "DEB_BUILD_GNU_TYPE")



pdsc $SDEBIAN/dists/potato/main/source/base/gnumach_1.2-2.dsc
pdsc $SDEBIAN/dists/potato/main/source/base/grub_0.5.93.1.dsc

# (find-hurdfile "")
# (find-gnumachfile "")
# (find-grubfile "")






# (find-fline "$SDEBIAN/indices/Packages-Master-hurd-i386")
# (find-fline "$SDEBIAN/ls-lR.i0")

cd $SDEBIAN/indices/
grep-dctrl -F Description -i hurd Packages-Master-hurd-i386




#####
#
# old notes about grub
# 2000jul01
#
#####

# The rest of this block is obsolete.
# I haven't been able to configure freebsd's rootdev,
# it always complains about not finding what it wants in "wd0s1`".

cat > $EEG <<'---'
debug
cat (hd2,2,a)/.cshrc
cat (hd2,a)/COPYRIGHT
testload (hd2,a)/kernel
testload (hd1,a)/kernel
testload (hd3,a)/kernel
testload (hd0,0)/boot/grub/freebsdkernel
quit
---
eeg grub
#*

# Not evident from the documentation: "install" takes the file like
# menu.lst from the current filesystem? And where does it put it?

# (eeman "8 grub")
# (find-node "(grub)Top")
# (find-node "(grub)Automated install" "install (hd0,1)/boot/grub/stage1")
# (find-node "(grub)Installation under UNIX" "/sbin/grub --batch")
# (find-fline "/usr/share/doc/grub/menu.lst")
# (find-node "(grub)Commands")
# (find-node "(grub)Commands" "`root DEVICE [HDBIAS]'")
# (find-node "(grub)Commands" "`install ")
# (find-node "(grub)Device syntax")
# (find-node "(grub)Filename syntax")

# (find-es "bsd" "bsd_partitions")
# (find-fline "/hdd9/")
# Partition check:
#  hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
#  hdc: hdc1 hdc2 hdc3 hdc4 < hdc5 hdc6 >
#  hdd: hdd1 hdd2 hdd3! hdd4 < hdd5 hdd6 hdd7 hdd8 > < hdd9 hdd10 hdd11 hdd12 >
# (find-fline "/usr/share/doc/grub/menu.lst" "# For booting FreeBSD")

#*
cat > $EEG <<'---'
root (hd0,0)
help install
testload (hd0,0)/boot/grub/vmlinuz
# kernel (hd0,0)/boot/grub/vmlinuz root=/dev/hdd8 vga=1
install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst
quit
---
eeg grub
#*

# (find-node "(multiboot)Top")

# (find-node "(grub)Top")
# (find-node "(grub)Boot floppy")
# (find-node "(grub)Automated install")





#####
#
# debian-hurd@lists.debian.org
# 2000jul02
#
#####

# «debian-hurd»  (to ".debian-hurd")

# (find-shttpw3 "www.debian.org/MailingLists/subscribe" "REQUEST@")
echo -n | sendemail -s 'subscribe' \
  debian-hurd-REQUEST@lists.debian.org
sleep 20
fetchmail

# (find-fline "$MAIL")
# (find-fline "$MAIL" "CONFIRM s070222374727926")
echo -n | sendemail -s 'CONFIRM s110409042430705' \
  debian-hurd-request@lists.debian.org
sleep 20
fetchmail




#####
#
# mig
# 2000jul20
#
#####

# (find-status "mig-i386-gnu")
# (find-vldifile "mig-i386-gnu.list")
# (find-fline "/usr/doc/mig-i386-gnu/")

# (find-fline "/usr/bin/i386-gnu-mig")
# (find-fline "/usr/i386-gnu/")
# (find-fline "/usr/i386-gnu/bin/mig")

# (find-status "gcc-i386-gnu")
# (find-vldifile "gcc-i386-gnu.list")
# (find-vldifile "" "gcc-i386-gnu.list")
# (find-fline "/usr/doc/gcc-i386-gnu/")
# (find-fline "/usr/lib/gcc-lib/")
# (find-fline "/usr/lib/gcc-lib/i386-gnu/2.95.2/")

# (find-fline "$SDEBIAN/ls-lR.i" "make-cross")





#####
#
# colortext-0.3
# 2000jul27
#
#####

# «colortext»  (to ".colortext")
# (code-c-d "ct" "/gnu/usr/src/colortext-0.3/")
#*
rm -Rv /gnu/usr/src/colortext-0.3/
cd /gnu/usr/src/
tar -xvzf $S/http/stekt.oulu.fi/~tosi/gnu/colortext-0.3.tar.gz
cd /gnu/usr/src/colortext-0.3/
#*
# (find-ctfile "")
# (find-ctfile "README")




#####
#
# Copying my home stuff to my Hurd
# 2001may19
#
#####

# «edrx_hurd»  (to ".edrx_hurd")
# (find-es "escripts" "copy_of_edrxs_home")
#*
rm -Rv /gnu/root/.*
rm -Rv /gnu/root/*
#*
makeLedrxtgz
cp -v ~/TH/L/edrx.tgz /gnu/root/
cd /gnu/root/
tar -xvzf edrx.tgz
#*




#####
#
# procfs
#
#####

#*
rm -Rv /gnu/usr/src/procfs/
cd     /gnu/usr/src/
tar -xvzf $S/ftp/walfield.org/pub/people/neal/hurd/procfs/procfs-03022000.tar.gz
cd     /gnu/usr/src/procfs/

#*

"Luckily, gdb can be attached to the Hurd servers, and so you can
easily debug them."




#####
#
# gnumach from the cvs
# 2000nov27
#
#####

# «gnumach_cvs»  (to ".gnumach_cvs")
#*
# On twu:
rm -Rv ~/tmp/gnumach/
mkdir  ~/tmp/gnumach/
cd     ~/tmp/gnumach/
# Password: [enter]
cvs -d :pserver:anoncvs@subversions.gnu.org:/cvs login
cvs -d :pserver:anoncvs@subversions.gnu.org:/cvs checkout gnumach
tar -cvzf ~/tmp/gnumach-cvs.tgz *
laf       ~/tmp/gnumach-cvs.tgz
#
rm -R ~/tmp/gnumach/
#*
# On angg.popolvuh:
cd ~/tmp
anonftp angg.twu.net 'cd ~/tmp/' 'get gnumach-cvs.tgz'
module=gnumach

#*




#####
#
# the hurd logo in metafont format
# 2000dec12
#
#####

# «hurd_logo_mf»  (to ".hurd_logo_mf")
# (find-fline "$S/http/www.gnu.org/graphics/hurd.mf")
# (find-es "tex" "docs")
# About the \font command:
xdvi +445 $SCTAN/systems/knuth/tex/texbook.dvi &

#*
cd /tmp/
rm -v hurd*
cp -v $S/http/www.gnu.org/graphics/hurd.mf .
patch -p0 hurd.mf <<'%%%'
3c3
< mode=localfont;
---
> %mode=localfont;
%%%
cat > hurdlogo.tex <<'---'
\font\hurdfont=hurd at 400pt
\font\hurdfontbig=hurd at 1600pt
{\par \hurdfontbig \#}
\hurdfont
\par GNU
\par HURD
\bye
---
tex hurdlogo.tex
#xdvi hurdlogo.dvi &
rexdvi hurdlogo.dvi &
#*





Suggestions for a FAQ:

Explain how to shut down

Point to minimal installation instructions

Tell more about the keyboard problem on the first installation

VTs, colorterm, basic course on "screen"

How to debug a second Hurd on top of a running Hurd











# (find-fline "$SPOTATO/main/source/devel/" "mig")

# (code-c-d "mig" "/usr/src/mig-1.1/")
# (find-migfile "")
pdsc $SDEBIAN/dists/woody/main/source/devel/mig_1.1-1.dsc
cd /usr/src/mig-1.1/

pdsc $SDEBIAN/dists/potato/main/source/devel/mig_1.0.2-1.dsc
pdsc $SDEBIAN/dists/potato/main/source/devel/mig-i386-gnu_1.0-2.dsc

anonftp ftp://ftp.debian.org/debian/ \
  'mget dists/sid/main/binary-hurd-i386/editors/emacs20_*' \
  'quit'

cd $SDEBIAN/dists/sid/main/binary-hurd-i386/editors/
wget ftp://nautilus/tmp/dists/sid/main/binary-hurd-i386/editors/emacs20_20.3-5.deb
inx-down

# (find-status "emacs20")


# (find-node "(/hdc5/info/hurd)Top")

# (find-fline "$S/http/www.debian.org/ports/hurd/extra-files/")
# (find-shttpw3 "www.gnu.org/software/hurd/easy.html" "chmod +x cross-install")
# (find-shttpw3 "www.gnu.org/software/hurd/easy.html" "shadowconfig off")

# (find-shttpw3 "hurddocs.sourceforge.net/howto/development.html")
# (find-shttpw3 "duff.kuicr.kyoto-u.ac.jp/~okuji/")
# (find-shttpw3 "f77.nop.or.jp/")
# (find-shttpw3 "f77.nop.or.jp/doc/XFree86-3.3.3.1.html")
# (find-shttpw3 "kt.linuxcare.com/KC/debian-hurd/")
# (find-shttpw3 "members.xoom.com/_XMCM/mseaborn/comp/wishlist.html")
# (find-shttpw3 "www.debian.org/Lists-Archives/debian-hurd-0006/threads.html")
# (find-shttpw3 "www.debian.org/ports/hurd/hurd-doc")
# (find-shttpw3 "www.debian.org/ports/hurd/hurd-install")
# (find-shttpw3 "www.gnu.org/software/hurd/")
# (find-shttpw3 "www.gnu.org/software/hurd/easy.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-1.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-2.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-3.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-4.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-5.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-6.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq-7.html")
# (find-shttpw3 "www.gnu.org/software/hurd/faq/faq.html")
# (find-shttpw3 "www.gnu.org/software/hurd/hurd-paper.html")
# (find-shttpw3 "www.memo.cx/gnuhurdguide/")
# (find-shttpw3 "www.memo.cx/gnuhurdguide/hguide1.html")
# (find-shttpw3 "www.pick.ucam.org/~mcv21/hurd.html")
# (find-shttpw3 "www.serv.net/~sand/hurd/console.html")
# (find-shttpw3 "www.serv.net/~sand/hurd/e2fsck.html")
# (find-shttpw3 "www.serv.net/~sand/hurd/install.html")







#####
#
# messy notes about testing cross-install with a local deb repository
# 2000dec17
#
#####

# «cross-install_localrep»  (to ".cross-install_localrep")
# Examples (from kov?):
# ./cross_install --download ftp.debian.org /hurd
# ./cross-install --download http://127.0.0.1/ /hurd

# Warning: this block is not working well.

rm -Rv /tmp/hurd-easy/
mkdir  /tmp/hurd-easy/
cd $SDEBIAN/dists/sid/main/binary-hurd-i386/
for i in $plist; do
  cp -v ${i}_* /tmp/hurd-easy/
done


#*
# (find-es "apt" "rebuilding-the-Packages-file")
cd $SDEBIAN/
(dpkg-scanpackages dists/sid/main/binary-hurd-i386 /dev/null \
  > dists/sid/main/binary-hurd-i386/Packages
) |& tee ~/o
cd $SDEBIAN/dists/sid/main/binary-hurd-i386/
gzip -c9 < Packages > Packages.gz

#*

rm -Rv /tmp/hurd-easy/
mkdir  /tmp/hurd-easy/

rm -Rv /tmp/gnu/
mkdir  /tmp/gnu/
mkdir  /tmp/gnu/lost+found/

cd $S/http/www.debian.org/ports/hurd/extra-files/
for i in cross-install native-install dpkg-hurd; do
  cp -v $i /tmp/hurd-easy/$i
  chmod +x /tmp/hurd-easy/$i
done

# (find-fline "~/tmp/hurd-easy.txt" "chmod +x cross-install")
# (find-fline "/tmp/hurd-easy/cross-install" "# CONFIGURATION")
# (find-fline "/tmp/hurd-easy/cross-install" "wget")

cd /tmp/hurd-easy/

./cross-install --download http://127.0.0.1/debian/ /tmp/gnu \
  |& tee ~/tmp/ohurd-easy

#*

cp -v /tmp/hurd-easy/install.log ~/tmp/ohurd-easy.install.log

#*
# (find-fline "/tmp/hurd-easy/partial/Packages.gz")
zcat /tmp/hurd-easy/partial/Packages.gz | awk -vp=libreadline4 '
	BEGIN { print p }
        $0 ~ "^Package:" { package = $2 }
        $0 ~ "^Filename:" && p == package { print $2 }'

#*

cd $SSIDMB
anonftp $FSIDMB \
  'mget base/libreadline4_*' \
  quit

lynx http://127.0.0.1/debian/dists/sid/main/binary-hurd-i386/

psne http://www.debian.org/ports/hurd/extra-files/cross-install





#####
#
# Making a template from fsmunoz's page
# 2000dec22
#
#####

# «fsmunoz-template»  (to ".fsmunoz-template")
# (find-angg "TH/Htmllib.tcl" "templates")

# (find-shttpfile "fsmunoz.freeshell.org/hurd/")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/index.html")
# (find-shttpw3   "fsmunoz.freeshell.org/hurd/index.html")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/index.t.html")
# (find-shttpw3   "fsmunoz.freeshell.org/hurd/index.t.html")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/index.th.html")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/Makefile")

# (find-angg "TH/Generate")
# (find-angg "TH/Htmllib.tcl" "templates")
# (find-angg "TH/Htmllib.tcl")

#*
cp $S/http/fsmunoz.freeshell.org/hurd/index.t.html /tmp/tmpl.html
expect ~/TH/Generate /tmp/o '
  # debug 1
  process_template [readfile /tmp/tmpl.html]
  puts [GRAYBAR Hello world]
'
#*

# (find-shttpfile "fsmunoz.freeshell.org/hurd/index.th.html")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/index.t.html")
# (find-shttpfile "fsmunoz.freeshell.org/hurd/Makefile")

cd $S/http/fsmunoz.freeshell.org/hurd/
make



#*
# (find-fline "$S/http/www.debian.org/ports/hurd/extra-files/cross-install" "plist=")

A=(adduser ae base-files base-passwd bash bsdutils debianutils diff
dpkg-ftp dpkg-mountable dpkg e2fsprogs fileutils findutils
gettext-base gnumach grep grub gzip hostname hurd inetutils libc0.2
libgdbmg1 libncurses5 libnet-perl libreadline4 libstdc++2.9
libstdc++2.10 libwrap0 mawk ncurses-base ncurses-bin passwd libdb2
perl-5.005-base perl-base sed shellutils slang1 syslogd tar tcpd
textutils perl-5.005 libncurses4 less ed)

cd $SDEBIAN/
egrep "/($(echo $A | tr '+ ' '.|'))_" ls-lR.i.hurd \
  | nolinks \
  | tee ~/o

#*

function dl () {
  if [[ ! -e $SDEBIAN/$1 ]]; then echo $1; fi
}

set +v

dl dists/sid/main/binary-hurd-i386/base/ae_962-26.deb
dl dists/sid/main/binary-hurd-i386/base/base-passwd_3.2.0.deb
dl dists/sid/main/binary-hurd-i386/base/bash_2.04-9.deb
dl dists/sid/main/binary-hurd-i386/base/bsdutils_4.4.1.1.deb
dl dists/sid/main/binary-hurd-i386/base/dpkg-mountable_0.8.deb
dl dists/sid/main/binary-hurd-i386/base/dpkg_1.7.2.0.deb
dl dists/sid/main/binary-hurd-i386/base/e2fsprogs_1.19-1.deb
dl dists/sid/main/binary-hurd-i386/base/findutils_4.1-40.0.deb
dl dists/sid/main/binary-hurd-i386/base/grep_2.4.2-1.deb
dl dists/sid/main/binary-hurd-i386/base/grub_0.5.95.deb
dl dists/sid/main/binary-hurd-i386/base/gzip_1.2.4-33.deb
dl dists/sid/main/binary-hurd-i386/base/hostname_2.07.deb
dl dists/sid/main/binary-hurd-i386/base/libc0.2_2.2-3.deb
dl dists/sid/main/binary-hurd-i386/base/libncurses5_5.0-7.deb
dl dists/sid/main/binary-hurd-i386/base/libstdc++2.10_2.95.2-18.deb
dl dists/sid/main/binary-hurd-i386/base/libstdc++2.9_2.91.66-1.2.deb
dl dists/sid/main/binary-hurd-i386/base/libwrap0_7.6-5.deb
dl dists/sid/main/binary-hurd-i386/base/mawk_1.3.3-5.deb
dl dists/sid/main/binary-hurd-i386/base/ncurses-bin_5.0-7.deb
dl dists/sid/main/binary-hurd-i386/base/perl-5.005-base_5.005.03-7.1.deb
dl dists/sid/main/binary-hurd-i386/base/sed_3.02-6.deb
dl dists/sid/main/binary-hurd-i386/base/slang1_1.4.1-1.deb
dl dists/sid/main/binary-hurd-i386/base/syslogd_1.3.2-9.deb
dl dists/sid/main/binary-hurd-i386/base/tar_1.13.17-2.deb
dl dists/sid/main/binary-hurd-i386/base/tcpd_7.6-5.deb
dl dists/sid/main/binary-hurd-i386/base/textutils_2.0-3.deb
dl dists/sid/main/binary-hurd-i386/editors/ed_0.2-18.deb
dl dists/sid/main/binary-hurd-i386/interpreters/perl-5.005_5.005.03-7.1.deb
dl dists/sid/main/binary-hurd-i386/libs/libdb2_2.7.7-2.2.deb
dl dists/sid/main/binary-hurd-i386/net/inetutils_1.3.2-9.deb
dl dists/sid/main/binary-hurd-i386/oldlibs/libncurses4_4.2-3.4.deb
dl dists/sid/main/binary-hurd-i386/text/less_358-1.deb

#*

cd $SDEBIAN/
mv -v dists/sid/main/binary-hurd-i386/base/base-passwd* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/bash* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/dpkg* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/findutils* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/libc0.2* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/libncurses5* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/libstdc++2.10* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/libwrap0* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/ncurses-bin* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/base/tcpd* ~/tmp/oldhurd/
mv -v dists/sid/main/binary-hurd-i386/libs/libdb2* ~/tmp/oldhurd/


psnedebfrom $FDEBIAN_MAIN <<'---'
dists/sid/main/binary-hurd-i386/base/base-passwd_3.2.0.deb
dists/sid/main/binary-hurd-i386/base/bash_2.04-9.deb
dists/sid/main/binary-hurd-i386/base/dpkg_1.7.2.0.deb
dists/sid/main/binary-hurd-i386/base/findutils_4.1-40.0.deb
dists/sid/main/binary-hurd-i386/base/libc0.2_2.2-3.deb
dists/sid/main/binary-hurd-i386/base/libncurses5_5.0-7.deb
dists/sid/main/binary-hurd-i386/base/libstdc++2.10_2.95.2-18.deb
dists/sid/main/binary-hurd-i386/base/libwrap0_7.6-5.deb
dists/sid/main/binary-hurd-i386/base/ncurses-bin_5.0-7.deb
dists/sid/main/binary-hurd-i386/base/tcpd_7.6-5.deb
dists/sid/main/binary-hurd-i386/libs/libdb2_2.7.7-2.2.deb
---




#####
#
# oskit-mach
# 2001may09
#
#####

# «oskit-mach»  (to ".oskit-mach")
# (find-es "oskit" "oskit-200102")

# (find-deblistsw3 "debian-hurd-0103/msg00408.html")
# (find-deblistsw3 "debian-hurd-0104/msg00033.html")
# (find-deblistsw3 "debian-hurd-0104/msg00049.html")

mkdir ~/mach/
cd    ~/mach/
export CVSROOT=:pserver:anoncvs@subversions.gnu.org:/cvs
# hit enter when you are asked for a password
cvs login
cvs -z3 checkout gnumach
cvs co -d oskit-mach -r oskit-branch gnumach

# (eeman "1 cvs" "-d CVS_root_directory")
# (eeman "1 cvs" "-z compression-level")
# (eeman "1 cvs" "-r")
# (find-fline "~/tmp/" "oskit")

#*
rm -Rv /usr/src/gnumach/
rm -Rv /usr/src/oskit-mach/
cd /usr/src/
tar -xvzf ~/tmp/oskit-mach.tgz

#*
# (find-gnumachfile "")
# (find-oskmachfile "")





#####
#
# keymap
# 2001may19
#
#####

# «keymap»  (to ".keymap")
# (find-fline "$S/ftp/alpha.gnu.org/gnu/hurd/contrib/marcus/keymap.tar.gz")
#*
rm -Rv /usr/src/keymap-hurd/
mkdir  /usr/src/keymap-hurd/
cd     /usr/src/keymap-hurd/
tar -xvzf $S/ftp/alpha.gnu.org/gnu/hurd/contrib/marcus/keymap.tar.gz

#*
# (code-c-d "keymaphurd" "/usr/src/keymap-hurd/")
# (find-keymaphurdfile "")
# (find-keymaphurdfile "set_key.c")
# (find-gnumachfile "i386/i386at/kd.h")
# (find-gnumachfile "i386/i386at/")
# (find-gnumachfile "")





#####
#
# ioctls and RPC calls
# 2001may19
#
#####

# «ioctls»  (to ".ioctls")
#*
# (find-es "anatocc" "glibc-src")
cd /usr/src/glibc-2.1.3/glibc-2.1.3/
grep ioctl .files
for i in $(grep ioctl .files); do
  echo "# (find-glibcfile \"$i\")"
done | tee ~/o

#*
# (find-glibcfile "hurd/hurd/ioctl.h")
# (find-glibcfile "hurd/hurdioctl.c")
# (find-glibcfile "sysdeps/mach/hurd/bits/ioctls.h")
# (find-glibcfile "sysdeps/mach/hurd/ioctl.c")

# (find-glibcfile "include/sys/ioctl.h")
# (find-glibcfile "misc/sys/ioctl.h")
# (find-glibcfile "sysdeps/generic/bits/ioctl-types.h")
# (find-glibcfile "sysdeps/generic/bits/ioctls.h")
# (find-glibcfile "sysdeps/generic/ioctl.c")
# (find-glibcfile "sysdeps/unix/bsd/bsd4.4/bits/ioctls.h")
# (find-glibcfile "sysdeps/unix/ioctls-tmpl.c")
# (find-glibcfile "sysdeps/unix/ioctls.awk")
# (find-glibcfile "sysdeps/unix/snarf-ioctls")
# (find-glibcfile "sysdeps/unix/sysv/linux/alpha/bits/ioctls.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/bits/ioctl-types.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/bits/ioctls.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/powerpc/ioctl.c")
# (find-glibcfile "sysdeps/unix/sysv/linux/scsi/scsi_ioctl.h")
# (find-glibcfile "sysdeps/unix/sysv/linux/sparc/bits/ioctls.h")

#*
# (find-node "(hurd)Ports Library")

<marcus> edrx: That's really a convoluted beast, and not what you
         should look at first, but for the curious:
         sysdepds/mach/hurd/ioctl.c, ioctls.h and ioctl-types.h, as
         well as hurd/hurdioctl.c

<marcus> Basically, there is a standard encoding of a ioctl in a 32
         bit int.

<marcus> The encoding tells ioctl(), which message number and in/out
         parameter exist.

<marcus> functions that don't fit into this standard encoding (too
         many parameters, violation of ioctl() protocol) are
         overridden in hurd/hurdioctl.c

<marcus> ioctl() parses the ioctl number and composes a Mach msg from
         it.





#####
#
# chroot emptyhurd: using another apt.conf
# 2001aug15
#
#####

# «emptyhurd_apt.conf»  (to ".emptyhurd_apt.conf")
# (find-angg ".zshrc" "hurd")
# (find-angg "LUA/emptydeb.lua" "e-scripts")
#*
# Download the Packages files.
psne $FSIDMB/Packages.gz
mv -iv Packages.gz.1 Packages.gz
zcat Packages.gz > Packages; touch -r Packages.gz Packages

psne $FALPHASIDMB/Packages.gz
mv -iv Packages.gz.1 Packages.gz
zcat Packages.gz > Packages; touch -r Packages.gz Packages



#*
# Prepare a fake environment in /tmp/EH/ where apt will think that
# there are no packages (except for libc6, that will have to be hacked
# in by force); the architecture for apt will be set to hurd-i386 and
# sources.list will point to the "main" hurd section of ftp.debian.org
# and to the alpha.gnu.org repository.

# (find-man "5 apt.conf")
# (find-man "8 apt-get" "--config-file")
# (find-fline "/usr/doc/apt/examples/configure-index.gz" "  Architecture")
# (find-fline "/usr/doc/apt/examples/configure-index.gz" "// Directory layout")

rm -Rv /tmp/EH/
mkdir  /tmp/EH/
cd     /tmp/EH/ && (
# Start of the "cd /tmp/EH/ &&" block

mkdir -p etc/apt/
cat > etc/apt/sources.list <<'---'
deb file:/snarf/ftp/ftp.debian.org/debian sid main
deb file:/snarf/ftp/alpha.gnu.org/pub/gnu/hurd/debian unstable main
---
cat > etc/apt/apt.conf <<'---'
APT::Architecture        "hurd-i386";
Dir::State               "/tmp/EH/var/state/apt/";
Dir::State::status       "/tmp/EH/var/lib/dpkg/status";
Dir::Cache               "/tmp/EH/var/cache/apt/";
Dir::Etc                 "/tmp/EH/etc/apt/";
Dir::Etc::sourcelist     "/tmp/EH/etc/apt/sources.list";
Dir::Etc::main           "/tmp/EH/etc/apt/apt.conf";
---

mkdir -p var/cache/apt/archives/partial/
mkdir -p var/lib/dpkg/
( cd     var/lib/dpkg/ 
  mkdir -p alternatives info updates methods/{mnt,disk,floppy}
  echo -e "Package: libc6\nStatus: install ok installed\nVersion: 9:9\n" \
    > status
  touch available
)

mkdir -p var/state/apt/lists/partial/
# End of the "cd /tmp/EH/ &&" block
)

#*
rm -Rv /tmp/EH/var/lib/dpkg/
cd /gnu/
cp -aPv var/lib/dpkg/ /tmp/EH/


#*
# Run apt-get on the new environment and tell it to install the base
# packages and a few extras; but make it just print the URIs and do
# nothing concrete. We will use the list of URIs that it will spit out
# to generate a list of URLs of .debs to download.
#
# Note: I'm using a recent apt-get because potato's version of apt-get
# insists on using /etc/apt/source.list.
#
# (to "emptyhurd_newapt")

alias APT-GET="LD_LIBRARY_PATH=/usr/src/apt-0.5.3/build/bin: \
  /usr/src/apt-0.5.3/build/bin/apt-get -c /tmp/EH/etc/apt/apt.conf"

APT-GET update
APT-GET --print-uris --download-only -y install \
  base-files base-passwd bash bsdutils debianutils diff dpkg e2fsprogs \
  fileutils findutils grep gzip hostname hurd ncurses-base ncurses-bin \
  perl-base sed shellutils tar textutils \
  \
  dpkg-dev build-essential screen emacs20 expect tcl8.3 zsh30 \
  | tee ~/o

#*
# Process the output of "APT-GET --print-uris" to get a sequence of
# download commands.
#
cat ~/o | grep "^'" | awk '{print $1}' | cut -b18- | tr -d "'" | tee ~/o2
cat ~/o2 | awk '{printf "psne ftp://%s -c\n", $1}' | tee ~/o3
sed 's,ftp://ftp.debian.org/debian,$FDEBIAN_SF,g' < ~/o3 | tee ~/o4

cp ~/o2 ~/tmp/hurd-debs

#*
# (find-fline "~/o2")
# (find-fline "~/tmp/hurd-debs")
# (find-fline "~/o3")
# (find-fline "~/o4")

rm -Rv /tmp/hurd-easy/
mkdir  /tmp/hurd-easy/
for i in $(cat ~/tmp/hurd-debs); do
  cp -v $S/ftp/$i /tmp/hurd-easy/
done

#*









#####
#
# chroot emptyhurd: trying to use the newest versions of dpkg and apt
# 2001aug07
#
#####

# (code-c-d "dpkg" "/usr/src/dpkg-1.9.16/")
# (code-c-d "apt" "/usr/src/apt-0.5.3/")
# (find-dpkgfile "")
# (find-dpkgfile "debian/")
# (find-dpkgfile "debian/control")
# (find-aptfile "")
# (find-aptfile "debian/control")

#*
# «emptyhurd_newdpkg»  (to ".emptyhurd_newdpkg")
pdsc $SDEBIAN/pool/main/d/dpkg/dpkg_1.9.16.dsc
debian/rules binary	|& tee odrb

#*
# «emptyhurd_newapt»  (to ".emptyhurd_newapt")
pdsc $SDEBIAN/pool/main/a/apt/apt_0.5.3.dsc
cd /usr/src/apt-0.5.3/
  find * | sort > .files
  egrep '\.(c|cc|h)$' .files > .files.ch
  etags $(<.files.ch)
debian/rules binary	|& tee odrb

#*
cd /usr/src/
ls *apt*deb
ls *dpkg*deb

#*




#####
#
# sparse_super
# 2001oct15
#
#####

# «sparse_super»  (to ".sparse_super")

# A mail in the debian-hurd list says to use "-O sparse_super" to
# avoid a certain bug (but that "mke2fs -o hurd" should be using "-O
# sparse_super" by default, and it seems that newer versions will have
# that fixed)

#*
pdsc $SDEBIAN/pool/main/e/e2fsprogs/e2fsprogs_1.18-3.dsc
cd /usr/src/e2fsprogs-1.18/
#*
# (code-c-d "e2fsp" "/usr/src/e2fsprogs-1.18/")
# (find-e2fspfile "RELEASE-NOTES" "sparse_superblock features enabled by")






#  Local Variables:
#  coding:               utf-8-unix
#  End: