Is it not possible to install old version packages?

14 posts / 0 new
Last post
#1 Wed, 2015-12-02 01:31
amedee
  • amedee's picture
  • Offline
  • Last seen: 2 years 2 weeks ago
  • Joined: 2015-12-02

I am using alpine for docker, and am pinning my dependencies to specific versions to make my images reproducible.
For example, I had postgresql-client pinned to version =9.4.4-r0.

However, the postgres package was updated to postgresql-client-9.4.5-r0:
ERROR: unsatisfiable constraints:
postgresql-client-9.4.5-r0:
breaks: world[postgresql-client=9.4.4-r0]

An apk search only reveals the newest version:
$ apk search postgresql-client
postgresql-client-9.4.5-r0

It is not possible to download old versions of packages? I thought pinning version numbers meant it was possible to always get that version. Otherwise, what is the point of putting =9.4.4-r0 if it will break my builds when a new version is added to the repository? What if 9.4.5 had introduced a breaking change and I wanted to stay on 9.4.4?

Cheers,
Amedee

Wed, 2015-12-02 08:27
ScrumpyJack
  • ScrumpyJack's picture
  • Offline
  • Last seen: 3 months 1 week ago
  • Joined: 2013-06-20

Perhaps you would be better off pinning an Alpine Linux release.

http://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning

You can download packages from any mirror that has index list enabled, such as http://dl-3.alpinelinux.org/alpine/

Fri, 2016-03-11 03:57
konrad
  • konrad's picture
  • Offline
  • Last seen: 1 year 9 months ago
  • Joined: 2016-03-11

No, this has to be a misunderstanding. How can I install a fixed version? That HAS to be possible.

Sun, 2016-03-13 10:55
ScrumpyJack
  • ScrumpyJack's picture
  • Offline
  • Last seen: 3 months 1 week ago
  • Joined: 2013-06-20

konrad, give me an example

Fri, 2016-03-25 09:37
frol
  • frol's picture
  • Offline
  • Last seen: 1 year 8 months ago
  • Joined: 2016-03-25

Currently, there is no way to install arbitrary older versions of a package from official repositories in Alpine Linux. The best thing you can achieve is using repositories of the earlier releases:

# cat /etc/alpine-release
3.3.3
 
# echo 'http://dl-cdn.alpinelinux.org/alpine/v3.2/main' >> /etc/apk/repositories
 
# apk update
fetch <a href="http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch</a> <a href="http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
 
#" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
 
#</a> apk add bash==4.3.33-r0
(1/1) Updating pinning bash (4.3.33-r0)
OK: 13 MiB in 17 packages
 
# apk add bash==4.3.42-r3
(1/2) Upgrading bash (4.3.33-r0 -> 4.3.42-r3)
Executing bash-4.3.42-r3.post-upgrade
(2/2) Purging ncurses5-libs (5.9-r1)
Executing busybox-1.24.1-r7.trigger
OK: 13 MiB in 16 packages

Thu, 2016-05-19 03:02
Olaf
  • Olaf's picture
  • Offline
  • Last seen: 11 months 2 weeks ago
  • Joined: 2016-05-19

+1 to this please!

(I'd +100 if I could! ;-) )

Enabling reproducible research is becoming critical. If we don't know exactly what version of the software we're using - how can we verify something?

Sun, 2016-07-10 04:50
michaelk
  • michaelk's picture
  • Offline
  • Last seen: 1 year 5 months ago
  • Joined: 2016-07-10

+1
The possibility to install older package versions (+ makedepends on specific versions) could be also useful to build software that requires bootstrapping, e.g. ghc or rust.
https://blog.rust-lang.org/2016/07/07/Rust-1.10.html

Quote:
...there’s a large change to the way that we develop Rust that won’t impact Rust users directly, but will help those distributing Rust significantly. Rust is implemented in Rust, which means that to build a copy of Rust, you need a copy of Rust. This is commonly referred to as ‘bootstrapping’. Historically, we would do this by “snapshotting” a specific version of the compiler, and always bootstrapping from that; the snapshot would periodically be updated, as needed. Furthermore, since the Rust compiler uses unstable Rust features, in order to build a copy of the stable compiler, you would need a specific nightly version of the Rust compiler. This has served us well for years, but we’ve outgrown it now. The main drawback to this approach is that it requires downloading a snapshot binary, which is not ideal for an important constituency: Linux distributions. In particular, distros generally want to be able to build the latest version of Rust using only previously-packaged versions that they have produced, rather than via untrusted binaries. As such, we have modified our build system so that Rust 1.10 builds with Rust 1.9. In the future, this pattern will continue; Rust 1.11 will be built with Rust 1.10. Furthermore, you can use the stable compiler to build the compiler. This simplifies everything around bootstrapping, and helps distribution maintainers significantly, as they no longer need two packages.
Fri, 2016-07-22 03:49
machzqcq
  • machzqcq's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2016-07-22

Being able to specify version of package is needed asap please. I have been trying to switch all my docker images to use alpine. We use ruby 2.0 in some projects and we want to be able to specify that in apk add.

This feature would greatly help.

Thanks!

Wed, 2016-11-23 13:47
jgogstad
  • jgogstad's picture
  • Offline
  • Last seen: 1 year 3 weeks ago
  • Joined: 2016-11-23

Confirming that this would be a very welcome feature. We're using build images to enforce identical build environments, and it's a problem when it's not possible to rebuild the build images due to versions being upgraded in apk.

For instance a build image for NodeJS would be:

FROM alpine:3.3
 
RUN http_proxy=http://proxy.internal apk update && apk add --no-cache nodejs=6.2.0-r0
 
# More node build environment stuff here

Trying to rebuild this image today, I had to upgrade the node version to 6.7.0 due to repository updates.

Wed, 2016-12-07 00:19
SeijiSuenaga
  • SeijiSuenaga's picture
  • Offline
  • Last seen: 5 months 2 weeks ago
  • Joined: 2016-12-07

+1

I'd like this for the same reason others have mentioned: reproducible Docker images.

Thu, 2017-01-12 17:52
MasterNag
  • MasterNag's picture
  • Offline
  • Last seen: 11 months 2 days ago
  • Joined: 2017-01-12

It would be great to have a repository of all the .apk files that were published, this way we could, at least, download the ones we want and create private repositories (as described here : https://engineering.fundingcircle.com/blog/2015/04/28/create-alpine-linux-repository/) with the packages that suit our needs for our Docker images...

Thu, 2017-11-16 15:28
treeder
  • treeder's picture
  • Offline
  • Last seen: 1 month 4 hours ago
  • Joined: 2015-09-09

I see an answer here that seems to say you can: https://superuser.com/a/1058665, is that answer wrong then?

Mon, 2017-11-20 18:07
sravankasu
  • sravankasu's picture
  • Offline
  • Last seen: 3 weeks 4 days ago
  • Joined: 2017-11-20

That looks like another way to pin versions for a version that exists in the repo. That won't work if the version you want is not in the repository.

Tue, 2017-12-05 23:05
mmix
  • mmix's picture
  • Offline
  • Last seen: 1 week 3 days ago
  • Joined: 2016-06-07

there is only 2 options : modify APKBUILD or manual build

Log in or register to post comments