Modify

Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#8401 closed enhancement (fixed)

keep a few older version DEB packages in the Ubuntu/Debian repository

Reported by: A_Pirard Owned by: bastiK
Priority: minor Milestone:
Component: Ubuntu package Version: tested
Keywords: Cc: A_Pirard

Description

If you keep a few older versions in DEB packages of the Ubuntu/Debian repository, the Synaptic Package Manager user will be able to Properties>Versions and to Package>Force version... to revert to a former version in case he experiences personal problems with the latest one.
That's the way I manage my local repository. By default, Synaptic chooses the latest.

Attachments (0)

Change History (17)

comment:1 by bastiK, 11 years ago

Yes, it would be good to keep a few older packages. Currently, we are using reprepro for package management, and I think it is not possible with this software. However, I'm not too eager to switch to a different system as debian packaging is a major PITA and I'm glad it is running smoothly at the moment.

comment:2 by A_Pirard, 11 years ago

I didn't know PITA but I guessed ;-)
It's really a pitY (instead) that reprepro makes such a simple thing difficult.
All it takes is
1) of course, not erasing the older JOSM versions in http://josm.openstreetmap.de/apt/pool/universe/j/josm/
2) in http://josm.openstreetmap.de/apt/dists/lucid/, execute dpkg-scanpackages -m <rep> > Release
-m = multiversion = include all the versions in the output (Release).
simplified a bit: you must repeat for all Ubuntu releases and gpg.

Would the author(s) of repro not be interested to hear this and help (the pain ;-))?

comment:3 by bastiK, 11 years ago

You seem to know a lot about package management, what toolchain do you use? Any howtos/tutorials you can recommend? Currently it basically works like this:

  • unpack old deb package
  • replace binary .jar file, update version numbers
  • pack deb package (fakeroot dpkg -b TMPDIR package.deb)
  • add to repository (reprepro includedeb ... package.deb)

comment:4 by A_Pirard, 11 years ago

It took me some time to figure how to do.
I've done all sorts of packaging, including the easiest ones: Wine and Java.
If I upgrade DEBs, I may reconstruct the old versions: sudo dpkg-repack and archive them.
To build/modify DEBs, I have written a script called deb-hack which is just that. It

  • unpacks an old DEB package to a temporary folder of /tmp
  • launches a file manager (sudo nautilus) opening that folder to let do the tidying
  • when the F M is done, repack the DEB
  • then I manually store the DEB in a folder called lucid with any sub-folder organization I see fit, it even contains non-debs such as Mozilla add-ons
  • and I execute a script mkdepot, essentially dpkg-scanpackages -m ./ | gzip -f9 > Packages.gz

So, you see, we both have invented the wheel and there's only one wheel ;-)
My folder structure is not conventional (no pool/ no dists/<dist> because I have only one dist)
What is missing is authentication.

So, the only thing that you miss is telling reprepro to keep old versions and include them in Packages.
In addition, as you have only one module, you could do like me
http://josm.openstreetmap.de/apt/ containing Packages and V0.deb, V1.deb, ... Vn.deb
and execute my dpkg-scanpackages command in it.
But that requires
deb http://josm.openstreetmap.de/apt /
as (manual) client side apt configuration instead of the conventional
deb http://josm.openstreetmap.de/apt lucid universe
and I suppose that automatic apt configurators will hiccup on that.

Anyway, if reprepro lets alone the files beside /dists and /pool, you may use both current and this methods simultaneously and even tell those who didn't make the unconventional apt config to simply download older JOSM versions from .../apt.

There are tutorials, but all singing all dancing, which would take you much more time to read than this turnkey one.

Hoping this can help, for the sake of JOSM.

comment:5 by bastiK, 11 years ago

Ok, thanks!

It's not possible to change the client apt configuration, and reprepro definitely does not support multiple versions of the same package. I have the feeling, it isn't trivial either way, on foot with dpkg-scanpackages or using a more complex tool like mini-dak. :)

comment:6 by A_Pirard, 11 years ago

In http://www.papou.byethost9.com/tmp/apt/ I stored 3 josm.*.deb files
In that folder, I executed dpkg-scanpackages -m ./ | gzip -f9 > Packages.gz
In addition to the instructions on http://josm.openstreetmap.de/wiki/Download#Ubuntu
"... and add one of the following lines according to your Ubuntu-Version:" I added
deb http://www.papou.byethost9.com/tmp/apt / (not quantal universe but /) (1)
Now if I start Synaptic, search for josm, select it and
click Mark for reinstallation and Package>Force version...
I can select which version to reinstall. And we can dowload the DEBs.
That took me 5 min + writing this. That's all !!'''

(1) please note that lucid is missing.

Version 0, edited 11 years ago by A_Pirard (next)

comment:7 by A_Pirard, 11 years ago

I would like to know why I (subscribed and reporter) don't receive a copy of my comments.

comment:8 by bastiK, 11 years ago

First of all, I won't change the /etc/apt/sources.list line, because

(a) it would break the configuration for 100+ users and
(b) I'd like to keep the possibility to distribute different packages depending on the distribution in future. (Maybe for the josm package, maybe for a native tool that is needed some day.)

So in addition to the dpkg-scanpackages output, I'd need to generate a Release file (no idea how), do the signing manually etc.
There are probably various details, that are automatically taken care of by the high level tools, but that would cause trouble when implementing everything manually in a custom script.

I have changed the config such that old .deb files are kept in the pool directory, so you no longer get a 404 error with outdated package sources. However, these files are not listed in the Packages listing.

Apart from that I will postpone this issue until I know a simpler method to fix it or there are other reasons for a major rework of the ubuntu repository system.

comment:9 by bastiK, 11 years ago

Priority: normalminor

in reply to:  7 ; comment:10 by bastiK, 11 years ago

Replying to A_Pirard:

I would like to know why I (subscribed and reporter) don't receive a copy of my comments.

I think this is normal, you can complain here.

comment:11 by A_Pirard, 11 years ago

If you a no longer erasing old versions, running
dpkg-scanpackages -m ./pool/universe/ | gzip -f9 > Packages.gz
in /apt will build Packages.gz in /apt, the only file necessary
so that users adding this line in addition to the other one
deb ​http://www.papou.byethost9.com/tmp/apt /
hence not preventing the "normal" working of the server,
can install any JOSM version as said.
(it's recommended to disable extra depots for normal apt work)
Say it's for geeks or emergency support. Building Packages.gz doesn't hurt.
It's a valid depot (like a CDROM) but not covering authentication.
I don't know how authentication works because I don't need it.
But I betcha it's just one other such command.

I read this suggestion as an alternative to reprepro for this problem:
http://wiki.debian.org/HowToSetupADebianRepository#mini-dinstall

In any case, finding the old DEBs is the essential.

Nice to have talked with you.

comment:12 by skyper, 11 years ago

I do not know how your build process works (i18 and source seem not to work).

Anyway for updating Packages and Release + signing have a look at apt-ftparchive. Also mentioned on the debian wiki page. A description of the process can be found here and signing here

Last edited 11 years ago by skyper (previous) (diff)

in reply to:  10 comment:13 by stoecker, 11 years ago

Replying to bastiK:

Replying to A_Pirard:

I would like to know why I (subscribed and reporter) don't receive a copy of my comments.

I think this is normal, you can complain here.

This is wanted and done by a trac plugin. It is disturbing for us heavy trac users if we get lots of comments from ourselves.

in reply to:  12 comment:14 by bastiK, 11 years ago

Replying to skyper:

I do not know how your build process works (i18 and source seem not to work).

Anyway for updating Packages and Release + signing have a look at apt-ftparchiver. Also mentioned on the debian wiki page. A description of the process can be found here and signing here

Thanks, apt-ftparchive indeed looks like a good alternative. I'll give it a try next time.

comment:15 by bastiK, 9 years ago

Resolution: wontfix
Status: newclosed

comment:16 by A_Pirard, 9 years ago

Strange to close this with a wontfix because it is fixed in practice.
Older DEBs are kept beside the latest ones.
This conclusion is obviously not telling that to the users.
I have added a note to: https://josm.openstreetmap.de/wiki/Download#Ubuntu
(that page should need an index but I stopped adding them since I was scolded somewhere for doing it)

comment:17 by bastiK, 9 years ago

Resolution: wontfixfixed

Alright, setting it to fixed then. The old debs are not in the repository index though.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bastiK.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.