unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49705] [PATCH] gnu: gmnisrv: Fix configure flags.
@ 2021-07-23  8:07 Sarah Morgensen
  2021-07-25 14:23 ` Arun Isaac
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
  0 siblings, 2 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-23  8:07 UTC (permalink / raw)
  To: 49705

Remove the dependency on /etc/mime.types (fixes #49233). Look in /etc
for configuration files rather than /gnu/store/...-gmnisrv.../etc.

* gnu/packages/web.scm (gmnisrv)[arguments]<#:phases> Move logic to...
<#:tests?>: ...here...
<#:make-flags>: ...and here.
<#:configure-flags>: Set --sysconfdir and --with-mimedb.
[propagated-inputs]: Move mailcap to...
[inputs]: ...here (/etc/mime.types is no longer needed).
---
Built, linted, and manually tested. Fixes <https://issues.guix.gnu.org/49233>.

 gnu/packages/web.scm | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 2cc8619b19..12ba55cdc8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7985,20 +7985,19 @@ solution for any project's interface needs:
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'set-variables
-             (lambda _
-               (setenv "CC" "gcc")
-               #t))
-           (delete 'check))))
+       `(#:tests? #f ; no tests
+         #:configure-flags
+         (list "--sysconfdir=/etc"
+               (string-append "--with-mimedb="
+                              (assoc-ref %build-inputs "mailcap")
+                              "/etc/mime.types"))
+         #:make-flags '("CC=gcc")))
       (inputs
-       `(("openssl" ,openssl)))
+       `(("mailcap" ,mailcap)
+         ("openssl" ,openssl)))
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("scdoc" ,scdoc)))
-      (propagated-inputs
-       `(("mailcap" ,mailcap)))
       (synopsis "Simple Gemini protocol server")
       (description "gmnisrv is a simple Gemini protocol server written in C.")
       (license (list license:gpl3+

base-commit: 89ea0918a4a6cc9c250b85c0b713e471b7769c48
-- 
2.31.1





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

* [bug#49705] [PATCH] gnu: gmnisrv: Fix configure flags.
  2021-07-23  8:07 [bug#49705] [PATCH] gnu: gmnisrv: Fix configure flags Sarah Morgensen
@ 2021-07-25 14:23 ` Arun Isaac
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
  1 sibling, 0 replies; 8+ messages in thread
From: Arun Isaac @ 2021-07-25 14:23 UTC (permalink / raw)
  To: Sarah Morgensen, 49705

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


Hi Sarah,

Thank you for improving our gmnisrv package!

> +         #:make-flags '("CC=gcc")))

This should be (list (string-append "CC=" ,(cc-for-target))) so that the
package cross-compiles correctly. Hard-coding CC=gcc is now deprecated
practice.

I also feel that this patch should be split into at least two patches or
maybe even three. This way, the first line summary in the commit message
is much more descriptive of the change.

1. gnu: gmnisrv: Remove dependency on /etc/mime.types.
2. gnu: gmnisrv: Cross-compile.
3. gnu: gmnisrv: Disable tests using tests?.

WDYT? Feel free to combine patches 2 and 3 if that splitting is a bit
excessive.

Thanks,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* [bug#49705] [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags.
  2021-07-23  8:07 [bug#49705] [PATCH] gnu: gmnisrv: Fix configure flags Sarah Morgensen
  2021-07-25 14:23 ` Arun Isaac
@ 2021-07-25 20:37 ` Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests? Sarah Morgensen
                     ` (4 more replies)
  1 sibling, 5 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-25 20:37 UTC (permalink / raw)
  To: 49705; +Cc: Arun Isaac

Hi,

Same as before, but with s/gcc/(cc-for-target)/, and split apart.

Arun, thanks for the pointers (and the copyright line; how do I still
forget?)

--
Sarah Morgensen (4):
  gnu: gmnisrv: Disable tests using #:tests?.
  gnu: gmnisrv: Use #:make-flags, and cross-compile.
  gnu: gmnisrv: Remove dependency on /etc/mime.types.
  gnu: gmnisrv: Fix configuration search path.

 gnu/packages/web.scm | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)


base-commit: b81ab18404a684817166dbac260e5a8c68b35389
-- 
2.31.1





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

* [bug#49705] [PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests?.
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
@ 2021-07-25 20:39   ` Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 2/4] gnu: gmnisrv: Use #:make-flags, and cross-compile Sarah Morgensen
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-25 20:39 UTC (permalink / raw)
  To: 49705; +Cc: Arun Isaac

gnu/packages/web.scm (gmnisrv)[arguments]<#:phases>: Undelete check
phase, and...
<#:tests?>: ...disable tests here instead.
---
 gnu/packages/web.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index f229397db4..0ac13112c2 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7983,13 +7983,13 @@ solution for any project's interface needs:
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-       `(#:phases
+       `(#:tests? #f ; no check target
+         #:phases
          (modify-phases %standard-phases
            (add-before 'configure 'set-variables
              (lambda _
                (setenv "CC" "gcc")
-               #t))
-           (delete 'check))))
+               #t)))))
       (inputs
        `(("openssl" ,openssl)))
       (native-inputs
-- 
2.31.1





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

* [bug#49705] [PATCH v2 2/4] gnu: gmnisrv: Use #:make-flags, and cross-compile.
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests? Sarah Morgensen
@ 2021-07-25 20:39   ` Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 3/4] gnu: gmnisrv: Remove dependency on /etc/mime.types Sarah Morgensen
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-25 20:39 UTC (permalink / raw)
  To: 49705; +Cc: Arun Isaac

gnu/packages/web.scm (gmnisrv)[arguments]<#:phases>{set-variables}: Move
'CC=' to...
<#:make-flags>: ...here, and support cross-compile with (cc-for-target).
---
 gnu/packages/web.scm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0ac13112c2..b106e7c8b6 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7984,12 +7984,8 @@ solution for any project's interface needs:
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f ; no check target
-         #:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'set-variables
-             (lambda _
-               (setenv "CC" "gcc")
-               #t)))))
+         #:make-flags
+         (list (string-append "CC=" ,(cc-for-target)))))
       (inputs
        `(("openssl" ,openssl)))
       (native-inputs
-- 
2.31.1





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

* [bug#49705] [PATCH v2 3/4] gnu: gmnisrv: Remove dependency on /etc/mime.types.
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests? Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 2/4] gnu: gmnisrv: Use #:make-flags, and cross-compile Sarah Morgensen
@ 2021-07-25 20:39   ` Sarah Morgensen
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 4/4] gnu: gmnisrv: Fix configuration search path Sarah Morgensen
  2021-07-26 21:18   ` bug#49705: [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags Arun Isaac
  4 siblings, 0 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-25 20:39 UTC (permalink / raw)
  To: 49705; +Cc: Arun Isaac

Remove the dependency on /etc/mime.types (fixes #49233).

gnu/packages/web.scm (gmnisrv)[arguments]<#:configure-flags>: Set
--with-mimedb to directly use mime.types from mailcap.
[propagated-inputs]: Move mailcap to...
[inputs]: ...here (/etc/mime.types no longer need in profiles).
---
 gnu/packages/web.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index b106e7c8b6..61465c5d44 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7984,15 +7984,18 @@ solution for any project's interface needs:
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f ; no check target
+         #:configure-flags
+         (list (string-append "--with-mimedb="
+                              (assoc-ref %build-inputs "mailcap")
+                              "/etc/mime.types"))
          #:make-flags
          (list (string-append "CC=" ,(cc-for-target)))))
       (inputs
-       `(("openssl" ,openssl)))
+       `(("mailcap" ,mailcap)
+         ("openssl" ,openssl)))
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("scdoc" ,scdoc)))
-      (propagated-inputs
-       `(("mailcap" ,mailcap)))
       (synopsis "Simple Gemini protocol server")
       (description "gmnisrv is a simple Gemini protocol server written in C.")
       (license (list license:gpl3+
-- 
2.31.1





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

* [bug#49705] [PATCH v2 4/4] gnu: gmnisrv: Fix configuration search path.
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
                     ` (2 preceding siblings ...)
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 3/4] gnu: gmnisrv: Remove dependency on /etc/mime.types Sarah Morgensen
@ 2021-07-25 20:39   ` Sarah Morgensen
  2021-07-26 21:18   ` bug#49705: [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags Arun Isaac
  4 siblings, 0 replies; 8+ messages in thread
From: Sarah Morgensen @ 2021-07-25 20:39 UTC (permalink / raw)
  To: 49705; +Cc: Arun Isaac

Look in /etc for configuration files rather than
/gnu/store/...-gmnisrv.../etc.

gnu/packages/web.scm (gmnisrv)[arguments]<#:configure-flags>: Set
--sysconfdir.
---
 gnu/packages/web.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 61465c5d44..e209f9d21d 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7985,7 +7985,8 @@ solution for any project's interface needs:
       (arguments
        `(#:tests? #f ; no check target
          #:configure-flags
-         (list (string-append "--with-mimedb="
+         (list "--sysconfdir=/etc"
+               (string-append "--with-mimedb="
                               (assoc-ref %build-inputs "mailcap")
                               "/etc/mime.types"))
          #:make-flags
-- 
2.31.1





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

* bug#49705: [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags.
  2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
                     ` (3 preceding siblings ...)
  2021-07-25 20:39   ` [bug#49705] [PATCH v2 4/4] gnu: gmnisrv: Fix configuration search path Sarah Morgensen
@ 2021-07-26 21:18   ` Arun Isaac
  4 siblings, 0 replies; 8+ messages in thread
From: Arun Isaac @ 2021-07-26 21:18 UTC (permalink / raw)
  To: Sarah Morgensen, 49705-done

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


Hi Sarah,

> Same as before, but with s/gcc/(cc-for-target)/, and split apart.

Thank you! Pushed with only minor cosmetic changes.

> (and the copyright line; how do I still forget?)

I forget sometimes too. We really need a patch linter to check for this.

Regards,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

end of thread, other threads:[~2021-07-26 21:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-23  8:07 [bug#49705] [PATCH] gnu: gmnisrv: Fix configure flags Sarah Morgensen
2021-07-25 14:23 ` Arun Isaac
2021-07-25 20:37 ` [bug#49705] [PATCH v2 0/4] " Sarah Morgensen
2021-07-25 20:39   ` [bug#49705] [PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests? Sarah Morgensen
2021-07-25 20:39   ` [bug#49705] [PATCH v2 2/4] gnu: gmnisrv: Use #:make-flags, and cross-compile Sarah Morgensen
2021-07-25 20:39   ` [bug#49705] [PATCH v2 3/4] gnu: gmnisrv: Remove dependency on /etc/mime.types Sarah Morgensen
2021-07-25 20:39   ` [bug#49705] [PATCH v2 4/4] gnu: gmnisrv: Fix configuration search path Sarah Morgensen
2021-07-26 21:18   ` bug#49705: [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags Arun Isaac

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).