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

Re: How do I use the source package disributions?



Martin Schulze <joey@carelia.infodrom.north.de> writes:

> On Thu, Dec 25, 1997 at 08:30:05PM -0500, Stan Brown wrote:
> > 	Sounds liek a stupid question I know. First the reason. I am trying to
> > 	get amanda to work on my debian box. I am still on bo and there is no
> > 	.deb binary, so I think simple i'll just grab the hamm source stuff.
> > 
> > 	I found the .orig file and a .diff file. I thought I could just untar
> > 	the .orig, and then pun pathch < from the .diff file. But this results
> > 	in lot's of files in the directory I am working dorm, and not in the
> > 	appropriate subdirectories.
> > 
> > 	What am I doing wrong?
> 
> Please read the file source-unpack.txt which is put in the doc directory
> of our ftp server.  It tells you to use either dpkg-source and shows
> you the appropriate set of commands you have to enter if you're unpacking
> the source manually.
> 
> 
> You have to use "patch -p0" and create the debian subdirectory
> before applying the patch.
> 
> Regards
> 
> 	Joey
> 

I've rebuilt hamm packages for my bo (libc5) system several times.
Here's the general procedure:

First, I basically use dpkg-source, but the bo dpkg-source can't quite
handle hamm source packages; it's a bit annoying, but here's how I fix 
it.  Let's say I want to compile the package foobar, version 1.2-3.

ftp the files foobar_1.2-3.dsc, foobar_1.2-3.diff.gz and
foobar_1.2-3.tar.gz into (this is just my convention so that I can
find the files later) /usr/local/src/build/foobar

Then, I need to munge the .orig.tar.gz file a bit so that bo's
dpkg-source can deal with it.

#(as root)
cd /usr/local/src/build/foobar
chown martind.martind . *

#(as martind)
cd /usr/local/src/build/foobar
tar -xzf foobar_1.2-3.orig.tar.gz
rm foobar_1.2-3.tar.gz
mv foobar-1.2 foobar-1.2.orig   # This is the change between hamm and bo
tar -cf foobar_1.2-3.orig.tar foobar-1.2.orig
gzip foobar_1.2-3.orig.tar
ls -l foobar_1.2-3.orig.tar.gz
md5sum foobar_1.2-3.orig.tar.gz

I then go and edit the foobar_1.2-3.dsc file and down where it gives
the size and md5 checksum for foobar_1.2-3.orig.tar.gz, I replace it
with the size and md5 checksum given by the last two commands.  Then,
I do:
dpkg-source -x foobar_1.2-3.dsc

This creates the directory /usr/local/src/build/foobar/foobar-1.2 -
then, I can go ahead with the build process as for bo packages:
cd foobar-1.2
#(edit the file debian/rules if I need to make any changes -
# reconfigure things the way I want, etc.)
debian/rules configure
debian/rules build
#(then su to root - the earlier commands were done as unpriviledged martind)
debian/rules binary
cd ..
dpkg -i foobar_1.2-3.deb

This is reconstructed from memory, but I think it's resonably accurate.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: