Subject: How to join the project

From: Juergen Menden <[email-masked]>
Date: Fri, 14 Jun 1996 16:51:10 +0200 (MET DST)

the following is a quick hack, as i'm tired of always telling
the same. comments, suggestions, bugs, flames and gummib"archen
(what's that in english?) to me. :-))

ciao
jjm

---------------------------------------------------------
First Steps in Building Debian Linux Packages for m68k-linux

1. where to find the debian stuff?

primary site is ftp.debian.org:/debian, nevertheless you
should use one of the mirrors, eg:
  ftp.tower.net.au       /pub/linux/debian               (Australia)
  ftp.inf.tu-dresden.de  /pub/os/linux/debian            (Germany)
  ftp.caldera.com        /pub/mirrors/debian             (Utah)
  tsx-11.mit.edu         /pub/linux/distributions/debian (Massachusetts)
(see there the file README.mirrors for a lot more)

the sources can be found in unstable/sources, 
binary distributions are in unstable/binary-m68k

2. how to start with debian

first you need dpkg. find a file 
  dpkg-<version>.m68k.nondebbin.tar.gz
and install it by untarring it from the
root directory.

after that you can (and must) use dpkg 
to install dpkg again. get 
   base/dpkg-<version>.deb
from the binary directory on the ftp archive 
and type
   dpkg -i dpkg-<version>.deb

3. what if that doesn't work?

you probably have installed the watchtower
filesys. the getty on that filesys is broken.
replace it. FIXME: where to get a replacement?

4. how to build a binary package

First you have to get the debian source file
from the sources archive. for nearly every
package there is a .tar.gz file containing
the sources, patched for debian needs, and
a diff file with the changes of the package
relative to the original upstream version.

If you untar a debian source archive, you
will find some 
   debian.*
files in it. to build a binary package just
type:
   ./debian.rules build
and then as root:
   ./debian.rules binary
the debian.rules file is a makefile with
   #!/usr/bin/make -f
in the first line. alternatively you can
also type
   make -f debian.rules build
and then as root
   make -f debian.rules binary

5. during build dpkg complains that an 
Architecture field is missing

you will need to add one. ;-)
eg: add somewhere to the debian.control a line
   Architecture: =A
and to the debian.rules (somewhere at the top)
   arch=$(shell dpkg --print-architecture)
now change a line (at the binary target) from
   sed -e '2s/=V/$(version)/' ... \
     debian.changes >debian-tmp/DEBIAN/control
to
   sed -e '2s/=V/$(version)/' -e '3s/=A/$(arch)/' ... \
     debian.changes >debian-tmp/DEBIAN/control
(provided that the Architecture field is in line 3
of the control file). 

generally, when you change the sources try to adapt
your changes to the style you find as close as possible.
this will make it easier to get the source maintainer
to include your patch to the next release.

5. during build dpkg complains that a
Section/Priority field is missing

ignore this warning. this is a bug the source
maintainer is surely also aware of, and on the
other hand it doesn't hurt by now.

4. how to name the package file

well, many packages follow different naming conventions.
simply use the dpkg-name prog from the latest dpkg package
to rename the .deb file. see man dpkg-name

5. how to prepare a package for uploading?

at first rename the binary packages with dpkg-name.

then run 
   dchanges -p *.deb
to build a *.changes file. you have to edit the
Maintainer field to place your name and e-mail
address there, rather than that of the source
maintainer. this field is only used to send an
ack or an error log from the upload processing
back to you.

now rename the *.changes file to *.m68k.changes

6. dchanges doesn't add files section

you use dchanges-3.3. patch /usr/bin/dchanges with
----------------------------------------------------------------------
--- dchanges.~1~	Sat May  4 08:01:18 1996
+++ dchanges	Sat Jun  8 21:35:12 1996
@@ -217,7 +217,7 @@
   fi
 
   # output files
-  if [ -n "${TAR_FILE}${DIFF_FILE}${UNK_FILES}" ]
+  if [ -n "${TAR_FILE}${DIFF_FILE}${UNK_FILES}${DEB_FILES}" ]
   then
     # figure out section
     if [ -z "$SECTION" ]
----------------------------------------------------------------------

7. where to upload files?

you need an account on master.debian.org to upload 
your files. ask 
  Simon Shapiro <[email-masked]>
(maintainer of master.debian.org) to install one.

at the moment no uploads should take place. we
have a backlog of 2 1/2 months which must be 
processed first. there will be a notice when
uploading can be continued.

generally uploads should go to 
   /pub/Debian/ftp/private/project/Incoming
which will be processed by a script (currently tested)
or to
  /pub/Debian/ftp/private/m68k/Incoming
where it will be processed by hand.

9. what files should be uploaded?

only the *.m68k.deb and *.m68k.changes files

10. where to do the patches i needed to build

if you had to change the source package you should 
send the diffs you made as bug report to
   [email-masked]
the first 2 lines of the _body_ should be
   Package: <package name>
   Version: <version>-<debian revision>
eg:
   Package: hello
   Version: 1.2.3-4
see also: doc/bug-reporting.txt on the ftp server

-- 
Juergen Menden                   | Disclaimer: The opinions expressed by me, 
tel:    +49 (89) 289 - 22387     +-----------+ are (usually) not the opinions 
e-mail: [email-masked]     | of anyone else on this planet.

Hi! I'm a .signature virus!  Add me to your .signature and join in the fun!