0

I repacked a proprietary program delivered as tar file to a deb file for having a company wide repository.

I used reprepro to set up a repository and signed it. A unix timestamp is faking a versioning numbering, so I can have different (real) versions installed at the same time. Almost everything works as expected. The deb file looks like this: mysoft8.0v6_1366455181_amd64.deb

Only problem on a client machine it tries to install the same deb file over and over again because it thinks its an update. What do I miss:

control file in deb package looks like this:

Package: mysoft8.0v6
Version: 1366455181
Section: base
Priority: optional
Architecture: amd64
Installed-Size: 1272572 
Depends:
Maintainer: me
Description: mysoft 8.0v6 dpkg repackaging

and the config in the repository: /mirror/mycompany.inc/conf/distributions:

Origin: apt.mycompany.inc
Label: apt repository
Codename: precise
Architectures: amd64 i386
Components: main
Description: Mycompany debian/ubuntu package repo
SignWith: yes
Pull: precise

Help much appreciated

Added guide: This Is the guide I used to create the repository.

Johannes
  • 333
  • 3
  • 15

1 Answers1

0

To have different versions of the software installed at the same time, you need to use different package names rather than different version numbers; only one version of a package (identified by name) can be installed at the same time.

For example, let's say you need to have MySoft 7 and MySoft 8 installed at the same time, but also need to upgrade each version when the vendor releases minor updates. Maybe you start with MySoft 7.0 v6 which you want installed in /opt/vendor/mysoft7 and MySoft 8.0 v2 which you want installed in /opt/vendor/mysoft8 then you would build two packages:

Package: mysoft7
Version: 7.0.6

and

Package: mysoft8
Version: 8.0.2

to create mysoft7_7.0.6_amd64.deb and mysoft8_8.0.2_amd64.deb. In theory you can use whatever version scheme you want, but it would be advisable to conform to Debian conventions when specifying the version number.

Then, if you need to upgrade either version due to upstream changes from the vendor, then you would build a new version of the relevant package and update the relevant version number. For example, if MySoft 8.0 v3 is released, you would now build:

Package: mysoft8
Version: 8.0.3

Installing this package would then automatically uninstall mysoft8 version 8.0.2 thereby removing the files installed from mysoft8_8.0.2_amd64.deb and replacing them with the files contained in mysoft8_8.0.3_amd64.deb

If you need every single upstream version installed at the same time, then you would need to use a different package name for every version. At this point, the package version number becomes irrelevant and you can just use 1.0. Each would need to install to a different directory, because a file can only be owned by one package at a time. In this scenario, you would have to clean up unwanted old versions of the software manually by uninstalling the relevant package.

I am slightly unclear on why your current deb would try to reinstall if it is already installed (which, unfortunately, is the crux of your question!). It suggests that apt thinks that the version of the package available in your repo is higher than the version installed. Perhaps the size of the version number is confusing it? /var/log/dpkg.log and /var/log/apt/history.log should show you what is going on.