Message ID | 20160925164208.GA7317@jasmine |
---|---|
State | New |
Headers | show |
On Sun, Sep 25, 2016 at 12:42:08PM -0400, Leo Famulari wrote: > On Sat, Sep 24, 2016 at 11:14:41AM +0900, Ludovic Courtès wrote: > > Leo Famulari <leo@famulari.name> skribis: > > > +(define-public attic > > > + (package (inherit borg) > > > + (name "attic") > > > + (properties `((superseded . ,borg))))) > > > > I was thinking that we could keep the ‘attic’ recipe as-is, only with > > this extra ‘properties’ field. > > > > That way, “guix package -u” and “guix package -i attic” would install > > Borg, but people who insist could still run: > > > > guix package -e '(@ (gnu packages backup) attic)' > > > > Thoughts? > > That's a much better idea than what I had proposed. > > I found that I had to move the attic package definition below borg's, or > else the borg variable was unbound when building (gnu packages backup): > > ------ > Compiling Scheme modules... > LOAD (gnu packages backup) > ;;; note: source file ./gnu/packages/backup.scm > ;;; newer than compiled /home/leo/work/guix/gnu/packages/backup.go > Backtrace: > In ice-9/boot-9.scm: > 2401: 19 [save-module-excursion #<procedure 135d800 at ice-9/boot-9.scm:4045:3 ()>] > 4052: 18 [#<procedure 135d800 at ice-9/boot-9.scm:4045:3 ()>] > 1724: 17 [%start-stack load-stack ...] > 1729: 16 [#<procedure 13729c0 ()>] > In unknown file: > ?: 15 [primitive-load "/home/leo/work/guix/./build-aux/compile-all.scm"] > In ice-9/eval.scm: > 432: 14 [eval # #] > In ice-9/boot-9.scm: > 768: 13 [for-each #<procedure load-module-file (a)> ("gnu/packages/backup.scm")] > 2864: 12 [resolve-interface (gnu packages backup) #:select ...] > 2789: 11 [#<procedure 12ab540 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure)> # ...] > 3065: 10 [try-module-autoload (gnu packages backup) #f] > 2401: 9 [save-module-excursion #<procedure 171c450 at ice-9/boot-9.scm:3066:17 ()>] > 3085: 8 [#<procedure 171c450 at ice-9/boot-9.scm:3066:17 ()>] > In unknown file: > ?: 7 [primitive-load-path "gnu/packages/backup" ...] > In ice-9/eval.scm: > 432: 6 [eval # ()] > 453: 5 [eval # ()] > 411: 4 [eval # #] > 387: 3 [eval # #] > 387: 2 [eval # #] > 393: 1 [eval # #] > In unknown file: > ?: 0 [memoize-variable-access! #<memoized borg> #<directory # 1736d80>] > > ERROR: In procedure memoize-variable-access!: > ERROR: Unbound variable: borg > ------ > > So the attached patch moves attic after borg and supersedes it. Is it > expected that we have to shuffle the package definition around like > this? > From 43a18f5c9abb22454c564ac16b2c24bf2766c220 Mon Sep 17 00:00:00 2001 > From: Leo Famulari <leo@famulari.name> > Date: Fri, 23 Sep 2016 23:36:48 -0400 > Subject: [PATCH] gnu: attic: Superseded by borg. > > * gnu/packages/backup.scm (attic)[properties]: New field. > --- > gnu/packages/backup.scm | 85 +++++++++++++++++++++++++------------------------ > 1 file changed, 43 insertions(+), 42 deletions(-) > > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm > index e77c4f2..c6f1321 100644 > --- a/gnu/packages/backup.scm > +++ b/gnu/packages/backup.scm > @@ -358,48 +358,6 @@ to a remote location, and only the differences will be transmitted. Finally, > rdiff-backup is easy to use and settings have sensible defaults.") > (license license:gpl2+))) > > -(define-public attic > - (package > - (name "attic") > - (version "0.16") > - (source (origin > - (method url-fetch) > - (uri (string-append > - "https://pypi.python.org/packages/source/A/Attic/Attic-" > - version ".tar.gz")) > - (sha256 > - (base32 > - "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) > - (build-system python-build-system) > - (arguments > - `(#:phases > - (modify-phases %standard-phases > - (add-before > - 'build 'set-openssl-prefix > - (lambda* (#:key inputs #:allow-other-keys) > - (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl")) > - #t))))) > - (inputs > - `(("acl" ,acl) > - ("openssl" ,openssl) > - ("python-msgpack" ,python-msgpack) > - > - ;; Attic is probably incompatible with llfuse > 0.41. > - ;; These links are to discussions of llfuse compatibility from > - ;; the borg project. Borg is a recent fork of attic, and attic > - ;; has not been updated since the fork, so it's likely that > - ;; llfuse compatibility requirements are still the same. > - ;; https://github.com/borgbackup/borg/issues/642 > - ;; https://github.com/borgbackup/borg/issues/643 > - ("python-llfuse" ,python-llfuse-0.41))) > - (synopsis "Deduplicating backup program") > - (description "Attic is a deduplicating backup program. The main goal of > -Attic is to provide an efficient and secure way to backup data. The data > -deduplication technique used makes Attic suitable for daily backups since only > -changes are stored.") > - (home-page "https://attic-backup.org/") > - (license license:bsd-3))) > - > (define-public libchop > (package > (name "libchop") > @@ -497,3 +455,46 @@ stored. The authenticated encryption technique makes it suitable for backups > to not fully trusted targets. Borg is a fork of Attic.") > (home-page "https://borgbackup.github.io/borgbackup/") > (license license:bsd-3))) > + > +(define-public attic > + (package > + (name "attic") > + (version "0.16") > + (source (origin > + (method url-fetch) > + (uri (string-append > + "https://pypi.python.org/packages/source/A/Attic/Attic-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) > + (build-system python-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-before > + 'build 'set-openssl-prefix > + (lambda* (#:key inputs #:allow-other-keys) > + (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl")) > + #t))))) > + (inputs > + `(("acl" ,acl) > + ("openssl" ,openssl) > + ("python-msgpack" ,python-msgpack) > + > + ;; Attic is probably incompatible with llfuse > 0.41. > + ;; These links are to discussions of llfuse compatibility from > + ;; the borg project. Borg is a recent fork of attic, and attic > + ;; has not been updated since the fork, so it's likely that > + ;; llfuse compatibility requirements are still the same. > + ;; https://github.com/borgbackup/borg/issues/642 > + ;; https://github.com/borgbackup/borg/issues/643 > + ("python-llfuse" ,python-llfuse-0.41))) > + (synopsis "Deduplicating backup program") > + (description "Attic is a deduplicating backup program. The main goal of > +Attic is to provide an efficient and secure way to backup data. The data > +deduplication technique used makes Attic suitable for daily backups since only > +changes are stored.") > + (home-page "https://attic-backup.org/") > + (license license:bsd-3) > + (properties `((superseded . ,borg))))) > -- > 2.10.0 > shot in the dark, what if you left it in place and added (properties `((superseded . ,(delay borg))))))
On Mon, Sep 26, 2016 at 12:44:41PM +0300, Efraim Flashner wrote: > On Sun, Sep 25, 2016 at 12:42:08PM -0400, Leo Famulari wrote: > > I found that I had to move the attic package definition below borg's, or > > else the borg variable was unbound when building (gnu packages backup): > shot in the dark, what if you left it in place and added > (properties `((superseded . ,(delay borg)))))) A different failure: $ ./pre-inst-env guix build attic Backtrace: In ice-9/boot-9.scm: 157: 17 [catch #t #<catch-closure 1ad9980> ...] In unknown file: ?: 16 [apply-smob/1 #<catch-closure 1ad9980>] In ice-9/boot-9.scm: 63: 15 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 14 [eval # #] In ice-9/boot-9.scm: 2401: 13 [save-module-excursion #<procedure 1af6940 at ice-9/boot-9.scm:4045:3 ()>] 4050: 12 [#<procedure 1af6940 at ice-9/boot-9.scm:4045:3 ()>] 1724: 11 [%start-stack load-stack ...] 1729: 10 [#<procedure 1b0dea0 ()>] In unknown file: ?: 9 [primitive-load "/home/leo/work/guix/scripts/guix"] In guix/ui.scm: 1192: 8 [run-guix-command build "attic"] In ice-9/boot-9.scm: 157: 7 [catch srfi-34 #<procedure 267af20 at guix/ui.scm:423:2 ()> ...] 157: 6 [catch system-error ...] In guix/scripts/build.scm: 661: 5 [#<procedure 2844d20 at guix/scripts/build.scm:650:2 ()>] 626: 4 [options->derivations #<build-daemon 256.15 2845a80> (# # # # ...)] In srfi/srfi-1.scm: 646: 3 [append-map #<procedure 2670ba0 at guix/scripts/build.scm:556:14 (expr)> #] 578: 2 [map #<procedure 2670ba0 at guix/scripts/build.scm:556:14 (expr)> #] In guix/scripts/build.scm: 564: 1 [#<procedure 2670ba0 at guix/scripts/build.scm:556:14 (expr)> #] In gnu/packages.scm: 309: 0 [%find-package "attic" "attic" #f #:fallback? #f] gnu/packages.scm:309:5: In procedure %find-package: gnu/packages.scm:309:5: Throw to key `match-error' with args `("match" "no matching pattern" #<promise #<procedure 3578560 at gnu/packages/backup.scm:402:33 ()>>)'.
Leo Famulari <leo@famulari.name> skribis: > On Sat, Sep 24, 2016 at 11:14:41AM +0900, Ludovic Courtès wrote: >> Leo Famulari <leo@famulari.name> skribis: >> > +(define-public attic >> > + (package (inherit borg) >> > + (name "attic") >> > + (properties `((superseded . ,borg))))) >> >> I was thinking that we could keep the ‘attic’ recipe as-is, only with >> this extra ‘properties’ field. >> >> That way, “guix package -u” and “guix package -i attic” would install >> Borg, but people who insist could still run: >> >> guix package -e '(@ (gnu packages backup) attic)' >> >> Thoughts? > > That's a much better idea than what I had proposed. > > I found that I had to move the attic package definition below borg's, or > else the borg variable was unbound when building (gnu packages backup): [...] > So the attached patch moves attic after borg and supersedes it. Is it > expected that we have to shuffle the package definition around like > this? Yes, because ‘properties’ are evaluated eagerly. We could change the ‘superseded’ property to always be a promise, as Efraim suggests; we’ll see later if that’s really necessary. The patch LGTM. Thank you! Ludo’.
On Wed, Sep 28, 2016 at 10:44:26AM +0200, Ludovic Courtès wrote: > Leo Famulari <leo@famulari.name> skribis: > > So the attached patch moves attic after borg and supersedes it. Is it > > expected that we have to shuffle the package definition around like > > this? > > Yes, because ‘properties’ are evaluated eagerly. > > We could change the ‘superseded’ property to always be a promise, as > Efraim suggests; we’ll see later if that’s really necessary. > > The patch LGTM. Okay, pushed. Thanks for the details!
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index e77c4f2..c6f1321 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -358,48 +358,6 @@ to a remote location, and only the differences will be transmitted. Finally, rdiff-backup is easy to use and settings have sensible defaults.") (license license:gpl2+))) -(define-public attic - (package - (name "attic") - (version "0.16") - (source (origin - (method url-fetch) - (uri (string-append - "https://pypi.python.org/packages/source/A/Attic/Attic-" - version ".tar.gz")) - (sha256 - (base32 - "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before - 'build 'set-openssl-prefix - (lambda* (#:key inputs #:allow-other-keys) - (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl")) - #t))))) - (inputs - `(("acl" ,acl) - ("openssl" ,openssl) - ("python-msgpack" ,python-msgpack) - - ;; Attic is probably incompatible with llfuse > 0.41. - ;; These links are to discussions of llfuse compatibility from - ;; the borg project. Borg is a recent fork of attic, and attic - ;; has not been updated since the fork, so it's likely that - ;; llfuse compatibility requirements are still the same. - ;; https://github.com/borgbackup/borg/issues/642 - ;; https://github.com/borgbackup/borg/issues/643 - ("python-llfuse" ,python-llfuse-0.41))) - (synopsis "Deduplicating backup program") - (description "Attic is a deduplicating backup program. The main goal of -Attic is to provide an efficient and secure way to backup data. The data -deduplication technique used makes Attic suitable for daily backups since only -changes are stored.") - (home-page "https://attic-backup.org/") - (license license:bsd-3))) - (define-public libchop (package (name "libchop") @@ -497,3 +455,46 @@ stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets. Borg is a fork of Attic.") (home-page "https://borgbackup.github.io/borgbackup/") (license license:bsd-3))) + +(define-public attic + (package + (name "attic") + (version "0.16") + (source (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/A/Attic/Attic-" + version ".tar.gz")) + (sha256 + (base32 + "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before + 'build 'set-openssl-prefix + (lambda* (#:key inputs #:allow-other-keys) + (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl")) + #t))))) + (inputs + `(("acl" ,acl) + ("openssl" ,openssl) + ("python-msgpack" ,python-msgpack) + + ;; Attic is probably incompatible with llfuse > 0.41. + ;; These links are to discussions of llfuse compatibility from + ;; the borg project. Borg is a recent fork of attic, and attic + ;; has not been updated since the fork, so it's likely that + ;; llfuse compatibility requirements are still the same. + ;; https://github.com/borgbackup/borg/issues/642 + ;; https://github.com/borgbackup/borg/issues/643 + ("python-llfuse" ,python-llfuse-0.41))) + (synopsis "Deduplicating backup program") + (description "Attic is a deduplicating backup program. The main goal of +Attic is to provide an efficient and secure way to backup data. The data +deduplication technique used makes Attic suitable for daily backups since only +changes are stored.") + (home-page "https://attic-backup.org/") + (license license:bsd-3) + (properties `((superseded . ,borg)))))