[PATCH] gnu: Add cyrus-sasl-xoauth2.

  • Open
  • quality assurance status badge
Details
6 participants
  • Morgan.J.Smith
  • Ludovic Courtès
  • Christopher Baines
  • Reily Siegel
  • Samuel Fadel
  • Zac Berkowitz
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal
M
M
Morgan.J.Smith wrote on 25 Sep 2022 17:15
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
DM5PR03MB31637C2C7C30C6360865EEBBC5539@DM5PR03MB3163.namprd03.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.
---
gnu/packages/cyrus-sasl.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index 2cd18f3e5e..5374effbcd 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,8 +27,10 @@ (define-module (gnu packages cyrus-sasl)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu))
(define-public cyrus-sasl
@@ -78,3 +81,34 @@ (define-public cyrus-sasl
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))
(home-page "https://cyrusimap.org/sasl/")))
+
+(define-public cyrus-sasl-xoauth2
+ (package
+ (name "cyrus-sasl-xoauth2")
+ (version "0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1py9f1mn5k5xihrk0lfrwr6723c22gjb7lmgya83ibvislm2x3wl"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags #~(list (string-append "--with-cyrus-sasl="
+ #$output)
+ "--disable-static")))
+
+ (inputs (list cyrus-sasl))
+ (native-inputs (list autoconf automake libtool))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "SASL_PATH")
+ (files (list "lib/sasl2")))))
+ (home-page "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (synopsis "XOAUTH2 plugin for Cyrus SASL")
+ (description "Adds support for XOAUTH2 authentication to Cyrus SASL. Can
+be used with isync to fetch mail from servers that support it.")
+ (license license:expat)))
--
2.37.3
L
L
Ludovic Courtès wrote on 6 Oct 2022 22:47
(address . Morgan.J.Smith@outlook.com)(address . 58074@debbugs.gnu.org)
87ilkwhe6j.fsf@gnu.org
Hi,

Morgan.J.Smith@outlook.com skribis:

Toggle quote (4 lines)
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.

LGTM, modulo two things:

Toggle quote (5 lines)
> + (native-search-paths
> + (list (search-path-specification
> + (variable "SASL_PATH")
> + (files (list "lib/sasl2")))))

I believe this search path belongs in cyrus-sasl (see

Could you provide a patch that does that? However, due to the number of
dependents of cyrus-sasl, this change will have to go on ‘staging’.

Toggle quote (5 lines)
> + (synopsis "XOAUTH2 plugin for Cyrus SASL")
> + (description "Adds support for XOAUTH2 authentication to Cyrus SASL. Can
> +be used with isync to fetch mail from servers that support it.")

Please write full sentences.

Thanks in advance,
Ludo’.
C
C
Christopher Baines wrote on 3 Nov 2022 16:43
tag 58074 moreinfo
(address . control@debbugs.gnu.org)
87cza4yrfk.fsf@cbaines.net
tags 58074 + moreinfo
quit
M
M
Morgan.J.Smith wrote on 23 Dec 2022 20:27
[PATCH staging v2 1/2] gnu: cyrus-sasl: Set SASL_PATH to find plugins
(address . ludo@gnu.org)
DM5PR03MB3163E0B750D12E241DB09418C5E99@DM5PR03MB3163.namprd03.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/cyrus-sasl.scm (cyrus-sasl)[native-search-paths]: Add
"lib/sasl2" to SASL_PATH
---

Sorry for the delay in my followup

Yep the environment should be set in the original package. I also think I've written in full sentences this time. English hard

gnu/packages/cyrus-sasl.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index 2cd18f3e5e..d644d04e44 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -69,6 +69,10 @@ (define-public cyrus-sasl
(add-after 'unpack 'autogen
(lambda _
(invoke "autoreconf" "-vif"))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "SASL_PATH")
+ (files (list "lib/sasl2")))))
(synopsis "Simple Authentication Security Layer implementation")
(description
"SASL (Simple Authentication Security Layer) is an Internet
--
2.38.1
M
M
Morgan.J.Smith wrote on 23 Dec 2022 20:27
[PATCH staging v2 2/2] gnu: Add cyrus-sasl-xoauth2.
(address . ludo@gnu.org)
DM5PR03MB316360FC81C2B919880E44D9C5E99@DM5PR03MB3163.namprd03.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.
---
gnu/packages/crates-io.go.q80kWr | 0
gnu/packages/cyrus-sasl.scm | 29 +++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 gnu/packages/crates-io.go.q80kWr

Toggle diff (58 lines)
diff --git a/gnu/packages/crates-io.go.q80kWr b/gnu/packages/crates-io.go.q80kWr
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index d644d04e44..0f283b62ac 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,8 +27,10 @@ (define-module (gnu packages cyrus-sasl)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu))
(define-public cyrus-sasl
@@ -82,3 +85,29 @@ (define-public cyrus-sasl
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))
(home-page "https://cyrusimap.org/sasl/")))
+
+(define-public cyrus-sasl-xoauth2
+ (package
+ (name "cyrus-sasl-xoauth2")
+ (version "0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1py9f1mn5k5xihrk0lfrwr6723c22gjb7lmgya83ibvislm2x3wl"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags #~(list (string-append "--with-cyrus-sasl="
+ #$output)
+ "--disable-static")))
+ (inputs (list cyrus-sasl))
+ (native-inputs (list autoconf automake libtool))
+ (home-page "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (synopsis "XOAUTH2 plugin for Cyrus SASL")
+ (description "Adds support for XOAUTH2 authentication to Cyrus SASL. This
+package can be used with isync to fetch mail from servers that support it.")
+ (license license:expat)))
--
2.38.1
R
R
Reily Siegel wrote on 23 Dec 2022 20:27
[PATCH staging v3 1/2] gnu: cyrus-sasl: Set SASL_PATH to find plugins
(address . 58074@debbugs.gnu.org)
90f054c85b00bb046fb29af990e24eddb472134c.1691097881.git.mail@reilysiegel.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/cyrus-sasl.scm (cyrus-sasl)[native-search-paths]: Add
"lib/sasl2" to SASL_PATH
---

I added the patches from this issue to a personal Guix checkout, and was
unable to build cyrus-sasl-xoauth2 due to autogen.sh being an executable
file without a shebang. This updated patch sets the permission bits to
o400, so that the bootstrap phase passes autogen.sh to /bin/sh, rather
than attempt to execute it directly.

gnu/packages/cyrus-sasl.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index 70d579c127..8254e04993 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -63,9 +63,13 @@ (define-public cyrus-sasl
;; ends up doing "ln -s plugin_common.lo plugin_common.o", which can
;; fail with EEXIST when building things in parallel.
#:parallel-build? #f))
- (synopsis "Simple Authentication Security Layer implementation")
- (description
- "SASL (Simple Authentication Security Layer) is an Internet
+ (native-search-paths
+ (list (search-path-specification
+ (variable "SASL_PATH")
+ (files (list "lib/sasl2")))))
+ (synopsis "Simple Authentication Security Layer implementation")
+ (description
+ "SASL (Simple Authentication Security Layer) is an Internet
standards-track method for remote computers to authenticate. The Cyrus SASL
library makes supporting various SASL mechanisms easy for both client and
server writers.")

base-commit: 4ded034a57ffacdd6c7afa73bb58893afd614644
prerequisite-patch-id: 081e3072b6b3a070fffd62da42f3e622317684bf
R
R
Reily Siegel wrote on 23 Dec 2022 20:27
[PATCH staging v3 2/2] gnu: Add cyrus-sasl-xoauth2.
(address . 58074@debbugs.gnu.org)
18f46f62bb9eadb0c065fe31b135b844d4d2774f.1691097881.git.mail@reilysiegel.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.
---
gnu/packages/cyrus-sasl.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index 8254e04993..efeeb519c4 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,6 +31,7 @@ (define-module (gnu packages cyrus-sasl)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu))
(define-public cyrus-sasl
@@ -76,3 +78,34 @@ (define-public cyrus-sasl
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))
(home-page "https://cyrusimap.org/sasl/")))
+
+(define-public cyrus-sasl-xoauth2
+ (package
+ (name "cyrus-sasl-xoauth2")
+ (version "0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1py9f1mn5k5xihrk0lfrwr6723c22gjb7lmgya83ibvislm2x3wl"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags #~(list (string-append "--with-cyrus-sasl="
+ #$output)
+ "--disable-static")
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'bootstrap 'fix-autogen
+ (lambda _
+ ;; autogen.sh is executable but does not have a shebang.
+ (chmod "autogen.sh" #o400))))))
+ (inputs (list cyrus-sasl))
+ (native-inputs (list autoconf automake libtool))
+ (home-page "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+ (synopsis "XOAUTH2 plugin for Cyrus SASL")
+ (description "Adds support for XOAUTH2 authentication to Cyrus SASL. This
+package can be used with isync to fetch mail from servers that support it.")
+ (license license:expat)))
S
S
Samuel Fadel wrote on 12 Feb 19:48 +0100
Re: [PATCH staging v3 1/2] gnu: cyrus-sasl: Set SASL_PATH to find plugins
878r3pbjsq.fsf@t490
Hi,

Reily Siegel (2022-12-23 14:27 -0500):
Toggle quote (12 lines)
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/cyrus-sasl.scm (cyrus-sasl)[native-search-paths]:
> Add "lib/sasl2" to SASL_PATH ---
>
> I added the patches from this issue to a personal Guix checkout,
> and was unable to build cyrus-sasl-xoauth2 due to autogen.sh
> being an executable file without a shebang. This updated patch
> sets the permission bits to o400, so that the bootstrap phase
> passes autogen.sh to /bin/sh, rather than attempt to execute it
> directly.

I have tested the patch from Reily and it works for me. Solved my
issue of not having cyrus-sasl-xoauth2 packaged in Guix yet. Is
this ready for merging?


Samuel
Z
Z
Zac Berkowitz wrote on 15 Mar 15:46 +0100
[PATCH] gnu: Add cyrus-sasl-xoauth2
(address . 58074@debbugs.gnu.org)
CANNGBf=Fm-PJi1+2DsOfJ=D7LpDS1WExGw4xKw4dMM0ACFvHqA@mail.gmail.com
Also using cyrus-sasl-xoauth2 on a local channel would like to have it part
of Guix proper.

Zac
Attachment: file
?