all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix artanis paths
@ 2016-08-09  0:05 Ignacio Torres Masdeu
  2016-08-10  3:42 ` Mark H Weaver
  0 siblings, 1 reply; 3+ messages in thread
From: Ignacio Torres Masdeu @ 2016-08-09  0:05 UTC (permalink / raw)
  To: guix-devel

The last patch[1] for artanis added the DESTDIR path to place files in
$DESTDIR/etc.

[1] http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00813.html

This didn't account for the fact that $DESTDIR is used in the build
system install process as a prefix for other files and the effect was
that those files were effectively copied in $out/$out/{bin/share}:

$ find /gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/bin
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/bin
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/bin/art
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share/guile
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share/guile/site
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share/guile/site/2.0
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share/guile/site/2.0/artanis
/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/gnu/store/3nr3f0xvn9zc9v9nz8nsn9svcbrcn638-artanis-0.1.2/share/guile/site/2.0/artanis/commands.scm

This patch maintains the desired $DESTDIR/etc population while avoiding
the double concatenation.

From 17b40a6d10d89c35b94a87fbc5b1d5bad4430f2f Mon Sep 17 00:00:00 2001
From: Ignacio Torres Masdeu <i@itorres.net>
Date: Tue, 9 Aug 2016 01:34:27 +0200
Subject: [PATCH] Fix artanis paths

---
 gnu/packages/guile.scm | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f26cc22..04b138a 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -300,24 +300,13 @@ without requiring the source code to be rewritten.")
      '(#:make-flags
        ;; TODO: The documentation must be built with the `docs' target.
        (let* ((out (assoc-ref %outputs "out"))
-              (dir (string-append out "/share/guile/site/2.0")))
+              (mod_dir "/share/guile/site/2.0"))
          ;; Don't use (%site-dir) for site paths.
-         (list (string-append "MOD_PATH=" dir)
-               (string-append "MOD_COMPILED_PATH=" dir)
+         (list (string-append "MOD_PATH=" mod_dir)
+               (string-append "MOD_COMPILED_PATH=" mod_dir)
+               "PREFIX="
                (string-append "DESTDIR=" out)))
-       #:test-target "test"
-       #:phases
-       (modify-phases %standard-phases
-         (add-before
-          'install 'substitute-root-dir
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out  (assoc-ref outputs "out")))
-              (substitute* "Makefile"   ;ignore the execution of bash.bashrc
-                ((" /etc/bash.bashrc") " /dev/null"))
-              (substitute* "Makefile"   ;set the root of config files to OUT
-                ((" /etc") (string-append " " out "/etc")))
-              (mkdir-p (string-append out "/bin")) ;for the `art' executable
-              #t))))))
+       #:test-target "test"))
     (synopsis "Web application framework written in Guile")
     (description "GNU Artanis is a web application framework written in Guile
 Scheme.  A web application framework (WAF) is a software framework that is
-- 
2.7.4

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

* Re: [PATCH] Fix artanis paths
  2016-08-09  0:05 Ignacio Torres Masdeu
@ 2016-08-10  3:42 ` Mark H Weaver
  0 siblings, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2016-08-10  3:42 UTC (permalink / raw)
  To: Ignacio Torres Masdeu; +Cc: guix-devel

Ignacio Torres Masdeu <i@itorres.net> writes:

> The last patch[1] for artanis added the DESTDIR path to place files in
> $DESTDIR/etc.
>
> [1] http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00813.html
>
> This didn't account for the fact that $DESTDIR is used in the build
> system install process as a prefix for other files and the effect was
> that those files were effectively copied in $out/$out/{bin/share}:

In general, we should be setting PREFIX to $out (i.e. /gnu/store/...),
and leaving DESTDIR unset.  Conventionally, these two variables have
different meanings: PREFIX is where the files are expected to be when
the code is run.  DESTDIR is meant as a temporary staging area when
building a package, with the expectation that it will be packed up into
a binary package and later extracted into PREFIX.  So, with this in
mind:

> +         (list (string-append "MOD_PATH=" mod_dir)
> +               (string-append "MOD_COMPILED_PATH=" mod_dir)
> +               "PREFIX="
>                 (string-append "DESTDIR=" out)))

I think that this should be (string-append "PREFIX=" out) and DESTDIR
should be left unset.

I haven't looked at the details of this package, or tried to build it,
but I'd like to see a solution that follows the conventions above, if
possible.  Would you be willing to try this?

Thanks for your efforts!

      Mark

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

* Re: [PATCH] Fix artanis paths
@ 2016-10-03  2:08 Adonay Felipe Nogueira
  0 siblings, 0 replies; 3+ messages in thread
From: Adonay Felipe Nogueira @ 2016-10-03  2:08 UTC (permalink / raw)
  To: guix-devel

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

I have sent a patch that tries to fix the issue.

See: <https://savannah.gnu.org/patch/index.php?9130>


-- 
# pt-BR: Brasileiro | en: Brazilian

* pt-BR: Palestra sobre liberdade de software (movimento filosófico político-social, não tecnológico).
  * en: Gives talks about software freedom (philosophical, political and social movement, not technological).
* pt-BR: Voluntário avaliador de liberdade de software (para software pagos ou gratuitos).
  * en: Volunteer evaluator of software freedom (for paid software, or gratis software).
* pt-BR: Presta suporte e consultoria básicos sobre software livre.
  * en: Gives basic support and consulting about free/libre software.

## pt-BR: Sobre mim e contato | en: About me and contact
<https://libreplanet.org/wiki/User:Adfeno>


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

end of thread, other threads:[~2016-10-03  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-03  2:08 [PATCH] Fix artanis paths Adonay Felipe Nogueira
  -- strict thread matches above, loose matches on Subject: below --
2016-08-09  0:05 Ignacio Torres Masdeu
2016-08-10  3:42 ` Mark H Weaver

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.