[PATCH] gnu: gmnisrv: Fix configure flags.

DoneSubmitted by Sarah Morgensen.
Details
2 participants
  • Arun Isaac
  • Sarah Morgensen
Owner
unassigned
Severity
normal
S
S
Sarah Morgensen wrote on 23 Jul 10:07 +0200
(address . guix-patches@gnu.org)
7109666ab6ca0797c583fe62942342a9b0a1be89.1627027028.git.iskarian@mgsn.dev
Remove the dependency on /etc/mime.types (fixes #49233). Look in /etcfor 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(-)
Toggle diff (38 lines)diff --git a/gnu/packages/web.scm b/gnu/packages/web.scmindex 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
A
A
Arun Isaac wrote on 25 Jul 16:23 +0200
87fsw2fp5a.fsf@systemreboot.net
Hi Sarah,
Thank you for improving our gmnisrv package!
Toggle quote (2 lines)> + #:make-flags '("CC=gcc")))
This should be (list (string-append "CC=" ,(cc-for-target))) so that thepackage cross-compiles correctly. Hard-coding CC=gcc is now deprecatedpractice.
I also feel that this patch should be split into at least two patches ormaybe even three. This way, the first line summary in the commit messageis 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 bitexcessive.
Thanks,Arun
-----BEGIN PGP SIGNATURE-----
iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmD9c/EbHGFydW5pc2FhY0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzr88H/1kGJwknOwWBPc2LTOOrUv9w2JknRK19qWqFbSnOax4HndMVbHdqWyu7ZARDX5wflCay8eY53HUNrJ5Q+xWhmsxwfifYmInyvhSN3+7X7LsotjKOQx4M61CpksBHS7ojgfBqpGmiitRJUDt78NGw8rTdJJU/VIY7JuzwN+H2tF0SMIIluSQK3algEIuXku/HT163PKSjv1Fk1vAAD0aCJTddtBYc/t3lD5+R5uD+y6MpffONikbPVkYwaJnTgd64nTssStsITi5cuPdeYGyDGCb0HKWRmfGQRXUP7zXkzgNLl4HI1/335lVcm3T3ChrXi490Sp4fivkVxXwJydhz5v8==135u-----END PGP SIGNATURE-----
S
S
Sarah Morgensen wrote on 25 Jul 22:37 +0200
[PATCH v2 0/4] gnu: gmnisrv: Fix configure flags.
(address . 49705@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
cover.1627244897.git.iskarian@mgsn.dev
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 stillforget?)
--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
S
S
Sarah Morgensen wrote on 25 Jul 22:39 +0200
[PATCH v2 1/4] gnu: gmnisrv: Disable tests using #:tests?.
(address . 49705@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
de67b995eccd49ee1cfb0b0c31cf5d731a550d66.1627244897.git.iskarian@mgsn.dev
gnu/packages/web.scm (gmnisrv)[arguments]<#:phases>: Undelete checkphase, and...<#:tests?>: ...disable tests here instead.--- gnu/packages/web.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Toggle diff (23 lines)diff --git a/gnu/packages/web.scm b/gnu/packages/web.scmindex 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
S
S
Sarah Morgensen wrote on 25 Jul 22:39 +0200
[PATCH v2 2/4] gnu: gmnisrv: Use #:make-flags, and cross-compile.
(address . 49705@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
14a188df95b64c0c6d8007b9a8a63c81860d8df5.1627244897.git.iskarian@mgsn.dev
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(-)
Toggle diff (21 lines)diff --git a/gnu/packages/web.scm b/gnu/packages/web.scmindex 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
S
S
Sarah Morgensen wrote on 25 Jul 22:39 +0200
[PATCH v2 3/4] gnu: gmnisrv: Remove dependency on /etc/mime.types.
(address . 49705@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
b575b1136009376fbd970ff2e420fa178d33ca03.1627244897.git.iskarian@mgsn.dev
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(-)
Toggle diff (28 lines)diff --git a/gnu/packages/web.scm b/gnu/packages/web.scmindex 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
S
S
Sarah Morgensen wrote on 25 Jul 22:39 +0200
[PATCH v2 4/4] gnu: gmnisrv: Fix configuration search path.
(address . 49705@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
ca9c10f4a84350e2fd4ca8737027d12159cceacb.1627244897.git.iskarian@mgsn.dev
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(-)
Toggle diff (16 lines)diff --git a/gnu/packages/web.scm b/gnu/packages/web.scmindex 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
A
A
Arun Isaac wrote on 26 Jul 23:18 +0200
Re: [PATCH v2 0/4] gnu: gmnisrv: Fix configure flags.
871r7kg4ex.fsf@systemreboot.net
Hi Sarah,
Toggle quote (2 lines)> Same as before, but with s/gcc/(cc-for-target)/, and split apart.
Thank you! Pushed with only minor cosmetic changes.
Toggle quote (2 lines)> (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
-----BEGIN PGP SIGNATURE-----
iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmD/JqYbHGFydW5pc2FhY0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzVpEH/ROuJT4SJiNFEprkxtoo2KpAE9m596ZuSl35PyzofQI11/Kdwz58H3yQLoZJcza5szf8VoOJkXhMUGdu/z655L/Z0C2N6GGRz3P8s2qUrpsnrA4t7jfftv3ig0Jucvkfyg83RhlUiypnuJgoOmN7jsap/kGZA+AB6UGhGnuKWyqzj8FRAx4GwQf+UeiMOiTwxzEW9wULY2fdghVsYZU3TDlZlHVWjBqXdB4HI7bOB7bRl7/9ZEkREVzNm8H38xcjL49QWgwNRN46JSX48EZUXmDswvp44C/FboYD26zbArUbsVrtPJR3VieVYB1SO1frYWXyjQ8vnUh+sFKY0XDOxsM==Ks7X-----END PGP SIGNATURE-----
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 49705@debbugs.gnu.org