GNU bug report logs -
#59018
[PATCH 0/1] OAuth2 for mbsync
Previous Next
To reply to this bug, email your comments to 59018 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Fri, 04 Nov 2022 17:57:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
peter <at> polidoro.io
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 04 Nov 2022 17:57:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Peter Polidoro <peter <at> polidoro.io>
I am trying to get OAuth2 working for mbsync so I can check an email account
that has discontinued basic authorization.
Following these steps:
https://github.com/harishkrupo/oauth2ms/blob/main/steps.org
I am at the point of needing the xoauth2 sasl plugin to make mbsync work with
the XOAUTH2 AuthMech. Perhaps that is already a part of Guix, but I was unable
to find it.
Here is an implementation of the xoaut2 sasl plugin that I attempted to package:
https://github.com/moriyoshi/cyrus-sasl-xoauth2
It seems to compile correctly, but I was unsure of how to do the configuration
in order to make it install into the proper location. It defaults into
installing it to:
/usr/lib/sasl2
Perhaps it instead needs to go into the /lib/sasl2 directory within the
cyrus-sasl package, but I do not know how to specify that in this package's
configuration.
I assume that if cyrus-sasl is able to detect and use this plugin then it will
have the ability to use XOAUTH2 making mbsync work correctly, but that would
have to be tested to make sure more configuration is not needed.
Peter Polidoro (1):
gnu: Add cyrus-sasl-xoauth2.
gnu/packages/cyrus-sasl.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
--
2.38.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Sun, 06 Nov 2022 21:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 59018 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
He peter,
Thanks for the work. Did you just forget to submit the patch
file?
--
dan
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Sun, 06 Nov 2022 21:19:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 59018 <at> debbugs.gnu.org (full text, mbox):
On Sun Nov 6, 2022 at 9:12 PM GMT, dan wrote:
> Thanks for the work. Did you just forget to submit the patch
> file?
Funny. The patch seems to have appeared in my inbox, but not on mumi's or debbugs' UI...
-- (
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Mon, 07 Nov 2022 01:33:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 59018 <at> debbugs.gnu.org (full text, mbox):
Nov 7, 2022 5:18:25 AM ( <paren <at> disroot.org>:
> On Sun Nov 6, 2022 at 9:12 PM GMT, dan wrote:
>> Thanks for the work. Did you just forget to submit the patch
>> file?
>
> Funny. The patch seems to have appeared in my inbox, but not on mumi's
> or debbugs' UI...
>
> -- (
> Funny. The patch seems to have appeared in my inbox, but not on mumi's
> or debbugs' UI...
My bad, it's actually #59019
Merged 59018 59019.
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 15 Nov 2022 10:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Tue, 15 Nov 2022 10:50:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 59018 <at> debbugs.gnu.org (full text, mbox):
Hi,
peter <at> polidoro.io skribis:
> It seems to compile correctly, but I was unsure of how to do the configuration
> in order to make it install into the proper location. It defaults into
> installing it to:
> /usr/lib/sasl2
>
> Perhaps it instead needs to go into the /lib/sasl2 directory within the
> cyrus-sasl package, but I do not know how to specify that in this package's
> configuration.
Adding files to another package is not possible.
Packages usually have a search path environment variable for plugins. I
don’t see one for cyrus-sasl (I just grepped for “getenv” so I might
have overlooked it). The “Guix way” would be to have cyrus-sasl honor,
say, $CYRUS_SASL_PLUGIN_PATH and look for plugins in those directories,
add a search path to the package¹, and have the plugin installed in
$prefix/lib/sasl2 like you did.
Could you check whether cyrus-sasl already has such a mechanism, or add
one (possibly discussing with upstream), and send updated patches?
Nitpick:
> + (description "XOAUTH2 mechanism plugin for cyrus-sasl.")
Also, please improve the description².
Thanks in advance,
Ludo’.
¹ https://guix.gnu.org/manual/devel/en/html_node/Search-Paths.html
² https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Tue, 15 Nov 2022 15:19:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 59018 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Packages usually have a search path environment variable for
> plugins. I
> don’t see one for cyrus-sasl (I just grepped for “getenv” so I
> might
> have overlooked it). The “Guix way” would be to have cyrus-sasl
> honor,
> say, $CYRUS_SASL_PLUGIN_PATH and look for plugins in those
> directories,
> add a search path to the package¹, and have the plugin installed
> in
> $prefix/lib/sasl2 like you did.
>
> Could you check whether cyrus-sasl already has such a mechanism,
> or add
> one (possibly discussing with upstream), and send updated
> patches?
Thank you for your help on this package.
According to the Cyrus SASL quickstart guide:
"Note that the library can use the environment variable SASL_PATH
to locate the directory where the mechanisms are; this should be a
colon-separated list of directories containing plugins."[1]
Unfortunately I still do not know enough about Guix packaging to
set this environment variable properly, nor do I know how to
properly set the installation path in the package configuration.
This plugin's build and installation instructions are:
./autogen.sh
./configure
sudo make install
Footnotes:
[1]
https://www.cyrusimap.org/sasl/sasl/quickstart.html#typical-installation
[0001-gnu-Add-cyrus-sasl-xoauth2.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Thu, 17 Nov 2022 17:28:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 59018 <at> debbugs.gnu.org (full text, mbox):
Peter Polidoro <peter <at> polidoro.io> skribis:
> According to the Cyrus SASL quickstart guide:
>
> "Note that the library can use the environment variable SASL_PATH to
> locate the directory where the mechanisms are; this should be a
> colon-separated list of directories containing plugins."[1]
>
> Unfortunately I still do not know enough about Guix packaging to set
> this environment variable properly, nor do I know how to properly set
> the installation path in the package configuration.
We’d need to add a ‘native-search-paths’ field for “SASL_PATH” to
cyrus-sasl, as explained in the “Search Paths” section of the manual.
But that can come as a separate patch.
> From d5e9f604531dbf9cf7a16a107a3745d0203e1dd7 Mon Sep 17 00:00:00 2001
> Message-Id: <d5e9f604531dbf9cf7a16a107a3745d0203e1dd7.1668524316.git.peter <at> polidoro.io>
> From: Peter Polidoro <peter <at> polidoro.io>
> Date: Tue, 15 Nov 2022 09:50:51 -0500
> Subject: [PATCH] gnu: Add cyrus-sasl-xoauth2.
>
> * gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.
It fails to build:
--8<---------------cut here---------------start------------->8---
starting phase `install'
make[1]: Entering directory '/tmp/guix-build-cyrus-sasl-xoauth2-0.2.drv-0/source'
/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin/mkdir -p '/usr/lib/sasl2'
/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32/bin/mkdir: cannot create directory ‘/usr’: Permission denied
make[1]: *** [Makefile:418: install-pkglibLTLIBRARIES] Error 1
--8<---------------cut here---------------end--------------->8---
Could you send an updated patch? TIA!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59018
; Package
guix-patches
.
(Fri, 18 Nov 2022 17:41:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 59018 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
>
> Could you send an updated patch? TIA!
>
> Ludo’.
I was able to get the package to build by adding a
"--with-cyrus-sasl" configure-flag.
I am not sure if I used the correct value for this flag, however.
The package's configure file says:
--with-cyrus-sasl=PREFIX
Installation prefix of Cyrus-SASL
(defaults to /usr)
That seems to imply that should be the install location of the
cyrus-sasl package and that the cyrus-sasl-xoauth2 package will
get installed into the location specified by the "--prefix"
configure-flag.
The build failed, though, since it was trying to install into the
/usr directory, even though "--prefix" was set to something else.
So I set "--with-cyrus-sasl" to be the path of the
cyrus-sasl-xoauth2 package out and that seems to work now. I
assume the compilation would have failed if "--with-cyrus-sasl"
needed to point to the cyrus-sasl location for dependency reasons.
Now hopefully adding the correct search path to the cyrus-sasl
package will get the cyrus-sasl-xoauth2 properly recognized as a
plugin. I can work on that patch when I have some time.
Thank you for your all of your help and patience as I am still
learning how to create guix packages.
[0001-gnu-Add-cyrus-sasl-xoauth2.patch (text/x-diff, attachment)]
This bug report was last modified 2 years and 209 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.