Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release files for 2.4.8 #1167

Merged
merged 7 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# Changelog

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.8 - 2020-11-29
### Fixed
* Fix to use config set option for 'remove_source_files' and 'skip_dir_strict_match' rather than ignore if set
* Fix download failure and crash due to incorrect local filesystem permissions when using mounted external devices
* Fix to not change permissions on pre-existing local directories
* Fix logging output when authentication authorisation fails to not say authorisation was successful
* Fix to check application_id before setting redirect URL when using specific Azure endpoints
* Fix application crash in --monitor mode due to 'Failed to stat file' when setgid is used on a directory

### Updated
* Updated --verbose logging output for config options when set
* Updated documentation ()

## 2.4.7 - 2020-11-09
### Fixed
* Fix debugging output for /delta changes available queries
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endif
system_unit_files = contrib/systemd/[email protected]
user_unit_files = contrib/systemd/onedrive.service

DOCFILES = README.md config LICENSE CHANGELOG.md docs/Docker.md docs/INSTALL.md docs/Office365.md docs/USAGE.md docs/BusinessSharedFolders.md
DOCFILES = README.md config LICENSE CHANGELOG.md docs/Docker.md docs/INSTALL.md docs/Office365.md docs/USAGE.md docs/BusinessSharedFolders.md docs/advanced-usage.md

ifneq ("$(wildcard /etc/redhat-release)","")
RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise Linux Server|CentOS)" | wc -l)
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -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.8-dev.
# Generated by GNU Autoconf 2.69 for onedrive v2.4.8.
#
# Report bugs to <https://github.com/abraunegg/onedrive>.
#
Expand Down Expand Up @@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='onedrive'
PACKAGE_TARNAME='onedrive'
PACKAGE_VERSION='v2.4.8-dev'
PACKAGE_STRING='onedrive v2.4.8-dev'
PACKAGE_VERSION='v2.4.8'
PACKAGE_STRING='onedrive v2.4.8'
PACKAGE_BUGREPORT='https://github.com/abraunegg/onedrive'
PACKAGE_URL=''

Expand Down Expand Up @@ -1219,7 +1219,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.8-dev to adapt to many kinds of systems.
\`configure' configures onedrive v2.4.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1280,7 +1280,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of onedrive v2.4.8-dev:";;
short | recursive ) echo "Configuration of onedrive v2.4.8:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1393,7 +1393,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
onedrive configure v2.4.8-dev
onedrive configure v2.4.8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand All @@ -1410,7 +1410,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.8-dev, which was
It was created by onedrive $as_me v2.4.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -3159,7 +3159,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.8-dev, which was
This file was extended by onedrive $as_me v2.4.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -3212,7 +3212,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.8-dev
onedrive config.status v2.4.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.8-dev], [https://github.com/abraunegg/onedrive], [onedrive])
AC_INIT([onedrive],[v2.4.8], [https://github.com/abraunegg/onedrive], [onedrive])
AC_CONFIG_SRCDIR([src/main.d])


Expand Down
2 changes: 1 addition & 1 deletion contrib/spec/onedrive.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%endif

Name: onedrive
Version: 2.4.7
Version: 2.4.8
Release: 1%{?dist}
Summary: Microsoft OneDrive Client
Group: System Environment/Network
Expand Down
3 changes: 2 additions & 1 deletion docs/BusinessSharedFolders.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Syncing OneDrive Business Shared Folders requires additional configuration for your 'onedrive' client:
1. List available shared folders to determine which folder you wish to sync & to validate that you have access to that folder
2. Create a new file called 'business_shared_folders' in your config directory which contains a list of the shared folders you wish to sync
3. Perform a sync
3. Test the configuration using '--dry-run'
4. Sync the OneDrive Business Shared folders as required

## Listing available OneDrive Business Shared Folders
List the available OneDrive Business Shared folders with the following command:
Expand Down
35 changes: 29 additions & 6 deletions docs/Office365.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
# Show how to access a Sharepoint group drive in Office 365 business or education
## Obtaining the Sharepoint Site Details
# How to configure OneDrive SharePoint Shared Library sync
Syncing a OneDrive SharePoint library requires additional configuration for your 'onedrive' client:
1. Login to OneDrive and under 'Shared Libraries' obtain the shared library name
2. Query that shared library name using the client to obtain the required configuration details
3. Configure the client's config file with the required 'drive_id'
4. Test the configuration using '--dry-run'
5. Sync the SharePoint Library as required

## Listing available OneDrive SharePoint Libraries
1. Login to the OneDrive web interface and determine which shared library you wish to configure the client for:
![shared_libraries](./images/SharedLibraries.jpg)

## Query that shared library name using the client to obtain the required configuration details
2. Run the following command using the 'onedrive' client
```text
onedrive --get-O365-drive-id '<your library name>'
```
3. This will return the following:
```text
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Initializing the Synchronization Engine ...
Office 365 Library Name Query: <your library name>
SiteName: <your library name>
drive_id: b!6H_y8B...xU5
URL: <your site URL>
```

## Configuring the onedrive client
Once you have obtained the 'drive_id' above, add to your 'onedrive' configuration file (`~/.config/onedrive/config`) the following:
## Configure the client's config file with the required 'drive_id'
4. Once you have obtained the 'drive_id' above, add to your 'onedrive' configuration file (`~/.config/onedrive/config`) the following:
```text
drive_id = "insert the drive id from above here"
drive_id = "insert the drive_id value from above here"
```
The OneDrive client will now be configured to sync this SharePoint shared library to your local system.

**Note:** After changing `drive_id`, you must perform a full re-synchronization by adding `--resync` to your existing command line.

## Test the configuration using '--dry-run'
5. Test your new configuration using the `--dry-run` option to validate the the new configuration

## Sync the SharePoint Library as required
6. Sync the SharePoint Library to your system with either `--synchronize` or `--monitor` operations


The OneDrive client will now sync this SharePoint shared library to your local system.
# How to configure multiple OneDrive SharePoint Shared Library sync
Refer to [./advanced-usage.md](advanced-usage.md) for configuration assistance.
38 changes: 1 addition & 37 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,42 +665,7 @@ journalctl --user-unit=onedrive -f

## Additional Configuration
### Using multiple OneDrive accounts
You can run multiple instances of the application by specifying a different config directory in order to handle multiple OneDrive accounts. For example, if you have a work and a personal account, you can run the onedrive command using the --confdir parameter. Here is an example:

```text
onedrive --synchronize --verbose --confdir="~/.config/onedrivePersonal" &
onedrive --synchronize --verbose --confdir="~/.config/onedriveWork" &
```
or
```text
onedrive --monitor --verbose --confdir="~/.config/onedrivePersonal" &
onedrive --monitor --verbose --confdir="~/.config/onedriveWork" &
```

* `--synchronize` does a one-time sync
* `--monitor` keeps the application running and monitoring for changes both local and remote
* `&` puts the application in background and leaves the terminal interactive

**Important:** For each configuration, change the 'sync_dir' to a new value, unique for each specific configuration. Leaving this at the default of `sync_dir = "~/OneDrive"` will cause all data from both accounts to be synced to the same folder, then to each other.

### Automatic syncing of both OneDrive accounts
In order to automatically start syncing your OneDrive accounts, you will need to create a service file for each account. From the applicable 'user systemd folder':
* RHEL / CentOS: `/usr/lib/systemd/system`
* Others: `/usr/lib/systemd/user`

```text
cp onedrive.service onedrive-work.service
```
And edit the line beginning with `ExecStart` so that the confdir mirrors the one you used above:
```text
ExecStart=/usr/local/bin/onedrive --monitor --confdir="/path/to/config/dir"
```
Then you can safely run these commands:
```text
systemctl --user enable onedrive-work
systemctl --user start onedrive-work
```
Repeat these steps for each OneDrive account that you wish to use.
Refer to [./advanced-usage.md](advanced-usage.md) for configuration assistance.

### Access OneDrive service through a proxy
If you have a requirement to run the client through a proxy, there are a couple of ways to achieve this:
Expand Down Expand Up @@ -739,7 +704,6 @@ sudo restorecon -R -v /path/to/onedriveSyncFolder
```

## All available commands

Output of `onedrive --help`
```text
OneDrive - a client for OneDrive Cloud Services
Expand Down
119 changes: 119 additions & 0 deletions docs/advanced-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Advanced Configuration of the OneDrive Free Client
This document covers the following scenarios:
* Configuring the client to use mutlitple OneDrive accounts / configurations
* Configuring the client for use in dual-boot (Windows / Linux) situations

## Configuring the client to use mutlitple OneDrive accounts / configurations
Essentially, each OneDrive account or SharePoint Shared Library which you require to be synced needs to have it's own and unique configuration, local sync directory and service files. To do this, the following steps are needed:
1. Create a unique configuration folder for each onedrive client configuration that you need
2. Copy to this folder a copy of the default configuration file
3. Update the default configuration file as required, changing the required minimum config options and any additional options as needed to support your multi-account configuration
4. Authenticate the client
5. Test the configuration using '--display-config' and '--dry-run'
6. Sync the OneDrive account data as required using `--synchronize` or `--monitor`
7. Configure a unique systemd service file for this account configuration

### Create a unique configuration folder for each onedrive client configuration that you need
1. Make the configuration folder as required for this new configuration, for example:
```text
mkdir ~/.config/my-new-config
```

### Copy to this folder a copy of the default configuration file
2. Copy to this folder a copy of the default configuration file by downloading this file from GitHub and saving this file in the directory created above:
```text
wget -O ~/.config/my-new-config/config https://raw.githubusercontent.com/abraunegg/onedrive/master/config
```

### Update the default configuration file
3. The following config options *must* be updated to ensure that individual account data is not cross populated with other OneDrive accounts or other configurations:
* sync_dir

Other options that may require to be updated, depending on the OneDrive account that is being configured:
* drive_id
* application_id
* sync_business_shared_folders
* skip_dir
* skip_file
* Creation of a 'sync_list' file if required
* Creation of a 'business_shared_folders' file if required

### Authenticate the client
4. Authenticate the client using the specific configuration file:
```text
onedrive --confdir="~/.config/my-new-config"
```
You will be asked to open a specific URL by using your web browser where you will have to login into your Microsoft Account and give the application the permission to access your files. After giving permission to the application, you will be redirected to a blank page. Copy the URI of the blank page into the application.
```text
[user@hostname ~]$ onedrive --confdir="~/.config/my-new-config"
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Authorize this app visiting:

https://.....

Enter the response uri:

```

### Display and Test the configuration
5. Test the configuration using '--display-config' and '--dry-run'. By doing so, this allows you to test any configuration that you have currently made, enabling you to fix this configuration before using the configuration.

#### Display the configuration
```text
onedrive --confdir="~/.config/my-new-config --display-config"
```

#### Test the configuration by performing a dry-run
```text
onedrive --confdir="~/.config/my-new-config" --synchronize --verbose --dry-run
```

If both of these operate as per your expectation, the configuration of this client setup is complete and validated. If not, amend your configuration as required.

### Sync the OneDrive account data as required
6. Sync the data for the new account configuration as required:
```text
onedrive --confdir="~/.config/my-new-config" --synchronize --verbose
```
or
```text
onedrive --confdir="~/.config/my-new-config" --monitor --verbose
```

* `--synchronize` does a one-time sync
* `--monitor` keeps the application running and monitoring for changes both local and remote

### Automatic syncing of new OneDrive configuration
7. In order to automatically start syncing your OneDrive accounts, you will need to create a service file for each account. From the applicable 'user systemd folder':
* RHEL / CentOS: `/usr/lib/systemd/system`
* Others: `/usr/lib/systemd/user`

```text
cp onedrive.service onedrive-my-new-config.service
```
And edit the line beginning with `ExecStart` so that the confdir mirrors the one you used above:
```text
ExecStart=/usr/local/bin/onedrive --monitor --confdir="/path/to/config/dir"
```
Then you can safely run these commands:
```text
systemctl --user enable onedrive-my-new-config
systemctl --user start onedrive-my-new-config
```
Repeat these steps for each OneDrive new account that you wish to use.

## Configuring the client for use in dual-boot (Windows / Linux) situations
When dual booting Windows and Linux, depending on the Windows OneDrive account configuration, the 'Files On-Demand' option may be enabled when running OneDrive within your Windows environment.

When this option is enabled in Windows, if you are sharing this location between your Windows and Linux systems, all files will be a 0 byte link, and cannot be used under Linux.

To fix the problem of windows turning all files (that should be kept offline) into links, you have to uncheck a specific option in the onedrive settings window. The option in question is `Save space and download files as you use them`.

To find this setting, open the onedrive pop-up window from the taskbar, click "Help & Settings" > "Settings". This opens a new window. Go to the tab "Settings" and look for the section "Files On-Demand".

After unchecking the option and clicking "OK", the Windows OneDrive client should restart itself and start actually downloading your files so they will truely be available on your disk when offline. These files will then be fully accessible under Linux and the Linux OneDrive client.

| OneDrive Personal | Onedrive Business<br>SharePoint |
|---|---|
| ![Uncheck-Personal](./images/personal-files-on-demand.png) | ![Uncheck-Business](./images/business-files-on-demand.png) |
Binary file added docs/images/SharedLibraries.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/business-files-on-demand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/personal-files-on-demand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions onedrive.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,23 @@ State caching

Real-Time file monitoring with Inotify

File upload / download validation to ensure data integrity

Resumable uploads

Support OneDrive for Business (part of Office 365)

Shared folders (OneDrive Personal)
Shared Folder support for OneDrive Personal and OneDrive Business accounts

SharePoint / Office365 Shared Libraries

Desktop notifications via libnotify

Dry-run capability to test configuration changes

Prevent major OneDrive accidental data deletion after configuration change

SharePoint / Office 365 Group Drives (refer to README.Office365.md to configure)
Support for National cloud deployments (Microsoft Cloud for US Government, Microsoft Cloud Germany, Azure and Office 365 operated by 21Vianet in China)


.SH CONFIGURATION
Expand Down Expand Up @@ -339,4 +349,8 @@ for a user via the \fBonedrive@<username>\fP service.

Further examples and documentation is available in
\f[C]README.md\f[]
\f[C]docs/USAGE.md\f[]
\f[C]docs/advanced-usage.md\f[]
\f[C]docs/BusinessSharedFolders.md\f[]
\f[C]docs/Office365.md\f[]
\f[C]docs/national-cloud-deployments.md\f[]