19

I want to create my own deb repository to store some packages. I've tried reprepro and it works fine, except for one fundamental feature. Reprepro can't store several versions of the same package in the repository.

The ability to store several versions of the same package is essential to me, so I'm asking what software can can do this.

Here is a piece of reprepro FAQ that shows that it can't do it:

3.1) Can I have two versions of a package in the same distribution?
-------------------------------------------------------------------
Sorry, this is not possible right now, as reprepro heavily optimizes
at only having one version of a package in a suite-type-component-architecture
quadruple.
You can have different versions in different architectures and/or components
within the same suite. (Even different versions of a architecture all package
in different architectures of the same suite). But within the same
architecture and the same component of a distribution it is not possible.

6 Answers 6

12

As far as I understand, mini-dinstall requires debian .changes files when adding packages. As I only had .deb files available I found that aptly supports multiple versions as well.

Another more light-weight option is freight which is a set of shell scripts for maintaining a debian repository. I have now (2017) been using freight for three years to maintain a small but actively updated repository, with good results. One key feature was the ability to keep multiple versions of a package.

Edit: Updated link to new freight repo as the previous had not been updated since 2014.

3
  • 1
    Downvoter: care to elaborate?
    – bohrax
    Apr 12, 2014 at 16:36
  • 1
    Note that freight has been forked and is now being maintained at github.com/freight-team/freight - the original version hasn't been updated since 2014.
    – Wolfgang
    May 18, 2017 at 21:35
  • @WolfgangThanks, updated the link in the answer!
    – bohrax
    May 20, 2017 at 10:41
11

The solution is to use mini-dinstall for managin deb repos. It does not delete previous version of the package from the repository.

1
  • 2
    This appears to only be true if "keep_old = 1" is set in mini-dinstall.conf. Default (according to the man page & recent experience) is to remove older versions. Tested with version 0.6.29ubuntu1.
    – pendor
    Dec 10, 2013 at 19:43
2

I heard good things about an alternative, freight:

https://github.com/rcrowley/freight

HTH, mistige

3
  • Not sure why this answer was downvoted, unless it was because of its lack of detail. Freight indeed looks like a viable alternative to reprepro, one that I intend to try out since I have the same need as the OP
    – killthrush
    Oct 13, 2015 at 14:12
  • I'm not the downvoter, but perhaps because freight was already mentioned in my answer a year ago. Anyhow, I can vouch for it as a viable option. I have used it for over a year for a small but actively updated repository. We have been bitten by this issue though: github.com/rcrowley/freight/pull/65
    – bohrax
    Jan 23, 2016 at 19:32
  • 1
    @bohrax: It seems that freight has been forked and is now being maintained at github.com/freight-team/freight instead.
    – Wolfgang
    May 18, 2017 at 21:36
0

If you're willing to write the Packages file yourself (eg with a custom script), you can put several versions of the same package in there and apt-get will allow you to install a specific version with the syntax

apt-get install packagename=version

You can get all of the info you need to write this package with

dpkg-deb --info package.deb

and

md5sum package.deb

apt-get upgrade will also choose the highest version number (in my limited testing, at least).

2
  • Thank you for the answer, but I prefer to use some system that will generate Packages file.
    – bessarabov
    Jun 8, 2012 at 16:56
  • This does not answer the question about creating a package repository with multiple versions of the same package. It's an answer to another question.
    – gertvdijk
    Apr 16, 2014 at 8:59
0

I realise I am late to the party :D

But as I stumbled on this, I thought it was worth answering in case anyone is looking at it

The answer is: No, reprepro can't have multiple versions of the same package in a single repo (eg focal-stable)

This is great for people like me, who look after repositories, as it removes the need to "clean them up" or be confusing for customers.

-2

As the software tells you, the older ones are purged when a new one comes in. Usually, this is done with multiple repos. Just like Ubuntu and Debian have multiple repos for stable and unstable or Natty, Oneiric, …, you will need to have multiple repos.

Usually package managers select the newest version of a package, so it would be hard for the users to choose as well.

3
  • 1
    Creating multiple repos does not solve my problem. I need multiple versions of the same package to be in the same repo. For those who are interested why do I need this here is a topic with my explanation: answers.launchpad.net/launchpad/+question/171452
    – bessarabov
    Dec 3, 2011 at 12:21
  • I fear that you have to look at your problem from a different angle since the regular Debian repos have no support for multiple versions. Dec 3, 2011 at 19:10
  • 2
    You are not right. Please see regular debian repo ftp.us.debian.org/debian/pool/main/p/perl and see that there are several versions of the same package for the same archicture.
    – bessarabov
    Jun 8, 2012 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .