Allow building kio-nfs against standalone libtirpc
AbandonedPublic

Authored by arojas on May 8 2018, 4:20 PM.

Details

Summary

Latest glibc versions deprecate its rpc implementation and don't build it by default. This patch allows building the nfs kioslave against libtirpc instead.

Test Plan

Build with libtirpc installed: kio-nfs is built and links to libtirpc
Remove /usr/include/tirpc/rpc/rpc.h, use glibc with enabled rpc: kio-nfs is built and doesn't link to libtirpc
Remove /usr/include/tirpc/rpc/rpc.h, use glibc with disabled rpc: kio-nfs is not built

Diff Detail

Repository
R320 KIO Extras
Lint
Lint Skipped
Unit
Unit Tests Skipped
arojas requested review of this revision.May 8 2018, 4:20 PM
arojas created this revision.
ngraham added a subscriber: ngraham.May 8 2018, 7:01 PM
fvogt resigned from this revision.May 16 2018, 7:05 AM
fvogt added a reviewer: krop.
fvogt added a subscriber: krop.

IIRC @cgiboudeaux wrote this exact patch for kio-nfs from KDE 4 as well, but we opted to disable support downstream instead.

krop added a comment.May 16 2018, 8:02 AM

https://paste.kde.org/pscug8tik ← the patch I created for our kdebase4-runtime package, maybe you can pick useful things :)

Works fine for me with libtirpc!

ping, is this ready to merge?

ping, is this ready to merge?

Still needs to be approved. No idea who else to add as reviewer

krop added inline comments.Aug 18 2018, 10:57 AM
nfs/CMakeLists.txt
4

This won't work for openSUSE: the tirpc headers are installed in /usr/include directly.

asturmlechner added inline comments.Nov 27 2018, 10:17 PM
CMakeLists.txt
175

I would prefer a real build option instead of automagic here, and the detection below that conditional. I'm aware that's more than what we have right now.

nfs/CMakeLists.txt
4

Could you suggest an alternative? Gentoo shares a similarity with Arch there, because otherwise libtirpc could collide with older versions of glibc.

Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptNov 27 2018, 10:17 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
krop added inline comments.Nov 27 2018, 10:27 PM
nfs/CMakeLists.txt
4

I added the solution we use in openSUSE: https://paste.kde.org/pscug8tik

krop added inline comments.Nov 27 2018, 10:32 PM
nfs/CMakeLists.txt
4

Any solution is fine however, we now patched ours kdebase4-runtime package to disable kio-nfs completely. Pick the solution you prefer.

asturmlechner added inline comments.Nov 27 2018, 11:28 PM
nfs/CMakeLists.txt
4

Thanks, your FindTIRPC works for me. This is what I came up with using it: https://paste.pound-python.org/show/zgu3uRLCJzKqXj97mL5b/

@asturmlechner can you post that in a new review request? I'll abandon this one.

@asturmlechner can you post that in a new review request? I'll abandon this one.

Done, this is now in https://phabricator.kde.org/D17205

arojas abandoned this revision.Nov 28 2018, 7:43 AM