On 2023/06/03 06:42, Rafael Sadowski wrote:
> OK?
$ grive
Please run grive with the "-a" option if this is the first time you're accessing your Google Drive!
$ ktrace grive -a
-----------------------
Please open this URL in your browser to authenticate Grive2:
exception: bind: Invalid argument
$ kdump|grep -5 'CALL bind'
73349 grive RET kbind 0
73349 grive CALL socket(AF_INET,0x1<SOCK_STREAM>,0)
73349 grive RET socket 3
73349 grive CALL kbind(0x7c192a446908,24,0x6bb5b172161041f5)
73349 grive RET kbind 0
73349 grive CALL bind(3,0x7c192a4469d0,256)
73349 grive RET bind -1 errno 22 Invalid argument
73349 grive CALL kbind(0x7c192a446908,24,0x6bb5b172161041f5)
73349 grive RET kbind 0
73349 grive CALL close(3)
73349 grive RET close 0
$
> ----- Forwarded message from Rafael Sadowski <rafael@sizeofvoid.org> -----
>
> From: Rafael Sadowski <rafael@sizeofvoid.org>
> Date: Fri, 2 Jun 2023 21:53:26 +0200
> Subject: Re: grive2 doesn't work
> To: Luca Di Gregorio <lucdig@gmail.com>
> Cc: bugs@openbsd.org
>
> On Fri Jun 02, 2023 at 08:18:00PM +0200, Luca Di Gregorio wrote:
> > Hi, I've just installed grive2 and tried:
> >
> > grive -a
> >
> > When I go to the URL, Google says that the request from the app grive2 is
> > not valid.
> >
> > Is this a bug?
>
> I think our grive2 port use and old google oauth method/API. It's form
> 2019. Are you able to build ports at your own? If so you can try this
> diff:
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/grive2/Makefile,v
> retrieving revision 1.13
> diff -u -p -u -p -r1.13 Makefile
> --- Makefile 11 Mar 2022 19:57:31 -0000 1.13
> +++ Makefile 2 Jun 2023 19:49:55 -0000
> @@ -2,9 +2,7 @@ COMMENT = third-party client for Google
>
> GH_ACCOUNT = vitalif
> GH_PROJECT = grive2
> -GH_COMMIT = 548ea362f319cd1f7fcbad0344fde8449fa14255
> -
> -DISTNAME = grive2-0.5.1
> +GH_TAGNAME = v0.5.3
>
> CATEGORIES = sysutils
>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/grive2/distinfo,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 distinfo
> --- distinfo 9 Oct 2020 19:40:13 -0000 1.4
> +++ distinfo 2 Jun 2023 19:49:55 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (grive2-0.5.1-548ea362.tar.gz) = wJIn9bDA483dfmpHEYa3sRNtOMb6DGC3hYgpiNzUd0A=
> -SIZE (grive2-0.5.1-548ea362.tar.gz) = 169931
> +SHA256 (grive2-0.5.3.tar.gz) = TLZ8MulHSTU+CM5f77gx/vo+e0m4YzKUiahIBN8RRJ0=
> +SIZE (grive2-0.5.3.tar.gz) = 172452
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-CMakeLists_txt
> diff -N patches/patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt 11 Mar 2022 19:57:31 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,18 +0,0 @@
> -Index: CMakeLists.txt
> ---- CMakeLists.txt.orig
> -+++ CMakeLists.txt
> -@@ -1,5 +1,7 @@
> - cmake_minimum_required(VERSION 2.8)
> -
> -+project(grive2)
> -+
> - include(GNUInstallDirs)
> -
> - # Grive version. remember to update it for every new release!
> -@@ -12,4 +14,4 @@ add_definitions( -D_FILE_OFFSET_BITS=64 -std=c++0x )
> - add_subdirectory( systemd )
> - add_subdirectory( libgrive )
> - add_subdirectory( grive )
> --
> -\ No newline at end of file
> -+
> Index: patches/patch-grive_CMakeLists_txt
> ===================================================================
> RCS file: /cvs/ports/sysutils/grive2/patches/patch-grive_CMakeLists_txt,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 patch-grive_CMakeLists_txt
> --- patches/patch-grive_CMakeLists_txt 11 Mar 2022 19:57:31 -0000 1.3
> +++ patches/patch-grive_CMakeLists_txt 2 Jun 2023 19:49:55 -0000
> @@ -1,7 +1,7 @@
> Index: grive/CMakeLists.txt
> --- grive/CMakeLists.txt.orig
> +++ grive/CMakeLists.txt
> -@@ -25,7 +25,7 @@ set_target_properties( grive_executable
> +@@ -36,7 +36,7 @@ set_target_properties( grive_executable
> )
>
> install(TARGETS grive_executable RUNTIME DESTINATION bin)
> Index: patches/patch-libgrive_CMakeLists_txt
> ===================================================================
> RCS file: /cvs/ports/sysutils/grive2/patches/patch-libgrive_CMakeLists_txt,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 patch-libgrive_CMakeLists_txt
> --- patches/patch-libgrive_CMakeLists_txt 11 Mar 2022 19:57:31 -0000 1.3
> +++ patches/patch-libgrive_CMakeLists_txt 2 Jun 2023 19:49:55 -0000
> @@ -1,8 +1,8 @@
> Index: libgrive/CMakeLists.txt
> --- libgrive/CMakeLists.txt.orig
> +++ libgrive/CMakeLists.txt
> -@@ -6,7 +6,6 @@ find_package(LibGcrypt REQUIRED)
> - find_package(CURL REQUIRED)
> +@@ -7,7 +7,6 @@ find_package(CURL REQUIRED)
> + find_package(Backtrace)
> find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED)
> find_package(BFD)
> -find_package(CppUnit)
> Index: patches/patch-libgrive_src_protocol_OAuth2_cc
> ===================================================================
> RCS file: patches/patch-libgrive_src_protocol_OAuth2_cc
> diff -N patches/patch-libgrive_src_protocol_OAuth2_cc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-libgrive_src_protocol_OAuth2_cc 2 Jun 2023 19:49:55 -0000
> @@ -0,0 +1,21 @@
> +Index: libgrive/src/protocol/OAuth2.cc
> +--- libgrive/src/protocol/OAuth2.cc.orig
> ++++ libgrive/src/protocol/OAuth2.cc
> +@@ -153,7 +153,7 @@ bool OAuth2::GetCode( )
> + fcntl( peer_fd, F_SETFL, fcntl( peer_fd, F_GETFL, 0 ) | O_NONBLOCK );
> + struct pollfd pfd = (struct pollfd){
> + .fd = peer_fd,
> +- .events = POLLIN|POLLRDHUP,
> ++ .events = POLLIN|POLLHUP,
> + };
> + char buf[4096];
> + std::string request;
> +@@ -161,7 +161,7 @@ bool OAuth2::GetCode( )
> + {
> + pfd.revents = 0;
> + poll( &pfd, 1, -1 );
> +- if ( pfd.revents & POLLRDHUP )
> ++ if ( pfd.revents & POLLHUP )
> + break;
> + int r = 1;
> + while ( r > 0 )
> Index: patches/patch-libgrive_src_util_OS_hh
> ===================================================================
> RCS file: /cvs/ports/sysutils/grive2/patches/patch-libgrive_src_util_OS_hh,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 patch-libgrive_src_util_OS_hh
> --- patches/patch-libgrive_src_util_OS_hh 11 Mar 2022 19:57:31 -0000 1.2
> +++ patches/patch-libgrive_src_util_OS_hh 2 Jun 2023 19:49:55 -0000
> @@ -1,9 +1,9 @@
> Index: libgrive/src/util/OS.hh
> --- libgrive/src/util/OS.hh.orig
> +++ libgrive/src/util/OS.hh
> -@@ -31,6 +31,8 @@ class Path ;
> -
> - enum FileType { FT_FILE = 1, FT_DIR = 2, FT_UNKNOWN = 3 } ;
> +@@ -35,6 +35,8 @@ enum FileType { FT_FILE = 1, FT_DIR = 2, FT_UNKNOWN =
> + #define off64_t off_t
> +
No comments:
Post a Comment