* [PATCHES] gnu: nginx: Clean up installation directories.
@ 2015-04-05 16:37 David Thompson
2015-04-05 17:00 ` David Thompson
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: David Thompson @ 2015-04-05 16:37 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
Two patches below. One to rewrite the phases using modify-phases
syntax, and the other to clean up the mess that 'make install' creates.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-nginx-Use-modify-phases-syntax.patch --]
[-- Type: text/x-diff, Size: 4191 bytes --]
From 81adae7d0de6e6d9213b81dc6a8747bfc6487420 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Sun, 5 Apr 2015 12:31:54 -0400
Subject: [PATCH 1/2] gnu: nginx: Use modify-phases syntax.
* gnu/packages/web.scm (nginx): Use modify-phases syntax.
---
gnu/packages/web.scm | 62 +++++++++++++++++++++++++---------------------------
1 file changed, 30 insertions(+), 32 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 42d58c8..031bbca 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -108,38 +108,36 @@ and its related documentation.")
(arguments
`(#:tests? #f ; no test target
#:phases
- (alist-cons-before
- 'configure 'patch-/bin/sh
- (lambda _
- (substitute* "auto/feature"
- (("/bin/sh") (which "bash"))))
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((flags
- (list (string-append "--prefix=" (assoc-ref outputs "out"))
- "--with-http_ssl_module"
- "--with-pcre-jit"
- "--with-ipv6"
- "--with-debug"
- ;; Even when not cross-building, we pass the
- ;; --crossbuild option to avoid customizing for the
- ;; kernel version on the build machine.
- ,(let ((system "Linux") ; uname -s
- (release "2.6.32") ; uname -r
- ;; uname -m
- (machine (match (or (%current-target-system)
- (%current-system))
- ("x86_64-linux" "x86_64")
- ("i686-linux" "i686")
- ("mips64el-linux" "mips64"))))
- (string-append "--crossbuild="
- system ":" release ":" machine)))))
- (setenv "CC" "gcc")
- (format #t "environment variable `CC' set to `gcc'~%")
- (format #t "configure flags: ~s~%" flags)
- (zero? (apply system* "./configure" flags))))
- %standard-phases))))
+ (modify-phases %standard-phases
+ (add-before configure patch-/bin/sh
+ (lambda _
+ (substitute* "auto/feature"
+ (("/bin/sh") (which "bash")))))
+ (replace configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((flags
+ (list (string-append "--prefix=" (assoc-ref outputs "out"))
+ "--with-http_ssl_module"
+ "--with-pcre-jit"
+ "--with-ipv6"
+ "--with-debug"
+ ;; Even when not cross-building, we pass the
+ ;; --crossbuild option to avoid customizing for the
+ ;; kernel version on the build machine.
+ ,(let ((system "Linux") ; uname -s
+ (release "2.6.32") ; uname -r
+ ;; uname -m
+ (machine (match (or (%current-target-system)
+ (%current-system))
+ ("x86_64-linux" "x86_64")
+ ("i686-linux" "i686")
+ ("mips64el-linux" "mips64"))))
+ (string-append "--crossbuild="
+ system ":" release ":" machine)))))
+ (setenv "CC" "gcc")
+ (format #t "environment variable `CC' set to `gcc'~%")
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags))))))))
(home-page "http://nginx.org")
(synopsis "HTTP and reverse proxy server")
(description
--
2.1.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-nginx-Clean-up-installation-directories.patch --]
[-- Type: text/x-diff, Size: 1957 bytes --]
From 6757351ece10cafc5e9c04f5778e6ba6334979d5 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Sun, 5 Apr 2015 12:34:45 -0400
Subject: [PATCH 2/2] gnu: nginx: Clean up installation directories.
* gnu/packages/web.scm (nginx): Add 'fix-root-dirs' phase.
---
gnu/packages/web.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 031bbca..c41e9ba 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -137,7 +137,25 @@ and its related documentation.")
(setenv "CC" "gcc")
(format #t "environment variable `CC' set to `gcc'~%")
(format #t "configure flags: ~s~%" flags)
- (zero? (apply system* "./configure" flags))))))))
+ (zero? (apply system* "./configure" flags)))))
+ (add-after install fix-root-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; 'make install' puts things in strange places, so we need to
+ ;; clean it up ourselves.
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/nginx")))
+ ;; This directory is empty, so get rid of it.
+ (rmdir (string-append out "/logs"))
+ ;; Example configuration and HTML files belong in
+ ;; /share.
+ (mkdir-p share)
+ (rename-file (string-append out "/conf")
+ (string-append share "/conf"))
+ (rename-file (string-append out "/html")
+ (string-append share "/html"))
+ ;; No reason to use /sbin
+ (rename-file (string-append out "/sbin")
+ (string-append out "/bin"))))))))
(home-page "http://nginx.org")
(synopsis "HTTP and reverse proxy server")
(description
--
2.1.4
[-- Attachment #4: Type: text/plain, Size: 136 bytes --]
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 16:37 [PATCHES] gnu: nginx: Clean up installation directories David Thompson
@ 2015-04-05 17:00 ` David Thompson
2015-04-05 20:02 ` Mark H Weaver
2015-04-05 19:58 ` Mark H Weaver
2015-04-05 20:53 ` Ludovic Courtès
2 siblings, 1 reply; 7+ messages in thread
From: David Thompson @ 2015-04-05 17:00 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 64 bytes --]
While we're at it, how about we upgrade to the latest release?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-nginx-Update-to-1.7.11.patch --]
[-- Type: text/x-diff, Size: 1077 bytes --]
From c25aa2aaf1ba54dfdc1cac1f05af3ea14c24d493 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Sun, 5 Apr 2015 12:58:46 -0400
Subject: [PATCH] gnu: nginx: Update to 1.7.11.
---
gnu/packages/web.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index c41e9ba..2497a9f 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -93,14 +93,14 @@ and its related documentation.")
(define-public nginx
(package
(name "nginx")
- (version "1.6.2")
+ (version "1.7.11")
(source (origin
(method url-fetch)
(uri (string-append "http://nginx.org/download/nginx-"
version ".tar.gz"))
(sha256
(base32
- "060s77qxhkn02fjkcndsr0xppj2bppjzkj0gn84svrykb4lqqq5m"))))
+ "15cnlrhiqklqfzwfspkp0i6g04zdhc092dh593yqnqqf450dgnfs"))))
(build-system gnu-build-system)
(inputs `(("pcre" ,pcre)
("openssl" ,openssl)
--
2.1.4
[-- Attachment #3: Type: text/plain, Size: 136 bytes --]
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 17:00 ` David Thompson
@ 2015-04-05 20:02 ` Mark H Weaver
2015-04-05 20:11 ` David Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2015-04-05 20:02 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
David Thompson <dthompson2@worcester.edu> writes:
> While we're at it, how about we upgrade to the latest release?
[...]
> - (version "1.6.2")
> + (version "1.7.11")
1.6 is a stable branch and 1.7 is a development branch. I would prefer
to stick with the stable branch. We could add 1.7 if you want (maybe
with variable name 'nginx-devel'), but we should keep 1.6 as well.
Thanks,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 20:02 ` Mark H Weaver
@ 2015-04-05 20:11 ` David Thompson
0 siblings, 0 replies; 7+ messages in thread
From: David Thompson @ 2015-04-05 20:11 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> David Thompson <dthompson2@worcester.edu> writes:
>
>> While we're at it, how about we upgrade to the latest release?
> [...]
>> - (version "1.6.2")
>> + (version "1.7.11")
>
> 1.6 is a stable branch and 1.7 is a development branch. I would prefer
> to stick with the stable branch. We could add 1.7 if you want (maybe
> with variable name 'nginx-devel'), but we should keep 1.6 as well.
Oh, so it is. Nevermind, then.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 16:37 [PATCHES] gnu: nginx: Clean up installation directories David Thompson
2015-04-05 17:00 ` David Thompson
@ 2015-04-05 19:58 ` Mark H Weaver
2015-04-05 20:16 ` David Thompson
2015-04-05 20:53 ` Ludovic Courtès
2 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2015-04-05 19:58 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
David Thompson <dthompson2@worcester.edu> writes:
> From 81adae7d0de6e6d9213b81dc6a8747bfc6487420 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Sun, 5 Apr 2015 12:31:54 -0400
> Subject: [PATCH 1/2] gnu: nginx: Use modify-phases syntax.
Okay.
> From 6757351ece10cafc5e9c04f5778e6ba6334979d5 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Sun, 5 Apr 2015 12:34:45 -0400
> Subject: [PATCH 2/2] gnu: nginx: Clean up installation directories.
>
> * gnu/packages/web.scm (nginx): Add 'fix-root-dirs' phase.
> ---
> gnu/packages/web.scm | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 031bbca..c41e9ba 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -137,7 +137,25 @@ and its related documentation.")
> (setenv "CC" "gcc")
> (format #t "environment variable `CC' set to `gcc'~%")
> (format #t "configure flags: ~s~%" flags)
> - (zero? (apply system* "./configure" flags))))))))
> + (zero? (apply system* "./configure" flags)))))
> + (add-after install fix-root-dirs
> + (lambda* (#:key outputs #:allow-other-keys)
> + ;; 'make install' puts things in strange places, so we need to
> + ;; clean it up ourselves.
> + (let* ((out (assoc-ref outputs "out"))
> + (share (string-append out "/share/nginx")))
> + ;; This directory is empty, so get rid of it.
> + (rmdir (string-append out "/logs"))
> + ;; Example configuration and HTML files belong in
> + ;; /share.
> + (mkdir-p share)
> + (rename-file (string-append out "/conf")
> + (string-append share "/conf"))
> + (rename-file (string-append out "/html")
> + (string-append share "/html"))
Okay.
> + ;; No reason to use /sbin
> + (rename-file (string-append out "/sbin")
> + (string-append out "/bin"))))))))
I would prefer to avoid diverging from upstream without good reason, and
I don't see a good reason for this change.
What do you think?
Okay to push everything here except for the /sbin -> /bin change.
Thanks!
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 19:58 ` Mark H Weaver
@ 2015-04-05 20:16 ` David Thompson
0 siblings, 0 replies; 7+ messages in thread
From: David Thompson @ 2015-04-05 20:16 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> David Thompson <dthompson2@worcester.edu> writes:
>
>> + ;; No reason to use /sbin
>> + (rename-file (string-append out "/sbin")
>> + (string-append out "/bin"))))))))
>
> I would prefer to avoid diverging from upstream without good reason, and
> I don't see a good reason for this change.
>
> What do you think?
>
> Okay to push everything here except for the /sbin -> /bin change.
Fair enough. Pushed everything but that.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHES] gnu: nginx: Clean up installation directories.
2015-04-05 16:37 [PATCHES] gnu: nginx: Clean up installation directories David Thompson
2015-04-05 17:00 ` David Thompson
2015-04-05 19:58 ` Mark H Weaver
@ 2015-04-05 20:53 ` Ludovic Courtès
2 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2015-04-05 20:53 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
David Thompson <dthompson2@worcester.edu> skribis:
> From 81adae7d0de6e6d9213b81dc6a8747bfc6487420 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Sun, 5 Apr 2015 12:31:54 -0400
> Subject: [PATCH 1/2] gnu: nginx: Use modify-phases syntax.
>
> * gnu/packages/web.scm (nginx): Use modify-phases syntax.
OK (note that in ‘core-updates’ ‘modify-phases’ no longer introduces
quotes so we’ll have to update it.)
> From 6757351ece10cafc5e9c04f5778e6ba6334979d5 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Sun, 5 Apr 2015 12:34:45 -0400
> Subject: [PATCH 2/2] gnu: nginx: Clean up installation directories.
>
> * gnu/packages/web.scm (nginx): Add 'fix-root-dirs' phase.
LGTM!
OK for the upgrade as well.
Thank you,
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-05 20:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05 16:37 [PATCHES] gnu: nginx: Clean up installation directories David Thompson
2015-04-05 17:00 ` David Thompson
2015-04-05 20:02 ` Mark H Weaver
2015-04-05 20:11 ` David Thompson
2015-04-05 19:58 ` Mark H Weaver
2015-04-05 20:16 ` David Thompson
2015-04-05 20:53 ` Ludovic Courtès
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.