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

samba: update to samba-4.x #1469

Merged
merged 8 commits into from Jul 11, 2017
Merged

samba: update to samba-4.x #1469

merged 8 commits into from Jul 11, 2017

Conversation

MilhouseVH
Copy link
Contributor

@MilhouseVH MilhouseVH commented Mar 22, 2017

Build pre-requisite: if

perl -MJSON -e 'exit(0);'

fails then you need to install sudo cpan JSON sudo apt-get install libjson-perl prior to building or the samba package will fail.

Thanks @sraue and @koying for laying the ground work on this.

This PR has a dependency on LibreELEC/service.libreelec.settings#62 which needs to be merged and LE settings bumped when this goes in.

@MilhouseVH
Copy link
Contributor Author

MilhouseVH commented Mar 22, 2017

Updated with the addition of libjson-perl to checkdeps - this works for Debian but probably needs testing on non-Debian build hosts.

@escalade
Copy link
Contributor

I have a suggestion for this PR, the removal of the samba-autoshare script. A better approach is simply sharing /var/media as "Media" when SAMBA_AUTOSHARE=true. I can't see the point of creating a separate share on plugging a disk and restarting smbd each time, it's unnecessary complex.

Here's the changes I did in my build: escalade@788161b

There seems to be an issue with reported file size when Kodi uses libsmbclient from the updated version as well: https://forum.libreelec.tv/thread-302-post-42037.html#pid42037

Probably a good idea to test this PR properly :)

@MilhouseVH
Copy link
Contributor Author

I have a suggestion for this PR, the removal of the samba-autoshare script.

I'd probably be more inclined to handle that as a separate PR, as I'm not convinced this change has legs right now.

There seems to be an issue with reported file size when Kodi uses libsmbclient from the updated version as well: https://forum.libreelec.tv/thread-302-post-42037.html#pid42037

Yes, already fixed in this PR - the escalade@788161b commit on your branch is out of date, you should re-pull this PR.

Probably a good idea to test this PR properly :)

Unless we can resolve the anonymous access issue, and also the occasional thread locking issue (some kind of race condition?) I'm inclined to park this regardless of whatever it might fix. So far I've seen no evidence it actually fixes anything, and just causes more problems.

@MilhouseVH
Copy link
Contributor Author

Update to samba-4.6.1 due to security vulnerability: https://www.samba.org/samba/history/samba-4.6.1.html

@MilhouseVH MilhouseVH changed the title samba: update to samba-4.6.0 samba: update to samba-4.6.1 Mar 28, 2017
@MilhouseVH MilhouseVH changed the title samba: update to samba-4.6.1 samba: update to samba-4.x Apr 2, 2017
@MilhouseVH
Copy link
Contributor Author

Updated to 4.6.2 which fixes a regression introduced by the 4.6.1 bug fix...

https://www.samba.org/samba/history/samba-4.6.2.html

@MilhouseVH
Copy link
Contributor Author

Added a systemd commit.

smbd, nmbd, rpcbind and kodi (via libsmbclient) all maintain locks in /var.

When shutting down the system without the requirement on var.mount, systemd will attempt to stop the var.mount unit (ie. unmount /var) before the smbd, nmbd, rpcbind and kodi processes are terminated. As these processes all have open files on /var, the var.mount unit will fail.

Adding the var.mount requirement fixes this problem, and var.mount is stopped after the other processes.

@stefansaraev
Copy link
Contributor

you can mount /var in initramfs: http://sprunge.us/DTLa and save yourself some pain.

@MilhouseVH
Copy link
Contributor Author

MilhouseVH commented Apr 20, 2017

Thanks @stefansaraev - have dropped the systemd commit and added #1554

@MilhouseVH
Copy link
Contributor Author

Re-added systemd commit as #1554 didn't work as expected due to systemd annoyances.

@mglae
Copy link
Contributor

mglae commented Apr 20, 2017

When removing Conflicts=umount.target from var.mount /var never gets unmounted because of DefaultDependencies=no

@MilhouseVH
Copy link
Contributor Author

@mglae great thanks - that seems to work nicely! systemd patch removed, var.mount patch added.

@chewitt chewitt merged commit 7661973 into LibreELEC:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants