[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to join (updated)

    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 <menden@informatik.tu-muenchen.de>


0. Changes:

Tue Jul  2 16:02:14 MET DST 1996
   * submit bugs to maintonly@bugs.debian.org 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


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 


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


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:

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

begin 644 dir
M<W1A<G0@;V9F"FQO;VMI;F<@870@=&AA="!N;V1E+"!W:&EC:"!I<R H9&ER
M9B!T:&4@24Y&3R!T<F5E"B @5&AI<R H=&AE($1I<F5C=&]R>2!N;V1E*2!G
M:79E<R!A(&UE;G4@;V8@;6%J;W(@=&]P:6-S+B @5'EP:6YG(")D(@H@(')E
M='5R;G,@:&5R92P@(G$B(&5X:71S+" B/R(@;&ES=',@86QL($E.1D\@8V]M
M;6%N9',L(")H(B @9VEV97,@80H@('!R:6UE<B!F;W(@9FER<W0M=&EM97)S
M+" B;51E>&EN9F\\4F5T=7)N/B(@=FES:71S(%1E>&EN9F\@=&]P:6,L"B @
M971C+@H@($]R(&-L:6-K(&UO=7-E(&)U='1O;B R(&]N(&$@;65N=2!I=&5M
M(&]R(&-R;W-S(')E9F5R96YC92!T;R!S96QE8W0*("!I="X*(" M+2T@4$Q%
M86QL+6EN9F\G+B @4&QE87-E(')E9F5R('1O(&EN<W1A;&PM:6YF;R@X*2!F


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


   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

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


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

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


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 @@
   # output files
-  if [ -n "${TAR_FILE}${DIFF_FILE}${UNK_FILES}" ]
+  if [ -n "${TAR_FILE}${DIFF_FILE}${UNK_FILES}${DEB_FILES}" ]
     # 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 <Shimon@i-Connect.net> 

(maintainer of master.debian.org) to give you one. Uploads should go


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


the first 2 lines of the _body_ _must_ be

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


   Package: hello
   Version: 1.2.3-4

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


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 


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


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



Juergen Menden                   | Disclaimer: The opinions expressed by me, 
tel:    +49 (89) 289 - 22387     +-----------+ are (usually) not the opinions 
e-mail: menden@informatik.tu-muenchen.de     | of anyone else on this planet.

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

Reply to: