diff mbox series

[bug#66823,gnome-team,2/4] gnu: Add sofia-sip.

Message ID b69d2cb94772d5a430d91ed0ac644f584c425f33.1698597871.git.vivien@planete-kraus.eu
State New
Headers show
Series Add GNOME Calls | expand

Commit Message

Vivien Kraus Oct. 29, 2023, 4:34 p.m. UTC
* gnu/packages/telephony.scm (sofia-sip): New variable.

Change-Id: I18dd31fa62f5cfe528d7558915135f17d49b798d
---
 gnu/packages/telephony.scm | 72 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

Comments

Liliana Marie Prikler Oct. 29, 2023, 5:13 p.m. UTC | #1
Am Sonntag, dem 29.10.2023 um 17:34 +0100 schrieb Vivien Kraus:
> * gnu/packages/telephony.scm (sofia-sip): New variable.
> 
> Change-Id: I18dd31fa62f5cfe528d7558915135f17d49b798d
> ---
>  gnu/packages/telephony.scm | 72
> ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 72 insertions(+)
> 
> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
> index 42158784ca..d99b10903e 100644
> --- a/gnu/packages/telephony.scm
> +++ b/gnu/packages/telephony.scm
> @@ -1088,3 +1088,75 @@ (define-public sipp
>      (license (list license:gpl2+        ; sipp's main license
>                     license:bsd-3        ; send_packets.c,
> send_packets.h
>                     license:zlib)))) ; md5.c, md5.h
> +
> +(define-public sofia-sip
> +  (package
> +    (name "sofia-sip")
> +    (version "1.13.16")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/freeswitch/sofia-sip")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name "sofia-sip" version))
> +              (sha256
> +               (base32
> +               
> "1hi9np49wcq91d1w93qi6by40qnr348hpzc2wkw3l955zh1n30lr"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list
> +      ;; run_addrinfo requires /etc/services for the 'echo' service.
> +      #:make-flags #~'("XFAIL_TESTS = run_addrinfo"
> +                       ;; libsofia-sip-ua/nta/Makefile.am sets
> +                       ;; TESTS_ENVIRONMENT = $(SHELL), looks like a
> mistake.
> +                       "TESTS_ENVIRONMENT = \
> +export CHECK_NTA_VERBOSE=10; \
> +export CHECK_NUA_VERBOSE=10; ")
Ehm, your code looks like a mistake.  $(SHELL) probably expands to
'/bin/sh' or '/usr/bin/env FOO=BAR … --'.  You might want to use the
latter to set all those variables.
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-shebangs
> +            (lambda _
> +              (patch-shebang "autogen.sh")))
> +          (add-after 'unpack 'disable-failing-test
> +            (lambda _
> +              ;; run_test_nta is disabled because it fails randomly
> (not for a
> +              ;; timeout-related reason).  The test suite is
> otherwise very
> +              ;; long, most tests backed by libcheck timeout even
> with a ×100
> +              ;; multiplier.  The tests are disabled here rather
> than put to
> +              ;; XFAIL_TESTS because it saves compilation time.
> +              (substitute* "libsofia-sip-ua/nta/Makefile.am"
> +                (("TESTS =")
> +                 "TESTS = run_test_nta_api\n# Disabled: "))
> +              (substitute* "libsofia-sip-ua/nua/Makefile.am"
> +                (("TESTS \\+=")
> +                 "TESTS +=\n# Disabled: "))
> +              ;; The glib tests both wait forever without a timeout.
> +              (substitute* "libsofia-sip-ua-glib/su-
> glib/Makefile.am"
> +                (("TESTS =")
> +                 "TESTS =\n# Disabled: "))
> +              ;; Another timeout failing test:
> +              (substitute* "tests/Makefile.am"
> +                (("TESTS = test_nua")
> +                 "TESTS ="))
> +              ;; This test fails for unknown reason:
> +              (substitute* "tests/Makefile.am"
> +                (("TESTS \\+= check_dlopen_sofia check_sofia")
> +                 "TESTS += check_dlopen_sofia")))))))
> +    (inputs
> +     (list glib
> +           openssl
> +           (@ (gnu packages compression) zlib)))
> +    (native-inputs
> +     (list autoconf
> +           autoconf-archive
> +           automake
> +           check
> +           libtool
> +           pkg-config))
> +    (home-page "https://sofia-sip.sourceforge.net/")
> +    (synopsis "SIP user-agent library")
> +    (description "Sofia-SIP is a SIP User-Agent library, compliant
> with the IETF RFC3261
> +specification.  It can be used as a building block for SIP client
> software for
> +uses such as VoIP, IM, and many other real-time and person-to-person
> +communication services.")
> +    (license license:lgpl2.1)))

Cheers
Maxim Cournoyer Oct. 31, 2023, 2 p.m. UTC | #2
Hi Vivien,

Vivien Kraus <vivien@planete-kraus.eu> writes:

> * gnu/packages/telephony.scm (sofia-sip): New variable.
>
> Change-Id: I18dd31fa62f5cfe528d7558915135f17d49b798d
> ---
>  gnu/packages/telephony.scm | 72 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
> index 42158784ca..d99b10903e 100644
> --- a/gnu/packages/telephony.scm
> +++ b/gnu/packages/telephony.scm
> @@ -1088,3 +1088,75 @@ (define-public sipp
>      (license (list license:gpl2+        ; sipp's main license
>                     license:bsd-3        ; send_packets.c, send_packets.h
>                     license:zlib)))) ; md5.c, md5.h
> +
> +(define-public sofia-sip
> +  (package
> +    (name "sofia-sip")
> +    (version "1.13.16")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/freeswitch/sofia-sip")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name "sofia-sip" version))
> +              (sha256
> +               (base32
> +                "1hi9np49wcq91d1w93qi6by40qnr348hpzc2wkw3l955zh1n30lr"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list
> +      ;; run_addrinfo requires /etc/services for the 'echo' service.
> +      #:make-flags #~'("XFAIL_TESTS = run_addrinfo"
> +                       ;; libsofia-sip-ua/nta/Makefile.am sets

The 'TESTS_ENVIRONMENT = $(SHELL)' issue sounds worth reporting
upstream, then linking here.

> +                       ;; TESTS_ENVIRONMENT = $(SHELL), looks like a mistake.
> +                       "TESTS_ENVIRONMENT = \
> +export CHECK_NTA_VERBOSE=10; \
> +export CHECK_NUA_VERBOSE=10; ")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-shebangs

Is this really patching shebangs, or paths in the body of the script?
Shebangs should be patched automatically by the patch-source-shebangs
phase (or similarly named).

> +            (lambda _
> +              (patch-shebang "autogen.sh")))
> +          (add-after 'unpack 'disable-failing-test
> +            (lambda _
> +              ;; run_test_nta is disabled because it fails randomly (not for a
> +              ;; timeout-related reason).  The test suite is otherwise very
> +              ;; long, most tests backed by libcheck timeout even with a ×100
> +              ;; multiplier.  The tests are disabled here rather than put to
> +              ;; XFAIL_TESTS because it saves compilation time.

Personally, I'd report such experience to upstream; as that's far from
optimal :-).  Maybe they'll consider disabling flaky/long tests by
default or offer a flag to do so.

> +              (substitute* "libsofia-sip-ua/nta/Makefile.am"
> +                (("TESTS =")
> +                 "TESTS = run_test_nta_api\n# Disabled: "))
> +              (substitute* "libsofia-sip-ua/nua/Makefile.am"
> +                (("TESTS \\+=")
> +                 "TESTS +=\n# Disabled: "))
> +              ;; The glib tests both wait forever without a timeout.
> +              (substitute* "libsofia-sip-ua-glib/su-glib/Makefile.am"
> +                (("TESTS =")
> +                 "TESTS =\n# Disabled: "))
> +              ;; Another timeout failing test:
> +              (substitute* "tests/Makefile.am"
> +                (("TESTS = test_nua")
> +                 "TESTS ="))
> +              ;; This test fails for unknown reason:
> +              (substitute* "tests/Makefile.am"
> +                (("TESTS \\+= check_dlopen_sofia check_sofia")
> +                 "TESTS += check_dlopen_sofia")))))))
> +    (inputs
> +     (list glib
> +           openssl

Why the @ hack here?  Was there a module top-level cyclic dependency
problem otherwise?  A comment is needed (or the hack removed).

> +           (@ (gnu packages compression) zlib)))
> +    (native-inputs
> +     (list autoconf
> +           autoconf-archive
> +           automake
> +           check
> +           libtool
> +           pkg-config))
> +    (home-page "https://sofia-sip.sourceforge.net/")
> +    (synopsis "SIP user-agent library")
> +    (description "Sofia-SIP is a SIP User-Agent library, compliant with the IETF RFC3261
> +specification.  It can be used as a building block for SIP client software for
> +uses such as VoIP, IM, and many other real-time and person-to-person
> +communication services.")

Sounds good to me; you may want to use @acronym for SIP/VoIP/IM for the
first occurrences in the description, and perhaps a @url for the IETF
RFC3261 text.
diff mbox series

Patch

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 42158784ca..d99b10903e 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -1088,3 +1088,75 @@  (define-public sipp
     (license (list license:gpl2+        ; sipp's main license
                    license:bsd-3        ; send_packets.c, send_packets.h
                    license:zlib)))) ; md5.c, md5.h
+
+(define-public sofia-sip
+  (package
+    (name "sofia-sip")
+    (version "1.13.16")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/freeswitch/sofia-sip")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name "sofia-sip" version))
+              (sha256
+               (base32
+                "1hi9np49wcq91d1w93qi6by40qnr348hpzc2wkw3l955zh1n30lr"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      ;; run_addrinfo requires /etc/services for the 'echo' service.
+      #:make-flags #~'("XFAIL_TESTS = run_addrinfo"
+                       ;; libsofia-sip-ua/nta/Makefile.am sets
+                       ;; TESTS_ENVIRONMENT = $(SHELL), looks like a mistake.
+                       "TESTS_ENVIRONMENT = \
+export CHECK_NTA_VERBOSE=10; \
+export CHECK_NUA_VERBOSE=10; ")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-shebangs
+            (lambda _
+              (patch-shebang "autogen.sh")))
+          (add-after 'unpack 'disable-failing-test
+            (lambda _
+              ;; run_test_nta is disabled because it fails randomly (not for a
+              ;; timeout-related reason).  The test suite is otherwise very
+              ;; long, most tests backed by libcheck timeout even with a ×100
+              ;; multiplier.  The tests are disabled here rather than put to
+              ;; XFAIL_TESTS because it saves compilation time.
+              (substitute* "libsofia-sip-ua/nta/Makefile.am"
+                (("TESTS =")
+                 "TESTS = run_test_nta_api\n# Disabled: "))
+              (substitute* "libsofia-sip-ua/nua/Makefile.am"
+                (("TESTS \\+=")
+                 "TESTS +=\n# Disabled: "))
+              ;; The glib tests both wait forever without a timeout.
+              (substitute* "libsofia-sip-ua-glib/su-glib/Makefile.am"
+                (("TESTS =")
+                 "TESTS =\n# Disabled: "))
+              ;; Another timeout failing test:
+              (substitute* "tests/Makefile.am"
+                (("TESTS = test_nua")
+                 "TESTS ="))
+              ;; This test fails for unknown reason:
+              (substitute* "tests/Makefile.am"
+                (("TESTS \\+= check_dlopen_sofia check_sofia")
+                 "TESTS += check_dlopen_sofia")))))))
+    (inputs
+     (list glib
+           openssl
+           (@ (gnu packages compression) zlib)))
+    (native-inputs
+     (list autoconf
+           autoconf-archive
+           automake
+           check
+           libtool
+           pkg-config))
+    (home-page "https://sofia-sip.sourceforge.net/")
+    (synopsis "SIP user-agent library")
+    (description "Sofia-SIP is a SIP User-Agent library, compliant with the IETF RFC3261
+specification.  It can be used as a building block for SIP client software for
+uses such as VoIP, IM, and many other real-time and person-to-person
+communication services.")
+    (license license:lgpl2.1)))