Solved How to upgrade net/onedrive to 2.5.x ?

Has anyone been able to upgrade net/onedrive to 2.5.x? I have been using the old version (2.4.25) for some time without a problem. Recently I got the following message


WARNING: Your onedrive client version is now obsolete and unsupported. Please upgrade your client version.
Current Application Version: 2.4.25
Version Available: 2.5.3


There is no newer version in the ports, however the maintainer seems to have uploaded a patch for the newer version, according to this bug report.

I'm not sure how to interpret the bug report whether this is still outstanding and waiting to be resolved by someone (?), or I can apply the patch myself (although I'm not exactly sure how to do that to downloaded ports).
 
You can download the patch and apply it, the report has not been fixed (committed) yet. I did so with commands below.
Code:
sudo su
cd /usr/ports
fetch "https://bz-attachments.freebsd.org/attachment.cgi?id=253909"
patch < attachment.cgi\?id=253909
cd net/onedrive
make run-depends-list | cut -c 12- | xargs pkg ins -y
make build-depends-list | cut -c 12- | xargs pkg ins -y
make reinstall clean

You may need to be on main branch, aka latest branch of ports tree.

But, be aware of this note.
Diff:
diff --git a/UPDATING b/UPDATING
index bdf738ea69..6fb12b62c7 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,19 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20240928:
+  AFFECTS: users of net/onedrive
+  AUTHOR: hiroo.ono+freebsd@gmail.com
+
+  The version 2.5.x introduces significant changes regarding how the
+  integrity and validation of your data is determined and is not backwards
+  compatible with v2.4.x.
+  OneDrive Business Shared Folder Sync has been 100% re-written in v2.5.0.
+  If you are using this feature, please read the new documentation
+  carefully.
+  The application function --download-only no longer automatically deletes
+  local files. Please read the new documentation regarding this feature.
+
 
Thanks. Two questions:

1. I tend to use poudriere to built from ports. Is there a way of incorporating the patch step into the poudriere built?

2. Out of curiosity, who gets to approve a patch for a port. It seems that the patch was submitted a few months ago, but no action has been taken. Who does what, in this kind of situations?
 
For 1,

If you applied this update patch to your ports tree which the poudriere uses, then you should configure this option in poudriere's configuration. I think that's for building ports in a ports tree with local patches applied. I used to test my local ports and/or patches applied locally this way. For example, PACKAGE_FETCH_BLACKLIST="net/onedrive"
Code:
# /usr/local/etc/poudriere.conf
# Packages which should never be fetched.  This is useful for ports that
# you have local patches for as otherwise the patches would be ignored if
# a remote package is used instead.
#PACKAGE_FETCH_BLACKLIST=""

For 2,

As far as i know, there are people working voluntarily who is able to push a commit into the ports tree. I think the activity on bug reports may have been reduced due to we are being at the end of the year, people may have been take a break etc.

For example, in the attached screenshot, i have 33 bug reports, mostly new port requests, in new/open state.
 

Attachments

  • 1735509376223.png
    1735509376223.png
    341.7 KB · Views: 21
Thanks. Everything worked!

However when trying to update ports via poudriere i.e poudriere ports -u I now get the following error:


[00:00:00] Updating portstree "default" with git+https...error: cannot pull with rebase: You have unstaged changes.
error: Please commit or stash them.
[00:00:00] Error: /usr/local/share/poudriere/ports.sh:392: fail


This is clearly the result of applying the above patch, so is there a way of updating the ports, whilst keeping the applied patch?
 
You are welcome. You should commit this change (the patch) and rebase it so that you can update your ports tree.

Code:
# Go to the ports tree that Poudriere uses

cd ...

# Check for what files are modified

git status

# Commit the changes

git commit -m "net/onedrive: Update to 2.5.2"

# Rebase the changes with ports tree

git rebase origin main

Now you should be able to update the ports tree.
 
Back
Top