From e3e4e449efd3911fa563a047d8a2c25377bbb709 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Mon, 29 Jun 2020 08:05:45 +1000 Subject: [PATCH] Release files for 2.4.3 (#970) * Release files for 2.4.3 --- CHANGELOG.md | 23 +++++++++ configure | 20 ++++---- configure.ac | 2 +- ...ive-2.4.2.ebuild => onedrive-2.4.3.ebuild} | 0 contrib/spec/onedrive.spec.in | 2 +- docs/INSTALL.md | 2 +- docs/USAGE.md | 47 +++++++++++++------ onedrive.1.in | 28 +++++++++-- 8 files changed, 92 insertions(+), 32 deletions(-) rename contrib/gentoo/{onedrive-2.4.2.ebuild => onedrive-2.4.3.ebuild} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca8902c..11222278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ 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.3 - 2020-06-29 +### Fixed +* Check if symbolic link is relative to location path +* When using output logfile, fix inconsistent output spacing +* Perform initial sync at startup in monitor mode +* Handle a 'race' condition to process inotify events generated whilst performing DB or filesystem walk +* Fix segfault when moving folder outside the sync directory when using --monitor on Arch Linux + +### Added +* Added additional inotify event debugging +* Added support for loading system configs if there's no user config +* Added Ubuntu installation details to include installing the client from a PPA +* Added openSUSE installation details to include installing the client from a package +* Added support for comments in sync_list file +* Implement recursive deletion when Retention Policy is enabled on OneDrive Business Accounts +* Implement support for National cloud deployments +* Implement OneDrive Business Shared Folders Support + +### Updated +* Updated documentation files (various) +* Updated log output messaging when a full scan has been set or triggered +* Updated buildNormalizedPath complexity to simplify code +* Updated to only process OneDrive Personal Shared Folders only if account type is 'personal' ## 2.4.2 - 2020-05-27 ### Fixed diff --git a/configure b/configure index 93e4a9c5..2f130e70 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for onedrive v2.4.3-dev. +# Generated by GNU Autoconf 2.69 for onedrive v2.4.3. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='onedrive' PACKAGE_TARNAME='onedrive' -PACKAGE_VERSION='v2.4.3-dev' -PACKAGE_STRING='onedrive v2.4.3-dev' +PACKAGE_VERSION='v2.4.3' +PACKAGE_STRING='onedrive v2.4.3' PACKAGE_BUGREPORT='https://github.com/abraunegg/onedrive' PACKAGE_URL='' @@ -1217,7 +1217,7 @@ if test "$ac_init_help" = "long"; then # 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.3-dev to adapt to many kinds of systems. +\`configure' configures onedrive v2.4.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1278,7 +1278,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of onedrive v2.4.3-dev:";; + short | recursive ) echo "Configuration of onedrive v2.4.3:";; esac cat <<\_ACEOF @@ -1389,7 +1389,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -onedrive configure v2.4.3-dev +onedrive configure v2.4.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1406,7 +1406,7 @@ cat >config.log <<_ACEOF 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.3-dev, which was +It was created by onedrive $as_me v2.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2158,7 +2158,7 @@ fi -PACKAGE_DATE="May 2020" +PACKAGE_DATE="June 2020" @@ -3138,7 +3138,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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.3-dev, which was +This file was extended by onedrive $as_me v2.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3191,7 +3191,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -onedrive config.status v2.4.3-dev +onedrive config.status v2.4.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index dcc5faf2..11aa48a5 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl - commit the changed files (configure.ac, configure) dnl - tag the release AC_PREREQ([2.69]) -AC_INIT([onedrive],[v2.4.3-dev], [https://github.com/abraunegg/onedrive], [onedrive]) +AC_INIT([onedrive],[v2.4.3], [https://github.com/abraunegg/onedrive], [onedrive]) AC_CONFIG_SRCDIR([src/main.d]) diff --git a/contrib/gentoo/onedrive-2.4.2.ebuild b/contrib/gentoo/onedrive-2.4.3.ebuild similarity index 100% rename from contrib/gentoo/onedrive-2.4.2.ebuild rename to contrib/gentoo/onedrive-2.4.3.ebuild diff --git a/contrib/spec/onedrive.spec.in b/contrib/spec/onedrive.spec.in index a9ad6ce8..589fcfaa 100644 --- a/contrib/spec/onedrive.spec.in +++ b/contrib/spec/onedrive.spec.in @@ -6,7 +6,7 @@ %endif Name: onedrive -Version: 2.4.2 +Version: 2.4.3 Release: 1%{?dist} Summary: Microsoft OneDrive Client Group: System Environment/Network diff --git a/docs/INSTALL.md b/docs/INSTALL.md index dd47e0da..4abdc202 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -7,10 +7,10 @@ This project has been packaged for the following Linux distributions: * Debian, available from the package repository as [onedrive](https://packages.debian.org/sid/net/onedrive) * Fedora, available via package repositories as [onedrive](https://koji.fedoraproject.org/koji/packageinfo?packageID=26044) * NixOS, available on unstable channel (and stable since 20.03). Use package `onedrive` either by adding it to `configuration.nix` or by using the command `nix-env -iA .onedrive`. This does not install a service. There is a [PR](https://github.com/NixOS/nixpkgs/pull/77734) (which needs work) which has code which can be used to install a service. See documentation in the same PR. +* openSUSE, available for Tumbleweed as [onedrive](https://software.opensuse.org/package/onedrive) - just install using: `zypper in onedrive` * Slackware, available from the slackbuilds.org repository as [onedrive](https://slackbuilds.org/repository/14.2/network/onedrive/) * Solus, available from the package repository as [onedrive](https://dev.getsol.us/search/query/FB7PIf1jG9Z9/#R) * Ubuntu, available as a package from the following PPA [onedrive](https://launchpad.net/~yann1ck/+archive/ubuntu/onedrive) -* openSUSE, available for Tumbleweed. Just install using: `zypper in onedrive` #### Important Note: Distribution packages may be of an older release when compared to the latest release that is [available](https://github.com/abraunegg/onedrive/releases). If a package is out of date, please contact the package maintainer for resolution. diff --git a/docs/USAGE.md b/docs/USAGE.md index 164c7cbc..f612393b 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -297,6 +297,8 @@ The default configuration file is listed below: # application_id = "" # resync = "false" # bypass_data_preservation = "false" +# azure_ad_endpoint = "" +# sync_business_shared_folders = "false" ``` @@ -418,11 +420,16 @@ To enable selective sync create a file named `sync_list` in `~/.config/onedrive` Each line of the file represents a relative path from your `sync_dir`. All files and directories not matching any line of the file will be skipped during all operations. Here is an example of `sync_list`: ```text +# sync_list supports comments +# Exclude my Backup folder Backup +# Exclude this single document Documents/latest_report.docx -Work/ProjectX +# Exclude all Work/Project directories +Work/Project* notes.txt -Blender +# Exclude /Blender in the ~OneDrive root but not if elsewhere +/Blender Cinema Soc Codes Textbooks @@ -452,7 +459,7 @@ check_nosync = "true" Folders shared with you can be synced by adding them to your OneDrive. To do that open your Onedrive, go to the Shared files list, right click on the folder you want to sync and then click on "Add to my OneDrive". ### Shared folders (OneDrive Business or Office 365) -Currently not supported. +Refer to [./BusinessSharedFolders.md](BusinessSharedFolders.md) for configuration assistance. ### SharePoint / Office 365 Shared Libraries Refer to [./Office365.md](Office365.md) for configuration assistance. @@ -505,27 +512,29 @@ To change what 'user' the client runs under (by default root), manually edit the systemctl --user enable onedrive systemctl --user start onedrive ``` +**Note:** `systemctl --user` directive is not applicable for Red Hat Enterprise Linux (RHEL) or CentOS Linux platforms - see below. + +**Note:** This will run the 'onedrive' process with a UID/GID of '0', thus, any files or folders that are created will be owned by 'root' To see the logs run: ```text -journalctl --user-unit onedrive -f +journalctl --user-unit=onedrive -f ``` ### OneDrive service running as root user via systemd (Red Hat Enterprise Linux, CentOS Linux) - ```text systemctl enable onedrive systemctl start onedrive ``` +**Note:** This will run the 'onedrive' process with a UID/GID of '0', thus, any files or folders that are created will be owned by 'root' To see the logs run: ```text -journalctl onedrive -f +journalctl --unit=onedrive -f ``` -### OneDrive service running as a non-root user via systemd (without notifications or GUI) - -In some cases it is desirable to run the OneDrive client as a service, but not running as the 'root' user. In this case, follow the directions below to configure the service for a non-root user. +### OneDrive service running as a non-root user via systemd (All Linux Distributions) +In some cases it is desirable to run the OneDrive client as a service, but not running as the 'root' user. In this case, follow the directions below to configure the service for your normal user login. 1. As the user, who will be running the service, run the application in standalone mode, authorize the application for use & validate that the synchronization is working as expected: ```text @@ -541,8 +550,12 @@ systemctl start onedrive@.service systemctl status onedrive@.service ``` -### OneDrive service running as a non-root user via systemd (with notifications enabled) (Arch, Ubuntu, Debian, OpenSuSE, Fedora) +To see the logs run: +```text +journalctl --unit=onedrive@ -f +``` +### OneDrive service running as a non-root user via systemd (with notifications enabled) (Arch, Ubuntu, Debian, OpenSuSE, Fedora) In some cases you may wish to receive GUI notifications when using the client when logged in as a non-root user. In this case, follow the directions below: 1. Login via graphical UI as user you wish to enable the service for @@ -559,10 +572,10 @@ systemctl --user start onedrive To see the logs run: ```text -journalctl --user-unit onedrive -f +journalctl --user-unit=onedrive -f ``` -**Note:** `systemctl --user` is not applicable for Red Hat Enterprise Linux (RHEL) or CentOS Linux platforms +**Note:** `systemctl --user` directive is not applicable for Red Hat Enterprise Linux (RHEL) or CentOS Linux platforms ## Additional Configuration ### Using multiple OneDrive accounts @@ -661,8 +674,8 @@ Options: --auth-files ARG Perform authorization via two files passed in as ARG in the format `authUrl:responseUrl` - The authorization URL is written to the `authUrl`, then onedrive waits for the file `responseUrl` - to be present, and reads the response from that file. + The authorization URL is written to the `authUrl`, then onedrive waits for the file `responseUrl` + to be present, and reads the response from that file. --check-for-nomount Check for the presence of .nosync in the syncdir root. If found, do not perform sync. --check-for-nosync @@ -703,6 +716,8 @@ Options: Display the file link of a synced file --help -h This help information. + --list-shared-folders + List OneDrive Business Shared Folders --local-first Synchronize from the local directory source first, before downloading changes from OneDrive. --log-dir ARG @@ -739,7 +754,7 @@ Options: Skip dot files and folders from syncing --skip-file ARG Skip any files that match this pattern from syncing - --skip-size + --skip-size ARG Skip new files larger than this size (in MB) --skip-symlinks Skip syncing of symlinks @@ -747,6 +762,8 @@ Options: Source directory to rename or move on OneDrive - no sync will be performed. --sync-root-files Sync all files in sync_dir root when using sync_list. + --sync-shared-folders + Sync OneDrive Business Shared Folders --syncdir ARG Specify the local directory used for synchronization to OneDrive --synchronize diff --git a/onedrive.1.in b/onedrive.1.in index 60f6f896..ff048c0d 100644 --- a/onedrive.1.in +++ b/onedrive.1.in @@ -44,14 +44,14 @@ Set the directory used to store the configuration files \fB\-\-create\-directory\fP ARG Create a directory on OneDrive \- no sync will be performed. .TP -\fB\-\-destination\-directory\fP ARG -Destination directory for renamed or move on OneDrive \- no sync will be performed. -.TP \fB\-\-debug\-https\fP Debug OneDrive HTTPS communication. .br Configuration file key: \fBdebug_https\fP (default: \fBfalse\fP) .TP +\fB\-\-destination\-directory\fP ARG +Destination directory for renamed or move on OneDrive \- no sync will be performed. +.TP \fB\-\-disable\-notifications\fP Do not use desktop notifications in monitor mode .br @@ -83,6 +83,9 @@ Enable client activity to a separate log file .br Configuration file key: \fBenable_logging\fP (default: \fBfalse\fP) .TP +\fB\-\-force\fP +Force the deletion of data when a 'big delete' is detected +.TP \fB\-\-force\-http\-1.1\fP Force the use of HTTP 1.1 for all operations (DEPRECIATED) .br @@ -99,6 +102,9 @@ Query and return the Office 365 Drive ID for a given Office 365 SharePoint Share \fB\-\-get\-file\-link\fP ARG Display the file link of a synced file .TP +\fB\-\-list\-shared\-folders\fP +List OneDrive Business Shared Folders +.TP \fB\-\-local\-first\fP Synchronize from the local directory source first, before downloading changes from OneDrive. .br @@ -125,13 +131,18 @@ Keep monitoring for local and remote changes The number of seconds by which each sync operation is undertaken when idle under monitor mode .br -Configuration file key: \fBmonitor_interval\fP (default: \fB45\fP) +Configuration file key: \fBmonitor_interval\fP (default: \fB300\fP) .TP \fB\-\-monitor\-fullscan-frequency\fP ARG Number of sync runs before performing a full local scan of the synced directory .br Configuration file key: \fBmonitor_fullscan_frequency\fP (default: \fB10\fP) .TP +\fB\-\-monitor\-log\-frequency\fP ARG +Frequency of logging in monitor mode +.br +Configuration file key: \fBmonitor_log_frequency\fP (default: \fB5\fP) +.TP \fB\-\-no\-remote\-delete\fP Do not delete local file 'deletes' from OneDrive when using \fB\-\-upload\-only\fR .br @@ -172,6 +183,9 @@ Skip any files that match this pattern from syncing .br Configuration file key: \fBskip_file\fP (default: \fB~*|.~*|*.tmp\fP) .TP +\fB\-\-skip\-size\fP ARG +Skip new files larger than this size (in MB) +.TP \fB\-\-skip\-symlinks\fP Skip syncing of symlinks .br @@ -182,6 +196,12 @@ Source directory to rename or move on OneDrive \- no sync will be performed. .TP \fB\-\-sync\-root\-files\fP Sync all files in sync_dir root when using sync_list. + +.TP +\fB\-\-sync\-shared\-folders\fP +Sync OneDrive Business Shared Folders +.br +Configuration file key: \fBsync_business_shared_folders\fP (default: \fBfalse\fP) .TP \fB\-\-syncdir\fP ARG Set the directory used to sync the files that are synced