Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package onedrive for openSUSE:Factory 
checked in at 2023-01-09 17:24:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/onedrive (Old)
 and      /work/SRC/openSUSE:Factory/.onedrive.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "onedrive"

Mon Jan  9 17:24:10 2023 rev:23 rq:1057019 version:2.4.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/onedrive/onedrive.changes        2022-12-07 
17:36:08.376925025 +0100
+++ /work/SRC/openSUSE:Factory/.onedrive.new.32243/onedrive.changes     
2023-01-09 17:24:11.247289127 +0100
@@ -1,0 +2,18 @@
+Fri Jan 06 18:35:48 UTC 2023 - h...@urpla.net
+
+- Update to version 2.4.23:
+  * Release files for 2.4.23 (#2280)
+  * Update handling of --source-directory and --destination-directory if empty 
(#2278)
+  * Update Alpine Dockerfile to use Alpine 3.17 (#2277)
+  * Update USAGE.md
+  * Update application-security.md
+  * docs: Fix typos in Docker.md (#2270)
+  * Update version checks (#2269)
+  * Update version release notification handling (#2267)
+  * Update --get-O365-drive-id error handling (#2266)
+  * systemd: disable PrivateUsers (#2265)
+  * Update INSTALL.md
+  * Update RHEL7, RHEL8 and RHEL9 Makefile and SPEC file compatibility (#2256)
+  * Restore RHEL7 spec file compatibility (#2254)
+
+-------------------------------------------------------------------

Old:
----
  onedrive-2.4.22.obscpio

New:
----
  onedrive-2.4.23.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ onedrive.spec ++++++
--- /var/tmp/diff_new_pack.RmYGFj/_old  2023-01-09 17:24:11.911292885 +0100
+++ /var/tmp/diff_new_pack.RmYGFj/_new  2023-01-09 17:24:11.915292907 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package onedrive
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 # Copyright (c) 2018-2022 LISA GmbH, Bingen, Germany.
 #
 # All modifications and additions to the file contributed by third parties
@@ -28,7 +28,7 @@
 %endif
 
 Name:           onedrive
-Version:        2.4.22
+Version:        2.4.23
 Release:        0
 Summary:        Client for One Drive Service for Linux
 License:        GPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.RmYGFj/_old  2023-01-09 17:24:11.959293156 +0100
+++ /var/tmp/diff_new_pack.RmYGFj/_new  2023-01-09 17:24:11.959293156 +0100
@@ -2,7 +2,7 @@
   <service name="obs_scm" mode="disabled">
     <param name="scm">git</param>
     <param name="url">https://github.com/abraunegg/onedrive.git</param>
-    <param name="revision">v2.4.22</param>
+    <param name="revision">v2.4.23</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@~git.%h</param>
     <param name="versionrewrite-pattern">v(.*)\+0.git.*</param>
     <param name="versionrewrite-replacement">\1</param> 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.RmYGFj/_old  2023-01-09 17:24:11.995293359 +0100
+++ /var/tmp/diff_new_pack.RmYGFj/_new  2023-01-09 17:24:11.999293382 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/abraunegg/onedrive.git</param>
-              <param 
name="changesrevision">72898345e7e18de511c56495c209760ed895e4ac</param></service></servicedata>
+              <param 
name="changesrevision">b9a239ace1b91dcb39e700fbf338f2be3e603b54</param></service></servicedata>
 (No newline at EOF)
 

++++++ onedrive-2.4.22.obscpio -> onedrive-2.4.23.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/CHANGELOG.md 
new/onedrive-2.4.23/CHANGELOG.md
--- old/onedrive-2.4.22/CHANGELOG.md    2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/CHANGELOG.md    2023-01-05 23:00:45.000000000 +0100
@@ -2,6 +2,20 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic 
Versioning](http://semver.org/spec/v2.0.0.html).
 
+## 2.4.23 - 2023-01-06
+### Fixed
+*   Fixed RHEL7, RHEL8 and RHEL9 Makefile and SPEC file compatibility
+
+### Removed
+*   Disable systemd 'PrivateUsers' due to issues with systemd running 
processes when option is enabled, causes local file deletes on RHEL based 
systems
+
+### Updated
+*   Update --get-O365-drive-id error handling to display a more a more 
appropriate error message if the API cannot be found
+*   Update the GitHub version check to utilise the date a release was done, to 
allow 1 month grace period before generating obsolete version message
+*   Update Alpine Dockerfile to use Alpine 3.17 and Golang 1.19
+*   Update handling of --source-directory and --destination-directory if one 
is empty or missing and if used with --synchronize or --monitor
+*   Updated documentation (various)
+
 ## 2.4.22 - 2022-12-06
 ### Fixed
 *   Fix application crash when local file is changed to a symbolic link with 
non-existent target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/Makefile.in 
new/onedrive-2.4.23/Makefile.in
--- old/onedrive-2.4.22/Makefile.in     2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/Makefile.in     2023-01-05 23:00:45.000000000 +0100
@@ -58,7 +58,7 @@
 DOCFILES = README.md config LICENSE CHANGELOG.md docs/Docker.md 
docs/INSTALL.md docs/SharePoint-Shared-Libraries.md docs/USAGE.md 
docs/BusinessSharedFolders.md docs/advanced-usage.md 
docs/application-security.md
 
 ifneq ("$(wildcard /etc/redhat-release)","")
-RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise Linux 
Server|CentOS)" | wc -l)
+RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise 
Linux|CentOS)" | wc -l)
 RHEL_VERSION = $(shell rpm --eval "%{rhel}")
 else
 RHEL = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/configure 
new/onedrive-2.4.23/configure
--- old/onedrive-2.4.22/configure       2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/configure       2023-01-05 23:00:45.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for onedrive v2.4.22.
+# Generated by GNU Autoconf 2.71 for onedrive v2.4.23.
 #
 # Report bugs to <https://github.com/abraunegg/onedrive>.
 #
@@ -610,8 +610,8 @@
 # Identity of this package.
 PACKAGE_NAME='onedrive'
 PACKAGE_TARNAME='onedrive'
-PACKAGE_VERSION='v2.4.22'
-PACKAGE_STRING='onedrive v2.4.22'
+PACKAGE_VERSION='v2.4.23'
+PACKAGE_STRING='onedrive v2.4.23'
 PACKAGE_BUGREPORT='https://github.com/abraunegg/onedrive'
 PACKAGE_URL=''
 
@@ -1259,7 +1259,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures onedrive v2.4.22 to adapt to many kinds of systems.
+\`configure' configures onedrive v2.4.23 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1321,7 +1321,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of onedrive v2.4.22:";;
+     short | recursive ) echo "Configuration of onedrive v2.4.23:";;
    esac
   cat <<\_ACEOF
 
@@ -1435,7 +1435,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-onedrive configure v2.4.22
+onedrive configure v2.4.23
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1472,7 +1472,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by onedrive $as_me v2.4.22, which was
+It was created by onedrive $as_me v2.4.23, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -2310,7 +2310,7 @@
 
 
 
-PACKAGE_DATE="December 2022"
+PACKAGE_DATE="January 2023"
 
 
 
@@ -3326,7 +3326,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by onedrive $as_me v2.4.22, which was
+This file was extended by onedrive $as_me v2.4.23, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3381,7 +3381,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-onedrive config.status v2.4.22
+onedrive config.status v2.4.23
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/configure.ac 
new/onedrive-2.4.23/configure.ac
--- old/onedrive-2.4.22/configure.ac    2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/configure.ac    2023-01-05 23:00:45.000000000 +0100
@@ -9,7 +9,7 @@
 dnl - tag the release
 
 AC_PREREQ([2.69])
-AC_INIT([onedrive],[v2.4.22], [https://github.com/abraunegg/onedrive], 
[onedrive])
+AC_INIT([onedrive],[v2.4.23], [https://github.com/abraunegg/onedrive], 
[onedrive])
 AC_CONFIG_SRCDIR([src/main.d])
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/contrib/docker/Dockerfile-alpine 
new/onedrive-2.4.23/contrib/docker/Dockerfile-alpine
--- old/onedrive-2.4.22/contrib/docker/Dockerfile-alpine        2022-12-05 
23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/contrib/docker/Dockerfile-alpine        2023-01-05 
23:00:45.000000000 +0100
@@ -1,7 +1,7 @@
 # -*-Dockerfile-*-
 
-ARG ALPINE_VERSION=3.16
-ARG GO_VERSION=1.17
+ARG ALPINE_VERSION=3.17
+ARG GO_VERSION=1.19
 ARG GOSU_VERSION=1.14
 
 FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder-gosu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/onedrive-2.4.22/contrib/gentoo/onedrive-2.4.22.ebuild 
new/onedrive-2.4.23/contrib/gentoo/onedrive-2.4.22.ebuild
--- old/onedrive-2.4.22/contrib/gentoo/onedrive-2.4.22.ebuild   2022-12-05 
23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/contrib/gentoo/onedrive-2.4.22.ebuild   1970-01-01 
01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Onedrive sync client for Linux"
-HOMEPAGE="https://github.com/abraunegg/onedrive";
-SRC_URI="https://github.com/abraunegg/onedrive/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="
-       >=dev-lang/dmd-2.081.1
-       dev-db/sqlite
-"
-
-RDEPEND="${DEPEND}
-       net-misc/curl
-       "
-src_prepare() {
-       default
-       # Copy line 38 to 44 as systemd path needs to be created in portage 
sandbox
-       # Update the makefile so that it doesnt use git commands to get the 
version during build.
-       sed -i -e "38h; 44p; 44x" \
-               -e "s/version:.*/version:/" \
-               -e "\$s/.*/\techo v${PV} > version/" \
-               Makefile
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/onedrive-2.4.22/contrib/gentoo/onedrive-2.4.23.ebuild 
new/onedrive-2.4.23/contrib/gentoo/onedrive-2.4.23.ebuild
--- old/onedrive-2.4.22/contrib/gentoo/onedrive-2.4.23.ebuild   1970-01-01 
01:00:00.000000000 +0100
+++ new/onedrive-2.4.23/contrib/gentoo/onedrive-2.4.23.ebuild   2023-01-05 
23:00:45.000000000 +0100
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Onedrive sync client for Linux"
+HOMEPAGE="https://github.com/abraunegg/onedrive";
+SRC_URI="https://github.com/abraunegg/onedrive/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+       >=dev-lang/dmd-2.081.1
+       dev-db/sqlite
+"
+
+RDEPEND="${DEPEND}
+       net-misc/curl
+       "
+src_prepare() {
+       default
+       # Copy line 38 to 44 as systemd path needs to be created in portage 
sandbox
+       # Update the makefile so that it doesnt use git commands to get the 
version during build.
+       sed -i -e "38h; 44p; 44x" \
+               -e "s/version:.*/version:/" \
+               -e "\$s/.*/\techo v${PV} > version/" \
+               Makefile
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/contrib/spec/onedrive.spec.in 
new/onedrive-2.4.23/contrib/spec/onedrive.spec.in
--- old/onedrive-2.4.22/contrib/spec/onedrive.spec.in   2022-12-05 
23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/contrib/spec/onedrive.spec.in   2023-01-05 
23:00:45.000000000 +0100
@@ -5,8 +5,14 @@
 %global with_systemd      0
 %endif
 
+%if 0%{?rhel} >= 7
+%global rhel_unitdir      1
+%else
+%global rhel_unitdir      0
+%endif
+
 Name:       onedrive
-Version:    2.4.22
+Version:    2.4.23
 Release:    1%{?dist}
 Summary:    Microsoft OneDrive Client
 Group:      System Environment/Network
@@ -59,8 +65,13 @@
 %{_docdir}/%{name}
 %{_bindir}/%{name}
 %if 0%{?with_systemd}
+%if 0%{?rhel_unitdir}
+%{_unitdir}/%{name}.service
+%{_unitdir}/%{name}@.service
+%else
 %{_userunitdir}/%{name}.service
 %{_unitdir}/%{name}@.service
+%endif
 %else
 %{_bindir}/onedrive_service.sh
 /etc/init.d/onedrive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/contrib/systemd/onedrive.service.in 
new/onedrive-2.4.23/contrib/systemd/onedrive.service.in
--- old/onedrive-2.4.22/contrib/systemd/onedrive.service.in     2022-12-05 
23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/contrib/systemd/onedrive.service.in     2023-01-05 
23:00:45.000000000 +0100
@@ -9,7 +9,7 @@
 # If you know what you are doing please try to enable them.
 
 ProtectSystem=full
-PrivateUsers=true
+#PrivateUsers=true
 #PrivateDevices=true
 ProtectHostname=true
 #ProtectClock=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/docs/Docker.md 
new/onedrive-2.4.23/docs/Docker.md
--- old/onedrive-2.4.22/docs/Docker.md  2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/docs/Docker.md  2023-01-05 23:00:45.000000000 +0100
@@ -3,8 +3,8 @@
 
 | Container Base | Docker Tag  | Description                                   
                 | x86_64 | ARMHF | AARCH64 |
 
|----------------|-------------|----------------------------------------------------------------|:------:|:-----:|:-------:|
-| Alpine Linux   | edge-alpine | Docker container based on Apline 3.16 using 
'master'           |✔|❌|✔|
-| Alpine Linux   | alpine      | Docker container based on Apline 3.16 using 
latest release     |✔|❌|✔|
+| Alpine Linux   | edge-alpine | Docker container based on Alpine 3.16 using 
'master'           |✔|❌|✔|
+| Alpine Linux   | alpine      | Docker container based on Alpine 3.16 using 
latest release     |✔|❌|✔|
 | Debian         | debian      | Docker container based on Debian Bullseye 
using latest release |✔|✔|✔|
 | Debian         | edge        | Docker container based on Debian Bullseye 
using 'master'       |✔|✔|✔|
 | Debian         | edge-debian | Docker container based on Debian Bullseye 
using 'master'       |✔|✔|✔|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/docs/INSTALL.md 
new/onedrive-2.4.23/docs/INSTALL.md
--- old/onedrive-2.4.22/docs/INSTALL.md 2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/docs/INSTALL.md 2023-01-05 23:00:45.000000000 +0100
@@ -17,7 +17,7 @@
 | Gentoo                          | 
[onedrive](https://gpo.zugaina.org/net-misc/onedrive)                        | 
No API Available |✔|✔|❌|❌| |
 | Homebrew                        | 
[onedrive](https://formulae.brew.sh/formula/onedrive)                        | 
<a href="https://formulae.brew.sh/formula/onedrive";><img 
src="https://repology.org/badge/version-for-repo/homebrew/onedrive.svg?header="; 
alt="Homebrew package" width="46" height="20"></a> |❌|✔|❌|❌| |
 | NixOS                           | 
[onedrive](https://search.nixos.org/packages?channel=20.09&from=0&size=50&sort=relevance&query=onedrive)|<a
 
href="https://search.nixos.org/packages?channel=20.09&from=0&size=50&sort=relevance&query=onedrive";><img
 
src="https://repology.org/badge/version-for-repo/nix_unstable/onedrive.svg?header=";
 alt="nixpkgs unstable package" width="46" height="20"></a>|❌|✔|❌|❌| 
Use package `onedrive` either by adding it to `configuration.nix` or by using 
the command `nix-env -iA <channel name>.onedrive`. This does not install a 
service. To install a service, use unstable channel (will stabilize in 20.09) 
and add `services.onedrive.enable=true` in `configuration.nix`. You can also 
add a custom package using the `services.onedrive.package` option (recommended 
since package lags upstream). Enabling the service installs a default package 
too (based on the channel). You can also add multiple onedrive accounts 
trivially, see [documentation](https://github.com/N
 ixOS/nixpkgs/pull/77734#issuecomment-575874225). |
-| OpenSuSE                        | 
[onedrive](https://software.opensuse.org/package/onedrive)                   
|<a href="https://software.opensuse.org/package/onedrive";><img 
src="https://repology.org/badge/version-for-repo/opensuse_tumbleweed/onedrive.svg?header=";
 alt="openSUSE Tumbleweed package" width="46" height="20"></a>|✔|✔|❌|❌| 
|
+| OpenSuSE                        | 
[onedrive](https://software.opensuse.org/package/onedrive)                   
|<a href="https://software.opensuse.org/package/onedrive";><img 
src="https://repology.org/badge/version-for-repo/opensuse_network_tumbleweed/onedrive.svg?header=";
 alt="openSUSE Tumbleweed package" width="46" height="20"></a>|✔|✔|❌|❌| 
|
 | OpenSuSE Build Service          | 
[onedrive](https://build.opensuse.org/package/show/home:npreining:debian-ubuntu-onedrive/onedrive)
 | No API Available |✔|✔|✔|✔| Package Build Service for Debian and 
Ubuntu | 
 | Raspbian                        | 
[onedrive](https://archive.raspbian.org/raspbian/pool/main/o/onedrive/)      
|<a href="https://archive.raspbian.org/raspbian/pool/main/o/onedrive/";><img 
src="https://repology.org/badge/version-for-repo/raspbian_stable/onedrive.svg?header=";
 alt="Raspbian Stable package" width="46" height="20"></a> |❌|❌|✔|✔| 
**Note:** Do not install from Raspbian Package Repositories<br><br>It is 
recommended that for Raspbian that you install from OpenSuSE Build Service 
using the Debian Package Install [Instructions](ubuntu-package-install.md) |
 | Slackware                       | 
[onedrive](https://slackbuilds.org/result/?search=onedrive&sv=)        |<a 
href="https://slackbuilds.org/result/?search=onedrive&sv=";><img 
src="https://repology.org/badge/version-for-repo/slackbuilds/onedrive.svg?header=";
 alt="SlackBuilds package" width="46" height="20"></a>|✔|✔|❌|❌| |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/docs/USAGE.md 
new/onedrive-2.4.23/docs/USAGE.md
--- old/onedrive-2.4.22/docs/USAGE.md   2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/docs/USAGE.md   2023-01-05 23:00:45.000000000 +0100
@@ -216,10 +216,11 @@
 ```text
 onedrive --synchronize --upload-only
 ```
-**Note:** If a file or folder is present on OneDrive, that does not exist 
locally, it will be removed. If the data on OneDrive should be kept, the 
following should be used:
+**Note:** If a file or folder is present on OneDrive, that was previously 
sycned and now does not exist locally, that item it will be removed from 
OneDrive. If the data on OneDrive should be kept, the following should be used:
 ```text
 onedrive --synchronize --upload-only --no-remote-delete
 ```
+**Note:** The operation of 'upload only' does not request data from OneDrive 
about what 'other' data exists online. The client only knows about the data 
that 'this' client uploaded, thus any files or folders created or uploaded 
outside of this client will remain untouched online.
 
 ### Performing a selective sync via 'sync_list' file
 Selective sync allows you to sync only specific files and directories.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/docs/application-security.md 
new/onedrive-2.4.23/docs/application-security.md
--- old/onedrive-2.4.22/docs/application-security.md    2022-12-05 
23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/docs/application-security.md    2023-01-05 
23:00:45.000000000 +0100
@@ -35,7 +35,7 @@
 | Sites.ReadWrite.All   | Delegated | Have full access to all items in all 
site collections | No |
 | offline_access   | Delegated | Maintain access to data you have given it 
access to | No |
 
-When these delegated API permissions are commbined, these provide the 
effective authentication scope for the OneDrive Client for Linux to access your 
data. The effective 'default' permissions will be:
+When these delegated API permissions are combined, these provide the effective 
authentication scope for the OneDrive Client for Linux to access your data. The 
effective 'default' permissions will be:
 
 | API / Permissions name | Type | Description | Admin consent required |
 |---|---|---|---|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/src/main.d 
new/onedrive-2.4.23/src/main.d
--- old/onedrive-2.4.22/src/main.d      2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/src/main.d      2023-01-05 23:00:45.000000000 +0100
@@ -61,6 +61,7 @@
        // start and finish messages
        string startMessage = "Starting a sync with OneDrive";
        string finishMessage = "Sync with OneDrive is complete";
+       string helpMessage = "Please use 'onedrive --help' for further 
assistance in regards to running this application.";
        
        // hash file permission values
        string hashPermissionValue = "600";
@@ -927,7 +928,36 @@
                performSyncOK = true;
        }
 
-       // create-directory, remove-directory, source-directory, 
destination-directory
+       // --source-directory must only be used with --destination-directory
+       // neither can (or should) be added individually as they have a no 
operational impact if they are
+       if (((cfg.getValueString("source_directory") == "") && 
(cfg.getValueString("destination_directory") != "")) || 
((cfg.getValueString("source_directory") != "") && 
(cfg.getValueString("destination_directory") == ""))) {
+               // so either --source-directory or --destination-directory was 
passed in, without the other required item being passed in
+               // --source-directory or --destination-directory cannot be used 
with --synchronize or --monitor
+               writeln();
+               if (performSyncOK) {
+                       // log an error
+                       log.error("ERROR: --source-directory or 
--destination-directory cannot be used with --synchronize or --monitor");
+               } else {
+                       // display issue with using these options
+                       string emptyParameter;
+                       string dataParameter;
+                       if (cfg.getValueString("source_directory").empty) {
+                               emptyParameter = "--source-directory";
+                               dataParameter = "--destination-directory";
+                       } else {
+                               emptyParameter = "--destination-directory";
+                               dataParameter = "--source-directory";
+                       }
+                       log.error("ERROR: " ~ dataParameter ~ " was passed in 
without also using " ~ emptyParameter);   
+               }
+               // Use exit scopes to shutdown API
+               writeln();
+               log.error(helpMessage);
+               writeln();
+               return EXIT_FAILURE;
+       }
+
+       // --create-directory, --remove-directory, --source-directory, 
--destination-directory
        // these are activities that dont perform a sync, so to not generate an 
error message for these items either
        if (((cfg.getValueString("create_directory") != "") || 
(cfg.getValueString("remove_directory") != "")) || 
((cfg.getValueString("source_directory") != "") && 
(cfg.getValueString("destination_directory") != "")) || 
(cfg.getValueString("get_file_link") != "") || 
(cfg.getValueString("modified_by") != "") || 
(cfg.getValueString("create_share_link") != "") || 
(cfg.getValueString("get_o365_drive_id") != "") || 
cfg.getValueBool("display_sync_status") || 
cfg.getValueBool("list_business_shared_folders")) {
                performSyncOK = true;
@@ -941,7 +971,8 @@
                        if (exists(cfg.refreshTokenFilePath)) {
                                // OneDrive refresh token exists
                                log.log("\nApplication has been successfully 
authorised, however no additional command switches were provided.\n");
-                               log.log("Please use 'onedrive --help' for 
further assistance in regards to running this application.\n");
+                               log.log(helpMessage);
+                               writeln();
                                // Use exit scopes to shutdown API
                                return EXIT_SUCCESS;
                        } else {
@@ -961,9 +992,9 @@
        // if --synchronize && --monitor passed in, exit & display help as 
these conflict with each other
        if (cfg.getValueBool("synchronize") && cfg.getValueBool("monitor")) {
                writeln();
-               writeln("ERROR: --synchronize and --monitor cannot be used 
together");
+               log.error("ERROR: --synchronize and --monitor cannot be used 
together");
                writeln();
-               writeln("Please use 'onedrive --help' for further assistance in 
regards to running this application.");
+               log.error(helpMessage);
                writeln();
                // Use exit scopes to shutdown API
                return EXIT_FAILURE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/src/onedrive.d 
new/onedrive-2.4.23/src/onedrive.d
--- old/onedrive-2.4.22/src/onedrive.d  2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/src/onedrive.d  2023-01-05 23:00:45.000000000 +0100
@@ -616,6 +616,12 @@
                redeemToken(c.front);
                return true;
        }
+       
+       string getSiteSearchUrl()
+       {
+               // Return the actual siteSearchUrl being used and/or requested 
when performing 'siteQuery = onedrive.o365SiteSearch(nextLink);' call
+               return .siteSearchUrl;
+       }
 
        ulong getRetryAfterValue()
        {
@@ -1780,7 +1786,7 @@
                        case 403:
                                // OneDrive responded that the user is forbidden
                                log.vlog("OneDrive returned a 'HTTP 403 - 
Forbidden' - gracefully handling error");
-                               // Throw this as a specific exception so this 
is caught when performing sync.o365SiteSearch
+                               // Throw this as a specific exception so this 
is caught when performing 'siteQuery = onedrive.o365SiteSearch(nextLink);' call
                                throw new 
OneDriveException(http.statusLine.code, http.statusLine.reason, response);
 
                        //      412 - Precondition Failed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/src/sync.d 
new/onedrive-2.4.23/src/sync.d
--- old/onedrive-2.4.22/src/sync.d      2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/src/sync.d      2023-01-05 23:00:45.000000000 +0100
@@ -6160,6 +6160,13 @@
                string nextLink;
                string[] siteSearchResults;
                
+               // The account type must not be a personal account type
+               if (accountType == "personal"){
+                       log.error("ERROR: A OneDrive Personal Account cannot be 
used with --get-O365-drive-id. Please re-authenticate your client using a 
OneDrive Business Account.");
+                       return;
+               }
+               
+               // What query are we performing?
                log.log("Office 365 Library Name Query: ", 
o365SharedLibraryName);
                
                for (;;) {
@@ -6167,11 +6174,24 @@
                                siteQuery = onedrive.o365SiteSearch(nextLink);
                        } catch (OneDriveException e) {
                                log.error("ERROR: Query of OneDrive for Office 
365 Library Name failed");
+                               // Forbidden - most likely authentication scope 
needs to be updated
                                if (e.httpStatusCode == 403) {
-                                       // Forbidden - most likely 
authentication scope needs to be updated
                                        log.error("ERROR: Authentication scope 
needs to be updated. Use --reauth and re-authenticate client.");
                                        return;
                                }
+                               // Requested resource cannot be found
+                               if (e.httpStatusCode == 404) {
+                                       string siteSearchUrl;
+                                       if (nextLink.empty) {
+                                               siteSearchUrl = 
onedrive.getSiteSearchUrl();
+                                       } else {
+                                               siteSearchUrl = nextLink;
+                                       }
+                                       // log the error
+                                       log.error("ERROR: Your OneDrive Account 
and Authentication Scope cannot access this OneDrive API: ", siteSearchUrl);
+                                       log.error("ERROR: To resolve, please 
discuss this issue with whomever supports your OneDrive and SharePoint 
environment.");
+                                       return;
+                               }
                                // HTTP request returned status code 429 (Too 
Many Requests)
                                if (e.httpStatusCode == 429) {
                                        // HTTP request returned status code 
429 (Too Many Requests). We need to leverage the response Retry-After HTTP 
header to ensure minimum delay until the throttle is removed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/onedrive-2.4.22/src/util.d 
new/onedrive-2.4.23/src/util.d
--- old/onedrive-2.4.22/src/util.d      2022-12-05 23:15:50.000000000 +0100
+++ new/onedrive-2.4.23/src/util.d      2023-01-05 23:00:45.000000000 +0100
@@ -361,12 +361,14 @@
 }
 
 // Get the latest release version from GitHub
-string getLatestReleaseVersion() {
+JSONValue getLatestReleaseDetails() {
        // Import curl just for this function
        import std.net.curl;
        char[] content;
-       JSONValue json;
+       JSONValue githubLatest;
+       JSONValue versionDetails;
        string latestTag;
+       string publishedDate;
        
        try {
                content = 
get("https://api.github.com/repos/abraunegg/onedrive/releases/latest";);
@@ -376,50 +378,187 @@
        }
        
        try {
-               json = content.parseJSON();
+               githubLatest = content.parseJSON();
        } catch (JSONException e) {
                // unable to parse the content JSON, set to blank JSON
                log.vdebug("Unable to parse GitHub JSON response");
-               json = parseJSON("{}");
+               githubLatest = parseJSON("{}");
        }
        
-       // json has to be a valid JSON object
-       if (json.type() == JSONType.object){
-               if ("tag_name" in json) {
+       // githubLatest has to be a valid JSON object
+       if (githubLatest.type() == JSONType.object){
+               // use the returned tag_name
+               if ("tag_name" in githubLatest) {
                        // use the provided tag
                        // "tag_name": "vA.B.CC" and strip 'v'
-                       latestTag = strip(json["tag_name"].str, "v");
+                       latestTag = strip(githubLatest["tag_name"].str, "v");
                } else {
                        // set to latestTag zeros
-                       log.vdebug("'tag_name' unavailable in JSON response. 
Setting latest GitHub release version to 0.0.0");
+                       log.vdebug("'tag_name' unavailable in JSON response. 
Setting GitHub 'tag_name' release version to 0.0.0");
                        latestTag = "0.0.0";
                }
+               // use the returned published_at date
+               if ("published_at" in githubLatest) {
+                       // use the provided value
+                       publishedDate = githubLatest["published_at"].str;
+               } else {
+                       // set to v2.0.0 release date
+                       log.vdebug("'published_at' unavailable in JSON 
response. Setting GitHub 'published_at' date to 2018-07-18T18:00:00Z");
+                       publishedDate = "2018-07-18T18:00:00Z";
+               }
        } else {
                // JSONValue is not an object
-               log.vdebug("Invalid JSON Object. Setting latest GitHub release 
version to 0.0.0");
+               log.vdebug("Invalid JSON Object. Setting GitHub 'tag_name' 
release version to 0.0.0");
                latestTag = "0.0.0";
+               log.vdebug("Invalid JSON Object. Setting GitHub 'published_at' 
date to 2018-07-18T18:00:00Z");
+               publishedDate = "2018-07-18T18:00:00Z"; 
        }
                
-       // return the latest github version
-       return latestTag;
+       // return the latest github version and published date as our own JSON
+       versionDetails = [
+               "latestTag": JSONValue(latestTag),
+               "publishedDate": JSONValue(publishedDate)
+       ];
+       
+       // return JSON
+       return versionDetails;
+}
+
+// Get the release details from the 'current' running version
+JSONValue getCurrentVersionDetails(string thisVersion) {
+       // Import curl just for this function
+       import std.net.curl;
+       char[] content;
+       JSONValue githubDetails;
+       JSONValue versionDetails;
+       string versionTag = "v" ~ thisVersion;
+       string publishedDate;
+       
+       try {
+               content = 
get("https://api.github.com/repos/abraunegg/onedrive/releases";);
+       } catch (CurlException e) {
+               // curl generated an error - meaning we could not query GitHub
+               log.vdebug("Unable to query GitHub for release details");
+       }
+       
+       try {
+               githubDetails = content.parseJSON();
+       } catch (JSONException e) {
+               // unable to parse the content JSON, set to blank JSON
+               log.vdebug("Unable to parse GitHub JSON response");
+               githubDetails = parseJSON("{}");
+       }
+       
+       // githubDetails has to be a valid JSON array
+       if (githubDetails.type() == JSONType.array){
+               foreach (searchResult; githubDetails.array) {
+                       // searchResult["tag_name"].str;
+                       if (searchResult["tag_name"].str == versionTag) {
+                               log.vdebug("MATCHED version");
+                               log.vdebug("tag_name: ", 
searchResult["tag_name"].str);
+                               log.vdebug("published_at: ", 
searchResult["published_at"].str);
+                               publishedDate = 
searchResult["published_at"].str;
+                       }
+               }
+               
+               if (publishedDate.empty) {
+                       // empty .. no version match ?
+                       // set to v2.0.0 release date
+                       log.vdebug("'published_at' unavailable in JSON 
response. Setting GitHub 'published_at' date to 2018-07-18T18:00:00Z");
+                       publishedDate = "2018-07-18T18:00:00Z";
+               }
+       } else {
+               // JSONValue is not an Array
+               log.vdebug("Invalid JSON Array. Setting GitHub 'published_at' 
date to 2018-07-18T18:00:00Z");
+               publishedDate = "2018-07-18T18:00:00Z"; 
+       }
+               
+       // return the latest github version and published date as our own JSON
+       versionDetails = [
+               "versionTag": JSONValue(thisVersion),
+               "publishedDate": JSONValue(publishedDate)
+       ];
+       
+       // return JSON
+       return versionDetails;
 }
 
 // Check the application version versus GitHub latestTag
 void checkApplicationVersion() {
-       // calculate if the client is current version or not
-       string latestVersion = strip(getLatestReleaseVersion());
+       // Get the latest details from GitHub
+       JSONValue latestVersionDetails = getLatestReleaseDetails();
+       string latestVersion = latestVersionDetails["latestTag"].str;
+       SysTime publishedDate = 
SysTime.fromISOExtString(latestVersionDetails["publishedDate"].str).toUTC();
+       SysTime releaseGracePeriod = publishedDate;
+       SysTime currentTime = Clock.currTime().toUTC();
+       
+       // drop fraction seconds
+       publishedDate.fracSecs = Duration.zero;
+       currentTime.fracSecs = Duration.zero;
+       releaseGracePeriod.fracSecs = Duration.zero;
+       // roll the grace period forward to allow distributions to catch up 
based on their release cycles
+       releaseGracePeriod = releaseGracePeriod.add!"months"(1);
+
+       // what is this clients version?
        auto currentVersionArray = strip(strip(import("version"), 
"v")).split("-");
        string applicationVersion = currentVersionArray[0];
        
-       // display warning if not current
+       // debug output
+       log.vdebug("applicationVersion:       ", applicationVersion);
+       log.vdebug("latestVersion:            ", latestVersion);
+       log.vdebug("publishedDate:            ", publishedDate);
+       log.vdebug("currentTime:              ", currentTime);
+       log.vdebug("releaseGracePeriod:       ", releaseGracePeriod);
+       
+       // display details if not current
+       // is application version is older than available on GitHub
        if (applicationVersion != latestVersion) {
-               // is application version is older than available on GitHub
+               // application version is different
+               bool displayObsolete = false;
+               
+               // what warning do we present?
                if (applicationVersion < latestVersion) {
-                       // application version is obsolete and unsupported
+                       // go get this running version details
+                       JSONValue thisVersionDetails = 
getCurrentVersionDetails(applicationVersion);
+                       SysTime thisVersionPublishedDate = 
SysTime.fromISOExtString(thisVersionDetails["publishedDate"].str).toUTC();
+                       thisVersionPublishedDate.fracSecs = Duration.zero;
+                       log.vdebug("thisVersionPublishedDate: ", 
thisVersionPublishedDate);
+                       
+                       // the running version grace period is its release date 
+ 1 month
+                       SysTime thisVersionReleaseGracePeriod = 
thisVersionPublishedDate;
+                       thisVersionReleaseGracePeriod = 
thisVersionReleaseGracePeriod.add!"months"(1);
+                       log.vdebug("thisVersionReleaseGracePeriod: ", 
thisVersionReleaseGracePeriod);
+                       
+                       // is the published latestest release date greater than 
the current running release date + grace period
+                       if (thisVersionReleaseGracePeriod.toUnixTime() < 
publishedDate.toUnixTime()) {
+                               // the running client is obsolete
+                               displayObsolete = true;
+                       }
+                       
+                       // is this running version obsolete ?
+                       if (!displayObsolete) {
+                               // if releaseGracePeriod > currentTime
+                               // display an information warning that there is 
a new release available
+                               if (releaseGracePeriod.toUnixTime() > 
currentTime.toUnixTime()) {
+                                       // inside release grace period ... set 
flag to false
+                                       displayObsolete = false;
+                               } else {
+                                       // outside grace period
+                                       displayObsolete = true;
+                               }
+                       }
+                       
+                       // display version response
                        writeln();
-                       log.logAndNotify("WARNING: Your onedrive client version 
is obsolete and unsupported. Please upgrade your client version.");
-                       log.vlog("Application version: ", applicationVersion);
-                       log.vlog("Version available:   ", latestVersion);
+                       if (!displayObsolete) {
+                               // display the new version is available message
+                               log.logAndNotify("INFO: A new onedrive client 
version is available. Please upgrade your client version when possible.");
+                       } else {
+                               // display the obsolete message
+                               log.logAndNotify("WARNING: Your onedrive client 
version is now obsolete and unsupported. Please upgrade your client version.");
+                       }
+                       log.log("Current Application Version: ", 
applicationVersion);
+                       log.log("Version Available:           ", latestVersion);
                        writeln();
                }
        }

++++++ onedrive.obsinfo ++++++
--- /var/tmp/diff_new_pack.RmYGFj/_old  2023-01-09 17:24:12.207294559 +0100
+++ /var/tmp/diff_new_pack.RmYGFj/_new  2023-01-09 17:24:12.211294582 +0100
@@ -1,5 +1,5 @@
 name: onedrive
-version: 2.4.22
-mtime: 1670278550
-commit: 72898345e7e18de511c56495c209760ed895e4ac
+version: 2.4.23
+mtime: 1672956045
+commit: b9a239ace1b91dcb39e700fbf338f2be3e603b54
 

Reply via email to