all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to install an old package version?
@ 2016-08-11 19:16 Hartmut Goebel
  2016-08-12  9:18 ` Alex Kost
  2016-08-12 13:20 ` 宋文武
  0 siblings, 2 replies; 5+ messages in thread
From: Hartmut Goebel @ 2016-08-11 19:16 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi,

I'm curious about how to install an old package version with guix.

Example for what I mean:

In e.g Debian, the list of available packages is separate from apt-get
(et al.). So I can query all available versions of a package and install
the version I need:

 $ apt-cache madison nginx
     nginx | 1.9.10-1~bpo8+3 | http://debian.mirror.lrz.de/debian/
jessie-backports/ma
     nginx | 1.6.2-5+deb8u2 | http://security.debian.org/
jessie/updates/main amd64 Pa

Now in guix, the list of available packages is build into guix, there is
no external cache. So how can I e.g. install python-2.7.10 after I
installed guix 0.11.0, which only defines python-2.7.11?

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog:
http://www.goebel-consult.de/blog/bewertung-pgp-verschlusselung-bei-web.de-und-gmx

Kolumne:
http://www.cissp-gefluester.de/2012-04-compliance-bringt-keine-sicherheit


[-- Attachment #2: Type: text/html, Size: 2344 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to install an old package version?
  2016-08-11 19:16 Hartmut Goebel
@ 2016-08-12  9:18 ` Alex Kost
  2016-08-12 13:20 ` 宋文武
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Kost @ 2016-08-12  9:18 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

Hartmut Goebel (2016-08-11 22:16 +0300) wrote:

> Hi,
>
> I'm curious about how to install an old package version with guix.
>
> Example for what I mean:
>
> In e.g Debian, the list of available packages is separate from
> apt-get (et al.). So I can query all available versions of a package
> and install the version I need:
>
>  $ apt-cache madison nginx
>      nginx | 1.9.10-1~bpo8+3 | http://debian.mirror.lrz.de/debian/
> jessie-backports/ma
>      nginx | 1.6.2-5+deb8u2 | http://security.debian.org/ jessie/
> updates/main amd64 Pa
>
>
> Now in guix, the list of available packages is build into guix, there
> is no external cache. So how can I e.g. install python-2.7.10 after I
> installed guix 0.11.0, which only defines python-2.7.11?

You have to make your own package for this version, that would look like
this:

(define-public python-2.7.10
  (package
    (inherit python)
    (version "2.7.10")
    (source (origin
              (inherit (package-source python-2.7))
              (uri (string-append "https://www.python.org/ftp/python/"
                                  version "/Python-" version ".tar.xz"))
              (sha256 (base32 "some-letters-and-numbers"))))))

and to put it to a file from GUIX_PACKAGE_PATH.
See (info "(guix) Package Modules") for details.

Alternatively, you can use a guix git checkout on a specific commit that
still has python-2.7.10, but it's probably not what you want.

-- 
Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to install an old package version?
  2016-08-11 19:16 Hartmut Goebel
  2016-08-12  9:18 ` Alex Kost
@ 2016-08-12 13:20 ` 宋文武
  1 sibling, 0 replies; 5+ messages in thread
From: 宋文武 @ 2016-08-12 13:20 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

Hartmut Goebel <h.goebel@goebel-consult.de> writes:

> Hi,
>
> I'm curious about how to install an old package version with guix.
>
> Example for what I mean:
>
> In e.g Debian, the list of available packages is separate from apt-get
> (et al.). So I can query all available versions of a package and
> install the version I need:
>
> $ apt-cache madison nginx
> nginx | 1.9.10-1~bpo8+3 | http://debian.mirror.lrz.de/debian/
> jessie-backports/ma
> nginx | 1.6.2-5+deb8u2 | http://security.debian.org/
> jessie/updates/main amd64 Pa
>
> Now in guix, the list of available packages is build into guix, there
> is no external cache. So how can I e.g. install python-2.7.10 after I
> installed guix 0.11.0, which only defines python-2.7.11?

All definitions (like debian's dsc) of packages are in the guix
git reposiroy.  You can clone it, checkout to any commit, build it,
and then run `pre-inst-env guix package -i ...' there to install
packages at that commit.  Note that guix hydra only has binary caches
for latest builds, so the old packages will be built from sources.

You can also 'guix pull --url=...' to update (or downgrade) the
package definitions from a tarball, which can be generated from the
git repository by `git archive'.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to install an old package version?
@ 2018-12-27 19:34 cdelia
  2018-12-28 15:03 ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: cdelia @ 2018-12-27 19:34 UTC (permalink / raw)
  To: help-guix

Hi!

real newbie to guix here!

> You have to make your own package for this version, that would look 
> like
> this:
> 
> (define-public python-2.7.10
>  (package
>    (inherit python)
>    (version "2.7.10")
>    (source (origin
>              (inherit (package-source python-2.7))
>              (uri (string-append "https://www.python.org/ftp/python/";
>                                  version "/Python-" version ".tar.xz"))
>              (sha256 (base32 "some-letters-and-numbers"))))))
> 
> and to put it to a file from GUIX_PACKAGE_PATH.
> See (info "(guix) Package Modules") for details.
> 

This brings me some doubts.

How does guix resolves de dependency tree in those cases? Say I need a 
previous package X version, that depends on an earlier package Y version 
that the one that is defined on the "main" guix.

Do I have to do the sema that Alex suggests so guix can resolve it? I 
guess that'll be the answer. But in that case I'll maybe find myself in 
a time consuming recursive package definition.

> Alternatively, you can use a guix git checkout on a specific commit 
> that
> still has python-2.7.10, but it's probably not what you want.

So, to avoid recursive definition of packages: Could I checkout an 
earlier guix revision, install the package and then checkout the latest 
guix version?
Would that work or it will bring other kind of dragons?

If that's the case, it could be done automatically. Does anybody try to 
do it, so we can simple specify the version of the package to install in 
"guix package" cmd?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to install an old package version?
  2018-12-27 19:34 How to install an old package version? cdelia
@ 2018-12-28 15:03 ` Ricardo Wurmus
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2018-12-28 15:03 UTC (permalink / raw)
  To: cdelia; +Cc: help-guix


Hi cdelia,

> How does guix resolves de dependency tree in those cases? Say I need a
> previous package X version, that depends on an earlier package Y
> version that the one that is defined on the "main" guix.

No “resolving” happens.  Guix is a collection of Scheme variables whose
values are package objects.  These package objects refer to the values
of other Scheme variables in Guix.  So a package that depends on
“python” actually references the value of the “python” variable.

This means that replacing a package in the dependency graph requires
more effort.  Adding the package definition itself won’t be enough.  You
would need to use the input rewriting API to rewrite the full dependency
graph of the packages that you are interested in, replacing every
instance of “python” with “my/python” recursively.

Obviously, this would result in packages for which we cannot provide
binaries.

>> Alternatively, you can use a guix git checkout on a specific commit
>> that
>> still has python-2.7.10, but it's probably not what you want.
>
> So, to avoid recursive definition of packages: Could I checkout an
> earlier guix revision, install the package and then checkout the
> latest guix version?
> Would that work or it will bring other kind of dragons?

You can do this in a manifest and using an “inferior” Guix.  See my
other message and/or the manual.  I suggest using manifests for this
instead of doing this manually.

--
Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-28 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 19:34 How to install an old package version? cdelia
2018-12-28 15:03 ` Ricardo Wurmus
  -- strict thread matches above, loose matches on Subject: below --
2016-08-11 19:16 Hartmut Goebel
2016-08-12  9:18 ` Alex Kost
2016-08-12 13:20 ` 宋文武

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.