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
+ #endif
  
 +#define off64_t off_t
 +
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/grive2/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- pkg/PLIST   11 Mar 2022 19:57:31 -0000      1.3
+++ pkg/PLIST   2 Jun 2023 19:49:55 -0000
@@ -1,9 +1,2 @@
 @bin bin/grive
-lib/grive/
-lib/grive/grive-sync.sh
-lib/systemd/
-lib/systemd/user/
-lib/systemd/user/grive-changes@.service
-lib/systemd/user/grive-timer@.service
-lib/systemd/user/grive-timer@.timer
 @man man/man1/grive.1

Reply via email to