WDCommunity / wdpksrc

Cross compilation framework to create native packages for the Western Digital My Cloud
BSD 3-Clause "New" or "Revised" License
223 stars 61 forks source link

[duplicati] missing mono package libgdiplus #7

Open tonyrayo opened 6 years ago

tonyrayo commented 6 years ago

Well, first the good news... there seem to be zero SSL-related issues (also Amazon Cloud Drive and OneDrive tested; 100% success). If you go to fully delete a backup (specifically if you select to "Delete remote files"), an error will be thrown, not allowing the deletion to happen. A captcha is used in this situation that is generated using the mono package libgdiplus - which is still left out of some releases, because... reasons.

stefaang commented 6 years ago

It's an annoying package to compile as it requires a lot of dependencies (even X11). On the synocommunity issue tracker it was said that the problem resolved itself somehow. Maybe best to crosscheck the behavior on a synology product and check with duplicati for more info.

It could be that the official mono syno package is not the same as the one on synocommunity.

tonyrayo commented 6 years ago

I think that's the case, as it appears to be missing from a few seemingly random repos. From the official Mono docs website...

Due to its tight relation with System.Drawing, new versions of libgdiplus are released with (almost) every new version of Mono.

Anyone that has access to a storage backup solution should be able to manually delete these files if required. I just personally find it annoying that they are using that library seemingly just to create a captcha (compared to what GitHub does and gives you a warning if you are about to delete a project and asks that you type the full name in to confirm). It works well, but I plan on getting into the code and replacing that section with something better.

Their wiki talks about "OEM Branding" too. While I'm not looking to slap ads all over the place, there are a few neat things that can be done, such as enabling (or completely disabling) the update manifest. First, though, I want to get it working without errors (I spent about 30mins trying to fix SSL cert issues since I thought it was trying to call a captcha library from Google or somewhere else, and only when I found out that there were no SSL cert issues did I find this 😛 ).

tonyrayo commented 6 years ago

This problem goes back to at least 2015 among the synocommunity. One of the ways it was solved was a successful petition to have X11 and other dependencies removed. It can fit neatly into a less than 500kb package. I noticed synocommunity has a package called "Duplicity" (which I thought was a misspelling at first). It turns out Duplicati is a C# re-implementation of Duplicity; so we may have "backed the wrong horse" on this 😱 - I'll look to get the lib compiled and usable for our purposes (Mono and its libraries seem to be a nightmare because they differ among platforms... I could find some ready to go ARMv7 versions, but not x64).

Edit: Throwing a compiled libgdiplus.a into mono's lib directory (which was a long shot to begin with) didn't seem to work.

stefaang commented 6 years ago

You need to ldd libgdiplus and add each of the required dependencies as well (recursively :))

stefaang commented 6 years ago

Any improvement with the official synology mono package? I'm not sure if it's any better.

stefaang commented 6 years ago

I checked the official mono package mentioned above and it has the missing lib. So if you need the feature, you could use that mono package.