Creating a debian repository for squeeze and lenny

Posted on 2011-10-05
Last Modified: 2012-05-12
Hi guys,

Our company hosts packages of our own software on a local repository on our network. Right now it is what this guide refers to as a "trivial repository"

Our current development platform is Debian lenny, but we'd like to move to Debian squeeze. The problem is that our product's custom made packages, which we put into our local repo, are not compatible between the two. I have to tweak some dependencies and there are some minor code changes needed to make it work on squeeze.

Ideally, I'd like to make a fork of our project just for squeeze, and build "squeeze" specific packages.

How can I change the repository so that I have one set of "lenny" packages available for lenny machines, and another set of "squeeze compatible" packages are available for squeeze machines?

Below is an example of my sources.list:

deb lenny main
deb-src lenny main
# our local repository
deb binary/

Open in new window

And an example of the tree structure in our Repo:

|-- binary
|   |-- Packages
|   |-- Packages.gz
|   |-- ourproduct_10.10-3057_all.deb
|   |-- ourproduct_10.11-3068_all.deb
|   |-- ourproduct_11.0-3160_all.deb
|   |-- ourproduct_11.2-3174_all.deb
|   |-- ourproduct_12.1-3188_all.deb

Open in new window

You can see how unlike the regular debian repos, our local one doesn't explicitly say "lenny" on it anywhere - so those packages show up no matter what version of linux we're using.

How do I change our local repository and/or my sources file so that I can make packages that differentiate between lenny and squeeze?
Question by:Frosty555
    LVL 39

    Accepted Solution

    What is wrong in using automatic repositories from that same document?

    You can follow this URL to see how debian does it..
    LVL 31

    Author Comment

    Is creating the appropriate directory structure all that is necessary? I don't need to do any other fancy configuration of the package or anything like that?
    LVL 39

    Expert Comment

    it needs to be built for every environment of course.
    And that might be more tricky than you think. If you need some feature from a library that is different from one set to another, that might give you a challenge.

    (I used to have such problems in the past with RedHat, they provide a long term stable platform, but sometimes i need a faster moving platform and then there are conflicting libraries, depending on the mixed you need).
    Esp. openssl might break between versions (by design, to prevent continued use of defective libraries).

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now