nginx-rtmp-module not compatible with nginx

  • Done
  • quality assurance status badge
Details
3 participants
  • Jack Hill
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Jack Hill
Severity
normal
J
J
Jack Hill wrote on 4 May 2022 06:19
(address . bug-guix@gnu.org)
alpine.DEB.2.21.2205040013230.11587@marsh.hcoop.net
X-Debbugs-CC: mail@cbaines.net

Hi Guix,

nginx currently (Guix commit b80ca672de936a76368de6e6ea0b28505e74d420)
fails to load the nginx-rtmp-module build from the same Guix commit with
the following message:

[emerg] 3823#0: module "/gnu/store/qnk6k7wa25w0bk5v8fb6iv524imlm58s-nginx-rtmp-module-1.2.2/etc/nginx/modules/ngx_rtmp_module.so" is not binary compatible in /gnu/store/mz0bck7ha0iqgi1bv4k14b36ycs3bz6k-nginx.conf:1

I wonder if this problem was introduced with the recent nginx changes
(e.g. a14c6352662bfa6715ec70b3d280a6d1d599ad0c)

Best,
Jack
J
J
Jack Hill wrote on 17 May 2022 07:32
(address . 55253@debbugs.gnu.org)(name . Marius Bakke)(address . marius@gnu.org)
alpine.DEB.2.21.2205170128470.11587@marsh.hcoop.net
On Wed, 4 May 2022, Jack Hill wrote:

Toggle quote (19 lines)
> X-Debbugs-CC: mail@cbaines.net
>
> Hi Guix,
>
> nginx currently (Guix commit b80ca672de936a76368de6e6ea0b28505e74d420) fails
> to load the nginx-rtmp-module build from the same Guix commit with the
> following message:
>
> [emerg] 3823#0: module
> "/gnu/store/qnk6k7wa25w0bk5v8fb6iv524imlm58s-nginx-rtmp-module-1.2.2/etc/nginx/modules/ngx_rtmp_module.so"
> is not binary compatible in
> /gnu/store/mz0bck7ha0iqgi1bv4k14b36ycs3bz6k-nginx.conf:1
>
> I wonder if this problem was introduced with the recent nginx changes (e.g.
> a14c6352662bfa6715ec70b3d280a6d1d599ad0c)
>
> Best,
> Jack

The problem seems to actually have been introduced with
c9ce02ecff769449bb79f9f0db33c69e2c7564f0 "nginx: Respect
#:configure-flags". I suspect that now that the #:configure-flags are
being respected they've gotten out of sync with nginx-rtmp-module (which
probably only worked by change before). The likely solution is to find a
way to re-use the #:configure-flags from the nginx package.

Best,
Jack
J
J
Jack Hill wrote on 22 May 2022 07:46
fix for nginx-rtmp-module available
(address . control@debbugs.gnu.org)
alpine.DEB.2.21.2205220145410.11587@marsh.hcoop.net
reassign 55253 guix-patches
tags 55253 patch
J
J
Jack Hill wrote on 22 May 2022 07:50
[PATCH 0/2] nginx-rtmp-module use nginx's #:configure-flags and update to gexps in phases
(address . 55253@debbugs.gnu.org)
alpine.DEB.2.21.2205220148470.11587@marsh.hcoop.net
These patches buils the nginx-rtmp-module with the same #:configure-flags
as the nginx package, which fixes the incompatible module problem, and
update the #:phases to use gexps instead of `assoc-ref`

Jack Hill (2):
gnu: nginx-rtmp-module: Use #:configure-flags from nginx.
gnu: nginx-rtmp-module: Use gexps in phases.

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

--
2.36.1
J
J
Jack Hill wrote on 22 May 2022 07:51
[PATCH 1/2] gnu: nginx-rtmp-module: Use #:configure-flags from nginx.
(address . 55253@debbugs.gnu.org)
20220522055157.31807-1-jackhill@jackhill.us
* gnu/packages/web.scm (nginx-rtmp-module)[arguments]: Simplify copying
of arguments from nginx and augment #:configure-flags from nginx
rather than overwriting.
---
gnu/packages/web.scm | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 600ef0c895..50401c07e1 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
`(("nginx-sources" ,(package-source nginx))
,@(package-inputs nginx)))
(arguments
- (substitute-keyword-arguments
- `(#:make-flags '("modules")
- #:modules ((guix build utils)
- (guix build gnu-build-system))
- ,@(package-arguments nginx)
- #:configure-flags '("--add-dynamic-module=."))
+ (substitute-keyword-arguments (package-arguments nginx)
+ ((#:configure-flags flags)
+ #~(cons "--add-dynamic-module=." #$flags))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-nginx-sources
--
2.36.1
J
J
Jack Hill wrote on 22 May 2022 07:51
[PATCH 2/2] gnu: nginx-rtmp-module: Use gexps in phases.
(address . 55253@debbugs.gnu.org)
20220522055157.31807-2-jackhill@jackhill.us
* gnu/packages/web.scm (nginx-rtmp-module)[#:phases]: Use gexps and
remove trailing #t.
---
gnu/packages/web.scm | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 50401c07e1..c93af29a93 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -791,24 +791,22 @@ (define-public nginx-rtmp-module
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-nginx-sources
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (lambda _
(begin
;; The nginx source code is part of the module’s source.
(format #t "decompressing nginx source code~%")
- (invoke "tar" "xvf" (assoc-ref inputs "nginx-sources")
+ (invoke "tar" "xvf" #$(this-package-input "nginx-sources")
;; This package's LICENSE file would be
;; overwritten with the one from nginx when
;; unpacking the nginx source, so rename the nginx
;; one when unpacking.
"--transform=s,/LICENSE$,/LICENSE.nginx,"
- "--strip-components=1")
- #t)))
+ "--strip-components=1"))))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((modules-dir (string-append (assoc-ref outputs "out")
+ (lambda _
+ (let ((modules-dir (string-append #$output
"/etc/nginx/modules")))
- (install-file "objs/ngx_rtmp_module.so" modules-dir)
- #t)))
+ (install-file "objs/ngx_rtmp_module.so" modules-dir))))
(delete 'fix-root-dirs)
(delete 'install-man-page)))))
(home-page "https://github.com/arut/nginx-rtmp-module")
--
2.36.1
L
L
Ludovic Courtès wrote on 23 May 2022 14:57
Re: bug#55253: nginx-rtmp-module not compatible with nginx
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 55253@debbugs.gnu.org)
871qwk8kyx.fsf_-_@gnu.org
Hi Jack,

Jack Hill <jackhill@jackhill.us> skribis:

Toggle quote (25 lines)
> * gnu/packages/web.scm (nginx-rtmp-module)[arguments]: Simplify copying
> of arguments from nginx and augment #:configure-flags from nginx
> rather than overwriting.
> ---
> gnu/packages/web.scm | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 600ef0c895..50401c07e1 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
> `(("nginx-sources" ,(package-source nginx))
> ,@(package-inputs nginx)))
> (arguments
> - (substitute-keyword-arguments
> - `(#:make-flags '("modules")
> - #:modules ((guix build utils)
> - (guix build gnu-build-system))
> - ,@(package-arguments nginx)
> - #:configure-flags '("--add-dynamic-module=."))
> + (substitute-keyword-arguments (package-arguments nginx)
> + ((#:configure-flags flags)
> + #~(cons "--add-dynamic-module=." #$flags))

If I’m not mistaken, #:make-flags and #:modules are lost here, no?
Or were they unnecessary in the first place?

Thanks,
Ludo’.
J
J
Jack Hill wrote on 23 May 2022 16:11
Re: [bug#55253] nginx-rtmp-module not compatible with nginx
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 55253@debbugs.gnu.org)
alpine.DEB.2.21.2205231007310.11587@marsh.hcoop.net
On Mon, 23 May 2022, Ludovic Courtès wrote:

Toggle quote (23 lines)
> Jack Hill <jackhill@jackhill.us> skribis:
>>
>> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
>> index 600ef0c895..50401c07e1 100644
>> --- a/gnu/packages/web.scm
>> +++ b/gnu/packages/web.scm
>> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
>> `(("nginx-sources" ,(package-source nginx))
>> ,@(package-inputs nginx)))
>> (arguments
>> - (substitute-keyword-arguments
>> - `(#:make-flags '("modules")
>> - #:modules ((guix build utils)
>> - (guix build gnu-build-system))
>> - ,@(package-arguments nginx)
>> - #:configure-flags '("--add-dynamic-module=."))
>> + (substitute-keyword-arguments (package-arguments nginx)
>> + ((#:configure-flags flags)
>> + #~(cons "--add-dynamic-module=." #$flags))
>
> If I’m not mistaken, #:make-flags and #:modules are lost here, no?
> Or were they unnecessary in the first place?

You are not mistaken, they are lost. They do seem to be unnecessary
though. nginx is able to load and make use of the module without them.

Best,
Jack
J
J
Jack Hill wrote on 27 May 2022 04:02
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 55253@debbugs.gnu.org)
alpine.DEB.2.21.2205262201320.11587@marsh.hcoop.net
On Mon, 23 May 2022, Jack Hill wrote:

Toggle quote (28 lines)
> On Mon, 23 May 2022, Ludovic Courtès wrote:
>
>> Jack Hill <jackhill@jackhill.us> skribis:
>>>
>>> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
>>> index 600ef0c895..50401c07e1 100644
>>> --- a/gnu/packages/web.scm
>>> +++ b/gnu/packages/web.scm
>>> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
>>> `(("nginx-sources" ,(package-source nginx))
>>> ,@(package-inputs nginx)))
>>> (arguments
>>> - (substitute-keyword-arguments
>>> - `(#:make-flags '("modules")
>>> - #:modules ((guix build utils)
>>> - (guix build gnu-build-system))
>>> - ,@(package-arguments nginx)
>>> - #:configure-flags '("--add-dynamic-module=."))
>>> + (substitute-keyword-arguments (package-arguments nginx)
>>> + ((#:configure-flags flags)
>>> + #~(cons "--add-dynamic-module=." #$flags))
>>
>> If I’m not mistaken, #:make-flags and #:modules are lost here, no?
>> Or were they unnecessary in the first place?
>
> You are not mistaken, they are lost. They do seem to be unnecessary though.
> nginx is able to load and make use of the module without them.

I realized the value of the make-flags. It saves effort when building, as
only the module is build not all of nginx again. The output is identical.
I'll send a v2 with those added back. I still don't see the value of the
modules.

Best,
Jack
J
J
Jack Hill wrote on 27 May 2022 04:04
[PATCH v2 1/2] gnu: nginx-rtmp-module: Use #:configure-flags from nginx.
(address . 55253@debbugs.gnu.org)
20220527020404.6603-1-jackhill@jackhill.us
* gnu/packages/web.scm (nginx-rtmp-module)[arguments]: Simplify copying
of arguments from nginx and augment #:configure-flags from nginx
rather than overwriting.
---
gnu/packages/web.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ffcb709e82..e349a863d5 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -793,11 +793,10 @@ (define-public nginx-rtmp-module
,@(package-inputs nginx)))
(arguments
(substitute-keyword-arguments
- `(#:make-flags '("modules")
- #:modules ((guix build utils)
- (guix build gnu-build-system))
- ,@(package-arguments nginx)
- #:configure-flags '("--add-dynamic-module=."))
+ `(#:make-flags '("modules") ;Only build this module not all of nginx.
+ ,@(package-arguments nginx))
+ ((#:configure-flags flags)
+ #~(cons "--add-dynamic-module=." #$flags))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-nginx-sources
--
2.36.1
J
J
Jack Hill wrote on 27 May 2022 04:04
[PATCH v2 2/2] gnu: nginx-rtmp-module: Use gexps in phases.
(address . 55253@debbugs.gnu.org)
20220527020404.6603-2-jackhill@jackhill.us
* gnu/packages/web.scm (nginx-rtmp-module)[#:phases]: Use gexps and
remove trailing #t.
---
gnu/packages/web.scm | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e349a863d5..d321348eed 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -800,24 +800,22 @@ (define-public nginx-rtmp-module
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-nginx-sources
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (lambda _
(begin
;; The nginx source code is part of the module’s source.
(format #t "decompressing nginx source code~%")
- (invoke "tar" "xvf" (assoc-ref inputs "nginx-sources")
+ (invoke "tar" "xvf" #$(this-package-input "nginx-sources")
;; This package's LICENSE file would be
;; overwritten with the one from nginx when
;; unpacking the nginx source, so rename the nginx
;; one when unpacking.
"--transform=s,/LICENSE$,/LICENSE.nginx,"
- "--strip-components=1")
- #t)))
+ "--strip-components=1"))))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((modules-dir (string-append (assoc-ref outputs "out")
+ (lambda _
+ (let ((modules-dir (string-append #$output
"/etc/nginx/modules")))
- (install-file "objs/ngx_rtmp_module.so" modules-dir)
- #t)))
+ (install-file "objs/ngx_rtmp_module.so" modules-dir))))
(delete 'fix-root-dirs)
(delete 'install-man-page)))))
(home-page "https://github.com/arut/nginx-rtmp-module")
--
2.36.1
C
C
Christopher Baines wrote on 27 May 2022 15:01
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 55253@debbugs.gnu.org)
87mtf3ruwi.fsf@cbaines.net
I've pushed these two patches as
0e953f3332cc862b08ecb2342bdac9976dd6d08c and
0e953f3332cc862b08ecb2342bdac9976dd6d08c now.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmKQy81fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XceTxAAt2udFxar0dMBL/bwp7tupc6kfwpjAaFE
LSV5wJKfEEAtf7ECZitj5OXwE8K+ED8GU6j85tAYUnPM7TtCeLmXy7HxzC5PZDx2
xWdpEPNzDp2osr5XJ4klkqr9dpZc9P2tcD9EwMaWWV7f2ulC5K3SupHNhsiKhzyZ
htgPPLTt5Zio6D9y07bHKe2ppX/l1dqmqFDFqPqXB6938shEVYhdRO67tE/n9ghT
Rhq4twhG+P0AfJisu7wQ8YdYkiG4lZCnyOJXCub+Qp6fHToPWctncpOo55Y4yXTh
+keb+Fs2TkuDOdLum+48jOyxbvYewyv8c5B09td7GEI6EqUqz+cWeJSgU2PKOc9m
2Y0cn+aQl7XxOoF/ss3Zp3GaJ5gS82oEQrLoDoXeSBoX+uvy2uLhar8DHM7Y4q76
6X5GanihUj/UE+kFnue7UXwyZD8DRvABbs2LNkPELDTO0KucBaurlL6R+zE1KCOn
AdgN6rvnynZSYR4gkq8G/y66EQvHazaWtVzRcCy7dZDEUcOX6UW5f60G8vWQBXp/
EQbkd+V/RC3vqmilJGy45/1wimaJSsIKvam0KTzyMFNrSbo+LyEbCJOl+LSSZnSA
qZGSZRJyqMniMJCls9B0Uj7MCJD82YOAUZntHchn3V88P4o8bMfq4CkLhn+0T0AR
c8otu4N1kIM=
=/FAG
-----END PGP SIGNATURE-----

J
J
Jack Hill wrote on 27 May 2022 23:47
(name . Christopher Baines)(address . mail@cbaines.net)(address . 55253-done@debbugs.gnu.org)
alpine.DEB.2.21.2205271746230.11587@marsh.hcoop.net
On Fri, 27 May 2022, Christopher Baines wrote:

Toggle quote (8 lines)
> I've pushed these two patches as
> 0e953f3332cc862b08ecb2342bdac9976dd6d08c and
> 0e953f3332cc862b08ecb2342bdac9976dd6d08c now.
>
> Thanks,
>
> Chris

Thanks, and closing!
Jack
Closed
?