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

Add udisks2 support #13897

Merged
merged 1 commit into from
May 23, 2018
Merged

Add udisks2 support #13897

merged 1 commit into from
May 23, 2018

Conversation

edu-tsen
Copy link
Contributor

Description

Adds UDisks2Provider for handling mounts/umounts of removable devices.

See also Ticket #17560

Motivation and Context

Re-enable mounting and unmounting of removable media for non-root users.

Needed setup:

  • Adjust Polkit rules allowing action for org.freedesktop.udisks2.*
  • Add <handlemounting>true</handlemounting> to advancedsettings.xml if automount is wanted

PS: Old udisks support and automount feature seems to be undocumented in wiki.

How Has This Been Tested?

Tested on Ubuntu 18.04

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

class CUDisks2Drive
{
public:
std::string m_object;

This comment was marked as spam.

This comment was marked as spam.

@fritsch fritsch requested review from yol and wsnipex May 16, 2018 05:32
@fritsch
Copy link
Member

fritsch commented May 16, 2018

@wsnipex time to drop udisks1?

@fritsch
Copy link
Member

fritsch commented May 16, 2018

@edu-tsen and before I forget it: Thank you very much!

Copy link
Member

@wsnipex wsnipex left a comment

Choose a reason for hiding this comment

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

didn't have time to test it yet, but it looks good.
thanks for your contribution

}
else
{
CLog::Log(LOGDEBUG, "UDisks2: Refuse to mount %s", toString());

This comment was marked as spam.

This comment was marked as spam.

@mkreisl
Copy link

mkreisl commented May 16, 2018

@wsnipex time to drop udisks1?

It is long overdue, udisk1 has been dropped in Debian Stretch already, for example

@wsnipex
Copy link
Member

wsnipex commented May 16, 2018

yes, udisks1 can go, but it doesn't have to be part of this PR.

@wsnipex
Copy link
Member

wsnipex commented May 17, 2018

looks good to me

@fritsch
Copy link
Member

fritsch commented May 19, 2018

Pleash squash all commits to one "Implement Udisks2" support.

@pkerling I would shove it in after that - as it adds new functionality without touching existing code I'd say we can fix the minors after that, seems you are busy at the moment for review.

@Rohitrayi
Copy link

Rohitrayi commented May 19, 2018 via email

@edu-tsen
Copy link
Contributor Author

Squashed and force-pushed

@wsnipex wsnipex merged commit 325597a into xbmc:master May 23, 2018
@wsnipex
Copy link
Member

wsnipex commented May 23, 2018

thank you

@Rechi Rechi added Type: Improvement non-breaking change which improves existing functionality Platform: Linux v18 Leia labels May 23, 2018
@Rechi Rechi added this to the Leia 18.0-alpha2 milestone May 23, 2018
@yol
Copy link
Member

yol commented May 26, 2018

Seems I'm late to the party :-) I'd actually started doing this myself a year ago and mostly forgot about it cough

I'd have added some stylistic minors but overall it looks OK, it's merged now anyway and if it works - perfect. I'll certainly give it a try some time next week since there wasn't much reaction here concerning practical tests.

Thanks for the work!

@mkreisl
Copy link

mkreisl commented May 26, 2018

there wasn't much reaction here concerning practical tests.

Because it works 😄 (XBian, Debian Stretch, umounting mounted volumes)

@yol
Copy link
Member

yol commented May 26, 2018

Because it works

Great, but I can't really know that without anyone saying anything ^^

@yol
Copy link
Member

yol commented May 27, 2018

Works fine for me too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Linux Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants