My first (real) debian repo

Up to now, whenever I've needed a backport or debian recompile, I've done it locally. But finally last night, instead of studying for this morning's exam, I decided to do it properly.

The tool for producing a debian archive tree is reprepro. There are a few howtos out there for it, but none of them quite covered everything I needed. So this is mine. But we'll get to that later, first we need to have some packages to put up.

For building packages, I decided to do it properly and use pbuilder. Just install it:

# aptitude install pbuilder cdebootstrap devscripts

Make the following changes to /etc/pbuilderrc:

MIRRORSITE=http://ftp.uk.debian.org/debian
DEBEMAIL="Your Name <you@example.com>"

The first, to point to your local mirror, and the second to credit you in the packages.

Then, as root:

# pbuilder create --distribution etch --debootstrapopts --variant=buildd

Now, we can build a package, lets build the hello package:

$ mkdir /tmp/packaging; cd /tmp/packaging
$ gpg --recv-key 3EF23CD6
$ dget -x http://ftp.uk.debian.org/debian/pool/main/h/hello/hello_2.2-2.dsc
dpkg-source: extracting hello in hello-2.2
dpkg-source: unpacking hello_2.2.orig.tar.gz
dpkg-source: applying ./hello_2.2-2.diff.gz
$ cd hello-2.2/
$ debchange -n

dget and debchange are neat little utilities from devscripts. You can configure them to know your name, e-mail address, etc. If you work with debian packages a lot, you'll get to know them well. Future versions of debchange support --bpo for backports, but we use -n which means new package. You should edit the version number in the top line to be a backport version, i.e.:

hello (2.2-2~bpo-sr.1) etch-backports; urgency=low

  * Rebuild for etch-backports.

 -- Your Name <you@example.com>  Wed,  2 Apr 2008 22:24:30 +0100

Now, let's build it. We are only doing a backport, but if you were making any changes, you'd do them before the next stage, and list them in the changelog you just edited:

$ cd ..
$ dpkg-source -sa -b hello-2.2-2~bpo/
$ sudo pbuilder build hello_2.2-2~bpo-sr.1.dsc

Assuming no errors, the built package will be sitting in /var/cache/pbuilder/result/.

Now, for the repository:

$ mkdir ~/public_html/backports
$ cd ~/public_html/backports
$ mkdir conf
$ cat > conf/distributions << EOF
Origin: Your Name
Label: Your Name's Backports
Suite: stable-backports
Codename: etch-backports
Version: 4.0
Architectures: i386 all source
Components: main
Description: Your Name's repository of etch backports.
SignWith: ABCDABCD
NotAutomatic: yes
EOF

This file defines your repository. The codename will be the distribution you list in your sources.list. The version should match it. The architectures are the architectures you are going to carry - "all" refers to non-architecture-specific packages, and source to source packages. I added amd64 to mine. SignWith is the ID of the GPG key you are going to use with this repo. I created a new DSA key for the job. NotAutomatic is a good setting for a backports repo, it means that packages won't be installed from here unless explicitly requested (via package=version or -d etch-backports).

Let's start by importing our source package:

$ cd /tmp/packaging
$ debsign -kABCDABCD hello_2.2-2~bpo-sr.1.dsc
$ cd ~/public_html/backports
$ reprepro -P optional -S devel --ask-passphrase -Vb . includedsc etch-backports /tmp/packaging/hello_2.2-2~bpo-sr.1.dsc

(There is currently a known bug in reprepro's command-line handling. -S and -P are swapped.)

Now, let's import our binary package:

$ reprepro --ask-passphrase -Vb . includedeb etch-backports /var/cache/pbuilder/result/hello_2.2-2~bpo-sr.1_i386.deb

Reprepro can be automated with it's processincoming command, but that's beyond the scope of this howto.

Test your new repository, add it to your /etc/apt/sources.list

deb http://example.com/~you/backports etch-backports main
# aptitude update
# aptitude install hello=2.2-2~bpo-sr.1

Enjoy. My backports repository can be found here.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Pingback

[...] you should know before buying an Asus EEE PC Flip Video Ultra on Linux Evaluating Fibre to the Home My first (real) Debian repo Download Video from the Command [...]

Thanks for this!

There is so much information out there on how to package for Debian and Ubuntu, but not much at all about how to package for yourself. I guess they don’t realize that people want to make packages they don’t feel applicable for public use. Thanks so much for this article.

wow qui est vraiment bon. je

wow qui est vraiment bon. je n'ai jamais pensé à ce sujet. Les vidéos de YouTube sont toujours url statique que je pensais. mais il est préférable de les avoir pas. merci de partager cet article incroyable. garder sur le détachement. vraiment aimé en savoir plus sur ce - replique montres

So I can configure this one

So I can configure this one to know my name and e-mail address.

buy real youtube view
buy youtube package

Reply

I had heard a lot about reprepro. and searched all over the internet to find an article on it. I accidentally came across this article and I found it to be helpful. Thanks a lot for this wonderful article. The steps have helped me though.
windows 8 transformation pack for vista

This is so beautiful and

This is so beautiful and creative. I just love the colors and whoever gets it in the mail will be smiling.
cheap maternity clothes online

First You got a great blog .I

First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks.
the price of gold

Easily, the article is

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.
fibroids miracle pdf reviews

Really solid, awesome,

Really solid, awesome, fact-filled information here. Your posts NEVER ever disappoint, and that certainly holds true here as well. You always make for an interesting read. Can you tell I'm impressed? :) Keep up the fantastic articles.
non lethal self defense weapons

Really solid, awesome,

Really solid, awesome, fact-filled information here. Your posts NEVER ever disappoint, and that certainly holds true here as well. You always make for an interesting read. Can you tell I'm impressed? :) Keep up the fantastic articles. why Dave Morin is creating path

Great, This specific net

Great, This specific net webpage is seriously thrilling and enjoyment to learn. I’m an enormous fan from the subjects mentioned.
Amazon Seller Account Login

Great post! I am actually

Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here.
textyourexbackmichaelfiore.com

Thanks very much for this

Thanks very much for this great article;this is the stuff that keeps me going through out these day.
Affiliate Marketing

Up to now, whenever I've

Up to now, whenever I've needed a backport or debian recompile, I've done it locally. But finally last night, instead of studying for this morning's exam, I decided to do it properly. comeprogettareunbagno.it

Thanks for ones marvelous

Thanks for ones marvelous posting! I genuinely enjoyed reading it,you are a great author. I will be sure to bookmark your blog and may come back very soon.Door Casings

Sensational work this is!

Sensational work this is! Truly, one of the most magnificent piece of master class articles I've ever seen. I am really amazed by this sensational post. Wow! Just keep working on this topic and dig up more gold information like this. kontorimööbel

This topic is something that

This topic is something that I have been looking into for a while now and your insight is exceptional. Thanks for sharing this information.Elektronik Sigara

Di Shopious kamu bisa

Di Shopious kamu bisa menemukan barang-barang terbaik dan terbaru dari seluruh toko online terpercaya yang ada di Indonesia. Kamu cari Baju Tas Sepatu Kamu bisa temukan semuanya disini. Belanja online jadi lebih nyaman di Shopious. the venus factor

This is good post and it

This is good post and it works perfect on the light space through the steps. This is great example for the usage. Learn More Here Next Page

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.