How do I compile mercurial 1.5.2 on debian?

0

I downloaded the files for Mercurial 1.5.2 from http://packages.debian.org/sid/mercurial (mercurial_1.5.2-1.debian.tar.gz, mercurial_1.5.2-1.dsc and mercurial_1.5.2.orig.tar.gz). How do I get a .deb package out of these? I tried to follow the instructions at http://www.debian.org/doc/maint-guide/ch-build.en.html but they don't work.

I tried to unpack the two archives and run dpkg-buildpackage or debian/rules build but that fails with:

dh --with quilt clean
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/user/packages/mercurial-deb'
cp -a mercurial/__version__.py mercurial/__version__.py.save
cp: cannot stat `mercurial/__version__.py': No such file or directory
make[1]: *** [override_dh_auto_clean] Error 1
make[1]: Leaving directory `/home/user/packages/mercurial-deb'
make: *** [clean] Error 2

That's because the directory mercurial is inside mercurial_1.5.2/. Why doesn't the build script cd into the right place? If I try ../debian/rules build, I get

dh --with quilt build
dh: cannot read debian/control: No such file or directory

sigh

How do I compile a package for debian???

Aaron Digulla

Posted 2010-05-21T08:58:51.147

Reputation: 6 035

Should be on SO? – Fake Name – 2010-05-21T09:01:25.557

This isn't about programming but "how do I use software". But it's a grey area, I agree. – Aaron Digulla – 2010-05-21T09:30:55.670

Answers

1

Why would you want to recompile it? Well whatever.
First, grab them with: dget -u --insecure http://ftp.de.debian.org/debian/pool/main/m/mercurial/mercurial_1.5.2-1.dsc

Then run those commands. This will pack them into a deb like in the archive.

(I would just add a sid.list into my /etc/apt/sources.list.d/ and use apt-pinning since it grabs every needed dependencies, etc etc. You should check apt-pinning out if you just want a newer version.)

Apache

Posted 2010-05-21T08:58:51.147

Reputation: 14 755

Thanks, that works. My reason is that I have a patch which I need and I really don't want to pollute my system with unknown packages at this time, so no "sid" for me (whatever that might be - it's my first contact with debian). – Aaron Digulla – 2010-05-21T10:31:48.893

0

You need to get the mercurial_1.5.2-1.debian.tar.gz file as well. Extract this into the right place and you should be good to go.

The orig file is the source code that the Debian people have got hold of. The debian file contains the changes they have made to the package, including all the information on how the .deb file needs to be built.

Neal

Posted 2010-05-21T08:58:51.147

Reputation: 8 447

The "right place" was what I was missing. I unpacked the debian directory along with the orig sources instead of inside of it. – Aaron Digulla – 2010-05-21T11:16:43.793