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

Do not install ocsync to subfolder #6588

Merged
merged 2 commits into from
Jun 20, 2018
Merged

Do not install ocsync to subfolder #6588

merged 2 commits into from
Jun 20, 2018

Conversation

dschmidt
Copy link
Member

@dschmidt dschmidt commented Jun 14, 2018

Hey,

I would like to be able to run the client from the Craft Root without further modifications or moving files around, for that ocsync.dll needs to be installed to bin/. I could just change the RUNTIME DESTINATION but I feel the RPATH has caused us more trouble in the past than it did us good:
Just look at the commit history: https://github.com/owncloud/client/search?q=rpath&type=Commits

So I'm voting to get rid of it now and rename the ocsync target, to not clash with branded builds.
I've verified that this way it's possible to run owncloud.exe from Craft Root, owncloud executable from build dir and from CMAKE_INSTALL_PREFIX on Linux - I just couldn't test macOS.

I don't care for the actual name, just that it's not installed to a subfolder.
Instead of ocsync_${APPLICATION_EXECUTABLE} we could maybe use ${APPLICATION_SHORTNAME}ocsync (or ${APPLICATION_SHORTNAME}sync_private) analogue to ${APPLICATION_SHORTNAME}sync. Other suggestions also welcome.

I can also set a variable on top level CMakeLists.txt to have the naming logic only in one place, but then I need a new name for this again.

Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.

The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.

It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
@dschmidt dschmidt requested a review from ogoffart June 14, 2018 20:25
@dschmidt
Copy link
Member Author

Btw does libsync completely abstract ocsync? Then we possibly don't need to link everything against ocsync but only against libsync (?).

@ogoffart
Copy link
Contributor

Good, I've had the same problem when doing the AppImage.

cp /build/appdir/usr/lib/owncloud/* /build/appdir/usr/lib

Btw does libsync completely abstract ocsync?

I don't think it does. Because of the common static library.

@ogoffart
Copy link
Contributor

So there is ${APPLICATION_EXECUTABLE}sync and, with this patch, ocsync_${APPLICATION_EXECUTABLE}

I'd vote for renaming it ${APPLICATION_EXECUTABLE}csync
or ${APPLICATION_EXECUTABLE}_csync. Rationale: then the library starts with libowncloud... and are easier to find in the lib directory. (Not a very strongly held opinion)

Copy link
Contributor

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, 👍
Even if we can bikeshed on the name

@ogoffart
Copy link
Contributor

Note, there is a synclib_NAME cmake variable. Maybe we could add a csync_NAME variable as well for consitency

@dschmidt
Copy link
Member Author

dschmidt commented Jun 17, 2018

Good points, I just wanted to use something to get started. Happy to rename it to whatever, as I said - I don't care at all about the actual name.

Sounds good - will do it with that CMake variable and probably just use ${APPLICATION_SHORTNAME}csync (analogue to ${APPLICATION_SHORTNAME}sync).

@guruz guruz self-assigned this Jun 18, 2018
@guruz
Copy link
Contributor

guruz commented Jun 18, 2018

Compiles for my on macOS (had to clean a bit in my build dir though).

.app also still is properly running

../install/owncloud.app//Contents/MacOS
../install/owncloud.app//Contents/MacOS/owncloud_crash_reporter
../install/owncloud.app//Contents/MacOS/libocsync_owncloud.2.5.0.dylib
../install/owncloud.app//Contents/MacOS/owncloudcmd
../install/owncloud.app//Contents/MacOS/owncloud
../install/owncloud.app//Contents/MacOS/libowncloudsync.dylib
../install/owncloud.app//Contents/MacOS/libowncloudsync.2.5.0.dylib
../install/owncloud.app//Contents/MacOS/libocsync_owncloud.0.dylib
../install/owncloud.app//Contents/MacOS/libqt5keychain.0.dylib
../install/owncloud.app//Contents/MacOS/libocsync_owncloud.dylib
../install/owncloud.app//Contents/MacOS/libowncloudsync.0.dylib
...

@guruz guruz removed their assignment Jun 18, 2018
@guruz guruz requested a review from jnweiger June 19, 2018 13:12
@guruz guruz added the p2-high Escalation, on top of current planning, release blocker label Jun 19, 2018
@guruz guruz added this to the 2.5.0 milestone Jun 19, 2018
@guruz
Copy link
Contributor

guruz commented Jun 19, 2018

(Might need packaging changes for DEB and RPM)

@dschmidt
Copy link
Member Author

(it will, yes)

Copy link
Contributor

@jnweiger jnweiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine with me.
Packaging changes are identified as https://gitea.int.owncloud.com/ownbrander/scripting/commit/0bd459d6d357e021be765e2caae4749d131f568f

test builds cannt work before the final new names are coded there.

@dschmidt dschmidt merged commit 4f96647 into owncloud:2.5 Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE YET p2-high Escalation, on top of current planning, release blocker packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants