qemu looks for smbd at /usr/sbin

DoneSubmitted by Ricardo Wurmus.
Details
4 participants
  • Leo Famulari
  • Ludovic Courtès
  • Marius Bakke
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
R
R
Ricardo Wurmus wrote on 6 May 2017 12:26
(address . bug-guix@gnu.org)
87zieq2sdx.fsf@elephly.net
Qemu comes with support for sharing files with a guest via Samba. Thisis done by appending something like this to the qemu-system-*invocation:
… -net user,smb=$HOME/Downloads -net nic
Qemu needs to be told *at configure time* where the smbd executable willbe at runtime. By default this is /usr/sbin/smbd. Users can workaround this problem by installing the “samba” package and creating alink from /usr/sbin/smbd to the actual executable.
It would be better to fix this, but this would require adding samba as adependency to Qemu, so that the location can be set at configure time.Alternatively, we could patch Qemu to look for smbd depending on anenvironment variable.
--Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAChttps://elephly.net
L
L
Ludovic Courtès wrote on 6 May 2017 14:45
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 26797@debbugs.gnu.org)
878tmaw3us.fsf@gnu.org
Ricardo Wurmus <rekado@elephly.net> skribis:
Toggle quote (16 lines)> Qemu comes with support for sharing files with a guest via Samba. This> is done by appending something like this to the qemu-system-*> invocation:>> … -net user,smb=$HOME/Downloads -net nic>> Qemu needs to be told *at configure time* where the smbd executable will> be at runtime. By default this is /usr/sbin/smbd. Users can work> around this problem by installing the “samba” package and creating a> link from /usr/sbin/smbd to the actual executable.>> It would be better to fix this, but this would require adding samba as a> dependency to Qemu, so that the location can be set at configure time.> Alternatively, we could patch Qemu to look for smbd depending on an> environment variable.
See commit b344c505f4dff2ecbe981f0a0a3c3d67b222dcca, which removed thedependency and Samba. Prior to that commit, QEMU recorded the absolutefile name of ‘smbd’.
The problem is that Samba is big:
Toggle snippet (6 lines)$ guix size qemu |tail -1total: 710.5 MiB$ guix size qemu samba |tail -1total: 1203.5 MiB
Thus it’d be best if we modified QEMU to search for ‘smbd’ in $PATH.
WDYT?
Ludo’.
R
R
Ricardo Wurmus wrote on 6 May 2017 15:03
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26797@debbugs.gnu.org)
87y3ua2l3c.fsf@elephly.net
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (13 lines)> See commit b344c505f4dff2ecbe981f0a0a3c3d67b222dcca, which removed the> dependency and Samba. Prior to that commit, QEMU recorded the absolute> file name of ‘smbd’.>> The problem is that Samba is big:>> --8<---------------cut here---------------start------------->8---> $ guix size qemu |tail -1> total: 710.5 MiB> $ guix size qemu samba |tail -1> total: 1203.5 MiB> --8<---------------cut here---------------end--------------->8---
Right, that’s not good.
Toggle quote (2 lines)> Thus it’d be best if we modified QEMU to search for ‘smbd’ in $PATH.
I agree! I can’t work on this right now, unfortunately, but I’llrevisit this at some point in the future if nobody else beats me to it.
Thanks for your input!
--Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAChttps://elephly.net
M
M
Marius Bakke wrote on 6 May 2017 16:42
(address . 26797@debbugs.gnu.org)
87y3uayrkc.fsf@fastmail.com
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (33 lines)> Ricardo Wurmus <rekado@elephly.net> skribis:>>> Qemu comes with support for sharing files with a guest via Samba. This>> is done by appending something like this to the qemu-system-*>> invocation:>>>> … -net user,smb=$HOME/Downloads -net nic>>>> Qemu needs to be told *at configure time* where the smbd executable will>> be at runtime. By default this is /usr/sbin/smbd. Users can work>> around this problem by installing the “samba” package and creating a>> link from /usr/sbin/smbd to the actual executable.>>>> It would be better to fix this, but this would require adding samba as a>> dependency to Qemu, so that the location can be set at configure time.>> Alternatively, we could patch Qemu to look for smbd depending on an>> environment variable.>> See commit b344c505f4dff2ecbe981f0a0a3c3d67b222dcca, which removed the> dependency and Samba. Prior to that commit, QEMU recorded the absolute> file name of ‘smbd’.>> The problem is that Samba is big:>> --8<---------------cut here---------------start------------->8---> $ guix size qemu |tail -1> total: 710.5 MiB> $ guix size qemu samba |tail -1> total: 1203.5 MiB> --8<---------------cut here---------------end--------------->8--->> Thus it’d be best if we modified QEMU to search for ‘smbd’ in $PATH.
Tangentially, would it make sense to add a "qemu-full" package? I'd liketo add RBD support when Ceph is stable on Hydra, but that adds another~300MiB to the closure (and a very expensive dependency..).
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkN4PMACgkQoqBt8qM6VPo7Qgf/Ycu+D5obukPqjgaU6O4Qgg5EmdZdUtAYDNCVPRz6tFTDmW3JR7nwDYN4IlHgReQNGtMmdzyPx6iCY5Ib0bz2G6qG3+tXZEXsIINPCoSpYVk3qVM0U8Yqu3qQB6fIg08ymE6epoHsPaU0CMk7C1k1aXGk17gO4FYM6o/uB6N8Yz+68jq1f19p9XHlGwZ8kGggau3xq1s8QZYSJvEhvuK3dpC4ywpvZoMuSnyUKMBEIhqcjF/jEv13CzkQE9XzrdDsRaQE5B3c2MVAeoXUyXDAB9AEzLB11oBDE7xiNfwCW815+EpDjE2mz5zgugjGLjqcJVy8rckA/jibDiZCQhN4BQ===3vxK-----END PGP SIGNATURE-----
L
L
Leo Famulari wrote on 6 May 2017 20:48
(name . Marius Bakke)(address . mbakke@fastmail.com)
20170506184850.GA22485@jasmine
On Sat, May 06, 2017 at 04:42:59PM +0200, Marius Bakke wrote:
Toggle quote (39 lines)> Ludovic Courtès <ludo@gnu.org> writes:> > > Ricardo Wurmus <rekado@elephly.net> skribis:> >> >> Qemu comes with support for sharing files with a guest via Samba. This> >> is done by appending something like this to the qemu-system-*> >> invocation:> >>> >> … -net user,smb=$HOME/Downloads -net nic> >>> >> Qemu needs to be told *at configure time* where the smbd executable will> >> be at runtime. By default this is /usr/sbin/smbd. Users can work> >> around this problem by installing the “samba” package and creating a> >> link from /usr/sbin/smbd to the actual executable.> >>> >> It would be better to fix this, but this would require adding samba as a> >> dependency to Qemu, so that the location can be set at configure time.> >> Alternatively, we could patch Qemu to look for smbd depending on an> >> environment variable.> >> > See commit b344c505f4dff2ecbe981f0a0a3c3d67b222dcca, which removed the> > dependency and Samba. Prior to that commit, QEMU recorded the absolute> > file name of ‘smbd’.> >> > The problem is that Samba is big:> >> > --8<---------------cut here---------------start------------->8---> > $ guix size qemu |tail -1> > total: 710.5 MiB> > $ guix size qemu samba |tail -1> > total: 1203.5 MiB> > --8<---------------cut here---------------end--------------->8---> >> > Thus it’d be best if we modified QEMU to search for ‘smbd’ in $PATH.> > Tangentially, would it make sense to add a "qemu-full" package? I'd like> to add RBD support when Ceph is stable on Hydra, but that adds another> ~300MiB to the closure (and a very expensive dependency..).
If qemu-full is something that would be generically useful, sure.Otherwise, maybe you could bring it to the potluck!
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlkOGo8ACgkQJkb6MLrKfwhQ+w/9GtqkkWzKpFngQwN7cua/ROOIqssygBNMpA8NwTtAm6klU8yIVKhmKA3lPwQoYqKTz1aDC6DoUaDwqof3wRMvS/OdxSXnk4GZn3BbBvCXackCUYYPzJsfGkuCJKw2NmRvk2+ucu57CDmJNks+xb3RBz30ZRWuPVWApK7/3Wuh3QGTBGc5PpuB1qoP2JXHEwJJdKaA7zdSWF7m7sLDj/9DBCxXDgsXEwBQRTLdHYQWtqDXSXlJiPVrILkfcCqzqOF4bgMIRgtbMxQaJXeW6YnACatxlavnJPVwqy++VlqvYZ7ZGGxVPKKpYfm2RwpPKxlSKGFxH4jTbHLkyS9Og8P9k8gL6uueslZ0G740i7Pi9uyarmcVYhOtmuKB5Ppf1dL3J24XhLtMTMBbcsozPPWjy/WVxyO5UaQARJXU21Hk3prFsO3VTwO2OfpIFoZtAYO/ry5F9IEAUpGkVb4qm2dy83IDGQOsSgbK7CpUJoncz9wiIUkojsCliQ6VOzajws4F4lJGOg5C+aFGUg3IdH9vXQG4jzy4ii+9mDYVzBBgrLxge0wird/jy3cmlkBIhPRoIu78rJsCmCAnXHy8j2OlmRFJglAHy6UG1277FKRzwWAm+Mb5kumFwRNVOx3Pcafo8QdVdZKyInSdwXVgo3NmFQc2j1tCP5ockErYN7FP/Qk==TrJV-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 7 May 2017 17:33
(name . Marius Bakke)(address . mbakke@fastmail.com)
87k25sptq3.fsf@gnu.org
Marius Bakke <mbakke@fastmail.com> skribis:
Toggle quote (39 lines)> Ludovic Courtès <ludo@gnu.org> writes:>>> Ricardo Wurmus <rekado@elephly.net> skribis:>>>>> Qemu comes with support for sharing files with a guest via Samba. This>>> is done by appending something like this to the qemu-system-*>>> invocation:>>>>>> … -net user,smb=$HOME/Downloads -net nic>>>>>> Qemu needs to be told *at configure time* where the smbd executable will>>> be at runtime. By default this is /usr/sbin/smbd. Users can work>>> around this problem by installing the “samba” package and creating a>>> link from /usr/sbin/smbd to the actual executable.>>>>>> It would be better to fix this, but this would require adding samba as a>>> dependency to Qemu, so that the location can be set at configure time.>>> Alternatively, we could patch Qemu to look for smbd depending on an>>> environment variable.>>>> See commit b344c505f4dff2ecbe981f0a0a3c3d67b222dcca, which removed the>> dependency and Samba. Prior to that commit, QEMU recorded the absolute>> file name of ‘smbd’.>>>> The problem is that Samba is big:>>>> --8<---------------cut here---------------start------------->8--->> $ guix size qemu |tail -1>> total: 710.5 MiB>> $ guix size qemu samba |tail -1>> total: 1203.5 MiB>> --8<---------------cut here---------------end--------------->8--->>>> Thus it’d be best if we modified QEMU to search for ‘smbd’ in $PATH.>> Tangentially, would it make sense to add a "qemu-full" package? I'd like> to add RBD support when Ceph is stable on Hydra, but that adds another> ~300MiB to the closure (and a very expensive dependency..).
The day after someone will suggest adding “qemu-fuller”. ;-)
Seriously yes, why not; just wondering whether it should be called“qemu-ceph-enabled” or something along these lines.
Ludo’.
L
L
Ludovic Courtès wrote on 8 May 2017 16:30
control message for bug #26797
(address . control@debbugs.gnu.org)
87zienl8uc.fsf@gnu.org
tags 26797 easy
M
M
Marius Bakke wrote on 7 Apr 2020 21:22
Re: bug#26797: qemu looks for smbd at /usr/sbin
87a73nm77r.fsf@devup.no
Ricardo Wurmus <rekado@elephly.net> writes:
Toggle quote (11 lines)> Qemu comes with support for sharing files with a guest via Samba. This> is done by appending something like this to the qemu-system-*> invocation:>> … -net user,smb=$HOME/Downloads -net nic>> Qemu needs to be told *at configure time* where the smbd executable will> be at runtime. By default this is /usr/sbin/smbd. Users can work> around this problem by installing the “samba” package and creating a> link from /usr/sbin/smbd to the actual executable.
This was fixed by Rutger back in84276503059d46c0a42240f8770f59090614d863 and0e5d0f66b56221b7de49ab28b607633e413c9110.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6M0vgACgkQoqBt8qM6VPrw3Qf+LZRfN6fKmlOG+cDI2x1Uk/aBp17zBKDhDCEsmMbTgS0uuahRu5wZPqlR/GVks1qCy6dG4Yr3Td0FoYsUnn9vjacPkA3MHLdyXbbAN/samFik4FdbdGCl3yUOLDmJufHGaVvp3c9ok4EAY+HL2pdWIqnnzYMF28xmZ6+/ye+4ibp2WfIeYGfNnrREF7C8G5JURrAuhKKdAAc6oqIe/LXNwdJT5+1fkvZClHyD9iYvgGw6rMNNF9SVueVgrN2Tt/jAfFM3qiIdRkb32qWOFANcnK92zCZtOKU2VmZMnFHmMFuNnB4Xu9i9KIXAAgVivDfUshXZXpzz6TJZ1nJFT4jPug===pFGw-----END PGP SIGNATURE-----
Closed
?