Subject: How to join (updated)

From: Juergen Menden <[email-masked]>
Date: Mon, 8 Jul 1996 10:44:22 +0200 (MET DST)

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

Version: 1.0
Date: Tue Jul  2 16:02:14 MET DST 1996
Author: Juergen Menden <[email-masked]>

======================================================================

0. Changes:

Tue Jul  2 16:02:14 MET DST 1996
   * submit bugs to [email-masked] so that the people
     on debian-devel don't get upset
   * provide a correct /usr/info/dir file (with no entries)

Tue Jun 18 14:32:32 MET DST 1996
   * many, many, many. I hope this is now more readable and more
     informative.

======================================================================

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. get the file 

  project/experimental/dpkg-<version>.m68k.nondebbin.tar.gz

from your debian mirror 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 --force-depends dpkg-<version>.deb

======================================================================

3. What if that doesn't work?

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

On the other hand, if dpkg says 

  [...]
  Setting up dpkg ...
  install-info: failed to lock dir for editing! No such file or directory
  dpkg: error processing dpkg (--install):
   subprocess post-installation script returned error exit status 2
  Errors were encountered while processing:
   dpkg

you miss the file /usr/info/dir. In that case, take this
one (which is in general a very good idea, so move your 
local info files in /usr/local/info and use this empty dir
file)

======================================================================

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

Why this? The debian.rules file is a makefile with

   #!/usr/bin/make -f

in the first line. so 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.control >debian-tmp/DEBIAN/control

to

   sed -e '2s/=V/$(version)/' -e '3s/=A/$(arch)/' ... \
     debian.control >debian-tmp/DEBIAN/control

(provided that the Architecture field is in line 3 of the control
file).

Generally speeking, 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.

======================================================================

6. During build dpkg complains that a Section/Priority field is
   missing!

Ignore this warning. this is a bug of your dpkg. upgrade!

======================================================================

7. 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").

======================================================================

8. 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 by the upload processing
script to send an ack or an error log back to you.

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

Footnote: you can call the .changes file by any name you like, as 
long as it ends with .changes. This is just a convention to avoid
conflicts. 

======================================================================

9. dchanges doesn't add files section!

You use dchanges-3.3. Patch /usr/bin/dchanges with the following diff:

----------------------------------------------------------------------
--- 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" ]
----------------------------------------------------------------------

======================================================================

10. 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 give you one. Uploads should go
to

   /pub/Debian/ftp/private/project/Incoming 

on master. This directory will be processed by a script, so a correct
.changes file is important

======================================================================

11. What files should be uploaded?

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

======================================================================

12. 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_ _must_ be

   Package: <source package name>
   Version: <version>-<debian revision>

eg:

   Package: hello
   Version: 1.2.3-4

only if that doesn't work, resubmit the report to 

   [email-masked]

See also doc/bug-reporting.txt on the ftp server.

======================================================================

13. Where do i get more information?

Generally it's good to read the files in doc/* on the ftp
server. Esp. in the doc/package-developer/ subdirectory. Also there
exist some mailing lists: First of all 

   [email-masked]

which is the home list of the m68k port. To subscribe, send a mail
with the word "subscribe" in the subject line to
[email-masked].

   [email-masked] 

is the general developers list of debian. As most bug reports and any
upload notices are forwarded to this list, there is really much
traffic. If you want to subscribe send mail to Bruce Perens
<[email-masked]>.

======================================================================

jjm

-- 
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!